aimpress-chatbot/node_modules/botframework-connector/lib/browser.js
“SamoilenkoVadym” 55445dbc86
Some checks failed
Build and deploy Node.js app to Azure Web App - ChatBot2222 / build (push) Has been cancelled
Build and deploy Node.js app to Azure Web App - ChatBot2222 / deploy (push) Has been cancelled
Deploy bot to Azure
2025-04-27 19:55:19 +01:00

564 lines
No EOL
1.2 MiB

'use strict';
var u$e = require('botframework-schema');
var botbuilderStdlib = require('botbuilder-stdlib');
function _interopNamespace(e) {
if (e && e.__esModule) return e;
var n = Object.create(null);
if (e) {
Object.keys(e).forEach(function (k) {
if (k !== 'default') {
var d = Object.getOwnPropertyDescriptor(e, k);
Object.defineProperty(n, k, d.get ? d : {
enumerable: true,
get: function () { return e[k]; }
});
}
});
}
n.default = e;
return Object.freeze(n);
}
var u$e__namespace = /*#__PURE__*/_interopNamespace(u$e);
var Nz=Object.create;var uh=Object.defineProperty,kz=Object.defineProperties,Pz=Object.getOwnPropertyDescriptor,Bz=Object.getOwnPropertyDescriptors,Uz=Object.getOwnPropertyNames,F0=Object.getOwnPropertySymbols,Dz=Object.getPrototypeOf,Iw=Object.prototype.hasOwnProperty,Cx=Object.prototype.propertyIsEnumerable;var Zl=(t,e)=>(e=Symbol[t])?e:Symbol.for("Symbol."+t),Lz=t=>{throw TypeError(t)},$e=Math.pow,Sx=(t,e,r)=>e in t?uh(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,oe=(t,e)=>{for(var r in e||(e={}))Iw.call(e,r)&&Sx(t,r,e[r]);if(F0)for(var r of F0(e))Cx.call(e,r)&&Sx(t,r,e[r]);return t},Me=(t,e)=>kz(t,Bz(e));var Ns=(t,e)=>{var r={};for(var n in t)Iw.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&F0)for(var n of F0(t))e.indexOf(n)<0&&Cx.call(t,n)&&(r[n]=t[n]);return r};var Ur=(t,e)=>()=>(t&&(e=t(t=0)),e);var ne=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Cr=(t,e)=>{for(var r in e)uh(t,r,{get:e[r],enumerable:!0});},z0=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Uz(e))!Iw.call(t,i)&&i!==r&&uh(t,i,{get:()=>e[i],enumerable:!(n=Pz(e,i))||n.enumerable});return t},Jl=(t,e,r)=>(z0(t,e,"default"),r),on=(t,e,r)=>(r=t!=null?Nz(Dz(t)):{},z0(e||!t||!t.__esModule?uh(r,"default",{value:t,enumerable:!0}):r,t)),Dr=t=>z0(uh({},"__esModule",{value:!0}),t);var re=(t,e,r)=>new Promise((n,i)=>{var o=c=>{try{s(r.next(c));}catch(u){i(u);}},a=c=>{try{s(r.throw(c));}catch(u){i(u);}},s=c=>c.done?n(c.value):Promise.resolve(c.value).then(o,a);s((r=r.apply(t,e)).next());}),$c=function(t,e){this[0]=t,this[1]=e;},Mw=(t,e,r)=>{var n=(a,s,c,u)=>{try{var l=r[a](s),w=(s=l.value)instanceof $c,T=l.done;Promise.resolve(w?s[0]:s).then(x=>w?n(a==="return"?a:"next",s[1]?{done:x.done,value:x.value}:x,c,u):c({value:x,done:T})).catch(x=>n("throw",x,c,u));}catch(x){u(x);}},i=a=>o[a]=s=>new Promise((c,u)=>n(a,s,c,u)),o={};return r=r.apply(t,e),o[Zl("asyncIterator")]=()=>o,i("next"),i("throw"),i("return"),o},Ow=t=>{var e=t[Zl("asyncIterator")],r=!1,n,i={};return e==null?(e=t[Zl("iterator")](),n=o=>i[o]=a=>e[o](a)):(e=e.call(t),n=o=>i[o]=a=>{if(r){if(r=!1,o==="throw")throw a;return a}return r=!0,{done:!1,value:new $c(new Promise(s=>{var c=e[o](a);c instanceof Object||Lz("Object expected"),s(c);}),1)}}),i[Zl("iterator")]=()=>i,n("next"),"throw"in e?n("throw"):i.throw=o=>{throw o},"return"in e&&n("return"),i},H0=(t,e,r)=>(e=t[Zl("asyncIterator")])?e.call(t):(t=t[Zl("iterator")](),e={},r=(n,i)=>(i=t[n])&&(e[n]=o=>new Promise((a,s,c)=>(o=i.call(t,o),c=o.done,Promise.resolve(o.value).then(u=>a({value:u,done:c}),s)))),r("next"),r("return"),e);var m=Ur(()=>{});var y=Ur(()=>{on(kn(),1);});var Ix=ne((P0e,xx)=>{v();m();y();g();var Lr=xx.exports={},Yo,Zo;function Nw(){throw new Error("setTimeout has not been defined")}function kw(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?Yo=setTimeout:Yo=Nw;}catch(t){Yo=Nw;}try{typeof clearTimeout=="function"?Zo=clearTimeout:Zo=kw;}catch(t){Zo=kw;}})();function Ax(t){if(Yo===setTimeout)return setTimeout(t,0);if((Yo===Nw||!Yo)&&setTimeout)return Yo=setTimeout,setTimeout(t,0);try{return Yo(t,0)}catch(e){try{return Yo.call(null,t,0)}catch(r){return Yo.call(this,t,0)}}}function Fz(t){if(Zo===clearTimeout)return clearTimeout(t);if((Zo===kw||!Zo)&&clearTimeout)return Zo=clearTimeout,clearTimeout(t);try{return Zo(t)}catch(e){try{return Zo.call(null,t)}catch(r){return Zo.call(this,t)}}}var Ua=[],Xl=!1,Vc,j0=-1;function zz(){!Xl||!Vc||(Xl=!1,Vc.length?Ua=Vc.concat(Ua):j0=-1,Ua.length&&Tx());}function Tx(){if(!Xl){var t=Ax(zz);Xl=!0;for(var e=Ua.length;e;){for(Vc=Ua,Ua=[];++j0<e;)Vc&&Vc[j0].run();j0=-1,e=Ua.length;}Vc=null,Xl=!1,Fz(t);}}Lr.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];Ua.push(new Rx(t,e)),Ua.length===1&&!Xl&&Ax(Tx);};function Rx(t,e){this.fun=t,this.array=e;}Rx.prototype.run=function(){this.fun.apply(null,this.array);};Lr.title="browser";Lr.browser=!0;Lr.env={};Lr.argv=[];Lr.version="";Lr.versions={};function Da(){}Lr.on=Da;Lr.addListener=Da;Lr.once=Da;Lr.off=Da;Lr.removeListener=Da;Lr.removeAllListeners=Da;Lr.emit=Da;Lr.prependListener=Da;Lr.prependOnceListener=Da;Lr.listeners=function(t){return []};Lr.binding=function(t){throw new Error("process.binding is not supported")};Lr.cwd=function(){return "/"};Lr.chdir=function(t){throw new Error("process.chdir is not supported")};Lr.umask=function(){return 0};});var N,g=Ur(()=>{N=on(Ix(),1);});var Nx=ne($0=>{v();m();y();g();$0.byteLength=jz;$0.toByteArray=Vz;$0.fromByteArray=Wz;var Jo=[],Mi=[],Hz=typeof Uint8Array!="undefined"?Uint8Array:Array,Pw="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(Gc=0,Mx=Pw.length;Gc<Mx;++Gc)Jo[Gc]=Pw[Gc],Mi[Pw.charCodeAt(Gc)]=Gc;var Gc,Mx;Mi[45]=62;Mi[95]=63;function Ox(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");r===-1&&(r=e);var n=r===e?0:4-r%4;return [r,n]}function jz(t){var e=Ox(t),r=e[0],n=e[1];return (r+n)*3/4-n}function $z(t,e,r){return (e+r)*3/4-r}function Vz(t){var e,r=Ox(t),n=r[0],i=r[1],o=new Hz($z(t,n,i)),a=0,s=i>0?n-4:n,c;for(c=0;c<s;c+=4)e=Mi[t.charCodeAt(c)]<<18|Mi[t.charCodeAt(c+1)]<<12|Mi[t.charCodeAt(c+2)]<<6|Mi[t.charCodeAt(c+3)],o[a++]=e>>16&255,o[a++]=e>>8&255,o[a++]=e&255;return i===2&&(e=Mi[t.charCodeAt(c)]<<2|Mi[t.charCodeAt(c+1)]>>4,o[a++]=e&255),i===1&&(e=Mi[t.charCodeAt(c)]<<10|Mi[t.charCodeAt(c+1)]<<4|Mi[t.charCodeAt(c+2)]>>2,o[a++]=e>>8&255,o[a++]=e&255),o}function Gz(t){return Jo[t>>18&63]+Jo[t>>12&63]+Jo[t>>6&63]+Jo[t&63]}function Kz(t,e,r){for(var n,i=[],o=e;o<r;o+=3)n=(t[o]<<16&16711680)+(t[o+1]<<8&65280)+(t[o+2]&255),i.push(Gz(n));return i.join("")}function Wz(t){for(var e,r=t.length,n=r%3,i=[],o=16383,a=0,s=r-n;a<s;a+=o)i.push(Kz(t,a,a+o>s?s:a+o));return n===1?(e=t[r-1],i.push(Jo[e>>2]+Jo[e<<4&63]+"==")):n===2&&(e=(t[r-2]<<8)+t[r-1],i.push(Jo[e>>10]+Jo[e>>4&63]+Jo[e<<2&63]+"=")),i.join("")}});var kx=ne(Bw=>{v();m();y();g();Bw.read=function(t,e,r,n,i){var o,a,s=i*8-n-1,c=(1<<s)-1,u=c>>1,l=-7,w=r?i-1:0,T=r?-1:1,x=t[e+w];for(w+=T,o=x&(1<<-l)-1,x>>=-l,l+=s;l>0;o=o*256+t[e+w],w+=T,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=n;l>0;a=a*256+t[e+w],w+=T,l-=8);if(o===0)o=1-u;else {if(o===c)return a?NaN:(x?-1:1)*(1/0);a=a+Math.pow(2,n),o=o-u;}return (x?-1:1)*a*Math.pow(2,o-n)};Bw.write=function(t,e,r,n,i,o){var a,s,c,u=o*8-i-1,l=(1<<u)-1,w=l>>1,T=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,x=n?0:o-1,I=n?1:-1,k=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=l):(a=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-a))<1&&(a--,c*=2),a+w>=1?e+=T/c:e+=T*Math.pow(2,1-w),e*c>=2&&(a++,c/=2),a+w>=l?(s=0,a=l):a+w>=1?(s=(e*c-1)*Math.pow(2,i),a=a+w):(s=e*Math.pow(2,w-1)*Math.pow(2,i),a=0));i>=8;t[r+x]=s&255,x+=I,s/=256,i-=8);for(a=a<<i|s,u+=i;u>0;t[r+x]=a&255,x+=I,a/=256,u-=8);t[r+x-I]|=k*128;};});var kn=ne(rf=>{v();m();y();g();var Uw=Nx(),ef=kx(),Px=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;rf.Buffer=Ee;rf.SlowBuffer=eH;rf.INSPECT_MAX_BYTES=50;var V0=2147483647;rf.kMaxLength=V0;Ee.TYPED_ARRAY_SUPPORT=Yz();!Ee.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 Yz(){try{let t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),t.foo()===42}catch(t){return !1}}Object.defineProperty(Ee.prototype,"parent",{enumerable:!0,get:function(){if(Ee.isBuffer(this))return this.buffer}});Object.defineProperty(Ee.prototype,"offset",{enumerable:!0,get:function(){if(Ee.isBuffer(this))return this.byteOffset}});function La(t){if(t>V0)throw new RangeError('The value "'+t+'" is invalid for option "size"');let e=new Uint8Array(t);return Object.setPrototypeOf(e,Ee.prototype),e}function Ee(t,e,r){if(typeof t=="number"){if(typeof e=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return Fw(t)}return Lx(t,e,r)}Ee.poolSize=8192;function Lx(t,e,r){if(typeof t=="string")return Jz(t,e);if(ArrayBuffer.isView(t))return Xz(t);if(t==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(Xo(t,ArrayBuffer)||t&&Xo(t.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(Xo(t,SharedArrayBuffer)||t&&Xo(t.buffer,SharedArrayBuffer)))return Lw(t,e,r);if(typeof t=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let n=t.valueOf&&t.valueOf();if(n!=null&&n!==t)return Ee.from(n,e,r);let i=Qz(t);if(i)return i;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof t[Symbol.toPrimitive]=="function")return Ee.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}Ee.from=function(t,e,r){return Lx(t,e,r)};Object.setPrototypeOf(Ee.prototype,Uint8Array.prototype);Object.setPrototypeOf(Ee,Uint8Array);function qx(t){if(typeof t!="number")throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function Zz(t,e,r){return qx(t),t<=0?La(t):e!==void 0?typeof r=="string"?La(t).fill(e,r):La(t).fill(e):La(t)}Ee.alloc=function(t,e,r){return Zz(t,e,r)};function Fw(t){return qx(t),La(t<0?0:zw(t)|0)}Ee.allocUnsafe=function(t){return Fw(t)};Ee.allocUnsafeSlow=function(t){return Fw(t)};function Jz(t,e){if((typeof e!="string"||e==="")&&(e="utf8"),!Ee.isEncoding(e))throw new TypeError("Unknown encoding: "+e);let r=Fx(t,e)|0,n=La(r),i=n.write(t,e);return i!==r&&(n=n.slice(0,i)),n}function Dw(t){let e=t.length<0?0:zw(t.length)|0,r=La(e);for(let n=0;n<e;n+=1)r[n]=t[n]&255;return r}function Xz(t){if(Xo(t,Uint8Array)){let e=new Uint8Array(t);return Lw(e.buffer,e.byteOffset,e.byteLength)}return Dw(t)}function Lw(t,e,r){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return e===void 0&&r===void 0?n=new Uint8Array(t):r===void 0?n=new Uint8Array(t,e):n=new Uint8Array(t,e,r),Object.setPrototypeOf(n,Ee.prototype),n}function Qz(t){if(Ee.isBuffer(t)){let e=zw(t.length)|0,r=La(e);return r.length===0||t.copy(r,0,0,e),r}if(t.length!==void 0)return typeof t.length!="number"||jw(t.length)?La(0):Dw(t);if(t.type==="Buffer"&&Array.isArray(t.data))return Dw(t.data)}function zw(t){if(t>=V0)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+V0.toString(16)+" bytes");return t|0}function eH(t){return +t!=t&&(t=0),Ee.alloc(+t)}Ee.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==Ee.prototype};Ee.compare=function(e,r){if(Xo(e,Uint8Array)&&(e=Ee.from(e,e.offset,e.byteLength)),Xo(r,Uint8Array)&&(r=Ee.from(r,r.offset,r.byteLength)),!Ee.isBuffer(e)||!Ee.isBuffer(r))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===r)return 0;let n=e.length,i=r.length;for(let o=0,a=Math.min(n,i);o<a;++o)if(e[o]!==r[o]){n=e[o],i=r[o];break}return n<i?-1:i<n?1:0};Ee.isEncoding=function(e){switch(String(e).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}};Ee.concat=function(e,r){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(e.length===0)return Ee.alloc(0);let n;if(r===void 0)for(r=0,n=0;n<e.length;++n)r+=e[n].length;let i=Ee.allocUnsafe(r),o=0;for(n=0;n<e.length;++n){let a=e[n];if(Xo(a,Uint8Array))o+a.length>i.length?(Ee.isBuffer(a)||(a=Ee.from(a)),a.copy(i,o)):Uint8Array.prototype.set.call(i,a,o);else if(Ee.isBuffer(a))a.copy(i,o);else throw new TypeError('"list" argument must be an Array of Buffers');o+=a.length;}return i};function Fx(t,e){if(Ee.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||Xo(t,ArrayBuffer))return t.byteLength;if(typeof t!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);let r=t.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&r===0)return 0;let i=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return qw(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return Yx(t).length;default:if(i)return n?-1:qw(t).length;e=(""+e).toLowerCase(),i=!0;}}Ee.byteLength=Fx;function tH(t,e,r){let n=!1;if((e===void 0||e<0)&&(e=0),e>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,e>>>=0,r<=e))return "";for(t||(t="utf8");;)switch(t){case"hex":return fH(this,e,r);case"utf8":case"utf-8":return Hx(this,e,r);case"ascii":return uH(this,e,r);case"latin1":case"binary":return lH(this,e,r);case"base64":return sH(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return dH(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0;}}Ee.prototype._isBuffer=!0;function Kc(t,e,r){let n=t[e];t[e]=t[r],t[r]=n;}Ee.prototype.swap16=function(){let e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let r=0;r<e;r+=2)Kc(this,r,r+1);return this};Ee.prototype.swap32=function(){let e=this.length;if(e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let r=0;r<e;r+=4)Kc(this,r,r+3),Kc(this,r+1,r+2);return this};Ee.prototype.swap64=function(){let e=this.length;if(e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let r=0;r<e;r+=8)Kc(this,r,r+7),Kc(this,r+1,r+6),Kc(this,r+2,r+5),Kc(this,r+3,r+4);return this};Ee.prototype.toString=function(){let e=this.length;return e===0?"":arguments.length===0?Hx(this,0,e):tH.apply(this,arguments)};Ee.prototype.toLocaleString=Ee.prototype.toString;Ee.prototype.equals=function(e){if(!Ee.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:Ee.compare(this,e)===0};Ee.prototype.inspect=function(){let e="",r=rf.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"};Px&&(Ee.prototype[Px]=Ee.prototype.inspect);Ee.prototype.compare=function(e,r,n,i,o){if(Xo(e,Uint8Array)&&(e=Ee.from(e,e.offset,e.byteLength)),!Ee.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(r===void 0&&(r=0),n===void 0&&(n=e?e.length:0),i===void 0&&(i=0),o===void 0&&(o=this.length),r<0||n>e.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&r>=n)return 0;if(i>=o)return -1;if(r>=n)return 1;if(r>>>=0,n>>>=0,i>>>=0,o>>>=0,this===e)return 0;let a=o-i,s=n-r,c=Math.min(a,s),u=this.slice(i,o),l=e.slice(r,n);for(let w=0;w<c;++w)if(u[w]!==l[w]){a=u[w],s=l[w];break}return a<s?-1:s<a?1:0};function zx(t,e,r,n,i){if(t.length===0)return -1;if(typeof r=="string"?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,jw(r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return -1;r=t.length-1;}else if(r<0)if(i)r=0;else return -1;if(typeof e=="string"&&(e=Ee.from(e,n)),Ee.isBuffer(e))return e.length===0?-1:Bx(t,e,r,n,i);if(typeof e=="number")return e=e&255,typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):Bx(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function Bx(t,e,r,n,i){let o=1,a=t.length,s=e.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(t.length<2||e.length<2)return -1;o=2,a/=2,s/=2,r/=2;}function c(l,w){return o===1?l[w]:l.readUInt16BE(w*o)}let u;if(i){let l=-1;for(u=r;u<a;u++)if(c(t,u)===c(e,l===-1?0:u-l)){if(l===-1&&(l=u),u-l+1===s)return l*o}else l!==-1&&(u-=u-l),l=-1;}else for(r+s>a&&(r=a-s),u=r;u>=0;u--){let l=!0;for(let w=0;w<s;w++)if(c(t,u+w)!==c(e,w)){l=!1;break}if(l)return u}return -1}Ee.prototype.includes=function(e,r,n){return this.indexOf(e,r,n)!==-1};Ee.prototype.indexOf=function(e,r,n){return zx(this,e,r,n,!0)};Ee.prototype.lastIndexOf=function(e,r,n){return zx(this,e,r,n,!1)};function rH(t,e,r,n){r=Number(r)||0;let i=t.length-r;n?(n=Number(n),n>i&&(n=i)):n=i;let o=e.length;n>o/2&&(n=o/2);let a;for(a=0;a<n;++a){let s=parseInt(e.substr(a*2,2),16);if(jw(s))return a;t[r+a]=s;}return a}function nH(t,e,r,n){return G0(qw(e,t.length-r),t,r,n)}function iH(t,e,r,n){return G0(yH(e),t,r,n)}function oH(t,e,r,n){return G0(Yx(e),t,r,n)}function aH(t,e,r,n){return G0(gH(e,t.length-r),t,r,n)}Ee.prototype.write=function(e,r,n,i){if(r===void 0)i="utf8",n=this.length,r=0;else if(n===void 0&&typeof r=="string")i=r,n=this.length,r=0;else if(isFinite(r))r=r>>>0,isFinite(n)?(n=n>>>0,i===void 0&&(i="utf8")):(i=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let o=this.length-r;if((n===void 0||n>o)&&(n=o),e.length>0&&(n<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");let a=!1;for(;;)switch(i){case"hex":return rH(this,e,r,n);case"utf8":case"utf-8":return nH(this,e,r,n);case"ascii":case"latin1":case"binary":return iH(this,e,r,n);case"base64":return oH(this,e,r,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return aH(this,e,r,n);default:if(a)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),a=!0;}};Ee.prototype.toJSON=function(){return {type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function sH(t,e,r){return e===0&&r===t.length?Uw.fromByteArray(t):Uw.fromByteArray(t.slice(e,r))}function Hx(t,e,r){r=Math.min(t.length,r);let n=[],i=e;for(;i<r;){let o=t[i],a=null,s=o>239?4:o>223?3:o>191?2:1;if(i+s<=r){let c,u,l,w;switch(s){case 1:o<128&&(a=o);break;case 2:c=t[i+1],(c&192)===128&&(w=(o&31)<<6|c&63,w>127&&(a=w));break;case 3:c=t[i+1],u=t[i+2],(c&192)===128&&(u&192)===128&&(w=(o&15)<<12|(c&63)<<6|u&63,w>2047&&(w<55296||w>57343)&&(a=w));break;case 4:c=t[i+1],u=t[i+2],l=t[i+3],(c&192)===128&&(u&192)===128&&(l&192)===128&&(w=(o&15)<<18|(c&63)<<12|(u&63)<<6|l&63,w>65535&&w<1114112&&(a=w));}}a===null?(a=65533,s=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|a&1023),n.push(a),i+=s;}return cH(n)}var Ux=4096;function cH(t){let e=t.length;if(e<=Ux)return String.fromCharCode.apply(String,t);let r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=Ux));return r}function uH(t,e,r){let n="";r=Math.min(t.length,r);for(let i=e;i<r;++i)n+=String.fromCharCode(t[i]&127);return n}function lH(t,e,r){let n="";r=Math.min(t.length,r);for(let i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function fH(t,e,r){let n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);let i="";for(let o=e;o<r;++o)i+=vH[t[o]];return i}function dH(t,e,r){let n=t.slice(e,r),i="";for(let o=0;o<n.length-1;o+=2)i+=String.fromCharCode(n[o]+n[o+1]*256);return i}Ee.prototype.slice=function(e,r){let n=this.length;e=~~e,r=r===void 0?n:~~r,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),r<e&&(r=e);let i=this.subarray(e,r);return Object.setPrototypeOf(i,Ee.prototype),i};function an(t,e,r){if(t%1!==0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}Ee.prototype.readUintLE=Ee.prototype.readUIntLE=function(e,r,n){e=e>>>0,r=r>>>0,n||an(e,r,this.length);let i=this[e],o=1,a=0;for(;++a<r&&(o*=256);)i+=this[e+a]*o;return i};Ee.prototype.readUintBE=Ee.prototype.readUIntBE=function(e,r,n){e=e>>>0,r=r>>>0,n||an(e,r,this.length);let i=this[e+--r],o=1;for(;r>0&&(o*=256);)i+=this[e+--r]*o;return i};Ee.prototype.readUint8=Ee.prototype.readUInt8=function(e,r){return e=e>>>0,r||an(e,1,this.length),this[e]};Ee.prototype.readUint16LE=Ee.prototype.readUInt16LE=function(e,r){return e=e>>>0,r||an(e,2,this.length),this[e]|this[e+1]<<8};Ee.prototype.readUint16BE=Ee.prototype.readUInt16BE=function(e,r){return e=e>>>0,r||an(e,2,this.length),this[e]<<8|this[e+1]};Ee.prototype.readUint32LE=Ee.prototype.readUInt32LE=function(e,r){return e=e>>>0,r||an(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};Ee.prototype.readUint32BE=Ee.prototype.readUInt32BE=function(e,r){return e=e>>>0,r||an(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};Ee.prototype.readBigUInt64LE=ks(function(e){e=e>>>0,tf(e,"offset");let r=this[e],n=this[e+7];(r===void 0||n===void 0)&&lh(e,this.length-8);let i=r+this[++e]*$e(2,8)+this[++e]*$e(2,16)+this[++e]*$e(2,24),o=this[++e]+this[++e]*$e(2,8)+this[++e]*$e(2,16)+n*$e(2,24);return BigInt(i)+(BigInt(o)<<BigInt(32))});Ee.prototype.readBigUInt64BE=ks(function(e){e=e>>>0,tf(e,"offset");let r=this[e],n=this[e+7];(r===void 0||n===void 0)&&lh(e,this.length-8);let i=r*$e(2,24)+this[++e]*$e(2,16)+this[++e]*$e(2,8)+this[++e],o=this[++e]*$e(2,24)+this[++e]*$e(2,16)+this[++e]*$e(2,8)+n;return (BigInt(i)<<BigInt(32))+BigInt(o)});Ee.prototype.readIntLE=function(e,r,n){e=e>>>0,r=r>>>0,n||an(e,r,this.length);let i=this[e],o=1,a=0;for(;++a<r&&(o*=256);)i+=this[e+a]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*r)),i};Ee.prototype.readIntBE=function(e,r,n){e=e>>>0,r=r>>>0,n||an(e,r,this.length);let i=r,o=1,a=this[e+--i];for(;i>0&&(o*=256);)a+=this[e+--i]*o;return o*=128,a>=o&&(a-=Math.pow(2,8*r)),a};Ee.prototype.readInt8=function(e,r){return e=e>>>0,r||an(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};Ee.prototype.readInt16LE=function(e,r){e=e>>>0,r||an(e,2,this.length);let n=this[e]|this[e+1]<<8;return n&32768?n|4294901760:n};Ee.prototype.readInt16BE=function(e,r){e=e>>>0,r||an(e,2,this.length);let n=this[e+1]|this[e]<<8;return n&32768?n|4294901760:n};Ee.prototype.readInt32LE=function(e,r){return e=e>>>0,r||an(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};Ee.prototype.readInt32BE=function(e,r){return e=e>>>0,r||an(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};Ee.prototype.readBigInt64LE=ks(function(e){e=e>>>0,tf(e,"offset");let r=this[e],n=this[e+7];(r===void 0||n===void 0)&&lh(e,this.length-8);let i=this[e+4]+this[e+5]*$e(2,8)+this[e+6]*$e(2,16)+(n<<24);return (BigInt(i)<<BigInt(32))+BigInt(r+this[++e]*$e(2,8)+this[++e]*$e(2,16)+this[++e]*$e(2,24))});Ee.prototype.readBigInt64BE=ks(function(e){e=e>>>0,tf(e,"offset");let r=this[e],n=this[e+7];(r===void 0||n===void 0)&&lh(e,this.length-8);let i=(r<<24)+this[++e]*$e(2,16)+this[++e]*$e(2,8)+this[++e];return (BigInt(i)<<BigInt(32))+BigInt(this[++e]*$e(2,24)+this[++e]*$e(2,16)+this[++e]*$e(2,8)+n)});Ee.prototype.readFloatLE=function(e,r){return e=e>>>0,r||an(e,4,this.length),ef.read(this,e,!0,23,4)};Ee.prototype.readFloatBE=function(e,r){return e=e>>>0,r||an(e,4,this.length),ef.read(this,e,!1,23,4)};Ee.prototype.readDoubleLE=function(e,r){return e=e>>>0,r||an(e,8,this.length),ef.read(this,e,!0,52,8)};Ee.prototype.readDoubleBE=function(e,r){return e=e>>>0,r||an(e,8,this.length),ef.read(this,e,!1,52,8)};function Yn(t,e,r,n,i,o){if(!Ee.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}Ee.prototype.writeUintLE=Ee.prototype.writeUIntLE=function(e,r,n,i){if(e=+e,r=r>>>0,n=n>>>0,!i){let s=Math.pow(2,8*n)-1;Yn(this,e,r,n,s,0);}let o=1,a=0;for(this[r]=e&255;++a<n&&(o*=256);)this[r+a]=e/o&255;return r+n};Ee.prototype.writeUintBE=Ee.prototype.writeUIntBE=function(e,r,n,i){if(e=+e,r=r>>>0,n=n>>>0,!i){let s=Math.pow(2,8*n)-1;Yn(this,e,r,n,s,0);}let o=n-1,a=1;for(this[r+o]=e&255;--o>=0&&(a*=256);)this[r+o]=e/a&255;return r+n};Ee.prototype.writeUint8=Ee.prototype.writeUInt8=function(e,r,n){return e=+e,r=r>>>0,n||Yn(this,e,r,1,255,0),this[r]=e&255,r+1};Ee.prototype.writeUint16LE=Ee.prototype.writeUInt16LE=function(e,r,n){return e=+e,r=r>>>0,n||Yn(this,e,r,2,65535,0),this[r]=e&255,this[r+1]=e>>>8,r+2};Ee.prototype.writeUint16BE=Ee.prototype.writeUInt16BE=function(e,r,n){return e=+e,r=r>>>0,n||Yn(this,e,r,2,65535,0),this[r]=e>>>8,this[r+1]=e&255,r+2};Ee.prototype.writeUint32LE=Ee.prototype.writeUInt32LE=function(e,r,n){return e=+e,r=r>>>0,n||Yn(this,e,r,4,4294967295,0),this[r+3]=e>>>24,this[r+2]=e>>>16,this[r+1]=e>>>8,this[r]=e&255,r+4};Ee.prototype.writeUint32BE=Ee.prototype.writeUInt32BE=function(e,r,n){return e=+e,r=r>>>0,n||Yn(this,e,r,4,4294967295,0),this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=e&255,r+4};function jx(t,e,r,n,i){Wx(e,n,i,t,r,7);let o=Number(e&BigInt(4294967295));t[r++]=o,o=o>>8,t[r++]=o,o=o>>8,t[r++]=o,o=o>>8,t[r++]=o;let a=Number(e>>BigInt(32)&BigInt(4294967295));return t[r++]=a,a=a>>8,t[r++]=a,a=a>>8,t[r++]=a,a=a>>8,t[r++]=a,r}function $x(t,e,r,n,i){Wx(e,n,i,t,r,7);let o=Number(e&BigInt(4294967295));t[r+7]=o,o=o>>8,t[r+6]=o,o=o>>8,t[r+5]=o,o=o>>8,t[r+4]=o;let a=Number(e>>BigInt(32)&BigInt(4294967295));return t[r+3]=a,a=a>>8,t[r+2]=a,a=a>>8,t[r+1]=a,a=a>>8,t[r]=a,r+8}Ee.prototype.writeBigUInt64LE=ks(function(e,r=0){return jx(this,e,r,BigInt(0),BigInt("0xffffffffffffffff"))});Ee.prototype.writeBigUInt64BE=ks(function(e,r=0){return $x(this,e,r,BigInt(0),BigInt("0xffffffffffffffff"))});Ee.prototype.writeIntLE=function(e,r,n,i){if(e=+e,r=r>>>0,!i){let c=Math.pow(2,8*n-1);Yn(this,e,r,n,c-1,-c);}let o=0,a=1,s=0;for(this[r]=e&255;++o<n&&(a*=256);)e<0&&s===0&&this[r+o-1]!==0&&(s=1),this[r+o]=(e/a>>0)-s&255;return r+n};Ee.prototype.writeIntBE=function(e,r,n,i){if(e=+e,r=r>>>0,!i){let c=Math.pow(2,8*n-1);Yn(this,e,r,n,c-1,-c);}let o=n-1,a=1,s=0;for(this[r+o]=e&255;--o>=0&&(a*=256);)e<0&&s===0&&this[r+o+1]!==0&&(s=1),this[r+o]=(e/a>>0)-s&255;return r+n};Ee.prototype.writeInt8=function(e,r,n){return e=+e,r=r>>>0,n||Yn(this,e,r,1,127,-128),e<0&&(e=255+e+1),this[r]=e&255,r+1};Ee.prototype.writeInt16LE=function(e,r,n){return e=+e,r=r>>>0,n||Yn(this,e,r,2,32767,-32768),this[r]=e&255,this[r+1]=e>>>8,r+2};Ee.prototype.writeInt16BE=function(e,r,n){return e=+e,r=r>>>0,n||Yn(this,e,r,2,32767,-32768),this[r]=e>>>8,this[r+1]=e&255,r+2};Ee.prototype.writeInt32LE=function(e,r,n){return e=+e,r=r>>>0,n||Yn(this,e,r,4,2147483647,-2147483648),this[r]=e&255,this[r+1]=e>>>8,this[r+2]=e>>>16,this[r+3]=e>>>24,r+4};Ee.prototype.writeInt32BE=function(e,r,n){return e=+e,r=r>>>0,n||Yn(this,e,r,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=e&255,r+4};Ee.prototype.writeBigInt64LE=ks(function(e,r=0){return jx(this,e,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});Ee.prototype.writeBigInt64BE=ks(function(e,r=0){return $x(this,e,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Vx(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function Gx(t,e,r,n,i){return e=+e,r=r>>>0,i||Vx(t,e,r,4),ef.write(t,e,r,n,23,4),r+4}Ee.prototype.writeFloatLE=function(e,r,n){return Gx(this,e,r,!0,n)};Ee.prototype.writeFloatBE=function(e,r,n){return Gx(this,e,r,!1,n)};function Kx(t,e,r,n,i){return e=+e,r=r>>>0,i||Vx(t,e,r,8),ef.write(t,e,r,n,52,8),r+8}Ee.prototype.writeDoubleLE=function(e,r,n){return Kx(this,e,r,!0,n)};Ee.prototype.writeDoubleBE=function(e,r,n){return Kx(this,e,r,!1,n)};Ee.prototype.copy=function(e,r,n,i){if(!Ee.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),!i&&i!==0&&(i=this.length),r>=e.length&&(r=e.length),r||(r=0),i>0&&i<n&&(i=n),i===n||e.length===0||this.length===0)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-r<i-n&&(i=e.length-r+n);let o=i-n;return this===e&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(r,n,i):Uint8Array.prototype.set.call(e,this.subarray(n,i),r),o};Ee.prototype.fill=function(e,r,n,i){if(typeof e=="string"){if(typeof r=="string"?(i=r,r=0,n=this.length):typeof n=="string"&&(i=n,n=this.length),i!==void 0&&typeof i!="string")throw new TypeError("encoding must be a string");if(typeof i=="string"&&!Ee.isEncoding(i))throw new TypeError("Unknown encoding: "+i);if(e.length===1){let a=e.charCodeAt(0);(i==="utf8"&&a<128||i==="latin1")&&(e=a);}}else typeof e=="number"?e=e&255:typeof e=="boolean"&&(e=Number(e));if(r<0||this.length<r||this.length<n)throw new RangeError("Out of range index");if(n<=r)return this;r=r>>>0,n=n===void 0?this.length:n>>>0,e||(e=0);let o;if(typeof e=="number")for(o=r;o<n;++o)this[o]=e;else {let a=Ee.isBuffer(e)?e:Ee.from(e,i),s=a.length;if(s===0)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(o=0;o<n-r;++o)this[o+r]=a[o%s];}return this};var Ql={};function Hw(t,e,r){Ql[t]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:e.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${t}]`,this.stack,delete this.name;}get code(){return t}set code(i){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:i,writable:!0});}toString(){return `${this.name} [${t}]: ${this.message}`}};}Hw("ERR_BUFFER_OUT_OF_BOUNDS",function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError);Hw("ERR_INVALID_ARG_TYPE",function(t,e){return `The "${t}" argument must be of type number. Received type ${typeof e}`},TypeError);Hw("ERR_OUT_OF_RANGE",function(t,e,r){let n=`The value of "${t}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>$e(2,32)?i=Dx(String(r)):typeof r=="bigint"&&(i=String(r),(r>$e(BigInt(2),BigInt(32))||r<-$e(BigInt(2),BigInt(32)))&&(i=Dx(i)),i+="n"),n+=` It must be ${e}. Received ${i}`,n},RangeError);function Dx(t){let e="",r=t.length,n=t[0]==="-"?1:0;for(;r>=n+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return `${t.slice(0,r)}${e}`}function hH(t,e,r){tf(e,"offset"),(t[e]===void 0||t[e+r]===void 0)&&lh(e,t.length-(r+1));}function Wx(t,e,r,n,i,o){if(t>r||t<e){let a=typeof e=="bigint"?"n":"",s;throw e===0||e===BigInt(0)?s=`>= 0${a} and < 2${a} ** ${(o+1)*8}${a}`:s=`>= -(2${a} ** ${(o+1)*8-1}${a}) and < 2 ** ${(o+1)*8-1}${a}`,new Ql.ERR_OUT_OF_RANGE("value",s,t)}hH(n,i,o);}function tf(t,e){if(typeof t!="number")throw new Ql.ERR_INVALID_ARG_TYPE(e,"number",t)}function lh(t,e,r){throw Math.floor(t)!==t?(tf(t,r),new Ql.ERR_OUT_OF_RANGE("offset","an integer",t)):e<0?new Ql.ERR_BUFFER_OUT_OF_BOUNDS:new Ql.ERR_OUT_OF_RANGE("offset",`>= ${0} and <= ${e}`,t)}var pH=/[^+/0-9A-Za-z-_]/g;function mH(t){if(t=t.split("=")[0],t=t.trim().replace(pH,""),t.length<2)return "";for(;t.length%4!==0;)t=t+"=";return t}function qw(t,e){e=e||1/0;let r,n=t.length,i=null,o=[];for(let a=0;a<n;++a){if(r=t.charCodeAt(a),r>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}else if(a+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536;}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r);}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,r&63|128);}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,r&63|128);}else if(r<1114112){if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128);}else throw new Error("Invalid code point")}return o}function yH(t){let e=[];for(let r=0;r<t.length;++r)e.push(t.charCodeAt(r)&255);return e}function gH(t,e){let r,n,i,o=[];for(let a=0;a<t.length&&!((e-=2)<0);++a)r=t.charCodeAt(a),n=r>>8,i=r%256,o.push(i),o.push(n);return o}function Yx(t){return Uw.toByteArray(mH(t))}function G0(t,e,r,n){let i;for(i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function Xo(t,e){return t instanceof e||t!=null&&t.constructor!=null&&t.constructor.name!=null&&t.constructor.name===e.name}function jw(t){return t!==t}var vH=function(){let t="0123456789abcdef",e=new Array(256);for(let r=0;r<16;++r){let n=r*16;for(let i=0;i<16;++i)e[n+i]=t[r]+t[i];}return e}();function ks(t){return typeof BigInt=="undefined"?bH:t}function bH(){throw new Error("BigInt not supported")}});var D,v=Ur(()=>{D=on(kn());});var Et=ne(($w,Jx)=>{v();m();y();g();var W0=kn(),Qo=W0.Buffer;function Zx(t,e){for(var r in t)e[r]=t[r];}Qo.from&&Qo.alloc&&Qo.allocUnsafe&&Qo.allocUnsafeSlow?Jx.exports=W0:(Zx(W0,$w),$w.Buffer=Wc);function Wc(t,e,r){return Qo(t,e,r)}Wc.prototype=Object.create(Qo.prototype);Zx(Qo,Wc);Wc.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return Qo(t,e,r)};Wc.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var n=Qo(t);return e!==void 0?typeof r=="string"?n.fill(e,r):n.fill(e):n.fill(0),n};Wc.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return Qo(t)};Wc.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return W0.SlowBuffer(t)};});function sr(){sr.init.call(this);}function Y0(t){if(typeof t!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function sI(t){return t._maxListeners===void 0?sr.defaultMaxListeners:t._maxListeners}function tI(t,e,r,n){var i,o,a,s;if(Y0(r),(o=t._events)===void 0?(o=t._events=Object.create(null),t._eventsCount=0):(o.newListener!==void 0&&(t.emit("newListener",e,r.listener?r.listener:r),o=t._events),a=o[e]),a===void 0)a=o[e]=r,++t._eventsCount;else if(typeof a=="function"?a=o[e]=n?[r,a]:[a,r]:n?a.unshift(r):a.push(r),(i=sI(t))>0&&a.length>i&&!a.warned){a.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=t,c.type=e,c.count=a.length,s=c,console&&console.warn&&console.warn(s);}return t}function wH(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function rI(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},i=wH.bind(n);return i.listener=r,n.wrapFn=i,i}function nI(t,e,r){var n=t._events;if(n===void 0)return [];var i=n[e];return i===void 0?[]:typeof i=="function"?r?[i.listener||i]:[i]:r?function(o){for(var a=new Array(o.length),s=0;s<a.length;++s)a[s]=o[s].listener||o[s];return a}(i):cI(i,i.length)}function iI(t){var e=this._events;if(e!==void 0){var r=e[t];if(typeof r=="function")return 1;if(r!==void 0)return r.length}return 0}function cI(t,e){for(var r=new Array(e),n=0;n<e;++n)r[n]=t[n];return r}var oI,aI,nf,Xx,Qx,eI,xr,Yc=Ur(()=>{v();m();y();g();nf=typeof Reflect=="object"?Reflect:null,Xx=nf&&typeof nf.apply=="function"?nf.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)};aI=nf&&typeof nf.ownKeys=="function"?nf.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};Qx=Number.isNaN||function(t){return t!=t};oI=sr,sr.EventEmitter=sr,sr.prototype._events=void 0,sr.prototype._eventsCount=0,sr.prototype._maxListeners=void 0;eI=10;Object.defineProperty(sr,"defaultMaxListeners",{enumerable:!0,get:function(){return eI},set:function(t){if(typeof t!="number"||t<0||Qx(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");eI=t;}}),sr.init=function(){this._events!==void 0&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0;},sr.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||Qx(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this},sr.prototype.getMaxListeners=function(){return sI(this)},sr.prototype.emit=function(t){for(var e=[],r=1;r<arguments.length;r++)e.push(arguments[r]);var n=t==="error",i=this._events;if(i!==void 0)n=n&&i.error===void 0;else if(!n)return !1;if(n){var o;if(e.length>0&&(o=e[0]),o instanceof Error)throw o;var a=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw a.context=o,a}var s=i[t];if(s===void 0)return !1;if(typeof s=="function")Xx(s,this,e);else {var c=s.length,u=cI(s,c);for(r=0;r<c;++r)Xx(u[r],this,e);}return !0},sr.prototype.addListener=function(t,e){return tI(this,t,e,!1)},sr.prototype.on=sr.prototype.addListener,sr.prototype.prependListener=function(t,e){return tI(this,t,e,!0)},sr.prototype.once=function(t,e){return Y0(e),this.on(t,rI(this,t,e)),this},sr.prototype.prependOnceListener=function(t,e){return Y0(e),this.prependListener(t,rI(this,t,e)),this},sr.prototype.removeListener=function(t,e){var r,n,i,o,a;if(Y0(e),(n=this._events)===void 0)return this;if((r=n[t])===void 0)return this;if(r===e||r.listener===e)--this._eventsCount==0?this._events=Object.create(null):(delete n[t],n.removeListener&&this.emit("removeListener",t,r.listener||e));else if(typeof r!="function"){for(i=-1,o=r.length-1;o>=0;o--)if(r[o]===e||r[o].listener===e){a=r[o].listener,i=o;break}if(i<0)return this;i===0?r.shift():function(s,c){for(;c+1<s.length;c++)s[c]=s[c+1];s.pop();}(r,i),r.length===1&&(n[t]=r[0]),n.removeListener!==void 0&&this.emit("removeListener",t,a||e);}return this},sr.prototype.off=sr.prototype.removeListener,sr.prototype.removeAllListeners=function(t){var e,r,n;if((r=this._events)===void 0)return this;if(r.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):r[t]!==void 0&&(--this._eventsCount==0?this._events=Object.create(null):delete r[t]),this;if(arguments.length===0){var i,o=Object.keys(r);for(n=0;n<o.length;++n)(i=o[n])!=="removeListener"&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(typeof(e=r[t])=="function")this.removeListener(t,e);else if(e!==void 0)for(n=e.length-1;n>=0;n--)this.removeListener(t,e[n]);return this},sr.prototype.listeners=function(t){return nI(this,t,!0)},sr.prototype.rawListeners=function(t){return nI(this,t,!1)},sr.listenerCount=function(t,e){return typeof t.listenerCount=="function"?t.listenerCount(e):iI.call(t,e)},sr.prototype.listenerCount=iI,sr.prototype.eventNames=function(){return this._eventsCount>0?aI(this._events):[]};xr=oI;xr.EventEmitter;xr.defaultMaxListeners;xr.init;xr.listenerCount;xr.EventEmitter;xr.defaultMaxListeners;xr.init;xr.listenerCount;});var of={};Cr(of,{EventEmitter:()=>EH,default:()=>xr,defaultMaxListeners:()=>_H,init:()=>SH,listenerCount:()=>CH,on:()=>AH,once:()=>TH});var EH,_H,SH,CH,AH,TH,qa=Ur(()=>{v();m();y();g();Yc();Yc();xr.once=function(t,e){return new Promise((r,n)=>{function i(...a){o!==void 0&&t.removeListener("error",o),r(a);}let o;e!=="error"&&(o=a=>{t.removeListener(name,i),n(a);},t.once("error",o)),t.once(e,i);})};xr.on=function(t,e){let r=[],n=[],i=null,o=!1,a={next(){return re(this,null,function*(){let l=r.shift();if(l)return createIterResult(l,!1);if(i){let w=Promise.reject(i);return i=null,w}return o?createIterResult(void 0,!0):new Promise((w,T)=>n.push({resolve:w,reject:T}))})},return(){return re(this,null,function*(){t.removeListener(e,s),t.removeListener("error",c),o=!0;for(let l of n)l.resolve(createIterResult(void 0,!0));return createIterResult(void 0,!0)})},throw(l){i=l,t.removeListener(e,s),t.removeListener("error",c);},[Symbol.asyncIterator](){return this}};return t.on(e,s),t.on("error",c),a;function s(...l){let w=n.shift();w?w.resolve(createIterResult(l,!1)):r.push(l);}function c(l){o=!0;let w=n.shift();w?w.reject(l):i=l,a.return();}};({EventEmitter:EH,defaultMaxListeners:_H,init:SH,listenerCount:CH,on:AH,once:TH}=xr);});var yt=ne((Dye,Vw)=>{v();m();y();g();typeof Object.create=="function"?Vw.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}));}:Vw.exports=function(e,r){if(r){e.super_=r;var n=function(){};n.prototype=r.prototype,e.prototype=new n,e.prototype.constructor=e;}};});var Gw=ne((Hye,uI)=>{v();m();y();g();uI.exports=(qa(),Dr(of)).EventEmitter;});function Kw(){throw new Error("setTimeout has not been defined")}function Ww(){throw new Error("clearTimeout has not been defined")}function dI(t){if(za===setTimeout)return setTimeout(t,0);if((za===Kw||!za)&&setTimeout)return za=setTimeout,setTimeout(t,0);try{return za(t,0)}catch(e){try{return za.call(null,t,0)}catch(r){return za.call(this||sf,t,0)}}}function RH(){af&&Zc&&(af=!1,Zc.length?ja=Zc.concat(ja):Z0=-1,ja.length&&hI());}function hI(){if(!af){var t=dI(RH);af=!0;for(var e=ja.length;e;){for(Zc=ja,ja=[];++Z0<e;)Zc&&Zc[Z0].run();Z0=-1,e=ja.length;}Zc=null,af=!1,function(r){if(Ha===clearTimeout)return clearTimeout(r);if((Ha===Ww||!Ha)&&clearTimeout)return Ha=clearTimeout,clearTimeout(r);try{Ha(r);}catch(n){try{return Ha.call(null,r)}catch(i){return Ha.call(this||sf,r)}}}(t);}}function lI(t,e){(this||sf).fun=t,(this||sf).array=e;}function Fa(){}var fI,za,Ha,sf,qr,Zc,ja,af,Z0,cr,Ps=Ur(()=>{v();m();y();g();sf=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:globalThis,qr=fI={};(function(){try{za=typeof setTimeout=="function"?setTimeout:Kw;}catch(t){za=Kw;}try{Ha=typeof clearTimeout=="function"?clearTimeout:Ww;}catch(t){Ha=Ww;}})();ja=[],af=!1,Z0=-1;qr.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];ja.push(new lI(t,e)),ja.length!==1||af||dI(hI);},lI.prototype.run=function(){(this||sf).fun.apply(null,(this||sf).array);},qr.title="browser",qr.browser=!0,qr.env={},qr.argv=[],qr.version="",qr.versions={},qr.on=Fa,qr.addListener=Fa,qr.once=Fa,qr.off=Fa,qr.removeListener=Fa,qr.removeAllListeners=Fa,qr.emit=Fa,qr.prependListener=Fa,qr.prependOnceListener=Fa,qr.listeners=function(t){return []},qr.binding=function(t){throw new Error("process.binding is not supported")},qr.cwd=function(){return "/"},qr.chdir=function(t){throw new Error("process.chdir is not supported")},qr.umask=function(){return 0};cr=fI;cr.addListener;cr.argv;cr.binding;cr.browser;cr.chdir;cr.cwd;cr.emit;cr.env;cr.listeners;cr.nextTick;cr.off;cr.on;cr.once;cr.prependListener;cr.prependOnceListener;cr.removeAllListeners;cr.removeListener;cr.title;cr.umask;cr.version;cr.versions;});function Qc(t){return t.call.bind(t)}function ph(t,e){if(typeof t!="object")return !1;try{return e(t),!0}catch(r){return !1}}function mI(t){return Zn&&hi?Oi(t)!==void 0:MI(t)||OI(t)||NI(t)||kI(t)||PI(t)||BI(t)||UI(t)||DI(t)||LI(t)||qI(t)||FI(t)}function MI(t){return Zn&&hi?Oi(t)==="Uint8Array":Ar(t)==="[object Uint8Array]"||DH(t)&&t.buffer!==void 0}function OI(t){return Zn&&hi?Oi(t)==="Uint8ClampedArray":Ar(t)==="[object Uint8ClampedArray]"}function NI(t){return Zn&&hi?Oi(t)==="Uint16Array":Ar(t)==="[object Uint16Array]"}function kI(t){return Zn&&hi?Oi(t)==="Uint32Array":Ar(t)==="[object Uint32Array]"}function PI(t){return Zn&&hi?Oi(t)==="Int8Array":Ar(t)==="[object Int8Array]"}function BI(t){return Zn&&hi?Oi(t)==="Int16Array":Ar(t)==="[object Int16Array]"}function UI(t){return Zn&&hi?Oi(t)==="Int32Array":Ar(t)==="[object Int32Array]"}function DI(t){return Zn&&hi?Oi(t)==="Float32Array":Ar(t)==="[object Float32Array]"}function LI(t){return Zn&&hi?Oi(t)==="Float64Array":Ar(t)==="[object Float64Array]"}function qI(t){return Zn&&hi?Oi(t)==="BigInt64Array":Ar(t)==="[object BigInt64Array]"}function FI(t){return Zn&&hi?Oi(t)==="BigUint64Array":Ar(t)==="[object BigUint64Array]"}function J0(t){return Ar(t)==="[object Map]"}function X0(t){return Ar(t)==="[object Set]"}function Q0(t){return Ar(t)==="[object WeakMap]"}function Yw(t){return Ar(t)==="[object WeakSet]"}function ny(t){return Ar(t)==="[object ArrayBuffer]"}function yI(t){return typeof ArrayBuffer!="undefined"&&(ny.working?ny(t):t instanceof ArrayBuffer)}function iy(t){return Ar(t)==="[object DataView]"}function gI(t){return typeof DataView!="undefined"&&(iy.working?iy(t):t instanceof DataView)}function oy(t){return Ar(t)==="[object SharedArrayBuffer]"}function vI(t){return typeof SharedArrayBuffer!="undefined"&&(oy.working?oy(t):t instanceof SharedArrayBuffer)}function bI(t){return ph(t,HH)}function wI(t){return ph(t,jH)}function EI(t){return ph(t,$H)}function _I(t){return II&&ph(t,VH)}function SI(t){return eE&&ph(t,GH)}function Bs(t,e){var r={seen:[],stylize:YH};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),tE(e)?r.showHidden=e:e&&we._extend(r,e),Xc(r.showHidden)&&(r.showHidden=!1),Xc(r.depth)&&(r.depth=2),Xc(r.colors)&&(r.colors=!1),Xc(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=WH),ay(r,t,r.depth)}function WH(t,e){var r=Bs.styles[e];return r?"\x1B["+Bs.colors[r][0]+"m"+t+"\x1B["+Bs.colors[r][1]+"m":t}function YH(t,e){return t}function ay(t,e,r){if(t.customInspect&&e&&ry(e.inspect)&&e.inspect!==we.inspect&&(!e.constructor||e.constructor.prototype!==e)){var n=e.inspect(r,t);return sy(n)||(n=ay(t,n,r)),n}var i=function(T,x){if(Xc(x))return T.stylize("undefined","undefined");if(sy(x)){var I="'"+JSON.stringify(x).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return T.stylize(I,"string")}if(jI(x))return T.stylize(""+x,"number");if(tE(x))return T.stylize(""+x,"boolean");if(ly(x))return T.stylize("null","null")}(t,e);if(i)return i;var o=Object.keys(e),a=function(T){var x={};return T.forEach(function(I,k){x[I]=!0;}),x}(o);if(t.showHidden&&(o=Object.getOwnPropertyNames(e)),hh(e)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return Zw(e);if(o.length===0){if(ry(e)){var s=e.name?": "+e.name:"";return t.stylize("[Function"+s+"]","special")}if(dh(e))return t.stylize(RegExp.prototype.toString.call(e),"regexp");if(cy(e))return t.stylize(Date.prototype.toString.call(e),"date");if(hh(e))return Zw(e)}var c,u="",l=!1,w=["{","}"];return HI(e)&&(l=!0,w=["[","]"]),ry(e)&&(u=" [Function"+(e.name?": "+e.name:"")+"]"),dh(e)&&(u=" "+RegExp.prototype.toString.call(e)),cy(e)&&(u=" "+Date.prototype.toUTCString.call(e)),hh(e)&&(u=" "+Zw(e)),o.length!==0||l&&e.length!=0?r<0?dh(e)?t.stylize(RegExp.prototype.toString.call(e),"regexp"):t.stylize("[Object]","special"):(t.seen.push(e),c=l?function(T,x,I,k,q){for(var j=[],K=0,Z=x.length;K<Z;++K)$I(x,String(K))?j.push(Jw(T,x,I,k,String(K),!0)):j.push("");return q.forEach(function(se){se.match(/^\d+$/)||j.push(Jw(T,x,I,k,se,!0));}),j}(t,e,r,a,o):o.map(function(T){return Jw(t,e,r,a,T,l)}),t.seen.pop(),function(T,x,I){var k=0;return T.reduce(function(q,j){return k++,j.indexOf(`
`)>=0&&k++,q+j.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?I[0]+(x===""?"":x+`
`)+" "+T.join(`,
`)+" "+I[1]:I[0]+x+" "+T.join(", ")+" "+I[1]}(c,u,w)):w[0]+u+w[1]}function Zw(t){return "["+Error.prototype.toString.call(t)+"]"}function Jw(t,e,r,n,i,o){var a,s,c;if((c=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?s=c.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):c.set&&(s=t.stylize("[Setter]","special")),$I(n,i)||(a="["+i+"]"),s||(t.seen.indexOf(c.value)<0?(s=ly(r)?ay(t,c.value,null):ay(t,c.value,r-1)).indexOf(`
`)>-1&&(s=o?s.split(`
`).map(function(u){return " "+u}).join(`
`).substr(2):`
`+s.split(`
`).map(function(u){return " "+u}).join(`
`)):s=t.stylize("[Circular]","special")),Xc(a)){if(o&&i.match(/^\d+$/))return s;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=t.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=t.stylize(a,"string"));}return a+": "+s}function HI(t){return Array.isArray(t)}function tE(t){return typeof t=="boolean"}function ly(t){return t===null}function jI(t){return typeof t=="number"}function sy(t){return typeof t=="string"}function Xc(t){return t===void 0}function dh(t){return cf(t)&&rE(t)==="[object RegExp]"}function cf(t){return typeof t=="object"&&t!==null}function cy(t){return cf(t)&&rE(t)==="[object Date]"}function hh(t){return cf(t)&&(rE(t)==="[object Error]"||t instanceof Error)}function ry(t){return typeof t=="function"}function rE(t){return Object.prototype.toString.call(t)}function Xw(t){return t<10?"0"+t.toString(10):t.toString(10)}function JH(){var t=new Date,e=[Xw(t.getHours()),Xw(t.getMinutes()),Xw(t.getSeconds())].join(":");return [t.getDate(),ZH[t.getMonth()],e].join(" ")}function $I(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function XH(t,e){if(!t){var r=new Error("Promise was rejected with a falsy value");r.reason=t,t=r;}return e(t)}var xH,Qw,uy,AI,IH,MH,OH,NH,kH,TI,RI,pI,PH,BH,UH,xI,Bt,DH,LH,qH,II,eE,hi,Zn,FH,Ar,HH,jH,$H,fh,we,ea,CI,KH,ey,zI,ty,ZH,Jc,Us=Ur(()=>{v();m();y();g();Ps();xH=typeof Symbol=="function"&&typeof Symbol.toStringTag=="symbol",Qw=Object.prototype.toString,uy=function(t){return !(xH&&t&&typeof t=="object"&&Symbol.toStringTag in t)&&Qw.call(t)==="[object Arguments]"},AI=function(t){return !!uy(t)||t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&Qw.call(t)!=="[object Array]"&&Qw.call(t.callee)==="[object Function]"},IH=function(){return uy(arguments)}();uy.isLegacyArguments=AI;MH=IH?uy:AI,OH=Object.prototype.toString,NH=Function.prototype.toString,kH=/^\s*(?:function)?\*/,TI=typeof Symbol=="function"&&typeof Symbol.toStringTag=="symbol",RI=Object.getPrototypeOf,pI=function(){if(!TI)return !1;try{return Function("return function*() {}")()}catch(t){}}(),PH=pI?RI(pI):{},BH=function(t){return typeof t=="function"&&(!!kH.test(NH.call(t))||(TI?RI(t)===PH:OH.call(t)==="[object GeneratorFunction]"))},UH=typeof Object.create=="function"?function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}));}:function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t;}},xI=function(t){return t&&typeof t=="object"&&typeof t.copy=="function"&&typeof t.fill=="function"&&typeof t.readUInt8=="function"},Bt={},DH=xI,LH=MH,qH=BH;II=typeof BigInt!="undefined",eE=typeof Symbol!="undefined",hi=eE&&Symbol.toStringTag!==void 0,Zn=typeof Uint8Array!="undefined",FH=typeof ArrayBuffer!="undefined";if(Zn&&hi)var zH=Object.getPrototypeOf(Uint8Array.prototype),Oi=Qc(Object.getOwnPropertyDescriptor(zH,Symbol.toStringTag).get);Ar=Qc(Object.prototype.toString),HH=Qc(Number.prototype.valueOf),jH=Qc(String.prototype.valueOf),$H=Qc(Boolean.prototype.valueOf);if(II)var VH=Qc(BigInt.prototype.valueOf);if(eE)var GH=Qc(Symbol.prototype.valueOf);Bt.isArgumentsObject=LH,Bt.isGeneratorFunction=qH,Bt.isPromise=function(t){return typeof Promise!="undefined"&&t instanceof Promise||t!==null&&typeof t=="object"&&typeof t.then=="function"&&typeof t.catch=="function"},Bt.isArrayBufferView=function(t){return FH&&ArrayBuffer.isView?ArrayBuffer.isView(t):mI(t)||gI(t)},Bt.isTypedArray=mI,Bt.isUint8Array=MI,Bt.isUint8ClampedArray=OI,Bt.isUint16Array=NI,Bt.isUint32Array=kI,Bt.isInt8Array=PI,Bt.isInt16Array=BI,Bt.isInt32Array=UI,Bt.isFloat32Array=DI,Bt.isFloat64Array=LI,Bt.isBigInt64Array=qI,Bt.isBigUint64Array=FI,J0.working=typeof Map!="undefined"&&J0(new Map),Bt.isMap=function(t){return typeof Map!="undefined"&&(J0.working?J0(t):t instanceof Map)},X0.working=typeof Set!="undefined"&&X0(new Set),Bt.isSet=function(t){return typeof Set!="undefined"&&(X0.working?X0(t):t instanceof Set)},Q0.working=typeof WeakMap!="undefined"&&Q0(new WeakMap),Bt.isWeakMap=function(t){return typeof WeakMap!="undefined"&&(Q0.working?Q0(t):t instanceof WeakMap)},Yw.working=typeof WeakSet!="undefined"&&Yw(new WeakSet),Bt.isWeakSet=function(t){return Yw(t)},ny.working=typeof ArrayBuffer!="undefined"&&ny(new ArrayBuffer),Bt.isArrayBuffer=yI,iy.working=typeof ArrayBuffer!="undefined"&&typeof DataView!="undefined"&&iy(new DataView(new ArrayBuffer(1),0,1)),Bt.isDataView=gI,oy.working=typeof SharedArrayBuffer!="undefined"&&oy(new SharedArrayBuffer),Bt.isSharedArrayBuffer=vI,Bt.isAsyncFunction=function(t){return Ar(t)==="[object AsyncFunction]"},Bt.isMapIterator=function(t){return Ar(t)==="[object Map Iterator]"},Bt.isSetIterator=function(t){return Ar(t)==="[object Set Iterator]"},Bt.isGeneratorObject=function(t){return Ar(t)==="[object Generator]"},Bt.isWebAssemblyCompiledModule=function(t){return Ar(t)==="[object WebAssembly.Module]"},Bt.isNumberObject=bI,Bt.isStringObject=wI,Bt.isBooleanObject=EI,Bt.isBigIntObject=_I,Bt.isSymbolObject=SI,Bt.isBoxedPrimitive=function(t){return bI(t)||wI(t)||EI(t)||_I(t)||SI(t)},Bt.isAnyArrayBuffer=function(t){return Zn&&(yI(t)||vI(t))},["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(t){Object.defineProperty(Bt,t,{enumerable:!1,value:function(){throw new Error(t+" is not supported in userland")}});});fh=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:globalThis,we={},ea=cr,CI=Object.getOwnPropertyDescriptors||function(t){for(var e=Object.keys(t),r={},n=0;n<e.length;n++)r[e[n]]=Object.getOwnPropertyDescriptor(t,e[n]);return r},KH=/%[sdj%]/g;we.format=function(t){if(!sy(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(Bs(arguments[r]));return e.join(" ")}r=1;for(var n=arguments,i=n.length,o=String(t).replace(KH,function(s){if(s==="%%")return "%";if(r>=i)return s;switch(s){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(c){return "[Circular]"}default:return s}}),a=n[r];r<i;a=n[++r])ly(a)||!cf(a)?o+=" "+a:o+=" "+Bs(a);return o},we.deprecate=function(t,e){if(ea!==void 0&&ea.noDeprecation===!0)return t;if(ea===void 0)return function(){return we.deprecate(t,e).apply(this||fh,arguments)};var r=!1;return function(){if(!r){if(ea.throwDeprecation)throw new Error(e);ea.traceDeprecation?console.trace(e):console.error(e),r=!0;}return t.apply(this||fh,arguments)}};ey={},zI=/^$/;ea.env.NODE_DEBUG&&(ty=ea.env.NODE_DEBUG,ty=ty.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),zI=new RegExp("^"+ty+"$","i"));we.debuglog=function(t){if(t=t.toUpperCase(),!ey[t])if(zI.test(t)){var e=ea.pid;ey[t]=function(){var r=we.format.apply(we,arguments);console.error("%s %d: %s",t,e,r);};}else ey[t]=function(){};return ey[t]},we.inspect=Bs,Bs.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},Bs.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},we.types=Bt,we.isArray=HI,we.isBoolean=tE,we.isNull=ly,we.isNullOrUndefined=function(t){return t==null},we.isNumber=jI,we.isString=sy,we.isSymbol=function(t){return typeof t=="symbol"},we.isUndefined=Xc,we.isRegExp=dh,we.types.isRegExp=dh,we.isObject=cf,we.isDate=cy,we.types.isDate=cy,we.isError=hh,we.types.isNativeError=hh,we.isFunction=ry,we.isPrimitive=function(t){return t===null||typeof t=="boolean"||typeof t=="number"||typeof t=="string"||typeof t=="symbol"||t===void 0},we.isBuffer=xI;ZH=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];we.log=function(){console.log("%s - %s",JH(),we.format.apply(we,arguments));},we.inherits=UH,we._extend=function(t,e){if(!e||!cf(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t};Jc=typeof Symbol!="undefined"?Symbol("util.promisify.custom"):void 0;we.promisify=function(t){if(typeof t!="function")throw new TypeError('The "original" argument must be of type Function');if(Jc&&t[Jc]){var e;if(typeof(e=t[Jc])!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(e,Jc,{value:e,enumerable:!1,writable:!1,configurable:!0}),e}function e(){for(var r,n,i=new Promise(function(s,c){r=s,n=c;}),o=[],a=0;a<arguments.length;a++)o.push(arguments[a]);o.push(function(s,c){s?n(s):r(c);});try{t.apply(this||fh,o);}catch(s){n(s);}return i}return Object.setPrototypeOf(e,Object.getPrototypeOf(t)),Jc&&Object.defineProperty(e,Jc,{value:e,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(e,CI(t))},we.promisify.custom=Jc,we.callbackify=function(t){if(typeof t!="function")throw new TypeError('The "original" argument must be of type Function');function e(){for(var r=[],n=0;n<arguments.length;n++)r.push(arguments[n]);var i=r.pop();if(typeof i!="function")throw new TypeError("The last argument must be of type Function");var o=this||fh,a=function(){return i.apply(o,arguments)};t.apply(this||fh,r).then(function(s){ea.nextTick(a.bind(null,null,s));},function(s){ea.nextTick(XH.bind(null,s,a));});}return Object.setPrototypeOf(e,Object.getPrototypeOf(t)),Object.defineProperties(e,CI(t)),e};});var mh=Ur(()=>{v();m();y();g();Us();Ps();we._extend;we.callbackify;we.debuglog;we.deprecate;we.format;we.inherits;we.inspect;we.isArray;we.isBoolean;we.isBuffer;we.isDate;we.isError;we.isFunction;we.isNull;we.isNullOrUndefined;we.isNumber;we.isObject;we.isPrimitive;we.isRegExp;we.isString;we.isSymbol;we.isUndefined;we.log;we.promisify;we._extend,we.callbackify,we.debuglog,we.deprecate,we.format,we.inherits,we.inspect,we.isArray,we.isBoolean,we.isBuffer,we.isDate,we.isError,we.isFunction,we.isNull,we.isNullOrUndefined,we.isNumber,we.isObject,we.isPrimitive,we.isRegExp,we.isString,we.isSymbol,we.isUndefined,we.log,we.promisify,we.types;});var $a={};Cr($a,{TextDecoder:()=>Cj,TextEncoder:()=>Sj,_extend:()=>QH,callbackify:()=>ej,debuglog:()=>tj,default:()=>we,deprecate:()=>rj,format:()=>nj,inherits:()=>ij,inspect:()=>oj,isArray:()=>aj,isBoolean:()=>sj,isBuffer:()=>cj,isDate:()=>uj,isError:()=>lj,isFunction:()=>fj,isNull:()=>dj,isNullOrUndefined:()=>hj,isNumber:()=>pj,isObject:()=>mj,isPrimitive:()=>yj,isRegExp:()=>gj,isString:()=>vj,isSymbol:()=>bj,isUndefined:()=>wj,log:()=>Ej,promisify:()=>uf,types:()=>_j});var QH,ej,tj,rj,nj,ij,oj,aj,sj,cj,uj,lj,fj,dj,hj,pj,mj,yj,gj,vj,bj,wj,Ej,uf,_j,Sj,Cj,Ni=Ur(()=>{v();m();y();g();mh();Us();Us();Ps();QH=we._extend,ej=we.callbackify,tj=we.debuglog,rj=we.deprecate,nj=we.format,ij=we.inherits,oj=we.inspect,aj=we.isArray,sj=we.isBoolean,cj=we.isBuffer,uj=we.isDate,lj=we.isError,fj=we.isFunction,dj=we.isNull,hj=we.isNullOrUndefined,pj=we.isNumber,mj=we.isObject,yj=we.isPrimitive,gj=we.isRegExp,vj=we.isString,bj=we.isSymbol,wj=we.isUndefined,Ej=we.log,uf=we.promisify,_j=we.types,Sj=we.TextEncoder=globalThis.TextEncoder,Cj=we.TextDecoder=globalThis.TextDecoder;});var WI=ne((Gge,KI)=>{v();m();y();g();function VI(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n);}return r}function Aj(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?VI(Object(r),!0).forEach(function(n){Tj(t,n,r[n]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):VI(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n));});}return t}function Tj(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Rj(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function GI(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n);}}function xj(t,e,r){return e&&GI(t.prototype,e),t}var Ij=kn(),fy=Ij.Buffer,Mj=(Ni(),Dr($a)),nE=Mj.inspect,Oj=nE&&nE.custom||"inspect";function Nj(t,e,r){fy.prototype.copy.call(t,e,r);}KI.exports=function(){function t(){Rj(this,t),this.head=null,this.tail=null,this.length=0;}return xj(t,[{key:"push",value:function(r){var n={data:r,next:null};this.length>0?this.tail.next=n:this.head=n,this.tail=n,++this.length;}},{key:"unshift",value:function(r){var n={data:r,next:this.head};this.length===0&&(this.tail=n),this.head=n,++this.length;}},{key:"shift",value:function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0;}},{key:"join",value:function(r){if(this.length===0)return "";for(var n=this.head,i=""+n.data;n=n.next;)i+=r+n.data;return i}},{key:"concat",value:function(r){if(this.length===0)return fy.alloc(0);for(var n=fy.allocUnsafe(r>>>0),i=this.head,o=0;i;)Nj(i.data,n,o),o+=i.data.length,i=i.next;return n}},{key:"consume",value:function(r,n){var i;return r<this.head.data.length?(i=this.head.data.slice(0,r),this.head.data=this.head.data.slice(r)):r===this.head.data.length?i=this.shift():i=n?this._getString(r):this._getBuffer(r),i}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(r){var n=this.head,i=1,o=n.data;for(r-=o.length;n=n.next;){var a=n.data,s=r>a.length?a.length:r;if(s===a.length?o+=a:o+=a.slice(0,r),r-=s,r===0){s===a.length?(++i,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=a.slice(s));break}++i;}return this.length-=i,o}},{key:"_getBuffer",value:function(r){var n=fy.allocUnsafe(r),i=this.head,o=1;for(i.data.copy(n),r-=i.data.length;i=i.next;){var a=i.data,s=r>a.length?a.length:r;if(a.copy(n,n.length-r,0,s),r-=s,r===0){s===a.length?(++o,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=a.slice(s));break}++o;}return this.length-=o,n}},{key:Oj,value:function(r,n){return nE(this,Aj({},n,{depth:0,customInspect:!1}))}}]),t}();});var oE=ne((Jge,ZI)=>{v();m();y();g();function kj(t,e){var r=this,n=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return n||i?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,N.nextTick(iE,this,t)):N.nextTick(iE,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(o){!e&&o?r._writableState?r._writableState.errorEmitted?N.nextTick(dy,r):(r._writableState.errorEmitted=!0,N.nextTick(YI,r,o)):N.nextTick(YI,r,o):e?(N.nextTick(dy,r),e(o)):N.nextTick(dy,r);}),this)}function YI(t,e){iE(t,e),dy(t);}function dy(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close");}function Pj(){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);}function iE(t,e){t.emit("error",e);}function Bj(t,e){var r=t._readableState,n=t._writableState;r&&r.autoDestroy||n&&n.autoDestroy?t.destroy(e):t.emit("error",e);}ZI.exports={destroy:kj,undestroy:Pj,errorOrDestroy:Bj};});var eu=ne((rve,QI)=>{v();m();y();g();function Uj(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e;}var XI={};function ki(t,e,r){r||(r=Error);function n(o,a,s){return typeof e=="string"?e:e(o,a,s)}var i=function(o){Uj(a,o);function a(s,c,u){return o.call(this,n(s,c,u))||this}return a}(r);i.prototype.name=r.name,i.prototype.code=t,XI[t]=i;}function JI(t,e){if(Array.isArray(t)){var r=t.length;return t=t.map(function(n){return String(n)}),r>2?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:r===2?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}else return "of ".concat(e," ").concat(String(t))}function Dj(t,e,r){return t.substr(0,e.length)===e}function Lj(t,e,r){return (r===void 0||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}function qj(t,e,r){return typeof r!="number"&&(r=0),r+e.length>t.length?!1:t.indexOf(e,r)!==-1}ki("ERR_INVALID_OPT_VALUE",function(t,e){return 'The value "'+e+'" is invalid for option "'+t+'"'},TypeError);ki("ERR_INVALID_ARG_TYPE",function(t,e,r){var n;typeof e=="string"&&Dj(e,"not ")?(n="must not be",e=e.replace(/^not /,"")):n="must be";var i;if(Lj(t," argument"))i="The ".concat(t," ").concat(n," ").concat(JI(e,"type"));else {var o=qj(t,".")?"property":"argument";i='The "'.concat(t,'" ').concat(o," ").concat(n," ").concat(JI(e,"type"));}return i+=". Received type ".concat(typeof r),i},TypeError);ki("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");ki("ERR_METHOD_NOT_IMPLEMENTED",function(t){return "The "+t+" method is not implemented"});ki("ERR_STREAM_PREMATURE_CLOSE","Premature close");ki("ERR_STREAM_DESTROYED",function(t){return "Cannot call "+t+" after a stream was destroyed"});ki("ERR_MULTIPLE_CALLBACK","Callback called multiple times");ki("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");ki("ERR_STREAM_WRITE_AFTER_END","write after end");ki("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);ki("ERR_UNKNOWN_ENCODING",function(t){return "Unknown encoding: "+t},TypeError);ki("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");QI.exports.codes=XI;});var aE=ne((sve,eM)=>{v();m();y();g();var Fj=eu().codes.ERR_INVALID_OPT_VALUE;function zj(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function Hj(t,e,r,n){var i=zj(e,n,r);if(i!=null){if(!(isFinite(i)&&Math.floor(i)===i)||i<0){var o=n?r:"highWaterMark";throw new Fj(o,i)}return Math.floor(i)}return t.objectMode?16:16*1024}eM.exports={getHighWaterMark:Hj};});var cE=ne((dve,tM)=>{v();m();y();g();tM.exports=jj;function jj(t,e){if(sE("noDeprecation"))return t;var r=!1;function n(){if(!r){if(sE("throwDeprecation"))throw new Error(e);sE("traceDeprecation")?console.trace(e):console.warn(e),r=!0;}return t.apply(this,arguments)}return n}function sE(t){try{if(!globalThis.localStorage)return !1}catch(r){return !1}var e=globalThis.localStorage[t];return e==null?!1:String(e).toLowerCase()==="true"}});var my=ne((gve,sM)=>{v();m();y();g();sM.exports=Ir;function nM(t){var e=this;this.next=null,this.entry=null,this.finish=function(){y$(e,t);};}var lf;Ir.WritableState=gh;var $j={deprecate:cE()},iM=Gw(),py=kn().Buffer,Vj=globalThis.Uint8Array||function(){};function Gj(t){return py.from(t)}function Kj(t){return py.isBuffer(t)||t instanceof Vj}var lE=oE(),Wj=aE(),Yj=Wj.getHighWaterMark,Ds=eu().codes,Zj=Ds.ERR_INVALID_ARG_TYPE,Jj=Ds.ERR_METHOD_NOT_IMPLEMENTED,Xj=Ds.ERR_MULTIPLE_CALLBACK,Qj=Ds.ERR_STREAM_CANNOT_PIPE,e$=Ds.ERR_STREAM_DESTROYED,t$=Ds.ERR_STREAM_NULL_VALUES,r$=Ds.ERR_STREAM_WRITE_AFTER_END,n$=Ds.ERR_UNKNOWN_ENCODING,ff=lE.errorOrDestroy;yt()(Ir,iM);function i$(){}function gh(t,e,r){lf=lf||Ls(),t=t||{},typeof r!="boolean"&&(r=e instanceof lf),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=Yj(this,t,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var n=t.decodeStrings===!1;this.decodeStrings=!n,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(i){f$(e,i);},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new nM(this);}gh.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};(function(){try{Object.defineProperty(gh.prototype,"buffer",{get:$j.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")});}catch(t){}})();var hy;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(hy=Function.prototype[Symbol.hasInstance],Object.defineProperty(Ir,Symbol.hasInstance,{value:function(e){return hy.call(this,e)?!0:this!==Ir?!1:e&&e._writableState instanceof gh}})):hy=function(e){return e instanceof this};function Ir(t){lf=lf||Ls();var e=this instanceof lf;if(!e&&!hy.call(Ir,this))return new Ir(t);this._writableState=new gh(t,this,e),this.writable=!0,t&&(typeof t.write=="function"&&(this._write=t.write),typeof t.writev=="function"&&(this._writev=t.writev),typeof t.destroy=="function"&&(this._destroy=t.destroy),typeof t.final=="function"&&(this._final=t.final)),iM.call(this);}Ir.prototype.pipe=function(){ff(this,new Qj);};function o$(t,e){var r=new r$;ff(t,r),N.nextTick(e,r);}function a$(t,e,r,n){var i;return r===null?i=new t$:typeof r!="string"&&!e.objectMode&&(i=new Zj("chunk",["string","Buffer"],r)),i?(ff(t,i),N.nextTick(n,i),!1):!0}Ir.prototype.write=function(t,e,r){var n=this._writableState,i=!1,o=!n.objectMode&&Kj(t);return o&&!py.isBuffer(t)&&(t=Gj(t)),typeof e=="function"&&(r=e,e=null),o?e="buffer":e||(e=n.defaultEncoding),typeof r!="function"&&(r=i$),n.ending?o$(this,r):(o||a$(this,n,t,r))&&(n.pendingcb++,i=c$(this,n,o,t,e,r)),i};Ir.prototype.cork=function(){this._writableState.corked++;};Ir.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&oM(this,t));};Ir.prototype.setDefaultEncoding=function(e){if(typeof e=="string"&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new n$(e);return this._writableState.defaultEncoding=e,this};Object.defineProperty(Ir.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function s$(t,e,r){return !t.objectMode&&t.decodeStrings!==!1&&typeof e=="string"&&(e=py.from(e,r)),e}Object.defineProperty(Ir.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function c$(t,e,r,n,i,o){if(!r){var a=s$(e,n,i);n!==a&&(r=!0,i="buffer",n=a);}var s=e.objectMode?1:n.length;e.length+=s;var c=e.length<e.highWaterMark;if(c||(e.needDrain=!0),e.writing||e.corked){var u=e.lastBufferedRequest;e.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},u?u.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1;}else uE(t,e,!1,s,n,i,o);return c}function uE(t,e,r,n,i,o,a){e.writelen=n,e.writecb=a,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new e$("write")):r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1;}function u$(t,e,r,n,i){--e.pendingcb,r?(N.nextTick(i,n),N.nextTick(yh,t,e),t._writableState.errorEmitted=!0,ff(t,n)):(i(n),t._writableState.errorEmitted=!0,ff(t,n),yh(t,e));}function l$(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0;}function f$(t,e){var r=t._writableState,n=r.sync,i=r.writecb;if(typeof i!="function")throw new Xj;if(l$(r),e)u$(t,r,n,e,i);else {var o=aM(r)||t.destroyed;!o&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&oM(t,r),n?N.nextTick(rM,t,r,o,i):rM(t,r,o,i);}}function rM(t,e,r,n){r||d$(t,e),e.pendingcb--,n(),yh(t,e);}function d$(t,e){e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit("drain"));}function oM(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var n=e.bufferedRequestCount,i=new Array(n),o=e.corkedRequestsFree;o.entry=r;for(var a=0,s=!0;r;)i[a]=r,r.isBuf||(s=!1),r=r.next,a+=1;i.allBuffers=s,uE(t,e,!0,e.length,i,"",o.finish),e.pendingcb++,e.lastBufferedRequest=null,o.next?(e.corkedRequestsFree=o.next,o.next=null):e.corkedRequestsFree=new nM(e),e.bufferedRequestCount=0;}else {for(;r;){var c=r.chunk,u=r.encoding,l=r.callback,w=e.objectMode?1:c.length;if(uE(t,e,!1,w,c,u,l),r=r.next,e.bufferedRequestCount--,e.writing)break}r===null&&(e.lastBufferedRequest=null);}e.bufferedRequest=r,e.bufferProcessing=!1;}Ir.prototype._write=function(t,e,r){r(new Jj("_write()"));};Ir.prototype._writev=null;Ir.prototype.end=function(t,e,r){var n=this._writableState;return typeof t=="function"?(r=t,t=null,e=null):typeof e=="function"&&(r=e,e=null),t!=null&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||m$(this,n,r),this};Object.defineProperty(Ir.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function aM(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function h$(t,e){t._final(function(r){e.pendingcb--,r&&ff(t,r),e.prefinished=!0,t.emit("prefinish"),yh(t,e);});}function p$(t,e){!e.prefinished&&!e.finalCalled&&(typeof t._final=="function"&&!e.destroyed?(e.pendingcb++,e.finalCalled=!0,N.nextTick(h$,t,e)):(e.prefinished=!0,t.emit("prefinish")));}function yh(t,e){var r=aM(e);if(r&&(p$(t,e),e.pendingcb===0&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var n=t._readableState;(!n||n.autoDestroy&&n.endEmitted)&&t.destroy();}return r}function m$(t,e,r){e.ending=!0,yh(t,e),r&&(e.finished?N.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1;}function y$(t,e,r){var n=t.entry;for(t.entry=null;n;){var i=n.callback;e.pendingcb--,i(r),n=n.next;}e.corkedRequestsFree.next=t;}Object.defineProperty(Ir.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e);}});Ir.prototype.destroy=lE.destroy;Ir.prototype._undestroy=lE.undestroy;Ir.prototype._destroy=function(t,e){e(t);};});var Ls=ne((_ve,uM)=>{v();m();y();g();var g$=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};uM.exports=ta;var cM=vy(),dE=my();yt()(ta,cM);for(fE=g$(dE.prototype),yy=0;yy<fE.length;yy++)gy=fE[yy],ta.prototype[gy]||(ta.prototype[gy]=dE.prototype[gy]);var fE,gy,yy;function ta(t){if(!(this instanceof ta))return new ta(t);cM.call(this,t),dE.call(this,t),this.allowHalfOpen=!0,t&&(t.readable===!1&&(this.readable=!1),t.writable===!1&&(this.writable=!1),t.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",v$)));}Object.defineProperty(ta.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(ta.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(ta.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function v$(){this._writableState.ended||N.nextTick(b$,this);}function b$(t){t.end();}Object.defineProperty(ta.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(e){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=e,this._writableState.destroyed=e);}});});var bh=ne(fM=>{v();m();y();g();var pE=Et().Buffer,lM=pE.isEncoding||function(t){switch(t=""+t,t&&t.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 w$(t){if(!t)return "utf8";for(var e;;)switch(t){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 t;default:if(e)return;t=(""+t).toLowerCase(),e=!0;}}function E$(t){var e=w$(t);if(typeof e!="string"&&(pE.isEncoding===lM||!lM(t)))throw new Error("Unknown encoding: "+t);return e||t}fM.StringDecoder=vh;function vh(t){this.encoding=E$(t);var e;switch(this.encoding){case"utf16le":this.text=R$,this.end=x$,e=4;break;case"utf8":this.fillLast=C$,e=4;break;case"base64":this.text=I$,this.end=M$,e=3;break;default:this.write=O$,this.end=N$;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=pE.allocUnsafe(e);}vh.prototype.write=function(t){if(t.length===0)return "";var e,r;if(this.lastNeed){if(e=this.fillLast(t),e===void 0)return "";r=this.lastNeed,this.lastNeed=0;}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""};vh.prototype.end=T$;vh.prototype.text=A$;vh.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length;};function hE(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function _$(t,e,r){var n=e.length-1;if(n<r)return 0;var i=hE(e[n]);return i>=0?(i>0&&(t.lastNeed=i-1),i):--n<r||i===-2?0:(i=hE(e[n]),i>=0?(i>0&&(t.lastNeed=i-2),i):--n<r||i===-2?0:(i=hE(e[n]),i>=0?(i>0&&(i===2?i=0:t.lastNeed=i-3),i):0))}function S$(t,e,r){if((e[0]&192)!==128)return t.lastNeed=0,"\uFFFD";if(t.lastNeed>1&&e.length>1){if((e[1]&192)!==128)return t.lastNeed=1,"\uFFFD";if(t.lastNeed>2&&e.length>2&&(e[2]&192)!==128)return t.lastNeed=2,"\uFFFD"}}function C$(t){var e=this.lastTotal-this.lastNeed,r=S$(this,t);if(r!==void 0)return r;if(this.lastNeed<=t.length)return t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,e,0,t.length),this.lastNeed-=t.length;}function A$(t,e){var r=_$(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)}function T$(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"\uFFFD":e}function R$(t,e){if((t.length-e)%2===0){var r=t.toString("utf16le",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function x$(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function I$(t,e){var r=(t.length-e)%3;return r===0?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function M$(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function O$(t){return t.toString(this.encoding)}function N$(t){return t&&t.length?this.write(t):""}});var wh=ne((Nve,pM)=>{v();m();y();g();var dM=eu().codes.ERR_STREAM_PREMATURE_CLOSE;function k$(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];t.apply(this,n);}}}function P$(){}function B$(t){return t.setHeader&&typeof t.abort=="function"}function hM(t,e,r){if(typeof e=="function")return hM(t,null,e);e||(e={}),r=k$(r||P$);var n=e.readable||e.readable!==!1&&t.readable,i=e.writable||e.writable!==!1&&t.writable,o=function(){t.writable||s();},a=t._writableState&&t._writableState.finished,s=function(){i=!1,a=!0,n||r.call(t);},c=t._readableState&&t._readableState.endEmitted,u=function(){n=!1,c=!0,i||r.call(t);},l=function(I){r.call(t,I);},w=function(){var I;if(n&&!c)return (!t._readableState||!t._readableState.ended)&&(I=new dM),r.call(t,I);if(i&&!a)return (!t._writableState||!t._writableState.ended)&&(I=new dM),r.call(t,I)},T=function(){t.req.on("finish",s);};return B$(t)?(t.on("complete",s),t.on("abort",w),t.req?T():t.on("request",T)):i&&!t._writableState&&(t.on("end",o),t.on("close",o)),t.on("end",u),t.on("finish",s),e.error!==!1&&t.on("error",l),t.on("close",w),function(){t.removeListener("complete",s),t.removeListener("abort",w),t.removeListener("request",T),t.req&&t.req.removeListener("finish",s),t.removeListener("end",o),t.removeListener("close",o),t.removeListener("finish",s),t.removeListener("end",u),t.removeListener("error",l),t.removeListener("close",w);}}pM.exports=hM;});var yM=ne((Dve,mM)=>{v();m();y();g();var by;function qs(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var U$=wh(),Fs=Symbol("lastResolve"),tu=Symbol("lastReject"),Eh=Symbol("error"),wy=Symbol("ended"),ru=Symbol("lastPromise"),mE=Symbol("handlePromise"),nu=Symbol("stream");function zs(t,e){return {value:t,done:e}}function D$(t){var e=t[Fs];if(e!==null){var r=t[nu].read();r!==null&&(t[ru]=null,t[Fs]=null,t[tu]=null,e(zs(r,!1)));}}function L$(t){N.nextTick(D$,t);}function q$(t,e){return function(r,n){t.then(function(){if(e[wy]){r(zs(void 0,!0));return}e[mE](r,n);},n);}}var F$=Object.getPrototypeOf(function(){}),z$=Object.setPrototypeOf((by={get stream(){return this[nu]},next:function(){var e=this,r=this[Eh];if(r!==null)return Promise.reject(r);if(this[wy])return Promise.resolve(zs(void 0,!0));if(this[nu].destroyed)return new Promise(function(a,s){N.nextTick(function(){e[Eh]?s(e[Eh]):a(zs(void 0,!0));});});var n=this[ru],i;if(n)i=new Promise(q$(n,this));else {var o=this[nu].read();if(o!==null)return Promise.resolve(zs(o,!1));i=new Promise(this[mE]);}return this[ru]=i,i}},qs(by,Symbol.asyncIterator,function(){return this}),qs(by,"return",function(){var e=this;return new Promise(function(r,n){e[nu].destroy(null,function(i){if(i){n(i);return}r(zs(void 0,!0));});})}),by),F$),H$=function(e){var r,n=Object.create(z$,(r={},qs(r,nu,{value:e,writable:!0}),qs(r,Fs,{value:null,writable:!0}),qs(r,tu,{value:null,writable:!0}),qs(r,Eh,{value:null,writable:!0}),qs(r,wy,{value:e._readableState.endEmitted,writable:!0}),qs(r,mE,{value:function(o,a){var s=n[nu].read();s?(n[ru]=null,n[Fs]=null,n[tu]=null,o(zs(s,!1))):(n[Fs]=o,n[tu]=a);},writable:!0}),r));return n[ru]=null,U$(e,function(i){if(i&&i.code!=="ERR_STREAM_PREMATURE_CLOSE"){var o=n[tu];o!==null&&(n[ru]=null,n[Fs]=null,n[tu]=null,o(i)),n[Eh]=i;return}var a=n[Fs];a!==null&&(n[ru]=null,n[Fs]=null,n[tu]=null,a(zs(void 0,!0))),n[wy]=!0;}),e.on("readable",L$.bind(null,n)),n};mM.exports=H$;});var vM=ne((Hve,gM)=>{v();m();y();g();gM.exports=function(){throw new Error("Readable.from is not available in the browser")};});var vy=ne((Wve,xM)=>{v();m();y();g();xM.exports=Vt;var df;Vt.ReadableState=_M;(qa(),Dr(of)).EventEmitter;var EM=function(e,r){return e.listeners(r).length},Sh=Gw(),Ey=kn().Buffer,j$=globalThis.Uint8Array||function(){};function $$(t){return Ey.from(t)}function V$(t){return Ey.isBuffer(t)||t instanceof j$}var yE=(Ni(),Dr($a)),Nt;yE&&yE.debuglog?Nt=yE.debuglog("stream"):Nt=function(){};var G$=WI(),SE=oE(),K$=aE(),W$=K$.getHighWaterMark,_y=eu().codes,Y$=_y.ERR_INVALID_ARG_TYPE,Z$=_y.ERR_STREAM_PUSH_AFTER_EOF,J$=_y.ERR_METHOD_NOT_IMPLEMENTED,X$=_y.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,hf,gE,vE;yt()(Vt,Sh);var _h=SE.errorOrDestroy,bE=["error","close","destroy","pause","resume"];function Q$(t,e,r){if(typeof t.prependListener=="function")return t.prependListener(e,r);!t._events||!t._events[e]?t.on(e,r):Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]];}function _M(t,e,r){df=df||Ls(),t=t||{},typeof r!="boolean"&&(r=e instanceof df),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=W$(this,t,"readableHighWaterMark",r),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=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(hf||(hf=bh().StringDecoder),this.decoder=new hf(t.encoding),this.encoding=t.encoding);}function Vt(t){if(df=df||Ls(),!(this instanceof Vt))return new Vt(t);var e=this instanceof df;this._readableState=new _M(t,this,e),this.readable=!0,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),Sh.call(this);}Object.defineProperty(Vt.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e);}});Vt.prototype.destroy=SE.destroy;Vt.prototype._undestroy=SE.undestroy;Vt.prototype._destroy=function(t,e){e(t);};Vt.prototype.push=function(t,e){var r=this._readableState,n;return r.objectMode?n=!0:typeof t=="string"&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=Ey.from(t,e),e=""),n=!0),SM(this,t,e,!1,n)};Vt.prototype.unshift=function(t){return SM(this,t,null,!0,!1)};function SM(t,e,r,n,i){Nt("readableAddChunk",e);var o=t._readableState;if(e===null)o.reading=!1,rV(t,o);else {var a;if(i||(a=eV(o,e)),a)_h(t,a);else if(o.objectMode||e&&e.length>0)if(typeof e!="string"&&!o.objectMode&&Object.getPrototypeOf(e)!==Ey.prototype&&(e=$$(e)),n)o.endEmitted?_h(t,new X$):wE(t,o,e,!0);else if(o.ended)_h(t,new Z$);else {if(o.destroyed)return !1;o.reading=!1,o.decoder&&!r?(e=o.decoder.write(e),o.objectMode||e.length!==0?wE(t,o,e,!1):_E(t,o)):wE(t,o,e,!1);}else n||(o.reading=!1,_E(t,o));}return !o.ended&&(o.length<o.highWaterMark||o.length===0)}function wE(t,e,r,n){e.flowing&&e.length===0&&!e.sync?(e.awaitDrain=0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,n?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&Sy(t)),_E(t,e);}function eV(t,e){var r;return !V$(e)&&typeof e!="string"&&e!==void 0&&!t.objectMode&&(r=new Y$("chunk",["string","Buffer","Uint8Array"],e)),r}Vt.prototype.isPaused=function(){return this._readableState.flowing===!1};Vt.prototype.setEncoding=function(t){hf||(hf=bh().StringDecoder);var e=new hf(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,n="";r!==null;)n+=e.write(r.data),r=r.next;return this._readableState.buffer.clear(),n!==""&&this._readableState.buffer.push(n),this._readableState.length=n.length,this};var bM=1073741824;function tV(t){return t>=bM?t=bM:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function wM(t,e){return t<=0||e.length===0&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=tV(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}Vt.prototype.read=function(t){Nt("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(t!==0&&(e.emittedReadable=!1),t===0&&e.needReadable&&((e.highWaterMark!==0?e.length>=e.highWaterMark:e.length>0)||e.ended))return Nt("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?EE(this):Sy(this),null;if(t=wM(t,e),t===0&&e.ended)return e.length===0&&EE(this),null;var n=e.needReadable;Nt("need readable",n),(e.length===0||e.length-t<e.highWaterMark)&&(n=!0,Nt("length less than watermark",n)),e.ended||e.reading?(n=!1,Nt("reading or ended",n)):n&&(Nt("do read"),e.reading=!0,e.sync=!0,e.length===0&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=wM(r,e)));var i;return t>0?i=TM(t,e):i=null,i===null?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),e.length===0&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&EE(this)),i!==null&&this.emit("data",i),i};function rV(t,e){if(Nt("onEofChunk"),!e.ended){if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length);}e.ended=!0,e.sync?Sy(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,CM(t)));}}function Sy(t){var e=t._readableState;Nt("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(Nt("emitReadable",e.flowing),e.emittedReadable=!0,N.nextTick(CM,t));}function CM(t){var e=t._readableState;Nt("emitReadable_",e.destroyed,e.length,e.ended),!e.destroyed&&(e.length||e.ended)&&(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,CE(t);}function _E(t,e){e.readingMore||(e.readingMore=!0,N.nextTick(nV,t,e));}function nV(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&e.length===0);){var r=e.length;if(Nt("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1;}Vt.prototype._read=function(t){_h(this,new J$("_read()"));};Vt.prototype.pipe=function(t,e){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=t;break;case 1:n.pipes=[n.pipes,t];break;default:n.pipes.push(t);break}n.pipesCount+=1,Nt("pipe count=%d opts=%j",n.pipesCount,e);var i=(!e||e.end!==!1)&&t!==N.stdout&&t!==N.stderr,o=i?s:k;n.endEmitted?N.nextTick(o):r.once("end",o),t.on("unpipe",a);function a(q,j){Nt("onunpipe"),q===r&&j&&j.hasUnpiped===!1&&(j.hasUnpiped=!0,l());}function s(){Nt("onend"),t.end();}var c=iV(r);t.on("drain",c);var u=!1;function l(){Nt("cleanup"),t.removeListener("close",x),t.removeListener("finish",I),t.removeListener("drain",c),t.removeListener("error",T),t.removeListener("unpipe",a),r.removeListener("end",s),r.removeListener("end",k),r.removeListener("data",w),u=!0,n.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&c();}r.on("data",w);function w(q){Nt("ondata");var j=t.write(q);Nt("dest.write",j),j===!1&&((n.pipesCount===1&&n.pipes===t||n.pipesCount>1&&RM(n.pipes,t)!==-1)&&!u&&(Nt("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause());}function T(q){Nt("onerror",q),k(),t.removeListener("error",T),EM(t,"error")===0&&_h(t,q);}Q$(t,"error",T);function x(){t.removeListener("finish",I),k();}t.once("close",x);function I(){Nt("onfinish"),t.removeListener("close",x),k();}t.once("finish",I);function k(){Nt("unpipe"),r.unpipe(t);}return t.emit("pipe",r),n.flowing||(Nt("pipe resume"),r.resume()),t};function iV(t){return function(){var r=t._readableState;Nt("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&EM(t,"data")&&(r.flowing=!0,CE(t));}}Vt.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(e.pipesCount===0)return this;if(e.pipesCount===1)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r),this);if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o<i;o++)n[o].emit("unpipe",this,{hasUnpiped:!1});return this}var a=RM(e.pipes,t);return a===-1?this:(e.pipes.splice(a,1),e.pipesCount-=1,e.pipesCount===1&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r),this)};Vt.prototype.on=function(t,e){var r=Sh.prototype.on.call(this,t,e),n=this._readableState;return t==="data"?(n.readableListening=this.listenerCount("readable")>0,n.flowing!==!1&&this.resume()):t==="readable"&&!n.endEmitted&&!n.readableListening&&(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,Nt("on readable",n.length,n.reading),n.length?Sy(this):n.reading||N.nextTick(oV,this)),r};Vt.prototype.addListener=Vt.prototype.on;Vt.prototype.removeListener=function(t,e){var r=Sh.prototype.removeListener.call(this,t,e);return t==="readable"&&N.nextTick(AM,this),r};Vt.prototype.removeAllListeners=function(t){var e=Sh.prototype.removeAllListeners.apply(this,arguments);return (t==="readable"||t===void 0)&&N.nextTick(AM,this),e};function AM(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume();}function oV(t){Nt("readable nexttick read 0"),t.read(0);}Vt.prototype.resume=function(){var t=this._readableState;return t.flowing||(Nt("resume"),t.flowing=!t.readableListening,aV(this,t)),t.paused=!1,this};function aV(t,e){e.resumeScheduled||(e.resumeScheduled=!0,N.nextTick(sV,t,e));}function sV(t,e){Nt("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),CE(t),e.flowing&&!e.reading&&t.read(0);}Vt.prototype.pause=function(){return Nt("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(Nt("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function CE(t){var e=t._readableState;for(Nt("flow",e.flowing);e.flowing&&t.read()!==null;);}Vt.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;t.on("end",function(){if(Nt("wrapped end"),r.decoder&&!r.ended){var a=r.decoder.end();a&&a.length&&e.push(a);}e.push(null);}),t.on("data",function(a){if(Nt("wrapped data"),r.decoder&&(a=r.decoder.write(a)),!(r.objectMode&&a==null)&&!(!r.objectMode&&(!a||!a.length))){var s=e.push(a);s||(n=!0,t.pause());}});for(var i in t)this[i]===void 0&&typeof t[i]=="function"&&(this[i]=function(s){return function(){return t[s].apply(t,arguments)}}(i));for(var o=0;o<bE.length;o++)t.on(bE[o],this.emit.bind(this,bE[o]));return this._read=function(a){Nt("wrapped _read",a),n&&(n=!1,t.resume());},this};typeof Symbol=="function"&&(Vt.prototype[Symbol.asyncIterator]=function(){return gE===void 0&&(gE=yM()),gE(this)});Object.defineProperty(Vt.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(Vt.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(Vt.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e);}});Vt._fromList=TM;Object.defineProperty(Vt.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function TM(t,e){if(e.length===0)return null;var r;return e.objectMode?r=e.buffer.shift():!t||t>=e.length?(e.decoder?r=e.buffer.join(""):e.buffer.length===1?r=e.buffer.first():r=e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r}function EE(t){var e=t._readableState;Nt("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,N.nextTick(cV,e,t));}function cV(t,e){if(Nt("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&t.length===0&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy();}}typeof Symbol=="function"&&(Vt.from=function(t,e){return vE===void 0&&(vE=vM()),vE(Vt,t,e)});function RM(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return -1}});var Ty=ne((Qve,MM)=>{v();m();y();g();MM.exports=Va;var Cy=eu().codes,uV=Cy.ERR_METHOD_NOT_IMPLEMENTED,lV=Cy.ERR_MULTIPLE_CALLBACK,fV=Cy.ERR_TRANSFORM_ALREADY_TRANSFORMING,dV=Cy.ERR_TRANSFORM_WITH_LENGTH_0,Ay=Ls();yt()(Va,Ay);function hV(t,e){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(n===null)return this.emit("error",new lV);r.writechunk=null,r.writecb=null,e!=null&&this.push(e),n(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark);}function Va(t){if(!(this instanceof Va))return new Va(t);Ay.call(this,t),this._transformState={afterTransform:hV.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&(typeof t.transform=="function"&&(this._transform=t.transform),typeof t.flush=="function"&&(this._flush=t.flush)),this.on("prefinish",pV);}function pV(){var t=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(e,r){IM(t,e,r);}):IM(this,null,null);}Va.prototype.push=function(t,e){return this._transformState.needTransform=!1,Ay.prototype.push.call(this,t,e)};Va.prototype._transform=function(t,e,r){r(new uV("_transform()"));};Va.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark);}};Va.prototype._read=function(t){var e=this._transformState;e.writechunk!==null&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0;};Va.prototype._destroy=function(t,e){Ay.prototype._destroy.call(this,t,function(r){e(r);});};function IM(t,e,r){if(e)return t.emit("error",e);if(r!=null&&t.push(r),t._writableState.length)throw new dV;if(t._transformState.transforming)throw new fV;return t.push(null)}});var AE=ne((ibe,NM)=>{v();m();y();g();NM.exports=Ch;var OM=Ty();yt()(Ch,OM);function Ch(t){if(!(this instanceof Ch))return new Ch(t);OM.call(this,t);}Ch.prototype._transform=function(t,e,r){r(null,t);};});var RE=ne((ube,UM)=>{v();m();y();g();var TE;function mV(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments));}}var BM=eu().codes,yV=BM.ERR_MISSING_ARGS,gV=BM.ERR_STREAM_DESTROYED;function kM(t){if(t)throw t}function vV(t){return t.setHeader&&typeof t.abort=="function"}function bV(t,e,r,n){n=mV(n);var i=!1;t.on("close",function(){i=!0;}),TE===void 0&&(TE=wh()),TE(t,{readable:e,writable:r},function(a){if(a)return n(a);i=!0,n();});var o=!1;return function(a){if(!i&&!o){if(o=!0,vV(t))return t.abort();if(typeof t.destroy=="function")return t.destroy();n(a||new gV("pipe"));}}}function PM(t){t();}function wV(t,e){return t.pipe(e)}function EV(t){return !t.length||typeof t[t.length-1]!="function"?kM:t.pop()}function _V(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var n=EV(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new yV("streams");var i,o=e.map(function(a,s){var c=s<e.length-1,u=s>0;return bV(a,c,u,function(l){i||(i=l),l&&o.forEach(PM),!c&&(o.forEach(PM),n(i));})});return e.reduce(wV)}UM.exports=_V;});var Ah=ne((pbe,DM)=>{v();m();y();g();DM.exports=Pi;var xE=(qa(),Dr(of)).EventEmitter,SV=yt();SV(Pi,xE);Pi.Readable=vy();Pi.Writable=my();Pi.Duplex=Ls();Pi.Transform=Ty();Pi.PassThrough=AE();Pi.finished=wh();Pi.pipeline=RE();Pi.Stream=Pi;function Pi(){xE.call(this);}Pi.prototype.pipe=function(t,e){var r=this;function n(l){t.writable&&t.write(l)===!1&&r.pause&&r.pause();}r.on("data",n);function i(){r.readable&&r.resume&&r.resume();}t.on("drain",i),!t._isStdio&&(!e||e.end!==!1)&&(r.on("end",a),r.on("close",s));var o=!1;function a(){o||(o=!0,t.end());}function s(){o||(o=!0,typeof t.destroy=="function"&&t.destroy());}function c(l){if(u(),xE.listenerCount(this,"error")===0)throw l}r.on("error",c),t.on("error",c);function u(){r.removeListener("data",n),t.removeListener("drain",i),r.removeListener("end",a),r.removeListener("close",s),r.removeListener("error",c),t.removeListener("error",c),r.removeListener("end",u),r.removeListener("close",u),t.removeListener("close",u);}return r.on("end",u),r.on("close",u),t.on("close",u),t.emit("pipe",r),t};});var IE=ne((bbe,LM)=>{v();m();y();g();var Ry=Et().Buffer,CV=Ah(),AV=(Ni(),Dr($a));function xy(t){if(this.buffer=null,this.writable=!0,this.readable=!0,!t)return this.buffer=Ry.alloc(0),this;if(typeof t.pipe=="function")return this.buffer=Ry.alloc(0),t.pipe(this),this;if(t.length||typeof t=="object")return this.buffer=t,this.writable=!1,N.nextTick(function(){this.emit("end",t),this.readable=!1,this.emit("close");}.bind(this)),this;throw new TypeError("Unexpected data type ("+typeof t+")")}AV.inherits(xy,CV);xy.prototype.write=function(e){this.buffer=Ry.concat([this.buffer,Ry.from(e)]),this.emit("data",e);};xy.prototype.end=function(e){e&&this.write(e),this.emit("end",e),this.emit("close"),this.writable=!1,this.readable=!1;};LM.exports=xy;});var FM=ne((Cbe,qM)=>{v();m();y();g();var Th=kn().Buffer,ME=kn().SlowBuffer;qM.exports=Iy;function Iy(t,e){if(!Th.isBuffer(t)||!Th.isBuffer(e)||t.length!==e.length)return !1;for(var r=0,n=0;n<t.length;n++)r|=t[n]^e[n];return r===0}Iy.install=function(){Th.prototype.equal=ME.prototype.equal=function(e){return Iy(this,e)};};var TV=Th.prototype.equal,RV=ME.prototype.equal;Iy.restore=function(){Th.prototype.equal=TV,ME.prototype.equal=RV;};});var Hs=ne((Ibe,NE)=>{v();m();y();g();var OE=65536,xV=4294967295;function IV(){throw new Error(`Secure random number generation is not supported by this browser.
Use Chrome, Firefox or Internet Explorer 11`)}var MV=Et().Buffer,My=globalThis.crypto||globalThis.msCrypto;My&&My.getRandomValues?NE.exports=OV:NE.exports=IV;function OV(t,e){if(t>xV)throw new RangeError("requested too many random bytes");var r=MV.allocUnsafe(t);if(t>0)if(t>OE)for(var n=0;n<t;n+=OE)My.getRandomValues(r.slice(n,n+OE));else My.getRandomValues(r);return typeof e=="function"?N.nextTick(function(){e(null,r);}):r}});var Oy=ne((Bi,zM)=>{v();m();y();g();Bi=zM.exports=vy();Bi.Stream=Bi;Bi.Readable=Bi;Bi.Writable=my();Bi.Duplex=Ls();Bi.Transform=Ty();Bi.PassThrough=AE();Bi.finished=wh();Bi.pipeline=RE();});var kE=ne((Lbe,jM)=>{v();m();y();g();var Ny=Et().Buffer,HM=Oy().Transform,NV=yt();function kV(t,e){if(!Ny.isBuffer(t)&&typeof t!="string")throw new TypeError(e+" must be a string or a buffer")}function js(t){HM.call(this),this._block=Ny.allocUnsafe(t),this._blockSize=t,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1;}NV(js,HM);js.prototype._transform=function(t,e,r){var n=null;try{this.update(t,e);}catch(i){n=i;}r(n);};js.prototype._flush=function(t){var e=null;try{this.push(this.digest());}catch(r){e=r;}t(e);};js.prototype.update=function(t,e){if(kV(t,"Data"),this._finalized)throw new Error("Digest already called");Ny.isBuffer(t)||(t=Ny.from(t,e));for(var r=this._block,n=0;this._blockOffset+t.length-n>=this._blockSize;){for(var i=this._blockOffset;i<this._blockSize;)r[i++]=t[n++];this._update(),this._blockOffset=0;}for(;n<t.length;)r[this._blockOffset++]=t[n++];for(var o=0,a=t.length*8;a>0;++o)this._length[o]+=a,a=this._length[o]/4294967296|0,a>0&&(this._length[o]-=4294967296*a);return this};js.prototype._update=function(){throw new Error("_update is not implemented")};js.prototype.digest=function(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var e=this._digest();t!==void 0&&(e=e.toString(t)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return e};js.prototype._digest=function(){throw new Error("_digest is not implemented")};jM.exports=js;});var By=ne((jbe,VM)=>{v();m();y();g();var PV=yt(),$M=kE(),BV=Et().Buffer,UV=new Array(16);function ky(){$M.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878;}PV(ky,$M);ky.prototype._update=function(){for(var t=UV,e=0;e<16;++e)t[e]=this._block.readInt32LE(e*4);var r=this._a,n=this._b,i=this._c,o=this._d;r=An(r,n,i,o,t[0],3614090360,7),o=An(o,r,n,i,t[1],3905402710,12),i=An(i,o,r,n,t[2],606105819,17),n=An(n,i,o,r,t[3],3250441966,22),r=An(r,n,i,o,t[4],4118548399,7),o=An(o,r,n,i,t[5],1200080426,12),i=An(i,o,r,n,t[6],2821735955,17),n=An(n,i,o,r,t[7],4249261313,22),r=An(r,n,i,o,t[8],1770035416,7),o=An(o,r,n,i,t[9],2336552879,12),i=An(i,o,r,n,t[10],4294925233,17),n=An(n,i,o,r,t[11],2304563134,22),r=An(r,n,i,o,t[12],1804603682,7),o=An(o,r,n,i,t[13],4254626195,12),i=An(i,o,r,n,t[14],2792965006,17),n=An(n,i,o,r,t[15],1236535329,22),r=Tn(r,n,i,o,t[1],4129170786,5),o=Tn(o,r,n,i,t[6],3225465664,9),i=Tn(i,o,r,n,t[11],643717713,14),n=Tn(n,i,o,r,t[0],3921069994,20),r=Tn(r,n,i,o,t[5],3593408605,5),o=Tn(o,r,n,i,t[10],38016083,9),i=Tn(i,o,r,n,t[15],3634488961,14),n=Tn(n,i,o,r,t[4],3889429448,20),r=Tn(r,n,i,o,t[9],568446438,5),o=Tn(o,r,n,i,t[14],3275163606,9),i=Tn(i,o,r,n,t[3],4107603335,14),n=Tn(n,i,o,r,t[8],1163531501,20),r=Tn(r,n,i,o,t[13],2850285829,5),o=Tn(o,r,n,i,t[2],4243563512,9),i=Tn(i,o,r,n,t[7],1735328473,14),n=Tn(n,i,o,r,t[12],2368359562,20),r=Rn(r,n,i,o,t[5],4294588738,4),o=Rn(o,r,n,i,t[8],2272392833,11),i=Rn(i,o,r,n,t[11],1839030562,16),n=Rn(n,i,o,r,t[14],4259657740,23),r=Rn(r,n,i,o,t[1],2763975236,4),o=Rn(o,r,n,i,t[4],1272893353,11),i=Rn(i,o,r,n,t[7],4139469664,16),n=Rn(n,i,o,r,t[10],3200236656,23),r=Rn(r,n,i,o,t[13],681279174,4),o=Rn(o,r,n,i,t[0],3936430074,11),i=Rn(i,o,r,n,t[3],3572445317,16),n=Rn(n,i,o,r,t[6],76029189,23),r=Rn(r,n,i,o,t[9],3654602809,4),o=Rn(o,r,n,i,t[12],3873151461,11),i=Rn(i,o,r,n,t[15],530742520,16),n=Rn(n,i,o,r,t[2],3299628645,23),r=xn(r,n,i,o,t[0],4096336452,6),o=xn(o,r,n,i,t[7],1126891415,10),i=xn(i,o,r,n,t[14],2878612391,15),n=xn(n,i,o,r,t[5],4237533241,21),r=xn(r,n,i,o,t[12],1700485571,6),o=xn(o,r,n,i,t[3],2399980690,10),i=xn(i,o,r,n,t[10],4293915773,15),n=xn(n,i,o,r,t[1],2240044497,21),r=xn(r,n,i,o,t[8],1873313359,6),o=xn(o,r,n,i,t[15],4264355552,10),i=xn(i,o,r,n,t[6],2734768916,15),n=xn(n,i,o,r,t[13],1309151649,21),r=xn(r,n,i,o,t[4],4149444226,6),o=xn(o,r,n,i,t[11],3174756917,10),i=xn(i,o,r,n,t[2],718787259,15),n=xn(n,i,o,r,t[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+n|0,this._c=this._c+i|0,this._d=this._d+o|0;};ky.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=BV.allocUnsafe(16);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t};function Py(t,e){return t<<e|t>>>32-e}function An(t,e,r,n,i,o,a){return Py(t+(e&r|~e&n)+i+o|0,a)+e|0}function Tn(t,e,r,n,i,o,a){return Py(t+(e&n|r&~n)+i+o|0,a)+e|0}function Rn(t,e,r,n,i,o,a){return Py(t+(e^r^n)+i+o|0,a)+e|0}function xn(t,e,r,n,i,o,a){return Py(t+(r^(e|~n))+i+o|0,a)+e|0}VM.exports=ky;});var Dy=ne((Wbe,XM)=>{v();m();y();g();var PE=kn().Buffer,DV=yt(),JM=kE(),LV=new Array(16),Rh=[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],xh=[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],Ih=[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],Mh=[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],Oh=[0,1518500249,1859775393,2400959708,2840853838],Nh=[1352829926,1548603684,1836072691,2053994217,0];function Uy(){JM.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520;}DV(Uy,JM);Uy.prototype._update=function(){for(var t=LV,e=0;e<16;++e)t[e]=this._block.readInt32LE(e*4);for(var r=this._a|0,n=this._b|0,i=this._c|0,o=this._d|0,a=this._e|0,s=this._a|0,c=this._b|0,u=this._c|0,l=this._d|0,w=this._e|0,T=0;T<80;T+=1){var x,I;T<16?(x=GM(r,n,i,o,a,t[Rh[T]],Oh[0],Ih[T]),I=ZM(s,c,u,l,w,t[xh[T]],Nh[0],Mh[T])):T<32?(x=KM(r,n,i,o,a,t[Rh[T]],Oh[1],Ih[T]),I=YM(s,c,u,l,w,t[xh[T]],Nh[1],Mh[T])):T<48?(x=WM(r,n,i,o,a,t[Rh[T]],Oh[2],Ih[T]),I=WM(s,c,u,l,w,t[xh[T]],Nh[2],Mh[T])):T<64?(x=YM(r,n,i,o,a,t[Rh[T]],Oh[3],Ih[T]),I=KM(s,c,u,l,w,t[xh[T]],Nh[3],Mh[T])):(x=ZM(r,n,i,o,a,t[Rh[T]],Oh[4],Ih[T]),I=GM(s,c,u,l,w,t[xh[T]],Nh[4],Mh[T])),r=a,a=o,o=iu(i,10),i=n,n=x,s=w,w=l,l=iu(u,10),u=c,c=I;}var k=this._b+i+l|0;this._b=this._c+o+w|0,this._c=this._d+a+s|0,this._d=this._e+r+c|0,this._e=this._a+n+u|0,this._a=k;};Uy.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=PE.alloc?PE.alloc(20):new PE(20);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t.writeInt32LE(this._e,16),t};function iu(t,e){return t<<e|t>>>32-e}function GM(t,e,r,n,i,o,a,s){return iu(t+(e^r^n)+o+a|0,s)+i|0}function KM(t,e,r,n,i,o,a,s){return iu(t+(e&r|~e&n)+o+a|0,s)+i|0}function WM(t,e,r,n,i,o,a,s){return iu(t+((e|~r)^n)+o+a|0,s)+i|0}function YM(t,e,r,n,i,o,a,s){return iu(t+(e&n|r&~n)+o+a|0,s)+i|0}function ZM(t,e,r,n,i,o,a,s){return iu(t+(e^(r|~n))+o+a|0,s)+i|0}XM.exports=Uy;});var ou=ne((Qbe,e6)=>{v();m();y();g();var QM=Et().Buffer;function Ly(t,e){this._block=QM.alloc(t),this._finalSize=e,this._blockSize=t,this._len=0;}Ly.prototype.update=function(t,e){typeof t=="string"&&(e=e||"utf8",t=QM.from(t,e));for(var r=this._block,n=this._blockSize,i=t.length,o=this._len,a=0;a<i;){for(var s=o%n,c=Math.min(i-a,n-s),u=0;u<c;u++)r[s+u]=t[a+u];o+=c,a+=c,o%n===0&&this._update(r);}return this._len+=i,this};Ly.prototype.digest=function(t){var e=this._len%this._blockSize;this._block[e]=128,this._block.fill(0,e+1),e>=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=this._len*8;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else {var n=(r&4294967295)>>>0,i=(r-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4);}this._update(this._block);var o=this._hash();return t?o.toString(t):o};Ly.prototype._update=function(){throw new Error("_update must be implemented by subclass")};e6.exports=Ly;});var n6=ne((i1e,r6)=>{v();m();y();g();var qV=yt(),t6=ou(),FV=Et().Buffer,zV=[1518500249,1859775393,-1894007588,-899497514],HV=new Array(80);function kh(){this.init(),this._w=HV,t6.call(this,64,56);}qV(kh,t6);kh.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function jV(t){return t<<5|t>>>27}function $V(t){return t<<30|t>>>2}function VV(t,e,r,n){return t===0?e&r|~e&n:t===2?e&r|e&n|r&n:e^r^n}kh.prototype._update=function(t){for(var e=this._w,r=this._a|0,n=this._b|0,i=this._c|0,o=this._d|0,a=this._e|0,s=0;s<16;++s)e[s]=t.readInt32BE(s*4);for(;s<80;++s)e[s]=e[s-3]^e[s-8]^e[s-14]^e[s-16];for(var c=0;c<80;++c){var u=~~(c/20),l=jV(r)+VV(u,n,i,o)+a+e[c]+zV[u]|0;a=o,o=i,i=$V(n),n=r,r=l;}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=o+this._d|0,this._e=a+this._e|0;};kh.prototype._hash=function(){var t=FV.allocUnsafe(20);return t.writeInt32BE(this._a|0,0),t.writeInt32BE(this._b|0,4),t.writeInt32BE(this._c|0,8),t.writeInt32BE(this._d|0,12),t.writeInt32BE(this._e|0,16),t};r6.exports=kh;});var a6=ne((u1e,o6)=>{v();m();y();g();var GV=yt(),i6=ou(),KV=Et().Buffer,WV=[1518500249,1859775393,-1894007588,-899497514],YV=new Array(80);function Ph(){this.init(),this._w=YV,i6.call(this,64,56);}GV(Ph,i6);Ph.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function ZV(t){return t<<1|t>>>31}function JV(t){return t<<5|t>>>27}function XV(t){return t<<30|t>>>2}function QV(t,e,r,n){return t===0?e&r|~e&n:t===2?e&r|e&n|r&n:e^r^n}Ph.prototype._update=function(t){for(var e=this._w,r=this._a|0,n=this._b|0,i=this._c|0,o=this._d|0,a=this._e|0,s=0;s<16;++s)e[s]=t.readInt32BE(s*4);for(;s<80;++s)e[s]=ZV(e[s-3]^e[s-8]^e[s-14]^e[s-16]);for(var c=0;c<80;++c){var u=~~(c/20),l=JV(r)+QV(u,n,i,o)+a+e[c]+WV[u]|0;a=o,o=i,i=XV(n),n=r,r=l;}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=o+this._d|0,this._e=a+this._e|0;};Ph.prototype._hash=function(){var t=KV.allocUnsafe(20);return t.writeInt32BE(this._a|0,0),t.writeInt32BE(this._b|0,4),t.writeInt32BE(this._c|0,8),t.writeInt32BE(this._d|0,12),t.writeInt32BE(this._e|0,16),t};o6.exports=Ph;});var BE=ne((p1e,c6)=>{v();m();y();g();var eG=yt(),s6=ou(),tG=Et().Buffer,rG=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],nG=new Array(64);function Bh(){this.init(),this._w=nG,s6.call(this,64,56);}eG(Bh,s6);Bh.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this};function iG(t,e,r){return r^t&(e^r)}function oG(t,e,r){return t&e|r&(t|e)}function aG(t){return (t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)}function sG(t){return (t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)}function cG(t){return (t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3}function uG(t){return (t>>>17|t<<15)^(t>>>19|t<<13)^t>>>10}Bh.prototype._update=function(t){for(var e=this._w,r=this._a|0,n=this._b|0,i=this._c|0,o=this._d|0,a=this._e|0,s=this._f|0,c=this._g|0,u=this._h|0,l=0;l<16;++l)e[l]=t.readInt32BE(l*4);for(;l<64;++l)e[l]=uG(e[l-2])+e[l-7]+cG(e[l-15])+e[l-16]|0;for(var w=0;w<64;++w){var T=u+sG(a)+iG(a,s,c)+rG[w]+e[w]|0,x=aG(r)+oG(r,n,i)|0;u=c,c=s,s=a,a=o+T|0,o=i,i=n,n=r,r=T+x|0;}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=o+this._d|0,this._e=a+this._e|0,this._f=s+this._f|0,this._g=c+this._g|0,this._h=u+this._h|0;};Bh.prototype._hash=function(){var t=tG.allocUnsafe(32);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t.writeInt32BE(this._h,28),t};c6.exports=Bh;});var l6=ne((b1e,u6)=>{v();m();y();g();var lG=yt(),fG=BE(),dG=ou(),hG=Et().Buffer,pG=new Array(64);function qy(){this.init(),this._w=pG,dG.call(this,64,56);}lG(qy,fG);qy.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this};qy.prototype._hash=function(){var t=hG.allocUnsafe(28);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t};u6.exports=qy;});var UE=ne((C1e,g6)=>{v();m();y();g();var mG=yt(),y6=ou(),yG=Et().Buffer,f6=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],gG=new Array(160);function Uh(){this.init(),this._w=gG,y6.call(this,128,112);}mG(Uh,y6);Uh.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this};function d6(t,e,r){return r^t&(e^r)}function h6(t,e,r){return t&e|r&(t|e)}function p6(t,e){return (t>>>28|e<<4)^(e>>>2|t<<30)^(e>>>7|t<<25)}function m6(t,e){return (t>>>14|e<<18)^(t>>>18|e<<14)^(e>>>9|t<<23)}function vG(t,e){return (t>>>1|e<<31)^(t>>>8|e<<24)^t>>>7}function bG(t,e){return (t>>>1|e<<31)^(t>>>8|e<<24)^(t>>>7|e<<25)}function wG(t,e){return (t>>>19|e<<13)^(e>>>29|t<<3)^t>>>6}function EG(t,e){return (t>>>19|e<<13)^(e>>>29|t<<3)^(t>>>6|e<<26)}function sn(t,e){return t>>>0<e>>>0?1:0}Uh.prototype._update=function(t){for(var e=this._w,r=this._ah|0,n=this._bh|0,i=this._ch|0,o=this._dh|0,a=this._eh|0,s=this._fh|0,c=this._gh|0,u=this._hh|0,l=this._al|0,w=this._bl|0,T=this._cl|0,x=this._dl|0,I=this._el|0,k=this._fl|0,q=this._gl|0,j=this._hl|0,K=0;K<32;K+=2)e[K]=t.readInt32BE(K*4),e[K+1]=t.readInt32BE(K*4+4);for(;K<160;K+=2){var Z=e[K-30],se=e[K-15*2+1],ce=vG(Z,se),Te=bG(se,Z);Z=e[K-2*2],se=e[K-2*2+1];var pe=wG(Z,se),le=EG(se,Z),Y=e[K-7*2],S=e[K-7*2+1],d=e[K-16*2],C=e[K-16*2+1],A=Te+S|0,f=ce+Y+sn(A,Te)|0;A=A+le|0,f=f+pe+sn(A,le)|0,A=A+C|0,f=f+d+sn(A,C)|0,e[K]=f,e[K+1]=A;}for(var _=0;_<160;_+=2){f=e[_],A=e[_+1];var M=h6(r,n,i),R=h6(l,w,T),h=p6(r,l),b=p6(l,r),B=m6(a,I),z=m6(I,a),P=f6[_],V=f6[_+1],fe=d6(a,s,c),ye=d6(I,k,q),Ce=j+z|0,ae=u+B+sn(Ce,j)|0;Ce=Ce+ye|0,ae=ae+fe+sn(Ce,ye)|0,Ce=Ce+V|0,ae=ae+P+sn(Ce,V)|0,Ce=Ce+A|0,ae=ae+f+sn(Ce,A)|0;var ie=b+R|0,he=h+M+sn(ie,b)|0;u=c,j=q,c=s,q=k,s=a,k=I,I=x+Ce|0,a=o+ae+sn(I,x)|0,o=i,x=T,i=n,T=w,n=r,w=l,l=Ce+ie|0,r=ae+he+sn(l,Ce)|0;}this._al=this._al+l|0,this._bl=this._bl+w|0,this._cl=this._cl+T|0,this._dl=this._dl+x|0,this._el=this._el+I|0,this._fl=this._fl+k|0,this._gl=this._gl+q|0,this._hl=this._hl+j|0,this._ah=this._ah+r+sn(this._al,l)|0,this._bh=this._bh+n+sn(this._bl,w)|0,this._ch=this._ch+i+sn(this._cl,T)|0,this._dh=this._dh+o+sn(this._dl,x)|0,this._eh=this._eh+a+sn(this._el,I)|0,this._fh=this._fh+s+sn(this._fl,k)|0,this._gh=this._gh+c+sn(this._gl,q)|0,this._hh=this._hh+u+sn(this._hl,j)|0;};Uh.prototype._hash=function(){var t=yG.allocUnsafe(64);function e(r,n,i){t.writeInt32BE(r,i),t.writeInt32BE(n,i+4);}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),e(this._gh,this._gl,48),e(this._hh,this._hl,56),t};g6.exports=Uh;});var b6=ne((I1e,v6)=>{v();m();y();g();var _G=yt(),SG=UE(),CG=ou(),AG=Et().Buffer,TG=new Array(160);function Fy(){this.init(),this._w=TG,CG.call(this,128,112);}_G(Fy,SG);Fy.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this};Fy.prototype._hash=function(){var t=AG.allocUnsafe(48);function e(r,n,i){t.writeInt32BE(r,i),t.writeInt32BE(n,i+4);}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),t};v6.exports=Fy;});var zy=ne((Ga,w6)=>{v();m();y();g();var Ga=w6.exports=function(e){e=e.toLowerCase();var r=Ga[e];if(!r)throw new Error(e+" is not supported (we accept pull requests)");return new r};Ga.sha=n6();Ga.sha1=a6();Ga.sha224=l6();Ga.sha256=BE();Ga.sha384=b6();Ga.sha512=UE();});function S6(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return r===-1&&(r=e),[r,r===e?0:4-r%4]}function RG(t,e,r){for(var n,i,o=[],a=e;a<r;a+=3)n=(t[a]<<16&16711680)+(t[a+1]<<8&65280)+(255&t[a+2]),o.push(vo[(i=n)>>18&63]+vo[i>>12&63]+vo[i>>6&63]+vo[63&i]);return o.join("")}function Ka(t){if(t>2147483647)throw new RangeError('The value "'+t+'" is invalid for option "size"');var e=new Uint8Array(t);return Object.setPrototypeOf(e,Ne.prototype),e}function Ne(t,e,r){if(typeof t=="number"){if(typeof e=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return FE(t)}return k6(t,e,r)}function k6(t,e,r){if(typeof t=="string")return function(o,a){if(typeof a=="string"&&a!==""||(a="utf8"),!Ne.isEncoding(a))throw new TypeError("Unknown encoding: "+a);var s=0|B6(o,a),c=Ka(s),u=c.write(o,a);return u!==s&&(c=c.slice(0,u)),c}(t,e);if(ArrayBuffer.isView(t))return DE(t);if(t==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(Wa(t,ArrayBuffer)||t&&Wa(t.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(Wa(t,SharedArrayBuffer)||t&&Wa(t.buffer,SharedArrayBuffer)))return A6(t,e,r);if(typeof t=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var n=t.valueOf&&t.valueOf();if(n!=null&&n!==t)return Ne.from(n,e,r);var i=function(o){if(Ne.isBuffer(o)){var a=0|jE(o.length),s=Ka(a);return s.length===0||o.copy(s,0,0,a),s}if(o.length!==void 0)return typeof o.length!="number"||$E(o.length)?Ka(0):DE(o);if(o.type==="Buffer"&&Array.isArray(o.data))return DE(o.data)}(t);if(i)return i;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof t[Symbol.toPrimitive]=="function")return Ne.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function P6(t){if(typeof t!="number")throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function FE(t){return P6(t),Ka(t<0?0:0|jE(t))}function DE(t){for(var e=t.length<0?0:0|jE(t.length),r=Ka(e),n=0;n<e;n+=1)r[n]=255&t[n];return r}function A6(t,e,r){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw new RangeError('"length" is outside of buffer bounds');var n;return n=e===void 0&&r===void 0?new Uint8Array(t):r===void 0?new Uint8Array(t,e):new Uint8Array(t,e,r),Object.setPrototypeOf(n,Ne.prototype),n}function jE(t){if(t>=2147483647)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|t}function B6(t,e){if(Ne.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||Wa(t,ArrayBuffer))return t.byteLength;if(typeof t!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);var r=t.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&r===0)return 0;for(var i=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return zE(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return q6(t).length;default:if(i)return n?-1:zE(t).length;e=(""+e).toLowerCase(),i=!0;}}function IG(t,e,r){var n=!1;if((e===void 0||e<0)&&(e=0),e>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0)<=(e>>>=0))return "";for(t||(t="utf8");;)switch(t){case"hex":return LG(this,e,r);case"utf8":case"utf-8":return D6(this,e,r);case"ascii":return UG(this,e,r);case"latin1":case"binary":return DG(this,e,r);case"base64":return BG(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return qG(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0;}}function su(t,e,r){var n=t[e];t[e]=t[r],t[r]=n;}function T6(t,e,r,n,i){if(t.length===0)return -1;if(typeof r=="string"?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),$E(r=+r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return -1;r=t.length-1;}else if(r<0){if(!i)return -1;r=0;}if(typeof e=="string"&&(e=Ne.from(e,n)),Ne.isBuffer(e))return e.length===0?-1:R6(t,e,r,n,i);if(typeof e=="number")return e&=255,typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):R6(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function R6(t,e,r,n,i){var o,a=1,s=t.length,c=e.length;if(n!==void 0&&((n=String(n).toLowerCase())==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(t.length<2||e.length<2)return -1;a=2,s/=2,c/=2,r/=2;}function u(x,I){return a===1?x[I]:x.readUInt16BE(I*a)}if(i){var l=-1;for(o=r;o<s;o++)if(u(t,o)===u(e,l===-1?0:o-l)){if(l===-1&&(l=o),o-l+1===c)return l*a}else l!==-1&&(o-=o-l),l=-1;}else for(r+c>s&&(r=s-c),o=r;o>=0;o--){for(var w=!0,T=0;T<c;T++)if(u(t,o+T)!==u(e,T)){w=!1;break}if(w)return o}return -1}function MG(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o=e.length;n>o/2&&(n=o/2);for(var a=0;a<n;++a){var s=parseInt(e.substr(2*a,2),16);if($E(s))return a;t[r+a]=s;}return a}function OG(t,e,r,n){return Vy(zE(e,t.length-r),t,r,n)}function U6(t,e,r,n){return Vy(function(i){for(var o=[],a=0;a<i.length;++a)o.push(255&i.charCodeAt(a));return o}(e),t,r,n)}function NG(t,e,r,n){return U6(t,e,r,n)}function kG(t,e,r,n){return Vy(q6(e),t,r,n)}function PG(t,e,r,n){return Vy(function(i,o){for(var a,s,c,u=[],l=0;l<i.length&&!((o-=2)<0);++l)a=i.charCodeAt(l),s=a>>8,c=a%256,u.push(c),u.push(s);return u}(e,t.length-r),t,r,n)}function BG(t,e,r){return e===0&&r===t.length?qE.fromByteArray(t):qE.fromByteArray(t.slice(e,r))}function D6(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var o,a,s,c,u=t[i],l=null,w=u>239?4:u>223?3:u>191?2:1;if(i+w<=r)switch(w){case 1:u<128&&(l=u);break;case 2:(192&(o=t[i+1]))==128&&(c=(31&u)<<6|63&o)>127&&(l=c);break;case 3:o=t[i+1],a=t[i+2],(192&o)==128&&(192&a)==128&&(c=(15&u)<<12|(63&o)<<6|63&a)>2047&&(c<55296||c>57343)&&(l=c);break;case 4:o=t[i+1],a=t[i+2],s=t[i+3],(192&o)==128&&(192&a)==128&&(192&s)==128&&(c=(15&u)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&c<1114112&&(l=c);}l===null?(l=65533,w=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),i+=w;}return function(T){var x=T.length;if(x<=4096)return String.fromCharCode.apply(String,T);for(var I="",k=0;k<x;)I+=String.fromCharCode.apply(String,T.slice(k,k+=4096));return I}(n)}function UG(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}function DG(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function LG(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=e;o<r;++o)i+=zG[t[o]];return i}function qG(t,e,r){for(var n=t.slice(e,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function cn(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function Jn(t,e,r,n,i,o){if(!Ne.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function L6(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function x6(t,e,r,n,i){return e=+e,r>>>=0,i||L6(t,0,r,4),pf.write(t,e,r,n,23,4),r+4}function I6(t,e,r,n,i){return e=+e,r>>>=0,i||L6(t,0,r,8),pf.write(t,e,r,n,52,8),r+8}function zE(t,e){var r;e=e||1/0;for(var n=t.length,i=null,o=[],a=0;a<n;++a){if((r=t.charCodeAt(a))>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320);}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r);}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128);}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128);}else {if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128);}}return o}function q6(t){return qE.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(FG,"")).length<2)return "";for(;e.length%4!=0;)e+="=";return e}(t))}function Vy(t,e,r,n){for(var i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function Wa(t,e){return t instanceof e||t!=null&&t.constructor!=null&&t.constructor.name!=null&&t.constructor.name===e.name}function $E(t){return t!=t}function M6(t,e){for(var r in t)e[r]=t[r];}function cu(t,e,r){return ra(t,e,r)}function Dh(t){var e;switch(this.encoding=function(r){var n=function(i){if(!i)return "utf8";for(var o;;)switch(i){case"utf8":case"utf-8":return "utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return "utf16le";case"latin1":case"binary":return "latin1";case"base64":case"ascii":case"hex":return i;default:if(o)return;i=(""+i).toLowerCase(),o=!0;}}(r);if(typeof n!="string"&&(HE.isEncoding===O6||!O6(r)))throw new Error("Unknown encoding: "+r);return n||r}(t),this.encoding){case"utf16le":this.text=$G,this.end=VG,e=4;break;case"utf8":this.fillLast=jG,e=4;break;case"base64":this.text=GG,this.end=KG,e=3;break;default:return this.write=WG,this.end=YG,void 0}this.lastNeed=0,this.lastTotal=0,this.lastChar=HE.allocUnsafe(e);}function LE(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function jG(t){var e=this.lastTotal-this.lastNeed,r=function(n,i,o){if((192&i[0])!=128)return n.lastNeed=0,"\uFFFD";if(n.lastNeed>1&&i.length>1){if((192&i[1])!=128)return n.lastNeed=1,"\uFFFD";if(n.lastNeed>2&&i.length>2&&(192&i[2])!=128)return n.lastNeed=2,"\uFFFD"}}(this,t);return r!==void 0?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),this.lastNeed-=t.length,void 0)}function $G(t,e){if((t.length-e)%2==0){var r=t.toString("utf16le",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function VG(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function GG(t,e){var r=(t.length-e)%3;return r===0?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function KG(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function WG(t){return t.toString(this.encoding)}function YG(t){return t&&t.length?this.write(t):""}var N6,vo,pi,E6,Hy,au,_6,xG,Ya,qE,pf,C6,FG,zG,jy,$y,ra,HG,na,HE,O6,mf=Ur(()=>{v();m();y();g();for(N6={byteLength:function(t){var e=S6(t),r=e[0],n=e[1];return 3*(r+n)/4-n},toByteArray:function(t){var e,r,n=S6(t),i=n[0],o=n[1],a=new E6(function(u,l,w){return 3*(l+w)/4-w}(0,i,o)),s=0,c=o>0?i-4:i;for(r=0;r<c;r+=4)e=pi[t.charCodeAt(r)]<<18|pi[t.charCodeAt(r+1)]<<12|pi[t.charCodeAt(r+2)]<<6|pi[t.charCodeAt(r+3)],a[s++]=e>>16&255,a[s++]=e>>8&255,a[s++]=255&e;return o===2&&(e=pi[t.charCodeAt(r)]<<2|pi[t.charCodeAt(r+1)]>>4,a[s++]=255&e),o===1&&(e=pi[t.charCodeAt(r)]<<10|pi[t.charCodeAt(r+1)]<<4|pi[t.charCodeAt(r+2)]>>2,a[s++]=e>>8&255,a[s++]=255&e),a},fromByteArray:function(t){for(var e,r=t.length,n=r%3,i=[],o=0,a=r-n;o<a;o+=16383)i.push(RG(t,o,o+16383>a?a:o+16383));return n===1?(e=t[r-1],i.push(vo[e>>2]+vo[e<<4&63]+"==")):n===2&&(e=(t[r-2]<<8)+t[r-1],i.push(vo[e>>10]+vo[e>>4&63]+vo[e<<2&63]+"=")),i.join("")}},vo=[],pi=[],E6=typeof Uint8Array!="undefined"?Uint8Array:Array,Hy="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",au=0,_6=Hy.length;au<_6;++au)vo[au]=Hy[au],pi[Hy.charCodeAt(au)]=au;pi[45]=62,pi[95]=63;xG={read:function(t,e,r,n,i){var o,a,s=8*i-n-1,c=(1<<s)-1,u=c>>1,l=-7,w=r?i-1:0,T=r?-1:1,x=t[e+w];for(w+=T,o=x&(1<<-l)-1,x>>=-l,l+=s;l>0;o=256*o+t[e+w],w+=T,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=n;l>0;a=256*a+t[e+w],w+=T,l-=8);if(o===0)o=1-u;else {if(o===c)return a?NaN:1/0*(x?-1:1);a+=Math.pow(2,n),o-=u;}return (x?-1:1)*a*Math.pow(2,o-n)},write:function(t,e,r,n,i,o){var a,s,c,u=8*o-i-1,l=(1<<u)-1,w=l>>1,T=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,x=n?0:o-1,I=n?1:-1,k=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=l):(a=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-a))<1&&(a--,c*=2),(e+=a+w>=1?T/c:T*Math.pow(2,1-w))*c>=2&&(a++,c/=2),a+w>=l?(s=0,a=l):a+w>=1?(s=(e*c-1)*Math.pow(2,i),a+=w):(s=e*Math.pow(2,w-1)*Math.pow(2,i),a=0));i>=8;t[r+x]=255&s,x+=I,s/=256,i-=8);for(a=a<<i|s,u+=i;u>0;t[r+x]=255&a,x+=I,a/=256,u-=8);t[r+x-I]|=128*k;}},Ya={},qE=N6,pf=xG,C6=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Ya.Buffer=Ne,Ya.SlowBuffer=function(t){return +t!=t&&(t=0),Ne.alloc(+t)},Ya.INSPECT_MAX_BYTES=50;Ya.kMaxLength=2147483647,Ne.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),t.foo()===42}catch(r){return !1}}(),Ne.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(Ne.prototype,"parent",{enumerable:!0,get:function(){if(Ne.isBuffer(this))return this.buffer}}),Object.defineProperty(Ne.prototype,"offset",{enumerable:!0,get:function(){if(Ne.isBuffer(this))return this.byteOffset}}),Ne.poolSize=8192,Ne.from=function(t,e,r){return k6(t,e,r)},Object.setPrototypeOf(Ne.prototype,Uint8Array.prototype),Object.setPrototypeOf(Ne,Uint8Array),Ne.alloc=function(t,e,r){return function(n,i,o){return P6(n),n<=0?Ka(n):i!==void 0?typeof o=="string"?Ka(n).fill(i,o):Ka(n).fill(i):Ka(n)}(t,e,r)},Ne.allocUnsafe=function(t){return FE(t)},Ne.allocUnsafeSlow=function(t){return FE(t)},Ne.isBuffer=function(t){return t!=null&&t._isBuffer===!0&&t!==Ne.prototype},Ne.compare=function(t,e){if(Wa(t,Uint8Array)&&(t=Ne.from(t,t.offset,t.byteLength)),Wa(e,Uint8Array)&&(e=Ne.from(e,e.offset,e.byteLength)),!Ne.isBuffer(t)||!Ne.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;for(var r=t.length,n=e.length,i=0,o=Math.min(r,n);i<o;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0},Ne.isEncoding=function(t){switch(String(t).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}},Ne.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(t.length===0)return Ne.alloc(0);var r;if(e===void 0)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=Ne.allocUnsafe(e),i=0;for(r=0;r<t.length;++r){var o=t[r];if(Wa(o,Uint8Array)&&(o=Ne.from(o)),!Ne.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(n,i),i+=o.length;}return n},Ne.byteLength=B6,Ne.prototype._isBuffer=!0,Ne.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)su(this,e,e+1);return this},Ne.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)su(this,e,e+3),su(this,e+1,e+2);return this},Ne.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)su(this,e,e+7),su(this,e+1,e+6),su(this,e+2,e+5),su(this,e+3,e+4);return this},Ne.prototype.toString=function(){var t=this.length;return t===0?"":arguments.length===0?D6(this,0,t):IG.apply(this,arguments)},Ne.prototype.toLocaleString=Ne.prototype.toString,Ne.prototype.equals=function(t){if(!Ne.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||Ne.compare(this,t)===0},Ne.prototype.inspect=function(){var t="",e=Ya.INSPECT_MAX_BYTES;return t=this.toString("hex",0,e).replace(/(.{2})/g,"$1 ").trim(),this.length>e&&(t+=" ... "),"<Buffer "+t+">"},C6&&(Ne.prototype[C6]=Ne.prototype.inspect),Ne.prototype.compare=function(t,e,r,n,i){if(Wa(t,Uint8Array)&&(t=Ne.from(t,t.offset,t.byteLength)),!Ne.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(e===void 0&&(e=0),r===void 0&&(r=t?t.length:0),n===void 0&&(n=0),i===void 0&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return -1;if(e>=r)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(e>>>=0),s=Math.min(o,a),c=this.slice(n,i),u=t.slice(e,r),l=0;l<s;++l)if(c[l]!==u[l]){o=c[l],a=u[l];break}return o<a?-1:a<o?1:0},Ne.prototype.includes=function(t,e,r){return this.indexOf(t,e,r)!==-1},Ne.prototype.indexOf=function(t,e,r){return T6(this,t,e,r,!0)},Ne.prototype.lastIndexOf=function(t,e,r){return T6(this,t,e,r,!1)},Ne.prototype.write=function(t,e,r,n){if(e===void 0)n="utf8",r=this.length,e=0;else if(r===void 0&&typeof e=="string")n=e,r=this.length,e=0;else {if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=0,isFinite(r)?(r>>>=0,n===void 0&&(n="utf8")):(n=r,r=void 0);}var i=this.length-e;if((r===void 0||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return MG(this,t,e,r);case"utf8":case"utf-8":return OG(this,t,e,r);case"ascii":return U6(this,t,e,r);case"latin1":case"binary":return NG(this,t,e,r);case"base64":return kG(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return PG(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0;}},Ne.prototype.toJSON=function(){return {type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};Ne.prototype.slice=function(t,e){var r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=e===void 0?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t);var n=this.subarray(t,e);return Object.setPrototypeOf(n,Ne.prototype),n},Ne.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||cn(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n},Ne.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||cn(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},Ne.prototype.readUInt8=function(t,e){return t>>>=0,e||cn(t,1,this.length),this[t]},Ne.prototype.readUInt16LE=function(t,e){return t>>>=0,e||cn(t,2,this.length),this[t]|this[t+1]<<8},Ne.prototype.readUInt16BE=function(t,e){return t>>>=0,e||cn(t,2,this.length),this[t]<<8|this[t+1]},Ne.prototype.readUInt32LE=function(t,e){return t>>>=0,e||cn(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},Ne.prototype.readUInt32BE=function(t,e){return t>>>=0,e||cn(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},Ne.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||cn(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*e)),n},Ne.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||cn(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},Ne.prototype.readInt8=function(t,e){return t>>>=0,e||cn(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},Ne.prototype.readInt16LE=function(t,e){t>>>=0,e||cn(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},Ne.prototype.readInt16BE=function(t,e){t>>>=0,e||cn(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},Ne.prototype.readInt32LE=function(t,e){return t>>>=0,e||cn(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},Ne.prototype.readInt32BE=function(t,e){return t>>>=0,e||cn(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},Ne.prototype.readFloatLE=function(t,e){return t>>>=0,e||cn(t,4,this.length),pf.read(this,t,!0,23,4)},Ne.prototype.readFloatBE=function(t,e){return t>>>=0,e||cn(t,4,this.length),pf.read(this,t,!1,23,4)},Ne.prototype.readDoubleLE=function(t,e){return t>>>=0,e||cn(t,8,this.length),pf.read(this,t,!0,52,8)},Ne.prototype.readDoubleBE=function(t,e){return t>>>=0,e||cn(t,8,this.length),pf.read(this,t,!1,52,8)},Ne.prototype.writeUIntLE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||Jn(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[e]=255&t;++o<r&&(i*=256);)this[e+o]=t/i&255;return e+r},Ne.prototype.writeUIntBE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||Jn(this,t,e,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},Ne.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||Jn(this,t,e,1,255,0),this[e]=255&t,e+1},Ne.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||Jn(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},Ne.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||Jn(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},Ne.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||Jn(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},Ne.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||Jn(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},Ne.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);Jn(this,t,e,r,i-1,-i);}var o=0,a=1,s=0;for(this[e]=255&t;++o<r&&(a*=256);)t<0&&s===0&&this[e+o-1]!==0&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+r},Ne.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);Jn(this,t,e,r,i-1,-i);}var o=r-1,a=1,s=0;for(this[e+o]=255&t;--o>=0&&(a*=256);)t<0&&s===0&&this[e+o+1]!==0&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+r},Ne.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||Jn(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},Ne.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||Jn(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},Ne.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||Jn(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},Ne.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||Jn(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},Ne.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||Jn(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},Ne.prototype.writeFloatLE=function(t,e,r){return x6(this,t,e,!0,r)},Ne.prototype.writeFloatBE=function(t,e,r){return x6(this,t,e,!1,r)},Ne.prototype.writeDoubleLE=function(t,e,r){return I6(this,t,e,!0,r)},Ne.prototype.writeDoubleBE=function(t,e,r){return I6(this,t,e,!1,r)},Ne.prototype.copy=function(t,e,r,n){if(!Ne.isBuffer(t))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||n===0||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r||t.length===0||this.length===0)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var i=n-r;if(this===t&&typeof Uint8Array.prototype.copyWithin=="function")this.copyWithin(e,r,n);else if(this===t&&r<e&&e<n)for(var o=i-1;o>=0;--o)t[o+e]=this[o+r];else Uint8Array.prototype.set.call(t,this.subarray(r,n),e);return i},Ne.prototype.fill=function(t,e,r,n){if(typeof t=="string"){if(typeof e=="string"?(n=e,e=0,r=this.length):typeof r=="string"&&(n=r,r=this.length),n!==void 0&&typeof n!="string")throw new TypeError("encoding must be a string");if(typeof n=="string"&&!Ne.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(t.length===1){var i=t.charCodeAt(0);(n==="utf8"&&i<128||n==="latin1")&&(t=i);}}else typeof t=="number"?t&=255:typeof t=="boolean"&&(t=Number(t));if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;var o;if(e>>>=0,r=r===void 0?this.length:r>>>0,t||(t=0),typeof t=="number")for(o=e;o<r;++o)this[o]=t;else {var a=Ne.isBuffer(t)?t:Ne.from(t,n),s=a.length;if(s===0)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(o=0;o<r-e;++o)this[o+e]=a[o%s];}return this};FG=/[^+/0-9A-Za-z-_]/g;zG=function(){for(var t=new Array(256),e=0;e<16;++e)for(var r=16*e,n=0;n<16;++n)t[r+n]="0123456789abcdef"[e]+"0123456789abcdef"[n];return t}();Ya.Buffer;Ya.INSPECT_MAX_BYTES;Ya.kMaxLength;jy={},$y=Ya,ra=$y.Buffer;ra.from&&ra.alloc&&ra.allocUnsafe&&ra.allocUnsafeSlow?jy=$y:(M6($y,jy),jy.Buffer=cu),cu.prototype=Object.create(ra.prototype),M6(ra,cu),cu.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return ra(t,e,r)},cu.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var n=ra(t);return e!==void 0?typeof r=="string"?n.fill(e,r):n.fill(e):n.fill(0),n},cu.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return ra(t)},cu.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return $y.SlowBuffer(t)};HG=jy,na={},HE=HG.Buffer,O6=HE.isEncoding||function(t){switch((t=""+t)&&t.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}};na.StringDecoder=Dh,Dh.prototype.write=function(t){if(t.length===0)return "";var e,r;if(this.lastNeed){if((e=this.fillLast(t))===void 0)return "";r=this.lastNeed,this.lastNeed=0;}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""},Dh.prototype.end=function(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"\uFFFD":e},Dh.prototype.text=function(t,e){var r=function(i,o,a){var s=o.length-1;if(s<a)return 0;var c=LE(o[s]);return c>=0?(c>0&&(i.lastNeed=c-1),c):--s<a||c===-2?0:(c=LE(o[s]))>=0?(c>0&&(i.lastNeed=c-2),c):--s<a||c===-2?0:(c=LE(o[s]))>=0?(c>0&&(c===2?c=0:i.lastNeed=c-3),c):0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)},Dh.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length;};na.StringDecoder;na.StringDecoder;});var F6={};Cr(F6,{StringDecoder:()=>ZG,default:()=>na});var ZG,z6=Ur(()=>{v();m();y();g();mf();mf();ZG=na.StringDecoder;});var Za=ne((Y1e,$6)=>{v();m();y();g();var H6=Et().Buffer,j6=Ah().Transform,JG=(z6(),Dr(F6)).StringDecoder,XG=yt();function bo(t){j6.call(this),this.hashMode=typeof t=="string",this.hashMode?this[t]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null;}XG(bo,j6);bo.prototype.update=function(t,e,r){typeof t=="string"&&(t=H6.from(t,e));var n=this._update(t);return this.hashMode?this:(r&&(n=this._toString(n,r)),n)};bo.prototype.setAutoPadding=function(){};bo.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")};bo.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")};bo.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")};bo.prototype._transform=function(t,e,r){var n;try{this.hashMode?this._update(t):this.push(this._update(t));}catch(i){n=i;}finally{r(n);}};bo.prototype._flush=function(t){var e;try{this.push(this.__final());}catch(r){e=r;}t(e);};bo.prototype._finalOrDigest=function(t){var e=this.__final()||H6.alloc(0);return t&&(e=this._toString(e,t,!0)),e};bo.prototype._toString=function(t,e,r){if(this._decoder||(this._decoder=new JG(e),this._encoding=e),this._encoding!==e)throw new Error("can't switch encodings");var n=this._decoder.write(t);return r&&(n+=this._decoder.end()),n};$6.exports=bo;});var yf=ne((ewe,G6)=>{v();m();y();g();var QG=yt(),eK=By(),tK=Dy(),rK=zy(),V6=Za();function Gy(t){V6.call(this,"digest"),this._hash=t;}QG(Gy,V6);Gy.prototype._update=function(t){this._hash.update(t);};Gy.prototype._final=function(){return this._hash.digest()};G6.exports=function(e){return e=e.toLowerCase(),e==="md5"?new eK:e==="rmd160"||e==="ripemd160"?new tK:new Gy(rK(e))};});var Y6=ne((owe,W6)=>{v();m();y();g();var nK=yt(),uu=Et().Buffer,K6=Za(),iK=uu.alloc(128),gf=64;function Ky(t,e){K6.call(this,"digest"),typeof e=="string"&&(e=uu.from(e)),this._alg=t,this._key=e,e.length>gf?e=t(e):e.length<gf&&(e=uu.concat([e,iK],gf));for(var r=this._ipad=uu.allocUnsafe(gf),n=this._opad=uu.allocUnsafe(gf),i=0;i<gf;i++)r[i]=e[i]^54,n[i]=e[i]^92;this._hash=[r];}nK(Ky,K6);Ky.prototype._update=function(t){this._hash.push(t);};Ky.prototype._final=function(){var t=this._alg(uu.concat(this._hash));return this._alg(uu.concat([this._opad,t]))};W6.exports=Ky;});var VE=ne((lwe,Z6)=>{v();m();y();g();var oK=By();Z6.exports=function(t){return new oK().update(t).digest()};});var WE=ne((mwe,X6)=>{v();m();y();g();var aK=yt(),sK=Y6(),J6=Za(),Lh=Et().Buffer,cK=VE(),GE=Dy(),KE=zy(),uK=Lh.alloc(128);function qh(t,e){J6.call(this,"digest"),typeof e=="string"&&(e=Lh.from(e));var r=t==="sha512"||t==="sha384"?128:64;if(this._alg=t,this._key=e,e.length>r){var n=t==="rmd160"?new GE:KE(t);e=n.update(e).digest();}else e.length<r&&(e=Lh.concat([e,uK],r));for(var i=this._ipad=Lh.allocUnsafe(r),o=this._opad=Lh.allocUnsafe(r),a=0;a<r;a++)i[a]=e[a]^54,o[a]=e[a]^92;this._hash=t==="rmd160"?new GE:KE(t),this._hash.update(i);}aK(qh,J6);qh.prototype._update=function(t){this._hash.update(t);};qh.prototype._final=function(){var t=this._hash.digest(),e=this._alg==="rmd160"?new GE:KE(this._alg);return e.update(this._opad).update(t).digest()};X6.exports=function(e,r){return e=e.toLowerCase(),e==="rmd160"||e==="ripemd160"?new qh("rmd160",r):e==="md5"?new sK(cK,r):new qh(e,r)};});var YE=ne((wwe,lK)=>{lK.exports={sha224WithRSAEncryption:{sign:"rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},"RSA-SHA224":{sign:"ecdsa/rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},sha256WithRSAEncryption:{sign:"rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},"RSA-SHA256":{sign:"ecdsa/rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},sha384WithRSAEncryption:{sign:"rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},"RSA-SHA384":{sign:"ecdsa/rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},sha512WithRSAEncryption:{sign:"rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA512":{sign:"ecdsa/rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA1":{sign:"rsa",hash:"sha1",id:"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{sign:"ecdsa",hash:"sha1",id:""},sha256:{sign:"ecdsa",hash:"sha256",id:""},sha224:{sign:"ecdsa",hash:"sha224",id:""},sha384:{sign:"ecdsa",hash:"sha384",id:""},sha512:{sign:"ecdsa",hash:"sha512",id:""},"DSA-SHA":{sign:"dsa",hash:"sha1",id:""},"DSA-SHA1":{sign:"dsa",hash:"sha1",id:""},DSA:{sign:"dsa",hash:"sha1",id:""},"DSA-WITH-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-WITH-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-WITH-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-WITH-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-RIPEMD160":{sign:"dsa",hash:"rmd160",id:""},ripemd160WithRSA:{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},"RSA-RIPEMD160":{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},md5WithRSAEncryption:{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"},"RSA-MD5":{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"}};});var e3=ne((Ewe,Q6)=>{v();m();y();g();Q6.exports=YE();});var ZE=ne((Twe,t3)=>{v();m();y();g();var fK=Math.pow(2,30)-1;t3.exports=function(t,e){if(typeof t!="number")throw new TypeError("Iterations not a number");if(t<0)throw new TypeError("Bad iterations");if(typeof e!="number")throw new TypeError("Key length not a number");if(e<0||e>fK||e!==e)throw new TypeError("Bad key length")};});var JE=ne((Owe,n3)=>{v();m();y();g();var Wy;N.browser?Wy="utf-8":N.version?(r3=parseInt(N.version.split(".")[0].slice(1),10),Wy=r3>=6?"utf-8":"binary"):Wy="utf-8";var r3;n3.exports=Wy;});var QE=ne((Uwe,i3)=>{v();m();y();g();var XE=Et().Buffer;i3.exports=function(t,e,r){if(XE.isBuffer(t))return t;if(typeof t=="string")return XE.from(t,e);if(ArrayBuffer.isView(t))return XE.from(t.buffer);throw new TypeError(r+" must be a string, a Buffer, a typed array or a DataView")};});var e_=ne((zwe,c3)=>{v();m();y();g();var dK=VE(),hK=Dy(),pK=zy(),lu=Et().Buffer,mK=ZE(),o3=JE(),a3=QE(),yK=lu.alloc(128),Yy={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function s3(t,e,r){var n=gK(t),i=t==="sha512"||t==="sha384"?128:64;e.length>i?e=n(e):e.length<i&&(e=lu.concat([e,yK],i));for(var o=lu.allocUnsafe(i+Yy[t]),a=lu.allocUnsafe(i+Yy[t]),s=0;s<i;s++)o[s]=e[s]^54,a[s]=e[s]^92;var c=lu.allocUnsafe(i+r+4);o.copy(c,0,0,i),this.ipad1=c,this.ipad2=o,this.opad=a,this.alg=t,this.blocksize=i,this.hash=n,this.size=Yy[t];}s3.prototype.run=function(t,e){t.copy(e,this.blocksize);var r=this.hash(e);return r.copy(this.opad,this.blocksize),this.hash(this.opad)};function gK(t){function e(n){return pK(t).update(n).digest()}function r(n){return new hK().update(n).digest()}return t==="rmd160"||t==="ripemd160"?r:t==="md5"?dK:e}function vK(t,e,r,n,i){mK(r,n),t=a3(t,o3,"Password"),e=a3(e,o3,"Salt"),i=i||"sha1";var o=new s3(i,t,e.length),a=lu.allocUnsafe(n),s=lu.allocUnsafe(e.length+4);e.copy(s,0,0,e.length);for(var c=0,u=Yy[i],l=Math.ceil(n/u),w=1;w<=l;w++){s.writeUInt32BE(w,e.length);for(var T=o.run(s,o.ipad1),x=T,I=1;I<r;I++){x=o.run(x,o.ipad2);for(var k=0;k<u;k++)T[k]^=x[k];}T.copy(a,c),c+=u;}return a}c3.exports=vK;});var m3=ne((Gwe,p3)=>{v();m();y();g();var d3=Et().Buffer,bK=ZE(),u3=JE(),l3=e_(),f3=QE(),Zy,Fh=globalThis.crypto&&globalThis.crypto.subtle,wK={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},t_=[];function EK(t){if(globalThis.process&&!globalThis.process.browser||!Fh||!Fh.importKey||!Fh.deriveBits)return Promise.resolve(!1);if(t_[t]!==void 0)return t_[t];Zy=Zy||d3.alloc(8);var e=h3(Zy,Zy,10,128,t).then(function(){return !0}).catch(function(){return !1});return t_[t]=e,e}function h3(t,e,r,n,i){return Fh.importKey("raw",t,{name:"PBKDF2"},!1,["deriveBits"]).then(function(o){return Fh.deriveBits({name:"PBKDF2",salt:e,iterations:r,hash:{name:i}},o,n<<3)}).then(function(o){return d3.from(o)})}function _K(t,e){t.then(function(r){N.nextTick(function(){e(null,r);});},function(r){N.nextTick(function(){e(r);});});}p3.exports=function(t,e,r,n,i,o){typeof i=="function"&&(o=i,i=void 0),i=i||"sha1";var a=wK[i.toLowerCase()];if(!a||typeof globalThis.Promise!="function")return N.nextTick(function(){var s;try{s=l3(t,e,r,n,i);}catch(c){return o(c)}o(null,s);});if(bK(r,n),t=f3(t,u3,"Password"),e=f3(e,u3,"Salt"),typeof o!="function")throw new Error("No callback provided to pbkdf2");_K(EK(a).then(function(s){return s?h3(t,e,r,n,a):l3(t,e,r,n,i)}),o);};});var n_=ne(r_=>{v();m();y();g();r_.pbkdf2=m3();r_.pbkdf2Sync=e_();});var i_=ne(Ui=>{v();m();y();g();Ui.readUInt32BE=function(e,r){var n=e[0+r]<<24|e[1+r]<<16|e[2+r]<<8|e[3+r];return n>>>0};Ui.writeUInt32BE=function(e,r,n){e[0+n]=r>>>24,e[1+n]=r>>>16&255,e[2+n]=r>>>8&255,e[3+n]=r&255;};Ui.ip=function(e,r,n,i){for(var o=0,a=0,s=6;s>=0;s-=2){for(var c=0;c<=24;c+=8)o<<=1,o|=r>>>c+s&1;for(var c=0;c<=24;c+=8)o<<=1,o|=e>>>c+s&1;}for(var s=6;s>=0;s-=2){for(var c=1;c<=25;c+=8)a<<=1,a|=r>>>c+s&1;for(var c=1;c<=25;c+=8)a<<=1,a|=e>>>c+s&1;}n[i+0]=o>>>0,n[i+1]=a>>>0;};Ui.rip=function(e,r,n,i){for(var o=0,a=0,s=0;s<4;s++)for(var c=24;c>=0;c-=8)o<<=1,o|=r>>>c+s&1,o<<=1,o|=e>>>c+s&1;for(var s=4;s<8;s++)for(var c=24;c>=0;c-=8)a<<=1,a|=r>>>c+s&1,a<<=1,a|=e>>>c+s&1;n[i+0]=o>>>0,n[i+1]=a>>>0;};Ui.pc1=function(e,r,n,i){for(var o=0,a=0,s=7;s>=5;s--){for(var c=0;c<=24;c+=8)o<<=1,o|=r>>c+s&1;for(var c=0;c<=24;c+=8)o<<=1,o|=e>>c+s&1;}for(var c=0;c<=24;c+=8)o<<=1,o|=r>>c+s&1;for(var s=1;s<=3;s++){for(var c=0;c<=24;c+=8)a<<=1,a|=r>>c+s&1;for(var c=0;c<=24;c+=8)a<<=1,a|=e>>c+s&1;}for(var c=0;c<=24;c+=8)a<<=1,a|=e>>c+s&1;n[i+0]=o>>>0,n[i+1]=a>>>0;};Ui.r28shl=function(e,r){return e<<r&268435455|e>>>28-r};var Jy=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];Ui.pc2=function(e,r,n,i){for(var o=0,a=0,s=Jy.length>>>1,c=0;c<s;c++)o<<=1,o|=e>>>Jy[c]&1;for(var c=s;c<Jy.length;c++)a<<=1,a|=r>>>Jy[c]&1;n[i+0]=o>>>0,n[i+1]=a>>>0;};Ui.expand=function(e,r,n){var i=0,o=0;i=(e&1)<<5|e>>>27;for(var a=23;a>=15;a-=4)i<<=6,i|=e>>>a&63;for(var a=11;a>=3;a-=4)o|=e>>>a&63,o<<=6;o|=(e&31)<<1|e>>>31,r[n+0]=i>>>0,r[n+1]=o>>>0;};var y3=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];Ui.substitute=function(e,r){for(var n=0,i=0;i<4;i++){var o=e>>>18-i*6&63,a=y3[i*64+o];n<<=4,n|=a;}for(var i=0;i<4;i++){var o=r>>>18-i*6&63,a=y3[4*64+i*64+o];n<<=4,n|=a;}return n>>>0};var g3=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];Ui.permute=function(e){for(var r=0,n=0;n<g3.length;n++)r<<=1,r|=e>>>g3[n]&1;return r>>>0};Ui.padSplit=function(e,r,n){for(var i=e.toString(2);i.length<r;)i="0"+i;for(var o=[],a=0;a<r;a+=n)o.push(i.slice(a,a+n));return o.join(" ")};});var mi=ne((sEe,b3)=>{v();m();y();g();b3.exports=v3;function v3(t,e){if(!t)throw new Error(e||"Assertion failed")}v3.equal=function(e,r,n){if(e!=r)throw new Error(n||"Assertion failed: "+e+" != "+r)};});var Xy=ne((dEe,w3)=>{v();m();y();g();var SK=mi();function Di(t){this.options=t,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0;}w3.exports=Di;Di.prototype._init=function(){};Di.prototype.update=function(e){return e.length===0?[]:this.type==="decrypt"?this._updateDecrypt(e):this._updateEncrypt(e)};Di.prototype._buffer=function(e,r){for(var n=Math.min(this.buffer.length-this.bufferOff,e.length-r),i=0;i<n;i++)this.buffer[this.bufferOff+i]=e[r+i];return this.bufferOff+=n,n};Di.prototype._flushBuffer=function(e,r){return this._update(this.buffer,0,e,r),this.bufferOff=0,this.blockSize};Di.prototype._updateEncrypt=function(e){var r=0,n=0,i=(this.bufferOff+e.length)/this.blockSize|0,o=new Array(i*this.blockSize);this.bufferOff!==0&&(r+=this._buffer(e,r),this.bufferOff===this.buffer.length&&(n+=this._flushBuffer(o,n)));for(var a=e.length-(e.length-r)%this.blockSize;r<a;r+=this.blockSize)this._update(e,r,o,n),n+=this.blockSize;for(;r<e.length;r++,this.bufferOff++)this.buffer[this.bufferOff]=e[r];return o};Di.prototype._updateDecrypt=function(e){for(var r=0,n=0,i=Math.ceil((this.bufferOff+e.length)/this.blockSize)-1,o=new Array(i*this.blockSize);i>0;i--)r+=this._buffer(e,r),n+=this._flushBuffer(o,n);return r+=this._buffer(e,r),o};Di.prototype.final=function(e){var r;e&&(r=this.update(e));var n;return this.type==="encrypt"?n=this._finalEncrypt():n=this._finalDecrypt(),r?r.concat(n):n};Di.prototype._pad=function(e,r){if(r===0)return !1;for(;r<e.length;)e[r++]=0;return !0};Di.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return [];var e=new Array(this.blockSize);return this._update(this.buffer,0,e,0),e};Di.prototype._unpad=function(e){return e};Di.prototype._finalDecrypt=function(){SK.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var e=new Array(this.blockSize);return this._flushBuffer(e,0),this._unpad(e)};});var o_=ne((gEe,S3)=>{v();m();y();g();var E3=mi(),CK=yt(),Xr=i_(),_3=Xy();function AK(){this.tmp=new Array(2),this.keys=null;}function ia(t){_3.call(this,t);var e=new AK;this._desState=e,this.deriveKeys(e,t.key);}CK(ia,_3);S3.exports=ia;ia.create=function(e){return new ia(e)};var TK=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];ia.prototype.deriveKeys=function(e,r){e.keys=new Array(16*2),E3.equal(r.length,this.blockSize,"Invalid key length");var n=Xr.readUInt32BE(r,0),i=Xr.readUInt32BE(r,4);Xr.pc1(n,i,e.tmp,0),n=e.tmp[0],i=e.tmp[1];for(var o=0;o<e.keys.length;o+=2){var a=TK[o>>>1];n=Xr.r28shl(n,a),i=Xr.r28shl(i,a),Xr.pc2(n,i,e.keys,o);}};ia.prototype._update=function(e,r,n,i){var o=this._desState,a=Xr.readUInt32BE(e,r),s=Xr.readUInt32BE(e,r+4);Xr.ip(a,s,o.tmp,0),a=o.tmp[0],s=o.tmp[1],this.type==="encrypt"?this._encrypt(o,a,s,o.tmp,0):this._decrypt(o,a,s,o.tmp,0),a=o.tmp[0],s=o.tmp[1],Xr.writeUInt32BE(n,a,i),Xr.writeUInt32BE(n,s,i+4);};ia.prototype._pad=function(e,r){for(var n=e.length-r,i=r;i<e.length;i++)e[i]=n;return !0};ia.prototype._unpad=function(e){for(var r=e[e.length-1],n=e.length-r;n<e.length;n++)E3.equal(e[n],r);return e.slice(0,e.length-r)};ia.prototype._encrypt=function(e,r,n,i,o){for(var a=r,s=n,c=0;c<e.keys.length;c+=2){var u=e.keys[c],l=e.keys[c+1];Xr.expand(s,e.tmp,0),u^=e.tmp[0],l^=e.tmp[1];var w=Xr.substitute(u,l),T=Xr.permute(w),x=s;s=(a^T)>>>0,a=x;}Xr.rip(s,a,i,o);};ia.prototype._decrypt=function(e,r,n,i,o){for(var a=n,s=r,c=e.keys.length-2;c>=0;c-=2){var u=e.keys[c],l=e.keys[c+1];Xr.expand(a,e.tmp,0),u^=e.tmp[0],l^=e.tmp[1];var w=Xr.substitute(u,l),T=Xr.permute(w),x=a;a=(s^T)>>>0,s=x;}Xr.rip(a,s,i,o);};});var A3=ne(C3=>{v();m();y();g();var RK=mi(),xK=yt(),Qy={};function IK(t){RK.equal(t.length,8,"Invalid IV length"),this.iv=new Array(8);for(var e=0;e<this.iv.length;e++)this.iv[e]=t[e];}function MK(t){function e(o){t.call(this,o),this._cbcInit();}xK(e,t);for(var r=Object.keys(Qy),n=0;n<r.length;n++){var i=r[n];e.prototype[i]=Qy[i];}return e.create=function(a){return new e(a)},e}C3.instantiate=MK;Qy._cbcInit=function(){var e=new IK(this.options.iv);this._cbcState=e;};Qy._update=function(e,r,n,i){var o=this._cbcState,a=this.constructor.super_.prototype,s=o.iv;if(this.type==="encrypt"){for(var c=0;c<this.blockSize;c++)s[c]^=e[r+c];a._update.call(this,s,0,n,i);for(var c=0;c<this.blockSize;c++)s[c]=n[i+c];}else {a._update.call(this,e,r,n,i);for(var c=0;c<this.blockSize;c++)n[i+c]^=s[c];for(var c=0;c<this.blockSize;c++)s[c]=e[r+c];}};});var x3=ne((REe,R3)=>{v();m();y();g();var OK=mi(),NK=yt(),T3=Xy(),$s=o_();function kK(t,e){OK.equal(e.length,24,"Invalid key length");var r=e.slice(0,8),n=e.slice(8,16),i=e.slice(16,24);t==="encrypt"?this.ciphers=[$s.create({type:"encrypt",key:r}),$s.create({type:"decrypt",key:n}),$s.create({type:"encrypt",key:i})]:this.ciphers=[$s.create({type:"decrypt",key:i}),$s.create({type:"encrypt",key:n}),$s.create({type:"decrypt",key:r})];}function fu(t){T3.call(this,t);var e=new kK(this.type,this.options.key);this._edeState=e;}NK(fu,T3);R3.exports=fu;fu.create=function(e){return new fu(e)};fu.prototype._update=function(e,r,n,i){var o=this._edeState;o.ciphers[0]._update(e,r,n,i),o.ciphers[1]._update(n,i,n,i),o.ciphers[2]._update(n,i,n,i);};fu.prototype._pad=$s.prototype._pad;fu.prototype._unpad=$s.prototype._unpad;});var I3=ne(vf=>{v();m();y();g();vf.utils=i_();vf.Cipher=Xy();vf.DES=o_();vf.CBC=A3();vf.EDE=x3();});var N3=ne((DEe,O3)=>{v();m();y();g();var M3=Za(),Ja=I3(),PK=yt(),du=Et().Buffer,zh={"des-ede3-cbc":Ja.CBC.instantiate(Ja.EDE),"des-ede3":Ja.EDE,"des-ede-cbc":Ja.CBC.instantiate(Ja.EDE),"des-ede":Ja.EDE,"des-cbc":Ja.CBC.instantiate(Ja.DES),"des-ecb":Ja.DES};zh.des=zh["des-cbc"];zh.des3=zh["des-ede3-cbc"];O3.exports=eg;PK(eg,M3);function eg(t){M3.call(this);var e=t.mode.toLowerCase(),r=zh[e],n;t.decrypt?n="decrypt":n="encrypt";var i=t.key;du.isBuffer(i)||(i=du.from(i)),(e==="des-ede"||e==="des-ede-cbc")&&(i=du.concat([i,i.slice(0,8)]));var o=t.iv;du.isBuffer(o)||(o=du.from(o)),this._des=r.create({key:i,iv:o,type:n});}eg.prototype._update=function(t){return du.from(this._des.update(t))};eg.prototype._final=function(){return du.from(this._des.final())};});var k3=ne(a_=>{v();m();y();g();a_.encrypt=function(t,e){return t._cipher.encryptBlock(e)};a_.decrypt=function(t,e){return t._cipher.decryptBlock(e)};});var bf=ne((KEe,P3)=>{v();m();y();g();P3.exports=function(e,r){for(var n=Math.min(e.length,r.length),i=new D.Buffer(n),o=0;o<n;++o)i[o]=e[o]^r[o];return i};});var U3=ne(s_=>{v();m();y();g();var B3=bf();s_.encrypt=function(t,e){var r=B3(e,t._prev);return t._prev=t._cipher.encryptBlock(r),t._prev};s_.decrypt=function(t,e){var r=t._prev;t._prev=e;var n=t._cipher.decryptBlock(e);return B3(n,r)};});var q3=ne(L3=>{v();m();y();g();var Hh=Et().Buffer,BK=bf();function D3(t,e,r){var n=e.length,i=BK(e,t._cache);return t._cache=t._cache.slice(n),t._prev=Hh.concat([t._prev,r?e:i]),i}L3.encrypt=function(t,e,r){for(var n=Hh.allocUnsafe(0),i;e.length;)if(t._cache.length===0&&(t._cache=t._cipher.encryptBlock(t._prev),t._prev=Hh.allocUnsafe(0)),t._cache.length<=e.length)i=t._cache.length,n=Hh.concat([n,D3(t,e.slice(0,i),r)]),e=e.slice(i);else {n=Hh.concat([n,D3(t,e,r)]);break}return n};});var z3=ne(F3=>{v();m();y();g();var c_=Et().Buffer;function UK(t,e,r){var n=t._cipher.encryptBlock(t._prev),i=n[0]^e;return t._prev=c_.concat([t._prev.slice(1),c_.from([r?e:i])]),i}F3.encrypt=function(t,e,r){for(var n=e.length,i=c_.allocUnsafe(n),o=-1;++o<n;)i[o]=UK(t,e[o],r);return i};});var j3=ne(H3=>{v();m();y();g();var tg=Et().Buffer;function DK(t,e,r){for(var n,i=-1,o=8,a=0,s,c;++i<o;)n=t._cipher.encryptBlock(t._prev),s=e&1<<7-i?128:0,c=n[0]^s,a+=(c&128)>>i%8,t._prev=LK(t._prev,r?s:c);return a}function LK(t,e){var r=t.length,n=-1,i=tg.allocUnsafe(t.length);for(t=tg.concat([t,tg.from([e])]);++n<r;)i[n]=t[n]<<1|t[n+1]>>7;return i}H3.encrypt=function(t,e,r){for(var n=e.length,i=tg.allocUnsafe(n),o=-1;++o<n;)i[o]=DK(t,e[o],r);return i};});var V3=ne($3=>{v();m();y();g();var qK=bf();function FK(t){return t._prev=t._cipher.encryptBlock(t._prev),t._prev}$3.encrypt=function(t,e){for(;t._cache.length<e.length;)t._cache=D.Buffer.concat([t._cache,FK(t)]);var r=t._cache.slice(0,e.length);return t._cache=t._cache.slice(e.length),qK(e,r)};});var u_=ne((S_e,G3)=>{v();m();y();g();function zK(t){for(var e=t.length,r;e--;)if(r=t.readUInt8(e),r===255)t.writeUInt8(0,e);else {r++,t.writeUInt8(r,e);break}}G3.exports=zK;});var f_=ne(W3=>{v();m();y();g();var HK=bf(),K3=Et().Buffer,jK=u_();function $K(t){var e=t._cipher.encryptBlockRaw(t._prev);return jK(t._prev),e}var l_=16;W3.encrypt=function(t,e){var r=Math.ceil(e.length/l_),n=t._cache.length;t._cache=K3.concat([t._cache,K3.allocUnsafe(r*l_)]);for(var i=0;i<r;i++){var o=$K(t),a=n+i*l_;t._cache.writeUInt32BE(o[0],a+0),t._cache.writeUInt32BE(o[1],a+4),t._cache.writeUInt32BE(o[2],a+8),t._cache.writeUInt32BE(o[3],a+12);}var s=t._cache.slice(0,e.length);return t._cache=t._cache.slice(e.length),HK(e,s)};});var d_=ne((k_e,VK)=>{VK.exports={"aes-128-ecb":{cipher:"AES",key:128,iv:0,mode:"ECB",type:"block"},"aes-192-ecb":{cipher:"AES",key:192,iv:0,mode:"ECB",type:"block"},"aes-256-ecb":{cipher:"AES",key:256,iv:0,mode:"ECB",type:"block"},"aes-128-cbc":{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},"aes-192-cbc":{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},"aes-256-cbc":{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},aes128:{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},aes192:{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},aes256:{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},"aes-128-cfb":{cipher:"AES",key:128,iv:16,mode:"CFB",type:"stream"},"aes-192-cfb":{cipher:"AES",key:192,iv:16,mode:"CFB",type:"stream"},"aes-256-cfb":{cipher:"AES",key:256,iv:16,mode:"CFB",type:"stream"},"aes-128-cfb8":{cipher:"AES",key:128,iv:16,mode:"CFB8",type:"stream"},"aes-192-cfb8":{cipher:"AES",key:192,iv:16,mode:"CFB8",type:"stream"},"aes-256-cfb8":{cipher:"AES",key:256,iv:16,mode:"CFB8",type:"stream"},"aes-128-cfb1":{cipher:"AES",key:128,iv:16,mode:"CFB1",type:"stream"},"aes-192-cfb1":{cipher:"AES",key:192,iv:16,mode:"CFB1",type:"stream"},"aes-256-cfb1":{cipher:"AES",key:256,iv:16,mode:"CFB1",type:"stream"},"aes-128-ofb":{cipher:"AES",key:128,iv:16,mode:"OFB",type:"stream"},"aes-192-ofb":{cipher:"AES",key:192,iv:16,mode:"OFB",type:"stream"},"aes-256-ofb":{cipher:"AES",key:256,iv:16,mode:"OFB",type:"stream"},"aes-128-ctr":{cipher:"AES",key:128,iv:16,mode:"CTR",type:"stream"},"aes-192-ctr":{cipher:"AES",key:192,iv:16,mode:"CTR",type:"stream"},"aes-256-ctr":{cipher:"AES",key:256,iv:16,mode:"CTR",type:"stream"},"aes-128-gcm":{cipher:"AES",key:128,iv:12,mode:"GCM",type:"auth"},"aes-192-gcm":{cipher:"AES",key:192,iv:12,mode:"GCM",type:"auth"},"aes-256-gcm":{cipher:"AES",key:256,iv:12,mode:"GCM",type:"auth"}};});var ng=ne((P_e,Y3)=>{v();m();y();g();var GK={ECB:k3(),CBC:U3(),CFB:q3(),CFB8:z3(),CFB1:j3(),OFB:V3(),CTR:f_(),GCM:f_()},rg=d_();for(h_ in rg)rg[h_].module=GK[rg[h_].mode];var h_;Y3.exports=rg;});var jh=ne((q_e,J3)=>{v();m();y();g();var ig=Et().Buffer;function m_(t){ig.isBuffer(t)||(t=ig.from(t));for(var e=t.length/4|0,r=new Array(e),n=0;n<e;n++)r[n]=t.readUInt32BE(n*4);return r}function p_(t){for(var e=0;e<t.length;t++)t[e]=0;}function Z3(t,e,r,n,i){for(var o=r[0],a=r[1],s=r[2],c=r[3],u=t[0]^e[0],l=t[1]^e[1],w=t[2]^e[2],T=t[3]^e[3],x,I,k,q,j=4,K=1;K<i;K++)x=o[u>>>24]^a[l>>>16&255]^s[w>>>8&255]^c[T&255]^e[j++],I=o[l>>>24]^a[w>>>16&255]^s[T>>>8&255]^c[u&255]^e[j++],k=o[w>>>24]^a[T>>>16&255]^s[u>>>8&255]^c[l&255]^e[j++],q=o[T>>>24]^a[u>>>16&255]^s[l>>>8&255]^c[w&255]^e[j++],u=x,l=I,w=k,T=q;return x=(n[u>>>24]<<24|n[l>>>16&255]<<16|n[w>>>8&255]<<8|n[T&255])^e[j++],I=(n[l>>>24]<<24|n[w>>>16&255]<<16|n[T>>>8&255]<<8|n[u&255])^e[j++],k=(n[w>>>24]<<24|n[T>>>16&255]<<16|n[u>>>8&255]<<8|n[l&255])^e[j++],q=(n[T>>>24]<<24|n[u>>>16&255]<<16|n[l>>>8&255]<<8|n[w&255])^e[j++],x=x>>>0,I=I>>>0,k=k>>>0,q=q>>>0,[x,I,k,q]}var KK=[0,1,2,4,8,16,32,64,128,27,54],$r=function(){for(var t=new Array(256),e=0;e<256;e++)e<128?t[e]=e<<1:t[e]=e<<1^283;for(var r=[],n=[],i=[[],[],[],[]],o=[[],[],[],[]],a=0,s=0,c=0;c<256;++c){var u=s^s<<1^s<<2^s<<3^s<<4;u=u>>>8^u&255^99,r[a]=u,n[u]=a;var l=t[a],w=t[l],T=t[w],x=t[u]*257^u*16843008;i[0][a]=x<<24|x>>>8,i[1][a]=x<<16|x>>>16,i[2][a]=x<<8|x>>>24,i[3][a]=x,x=T*16843009^w*65537^l*257^a*16843008,o[0][u]=x<<24|x>>>8,o[1][u]=x<<16|x>>>16,o[2][u]=x<<8|x>>>24,o[3][u]=x,a===0?a=s=1:(a=l^t[t[t[T^l]]],s^=t[t[s]]);}return {SBOX:r,INV_SBOX:n,SUB_MIX:i,INV_SUB_MIX:o}}();function Li(t){this._key=m_(t),this._reset();}Li.blockSize=4*4;Li.keySize=256/8;Li.prototype.blockSize=Li.blockSize;Li.prototype.keySize=Li.keySize;Li.prototype._reset=function(){for(var t=this._key,e=t.length,r=e+6,n=(r+1)*4,i=[],o=0;o<e;o++)i[o]=t[o];for(o=e;o<n;o++){var a=i[o-1];o%e===0?(a=a<<8|a>>>24,a=$r.SBOX[a>>>24]<<24|$r.SBOX[a>>>16&255]<<16|$r.SBOX[a>>>8&255]<<8|$r.SBOX[a&255],a^=KK[o/e|0]<<24):e>6&&o%e===4&&(a=$r.SBOX[a>>>24]<<24|$r.SBOX[a>>>16&255]<<16|$r.SBOX[a>>>8&255]<<8|$r.SBOX[a&255]),i[o]=i[o-e]^a;}for(var s=[],c=0;c<n;c++){var u=n-c,l=i[u-(c%4?0:4)];c<4||u<=4?s[c]=l:s[c]=$r.INV_SUB_MIX[0][$r.SBOX[l>>>24]]^$r.INV_SUB_MIX[1][$r.SBOX[l>>>16&255]]^$r.INV_SUB_MIX[2][$r.SBOX[l>>>8&255]]^$r.INV_SUB_MIX[3][$r.SBOX[l&255]];}this._nRounds=r,this._keySchedule=i,this._invKeySchedule=s;};Li.prototype.encryptBlockRaw=function(t){return t=m_(t),Z3(t,this._keySchedule,$r.SUB_MIX,$r.SBOX,this._nRounds)};Li.prototype.encryptBlock=function(t){var e=this.encryptBlockRaw(t),r=ig.allocUnsafe(16);return r.writeUInt32BE(e[0],0),r.writeUInt32BE(e[1],4),r.writeUInt32BE(e[2],8),r.writeUInt32BE(e[3],12),r};Li.prototype.decryptBlock=function(t){t=m_(t);var e=t[1];t[1]=t[3],t[3]=e;var r=Z3(t,this._invKeySchedule,$r.INV_SUB_MIX,$r.INV_SBOX,this._nRounds),n=ig.allocUnsafe(16);return n.writeUInt32BE(r[0],0),n.writeUInt32BE(r[3],4),n.writeUInt32BE(r[2],8),n.writeUInt32BE(r[1],12),n};Li.prototype.scrub=function(){p_(this._keySchedule),p_(this._invKeySchedule),p_(this._key);};J3.exports.AES=Li;});var e4=ne(($_e,Q3)=>{v();m();y();g();var wf=Et().Buffer,WK=wf.alloc(16,0);function YK(t){return [t.readUInt32BE(0),t.readUInt32BE(4),t.readUInt32BE(8),t.readUInt32BE(12)]}function X3(t){var e=wf.allocUnsafe(16);return e.writeUInt32BE(t[0]>>>0,0),e.writeUInt32BE(t[1]>>>0,4),e.writeUInt32BE(t[2]>>>0,8),e.writeUInt32BE(t[3]>>>0,12),e}function $h(t){this.h=t,this.state=wf.alloc(16,0),this.cache=wf.allocUnsafe(0);}$h.prototype.ghash=function(t){for(var e=-1;++e<t.length;)this.state[e]^=t[e];this._multiply();};$h.prototype._multiply=function(){for(var t=YK(this.h),e=[0,0,0,0],r,n,i,o=-1;++o<128;){for(n=(this.state[~~(o/8)]&1<<7-o%8)!==0,n&&(e[0]^=t[0],e[1]^=t[1],e[2]^=t[2],e[3]^=t[3]),i=(t[3]&1)!==0,r=3;r>0;r--)t[r]=t[r]>>>1|(t[r-1]&1)<<31;t[0]=t[0]>>>1,i&&(t[0]=t[0]^225<<24);}this.state=X3(e);};$h.prototype.update=function(t){this.cache=wf.concat([this.cache,t]);for(var e;this.cache.length>=16;)e=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(e);};$h.prototype.final=function(t,e){return this.cache.length&&this.ghash(wf.concat([this.cache,WK],16)),this.ghash(X3([0,t,0,e])),this.state};Q3.exports=$h;});var y_=ne((Y_e,n4)=>{v();m();y();g();var ZK=jh(),Xn=Et().Buffer,t4=Za(),JK=yt(),r4=e4(),XK=bf(),QK=u_();function eW(t,e){var r=0;t.length!==e.length&&r++;for(var n=Math.min(t.length,e.length),i=0;i<n;++i)r+=t[i]^e[i];return r}function tW(t,e,r){if(e.length===12)return t._finID=Xn.concat([e,Xn.from([0,0,0,1])]),Xn.concat([e,Xn.from([0,0,0,2])]);var n=new r4(r),i=e.length,o=i%16;n.update(e),o&&(o=16-o,n.update(Xn.alloc(o,0))),n.update(Xn.alloc(8,0));var a=i*8,s=Xn.alloc(8);s.writeUIntBE(a,0,8),n.update(s),t._finID=n.state;var c=Xn.from(t._finID);return QK(c),c}function hu(t,e,r,n){t4.call(this);var i=Xn.alloc(4,0);this._cipher=new ZK.AES(e);var o=this._cipher.encryptBlock(i);this._ghash=new r4(o),r=tW(this,r,o),this._prev=Xn.from(r),this._cache=Xn.allocUnsafe(0),this._secCache=Xn.allocUnsafe(0),this._decrypt=n,this._alen=0,this._len=0,this._mode=t,this._authTag=null,this._called=!1;}JK(hu,t4);hu.prototype._update=function(t){if(!this._called&&this._alen){var e=16-this._alen%16;e<16&&(e=Xn.alloc(e,0),this._ghash.update(e));}this._called=!0;var r=this._mode.encrypt(this,t);return this._decrypt?this._ghash.update(t):this._ghash.update(r),this._len+=t.length,r};hu.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var t=XK(this._ghash.final(this._alen*8,this._len*8),this._cipher.encryptBlock(this._finID));if(this._decrypt&&eW(t,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=t,this._cipher.scrub();};hu.prototype.getAuthTag=function(){if(this._decrypt||!Xn.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag};hu.prototype.setAuthTag=function(e){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=e;};hu.prototype.setAAD=function(e){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(e),this._alen+=e.length;};n4.exports=hu;});var v_=ne((eSe,o4)=>{v();m();y();g();var rW=jh(),g_=Et().Buffer,i4=Za(),nW=yt();function og(t,e,r,n){i4.call(this),this._cipher=new rW.AES(e),this._prev=g_.from(r),this._cache=g_.allocUnsafe(0),this._secCache=g_.allocUnsafe(0),this._decrypt=n,this._mode=t;}nW(og,i4);og.prototype._update=function(t){return this._mode.encrypt(this,t,this._decrypt)};og.prototype._final=function(){this._cipher.scrub();};o4.exports=og;});var Vh=ne((oSe,a4)=>{v();m();y();g();var pu=Et().Buffer,iW=By();function oW(t,e,r,n){if(pu.isBuffer(t)||(t=pu.from(t,"binary")),e&&(pu.isBuffer(e)||(e=pu.from(e,"binary")),e.length!==8))throw new RangeError("salt should be Buffer with 8 byte length");for(var i=r/8,o=pu.alloc(i),a=pu.alloc(n||0),s=pu.alloc(0);i>0||n>0;){var c=new iW;c.update(s),c.update(t),e&&c.update(e),s=c.digest();var u=0;if(i>0){var l=o.length-i;u=Math.min(i,s.length),s.copy(o,l,0,u),i-=u;}if(u<s.length&&n>0){var w=a.length-n,T=Math.min(n,s.length-u);s.copy(a,w,u,u+T),n-=T;}}return s.fill(0),{key:o,iv:a}}a4.exports=oW;});var l4=ne(b_=>{v();m();y();g();var s4=ng(),aW=y_(),Xa=Et().Buffer,sW=v_(),c4=Za(),cW=jh(),uW=Vh(),lW=yt();function Gh(t,e,r){c4.call(this),this._cache=new ag,this._cipher=new cW.AES(e),this._prev=Xa.from(r),this._mode=t,this._autopadding=!0;}lW(Gh,c4);Gh.prototype._update=function(t){this._cache.add(t);for(var e,r,n=[];e=this._cache.get();)r=this._mode.encrypt(this,e),n.push(r);return Xa.concat(n)};var fW=Xa.alloc(16,16);Gh.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return t=this._mode.encrypt(this,t),this._cipher.scrub(),t;if(!t.equals(fW))throw this._cipher.scrub(),new Error("data not multiple of block length")};Gh.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this};function ag(){this.cache=Xa.allocUnsafe(0);}ag.prototype.add=function(t){this.cache=Xa.concat([this.cache,t]);};ag.prototype.get=function(){if(this.cache.length>15){var t=this.cache.slice(0,16);return this.cache=this.cache.slice(16),t}return null};ag.prototype.flush=function(){for(var t=16-this.cache.length,e=Xa.allocUnsafe(t),r=-1;++r<t;)e.writeUInt8(t,r);return Xa.concat([this.cache,e])};function u4(t,e,r){var n=s4[t.toLowerCase()];if(!n)throw new TypeError("invalid suite type");if(typeof e=="string"&&(e=Xa.from(e)),e.length!==n.key/8)throw new TypeError("invalid key length "+e.length);if(typeof r=="string"&&(r=Xa.from(r)),n.mode!=="GCM"&&r.length!==n.iv)throw new TypeError("invalid iv length "+r.length);return n.type==="stream"?new sW(n.module,e,r):n.type==="auth"?new aW(n.module,e,r):new Gh(n.module,e,r)}function dW(t,e){var r=s4[t.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var n=uW(e,!1,r.key,r.iv);return u4(t,n.key,n.iv)}b_.createCipheriv=u4;b_.createCipher=dW;});var p4=ne(w_=>{v();m();y();g();var hW=y_(),Ef=Et().Buffer,f4=ng(),pW=v_(),d4=Za(),mW=jh(),yW=Vh(),gW=yt();function Kh(t,e,r){d4.call(this),this._cache=new sg,this._last=void 0,this._cipher=new mW.AES(e),this._prev=Ef.from(r),this._mode=t,this._autopadding=!0;}gW(Kh,d4);Kh.prototype._update=function(t){this._cache.add(t);for(var e,r,n=[];e=this._cache.get(this._autopadding);)r=this._mode.decrypt(this,e),n.push(r);return Ef.concat(n)};Kh.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return vW(this._mode.decrypt(this,t));if(t)throw new Error("data not multiple of block length")};Kh.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this};function sg(){this.cache=Ef.allocUnsafe(0);}sg.prototype.add=function(t){this.cache=Ef.concat([this.cache,t]);};sg.prototype.get=function(t){var e;if(t){if(this.cache.length>16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e}else if(this.cache.length>=16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e;return null};sg.prototype.flush=function(){if(this.cache.length)return this.cache};function vW(t){var e=t[15];if(e<1||e>16)throw new Error("unable to decrypt data");for(var r=-1;++r<e;)if(t[r+(16-e)]!==e)throw new Error("unable to decrypt data");if(e!==16)return t.slice(0,16-e)}function h4(t,e,r){var n=f4[t.toLowerCase()];if(!n)throw new TypeError("invalid suite type");if(typeof r=="string"&&(r=Ef.from(r)),n.mode!=="GCM"&&r.length!==n.iv)throw new TypeError("invalid iv length "+r.length);if(typeof e=="string"&&(e=Ef.from(e)),e.length!==n.key/8)throw new TypeError("invalid key length "+e.length);return n.type==="stream"?new pW(n.module,e,r,!0):n.type==="auth"?new hW(n.module,e,r,!0):new Kh(n.module,e,r)}function bW(t,e){var r=f4[t.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var n=yW(e,!1,r.key,r.iv);return h4(t,n.key,n.iv)}w_.createDecipher=bW;w_.createDecipheriv=h4;});var cg=ne(wo=>{v();m();y();g();var m4=l4(),y4=p4(),wW=d_();function EW(){return Object.keys(wW)}wo.createCipher=wo.Cipher=m4.createCipher;wo.createCipheriv=wo.Cipheriv=m4.createCipheriv;wo.createDecipher=wo.Decipher=y4.createDecipher;wo.createDecipheriv=wo.Decipheriv=y4.createDecipheriv;wo.listCiphers=wo.getCiphers=EW;});var g4=ne(Qa=>{v();m();y();g();Qa["des-ecb"]={key:8,iv:0};Qa["des-cbc"]=Qa.des={key:8,iv:8};Qa["des-ede3-cbc"]=Qa.des3={key:24,iv:8};Qa["des-ede3"]={key:24,iv:0};Qa["des-ede-cbc"]={key:16,iv:8};Qa["des-ede"]={key:16,iv:0};});var _4=ne(Eo=>{v();m();y();g();var v4=N3(),E_=cg(),Vs=ng(),es=g4(),b4=Vh();function _W(t,e){t=t.toLowerCase();var r,n;if(Vs[t])r=Vs[t].key,n=Vs[t].iv;else if(es[t])r=es[t].key*8,n=es[t].iv;else throw new TypeError("invalid suite type");var i=b4(e,!1,r,n);return w4(t,i.key,i.iv)}function SW(t,e){t=t.toLowerCase();var r,n;if(Vs[t])r=Vs[t].key,n=Vs[t].iv;else if(es[t])r=es[t].key*8,n=es[t].iv;else throw new TypeError("invalid suite type");var i=b4(e,!1,r,n);return E4(t,i.key,i.iv)}function w4(t,e,r){if(t=t.toLowerCase(),Vs[t])return E_.createCipheriv(t,e,r);if(es[t])return new v4({key:e,iv:r,mode:t});throw new TypeError("invalid suite type")}function E4(t,e,r){if(t=t.toLowerCase(),Vs[t])return E_.createDecipheriv(t,e,r);if(es[t])return new v4({key:e,iv:r,mode:t,decrypt:!0});throw new TypeError("invalid suite type")}function CW(){return Object.keys(es).concat(E_.getCiphers())}Eo.createCipher=Eo.Cipher=_W;Eo.createCipheriv=Eo.Cipheriv=w4;Eo.createDecipher=Eo.Decipher=SW;Eo.createDecipheriv=Eo.Decipheriv=E4;Eo.listCiphers=Eo.getCiphers=CW;});var ug=ne(()=>{v();m();y();g();});var _o=ne((S4,__)=>{v();m();y();g();(function(t,e){function r(Y,S){if(!Y)throw new Error(S||"Assertion failed")}function n(Y,S){Y.super_=S;var d=function(){};d.prototype=S.prototype,Y.prototype=new d,Y.prototype.constructor=Y;}function i(Y,S,d){if(i.isBN(Y))return Y;this.negative=0,this.words=null,this.length=0,this.red=null,Y!==null&&((S==="le"||S==="be")&&(d=S,S=10),this._init(Y||0,S||10,d||"be"));}typeof t=="object"?t.exports=i:e.BN=i,i.BN=i,i.wordSize=26;var o;try{o=ug().Buffer;}catch(Y){}i.isBN=function(S){return S instanceof i?!0:S!==null&&typeof S=="object"&&S.constructor.wordSize===i.wordSize&&Array.isArray(S.words)},i.max=function(S,d){return S.cmp(d)>0?S:d},i.min=function(S,d){return S.cmp(d)<0?S:d},i.prototype._init=function(S,d,C){if(typeof S=="number")return this._initNumber(S,d,C);if(typeof S=="object")return this._initArray(S,d,C);d==="hex"&&(d=16),r(d===(d|0)&&d>=2&&d<=36),S=S.toString().replace(/\s+/g,"");var A=0;S[0]==="-"&&A++,d===16?this._parseHex(S,A):this._parseBase(S,d,A),S[0]==="-"&&(this.negative=1),this.strip(),C==="le"&&this._initArray(this.toArray(),d,C);},i.prototype._initNumber=function(S,d,C){S<0&&(this.negative=1,S=-S),S<67108864?(this.words=[S&67108863],this.length=1):S<4503599627370496?(this.words=[S&67108863,S/67108864&67108863],this.length=2):(r(S<9007199254740992),this.words=[S&67108863,S/67108864&67108863,1],this.length=3),C==="le"&&this._initArray(this.toArray(),d,C);},i.prototype._initArray=function(S,d,C){if(r(typeof S.length=="number"),S.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(S.length/3),this.words=new Array(this.length);for(var A=0;A<this.length;A++)this.words[A]=0;var f,_,M=0;if(C==="be")for(A=S.length-1,f=0;A>=0;A-=3)_=S[A]|S[A-1]<<8|S[A-2]<<16,this.words[f]|=_<<M&67108863,this.words[f+1]=_>>>26-M&67108863,M+=24,M>=26&&(M-=26,f++);else if(C==="le")for(A=0,f=0;A<S.length;A+=3)_=S[A]|S[A+1]<<8|S[A+2]<<16,this.words[f]|=_<<M&67108863,this.words[f+1]=_>>>26-M&67108863,M+=24,M>=26&&(M-=26,f++);return this.strip()};function a(Y,S,d){for(var C=0,A=Math.min(Y.length,d),f=S;f<A;f++){var _=Y.charCodeAt(f)-48;C<<=4,_>=49&&_<=54?C|=_-49+10:_>=17&&_<=22?C|=_-17+10:C|=_&15;}return C}i.prototype._parseHex=function(S,d){this.length=Math.ceil((S.length-d)/6),this.words=new Array(this.length);for(var C=0;C<this.length;C++)this.words[C]=0;var A,f,_=0;for(C=S.length-6,A=0;C>=d;C-=6)f=a(S,C,C+6),this.words[A]|=f<<_&67108863,this.words[A+1]|=f>>>26-_&4194303,_+=24,_>=26&&(_-=26,A++);C+6!==d&&(f=a(S,d,C+6),this.words[A]|=f<<_&67108863,this.words[A+1]|=f>>>26-_&4194303),this.strip();};function s(Y,S,d,C){for(var A=0,f=Math.min(Y.length,d),_=S;_<f;_++){var M=Y.charCodeAt(_)-48;A*=C,M>=49?A+=M-49+10:M>=17?A+=M-17+10:A+=M;}return A}i.prototype._parseBase=function(S,d,C){this.words=[0],this.length=1;for(var A=0,f=1;f<=67108863;f*=d)A++;A--,f=f/d|0;for(var _=S.length-C,M=_%A,R=Math.min(_,_-M)+C,h=0,b=C;b<R;b+=A)h=s(S,b,b+A,d),this.imuln(f),this.words[0]+h<67108864?this.words[0]+=h:this._iaddn(h);if(M!==0){var B=1;for(h=s(S,b,S.length,d),b=0;b<M;b++)B*=d;this.imuln(B),this.words[0]+h<67108864?this.words[0]+=h:this._iaddn(h);}},i.prototype.copy=function(S){S.words=new Array(this.length);for(var d=0;d<this.length;d++)S.words[d]=this.words[d];S.length=this.length,S.negative=this.negative,S.red=this.red;},i.prototype.clone=function(){var S=new i(null);return this.copy(S),S},i.prototype._expand=function(S){for(;this.length<S;)this.words[this.length++]=0;return this},i.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},i.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},i.prototype.inspect=function(){return (this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var c=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],u=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],l=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];i.prototype.toString=function(S,d){S=S||10,d=d|0||1;var C;if(S===16||S==="hex"){C="";for(var A=0,f=0,_=0;_<this.length;_++){var M=this.words[_],R=((M<<A|f)&16777215).toString(16);f=M>>>24-A&16777215,f!==0||_!==this.length-1?C=c[6-R.length]+R+C:C=R+C,A+=2,A>=26&&(A-=26,_--);}for(f!==0&&(C=f.toString(16)+C);C.length%d!==0;)C="0"+C;return this.negative!==0&&(C="-"+C),C}if(S===(S|0)&&S>=2&&S<=36){var h=u[S],b=l[S];C="";var B=this.clone();for(B.negative=0;!B.isZero();){var z=B.modn(b).toString(S);B=B.idivn(b),B.isZero()?C=z+C:C=c[h-z.length]+z+C;}for(this.isZero()&&(C="0"+C);C.length%d!==0;)C="0"+C;return this.negative!==0&&(C="-"+C),C}r(!1,"Base should be between 2 and 36");},i.prototype.toNumber=function(){var S=this.words[0];return this.length===2?S+=this.words[1]*67108864:this.length===3&&this.words[2]===1?S+=4503599627370496+this.words[1]*67108864:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-S:S},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(S,d){return r(typeof o!="undefined"),this.toArrayLike(o,S,d)},i.prototype.toArray=function(S,d){return this.toArrayLike(Array,S,d)},i.prototype.toArrayLike=function(S,d,C){var A=this.byteLength(),f=C||Math.max(1,A);r(A<=f,"byte array longer than desired length"),r(f>0,"Requested array length <= 0"),this.strip();var _=d==="le",M=new S(f),R,h,b=this.clone();if(_){for(h=0;!b.isZero();h++)R=b.andln(255),b.iushrn(8),M[h]=R;for(;h<f;h++)M[h]=0;}else {for(h=0;h<f-A;h++)M[h]=0;for(h=0;!b.isZero();h++)R=b.andln(255),b.iushrn(8),M[f-h-1]=R;}return M},Math.clz32?i.prototype._countBits=function(S){return 32-Math.clz32(S)}:i.prototype._countBits=function(S){var d=S,C=0;return d>=4096&&(C+=13,d>>>=13),d>=64&&(C+=7,d>>>=7),d>=8&&(C+=4,d>>>=4),d>=2&&(C+=2,d>>>=2),C+d},i.prototype._zeroBits=function(S){if(S===0)return 26;var d=S,C=0;return d&8191||(C+=13,d>>>=13),d&127||(C+=7,d>>>=7),d&15||(C+=4,d>>>=4),d&3||(C+=2,d>>>=2),d&1||C++,C},i.prototype.bitLength=function(){var S=this.words[this.length-1],d=this._countBits(S);return (this.length-1)*26+d};function w(Y){for(var S=new Array(Y.bitLength()),d=0;d<S.length;d++){var C=d/26|0,A=d%26;S[d]=(Y.words[C]&1<<A)>>>A;}return S}i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var S=0,d=0;d<this.length;d++){var C=this._zeroBits(this.words[d]);if(S+=C,C!==26)break}return S},i.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},i.prototype.toTwos=function(S){return this.negative!==0?this.abs().inotn(S).iaddn(1):this.clone()},i.prototype.fromTwos=function(S){return this.testn(S-1)?this.notn(S).iaddn(1).ineg():this.clone()},i.prototype.isNeg=function(){return this.negative!==0},i.prototype.neg=function(){return this.clone().ineg()},i.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},i.prototype.iuor=function(S){for(;this.length<S.length;)this.words[this.length++]=0;for(var d=0;d<S.length;d++)this.words[d]=this.words[d]|S.words[d];return this.strip()},i.prototype.ior=function(S){return r((this.negative|S.negative)===0),this.iuor(S)},i.prototype.or=function(S){return this.length>S.length?this.clone().ior(S):S.clone().ior(this)},i.prototype.uor=function(S){return this.length>S.length?this.clone().iuor(S):S.clone().iuor(this)},i.prototype.iuand=function(S){var d;this.length>S.length?d=S:d=this;for(var C=0;C<d.length;C++)this.words[C]=this.words[C]&S.words[C];return this.length=d.length,this.strip()},i.prototype.iand=function(S){return r((this.negative|S.negative)===0),this.iuand(S)},i.prototype.and=function(S){return this.length>S.length?this.clone().iand(S):S.clone().iand(this)},i.prototype.uand=function(S){return this.length>S.length?this.clone().iuand(S):S.clone().iuand(this)},i.prototype.iuxor=function(S){var d,C;this.length>S.length?(d=this,C=S):(d=S,C=this);for(var A=0;A<C.length;A++)this.words[A]=d.words[A]^C.words[A];if(this!==d)for(;A<d.length;A++)this.words[A]=d.words[A];return this.length=d.length,this.strip()},i.prototype.ixor=function(S){return r((this.negative|S.negative)===0),this.iuxor(S)},i.prototype.xor=function(S){return this.length>S.length?this.clone().ixor(S):S.clone().ixor(this)},i.prototype.uxor=function(S){return this.length>S.length?this.clone().iuxor(S):S.clone().iuxor(this)},i.prototype.inotn=function(S){r(typeof S=="number"&&S>=0);var d=Math.ceil(S/26)|0,C=S%26;this._expand(d),C>0&&d--;for(var A=0;A<d;A++)this.words[A]=~this.words[A]&67108863;return C>0&&(this.words[A]=~this.words[A]&67108863>>26-C),this.strip()},i.prototype.notn=function(S){return this.clone().inotn(S)},i.prototype.setn=function(S,d){r(typeof S=="number"&&S>=0);var C=S/26|0,A=S%26;return this._expand(C+1),d?this.words[C]=this.words[C]|1<<A:this.words[C]=this.words[C]&~(1<<A),this.strip()},i.prototype.iadd=function(S){var d;if(this.negative!==0&&S.negative===0)return this.negative=0,d=this.isub(S),this.negative^=1,this._normSign();if(this.negative===0&&S.negative!==0)return S.negative=0,d=this.isub(S),S.negative=1,d._normSign();var C,A;this.length>S.length?(C=this,A=S):(C=S,A=this);for(var f=0,_=0;_<A.length;_++)d=(C.words[_]|0)+(A.words[_]|0)+f,this.words[_]=d&67108863,f=d>>>26;for(;f!==0&&_<C.length;_++)d=(C.words[_]|0)+f,this.words[_]=d&67108863,f=d>>>26;if(this.length=C.length,f!==0)this.words[this.length]=f,this.length++;else if(C!==this)for(;_<C.length;_++)this.words[_]=C.words[_];return this},i.prototype.add=function(S){var d;return S.negative!==0&&this.negative===0?(S.negative=0,d=this.sub(S),S.negative^=1,d):S.negative===0&&this.negative!==0?(this.negative=0,d=S.sub(this),this.negative=1,d):this.length>S.length?this.clone().iadd(S):S.clone().iadd(this)},i.prototype.isub=function(S){if(S.negative!==0){S.negative=0;var d=this.iadd(S);return S.negative=1,d._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(S),this.negative=1,this._normSign();var C=this.cmp(S);if(C===0)return this.negative=0,this.length=1,this.words[0]=0,this;var A,f;C>0?(A=this,f=S):(A=S,f=this);for(var _=0,M=0;M<f.length;M++)d=(A.words[M]|0)-(f.words[M]|0)+_,_=d>>26,this.words[M]=d&67108863;for(;_!==0&&M<A.length;M++)d=(A.words[M]|0)+_,_=d>>26,this.words[M]=d&67108863;if(_===0&&M<A.length&&A!==this)for(;M<A.length;M++)this.words[M]=A.words[M];return this.length=Math.max(this.length,M),A!==this&&(this.negative=1),this.strip()},i.prototype.sub=function(S){return this.clone().isub(S)};function T(Y,S,d){d.negative=S.negative^Y.negative;var C=Y.length+S.length|0;d.length=C,C=C-1|0;var A=Y.words[0]|0,f=S.words[0]|0,_=A*f,M=_&67108863,R=_/67108864|0;d.words[0]=M;for(var h=1;h<C;h++){for(var b=R>>>26,B=R&67108863,z=Math.min(h,S.length-1),P=Math.max(0,h-Y.length+1);P<=z;P++){var V=h-P|0;A=Y.words[V]|0,f=S.words[P]|0,_=A*f+B,b+=_/67108864|0,B=_&67108863;}d.words[h]=B|0,R=b|0;}return R!==0?d.words[h]=R|0:d.length--,d.strip()}var x=function(S,d,C){var A=S.words,f=d.words,_=C.words,M=0,R,h,b,B=A[0]|0,z=B&8191,P=B>>>13,V=A[1]|0,fe=V&8191,ye=V>>>13,Ce=A[2]|0,ae=Ce&8191,ie=Ce>>>13,he=A[3]|0,Be=he&8191,Re=he>>>13,J=A[4]|0,ee=J&8191,de=J>>>13,xe=A[5]|0,Pe=xe&8191,Oe=xe>>>13,He=A[6]|0,St=He&8191,Fe=He>>>13,ze=A[7]|0,Tt=ze&8191,Ge=ze>>>13,We=A[8]|0,Pt=We&8191,O=We>>>13,p=A[9]|0,E=p&8191,U=p>>>13,$=f[0]|0,X=$&8191,te=$>>>13,Se=f[1]|0,Ve=Se&8191,Ie=Se>>>13,De=f[2]|0,qe=De&8191,it=De>>>13,mt=f[3]|0,nr=mt&8191,nt=mt>>>13,vt=f[4]|0,ir=vt&8191,Je=vt>>>13,ht=f[5]|0,or=ht&8191,_e=ht>>>13,dt=f[6]|0,ar=dt&8191,ot=dt>>>13,tt=f[7]|0,er=tt&8191,at=tt>>>13,ft=f[8]|0,tr=ft&8191,rt=ft>>>13,bt=f[9]|0,It=bt&8191,Ze=bt>>>13;C.negative=S.negative^d.negative,C.length=19,R=Math.imul(z,X),h=Math.imul(z,te),h=h+Math.imul(P,X)|0,b=Math.imul(P,te);var lt=(M+R|0)+((h&8191)<<13)|0;M=(b+(h>>>13)|0)+(lt>>>26)|0,lt&=67108863,R=Math.imul(fe,X),h=Math.imul(fe,te),h=h+Math.imul(ye,X)|0,b=Math.imul(ye,te),R=R+Math.imul(z,Ve)|0,h=h+Math.imul(z,Ie)|0,h=h+Math.imul(P,Ve)|0,b=b+Math.imul(P,Ie)|0;var jr=(M+R|0)+((h&8191)<<13)|0;M=(b+(h>>>13)|0)+(jr>>>26)|0,jr&=67108863,R=Math.imul(ae,X),h=Math.imul(ae,te),h=h+Math.imul(ie,X)|0,b=Math.imul(ie,te),R=R+Math.imul(fe,Ve)|0,h=h+Math.imul(fe,Ie)|0,h=h+Math.imul(ye,Ve)|0,b=b+Math.imul(ye,Ie)|0,R=R+Math.imul(z,qe)|0,h=h+Math.imul(z,it)|0,h=h+Math.imul(P,qe)|0,b=b+Math.imul(P,it)|0;var qt=(M+R|0)+((h&8191)<<13)|0;M=(b+(h>>>13)|0)+(qt>>>26)|0,qt&=67108863,R=Math.imul(Be,X),h=Math.imul(Be,te),h=h+Math.imul(Re,X)|0,b=Math.imul(Re,te),R=R+Math.imul(ae,Ve)|0,h=h+Math.imul(ae,Ie)|0,h=h+Math.imul(ie,Ve)|0,b=b+Math.imul(ie,Ie)|0,R=R+Math.imul(fe,qe)|0,h=h+Math.imul(fe,it)|0,h=h+Math.imul(ye,qe)|0,b=b+Math.imul(ye,it)|0,R=R+Math.imul(z,nr)|0,h=h+Math.imul(z,nt)|0,h=h+Math.imul(P,nr)|0,b=b+Math.imul(P,nt)|0;var Ft=(M+R|0)+((h&8191)<<13)|0;M=(b+(h>>>13)|0)+(Ft>>>26)|0,Ft&=67108863,R=Math.imul(ee,X),h=Math.imul(ee,te),h=h+Math.imul(de,X)|0,b=Math.imul(de,te),R=R+Math.imul(Be,Ve)|0,h=h+Math.imul(Be,Ie)|0,h=h+Math.imul(Re,Ve)|0,b=b+Math.imul(Re,Ie)|0,R=R+Math.imul(ae,qe)|0,h=h+Math.imul(ae,it)|0,h=h+Math.imul(ie,qe)|0,b=b+Math.imul(ie,it)|0,R=R+Math.imul(fe,nr)|0,h=h+Math.imul(fe,nt)|0,h=h+Math.imul(ye,nr)|0,b=b+Math.imul(ye,nt)|0,R=R+Math.imul(z,ir)|0,h=h+Math.imul(z,Je)|0,h=h+Math.imul(P,ir)|0,b=b+Math.imul(P,Je)|0;var ci=(M+R|0)+((h&8191)<<13)|0;M=(b+(h>>>13)|0)+(ci>>>26)|0,ci&=67108863,R=Math.imul(Pe,X),h=Math.imul(Pe,te),h=h+Math.imul(Oe,X)|0,b=Math.imul(Oe,te),R=R+Math.imul(ee,Ve)|0,h=h+Math.imul(ee,Ie)|0,h=h+Math.imul(de,Ve)|0,b=b+Math.imul(de,Ie)|0,R=R+Math.imul(Be,qe)|0,h=h+Math.imul(Be,it)|0,h=h+Math.imul(Re,qe)|0,b=b+Math.imul(Re,it)|0,R=R+Math.imul(ae,nr)|0,h=h+Math.imul(ae,nt)|0,h=h+Math.imul(ie,nr)|0,b=b+Math.imul(ie,nt)|0,R=R+Math.imul(fe,ir)|0,h=h+Math.imul(fe,Je)|0,h=h+Math.imul(ye,ir)|0,b=b+Math.imul(ye,Je)|0,R=R+Math.imul(z,or)|0,h=h+Math.imul(z,_e)|0,h=h+Math.imul(P,or)|0,b=b+Math.imul(P,_e)|0;var ui=(M+R|0)+((h&8191)<<13)|0;M=(b+(h>>>13)|0)+(ui>>>26)|0,ui&=67108863,R=Math.imul(St,X),h=Math.imul(St,te),h=h+Math.imul(Fe,X)|0,b=Math.imul(Fe,te),R=R+Math.imul(Pe,Ve)|0,h=h+Math.imul(Pe,Ie)|0,h=h+Math.imul(Oe,Ve)|0,b=b+Math.imul(Oe,Ie)|0,R=R+Math.imul(ee,qe)|0,h=h+Math.imul(ee,it)|0,h=h+Math.imul(de,qe)|0,b=b+Math.imul(de,it)|0,R=R+Math.imul(Be,nr)|0,h=h+Math.imul(Be,nt)|0,h=h+Math.imul(Re,nr)|0,b=b+Math.imul(Re,nt)|0,R=R+Math.imul(ae,ir)|0,h=h+Math.imul(ae,Je)|0,h=h+Math.imul(ie,ir)|0,b=b+Math.imul(ie,Je)|0,R=R+Math.imul(fe,or)|0,h=h+Math.imul(fe,_e)|0,h=h+Math.imul(ye,or)|0,b=b+Math.imul(ye,_e)|0,R=R+Math.imul(z,ar)|0,h=h+Math.imul(z,ot)|0,h=h+Math.imul(P,ar)|0,b=b+Math.imul(P,ot)|0;var li=(M+R|0)+((h&8191)<<13)|0;M=(b+(h>>>13)|0)+(li>>>26)|0,li&=67108863,R=Math.imul(Tt,X),h=Math.imul(Tt,te),h=h+Math.imul(Ge,X)|0,b=Math.imul(Ge,te),R=R+Math.imul(St,Ve)|0,h=h+Math.imul(St,Ie)|0,h=h+Math.imul(Fe,Ve)|0,b=b+Math.imul(Fe,Ie)|0,R=R+Math.imul(Pe,qe)|0,h=h+Math.imul(Pe,it)|0,h=h+Math.imul(Oe,qe)|0,b=b+Math.imul(Oe,it)|0,R=R+Math.imul(ee,nr)|0,h=h+Math.imul(ee,nt)|0,h=h+Math.imul(de,nr)|0,b=b+Math.imul(de,nt)|0,R=R+Math.imul(Be,ir)|0,h=h+Math.imul(Be,Je)|0,h=h+Math.imul(Re,ir)|0,b=b+Math.imul(Re,Je)|0,R=R+Math.imul(ae,or)|0,h=h+Math.imul(ae,_e)|0,h=h+Math.imul(ie,or)|0,b=b+Math.imul(ie,_e)|0,R=R+Math.imul(fe,ar)|0,h=h+Math.imul(fe,ot)|0,h=h+Math.imul(ye,ar)|0,b=b+Math.imul(ye,ot)|0,R=R+Math.imul(z,er)|0,h=h+Math.imul(z,at)|0,h=h+Math.imul(P,er)|0,b=b+Math.imul(P,at)|0;var Kn=(M+R|0)+((h&8191)<<13)|0;M=(b+(h>>>13)|0)+(Kn>>>26)|0,Kn&=67108863,R=Math.imul(Pt,X),h=Math.imul(Pt,te),h=h+Math.imul(O,X)|0,b=Math.imul(O,te),R=R+Math.imul(Tt,Ve)|0,h=h+Math.imul(Tt,Ie)|0,h=h+Math.imul(Ge,Ve)|0,b=b+Math.imul(Ge,Ie)|0,R=R+Math.imul(St,qe)|0,h=h+Math.imul(St,it)|0,h=h+Math.imul(Fe,qe)|0,b=b+Math.imul(Fe,it)|0,R=R+Math.imul(Pe,nr)|0,h=h+Math.imul(Pe,nt)|0,h=h+Math.imul(Oe,nr)|0,b=b+Math.imul(Oe,nt)|0,R=R+Math.imul(ee,ir)|0,h=h+Math.imul(ee,Je)|0,h=h+Math.imul(de,ir)|0,b=b+Math.imul(de,Je)|0,R=R+Math.imul(Be,or)|0,h=h+Math.imul(Be,_e)|0,h=h+Math.imul(Re,or)|0,b=b+Math.imul(Re,_e)|0,R=R+Math.imul(ae,ar)|0,h=h+Math.imul(ae,ot)|0,h=h+Math.imul(ie,ar)|0,b=b+Math.imul(ie,ot)|0,R=R+Math.imul(fe,er)|0,h=h+Math.imul(fe,at)|0,h=h+Math.imul(ye,er)|0,b=b+Math.imul(ye,at)|0,R=R+Math.imul(z,tr)|0,h=h+Math.imul(z,rt)|0,h=h+Math.imul(P,tr)|0,b=b+Math.imul(P,rt)|0;var gr=(M+R|0)+((h&8191)<<13)|0;M=(b+(h>>>13)|0)+(gr>>>26)|0,gr&=67108863,R=Math.imul(E,X),h=Math.imul(E,te),h=h+Math.imul(U,X)|0,b=Math.imul(U,te),R=R+Math.imul(Pt,Ve)|0,h=h+Math.imul(Pt,Ie)|0,h=h+Math.imul(O,Ve)|0,b=b+Math.imul(O,Ie)|0,R=R+Math.imul(Tt,qe)|0,h=h+Math.imul(Tt,it)|0,h=h+Math.imul(Ge,qe)|0,b=b+Math.imul(Ge,it)|0,R=R+Math.imul(St,nr)|0,h=h+Math.imul(St,nt)|0,h=h+Math.imul(Fe,nr)|0,b=b+Math.imul(Fe,nt)|0,R=R+Math.imul(Pe,ir)|0,h=h+Math.imul(Pe,Je)|0,h=h+Math.imul(Oe,ir)|0,b=b+Math.imul(Oe,Je)|0,R=R+Math.imul(ee,or)|0,h=h+Math.imul(ee,_e)|0,h=h+Math.imul(de,or)|0,b=b+Math.imul(de,_e)|0,R=R+Math.imul(Be,ar)|0,h=h+Math.imul(Be,ot)|0,h=h+Math.imul(Re,ar)|0,b=b+Math.imul(Re,ot)|0,R=R+Math.imul(ae,er)|0,h=h+Math.imul(ae,at)|0,h=h+Math.imul(ie,er)|0,b=b+Math.imul(ie,at)|0,R=R+Math.imul(fe,tr)|0,h=h+Math.imul(fe,rt)|0,h=h+Math.imul(ye,tr)|0,b=b+Math.imul(ye,rt)|0,R=R+Math.imul(z,It)|0,h=h+Math.imul(z,Ze)|0,h=h+Math.imul(P,It)|0,b=b+Math.imul(P,Ze)|0;var fi=(M+R|0)+((h&8191)<<13)|0;M=(b+(h>>>13)|0)+(fi>>>26)|0,fi&=67108863,R=Math.imul(E,Ve),h=Math.imul(E,Ie),h=h+Math.imul(U,Ve)|0,b=Math.imul(U,Ie),R=R+Math.imul(Pt,qe)|0,h=h+Math.imul(Pt,it)|0,h=h+Math.imul(O,qe)|0,b=b+Math.imul(O,it)|0,R=R+Math.imul(Tt,nr)|0,h=h+Math.imul(Tt,nt)|0,h=h+Math.imul(Ge,nr)|0,b=b+Math.imul(Ge,nt)|0,R=R+Math.imul(St,ir)|0,h=h+Math.imul(St,Je)|0,h=h+Math.imul(Fe,ir)|0,b=b+Math.imul(Fe,Je)|0,R=R+Math.imul(Pe,or)|0,h=h+Math.imul(Pe,_e)|0,h=h+Math.imul(Oe,or)|0,b=b+Math.imul(Oe,_e)|0,R=R+Math.imul(ee,ar)|0,h=h+Math.imul(ee,ot)|0,h=h+Math.imul(de,ar)|0,b=b+Math.imul(de,ot)|0,R=R+Math.imul(Be,er)|0,h=h+Math.imul(Be,at)|0,h=h+Math.imul(Re,er)|0,b=b+Math.imul(Re,at)|0,R=R+Math.imul(ae,tr)|0,h=h+Math.imul(ae,rt)|0,h=h+Math.imul(ie,tr)|0,b=b+Math.imul(ie,rt)|0,R=R+Math.imul(fe,It)|0,h=h+Math.imul(fe,Ze)|0,h=h+Math.imul(ye,It)|0,b=b+Math.imul(ye,Ze)|0;var Sr=(M+R|0)+((h&8191)<<13)|0;M=(b+(h>>>13)|0)+(Sr>>>26)|0,Sr&=67108863,R=Math.imul(E,qe),h=Math.imul(E,it),h=h+Math.imul(U,qe)|0,b=Math.imul(U,it),R=R+Math.imul(Pt,nr)|0,h=h+Math.imul(Pt,nt)|0,h=h+Math.imul(O,nr)|0,b=b+Math.imul(O,nt)|0,R=R+Math.imul(Tt,ir)|0,h=h+Math.imul(Tt,Je)|0,h=h+Math.imul(Ge,ir)|0,b=b+Math.imul(Ge,Je)|0,R=R+Math.imul(St,or)|0,h=h+Math.imul(St,_e)|0,h=h+Math.imul(Fe,or)|0,b=b+Math.imul(Fe,_e)|0,R=R+Math.imul(Pe,ar)|0,h=h+Math.imul(Pe,ot)|0,h=h+Math.imul(Oe,ar)|0,b=b+Math.imul(Oe,ot)|0,R=R+Math.imul(ee,er)|0,h=h+Math.imul(ee,at)|0,h=h+Math.imul(de,er)|0,b=b+Math.imul(de,at)|0,R=R+Math.imul(Be,tr)|0,h=h+Math.imul(Be,rt)|0,h=h+Math.imul(Re,tr)|0,b=b+Math.imul(Re,rt)|0,R=R+Math.imul(ae,It)|0,h=h+Math.imul(ae,Ze)|0,h=h+Math.imul(ie,It)|0,b=b+Math.imul(ie,Ze)|0;var di=(M+R|0)+((h&8191)<<13)|0;M=(b+(h>>>13)|0)+(di>>>26)|0,di&=67108863,R=Math.imul(E,nr),h=Math.imul(E,nt),h=h+Math.imul(U,nr)|0,b=Math.imul(U,nt),R=R+Math.imul(Pt,ir)|0,h=h+Math.imul(Pt,Je)|0,h=h+Math.imul(O,ir)|0,b=b+Math.imul(O,Je)|0,R=R+Math.imul(Tt,or)|0,h=h+Math.imul(Tt,_e)|0,h=h+Math.imul(Ge,or)|0,b=b+Math.imul(Ge,_e)|0,R=R+Math.imul(St,ar)|0,h=h+Math.imul(St,ot)|0,h=h+Math.imul(Fe,ar)|0,b=b+Math.imul(Fe,ot)|0,R=R+Math.imul(Pe,er)|0,h=h+Math.imul(Pe,at)|0,h=h+Math.imul(Oe,er)|0,b=b+Math.imul(Oe,at)|0,R=R+Math.imul(ee,tr)|0,h=h+Math.imul(ee,rt)|0,h=h+Math.imul(de,tr)|0,b=b+Math.imul(de,rt)|0,R=R+Math.imul(Be,It)|0,h=h+Math.imul(Be,Ze)|0,h=h+Math.imul(Re,It)|0,b=b+Math.imul(Re,Ze)|0;var vr=(M+R|0)+((h&8191)<<13)|0;M=(b+(h>>>13)|0)+(vr>>>26)|0,vr&=67108863,R=Math.imul(E,ir),h=Math.imul(E,Je),h=h+Math.imul(U,ir)|0,b=Math.imul(U,Je),R=R+Math.imul(Pt,or)|0,h=h+Math.imul(Pt,_e)|0,h=h+Math.imul(O,or)|0,b=b+Math.imul(O,_e)|0,R=R+Math.imul(Tt,ar)|0,h=h+Math.imul(Tt,ot)|0,h=h+Math.imul(Ge,ar)|0,b=b+Math.imul(Ge,ot)|0,R=R+Math.imul(St,er)|0,h=h+Math.imul(St,at)|0,h=h+Math.imul(Fe,er)|0,b=b+Math.imul(Fe,at)|0,R=R+Math.imul(Pe,tr)|0,h=h+Math.imul(Pe,rt)|0,h=h+Math.imul(Oe,tr)|0,b=b+Math.imul(Oe,rt)|0,R=R+Math.imul(ee,It)|0,h=h+Math.imul(ee,Ze)|0,h=h+Math.imul(de,It)|0,b=b+Math.imul(de,Ze)|0;var Wn=(M+R|0)+((h&8191)<<13)|0;M=(b+(h>>>13)|0)+(Wn>>>26)|0,Wn&=67108863,R=Math.imul(E,or),h=Math.imul(E,_e),h=h+Math.imul(U,or)|0,b=Math.imul(U,_e),R=R+Math.imul(Pt,ar)|0,h=h+Math.imul(Pt,ot)|0,h=h+Math.imul(O,ar)|0,b=b+Math.imul(O,ot)|0,R=R+Math.imul(Tt,er)|0,h=h+Math.imul(Tt,at)|0,h=h+Math.imul(Ge,er)|0,b=b+Math.imul(Ge,at)|0,R=R+Math.imul(St,tr)|0,h=h+Math.imul(St,rt)|0,h=h+Math.imul(Fe,tr)|0,b=b+Math.imul(Fe,rt)|0,R=R+Math.imul(Pe,It)|0,h=h+Math.imul(Pe,Ze)|0,h=h+Math.imul(Oe,It)|0,b=b+Math.imul(Oe,Ze)|0;var W=(M+R|0)+((h&8191)<<13)|0;M=(b+(h>>>13)|0)+(W>>>26)|0,W&=67108863,R=Math.imul(E,ar),h=Math.imul(E,ot),h=h+Math.imul(U,ar)|0,b=Math.imul(U,ot),R=R+Math.imul(Pt,er)|0,h=h+Math.imul(Pt,at)|0,h=h+Math.imul(O,er)|0,b=b+Math.imul(O,at)|0,R=R+Math.imul(Tt,tr)|0,h=h+Math.imul(Tt,rt)|0,h=h+Math.imul(Ge,tr)|0,b=b+Math.imul(Ge,rt)|0,R=R+Math.imul(St,It)|0,h=h+Math.imul(St,Ze)|0,h=h+Math.imul(Fe,It)|0,b=b+Math.imul(Fe,Ze)|0;var F=(M+R|0)+((h&8191)<<13)|0;M=(b+(h>>>13)|0)+(F>>>26)|0,F&=67108863,R=Math.imul(E,er),h=Math.imul(E,at),h=h+Math.imul(U,er)|0,b=Math.imul(U,at),R=R+Math.imul(Pt,tr)|0,h=h+Math.imul(Pt,rt)|0,h=h+Math.imul(O,tr)|0,b=b+Math.imul(O,rt)|0,R=R+Math.imul(Tt,It)|0,h=h+Math.imul(Tt,Ze)|0,h=h+Math.imul(Ge,It)|0,b=b+Math.imul(Ge,Ze)|0;var H=(M+R|0)+((h&8191)<<13)|0;M=(b+(h>>>13)|0)+(H>>>26)|0,H&=67108863,R=Math.imul(E,tr),h=Math.imul(E,rt),h=h+Math.imul(U,tr)|0,b=Math.imul(U,rt),R=R+Math.imul(Pt,It)|0,h=h+Math.imul(Pt,Ze)|0,h=h+Math.imul(O,It)|0,b=b+Math.imul(O,Ze)|0;var G=(M+R|0)+((h&8191)<<13)|0;M=(b+(h>>>13)|0)+(G>>>26)|0,G&=67108863,R=Math.imul(E,It),h=Math.imul(E,Ze),h=h+Math.imul(U,It)|0,b=Math.imul(U,Ze);var Q=(M+R|0)+((h&8191)<<13)|0;return M=(b+(h>>>13)|0)+(Q>>>26)|0,Q&=67108863,_[0]=lt,_[1]=jr,_[2]=qt,_[3]=Ft,_[4]=ci,_[5]=ui,_[6]=li,_[7]=Kn,_[8]=gr,_[9]=fi,_[10]=Sr,_[11]=di,_[12]=vr,_[13]=Wn,_[14]=W,_[15]=F,_[16]=H,_[17]=G,_[18]=Q,M!==0&&(_[19]=M,C.length++),C};Math.imul||(x=T);function I(Y,S,d){d.negative=S.negative^Y.negative,d.length=Y.length+S.length;for(var C=0,A=0,f=0;f<d.length-1;f++){var _=A;A=0;for(var M=C&67108863,R=Math.min(f,S.length-1),h=Math.max(0,f-Y.length+1);h<=R;h++){var b=f-h,B=Y.words[b]|0,z=S.words[h]|0,P=B*z,V=P&67108863;_=_+(P/67108864|0)|0,V=V+M|0,M=V&67108863,_=_+(V>>>26)|0,A+=_>>>26,_&=67108863;}d.words[f]=M,C=_,_=A;}return C!==0?d.words[f]=C:d.length--,d.strip()}function k(Y,S,d){var C=new q;return C.mulp(Y,S,d)}i.prototype.mulTo=function(S,d){var C,A=this.length+S.length;return this.length===10&&S.length===10?C=x(this,S,d):A<63?C=T(this,S,d):A<1024?C=I(this,S,d):C=k(this,S,d),C};function q(Y,S){this.x=Y,this.y=S;}q.prototype.makeRBT=function(S){for(var d=new Array(S),C=i.prototype._countBits(S)-1,A=0;A<S;A++)d[A]=this.revBin(A,C,S);return d},q.prototype.revBin=function(S,d,C){if(S===0||S===C-1)return S;for(var A=0,f=0;f<d;f++)A|=(S&1)<<d-f-1,S>>=1;return A},q.prototype.permute=function(S,d,C,A,f,_){for(var M=0;M<_;M++)A[M]=d[S[M]],f[M]=C[S[M]];},q.prototype.transform=function(S,d,C,A,f,_){this.permute(_,S,d,C,A,f);for(var M=1;M<f;M<<=1)for(var R=M<<1,h=Math.cos(2*Math.PI/R),b=Math.sin(2*Math.PI/R),B=0;B<f;B+=R)for(var z=h,P=b,V=0;V<M;V++){var fe=C[B+V],ye=A[B+V],Ce=C[B+V+M],ae=A[B+V+M],ie=z*Ce-P*ae;ae=z*ae+P*Ce,Ce=ie,C[B+V]=fe+Ce,A[B+V]=ye+ae,C[B+V+M]=fe-Ce,A[B+V+M]=ye-ae,V!==R&&(ie=h*z-b*P,P=h*P+b*z,z=ie);}},q.prototype.guessLen13b=function(S,d){var C=Math.max(d,S)|1,A=C&1,f=0;for(C=C/2|0;C;C=C>>>1)f++;return 1<<f+1+A},q.prototype.conjugate=function(S,d,C){if(!(C<=1))for(var A=0;A<C/2;A++){var f=S[A];S[A]=S[C-A-1],S[C-A-1]=f,f=d[A],d[A]=-d[C-A-1],d[C-A-1]=-f;}},q.prototype.normalize13b=function(S,d){for(var C=0,A=0;A<d/2;A++){var f=Math.round(S[2*A+1]/d)*8192+Math.round(S[2*A]/d)+C;S[A]=f&67108863,f<67108864?C=0:C=f/67108864|0;}return S},q.prototype.convert13b=function(S,d,C,A){for(var f=0,_=0;_<d;_++)f=f+(S[_]|0),C[2*_]=f&8191,f=f>>>13,C[2*_+1]=f&8191,f=f>>>13;for(_=2*d;_<A;++_)C[_]=0;r(f===0),r((f&-8192)===0);},q.prototype.stub=function(S){for(var d=new Array(S),C=0;C<S;C++)d[C]=0;return d},q.prototype.mulp=function(S,d,C){var A=2*this.guessLen13b(S.length,d.length),f=this.makeRBT(A),_=this.stub(A),M=new Array(A),R=new Array(A),h=new Array(A),b=new Array(A),B=new Array(A),z=new Array(A),P=C.words;P.length=A,this.convert13b(S.words,S.length,M,A),this.convert13b(d.words,d.length,b,A),this.transform(M,_,R,h,A,f),this.transform(b,_,B,z,A,f);for(var V=0;V<A;V++){var fe=R[V]*B[V]-h[V]*z[V];h[V]=R[V]*z[V]+h[V]*B[V],R[V]=fe;}return this.conjugate(R,h,A),this.transform(R,h,P,_,A,f),this.conjugate(P,_,A),this.normalize13b(P,A),C.negative=S.negative^d.negative,C.length=S.length+d.length,C.strip()},i.prototype.mul=function(S){var d=new i(null);return d.words=new Array(this.length+S.length),this.mulTo(S,d)},i.prototype.mulf=function(S){var d=new i(null);return d.words=new Array(this.length+S.length),k(this,S,d)},i.prototype.imul=function(S){return this.clone().mulTo(S,this)},i.prototype.imuln=function(S){r(typeof S=="number"),r(S<67108864);for(var d=0,C=0;C<this.length;C++){var A=(this.words[C]|0)*S,f=(A&67108863)+(d&67108863);d>>=26,d+=A/67108864|0,d+=f>>>26,this.words[C]=f&67108863;}return d!==0&&(this.words[C]=d,this.length++),this},i.prototype.muln=function(S){return this.clone().imuln(S)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(S){var d=w(S);if(d.length===0)return new i(1);for(var C=this,A=0;A<d.length&&d[A]===0;A++,C=C.sqr());if(++A<d.length)for(var f=C.sqr();A<d.length;A++,f=f.sqr())d[A]!==0&&(C=C.mul(f));return C},i.prototype.iushln=function(S){r(typeof S=="number"&&S>=0);var d=S%26,C=(S-d)/26,A=67108863>>>26-d<<26-d,f;if(d!==0){var _=0;for(f=0;f<this.length;f++){var M=this.words[f]&A,R=(this.words[f]|0)-M<<d;this.words[f]=R|_,_=M>>>26-d;}_&&(this.words[f]=_,this.length++);}if(C!==0){for(f=this.length-1;f>=0;f--)this.words[f+C]=this.words[f];for(f=0;f<C;f++)this.words[f]=0;this.length+=C;}return this.strip()},i.prototype.ishln=function(S){return r(this.negative===0),this.iushln(S)},i.prototype.iushrn=function(S,d,C){r(typeof S=="number"&&S>=0);var A;d?A=(d-d%26)/26:A=0;var f=S%26,_=Math.min((S-f)/26,this.length),M=67108863^67108863>>>f<<f,R=C;if(A-=_,A=Math.max(0,A),R){for(var h=0;h<_;h++)R.words[h]=this.words[h];R.length=_;}if(_!==0)if(this.length>_)for(this.length-=_,h=0;h<this.length;h++)this.words[h]=this.words[h+_];else this.words[0]=0,this.length=1;var b=0;for(h=this.length-1;h>=0&&(b!==0||h>=A);h--){var B=this.words[h]|0;this.words[h]=b<<26-f|B>>>f,b=B&M;}return R&&b!==0&&(R.words[R.length++]=b),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(S,d,C){return r(this.negative===0),this.iushrn(S,d,C)},i.prototype.shln=function(S){return this.clone().ishln(S)},i.prototype.ushln=function(S){return this.clone().iushln(S)},i.prototype.shrn=function(S){return this.clone().ishrn(S)},i.prototype.ushrn=function(S){return this.clone().iushrn(S)},i.prototype.testn=function(S){r(typeof S=="number"&&S>=0);var d=S%26,C=(S-d)/26,A=1<<d;if(this.length<=C)return !1;var f=this.words[C];return !!(f&A)},i.prototype.imaskn=function(S){r(typeof S=="number"&&S>=0);var d=S%26,C=(S-d)/26;if(r(this.negative===0,"imaskn works only with positive numbers"),this.length<=C)return this;if(d!==0&&C++,this.length=Math.min(C,this.length),d!==0){var A=67108863^67108863>>>d<<d;this.words[this.length-1]&=A;}return this.strip()},i.prototype.maskn=function(S){return this.clone().imaskn(S)},i.prototype.iaddn=function(S){return r(typeof S=="number"),r(S<67108864),S<0?this.isubn(-S):this.negative!==0?this.length===1&&(this.words[0]|0)<S?(this.words[0]=S-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(S),this.negative=1,this):this._iaddn(S)},i.prototype._iaddn=function(S){this.words[0]+=S;for(var d=0;d<this.length&&this.words[d]>=67108864;d++)this.words[d]-=67108864,d===this.length-1?this.words[d+1]=1:this.words[d+1]++;return this.length=Math.max(this.length,d+1),this},i.prototype.isubn=function(S){if(r(typeof S=="number"),r(S<67108864),S<0)return this.iaddn(-S);if(this.negative!==0)return this.negative=0,this.iaddn(S),this.negative=1,this;if(this.words[0]-=S,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var d=0;d<this.length&&this.words[d]<0;d++)this.words[d]+=67108864,this.words[d+1]-=1;return this.strip()},i.prototype.addn=function(S){return this.clone().iaddn(S)},i.prototype.subn=function(S){return this.clone().isubn(S)},i.prototype.iabs=function(){return this.negative=0,this},i.prototype.abs=function(){return this.clone().iabs()},i.prototype._ishlnsubmul=function(S,d,C){var A=S.length+C,f;this._expand(A);var _,M=0;for(f=0;f<S.length;f++){_=(this.words[f+C]|0)+M;var R=(S.words[f]|0)*d;_-=R&67108863,M=(_>>26)-(R/67108864|0),this.words[f+C]=_&67108863;}for(;f<this.length-C;f++)_=(this.words[f+C]|0)+M,M=_>>26,this.words[f+C]=_&67108863;if(M===0)return this.strip();for(r(M===-1),M=0,f=0;f<this.length;f++)_=-(this.words[f]|0)+M,M=_>>26,this.words[f]=_&67108863;return this.negative=1,this.strip()},i.prototype._wordDiv=function(S,d){var C=this.length-S.length,A=this.clone(),f=S,_=f.words[f.length-1]|0,M=this._countBits(_);C=26-M,C!==0&&(f=f.ushln(C),A.iushln(C),_=f.words[f.length-1]|0);var R=A.length-f.length,h;if(d!=="mod"){h=new i(null),h.length=R+1,h.words=new Array(h.length);for(var b=0;b<h.length;b++)h.words[b]=0;}var B=A.clone()._ishlnsubmul(f,1,R);B.negative===0&&(A=B,h&&(h.words[R]=1));for(var z=R-1;z>=0;z--){var P=(A.words[f.length+z]|0)*67108864+(A.words[f.length+z-1]|0);for(P=Math.min(P/_|0,67108863),A._ishlnsubmul(f,P,z);A.negative!==0;)P--,A.negative=0,A._ishlnsubmul(f,1,z),A.isZero()||(A.negative^=1);h&&(h.words[z]=P);}return h&&h.strip(),A.strip(),d!=="div"&&C!==0&&A.iushrn(C),{div:h||null,mod:A}},i.prototype.divmod=function(S,d,C){if(r(!S.isZero()),this.isZero())return {div:new i(0),mod:new i(0)};var A,f,_;return this.negative!==0&&S.negative===0?(_=this.neg().divmod(S,d),d!=="mod"&&(A=_.div.neg()),d!=="div"&&(f=_.mod.neg(),C&&f.negative!==0&&f.iadd(S)),{div:A,mod:f}):this.negative===0&&S.negative!==0?(_=this.divmod(S.neg(),d),d!=="mod"&&(A=_.div.neg()),{div:A,mod:_.mod}):this.negative&S.negative?(_=this.neg().divmod(S.neg(),d),d!=="div"&&(f=_.mod.neg(),C&&f.negative!==0&&f.isub(S)),{div:_.div,mod:f}):S.length>this.length||this.cmp(S)<0?{div:new i(0),mod:this}:S.length===1?d==="div"?{div:this.divn(S.words[0]),mod:null}:d==="mod"?{div:null,mod:new i(this.modn(S.words[0]))}:{div:this.divn(S.words[0]),mod:new i(this.modn(S.words[0]))}:this._wordDiv(S,d)},i.prototype.div=function(S){return this.divmod(S,"div",!1).div},i.prototype.mod=function(S){return this.divmod(S,"mod",!1).mod},i.prototype.umod=function(S){return this.divmod(S,"mod",!0).mod},i.prototype.divRound=function(S){var d=this.divmod(S);if(d.mod.isZero())return d.div;var C=d.div.negative!==0?d.mod.isub(S):d.mod,A=S.ushrn(1),f=S.andln(1),_=C.cmp(A);return _<0||f===1&&_===0?d.div:d.div.negative!==0?d.div.isubn(1):d.div.iaddn(1)},i.prototype.modn=function(S){r(S<=67108863);for(var d=(1<<26)%S,C=0,A=this.length-1;A>=0;A--)C=(d*C+(this.words[A]|0))%S;return C},i.prototype.idivn=function(S){r(S<=67108863);for(var d=0,C=this.length-1;C>=0;C--){var A=(this.words[C]|0)+d*67108864;this.words[C]=A/S|0,d=A%S;}return this.strip()},i.prototype.divn=function(S){return this.clone().idivn(S)},i.prototype.egcd=function(S){r(S.negative===0),r(!S.isZero());var d=this,C=S.clone();d.negative!==0?d=d.umod(S):d=d.clone();for(var A=new i(1),f=new i(0),_=new i(0),M=new i(1),R=0;d.isEven()&&C.isEven();)d.iushrn(1),C.iushrn(1),++R;for(var h=C.clone(),b=d.clone();!d.isZero();){for(var B=0,z=1;!(d.words[0]&z)&&B<26;++B,z<<=1);if(B>0)for(d.iushrn(B);B-- >0;)(A.isOdd()||f.isOdd())&&(A.iadd(h),f.isub(b)),A.iushrn(1),f.iushrn(1);for(var P=0,V=1;!(C.words[0]&V)&&P<26;++P,V<<=1);if(P>0)for(C.iushrn(P);P-- >0;)(_.isOdd()||M.isOdd())&&(_.iadd(h),M.isub(b)),_.iushrn(1),M.iushrn(1);d.cmp(C)>=0?(d.isub(C),A.isub(_),f.isub(M)):(C.isub(d),_.isub(A),M.isub(f));}return {a:_,b:M,gcd:C.iushln(R)}},i.prototype._invmp=function(S){r(S.negative===0),r(!S.isZero());var d=this,C=S.clone();d.negative!==0?d=d.umod(S):d=d.clone();for(var A=new i(1),f=new i(0),_=C.clone();d.cmpn(1)>0&&C.cmpn(1)>0;){for(var M=0,R=1;!(d.words[0]&R)&&M<26;++M,R<<=1);if(M>0)for(d.iushrn(M);M-- >0;)A.isOdd()&&A.iadd(_),A.iushrn(1);for(var h=0,b=1;!(C.words[0]&b)&&h<26;++h,b<<=1);if(h>0)for(C.iushrn(h);h-- >0;)f.isOdd()&&f.iadd(_),f.iushrn(1);d.cmp(C)>=0?(d.isub(C),A.isub(f)):(C.isub(d),f.isub(A));}var B;return d.cmpn(1)===0?B=A:B=f,B.cmpn(0)<0&&B.iadd(S),B},i.prototype.gcd=function(S){if(this.isZero())return S.abs();if(S.isZero())return this.abs();var d=this.clone(),C=S.clone();d.negative=0,C.negative=0;for(var A=0;d.isEven()&&C.isEven();A++)d.iushrn(1),C.iushrn(1);do{for(;d.isEven();)d.iushrn(1);for(;C.isEven();)C.iushrn(1);var f=d.cmp(C);if(f<0){var _=d;d=C,C=_;}else if(f===0||C.cmpn(1)===0)break;d.isub(C);}while(!0);return C.iushln(A)},i.prototype.invm=function(S){return this.egcd(S).a.umod(S)},i.prototype.isEven=function(){return (this.words[0]&1)===0},i.prototype.isOdd=function(){return (this.words[0]&1)===1},i.prototype.andln=function(S){return this.words[0]&S},i.prototype.bincn=function(S){r(typeof S=="number");var d=S%26,C=(S-d)/26,A=1<<d;if(this.length<=C)return this._expand(C+1),this.words[C]|=A,this;for(var f=A,_=C;f!==0&&_<this.length;_++){var M=this.words[_]|0;M+=f,f=M>>>26,M&=67108863,this.words[_]=M;}return f!==0&&(this.words[_]=f,this.length++),this},i.prototype.isZero=function(){return this.length===1&&this.words[0]===0},i.prototype.cmpn=function(S){var d=S<0;if(this.negative!==0&&!d)return -1;if(this.negative===0&&d)return 1;this.strip();var C;if(this.length>1)C=1;else {d&&(S=-S),r(S<=67108863,"Number is too big");var A=this.words[0]|0;C=A===S?0:A<S?-1:1;}return this.negative!==0?-C|0:C},i.prototype.cmp=function(S){if(this.negative!==0&&S.negative===0)return -1;if(this.negative===0&&S.negative!==0)return 1;var d=this.ucmp(S);return this.negative!==0?-d|0:d},i.prototype.ucmp=function(S){if(this.length>S.length)return 1;if(this.length<S.length)return -1;for(var d=0,C=this.length-1;C>=0;C--){var A=this.words[C]|0,f=S.words[C]|0;if(A!==f){A<f?d=-1:A>f&&(d=1);break}}return d},i.prototype.gtn=function(S){return this.cmpn(S)===1},i.prototype.gt=function(S){return this.cmp(S)===1},i.prototype.gten=function(S){return this.cmpn(S)>=0},i.prototype.gte=function(S){return this.cmp(S)>=0},i.prototype.ltn=function(S){return this.cmpn(S)===-1},i.prototype.lt=function(S){return this.cmp(S)===-1},i.prototype.lten=function(S){return this.cmpn(S)<=0},i.prototype.lte=function(S){return this.cmp(S)<=0},i.prototype.eqn=function(S){return this.cmpn(S)===0},i.prototype.eq=function(S){return this.cmp(S)===0},i.red=function(S){return new pe(S)},i.prototype.toRed=function(S){return r(!this.red,"Already a number in reduction context"),r(this.negative===0,"red works only with positives"),S.convertTo(this)._forceRed(S)},i.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(S){return this.red=S,this},i.prototype.forceRed=function(S){return r(!this.red,"Already a number in reduction context"),this._forceRed(S)},i.prototype.redAdd=function(S){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,S)},i.prototype.redIAdd=function(S){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,S)},i.prototype.redSub=function(S){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,S)},i.prototype.redISub=function(S){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,S)},i.prototype.redShl=function(S){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,S)},i.prototype.redMul=function(S){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,S),this.red.mul(this,S)},i.prototype.redIMul=function(S){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,S),this.red.imul(this,S)},i.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(S){return r(this.red&&!S.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,S)};var j={k256:null,p224:null,p192:null,p25519:null};function K(Y,S){this.name=Y,this.p=new i(S,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp();}K.prototype._tmp=function(){var S=new i(null);return S.words=new Array(Math.ceil(this.n/13)),S},K.prototype.ireduce=function(S){var d=S,C;do this.split(d,this.tmp),d=this.imulK(d),d=d.iadd(this.tmp),C=d.bitLength();while(C>this.n);var A=C<this.n?-1:d.ucmp(this.p);return A===0?(d.words[0]=0,d.length=1):A>0?d.isub(this.p):d.strip!==void 0?d.strip():d._strip(),d},K.prototype.split=function(S,d){S.iushrn(this.n,0,d);},K.prototype.imulK=function(S){return S.imul(this.k)};function Z(){K.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f");}n(Z,K),Z.prototype.split=function(S,d){for(var C=4194303,A=Math.min(S.length,9),f=0;f<A;f++)d.words[f]=S.words[f];if(d.length=A,S.length<=9){S.words[0]=0,S.length=1;return}var _=S.words[9];for(d.words[d.length++]=_&C,f=10;f<S.length;f++){var M=S.words[f]|0;S.words[f-10]=(M&C)<<4|_>>>22,_=M;}_>>>=22,S.words[f-10]=_,_===0&&S.length>10?S.length-=10:S.length-=9;},Z.prototype.imulK=function(S){S.words[S.length]=0,S.words[S.length+1]=0,S.length+=2;for(var d=0,C=0;C<S.length;C++){var A=S.words[C]|0;d+=A*977,S.words[C]=d&67108863,d=A*64+(d/67108864|0);}return S.words[S.length-1]===0&&(S.length--,S.words[S.length-1]===0&&S.length--),S};function se(){K.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001");}n(se,K);function ce(){K.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff");}n(ce,K);function Te(){K.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed");}n(Te,K),Te.prototype.imulK=function(S){for(var d=0,C=0;C<S.length;C++){var A=(S.words[C]|0)*19+d,f=A&67108863;A>>>=26,S.words[C]=f,d=A;}return d!==0&&(S.words[S.length++]=d),S},i._prime=function(S){if(j[S])return j[S];var d;if(S==="k256")d=new Z;else if(S==="p224")d=new se;else if(S==="p192")d=new ce;else if(S==="p25519")d=new Te;else throw new Error("Unknown prime "+S);return j[S]=d,d};function pe(Y){if(typeof Y=="string"){var S=i._prime(Y);this.m=S.p,this.prime=S;}else r(Y.gtn(1),"modulus must be greater than 1"),this.m=Y,this.prime=null;}pe.prototype._verify1=function(S){r(S.negative===0,"red works only with positives"),r(S.red,"red works only with red numbers");},pe.prototype._verify2=function(S,d){r((S.negative|d.negative)===0,"red works only with positives"),r(S.red&&S.red===d.red,"red works only with red numbers");},pe.prototype.imod=function(S){return this.prime?this.prime.ireduce(S)._forceRed(this):S.umod(this.m)._forceRed(this)},pe.prototype.neg=function(S){return S.isZero()?S.clone():this.m.sub(S)._forceRed(this)},pe.prototype.add=function(S,d){this._verify2(S,d);var C=S.add(d);return C.cmp(this.m)>=0&&C.isub(this.m),C._forceRed(this)},pe.prototype.iadd=function(S,d){this._verify2(S,d);var C=S.iadd(d);return C.cmp(this.m)>=0&&C.isub(this.m),C},pe.prototype.sub=function(S,d){this._verify2(S,d);var C=S.sub(d);return C.cmpn(0)<0&&C.iadd(this.m),C._forceRed(this)},pe.prototype.isub=function(S,d){this._verify2(S,d);var C=S.isub(d);return C.cmpn(0)<0&&C.iadd(this.m),C},pe.prototype.shl=function(S,d){return this._verify1(S),this.imod(S.ushln(d))},pe.prototype.imul=function(S,d){return this._verify2(S,d),this.imod(S.imul(d))},pe.prototype.mul=function(S,d){return this._verify2(S,d),this.imod(S.mul(d))},pe.prototype.isqr=function(S){return this.imul(S,S.clone())},pe.prototype.sqr=function(S){return this.mul(S,S)},pe.prototype.sqrt=function(S){if(S.isZero())return S.clone();var d=this.m.andln(3);if(r(d%2===1),d===3){var C=this.m.add(new i(1)).iushrn(2);return this.pow(S,C)}for(var A=this.m.subn(1),f=0;!A.isZero()&&A.andln(1)===0;)f++,A.iushrn(1);r(!A.isZero());var _=new i(1).toRed(this),M=_.redNeg(),R=this.m.subn(1).iushrn(1),h=this.m.bitLength();for(h=new i(2*h*h).toRed(this);this.pow(h,R).cmp(M)!==0;)h.redIAdd(M);for(var b=this.pow(h,A),B=this.pow(S,A.addn(1).iushrn(1)),z=this.pow(S,A),P=f;z.cmp(_)!==0;){for(var V=z,fe=0;V.cmp(_)!==0;fe++)V=V.redSqr();r(fe<P);var ye=this.pow(b,new i(1).iushln(P-fe-1));B=B.redMul(ye),b=ye.redSqr(),z=z.redMul(b),P=fe;}return B},pe.prototype.invm=function(S){var d=S._invmp(this.m);return d.negative!==0?(d.negative=0,this.imod(d).redNeg()):this.imod(d)},pe.prototype.pow=function(S,d){if(d.isZero())return new i(1).toRed(this);if(d.cmpn(1)===0)return S.clone();var C=4,A=new Array(1<<C);A[0]=new i(1).toRed(this),A[1]=S;for(var f=2;f<A.length;f++)A[f]=this.mul(A[f-1],S);var _=A[0],M=0,R=0,h=d.bitLength()%26;for(h===0&&(h=26),f=d.length-1;f>=0;f--){for(var b=d.words[f],B=h-1;B>=0;B--){var z=b>>B&1;if(_!==A[0]&&(_=this.sqr(_)),z===0&&M===0){R=0;continue}M<<=1,M|=z,R++,!(R!==C&&(f!==0||B!==0))&&(_=this.mul(_,A[M]),R=0,M=0);}h=26;}return _},pe.prototype.convertTo=function(S){var d=S.umod(this.m);return d===S?d.clone():d},pe.prototype.convertFrom=function(S){var d=S.clone();return d.red=null,d},i.mont=function(S){return new le(S)};function le(Y){pe.call(this,Y),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv);}n(le,pe),le.prototype.convertTo=function(S){return this.imod(S.ushln(this.shift))},le.prototype.convertFrom=function(S){var d=this.imod(S.mul(this.rinv));return d.red=null,d},le.prototype.imul=function(S,d){if(S.isZero()||d.isZero())return S.words[0]=0,S.length=1,S;var C=S.imul(d),A=C.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),f=C.isub(A).iushrn(this.shift),_=f;return f.cmp(this.m)>=0?_=f.isub(this.m):f.cmpn(0)<0&&(_=f.iadd(this.m)),_._forceRed(this)},le.prototype.mul=function(S,d){if(S.isZero()||d.isZero())return new i(0)._forceRed(this);var C=S.mul(d),A=C.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),f=C.isub(A).iushrn(this.shift),_=f;return f.cmp(this.m)>=0?_=f.isub(this.m):f.cmpn(0)<0&&(_=f.iadd(this.m)),_._forceRed(this)},le.prototype.invm=function(S){var d=this.imod(S._invmp(this.m).mul(this.r2));return d._forceRed(this)};})(typeof __=="undefined"||__,S4);});var lg=ne((VSe,A_)=>{v();m();y();g();var S_;A_.exports=function(e){return S_||(S_=new Gs(null)),S_.generate(e)};function Gs(t){this.rand=t;}A_.exports.Rand=Gs;Gs.prototype.generate=function(e){return this._rand(e)};Gs.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var r=new Uint8Array(e),n=0;n<r.length;n++)r[n]=this.rand.getByte();return r};if(typeof self=="object")self.crypto&&self.crypto.getRandomValues?Gs.prototype._rand=function(e){var r=new Uint8Array(e);return self.crypto.getRandomValues(r),r}:self.msCrypto&&self.msCrypto.getRandomValues?Gs.prototype._rand=function(e){var r=new Uint8Array(e);return self.msCrypto.getRandomValues(r),r}:typeof window=="object"&&(Gs.prototype._rand=function(){throw new Error("Not implemented yet")});else try{if(C_=mu(),typeof C_.randomBytes!="function")throw new Error("Not supported");Gs.prototype._rand=function(e){return C_.randomBytes(e)};}catch(t){}var C_;});var T_=ne((ZSe,C4)=>{v();m();y();g();var yu=_o(),AW=lg();function gu(t){this.rand=t||new AW.Rand;}C4.exports=gu;gu.create=function(e){return new gu(e)};gu.prototype._randbelow=function(e){var r=e.bitLength(),n=Math.ceil(r/8);do var i=new yu(this.rand.generate(n));while(i.cmp(e)>=0);return i};gu.prototype._randrange=function(e,r){var n=r.sub(e);return e.add(this._randbelow(n))};gu.prototype.test=function(e,r,n){var i=e.bitLength(),o=yu.mont(e),a=new yu(1).toRed(o);r||(r=Math.max(1,i/48|0));for(var s=e.subn(1),c=0;!s.testn(c);c++);for(var u=e.shrn(c),l=s.toRed(o),w=!0;r>0;r--){var T=this._randrange(new yu(2),s);n&&n(T);var x=T.toRed(o).redPow(u);if(!(x.cmp(a)===0||x.cmp(l)===0)){for(var I=1;I<c;I++){if(x=x.redSqr(),x.cmp(a)===0)return !1;if(x.cmp(l)===0)break}if(I===c)return !1}}return w};gu.prototype.getDivisor=function(e,r){var n=e.bitLength(),i=yu.mont(e),o=new yu(1).toRed(i);r||(r=Math.max(1,n/48|0));for(var a=e.subn(1),s=0;!a.testn(s);s++);for(var c=e.shrn(s),u=a.toRed(i);r>0;r--){var l=this._randrange(new yu(2),a),w=e.gcd(l);if(w.cmpn(1)!==0)return w;var T=l.toRed(i).redPow(c);if(!(T.cmp(o)===0||T.cmp(u)===0)){for(var x=1;x<s;x++){if(T=T.redSqr(),T.cmp(o)===0)return T.fromRed().subn(1).gcd(e);if(T.cmp(u)===0)break}if(x===s)return T=T.redSqr(),T.fromRed().subn(1).gcd(e)}}return !1};});var N_=ne((oCe,R4)=>{v();m();y();g();var TW=Hs();R4.exports=O_;O_.simpleSieve=I_;O_.fermatTest=M_;var gn=_o(),RW=new gn(24),xW=T_(),A4=new xW,IW=new gn(1),x_=new gn(2),MW=new gn(5);new gn(16);new gn(8);var OW=new gn(10),NW=new gn(3);new gn(7);var kW=new gn(11),T4=new gn(4);new gn(12);var R_=null;function PW(){if(R_!==null)return R_;var t=1048576,e=[];e[0]=2;for(var r=1,n=3;n<t;n+=2){for(var i=Math.ceil(Math.sqrt(n)),o=0;o<r&&e[o]<=i&&n%e[o]!==0;o++);r!==o&&e[o]<=i||(e[r++]=n);}return R_=e,e}function I_(t){for(var e=PW(),r=0;r<e.length;r++)if(t.modn(e[r])===0)return t.cmpn(e[r])===0;return !0}function M_(t){var e=gn.mont(t);return x_.toRed(e).redPow(t.subn(1)).fromRed().cmpn(1)===0}function O_(t,e){if(t<16)return e===2||e===5?new gn([140,123]):new gn([140,39]);e=new gn(e);for(var r,n;;){for(r=new gn(TW(Math.ceil(t/8)));r.bitLength()>t;)r.ishrn(1);if(r.isEven()&&r.iadd(IW),r.testn(1)||r.iadd(x_),e.cmp(x_)){if(!e.cmp(MW))for(;r.mod(OW).cmp(NW);)r.iadd(T4);}else for(;r.mod(RW).cmp(kW);)r.iadd(T4);if(n=r.shrn(1),I_(n)&&I_(r)&&M_(n)&&M_(r)&&A4.test(n)&&A4.test(r))return r}}});var x4=ne((lCe,BW)=>{BW.exports={modp1:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},modp2:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},modp5:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},modp14:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},modp15:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},modp16:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},modp17:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},modp18:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}};});var N4=ne((fCe,O4)=>{v();m();y();g();var qi=_o(),UW=T_(),I4=new UW,DW=new qi(24),LW=new qi(11),qW=new qi(10),FW=new qi(3),zW=new qi(7),M4=N_(),HW=Hs();O4.exports=ts;function jW(t,e){return e=e||"utf8",D.Buffer.isBuffer(t)||(t=new D.Buffer(t,e)),this._pub=new qi(t),this}function $W(t,e){return e=e||"utf8",D.Buffer.isBuffer(t)||(t=new D.Buffer(t,e)),this._priv=new qi(t),this}var fg={};function VW(t,e){var r=e.toString("hex"),n=[r,t.toString(16)].join("_");if(n in fg)return fg[n];var i=0;if(t.isEven()||!M4.simpleSieve||!M4.fermatTest(t)||!I4.test(t))return i+=1,r==="02"||r==="05"?i+=8:i+=4,fg[n]=i,i;I4.test(t.shrn(1))||(i+=2);var o;switch(r){case"02":t.mod(DW).cmp(LW)&&(i+=8);break;case"05":o=t.mod(qW),o.cmp(FW)&&o.cmp(zW)&&(i+=8);break;default:i+=4;}return fg[n]=i,i}function ts(t,e,r){this.setGenerator(e),this.__prime=new qi(t),this._prime=qi.mont(this.__prime),this._primeLen=t.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,r?(this.setPublicKey=jW,this.setPrivateKey=$W):this._primeCode=8;}Object.defineProperty(ts.prototype,"verifyError",{enumerable:!0,get:function(){return typeof this._primeCode!="number"&&(this._primeCode=VW(this.__prime,this.__gen)),this._primeCode}});ts.prototype.generateKeys=function(){return this._priv||(this._priv=new qi(HW(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()};ts.prototype.computeSecret=function(t){t=new qi(t),t=t.toRed(this._prime);var e=t.redPow(this._priv).fromRed(),r=new D.Buffer(e.toArray()),n=this.getPrime();if(r.length<n.length){var i=new D.Buffer(n.length-r.length);i.fill(0),r=D.Buffer.concat([i,r]);}return r};ts.prototype.getPublicKey=function(e){return dg(this._pub,e)};ts.prototype.getPrivateKey=function(e){return dg(this._priv,e)};ts.prototype.getPrime=function(t){return dg(this.__prime,t)};ts.prototype.getGenerator=function(t){return dg(this._gen,t)};ts.prototype.setGenerator=function(t,e){return e=e||"utf8",D.Buffer.isBuffer(t)||(t=new D.Buffer(t,e)),this.__gen=t,this._gen=new qi(t),this};function dg(t,e){var r=new D.Buffer(t.toArray());return e?r.toString(e):r}});var B4=ne(_f=>{v();m();y();g();var GW=N_(),k4=x4(),k_=N4();function KW(t){var e=new D.Buffer(k4[t].prime,"hex"),r=new D.Buffer(k4[t].gen,"hex");return new k_(e,r)}var WW={binary:!0,hex:!0,base64:!0};function P4(t,e,r,n){return D.Buffer.isBuffer(e)||WW[e]===void 0?P4(t,"binary",e,r):(e=e||"binary",n=n||"binary",r=r||new D.Buffer([2]),D.Buffer.isBuffer(r)||(r=new D.Buffer(r,n)),typeof t=="number"?new k_(GW(t,r),r,!0):(D.Buffer.isBuffer(t)||(t=new D.Buffer(t,e)),new k_(t,r,!0)))}_f.DiffieHellmanGroup=_f.createDiffieHellmanGroup=_f.getDiffieHellman=KW;_f.createDiffieHellman=_f.DiffieHellman=P4;});var P_=ne((ECe,U4)=>{v();m();y();g();U4.exports=(qa(),Dr(of)).EventEmitter;});var H4=ne((TCe,z4)=>{v();m();y();g();function D4(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n);}return r}function L4(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?D4(Object(r),!0).forEach(function(n){YW(t,n,r[n]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):D4(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n));});}return t}function YW(t,e,r){return e=F4(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ZW(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function q4(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,F4(n.key),n);}}function JW(t,e,r){return e&&q4(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function F4(t){var e=XW(t,"string");return typeof e=="symbol"?e:String(e)}function XW(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return (e==="string"?String:Number)(t)}var QW=kn(),hg=QW.Buffer,eY=(Ni(),Dr($a)),B_=eY.inspect,tY=B_&&B_.custom||"inspect";function rY(t,e,r){hg.prototype.copy.call(t,e,r);}z4.exports=function(){function t(){ZW(this,t),this.head=null,this.tail=null,this.length=0;}return JW(t,[{key:"push",value:function(r){var n={data:r,next:null};this.length>0?this.tail.next=n:this.head=n,this.tail=n,++this.length;}},{key:"unshift",value:function(r){var n={data:r,next:this.head};this.length===0&&(this.tail=n),this.head=n,++this.length;}},{key:"shift",value:function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0;}},{key:"join",value:function(r){if(this.length===0)return "";for(var n=this.head,i=""+n.data;n=n.next;)i+=r+n.data;return i}},{key:"concat",value:function(r){if(this.length===0)return hg.alloc(0);for(var n=hg.allocUnsafe(r>>>0),i=this.head,o=0;i;)rY(i.data,n,o),o+=i.data.length,i=i.next;return n}},{key:"consume",value:function(r,n){var i;return r<this.head.data.length?(i=this.head.data.slice(0,r),this.head.data=this.head.data.slice(r)):r===this.head.data.length?i=this.shift():i=n?this._getString(r):this._getBuffer(r),i}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(r){var n=this.head,i=1,o=n.data;for(r-=o.length;n=n.next;){var a=n.data,s=r>a.length?a.length:r;if(s===a.length?o+=a:o+=a.slice(0,r),r-=s,r===0){s===a.length?(++i,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=a.slice(s));break}++i;}return this.length-=i,o}},{key:"_getBuffer",value:function(r){var n=hg.allocUnsafe(r),i=this.head,o=1;for(i.data.copy(n),r-=i.data.length;i=i.next;){var a=i.data,s=r>a.length?a.length:r;if(a.copy(n,n.length-r,0,s),r-=s,r===0){s===a.length?(++o,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=a.slice(s));break}++o;}return this.length-=o,n}},{key:tY,value:function(r,n){return B_(this,L4(L4({},n),{},{depth:0,customInspect:!1}))}}]),t}();});var D_=ne((OCe,$4)=>{v();m();y();g();function nY(t,e){var r=this,n=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return n||i?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,N.nextTick(U_,this,t)):N.nextTick(U_,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(o){!e&&o?r._writableState?r._writableState.errorEmitted?N.nextTick(pg,r):(r._writableState.errorEmitted=!0,N.nextTick(j4,r,o)):N.nextTick(j4,r,o):e?(N.nextTick(pg,r),e(o)):N.nextTick(pg,r);}),this)}function j4(t,e){U_(t,e),pg(t);}function pg(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close");}function iY(){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);}function U_(t,e){t.emit("error",e);}function oY(t,e){var r=t._readableState,n=t._writableState;r&&r.autoDestroy||n&&n.autoDestroy?t.destroy(e):t.emit("error",e);}$4.exports={destroy:nY,undestroy:iY,errorOrDestroy:oY};});var vu=ne((UCe,K4)=>{v();m();y();g();function aY(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e;}var G4={};function Fi(t,e,r){r||(r=Error);function n(o,a,s){return typeof e=="string"?e:e(o,a,s)}var i=function(o){aY(a,o);function a(s,c,u){return o.call(this,n(s,c,u))||this}return a}(r);i.prototype.name=r.name,i.prototype.code=t,G4[t]=i;}function V4(t,e){if(Array.isArray(t)){var r=t.length;return t=t.map(function(n){return String(n)}),r>2?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:r===2?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}else return "of ".concat(e," ").concat(String(t))}function sY(t,e,r){return t.substr(0,e.length)===e}function cY(t,e,r){return (r===void 0||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}function uY(t,e,r){return typeof r!="number"&&(r=0),r+e.length>t.length?!1:t.indexOf(e,r)!==-1}Fi("ERR_INVALID_OPT_VALUE",function(t,e){return 'The value "'+e+'" is invalid for option "'+t+'"'},TypeError);Fi("ERR_INVALID_ARG_TYPE",function(t,e,r){var n;typeof e=="string"&&sY(e,"not ")?(n="must not be",e=e.replace(/^not /,"")):n="must be";var i;if(cY(t," argument"))i="The ".concat(t," ").concat(n," ").concat(V4(e,"type"));else {var o=uY(t,".")?"property":"argument";i='The "'.concat(t,'" ').concat(o," ").concat(n," ").concat(V4(e,"type"));}return i+=". Received type ".concat(typeof r),i},TypeError);Fi("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");Fi("ERR_METHOD_NOT_IMPLEMENTED",function(t){return "The "+t+" method is not implemented"});Fi("ERR_STREAM_PREMATURE_CLOSE","Premature close");Fi("ERR_STREAM_DESTROYED",function(t){return "Cannot call "+t+" after a stream was destroyed"});Fi("ERR_MULTIPLE_CALLBACK","Callback called multiple times");Fi("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");Fi("ERR_STREAM_WRITE_AFTER_END","write after end");Fi("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);Fi("ERR_UNKNOWN_ENCODING",function(t){return "Unknown encoding: "+t},TypeError);Fi("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");K4.exports.codes=G4;});var L_=ne((zCe,W4)=>{v();m();y();g();var lY=vu().codes.ERR_INVALID_OPT_VALUE;function fY(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function dY(t,e,r,n){var i=fY(e,n,r);if(i!=null){if(!(isFinite(i)&&Math.floor(i)===i)||i<0){var o=n?r:"highWaterMark";throw new lY(o,i)}return Math.floor(i)}return t.objectMode?16:16*1024}W4.exports={getHighWaterMark:dY};});var z_=ne((GCe,eO)=>{v();m();y();g();eO.exports=Mr;function Z4(t){var e=this;this.next=null,this.entry=null,this.finish=function(){qY(e,t);};}var Sf;Mr.WritableState=Yh;var hY={deprecate:cE()},J4=P_(),yg=kn().Buffer,pY=(typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof self!="undefined"?self:{}).Uint8Array||function(){};function mY(t){return yg.from(t)}function yY(t){return yg.isBuffer(t)||t instanceof pY}var F_=D_(),gY=L_(),vY=gY.getHighWaterMark,Ks=vu().codes,bY=Ks.ERR_INVALID_ARG_TYPE,wY=Ks.ERR_METHOD_NOT_IMPLEMENTED,EY=Ks.ERR_MULTIPLE_CALLBACK,_Y=Ks.ERR_STREAM_CANNOT_PIPE,SY=Ks.ERR_STREAM_DESTROYED,CY=Ks.ERR_STREAM_NULL_VALUES,AY=Ks.ERR_STREAM_WRITE_AFTER_END,TY=Ks.ERR_UNKNOWN_ENCODING,Cf=F_.errorOrDestroy;yt()(Mr,J4);function RY(){}function Yh(t,e,r){Sf=Sf||bu(),t=t||{},typeof r!="boolean"&&(r=e instanceof Sf),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=vY(this,t,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var n=t.decodeStrings===!1;this.decodeStrings=!n,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(i){PY(e,i);},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new Z4(this);}Yh.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};(function(){try{Object.defineProperty(Yh.prototype,"buffer",{get:hY.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")});}catch(t){}})();var mg;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(mg=Function.prototype[Symbol.hasInstance],Object.defineProperty(Mr,Symbol.hasInstance,{value:function(e){return mg.call(this,e)?!0:this!==Mr?!1:e&&e._writableState instanceof Yh}})):mg=function(e){return e instanceof this};function Mr(t){Sf=Sf||bu();var e=this instanceof Sf;if(!e&&!mg.call(Mr,this))return new Mr(t);this._writableState=new Yh(t,this,e),this.writable=!0,t&&(typeof t.write=="function"&&(this._write=t.write),typeof t.writev=="function"&&(this._writev=t.writev),typeof t.destroy=="function"&&(this._destroy=t.destroy),typeof t.final=="function"&&(this._final=t.final)),J4.call(this);}Mr.prototype.pipe=function(){Cf(this,new _Y);};function xY(t,e){var r=new AY;Cf(t,r),N.nextTick(e,r);}function IY(t,e,r,n){var i;return r===null?i=new CY:typeof r!="string"&&!e.objectMode&&(i=new bY("chunk",["string","Buffer"],r)),i?(Cf(t,i),N.nextTick(n,i),!1):!0}Mr.prototype.write=function(t,e,r){var n=this._writableState,i=!1,o=!n.objectMode&&yY(t);return o&&!yg.isBuffer(t)&&(t=mY(t)),typeof e=="function"&&(r=e,e=null),o?e="buffer":e||(e=n.defaultEncoding),typeof r!="function"&&(r=RY),n.ending?xY(this,r):(o||IY(this,n,t,r))&&(n.pendingcb++,i=OY(this,n,o,t,e,r)),i};Mr.prototype.cork=function(){this._writableState.corked++;};Mr.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&X4(this,t));};Mr.prototype.setDefaultEncoding=function(e){if(typeof e=="string"&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TY(e);return this._writableState.defaultEncoding=e,this};Object.defineProperty(Mr.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function MY(t,e,r){return !t.objectMode&&t.decodeStrings!==!1&&typeof e=="string"&&(e=yg.from(e,r)),e}Object.defineProperty(Mr.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function OY(t,e,r,n,i,o){if(!r){var a=MY(e,n,i);n!==a&&(r=!0,i="buffer",n=a);}var s=e.objectMode?1:n.length;e.length+=s;var c=e.length<e.highWaterMark;if(c||(e.needDrain=!0),e.writing||e.corked){var u=e.lastBufferedRequest;e.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},u?u.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1;}else q_(t,e,!1,s,n,i,o);return c}function q_(t,e,r,n,i,o,a){e.writelen=n,e.writecb=a,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new SY("write")):r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1;}function NY(t,e,r,n,i){--e.pendingcb,r?(N.nextTick(i,n),N.nextTick(Wh,t,e),t._writableState.errorEmitted=!0,Cf(t,n)):(i(n),t._writableState.errorEmitted=!0,Cf(t,n),Wh(t,e));}function kY(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0;}function PY(t,e){var r=t._writableState,n=r.sync,i=r.writecb;if(typeof i!="function")throw new EY;if(kY(r),e)NY(t,r,n,e,i);else {var o=Q4(r)||t.destroyed;!o&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&X4(t,r),n?N.nextTick(Y4,t,r,o,i):Y4(t,r,o,i);}}function Y4(t,e,r,n){r||BY(t,e),e.pendingcb--,n(),Wh(t,e);}function BY(t,e){e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit("drain"));}function X4(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var n=e.bufferedRequestCount,i=new Array(n),o=e.corkedRequestsFree;o.entry=r;for(var a=0,s=!0;r;)i[a]=r,r.isBuf||(s=!1),r=r.next,a+=1;i.allBuffers=s,q_(t,e,!0,e.length,i,"",o.finish),e.pendingcb++,e.lastBufferedRequest=null,o.next?(e.corkedRequestsFree=o.next,o.next=null):e.corkedRequestsFree=new Z4(e),e.bufferedRequestCount=0;}else {for(;r;){var c=r.chunk,u=r.encoding,l=r.callback,w=e.objectMode?1:c.length;if(q_(t,e,!1,w,c,u,l),r=r.next,e.bufferedRequestCount--,e.writing)break}r===null&&(e.lastBufferedRequest=null);}e.bufferedRequest=r,e.bufferProcessing=!1;}Mr.prototype._write=function(t,e,r){r(new wY("_write()"));};Mr.prototype._writev=null;Mr.prototype.end=function(t,e,r){var n=this._writableState;return typeof t=="function"?(r=t,t=null,e=null):typeof e=="function"&&(r=e,e=null),t!=null&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||LY(this,n,r),this};Object.defineProperty(Mr.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function Q4(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function UY(t,e){t._final(function(r){e.pendingcb--,r&&Cf(t,r),e.prefinished=!0,t.emit("prefinish"),Wh(t,e);});}function DY(t,e){!e.prefinished&&!e.finalCalled&&(typeof t._final=="function"&&!e.destroyed?(e.pendingcb++,e.finalCalled=!0,N.nextTick(UY,t,e)):(e.prefinished=!0,t.emit("prefinish")));}function Wh(t,e){var r=Q4(e);if(r&&(DY(t,e),e.pendingcb===0&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var n=t._readableState;(!n||n.autoDestroy&&n.endEmitted)&&t.destroy();}return r}function LY(t,e,r){e.ending=!0,Wh(t,e),r&&(e.finished?N.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1;}function qY(t,e,r){var n=t.entry;for(t.entry=null;n;){var i=n.callback;e.pendingcb--,i(r),n=n.next;}e.corkedRequestsFree.next=t;}Object.defineProperty(Mr.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e);}});Mr.prototype.destroy=F_.destroy;Mr.prototype._undestroy=F_.undestroy;Mr.prototype._destroy=function(t,e){e(t);};});var bu=ne((JCe,rO)=>{v();m();y();g();var FY=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};rO.exports=oa;var tO=$_(),j_=z_();yt()(oa,tO);for(H_=FY(j_.prototype),gg=0;gg<H_.length;gg++)vg=H_[gg],oa.prototype[vg]||(oa.prototype[vg]=j_.prototype[vg]);var H_,vg,gg;function oa(t){if(!(this instanceof oa))return new oa(t);tO.call(this,t),j_.call(this,t),this.allowHalfOpen=!0,t&&(t.readable===!1&&(this.readable=!1),t.writable===!1&&(this.writable=!1),t.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",zY)));}Object.defineProperty(oa.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(oa.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(oa.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function zY(){this._writableState.ended||N.nextTick(HY,this);}function HY(t){t.end();}Object.defineProperty(oa.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(e){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=e,this._writableState.destroyed=e);}});});var bg=ne((rAe,oO)=>{v();m();y();g();var nO=vu().codes.ERR_STREAM_PREMATURE_CLOSE;function jY(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];t.apply(this,n);}}}function $Y(){}function VY(t){return t.setHeader&&typeof t.abort=="function"}function iO(t,e,r){if(typeof e=="function")return iO(t,null,e);e||(e={}),r=jY(r||$Y);var n=e.readable||e.readable!==!1&&t.readable,i=e.writable||e.writable!==!1&&t.writable,o=function(){t.writable||s();},a=t._writableState&&t._writableState.finished,s=function(){i=!1,a=!0,n||r.call(t);},c=t._readableState&&t._readableState.endEmitted,u=function(){n=!1,c=!0,i||r.call(t);},l=function(I){r.call(t,I);},w=function(){var I;if(n&&!c)return (!t._readableState||!t._readableState.ended)&&(I=new nO),r.call(t,I);if(i&&!a)return (!t._writableState||!t._writableState.ended)&&(I=new nO),r.call(t,I)},T=function(){t.req.on("finish",s);};return VY(t)?(t.on("complete",s),t.on("abort",w),t.req?T():t.on("request",T)):i&&!t._writableState&&(t.on("end",o),t.on("close",o)),t.on("end",u),t.on("finish",s),e.error!==!1&&t.on("error",l),t.on("close",w),function(){t.removeListener("complete",s),t.removeListener("abort",w),t.removeListener("request",T),t.req&&t.req.removeListener("finish",s),t.removeListener("end",o),t.removeListener("close",o),t.removeListener("finish",s),t.removeListener("end",u),t.removeListener("error",l),t.removeListener("close",w);}}oO.exports=iO;});var sO=ne((sAe,aO)=>{v();m();y();g();var wg;function Ws(t,e,r){return e=GY(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function GY(t){var e=KY(t,"string");return typeof e=="symbol"?e:String(e)}function KY(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return (e==="string"?String:Number)(t)}var WY=bg(),Ys=Symbol("lastResolve"),wu=Symbol("lastReject"),Zh=Symbol("error"),Eg=Symbol("ended"),Eu=Symbol("lastPromise"),V_=Symbol("handlePromise"),_u=Symbol("stream");function Zs(t,e){return {value:t,done:e}}function YY(t){var e=t[Ys];if(e!==null){var r=t[_u].read();r!==null&&(t[Eu]=null,t[Ys]=null,t[wu]=null,e(Zs(r,!1)));}}function ZY(t){N.nextTick(YY,t);}function JY(t,e){return function(r,n){t.then(function(){if(e[Eg]){r(Zs(void 0,!0));return}e[V_](r,n);},n);}}var XY=Object.getPrototypeOf(function(){}),QY=Object.setPrototypeOf((wg={get stream(){return this[_u]},next:function(){var e=this,r=this[Zh];if(r!==null)return Promise.reject(r);if(this[Eg])return Promise.resolve(Zs(void 0,!0));if(this[_u].destroyed)return new Promise(function(a,s){N.nextTick(function(){e[Zh]?s(e[Zh]):a(Zs(void 0,!0));});});var n=this[Eu],i;if(n)i=new Promise(JY(n,this));else {var o=this[_u].read();if(o!==null)return Promise.resolve(Zs(o,!1));i=new Promise(this[V_]);}return this[Eu]=i,i}},Ws(wg,Symbol.asyncIterator,function(){return this}),Ws(wg,"return",function(){var e=this;return new Promise(function(r,n){e[_u].destroy(null,function(i){if(i){n(i);return}r(Zs(void 0,!0));});})}),wg),XY),eZ=function(e){var r,n=Object.create(QY,(r={},Ws(r,_u,{value:e,writable:!0}),Ws(r,Ys,{value:null,writable:!0}),Ws(r,wu,{value:null,writable:!0}),Ws(r,Zh,{value:null,writable:!0}),Ws(r,Eg,{value:e._readableState.endEmitted,writable:!0}),Ws(r,V_,{value:function(o,a){var s=n[_u].read();s?(n[Eu]=null,n[Ys]=null,n[wu]=null,o(Zs(s,!1))):(n[Ys]=o,n[wu]=a);},writable:!0}),r));return n[Eu]=null,WY(e,function(i){if(i&&i.code!=="ERR_STREAM_PREMATURE_CLOSE"){var o=n[wu];o!==null&&(n[Eu]=null,n[Ys]=null,n[wu]=null,o(i)),n[Zh]=i;return}var a=n[Ys];a!==null&&(n[Eu]=null,n[Ys]=null,n[wu]=null,a(Zs(void 0,!0))),n[Eg]=!0;}),e.on("readable",ZY.bind(null,n)),n};aO.exports=eZ;});var uO=ne((dAe,cO)=>{v();m();y();g();cO.exports=function(){throw new Error("Readable.from is not available in the browser")};});var $_=ne((vAe,bO)=>{v();m();y();g();bO.exports=Gt;var Af;Gt.ReadableState=hO;(qa(),Dr(of)).EventEmitter;var dO=function(e,r){return e.listeners(r).length},Xh=P_(),_g=kn().Buffer,tZ=(typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof self!="undefined"?self:{}).Uint8Array||function(){};function rZ(t){return _g.from(t)}function nZ(t){return _g.isBuffer(t)||t instanceof tZ}var G_=(Ni(),Dr($a)),kt;G_&&G_.debuglog?kt=G_.debuglog("stream"):kt=function(){};var iZ=H4(),Q_=D_(),oZ=L_(),aZ=oZ.getHighWaterMark,Sg=vu().codes,sZ=Sg.ERR_INVALID_ARG_TYPE,cZ=Sg.ERR_STREAM_PUSH_AFTER_EOF,uZ=Sg.ERR_METHOD_NOT_IMPLEMENTED,lZ=Sg.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,Tf,K_,W_;yt()(Gt,Xh);var Jh=Q_.errorOrDestroy,Y_=["error","close","destroy","pause","resume"];function fZ(t,e,r){if(typeof t.prependListener=="function")return t.prependListener(e,r);!t._events||!t._events[e]?t.on(e,r):Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]];}function hO(t,e,r){Af=Af||bu(),t=t||{},typeof r!="boolean"&&(r=e instanceof Af),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=aZ(this,t,"readableHighWaterMark",r),this.buffer=new iZ,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=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(Tf||(Tf=bh().StringDecoder),this.decoder=new Tf(t.encoding),this.encoding=t.encoding);}function Gt(t){if(Af=Af||bu(),!(this instanceof Gt))return new Gt(t);var e=this instanceof Af;this._readableState=new hO(t,this,e),this.readable=!0,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),Xh.call(this);}Object.defineProperty(Gt.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e);}});Gt.prototype.destroy=Q_.destroy;Gt.prototype._undestroy=Q_.undestroy;Gt.prototype._destroy=function(t,e){e(t);};Gt.prototype.push=function(t,e){var r=this._readableState,n;return r.objectMode?n=!0:typeof t=="string"&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=_g.from(t,e),e=""),n=!0),pO(this,t,e,!1,n)};Gt.prototype.unshift=function(t){return pO(this,t,null,!0,!1)};function pO(t,e,r,n,i){kt("readableAddChunk",e);var o=t._readableState;if(e===null)o.reading=!1,pZ(t,o);else {var a;if(i||(a=dZ(o,e)),a)Jh(t,a);else if(o.objectMode||e&&e.length>0)if(typeof e!="string"&&!o.objectMode&&Object.getPrototypeOf(e)!==_g.prototype&&(e=rZ(e)),n)o.endEmitted?Jh(t,new lZ):Z_(t,o,e,!0);else if(o.ended)Jh(t,new cZ);else {if(o.destroyed)return !1;o.reading=!1,o.decoder&&!r?(e=o.decoder.write(e),o.objectMode||e.length!==0?Z_(t,o,e,!1):X_(t,o)):Z_(t,o,e,!1);}else n||(o.reading=!1,X_(t,o));}return !o.ended&&(o.length<o.highWaterMark||o.length===0)}function Z_(t,e,r,n){e.flowing&&e.length===0&&!e.sync?(e.awaitDrain=0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,n?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&Cg(t)),X_(t,e);}function dZ(t,e){var r;return !nZ(e)&&typeof e!="string"&&e!==void 0&&!t.objectMode&&(r=new sZ("chunk",["string","Buffer","Uint8Array"],e)),r}Gt.prototype.isPaused=function(){return this._readableState.flowing===!1};Gt.prototype.setEncoding=function(t){Tf||(Tf=bh().StringDecoder);var e=new Tf(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,n="";r!==null;)n+=e.write(r.data),r=r.next;return this._readableState.buffer.clear(),n!==""&&this._readableState.buffer.push(n),this._readableState.length=n.length,this};var lO=1073741824;function hZ(t){return t>=lO?t=lO:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function fO(t,e){return t<=0||e.length===0&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=hZ(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}Gt.prototype.read=function(t){kt("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(t!==0&&(e.emittedReadable=!1),t===0&&e.needReadable&&((e.highWaterMark!==0?e.length>=e.highWaterMark:e.length>0)||e.ended))return kt("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?J_(this):Cg(this),null;if(t=fO(t,e),t===0&&e.ended)return e.length===0&&J_(this),null;var n=e.needReadable;kt("need readable",n),(e.length===0||e.length-t<e.highWaterMark)&&(n=!0,kt("length less than watermark",n)),e.ended||e.reading?(n=!1,kt("reading or ended",n)):n&&(kt("do read"),e.reading=!0,e.sync=!0,e.length===0&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=fO(r,e)));var i;return t>0?i=gO(t,e):i=null,i===null?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),e.length===0&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&J_(this)),i!==null&&this.emit("data",i),i};function pZ(t,e){if(kt("onEofChunk"),!e.ended){if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length);}e.ended=!0,e.sync?Cg(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,mO(t)));}}function Cg(t){var e=t._readableState;kt("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(kt("emitReadable",e.flowing),e.emittedReadable=!0,N.nextTick(mO,t));}function mO(t){var e=t._readableState;kt("emitReadable_",e.destroyed,e.length,e.ended),!e.destroyed&&(e.length||e.ended)&&(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,eS(t);}function X_(t,e){e.readingMore||(e.readingMore=!0,N.nextTick(mZ,t,e));}function mZ(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&e.length===0);){var r=e.length;if(kt("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1;}Gt.prototype._read=function(t){Jh(this,new uZ("_read()"));};Gt.prototype.pipe=function(t,e){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=t;break;case 1:n.pipes=[n.pipes,t];break;default:n.pipes.push(t);break}n.pipesCount+=1,kt("pipe count=%d opts=%j",n.pipesCount,e);var i=(!e||e.end!==!1)&&t!==N.stdout&&t!==N.stderr,o=i?s:k;n.endEmitted?N.nextTick(o):r.once("end",o),t.on("unpipe",a);function a(q,j){kt("onunpipe"),q===r&&j&&j.hasUnpiped===!1&&(j.hasUnpiped=!0,l());}function s(){kt("onend"),t.end();}var c=yZ(r);t.on("drain",c);var u=!1;function l(){kt("cleanup"),t.removeListener("close",x),t.removeListener("finish",I),t.removeListener("drain",c),t.removeListener("error",T),t.removeListener("unpipe",a),r.removeListener("end",s),r.removeListener("end",k),r.removeListener("data",w),u=!0,n.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&c();}r.on("data",w);function w(q){kt("ondata");var j=t.write(q);kt("dest.write",j),j===!1&&((n.pipesCount===1&&n.pipes===t||n.pipesCount>1&&vO(n.pipes,t)!==-1)&&!u&&(kt("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause());}function T(q){kt("onerror",q),k(),t.removeListener("error",T),dO(t,"error")===0&&Jh(t,q);}fZ(t,"error",T);function x(){t.removeListener("finish",I),k();}t.once("close",x);function I(){kt("onfinish"),t.removeListener("close",x),k();}t.once("finish",I);function k(){kt("unpipe"),r.unpipe(t);}return t.emit("pipe",r),n.flowing||(kt("pipe resume"),r.resume()),t};function yZ(t){return function(){var r=t._readableState;kt("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&dO(t,"data")&&(r.flowing=!0,eS(t));}}Gt.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(e.pipesCount===0)return this;if(e.pipesCount===1)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r),this);if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o<i;o++)n[o].emit("unpipe",this,{hasUnpiped:!1});return this}var a=vO(e.pipes,t);return a===-1?this:(e.pipes.splice(a,1),e.pipesCount-=1,e.pipesCount===1&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r),this)};Gt.prototype.on=function(t,e){var r=Xh.prototype.on.call(this,t,e),n=this._readableState;return t==="data"?(n.readableListening=this.listenerCount("readable")>0,n.flowing!==!1&&this.resume()):t==="readable"&&!n.endEmitted&&!n.readableListening&&(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,kt("on readable",n.length,n.reading),n.length?Cg(this):n.reading||N.nextTick(gZ,this)),r};Gt.prototype.addListener=Gt.prototype.on;Gt.prototype.removeListener=function(t,e){var r=Xh.prototype.removeListener.call(this,t,e);return t==="readable"&&N.nextTick(yO,this),r};Gt.prototype.removeAllListeners=function(t){var e=Xh.prototype.removeAllListeners.apply(this,arguments);return (t==="readable"||t===void 0)&&N.nextTick(yO,this),e};function yO(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume();}function gZ(t){kt("readable nexttick read 0"),t.read(0);}Gt.prototype.resume=function(){var t=this._readableState;return t.flowing||(kt("resume"),t.flowing=!t.readableListening,vZ(this,t)),t.paused=!1,this};function vZ(t,e){e.resumeScheduled||(e.resumeScheduled=!0,N.nextTick(bZ,t,e));}function bZ(t,e){kt("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),eS(t),e.flowing&&!e.reading&&t.read(0);}Gt.prototype.pause=function(){return kt("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(kt("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function eS(t){var e=t._readableState;for(kt("flow",e.flowing);e.flowing&&t.read()!==null;);}Gt.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;t.on("end",function(){if(kt("wrapped end"),r.decoder&&!r.ended){var a=r.decoder.end();a&&a.length&&e.push(a);}e.push(null);}),t.on("data",function(a){if(kt("wrapped data"),r.decoder&&(a=r.decoder.write(a)),!(r.objectMode&&a==null)&&!(!r.objectMode&&(!a||!a.length))){var s=e.push(a);s||(n=!0,t.pause());}});for(var i in t)this[i]===void 0&&typeof t[i]=="function"&&(this[i]=function(s){return function(){return t[s].apply(t,arguments)}}(i));for(var o=0;o<Y_.length;o++)t.on(Y_[o],this.emit.bind(this,Y_[o]));return this._read=function(a){kt("wrapped _read",a),n&&(n=!1,t.resume());},this};typeof Symbol=="function"&&(Gt.prototype[Symbol.asyncIterator]=function(){return K_===void 0&&(K_=sO()),K_(this)});Object.defineProperty(Gt.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(Gt.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(Gt.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e);}});Gt._fromList=gO;Object.defineProperty(Gt.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function gO(t,e){if(e.length===0)return null;var r;return e.objectMode?r=e.buffer.shift():!t||t>=e.length?(e.decoder?r=e.buffer.join(""):e.buffer.length===1?r=e.buffer.first():r=e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r}function J_(t){var e=t._readableState;kt("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,N.nextTick(wZ,e,t));}function wZ(t,e){if(kt("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&t.length===0&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy();}}typeof Symbol=="function"&&(Gt.from=function(t,e){return W_===void 0&&(W_=uO()),W_(Gt,t,e)});function vO(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return -1}});var tS=ne((SAe,EO)=>{v();m();y();g();EO.exports=rs;var Ag=vu().codes,EZ=Ag.ERR_METHOD_NOT_IMPLEMENTED,_Z=Ag.ERR_MULTIPLE_CALLBACK,SZ=Ag.ERR_TRANSFORM_ALREADY_TRANSFORMING,CZ=Ag.ERR_TRANSFORM_WITH_LENGTH_0,Tg=bu();yt()(rs,Tg);function AZ(t,e){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(n===null)return this.emit("error",new _Z);r.writechunk=null,r.writecb=null,e!=null&&this.push(e),n(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark);}function rs(t){if(!(this instanceof rs))return new rs(t);Tg.call(this,t),this._transformState={afterTransform:AZ.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&(typeof t.transform=="function"&&(this._transform=t.transform),typeof t.flush=="function"&&(this._flush=t.flush)),this.on("prefinish",TZ);}function TZ(){var t=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(e,r){wO(t,e,r);}):wO(this,null,null);}rs.prototype.push=function(t,e){return this._transformState.needTransform=!1,Tg.prototype.push.call(this,t,e)};rs.prototype._transform=function(t,e,r){r(new EZ("_transform()"));};rs.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark);}};rs.prototype._read=function(t){var e=this._transformState;e.writechunk!==null&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0;};rs.prototype._destroy=function(t,e){Tg.prototype._destroy.call(this,t,function(r){e(r);});};function wO(t,e,r){if(e)return t.emit("error",e);if(r!=null&&t.push(r),t._writableState.length)throw new CZ;if(t._transformState.transforming)throw new SZ;return t.push(null)}});var CO=ne((xAe,SO)=>{v();m();y();g();SO.exports=Qh;var _O=tS();yt()(Qh,_O);function Qh(t){if(!(this instanceof Qh))return new Qh(t);_O.call(this,t);}Qh.prototype._transform=function(t,e,r){r(null,t);};});var IO=ne((kAe,xO)=>{v();m();y();g();var rS;function RZ(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments));}}var RO=vu().codes,xZ=RO.ERR_MISSING_ARGS,IZ=RO.ERR_STREAM_DESTROYED;function AO(t){if(t)throw t}function MZ(t){return t.setHeader&&typeof t.abort=="function"}function OZ(t,e,r,n){n=RZ(n);var i=!1;t.on("close",function(){i=!0;}),rS===void 0&&(rS=bg()),rS(t,{readable:e,writable:r},function(a){if(a)return n(a);i=!0,n();});var o=!1;return function(a){if(!i&&!o){if(o=!0,MZ(t))return t.abort();if(typeof t.destroy=="function")return t.destroy();n(a||new IZ("pipe"));}}}function TO(t){t();}function NZ(t,e){return t.pipe(e)}function kZ(t){return !t.length||typeof t[t.length-1]!="function"?AO:t.pop()}function PZ(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var n=kZ(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new xZ("streams");var i,o=e.map(function(a,s){var c=s<e.length-1,u=s>0;return OZ(a,c,u,function(l){i||(i=l),l&&o.forEach(TO),!c&&(o.forEach(TO),n(i));})});return e.reduce(NZ)}xO.exports=PZ;});var OO=ne((zi,MO)=>{v();m();y();g();zi=MO.exports=$_();zi.Stream=zi;zi.Readable=zi;zi.Writable=z_();zi.Duplex=bu();zi.Transform=tS();zi.PassThrough=CO();zi.finished=bg();zi.pipeline=IO();});var Rg=ne((NO,nS)=>{v();m();y();g();(function(t,e){function r(A,f){if(!A)throw new Error(f||"Assertion failed")}function n(A,f){A.super_=f;var _=function(){};_.prototype=f.prototype,A.prototype=new _,A.prototype.constructor=A;}function i(A,f,_){if(i.isBN(A))return A;this.negative=0,this.words=null,this.length=0,this.red=null,A!==null&&((f==="le"||f==="be")&&(_=f,f=10),this._init(A||0,f||10,_||"be"));}typeof t=="object"?t.exports=i:e.BN=i,i.BN=i,i.wordSize=26;var o;try{typeof window!="undefined"&&typeof window.Buffer!="undefined"?o=window.Buffer:o=ug().Buffer;}catch(A){}i.isBN=function(f){return f instanceof i?!0:f!==null&&typeof f=="object"&&f.constructor.wordSize===i.wordSize&&Array.isArray(f.words)},i.max=function(f,_){return f.cmp(_)>0?f:_},i.min=function(f,_){return f.cmp(_)<0?f:_},i.prototype._init=function(f,_,M){if(typeof f=="number")return this._initNumber(f,_,M);if(typeof f=="object")return this._initArray(f,_,M);_==="hex"&&(_=16),r(_===(_|0)&&_>=2&&_<=36),f=f.toString().replace(/\s+/g,"");var R=0;f[0]==="-"&&(R++,this.negative=1),R<f.length&&(_===16?this._parseHex(f,R,M):(this._parseBase(f,_,R),M==="le"&&this._initArray(this.toArray(),_,M)));},i.prototype._initNumber=function(f,_,M){f<0&&(this.negative=1,f=-f),f<67108864?(this.words=[f&67108863],this.length=1):f<4503599627370496?(this.words=[f&67108863,f/67108864&67108863],this.length=2):(r(f<9007199254740992),this.words=[f&67108863,f/67108864&67108863,1],this.length=3),M==="le"&&this._initArray(this.toArray(),_,M);},i.prototype._initArray=function(f,_,M){if(r(typeof f.length=="number"),f.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(f.length/3),this.words=new Array(this.length);for(var R=0;R<this.length;R++)this.words[R]=0;var h,b,B=0;if(M==="be")for(R=f.length-1,h=0;R>=0;R-=3)b=f[R]|f[R-1]<<8|f[R-2]<<16,this.words[h]|=b<<B&67108863,this.words[h+1]=b>>>26-B&67108863,B+=24,B>=26&&(B-=26,h++);else if(M==="le")for(R=0,h=0;R<f.length;R+=3)b=f[R]|f[R+1]<<8|f[R+2]<<16,this.words[h]|=b<<B&67108863,this.words[h+1]=b>>>26-B&67108863,B+=24,B>=26&&(B-=26,h++);return this._strip()};function a(A,f){var _=A.charCodeAt(f);if(_>=48&&_<=57)return _-48;if(_>=65&&_<=70)return _-55;if(_>=97&&_<=102)return _-87;r(!1,"Invalid character in "+A);}function s(A,f,_){var M=a(A,_);return _-1>=f&&(M|=a(A,_-1)<<4),M}i.prototype._parseHex=function(f,_,M){this.length=Math.ceil((f.length-_)/6),this.words=new Array(this.length);for(var R=0;R<this.length;R++)this.words[R]=0;var h=0,b=0,B;if(M==="be")for(R=f.length-1;R>=_;R-=2)B=s(f,_,R)<<h,this.words[b]|=B&67108863,h>=18?(h-=18,b+=1,this.words[b]|=B>>>26):h+=8;else {var z=f.length-_;for(R=z%2===0?_+1:_;R<f.length;R+=2)B=s(f,_,R)<<h,this.words[b]|=B&67108863,h>=18?(h-=18,b+=1,this.words[b]|=B>>>26):h+=8;}this._strip();};function c(A,f,_,M){for(var R=0,h=0,b=Math.min(A.length,_),B=f;B<b;B++){var z=A.charCodeAt(B)-48;R*=M,z>=49?h=z-49+10:z>=17?h=z-17+10:h=z,r(z>=0&&h<M,"Invalid character"),R+=h;}return R}i.prototype._parseBase=function(f,_,M){this.words=[0],this.length=1;for(var R=0,h=1;h<=67108863;h*=_)R++;R--,h=h/_|0;for(var b=f.length-M,B=b%R,z=Math.min(b,b-B)+M,P=0,V=M;V<z;V+=R)P=c(f,V,V+R,_),this.imuln(h),this.words[0]+P<67108864?this.words[0]+=P:this._iaddn(P);if(B!==0){var fe=1;for(P=c(f,V,f.length,_),V=0;V<B;V++)fe*=_;this.imuln(fe),this.words[0]+P<67108864?this.words[0]+=P:this._iaddn(P);}this._strip();},i.prototype.copy=function(f){f.words=new Array(this.length);for(var _=0;_<this.length;_++)f.words[_]=this.words[_];f.length=this.length,f.negative=this.negative,f.red=this.red;};function u(A,f){A.words=f.words,A.length=f.length,A.negative=f.negative,A.red=f.red;}if(i.prototype._move=function(f){u(f,this);},i.prototype.clone=function(){var f=new i(null);return this.copy(f),f},i.prototype._expand=function(f){for(;this.length<f;)this.words[this.length++]=0;return this},i.prototype._strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},i.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol!="undefined"&&typeof Symbol.for=="function")try{i.prototype[Symbol.for("nodejs.util.inspect.custom")]=l;}catch(A){i.prototype.inspect=l;}else i.prototype.inspect=l;function l(){return (this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var w=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],T=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],x=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];i.prototype.toString=function(f,_){f=f||10,_=_|0||1;var M;if(f===16||f==="hex"){M="";for(var R=0,h=0,b=0;b<this.length;b++){var B=this.words[b],z=((B<<R|h)&16777215).toString(16);h=B>>>24-R&16777215,R+=2,R>=26&&(R-=26,b--),h!==0||b!==this.length-1?M=w[6-z.length]+z+M:M=z+M;}for(h!==0&&(M=h.toString(16)+M);M.length%_!==0;)M="0"+M;return this.negative!==0&&(M="-"+M),M}if(f===(f|0)&&f>=2&&f<=36){var P=T[f],V=x[f];M="";var fe=this.clone();for(fe.negative=0;!fe.isZero();){var ye=fe.modrn(V).toString(f);fe=fe.idivn(V),fe.isZero()?M=ye+M:M=w[P-ye.length]+ye+M;}for(this.isZero()&&(M="0"+M);M.length%_!==0;)M="0"+M;return this.negative!==0&&(M="-"+M),M}r(!1,"Base should be between 2 and 36");},i.prototype.toNumber=function(){var f=this.words[0];return this.length===2?f+=this.words[1]*67108864:this.length===3&&this.words[2]===1?f+=4503599627370496+this.words[1]*67108864:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-f:f},i.prototype.toJSON=function(){return this.toString(16,2)},o&&(i.prototype.toBuffer=function(f,_){return this.toArrayLike(o,f,_)}),i.prototype.toArray=function(f,_){return this.toArrayLike(Array,f,_)};var I=function(f,_){return f.allocUnsafe?f.allocUnsafe(_):new f(_)};i.prototype.toArrayLike=function(f,_,M){this._strip();var R=this.byteLength(),h=M||Math.max(1,R);r(R<=h,"byte array longer than desired length"),r(h>0,"Requested array length <= 0");var b=I(f,h),B=_==="le"?"LE":"BE";return this["_toArrayLike"+B](b,R),b},i.prototype._toArrayLikeLE=function(f,_){for(var M=0,R=0,h=0,b=0;h<this.length;h++){var B=this.words[h]<<b|R;f[M++]=B&255,M<f.length&&(f[M++]=B>>8&255),M<f.length&&(f[M++]=B>>16&255),b===6?(M<f.length&&(f[M++]=B>>24&255),R=0,b=0):(R=B>>>24,b+=2);}if(M<f.length)for(f[M++]=R;M<f.length;)f[M++]=0;},i.prototype._toArrayLikeBE=function(f,_){for(var M=f.length-1,R=0,h=0,b=0;h<this.length;h++){var B=this.words[h]<<b|R;f[M--]=B&255,M>=0&&(f[M--]=B>>8&255),M>=0&&(f[M--]=B>>16&255),b===6?(M>=0&&(f[M--]=B>>24&255),R=0,b=0):(R=B>>>24,b+=2);}if(M>=0)for(f[M--]=R;M>=0;)f[M--]=0;},Math.clz32?i.prototype._countBits=function(f){return 32-Math.clz32(f)}:i.prototype._countBits=function(f){var _=f,M=0;return _>=4096&&(M+=13,_>>>=13),_>=64&&(M+=7,_>>>=7),_>=8&&(M+=4,_>>>=4),_>=2&&(M+=2,_>>>=2),M+_},i.prototype._zeroBits=function(f){if(f===0)return 26;var _=f,M=0;return _&8191||(M+=13,_>>>=13),_&127||(M+=7,_>>>=7),_&15||(M+=4,_>>>=4),_&3||(M+=2,_>>>=2),_&1||M++,M},i.prototype.bitLength=function(){var f=this.words[this.length-1],_=this._countBits(f);return (this.length-1)*26+_};function k(A){for(var f=new Array(A.bitLength()),_=0;_<f.length;_++){var M=_/26|0,R=_%26;f[_]=A.words[M]>>>R&1;}return f}i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var f=0,_=0;_<this.length;_++){var M=this._zeroBits(this.words[_]);if(f+=M,M!==26)break}return f},i.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},i.prototype.toTwos=function(f){return this.negative!==0?this.abs().inotn(f).iaddn(1):this.clone()},i.prototype.fromTwos=function(f){return this.testn(f-1)?this.notn(f).iaddn(1).ineg():this.clone()},i.prototype.isNeg=function(){return this.negative!==0},i.prototype.neg=function(){return this.clone().ineg()},i.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},i.prototype.iuor=function(f){for(;this.length<f.length;)this.words[this.length++]=0;for(var _=0;_<f.length;_++)this.words[_]=this.words[_]|f.words[_];return this._strip()},i.prototype.ior=function(f){return r((this.negative|f.negative)===0),this.iuor(f)},i.prototype.or=function(f){return this.length>f.length?this.clone().ior(f):f.clone().ior(this)},i.prototype.uor=function(f){return this.length>f.length?this.clone().iuor(f):f.clone().iuor(this)},i.prototype.iuand=function(f){var _;this.length>f.length?_=f:_=this;for(var M=0;M<_.length;M++)this.words[M]=this.words[M]&f.words[M];return this.length=_.length,this._strip()},i.prototype.iand=function(f){return r((this.negative|f.negative)===0),this.iuand(f)},i.prototype.and=function(f){return this.length>f.length?this.clone().iand(f):f.clone().iand(this)},i.prototype.uand=function(f){return this.length>f.length?this.clone().iuand(f):f.clone().iuand(this)},i.prototype.iuxor=function(f){var _,M;this.length>f.length?(_=this,M=f):(_=f,M=this);for(var R=0;R<M.length;R++)this.words[R]=_.words[R]^M.words[R];if(this!==_)for(;R<_.length;R++)this.words[R]=_.words[R];return this.length=_.length,this._strip()},i.prototype.ixor=function(f){return r((this.negative|f.negative)===0),this.iuxor(f)},i.prototype.xor=function(f){return this.length>f.length?this.clone().ixor(f):f.clone().ixor(this)},i.prototype.uxor=function(f){return this.length>f.length?this.clone().iuxor(f):f.clone().iuxor(this)},i.prototype.inotn=function(f){r(typeof f=="number"&&f>=0);var _=Math.ceil(f/26)|0,M=f%26;this._expand(_),M>0&&_--;for(var R=0;R<_;R++)this.words[R]=~this.words[R]&67108863;return M>0&&(this.words[R]=~this.words[R]&67108863>>26-M),this._strip()},i.prototype.notn=function(f){return this.clone().inotn(f)},i.prototype.setn=function(f,_){r(typeof f=="number"&&f>=0);var M=f/26|0,R=f%26;return this._expand(M+1),_?this.words[M]=this.words[M]|1<<R:this.words[M]=this.words[M]&~(1<<R),this._strip()},i.prototype.iadd=function(f){var _;if(this.negative!==0&&f.negative===0)return this.negative=0,_=this.isub(f),this.negative^=1,this._normSign();if(this.negative===0&&f.negative!==0)return f.negative=0,_=this.isub(f),f.negative=1,_._normSign();var M,R;this.length>f.length?(M=this,R=f):(M=f,R=this);for(var h=0,b=0;b<R.length;b++)_=(M.words[b]|0)+(R.words[b]|0)+h,this.words[b]=_&67108863,h=_>>>26;for(;h!==0&&b<M.length;b++)_=(M.words[b]|0)+h,this.words[b]=_&67108863,h=_>>>26;if(this.length=M.length,h!==0)this.words[this.length]=h,this.length++;else if(M!==this)for(;b<M.length;b++)this.words[b]=M.words[b];return this},i.prototype.add=function(f){var _;return f.negative!==0&&this.negative===0?(f.negative=0,_=this.sub(f),f.negative^=1,_):f.negative===0&&this.negative!==0?(this.negative=0,_=f.sub(this),this.negative=1,_):this.length>f.length?this.clone().iadd(f):f.clone().iadd(this)},i.prototype.isub=function(f){if(f.negative!==0){f.negative=0;var _=this.iadd(f);return f.negative=1,_._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(f),this.negative=1,this._normSign();var M=this.cmp(f);if(M===0)return this.negative=0,this.length=1,this.words[0]=0,this;var R,h;M>0?(R=this,h=f):(R=f,h=this);for(var b=0,B=0;B<h.length;B++)_=(R.words[B]|0)-(h.words[B]|0)+b,b=_>>26,this.words[B]=_&67108863;for(;b!==0&&B<R.length;B++)_=(R.words[B]|0)+b,b=_>>26,this.words[B]=_&67108863;if(b===0&&B<R.length&&R!==this)for(;B<R.length;B++)this.words[B]=R.words[B];return this.length=Math.max(this.length,B),R!==this&&(this.negative=1),this._strip()},i.prototype.sub=function(f){return this.clone().isub(f)};function q(A,f,_){_.negative=f.negative^A.negative;var M=A.length+f.length|0;_.length=M,M=M-1|0;var R=A.words[0]|0,h=f.words[0]|0,b=R*h,B=b&67108863,z=b/67108864|0;_.words[0]=B;for(var P=1;P<M;P++){for(var V=z>>>26,fe=z&67108863,ye=Math.min(P,f.length-1),Ce=Math.max(0,P-A.length+1);Ce<=ye;Ce++){var ae=P-Ce|0;R=A.words[ae]|0,h=f.words[Ce]|0,b=R*h+fe,V+=b/67108864|0,fe=b&67108863;}_.words[P]=fe|0,z=V|0;}return z!==0?_.words[P]=z|0:_.length--,_._strip()}var j=function(f,_,M){var R=f.words,h=_.words,b=M.words,B=0,z,P,V,fe=R[0]|0,ye=fe&8191,Ce=fe>>>13,ae=R[1]|0,ie=ae&8191,he=ae>>>13,Be=R[2]|0,Re=Be&8191,J=Be>>>13,ee=R[3]|0,de=ee&8191,xe=ee>>>13,Pe=R[4]|0,Oe=Pe&8191,He=Pe>>>13,St=R[5]|0,Fe=St&8191,ze=St>>>13,Tt=R[6]|0,Ge=Tt&8191,We=Tt>>>13,Pt=R[7]|0,O=Pt&8191,p=Pt>>>13,E=R[8]|0,U=E&8191,$=E>>>13,X=R[9]|0,te=X&8191,Se=X>>>13,Ve=h[0]|0,Ie=Ve&8191,De=Ve>>>13,qe=h[1]|0,it=qe&8191,mt=qe>>>13,nr=h[2]|0,nt=nr&8191,vt=nr>>>13,ir=h[3]|0,Je=ir&8191,ht=ir>>>13,or=h[4]|0,_e=or&8191,dt=or>>>13,ar=h[5]|0,ot=ar&8191,tt=ar>>>13,er=h[6]|0,at=er&8191,ft=er>>>13,tr=h[7]|0,rt=tr&8191,bt=tr>>>13,It=h[8]|0,Ze=It&8191,lt=It>>>13,jr=h[9]|0,qt=jr&8191,Ft=jr>>>13;M.negative=f.negative^_.negative,M.length=19,z=Math.imul(ye,Ie),P=Math.imul(ye,De),P=P+Math.imul(Ce,Ie)|0,V=Math.imul(Ce,De);var ci=(B+z|0)+((P&8191)<<13)|0;B=(V+(P>>>13)|0)+(ci>>>26)|0,ci&=67108863,z=Math.imul(ie,Ie),P=Math.imul(ie,De),P=P+Math.imul(he,Ie)|0,V=Math.imul(he,De),z=z+Math.imul(ye,it)|0,P=P+Math.imul(ye,mt)|0,P=P+Math.imul(Ce,it)|0,V=V+Math.imul(Ce,mt)|0;var ui=(B+z|0)+((P&8191)<<13)|0;B=(V+(P>>>13)|0)+(ui>>>26)|0,ui&=67108863,z=Math.imul(Re,Ie),P=Math.imul(Re,De),P=P+Math.imul(J,Ie)|0,V=Math.imul(J,De),z=z+Math.imul(ie,it)|0,P=P+Math.imul(ie,mt)|0,P=P+Math.imul(he,it)|0,V=V+Math.imul(he,mt)|0,z=z+Math.imul(ye,nt)|0,P=P+Math.imul(ye,vt)|0,P=P+Math.imul(Ce,nt)|0,V=V+Math.imul(Ce,vt)|0;var li=(B+z|0)+((P&8191)<<13)|0;B=(V+(P>>>13)|0)+(li>>>26)|0,li&=67108863,z=Math.imul(de,Ie),P=Math.imul(de,De),P=P+Math.imul(xe,Ie)|0,V=Math.imul(xe,De),z=z+Math.imul(Re,it)|0,P=P+Math.imul(Re,mt)|0,P=P+Math.imul(J,it)|0,V=V+Math.imul(J,mt)|0,z=z+Math.imul(ie,nt)|0,P=P+Math.imul(ie,vt)|0,P=P+Math.imul(he,nt)|0,V=V+Math.imul(he,vt)|0,z=z+Math.imul(ye,Je)|0,P=P+Math.imul(ye,ht)|0,P=P+Math.imul(Ce,Je)|0,V=V+Math.imul(Ce,ht)|0;var Kn=(B+z|0)+((P&8191)<<13)|0;B=(V+(P>>>13)|0)+(Kn>>>26)|0,Kn&=67108863,z=Math.imul(Oe,Ie),P=Math.imul(Oe,De),P=P+Math.imul(He,Ie)|0,V=Math.imul(He,De),z=z+Math.imul(de,it)|0,P=P+Math.imul(de,mt)|0,P=P+Math.imul(xe,it)|0,V=V+Math.imul(xe,mt)|0,z=z+Math.imul(Re,nt)|0,P=P+Math.imul(Re,vt)|0,P=P+Math.imul(J,nt)|0,V=V+Math.imul(J,vt)|0,z=z+Math.imul(ie,Je)|0,P=P+Math.imul(ie,ht)|0,P=P+Math.imul(he,Je)|0,V=V+Math.imul(he,ht)|0,z=z+Math.imul(ye,_e)|0,P=P+Math.imul(ye,dt)|0,P=P+Math.imul(Ce,_e)|0,V=V+Math.imul(Ce,dt)|0;var gr=(B+z|0)+((P&8191)<<13)|0;B=(V+(P>>>13)|0)+(gr>>>26)|0,gr&=67108863,z=Math.imul(Fe,Ie),P=Math.imul(Fe,De),P=P+Math.imul(ze,Ie)|0,V=Math.imul(ze,De),z=z+Math.imul(Oe,it)|0,P=P+Math.imul(Oe,mt)|0,P=P+Math.imul(He,it)|0,V=V+Math.imul(He,mt)|0,z=z+Math.imul(de,nt)|0,P=P+Math.imul(de,vt)|0,P=P+Math.imul(xe,nt)|0,V=V+Math.imul(xe,vt)|0,z=z+Math.imul(Re,Je)|0,P=P+Math.imul(Re,ht)|0,P=P+Math.imul(J,Je)|0,V=V+Math.imul(J,ht)|0,z=z+Math.imul(ie,_e)|0,P=P+Math.imul(ie,dt)|0,P=P+Math.imul(he,_e)|0,V=V+Math.imul(he,dt)|0,z=z+Math.imul(ye,ot)|0,P=P+Math.imul(ye,tt)|0,P=P+Math.imul(Ce,ot)|0,V=V+Math.imul(Ce,tt)|0;var fi=(B+z|0)+((P&8191)<<13)|0;B=(V+(P>>>13)|0)+(fi>>>26)|0,fi&=67108863,z=Math.imul(Ge,Ie),P=Math.imul(Ge,De),P=P+Math.imul(We,Ie)|0,V=Math.imul(We,De),z=z+Math.imul(Fe,it)|0,P=P+Math.imul(Fe,mt)|0,P=P+Math.imul(ze,it)|0,V=V+Math.imul(ze,mt)|0,z=z+Math.imul(Oe,nt)|0,P=P+Math.imul(Oe,vt)|0,P=P+Math.imul(He,nt)|0,V=V+Math.imul(He,vt)|0,z=z+Math.imul(de,Je)|0,P=P+Math.imul(de,ht)|0,P=P+Math.imul(xe,Je)|0,V=V+Math.imul(xe,ht)|0,z=z+Math.imul(Re,_e)|0,P=P+Math.imul(Re,dt)|0,P=P+Math.imul(J,_e)|0,V=V+Math.imul(J,dt)|0,z=z+Math.imul(ie,ot)|0,P=P+Math.imul(ie,tt)|0,P=P+Math.imul(he,ot)|0,V=V+Math.imul(he,tt)|0,z=z+Math.imul(ye,at)|0,P=P+Math.imul(ye,ft)|0,P=P+Math.imul(Ce,at)|0,V=V+Math.imul(Ce,ft)|0;var Sr=(B+z|0)+((P&8191)<<13)|0;B=(V+(P>>>13)|0)+(Sr>>>26)|0,Sr&=67108863,z=Math.imul(O,Ie),P=Math.imul(O,De),P=P+Math.imul(p,Ie)|0,V=Math.imul(p,De),z=z+Math.imul(Ge,it)|0,P=P+Math.imul(Ge,mt)|0,P=P+Math.imul(We,it)|0,V=V+Math.imul(We,mt)|0,z=z+Math.imul(Fe,nt)|0,P=P+Math.imul(Fe,vt)|0,P=P+Math.imul(ze,nt)|0,V=V+Math.imul(ze,vt)|0,z=z+Math.imul(Oe,Je)|0,P=P+Math.imul(Oe,ht)|0,P=P+Math.imul(He,Je)|0,V=V+Math.imul(He,ht)|0,z=z+Math.imul(de,_e)|0,P=P+Math.imul(de,dt)|0,P=P+Math.imul(xe,_e)|0,V=V+Math.imul(xe,dt)|0,z=z+Math.imul(Re,ot)|0,P=P+Math.imul(Re,tt)|0,P=P+Math.imul(J,ot)|0,V=V+Math.imul(J,tt)|0,z=z+Math.imul(ie,at)|0,P=P+Math.imul(ie,ft)|0,P=P+Math.imul(he,at)|0,V=V+Math.imul(he,ft)|0,z=z+Math.imul(ye,rt)|0,P=P+Math.imul(ye,bt)|0,P=P+Math.imul(Ce,rt)|0,V=V+Math.imul(Ce,bt)|0;var di=(B+z|0)+((P&8191)<<13)|0;B=(V+(P>>>13)|0)+(di>>>26)|0,di&=67108863,z=Math.imul(U,Ie),P=Math.imul(U,De),P=P+Math.imul($,Ie)|0,V=Math.imul($,De),z=z+Math.imul(O,it)|0,P=P+Math.imul(O,mt)|0,P=P+Math.imul(p,it)|0,V=V+Math.imul(p,mt)|0,z=z+Math.imul(Ge,nt)|0,P=P+Math.imul(Ge,vt)|0,P=P+Math.imul(We,nt)|0,V=V+Math.imul(We,vt)|0,z=z+Math.imul(Fe,Je)|0,P=P+Math.imul(Fe,ht)|0,P=P+Math.imul(ze,Je)|0,V=V+Math.imul(ze,ht)|0,z=z+Math.imul(Oe,_e)|0,P=P+Math.imul(Oe,dt)|0,P=P+Math.imul(He,_e)|0,V=V+Math.imul(He,dt)|0,z=z+Math.imul(de,ot)|0,P=P+Math.imul(de,tt)|0,P=P+Math.imul(xe,ot)|0,V=V+Math.imul(xe,tt)|0,z=z+Math.imul(Re,at)|0,P=P+Math.imul(Re,ft)|0,P=P+Math.imul(J,at)|0,V=V+Math.imul(J,ft)|0,z=z+Math.imul(ie,rt)|0,P=P+Math.imul(ie,bt)|0,P=P+Math.imul(he,rt)|0,V=V+Math.imul(he,bt)|0,z=z+Math.imul(ye,Ze)|0,P=P+Math.imul(ye,lt)|0,P=P+Math.imul(Ce,Ze)|0,V=V+Math.imul(Ce,lt)|0;var vr=(B+z|0)+((P&8191)<<13)|0;B=(V+(P>>>13)|0)+(vr>>>26)|0,vr&=67108863,z=Math.imul(te,Ie),P=Math.imul(te,De),P=P+Math.imul(Se,Ie)|0,V=Math.imul(Se,De),z=z+Math.imul(U,it)|0,P=P+Math.imul(U,mt)|0,P=P+Math.imul($,it)|0,V=V+Math.imul($,mt)|0,z=z+Math.imul(O,nt)|0,P=P+Math.imul(O,vt)|0,P=P+Math.imul(p,nt)|0,V=V+Math.imul(p,vt)|0,z=z+Math.imul(Ge,Je)|0,P=P+Math.imul(Ge,ht)|0,P=P+Math.imul(We,Je)|0,V=V+Math.imul(We,ht)|0,z=z+Math.imul(Fe,_e)|0,P=P+Math.imul(Fe,dt)|0,P=P+Math.imul(ze,_e)|0,V=V+Math.imul(ze,dt)|0,z=z+Math.imul(Oe,ot)|0,P=P+Math.imul(Oe,tt)|0,P=P+Math.imul(He,ot)|0,V=V+Math.imul(He,tt)|0,z=z+Math.imul(de,at)|0,P=P+Math.imul(de,ft)|0,P=P+Math.imul(xe,at)|0,V=V+Math.imul(xe,ft)|0,z=z+Math.imul(Re,rt)|0,P=P+Math.imul(Re,bt)|0,P=P+Math.imul(J,rt)|0,V=V+Math.imul(J,bt)|0,z=z+Math.imul(ie,Ze)|0,P=P+Math.imul(ie,lt)|0,P=P+Math.imul(he,Ze)|0,V=V+Math.imul(he,lt)|0,z=z+Math.imul(ye,qt)|0,P=P+Math.imul(ye,Ft)|0,P=P+Math.imul(Ce,qt)|0,V=V+Math.imul(Ce,Ft)|0;var Wn=(B+z|0)+((P&8191)<<13)|0;B=(V+(P>>>13)|0)+(Wn>>>26)|0,Wn&=67108863,z=Math.imul(te,it),P=Math.imul(te,mt),P=P+Math.imul(Se,it)|0,V=Math.imul(Se,mt),z=z+Math.imul(U,nt)|0,P=P+Math.imul(U,vt)|0,P=P+Math.imul($,nt)|0,V=V+Math.imul($,vt)|0,z=z+Math.imul(O,Je)|0,P=P+Math.imul(O,ht)|0,P=P+Math.imul(p,Je)|0,V=V+Math.imul(p,ht)|0,z=z+Math.imul(Ge,_e)|0,P=P+Math.imul(Ge,dt)|0,P=P+Math.imul(We,_e)|0,V=V+Math.imul(We,dt)|0,z=z+Math.imul(Fe,ot)|0,P=P+Math.imul(Fe,tt)|0,P=P+Math.imul(ze,ot)|0,V=V+Math.imul(ze,tt)|0,z=z+Math.imul(Oe,at)|0,P=P+Math.imul(Oe,ft)|0,P=P+Math.imul(He,at)|0,V=V+Math.imul(He,ft)|0,z=z+Math.imul(de,rt)|0,P=P+Math.imul(de,bt)|0,P=P+Math.imul(xe,rt)|0,V=V+Math.imul(xe,bt)|0,z=z+Math.imul(Re,Ze)|0,P=P+Math.imul(Re,lt)|0,P=P+Math.imul(J,Ze)|0,V=V+Math.imul(J,lt)|0,z=z+Math.imul(ie,qt)|0,P=P+Math.imul(ie,Ft)|0,P=P+Math.imul(he,qt)|0,V=V+Math.imul(he,Ft)|0;var W=(B+z|0)+((P&8191)<<13)|0;B=(V+(P>>>13)|0)+(W>>>26)|0,W&=67108863,z=Math.imul(te,nt),P=Math.imul(te,vt),P=P+Math.imul(Se,nt)|0,V=Math.imul(Se,vt),z=z+Math.imul(U,Je)|0,P=P+Math.imul(U,ht)|0,P=P+Math.imul($,Je)|0,V=V+Math.imul($,ht)|0,z=z+Math.imul(O,_e)|0,P=P+Math.imul(O,dt)|0,P=P+Math.imul(p,_e)|0,V=V+Math.imul(p,dt)|0,z=z+Math.imul(Ge,ot)|0,P=P+Math.imul(Ge,tt)|0,P=P+Math.imul(We,ot)|0,V=V+Math.imul(We,tt)|0,z=z+Math.imul(Fe,at)|0,P=P+Math.imul(Fe,ft)|0,P=P+Math.imul(ze,at)|0,V=V+Math.imul(ze,ft)|0,z=z+Math.imul(Oe,rt)|0,P=P+Math.imul(Oe,bt)|0,P=P+Math.imul(He,rt)|0,V=V+Math.imul(He,bt)|0,z=z+Math.imul(de,Ze)|0,P=P+Math.imul(de,lt)|0,P=P+Math.imul(xe,Ze)|0,V=V+Math.imul(xe,lt)|0,z=z+Math.imul(Re,qt)|0,P=P+Math.imul(Re,Ft)|0,P=P+Math.imul(J,qt)|0,V=V+Math.imul(J,Ft)|0;var F=(B+z|0)+((P&8191)<<13)|0;B=(V+(P>>>13)|0)+(F>>>26)|0,F&=67108863,z=Math.imul(te,Je),P=Math.imul(te,ht),P=P+Math.imul(Se,Je)|0,V=Math.imul(Se,ht),z=z+Math.imul(U,_e)|0,P=P+Math.imul(U,dt)|0,P=P+Math.imul($,_e)|0,V=V+Math.imul($,dt)|0,z=z+Math.imul(O,ot)|0,P=P+Math.imul(O,tt)|0,P=P+Math.imul(p,ot)|0,V=V+Math.imul(p,tt)|0,z=z+Math.imul(Ge,at)|0,P=P+Math.imul(Ge,ft)|0,P=P+Math.imul(We,at)|0,V=V+Math.imul(We,ft)|0,z=z+Math.imul(Fe,rt)|0,P=P+Math.imul(Fe,bt)|0,P=P+Math.imul(ze,rt)|0,V=V+Math.imul(ze,bt)|0,z=z+Math.imul(Oe,Ze)|0,P=P+Math.imul(Oe,lt)|0,P=P+Math.imul(He,Ze)|0,V=V+Math.imul(He,lt)|0,z=z+Math.imul(de,qt)|0,P=P+Math.imul(de,Ft)|0,P=P+Math.imul(xe,qt)|0,V=V+Math.imul(xe,Ft)|0;var H=(B+z|0)+((P&8191)<<13)|0;B=(V+(P>>>13)|0)+(H>>>26)|0,H&=67108863,z=Math.imul(te,_e),P=Math.imul(te,dt),P=P+Math.imul(Se,_e)|0,V=Math.imul(Se,dt),z=z+Math.imul(U,ot)|0,P=P+Math.imul(U,tt)|0,P=P+Math.imul($,ot)|0,V=V+Math.imul($,tt)|0,z=z+Math.imul(O,at)|0,P=P+Math.imul(O,ft)|0,P=P+Math.imul(p,at)|0,V=V+Math.imul(p,ft)|0,z=z+Math.imul(Ge,rt)|0,P=P+Math.imul(Ge,bt)|0,P=P+Math.imul(We,rt)|0,V=V+Math.imul(We,bt)|0,z=z+Math.imul(Fe,Ze)|0,P=P+Math.imul(Fe,lt)|0,P=P+Math.imul(ze,Ze)|0,V=V+Math.imul(ze,lt)|0,z=z+Math.imul(Oe,qt)|0,P=P+Math.imul(Oe,Ft)|0,P=P+Math.imul(He,qt)|0,V=V+Math.imul(He,Ft)|0;var G=(B+z|0)+((P&8191)<<13)|0;B=(V+(P>>>13)|0)+(G>>>26)|0,G&=67108863,z=Math.imul(te,ot),P=Math.imul(te,tt),P=P+Math.imul(Se,ot)|0,V=Math.imul(Se,tt),z=z+Math.imul(U,at)|0,P=P+Math.imul(U,ft)|0,P=P+Math.imul($,at)|0,V=V+Math.imul($,ft)|0,z=z+Math.imul(O,rt)|0,P=P+Math.imul(O,bt)|0,P=P+Math.imul(p,rt)|0,V=V+Math.imul(p,bt)|0,z=z+Math.imul(Ge,Ze)|0,P=P+Math.imul(Ge,lt)|0,P=P+Math.imul(We,Ze)|0,V=V+Math.imul(We,lt)|0,z=z+Math.imul(Fe,qt)|0,P=P+Math.imul(Fe,Ft)|0,P=P+Math.imul(ze,qt)|0,V=V+Math.imul(ze,Ft)|0;var Q=(B+z|0)+((P&8191)<<13)|0;B=(V+(P>>>13)|0)+(Q>>>26)|0,Q&=67108863,z=Math.imul(te,at),P=Math.imul(te,ft),P=P+Math.imul(Se,at)|0,V=Math.imul(Se,ft),z=z+Math.imul(U,rt)|0,P=P+Math.imul(U,bt)|0,P=P+Math.imul($,rt)|0,V=V+Math.imul($,bt)|0,z=z+Math.imul(O,Ze)|0,P=P+Math.imul(O,lt)|0,P=P+Math.imul(p,Ze)|0,V=V+Math.imul(p,lt)|0,z=z+Math.imul(Ge,qt)|0,P=P+Math.imul(Ge,Ft)|0,P=P+Math.imul(We,qt)|0,V=V+Math.imul(We,Ft)|0;var ue=(B+z|0)+((P&8191)<<13)|0;B=(V+(P>>>13)|0)+(ue>>>26)|0,ue&=67108863,z=Math.imul(te,rt),P=Math.imul(te,bt),P=P+Math.imul(Se,rt)|0,V=Math.imul(Se,bt),z=z+Math.imul(U,Ze)|0,P=P+Math.imul(U,lt)|0,P=P+Math.imul($,Ze)|0,V=V+Math.imul($,lt)|0,z=z+Math.imul(O,qt)|0,P=P+Math.imul(O,Ft)|0,P=P+Math.imul(p,qt)|0,V=V+Math.imul(p,Ft)|0;var ve=(B+z|0)+((P&8191)<<13)|0;B=(V+(P>>>13)|0)+(ve>>>26)|0,ve&=67108863,z=Math.imul(te,Ze),P=Math.imul(te,lt),P=P+Math.imul(Se,Ze)|0,V=Math.imul(Se,lt),z=z+Math.imul(U,qt)|0,P=P+Math.imul(U,Ft)|0,P=P+Math.imul($,qt)|0,V=V+Math.imul($,Ft)|0;var ke=(B+z|0)+((P&8191)<<13)|0;B=(V+(P>>>13)|0)+(ke>>>26)|0,ke&=67108863,z=Math.imul(te,qt),P=Math.imul(te,Ft),P=P+Math.imul(Se,qt)|0,V=Math.imul(Se,Ft);var Ke=(B+z|0)+((P&8191)<<13)|0;return B=(V+(P>>>13)|0)+(Ke>>>26)|0,Ke&=67108863,b[0]=ci,b[1]=ui,b[2]=li,b[3]=Kn,b[4]=gr,b[5]=fi,b[6]=Sr,b[7]=di,b[8]=vr,b[9]=Wn,b[10]=W,b[11]=F,b[12]=H,b[13]=G,b[14]=Q,b[15]=ue,b[16]=ve,b[17]=ke,b[18]=Ke,B!==0&&(b[19]=B,M.length++),M};Math.imul||(j=q);function K(A,f,_){_.negative=f.negative^A.negative,_.length=A.length+f.length;for(var M=0,R=0,h=0;h<_.length-1;h++){var b=R;R=0;for(var B=M&67108863,z=Math.min(h,f.length-1),P=Math.max(0,h-A.length+1);P<=z;P++){var V=h-P,fe=A.words[V]|0,ye=f.words[P]|0,Ce=fe*ye,ae=Ce&67108863;b=b+(Ce/67108864|0)|0,ae=ae+B|0,B=ae&67108863,b=b+(ae>>>26)|0,R+=b>>>26,b&=67108863;}_.words[h]=B,M=b,b=R;}return M!==0?_.words[h]=M:_.length--,_._strip()}function Z(A,f,_){return K(A,f,_)}i.prototype.mulTo=function(f,_){var M,R=this.length+f.length;return this.length===10&&f.length===10?M=j(this,f,_):R<63?M=q(this,f,_):R<1024?M=K(this,f,_):M=Z(this,f,_),M};i.prototype.mul=function(f){var _=new i(null);return _.words=new Array(this.length+f.length),this.mulTo(f,_)},i.prototype.mulf=function(f){var _=new i(null);return _.words=new Array(this.length+f.length),Z(this,f,_)},i.prototype.imul=function(f){return this.clone().mulTo(f,this)},i.prototype.imuln=function(f){var _=f<0;_&&(f=-f),r(typeof f=="number"),r(f<67108864);for(var M=0,R=0;R<this.length;R++){var h=(this.words[R]|0)*f,b=(h&67108863)+(M&67108863);M>>=26,M+=h/67108864|0,M+=b>>>26,this.words[R]=b&67108863;}return M!==0&&(this.words[R]=M,this.length++),_?this.ineg():this},i.prototype.muln=function(f){return this.clone().imuln(f)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(f){var _=k(f);if(_.length===0)return new i(1);for(var M=this,R=0;R<_.length&&_[R]===0;R++,M=M.sqr());if(++R<_.length)for(var h=M.sqr();R<_.length;R++,h=h.sqr())_[R]!==0&&(M=M.mul(h));return M},i.prototype.iushln=function(f){r(typeof f=="number"&&f>=0);var _=f%26,M=(f-_)/26,R=67108863>>>26-_<<26-_,h;if(_!==0){var b=0;for(h=0;h<this.length;h++){var B=this.words[h]&R,z=(this.words[h]|0)-B<<_;this.words[h]=z|b,b=B>>>26-_;}b&&(this.words[h]=b,this.length++);}if(M!==0){for(h=this.length-1;h>=0;h--)this.words[h+M]=this.words[h];for(h=0;h<M;h++)this.words[h]=0;this.length+=M;}return this._strip()},i.prototype.ishln=function(f){return r(this.negative===0),this.iushln(f)},i.prototype.iushrn=function(f,_,M){r(typeof f=="number"&&f>=0);var R;_?R=(_-_%26)/26:R=0;var h=f%26,b=Math.min((f-h)/26,this.length),B=67108863^67108863>>>h<<h,z=M;if(R-=b,R=Math.max(0,R),z){for(var P=0;P<b;P++)z.words[P]=this.words[P];z.length=b;}if(b!==0)if(this.length>b)for(this.length-=b,P=0;P<this.length;P++)this.words[P]=this.words[P+b];else this.words[0]=0,this.length=1;var V=0;for(P=this.length-1;P>=0&&(V!==0||P>=R);P--){var fe=this.words[P]|0;this.words[P]=V<<26-h|fe>>>h,V=fe&B;}return z&&V!==0&&(z.words[z.length++]=V),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.ishrn=function(f,_,M){return r(this.negative===0),this.iushrn(f,_,M)},i.prototype.shln=function(f){return this.clone().ishln(f)},i.prototype.ushln=function(f){return this.clone().iushln(f)},i.prototype.shrn=function(f){return this.clone().ishrn(f)},i.prototype.ushrn=function(f){return this.clone().iushrn(f)},i.prototype.testn=function(f){r(typeof f=="number"&&f>=0);var _=f%26,M=(f-_)/26,R=1<<_;if(this.length<=M)return !1;var h=this.words[M];return !!(h&R)},i.prototype.imaskn=function(f){r(typeof f=="number"&&f>=0);var _=f%26,M=(f-_)/26;if(r(this.negative===0,"imaskn works only with positive numbers"),this.length<=M)return this;if(_!==0&&M++,this.length=Math.min(M,this.length),_!==0){var R=67108863^67108863>>>_<<_;this.words[this.length-1]&=R;}return this._strip()},i.prototype.maskn=function(f){return this.clone().imaskn(f)},i.prototype.iaddn=function(f){return r(typeof f=="number"),r(f<67108864),f<0?this.isubn(-f):this.negative!==0?this.length===1&&(this.words[0]|0)<=f?(this.words[0]=f-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(f),this.negative=1,this):this._iaddn(f)},i.prototype._iaddn=function(f){this.words[0]+=f;for(var _=0;_<this.length&&this.words[_]>=67108864;_++)this.words[_]-=67108864,_===this.length-1?this.words[_+1]=1:this.words[_+1]++;return this.length=Math.max(this.length,_+1),this},i.prototype.isubn=function(f){if(r(typeof f=="number"),r(f<67108864),f<0)return this.iaddn(-f);if(this.negative!==0)return this.negative=0,this.iaddn(f),this.negative=1,this;if(this.words[0]-=f,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var _=0;_<this.length&&this.words[_]<0;_++)this.words[_]+=67108864,this.words[_+1]-=1;return this._strip()},i.prototype.addn=function(f){return this.clone().iaddn(f)},i.prototype.subn=function(f){return this.clone().isubn(f)},i.prototype.iabs=function(){return this.negative=0,this},i.prototype.abs=function(){return this.clone().iabs()},i.prototype._ishlnsubmul=function(f,_,M){var R=f.length+M,h;this._expand(R);var b,B=0;for(h=0;h<f.length;h++){b=(this.words[h+M]|0)+B;var z=(f.words[h]|0)*_;b-=z&67108863,B=(b>>26)-(z/67108864|0),this.words[h+M]=b&67108863;}for(;h<this.length-M;h++)b=(this.words[h+M]|0)+B,B=b>>26,this.words[h+M]=b&67108863;if(B===0)return this._strip();for(r(B===-1),B=0,h=0;h<this.length;h++)b=-(this.words[h]|0)+B,B=b>>26,this.words[h]=b&67108863;return this.negative=1,this._strip()},i.prototype._wordDiv=function(f,_){var M=this.length-f.length,R=this.clone(),h=f,b=h.words[h.length-1]|0,B=this._countBits(b);M=26-B,M!==0&&(h=h.ushln(M),R.iushln(M),b=h.words[h.length-1]|0);var z=R.length-h.length,P;if(_!=="mod"){P=new i(null),P.length=z+1,P.words=new Array(P.length);for(var V=0;V<P.length;V++)P.words[V]=0;}var fe=R.clone()._ishlnsubmul(h,1,z);fe.negative===0&&(R=fe,P&&(P.words[z]=1));for(var ye=z-1;ye>=0;ye--){var Ce=(R.words[h.length+ye]|0)*67108864+(R.words[h.length+ye-1]|0);for(Ce=Math.min(Ce/b|0,67108863),R._ishlnsubmul(h,Ce,ye);R.negative!==0;)Ce--,R.negative=0,R._ishlnsubmul(h,1,ye),R.isZero()||(R.negative^=1);P&&(P.words[ye]=Ce);}return P&&P._strip(),R._strip(),_!=="div"&&M!==0&&R.iushrn(M),{div:P||null,mod:R}},i.prototype.divmod=function(f,_,M){if(r(!f.isZero()),this.isZero())return {div:new i(0),mod:new i(0)};var R,h,b;return this.negative!==0&&f.negative===0?(b=this.neg().divmod(f,_),_!=="mod"&&(R=b.div.neg()),_!=="div"&&(h=b.mod.neg(),M&&h.negative!==0&&h.iadd(f)),{div:R,mod:h}):this.negative===0&&f.negative!==0?(b=this.divmod(f.neg(),_),_!=="mod"&&(R=b.div.neg()),{div:R,mod:b.mod}):this.negative&f.negative?(b=this.neg().divmod(f.neg(),_),_!=="div"&&(h=b.mod.neg(),M&&h.negative!==0&&h.isub(f)),{div:b.div,mod:h}):f.length>this.length||this.cmp(f)<0?{div:new i(0),mod:this}:f.length===1?_==="div"?{div:this.divn(f.words[0]),mod:null}:_==="mod"?{div:null,mod:new i(this.modrn(f.words[0]))}:{div:this.divn(f.words[0]),mod:new i(this.modrn(f.words[0]))}:this._wordDiv(f,_)},i.prototype.div=function(f){return this.divmod(f,"div",!1).div},i.prototype.mod=function(f){return this.divmod(f,"mod",!1).mod},i.prototype.umod=function(f){return this.divmod(f,"mod",!0).mod},i.prototype.divRound=function(f){var _=this.divmod(f);if(_.mod.isZero())return _.div;var M=_.div.negative!==0?_.mod.isub(f):_.mod,R=f.ushrn(1),h=f.andln(1),b=M.cmp(R);return b<0||h===1&&b===0?_.div:_.div.negative!==0?_.div.isubn(1):_.div.iaddn(1)},i.prototype.modrn=function(f){var _=f<0;_&&(f=-f),r(f<=67108863);for(var M=(1<<26)%f,R=0,h=this.length-1;h>=0;h--)R=(M*R+(this.words[h]|0))%f;return _?-R:R},i.prototype.modn=function(f){return this.modrn(f)},i.prototype.idivn=function(f){var _=f<0;_&&(f=-f),r(f<=67108863);for(var M=0,R=this.length-1;R>=0;R--){var h=(this.words[R]|0)+M*67108864;this.words[R]=h/f|0,M=h%f;}return this._strip(),_?this.ineg():this},i.prototype.divn=function(f){return this.clone().idivn(f)},i.prototype.egcd=function(f){r(f.negative===0),r(!f.isZero());var _=this,M=f.clone();_.negative!==0?_=_.umod(f):_=_.clone();for(var R=new i(1),h=new i(0),b=new i(0),B=new i(1),z=0;_.isEven()&&M.isEven();)_.iushrn(1),M.iushrn(1),++z;for(var P=M.clone(),V=_.clone();!_.isZero();){for(var fe=0,ye=1;!(_.words[0]&ye)&&fe<26;++fe,ye<<=1);if(fe>0)for(_.iushrn(fe);fe-- >0;)(R.isOdd()||h.isOdd())&&(R.iadd(P),h.isub(V)),R.iushrn(1),h.iushrn(1);for(var Ce=0,ae=1;!(M.words[0]&ae)&&Ce<26;++Ce,ae<<=1);if(Ce>0)for(M.iushrn(Ce);Ce-- >0;)(b.isOdd()||B.isOdd())&&(b.iadd(P),B.isub(V)),b.iushrn(1),B.iushrn(1);_.cmp(M)>=0?(_.isub(M),R.isub(b),h.isub(B)):(M.isub(_),b.isub(R),B.isub(h));}return {a:b,b:B,gcd:M.iushln(z)}},i.prototype._invmp=function(f){r(f.negative===0),r(!f.isZero());var _=this,M=f.clone();_.negative!==0?_=_.umod(f):_=_.clone();for(var R=new i(1),h=new i(0),b=M.clone();_.cmpn(1)>0&&M.cmpn(1)>0;){for(var B=0,z=1;!(_.words[0]&z)&&B<26;++B,z<<=1);if(B>0)for(_.iushrn(B);B-- >0;)R.isOdd()&&R.iadd(b),R.iushrn(1);for(var P=0,V=1;!(M.words[0]&V)&&P<26;++P,V<<=1);if(P>0)for(M.iushrn(P);P-- >0;)h.isOdd()&&h.iadd(b),h.iushrn(1);_.cmp(M)>=0?(_.isub(M),R.isub(h)):(M.isub(_),h.isub(R));}var fe;return _.cmpn(1)===0?fe=R:fe=h,fe.cmpn(0)<0&&fe.iadd(f),fe},i.prototype.gcd=function(f){if(this.isZero())return f.abs();if(f.isZero())return this.abs();var _=this.clone(),M=f.clone();_.negative=0,M.negative=0;for(var R=0;_.isEven()&&M.isEven();R++)_.iushrn(1),M.iushrn(1);do{for(;_.isEven();)_.iushrn(1);for(;M.isEven();)M.iushrn(1);var h=_.cmp(M);if(h<0){var b=_;_=M,M=b;}else if(h===0||M.cmpn(1)===0)break;_.isub(M);}while(!0);return M.iushln(R)},i.prototype.invm=function(f){return this.egcd(f).a.umod(f)},i.prototype.isEven=function(){return (this.words[0]&1)===0},i.prototype.isOdd=function(){return (this.words[0]&1)===1},i.prototype.andln=function(f){return this.words[0]&f},i.prototype.bincn=function(f){r(typeof f=="number");var _=f%26,M=(f-_)/26,R=1<<_;if(this.length<=M)return this._expand(M+1),this.words[M]|=R,this;for(var h=R,b=M;h!==0&&b<this.length;b++){var B=this.words[b]|0;B+=h,h=B>>>26,B&=67108863,this.words[b]=B;}return h!==0&&(this.words[b]=h,this.length++),this},i.prototype.isZero=function(){return this.length===1&&this.words[0]===0},i.prototype.cmpn=function(f){var _=f<0;if(this.negative!==0&&!_)return -1;if(this.negative===0&&_)return 1;this._strip();var M;if(this.length>1)M=1;else {_&&(f=-f),r(f<=67108863,"Number is too big");var R=this.words[0]|0;M=R===f?0:R<f?-1:1;}return this.negative!==0?-M|0:M},i.prototype.cmp=function(f){if(this.negative!==0&&f.negative===0)return -1;if(this.negative===0&&f.negative!==0)return 1;var _=this.ucmp(f);return this.negative!==0?-_|0:_},i.prototype.ucmp=function(f){if(this.length>f.length)return 1;if(this.length<f.length)return -1;for(var _=0,M=this.length-1;M>=0;M--){var R=this.words[M]|0,h=f.words[M]|0;if(R!==h){R<h?_=-1:R>h&&(_=1);break}}return _},i.prototype.gtn=function(f){return this.cmpn(f)===1},i.prototype.gt=function(f){return this.cmp(f)===1},i.prototype.gten=function(f){return this.cmpn(f)>=0},i.prototype.gte=function(f){return this.cmp(f)>=0},i.prototype.ltn=function(f){return this.cmpn(f)===-1},i.prototype.lt=function(f){return this.cmp(f)===-1},i.prototype.lten=function(f){return this.cmpn(f)<=0},i.prototype.lte=function(f){return this.cmp(f)<=0},i.prototype.eqn=function(f){return this.cmpn(f)===0},i.prototype.eq=function(f){return this.cmp(f)===0},i.red=function(f){return new d(f)},i.prototype.toRed=function(f){return r(!this.red,"Already a number in reduction context"),r(this.negative===0,"red works only with positives"),f.convertTo(this)._forceRed(f)},i.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(f){return this.red=f,this},i.prototype.forceRed=function(f){return r(!this.red,"Already a number in reduction context"),this._forceRed(f)},i.prototype.redAdd=function(f){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,f)},i.prototype.redIAdd=function(f){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,f)},i.prototype.redSub=function(f){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,f)},i.prototype.redISub=function(f){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,f)},i.prototype.redShl=function(f){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,f)},i.prototype.redMul=function(f){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,f),this.red.mul(this,f)},i.prototype.redIMul=function(f){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,f),this.red.imul(this,f)},i.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(f){return r(this.red&&!f.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,f)};var ce={k256:null,p224:null,p192:null,p25519:null};function Te(A,f){this.name=A,this.p=new i(f,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp();}Te.prototype._tmp=function(){var f=new i(null);return f.words=new Array(Math.ceil(this.n/13)),f},Te.prototype.ireduce=function(f){var _=f,M;do this.split(_,this.tmp),_=this.imulK(_),_=_.iadd(this.tmp),M=_.bitLength();while(M>this.n);var R=M<this.n?-1:_.ucmp(this.p);return R===0?(_.words[0]=0,_.length=1):R>0?_.isub(this.p):_.strip!==void 0?_.strip():_._strip(),_},Te.prototype.split=function(f,_){f.iushrn(this.n,0,_);},Te.prototype.imulK=function(f){return f.imul(this.k)};function pe(){Te.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f");}n(pe,Te),pe.prototype.split=function(f,_){for(var M=4194303,R=Math.min(f.length,9),h=0;h<R;h++)_.words[h]=f.words[h];if(_.length=R,f.length<=9){f.words[0]=0,f.length=1;return}var b=f.words[9];for(_.words[_.length++]=b&M,h=10;h<f.length;h++){var B=f.words[h]|0;f.words[h-10]=(B&M)<<4|b>>>22,b=B;}b>>>=22,f.words[h-10]=b,b===0&&f.length>10?f.length-=10:f.length-=9;},pe.prototype.imulK=function(f){f.words[f.length]=0,f.words[f.length+1]=0,f.length+=2;for(var _=0,M=0;M<f.length;M++){var R=f.words[M]|0;_+=R*977,f.words[M]=_&67108863,_=R*64+(_/67108864|0);}return f.words[f.length-1]===0&&(f.length--,f.words[f.length-1]===0&&f.length--),f};function le(){Te.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001");}n(le,Te);function Y(){Te.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff");}n(Y,Te);function S(){Te.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed");}n(S,Te),S.prototype.imulK=function(f){for(var _=0,M=0;M<f.length;M++){var R=(f.words[M]|0)*19+_,h=R&67108863;R>>>=26,f.words[M]=h,_=R;}return _!==0&&(f.words[f.length++]=_),f},i._prime=function(f){if(ce[f])return ce[f];var _;if(f==="k256")_=new pe;else if(f==="p224")_=new le;else if(f==="p192")_=new Y;else if(f==="p25519")_=new S;else throw new Error("Unknown prime "+f);return ce[f]=_,_};function d(A){if(typeof A=="string"){var f=i._prime(A);this.m=f.p,this.prime=f;}else r(A.gtn(1),"modulus must be greater than 1"),this.m=A,this.prime=null;}d.prototype._verify1=function(f){r(f.negative===0,"red works only with positives"),r(f.red,"red works only with red numbers");},d.prototype._verify2=function(f,_){r((f.negative|_.negative)===0,"red works only with positives"),r(f.red&&f.red===_.red,"red works only with red numbers");},d.prototype.imod=function(f){return this.prime?this.prime.ireduce(f)._forceRed(this):(u(f,f.umod(this.m)._forceRed(this)),f)},d.prototype.neg=function(f){return f.isZero()?f.clone():this.m.sub(f)._forceRed(this)},d.prototype.add=function(f,_){this._verify2(f,_);var M=f.add(_);return M.cmp(this.m)>=0&&M.isub(this.m),M._forceRed(this)},d.prototype.iadd=function(f,_){this._verify2(f,_);var M=f.iadd(_);return M.cmp(this.m)>=0&&M.isub(this.m),M},d.prototype.sub=function(f,_){this._verify2(f,_);var M=f.sub(_);return M.cmpn(0)<0&&M.iadd(this.m),M._forceRed(this)},d.prototype.isub=function(f,_){this._verify2(f,_);var M=f.isub(_);return M.cmpn(0)<0&&M.iadd(this.m),M},d.prototype.shl=function(f,_){return this._verify1(f),this.imod(f.ushln(_))},d.prototype.imul=function(f,_){return this._verify2(f,_),this.imod(f.imul(_))},d.prototype.mul=function(f,_){return this._verify2(f,_),this.imod(f.mul(_))},d.prototype.isqr=function(f){return this.imul(f,f.clone())},d.prototype.sqr=function(f){return this.mul(f,f)},d.prototype.sqrt=function(f){if(f.isZero())return f.clone();var _=this.m.andln(3);if(r(_%2===1),_===3){var M=this.m.add(new i(1)).iushrn(2);return this.pow(f,M)}for(var R=this.m.subn(1),h=0;!R.isZero()&&R.andln(1)===0;)h++,R.iushrn(1);r(!R.isZero());var b=new i(1).toRed(this),B=b.redNeg(),z=this.m.subn(1).iushrn(1),P=this.m.bitLength();for(P=new i(2*P*P).toRed(this);this.pow(P,z).cmp(B)!==0;)P.redIAdd(B);for(var V=this.pow(P,R),fe=this.pow(f,R.addn(1).iushrn(1)),ye=this.pow(f,R),Ce=h;ye.cmp(b)!==0;){for(var ae=ye,ie=0;ae.cmp(b)!==0;ie++)ae=ae.redSqr();r(ie<Ce);var he=this.pow(V,new i(1).iushln(Ce-ie-1));fe=fe.redMul(he),V=he.redSqr(),ye=ye.redMul(V),Ce=ie;}return fe},d.prototype.invm=function(f){var _=f._invmp(this.m);return _.negative!==0?(_.negative=0,this.imod(_).redNeg()):this.imod(_)},d.prototype.pow=function(f,_){if(_.isZero())return new i(1).toRed(this);if(_.cmpn(1)===0)return f.clone();var M=4,R=new Array(1<<M);R[0]=new i(1).toRed(this),R[1]=f;for(var h=2;h<R.length;h++)R[h]=this.mul(R[h-1],f);var b=R[0],B=0,z=0,P=_.bitLength()%26;for(P===0&&(P=26),h=_.length-1;h>=0;h--){for(var V=_.words[h],fe=P-1;fe>=0;fe--){var ye=V>>fe&1;if(b!==R[0]&&(b=this.sqr(b)),ye===0&&B===0){z=0;continue}B<<=1,B|=ye,z++,!(z!==M&&(h!==0||fe!==0))&&(b=this.mul(b,R[B]),z=0,B=0);}P=26;}return b},d.prototype.convertTo=function(f){var _=f.umod(this.m);return _===f?_.clone():_},d.prototype.convertFrom=function(f){var _=f.clone();return _.red=null,_},i.mont=function(f){return new C(f)};function C(A){d.call(this,A),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv);}n(C,d),C.prototype.convertTo=function(f){return this.imod(f.ushln(this.shift))},C.prototype.convertFrom=function(f){var _=this.imod(f.mul(this.rinv));return _.red=null,_},C.prototype.imul=function(f,_){if(f.isZero()||_.isZero())return f.words[0]=0,f.length=1,f;var M=f.imul(_),R=M.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),h=M.isub(R).iushrn(this.shift),b=h;return h.cmp(this.m)>=0?b=h.isub(this.m):h.cmpn(0)<0&&(b=h.iadd(this.m)),b._forceRed(this)},C.prototype.mul=function(f,_){if(f.isZero()||_.isZero())return new i(0)._forceRed(this);var M=f.mul(_),R=M.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),h=M.isub(R).iushrn(this.shift),b=h;return h.cmp(this.m)>=0?b=h.isub(this.m):h.cmpn(0)<0&&(b=h.iadd(this.m)),b._forceRed(this)},C.prototype.invm=function(f){var _=this.imod(f._invmp(this.m).mul(this.r2));return _._forceRed(this)};})(typeof nS=="undefined"||nS,NO);});var UO=ne((GAe,BO)=>{v();m();y();g();var Rf=Rg(),BZ=Hs();function UZ(t){var e=kO(t),r=e.toRed(Rf.mont(t.modulus)).redPow(new Rf(t.publicExponent)).fromRed();return {blinder:r,unblinder:e.invm(t.modulus)}}function kO(t){var e=t.modulus.byteLength(),r;do r=new Rf(BZ(e));while(r.cmp(t.modulus)>=0||!r.umod(t.prime1)||!r.umod(t.prime2));return r}function PO(t,e){var r=UZ(e),n=e.modulus.byteLength(),i=new Rf(t).mul(r.blinder).umod(e.modulus),o=i.toRed(Rf.mont(e.prime1)),a=i.toRed(Rf.mont(e.prime2)),s=e.coefficient,c=e.prime1,u=e.prime2,l=o.redPow(e.exponent1).fromRed(),w=a.redPow(e.exponent2).fromRed(),T=l.isub(w).imul(s).umod(c).imul(u);return w.iadd(T).imul(r.unblinder).umod(e.modulus).toArrayLike(D.Buffer,"be",n)}PO.getr=kO;BO.exports=PO;});var DO=ne((JAe,DZ)=>{DZ.exports={name:"elliptic",version:"6.6.0",description:"EC cryptography",main:"lib/elliptic.js",files:["lib"],scripts:{lint:"eslint lib test","lint:fix":"npm run lint -- --fix",unit:"istanbul test _mocha --reporter=spec test/index.js",test:"npm run lint && npm run unit",version:"grunt dist && git add dist/"},repository:{type:"git",url:"git@github.com:indutny/elliptic"},keywords:["EC","Elliptic","curve","Cryptography"],author:"Fedor Indutny <fedor@indutny.com>",license:"MIT",bugs:{url:"https://github.com/indutny/elliptic/issues"},homepage:"https://github.com/indutny/elliptic",devDependencies:{brfs:"^2.0.2",coveralls:"^3.1.0",eslint:"^7.6.0",grunt:"^1.2.1","grunt-browserify":"^5.3.0","grunt-cli":"^1.3.2","grunt-contrib-connect":"^3.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^5.0.0","grunt-mocha-istanbul":"^5.0.2","grunt-saucelabs":"^9.0.1",istanbul:"^0.4.5",mocha:"^8.0.1"},dependencies:{"bn.js":"^4.11.9",brorand:"^1.1.0","hash.js":"^1.0.0","hmac-drbg":"^1.0.1",inherits:"^2.0.4","minimalistic-assert":"^1.0.1","minimalistic-crypto-utils":"^1.0.1"}};});var aa=ne((LO,iS)=>{v();m();y();g();(function(t,e){function r(S,d){if(!S)throw new Error(d||"Assertion failed")}function n(S,d){S.super_=d;var C=function(){};C.prototype=d.prototype,S.prototype=new C,S.prototype.constructor=S;}function i(S,d,C){if(i.isBN(S))return S;this.negative=0,this.words=null,this.length=0,this.red=null,S!==null&&((d==="le"||d==="be")&&(C=d,d=10),this._init(S||0,d||10,C||"be"));}typeof t=="object"?t.exports=i:e.BN=i,i.BN=i,i.wordSize=26;var o;try{typeof window!="undefined"&&typeof window.Buffer!="undefined"?o=window.Buffer:o=ug().Buffer;}catch(S){}i.isBN=function(d){return d instanceof i?!0:d!==null&&typeof d=="object"&&d.constructor.wordSize===i.wordSize&&Array.isArray(d.words)},i.max=function(d,C){return d.cmp(C)>0?d:C},i.min=function(d,C){return d.cmp(C)<0?d:C},i.prototype._init=function(d,C,A){if(typeof d=="number")return this._initNumber(d,C,A);if(typeof d=="object")return this._initArray(d,C,A);C==="hex"&&(C=16),r(C===(C|0)&&C>=2&&C<=36),d=d.toString().replace(/\s+/g,"");var f=0;d[0]==="-"&&(f++,this.negative=1),f<d.length&&(C===16?this._parseHex(d,f,A):(this._parseBase(d,C,f),A==="le"&&this._initArray(this.toArray(),C,A)));},i.prototype._initNumber=function(d,C,A){d<0&&(this.negative=1,d=-d),d<67108864?(this.words=[d&67108863],this.length=1):d<4503599627370496?(this.words=[d&67108863,d/67108864&67108863],this.length=2):(r(d<9007199254740992),this.words=[d&67108863,d/67108864&67108863,1],this.length=3),A==="le"&&this._initArray(this.toArray(),C,A);},i.prototype._initArray=function(d,C,A){if(r(typeof d.length=="number"),d.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(d.length/3),this.words=new Array(this.length);for(var f=0;f<this.length;f++)this.words[f]=0;var _,M,R=0;if(A==="be")for(f=d.length-1,_=0;f>=0;f-=3)M=d[f]|d[f-1]<<8|d[f-2]<<16,this.words[_]|=M<<R&67108863,this.words[_+1]=M>>>26-R&67108863,R+=24,R>=26&&(R-=26,_++);else if(A==="le")for(f=0,_=0;f<d.length;f+=3)M=d[f]|d[f+1]<<8|d[f+2]<<16,this.words[_]|=M<<R&67108863,this.words[_+1]=M>>>26-R&67108863,R+=24,R>=26&&(R-=26,_++);return this.strip()};function a(S,d){var C=S.charCodeAt(d);return C>=65&&C<=70?C-55:C>=97&&C<=102?C-87:C-48&15}function s(S,d,C){var A=a(S,C);return C-1>=d&&(A|=a(S,C-1)<<4),A}i.prototype._parseHex=function(d,C,A){this.length=Math.ceil((d.length-C)/6),this.words=new Array(this.length);for(var f=0;f<this.length;f++)this.words[f]=0;var _=0,M=0,R;if(A==="be")for(f=d.length-1;f>=C;f-=2)R=s(d,C,f)<<_,this.words[M]|=R&67108863,_>=18?(_-=18,M+=1,this.words[M]|=R>>>26):_+=8;else {var h=d.length-C;for(f=h%2===0?C+1:C;f<d.length;f+=2)R=s(d,C,f)<<_,this.words[M]|=R&67108863,_>=18?(_-=18,M+=1,this.words[M]|=R>>>26):_+=8;}this.strip();};function c(S,d,C,A){for(var f=0,_=Math.min(S.length,C),M=d;M<_;M++){var R=S.charCodeAt(M)-48;f*=A,R>=49?f+=R-49+10:R>=17?f+=R-17+10:f+=R;}return f}i.prototype._parseBase=function(d,C,A){this.words=[0],this.length=1;for(var f=0,_=1;_<=67108863;_*=C)f++;f--,_=_/C|0;for(var M=d.length-A,R=M%f,h=Math.min(M,M-R)+A,b=0,B=A;B<h;B+=f)b=c(d,B,B+f,C),this.imuln(_),this.words[0]+b<67108864?this.words[0]+=b:this._iaddn(b);if(R!==0){var z=1;for(b=c(d,B,d.length,C),B=0;B<R;B++)z*=C;this.imuln(z),this.words[0]+b<67108864?this.words[0]+=b:this._iaddn(b);}this.strip();},i.prototype.copy=function(d){d.words=new Array(this.length);for(var C=0;C<this.length;C++)d.words[C]=this.words[C];d.length=this.length,d.negative=this.negative,d.red=this.red;},i.prototype.clone=function(){var d=new i(null);return this.copy(d),d},i.prototype._expand=function(d){for(;this.length<d;)this.words[this.length++]=0;return this},i.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},i.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},i.prototype.inspect=function(){return (this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],l=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],w=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];i.prototype.toString=function(d,C){d=d||10,C=C|0||1;var A;if(d===16||d==="hex"){A="";for(var f=0,_=0,M=0;M<this.length;M++){var R=this.words[M],h=((R<<f|_)&16777215).toString(16);_=R>>>24-f&16777215,_!==0||M!==this.length-1?A=u[6-h.length]+h+A:A=h+A,f+=2,f>=26&&(f-=26,M--);}for(_!==0&&(A=_.toString(16)+A);A.length%C!==0;)A="0"+A;return this.negative!==0&&(A="-"+A),A}if(d===(d|0)&&d>=2&&d<=36){var b=l[d],B=w[d];A="";var z=this.clone();for(z.negative=0;!z.isZero();){var P=z.modn(B).toString(d);z=z.idivn(B),z.isZero()?A=P+A:A=u[b-P.length]+P+A;}for(this.isZero()&&(A="0"+A);A.length%C!==0;)A="0"+A;return this.negative!==0&&(A="-"+A),A}r(!1,"Base should be between 2 and 36");},i.prototype.toNumber=function(){var d=this.words[0];return this.length===2?d+=this.words[1]*67108864:this.length===3&&this.words[2]===1?d+=4503599627370496+this.words[1]*67108864:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-d:d},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(d,C){return r(typeof o!="undefined"),this.toArrayLike(o,d,C)},i.prototype.toArray=function(d,C){return this.toArrayLike(Array,d,C)},i.prototype.toArrayLike=function(d,C,A){var f=this.byteLength(),_=A||Math.max(1,f);r(f<=_,"byte array longer than desired length"),r(_>0,"Requested array length <= 0"),this.strip();var M=C==="le",R=new d(_),h,b,B=this.clone();if(M){for(b=0;!B.isZero();b++)h=B.andln(255),B.iushrn(8),R[b]=h;for(;b<_;b++)R[b]=0;}else {for(b=0;b<_-f;b++)R[b]=0;for(b=0;!B.isZero();b++)h=B.andln(255),B.iushrn(8),R[_-b-1]=h;}return R},Math.clz32?i.prototype._countBits=function(d){return 32-Math.clz32(d)}:i.prototype._countBits=function(d){var C=d,A=0;return C>=4096&&(A+=13,C>>>=13),C>=64&&(A+=7,C>>>=7),C>=8&&(A+=4,C>>>=4),C>=2&&(A+=2,C>>>=2),A+C},i.prototype._zeroBits=function(d){if(d===0)return 26;var C=d,A=0;return C&8191||(A+=13,C>>>=13),C&127||(A+=7,C>>>=7),C&15||(A+=4,C>>>=4),C&3||(A+=2,C>>>=2),C&1||A++,A},i.prototype.bitLength=function(){var d=this.words[this.length-1],C=this._countBits(d);return (this.length-1)*26+C};function T(S){for(var d=new Array(S.bitLength()),C=0;C<d.length;C++){var A=C/26|0,f=C%26;d[C]=(S.words[A]&1<<f)>>>f;}return d}i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var d=0,C=0;C<this.length;C++){var A=this._zeroBits(this.words[C]);if(d+=A,A!==26)break}return d},i.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},i.prototype.toTwos=function(d){return this.negative!==0?this.abs().inotn(d).iaddn(1):this.clone()},i.prototype.fromTwos=function(d){return this.testn(d-1)?this.notn(d).iaddn(1).ineg():this.clone()},i.prototype.isNeg=function(){return this.negative!==0},i.prototype.neg=function(){return this.clone().ineg()},i.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},i.prototype.iuor=function(d){for(;this.length<d.length;)this.words[this.length++]=0;for(var C=0;C<d.length;C++)this.words[C]=this.words[C]|d.words[C];return this.strip()},i.prototype.ior=function(d){return r((this.negative|d.negative)===0),this.iuor(d)},i.prototype.or=function(d){return this.length>d.length?this.clone().ior(d):d.clone().ior(this)},i.prototype.uor=function(d){return this.length>d.length?this.clone().iuor(d):d.clone().iuor(this)},i.prototype.iuand=function(d){var C;this.length>d.length?C=d:C=this;for(var A=0;A<C.length;A++)this.words[A]=this.words[A]&d.words[A];return this.length=C.length,this.strip()},i.prototype.iand=function(d){return r((this.negative|d.negative)===0),this.iuand(d)},i.prototype.and=function(d){return this.length>d.length?this.clone().iand(d):d.clone().iand(this)},i.prototype.uand=function(d){return this.length>d.length?this.clone().iuand(d):d.clone().iuand(this)},i.prototype.iuxor=function(d){var C,A;this.length>d.length?(C=this,A=d):(C=d,A=this);for(var f=0;f<A.length;f++)this.words[f]=C.words[f]^A.words[f];if(this!==C)for(;f<C.length;f++)this.words[f]=C.words[f];return this.length=C.length,this.strip()},i.prototype.ixor=function(d){return r((this.negative|d.negative)===0),this.iuxor(d)},i.prototype.xor=function(d){return this.length>d.length?this.clone().ixor(d):d.clone().ixor(this)},i.prototype.uxor=function(d){return this.length>d.length?this.clone().iuxor(d):d.clone().iuxor(this)},i.prototype.inotn=function(d){r(typeof d=="number"&&d>=0);var C=Math.ceil(d/26)|0,A=d%26;this._expand(C),A>0&&C--;for(var f=0;f<C;f++)this.words[f]=~this.words[f]&67108863;return A>0&&(this.words[f]=~this.words[f]&67108863>>26-A),this.strip()},i.prototype.notn=function(d){return this.clone().inotn(d)},i.prototype.setn=function(d,C){r(typeof d=="number"&&d>=0);var A=d/26|0,f=d%26;return this._expand(A+1),C?this.words[A]=this.words[A]|1<<f:this.words[A]=this.words[A]&~(1<<f),this.strip()},i.prototype.iadd=function(d){var C;if(this.negative!==0&&d.negative===0)return this.negative=0,C=this.isub(d),this.negative^=1,this._normSign();if(this.negative===0&&d.negative!==0)return d.negative=0,C=this.isub(d),d.negative=1,C._normSign();var A,f;this.length>d.length?(A=this,f=d):(A=d,f=this);for(var _=0,M=0;M<f.length;M++)C=(A.words[M]|0)+(f.words[M]|0)+_,this.words[M]=C&67108863,_=C>>>26;for(;_!==0&&M<A.length;M++)C=(A.words[M]|0)+_,this.words[M]=C&67108863,_=C>>>26;if(this.length=A.length,_!==0)this.words[this.length]=_,this.length++;else if(A!==this)for(;M<A.length;M++)this.words[M]=A.words[M];return this},i.prototype.add=function(d){var C;return d.negative!==0&&this.negative===0?(d.negative=0,C=this.sub(d),d.negative^=1,C):d.negative===0&&this.negative!==0?(this.negative=0,C=d.sub(this),this.negative=1,C):this.length>d.length?this.clone().iadd(d):d.clone().iadd(this)},i.prototype.isub=function(d){if(d.negative!==0){d.negative=0;var C=this.iadd(d);return d.negative=1,C._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(d),this.negative=1,this._normSign();var A=this.cmp(d);if(A===0)return this.negative=0,this.length=1,this.words[0]=0,this;var f,_;A>0?(f=this,_=d):(f=d,_=this);for(var M=0,R=0;R<_.length;R++)C=(f.words[R]|0)-(_.words[R]|0)+M,M=C>>26,this.words[R]=C&67108863;for(;M!==0&&R<f.length;R++)C=(f.words[R]|0)+M,M=C>>26,this.words[R]=C&67108863;if(M===0&&R<f.length&&f!==this)for(;R<f.length;R++)this.words[R]=f.words[R];return this.length=Math.max(this.length,R),f!==this&&(this.negative=1),this.strip()},i.prototype.sub=function(d){return this.clone().isub(d)};function x(S,d,C){C.negative=d.negative^S.negative;var A=S.length+d.length|0;C.length=A,A=A-1|0;var f=S.words[0]|0,_=d.words[0]|0,M=f*_,R=M&67108863,h=M/67108864|0;C.words[0]=R;for(var b=1;b<A;b++){for(var B=h>>>26,z=h&67108863,P=Math.min(b,d.length-1),V=Math.max(0,b-S.length+1);V<=P;V++){var fe=b-V|0;f=S.words[fe]|0,_=d.words[V]|0,M=f*_+z,B+=M/67108864|0,z=M&67108863;}C.words[b]=z|0,h=B|0;}return h!==0?C.words[b]=h|0:C.length--,C.strip()}var I=function(d,C,A){var f=d.words,_=C.words,M=A.words,R=0,h,b,B,z=f[0]|0,P=z&8191,V=z>>>13,fe=f[1]|0,ye=fe&8191,Ce=fe>>>13,ae=f[2]|0,ie=ae&8191,he=ae>>>13,Be=f[3]|0,Re=Be&8191,J=Be>>>13,ee=f[4]|0,de=ee&8191,xe=ee>>>13,Pe=f[5]|0,Oe=Pe&8191,He=Pe>>>13,St=f[6]|0,Fe=St&8191,ze=St>>>13,Tt=f[7]|0,Ge=Tt&8191,We=Tt>>>13,Pt=f[8]|0,O=Pt&8191,p=Pt>>>13,E=f[9]|0,U=E&8191,$=E>>>13,X=_[0]|0,te=X&8191,Se=X>>>13,Ve=_[1]|0,Ie=Ve&8191,De=Ve>>>13,qe=_[2]|0,it=qe&8191,mt=qe>>>13,nr=_[3]|0,nt=nr&8191,vt=nr>>>13,ir=_[4]|0,Je=ir&8191,ht=ir>>>13,or=_[5]|0,_e=or&8191,dt=or>>>13,ar=_[6]|0,ot=ar&8191,tt=ar>>>13,er=_[7]|0,at=er&8191,ft=er>>>13,tr=_[8]|0,rt=tr&8191,bt=tr>>>13,It=_[9]|0,Ze=It&8191,lt=It>>>13;A.negative=d.negative^C.negative,A.length=19,h=Math.imul(P,te),b=Math.imul(P,Se),b=b+Math.imul(V,te)|0,B=Math.imul(V,Se);var jr=(R+h|0)+((b&8191)<<13)|0;R=(B+(b>>>13)|0)+(jr>>>26)|0,jr&=67108863,h=Math.imul(ye,te),b=Math.imul(ye,Se),b=b+Math.imul(Ce,te)|0,B=Math.imul(Ce,Se),h=h+Math.imul(P,Ie)|0,b=b+Math.imul(P,De)|0,b=b+Math.imul(V,Ie)|0,B=B+Math.imul(V,De)|0;var qt=(R+h|0)+((b&8191)<<13)|0;R=(B+(b>>>13)|0)+(qt>>>26)|0,qt&=67108863,h=Math.imul(ie,te),b=Math.imul(ie,Se),b=b+Math.imul(he,te)|0,B=Math.imul(he,Se),h=h+Math.imul(ye,Ie)|0,b=b+Math.imul(ye,De)|0,b=b+Math.imul(Ce,Ie)|0,B=B+Math.imul(Ce,De)|0,h=h+Math.imul(P,it)|0,b=b+Math.imul(P,mt)|0,b=b+Math.imul(V,it)|0,B=B+Math.imul(V,mt)|0;var Ft=(R+h|0)+((b&8191)<<13)|0;R=(B+(b>>>13)|0)+(Ft>>>26)|0,Ft&=67108863,h=Math.imul(Re,te),b=Math.imul(Re,Se),b=b+Math.imul(J,te)|0,B=Math.imul(J,Se),h=h+Math.imul(ie,Ie)|0,b=b+Math.imul(ie,De)|0,b=b+Math.imul(he,Ie)|0,B=B+Math.imul(he,De)|0,h=h+Math.imul(ye,it)|0,b=b+Math.imul(ye,mt)|0,b=b+Math.imul(Ce,it)|0,B=B+Math.imul(Ce,mt)|0,h=h+Math.imul(P,nt)|0,b=b+Math.imul(P,vt)|0,b=b+Math.imul(V,nt)|0,B=B+Math.imul(V,vt)|0;var ci=(R+h|0)+((b&8191)<<13)|0;R=(B+(b>>>13)|0)+(ci>>>26)|0,ci&=67108863,h=Math.imul(de,te),b=Math.imul(de,Se),b=b+Math.imul(xe,te)|0,B=Math.imul(xe,Se),h=h+Math.imul(Re,Ie)|0,b=b+Math.imul(Re,De)|0,b=b+Math.imul(J,Ie)|0,B=B+Math.imul(J,De)|0,h=h+Math.imul(ie,it)|0,b=b+Math.imul(ie,mt)|0,b=b+Math.imul(he,it)|0,B=B+Math.imul(he,mt)|0,h=h+Math.imul(ye,nt)|0,b=b+Math.imul(ye,vt)|0,b=b+Math.imul(Ce,nt)|0,B=B+Math.imul(Ce,vt)|0,h=h+Math.imul(P,Je)|0,b=b+Math.imul(P,ht)|0,b=b+Math.imul(V,Je)|0,B=B+Math.imul(V,ht)|0;var ui=(R+h|0)+((b&8191)<<13)|0;R=(B+(b>>>13)|0)+(ui>>>26)|0,ui&=67108863,h=Math.imul(Oe,te),b=Math.imul(Oe,Se),b=b+Math.imul(He,te)|0,B=Math.imul(He,Se),h=h+Math.imul(de,Ie)|0,b=b+Math.imul(de,De)|0,b=b+Math.imul(xe,Ie)|0,B=B+Math.imul(xe,De)|0,h=h+Math.imul(Re,it)|0,b=b+Math.imul(Re,mt)|0,b=b+Math.imul(J,it)|0,B=B+Math.imul(J,mt)|0,h=h+Math.imul(ie,nt)|0,b=b+Math.imul(ie,vt)|0,b=b+Math.imul(he,nt)|0,B=B+Math.imul(he,vt)|0,h=h+Math.imul(ye,Je)|0,b=b+Math.imul(ye,ht)|0,b=b+Math.imul(Ce,Je)|0,B=B+Math.imul(Ce,ht)|0,h=h+Math.imul(P,_e)|0,b=b+Math.imul(P,dt)|0,b=b+Math.imul(V,_e)|0,B=B+Math.imul(V,dt)|0;var li=(R+h|0)+((b&8191)<<13)|0;R=(B+(b>>>13)|0)+(li>>>26)|0,li&=67108863,h=Math.imul(Fe,te),b=Math.imul(Fe,Se),b=b+Math.imul(ze,te)|0,B=Math.imul(ze,Se),h=h+Math.imul(Oe,Ie)|0,b=b+Math.imul(Oe,De)|0,b=b+Math.imul(He,Ie)|0,B=B+Math.imul(He,De)|0,h=h+Math.imul(de,it)|0,b=b+Math.imul(de,mt)|0,b=b+Math.imul(xe,it)|0,B=B+Math.imul(xe,mt)|0,h=h+Math.imul(Re,nt)|0,b=b+Math.imul(Re,vt)|0,b=b+Math.imul(J,nt)|0,B=B+Math.imul(J,vt)|0,h=h+Math.imul(ie,Je)|0,b=b+Math.imul(ie,ht)|0,b=b+Math.imul(he,Je)|0,B=B+Math.imul(he,ht)|0,h=h+Math.imul(ye,_e)|0,b=b+Math.imul(ye,dt)|0,b=b+Math.imul(Ce,_e)|0,B=B+Math.imul(Ce,dt)|0,h=h+Math.imul(P,ot)|0,b=b+Math.imul(P,tt)|0,b=b+Math.imul(V,ot)|0,B=B+Math.imul(V,tt)|0;var Kn=(R+h|0)+((b&8191)<<13)|0;R=(B+(b>>>13)|0)+(Kn>>>26)|0,Kn&=67108863,h=Math.imul(Ge,te),b=Math.imul(Ge,Se),b=b+Math.imul(We,te)|0,B=Math.imul(We,Se),h=h+Math.imul(Fe,Ie)|0,b=b+Math.imul(Fe,De)|0,b=b+Math.imul(ze,Ie)|0,B=B+Math.imul(ze,De)|0,h=h+Math.imul(Oe,it)|0,b=b+Math.imul(Oe,mt)|0,b=b+Math.imul(He,it)|0,B=B+Math.imul(He,mt)|0,h=h+Math.imul(de,nt)|0,b=b+Math.imul(de,vt)|0,b=b+Math.imul(xe,nt)|0,B=B+Math.imul(xe,vt)|0,h=h+Math.imul(Re,Je)|0,b=b+Math.imul(Re,ht)|0,b=b+Math.imul(J,Je)|0,B=B+Math.imul(J,ht)|0,h=h+Math.imul(ie,_e)|0,b=b+Math.imul(ie,dt)|0,b=b+Math.imul(he,_e)|0,B=B+Math.imul(he,dt)|0,h=h+Math.imul(ye,ot)|0,b=b+Math.imul(ye,tt)|0,b=b+Math.imul(Ce,ot)|0,B=B+Math.imul(Ce,tt)|0,h=h+Math.imul(P,at)|0,b=b+Math.imul(P,ft)|0,b=b+Math.imul(V,at)|0,B=B+Math.imul(V,ft)|0;var gr=(R+h|0)+((b&8191)<<13)|0;R=(B+(b>>>13)|0)+(gr>>>26)|0,gr&=67108863,h=Math.imul(O,te),b=Math.imul(O,Se),b=b+Math.imul(p,te)|0,B=Math.imul(p,Se),h=h+Math.imul(Ge,Ie)|0,b=b+Math.imul(Ge,De)|0,b=b+Math.imul(We,Ie)|0,B=B+Math.imul(We,De)|0,h=h+Math.imul(Fe,it)|0,b=b+Math.imul(Fe,mt)|0,b=b+Math.imul(ze,it)|0,B=B+Math.imul(ze,mt)|0,h=h+Math.imul(Oe,nt)|0,b=b+Math.imul(Oe,vt)|0,b=b+Math.imul(He,nt)|0,B=B+Math.imul(He,vt)|0,h=h+Math.imul(de,Je)|0,b=b+Math.imul(de,ht)|0,b=b+Math.imul(xe,Je)|0,B=B+Math.imul(xe,ht)|0,h=h+Math.imul(Re,_e)|0,b=b+Math.imul(Re,dt)|0,b=b+Math.imul(J,_e)|0,B=B+Math.imul(J,dt)|0,h=h+Math.imul(ie,ot)|0,b=b+Math.imul(ie,tt)|0,b=b+Math.imul(he,ot)|0,B=B+Math.imul(he,tt)|0,h=h+Math.imul(ye,at)|0,b=b+Math.imul(ye,ft)|0,b=b+Math.imul(Ce,at)|0,B=B+Math.imul(Ce,ft)|0,h=h+Math.imul(P,rt)|0,b=b+Math.imul(P,bt)|0,b=b+Math.imul(V,rt)|0,B=B+Math.imul(V,bt)|0;var fi=(R+h|0)+((b&8191)<<13)|0;R=(B+(b>>>13)|0)+(fi>>>26)|0,fi&=67108863,h=Math.imul(U,te),b=Math.imul(U,Se),b=b+Math.imul($,te)|0,B=Math.imul($,Se),h=h+Math.imul(O,Ie)|0,b=b+Math.imul(O,De)|0,b=b+Math.imul(p,Ie)|0,B=B+Math.imul(p,De)|0,h=h+Math.imul(Ge,it)|0,b=b+Math.imul(Ge,mt)|0,b=b+Math.imul(We,it)|0,B=B+Math.imul(We,mt)|0,h=h+Math.imul(Fe,nt)|0,b=b+Math.imul(Fe,vt)|0,b=b+Math.imul(ze,nt)|0,B=B+Math.imul(ze,vt)|0,h=h+Math.imul(Oe,Je)|0,b=b+Math.imul(Oe,ht)|0,b=b+Math.imul(He,Je)|0,B=B+Math.imul(He,ht)|0,h=h+Math.imul(de,_e)|0,b=b+Math.imul(de,dt)|0,b=b+Math.imul(xe,_e)|0,B=B+Math.imul(xe,dt)|0,h=h+Math.imul(Re,ot)|0,b=b+Math.imul(Re,tt)|0,b=b+Math.imul(J,ot)|0,B=B+Math.imul(J,tt)|0,h=h+Math.imul(ie,at)|0,b=b+Math.imul(ie,ft)|0,b=b+Math.imul(he,at)|0,B=B+Math.imul(he,ft)|0,h=h+Math.imul(ye,rt)|0,b=b+Math.imul(ye,bt)|0,b=b+Math.imul(Ce,rt)|0,B=B+Math.imul(Ce,bt)|0,h=h+Math.imul(P,Ze)|0,b=b+Math.imul(P,lt)|0,b=b+Math.imul(V,Ze)|0,B=B+Math.imul(V,lt)|0;var Sr=(R+h|0)+((b&8191)<<13)|0;R=(B+(b>>>13)|0)+(Sr>>>26)|0,Sr&=67108863,h=Math.imul(U,Ie),b=Math.imul(U,De),b=b+Math.imul($,Ie)|0,B=Math.imul($,De),h=h+Math.imul(O,it)|0,b=b+Math.imul(O,mt)|0,b=b+Math.imul(p,it)|0,B=B+Math.imul(p,mt)|0,h=h+Math.imul(Ge,nt)|0,b=b+Math.imul(Ge,vt)|0,b=b+Math.imul(We,nt)|0,B=B+Math.imul(We,vt)|0,h=h+Math.imul(Fe,Je)|0,b=b+Math.imul(Fe,ht)|0,b=b+Math.imul(ze,Je)|0,B=B+Math.imul(ze,ht)|0,h=h+Math.imul(Oe,_e)|0,b=b+Math.imul(Oe,dt)|0,b=b+Math.imul(He,_e)|0,B=B+Math.imul(He,dt)|0,h=h+Math.imul(de,ot)|0,b=b+Math.imul(de,tt)|0,b=b+Math.imul(xe,ot)|0,B=B+Math.imul(xe,tt)|0,h=h+Math.imul(Re,at)|0,b=b+Math.imul(Re,ft)|0,b=b+Math.imul(J,at)|0,B=B+Math.imul(J,ft)|0,h=h+Math.imul(ie,rt)|0,b=b+Math.imul(ie,bt)|0,b=b+Math.imul(he,rt)|0,B=B+Math.imul(he,bt)|0,h=h+Math.imul(ye,Ze)|0,b=b+Math.imul(ye,lt)|0,b=b+Math.imul(Ce,Ze)|0,B=B+Math.imul(Ce,lt)|0;var di=(R+h|0)+((b&8191)<<13)|0;R=(B+(b>>>13)|0)+(di>>>26)|0,di&=67108863,h=Math.imul(U,it),b=Math.imul(U,mt),b=b+Math.imul($,it)|0,B=Math.imul($,mt),h=h+Math.imul(O,nt)|0,b=b+Math.imul(O,vt)|0,b=b+Math.imul(p,nt)|0,B=B+Math.imul(p,vt)|0,h=h+Math.imul(Ge,Je)|0,b=b+Math.imul(Ge,ht)|0,b=b+Math.imul(We,Je)|0,B=B+Math.imul(We,ht)|0,h=h+Math.imul(Fe,_e)|0,b=b+Math.imul(Fe,dt)|0,b=b+Math.imul(ze,_e)|0,B=B+Math.imul(ze,dt)|0,h=h+Math.imul(Oe,ot)|0,b=b+Math.imul(Oe,tt)|0,b=b+Math.imul(He,ot)|0,B=B+Math.imul(He,tt)|0,h=h+Math.imul(de,at)|0,b=b+Math.imul(de,ft)|0,b=b+Math.imul(xe,at)|0,B=B+Math.imul(xe,ft)|0,h=h+Math.imul(Re,rt)|0,b=b+Math.imul(Re,bt)|0,b=b+Math.imul(J,rt)|0,B=B+Math.imul(J,bt)|0,h=h+Math.imul(ie,Ze)|0,b=b+Math.imul(ie,lt)|0,b=b+Math.imul(he,Ze)|0,B=B+Math.imul(he,lt)|0;var vr=(R+h|0)+((b&8191)<<13)|0;R=(B+(b>>>13)|0)+(vr>>>26)|0,vr&=67108863,h=Math.imul(U,nt),b=Math.imul(U,vt),b=b+Math.imul($,nt)|0,B=Math.imul($,vt),h=h+Math.imul(O,Je)|0,b=b+Math.imul(O,ht)|0,b=b+Math.imul(p,Je)|0,B=B+Math.imul(p,ht)|0,h=h+Math.imul(Ge,_e)|0,b=b+Math.imul(Ge,dt)|0,b=b+Math.imul(We,_e)|0,B=B+Math.imul(We,dt)|0,h=h+Math.imul(Fe,ot)|0,b=b+Math.imul(Fe,tt)|0,b=b+Math.imul(ze,ot)|0,B=B+Math.imul(ze,tt)|0,h=h+Math.imul(Oe,at)|0,b=b+Math.imul(Oe,ft)|0,b=b+Math.imul(He,at)|0,B=B+Math.imul(He,ft)|0,h=h+Math.imul(de,rt)|0,b=b+Math.imul(de,bt)|0,b=b+Math.imul(xe,rt)|0,B=B+Math.imul(xe,bt)|0,h=h+Math.imul(Re,Ze)|0,b=b+Math.imul(Re,lt)|0,b=b+Math.imul(J,Ze)|0,B=B+Math.imul(J,lt)|0;var Wn=(R+h|0)+((b&8191)<<13)|0;R=(B+(b>>>13)|0)+(Wn>>>26)|0,Wn&=67108863,h=Math.imul(U,Je),b=Math.imul(U,ht),b=b+Math.imul($,Je)|0,B=Math.imul($,ht),h=h+Math.imul(O,_e)|0,b=b+Math.imul(O,dt)|0,b=b+Math.imul(p,_e)|0,B=B+Math.imul(p,dt)|0,h=h+Math.imul(Ge,ot)|0,b=b+Math.imul(Ge,tt)|0,b=b+Math.imul(We,ot)|0,B=B+Math.imul(We,tt)|0,h=h+Math.imul(Fe,at)|0,b=b+Math.imul(Fe,ft)|0,b=b+Math.imul(ze,at)|0,B=B+Math.imul(ze,ft)|0,h=h+Math.imul(Oe,rt)|0,b=b+Math.imul(Oe,bt)|0,b=b+Math.imul(He,rt)|0,B=B+Math.imul(He,bt)|0,h=h+Math.imul(de,Ze)|0,b=b+Math.imul(de,lt)|0,b=b+Math.imul(xe,Ze)|0,B=B+Math.imul(xe,lt)|0;var W=(R+h|0)+((b&8191)<<13)|0;R=(B+(b>>>13)|0)+(W>>>26)|0,W&=67108863,h=Math.imul(U,_e),b=Math.imul(U,dt),b=b+Math.imul($,_e)|0,B=Math.imul($,dt),h=h+Math.imul(O,ot)|0,b=b+Math.imul(O,tt)|0,b=b+Math.imul(p,ot)|0,B=B+Math.imul(p,tt)|0,h=h+Math.imul(Ge,at)|0,b=b+Math.imul(Ge,ft)|0,b=b+Math.imul(We,at)|0,B=B+Math.imul(We,ft)|0,h=h+Math.imul(Fe,rt)|0,b=b+Math.imul(Fe,bt)|0,b=b+Math.imul(ze,rt)|0,B=B+Math.imul(ze,bt)|0,h=h+Math.imul(Oe,Ze)|0,b=b+Math.imul(Oe,lt)|0,b=b+Math.imul(He,Ze)|0,B=B+Math.imul(He,lt)|0;var F=(R+h|0)+((b&8191)<<13)|0;R=(B+(b>>>13)|0)+(F>>>26)|0,F&=67108863,h=Math.imul(U,ot),b=Math.imul(U,tt),b=b+Math.imul($,ot)|0,B=Math.imul($,tt),h=h+Math.imul(O,at)|0,b=b+Math.imul(O,ft)|0,b=b+Math.imul(p,at)|0,B=B+Math.imul(p,ft)|0,h=h+Math.imul(Ge,rt)|0,b=b+Math.imul(Ge,bt)|0,b=b+Math.imul(We,rt)|0,B=B+Math.imul(We,bt)|0,h=h+Math.imul(Fe,Ze)|0,b=b+Math.imul(Fe,lt)|0,b=b+Math.imul(ze,Ze)|0,B=B+Math.imul(ze,lt)|0;var H=(R+h|0)+((b&8191)<<13)|0;R=(B+(b>>>13)|0)+(H>>>26)|0,H&=67108863,h=Math.imul(U,at),b=Math.imul(U,ft),b=b+Math.imul($,at)|0,B=Math.imul($,ft),h=h+Math.imul(O,rt)|0,b=b+Math.imul(O,bt)|0,b=b+Math.imul(p,rt)|0,B=B+Math.imul(p,bt)|0,h=h+Math.imul(Ge,Ze)|0,b=b+Math.imul(Ge,lt)|0,b=b+Math.imul(We,Ze)|0,B=B+Math.imul(We,lt)|0;var G=(R+h|0)+((b&8191)<<13)|0;R=(B+(b>>>13)|0)+(G>>>26)|0,G&=67108863,h=Math.imul(U,rt),b=Math.imul(U,bt),b=b+Math.imul($,rt)|0,B=Math.imul($,bt),h=h+Math.imul(O,Ze)|0,b=b+Math.imul(O,lt)|0,b=b+Math.imul(p,Ze)|0,B=B+Math.imul(p,lt)|0;var Q=(R+h|0)+((b&8191)<<13)|0;R=(B+(b>>>13)|0)+(Q>>>26)|0,Q&=67108863,h=Math.imul(U,Ze),b=Math.imul(U,lt),b=b+Math.imul($,Ze)|0,B=Math.imul($,lt);var ue=(R+h|0)+((b&8191)<<13)|0;return R=(B+(b>>>13)|0)+(ue>>>26)|0,ue&=67108863,M[0]=jr,M[1]=qt,M[2]=Ft,M[3]=ci,M[4]=ui,M[5]=li,M[6]=Kn,M[7]=gr,M[8]=fi,M[9]=Sr,M[10]=di,M[11]=vr,M[12]=Wn,M[13]=W,M[14]=F,M[15]=H,M[16]=G,M[17]=Q,M[18]=ue,R!==0&&(M[19]=R,A.length++),A};Math.imul||(I=x);function k(S,d,C){C.negative=d.negative^S.negative,C.length=S.length+d.length;for(var A=0,f=0,_=0;_<C.length-1;_++){var M=f;f=0;for(var R=A&67108863,h=Math.min(_,d.length-1),b=Math.max(0,_-S.length+1);b<=h;b++){var B=_-b,z=S.words[B]|0,P=d.words[b]|0,V=z*P,fe=V&67108863;M=M+(V/67108864|0)|0,fe=fe+R|0,R=fe&67108863,M=M+(fe>>>26)|0,f+=M>>>26,M&=67108863;}C.words[_]=R,A=M,M=f;}return A!==0?C.words[_]=A:C.length--,C.strip()}function q(S,d,C){var A=new j;return A.mulp(S,d,C)}i.prototype.mulTo=function(d,C){var A,f=this.length+d.length;return this.length===10&&d.length===10?A=I(this,d,C):f<63?A=x(this,d,C):f<1024?A=k(this,d,C):A=q(this,d,C),A};function j(S,d){this.x=S,this.y=d;}j.prototype.makeRBT=function(d){for(var C=new Array(d),A=i.prototype._countBits(d)-1,f=0;f<d;f++)C[f]=this.revBin(f,A,d);return C},j.prototype.revBin=function(d,C,A){if(d===0||d===A-1)return d;for(var f=0,_=0;_<C;_++)f|=(d&1)<<C-_-1,d>>=1;return f},j.prototype.permute=function(d,C,A,f,_,M){for(var R=0;R<M;R++)f[R]=C[d[R]],_[R]=A[d[R]];},j.prototype.transform=function(d,C,A,f,_,M){this.permute(M,d,C,A,f,_);for(var R=1;R<_;R<<=1)for(var h=R<<1,b=Math.cos(2*Math.PI/h),B=Math.sin(2*Math.PI/h),z=0;z<_;z+=h)for(var P=b,V=B,fe=0;fe<R;fe++){var ye=A[z+fe],Ce=f[z+fe],ae=A[z+fe+R],ie=f[z+fe+R],he=P*ae-V*ie;ie=P*ie+V*ae,ae=he,A[z+fe]=ye+ae,f[z+fe]=Ce+ie,A[z+fe+R]=ye-ae,f[z+fe+R]=Ce-ie,fe!==h&&(he=b*P-B*V,V=b*V+B*P,P=he);}},j.prototype.guessLen13b=function(d,C){var A=Math.max(C,d)|1,f=A&1,_=0;for(A=A/2|0;A;A=A>>>1)_++;return 1<<_+1+f},j.prototype.conjugate=function(d,C,A){if(!(A<=1))for(var f=0;f<A/2;f++){var _=d[f];d[f]=d[A-f-1],d[A-f-1]=_,_=C[f],C[f]=-C[A-f-1],C[A-f-1]=-_;}},j.prototype.normalize13b=function(d,C){for(var A=0,f=0;f<C/2;f++){var _=Math.round(d[2*f+1]/C)*8192+Math.round(d[2*f]/C)+A;d[f]=_&67108863,_<67108864?A=0:A=_/67108864|0;}return d},j.prototype.convert13b=function(d,C,A,f){for(var _=0,M=0;M<C;M++)_=_+(d[M]|0),A[2*M]=_&8191,_=_>>>13,A[2*M+1]=_&8191,_=_>>>13;for(M=2*C;M<f;++M)A[M]=0;r(_===0),r((_&-8192)===0);},j.prototype.stub=function(d){for(var C=new Array(d),A=0;A<d;A++)C[A]=0;return C},j.prototype.mulp=function(d,C,A){var f=2*this.guessLen13b(d.length,C.length),_=this.makeRBT(f),M=this.stub(f),R=new Array(f),h=new Array(f),b=new Array(f),B=new Array(f),z=new Array(f),P=new Array(f),V=A.words;V.length=f,this.convert13b(d.words,d.length,R,f),this.convert13b(C.words,C.length,B,f),this.transform(R,M,h,b,f,_),this.transform(B,M,z,P,f,_);for(var fe=0;fe<f;fe++){var ye=h[fe]*z[fe]-b[fe]*P[fe];b[fe]=h[fe]*P[fe]+b[fe]*z[fe],h[fe]=ye;}return this.conjugate(h,b,f),this.transform(h,b,V,M,f,_),this.conjugate(V,M,f),this.normalize13b(V,f),A.negative=d.negative^C.negative,A.length=d.length+C.length,A.strip()},i.prototype.mul=function(d){var C=new i(null);return C.words=new Array(this.length+d.length),this.mulTo(d,C)},i.prototype.mulf=function(d){var C=new i(null);return C.words=new Array(this.length+d.length),q(this,d,C)},i.prototype.imul=function(d){return this.clone().mulTo(d,this)},i.prototype.imuln=function(d){r(typeof d=="number"),r(d<67108864);for(var C=0,A=0;A<this.length;A++){var f=(this.words[A]|0)*d,_=(f&67108863)+(C&67108863);C>>=26,C+=f/67108864|0,C+=_>>>26,this.words[A]=_&67108863;}return C!==0&&(this.words[A]=C,this.length++),this},i.prototype.muln=function(d){return this.clone().imuln(d)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(d){var C=T(d);if(C.length===0)return new i(1);for(var A=this,f=0;f<C.length&&C[f]===0;f++,A=A.sqr());if(++f<C.length)for(var _=A.sqr();f<C.length;f++,_=_.sqr())C[f]!==0&&(A=A.mul(_));return A},i.prototype.iushln=function(d){r(typeof d=="number"&&d>=0);var C=d%26,A=(d-C)/26,f=67108863>>>26-C<<26-C,_;if(C!==0){var M=0;for(_=0;_<this.length;_++){var R=this.words[_]&f,h=(this.words[_]|0)-R<<C;this.words[_]=h|M,M=R>>>26-C;}M&&(this.words[_]=M,this.length++);}if(A!==0){for(_=this.length-1;_>=0;_--)this.words[_+A]=this.words[_];for(_=0;_<A;_++)this.words[_]=0;this.length+=A;}return this.strip()},i.prototype.ishln=function(d){return r(this.negative===0),this.iushln(d)},i.prototype.iushrn=function(d,C,A){r(typeof d=="number"&&d>=0);var f;C?f=(C-C%26)/26:f=0;var _=d%26,M=Math.min((d-_)/26,this.length),R=67108863^67108863>>>_<<_,h=A;if(f-=M,f=Math.max(0,f),h){for(var b=0;b<M;b++)h.words[b]=this.words[b];h.length=M;}if(M!==0)if(this.length>M)for(this.length-=M,b=0;b<this.length;b++)this.words[b]=this.words[b+M];else this.words[0]=0,this.length=1;var B=0;for(b=this.length-1;b>=0&&(B!==0||b>=f);b--){var z=this.words[b]|0;this.words[b]=B<<26-_|z>>>_,B=z&R;}return h&&B!==0&&(h.words[h.length++]=B),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(d,C,A){return r(this.negative===0),this.iushrn(d,C,A)},i.prototype.shln=function(d){return this.clone().ishln(d)},i.prototype.ushln=function(d){return this.clone().iushln(d)},i.prototype.shrn=function(d){return this.clone().ishrn(d)},i.prototype.ushrn=function(d){return this.clone().iushrn(d)},i.prototype.testn=function(d){r(typeof d=="number"&&d>=0);var C=d%26,A=(d-C)/26,f=1<<C;if(this.length<=A)return !1;var _=this.words[A];return !!(_&f)},i.prototype.imaskn=function(d){r(typeof d=="number"&&d>=0);var C=d%26,A=(d-C)/26;if(r(this.negative===0,"imaskn works only with positive numbers"),this.length<=A)return this;if(C!==0&&A++,this.length=Math.min(A,this.length),C!==0){var f=67108863^67108863>>>C<<C;this.words[this.length-1]&=f;}return this.strip()},i.prototype.maskn=function(d){return this.clone().imaskn(d)},i.prototype.iaddn=function(d){return r(typeof d=="number"),r(d<67108864),d<0?this.isubn(-d):this.negative!==0?this.length===1&&(this.words[0]|0)<d?(this.words[0]=d-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(d),this.negative=1,this):this._iaddn(d)},i.prototype._iaddn=function(d){this.words[0]+=d;for(var C=0;C<this.length&&this.words[C]>=67108864;C++)this.words[C]-=67108864,C===this.length-1?this.words[C+1]=1:this.words[C+1]++;return this.length=Math.max(this.length,C+1),this},i.prototype.isubn=function(d){if(r(typeof d=="number"),r(d<67108864),d<0)return this.iaddn(-d);if(this.negative!==0)return this.negative=0,this.iaddn(d),this.negative=1,this;if(this.words[0]-=d,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var C=0;C<this.length&&this.words[C]<0;C++)this.words[C]+=67108864,this.words[C+1]-=1;return this.strip()},i.prototype.addn=function(d){return this.clone().iaddn(d)},i.prototype.subn=function(d){return this.clone().isubn(d)},i.prototype.iabs=function(){return this.negative=0,this},i.prototype.abs=function(){return this.clone().iabs()},i.prototype._ishlnsubmul=function(d,C,A){var f=d.length+A,_;this._expand(f);var M,R=0;for(_=0;_<d.length;_++){M=(this.words[_+A]|0)+R;var h=(d.words[_]|0)*C;M-=h&67108863,R=(M>>26)-(h/67108864|0),this.words[_+A]=M&67108863;}for(;_<this.length-A;_++)M=(this.words[_+A]|0)+R,R=M>>26,this.words[_+A]=M&67108863;if(R===0)return this.strip();for(r(R===-1),R=0,_=0;_<this.length;_++)M=-(this.words[_]|0)+R,R=M>>26,this.words[_]=M&67108863;return this.negative=1,this.strip()},i.prototype._wordDiv=function(d,C){var A=this.length-d.length,f=this.clone(),_=d,M=_.words[_.length-1]|0,R=this._countBits(M);A=26-R,A!==0&&(_=_.ushln(A),f.iushln(A),M=_.words[_.length-1]|0);var h=f.length-_.length,b;if(C!=="mod"){b=new i(null),b.length=h+1,b.words=new Array(b.length);for(var B=0;B<b.length;B++)b.words[B]=0;}var z=f.clone()._ishlnsubmul(_,1,h);z.negative===0&&(f=z,b&&(b.words[h]=1));for(var P=h-1;P>=0;P--){var V=(f.words[_.length+P]|0)*67108864+(f.words[_.length+P-1]|0);for(V=Math.min(V/M|0,67108863),f._ishlnsubmul(_,V,P);f.negative!==0;)V--,f.negative=0,f._ishlnsubmul(_,1,P),f.isZero()||(f.negative^=1);b&&(b.words[P]=V);}return b&&b.strip(),f.strip(),C!=="div"&&A!==0&&f.iushrn(A),{div:b||null,mod:f}},i.prototype.divmod=function(d,C,A){if(r(!d.isZero()),this.isZero())return {div:new i(0),mod:new i(0)};var f,_,M;return this.negative!==0&&d.negative===0?(M=this.neg().divmod(d,C),C!=="mod"&&(f=M.div.neg()),C!=="div"&&(_=M.mod.neg(),A&&_.negative!==0&&_.iadd(d)),{div:f,mod:_}):this.negative===0&&d.negative!==0?(M=this.divmod(d.neg(),C),C!=="mod"&&(f=M.div.neg()),{div:f,mod:M.mod}):this.negative&d.negative?(M=this.neg().divmod(d.neg(),C),C!=="div"&&(_=M.mod.neg(),A&&_.negative!==0&&_.isub(d)),{div:M.div,mod:_}):d.length>this.length||this.cmp(d)<0?{div:new i(0),mod:this}:d.length===1?C==="div"?{div:this.divn(d.words[0]),mod:null}:C==="mod"?{div:null,mod:new i(this.modn(d.words[0]))}:{div:this.divn(d.words[0]),mod:new i(this.modn(d.words[0]))}:this._wordDiv(d,C)},i.prototype.div=function(d){return this.divmod(d,"div",!1).div},i.prototype.mod=function(d){return this.divmod(d,"mod",!1).mod},i.prototype.umod=function(d){return this.divmod(d,"mod",!0).mod},i.prototype.divRound=function(d){var C=this.divmod(d);if(C.mod.isZero())return C.div;var A=C.div.negative!==0?C.mod.isub(d):C.mod,f=d.ushrn(1),_=d.andln(1),M=A.cmp(f);return M<0||_===1&&M===0?C.div:C.div.negative!==0?C.div.isubn(1):C.div.iaddn(1)},i.prototype.modn=function(d){r(d<=67108863);for(var C=(1<<26)%d,A=0,f=this.length-1;f>=0;f--)A=(C*A+(this.words[f]|0))%d;return A},i.prototype.idivn=function(d){r(d<=67108863);for(var C=0,A=this.length-1;A>=0;A--){var f=(this.words[A]|0)+C*67108864;this.words[A]=f/d|0,C=f%d;}return this.strip()},i.prototype.divn=function(d){return this.clone().idivn(d)},i.prototype.egcd=function(d){r(d.negative===0),r(!d.isZero());var C=this,A=d.clone();C.negative!==0?C=C.umod(d):C=C.clone();for(var f=new i(1),_=new i(0),M=new i(0),R=new i(1),h=0;C.isEven()&&A.isEven();)C.iushrn(1),A.iushrn(1),++h;for(var b=A.clone(),B=C.clone();!C.isZero();){for(var z=0,P=1;!(C.words[0]&P)&&z<26;++z,P<<=1);if(z>0)for(C.iushrn(z);z-- >0;)(f.isOdd()||_.isOdd())&&(f.iadd(b),_.isub(B)),f.iushrn(1),_.iushrn(1);for(var V=0,fe=1;!(A.words[0]&fe)&&V<26;++V,fe<<=1);if(V>0)for(A.iushrn(V);V-- >0;)(M.isOdd()||R.isOdd())&&(M.iadd(b),R.isub(B)),M.iushrn(1),R.iushrn(1);C.cmp(A)>=0?(C.isub(A),f.isub(M),_.isub(R)):(A.isub(C),M.isub(f),R.isub(_));}return {a:M,b:R,gcd:A.iushln(h)}},i.prototype._invmp=function(d){r(d.negative===0),r(!d.isZero());var C=this,A=d.clone();C.negative!==0?C=C.umod(d):C=C.clone();for(var f=new i(1),_=new i(0),M=A.clone();C.cmpn(1)>0&&A.cmpn(1)>0;){for(var R=0,h=1;!(C.words[0]&h)&&R<26;++R,h<<=1);if(R>0)for(C.iushrn(R);R-- >0;)f.isOdd()&&f.iadd(M),f.iushrn(1);for(var b=0,B=1;!(A.words[0]&B)&&b<26;++b,B<<=1);if(b>0)for(A.iushrn(b);b-- >0;)_.isOdd()&&_.iadd(M),_.iushrn(1);C.cmp(A)>=0?(C.isub(A),f.isub(_)):(A.isub(C),_.isub(f));}var z;return C.cmpn(1)===0?z=f:z=_,z.cmpn(0)<0&&z.iadd(d),z},i.prototype.gcd=function(d){if(this.isZero())return d.abs();if(d.isZero())return this.abs();var C=this.clone(),A=d.clone();C.negative=0,A.negative=0;for(var f=0;C.isEven()&&A.isEven();f++)C.iushrn(1),A.iushrn(1);do{for(;C.isEven();)C.iushrn(1);for(;A.isEven();)A.iushrn(1);var _=C.cmp(A);if(_<0){var M=C;C=A,A=M;}else if(_===0||A.cmpn(1)===0)break;C.isub(A);}while(!0);return A.iushln(f)},i.prototype.invm=function(d){return this.egcd(d).a.umod(d)},i.prototype.isEven=function(){return (this.words[0]&1)===0},i.prototype.isOdd=function(){return (this.words[0]&1)===1},i.prototype.andln=function(d){return this.words[0]&d},i.prototype.bincn=function(d){r(typeof d=="number");var C=d%26,A=(d-C)/26,f=1<<C;if(this.length<=A)return this._expand(A+1),this.words[A]|=f,this;for(var _=f,M=A;_!==0&&M<this.length;M++){var R=this.words[M]|0;R+=_,_=R>>>26,R&=67108863,this.words[M]=R;}return _!==0&&(this.words[M]=_,this.length++),this},i.prototype.isZero=function(){return this.length===1&&this.words[0]===0},i.prototype.cmpn=function(d){var C=d<0;if(this.negative!==0&&!C)return -1;if(this.negative===0&&C)return 1;this.strip();var A;if(this.length>1)A=1;else {C&&(d=-d),r(d<=67108863,"Number is too big");var f=this.words[0]|0;A=f===d?0:f<d?-1:1;}return this.negative!==0?-A|0:A},i.prototype.cmp=function(d){if(this.negative!==0&&d.negative===0)return -1;if(this.negative===0&&d.negative!==0)return 1;var C=this.ucmp(d);return this.negative!==0?-C|0:C},i.prototype.ucmp=function(d){if(this.length>d.length)return 1;if(this.length<d.length)return -1;for(var C=0,A=this.length-1;A>=0;A--){var f=this.words[A]|0,_=d.words[A]|0;if(f!==_){f<_?C=-1:f>_&&(C=1);break}}return C},i.prototype.gtn=function(d){return this.cmpn(d)===1},i.prototype.gt=function(d){return this.cmp(d)===1},i.prototype.gten=function(d){return this.cmpn(d)>=0},i.prototype.gte=function(d){return this.cmp(d)>=0},i.prototype.ltn=function(d){return this.cmpn(d)===-1},i.prototype.lt=function(d){return this.cmp(d)===-1},i.prototype.lten=function(d){return this.cmpn(d)<=0},i.prototype.lte=function(d){return this.cmp(d)<=0},i.prototype.eqn=function(d){return this.cmpn(d)===0},i.prototype.eq=function(d){return this.cmp(d)===0},i.red=function(d){return new le(d)},i.prototype.toRed=function(d){return r(!this.red,"Already a number in reduction context"),r(this.negative===0,"red works only with positives"),d.convertTo(this)._forceRed(d)},i.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(d){return this.red=d,this},i.prototype.forceRed=function(d){return r(!this.red,"Already a number in reduction context"),this._forceRed(d)},i.prototype.redAdd=function(d){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,d)},i.prototype.redIAdd=function(d){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,d)},i.prototype.redSub=function(d){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,d)},i.prototype.redISub=function(d){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,d)},i.prototype.redShl=function(d){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,d)},i.prototype.redMul=function(d){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,d),this.red.mul(this,d)},i.prototype.redIMul=function(d){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,d),this.red.imul(this,d)},i.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(d){return r(this.red&&!d.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,d)};var K={k256:null,p224:null,p192:null,p25519:null};function Z(S,d){this.name=S,this.p=new i(d,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp();}Z.prototype._tmp=function(){var d=new i(null);return d.words=new Array(Math.ceil(this.n/13)),d},Z.prototype.ireduce=function(d){var C=d,A;do this.split(C,this.tmp),C=this.imulK(C),C=C.iadd(this.tmp),A=C.bitLength();while(A>this.n);var f=A<this.n?-1:C.ucmp(this.p);return f===0?(C.words[0]=0,C.length=1):f>0?C.isub(this.p):C.strip!==void 0?C.strip():C._strip(),C},Z.prototype.split=function(d,C){d.iushrn(this.n,0,C);},Z.prototype.imulK=function(d){return d.imul(this.k)};function se(){Z.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f");}n(se,Z),se.prototype.split=function(d,C){for(var A=4194303,f=Math.min(d.length,9),_=0;_<f;_++)C.words[_]=d.words[_];if(C.length=f,d.length<=9){d.words[0]=0,d.length=1;return}var M=d.words[9];for(C.words[C.length++]=M&A,_=10;_<d.length;_++){var R=d.words[_]|0;d.words[_-10]=(R&A)<<4|M>>>22,M=R;}M>>>=22,d.words[_-10]=M,M===0&&d.length>10?d.length-=10:d.length-=9;},se.prototype.imulK=function(d){d.words[d.length]=0,d.words[d.length+1]=0,d.length+=2;for(var C=0,A=0;A<d.length;A++){var f=d.words[A]|0;C+=f*977,d.words[A]=C&67108863,C=f*64+(C/67108864|0);}return d.words[d.length-1]===0&&(d.length--,d.words[d.length-1]===0&&d.length--),d};function ce(){Z.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001");}n(ce,Z);function Te(){Z.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff");}n(Te,Z);function pe(){Z.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed");}n(pe,Z),pe.prototype.imulK=function(d){for(var C=0,A=0;A<d.length;A++){var f=(d.words[A]|0)*19+C,_=f&67108863;f>>>=26,d.words[A]=_,C=f;}return C!==0&&(d.words[d.length++]=C),d},i._prime=function(d){if(K[d])return K[d];var C;if(d==="k256")C=new se;else if(d==="p224")C=new ce;else if(d==="p192")C=new Te;else if(d==="p25519")C=new pe;else throw new Error("Unknown prime "+d);return K[d]=C,C};function le(S){if(typeof S=="string"){var d=i._prime(S);this.m=d.p,this.prime=d;}else r(S.gtn(1),"modulus must be greater than 1"),this.m=S,this.prime=null;}le.prototype._verify1=function(d){r(d.negative===0,"red works only with positives"),r(d.red,"red works only with red numbers");},le.prototype._verify2=function(d,C){r((d.negative|C.negative)===0,"red works only with positives"),r(d.red&&d.red===C.red,"red works only with red numbers");},le.prototype.imod=function(d){return this.prime?this.prime.ireduce(d)._forceRed(this):d.umod(this.m)._forceRed(this)},le.prototype.neg=function(d){return d.isZero()?d.clone():this.m.sub(d)._forceRed(this)},le.prototype.add=function(d,C){this._verify2(d,C);var A=d.add(C);return A.cmp(this.m)>=0&&A.isub(this.m),A._forceRed(this)},le.prototype.iadd=function(d,C){this._verify2(d,C);var A=d.iadd(C);return A.cmp(this.m)>=0&&A.isub(this.m),A},le.prototype.sub=function(d,C){this._verify2(d,C);var A=d.sub(C);return A.cmpn(0)<0&&A.iadd(this.m),A._forceRed(this)},le.prototype.isub=function(d,C){this._verify2(d,C);var A=d.isub(C);return A.cmpn(0)<0&&A.iadd(this.m),A},le.prototype.shl=function(d,C){return this._verify1(d),this.imod(d.ushln(C))},le.prototype.imul=function(d,C){return this._verify2(d,C),this.imod(d.imul(C))},le.prototype.mul=function(d,C){return this._verify2(d,C),this.imod(d.mul(C))},le.prototype.isqr=function(d){return this.imul(d,d.clone())},le.prototype.sqr=function(d){return this.mul(d,d)},le.prototype.sqrt=function(d){if(d.isZero())return d.clone();var C=this.m.andln(3);if(r(C%2===1),C===3){var A=this.m.add(new i(1)).iushrn(2);return this.pow(d,A)}for(var f=this.m.subn(1),_=0;!f.isZero()&&f.andln(1)===0;)_++,f.iushrn(1);r(!f.isZero());var M=new i(1).toRed(this),R=M.redNeg(),h=this.m.subn(1).iushrn(1),b=this.m.bitLength();for(b=new i(2*b*b).toRed(this);this.pow(b,h).cmp(R)!==0;)b.redIAdd(R);for(var B=this.pow(b,f),z=this.pow(d,f.addn(1).iushrn(1)),P=this.pow(d,f),V=_;P.cmp(M)!==0;){for(var fe=P,ye=0;fe.cmp(M)!==0;ye++)fe=fe.redSqr();r(ye<V);var Ce=this.pow(B,new i(1).iushln(V-ye-1));z=z.redMul(Ce),B=Ce.redSqr(),P=P.redMul(B),V=ye;}return z},le.prototype.invm=function(d){var C=d._invmp(this.m);return C.negative!==0?(C.negative=0,this.imod(C).redNeg()):this.imod(C)},le.prototype.pow=function(d,C){if(C.isZero())return new i(1).toRed(this);if(C.cmpn(1)===0)return d.clone();var A=4,f=new Array(1<<A);f[0]=new i(1).toRed(this),f[1]=d;for(var _=2;_<f.length;_++)f[_]=this.mul(f[_-1],d);var M=f[0],R=0,h=0,b=C.bitLength()%26;for(b===0&&(b=26),_=C.length-1;_>=0;_--){for(var B=C.words[_],z=b-1;z>=0;z--){var P=B>>z&1;if(M!==f[0]&&(M=this.sqr(M)),P===0&&R===0){h=0;continue}R<<=1,R|=P,h++,!(h!==A&&(_!==0||z!==0))&&(M=this.mul(M,f[R]),h=0,R=0);}b=26;}return M},le.prototype.convertTo=function(d){var C=d.umod(this.m);return C===d?C.clone():C},le.prototype.convertFrom=function(d){var C=d.clone();return C.red=null,C},i.mont=function(d){return new Y(d)};function Y(S){le.call(this,S),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv);}n(Y,le),Y.prototype.convertTo=function(d){return this.imod(d.ushln(this.shift))},Y.prototype.convertFrom=function(d){var C=this.imod(d.mul(this.rinv));return C.red=null,C},Y.prototype.imul=function(d,C){if(d.isZero()||C.isZero())return d.words[0]=0,d.length=1,d;var A=d.imul(C),f=A.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),_=A.isub(f).iushrn(this.shift),M=_;return _.cmp(this.m)>=0?M=_.isub(this.m):_.cmpn(0)<0&&(M=_.iadd(this.m)),M._forceRed(this)},Y.prototype.mul=function(d,C){if(d.isZero()||C.isZero())return new i(0)._forceRed(this);var A=d.mul(C),f=A.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),_=A.isub(f).iushrn(this.shift),M=_;return _.cmp(this.m)>=0?M=_.isub(this.m):_.cmpn(0)<0&&(M=_.iadd(this.m)),M._forceRed(this)},Y.prototype.invm=function(d){var C=this.imod(d._invmp(this.m).mul(this.r2));return C._forceRed(this)};})(typeof iS=="undefined"||iS,LO);});var oS=ne(zO=>{v();m();y();g();var xg=zO;function LZ(t,e){if(Array.isArray(t))return t.slice();if(!t)return [];var r=[];if(typeof t!="string"){for(var n=0;n<t.length;n++)r[n]=t[n]|0;return r}if(e==="hex"){t=t.replace(/[^a-z0-9]+/ig,""),t.length%2!==0&&(t="0"+t);for(var n=0;n<t.length;n+=2)r.push(parseInt(t[n]+t[n+1],16));}else for(var n=0;n<t.length;n++){var i=t.charCodeAt(n),o=i>>8,a=i&255;o?r.push(o,a):r.push(a);}return r}xg.toArray=LZ;function qO(t){return t.length===1?"0"+t:t}xg.zero2=qO;function FO(t){for(var e="",r=0;r<t.length;r++)e+=qO(t[r].toString(16));return e}xg.toHex=FO;xg.encode=function(e,r){return r==="hex"?FO(e):e};});var yi=ne(HO=>{v();m();y();g();var So=HO,qZ=aa(),FZ=mi(),Ig=oS();So.assert=FZ;So.toArray=Ig.toArray;So.zero2=Ig.zero2;So.toHex=Ig.toHex;So.encode=Ig.encode;function zZ(t,e,r){var n=new Array(Math.max(t.bitLength(),r)+1),i;for(i=0;i<n.length;i+=1)n[i]=0;var o=1<<e+1,a=t.clone();for(i=0;i<n.length;i++){var s,c=a.andln(o-1);a.isOdd()?(c>(o>>1)-1?s=(o>>1)-c:s=c,a.isubn(s)):s=0,n[i]=s,a.iushrn(1);}return n}So.getNAF=zZ;function HZ(t,e){var r=[[],[]];t=t.clone(),e=e.clone();for(var n=0,i=0,o;t.cmpn(-n)>0||e.cmpn(-i)>0;){var a=t.andln(3)+n&3,s=e.andln(3)+i&3;a===3&&(a=-1),s===3&&(s=-1);var c;a&1?(o=t.andln(7)+n&7,(o===3||o===5)&&s===2?c=-a:c=a):c=0,r[0].push(c);var u;s&1?(o=e.andln(7)+i&7,(o===3||o===5)&&a===2?u=-s:u=s):u=0,r[1].push(u),2*n===c+1&&(n=1-n),2*i===u+1&&(i=1-i),t.iushrn(1),e.iushrn(1);}return r}So.getJSF=HZ;function jZ(t,e,r){var n="_"+e;t.prototype[e]=function(){return this[n]!==void 0?this[n]:this[n]=r.call(this)};}So.cachedProperty=jZ;function $Z(t){return typeof t=="string"?So.toArray(t,"hex"):t}So.parseBytes=$Z;function VZ(t){return new qZ(t,"hex","le")}So.intFromLE=VZ;});var tp=ne((d2e,jO)=>{v();m();y();g();var Su=aa(),ep=yi(),Mg=ep.getNAF,GZ=ep.getJSF,Og=ep.assert;function Js(t,e){this.type=t,this.p=new Su(e.p,16),this.red=e.prime?Su.red(e.prime):Su.mont(this.p),this.zero=new Su(0).toRed(this.red),this.one=new Su(1).toRed(this.red),this.two=new Su(2).toRed(this.red),this.n=e.n&&new Su(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red));}jO.exports=Js;Js.prototype.point=function(){throw new Error("Not implemented")};Js.prototype.validate=function(){throw new Error("Not implemented")};Js.prototype._fixedNafMul=function(e,r){Og(e.precomputed);var n=e._getDoubles(),i=Mg(r,1,this._bitLength),o=(1<<n.step+1)-(n.step%2===0?2:1);o/=3;var a=[],s,c;for(s=0;s<i.length;s+=n.step){c=0;for(var u=s+n.step-1;u>=s;u--)c=(c<<1)+i[u];a.push(c);}for(var l=this.jpoint(null,null,null),w=this.jpoint(null,null,null),T=o;T>0;T--){for(s=0;s<a.length;s++)c=a[s],c===T?w=w.mixedAdd(n.points[s]):c===-T&&(w=w.mixedAdd(n.points[s].neg()));l=l.add(w);}return l.toP()};Js.prototype._wnafMul=function(e,r){var n=4,i=e._getNAFPoints(n);n=i.wnd;for(var o=i.points,a=Mg(r,n,this._bitLength),s=this.jpoint(null,null,null),c=a.length-1;c>=0;c--){for(var u=0;c>=0&&a[c]===0;c--)u++;if(c>=0&&u++,s=s.dblp(u),c<0)break;var l=a[c];Og(l!==0),e.type==="affine"?l>0?s=s.mixedAdd(o[l-1>>1]):s=s.mixedAdd(o[-l-1>>1].neg()):l>0?s=s.add(o[l-1>>1]):s=s.add(o[-l-1>>1].neg());}return e.type==="affine"?s.toP():s};Js.prototype._wnafMulAdd=function(e,r,n,i,o){var a=this._wnafT1,s=this._wnafT2,c=this._wnafT3,u=0,l,w,T;for(l=0;l<i;l++){T=r[l];var x=T._getNAFPoints(e);a[l]=x.wnd,s[l]=x.points;}for(l=i-1;l>=1;l-=2){var I=l-1,k=l;if(a[I]!==1||a[k]!==1){c[I]=Mg(n[I],a[I],this._bitLength),c[k]=Mg(n[k],a[k],this._bitLength),u=Math.max(c[I].length,u),u=Math.max(c[k].length,u);continue}var q=[r[I],null,null,r[k]];r[I].y.cmp(r[k].y)===0?(q[1]=r[I].add(r[k]),q[2]=r[I].toJ().mixedAdd(r[k].neg())):r[I].y.cmp(r[k].y.redNeg())===0?(q[1]=r[I].toJ().mixedAdd(r[k]),q[2]=r[I].add(r[k].neg())):(q[1]=r[I].toJ().mixedAdd(r[k]),q[2]=r[I].toJ().mixedAdd(r[k].neg()));var j=[-3,-1,-5,-7,0,7,5,1,3],K=GZ(n[I],n[k]);for(u=Math.max(K[0].length,u),c[I]=new Array(u),c[k]=new Array(u),w=0;w<u;w++){var Z=K[0][w]|0,se=K[1][w]|0;c[I][w]=j[(Z+1)*3+(se+1)],c[k][w]=0,s[I]=q;}}var ce=this.jpoint(null,null,null),Te=this._wnafT4;for(l=u;l>=0;l--){for(var pe=0;l>=0;){var le=!0;for(w=0;w<i;w++)Te[w]=c[w][l]|0,Te[w]!==0&&(le=!1);if(!le)break;pe++,l--;}if(l>=0&&pe++,ce=ce.dblp(pe),l<0)break;for(w=0;w<i;w++){var Y=Te[w];Y!==0&&(Y>0?T=s[w][Y-1>>1]:Y<0&&(T=s[w][-Y-1>>1].neg()),T.type==="affine"?ce=ce.mixedAdd(T):ce=ce.add(T));}}for(l=0;l<i;l++)s[l]=null;return o?ce:ce.toP()};function Hi(t,e){this.curve=t,this.type=e,this.precomputed=null;}Js.BasePoint=Hi;Hi.prototype.eq=function(){throw new Error("Not implemented")};Hi.prototype.validate=function(){return this.curve.validate(this)};Js.prototype.decodePoint=function(e,r){e=ep.toArray(e,r);var n=this.p.byteLength();if((e[0]===4||e[0]===6||e[0]===7)&&e.length-1===2*n){e[0]===6?Og(e[e.length-1]%2===0):e[0]===7&&Og(e[e.length-1]%2===1);var i=this.point(e.slice(1,1+n),e.slice(1+n,1+2*n));return i}else if((e[0]===2||e[0]===3)&&e.length-1===n)return this.pointFromX(e.slice(1,1+n),e[0]===3);throw new Error("Unknown point format")};Hi.prototype.encodeCompressed=function(e){return this.encode(e,!0)};Hi.prototype._encode=function(e){var r=this.curve.p.byteLength(),n=this.getX().toArray("be",r);return e?[this.getY().isEven()?2:3].concat(n):[4].concat(n,this.getY().toArray("be",r))};Hi.prototype.encode=function(e,r){return ep.encode(this._encode(r),e)};Hi.prototype.precompute=function(e){if(this.precomputed)return this;var r={doubles:null,naf:null,beta:null};return r.naf=this._getNAFPoints(8),r.doubles=this._getDoubles(4,e),r.beta=this._getBeta(),this.precomputed=r,this};Hi.prototype._hasDoubles=function(e){if(!this.precomputed)return !1;var r=this.precomputed.doubles;return r?r.points.length>=Math.ceil((e.bitLength()+1)/r.step):!1};Hi.prototype._getDoubles=function(e,r){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],i=this,o=0;o<r;o+=e){for(var a=0;a<e;a++)i=i.dbl();n.push(i);}return {step:e,points:n}};Hi.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var r=[this],n=(1<<e)-1,i=n===1?null:this.dbl(),o=1;o<n;o++)r[o]=r[o-1].add(i);return {wnd:e,points:r}};Hi.prototype._getBeta=function(){return null};Hi.prototype.dblp=function(e){for(var r=this,n=0;n<e;n++)r=r.dbl();return r};});var VO=ne((g2e,$O)=>{v();m();y();g();var KZ=yi(),Or=aa(),aS=yt(),xf=tp(),WZ=KZ.assert;function ji(t){xf.call(this,"short",t),this.a=new Or(t.a,16).toRed(this.red),this.b=new Or(t.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=this.a.fromRed().cmpn(0)===0,this.threeA=this.a.fromRed().sub(this.p).cmpn(-3)===0,this.endo=this._getEndomorphism(t),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4);}aS(ji,xf);$O.exports=ji;ji.prototype._getEndomorphism=function(e){if(!(!this.zeroA||!this.g||!this.n||this.p.modn(3)!==1)){var r,n;if(e.beta)r=new Or(e.beta,16).toRed(this.red);else {var i=this._getEndoRoots(this.p);r=i[0].cmp(i[1])<0?i[0]:i[1],r=r.toRed(this.red);}if(e.lambda)n=new Or(e.lambda,16);else {var o=this._getEndoRoots(this.n);this.g.mul(o[0]).x.cmp(this.g.x.redMul(r))===0?n=o[0]:(n=o[1],WZ(this.g.mul(n).x.cmp(this.g.x.redMul(r))===0));}var a;return e.basis?a=e.basis.map(function(s){return {a:new Or(s.a,16),b:new Or(s.b,16)}}):a=this._getEndoBasis(n),{beta:r,lambda:n,basis:a}}};ji.prototype._getEndoRoots=function(e){var r=e===this.p?this.red:Or.mont(e),n=new Or(2).toRed(r).redInvm(),i=n.redNeg(),o=new Or(3).toRed(r).redNeg().redSqrt().redMul(n),a=i.redAdd(o).fromRed(),s=i.redSub(o).fromRed();return [a,s]};ji.prototype._getEndoBasis=function(e){for(var r=this.n.ushrn(Math.floor(this.n.bitLength()/2)),n=e,i=this.n.clone(),o=new Or(1),a=new Or(0),s=new Or(0),c=new Or(1),u,l,w,T,x,I,k,q=0,j,K;n.cmpn(0)!==0;){var Z=i.div(n);j=i.sub(Z.mul(n)),K=s.sub(Z.mul(o));var se=c.sub(Z.mul(a));if(!w&&j.cmp(r)<0)u=k.neg(),l=o,w=j.neg(),T=K;else if(w&&++q===2)break;k=j,i=n,n=j,s=o,o=K,c=a,a=se;}x=j.neg(),I=K;var ce=w.sqr().add(T.sqr()),Te=x.sqr().add(I.sqr());return Te.cmp(ce)>=0&&(x=u,I=l),w.negative&&(w=w.neg(),T=T.neg()),x.negative&&(x=x.neg(),I=I.neg()),[{a:w,b:T},{a:x,b:I}]};ji.prototype._endoSplit=function(e){var r=this.endo.basis,n=r[0],i=r[1],o=i.b.mul(e).divRound(this.n),a=n.b.neg().mul(e).divRound(this.n),s=o.mul(n.a),c=a.mul(i.a),u=o.mul(n.b),l=a.mul(i.b),w=e.sub(s).sub(c),T=u.add(l).neg();return {k1:w,k2:T}};ji.prototype.pointFromX=function(e,r){e=new Or(e,16),e.red||(e=e.toRed(this.red));var n=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),i=n.redSqrt();if(i.redSqr().redSub(n).cmp(this.zero)!==0)throw new Error("invalid point");var o=i.fromRed().isOdd();return (r&&!o||!r&&o)&&(i=i.redNeg()),this.point(e,i)};ji.prototype.validate=function(e){if(e.inf)return !0;var r=e.x,n=e.y,i=this.a.redMul(r),o=r.redSqr().redMul(r).redIAdd(i).redIAdd(this.b);return n.redSqr().redISub(o).cmpn(0)===0};ji.prototype._endoWnafMulAdd=function(e,r,n){for(var i=this._endoWnafT1,o=this._endoWnafT2,a=0;a<e.length;a++){var s=this._endoSplit(r[a]),c=e[a],u=c._getBeta();s.k1.negative&&(s.k1.ineg(),c=c.neg(!0)),s.k2.negative&&(s.k2.ineg(),u=u.neg(!0)),i[a*2]=c,i[a*2+1]=u,o[a*2]=s.k1,o[a*2+1]=s.k2;}for(var l=this._wnafMulAdd(1,i,o,a*2,n),w=0;w<a*2;w++)i[w]=null,o[w]=null;return l};function un(t,e,r,n){xf.BasePoint.call(this,t,"affine"),e===null&&r===null?(this.x=null,this.y=null,this.inf=!0):(this.x=new Or(e,16),this.y=new Or(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1);}aS(un,xf.BasePoint);ji.prototype.point=function(e,r,n){return new un(this,e,r,n)};ji.prototype.pointFromJSON=function(e,r){return un.fromJSON(this,e,r)};un.prototype._getBeta=function(){if(this.curve.endo){var e=this.precomputed;if(e&&e.beta)return e.beta;var r=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(e){var n=this.curve,i=function(o){return n.point(o.x.redMul(n.endo.beta),o.y)};e.beta=r,r.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(i)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(i)}};}return r}};un.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]};un.fromJSON=function(e,r,n){typeof r=="string"&&(r=JSON.parse(r));var i=e.point(r[0],r[1],n);if(!r[2])return i;function o(s){return e.point(s[0],s[1],n)}var a=r[2];return i.precomputed={beta:null,doubles:a.doubles&&{step:a.doubles.step,points:[i].concat(a.doubles.points.map(o))},naf:a.naf&&{wnd:a.naf.wnd,points:[i].concat(a.naf.points.map(o))}},i};un.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"};un.prototype.isInfinity=function(){return this.inf};un.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(this.x.cmp(e.x)===0)return this.curve.point(null,null);var r=this.y.redSub(e.y);r.cmpn(0)!==0&&(r=r.redMul(this.x.redSub(e.x).redInvm()));var n=r.redSqr().redISub(this.x).redISub(e.x),i=r.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,i)};un.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(e.cmpn(0)===0)return this.curve.point(null,null);var r=this.curve.a,n=this.x.redSqr(),i=e.redInvm(),o=n.redAdd(n).redIAdd(n).redIAdd(r).redMul(i),a=o.redSqr().redISub(this.x.redAdd(this.x)),s=o.redMul(this.x.redSub(a)).redISub(this.y);return this.curve.point(a,s)};un.prototype.getX=function(){return this.x.fromRed()};un.prototype.getY=function(){return this.y.fromRed()};un.prototype.mul=function(e){return e=new Or(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)};un.prototype.mulAdd=function(e,r,n){var i=[this,r],o=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(i,o):this.curve._wnafMulAdd(1,i,o,2)};un.prototype.jmulAdd=function(e,r,n){var i=[this,r],o=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(i,o,!0):this.curve._wnafMulAdd(1,i,o,2,!0)};un.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||this.x.cmp(e.x)===0&&this.y.cmp(e.y)===0)};un.prototype.neg=function(e){if(this.inf)return this;var r=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var n=this.precomputed,i=function(o){return o.neg()};r.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(i)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(i)}};}return r};un.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var e=this.curve.jpoint(this.x,this.y,this.curve.one);return e};function vn(t,e,r,n){xf.BasePoint.call(this,t,"jacobian"),e===null&&r===null&&n===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new Or(0)):(this.x=new Or(e,16),this.y=new Or(r,16),this.z=new Or(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one;}aS(vn,xf.BasePoint);ji.prototype.jpoint=function(e,r,n){return new vn(this,e,r,n)};vn.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),r=e.redSqr(),n=this.x.redMul(r),i=this.y.redMul(r).redMul(e);return this.curve.point(n,i)};vn.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};vn.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var r=e.z.redSqr(),n=this.z.redSqr(),i=this.x.redMul(r),o=e.x.redMul(n),a=this.y.redMul(r.redMul(e.z)),s=e.y.redMul(n.redMul(this.z)),c=i.redSub(o),u=a.redSub(s);if(c.cmpn(0)===0)return u.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var l=c.redSqr(),w=l.redMul(c),T=i.redMul(l),x=u.redSqr().redIAdd(w).redISub(T).redISub(T),I=u.redMul(T.redISub(x)).redISub(a.redMul(w)),k=this.z.redMul(e.z).redMul(c);return this.curve.jpoint(x,I,k)};vn.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var r=this.z.redSqr(),n=this.x,i=e.x.redMul(r),o=this.y,a=e.y.redMul(r).redMul(this.z),s=n.redSub(i),c=o.redSub(a);if(s.cmpn(0)===0)return c.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var u=s.redSqr(),l=u.redMul(s),w=n.redMul(u),T=c.redSqr().redIAdd(l).redISub(w).redISub(w),x=c.redMul(w.redISub(T)).redISub(o.redMul(l)),I=this.z.redMul(s);return this.curve.jpoint(T,x,I)};vn.prototype.dblp=function(e){if(e===0)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var r;if(this.curve.zeroA||this.curve.threeA){var n=this;for(r=0;r<e;r++)n=n.dbl();return n}var i=this.curve.a,o=this.curve.tinv,a=this.x,s=this.y,c=this.z,u=c.redSqr().redSqr(),l=s.redAdd(s);for(r=0;r<e;r++){var w=a.redSqr(),T=l.redSqr(),x=T.redSqr(),I=w.redAdd(w).redIAdd(w).redIAdd(i.redMul(u)),k=a.redMul(T),q=I.redSqr().redISub(k.redAdd(k)),j=k.redISub(q),K=I.redMul(j);K=K.redIAdd(K).redISub(x);var Z=l.redMul(c);r+1<e&&(u=u.redMul(x)),a=q,c=Z,l=K;}return this.curve.jpoint(a,l.redMul(o),c)};vn.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()};vn.prototype._zeroDbl=function(){var e,r,n;if(this.zOne){var i=this.x.redSqr(),o=this.y.redSqr(),a=o.redSqr(),s=this.x.redAdd(o).redSqr().redISub(i).redISub(a);s=s.redIAdd(s);var c=i.redAdd(i).redIAdd(i),u=c.redSqr().redISub(s).redISub(s),l=a.redIAdd(a);l=l.redIAdd(l),l=l.redIAdd(l),e=u,r=c.redMul(s.redISub(u)).redISub(l),n=this.y.redAdd(this.y);}else {var w=this.x.redSqr(),T=this.y.redSqr(),x=T.redSqr(),I=this.x.redAdd(T).redSqr().redISub(w).redISub(x);I=I.redIAdd(I);var k=w.redAdd(w).redIAdd(w),q=k.redSqr(),j=x.redIAdd(x);j=j.redIAdd(j),j=j.redIAdd(j),e=q.redISub(I).redISub(I),r=k.redMul(I.redISub(e)).redISub(j),n=this.y.redMul(this.z),n=n.redIAdd(n);}return this.curve.jpoint(e,r,n)};vn.prototype._threeDbl=function(){var e,r,n;if(this.zOne){var i=this.x.redSqr(),o=this.y.redSqr(),a=o.redSqr(),s=this.x.redAdd(o).redSqr().redISub(i).redISub(a);s=s.redIAdd(s);var c=i.redAdd(i).redIAdd(i).redIAdd(this.curve.a),u=c.redSqr().redISub(s).redISub(s);e=u;var l=a.redIAdd(a);l=l.redIAdd(l),l=l.redIAdd(l),r=c.redMul(s.redISub(u)).redISub(l),n=this.y.redAdd(this.y);}else {var w=this.z.redSqr(),T=this.y.redSqr(),x=this.x.redMul(T),I=this.x.redSub(w).redMul(this.x.redAdd(w));I=I.redAdd(I).redIAdd(I);var k=x.redIAdd(x);k=k.redIAdd(k);var q=k.redAdd(k);e=I.redSqr().redISub(q),n=this.y.redAdd(this.z).redSqr().redISub(T).redISub(w);var j=T.redSqr();j=j.redIAdd(j),j=j.redIAdd(j),j=j.redIAdd(j),r=I.redMul(k.redISub(e)).redISub(j);}return this.curve.jpoint(e,r,n)};vn.prototype._dbl=function(){var e=this.curve.a,r=this.x,n=this.y,i=this.z,o=i.redSqr().redSqr(),a=r.redSqr(),s=n.redSqr(),c=a.redAdd(a).redIAdd(a).redIAdd(e.redMul(o)),u=r.redAdd(r);u=u.redIAdd(u);var l=u.redMul(s),w=c.redSqr().redISub(l.redAdd(l)),T=l.redISub(w),x=s.redSqr();x=x.redIAdd(x),x=x.redIAdd(x),x=x.redIAdd(x);var I=c.redMul(T).redISub(x),k=n.redAdd(n).redMul(i);return this.curve.jpoint(w,I,k)};vn.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var e=this.x.redSqr(),r=this.y.redSqr(),n=this.z.redSqr(),i=r.redSqr(),o=e.redAdd(e).redIAdd(e),a=o.redSqr(),s=this.x.redAdd(r).redSqr().redISub(e).redISub(i);s=s.redIAdd(s),s=s.redAdd(s).redIAdd(s),s=s.redISub(a);var c=s.redSqr(),u=i.redIAdd(i);u=u.redIAdd(u),u=u.redIAdd(u),u=u.redIAdd(u);var l=o.redIAdd(s).redSqr().redISub(a).redISub(c).redISub(u),w=r.redMul(l);w=w.redIAdd(w),w=w.redIAdd(w);var T=this.x.redMul(c).redISub(w);T=T.redIAdd(T),T=T.redIAdd(T);var x=this.y.redMul(l.redMul(u.redISub(l)).redISub(s.redMul(c)));x=x.redIAdd(x),x=x.redIAdd(x),x=x.redIAdd(x);var I=this.z.redAdd(s).redSqr().redISub(n).redISub(c);return this.curve.jpoint(T,x,I)};vn.prototype.mul=function(e,r){return e=new Or(e,r),this.curve._wnafMul(this,e)};vn.prototype.eq=function(e){if(e.type==="affine")return this.eq(e.toJ());if(this===e)return !0;var r=this.z.redSqr(),n=e.z.redSqr();if(this.x.redMul(n).redISub(e.x.redMul(r)).cmpn(0)!==0)return !1;var i=r.redMul(this.z),o=n.redMul(e.z);return this.y.redMul(o).redISub(e.y.redMul(i)).cmpn(0)===0};vn.prototype.eqXToP=function(e){var r=this.z.redSqr(),n=e.toRed(this.curve.red).redMul(r);if(this.x.cmp(n)===0)return !0;for(var i=e.clone(),o=this.curve.redN.redMul(r);;){if(i.iadd(this.curve.n),i.cmp(this.curve.p)>=0)return !1;if(n.redIAdd(o),this.x.cmp(n)===0)return !0}};vn.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"};vn.prototype.isInfinity=function(){return this.z.cmpn(0)===0};});var WO=ne((_2e,KO)=>{v();m();y();g();var If=aa(),GO=yt(),Ng=tp(),YZ=yi();function Mf(t){Ng.call(this,"mont",t),this.a=new If(t.a,16).toRed(this.red),this.b=new If(t.b,16).toRed(this.red),this.i4=new If(4).toRed(this.red).redInvm(),this.two=new If(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two));}GO(Mf,Ng);KO.exports=Mf;Mf.prototype.validate=function(e){var r=e.normalize().x,n=r.redSqr(),i=n.redMul(r).redAdd(n.redMul(this.a)).redAdd(r),o=i.redSqrt();return o.redSqr().cmp(i)===0};function ln(t,e,r){Ng.BasePoint.call(this,t,"projective"),e===null&&r===null?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new If(e,16),this.z=new If(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)));}GO(ln,Ng.BasePoint);Mf.prototype.decodePoint=function(e,r){return this.point(YZ.toArray(e,r),1)};Mf.prototype.point=function(e,r){return new ln(this,e,r)};Mf.prototype.pointFromJSON=function(e){return ln.fromJSON(this,e)};ln.prototype.precompute=function(){};ln.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())};ln.fromJSON=function(e,r){return new ln(e,r[0],r[1]||e.one)};ln.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"};ln.prototype.isInfinity=function(){return this.z.cmpn(0)===0};ln.prototype.dbl=function(){var e=this.x.redAdd(this.z),r=e.redSqr(),n=this.x.redSub(this.z),i=n.redSqr(),o=r.redSub(i),a=r.redMul(i),s=o.redMul(i.redAdd(this.curve.a24.redMul(o)));return this.curve.point(a,s)};ln.prototype.add=function(){throw new Error("Not supported on Montgomery curve")};ln.prototype.diffAdd=function(e,r){var n=this.x.redAdd(this.z),i=this.x.redSub(this.z),o=e.x.redAdd(e.z),a=e.x.redSub(e.z),s=a.redMul(n),c=o.redMul(i),u=r.z.redMul(s.redAdd(c).redSqr()),l=r.x.redMul(s.redISub(c).redSqr());return this.curve.point(u,l)};ln.prototype.mul=function(e){for(var r=e.clone(),n=this,i=this.curve.point(null,null),o=this,a=[];r.cmpn(0)!==0;r.iushrn(1))a.push(r.andln(1));for(var s=a.length-1;s>=0;s--)a[s]===0?(n=n.diffAdd(i,o),i=i.dbl()):(i=n.diffAdd(i,o),n=n.dbl());return i};ln.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")};ln.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")};ln.prototype.eq=function(e){return this.getX().cmp(e.getX())===0};ln.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this};ln.prototype.getX=function(){return this.normalize(),this.x.fromRed()};});var JO=ne((R2e,ZO)=>{v();m();y();g();var ZZ=yi(),ns=aa(),YO=yt(),kg=tp(),JZ=ZZ.assert;function sa(t){this.twisted=(t.a|0)!==1,this.mOneA=this.twisted&&(t.a|0)===-1,this.extended=this.mOneA,kg.call(this,"edwards",t),this.a=new ns(t.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new ns(t.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new ns(t.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),JZ(!this.twisted||this.c.fromRed().cmpn(1)===0),this.oneC=(t.c|0)===1;}YO(sa,kg);ZO.exports=sa;sa.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)};sa.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)};sa.prototype.jpoint=function(e,r,n,i){return this.point(e,r,n,i)};sa.prototype.pointFromX=function(e,r){e=new ns(e,16),e.red||(e=e.toRed(this.red));var n=e.redSqr(),i=this.c2.redSub(this.a.redMul(n)),o=this.one.redSub(this.c2.redMul(this.d).redMul(n)),a=i.redMul(o.redInvm()),s=a.redSqrt();if(s.redSqr().redSub(a).cmp(this.zero)!==0)throw new Error("invalid point");var c=s.fromRed().isOdd();return (r&&!c||!r&&c)&&(s=s.redNeg()),this.point(e,s)};sa.prototype.pointFromY=function(e,r){e=new ns(e,16),e.red||(e=e.toRed(this.red));var n=e.redSqr(),i=n.redSub(this.c2),o=n.redMul(this.d).redMul(this.c2).redSub(this.a),a=i.redMul(o.redInvm());if(a.cmp(this.zero)===0){if(r)throw new Error("invalid point");return this.point(this.zero,e)}var s=a.redSqrt();if(s.redSqr().redSub(a).cmp(this.zero)!==0)throw new Error("invalid point");return s.fromRed().isOdd()!==r&&(s=s.redNeg()),this.point(s,e)};sa.prototype.validate=function(e){if(e.isInfinity())return !0;e.normalize();var r=e.x.redSqr(),n=e.y.redSqr(),i=r.redMul(this.a).redAdd(n),o=this.c2.redMul(this.one.redAdd(this.d.redMul(r).redMul(n)));return i.cmp(o)===0};function hr(t,e,r,n,i){kg.BasePoint.call(this,t,"projective"),e===null&&r===null&&n===null?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new ns(e,16),this.y=new ns(r,16),this.z=n?new ns(n,16):this.curve.one,this.t=i&&new ns(i,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))));}YO(hr,kg.BasePoint);sa.prototype.pointFromJSON=function(e){return hr.fromJSON(this,e)};sa.prototype.point=function(e,r,n,i){return new hr(this,e,r,n,i)};hr.fromJSON=function(e,r){return new hr(e,r[0],r[1],r[2])};hr.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"};hr.prototype.isInfinity=function(){return this.x.cmpn(0)===0&&(this.y.cmp(this.z)===0||this.zOne&&this.y.cmp(this.curve.c)===0)};hr.prototype._extDbl=function(){var e=this.x.redSqr(),r=this.y.redSqr(),n=this.z.redSqr();n=n.redIAdd(n);var i=this.curve._mulA(e),o=this.x.redAdd(this.y).redSqr().redISub(e).redISub(r),a=i.redAdd(r),s=a.redSub(n),c=i.redSub(r),u=o.redMul(s),l=a.redMul(c),w=o.redMul(c),T=s.redMul(a);return this.curve.point(u,l,T,w)};hr.prototype._projDbl=function(){var e=this.x.redAdd(this.y).redSqr(),r=this.x.redSqr(),n=this.y.redSqr(),i,o,a,s,c,u;if(this.curve.twisted){s=this.curve._mulA(r);var l=s.redAdd(n);this.zOne?(i=e.redSub(r).redSub(n).redMul(l.redSub(this.curve.two)),o=l.redMul(s.redSub(n)),a=l.redSqr().redSub(l).redSub(l)):(c=this.z.redSqr(),u=l.redSub(c).redISub(c),i=e.redSub(r).redISub(n).redMul(u),o=l.redMul(s.redSub(n)),a=l.redMul(u));}else s=r.redAdd(n),c=this.curve._mulC(this.z).redSqr(),u=s.redSub(c).redSub(c),i=this.curve._mulC(e.redISub(s)).redMul(u),o=this.curve._mulC(s).redMul(r.redISub(n)),a=s.redMul(u);return this.curve.point(i,o,a)};hr.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()};hr.prototype._extAdd=function(e){var r=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),n=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),i=this.t.redMul(this.curve.dd).redMul(e.t),o=this.z.redMul(e.z.redAdd(e.z)),a=n.redSub(r),s=o.redSub(i),c=o.redAdd(i),u=n.redAdd(r),l=a.redMul(s),w=c.redMul(u),T=a.redMul(u),x=s.redMul(c);return this.curve.point(l,w,x,T)};hr.prototype._projAdd=function(e){var r=this.z.redMul(e.z),n=r.redSqr(),i=this.x.redMul(e.x),o=this.y.redMul(e.y),a=this.curve.d.redMul(i).redMul(o),s=n.redSub(a),c=n.redAdd(a),u=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(i).redISub(o),l=r.redMul(s).redMul(u),w,T;return this.curve.twisted?(w=r.redMul(c).redMul(o.redSub(this.curve._mulA(i))),T=s.redMul(c)):(w=r.redMul(c).redMul(o.redSub(i)),T=this.curve._mulC(s).redMul(c)),this.curve.point(l,w,T)};hr.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)};hr.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)};hr.prototype.mulAdd=function(e,r,n){return this.curve._wnafMulAdd(1,[this,r],[e,n],2,!1)};hr.prototype.jmulAdd=function(e,r,n){return this.curve._wnafMulAdd(1,[this,r],[e,n],2,!0)};hr.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this};hr.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())};hr.prototype.getX=function(){return this.normalize(),this.x.fromRed()};hr.prototype.getY=function(){return this.normalize(),this.y.fromRed()};hr.prototype.eq=function(e){return this===e||this.getX().cmp(e.getX())===0&&this.getY().cmp(e.getY())===0};hr.prototype.eqXToP=function(e){var r=e.toRed(this.curve.red).redMul(this.z);if(this.x.cmp(r)===0)return !0;for(var n=e.clone(),i=this.curve.redN.redMul(this.z);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return !1;if(r.redIAdd(i),this.x.cmp(r)===0)return !0}};hr.prototype.toP=hr.prototype.normalize;hr.prototype.mixedAdd=hr.prototype.add;});var sS=ne(XO=>{v();m();y();g();var Pg=XO;Pg.base=tp();Pg.short=VO();Pg.mont=WO();Pg.edwards=JO();});var Co=ne(dr=>{v();m();y();g();var XZ=mi(),QZ=yt();dr.inherits=QZ;function eJ(t,e){return (t.charCodeAt(e)&64512)!==55296||e<0||e+1>=t.length?!1:(t.charCodeAt(e+1)&64512)===56320}function tJ(t,e){if(Array.isArray(t))return t.slice();if(!t)return [];var r=[];if(typeof t=="string")if(e){if(e==="hex")for(t=t.replace(/[^a-z0-9]+/ig,""),t.length%2!==0&&(t="0"+t),i=0;i<t.length;i+=2)r.push(parseInt(t[i]+t[i+1],16));}else for(var n=0,i=0;i<t.length;i++){var o=t.charCodeAt(i);o<128?r[n++]=o:o<2048?(r[n++]=o>>6|192,r[n++]=o&63|128):eJ(t,i)?(o=65536+((o&1023)<<10)+(t.charCodeAt(++i)&1023),r[n++]=o>>18|240,r[n++]=o>>12&63|128,r[n++]=o>>6&63|128,r[n++]=o&63|128):(r[n++]=o>>12|224,r[n++]=o>>6&63|128,r[n++]=o&63|128);}else for(i=0;i<t.length;i++)r[i]=t[i]|0;return r}dr.toArray=tJ;function rJ(t){for(var e="",r=0;r<t.length;r++)e+=eN(t[r].toString(16));return e}dr.toHex=rJ;function QO(t){var e=t>>>24|t>>>8&65280|t<<8&16711680|(t&255)<<24;return e>>>0}dr.htonl=QO;function nJ(t,e){for(var r="",n=0;n<t.length;n++){var i=t[n];e==="little"&&(i=QO(i)),r+=tN(i.toString(16));}return r}dr.toHex32=nJ;function eN(t){return t.length===1?"0"+t:t}dr.zero2=eN;function tN(t){return t.length===7?"0"+t:t.length===6?"00"+t:t.length===5?"000"+t:t.length===4?"0000"+t:t.length===3?"00000"+t:t.length===2?"000000"+t:t.length===1?"0000000"+t:t}dr.zero8=tN;function iJ(t,e,r,n){var i=r-e;XZ(i%4===0);for(var o=new Array(i/4),a=0,s=e;a<o.length;a++,s+=4){var c;n==="big"?c=t[s]<<24|t[s+1]<<16|t[s+2]<<8|t[s+3]:c=t[s+3]<<24|t[s+2]<<16|t[s+1]<<8|t[s],o[a]=c>>>0;}return o}dr.join32=iJ;function oJ(t,e){for(var r=new Array(t.length*4),n=0,i=0;n<t.length;n++,i+=4){var o=t[n];e==="big"?(r[i]=o>>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=o&255):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=o&255);}return r}dr.split32=oJ;function aJ(t,e){return t>>>e|t<<32-e}dr.rotr32=aJ;function sJ(t,e){return t<<e|t>>>32-e}dr.rotl32=sJ;function cJ(t,e){return t+e>>>0}dr.sum32=cJ;function uJ(t,e,r){return t+e+r>>>0}dr.sum32_3=uJ;function lJ(t,e,r,n){return t+e+r+n>>>0}dr.sum32_4=lJ;function fJ(t,e,r,n,i){return t+e+r+n+i>>>0}dr.sum32_5=fJ;function dJ(t,e,r,n){var i=t[e],o=t[e+1],a=n+o>>>0,s=(a<n?1:0)+r+i;t[e]=s>>>0,t[e+1]=a;}dr.sum64=dJ;function hJ(t,e,r,n){var i=e+n>>>0,o=(i<e?1:0)+t+r;return o>>>0}dr.sum64_hi=hJ;function pJ(t,e,r,n){var i=e+n;return i>>>0}dr.sum64_lo=pJ;function mJ(t,e,r,n,i,o,a,s){var c=0,u=e;u=u+n>>>0,c+=u<e?1:0,u=u+o>>>0,c+=u<o?1:0,u=u+s>>>0,c+=u<s?1:0;var l=t+r+i+a+c;return l>>>0}dr.sum64_4_hi=mJ;function yJ(t,e,r,n,i,o,a,s){var c=e+n+o+s;return c>>>0}dr.sum64_4_lo=yJ;function gJ(t,e,r,n,i,o,a,s,c,u){var l=0,w=e;w=w+n>>>0,l+=w<e?1:0,w=w+o>>>0,l+=w<o?1:0,w=w+s>>>0,l+=w<s?1:0,w=w+u>>>0,l+=w<u?1:0;var T=t+r+i+a+c+l;return T>>>0}dr.sum64_5_hi=gJ;function vJ(t,e,r,n,i,o,a,s,c,u){var l=e+n+o+s+u;return l>>>0}dr.sum64_5_lo=vJ;function bJ(t,e,r){var n=e<<32-r|t>>>r;return n>>>0}dr.rotr64_hi=bJ;function wJ(t,e,r){var n=t<<32-r|e>>>r;return n>>>0}dr.rotr64_lo=wJ;function EJ(t,e,r){return t>>>r}dr.shr64_hi=EJ;function _J(t,e,r){var n=t<<32-r|e>>>r;return n>>>0}dr.shr64_lo=_J;});var Of=ne(nN=>{v();m();y();g();var rN=Co(),SJ=mi();function Bg(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32;}nN.BlockHash=Bg;Bg.prototype.update=function(e,r){if(e=rN.toArray(e,r),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){e=this.pending;var n=e.length%this._delta8;this.pending=e.slice(e.length-n,e.length),this.pending.length===0&&(this.pending=null),e=rN.join32(e,0,e.length-n,this.endian);for(var i=0;i<e.length;i+=this._delta32)this._update(e,i,i+this._delta32);}return this};Bg.prototype.digest=function(e){return this.update(this._pad()),SJ(this.pending===null),this._digest(e)};Bg.prototype._pad=function(){var e=this.pendingTotal,r=this._delta8,n=r-(e+this.padLength)%r,i=new Array(n+this.padLength);i[0]=128;for(var o=1;o<n;o++)i[o]=0;if(e<<=3,this.endian==="big"){for(var a=8;a<this.padLength;a++)i[o++]=0;i[o++]=0,i[o++]=0,i[o++]=0,i[o++]=0,i[o++]=e>>>24&255,i[o++]=e>>>16&255,i[o++]=e>>>8&255,i[o++]=e&255;}else for(i[o++]=e&255,i[o++]=e>>>8&255,i[o++]=e>>>16&255,i[o++]=e>>>24&255,i[o++]=0,i[o++]=0,i[o++]=0,i[o++]=0,a=8;a<this.padLength;a++)i[o++]=0;return i};});var cS=ne(is=>{v();m();y();g();var CJ=Co(),ca=CJ.rotr32;function AJ(t,e,r,n){if(t===0)return iN(e,r,n);if(t===1||t===3)return aN(e,r,n);if(t===2)return oN(e,r,n)}is.ft_1=AJ;function iN(t,e,r){return t&e^~t&r}is.ch32=iN;function oN(t,e,r){return t&e^t&r^e&r}is.maj32=oN;function aN(t,e,r){return t^e^r}is.p32=aN;function TJ(t){return ca(t,2)^ca(t,13)^ca(t,22)}is.s0_256=TJ;function RJ(t){return ca(t,6)^ca(t,11)^ca(t,25)}is.s1_256=RJ;function xJ(t){return ca(t,7)^ca(t,18)^t>>>3}is.g0_256=xJ;function IJ(t){return ca(t,17)^ca(t,19)^t>>>10}is.g1_256=IJ;});var uN=ne((X2e,cN)=>{v();m();y();g();var Nf=Co(),MJ=Of(),OJ=cS(),uS=Nf.rotl32,rp=Nf.sum32,NJ=Nf.sum32_5,kJ=OJ.ft_1,sN=MJ.BlockHash,PJ=[1518500249,1859775393,2400959708,3395469782];function ua(){if(!(this instanceof ua))return new ua;sN.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80);}Nf.inherits(ua,sN);cN.exports=ua;ua.blockSize=512;ua.outSize=160;ua.hmacStrength=80;ua.padLength=64;ua.prototype._update=function(e,r){for(var n=this.W,i=0;i<16;i++)n[i]=e[r+i];for(;i<n.length;i++)n[i]=uS(n[i-3]^n[i-8]^n[i-14]^n[i-16],1);var o=this.h[0],a=this.h[1],s=this.h[2],c=this.h[3],u=this.h[4];for(i=0;i<n.length;i++){var l=~~(i/20),w=NJ(uS(o,5),kJ(l,a,s,c),u,n[i],PJ[l]);u=c,c=s,s=uS(a,30),a=o,o=w;}this.h[0]=rp(this.h[0],o),this.h[1]=rp(this.h[1],a),this.h[2]=rp(this.h[2],s),this.h[3]=rp(this.h[3],c),this.h[4]=rp(this.h[4],u);};ua.prototype._digest=function(e){return e==="hex"?Nf.toHex32(this.h,"big"):Nf.split32(this.h,"big")};});var lS=ne((nTe,fN)=>{v();m();y();g();var kf=Co(),BJ=Of(),Pf=cS(),UJ=mi(),Ao=kf.sum32,DJ=kf.sum32_4,LJ=kf.sum32_5,qJ=Pf.ch32,FJ=Pf.maj32,zJ=Pf.s0_256,HJ=Pf.s1_256,jJ=Pf.g0_256,$J=Pf.g1_256,lN=BJ.BlockHash,VJ=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function la(){if(!(this instanceof la))return new la;lN.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=VJ,this.W=new Array(64);}kf.inherits(la,lN);fN.exports=la;la.blockSize=512;la.outSize=256;la.hmacStrength=192;la.padLength=64;la.prototype._update=function(e,r){for(var n=this.W,i=0;i<16;i++)n[i]=e[r+i];for(;i<n.length;i++)n[i]=DJ($J(n[i-2]),n[i-7],jJ(n[i-15]),n[i-16]);var o=this.h[0],a=this.h[1],s=this.h[2],c=this.h[3],u=this.h[4],l=this.h[5],w=this.h[6],T=this.h[7];for(UJ(this.k.length===n.length),i=0;i<n.length;i++){var x=LJ(T,HJ(u),qJ(u,l,w),this.k[i],n[i]),I=Ao(zJ(o),FJ(o,a,s));T=w,w=l,l=u,u=Ao(c,x),c=s,s=a,a=o,o=Ao(x,I);}this.h[0]=Ao(this.h[0],o),this.h[1]=Ao(this.h[1],a),this.h[2]=Ao(this.h[2],s),this.h[3]=Ao(this.h[3],c),this.h[4]=Ao(this.h[4],u),this.h[5]=Ao(this.h[5],l),this.h[6]=Ao(this.h[6],w),this.h[7]=Ao(this.h[7],T);};la.prototype._digest=function(e){return e==="hex"?kf.toHex32(this.h,"big"):kf.split32(this.h,"big")};});var pN=ne((cTe,hN)=>{v();m();y();g();var fS=Co(),dN=lS();function os(){if(!(this instanceof os))return new os;dN.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428];}fS.inherits(os,dN);hN.exports=os;os.blockSize=512;os.outSize=224;os.hmacStrength=192;os.padLength=64;os.prototype._digest=function(e){return e==="hex"?fS.toHex32(this.h.slice(0,7),"big"):fS.split32(this.h.slice(0,7),"big")};});var pS=ne((hTe,vN)=>{v();m();y();g();var Qn=Co(),GJ=Of(),KJ=mi(),fa=Qn.rotr64_hi,da=Qn.rotr64_lo,mN=Qn.shr64_hi,yN=Qn.shr64_lo,Xs=Qn.sum64,dS=Qn.sum64_hi,hS=Qn.sum64_lo,WJ=Qn.sum64_4_hi,YJ=Qn.sum64_4_lo,ZJ=Qn.sum64_5_hi,JJ=Qn.sum64_5_lo,gN=GJ.BlockHash,XJ=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function To(){if(!(this instanceof To))return new To;gN.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=XJ,this.W=new Array(160);}Qn.inherits(To,gN);vN.exports=To;To.blockSize=1024;To.outSize=512;To.hmacStrength=192;To.padLength=128;To.prototype._prepareBlock=function(e,r){for(var n=this.W,i=0;i<32;i++)n[i]=e[r+i];for(;i<n.length;i+=2){var o=uX(n[i-4],n[i-3]),a=lX(n[i-4],n[i-3]),s=n[i-14],c=n[i-13],u=sX(n[i-30],n[i-29]),l=cX(n[i-30],n[i-29]),w=n[i-32],T=n[i-31];n[i]=WJ(o,a,s,c,u,l,w,T),n[i+1]=YJ(o,a,s,c,u,l,w,T);}};To.prototype._update=function(e,r){this._prepareBlock(e,r);var n=this.W,i=this.h[0],o=this.h[1],a=this.h[2],s=this.h[3],c=this.h[4],u=this.h[5],l=this.h[6],w=this.h[7],T=this.h[8],x=this.h[9],I=this.h[10],k=this.h[11],q=this.h[12],j=this.h[13],K=this.h[14],Z=this.h[15];KJ(this.k.length===n.length);for(var se=0;se<n.length;se+=2){var ce=K,Te=Z,pe=oX(T,x),le=aX(T,x),Y=QJ(T,x,I,k,q),S=eX(T,x,I,k,q,j),d=this.k[se],C=this.k[se+1],A=n[se],f=n[se+1],_=ZJ(ce,Te,pe,le,Y,S,d,C,A,f),M=JJ(ce,Te,pe,le,Y,S,d,C,A,f);ce=nX(i,o),Te=iX(i,o),pe=tX(i,o,a,s,c),le=rX(i,o,a,s,c,u);var R=dS(ce,Te,pe,le),h=hS(ce,Te,pe,le);K=q,Z=j,q=I,j=k,I=T,k=x,T=dS(l,w,_,M),x=hS(w,w,_,M),l=c,w=u,c=a,u=s,a=i,s=o,i=dS(_,M,R,h),o=hS(_,M,R,h);}Xs(this.h,0,i,o),Xs(this.h,2,a,s),Xs(this.h,4,c,u),Xs(this.h,6,l,w),Xs(this.h,8,T,x),Xs(this.h,10,I,k),Xs(this.h,12,q,j),Xs(this.h,14,K,Z);};To.prototype._digest=function(e){return e==="hex"?Qn.toHex32(this.h,"big"):Qn.split32(this.h,"big")};function QJ(t,e,r,n,i){var o=t&r^~t&i;return o<0&&(o+=4294967296),o}function eX(t,e,r,n,i,o){var a=e&n^~e&o;return a<0&&(a+=4294967296),a}function tX(t,e,r,n,i){var o=t&r^t&i^r&i;return o<0&&(o+=4294967296),o}function rX(t,e,r,n,i,o){var a=e&n^e&o^n&o;return a<0&&(a+=4294967296),a}function nX(t,e){var r=fa(t,e,28),n=fa(e,t,2),i=fa(e,t,7),o=r^n^i;return o<0&&(o+=4294967296),o}function iX(t,e){var r=da(t,e,28),n=da(e,t,2),i=da(e,t,7),o=r^n^i;return o<0&&(o+=4294967296),o}function oX(t,e){var r=fa(t,e,14),n=fa(t,e,18),i=fa(e,t,9),o=r^n^i;return o<0&&(o+=4294967296),o}function aX(t,e){var r=da(t,e,14),n=da(t,e,18),i=da(e,t,9),o=r^n^i;return o<0&&(o+=4294967296),o}function sX(t,e){var r=fa(t,e,1),n=fa(t,e,8),i=mN(t,e,7),o=r^n^i;return o<0&&(o+=4294967296),o}function cX(t,e){var r=da(t,e,1),n=da(t,e,8),i=yN(t,e,7),o=r^n^i;return o<0&&(o+=4294967296),o}function uX(t,e){var r=fa(t,e,19),n=fa(e,t,29),i=mN(t,e,6),o=r^n^i;return o<0&&(o+=4294967296),o}function lX(t,e){var r=da(t,e,19),n=da(e,t,29),i=yN(t,e,6),o=r^n^i;return o<0&&(o+=4294967296),o}});var EN=ne((vTe,wN)=>{v();m();y();g();var mS=Co(),bN=pS();function as(){if(!(this instanceof as))return new as;bN.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428];}mS.inherits(as,bN);wN.exports=as;as.blockSize=1024;as.outSize=384;as.hmacStrength=192;as.padLength=128;as.prototype._digest=function(e){return e==="hex"?mS.toHex32(this.h.slice(0,12),"big"):mS.split32(this.h.slice(0,12),"big")};});var _N=ne(Bf=>{v();m();y();g();Bf.sha1=uN();Bf.sha224=pN();Bf.sha256=lS();Bf.sha384=EN();Bf.sha512=pS();});var xN=ne(RN=>{v();m();y();g();var Cu=Co(),fX=Of(),Ug=Cu.rotl32,SN=Cu.sum32,np=Cu.sum32_3,CN=Cu.sum32_4,TN=fX.BlockHash;function ha(){if(!(this instanceof ha))return new ha;TN.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little";}Cu.inherits(ha,TN);RN.ripemd160=ha;ha.blockSize=512;ha.outSize=160;ha.hmacStrength=192;ha.padLength=64;ha.prototype._update=function(e,r){for(var n=this.h[0],i=this.h[1],o=this.h[2],a=this.h[3],s=this.h[4],c=n,u=i,l=o,w=a,T=s,x=0;x<80;x++){var I=SN(Ug(CN(n,AN(x,i,o,a),e[pX[x]+r],dX(x)),yX[x]),s);n=s,s=a,a=Ug(o,10),o=i,i=I,I=SN(Ug(CN(c,AN(79-x,u,l,w),e[mX[x]+r],hX(x)),gX[x]),T),c=T,T=w,w=Ug(l,10),l=u,u=I;}I=np(this.h[1],o,w),this.h[1]=np(this.h[2],a,T),this.h[2]=np(this.h[3],s,c),this.h[3]=np(this.h[4],n,u),this.h[4]=np(this.h[0],i,l),this.h[0]=I;};ha.prototype._digest=function(e){return e==="hex"?Cu.toHex32(this.h,"little"):Cu.split32(this.h,"little")};function AN(t,e,r,n){return t<=15?e^r^n:t<=31?e&r|~e&n:t<=47?(e|~r)^n:t<=63?e&n|r&~n:e^(r|~n)}function dX(t){return t<=15?0:t<=31?1518500249:t<=47?1859775393:t<=63?2400959708:2840853838}function hX(t){return t<=15?1352829926:t<=31?1548603684:t<=47?1836072691:t<=63?2053994217:0}var pX=[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],mX=[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],yX=[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],gX=[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];});var MN=ne((kTe,IN)=>{v();m();y();g();var vX=Co(),bX=mi();function Uf(t,e,r){if(!(this instanceof Uf))return new Uf(t,e,r);this.Hash=t,this.blockSize=t.blockSize/8,this.outSize=t.outSize/8,this.inner=null,this.outer=null,this._init(vX.toArray(e,r));}IN.exports=Uf;Uf.prototype._init=function(e){e.length>this.blockSize&&(e=new this.Hash().update(e).digest()),bX(e.length<=this.blockSize);for(var r=e.length;r<this.blockSize;r++)e.push(0);for(r=0;r<e.length;r++)e[r]^=54;for(this.inner=new this.Hash().update(e),r=0;r<e.length;r++)e[r]^=106;this.outer=new this.Hash().update(e);};Uf.prototype.update=function(e,r){return this.inner.update(e,r),this};Uf.prototype.digest=function(e){return this.outer.update(this.inner.digest()),this.outer.digest(e)};});var Dg=ne(ON=>{v();m();y();g();var bn=ON;bn.utils=Co();bn.common=Of();bn.sha=_N();bn.ripemd=xN();bn.hmac=MN();bn.sha1=bn.sha.sha1;bn.sha256=bn.sha.sha256;bn.sha224=bn.sha.sha224;bn.sha384=bn.sha.sha384;bn.sha512=bn.sha.sha512;bn.ripemd160=bn.ripemd.ripemd160;});var kN=ne((jTe,NN)=>{v();m();y();g();NN.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}};});var Lg=ne(UN=>{v();m();y();g();var gS=UN,Qs=Dg(),yS=sS(),wX=yi(),PN=wX.assert;function BN(t){t.type==="short"?this.curve=new yS.short(t):t.type==="edwards"?this.curve=new yS.edwards(t):this.curve=new yS.mont(t),this.g=this.curve.g,this.n=this.curve.n,this.hash=t.hash,PN(this.g.validate(),"Invalid curve"),PN(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O");}gS.PresetCurve=BN;function ec(t,e){Object.defineProperty(gS,t,{configurable:!0,enumerable:!0,get:function(){var r=new BN(e);return Object.defineProperty(gS,t,{configurable:!0,enumerable:!0,value:r}),r}});}ec("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:Qs.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]});ec("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:Qs.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]});ec("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:Qs.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]});ec("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:Qs.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]});ec("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:Qs.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]});ec("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:Qs.sha256,gRed:!1,g:["9"]});ec("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:Qs.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var vS;try{vS=kN();}catch(t){vS=void 0;}ec("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:Qs.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",vS]});});var qN=ne((QTe,LN)=>{v();m();y();g();var EX=Dg(),Au=oS(),DN=mi();function tc(t){if(!(this instanceof tc))return new tc(t);this.hash=t.hash,this.predResist=!!t.predResist,this.outLen=this.hash.outSize,this.minEntropy=t.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=Au.toArray(t.entropy,t.entropyEnc||"hex"),r=Au.toArray(t.nonce,t.nonceEnc||"hex"),n=Au.toArray(t.pers,t.persEnc||"hex");DN(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,r,n);}LN.exports=tc;tc.prototype._init=function(e,r,n){var i=e.concat(r).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var o=0;o<this.V.length;o++)this.K[o]=0,this.V[o]=1;this._update(i),this._reseed=1,this.reseedInterval=281474976710656;};tc.prototype._hmac=function(){return new EX.hmac(this.hash,this.K)};tc.prototype._update=function(e){var r=this._hmac().update(this.V).update([0]);e&&(r=r.update(e)),this.K=r.digest(),this.V=this._hmac().update(this.V).digest(),e&&(this.K=this._hmac().update(this.V).update([1]).update(e).digest(),this.V=this._hmac().update(this.V).digest());};tc.prototype.reseed=function(e,r,n,i){typeof r!="string"&&(i=n,n=r,r=null),e=Au.toArray(e,r),n=Au.toArray(n,i),DN(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(n||[])),this._reseed=1;};tc.prototype.generate=function(e,r,n,i){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof r!="string"&&(i=n,n=r,r=null),n&&(n=Au.toArray(n,i||"hex"),this._update(n));for(var o=[];o.length<e;)this.V=this._hmac().update(this.V).digest(),o=o.concat(this.V);var a=o.slice(0,e);return this._update(n),this._reseed++,Au.encode(a,r)};});var zN=ne((iRe,FN)=>{v();m();y();g();var _X=aa(),SX=yi(),bS=SX.assert;function In(t,e){this.ec=t,this.priv=null,this.pub=null,e.priv&&this._importPrivate(e.priv,e.privEnc),e.pub&&this._importPublic(e.pub,e.pubEnc);}FN.exports=In;In.fromPublic=function(e,r,n){return r instanceof In?r:new In(e,{pub:r,pubEnc:n})};In.fromPrivate=function(e,r,n){return r instanceof In?r:new In(e,{priv:r,privEnc:n})};In.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}};In.prototype.getPublic=function(e,r){return typeof e=="string"&&(r=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),r?this.pub.encode(r,e):this.pub};In.prototype.getPrivate=function(e){return e==="hex"?this.priv.toString(16,2):this.priv};In.prototype._importPrivate=function(e,r){this.priv=new _X(e,r||16),this.priv=this.priv.umod(this.ec.curve.n);};In.prototype._importPublic=function(e,r){if(e.x||e.y){this.ec.curve.type==="mont"?bS(e.x,"Need x coordinate"):(this.ec.curve.type==="short"||this.ec.curve.type==="edwards")&&bS(e.x&&e.y,"Need both x and y coordinate"),this.pub=this.ec.curve.point(e.x,e.y);return}this.pub=this.ec.curve.decodePoint(e,r);};In.prototype.derive=function(e){return e.validate()||bS(e.validate(),"public point not validated"),e.mul(this.priv).getX()};In.prototype.sign=function(e,r,n){return this.ec.sign(e,this,r,n)};In.prototype.verify=function(e,r,n){return this.ec.verify(e,r,this,void 0,n)};In.prototype.inspect=function(){return "<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"};});var $N=ne((uRe,jN)=>{v();m();y();g();var qg=aa(),_S=yi(),CX=_S.assert;function Fg(t,e){if(t instanceof Fg)return t;this._importDER(t,e)||(CX(t.r&&t.s,"Signature without r or s"),this.r=new qg(t.r,16),this.s=new qg(t.s,16),t.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=t.recoveryParam);}jN.exports=Fg;function AX(){this.place=0;}function wS(t,e){var r=t[e.place++];if(!(r&128))return r;var n=r&15;if(n===0||n>4||t[e.place]===0)return !1;for(var i=0,o=0,a=e.place;o<n;o++,a++)i<<=8,i|=t[a],i>>>=0;return i<=127?!1:(e.place=a,i)}function HN(t){for(var e=0,r=t.length-1;!t[e]&&!(t[e+1]&128)&&e<r;)e++;return e===0?t:t.slice(e)}Fg.prototype._importDER=function(e,r){e=_S.toArray(e,r);var n=new AX;if(e[n.place++]!==48)return !1;var i=wS(e,n);if(i===!1||i+n.place!==e.length||e[n.place++]!==2)return !1;var o=wS(e,n);if(o===!1||e[n.place]&128)return !1;var a=e.slice(n.place,o+n.place);if(n.place+=o,e[n.place++]!==2)return !1;var s=wS(e,n);if(s===!1||e.length!==s+n.place||e[n.place]&128)return !1;var c=e.slice(n.place,s+n.place);if(a[0]===0)if(a[1]&128)a=a.slice(1);else return !1;if(c[0]===0)if(c[1]&128)c=c.slice(1);else return !1;return this.r=new qg(a),this.s=new qg(c),this.recoveryParam=null,!0};function ES(t,e){if(e<128){t.push(e);return}var r=1+(Math.log(e)/Math.LN2>>>3);for(t.push(r|128);--r;)t.push(e>>>(r<<3)&255);t.push(e);}Fg.prototype.toDER=function(e){var r=this.r.toArray(),n=this.s.toArray();for(r[0]&128&&(r=[0].concat(r)),n[0]&128&&(n=[0].concat(n)),r=HN(r),n=HN(n);!n[0]&&!(n[1]&128);)n=n.slice(1);var i=[2];ES(i,r.length),i=i.concat(r),i.push(2),ES(i,n.length);var o=i.concat(n),a=[48];return ES(a,o.length),a=a.concat(o),_S.encode(a,e)};});var WN=ne((pRe,KN)=>{v();m();y();g();var ss=aa(),VN=qN(),TX=yi(),SS=Lg(),RX=lg(),GN=TX.assert,CS=zN(),zg=$N();function $i(t){if(!(this instanceof $i))return new $i(t);typeof t=="string"&&(GN(Object.prototype.hasOwnProperty.call(SS,t),"Unknown curve "+t),t=SS[t]),t instanceof SS.PresetCurve&&(t={curve:t}),this.curve=t.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=t.curve.g,this.g.precompute(t.curve.n.bitLength()+1),this.hash=t.hash||t.curve.hash;}KN.exports=$i;$i.prototype.keyPair=function(e){return new CS(this,e)};$i.prototype.keyFromPrivate=function(e,r){return CS.fromPrivate(this,e,r)};$i.prototype.keyFromPublic=function(e,r){return CS.fromPublic(this,e,r)};$i.prototype.genKeyPair=function(e){e||(e={});for(var r=new VN({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||RX(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),n=this.n.byteLength(),i=this.n.sub(new ss(2));;){var o=new ss(r.generate(n));if(!(o.cmp(i)>0))return o.iaddn(1),this.keyFromPrivate(o)}};$i.prototype._truncateToN=function(e,r,n){var i;if(ss.isBN(e)||typeof e=="number")e=new ss(e,16),i=e.byteLength();else if(typeof e=="object")i=e.length,e=new ss(e,16);else {var o=e.toString();i=o.length+1>>>1,e=new ss(o,16);}typeof n!="number"&&(n=i*8);var a=n-this.n.bitLength();return a>0&&(e=e.ushrn(a)),!r&&e.cmp(this.n)>=0?e.sub(this.n):e};$i.prototype.sign=function(e,r,n,i){typeof n=="object"&&(i=n,n=null),i||(i={}),r=this.keyFromPrivate(r,n),e=this._truncateToN(e,!1,i.msgBitLength);for(var o=this.n.byteLength(),a=r.getPrivate().toArray("be",o),s=e.toArray("be",o),c=new VN({hash:this.hash,entropy:a,nonce:s,pers:i.pers,persEnc:i.persEnc||"utf8"}),u=this.n.sub(new ss(1)),l=0;;l++){var w=i.k?i.k(l):new ss(c.generate(this.n.byteLength()));if(w=this._truncateToN(w,!0),!(w.cmpn(1)<=0||w.cmp(u)>=0)){var T=this.g.mul(w);if(!T.isInfinity()){var x=T.getX(),I=x.umod(this.n);if(I.cmpn(0)!==0){var k=w.invm(this.n).mul(I.mul(r.getPrivate()).iadd(e));if(k=k.umod(this.n),k.cmpn(0)!==0){var q=(T.getY().isOdd()?1:0)|(x.cmp(I)!==0?2:0);return i.canonical&&k.cmp(this.nh)>0&&(k=this.n.sub(k),q^=1),new zg({r:I,s:k,recoveryParam:q})}}}}}};$i.prototype.verify=function(e,r,n,i,o){o||(o={}),e=this._truncateToN(e,!1,o.msgBitLength),n=this.keyFromPublic(n,i),r=new zg(r,"hex");var a=r.r,s=r.s;if(a.cmpn(1)<0||a.cmp(this.n)>=0||s.cmpn(1)<0||s.cmp(this.n)>=0)return !1;var c=s.invm(this.n),u=c.mul(e).umod(this.n),l=c.mul(a).umod(this.n),w;return this.curve._maxwellTrick?(w=this.g.jmulAdd(u,n.getPublic(),l),w.isInfinity()?!1:w.eqXToP(a)):(w=this.g.mulAdd(u,n.getPublic(),l),w.isInfinity()?!1:w.getX().umod(this.n).cmp(a)===0)};$i.prototype.recoverPubKey=function(t,e,r,n){GN((3&r)===r,"The recovery param is more than two bits"),e=new zg(e,n);var i=this.n,o=new ss(t),a=e.r,s=e.s,c=r&1,u=r>>1;if(a.cmp(this.curve.p.umod(this.curve.n))>=0&&u)throw new Error("Unable to find sencond key candinate");u?a=this.curve.pointFromX(a.add(this.curve.n),c):a=this.curve.pointFromX(a,c);var l=e.r.invm(i),w=i.sub(o).mul(l).umod(i),T=s.mul(l).umod(i);return this.g.mulAdd(w,a,T)};$i.prototype.getKeyRecoveryParam=function(t,e,r,n){if(e=new zg(e,n),e.recoveryParam!==null)return e.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(t,e,i);}catch(a){continue}if(o.eq(r))return i}throw new Error("Unable to find valid recovery factor")};});var XN=ne((bRe,JN)=>{v();m();y();g();var ip=yi(),ZN=ip.assert,YN=ip.parseBytes,Df=ip.cachedProperty;function fn(t,e){this.eddsa=t,this._secret=YN(e.secret),t.isPoint(e.pub)?this._pub=e.pub:this._pubBytes=YN(e.pub);}fn.fromPublic=function(e,r){return r instanceof fn?r:new fn(e,{pub:r})};fn.fromSecret=function(e,r){return r instanceof fn?r:new fn(e,{secret:r})};fn.prototype.secret=function(){return this._secret};Df(fn,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())});Df(fn,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())});Df(fn,"privBytes",function(){var e=this.eddsa,r=this.hash(),n=e.encodingLength-1,i=r.slice(0,e.encodingLength);return i[0]&=248,i[n]&=127,i[n]|=64,i});Df(fn,"priv",function(){return this.eddsa.decodeInt(this.privBytes())});Df(fn,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()});Df(fn,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)});fn.prototype.sign=function(e){return ZN(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)};fn.prototype.verify=function(e,r){return this.eddsa.verify(e,r,this)};fn.prototype.getSecret=function(e){return ZN(this._secret,"KeyPair is public only"),ip.encode(this.secret(),e)};fn.prototype.getPublic=function(e){return ip.encode(this.pubBytes(),e)};JN.exports=fn;});var t8=ne((CRe,e8)=>{v();m();y();g();var xX=aa(),Hg=yi(),QN=Hg.assert,jg=Hg.cachedProperty,IX=Hg.parseBytes;function Tu(t,e){this.eddsa=t,typeof e!="object"&&(e=IX(e)),Array.isArray(e)&&(QN(e.length===t.encodingLength*2,"Signature has invalid size"),e={R:e.slice(0,t.encodingLength),S:e.slice(t.encodingLength)}),QN(e.R&&e.S,"Signature without R or S"),t.isPoint(e.R)&&(this._R=e.R),e.S instanceof xX&&(this._S=e.S),this._Rencoded=Array.isArray(e.R)?e.R:e.Rencoded,this._Sencoded=Array.isArray(e.S)?e.S:e.Sencoded;}jg(Tu,"S",function(){return this.eddsa.decodeInt(this.Sencoded())});jg(Tu,"R",function(){return this.eddsa.decodePoint(this.Rencoded())});jg(Tu,"Rencoded",function(){return this.eddsa.encodePoint(this.R())});jg(Tu,"Sencoded",function(){return this.eddsa.encodeInt(this.S())});Tu.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())};Tu.prototype.toHex=function(){return Hg.encode(this.toBytes(),"hex").toUpperCase()};e8.exports=Tu;});var a8=ne((IRe,o8)=>{v();m();y();g();var MX=Dg(),OX=Lg(),Lf=yi(),NX=Lf.assert,n8=Lf.parseBytes,i8=XN(),r8=t8();function ei(t){if(NX(t==="ed25519","only tested with ed25519 so far"),!(this instanceof ei))return new ei(t);t=OX[t].curve,this.curve=t,this.g=t.g,this.g.precompute(t.n.bitLength()+1),this.pointClass=t.point().constructor,this.encodingLength=Math.ceil(t.n.bitLength()/8),this.hash=MX.sha512;}o8.exports=ei;ei.prototype.sign=function(e,r){e=n8(e);var n=this.keyFromSecret(r),i=this.hashInt(n.messagePrefix(),e),o=this.g.mul(i),a=this.encodePoint(o),s=this.hashInt(a,n.pubBytes(),e).mul(n.priv()),c=i.add(s).umod(this.curve.n);return this.makeSignature({R:o,S:c,Rencoded:a})};ei.prototype.verify=function(e,r,n){if(e=n8(e),r=this.makeSignature(r),r.S().gte(r.eddsa.curve.n)||r.S().isNeg())return !1;var i=this.keyFromPublic(n),o=this.hashInt(r.Rencoded(),i.pubBytes(),e),a=this.g.mul(r.S()),s=r.R().add(i.pub().mul(o));return s.eq(a)};ei.prototype.hashInt=function(){for(var e=this.hash(),r=0;r<arguments.length;r++)e.update(arguments[r]);return Lf.intFromLE(e.digest()).umod(this.curve.n)};ei.prototype.keyFromPublic=function(e){return i8.fromPublic(this,e)};ei.prototype.keyFromSecret=function(e){return i8.fromSecret(this,e)};ei.prototype.makeSignature=function(e){return e instanceof r8?e:new r8(this,e)};ei.prototype.encodePoint=function(e){var r=e.getY().toArray("le",this.encodingLength);return r[this.encodingLength-1]|=e.getX().isOdd()?128:0,r};ei.prototype.decodePoint=function(e){e=Lf.parseBytes(e);var r=e.length-1,n=e.slice(0,r).concat(e[r]&-129),i=(e[r]&128)!==0,o=Lf.intFromLE(n);return this.curve.pointFromY(o,i)};ei.prototype.encodeInt=function(e){return e.toArray("le",this.encodingLength)};ei.prototype.decodeInt=function(e){return Lf.intFromLE(e)};ei.prototype.isPoint=function(e){return e instanceof this.pointClass};});var $g=ne(s8=>{v();m();y();g();var Ru=s8;Ru.version=DO().version;Ru.utils=yi();Ru.rand=lg();Ru.curve=sS();Ru.curves=Lg();Ru.ec=WN();Ru.eddsa=a8();});var Gg=ne((qRe,c8)=>{v();m();y();g();var Vg=kn(),qf=Vg.Buffer,Vi={},Gi;for(Gi in Vg)Vg.hasOwnProperty(Gi)&&(Gi==="SlowBuffer"||Gi==="Buffer"||(Vi[Gi]=Vg[Gi]));var Ff=Vi.Buffer={};for(Gi in qf)qf.hasOwnProperty(Gi)&&(Gi==="allocUnsafe"||Gi==="allocUnsafeSlow"||(Ff[Gi]=qf[Gi]));Vi.Buffer.prototype=qf.prototype;(!Ff.from||Ff.from===Uint8Array.from)&&(Ff.from=function(t,e,r){if(typeof t=="number")throw new TypeError('The "value" argument must not be of type number. Received type '+typeof t);if(t&&typeof t.length=="undefined")throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);return qf(t,e,r)});Ff.alloc||(Ff.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError('The "size" argument must be of type number. Received type '+typeof t);if(t<0||t>=2*(1<<30))throw new RangeError('The value "'+t+'" is invalid for option "size"');var n=qf(t);return !e||e.length===0?n.fill(0):typeof r=="string"?n.fill(e,r):n.fill(e),n});if(!Vi.kStringMaxLength)try{Vi.kStringMaxLength=N.binding("buffer").kStringMaxLength;}catch(t){}Vi.constants||(Vi.constants={MAX_LENGTH:Vi.kMaxLength},Vi.kStringMaxLength&&(Vi.constants.MAX_STRING_LENGTH=Vi.kStringMaxLength));c8.exports=Vi;});var Kg=ne(u8=>{v();m();y();g();var kX=yt();function Ki(t){this._reporterState={obj:null,path:[],options:t||{},errors:[]};}u8.Reporter=Ki;Ki.prototype.isError=function(e){return e instanceof zf};Ki.prototype.save=function(){let e=this._reporterState;return {obj:e.obj,pathLen:e.path.length}};Ki.prototype.restore=function(e){let r=this._reporterState;r.obj=e.obj,r.path=r.path.slice(0,e.pathLen);};Ki.prototype.enterKey=function(e){return this._reporterState.path.push(e)};Ki.prototype.exitKey=function(e){let r=this._reporterState;r.path=r.path.slice(0,e-1);};Ki.prototype.leaveKey=function(e,r,n){let i=this._reporterState;this.exitKey(e),i.obj!==null&&(i.obj[r]=n);};Ki.prototype.path=function(){return this._reporterState.path.join("/")};Ki.prototype.enterObject=function(){let e=this._reporterState,r=e.obj;return e.obj={},r};Ki.prototype.leaveObject=function(e){let r=this._reporterState,n=r.obj;return r.obj=e,n};Ki.prototype.error=function(e){let r,n=this._reporterState,i=e instanceof zf;if(i?r=e:r=new zf(n.path.map(function(o){return "["+JSON.stringify(o)+"]"}).join(""),e.message||e,e.stack),!n.options.partial)throw r;return i||n.errors.push(r),r};Ki.prototype.wrapResult=function(e){let r=this._reporterState;return r.options.partial?{result:this.isError(e)?null:e,errors:r.errors}:e};function zf(t,e){this.path=t,this.rethrow(e);}kX(zf,Error);zf.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,zf),!this.stack)try{throw new Error(this.message)}catch(r){this.stack=r.stack;}return this};});var $f=ne(AS=>{v();m();y();g();var PX=yt(),Wg=Kg().Reporter,Hf=Gg().Buffer;function Wi(t,e){if(Wg.call(this,e),!Hf.isBuffer(t)){this.error("Input not Buffer");return}this.base=t,this.offset=0,this.length=t.length;}PX(Wi,Wg);AS.DecoderBuffer=Wi;Wi.isDecoderBuffer=function(e){return e instanceof Wi?!0:typeof e=="object"&&Hf.isBuffer(e.base)&&e.constructor.name==="DecoderBuffer"&&typeof e.offset=="number"&&typeof e.length=="number"&&typeof e.save=="function"&&typeof e.restore=="function"&&typeof e.isEmpty=="function"&&typeof e.readUInt8=="function"&&typeof e.skip=="function"&&typeof e.raw=="function"};Wi.prototype.save=function(){return {offset:this.offset,reporter:Wg.prototype.save.call(this)}};Wi.prototype.restore=function(e){let r=new Wi(this.base);return r.offset=e.offset,r.length=this.offset,this.offset=e.offset,Wg.prototype.restore.call(this,e.reporter),r};Wi.prototype.isEmpty=function(){return this.offset===this.length};Wi.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")};Wi.prototype.skip=function(e,r){if(!(this.offset+e<=this.length))return this.error(r||"DecoderBuffer overrun");let n=new Wi(this.base);return n._reporterState=this._reporterState,n.offset=this.offset,n.length=this.offset+e,this.offset+=e,n};Wi.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)};function jf(t,e){if(Array.isArray(t))this.length=0,this.value=t.map(function(r){return jf.isEncoderBuffer(r)||(r=new jf(r,e)),this.length+=r.length,r},this);else if(typeof t=="number"){if(!(0<=t&&t<=255))return e.error("non-byte EncoderBuffer value");this.value=t,this.length=1;}else if(typeof t=="string")this.value=t,this.length=Hf.byteLength(t);else if(Hf.isBuffer(t))this.value=t,this.length=t.length;else return e.error("Unsupported type: "+typeof t)}AS.EncoderBuffer=jf;jf.isEncoderBuffer=function(e){return e instanceof jf?!0:typeof e=="object"&&e.constructor.name==="EncoderBuffer"&&typeof e.length=="number"&&typeof e.join=="function"};jf.prototype.join=function(e,r){return e||(e=Hf.alloc(this.length)),r||(r=0),this.length===0||(Array.isArray(this.value)?this.value.forEach(function(n){n.join(e,r),r+=n.length;}):(typeof this.value=="number"?e[r]=this.value:typeof this.value=="string"?e.write(this.value,r):Hf.isBuffer(this.value)&&this.value.copy(e,r),r+=this.length)),e};});var Yg=ne((exe,f8)=>{v();m();y();g();var BX=Kg().Reporter,UX=$f().EncoderBuffer,DX=$f().DecoderBuffer,Pn=mi(),l8=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],LX=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(l8),qX=["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"];function ur(t,e,r){let n={};this._baseState=n,n.name=r,n.enc=t,n.parent=e||null,n.children=null,n.tag=null,n.args=null,n.reverseArgs=null,n.choice=null,n.optional=!1,n.any=!1,n.obj=!1,n.use=null,n.useDecoder=null,n.key=null,n.default=null,n.explicit=null,n.implicit=null,n.contains=null,n.parent||(n.children=[],this._wrap());}f8.exports=ur;var FX=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];ur.prototype.clone=function(){let e=this._baseState,r={};FX.forEach(function(i){r[i]=e[i];});let n=new this.constructor(r.parent);return n._baseState=r,n};ur.prototype._wrap=function(){let e=this._baseState;LX.forEach(function(r){this[r]=function(){let i=new this.constructor(this);return e.children.push(i),i[r].apply(i,arguments)};},this);};ur.prototype._init=function(e){let r=this._baseState;Pn(r.parent===null),e.call(this),r.children=r.children.filter(function(n){return n._baseState.parent===this},this),Pn.equal(r.children.length,1,"Root node can have only one child");};ur.prototype._useArgs=function(e){let r=this._baseState,n=e.filter(function(i){return i instanceof this.constructor},this);e=e.filter(function(i){return !(i instanceof this.constructor)},this),n.length!==0&&(Pn(r.children===null),r.children=n,n.forEach(function(i){i._baseState.parent=this;},this)),e.length!==0&&(Pn(r.args===null),r.args=e,r.reverseArgs=e.map(function(i){if(typeof i!="object"||i.constructor!==Object)return i;let o={};return Object.keys(i).forEach(function(a){a==(a|0)&&(a|=0);let s=i[a];o[s]=a;}),o}));};qX.forEach(function(t){ur.prototype[t]=function(){let r=this._baseState;throw new Error(t+" not implemented for encoding: "+r.enc)};});l8.forEach(function(t){ur.prototype[t]=function(){let r=this._baseState,n=Array.prototype.slice.call(arguments);return Pn(r.tag===null),r.tag=t,this._useArgs(n),this};});ur.prototype.use=function(e){Pn(e);let r=this._baseState;return Pn(r.use===null),r.use=e,this};ur.prototype.optional=function(){let e=this._baseState;return e.optional=!0,this};ur.prototype.def=function(e){let r=this._baseState;return Pn(r.default===null),r.default=e,r.optional=!0,this};ur.prototype.explicit=function(e){let r=this._baseState;return Pn(r.explicit===null&&r.implicit===null),r.explicit=e,this};ur.prototype.implicit=function(e){let r=this._baseState;return Pn(r.explicit===null&&r.implicit===null),r.implicit=e,this};ur.prototype.obj=function(){let e=this._baseState,r=Array.prototype.slice.call(arguments);return e.obj=!0,r.length!==0&&this._useArgs(r),this};ur.prototype.key=function(e){let r=this._baseState;return Pn(r.key===null),r.key=e,this};ur.prototype.any=function(){let e=this._baseState;return e.any=!0,this};ur.prototype.choice=function(e){let r=this._baseState;return Pn(r.choice===null),r.choice=e,this._useArgs(Object.keys(e).map(function(n){return e[n]})),this};ur.prototype.contains=function(e){let r=this._baseState;return Pn(r.use===null),r.contains=e,this};ur.prototype._decode=function(e,r){let n=this._baseState;if(n.parent===null)return e.wrapResult(n.children[0]._decode(e,r));let i=n.default,o=!0,a=null;if(n.key!==null&&(a=e.enterKey(n.key)),n.optional){let c=null;if(n.explicit!==null?c=n.explicit:n.implicit!==null?c=n.implicit:n.tag!==null&&(c=n.tag),c===null&&!n.any){let u=e.save();try{n.choice===null?this._decodeGeneric(n.tag,e,r):this._decodeChoice(e,r),o=!0;}catch(l){o=!1;}e.restore(u);}else if(o=this._peekTag(e,c,n.any),e.isError(o))return o}let s;if(n.obj&&o&&(s=e.enterObject()),o){if(n.explicit!==null){let u=this._decodeTag(e,n.explicit);if(e.isError(u))return u;e=u;}let c=e.offset;if(n.use===null&&n.choice===null){let u;n.any&&(u=e.save());let l=this._decodeTag(e,n.implicit!==null?n.implicit:n.tag,n.any);if(e.isError(l))return l;n.any?i=e.raw(u):e=l;}if(r&&r.track&&n.tag!==null&&r.track(e.path(),c,e.length,"tagged"),r&&r.track&&n.tag!==null&&r.track(e.path(),e.offset,e.length,"content"),n.any||(n.choice===null?i=this._decodeGeneric(n.tag,e,r):i=this._decodeChoice(e,r)),e.isError(i))return i;if(!n.any&&n.choice===null&&n.children!==null&&n.children.forEach(function(l){l._decode(e,r);}),n.contains&&(n.tag==="octstr"||n.tag==="bitstr")){let u=new DX(i);i=this._getUse(n.contains,e._reporterState.obj)._decode(u,r);}}return n.obj&&o&&(i=e.leaveObject(s)),n.key!==null&&(i!==null||o===!0)?e.leaveKey(a,n.key,i):a!==null&&e.exitKey(a),i};ur.prototype._decodeGeneric=function(e,r,n){let i=this._baseState;return e==="seq"||e==="set"?null:e==="seqof"||e==="setof"?this._decodeList(r,e,i.args[0],n):/str$/.test(e)?this._decodeStr(r,e,n):e==="objid"&&i.args?this._decodeObjid(r,i.args[0],i.args[1],n):e==="objid"?this._decodeObjid(r,null,null,n):e==="gentime"||e==="utctime"?this._decodeTime(r,e,n):e==="null_"?this._decodeNull(r,n):e==="bool"?this._decodeBool(r,n):e==="objDesc"?this._decodeStr(r,e,n):e==="int"||e==="enum"?this._decodeInt(r,i.args&&i.args[0],n):i.use!==null?this._getUse(i.use,r._reporterState.obj)._decode(r,n):r.error("unknown tag: "+e)};ur.prototype._getUse=function(e,r){let n=this._baseState;return n.useDecoder=this._use(e,r),Pn(n.useDecoder._baseState.parent===null),n.useDecoder=n.useDecoder._baseState.children[0],n.implicit!==n.useDecoder._baseState.implicit&&(n.useDecoder=n.useDecoder.clone(),n.useDecoder._baseState.implicit=n.implicit),n.useDecoder};ur.prototype._decodeChoice=function(e,r){let n=this._baseState,i=null,o=!1;return Object.keys(n.choice).some(function(a){let s=e.save(),c=n.choice[a];try{let u=c._decode(e,r);if(e.isError(u))return !1;i={type:a,value:u},o=!0;}catch(u){return e.restore(s),!1}return !0},this),o?i:e.error("Choice not matched")};ur.prototype._createEncoderBuffer=function(e){return new UX(e,this.reporter)};ur.prototype._encode=function(e,r,n){let i=this._baseState;if(i.default!==null&&i.default===e)return;let o=this._encodeValue(e,r,n);if(o!==void 0&&!this._skipDefault(o,r,n))return o};ur.prototype._encodeValue=function(e,r,n){let i=this._baseState;if(i.parent===null)return i.children[0]._encode(e,r||new BX);let o=null;if(this.reporter=r,i.optional&&e===void 0)if(i.default!==null)e=i.default;else return;let a=null,s=!1;if(i.any)o=this._createEncoderBuffer(e);else if(i.choice)o=this._encodeChoice(e,r);else if(i.contains)a=this._getUse(i.contains,n)._encode(e,r),s=!0;else if(i.children)a=i.children.map(function(c){if(c._baseState.tag==="null_")return c._encode(null,r,e);if(c._baseState.key===null)return r.error("Child should have a key");let u=r.enterKey(c._baseState.key);if(typeof e!="object")return r.error("Child expected, but input is not object");let l=c._encode(e[c._baseState.key],r,e);return r.leaveKey(u),l},this).filter(function(c){return c}),a=this._createEncoderBuffer(a);else if(i.tag==="seqof"||i.tag==="setof"){if(!(i.args&&i.args.length===1))return r.error("Too many args for : "+i.tag);if(!Array.isArray(e))return r.error("seqof/setof, but data is not Array");let c=this.clone();c._baseState.implicit=null,a=this._createEncoderBuffer(e.map(function(u){let l=this._baseState;return this._getUse(l.args[0],e)._encode(u,r)},c));}else i.use!==null?o=this._getUse(i.use,n)._encode(e,r):(a=this._encodePrimitive(i.tag,e),s=!0);if(!i.any&&i.choice===null){let c=i.implicit!==null?i.implicit:i.tag,u=i.implicit===null?"universal":"context";c===null?i.use===null&&r.error("Tag could be omitted only for .use()"):i.use===null&&(o=this._encodeComposite(c,s,u,a));}return i.explicit!==null&&(o=this._encodeComposite(i.explicit,!1,"context",o)),o};ur.prototype._encodeChoice=function(e,r){let n=this._baseState,i=n.choice[e.type];return i||Pn(!1,e.type+" not found in "+JSON.stringify(Object.keys(n.choice))),i._encode(e.value,r)};ur.prototype._encodePrimitive=function(e,r){let n=this._baseState;if(/str$/.test(e))return this._encodeStr(r,e);if(e==="objid"&&n.args)return this._encodeObjid(r,n.reverseArgs[0],n.args[1]);if(e==="objid")return this._encodeObjid(r,null,null);if(e==="gentime"||e==="utctime")return this._encodeTime(r,e);if(e==="null_")return this._encodeNull();if(e==="int"||e==="enum")return this._encodeInt(r,n.args&&n.reverseArgs[0]);if(e==="bool")return this._encodeBool(r);if(e==="objDesc")return this._encodeStr(r,e);throw new Error("Unsupported tag: "+e)};ur.prototype._isNumstr=function(e){return /^[0-9 ]*$/.test(e)};ur.prototype._isPrintstr=function(e){return /^[A-Za-z0-9 '()+,-./:=?]*$/.test(e)};});var Zg=ne(xu=>{v();m();y();g();function d8(t){let e={};return Object.keys(t).forEach(function(r){(r|0)==r&&(r=r|0);let n=t[r];e[n]=r;}),e}xu.tagClass={0:"universal",1:"application",2:"context",3:"private"};xu.tagClassByName=d8(xu.tagClass);xu.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"};xu.tagByName=d8(xu.tag);});var RS=ne((lxe,m8)=>{v();m();y();g();var zX=yt(),cs=Gg().Buffer,h8=Yg(),TS=Zg();function p8(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new Ro,this.tree._init(t.body);}m8.exports=p8;p8.prototype.encode=function(e,r){return this.tree._encode(e,r).join()};function Ro(t){h8.call(this,"der",t);}zX(Ro,h8);Ro.prototype._encodeComposite=function(e,r,n,i){let o=HX(e,r,n,this.reporter);if(i.length<128){let c=cs.alloc(2);return c[0]=o,c[1]=i.length,this._createEncoderBuffer([c,i])}let a=1;for(let c=i.length;c>=256;c>>=8)a++;let s=cs.alloc(2+a);s[0]=o,s[1]=128|a;for(let c=1+a,u=i.length;u>0;c--,u>>=8)s[c]=u&255;return this._createEncoderBuffer([s,i])};Ro.prototype._encodeStr=function(e,r){if(r==="bitstr")return this._createEncoderBuffer([e.unused|0,e.data]);if(r==="bmpstr"){let n=cs.alloc(e.length*2);for(let i=0;i<e.length;i++)n.writeUInt16BE(e.charCodeAt(i),i*2);return this._createEncoderBuffer(n)}else return r==="numstr"?this._isNumstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: numstr supports only digits and space"):r==="printstr"?this._isPrintstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(r)?this._createEncoderBuffer(e):r==="objDesc"?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: "+r+" unsupported")};Ro.prototype._encodeObjid=function(e,r,n){if(typeof e=="string"){if(!r)return this.reporter.error("string objid given, but no values map found");if(!r.hasOwnProperty(e))return this.reporter.error("objid not found in values map");e=r[e].split(/[\s.]+/g);for(let s=0;s<e.length;s++)e[s]|=0;}else if(Array.isArray(e)){e=e.slice();for(let s=0;s<e.length;s++)e[s]|=0;}if(!Array.isArray(e))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(e));if(!n){if(e[1]>=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,e[0]*40+e[1]);}let i=0;for(let s=0;s<e.length;s++){let c=e[s];for(i++;c>=128;c>>=7)i++;}let o=cs.alloc(i),a=o.length-1;for(let s=e.length-1;s>=0;s--){let c=e[s];for(o[a--]=c&127;(c>>=7)>0;)o[a--]=128|c&127;}return this._createEncoderBuffer(o)};function Yi(t){return t<10?"0"+t:t}Ro.prototype._encodeTime=function(e,r){let n,i=new Date(e);return r==="gentime"?n=[Yi(i.getUTCFullYear()),Yi(i.getUTCMonth()+1),Yi(i.getUTCDate()),Yi(i.getUTCHours()),Yi(i.getUTCMinutes()),Yi(i.getUTCSeconds()),"Z"].join(""):r==="utctime"?n=[Yi(i.getUTCFullYear()%100),Yi(i.getUTCMonth()+1),Yi(i.getUTCDate()),Yi(i.getUTCHours()),Yi(i.getUTCMinutes()),Yi(i.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+r+" time is not supported yet"),this._encodeStr(n,"octstr")};Ro.prototype._encodeNull=function(){return this._createEncoderBuffer("")};Ro.prototype._encodeInt=function(e,r){if(typeof e=="string"){if(!r)return this.reporter.error("String int or enum given, but no values map");if(!r.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=r[e];}if(typeof e!="number"&&!cs.isBuffer(e)){let o=e.toArray();!e.sign&&o[0]&128&&o.unshift(0),e=cs.from(o);}if(cs.isBuffer(e)){let o=e.length;e.length===0&&o++;let a=cs.alloc(o);return e.copy(a),e.length===0&&(a[0]=0),this._createEncoderBuffer(a)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);let n=1;for(let o=e;o>=256;o>>=8)n++;let i=new Array(n);for(let o=i.length-1;o>=0;o--)i[o]=e&255,e>>=8;return i[0]&128&&i.unshift(0),this._createEncoderBuffer(cs.from(i))};Ro.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)};Ro.prototype._use=function(e,r){return typeof e=="function"&&(e=e(r)),e._getEncoder("der").tree};Ro.prototype._skipDefault=function(e,r,n){let i=this._baseState,o;if(i.default===null)return !1;let a=e.join();if(i.defaultBuffer===void 0&&(i.defaultBuffer=this._encodeValue(i.default,r,n).join()),a.length!==i.defaultBuffer.length)return !1;for(o=0;o<a.length;o++)if(a[o]!==i.defaultBuffer[o])return !1;return !0};function HX(t,e,r,n){let i;if(t==="seqof"?t="seq":t==="setof"&&(t="set"),TS.tagByName.hasOwnProperty(t))i=TS.tagByName[t];else if(typeof t=="number"&&(t|0)===t)i=t;else return n.error("Unknown tag: "+t);return i>=31?n.error("Multi-octet tag encoding unsupported"):(e||(i|=32),i|=TS.tagClassByName[r||"universal"]<<6,i)}});var g8=ne((mxe,y8)=>{v();m();y();g();var jX=yt(),xS=RS();function IS(t){xS.call(this,t),this.enc="pem";}jX(IS,xS);y8.exports=IS;IS.prototype.encode=function(e,r){let i=xS.prototype.encode.call(this,e).toString("base64"),o=["-----BEGIN "+r.label+"-----"];for(let a=0;a<i.length;a+=64)o.push(i.slice(a,a+64));return o.push("-----END "+r.label+"-----"),o.join(`
`)};});var MS=ne(b8=>{v();m();y();g();var v8=b8;v8.der=RS();v8.pem=g8();});var NS=ne((Axe,A8)=>{v();m();y();g();var $X=yt(),VX=_o(),w8=$f().DecoderBuffer,_8=Yg(),E8=Zg();function S8(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new gi,this.tree._init(t.body);}A8.exports=S8;S8.prototype.decode=function(e,r){return w8.isDecoderBuffer(e)||(e=new w8(e,r)),this.tree._decode(e,r)};function gi(t){_8.call(this,"der",t);}$X(gi,_8);gi.prototype._peekTag=function(e,r,n){if(e.isEmpty())return !1;let i=e.save(),o=OS(e,'Failed to peek tag: "'+r+'"');return e.isError(o)?o:(e.restore(i),o.tag===r||o.tagStr===r||o.tagStr+"of"===r||n)};gi.prototype._decodeTag=function(e,r,n){let i=OS(e,'Failed to decode tag of "'+r+'"');if(e.isError(i))return i;let o=C8(e,i.primitive,'Failed to get length of "'+r+'"');if(e.isError(o))return o;if(!n&&i.tag!==r&&i.tagStr!==r&&i.tagStr+"of"!==r)return e.error('Failed to match tag: "'+r+'"');if(i.primitive||o!==null)return e.skip(o,'Failed to match body of: "'+r+'"');let a=e.save(),s=this._skipUntilEnd(e,'Failed to skip indefinite length body: "'+this.tag+'"');return e.isError(s)?s:(o=e.offset-a.offset,e.restore(a),e.skip(o,'Failed to match body of: "'+r+'"'))};gi.prototype._skipUntilEnd=function(e,r){for(;;){let n=OS(e,r);if(e.isError(n))return n;let i=C8(e,n.primitive,r);if(e.isError(i))return i;let o;if(n.primitive||i!==null?o=e.skip(i):o=this._skipUntilEnd(e,r),e.isError(o))return o;if(n.tagStr==="end")break}};gi.prototype._decodeList=function(e,r,n,i){let o=[];for(;!e.isEmpty();){let a=this._peekTag(e,"end");if(e.isError(a))return a;let s=n.decode(e,"der",i);if(e.isError(s)&&a)break;o.push(s);}return o};gi.prototype._decodeStr=function(e,r){if(r==="bitstr"){let n=e.readUInt8();return e.isError(n)?n:{unused:n,data:e.raw()}}else if(r==="bmpstr"){let n=e.raw();if(n.length%2===1)return e.error("Decoding of string type: bmpstr length mismatch");let i="";for(let o=0;o<n.length/2;o++)i+=String.fromCharCode(n.readUInt16BE(o*2));return i}else if(r==="numstr"){let n=e.raw().toString("ascii");return this._isNumstr(n)?n:e.error("Decoding of string type: numstr unsupported characters")}else {if(r==="octstr")return e.raw();if(r==="objDesc")return e.raw();if(r==="printstr"){let n=e.raw().toString("ascii");return this._isPrintstr(n)?n:e.error("Decoding of string type: printstr unsupported characters")}else return /str$/.test(r)?e.raw().toString():e.error("Decoding of string type: "+r+" unsupported")}};gi.prototype._decodeObjid=function(e,r,n){let i,o=[],a=0,s=0;for(;!e.isEmpty();)s=e.readUInt8(),a<<=7,a|=s&127,s&128||(o.push(a),a=0);s&128&&o.push(a);let c=o[0]/40|0,u=o[0]%40;if(n?i=o:i=[c,u].concat(o.slice(1)),r){let l=r[i.join(" ")];l===void 0&&(l=r[i.join(".")]),l!==void 0&&(i=l);}return i};gi.prototype._decodeTime=function(e,r){let n=e.raw().toString(),i,o,a,s,c,u;if(r==="gentime")i=n.slice(0,4)|0,o=n.slice(4,6)|0,a=n.slice(6,8)|0,s=n.slice(8,10)|0,c=n.slice(10,12)|0,u=n.slice(12,14)|0;else if(r==="utctime")i=n.slice(0,2)|0,o=n.slice(2,4)|0,a=n.slice(4,6)|0,s=n.slice(6,8)|0,c=n.slice(8,10)|0,u=n.slice(10,12)|0,i<70?i=2e3+i:i=1900+i;else return e.error("Decoding "+r+" time is not supported yet");return Date.UTC(i,o-1,a,s,c,u,0)};gi.prototype._decodeNull=function(){return null};gi.prototype._decodeBool=function(e){let r=e.readUInt8();return e.isError(r)?r:r!==0};gi.prototype._decodeInt=function(e,r){let n=e.raw(),i=new VX(n);return r&&(i=r[i.toString(10)]||i),i};gi.prototype._use=function(e,r){return typeof e=="function"&&(e=e(r)),e._getDecoder("der").tree};function OS(t,e){let r=t.readUInt8(e);if(t.isError(r))return r;let n=E8.tagClass[r>>6],i=(r&32)===0;if((r&31)===31){let a=r;for(r=0;(a&128)===128;){if(a=t.readUInt8(e),t.isError(a))return a;r<<=7,r|=a&127;}}else r&=31;let o=E8.tag[r];return {cls:n,primitive:i,tag:r,tagStr:o}}function C8(t,e,r){let n=t.readUInt8(r);if(t.isError(n))return n;if(!e&&n===128)return null;if(!(n&128))return n;let i=n&127;if(i>4)return t.error("length octect is too long");n=0;for(let o=0;o<i;o++){n<<=8;let a=t.readUInt8(r);if(t.isError(a))return a;n|=a;}return n}});var R8=ne((Mxe,T8)=>{v();m();y();g();var GX=yt(),KX=Gg().Buffer,kS=NS();function PS(t){kS.call(this,t),this.enc="pem";}GX(PS,kS);T8.exports=PS;PS.prototype.decode=function(e,r){let n=e.toString().split(/[\r\n]+/g),i=r.label.toUpperCase(),o=/^-----(BEGIN|END) ([^-]+)-----$/,a=-1,s=-1;for(let l=0;l<n.length;l++){let w=n[l].match(o);if(w!==null&&w[2]===i)if(a===-1){if(w[1]!=="BEGIN")break;a=l;}else {if(w[1]!=="END")break;s=l;break}}if(a===-1||s===-1)throw new Error("PEM section not found for: "+i);let c=n.slice(a+1,s).join("");c.replace(/[^a-z0-9+/=]+/gi,"");let u=KX.from(c,"base64");return kS.prototype.decode.call(this,u,r)};});var BS=ne(I8=>{v();m();y();g();var x8=I8;x8.der=NS();x8.pem=R8();});var O8=ne(M8=>{v();m();y();g();var WX=MS(),YX=BS(),ZX=yt(),JX=M8;JX.define=function(e,r){return new Vf(e,r)};function Vf(t,e){this.name=t,this.body=e,this.decoders={},this.encoders={};}Vf.prototype._createNamed=function(e){let r=this.name;function n(i){this._initNamed(i,r);}return ZX(n,e),n.prototype._initNamed=function(o,a){e.call(this,o,a);},new n(this)};Vf.prototype._getDecoder=function(e){return e=e||"der",this.decoders.hasOwnProperty(e)||(this.decoders[e]=this._createNamed(YX[e])),this.decoders[e]};Vf.prototype.decode=function(e,r,n){return this._getDecoder(r).decode(e,n)};Vf.prototype._getEncoder=function(e){return e=e||"der",this.encoders.hasOwnProperty(e)||(this.encoders[e]=this._createNamed(WX[e])),this.encoders[e]};Vf.prototype.encode=function(e,r,n){return this._getEncoder(r).encode(e,n)};});var k8=ne(N8=>{v();m();y();g();var Jg=N8;Jg.Reporter=Kg().Reporter;Jg.DecoderBuffer=$f().DecoderBuffer;Jg.EncoderBuffer=$f().EncoderBuffer;Jg.Node=Yg();});var U8=ne(B8=>{v();m();y();g();var P8=B8;P8._reverse=function(e){let r={};return Object.keys(e).forEach(function(n){(n|0)==n&&(n=n|0);let i=e[n];r[i]=n;}),r};P8.der=Zg();});var US=ne(D8=>{v();m();y();g();var Gf=D8;Gf.bignum=_o();Gf.define=O8().define;Gf.base=k8();Gf.constants=U8();Gf.decoders=BS();Gf.encoders=MS();});var z8=ne((aIe,F8)=>{v();m();y();g();var xo=US(),L8=xo.define("Time",function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()});}),XX=xo.define("AttributeTypeValue",function(){this.seq().obj(this.key("type").objid(),this.key("value").any());}),DS=xo.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional());}),QX=xo.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(DS),this.key("subjectPublicKey").bitstr());}),eQ=xo.define("RelativeDistinguishedName",function(){this.setof(XX);}),tQ=xo.define("RDNSequence",function(){this.seqof(eQ);}),q8=xo.define("Name",function(){this.choice({rdnSequence:this.use(tQ)});}),rQ=xo.define("Validity",function(){this.seq().obj(this.key("notBefore").use(L8),this.key("notAfter").use(L8));}),nQ=xo.define("Extension",function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr());}),iQ=xo.define("TBSCertificate",function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(DS),this.key("issuer").use(q8),this.key("validity").use(rQ),this.key("subject").use(q8),this.key("subjectPublicKeyInfo").use(QX),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(nQ).optional());}),oQ=xo.define("X509Certificate",function(){this.seq().obj(this.key("tbsCertificate").use(iQ),this.key("signatureAlgorithm").use(DS),this.key("signatureValue").bitstr());});F8.exports=oQ;});var j8=ne(Mo=>{v();m();y();g();var Io=US();Mo.certificate=z8();var aQ=Io.define("RSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int());});Mo.RSAPrivateKey=aQ;var sQ=Io.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int());});Mo.RSAPublicKey=sQ;var cQ=Io.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(H8),this.key("subjectPublicKey").bitstr());});Mo.PublicKey=cQ;var H8=Io.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional());}),uQ=Io.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(H8),this.key("subjectPrivateKey").octstr());});Mo.PrivateKey=uQ;var lQ=Io.define("EncryptedPrivateKeyInfo",function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr());});Mo.EncryptedPrivateKey=lQ;var fQ=Io.define("DSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int());});Mo.DSAPrivateKey=fQ;Mo.DSAparam=Io.define("DSAparam",function(){this.int();});var dQ=Io.define("ECPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(hQ),this.key("publicKey").optional().explicit(1).bitstr());});Mo.ECPrivateKey=dQ;var hQ=Io.define("ECParameters",function(){this.choice({namedCurve:this.objid()});});Mo.signature=Io.define("signature",function(){this.seq().obj(this.key("r").int(),this.key("s").int());});});var $8=ne((yIe,pQ)=>{pQ.exports={"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"};});var G8=ne((gIe,V8)=>{v();m();y();g();var mQ=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m,yQ=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,gQ=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,vQ=Vh(),bQ=cg(),Xg=Et().Buffer;V8.exports=function(t,e){var r=t.toString(),n=r.match(mQ),i;if(n){var a="aes"+n[1],s=Xg.from(n[2],"hex"),c=Xg.from(n[3].replace(/[\r\n]/g,""),"base64"),u=vQ(e,s.slice(0,8),parseInt(n[1],10)).key,l=[],w=bQ.createDecipheriv(a,u,s);l.push(w.update(c)),l.push(w.final()),i=Xg.concat(l);}else {var o=r.match(gQ);i=Xg.from(o[2].replace(/[\r\n]/g,""),"base64");}var T=r.match(yQ)[1];return {tag:T,data:i}};});var op=ne((_Ie,W8)=>{v();m();y();g();var ti=j8(),wQ=$8(),EQ=G8(),_Q=cg(),SQ=n_(),LS=Et().Buffer;W8.exports=K8;function K8(t){var e;typeof t=="object"&&!LS.isBuffer(t)&&(e=t.passphrase,t=t.key),typeof t=="string"&&(t=LS.from(t));var r=EQ(t,e),n=r.tag,i=r.data,o,a;switch(n){case"CERTIFICATE":a=ti.certificate.decode(i,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(a||(a=ti.PublicKey.decode(i,"der")),o=a.algorithm.algorithm.join("."),o){case"1.2.840.113549.1.1.1":return ti.RSAPublicKey.decode(a.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return a.subjectPrivateKey=a.subjectPublicKey,{type:"ec",data:a};case"1.2.840.10040.4.1":return a.algorithm.params.pub_key=ti.DSAparam.decode(a.subjectPublicKey.data,"der"),{type:"dsa",data:a.algorithm.params};default:throw new Error("unknown key id "+o)}case"ENCRYPTED PRIVATE KEY":i=ti.EncryptedPrivateKey.decode(i,"der"),i=CQ(i,e);case"PRIVATE KEY":switch(a=ti.PrivateKey.decode(i,"der"),o=a.algorithm.algorithm.join("."),o){case"1.2.840.113549.1.1.1":return ti.RSAPrivateKey.decode(a.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return {curve:a.algorithm.curve,privateKey:ti.ECPrivateKey.decode(a.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return a.algorithm.params.priv_key=ti.DSAparam.decode(a.subjectPrivateKey,"der"),{type:"dsa",params:a.algorithm.params};default:throw new Error("unknown key id "+o)}case"RSA PUBLIC KEY":return ti.RSAPublicKey.decode(i,"der");case"RSA PRIVATE KEY":return ti.RSAPrivateKey.decode(i,"der");case"DSA PRIVATE KEY":return {type:"dsa",params:ti.DSAPrivateKey.decode(i,"der")};case"EC PRIVATE KEY":return i=ti.ECPrivateKey.decode(i,"der"),{curve:i.parameters.value,privateKey:i.privateKey};default:throw new Error("unknown key type "+n)}}K8.signature=ti.signature;function CQ(t,e){var r=t.algorithm.decrypt.kde.kdeparams.salt,n=parseInt(t.algorithm.decrypt.kde.kdeparams.iters.toString(),10),i=wQ[t.algorithm.decrypt.cipher.algo.join(".")],o=t.algorithm.decrypt.cipher.iv,a=t.subjectPrivateKey,s=parseInt(i.split("-")[1],10)/8,c=SQ.pbkdf2Sync(e,r,n,s,"sha1"),u=_Q.createDecipheriv(i,c,o),l=[];return l.push(u.update(a)),l.push(u.final()),LS.concat(l)}});var qS=ne((RIe,AQ)=>{AQ.exports={"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"};});var J8=ne((xIe,ev)=>{v();m();y();g();var Mn=Et().Buffer,Iu=WE(),TQ=UO(),RQ=$g().ec,Qg=Rg(),xQ=op(),IQ=qS(),MQ=1;function OQ(t,e,r,n,i){var o=xQ(e);if(o.curve){if(n!=="ecdsa"&&n!=="ecdsa/rsa")throw new Error("wrong private key type");return NQ(t,o)}else if(o.type==="dsa"){if(n!=="dsa")throw new Error("wrong private key type");return kQ(t,o,r)}if(n!=="rsa"&&n!=="ecdsa/rsa")throw new Error("wrong private key type");if(e.padding!==void 0&&e.padding!==MQ)throw new Error("illegal or unsupported padding mode");t=Mn.concat([i,t]);for(var a=o.modulus.byteLength(),s=[0,1];t.length+s.length+1<a;)s.push(255);s.push(0);for(var c=-1;++c<t.length;)s.push(t[c]);var u=TQ(s,o);return u}function NQ(t,e){var r=IQ[e.curve.join(".")];if(!r)throw new Error("unknown curve "+e.curve.join("."));var n=new RQ(r),i=n.keyFromPrivate(e.privateKey),o=i.sign(t);return Mn.from(o.toDER())}function kQ(t,e,r){for(var n=e.params.priv_key,i=e.params.p,o=e.params.q,a=e.params.g,s=new Qg(0),c,u=FS(t,o).mod(o),l=!1,w=Y8(n,o,t,r);l===!1;)c=Z8(o,w,r),s=UQ(a,c,i,o),l=c.invm(o).imul(u.add(n.mul(s))).mod(o),l.cmpn(0)===0&&(l=!1,s=new Qg(0));return PQ(s,l)}function PQ(t,e){t=t.toArray(),e=e.toArray(),t[0]&128&&(t=[0].concat(t)),e[0]&128&&(e=[0].concat(e));var r=t.length+e.length+4,n=[48,r,2,t.length];return n=n.concat(t,[2,e.length],e),Mn.from(n)}function Y8(t,e,r,n){if(t=Mn.from(t.toArray()),t.length<e.byteLength()){var i=Mn.alloc(e.byteLength()-t.length);t=Mn.concat([i,t]);}var o=r.length,a=BQ(r,e),s=Mn.alloc(o);s.fill(1);var c=Mn.alloc(o);return c=Iu(n,c).update(s).update(Mn.from([0])).update(t).update(a).digest(),s=Iu(n,c).update(s).digest(),c=Iu(n,c).update(s).update(Mn.from([1])).update(t).update(a).digest(),s=Iu(n,c).update(s).digest(),{k:c,v:s}}function FS(t,e){var r=new Qg(t),n=(t.length<<3)-e.bitLength();return n>0&&r.ishrn(n),r}function BQ(t,e){t=FS(t,e),t=t.mod(e);var r=Mn.from(t.toArray());if(r.length<e.byteLength()){var n=Mn.alloc(e.byteLength()-r.length);r=Mn.concat([n,r]);}return r}function Z8(t,e,r){var n,i;do{for(n=Mn.alloc(0);n.length*8<t.bitLength();)e.v=Iu(r,e.k).update(e.v).digest(),n=Mn.concat([n,e.v]);i=FS(n,t),e.k=Iu(r,e.k).update(e.v).update(Mn.from([0])).digest(),e.v=Iu(r,e.k).update(e.v).digest();}while(i.cmp(t)!==-1);return i}function UQ(t,e,r,n){return t.toRed(Qg.mont(r)).redPow(e).fromRed().mod(n)}ev.exports=OQ;ev.exports.getKey=Y8;ev.exports.makeKey=Z8;});var tk=ne((kIe,ek)=>{v();m();y();g();var zS=Et().Buffer,ap=Rg(),DQ=$g().ec,Q8=op(),LQ=qS();function qQ(t,e,r,n,i){var o=Q8(r);if(o.type==="ec"){if(n!=="ecdsa"&&n!=="ecdsa/rsa")throw new Error("wrong public key type");return FQ(t,e,o)}else if(o.type==="dsa"){if(n!=="dsa")throw new Error("wrong public key type");return zQ(t,e,o)}if(n!=="rsa"&&n!=="ecdsa/rsa")throw new Error("wrong public key type");e=zS.concat([i,e]);for(var a=o.modulus.byteLength(),s=[1],c=0;e.length+s.length+2<a;)s.push(255),c+=1;s.push(0);for(var u=-1;++u<e.length;)s.push(e[u]);s=zS.from(s);var l=ap.mont(o.modulus);t=new ap(t).toRed(l),t=t.redPow(new ap(o.publicExponent)),t=zS.from(t.fromRed().toArray());var w=c<8?1:0;for(a=Math.min(t.length,s.length),t.length!==s.length&&(w=1),u=-1;++u<a;)w|=t[u]^s[u];return w===0}function FQ(t,e,r){var n=LQ[r.data.algorithm.curve.join(".")];if(!n)throw new Error("unknown curve "+r.data.algorithm.curve.join("."));var i=new DQ(n),o=r.data.subjectPrivateKey.data;return i.verify(e,t,o)}function zQ(t,e,r){var n=r.data.p,i=r.data.q,o=r.data.g,a=r.data.pub_key,s=Q8.signature.decode(t,"der"),c=s.s,u=s.r;X8(c,i),X8(u,i);var l=ap.mont(n),w=c.invm(i),T=o.toRed(l).redPow(new ap(e).mul(w).mod(i)).fromRed().mul(a.toRed(l).redPow(u.mul(w).mod(i)).fromRed()).mod(n).mod(i);return T.cmp(u)===0}function X8(t,e){if(t.cmpn(0)<=0)throw new Error("invalid sig");if(t.cmp(e)>=0)throw new Error("invalid sig")}ek.exports=qQ;});var sk=ne((LIe,ak)=>{v();m();y();g();var tv=Et().Buffer,ik=yf(),rv=OO(),ok=yt(),HQ=J8(),jQ=tk(),Mu=YE();Object.keys(Mu).forEach(function(t){Mu[t].id=tv.from(Mu[t].id,"hex"),Mu[t.toLowerCase()]=Mu[t];});function sp(t){rv.Writable.call(this);var e=Mu[t];if(!e)throw new Error("Unknown message digest");this._hashType=e.hash,this._hash=ik(e.hash),this._tag=e.id,this._signType=e.sign;}ok(sp,rv.Writable);sp.prototype._write=function(e,r,n){this._hash.update(e),n();};sp.prototype.update=function(e,r){return this._hash.update(typeof e=="string"?tv.from(e,r):e),this};sp.prototype.sign=function(e,r){this.end();var n=this._hash.digest(),i=HQ(n,e,this._hashType,this._signType,this._tag);return r?i.toString(r):i};function cp(t){rv.Writable.call(this);var e=Mu[t];if(!e)throw new Error("Unknown message digest");this._hash=ik(e.hash),this._tag=e.id,this._signType=e.sign;}ok(cp,rv.Writable);cp.prototype._write=function(e,r,n){this._hash.update(e),n();};cp.prototype.update=function(e,r){return this._hash.update(typeof e=="string"?tv.from(e,r):e),this};cp.prototype.verify=function(e,r,n){var i=typeof r=="string"?tv.from(r,n):r;this.end();var o=this._hash.digest();return jQ(i,o,e,this._signType,this._tag)};function rk(t){return new sp(t)}function nk(t){return new cp(t)}ak.exports={Sign:rk,Verify:nk,createSign:rk,createVerify:nk};});var uk=ne((jIe,ck)=>{v();m();y();g();var $Q=$g(),VQ=_o();ck.exports=function(e){return new Ou(e)};var vi={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};vi.p224=vi.secp224r1;vi.p256=vi.secp256r1=vi.prime256v1;vi.p192=vi.secp192r1=vi.prime192v1;vi.p384=vi.secp384r1;vi.p521=vi.secp521r1;function Ou(t){this.curveType=vi[t],this.curveType||(this.curveType={name:t}),this.curve=new $Q.ec(this.curveType.name),this.keys=void 0;}Ou.prototype.generateKeys=function(t,e){return this.keys=this.curve.genKeyPair(),this.getPublicKey(t,e)};Ou.prototype.computeSecret=function(t,e,r){e=e||"utf8",D.Buffer.isBuffer(t)||(t=new D.Buffer(t,e));var n=this.curve.keyFromPublic(t).getPublic(),i=n.mul(this.keys.getPrivate()).getX();return HS(i,r,this.curveType.byteLength)};Ou.prototype.getPublicKey=function(t,e){var r=this.keys.getPublic(e==="compressed",!0);return e==="hybrid"&&(r[r.length-1]%2?r[0]=7:r[0]=6),HS(r,t)};Ou.prototype.getPrivateKey=function(t){return HS(this.keys.getPrivate(),t)};Ou.prototype.setPublicKey=function(t,e){return e=e||"utf8",D.Buffer.isBuffer(t)||(t=new D.Buffer(t,e)),this.keys._importPublic(t),this};Ou.prototype.setPrivateKey=function(t,e){e=e||"utf8",D.Buffer.isBuffer(t)||(t=new D.Buffer(t,e));var r=new VQ(t);return r=r.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(r),this};function HS(t,e,r){Array.isArray(t)||(t=t.toArray());var n=new D.Buffer(t);if(r&&n.length<r){var i=new D.Buffer(r-n.length);i.fill(0),n=D.Buffer.concat([i,n]);}return e?n.toString(e):n}});var $S=ne((WIe,lk)=>{v();m();y();g();var GQ=yf(),jS=Et().Buffer;lk.exports=function(t,e){for(var r=jS.alloc(0),n=0,i;r.length<e;)i=KQ(n++),r=jS.concat([r,GQ("sha1").update(t).update(i).digest()]);return r.slice(0,e)};function KQ(t){var e=jS.allocUnsafe(4);return e.writeUInt32BE(t,0),e}});var VS=ne((QIe,fk)=>{v();m();y();g();fk.exports=function(e,r){for(var n=e.length,i=-1;++i<n;)e[i]^=r[i];return e};});var GS=ne((iMe,hk)=>{v();m();y();g();var dk=_o(),WQ=Et().Buffer;function YQ(t,e){return WQ.from(t.toRed(dk.mont(e.modulus)).redPow(new dk(e.publicExponent)).fromRed().toArray())}hk.exports=YQ;});var KS=ne((uMe,gk)=>{v();m();y();g();var rc=_o(),pk=Hs();gk.exports=mk;function ZQ(t){var e=yk(t),r=e.toRed(rc.mont(t.modulus)).redPow(new rc(t.publicExponent)).fromRed();return {blinder:r,unblinder:e.invm(t.modulus)}}function mk(t,e){var r=ZQ(e),n=e.modulus.byteLength();rc.mont(e.modulus);var o=new rc(t).mul(r.blinder).umod(e.modulus),a=o.toRed(rc.mont(e.prime1)),s=o.toRed(rc.mont(e.prime2)),c=e.coefficient,u=e.prime1,l=e.prime2,w=a.redPow(e.exponent1),T=s.redPow(e.exponent2);w=w.fromRed(),T=T.fromRed();var x=w.isub(T).imul(c).umod(u);return x.imul(l),T.iadd(x),new D.Buffer(T.imul(r.unblinder).umod(e.modulus).toArray(!1,n))}mk.getr=yk;function yk(t){for(var e=t.modulus.byteLength(),r=new rc(pk(e));r.cmp(t.modulus)>=0||!r.umod(t.prime1)||!r.umod(t.prime2);)r=new rc(pk(e));return r}});var Ek=ne((pMe,wk)=>{v();m();y();g();var JQ=op(),WS=Hs(),XQ=yf(),vk=$S(),bk=VS(),YS=_o(),QQ=GS(),eee=KS(),Oo=Et().Buffer;wk.exports=function(e,r,n){var i;e.padding?i=e.padding:n?i=1:i=4;var o=JQ(e),a;if(i===4)a=tee(o,r);else if(i===1)a=ree(o,r,n);else if(i===3){if(a=new YS(r),a.cmp(o.modulus)>=0)throw new Error("data too long for modulus")}else throw new Error("unknown padding");return n?eee(a,o):QQ(a,o)};function tee(t,e){var r=t.modulus.byteLength(),n=e.length,i=XQ("sha1").update(Oo.alloc(0)).digest(),o=i.length,a=2*o;if(n>r-a-2)throw new Error("message too long");var s=Oo.alloc(r-n-a-2),c=r-o-1,u=WS(o),l=bk(Oo.concat([i,s,Oo.alloc(1,1),e],c),vk(u,c)),w=bk(u,vk(l,o));return new YS(Oo.concat([Oo.alloc(1),w,l],r))}function ree(t,e,r){var n=e.length,i=t.modulus.byteLength();if(n>i-11)throw new Error("message too long");var o;return r?o=Oo.alloc(i-n-3,255):o=nee(i-n-3),new YS(Oo.concat([Oo.from([0,r?1:2]),o,Oo.alloc(1),e],i))}function nee(t){for(var e=Oo.allocUnsafe(t),r=0,n=WS(t*2),i=0,o;r<t;)i===n.length&&(n=WS(t*2),i=0),o=n[i++],o&&(e[r++]=o);return e}});var Tk=ne((bMe,Ak)=>{v();m();y();g();var iee=op(),_k=$S(),Sk=VS(),Ck=_o(),oee=KS(),aee=yf(),see=GS(),up=Et().Buffer;Ak.exports=function(e,r,n){var i;e.padding?i=e.padding:n?i=1:i=4;var o=iee(e),a=o.modulus.byteLength();if(r.length>a||new Ck(r).cmp(o.modulus)>=0)throw new Error("decryption error");var s;n?s=see(new Ck(r),o):s=oee(r,o);var c=up.alloc(a-s.length);if(s=up.concat([c,s],a),i===4)return cee(o,s);if(i===1)return uee(o,s,n);if(i===3)return s;throw new Error("unknown padding")};function cee(t,e){var r=t.modulus.byteLength(),n=aee("sha1").update(up.alloc(0)).digest(),i=n.length;if(e[0]!==0)throw new Error("decryption error");var o=e.slice(1,i+1),a=e.slice(i+1),s=Sk(o,_k(a,i)),c=Sk(a,_k(s,r-i-1));if(lee(n,c.slice(0,i)))throw new Error("decryption error");for(var u=i;c[u]===0;)u++;if(c[u++]!==1)throw new Error("decryption error");return c.slice(u)}function uee(t,e,r){for(var n=e.slice(0,2),i=2,o=0;e[i++]!==0;)if(i>=e.length){o++;break}var a=e.slice(2,i-1);if((n.toString("hex")!=="0002"&&!r||n.toString("hex")!=="0001"&&r)&&o++,a.length<8&&o++,o)throw new Error("decryption error");return e.slice(i)}function lee(t,e){t=up.from(t),e=up.from(e);var r=0,n=t.length;t.length!==e.length&&(r++,n=Math.min(t.length,e.length));for(var i=-1;++i<n;)r+=t[i]^e[i];return r}});var Rk=ne(Nu=>{v();m();y();g();Nu.publicEncrypt=Ek();Nu.privateDecrypt=Tk();Nu.privateEncrypt=function(e,r){return Nu.publicEncrypt(e,r,!0)};Nu.publicDecrypt=function(e,r){return Nu.privateDecrypt(e,r,!0)};});var Dk=ne(lp=>{v();m();y();g();function xk(){throw new Error(`secure random number generation not supported by this browser
use chrome, FireFox or Internet Explorer 11`)}var Mk=Et(),Ik=Hs(),Ok=Mk.Buffer,Nk=Mk.kMaxLength,ZS=globalThis.crypto||globalThis.msCrypto,kk=Math.pow(2,32)-1;function Pk(t,e){if(typeof t!="number"||t!==t)throw new TypeError("offset must be a number");if(t>kk||t<0)throw new TypeError("offset must be a uint32");if(t>Nk||t>e)throw new RangeError("offset out of range")}function Bk(t,e,r){if(typeof t!="number"||t!==t)throw new TypeError("size must be a number");if(t>kk||t<0)throw new TypeError("size must be a uint32");if(t+e>r||t>Nk)throw new RangeError("buffer too small")}ZS&&ZS.getRandomValues||!N.browser?(lp.randomFill=fee,lp.randomFillSync=dee):(lp.randomFill=xk,lp.randomFillSync=xk);function fee(t,e,r,n){if(!Ok.isBuffer(t)&&!(t instanceof globalThis.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if(typeof e=="function")n=e,e=0,r=t.length;else if(typeof r=="function")n=r,r=t.length-e;else if(typeof n!="function")throw new TypeError('"cb" argument must be a function');return Pk(e,t.length),Bk(r,e,t.length),Uk(t,e,r,n)}function Uk(t,e,r,n){if(N.browser){var i=t.buffer,o=new Uint8Array(i,e,r);if(ZS.getRandomValues(o),n){N.nextTick(function(){n(null,t);});return}return t}if(n){Ik(r,function(s,c){if(s)return n(s);c.copy(t,e),n(null,t);});return}var a=Ik(r);return a.copy(t,e),t}function dee(t,e,r){if(typeof e=="undefined"&&(e=0),!Ok.isBuffer(t)&&!(t instanceof globalThis.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return Pk(e,t.length),r===void 0&&(r=t.length-e),Bk(r,e,t.length),Uk(t,e,r)}});var mu=ne(Mt=>{v();m();y();g();Mt.randomBytes=Mt.rng=Mt.pseudoRandomBytes=Mt.prng=Hs();Mt.createHash=Mt.Hash=yf();Mt.createHmac=Mt.Hmac=WE();var hee=e3(),pee=Object.keys(hee),mee=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(pee);Mt.getHashes=function(){return mee};var Lk=n_();Mt.pbkdf2=Lk.pbkdf2;Mt.pbkdf2Sync=Lk.pbkdf2Sync;var pa=_4();Mt.Cipher=pa.Cipher;Mt.createCipher=pa.createCipher;Mt.Cipheriv=pa.Cipheriv;Mt.createCipheriv=pa.createCipheriv;Mt.Decipher=pa.Decipher;Mt.createDecipher=pa.createDecipher;Mt.Decipheriv=pa.Decipheriv;Mt.createDecipheriv=pa.createDecipheriv;Mt.getCiphers=pa.getCiphers;Mt.listCiphers=pa.listCiphers;var fp=B4();Mt.DiffieHellmanGroup=fp.DiffieHellmanGroup;Mt.createDiffieHellmanGroup=fp.createDiffieHellmanGroup;Mt.getDiffieHellman=fp.getDiffieHellman;Mt.createDiffieHellman=fp.createDiffieHellman;Mt.DiffieHellman=fp.DiffieHellman;var nv=sk();Mt.createSign=nv.createSign;Mt.Sign=nv.Sign;Mt.createVerify=nv.createVerify;Mt.Verify=nv.Verify;Mt.createECDH=uk();var iv=Rk();Mt.publicEncrypt=iv.publicEncrypt;Mt.privateEncrypt=iv.privateEncrypt;Mt.publicDecrypt=iv.publicDecrypt;Mt.privateDecrypt=iv.privateDecrypt;var qk=Dk();Mt.randomFill=qk.randomFill;Mt.randomFillSync=qk.randomFillSync;Mt.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join(`
`))};Mt.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6};});var zk=ne((qMe,Fk)=>{v();m();y();g();function JS(t){var e=(t/8|0)+(t%8===0?0:1);return e}var yee={ES256:JS(256),ES384:JS(384),ES512:JS(521)};function gee(t){var e=yee[t];if(e)return e;throw new Error('Unknown algorithm "'+t+'"')}Fk.exports=gee;});var Wk=ne(($Me,Kk)=>{v();m();y();g();var ov=Et().Buffer,jk=zk(),av=128,$k=0,vee=32,bee=16,wee=2,Vk=bee|vee|$k<<6,sv=wee|$k<<6;function Eee(t){return t.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function Gk(t){if(ov.isBuffer(t))return t;if(typeof t=="string")return ov.from(t,"base64");throw new TypeError("ECDSA signature must be a Base64 string or a Buffer")}function _ee(t,e){t=Gk(t);var r=jk(e),n=r+1,i=t.length,o=0;if(t[o++]!==Vk)throw new Error('Could not find expected "seq"');var a=t[o++];if(a===(av|1)&&(a=t[o++]),i-o<a)throw new Error('"seq" specified length of "'+a+'", only "'+(i-o)+'" remaining');if(t[o++]!==sv)throw new Error('Could not find expected "int" for "r"');var s=t[o++];if(i-o-2<s)throw new Error('"r" specified length of "'+s+'", only "'+(i-o-2)+'" available');if(n<s)throw new Error('"r" specified length of "'+s+'", max of "'+n+'" is acceptable');var c=o;if(o+=s,t[o++]!==sv)throw new Error('Could not find expected "int" for "s"');var u=t[o++];if(i-o!==u)throw new Error('"s" specified length of "'+u+'", expected "'+(i-o)+'"');if(n<u)throw new Error('"s" specified length of "'+u+'", max of "'+n+'" is acceptable');var l=o;if(o+=u,o!==i)throw new Error('Expected to consume entire buffer, but "'+(i-o)+'" bytes remain');var w=r-s,T=r-u,x=ov.allocUnsafe(w+s+T+u);for(o=0;o<w;++o)x[o]=0;t.copy(x,o,c+Math.max(-w,0),c+s),o=r;for(var I=o;o<I+T;++o)x[o]=0;return t.copy(x,o,l+Math.max(-T,0),l+u),x=x.toString("base64"),x=Eee(x),x}function Hk(t,e,r){for(var n=0;e+n<r&&t[e+n]===0;)++n;var i=t[e+n]>=av;return i&&--n,n}function See(t,e){t=Gk(t);var r=jk(e),n=t.length;if(n!==r*2)throw new TypeError('"'+e+'" signatures must be "'+r*2+'" bytes, saw "'+n+'"');var i=Hk(t,0,r),o=Hk(t,r,t.length),a=r-i,s=r-o,c=2+a+1+1+s,u=c<av,l=ov.allocUnsafe((u?2:3)+c),w=0;return l[w++]=Vk,u?l[w++]=c:(l[w++]=av|1,l[w++]=c&255),l[w++]=sv,l[w++]=a,i<0?(l[w++]=0,w+=t.copy(l,w,0,r)):w+=t.copy(l,w,i,r),l[w++]=sv,l[w++]=s,o<0?(l[w++]=0,t.copy(l,w,r)):t.copy(l,w,r+o),l}Kk.exports={derToJose:_ee,joseToDer:See};});var eC=ne((YMe,n5)=>{v();m();y();g();var Cee=FM(),Wf=Et().Buffer,ma=mu(),Zk=Wk(),Yk=(Ni(),Dr($a)),Aee=`"%s" is not a valid algorithm.
Supported algorithms are:
"HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "PS256", "PS384", "PS512", "ES256", "ES384", "ES512" and "none".`,dp="secret must be a string or buffer",Kf="key must be a string or a buffer",Tee="key must be a string, a buffer or an object",XS=typeof ma.createPublicKey=="function";XS&&(Kf+=" or a KeyObject",dp+="or a KeyObject");function Jk(t){if(!Wf.isBuffer(t)&&typeof t!="string"&&(!XS||typeof t!="object"||typeof t.type!="string"||typeof t.asymmetricKeyType!="string"||typeof t.export!="function"))throw No(Kf)}function Xk(t){if(!Wf.isBuffer(t)&&typeof t!="string"&&typeof t!="object")throw No(Tee)}function Ree(t){if(!Wf.isBuffer(t)){if(typeof t=="string")return t;if(!XS||typeof t!="object"||t.type!=="secret"||typeof t.export!="function")throw No(dp)}}function QS(t){return t.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function Qk(t){t=t.toString();var e=4-t.length%4;if(e!==4)for(var r=0;r<e;++r)t+="=";return t.replace(/\-/g,"+").replace(/_/g,"/")}function No(t){var e=[].slice.call(arguments,1),r=Yk.format.bind(Yk,t).apply(null,e);return new TypeError(r)}function xee(t){return Wf.isBuffer(t)||typeof t=="string"}function hp(t){return xee(t)||(t=JSON.stringify(t)),t}function e5(t){return function(r,n){Ree(n),r=hp(r);var i=ma.createHmac("sha"+t,n),o=(i.update(r),i.digest("base64"));return QS(o)}}function Iee(t){return function(r,n,i){var o=e5(t)(r,i);return Cee(Wf.from(n),Wf.from(o))}}function t5(t){return function(r,n){Xk(n),r=hp(r);var i=ma.createSign("RSA-SHA"+t),o=(i.update(r),i.sign(n,"base64"));return QS(o)}}function r5(t){return function(r,n,i){Jk(i),r=hp(r),n=Qk(n);var o=ma.createVerify("RSA-SHA"+t);return o.update(r),o.verify(i,n,"base64")}}function Mee(t){return function(r,n){Xk(n),r=hp(r);var i=ma.createSign("RSA-SHA"+t),o=(i.update(r),i.sign({key:n,padding:ma.constants.RSA_PKCS1_PSS_PADDING,saltLength:ma.constants.RSA_PSS_SALTLEN_DIGEST},"base64"));return QS(o)}}function Oee(t){return function(r,n,i){Jk(i),r=hp(r),n=Qk(n);var o=ma.createVerify("RSA-SHA"+t);return o.update(r),o.verify({key:i,padding:ma.constants.RSA_PKCS1_PSS_PADDING,saltLength:ma.constants.RSA_PSS_SALTLEN_DIGEST},n,"base64")}}function Nee(t){var e=t5(t);return function(){var n=e.apply(null,arguments);return n=Zk.derToJose(n,"ES"+t),n}}function kee(t){var e=r5(t);return function(n,i,o){i=Zk.joseToDer(i,"ES"+t).toString("base64");var a=e(n,i,o);return a}}function Pee(){return function(){return ""}}function Bee(){return function(e,r){return r===""}}n5.exports=function(e){var r={hs:e5,rs:t5,ps:Mee,es:Nee,none:Pee},n={hs:Iee,rs:r5,ps:Oee,es:kee,none:Bee},i=e.match(/^(RS|PS|ES|HS)(256|384|512)$|^(none)$/i);if(!i)throw No(Aee,e);var o=(i[1]||i[3]).toLowerCase(),a=i[2];return {sign:r[o](a),verify:n[o](a)}};});var tC=ne((e6e,i5)=>{v();m();y();g();var Uee=kn().Buffer;i5.exports=function(e){return typeof e=="string"?e:typeof e=="number"||Uee.isBuffer(e)?e.toString():JSON.stringify(e)};});var l5=ne((o6e,u5)=>{v();m();y();g();var Dee=Et().Buffer,o5=IE(),Lee=eC(),qee=Ah(),a5=tC(),rC=(Ni(),Dr($a));function s5(t,e){return Dee.from(t,e).toString("base64").replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function Fee(t,e,r){r=r||"utf8";var n=s5(a5(t),"binary"),i=s5(a5(e),r);return rC.format("%s.%s",n,i)}function c5(t){var e=t.header,r=t.payload,n=t.secret||t.privateKey,i=t.encoding,o=Lee(e.alg),a=Fee(e,r,i),s=o.sign(a,n);return rC.format("%s.%s",a,s)}function cv(t){var e=t.secret||t.privateKey||t.key,r=new o5(e);this.readable=!0,this.header=t.header,this.encoding=t.encoding,this.secret=this.privateKey=this.key=r,this.payload=new o5(t.payload),this.secret.once("close",function(){!this.payload.writable&&this.readable&&this.sign();}.bind(this)),this.payload.once("close",function(){!this.secret.writable&&this.readable&&this.sign();}.bind(this));}rC.inherits(cv,qee);cv.prototype.sign=function(){try{var e=c5({header:this.header,payload:this.payload.buffer,secret:this.secret.buffer,encoding:this.encoding});return this.emit("done",e),this.emit("data",e),this.emit("end"),this.readable=!1,e}catch(r){this.readable=!1,this.emit("error",r),this.emit("close");}};cv.sign=c5;u5.exports=cv;});var w5=ne((l6e,b5)=>{v();m();y();g();var d5=Et().Buffer,f5=IE(),zee=eC(),Hee=Ah(),h5=tC(),jee=(Ni(),Dr($a)),$ee=/^[a-zA-Z0-9\-_]+?\.[a-zA-Z0-9\-_]+?\.([a-zA-Z0-9\-_]+)?$/;function Vee(t){return Object.prototype.toString.call(t)==="[object Object]"}function Gee(t){if(Vee(t))return t;try{return JSON.parse(t)}catch(e){return}}function p5(t){var e=t.split(".",1)[0];return Gee(d5.from(e,"base64").toString("binary"))}function Kee(t){return t.split(".",2).join(".")}function m5(t){return t.split(".")[2]}function Wee(t,e){e=e||"utf8";var r=t.split(".")[1];return d5.from(r,"base64").toString(e)}function y5(t){return $ee.test(t)&&!!p5(t)}function g5(t,e,r){if(!e){var n=new Error("Missing algorithm parameter for jws.verify");throw n.code="MISSING_ALGORITHM",n}t=h5(t);var i=m5(t),o=Kee(t),a=zee(e);return a.verify(o,i,r)}function v5(t,e){if(e=e||{},t=h5(t),!y5(t))return null;var r=p5(t);if(!r)return null;var n=Wee(t);return (r.typ==="JWT"||e.json)&&(n=JSON.parse(n,e.encoding)),{header:r,payload:n,signature:m5(t)}}function Yf(t){t=t||{};var e=t.secret||t.publicKey||t.key,r=new f5(e);this.readable=!0,this.algorithm=t.algorithm,this.encoding=t.encoding,this.secret=this.publicKey=this.key=r,this.signature=new f5(t.signature),this.secret.once("close",function(){!this.signature.writable&&this.readable&&this.verify();}.bind(this)),this.signature.once("close",function(){!this.secret.writable&&this.readable&&this.verify();}.bind(this));}jee.inherits(Yf,Hee);Yf.prototype.verify=function(){try{var e=g5(this.signature.buffer,this.algorithm,this.key.buffer),r=v5(this.signature.buffer,this.encoding);return this.emit("done",e,r),this.emit("data",e),this.emit("end"),this.readable=!1,e}catch(n){this.readable=!1,this.emit("error",n),this.emit("close");}};Yf.decode=v5;Yf.isValid=y5;Yf.verify=g5;b5.exports=Yf;});var lv=ne(nc=>{v();m();y();g();var E5=l5(),uv=w5(),Yee=["HS256","HS384","HS512","RS256","RS384","RS512","PS256","PS384","PS512","ES256","ES384","ES512"];nc.ALGORITHMS=Yee;nc.sign=E5.sign;nc.verify=uv.verify;nc.decode=uv.decode;nc.isValid=uv.isValid;nc.createSign=function(e){return new E5(e)};nc.createVerify=function(e){return new uv(e)};});var nC=ne((w6e,_5)=>{v();m();y();g();var Zee=lv();_5.exports=function(t,e){e=e||{};var r=Zee.decode(t,e);if(!r)return null;var n=r.payload;if(typeof n=="string")try{var i=JSON.parse(n);i!==null&&typeof i=="object"&&(n=i);}catch(o){}return e.complete===!0?{header:r.header,payload:n,signature:r.signature}:n};});var pp=ne((A6e,S5)=>{v();m();y();g();var fv=function(t,e){Error.call(this,t),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name="JsonWebTokenError",this.message=t,e&&(this.inner=e);};fv.prototype=Object.create(Error.prototype);fv.prototype.constructor=fv;S5.exports=fv;});var iC=ne((M6e,A5)=>{v();m();y();g();var C5=pp(),dv=function(t,e){C5.call(this,t),this.name="NotBeforeError",this.date=e;};dv.prototype=Object.create(C5.prototype);dv.prototype.constructor=dv;A5.exports=dv;});var oC=ne((B6e,R5)=>{v();m();y();g();var T5=pp(),hv=function(t,e){T5.call(this,t),this.name="TokenExpiredError",this.expiredAt=e;};hv.prototype=Object.create(T5.prototype);hv.prototype.constructor=hv;R5.exports=hv;});var I5=ne((F6e,x5)=>{v();m();y();g();var Zf=1e3,Jf=Zf*60,Xf=Jf*60,ku=Xf*24,Jee=ku*7,Xee=ku*365.25;x5.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return Qee(t);if(r==="number"&&isFinite(t))return e.long?tte(t):ete(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function Qee(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var r=parseFloat(e[1]),n=(e[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*Xee;case"weeks":case"week":case"w":return r*Jee;case"days":case"day":case"d":return r*ku;case"hours":case"hour":case"hrs":case"hr":case"h":return r*Xf;case"minutes":case"minute":case"mins":case"min":case"m":return r*Jf;case"seconds":case"second":case"secs":case"sec":case"s":return r*Zf;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function ete(t){var e=Math.abs(t);return e>=ku?Math.round(t/ku)+"d":e>=Xf?Math.round(t/Xf)+"h":e>=Jf?Math.round(t/Jf)+"m":e>=Zf?Math.round(t/Zf)+"s":t+"ms"}function tte(t){var e=Math.abs(t);return e>=ku?pv(t,e,ku,"day"):e>=Xf?pv(t,e,Xf,"hour"):e>=Jf?pv(t,e,Jf,"minute"):e>=Zf?pv(t,e,Zf,"second"):t+" ms"}function pv(t,e,r,n){var i=e>=r*1.5;return Math.round(t/r)+" "+n+(i?"s":"")}});var aC=ne((V6e,M5)=>{v();m();y();g();var rte=I5();M5.exports=function(t,e){var r=e||Math.floor(Date.now()/1e3);if(typeof t=="string"){var n=rte(t);return typeof n=="undefined"?void 0:Math.floor(r+n/1e3)}else return typeof t=="number"?r+t:void 0};});var mp=ne((Z6e,O5)=>{v();m();y();g();var nte="2.0.0",ite=Number.MAX_SAFE_INTEGER||9007199254740991,ote=16,ate=250,ste=["major","premajor","minor","preminor","patch","prepatch","prerelease"];O5.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:ote,MAX_SAFE_BUILD_LENGTH:ate,MAX_SAFE_INTEGER:ite,RELEASE_TYPES:ste,SEMVER_SPEC_VERSION:nte,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2};});var yp=ne((t3e,N5)=>{v();m();y();g();var cte=typeof N=="object"&&N.env&&N.env.NODE_DEBUG&&/\bsemver\b/i.test(N.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};N5.exports=cte;});var Qf=ne((us,k5)=>{v();m();y();g();var{MAX_SAFE_COMPONENT_LENGTH:sC,MAX_SAFE_BUILD_LENGTH:ute,MAX_LENGTH:lte}=mp(),fte=yp();us=k5.exports={};var dte=us.re=[],hte=us.safeRe=[],Xe=us.src=[],Qe=us.t={},pte=0,cC="[a-zA-Z0-9-]",mte=[["\\s",1],["\\d",lte],[cC,ute]],yte=t=>{for(let[e,r]of mte)t=t.split(`${e}*`).join(`${e}{0,${r}}`).split(`${e}+`).join(`${e}{1,${r}}`);return t},Ct=(t,e,r)=>{let n=yte(e),i=pte++;fte(t,i,e),Qe[t]=i,Xe[i]=e,dte[i]=new RegExp(e,r?"g":void 0),hte[i]=new RegExp(n,r?"g":void 0);};Ct("NUMERICIDENTIFIER","0|[1-9]\\d*");Ct("NUMERICIDENTIFIERLOOSE","\\d+");Ct("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${cC}*`);Ct("MAINVERSION",`(${Xe[Qe.NUMERICIDENTIFIER]})\\.(${Xe[Qe.NUMERICIDENTIFIER]})\\.(${Xe[Qe.NUMERICIDENTIFIER]})`);Ct("MAINVERSIONLOOSE",`(${Xe[Qe.NUMERICIDENTIFIERLOOSE]})\\.(${Xe[Qe.NUMERICIDENTIFIERLOOSE]})\\.(${Xe[Qe.NUMERICIDENTIFIERLOOSE]})`);Ct("PRERELEASEIDENTIFIER",`(?:${Xe[Qe.NUMERICIDENTIFIER]}|${Xe[Qe.NONNUMERICIDENTIFIER]})`);Ct("PRERELEASEIDENTIFIERLOOSE",`(?:${Xe[Qe.NUMERICIDENTIFIERLOOSE]}|${Xe[Qe.NONNUMERICIDENTIFIER]})`);Ct("PRERELEASE",`(?:-(${Xe[Qe.PRERELEASEIDENTIFIER]}(?:\\.${Xe[Qe.PRERELEASEIDENTIFIER]})*))`);Ct("PRERELEASELOOSE",`(?:-?(${Xe[Qe.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${Xe[Qe.PRERELEASEIDENTIFIERLOOSE]})*))`);Ct("BUILDIDENTIFIER",`${cC}+`);Ct("BUILD",`(?:\\+(${Xe[Qe.BUILDIDENTIFIER]}(?:\\.${Xe[Qe.BUILDIDENTIFIER]})*))`);Ct("FULLPLAIN",`v?${Xe[Qe.MAINVERSION]}${Xe[Qe.PRERELEASE]}?${Xe[Qe.BUILD]}?`);Ct("FULL",`^${Xe[Qe.FULLPLAIN]}$`);Ct("LOOSEPLAIN",`[v=\\s]*${Xe[Qe.MAINVERSIONLOOSE]}${Xe[Qe.PRERELEASELOOSE]}?${Xe[Qe.BUILD]}?`);Ct("LOOSE",`^${Xe[Qe.LOOSEPLAIN]}$`);Ct("GTLT","((?:<|>)?=?)");Ct("XRANGEIDENTIFIERLOOSE",`${Xe[Qe.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);Ct("XRANGEIDENTIFIER",`${Xe[Qe.NUMERICIDENTIFIER]}|x|X|\\*`);Ct("XRANGEPLAIN",`[v=\\s]*(${Xe[Qe.XRANGEIDENTIFIER]})(?:\\.(${Xe[Qe.XRANGEIDENTIFIER]})(?:\\.(${Xe[Qe.XRANGEIDENTIFIER]})(?:${Xe[Qe.PRERELEASE]})?${Xe[Qe.BUILD]}?)?)?`);Ct("XRANGEPLAINLOOSE",`[v=\\s]*(${Xe[Qe.XRANGEIDENTIFIERLOOSE]})(?:\\.(${Xe[Qe.XRANGEIDENTIFIERLOOSE]})(?:\\.(${Xe[Qe.XRANGEIDENTIFIERLOOSE]})(?:${Xe[Qe.PRERELEASELOOSE]})?${Xe[Qe.BUILD]}?)?)?`);Ct("XRANGE",`^${Xe[Qe.GTLT]}\\s*${Xe[Qe.XRANGEPLAIN]}$`);Ct("XRANGELOOSE",`^${Xe[Qe.GTLT]}\\s*${Xe[Qe.XRANGEPLAINLOOSE]}$`);Ct("COERCEPLAIN",`(^|[^\\d])(\\d{1,${sC}})(?:\\.(\\d{1,${sC}}))?(?:\\.(\\d{1,${sC}}))?`);Ct("COERCE",`${Xe[Qe.COERCEPLAIN]}(?:$|[^\\d])`);Ct("COERCEFULL",Xe[Qe.COERCEPLAIN]+`(?:${Xe[Qe.PRERELEASE]})?(?:${Xe[Qe.BUILD]})?(?:$|[^\\d])`);Ct("COERCERTL",Xe[Qe.COERCE],!0);Ct("COERCERTLFULL",Xe[Qe.COERCEFULL],!0);Ct("LONETILDE","(?:~>?)");Ct("TILDETRIM",`(\\s*)${Xe[Qe.LONETILDE]}\\s+`,!0);us.tildeTrimReplace="$1~";Ct("TILDE",`^${Xe[Qe.LONETILDE]}${Xe[Qe.XRANGEPLAIN]}$`);Ct("TILDELOOSE",`^${Xe[Qe.LONETILDE]}${Xe[Qe.XRANGEPLAINLOOSE]}$`);Ct("LONECARET","(?:\\^)");Ct("CARETTRIM",`(\\s*)${Xe[Qe.LONECARET]}\\s+`,!0);us.caretTrimReplace="$1^";Ct("CARET",`^${Xe[Qe.LONECARET]}${Xe[Qe.XRANGEPLAIN]}$`);Ct("CARETLOOSE",`^${Xe[Qe.LONECARET]}${Xe[Qe.XRANGEPLAINLOOSE]}$`);Ct("COMPARATORLOOSE",`^${Xe[Qe.GTLT]}\\s*(${Xe[Qe.LOOSEPLAIN]})$|^$`);Ct("COMPARATOR",`^${Xe[Qe.GTLT]}\\s*(${Xe[Qe.FULLPLAIN]})$|^$`);Ct("COMPARATORTRIM",`(\\s*)${Xe[Qe.GTLT]}\\s*(${Xe[Qe.LOOSEPLAIN]}|${Xe[Qe.XRANGEPLAIN]})`,!0);us.comparatorTrimReplace="$1$2$3";Ct("HYPHENRANGE",`^\\s*(${Xe[Qe.XRANGEPLAIN]})\\s+-\\s+(${Xe[Qe.XRANGEPLAIN]})\\s*$`);Ct("HYPHENRANGELOOSE",`^\\s*(${Xe[Qe.XRANGEPLAINLOOSE]})\\s+-\\s+(${Xe[Qe.XRANGEPLAINLOOSE]})\\s*$`);Ct("STAR","(<|>)?=?\\s*\\*");Ct("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");Ct("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$");});var mv=ne((l3e,P5)=>{v();m();y();g();var gte=Object.freeze({loose:!0}),vte=Object.freeze({}),bte=t=>t?typeof t!="object"?gte:t:vte;P5.exports=bte;});var uC=ne((m3e,D5)=>{v();m();y();g();var B5=/^[0-9]+$/,U5=(t,e)=>{let r=B5.test(t),n=B5.test(e);return r&&n&&(t=+t,e=+e),t===e?0:r&&!n?-1:n&&!r?1:t<e?-1:1},wte=(t,e)=>U5(e,t);D5.exports={compareIdentifiers:U5,rcompareIdentifiers:wte};});var On=ne((w3e,z5)=>{v();m();y();g();var yv=yp(),{MAX_LENGTH:L5,MAX_SAFE_INTEGER:gv}=mp(),{safeRe:q5,t:F5}=Qf(),Ete=mv(),{compareIdentifiers:ed}=uC(),lC=class t{constructor(e,r){if(r=Ete(r),e instanceof t){if(e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease)return e;e=e.version;}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>L5)throw new TypeError(`version is longer than ${L5} characters`);yv("SemVer",e,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;let n=e.trim().match(r.loose?q5[F5.LOOSE]:q5[F5.FULL]);if(!n)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>gv||this.major<0)throw new TypeError("Invalid major version");if(this.minor>gv||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>gv||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map(i=>{if(/^[0-9]+$/.test(i)){let o=+i;if(o>=0&&o<gv)return o}return i}):this.prerelease=[],this.build=n[5]?n[5].split("."):[],this.format();}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(yv("SemVer.compare",this.version,this.options,e),!(e instanceof t)){if(typeof e=="string"&&e===this.version)return 0;e=new t(e,this.options);}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof t||(e=new t(e,this.options)),ed(this.major,e.major)||ed(this.minor,e.minor)||ed(this.patch,e.patch)}comparePre(e){if(e instanceof t||(e=new t(e,this.options)),this.prerelease.length&&!e.prerelease.length)return -1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let r=0;do{let n=this.prerelease[r],i=e.prerelease[r];if(yv("prerelease compare",r,n,i),n===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(n===void 0)return -1;if(n===i)continue;return ed(n,i)}while(++r)}compareBuild(e){e instanceof t||(e=new t(e,this.options));let r=0;do{let n=this.build[r],i=e.build[r];if(yv("build compare",r,n,i),n===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(n===void 0)return -1;if(n===i)continue;return ed(n,i)}while(++r)}inc(e,r,n){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",r,n);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",r,n);break;case"prepatch":this.prerelease.length=0,this.inc("patch",r,n),this.inc("pre",r,n);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",r,n),this.inc("pre",r,n);break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let i=Number(n)?1:0;if(!r&&n===!1)throw new Error("invalid increment argument: identifier is empty");if(this.prerelease.length===0)this.prerelease=[i];else {let o=this.prerelease.length;for(;--o>=0;)typeof this.prerelease[o]=="number"&&(this.prerelease[o]++,o=-2);if(o===-1){if(r===this.prerelease.join(".")&&n===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(i);}}if(r){let o=[r,i];n===!1&&(o=[r]),ed(this.prerelease[0],r)===0?isNaN(this.prerelease[1])&&(this.prerelease=o):this.prerelease=o;}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};z5.exports=lC;});var Pu=ne((A3e,j5)=>{v();m();y();g();var H5=On(),_te=(t,e,r=!1)=>{if(t instanceof H5)return t;try{return new H5(t,e)}catch(n){if(!r)return null;throw n}};j5.exports=_te;});var V5=ne((M3e,$5)=>{v();m();y();g();var Ste=Pu(),Cte=(t,e)=>{let r=Ste(t,e);return r?r.version:null};$5.exports=Cte;});var K5=ne((B3e,G5)=>{v();m();y();g();var Ate=Pu(),Tte=(t,e)=>{let r=Ate(t.trim().replace(/^[=v]+/,""),e);return r?r.version:null};G5.exports=Tte;});var Z5=ne((F3e,Y5)=>{v();m();y();g();var W5=On(),Rte=(t,e,r,n,i)=>{typeof r=="string"&&(i=n,n=r,r=void 0);try{return new W5(t instanceof W5?t.version:t,r).inc(e,n,i).version}catch(o){return null}};Y5.exports=Rte;});var Q5=ne((V3e,X5)=>{v();m();y();g();var J5=Pu(),xte=(t,e)=>{let r=J5(t,null,!0),n=J5(e,null,!0),i=r.compare(n);if(i===0)return null;let o=i>0,a=o?r:n,s=o?n:r,c=!!a.prerelease.length;if(!!s.prerelease.length&&!c)return !s.patch&&!s.minor?"major":a.patch?"patch":a.minor?"minor":"major";let l=c?"pre":"";return r.major!==n.major?l+"major":r.minor!==n.minor?l+"minor":r.patch!==n.patch?l+"patch":"prerelease"};X5.exports=xte;});var tP=ne((Z3e,eP)=>{v();m();y();g();var Ite=On(),Mte=(t,e)=>new Ite(t,e).major;eP.exports=Mte;});var nP=ne((t4e,rP)=>{v();m();y();g();var Ote=On(),Nte=(t,e)=>new Ote(t,e).minor;rP.exports=Nte;});var oP=ne((a4e,iP)=>{v();m();y();g();var kte=On(),Pte=(t,e)=>new kte(t,e).patch;iP.exports=Pte;});var sP=ne((f4e,aP)=>{v();m();y();g();var Bte=Pu(),Ute=(t,e)=>{let r=Bte(t,e);return r&&r.prerelease.length?r.prerelease:null};aP.exports=Ute;});var Zi=ne((y4e,uP)=>{v();m();y();g();var cP=On(),Dte=(t,e,r)=>new cP(t,r).compare(new cP(e,r));uP.exports=Dte;});var fP=ne((E4e,lP)=>{v();m();y();g();var Lte=Zi(),qte=(t,e,r)=>Lte(e,t,r);lP.exports=qte;});var hP=ne((T4e,dP)=>{v();m();y();g();var Fte=Zi(),zte=(t,e)=>Fte(t,e,!0);dP.exports=zte;});var vv=ne((O4e,mP)=>{v();m();y();g();var pP=On(),Hte=(t,e,r)=>{let n=new pP(t,r),i=new pP(e,r);return n.compare(i)||n.compareBuild(i)};mP.exports=Hte;});var gP=ne((U4e,yP)=>{v();m();y();g();var jte=vv(),$te=(t,e)=>t.sort((r,n)=>jte(r,n,e));yP.exports=$te;});var bP=ne((z4e,vP)=>{v();m();y();g();var Vte=vv(),Gte=(t,e)=>t.sort((r,n)=>Vte(n,r,e));vP.exports=Gte;});var gp=ne((G4e,wP)=>{v();m();y();g();var Kte=Zi(),Wte=(t,e,r)=>Kte(t,e,r)>0;wP.exports=Wte;});var bv=ne((J4e,EP)=>{v();m();y();g();var Yte=Zi(),Zte=(t,e,r)=>Yte(t,e,r)<0;EP.exports=Zte;});var fC=ne((rOe,_P)=>{v();m();y();g();var Jte=Zi(),Xte=(t,e,r)=>Jte(t,e,r)===0;_P.exports=Xte;});var dC=ne((sOe,SP)=>{v();m();y();g();var Qte=Zi(),ere=(t,e,r)=>Qte(t,e,r)!==0;SP.exports=ere;});var wv=ne((dOe,CP)=>{v();m();y();g();var tre=Zi(),rre=(t,e,r)=>tre(t,e,r)>=0;CP.exports=rre;});var Ev=ne((gOe,AP)=>{v();m();y();g();var nre=Zi(),ire=(t,e,r)=>nre(t,e,r)<=0;AP.exports=ire;});var hC=ne((_Oe,TP)=>{v();m();y();g();var ore=fC(),are=dC(),sre=gp(),cre=wv(),ure=bv(),lre=Ev(),fre=(t,e,r,n)=>{switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t===r;case"!==":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t!==r;case"":case"=":case"==":return ore(t,r,n);case"!=":return are(t,r,n);case">":return sre(t,r,n);case">=":return cre(t,r,n);case"<":return ure(t,r,n);case"<=":return lre(t,r,n);default:throw new TypeError(`Invalid operator: ${e}`)}};TP.exports=fre;});var xP=ne((ROe,RP)=>{v();m();y();g();var dre=On(),hre=Pu(),{safeRe:_v,t:Sv}=Qf(),pre=(t,e)=>{if(t instanceof dre)return t;if(typeof t=="number"&&(t=String(t)),typeof t!="string")return null;e=e||{};let r=null;if(!e.rtl)r=t.match(e.includePrerelease?_v[Sv.COERCEFULL]:_v[Sv.COERCE]);else {let c=e.includePrerelease?_v[Sv.COERCERTLFULL]:_v[Sv.COERCERTL],u;for(;(u=c.exec(t))&&(!r||r.index+r[0].length!==t.length);)(!r||u.index+u[0].length!==r.index+r[0].length)&&(r=u),c.lastIndex=u.index+u[1].length+u[2].length;c.lastIndex=-1;}if(r===null)return null;let n=r[2],i=r[3]||"0",o=r[4]||"0",a=e.includePrerelease&&r[5]?`-${r[5]}`:"",s=e.includePrerelease&&r[6]?`+${r[6]}`:"";return hre(`${n}.${i}.${o}${a}${s}`,e)};RP.exports=pre;});var MP=ne((NOe,IP)=>{v();m();y();g();var pC=class{constructor(){this.max=1e3,this.map=new Map;}get(e){let r=this.map.get(e);if(r!==void 0)return this.map.delete(e),this.map.set(e,r),r}delete(e){return this.map.delete(e)}set(e,r){if(!this.delete(e)&&r!==void 0){if(this.map.size>=this.max){let i=this.map.keys().next().value;this.delete(i);}this.map.set(e,r);}return this}};IP.exports=pC;});var Ji=ne((DOe,PP)=>{v();m();y();g();var mre=/\s+/g,mC=class t{constructor(e,r){if(r=gre(r),e instanceof t)return e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease?e:new t(e.raw,r);if(e instanceof yC)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=e.trim().replace(mre," "),this.set=this.raw.split("||").map(n=>this.parseRange(n.trim())).filter(n=>n.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let n=this.set[0];if(this.set=this.set.filter(i=>!NP(i[0])),this.set.length===0)this.set=[n];else if(this.set.length>1){for(let i of this.set)if(i.length===1&&Cre(i[0])){this.set=[i];break}}}this.formatted=void 0;}get range(){if(this.formatted===void 0){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");let r=this.set[e];for(let n=0;n<r.length;n++)n>0&&(this.formatted+=" "),this.formatted+=r[n].toString().trim();}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){let n=((this.options.includePrerelease&&_re)|(this.options.loose&&Sre))+":"+e,i=OP.get(n);if(i)return i;let o=this.options.loose,a=o?ri[Bn.HYPHENRANGELOOSE]:ri[Bn.HYPHENRANGE];e=e.replace(a,Pre(this.options.includePrerelease)),mr("hyphen replace",e),e=e.replace(ri[Bn.COMPARATORTRIM],bre),mr("comparator trim",e),e=e.replace(ri[Bn.TILDETRIM],wre),mr("tilde trim",e),e=e.replace(ri[Bn.CARETTRIM],Ere),mr("caret trim",e);let s=e.split(" ").map(w=>Are(w,this.options)).join(" ").split(/\s+/).map(w=>kre(w,this.options));o&&(s=s.filter(w=>(mr("loose invalid filter",w,this.options),!!w.match(ri[Bn.COMPARATORLOOSE])))),mr("range list",s);let c=new Map,u=s.map(w=>new yC(w,this.options));for(let w of u){if(NP(w))return [w];c.set(w.value,w);}c.size>1&&c.has("")&&c.delete("");let l=[...c.values()];return OP.set(n,l),l}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some(n=>kP(n,r)&&e.set.some(i=>kP(i,r)&&n.every(o=>i.every(a=>o.intersects(a,r)))))}test(e){if(!e)return !1;if(typeof e=="string")try{e=new vre(e,this.options);}catch(r){return !1}for(let r=0;r<this.set.length;r++)if(Bre(this.set[r],e,this.options))return !0;return !1}};PP.exports=mC;var yre=MP(),OP=new yre,gre=mv(),yC=vp(),mr=yp(),vre=On(),{safeRe:ri,t:Bn,comparatorTrimReplace:bre,tildeTrimReplace:wre,caretTrimReplace:Ere}=Qf(),{FLAG_INCLUDE_PRERELEASE:_re,FLAG_LOOSE:Sre}=mp(),NP=t=>t.value==="<0.0.0-0",Cre=t=>t.value==="",kP=(t,e)=>{let r=!0,n=t.slice(),i=n.pop();for(;r&&n.length;)r=n.every(o=>i.intersects(o,e)),i=n.pop();return r},Are=(t,e)=>(mr("comp",t,e),t=xre(t,e),mr("caret",t),t=Tre(t,e),mr("tildes",t),t=Mre(t,e),mr("xrange",t),t=Nre(t,e),mr("stars",t),t),Un=t=>!t||t.toLowerCase()==="x"||t==="*",Tre=(t,e)=>t.trim().split(/\s+/).map(r=>Rre(r,e)).join(" "),Rre=(t,e)=>{let r=e.loose?ri[Bn.TILDELOOSE]:ri[Bn.TILDE];return t.replace(r,(n,i,o,a,s)=>{mr("tilde",t,n,i,o,a,s);let c;return Un(i)?c="":Un(o)?c=`>=${i}.0.0 <${+i+1}.0.0-0`:Un(a)?c=`>=${i}.${o}.0 <${i}.${+o+1}.0-0`:s?(mr("replaceTilde pr",s),c=`>=${i}.${o}.${a}-${s} <${i}.${+o+1}.0-0`):c=`>=${i}.${o}.${a} <${i}.${+o+1}.0-0`,mr("tilde return",c),c})},xre=(t,e)=>t.trim().split(/\s+/).map(r=>Ire(r,e)).join(" "),Ire=(t,e)=>{mr("caret",t,e);let r=e.loose?ri[Bn.CARETLOOSE]:ri[Bn.CARET],n=e.includePrerelease?"-0":"";return t.replace(r,(i,o,a,s,c)=>{mr("caret",t,i,o,a,s,c);let u;return Un(o)?u="":Un(a)?u=`>=${o}.0.0${n} <${+o+1}.0.0-0`:Un(s)?o==="0"?u=`>=${o}.${a}.0${n} <${o}.${+a+1}.0-0`:u=`>=${o}.${a}.0${n} <${+o+1}.0.0-0`:c?(mr("replaceCaret pr",c),o==="0"?a==="0"?u=`>=${o}.${a}.${s}-${c} <${o}.${a}.${+s+1}-0`:u=`>=${o}.${a}.${s}-${c} <${o}.${+a+1}.0-0`:u=`>=${o}.${a}.${s}-${c} <${+o+1}.0.0-0`):(mr("no pr"),o==="0"?a==="0"?u=`>=${o}.${a}.${s}${n} <${o}.${a}.${+s+1}-0`:u=`>=${o}.${a}.${s}${n} <${o}.${+a+1}.0-0`:u=`>=${o}.${a}.${s} <${+o+1}.0.0-0`),mr("caret return",u),u})},Mre=(t,e)=>(mr("replaceXRanges",t,e),t.split(/\s+/).map(r=>Ore(r,e)).join(" ")),Ore=(t,e)=>{t=t.trim();let r=e.loose?ri[Bn.XRANGELOOSE]:ri[Bn.XRANGE];return t.replace(r,(n,i,o,a,s,c)=>{mr("xRange",t,n,i,o,a,s,c);let u=Un(o),l=u||Un(a),w=l||Un(s),T=w;return i==="="&&T&&(i=""),c=e.includePrerelease?"-0":"",u?i===">"||i==="<"?n="<0.0.0-0":n="*":i&&T?(l&&(a=0),s=0,i===">"?(i=">=",l?(o=+o+1,a=0,s=0):(a=+a+1,s=0)):i==="<="&&(i="<",l?o=+o+1:a=+a+1),i==="<"&&(c="-0"),n=`${i+o}.${a}.${s}${c}`):l?n=`>=${o}.0.0${c} <${+o+1}.0.0-0`:w&&(n=`>=${o}.${a}.0${c} <${o}.${+a+1}.0-0`),mr("xRange return",n),n})},Nre=(t,e)=>(mr("replaceStars",t,e),t.trim().replace(ri[Bn.STAR],"")),kre=(t,e)=>(mr("replaceGTE0",t,e),t.trim().replace(ri[e.includePrerelease?Bn.GTE0PRE:Bn.GTE0],"")),Pre=t=>(e,r,n,i,o,a,s,c,u,l,w,T)=>(Un(n)?r="":Un(i)?r=`>=${n}.0.0${t?"-0":""}`:Un(o)?r=`>=${n}.${i}.0${t?"-0":""}`:a?r=`>=${r}`:r=`>=${r}${t?"-0":""}`,Un(u)?c="":Un(l)?c=`<${+u+1}.0.0-0`:Un(w)?c=`<${u}.${+l+1}.0-0`:T?c=`<=${u}.${l}.${w}-${T}`:t?c=`<${u}.${l}.${+w+1}-0`:c=`<=${c}`,`${r} ${c}`.trim()),Bre=(t,e,r)=>{for(let n=0;n<t.length;n++)if(!t[n].test(e))return !1;if(e.prerelease.length&&!r.includePrerelease){for(let n=0;n<t.length;n++)if(mr(t[n].semver),t[n].semver!==yC.ANY&&t[n].semver.prerelease.length>0){let i=t[n].semver;if(i.major===e.major&&i.minor===e.minor&&i.patch===e.patch)return !0}return !1}return !0};});var vp=ne((HOe,FP)=>{v();m();y();g();var bp=Symbol("SemVer ANY"),bC=class t{static get ANY(){return bp}constructor(e,r){if(r=BP(r),e instanceof t){if(e.loose===!!r.loose)return e;e=e.value;}e=e.trim().split(/\s+/).join(" "),vC("comparator",e,r),this.options=r,this.loose=!!r.loose,this.parse(e),this.semver===bp?this.value="":this.value=this.operator+this.semver.version,vC("comp",this);}parse(e){let r=this.options.loose?UP[DP.COMPARATORLOOSE]:UP[DP.COMPARATOR],n=e.match(r);if(!n)throw new TypeError(`Invalid comparator: ${e}`);this.operator=n[1]!==void 0?n[1]:"",this.operator==="="&&(this.operator=""),n[2]?this.semver=new LP(n[2],this.options.loose):this.semver=bp;}toString(){return this.value}test(e){if(vC("Comparator.test",e,this.options.loose),this.semver===bp||e===bp)return !0;if(typeof e=="string")try{e=new LP(e,this.options);}catch(r){return !1}return gC(e,this.operator,this.semver,this.options)}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new qP(e.value,r).test(this.value):e.operator===""?e.value===""?!0:new qP(this.value,r).test(e.semver):(r=BP(r),r.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")||!r.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||gC(this.semver,"<",e.semver,r)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||gC(this.semver,">",e.semver,r)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};FP.exports=bC;var BP=mv(),{safeRe:UP,t:DP}=Qf(),gC=hC(),vC=yp(),LP=On(),qP=Ji();});var wp=ne((KOe,zP)=>{v();m();y();g();var Ure=Ji(),Dre=(t,e,r)=>{try{e=new Ure(e,r);}catch(n){return !1}return e.test(t)};zP.exports=Dre;});var jP=ne((XOe,HP)=>{v();m();y();g();var Lre=Ji(),qre=(t,e)=>new Lre(t,e).set.map(r=>r.map(n=>n.value).join(" ").trim().split(" "));HP.exports=qre;});var VP=ne((nNe,$P)=>{v();m();y();g();var Fre=On(),zre=Ji(),Hre=(t,e,r)=>{let n=null,i=null,o=null;try{o=new zre(e,r);}catch(a){return null}return t.forEach(a=>{o.test(a)&&(!n||i.compare(a)===-1)&&(n=a,i=new Fre(n,r));}),n};$P.exports=Hre;});var KP=ne((cNe,GP)=>{v();m();y();g();var jre=On(),$re=Ji(),Vre=(t,e,r)=>{let n=null,i=null,o=null;try{o=new $re(e,r);}catch(a){return null}return t.forEach(a=>{o.test(a)&&(!n||i.compare(a)===1)&&(n=a,i=new jre(n,r));}),n};GP.exports=Vre;});var ZP=ne((hNe,YP)=>{v();m();y();g();var wC=On(),Gre=Ji(),WP=gp(),Kre=(t,e)=>{t=new Gre(t,e);let r=new wC("0.0.0");if(t.test(r)||(r=new wC("0.0.0-0"),t.test(r)))return r;r=null;for(let n=0;n<t.set.length;++n){let i=t.set[n],o=null;i.forEach(a=>{let s=new wC(a.semver.version);switch(a.operator){case">":s.prerelease.length===0?s.patch++:s.prerelease.push(0),s.raw=s.format();case"":case">=":(!o||WP(s,o))&&(o=s);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${a.operator}`)}}),o&&(!r||WP(r,o))&&(r=o);}return r&&t.test(r)?r:null};YP.exports=Kre;});var XP=ne((vNe,JP)=>{v();m();y();g();var Wre=Ji(),Yre=(t,e)=>{try{return new Wre(t,e).range||"*"}catch(r){return null}};JP.exports=Yre;});var Cv=ne((SNe,r9)=>{v();m();y();g();var Zre=On(),t9=vp(),{ANY:Jre}=t9,Xre=Ji(),Qre=wp(),QP=gp(),e9=bv(),ene=Ev(),tne=wv(),rne=(t,e,r,n)=>{t=new Zre(t,n),e=new Xre(e,n);let i,o,a,s,c;switch(r){case">":i=QP,o=ene,a=e9,s=">",c=">=";break;case"<":i=e9,o=tne,a=QP,s="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(Qre(t,e,n))return !1;for(let u=0;u<e.set.length;++u){let l=e.set[u],w=null,T=null;if(l.forEach(x=>{x.semver===Jre&&(x=new t9(">=0.0.0")),w=w||x,T=T||x,i(x.semver,w.semver,n)?w=x:a(x.semver,T.semver,n)&&(T=x);}),w.operator===s||w.operator===c||(!T.operator||T.operator===s)&&o(t,T.semver))return !1;if(T.operator===c&&a(t,T.semver))return !1}return !0};r9.exports=rne;});var i9=ne((xNe,n9)=>{v();m();y();g();var nne=Cv(),ine=(t,e,r)=>nne(t,e,">",r);n9.exports=ine;});var a9=ne((kNe,o9)=>{v();m();y();g();var one=Cv(),ane=(t,e,r)=>one(t,e,"<",r);o9.exports=ane;});var u9=ne((LNe,c9)=>{v();m();y();g();var s9=Ji(),sne=(t,e,r)=>(t=new s9(t,r),e=new s9(e,r),t.intersects(e,r));c9.exports=sne;});var f9=ne((jNe,l9)=>{v();m();y();g();var cne=wp(),une=Zi();l9.exports=(t,e,r)=>{let n=[],i=null,o=null,a=t.sort((l,w)=>une(l,w,r));for(let l of a)cne(l,e,r)?(o=l,i||(i=l)):(o&&n.push([i,o]),o=null,i=null);i&&n.push([i,null]);let s=[];for(let[l,w]of n)l===w?s.push(l):!w&&l===a[0]?s.push("*"):w?l===a[0]?s.push(`<=${w}`):s.push(`${l} - ${w}`):s.push(`>=${l}`);let c=s.join(" || "),u=typeof e.raw=="string"?e.raw:String(e);return c.length<u.length?c:e};});var g9=ne((WNe,y9)=>{v();m();y();g();var d9=Ji(),_C=vp(),{ANY:EC}=_C,Ep=wp(),SC=Zi(),lne=(t,e,r={})=>{if(t===e)return !0;t=new d9(t,r),e=new d9(e,r);let n=!1;e:for(let i of t.set){for(let o of e.set){let a=dne(i,o,r);if(n=n||a!==null,a)continue e}if(n)return !1}return !0},fne=[new _C(">=0.0.0-0")],h9=[new _C(">=0.0.0")],dne=(t,e,r)=>{if(t===e)return !0;if(t.length===1&&t[0].semver===EC){if(e.length===1&&e[0].semver===EC)return !0;r.includePrerelease?t=fne:t=h9;}if(e.length===1&&e[0].semver===EC){if(r.includePrerelease)return !0;e=h9;}let n=new Set,i,o;for(let x of t)x.operator===">"||x.operator===">="?i=p9(i,x,r):x.operator==="<"||x.operator==="<="?o=m9(o,x,r):n.add(x.semver);if(n.size>1)return null;let a;if(i&&o){if(a=SC(i.semver,o.semver,r),a>0)return null;if(a===0&&(i.operator!==">="||o.operator!=="<="))return null}for(let x of n){if(i&&!Ep(x,String(i),r)||o&&!Ep(x,String(o),r))return null;for(let I of e)if(!Ep(x,String(I),r))return !1;return !0}let s,c,u,l,w=o&&!r.includePrerelease&&o.semver.prerelease.length?o.semver:!1,T=i&&!r.includePrerelease&&i.semver.prerelease.length?i.semver:!1;w&&w.prerelease.length===1&&o.operator==="<"&&w.prerelease[0]===0&&(w=!1);for(let x of e){if(l=l||x.operator===">"||x.operator===">=",u=u||x.operator==="<"||x.operator==="<=",i){if(T&&x.semver.prerelease&&x.semver.prerelease.length&&x.semver.major===T.major&&x.semver.minor===T.minor&&x.semver.patch===T.patch&&(T=!1),x.operator===">"||x.operator===">="){if(s=p9(i,x,r),s===x&&s!==i)return !1}else if(i.operator===">="&&!Ep(i.semver,String(x),r))return !1}if(o){if(w&&x.semver.prerelease&&x.semver.prerelease.length&&x.semver.major===w.major&&x.semver.minor===w.minor&&x.semver.patch===w.patch&&(w=!1),x.operator==="<"||x.operator==="<="){if(c=m9(o,x,r),c===x&&c!==o)return !1}else if(o.operator==="<="&&!Ep(o.semver,String(x),r))return !1}if(!x.operator&&(o||i)&&a!==0)return !1}return !(i&&u&&!o&&a!==0||o&&l&&!i&&a!==0||T||w)},p9=(t,e,r)=>{if(!t)return e;let n=SC(t.semver,e.semver,r);return n>0?t:n<0||e.operator===">"&&t.operator===">="?e:t},m9=(t,e,r)=>{if(!t)return e;let n=SC(t.semver,e.semver,r);return n<0?t:n>0||e.operator==="<"&&t.operator==="<="?e:t};y9.exports=lne;});var Av=ne((QNe,w9)=>{v();m();y();g();var CC=Qf(),v9=mp(),hne=On(),b9=uC(),pne=Pu(),mne=V5(),yne=K5(),gne=Z5(),vne=Q5(),bne=tP(),wne=nP(),Ene=oP(),_ne=sP(),Sne=Zi(),Cne=fP(),Ane=hP(),Tne=vv(),Rne=gP(),xne=bP(),Ine=gp(),Mne=bv(),One=fC(),Nne=dC(),kne=wv(),Pne=Ev(),Bne=hC(),Une=xP(),Dne=vp(),Lne=Ji(),qne=wp(),Fne=jP(),zne=VP(),Hne=KP(),jne=ZP(),$ne=XP(),Vne=Cv(),Gne=i9(),Kne=a9(),Wne=u9(),Yne=f9(),Zne=g9();w9.exports={parse:pne,valid:mne,clean:yne,inc:gne,diff:vne,major:bne,minor:wne,patch:Ene,prerelease:_ne,compare:Sne,rcompare:Cne,compareLoose:Ane,compareBuild:Tne,sort:Rne,rsort:xne,gt:Ine,lt:Mne,eq:One,neq:Nne,gte:kne,lte:Pne,cmp:Bne,coerce:Une,Comparator:Dne,Range:Lne,satisfies:qne,toComparators:Fne,maxSatisfying:zne,minSatisfying:Hne,minVersion:jne,validRange:$ne,outside:Vne,gtr:Gne,ltr:Kne,intersects:Wne,simplifyRange:Yne,subset:Zne,SemVer:hne,re:CC.re,src:CC.src,tokens:CC.t,SEMVER_SPEC_VERSION:v9.SEMVER_SPEC_VERSION,RELEASE_TYPES:v9.RELEASE_TYPES,compareIdentifiers:b9.compareIdentifiers,rcompareIdentifiers:b9.rcompareIdentifiers};});var _9=ne((i8e,E9)=>{v();m();y();g();var Jne=Av();E9.exports=Jne.satisfies(N.version,">=15.7.0");});var C9=ne((u8e,S9)=>{v();m();y();g();var Xne=Av();S9.exports=Xne.satisfies(N.version,">=16.9.0");});var AC=ne((p8e,A9)=>{v();m();y();g();var Qne=_9(),eie=C9(),tie={ec:["ES256","ES384","ES512"],rsa:["RS256","PS256","RS384","PS384","RS512","PS512"],"rsa-pss":["PS256","PS384","PS512"]},rie={ES256:"prime256v1",ES384:"secp384r1",ES512:"secp521r1"};A9.exports=function(t,e){if(!t||!e)return;let r=e.asymmetricKeyType;if(!r)return;let n=tie[r];if(!n)throw new Error(`Unknown key type "${r}".`);if(!n.includes(t))throw new Error(`"alg" parameter for "${r}" key type must be one of: ${n.join(", ")}.`);if(Qne)switch(r){case"ec":let i=e.asymmetricKeyDetails.namedCurve,o=rie[t];if(i!==o)throw new Error(`"alg" parameter "${t}" requires curve "${o}".`);break;case"rsa-pss":if(eie){let a=parseInt(t.slice(-3),10),{hashAlgorithm:s,mgf1HashAlgorithm:c,saltLength:u}=e.asymmetricKeyDetails;if(s!==`sha${a}`||c!==s)throw new Error(`Invalid key for this operation, its RSA-PSS parameters do not meet the requirements of "alg" ${t}.`);if(u!==void 0&&u>a>>3)throw new Error(`Invalid key for this operation, its RSA-PSS parameter saltLength does not meet the requirements of "alg" ${t}.`)}break}};});var TC=ne((b8e,T9)=>{v();m();y();g();var nie=Av();T9.exports=nie.satisfies(N.version,"^6.12.0 || >=8.0.0");});var I9=ne((C8e,x9)=>{v();m();y();g();var pr=pp(),iie=iC(),R9=oC(),oie=nC(),aie=aC(),sie=AC(),cie=TC(),uie=lv(),{KeyObject:lie,createSecretKey:fie,createPublicKey:die}=mu(),RC=["RS256","RS384","RS512"],hie=["ES256","ES384","ES512"],xC=["RS256","RS384","RS512"],pie=["HS256","HS384","HS512"];cie&&(RC.splice(RC.length,0,"PS256","PS384","PS512"),xC.splice(xC.length,0,"PS256","PS384","PS512"));x9.exports=function(t,e,r,n){typeof r=="function"&&!n&&(n=r,r={}),r||(r={}),r=Object.assign({},r);let i;if(n?i=n:i=function(l,w){if(l)throw l;return w},r.clockTimestamp&&typeof r.clockTimestamp!="number")return i(new pr("clockTimestamp must be a number"));if(r.nonce!==void 0&&(typeof r.nonce!="string"||r.nonce.trim()===""))return i(new pr("nonce must be a non-empty string"));if(r.allowInvalidAsymmetricKeyTypes!==void 0&&typeof r.allowInvalidAsymmetricKeyTypes!="boolean")return i(new pr("allowInvalidAsymmetricKeyTypes must be a boolean"));let o=r.clockTimestamp||Math.floor(Date.now()/1e3);if(!t)return i(new pr("jwt must be provided"));if(typeof t!="string")return i(new pr("jwt must be a string"));let a=t.split(".");if(a.length!==3)return i(new pr("jwt malformed"));let s;try{s=oie(t,{complete:!0});}catch(l){return i(l)}if(!s)return i(new pr("invalid token"));let c=s.header,u;if(typeof e=="function"){if(!n)return i(new pr("verify must be called asynchronous if secret or public key is provided as a callback"));u=e;}else u=function(l,w){return w(null,e)};return u(c,function(l,w){if(l)return i(new pr("error in secret or public key callback: "+l.message));let T=a[2].trim()!=="";if(!T&&w)return i(new pr("jwt signature is required"));if(T&&!w)return i(new pr("secret or public key must be provided"));if(!T&&!r.algorithms)return i(new pr('please specify "none" in "algorithms" to verify unsigned tokens'));if(w!=null&&!(w instanceof lie))try{w=die(w);}catch(k){try{w=fie(typeof w=="string"?D.Buffer.from(w):w);}catch(q){return i(new pr("secretOrPublicKey is not valid key material"))}}if(r.algorithms||(w.type==="secret"?r.algorithms=pie:["rsa","rsa-pss"].includes(w.asymmetricKeyType)?r.algorithms=xC:w.asymmetricKeyType==="ec"?r.algorithms=hie:r.algorithms=RC),r.algorithms.indexOf(s.header.alg)===-1)return i(new pr("invalid algorithm"));if(c.alg.startsWith("HS")&&w.type!=="secret")return i(new pr(`secretOrPublicKey must be a symmetric key when using ${c.alg}`));if(/^(?:RS|PS|ES)/.test(c.alg)&&w.type!=="public")return i(new pr(`secretOrPublicKey must be an asymmetric key when using ${c.alg}`));if(!r.allowInvalidAsymmetricKeyTypes)try{sie(c.alg,w);}catch(k){return i(k)}let x;try{x=uie.verify(t,s.header.alg,w);}catch(k){return i(k)}if(!x)return i(new pr("invalid signature"));let I=s.payload;if(typeof I.nbf!="undefined"&&!r.ignoreNotBefore){if(typeof I.nbf!="number")return i(new pr("invalid nbf value"));if(I.nbf>o+(r.clockTolerance||0))return i(new iie("jwt not active",new Date(I.nbf*1e3)))}if(typeof I.exp!="undefined"&&!r.ignoreExpiration){if(typeof I.exp!="number")return i(new pr("invalid exp value"));if(o>=I.exp+(r.clockTolerance||0))return i(new R9("jwt expired",new Date(I.exp*1e3)))}if(r.audience){let k=Array.isArray(r.audience)?r.audience:[r.audience];if(!(Array.isArray(I.aud)?I.aud:[I.aud]).some(function(K){return k.some(function(Z){return Z instanceof RegExp?Z.test(K):Z===K})}))return i(new pr("jwt audience invalid. expected: "+k.join(" or ")))}if(r.issuer&&(typeof r.issuer=="string"&&I.iss!==r.issuer||Array.isArray(r.issuer)&&r.issuer.indexOf(I.iss)===-1))return i(new pr("jwt issuer invalid. expected: "+r.issuer));if(r.subject&&I.sub!==r.subject)return i(new pr("jwt subject invalid. expected: "+r.subject));if(r.jwtid&&I.jti!==r.jwtid)return i(new pr("jwt jwtid invalid. expected: "+r.jwtid));if(r.nonce&&I.nonce!==r.nonce)return i(new pr("jwt nonce invalid. expected: "+r.nonce));if(r.maxAge){if(typeof I.iat!="number")return i(new pr("iat required when maxAge is specified"));let k=aie(r.maxAge,I.iat);if(typeof k=="undefined")return i(new pr('"maxAge" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'));if(o>=k+(r.clockTolerance||0))return i(new R9("maxAge exceeded",new Date(k*1e3)))}if(r.complete===!0){let k=s.signature;return i(null,{header:c,payload:I,signature:k})}return i(null,I)})};});var B9=ne((I8e,P9)=>{v();m();y();g();var M9=1/0,N9=9007199254740991,mie=17976931348623157e292,O9=NaN,yie="[object Arguments]",gie="[object Function]",vie="[object GeneratorFunction]",bie="[object String]",wie="[object Symbol]",Eie=/^\s+|\s+$/g,_ie=/^[-+]0x[0-9a-f]+$/i,Sie=/^0b[01]+$/i,Cie=/^0o[0-7]+$/i,Aie=/^(?:0|[1-9]\d*)$/,Tie=parseInt;function Rie(t,e){for(var r=-1,n=t?t.length:0,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i}function xie(t,e,r,n){for(var i=t.length,o=r+(-1);++o<i;)if(e(t[o],o,t))return o;return -1}function Iie(t,e,r){if(e!==e)return xie(t,Mie,r);for(var n=r-1,i=t.length;++n<i;)if(t[n]===e)return n;return -1}function Mie(t){return t!==t}function Oie(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}function Nie(t,e){return Rie(e,function(r){return t[r]})}function kie(t,e){return function(r){return t(e(r))}}var Tv=Object.prototype,MC=Tv.hasOwnProperty,Rv=Tv.toString,Pie=Tv.propertyIsEnumerable,Bie=kie(Object.keys,Object),Uie=Math.max;function Die(t,e){var r=k9(t)||Hie(t)?Oie(t.length,String):[],n=r.length,i=!!n;for(var o in t)(MC.call(t,o))&&!(i&&(o=="length"||qie(o,n)))&&r.push(o);return r}function Lie(t){if(!Fie(t))return Bie(t);var e=[];for(var r in Object(t))MC.call(t,r)&&r!="constructor"&&e.push(r);return e}function qie(t,e){return e=e==null?N9:e,!!e&&(typeof t=="number"||Aie.test(t))&&t>-1&&t%1==0&&t<e}function Fie(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||Tv;return t===r}function zie(t,e,r,n){t=OC(t)?t:Xie(t),r=r&&!n?Yie(r):0;var i=t.length;return r<0&&(r=Uie(i+r,0)),Gie(t)?r<=i&&t.indexOf(e,r)>-1:!!i&&Iie(t,e,r)>-1}function Hie(t){return jie(t)&&MC.call(t,"callee")&&(!Pie.call(t,"callee")||Rv.call(t)==yie)}var k9=Array.isArray;function OC(t){return t!=null&&Vie(t.length)&&!$ie(t)}function jie(t){return NC(t)&&OC(t)}function $ie(t){var e=IC(t)?Rv.call(t):"";return e==gie||e==vie}function Vie(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=N9}function IC(t){var e=typeof t;return !!t&&(e=="object"||e=="function")}function NC(t){return !!t&&typeof t=="object"}function Gie(t){return typeof t=="string"||!k9(t)&&NC(t)&&Rv.call(t)==bie}function Kie(t){return typeof t=="symbol"||NC(t)&&Rv.call(t)==wie}function Wie(t){if(!t)return t===0?t:0;if(t=Zie(t),t===M9||t===-M9){var e=t<0?-1:1;return e*mie}return t===t?t:0}function Yie(t){var e=Wie(t),r=e%1;return e===e?r?e-r:e:0}function Zie(t){if(typeof t=="number")return t;if(Kie(t))return O9;if(IC(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=IC(e)?e+"":e;}if(typeof t!="string")return t===0?t:+t;t=t.replace(Eie,"");var r=Sie.test(t);return r||Cie.test(t)?Tie(t.slice(2),r?2:8):_ie.test(t)?O9:+t}function Jie(t){return OC(t)?Die(t):Lie(t)}function Xie(t){return t?Nie(t,Jie(t)):[]}P9.exports=zie;});var D9=ne((P8e,U9)=>{v();m();y();g();var Qie="[object Boolean]",eoe=Object.prototype,toe=eoe.toString;function roe(t){return t===!0||t===!1||noe(t)&&toe.call(t)==Qie}function noe(t){return !!t&&typeof t=="object"}U9.exports=roe;});var H9=ne((q8e,z9)=>{v();m();y();g();var L9=1/0,ioe=17976931348623157e292,q9=NaN,ooe="[object Symbol]",aoe=/^\s+|\s+$/g,soe=/^[-+]0x[0-9a-f]+$/i,coe=/^0b[01]+$/i,uoe=/^0o[0-7]+$/i,loe=parseInt,foe=Object.prototype,doe=foe.toString;function hoe(t){return typeof t=="number"&&t==goe(t)}function F9(t){var e=typeof t;return !!t&&(e=="object"||e=="function")}function poe(t){return !!t&&typeof t=="object"}function moe(t){return typeof t=="symbol"||poe(t)&&doe.call(t)==ooe}function yoe(t){if(!t)return t===0?t:0;if(t=voe(t),t===L9||t===-L9){var e=t<0?-1:1;return e*ioe}return t===t?t:0}function goe(t){var e=yoe(t),r=e%1;return e===e?r?e-r:e:0}function voe(t){if(typeof t=="number")return t;if(moe(t))return q9;if(F9(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=F9(e)?e+"":e;}if(typeof t!="string")return t===0?t:+t;t=t.replace(aoe,"");var r=coe.test(t);return r||uoe.test(t)?loe(t.slice(2),r?2:8):soe.test(t)?q9:+t}z9.exports=hoe;});var $9=ne(($8e,j9)=>{v();m();y();g();var boe="[object Number]",woe=Object.prototype,Eoe=woe.toString;function _oe(t){return !!t&&typeof t=="object"}function Soe(t){return typeof t=="number"||_oe(t)&&Eoe.call(t)==boe}j9.exports=Soe;});var W9=ne((Y8e,K9)=>{v();m();y();g();var Coe="[object Object]";function Aoe(t){var e=!1;if(t!=null&&typeof t.toString!="function")try{e=!!(t+"");}catch(r){}return e}function Toe(t,e){return function(r){return t(e(r))}}var Roe=Function.prototype,V9=Object.prototype,G9=Roe.toString,xoe=V9.hasOwnProperty,Ioe=G9.call(Object),Moe=V9.toString,Ooe=Toe(Object.getPrototypeOf,Object);function Noe(t){return !!t&&typeof t=="object"}function koe(t){if(!Noe(t)||Moe.call(t)!=Coe||Aoe(t))return !1;var e=Ooe(t);if(e===null)return !0;var r=xoe.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&G9.call(r)==Ioe}K9.exports=koe;});var Z9=ne((eke,Y9)=>{v();m();y();g();var Poe="[object String]",Boe=Object.prototype,Uoe=Boe.toString,Doe=Array.isArray;function Loe(t){return !!t&&typeof t=="object"}function qoe(t){return typeof t=="string"||!Doe(t)&&Loe(t)&&Uoe.call(t)==Poe}Y9.exports=qoe;});var t7=ne((oke,e7)=>{v();m();y();g();var Foe="Expected a function",J9=1/0,zoe=17976931348623157e292,X9=NaN,Hoe="[object Symbol]",joe=/^\s+|\s+$/g,$oe=/^[-+]0x[0-9a-f]+$/i,Voe=/^0b[01]+$/i,Goe=/^0o[0-7]+$/i,Koe=parseInt,Woe=Object.prototype,Yoe=Woe.toString;function Zoe(t,e){var r;if(typeof e!="function")throw new TypeError(Foe);return t=tae(t),function(){return --t>0&&(r=e.apply(this,arguments)),t<=1&&(e=void 0),r}}function Joe(t){return Zoe(2,t)}function Q9(t){var e=typeof t;return !!t&&(e=="object"||e=="function")}function Xoe(t){return !!t&&typeof t=="object"}function Qoe(t){return typeof t=="symbol"||Xoe(t)&&Yoe.call(t)==Hoe}function eae(t){if(!t)return t===0?t:0;if(t=rae(t),t===J9||t===-J9){var e=t<0?-1:1;return e*zoe}return t===t?t:0}function tae(t){var e=eae(t),r=e%1;return e===e?r?e-r:e:0}function rae(t){if(typeof t=="number")return t;if(Qoe(t))return X9;if(Q9(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=Q9(e)?e+"":e;}if(typeof t!="string")return t===0?t:+t;t=t.replace(joe,"");var r=Voe.test(t);return r||Goe.test(t)?Koe(t.slice(2),r?2:8):$oe.test(t)?X9:+t}e7.exports=Joe;});var l7=ne((lke,u7)=>{v();m();y();g();var r7=aC(),nae=TC(),iae=AC(),n7=lv(),oae=B9(),xv=D9(),i7=H9(),kC=$9(),a7=W9(),ic=Z9(),aae=t7(),{KeyObject:sae,createSecretKey:cae,createPrivateKey:uae}=mu(),s7=["RS256","RS384","RS512","ES256","ES384","ES512","HS256","HS384","HS512","none"];nae&&s7.splice(3,0,"PS256","PS384","PS512");var lae={expiresIn:{isValid:function(t){return i7(t)||ic(t)&&t},message:'"expiresIn" should be a number of seconds or string representing a timespan'},notBefore:{isValid:function(t){return i7(t)||ic(t)&&t},message:'"notBefore" should be a number of seconds or string representing a timespan'},audience:{isValid:function(t){return ic(t)||Array.isArray(t)},message:'"audience" must be a string or array'},algorithm:{isValid:oae.bind(null,s7),message:'"algorithm" must be a valid string enum value'},header:{isValid:a7,message:'"header" must be an object'},encoding:{isValid:ic,message:'"encoding" must be a string'},issuer:{isValid:ic,message:'"issuer" must be a string'},subject:{isValid:ic,message:'"subject" must be a string'},jwtid:{isValid:ic,message:'"jwtid" must be a string'},noTimestamp:{isValid:xv,message:'"noTimestamp" must be a boolean'},keyid:{isValid:ic,message:'"keyid" must be a string'},mutatePayload:{isValid:xv,message:'"mutatePayload" must be a boolean'},allowInsecureKeySizes:{isValid:xv,message:'"allowInsecureKeySizes" must be a boolean'},allowInvalidAsymmetricKeyTypes:{isValid:xv,message:'"allowInvalidAsymmetricKeyTypes" must be a boolean'}},fae={iat:{isValid:kC,message:'"iat" should be a number of seconds'},exp:{isValid:kC,message:'"exp" should be a number of seconds'},nbf:{isValid:kC,message:'"nbf" should be a number of seconds'}};function c7(t,e,r,n){if(!a7(r))throw new Error('Expected "'+n+'" to be a plain object.');Object.keys(r).forEach(function(i){let o=t[i];if(!o){if(!e)throw new Error('"'+i+'" is not allowed in "'+n+'"');return}if(!o.isValid(r[i]))throw new Error(o.message)});}function dae(t){return c7(lae,!1,t,"options")}function hae(t){return c7(fae,!0,t,"payload")}var o7={audience:"aud",issuer:"iss",subject:"sub",jwtid:"jti"},pae=["expiresIn","notBefore","noTimestamp","audience","issuer","subject","jwtid"];u7.exports=function(t,e,r,n){typeof r=="function"?(n=r,r={}):r=r||{};let i=typeof t=="object"&&!D.Buffer.isBuffer(t),o=Object.assign({alg:r.algorithm||"HS256",typ:i?"JWT":void 0,kid:r.keyid},r.header);function a(u){if(n)return n(u);throw u}if(!e&&r.algorithm!=="none")return a(new Error("secretOrPrivateKey must have a value"));if(e!=null&&!(e instanceof sae))try{e=uae(e);}catch(u){try{e=cae(typeof e=="string"?D.Buffer.from(e):e);}catch(l){return a(new Error("secretOrPrivateKey is not valid key material"))}}if(o.alg.startsWith("HS")&&e.type!=="secret")return a(new Error(`secretOrPrivateKey must be a symmetric key when using ${o.alg}`));if(/^(?:RS|PS|ES)/.test(o.alg)){if(e.type!=="private")return a(new Error(`secretOrPrivateKey must be an asymmetric key when using ${o.alg}`));if(!r.allowInsecureKeySizes&&!o.alg.startsWith("ES")&&e.asymmetricKeyDetails!==void 0&&e.asymmetricKeyDetails.modulusLength<2048)return a(new Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${o.alg}`))}if(typeof t=="undefined")return a(new Error("payload is required"));if(i){try{hae(t);}catch(u){return a(u)}r.mutatePayload||(t=Object.assign({},t));}else {let u=pae.filter(function(l){return typeof r[l]!="undefined"});if(u.length>0)return a(new Error("invalid "+u.join(",")+" option for "+typeof t+" payload"))}if(typeof t.exp!="undefined"&&typeof r.expiresIn!="undefined")return a(new Error('Bad "options.expiresIn" option the payload already has an "exp" property.'));if(typeof t.nbf!="undefined"&&typeof r.notBefore!="undefined")return a(new Error('Bad "options.notBefore" option the payload already has an "nbf" property.'));try{dae(r);}catch(u){return a(u)}if(!r.allowInvalidAsymmetricKeyTypes)try{iae(o.alg,e);}catch(u){return a(u)}let s=t.iat||Math.floor(Date.now()/1e3);if(r.noTimestamp?delete t.iat:i&&(t.iat=s),typeof r.notBefore!="undefined"){try{t.nbf=r7(r.notBefore,s);}catch(u){return a(u)}if(typeof t.nbf=="undefined")return a(new Error('"notBefore" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'))}if(typeof r.expiresIn!="undefined"&&typeof t=="object"){try{t.exp=r7(r.expiresIn,s);}catch(u){return a(u)}if(typeof t.exp=="undefined")return a(new Error('"expiresIn" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'))}Object.keys(o7).forEach(function(u){let l=o7[u];if(typeof r[u]!="undefined"){if(typeof t[l]!="undefined")return a(new Error('Bad "options.'+u+'" option. The payload already has an "'+l+'" property.'));t[l]=r[u];}});let c=r.encoding||"utf8";if(typeof n=="function")n=n&&aae(n),n7.createSign({header:o,privateKey:e,payload:t,encoding:c}).once("error",n).once("done",function(u){if(!r.allowInsecureKeySizes&&/^(?:RS|PS)/.test(o.alg)&&u.length<256)return n(new Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${o.alg}`));n(null,u);});else {let u=n7.sign({header:o,payload:t,secret:e,encoding:c});if(!r.allowInsecureKeySizes&&/^(?:RS|PS)/.test(o.alg)&&u.length<256)throw new Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${o.alg}`);return u}};});var _p=ne((mke,f7)=>{v();m();y();g();f7.exports={decode:nC(),verify:I9(),sign:l7(),JsonWebTokenError:pp(),NotBeforeError:iC(),TokenExpiredError:oC()};});var p7=ne((Nke,h7)=>{v();m();y();g();h7.exports=yae;function yae(t,e){var r=D.Buffer.from(t,"base64"),n=D.Buffer.from(e,"base64"),i=r.toString("hex"),o=n.toString("hex");i=d7(i),o=d7(o);var a=i.length/2,s=o.length/2,c=BC(a),u=BC(s),l="30"+BC(a+s+c.length/2+u.length/2+2)+"02"+c+i+"02"+u+o,w=D.Buffer.from(l,"hex").toString("base64"),T=`-----BEGIN RSA PUBLIC KEY-----
`+w.match(/.{1,64}/g).join(`
`)+`
-----END RSA PUBLIC KEY-----
`;return T}function d7(t){var e=t[0];return e<"0"||e>"7"?"00"+t:t}function PC(t){var e=t.toString(16);return e.length%2?"0"+e:e}function BC(t){if(t<=127)return PC(t);var e=PC(t),r=128+e.length/2;return PC(r)+e}});var m7=ne(UC=>{v();m();y();g();Object.defineProperty(UC,"__esModule",{value:!0});function gae(t){var e=4,r=t.length,n=r%e;if(!n)return t;var i=r,o=e-n,a=r+o,s=D.Buffer.alloc(a);for(s.write(t);o--;)s.write("=",i++);return s.toString()}UC.default=gae;});var g7=ne(qC=>{v();m();y();g();Object.defineProperty(qC,"__esModule",{value:!0});var vae=m7();function y7(t,e){return e===void 0&&(e="utf8"),D.Buffer.isBuffer(t)?DC(t.toString("base64")):DC(D.Buffer.from(t,e).toString("base64"))}function bae(t,e){return e===void 0&&(e="utf8"),D.Buffer.from(LC(t),"base64").toString(e)}function LC(t){return t=t.toString(),vae.default(t).replace(/\-/g,"+").replace(/_/g,"/")}function DC(t){return t.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function wae(t){return D.Buffer.from(LC(t),"base64")}var td=y7;td.encode=y7;td.decode=bae;td.toBase64=LC;td.fromBase64=DC;td.toBuffer=wae;qC.default=td;});var v7=ne((Kke,Iv)=>{v();m();y();g();Iv.exports=g7().default;Iv.exports.default=Iv.exports;});var w7=ne((rd,b7)=>{v();m();y();g();var Eae=function(){if(typeof self!="undefined")return self;if(typeof window!="undefined")return window;if(typeof globalThis!="undefined")return globalThis;throw new Error("unable to locate global object")},Bu=Eae();b7.exports=rd=Bu.fetch;Bu.fetch&&(rd.default=Bu.fetch.bind(Bu));rd.Headers=Bu.Headers;rd.Request=Bu.Request;rd.Response=Bu.Response;});var E7={};Cr(E7,{Server:()=>bi,Socket:()=>bi,Stream:()=>bi,_createServerHandle:()=>bi,_normalizeArgs:()=>bi,_setSimultaneousAccepts:()=>bi,connect:()=>bi,createConnection:()=>bi,createServer:()=>bi,default:()=>_ae,isIP:()=>bi,isIPv4:()=>bi,isIPv6:()=>bi});function bi(){throw new Error("Node.js net module is not supported by JSPM core outside of Node.js")}var _ae,_7=Ur(()=>{v();m();y();g();_ae={_createServerHandle:bi,_normalizeArgs:bi,_setSimultaneousAccepts:bi,connect:bi,createConnection:bi,createServer:bi,isIP:bi,isIPv4:bi,isIPv6:bi,Server:bi,Socket:bi,Stream:bi};});var S7={};Cr(S7,{CLIENT_RENEG_LIMIT:()=>Cae,CLIENT_RENEG_WINDOW:()=>Aae,DEFAULT_CIPHERS:()=>Tae,DEFAULT_ECDH_CURVE:()=>Rae,DEFAULT_MAX_VERSION:()=>Iae,DEFAULT_MIN_VERSION:()=>xae,SecureContext:()=>Xi,Server:()=>Xi,TLSSocket:()=>Xi,checkServerIdentity:()=>Xi,connect:()=>Xi,convertALPNProtocols:()=>Xi,createSecureContext:()=>Xi,createSecurePair:()=>Xi,createServer:()=>Xi,default:()=>Sae,getCiphers:()=>Xi,parseCertString:()=>Xi,rootCertificates:()=>Mae});function Xi(){throw new Error("Node.js tls module is not supported by JSPM core outside of Node.js")}var Sae,Cae,Aae,Tae,Rae,xae,Iae,Mae,C7=Ur(()=>{v();m();y();g();Sae={CLIENT_RENEG_LIMIT:null,CLIENT_RENEG_WINDOW:null,DEFAULT_CIPHERS:null,DEFAULT_ECDH_CURVE:null,DEFAULT_MIN_VERSION:null,DEFAULT_MAX_VERSION:null,getCiphers:Xi,rootCertificates:null,convertALPNProtocols:Xi,checkServerIdentity:Xi,parseCertString:Xi,createSecureContext:Xi,SecureContext:Xi,TLSSocket:Xi,Server:Xi,createServer:Xi,connect:Xi,createSecurePair:Xi},Cae=null,Aae=null,Tae=null,Rae=null,xae=null,Iae=null,Mae=null;});var gB={};Cr(gB,{AssertionError:()=>xse,deepEqual:()=>Ise,deepStrictEqual:()=>Mse,default:()=>ut,doesNotReject:()=>Ose,doesNotThrow:()=>Nse,equal:()=>kse,fail:()=>Pse,ifError:()=>Bse,notDeepEqual:()=>Use,notDeepStrictEqual:()=>Dse,notEqual:()=>Lse,notStrictEqual:()=>qse,ok:()=>Qt,rejects:()=>Fse,strict:()=>zse,strictEqual:()=>Hse,throws:()=>jse});function A7(t,e){if(t==null)throw new TypeError("Cannot convert first argument to object");for(var r=Object(t),n=1;n<arguments.length;n++){var i=arguments[n];if(i!=null)for(var o=Object.keys(Object(i)),a=0,s=o.length;a<s;a++){var c=o[a],u=Object.getOwnPropertyDescriptor(i,c);u!==void 0&&u.enumerable&&(r[c]=i[c]);}}return r}function mB(){if(L7)return GC;function t(u){return (t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l})(u)}function e(u,l){return !l||t(l)!=="object"&&typeof l!="function"?function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(u):l}function r(u){return (r=Object.setPrototypeOf?Object.getPrototypeOf:function(l){return l.__proto__||Object.getPrototypeOf(l)})(u)}function n(u,l){return (n=Object.setPrototypeOf||function(w,T){return w.__proto__=T,w})(u,l)}L7=!0;var i,o,a={};function s(u,l,w){w||(w=Error);var T=function(x){function I(k,q,j){var K;return function(Z,se){if(!(Z instanceof se))throw new TypeError("Cannot call a class as a function")}(this,I),(K=e(this,r(I).call(this,function(Z,se,ce){return typeof l=="string"?l:l(Z,se,ce)}(k,q,j)))).code=u,K}return function(k,q){if(typeof q!="function"&&q!==null)throw new TypeError("Super expression must either be null or a function");k.prototype=Object.create(q&&q.prototype,{constructor:{value:k,writable:!0,configurable:!0}}),q&&n(k,q);}(I,x),I}(w);a[u]=T;}function c(u,l){if(Array.isArray(u)){var w=u.length;return u=u.map(function(T){return String(T)}),w>2?"one of ".concat(l," ").concat(u.slice(0,w-1).join(", "),", or ")+u[w-1]:w===2?"one of ".concat(l," ").concat(u[0]," or ").concat(u[1]):"of ".concat(l," ").concat(u[0])}return "of ".concat(l," ").concat(String(u))}return s("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),s("ERR_INVALID_ARG_TYPE",function(u,l,w){var T,x,I;if(i===void 0&&(i=XC()),i(typeof u=="string","'name' must be a string"),typeof l=="string"&&(x="not ",l.substr(0,x.length)===x)?(T="must not be",l=l.replace(/^not /,"")):T="must be",function(q,j,K){return (K===void 0||K>q.length)&&(K=q.length),q.substring(K-j.length,K)===j}(u," argument"))I="The ".concat(u," ").concat(T," ").concat(c(l,"type"));else {var k=function(q,j,K){return typeof K!="number"&&(K=0),!(K+j.length>q.length)&&q.indexOf(j,K)!==-1}(u,".")?"property":"argument";I='The "'.concat(u,'" ').concat(k," ").concat(T," ").concat(c(l,"type"));}return I+=". Received type ".concat(t(w))},TypeError),s("ERR_INVALID_ARG_VALUE",function(u,l){var w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";o===void 0&&(o=we);var T=o.inspect(l);return T.length>128&&(T="".concat(T.slice(0,128),"...")),"The argument '".concat(u,"' ").concat(w,". Received ").concat(T)},TypeError),s("ERR_INVALID_RETURN_VALUE",function(u,l,w){var T;return T=w&&w.constructor&&w.constructor.name?"instance of ".concat(w.constructor.name):"type ".concat(t(w)),"Expected ".concat(u,' to be returned from the "').concat(l,'"')+" function but got ".concat(T,".")},TypeError),s("ERR_MISSING_ARGS",function(){for(var u=arguments.length,l=new Array(u),w=0;w<u;w++)l[w]=arguments[w];i===void 0&&(i=XC()),i(l.length>0,"At least one arg needs to be specified");var T="The ",x=l.length;switch(l=l.map(function(I){return '"'.concat(I,'"')}),x){case 1:T+="".concat(l[0]," argument");break;case 2:T+="".concat(l[0]," and ").concat(l[1]," arguments");break;default:T+=l.slice(0,x-1).join(", "),T+=", and ".concat(l[x-1]," arguments");}return "".concat(T," must be specified")},TypeError),GC.codes=a,GC}function mse(){if(F7)return q7;F7=!0;var t=cr;function e(pe,le,Y){return le in pe?Object.defineProperty(pe,le,{value:Y,enumerable:!0,configurable:!0,writable:!0}):pe[le]=Y,pe}function r(pe,le){for(var Y=0;Y<le.length;Y++){var S=le[Y];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(pe,S.key,S);}}function n(pe,le){return !le||l(le)!=="object"&&typeof le!="function"?i(pe):le}function i(pe){if(pe===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return pe}function o(pe){var le=typeof Map=="function"?new Map:void 0;return (o=function(Y){if(Y===null||(S=Y,Function.toString.call(S).indexOf("[native code]")===-1))return Y;var S;if(typeof Y!="function")throw new TypeError("Super expression must either be null or a function");if(le!==void 0){if(le.has(Y))return le.get(Y);le.set(Y,d);}function d(){return s(Y,arguments,u(this).constructor)}return d.prototype=Object.create(Y.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}}),c(d,Y)})(pe)}function a(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return !1;if(typeof Proxy=="function")return !0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(pe){return !1}}function s(pe,le,Y){return (s=a()?Reflect.construct:function(S,d,C){var A=[null];A.push.apply(A,d);var f=new(Function.bind.apply(S,A));return C&&c(f,C.prototype),f}).apply(null,arguments)}function c(pe,le){return (c=Object.setPrototypeOf||function(Y,S){return Y.__proto__=S,Y})(pe,le)}function u(pe){return (u=Object.setPrototypeOf?Object.getPrototypeOf:function(le){return le.__proto__||Object.getPrototypeOf(le)})(pe)}function l(pe){return (l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(le){return typeof le}:function(le){return le&&typeof Symbol=="function"&&le.constructor===Symbol&&le!==Symbol.prototype?"symbol":typeof le})(pe)}var w=we.inspect,T=mB().codes.ERR_INVALID_ARG_TYPE;function x(pe,le,Y){return (Y===void 0||Y>pe.length)&&(Y=pe.length),pe.substring(Y-le.length,Y)===le}var I="",k="",q="",j="",K={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function Z(pe){var le=Object.keys(pe),Y=Object.create(Object.getPrototypeOf(pe));return le.forEach(function(S){Y[S]=pe[S];}),Object.defineProperty(Y,"message",{value:pe.message}),Y}function se(pe){return w(pe,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function ce(pe,le,Y){var S="",d="",C=0,A="",f=!1,_=se(pe),M=_.split(`
`),R=se(le).split(`
`),h=0,b="";if(Y==="strictEqual"&&l(pe)==="object"&&l(le)==="object"&&pe!==null&&le!==null&&(Y="strictEqualObject"),M.length===1&&R.length===1&&M[0]!==R[0]){var B=M[0].length+R[0].length;if(B<=10){if(!(l(pe)==="object"&&pe!==null||l(le)==="object"&&le!==null||pe===0&&le===0))return "".concat(K[Y],`
`)+"".concat(M[0]," !== ").concat(R[0],`
`)}else if(Y!=="strictEqualObject"&&B<(t.stderr&&t.stderr.isTTY?t.stderr.columns:80)){for(;M[0][h]===R[0][h];)h++;h>2&&(b=`
`.concat(function(J,ee){if(ee=Math.floor(ee),J.length==0||ee==0)return "";var de=J.length*ee;for(ee=Math.floor(Math.log(ee)/Math.log(2));ee;)J+=J,ee--;return J+=J.substring(0,de-J.length)}(" ",h),"^"),h=0);}}for(var z=M[M.length-1],P=R[R.length-1];z===P&&(h++<2?A=`
`.concat(z).concat(A):S=z,M.pop(),R.pop(),M.length!==0&&R.length!==0);)z=M[M.length-1],P=R[R.length-1];var V=Math.max(M.length,R.length);if(V===0){var fe=_.split(`
`);if(fe.length>30)for(fe[26]="".concat(I,"...").concat(j);fe.length>27;)fe.pop();return "".concat(K.notIdentical,`
`).concat(fe.join(`
`),`
`)}h>3&&(A=`
`.concat(I,"...").concat(j).concat(A),f=!0),S!==""&&(A=`
`.concat(S).concat(A),S="");var ye=0,Ce=K[Y]+`
`.concat(k,"+ actual").concat(j," ").concat(q,"- expected").concat(j),ae=" ".concat(I,"...").concat(j," Lines skipped");for(h=0;h<V;h++){var ie=h-C;if(M.length<h+1)ie>1&&h>2&&(ie>4?(d+=`
`.concat(I,"...").concat(j),f=!0):ie>3&&(d+=`
`.concat(R[h-2]),ye++),d+=`
`.concat(R[h-1]),ye++),C=h,S+=`
`.concat(q,"-").concat(j," ").concat(R[h]),ye++;else if(R.length<h+1)ie>1&&h>2&&(ie>4?(d+=`
`.concat(I,"...").concat(j),f=!0):ie>3&&(d+=`
`.concat(M[h-2]),ye++),d+=`
`.concat(M[h-1]),ye++),C=h,d+=`
`.concat(k,"+").concat(j," ").concat(M[h]),ye++;else {var he=R[h],Be=M[h],Re=Be!==he&&(!x(Be,",")||Be.slice(0,-1)!==he);Re&&x(he,",")&&he.slice(0,-1)===Be&&(Re=!1,Be+=","),Re?(ie>1&&h>2&&(ie>4?(d+=`
`.concat(I,"...").concat(j),f=!0):ie>3&&(d+=`
`.concat(M[h-2]),ye++),d+=`
`.concat(M[h-1]),ye++),C=h,d+=`
`.concat(k,"+").concat(j," ").concat(Be),S+=`
`.concat(q,"-").concat(j," ").concat(he),ye+=2):(d+=S,S="",ie!==1&&h!==0||(d+=`
`.concat(Be),ye++));}if(ye>20&&h<V-2)return "".concat(Ce).concat(ae,`
`).concat(d,`
`).concat(I,"...").concat(j).concat(S,`
`)+"".concat(I,"...").concat(j)}return "".concat(Ce).concat(f?ae:"",`
`).concat(d).concat(S).concat(A).concat(b)}var Te=function(pe){function le(d){var C;if(function(fe,ye){if(!(fe instanceof ye))throw new TypeError("Cannot call a class as a function")}(this,le),l(d)!=="object"||d===null)throw new T("options","Object",d);var A=d.message,f=d.operator,_=d.stackStartFn,M=d.actual,R=d.expected,h=Error.stackTraceLimit;if(Error.stackTraceLimit=0,A!=null)C=n(this,u(le).call(this,String(A)));else if(t.stderr&&t.stderr.isTTY&&(t.stderr&&t.stderr.getColorDepth&&t.stderr.getColorDepth()!==1?(I="\x1B[34m",k="\x1B[32m",j="\x1B[39m",q="\x1B[31m"):(I="",k="",j="",q="")),l(M)==="object"&&M!==null&&l(R)==="object"&&R!==null&&"stack"in M&&M instanceof Error&&"stack"in R&&R instanceof Error&&(M=Z(M),R=Z(R)),f==="deepStrictEqual"||f==="strictEqual")C=n(this,u(le).call(this,ce(M,R,f)));else if(f==="notDeepStrictEqual"||f==="notStrictEqual"){var b=K[f],B=se(M).split(`
`);if(f==="notStrictEqual"&&l(M)==="object"&&M!==null&&(b=K.notStrictEqualObject),B.length>30)for(B[26]="".concat(I,"...").concat(j);B.length>27;)B.pop();C=B.length===1?n(this,u(le).call(this,"".concat(b," ").concat(B[0]))):n(this,u(le).call(this,"".concat(b,`
`).concat(B.join(`
`),`
`)));}else {var z=se(M),P="",V=K[f];f==="notDeepEqual"||f==="notEqual"?(z="".concat(K[f],`
`).concat(z)).length>1024&&(z="".concat(z.slice(0,1021),"...")):(P="".concat(se(R)),z.length>512&&(z="".concat(z.slice(0,509),"...")),P.length>512&&(P="".concat(P.slice(0,509),"...")),f==="deepEqual"||f==="equal"?z="".concat(V,`
`).concat(z,`
should equal
`):P=" ".concat(f," ").concat(P)),C=n(this,u(le).call(this,"".concat(z).concat(P)));}return Error.stackTraceLimit=h,C.generatedMessage=!A,Object.defineProperty(i(C),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),C.code="ERR_ASSERTION",C.actual=M,C.expected=R,C.operator=f,Error.captureStackTrace&&Error.captureStackTrace(i(C),_),C.stack,C.name="AssertionError",n(C)}var Y,S;return function(d,C){if(typeof C!="function"&&C!==null)throw new TypeError("Super expression must either be null or a function");d.prototype=Object.create(C&&C.prototype,{constructor:{value:d,writable:!0,configurable:!0}}),C&&c(d,C);}(le,pe),Y=le,(S=[{key:"toString",value:function(){return "".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:w.custom,value:function(d,C){return w(this,function(A){for(var f=1;f<arguments.length;f++){var _=arguments[f]!=null?arguments[f]:{},M=Object.keys(_);typeof Object.getOwnPropertySymbols=="function"&&(M=M.concat(Object.getOwnPropertySymbols(_).filter(function(R){return Object.getOwnPropertyDescriptor(_,R).enumerable}))),M.forEach(function(R){e(A,R,_[R]);});}return A}({},C,{customInspect:!1,depth:0}))}}])&&r(Y.prototype,S),le}(o(Error));return q7=Te}function z7(t,e){return function(r){if(Array.isArray(r))return r}(t)||function(r,n){var i=[],o=!0,a=!1,s=void 0;try{for(var c,u=r[Symbol.iterator]();!(o=(c=u.next()).done)&&(i.push(c.value),!n||i.length!==n);o=!0);}catch(l){a=!0,s=l;}finally{try{o||u.return==null||u.return();}finally{if(a)throw s}}return i}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function ko(t){return (ko=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function tA(t){return t.call.bind(t)}function Cse(t){if(t.length===0||t.length>10)return !0;for(var e=0;e<t.length;e++){var r=t.charCodeAt(e);if(r<48||r>57)return !0}return t.length===10&&t>=Math.pow(2,32)}function kv(t){return Object.keys(t).filter(Cse).concat(Bv(t).filter(Object.prototype.propertyIsEnumerable.bind(t)))}function J7(t,e){if(t===e)return 0;for(var r=t.length,n=e.length,i=0,o=Math.min(r,n);i<o;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0}function Qi(t,e,r,n){if(t===e)return t!==0||!r||j7(t,e);if(r){if(ko(t)!=="object")return typeof t=="number"&&JC(t)&&JC(e);if(ko(e)!=="object"||t===null||e===null||Object.getPrototypeOf(t)!==Object.getPrototypeOf(e))return !1}else {if(t===null||ko(t)!=="object")return (e===null||ko(e)!=="object")&&t==e;if(e===null||ko(e)!=="object")return !1}var i,o,a,s,c=$7(t);if(c!==$7(e))return !1;if(Array.isArray(t)){if(t.length!==e.length)return !1;var u=kv(t),l=kv(e);return u.length===l.length&&Tp(t,e,r,n,1,u)}if(c==="[object Object]"&&(!Ov(t)&&Ov(e)||!Nv(t)&&Nv(e)))return !1;if(V7(t)){if(!V7(e)||Date.prototype.getTime.call(t)!==Date.prototype.getTime.call(e))return !1}else if(G7(t)){if(!G7(e)||(a=t,s=e,!(yse?a.source===s.source&&a.flags===s.flags:RegExp.prototype.toString.call(a)===RegExp.prototype.toString.call(s))))return !1}else if(bse(t)||t instanceof Error){if(t.message!==e.message||t.name!==e.name)return !1}else {if(vse(t)){if(r||!_se(t)&&!Sse(t)){if(!function(x,I){return x.byteLength===I.byteLength&&J7(new Uint8Array(x.buffer,x.byteOffset,x.byteLength),new Uint8Array(I.buffer,I.byteOffset,I.byteLength))===0}(t,e))return !1}else if(!function(x,I){if(x.byteLength!==I.byteLength)return !1;for(var k=0;k<x.byteLength;k++)if(x[k]!==I[k])return !1;return !0}(t,e))return !1;var w=kv(t),T=kv(e);return w.length===T.length&&Tp(t,e,r,n,0,w)}if(Nv(t))return !(!Nv(e)||t.size!==e.size)&&Tp(t,e,r,n,2);if(Ov(t))return !(!Ov(e)||t.size!==e.size)&&Tp(t,e,r,n,3);if(gse(t)){if(o=e,(i=t).byteLength!==o.byteLength||J7(new Uint8Array(i),new Uint8Array(o))!==0)return !1}else if(wse(t)&&!function(x,I){return K7(x)?K7(I)&&j7(Number.prototype.valueOf.call(x),Number.prototype.valueOf.call(I)):W7(x)?W7(I)&&String.prototype.valueOf.call(x)===String.prototype.valueOf.call(I):Y7(x)?Y7(I)&&Boolean.prototype.valueOf.call(x)===Boolean.prototype.valueOf.call(I):Z7(x)?Z7(I)&&BigInt.prototype.valueOf.call(x)===BigInt.prototype.valueOf.call(I):Ese(I)&&Symbol.prototype.valueOf.call(x)===Symbol.prototype.valueOf.call(I)}(t,e))return !1}return Tp(t,e,r,n,0)}function X7(t,e){return e.filter(function(r){return Uv(t,r)})}function Tp(t,e,r,n,i,o){if(arguments.length===5){o=Object.keys(t);var a=Object.keys(e);if(o.length!==a.length)return !1}for(var s=0;s<o.length;s++)if(!Rp(e,o[s]))return !1;if(r&&arguments.length===5){var c=Bv(t);if(c.length!==0){var u=0;for(s=0;s<c.length;s++){var l=c[s];if(Uv(t,l)){if(!Uv(e,l))return !1;o.push(l),u++;}else if(Uv(e,l))return !1}var w=Bv(e);if(c.length!==w.length&&X7(e,w).length!==u)return !1}else {var T=Bv(e);if(T.length!==0&&X7(e,T).length!==0)return !1}}if(o.length===0&&(i===0||i===1&&t.length===0||t.size===0))return !0;if(n===void 0)n={val1:new Map,val2:new Map,position:0};else {var x=n.val1.get(t);if(x!==void 0){var I=n.val2.get(e);if(I!==void 0)return x===I}n.position++;}n.val1.set(t,n.position),n.val2.set(e,n.position);var k=Rse(t,e,r,o,n,i);return n.val1.delete(t),n.val2.delete(e),k}function Q7(t,e,r,n){for(var i=Dv(t),o=0;o<i.length;o++){var a=i[o];if(Qi(e,a,r,n))return t.delete(a),!0}return !1}function yB(t){switch(ko(t)){case"undefined":return null;case"object":return;case"symbol":return !1;case"string":t=+t;case"number":if(JC(t))return !1}return !0}function Ase(t,e,r){var n=yB(r);return n!=null?n:e.has(n)&&!t.has(n)}function Tse(t,e,r,n,i){var o=yB(r);if(o!=null)return o;var a=e.get(o);return !(a===void 0&&!e.has(o)||!Qi(n,a,!1,i))&&!t.has(o)&&Qi(n,a,!1,i)}function eB(t,e,r,n,i,o){for(var a=Dv(t),s=0;s<a.length;s++){var c=a[s];if(Qi(r,c,i,o)&&Qi(n,e.get(c),i,o))return t.delete(c),!0}return !1}function Rse(t,e,r,n,i,o){var a=0;if(o===2){if(!function(l,w,T,x){for(var I=null,k=Dv(l),q=0;q<k.length;q++){var j=k[q];if(ko(j)==="object"&&j!==null)I===null&&(I=new Set),I.add(j);else if(!w.has(j)){if(T||!Ase(l,w,j))return !1;I===null&&(I=new Set),I.add(j);}}if(I!==null){for(var K=Dv(w),Z=0;Z<K.length;Z++){var se=K[Z];if(ko(se)==="object"&&se!==null){if(!Q7(I,se,T,x))return !1}else if(!T&&!l.has(se)&&!Q7(I,se,T,x))return !1}return I.size===0}return !0}(t,e,r,i))return !1}else if(o===3){if(!function(l,w,T,x){for(var I=null,k=H7(l),q=0;q<k.length;q++){var j=z7(k[q],2),K=j[0],Z=j[1];if(ko(K)==="object"&&K!==null)I===null&&(I=new Set),I.add(K);else {var se=w.get(K);if(se===void 0&&!w.has(K)||!Qi(Z,se,T,x)){if(T||!Tse(l,w,K,Z,x))return !1;I===null&&(I=new Set),I.add(K);}}}if(I!==null){for(var ce=H7(w),Te=0;Te<ce.length;Te++){var pe=z7(ce[Te],2),le=(K=pe[0],pe[1]);if(ko(K)==="object"&&K!==null){if(!eB(I,l,K,le,T,x))return !1}else if(!(T||l.has(K)&&Qi(l.get(K),le,!1,x)||eB(I,l,K,le,!1,x)))return !1}return I.size===0}return !0}(t,e,r,i))return !1}else if(o===1)for(;a<t.length;a++){if(!Rp(t,a)){if(Rp(e,a))return !1;for(var s=Object.keys(t);a<s.length;a++){var c=s[a];if(!Rp(e,c)||!Qi(t[c],e[c],r,i))return !1}return s.length===Object.keys(e).length}if(!Rp(e,a)||!Qi(t[a],e[a],r,i))return !1}for(a=0;a<n.length;a++){var u=n[a];if(!Qi(t[u],e[u],r,i))return !1}return !0}function XC(){if(rB)return KC;rB=!0;var t=cr;function e(R){return (e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(h){return typeof h}:function(h){return h&&typeof Symbol=="function"&&h.constructor===Symbol&&h!==Symbol.prototype?"symbol":typeof h})(R)}var r,n,i=mB().codes,o=i.ERR_AMBIGUOUS_ARGUMENT,a=i.ERR_INVALID_ARG_TYPE,s=i.ERR_INVALID_ARG_VALUE,c=i.ERR_INVALID_RETURN_VALUE,u=i.ERR_MISSING_ARGS,l=mse(),w=we.inspect,T=we.types,x=T.isPromise,I=T.isRegExp,k=Object.assign?Object.assign:Oae.assign,q=Object.is?Object.is:dB;function j(){r=tB.isDeepEqual,n=tB.isDeepStrictEqual;}var K=!1,Z=KC=pe,se={};function ce(R){throw R.message instanceof Error?R.message:new l(R)}function Te(R,h,b,B){if(!b){var z=!1;if(h===0)z=!0,B="No value argument passed to `assert.ok()`";else if(B instanceof Error)throw B;var P=new l({actual:b,expected:!0,message:B,operator:"==",stackStartFn:R});throw P.generatedMessage=z,P}}function pe(){for(var R=arguments.length,h=new Array(R),b=0;b<R;b++)h[b]=arguments[b];Te.apply(void 0,[pe,h.length].concat(h));}Z.fail=function R(h,b,B,z,P){var V,fe=arguments.length;if(fe===0)V="Failed";else if(fe===1)B=h,h=void 0;else {if(K===!1){K=!0;var ye=t.emitWarning?t.emitWarning:console.warn.bind(console);ye("assert.fail() with more than one argument is deprecated. Please use assert.strictEqual() instead or only pass a message.","DeprecationWarning","DEP0094");}fe===2&&(z="!=");}if(B instanceof Error)throw B;var Ce={actual:h,expected:b,operator:z===void 0?"fail":z,stackStartFn:P||R};B!==void 0&&(Ce.message=B);var ae=new l(Ce);throw V&&(ae.message=V,ae.generatedMessage=!0),ae},Z.AssertionError=l,Z.ok=pe,Z.equal=function R(h,b,B){if(arguments.length<2)throw new u("actual","expected");h!=b&&ce({actual:h,expected:b,message:B,operator:"==",stackStartFn:R});},Z.notEqual=function R(h,b,B){if(arguments.length<2)throw new u("actual","expected");h==b&&ce({actual:h,expected:b,message:B,operator:"!=",stackStartFn:R});},Z.deepEqual=function R(h,b,B){if(arguments.length<2)throw new u("actual","expected");r===void 0&&j(),r(h,b)||ce({actual:h,expected:b,message:B,operator:"deepEqual",stackStartFn:R});},Z.notDeepEqual=function R(h,b,B){if(arguments.length<2)throw new u("actual","expected");r===void 0&&j(),r(h,b)&&ce({actual:h,expected:b,message:B,operator:"notDeepEqual",stackStartFn:R});},Z.deepStrictEqual=function R(h,b,B){if(arguments.length<2)throw new u("actual","expected");r===void 0&&j(),n(h,b)||ce({actual:h,expected:b,message:B,operator:"deepStrictEqual",stackStartFn:R});},Z.notDeepStrictEqual=function R(h,b,B){if(arguments.length<2)throw new u("actual","expected");r===void 0&&j(),n(h,b)&&ce({actual:h,expected:b,message:B,operator:"notDeepStrictEqual",stackStartFn:R});},Z.strictEqual=function R(h,b,B){if(arguments.length<2)throw new u("actual","expected");q(h,b)||ce({actual:h,expected:b,message:B,operator:"strictEqual",stackStartFn:R});},Z.notStrictEqual=function R(h,b,B){if(arguments.length<2)throw new u("actual","expected");q(h,b)&&ce({actual:h,expected:b,message:B,operator:"notStrictEqual",stackStartFn:R});};var le=function R(h,b,B){var z=this;((function(P,V){if(!(P instanceof V))throw new TypeError("Cannot call a class as a function")}))(this,R),b.forEach(function(P){P in h&&(B!==void 0&&typeof B[P]=="string"&&I(h[P])&&h[P].test(B[P])?z[P]=B[P]:z[P]=h[P]);});};function Y(R,h,b,B,z,P){if(!(b in R)||!n(R[b],h[b])){if(!B){var V=new le(R,z),fe=new le(h,z,R),ye=new l({actual:V,expected:fe,operator:"deepStrictEqual",stackStartFn:P});throw ye.actual=R,ye.expected=h,ye.operator=P.name,ye}ce({actual:R,expected:h,message:B,operator:P.name,stackStartFn:P});}}function S(R,h,b,B){if(typeof h!="function"){if(I(h))return h.test(R);if(arguments.length===2)throw new a("expected",["Function","RegExp"],h);if(e(R)!=="object"||R===null){var z=new l({actual:R,expected:h,message:b,operator:"deepStrictEqual",stackStartFn:B});throw z.operator=B.name,z}var P=Object.keys(h);if(h instanceof Error)P.push("name","message");else if(P.length===0)throw new s("error",h,"may not be an empty object");return r===void 0&&j(),P.forEach(function(V){typeof R[V]=="string"&&I(h[V])&&h[V].test(R[V])||Y(R,h,V,b,P,B);}),!0}return h.prototype!==void 0&&R instanceof h||!Error.isPrototypeOf(h)&&h.call({},R)===!0}function d(R){if(typeof R!="function")throw new a("fn","Function",R);try{R();}catch(h){return h}return se}function C(R){return x(R)||R!==null&&e(R)==="object"&&typeof R.then=="function"&&typeof R.catch=="function"}function A(R){return Promise.resolve().then(function(){var h;if(typeof R=="function"){if(!C(h=R()))throw new c("instance of Promise","promiseFn",h)}else {if(!C(R))throw new a("promiseFn",["Function","Promise"],R);h=R;}return Promise.resolve().then(function(){return h}).then(function(){return se}).catch(function(b){return b})})}function f(R,h,b,B){if(typeof b=="string"){if(arguments.length===4)throw new a("error",["Object","Error","Function","RegExp"],b);if(e(h)==="object"&&h!==null){if(h.message===b)throw new o("error/message",'The error message "'.concat(h.message,'" is identical to the message.'))}else if(h===b)throw new o("error/message",'The error "'.concat(h,'" is identical to the message.'));B=b,b=void 0;}else if(b!=null&&e(b)!=="object"&&typeof b!="function")throw new a("error",["Object","Error","Function","RegExp"],b);if(h===se){var z="";b&&b.name&&(z+=" (".concat(b.name,")")),z+=B?": ".concat(B):".";var P=R.name==="rejects"?"rejection":"exception";ce({actual:void 0,expected:b,operator:R.name,message:"Missing expected ".concat(P).concat(z),stackStartFn:R});}if(b&&!S(h,b,B,R))throw h}function _(R,h,b,B){if(h!==se){if(typeof b=="string"&&(B=b,b=void 0),!b||S(h,b)){var z=B?": ".concat(B):".",P=R.name==="doesNotReject"?"rejection":"exception";ce({actual:h,expected:b,operator:R.name,message:"Got unwanted ".concat(P).concat(z,`
`)+'Actual message: "'.concat(h&&h.message,'"'),stackStartFn:R});}throw h}}function M(){for(var R=arguments.length,h=new Array(R),b=0;b<R;b++)h[b]=arguments[b];Te.apply(void 0,[M,h.length].concat(h));}return Z.throws=function R(h){for(var b=arguments.length,B=new Array(b>1?b-1:0),z=1;z<b;z++)B[z-1]=arguments[z];f.apply(void 0,[R,d(h)].concat(B));},Z.rejects=function R(h){for(var b=arguments.length,B=new Array(b>1?b-1:0),z=1;z<b;z++)B[z-1]=arguments[z];return A(h).then(function(P){return f.apply(void 0,[R,P].concat(B))})},Z.doesNotThrow=function R(h){for(var b=arguments.length,B=new Array(b>1?b-1:0),z=1;z<b;z++)B[z-1]=arguments[z];_.apply(void 0,[R,d(h)].concat(B));},Z.doesNotReject=function R(h){for(var b=arguments.length,B=new Array(b>1?b-1:0),z=1;z<b;z++)B[z-1]=arguments[z];return A(h).then(function(P){return _.apply(void 0,[R,P].concat(B))})},Z.ifError=function R(h){if(h!=null){var b="ifError got unwanted exception: ";e(h)==="object"&&typeof h.message=="string"?h.message.length===0&&h.constructor?b+=h.constructor.name:b+=h.message:b+=w(h);var B=new l({actual:h,expected:null,operator:"ifError",message:b,stackStartFn:R}),z=h.stack;if(typeof z=="string"){var P=z.split(`
`);P.shift();for(var V=B.stack.split(`
`),fe=0;fe<P.length;fe++){var ye=V.indexOf(P[fe]);if(ye!==-1){V=V.slice(0,ye);break}}B.stack="".concat(V.join(`
`),`
`).concat(P.join(`
`));}throw B}},Z.strict=k(M,Z,{equal:Z.strictEqual,deepEqual:Z.deepStrictEqual,notEqual:Z.notStrictEqual,notDeepEqual:Z.notDeepStrictEqual}),Z.strict.strict=Z.strict,KC}var Oae,nB,T7,iB,Cp,FC,R7,zC,x7,I7,Ap,Mv,M7,O7,Nae,kae,Pae,N7,Pv,k7,Bae,Uae,Dae,Lae,qae,WC,oB,Fae,aB,Lv,zae,P7,Hae,jae,$ae,HC,Vae,Gae,sB,xp,Lu,jC,Kae,Uu,Du,$C,VC,B7,Wae,Yae,Zae,Jae,Xae,cB,U7,uB,Qae,ese,tse,YC,ZC,D7,rse,nse,ise,ose,ase,lB,sse,fB,dB,QC,eA,cse,use,lse,fse,dse,hB,hse,pB,pse,GC,L7,q7,F7,yse,Dv,H7,j7,Bv,JC,Rp,Uv,$7,Dn,gse,vse,V7,Ov,G7,Nv,bse,wse,K7,W7,Y7,Z7,Ese,_se,Sse,tB,KC,rB,ut,xse,Ise,Mse,Ose,Nse,kse,Pse,Bse,Use,Dse,Lse,qse,Qt,Fse,zse,Hse,jse,eo=Ur(()=>{v();m();y();g();Us();Ps();Oae={assign:A7,polyfill:function(){Object.assign||Object.defineProperty(Object,"assign",{enumerable:!1,configurable:!0,writable:!0,value:A7});}},T7=Object.prototype.toString,iB=function(t){var e=T7.call(t),r=e==="[object Arguments]";return r||(r=e!=="[object Array]"&&t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&T7.call(t.callee)==="[object Function]"),r};Object.keys||(Cp=Object.prototype.hasOwnProperty,FC=Object.prototype.toString,R7=iB,zC=Object.prototype.propertyIsEnumerable,x7=!zC.call({toString:null},"toString"),I7=zC.call(function(){},"prototype"),Ap=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],Mv=function(t){var e=t.constructor;return e&&e.prototype===t},M7={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},O7=function(){if(typeof window=="undefined")return !1;for(var t in window)try{if(!M7["$"+t]&&Cp.call(window,t)&&window[t]!==null&&typeof window[t]=="object")try{Mv(window[t]);}catch(e){return !0}}catch(e){return !0}return !1}(),nB=function(t){var e=t!==null&&typeof t=="object",r=FC.call(t)==="[object Function]",n=R7(t),i=e&&FC.call(t)==="[object String]",o=[];if(!e&&!r&&!n)throw new TypeError("Object.keys called on a non-object");var a=I7&&r;if(i&&t.length>0&&!Cp.call(t,0))for(var s=0;s<t.length;++s)o.push(String(s));if(n&&t.length>0)for(var c=0;c<t.length;++c)o.push(String(c));else for(var u in t)a&&u==="prototype"||!Cp.call(t,u)||o.push(String(u));if(x7)for(var l=function(T){if(typeof window=="undefined"||!O7)return Mv(T);try{return Mv(T)}catch(x){return !1}}(t),w=0;w<Ap.length;++w)l&&Ap[w]==="constructor"||!Cp.call(t,Ap[w])||o.push(Ap[w]);return o});Nae=nB,kae=Array.prototype.slice,Pae=iB,N7=Object.keys,Pv=N7?function(t){return N7(t)}:Nae,k7=Object.keys;Pv.shim=function(){return Object.keys?function(){var t=Object.keys(arguments);return t&&t.length===arguments.length}(1,2)||(Object.keys=function(t){return Pae(t)?k7(kae.call(t)):k7(t)}):Object.keys=Pv,Object.keys||Pv};Bae=Pv,Uae=Bae,Dae=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",Lae=Object.prototype.toString,qae=Array.prototype.concat,WC=Object.defineProperty,oB=WC&&function(){var t={};try{for(var e in WC(t,"x",{enumerable:!1,value:t}),t)return !1;return t.x===t}catch(r){return !1}}(),Fae=function(t,e,r,n){var i;(!(e in t)||typeof(i=n)=="function"&&Lae.call(i)==="[object Function]"&&n())&&(oB?WC(t,e,{configurable:!0,enumerable:!1,value:r,writable:!0}):t[e]=r);},aB=function(t,e){var r=arguments.length>2?arguments[2]:{},n=Uae(e);Dae&&(n=qae.call(n,Object.getOwnPropertySymbols(e)));for(var i=0;i<n.length;i+=1)Fae(t,n[i],e[n[i]],r[n[i]]);};aB.supportsDescriptors=!!oB;Lv=aB,zae=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return !1;if(typeof Symbol.iterator=="symbol")return !0;var t={},e=Symbol("test"),r=Object(e);if(typeof e=="string"||Object.prototype.toString.call(e)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return !1;for(e in t[e]=42,t)return !1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return !1;var n=Object.getOwnPropertySymbols(t);if(n.length!==1||n[0]!==e||!Object.prototype.propertyIsEnumerable.call(t,e))return !1;if(typeof Object.getOwnPropertyDescriptor=="function"){var i=Object.getOwnPropertyDescriptor(t,e);if(i.value!==42||i.enumerable!==!0)return !1}return !0},P7=(typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:globalThis).Symbol,Hae=zae,jae=function(){return typeof P7=="function"&&typeof Symbol=="function"&&typeof P7("foo")=="symbol"&&typeof Symbol("bar")=="symbol"&&Hae()},$ae="Function.prototype.bind called on incompatible ",HC=Array.prototype.slice,Vae=Object.prototype.toString,Gae=function(t){var e=this;if(typeof e!="function"||Vae.call(e)!=="[object Function]")throw new TypeError($ae+e);for(var r,n=HC.call(arguments,1),i=function(){if(this instanceof r){var u=e.apply(this,n.concat(HC.call(arguments)));return Object(u)===u?u:this}return e.apply(t,n.concat(HC.call(arguments)))},o=Math.max(0,e.length-n.length),a=[],s=0;s<o;s++)a.push("$"+s);if(r=Function("binder","return function ("+a.join(",")+"){ return binder.apply(this,arguments); }")(i),e.prototype){var c=function(){};c.prototype=e.prototype,r.prototype=new c,c.prototype=null;}return r},sB=Function.prototype.bind||Gae,xp=TypeError,Lu=Object.getOwnPropertyDescriptor;if(Lu)try{Lu({},"");}catch(t){Lu=null;}jC=function(){throw new xp},Kae=Lu?function(){try{return arguments.callee,jC}catch(t){try{return Lu(arguments,"callee").get}catch(e){return jC}}}():jC,Uu=jae(),Du=Object.getPrototypeOf||function(t){return t.__proto__},$C=typeof Uint8Array=="undefined"?void 0:Du(Uint8Array),VC={"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?void 0:ArrayBuffer,"%ArrayBufferPrototype%":typeof ArrayBuffer=="undefined"?void 0:ArrayBuffer.prototype,"%ArrayIteratorPrototype%":Uu?Du([][Symbol.iterator]()):void 0,"%ArrayPrototype%":Array.prototype,"%ArrayProto_entries%":Array.prototype.entries,"%ArrayProto_forEach%":Array.prototype.forEach,"%ArrayProto_keys%":Array.prototype.keys,"%ArrayProto_values%":Array.prototype.values,"%AsyncFromSyncIteratorPrototype%":void 0,"%AsyncFunction%":void 0,"%AsyncFunctionPrototype%":void 0,"%AsyncGenerator%":void 0,"%AsyncGeneratorFunction%":void 0,"%AsyncGeneratorPrototype%":void 0,"%AsyncIteratorPrototype%":void 0,"%Atomics%":typeof Atomics=="undefined"?void 0:Atomics,"%Boolean%":Boolean,"%BooleanPrototype%":Boolean.prototype,"%DataView%":typeof DataView=="undefined"?void 0:DataView,"%DataViewPrototype%":typeof DataView=="undefined"?void 0:DataView.prototype,"%Date%":Date,"%DatePrototype%":Date.prototype,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%ErrorPrototype%":Error.prototype,"%eval%":eval,"%EvalError%":EvalError,"%EvalErrorPrototype%":EvalError.prototype,"%Float32Array%":typeof Float32Array=="undefined"?void 0:Float32Array,"%Float32ArrayPrototype%":typeof Float32Array=="undefined"?void 0:Float32Array.prototype,"%Float64Array%":typeof Float64Array=="undefined"?void 0:Float64Array,"%Float64ArrayPrototype%":typeof Float64Array=="undefined"?void 0:Float64Array.prototype,"%Function%":Function,"%FunctionPrototype%":Function.prototype,"%Generator%":void 0,"%GeneratorFunction%":void 0,"%GeneratorPrototype%":void 0,"%Int8Array%":typeof Int8Array=="undefined"?void 0:Int8Array,"%Int8ArrayPrototype%":typeof Int8Array=="undefined"?void 0:Int8Array.prototype,"%Int16Array%":typeof Int16Array=="undefined"?void 0:Int16Array,"%Int16ArrayPrototype%":typeof Int16Array=="undefined"?void 0:Int8Array.prototype,"%Int32Array%":typeof Int32Array=="undefined"?void 0:Int32Array,"%Int32ArrayPrototype%":typeof Int32Array=="undefined"?void 0:Int32Array.prototype,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Uu?Du(Du([][Symbol.iterator]())):void 0,"%JSON%":typeof JSON=="object"?JSON:void 0,"%JSONParse%":typeof JSON=="object"?JSON.parse:void 0,"%Map%":typeof Map=="undefined"?void 0:Map,"%MapIteratorPrototype%":typeof Map!="undefined"&&Uu?Du(new Map()[Symbol.iterator]()):void 0,"%MapPrototype%":typeof Map=="undefined"?void 0:Map.prototype,"%Math%":Math,"%Number%":Number,"%NumberPrototype%":Number.prototype,"%Object%":Object,"%ObjectPrototype%":Object.prototype,"%ObjProto_toString%":Object.prototype.toString,"%ObjProto_valueOf%":Object.prototype.valueOf,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?void 0:Promise,"%PromisePrototype%":typeof Promise=="undefined"?void 0:Promise.prototype,"%PromiseProto_then%":typeof Promise=="undefined"?void 0:Promise.prototype.then,"%Promise_all%":typeof Promise=="undefined"?void 0:Promise.all,"%Promise_reject%":typeof Promise=="undefined"?void 0:Promise.reject,"%Promise_resolve%":typeof Promise=="undefined"?void 0:Promise.resolve,"%Proxy%":typeof Proxy=="undefined"?void 0:Proxy,"%RangeError%":RangeError,"%RangeErrorPrototype%":RangeError.prototype,"%ReferenceError%":ReferenceError,"%ReferenceErrorPrototype%":ReferenceError.prototype,"%Reflect%":typeof Reflect=="undefined"?void 0:Reflect,"%RegExp%":RegExp,"%RegExpPrototype%":RegExp.prototype,"%Set%":typeof Set=="undefined"?void 0:Set,"%SetIteratorPrototype%":typeof Set!="undefined"&&Uu?Du(new Set()[Symbol.iterator]()):void 0,"%SetPrototype%":typeof Set=="undefined"?void 0:Set.prototype,"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?void 0:SharedArrayBuffer,"%SharedArrayBufferPrototype%":typeof SharedArrayBuffer=="undefined"?void 0:SharedArrayBuffer.prototype,"%String%":String,"%StringIteratorPrototype%":Uu?Du(""[Symbol.iterator]()):void 0,"%StringPrototype%":String.prototype,"%Symbol%":Uu?Symbol:void 0,"%SymbolPrototype%":Uu?Symbol.prototype:void 0,"%SyntaxError%":SyntaxError,"%SyntaxErrorPrototype%":SyntaxError.prototype,"%ThrowTypeError%":Kae,"%TypedArray%":$C,"%TypedArrayPrototype%":$C?$C.prototype:void 0,"%TypeError%":xp,"%TypeErrorPrototype%":xp.prototype,"%Uint8Array%":typeof Uint8Array=="undefined"?void 0:Uint8Array,"%Uint8ArrayPrototype%":typeof Uint8Array=="undefined"?void 0:Uint8Array.prototype,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?void 0:Uint8ClampedArray,"%Uint8ClampedArrayPrototype%":typeof Uint8ClampedArray=="undefined"?void 0:Uint8ClampedArray.prototype,"%Uint16Array%":typeof Uint16Array=="undefined"?void 0:Uint16Array,"%Uint16ArrayPrototype%":typeof Uint16Array=="undefined"?void 0:Uint16Array.prototype,"%Uint32Array%":typeof Uint32Array=="undefined"?void 0:Uint32Array,"%Uint32ArrayPrototype%":typeof Uint32Array=="undefined"?void 0:Uint32Array.prototype,"%URIError%":URIError,"%URIErrorPrototype%":URIError.prototype,"%WeakMap%":typeof WeakMap=="undefined"?void 0:WeakMap,"%WeakMapPrototype%":typeof WeakMap=="undefined"?void 0:WeakMap.prototype,"%WeakSet%":typeof WeakSet=="undefined"?void 0:WeakSet,"%WeakSetPrototype%":typeof WeakSet=="undefined"?void 0:WeakSet.prototype},B7=sB.call(Function.call,String.prototype.replace),Wae=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Yae=/\\(\\)?/g,Zae=function(t){var e=[];return B7(t,Wae,function(r,n,i,o){e[e.length]=i?B7(o,Yae,"$1"):n||r;}),e},Jae=function(t,e){if(!(t in VC))throw new SyntaxError("intrinsic "+t+" does not exist!");if(VC[t]===void 0&&!e)throw new xp("intrinsic "+t+" exists, but is not available. Please file an issue!");return VC[t]},Xae=function(t,e){if(typeof t!="string"||t.length===0)throw new TypeError("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof e!="boolean")throw new TypeError('"allowMissing" argument must be a boolean');for(var r=Zae(t),n=Jae("%"+(r.length>0?r[0]:"")+"%",e),i=1;i<r.length;i+=1)if(n!=null)if(Lu&&i+1>=r.length){var o=Lu(n,r[i]);if(!e&&!(r[i]in n))throw new xp("base intrinsic for "+t+" exists, but the property is not available.");n=o?o.get||o.value:n[r[i]];}else n=n[r[i]];return n},U7=sB,uB=Xae("%Function%"),Qae=uB.apply,ese=uB.call;(cB=function(){return U7.apply(ese,arguments)}).apply=function(){return U7.apply(Qae,arguments)};tse=cB,D7=function(t){return t!=t},rse=(YC=function(t,e){return t===0&&e===0?1/t==1/e:t===e||!(!D7(t)||!D7(e))},YC),nse=(ZC=function(){return typeof Object.is=="function"?Object.is:rse},ZC),ise=Lv,ose=Lv,ase=YC,lB=ZC,sse=function(){var t=nse();return ise(Object,{is:t},{is:function(){return Object.is!==t}}),t},fB=tse(lB(),Object);ose(fB,{getPolyfill:lB,implementation:ase,shim:sse});dB=fB;QC=function(t){return t!=t};cse=QC,use=(eA=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:cse},Lv),lse=eA,fse=Lv,dse=QC,hB=eA,hse=function(){var t=lse();return use(Number,{isNaN:t},{isNaN:function(){return Number.isNaN!==t}}),t},pB=hB();fse(pB,{getPolyfill:hB,implementation:dse,shim:hse});pse=pB,GC={},L7=!1;q7={},F7=!1;yse=/a/g.flags!==void 0,Dv=function(t){var e=[];return t.forEach(function(r){return e.push(r)}),e},H7=function(t){var e=[];return t.forEach(function(r,n){return e.push([n,r])}),e},j7=Object.is?Object.is:dB,Bv=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return []},JC=Number.isNaN?Number.isNaN:pse;Rp=tA(Object.prototype.hasOwnProperty),Uv=tA(Object.prototype.propertyIsEnumerable),$7=tA(Object.prototype.toString),Dn=we.types,gse=Dn.isAnyArrayBuffer,vse=Dn.isArrayBufferView,V7=Dn.isDate,Ov=Dn.isMap,G7=Dn.isRegExp,Nv=Dn.isSet,bse=Dn.isNativeError,wse=Dn.isBoxedPrimitive,K7=Dn.isNumberObject,W7=Dn.isStringObject,Y7=Dn.isBooleanObject,Z7=Dn.isBigIntObject,Ese=Dn.isSymbolObject,_se=Dn.isFloat32Array,Sse=Dn.isFloat64Array;tB={isDeepEqual:function(t,e){return Qi(t,e,!1)},isDeepStrictEqual:function(t,e){return Qi(t,e,!0)}},KC={},rB=!1;ut=XC();ut.AssertionError;ut.deepEqual;ut.deepStrictEqual;ut.doesNotReject;ut.doesNotThrow;ut.equal;ut.fail;ut.ifError;ut.notDeepEqual;ut.notDeepStrictEqual;ut.notEqual;ut.notStrictEqual;ut.ok;ut.rejects;ut.strict;ut.strictEqual;ut.throws;ut.AssertionError;ut.deepEqual;ut.deepStrictEqual;ut.doesNotReject;ut.doesNotThrow;ut.equal;ut.fail;ut.ifError;ut.notDeepEqual;ut.notDeepStrictEqual;ut.notEqual;ut.notStrictEqual;ut.ok;ut.rejects;ut.strict;ut.strictEqual;ut.throws;xse=ut.AssertionError,Ise=ut.deepEqual,Mse=ut.deepStrictEqual,Ose=ut.doesNotReject,Nse=ut.doesNotThrow,kse=ut.equal,Pse=ut.fail,Bse=ut.ifError,Use=ut.notDeepEqual,Dse=ut.notDeepStrictEqual,Lse=ut.notEqual,qse=ut.notStrictEqual,Qt=ut.ok,Fse=ut.rejects,zse=ut.strict,Hse=ut.strictEqual,jse=ut.throws;});var bB=ne((y5e,vB)=>{v();m();y();g();var nd=1e3,id=nd*60,od=id*60,qu=od*24,$se=qu*7,Vse=qu*365.25;vB.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return Gse(t);if(r==="number"&&isFinite(t))return e.long?Wse(t):Kse(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function Gse(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var r=parseFloat(e[1]),n=(e[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*Vse;case"weeks":case"week":case"w":return r*$se;case"days":case"day":case"d":return r*qu;case"hours":case"hour":case"hrs":case"hr":case"h":return r*od;case"minutes":case"minute":case"mins":case"min":case"m":return r*id;case"seconds":case"second":case"secs":case"sec":case"s":return r*nd;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function Kse(t){var e=Math.abs(t);return e>=qu?Math.round(t/qu)+"d":e>=od?Math.round(t/od)+"h":e>=id?Math.round(t/id)+"m":e>=nd?Math.round(t/nd)+"s":t+"ms"}function Wse(t){var e=Math.abs(t);return e>=qu?qv(t,e,qu,"day"):e>=od?qv(t,e,od,"hour"):e>=id?qv(t,e,id,"minute"):e>=nd?qv(t,e,nd,"second"):t+" ms"}function qv(t,e,r,n){var i=e>=r*1.5;return Math.round(t/r)+" "+n+(i?"s":"")}});var EB=ne((E5e,wB)=>{v();m();y();g();function Yse(t){r.debug=r,r.default=r,r.coerce=c,r.disable=o,r.enable=i,r.enabled=a,r.humanize=bB(),r.destroy=u,Object.keys(t).forEach(l=>{r[l]=t[l];}),r.names=[],r.skips=[],r.formatters={};function e(l){let w=0;for(let T=0;T<l.length;T++)w=(w<<5)-w+l.charCodeAt(T),w|=0;return r.colors[Math.abs(w)%r.colors.length]}r.selectColor=e;function r(l){let w,T=null,x,I;function k(...q){if(!k.enabled)return;let j=k,K=Number(new Date),Z=K-(w||K);j.diff=Z,j.prev=w,j.curr=K,w=K,q[0]=r.coerce(q[0]),typeof q[0]!="string"&&q.unshift("%O");let se=0;q[0]=q[0].replace(/%([a-zA-Z%])/g,(Te,pe)=>{if(Te==="%%")return "%";se++;let le=r.formatters[pe];if(typeof le=="function"){let Y=q[se];Te=le.call(j,Y),q.splice(se,1),se--;}return Te}),r.formatArgs.call(j,q),(j.log||r.log).apply(j,q);}return k.namespace=l,k.useColors=r.useColors(),k.color=r.selectColor(l),k.extend=n,k.destroy=r.destroy,Object.defineProperty(k,"enabled",{enumerable:!0,configurable:!1,get:()=>T!==null?T:(x!==r.namespaces&&(x=r.namespaces,I=r.enabled(l)),I),set:q=>{T=q;}}),typeof r.init=="function"&&r.init(k),k}function n(l,w){let T=r(this.namespace+(typeof w=="undefined"?":":w)+l);return T.log=this.log,T}function i(l){r.save(l),r.namespaces=l,r.names=[],r.skips=[];let w,T=(typeof l=="string"?l:"").split(/[\s,]+/),x=T.length;for(w=0;w<x;w++)T[w]&&(l=T[w].replace(/\*/g,".*?"),l[0]==="-"?r.skips.push(new RegExp("^"+l.slice(1)+"$")):r.names.push(new RegExp("^"+l+"$")));}function o(){let l=[...r.names.map(s),...r.skips.map(s).map(w=>"-"+w)].join(",");return r.enable(""),l}function a(l){if(l[l.length-1]==="*")return !0;let w,T;for(w=0,T=r.skips.length;w<T;w++)if(r.skips[w].test(l))return !1;for(w=0,T=r.names.length;w<T;w++)if(r.names[w].test(l))return !0;return !1}function s(l){return l.toString().substring(2,l.toString().length-2).replace(/\.\*\?$/,"*")}function c(l){return l instanceof Error?l.stack||l.message:l}function u(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");}return r.enable(r.load()),r}wB.exports=Yse;});var rA=ne((wi,Fv)=>{v();m();y();g();wi.formatArgs=Jse;wi.save=Xse;wi.load=Qse;wi.useColors=Zse;wi.storage=ece();wi.destroy=(()=>{let t=!1;return ()=>{t||(t=!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`."));}})();wi.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"];function Zse(){if(typeof window!="undefined"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return !0;if(typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return !1;let t;return 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&&(t=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(t[1],10)>=31||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function Jse(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+Fv.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;t.splice(1,0,e,"color: inherit");let r=0,n=0;t[0].replace(/%[a-zA-Z%]/g,i=>{i!=="%%"&&(r++,i==="%c"&&(n=r));}),t.splice(n,0,e);}wi.log=console.debug||console.log||(()=>{});function Xse(t){try{t?wi.storage.setItem("debug",t):wi.storage.removeItem("debug");}catch(e){}}function Qse(){let t;try{t=wi.storage.getItem("debug");}catch(e){}return !t&&typeof N!="undefined"&&"env"in N&&(t=N.env.DEBUG),t}function ece(){try{return localStorage}catch(t){}}Fv.exports=EB()(wi);var{formatters:tce}=Fv.exports;tce.j=function(t){try{return JSON.stringify(t)}catch(e){return "[UnexpectedJSONParseError]: "+e.message}};});var oA=ne(to=>{v();m();y();g();to.fetch=Ip(globalThis.fetch)&&Ip(globalThis.ReadableStream);to.writableStream=Ip(globalThis.WritableStream);to.abortController=Ip(globalThis.AbortController);var oc;function nA(){if(oc!==void 0)return oc;if(globalThis.XMLHttpRequest){oc=new globalThis.XMLHttpRequest;try{oc.open("GET",globalThis.XDomainRequest?"/":"https://example.com");}catch(t){oc=null;}}else oc=null;return oc}function iA(t){var e=nA();if(!e)return !1;try{return e.responseType=t,e.responseType===t}catch(r){}return !1}to.arraybuffer=to.fetch||iA("arraybuffer");to.msstream=!to.fetch&&iA("ms-stream");to.mozchunkedarraybuffer=!to.fetch&&iA("moz-chunked-arraybuffer");to.overrideMimeType=to.fetch||(nA()?Ip(nA().overrideMimeType):!1);function Ip(t){return typeof t=="function"}oc=null;});var cA=ne(sA=>{v();m();y();g();var _B=oA(),rce=yt(),SB=Oy(),zv=sA.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},aA=sA.IncomingMessage=function(t,e,r,n){var i=this;if(SB.Readable.call(i),i._mode=r,i.headers={},i.rawHeaders=[],i.trailers={},i.rawTrailers=[],i.on("end",function(){N.nextTick(function(){i.emit("close");});}),r==="fetch"){let w=function(){a.read().then(function(T){if(!i._destroyed){if(n(T.done),T.done){i.push(null);return}i.push(D.Buffer.from(T.value)),w();}}).catch(function(T){n(!0),i._destroyed||i.emit("error",T);});};if(i._fetchResponse=e,i.url=e.url,i.statusCode=e.status,i.statusMessage=e.statusText,e.headers.forEach(function(T,x){i.headers[x.toLowerCase()]=T,i.rawHeaders.push(x,T);}),_B.writableStream){var o=new WritableStream({write:function(T){return n(!1),new Promise(function(x,I){i._destroyed?I():i.push(D.Buffer.from(T))?x():i._resumeFetch=x;})},close:function(){n(!0),i._destroyed||i.push(null);},abort:function(T){n(!0),i._destroyed||i.emit("error",T);}});try{e.body.pipeTo(o).catch(function(T){n(!0),i._destroyed||i.emit("error",T);});return}catch(T){}}var a=e.body.getReader();w();}else {i._xhr=t,i._pos=0,i.url=t.responseURL,i.statusCode=t.status,i.statusMessage=t.statusText;var s=t.getAllResponseHeaders().split(/\r?\n/);if(s.forEach(function(w){var T=w.match(/^([^:]+):\s*(.*)/);if(T){var x=T[1].toLowerCase();x==="set-cookie"?(i.headers[x]===void 0&&(i.headers[x]=[]),i.headers[x].push(T[2])):i.headers[x]!==void 0?i.headers[x]+=", "+T[2]:i.headers[x]=T[2],i.rawHeaders.push(T[1],T[2]);}}),i._charset="x-user-defined",!_B.overrideMimeType){var c=i.rawHeaders["mime-type"];if(c){var u=c.match(/;\s*charset=([^;])(;|$)/);u&&(i._charset=u[1].toLowerCase());}i._charset||(i._charset="utf-8");}}};rce(aA,SB.Readable);aA.prototype._read=function(){var t=this,e=t._resumeFetch;e&&(t._resumeFetch=null,e());};aA.prototype._onXHRProgress=function(t){var e=this,r=e._xhr,n=null;switch(e._mode){case"text":if(n=r.responseText,n.length>e._pos){var i=n.substr(e._pos);if(e._charset==="x-user-defined"){for(var o=D.Buffer.alloc(i.length),a=0;a<i.length;a++)o[a]=i.charCodeAt(a)&255;e.push(o);}else e.push(i,e._charset);e._pos=n.length;}break;case"arraybuffer":if(r.readyState!==zv.DONE||!r.response)break;n=r.response,e.push(D.Buffer.from(new Uint8Array(n)));break;case"moz-chunked-arraybuffer":if(n=r.response,r.readyState!==zv.LOADING||!n)break;e.push(D.Buffer.from(new Uint8Array(n)));break;case"ms-stream":if(n=r.response,r.readyState!==zv.LOADING)break;var s=new globalThis.MSStreamReader;s.onprogress=function(){s.result.byteLength>e._pos&&(e.push(D.Buffer.from(new Uint8Array(s.result.slice(e._pos)))),e._pos=s.result.byteLength);},s.onload=function(){t(!0),e.push(null);},s.readAsArrayBuffer(n);break}e._xhr.readyState===zv.DONE&&e._mode!=="ms-stream"&&(t(!0),e.push(null));};});var RB=ne((F5e,TB)=>{v();m();y();g();var Fu=oA(),nce=yt(),AB=cA(),uA=Oy(),ice=AB.IncomingMessage,CB=AB.readyStates;function oce(t,e){return Fu.fetch&&e?"fetch":Fu.mozchunkedarraybuffer?"moz-chunked-arraybuffer":Fu.msstream?"ms-stream":Fu.arraybuffer&&t?"arraybuffer":"text"}var Nn=TB.exports=function(t){var e=this;uA.Writable.call(e),e._opts=t,e._body=[],e._headers={},t.auth&&e.setHeader("Authorization","Basic "+D.Buffer.from(t.auth).toString("base64")),Object.keys(t.headers).forEach(function(i){e.setHeader(i,t.headers[i]);});var r,n=!0;if(t.mode==="disable-fetch"||"requestTimeout"in t&&!Fu.abortController)n=!1,r=!0;else if(t.mode==="prefer-streaming")r=!1;else if(t.mode==="allow-wrong-content-type")r=!Fu.overrideMimeType;else if(!t.mode||t.mode==="default"||t.mode==="prefer-fast")r=!0;else throw new Error("Invalid value for opts.mode");e._mode=oce(r,n),e._fetchTimer=null,e._socketTimeout=null,e._socketTimer=null,e.on("finish",function(){e._onFinish();});};nce(Nn,uA.Writable);Nn.prototype.setHeader=function(t,e){var r=this,n=t.toLowerCase();sce.indexOf(n)===-1&&(r._headers[n]={name:t,value:e});};Nn.prototype.getHeader=function(t){var e=this._headers[t.toLowerCase()];return e?e.value:null};Nn.prototype.removeHeader=function(t){var e=this;delete e._headers[t.toLowerCase()];};Nn.prototype._onFinish=function(){var t=this;if(!t._destroyed){var e=t._opts;"timeout"in e&&e.timeout!==0&&t.setTimeout(e.timeout);var r=t._headers,n=null;e.method!=="GET"&&e.method!=="HEAD"&&(n=new Blob(t._body,{type:(r["content-type"]||{}).value||""}));var i=[];if(Object.keys(r).forEach(function(c){var u=r[c].name,l=r[c].value;Array.isArray(l)?l.forEach(function(w){i.push([u,w]);}):i.push([u,l]);}),t._mode==="fetch"){var o=null;if(Fu.abortController){var a=new AbortController;o=a.signal,t._fetchAbortController=a,"requestTimeout"in e&&e.requestTimeout!==0&&(t._fetchTimer=globalThis.setTimeout(function(){t.emit("requestTimeout"),t._fetchAbortController&&t._fetchAbortController.abort();},e.requestTimeout));}globalThis.fetch(t._opts.url,{method:t._opts.method,headers:i,body:n||void 0,mode:"cors",credentials:e.withCredentials?"include":"same-origin",signal:o}).then(function(c){t._fetchResponse=c,t._resetTimers(!1),t._connect();},function(c){t._resetTimers(!0),t._destroyed||t.emit("error",c);});}else {var s=t._xhr=new globalThis.XMLHttpRequest;try{s.open(t._opts.method,t._opts.url,!0);}catch(c){N.nextTick(function(){t.emit("error",c);});return}"responseType"in s&&(s.responseType=t._mode),"withCredentials"in s&&(s.withCredentials=!!e.withCredentials),t._mode==="text"&&"overrideMimeType"in s&&s.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in e&&(s.timeout=e.requestTimeout,s.ontimeout=function(){t.emit("requestTimeout");}),i.forEach(function(c){s.setRequestHeader(c[0],c[1]);}),t._response=null,s.onreadystatechange=function(){switch(s.readyState){case CB.LOADING:case CB.DONE:t._onXHRProgress();break}},t._mode==="moz-chunked-arraybuffer"&&(s.onprogress=function(){t._onXHRProgress();}),s.onerror=function(){t._destroyed||(t._resetTimers(!0),t.emit("error",new Error("XHR error")));};try{s.send(n);}catch(c){N.nextTick(function(){t.emit("error",c);});return}}}};function ace(t){try{var e=t.status;return e!==null&&e!==0}catch(r){return !1}}Nn.prototype._onXHRProgress=function(){var t=this;t._resetTimers(!1),!(!ace(t._xhr)||t._destroyed)&&(t._response||t._connect(),t._response._onXHRProgress(t._resetTimers.bind(t)));};Nn.prototype._connect=function(){var t=this;t._destroyed||(t._response=new ice(t._xhr,t._fetchResponse,t._mode,t._resetTimers.bind(t)),t._response.on("error",function(e){t.emit("error",e);}),t.emit("response",t._response));};Nn.prototype._write=function(t,e,r){var n=this;n._body.push(t),r();};Nn.prototype._resetTimers=function(t){var e=this;globalThis.clearTimeout(e._socketTimer),e._socketTimer=null,t?(globalThis.clearTimeout(e._fetchTimer),e._fetchTimer=null):e._socketTimeout&&(e._socketTimer=globalThis.setTimeout(function(){e.emit("timeout");},e._socketTimeout));};Nn.prototype.abort=Nn.prototype.destroy=function(t){var e=this;e._destroyed=!0,e._resetTimers(!0),e._response&&(e._response._destroyed=!0),e._xhr?e._xhr.abort():e._fetchAbortController&&e._fetchAbortController.abort(),t&&e.emit("error",t);};Nn.prototype.end=function(t,e,r){var n=this;typeof t=="function"&&(r=t,t=void 0),uA.Writable.prototype.end.call(n,t,e,r);};Nn.prototype.setTimeout=function(t,e){var r=this;e&&r.once("timeout",e),r._socketTimeout=t,r._resetTimers(!1);};Nn.prototype.flushHeaders=function(){};Nn.prototype.setNoDelay=function(){};Nn.prototype.setSocketKeepAlive=function(){};var sce=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"];});var IB=ne((V5e,xB)=>{v();m();y();g();xB.exports=uce;var cce=Object.prototype.hasOwnProperty;function uce(){for(var t={},e=0;e<arguments.length;e++){var r=arguments[e];for(var n in r)cce.call(r,n)&&(t[n]=r[n]);}return t}});var OB=ne((Z5e,MB)=>{v();m();y();g();MB.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"};});function zu(t){throw new RangeError(hce[t])}function NB(t,e){let r=t.split("@"),n="";r.length>1&&(n=r[0]+"@",t=r[1]);let i=function(o,a){let s=[],c=o.length;for(;c--;)s[c]=a(o[c]);return s}((t=t.replace(dce,".")).split("."),e).join(".");return n+i}function UB(t){let e=[],r=0,n=t.length;for(;r<n;){let i=t.charCodeAt(r++);if(i>=55296&&i<=56319&&r<n){let o=t.charCodeAt(r++);(64512&o)==56320?e.push(((1023&i)<<10)+(1023&o)+65536):(e.push(i),r--);}else e.push(i);}return e}var lce,fce,dce,hce,ga,lA,kB,DB,PB,BB,ac,fA=Ur(()=>{v();m();y();g();lce=/^xn--/,fce=/[^\0-\x7E]/,dce=/[\x2E\u3002\uFF0E\uFF61]/g,hce={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},ga=Math.floor,lA=String.fromCharCode;kB=function(t,e){return t+22+75*(t<26)-((e!=0)<<5)},DB=function(t,e,r){let n=0;for(t=r?ga(t/700):t>>1,t+=ga(t/e);t>455;n+=36)t=ga(t/35);return ga(n+36*t/(t+38))},PB=function(t){let e=[],r=t.length,n=0,i=128,o=72,a=t.lastIndexOf("-");a<0&&(a=0);for(let c=0;c<a;++c)t.charCodeAt(c)>=128&&zu("not-basic"),e.push(t.charCodeAt(c));for(let c=a>0?a+1:0;c<r;){let u=n;for(let w=1,T=36;;T+=36){c>=r&&zu("invalid-input");let x=(s=t.charCodeAt(c++))-48<10?s-22:s-65<26?s-65:s-97<26?s-97:36;(x>=36||x>ga((2147483647-n)/w))&&zu("overflow"),n+=x*w;let I=T<=o?1:T>=o+26?26:T-o;if(x<I)break;let k=36-I;w>ga(2147483647/k)&&zu("overflow"),w*=k;}let l=e.length+1;o=DB(n-u,l,u==0),ga(n/l)>2147483647-i&&zu("overflow"),i+=ga(n/l),n%=l,e.splice(n++,0,i);}var s;return String.fromCodePoint(...e)},BB=function(t){let e=[],r=(t=UB(t)).length,n=128,i=0,o=72;for(let c of t)c<128&&e.push(lA(c));let a=e.length,s=a;for(a&&e.push("-");s<r;){let c=2147483647;for(let l of t)l>=n&&l<c&&(c=l);let u=s+1;c-n>ga((2147483647-i)/u)&&zu("overflow"),i+=(c-n)*u,n=c;for(let l of t)if(l<n&&++i>2147483647&&zu("overflow"),l==n){let w=i;for(let T=36;;T+=36){let x=T<=o?1:T>=o+26?26:T-o;if(w<x)break;let I=w-x,k=36-x;e.push(lA(kB(x+I%k,0))),w=ga(I/k);}e.push(lA(kB(w,0))),o=DB(i,u,s==a),i=0,++s;}++i,++n;}return e.join("")},ac={version:"2.1.0",ucs2:{decode:UB,encode:t=>String.fromCodePoint(...t)},decode:PB,encode:BB,toASCII:function(t){return NB(t,function(e){return fce.test(e)?"xn--"+BB(e):e})},toUnicode:function(t){return NB(t,function(e){return lce.test(e)?PB(e.slice(4).toLowerCase()):e})}};ac.decode;ac.encode;ac.toASCII;ac.toUnicode;ac.ucs2;ac.version;});function pce(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var mce,Mp,yce,va,dA=Ur(()=>{v();m();y();g();mce=function(t,e,r,n){e=e||"&",r=r||"=";var i={};if(typeof t!="string"||t.length===0)return i;var o=/\+/g;t=t.split(e);var a=1e3;n&&typeof n.maxKeys=="number"&&(a=n.maxKeys);var s=t.length;a>0&&s>a&&(s=a);for(var c=0;c<s;++c){var u,l,w,T,x=t[c].replace(o,"%20"),I=x.indexOf(r);I>=0?(u=x.substr(0,I),l=x.substr(I+1)):(u=x,l=""),w=decodeURIComponent(u),T=decodeURIComponent(l),pce(i,w)?Array.isArray(i[w])?i[w].push(T):i[w]=[i[w],T]:i[w]=T;}return i},Mp=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return ""}},yce=function(t,e,r,n){return e=e||"&",r=r||"=",t===null&&(t=void 0),typeof t=="object"?Object.keys(t).map(function(i){var o=encodeURIComponent(Mp(i))+r;return Array.isArray(t[i])?t[i].map(function(a){return o+encodeURIComponent(Mp(a))}).join(e):o+encodeURIComponent(Mp(t[i]))}).join(e):n?encodeURIComponent(Mp(n))+r+encodeURIComponent(Mp(t)):""},va={};va.decode=va.parse=mce,va.encode=va.stringify=yce;va.decode;va.encode;va.parse;va.stringify;});function gce(){if(LB)return hA;LB=!0;var t=hA={},e,r;function n(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?e=setTimeout:e=n;}catch(k){e=n;}try{typeof clearTimeout=="function"?r=clearTimeout:r=i;}catch(k){r=i;}})();function o(k){if(e===setTimeout)return setTimeout(k,0);if((e===n||!e)&&setTimeout)return e=setTimeout,setTimeout(k,0);try{return e(k,0)}catch(q){try{return e.call(null,k,0)}catch(j){return e.call(this||ad,k,0)}}}function a(k){if(r===clearTimeout)return clearTimeout(k);if((r===i||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(k);try{return r(k)}catch(q){try{return r.call(null,k)}catch(j){return r.call(this||ad,k)}}}var s=[],c=!1,u,l=-1;function w(){!c||!u||(c=!1,u.length?s=u.concat(s):l=-1,s.length&&T());}function T(){if(!c){var k=o(w);c=!0;for(var q=s.length;q;){for(u=s,s=[];++l<q;)u&&u[l].run();l=-1,q=s.length;}u=null,c=!1,a(k);}}t.nextTick=function(k){var q=new Array(arguments.length-1);if(arguments.length>1)for(var j=1;j<arguments.length;j++)q[j-1]=arguments[j];s.push(new x(k,q)),s.length===1&&!c&&o(T);};function x(k,q){(this||ad).fun=k,(this||ad).array=q;}x.prototype.run=function(){(this||ad).fun.apply(null,(this||ad).array);},t.title="browser",t.browser=!0,t.env={},t.argv=[],t.version="",t.versions={};function I(){}return t.on=I,t.addListener=I,t.once=I,t.off=I,t.removeListener=I,t.removeAllListeners=I,t.emit=I,t.prependListener=I,t.prependOnceListener=I,t.listeners=function(k){return []},t.binding=function(k){throw new Error("process.binding is not supported")},t.cwd=function(){return "/"},t.chdir=function(k){throw new Error("process.chdir is not supported")},t.umask=function(){return 0},hA}var hA,LB,ad,zt,Hu=Ur(()=>{v();m();y();g();hA={},LB=!1,ad=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:globalThis;zt=gce();zt.platform="browser";zt.addListener;zt.argv;zt.binding;zt.browser;zt.chdir;zt.cwd;zt.emit;zt.env;zt.listeners;zt.nextTick;zt.off;zt.on;zt.once;zt.prependListener;zt.prependOnceListener;zt.removeAllListeners;zt.removeListener;zt.title;zt.umask;zt.version;zt.versions;});function vce(){if(qB)return pA;qB=!0;var t=zt;function e(o){if(typeof o!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(o))}function r(o,a){for(var s="",c=0,u=-1,l=0,w,T=0;T<=o.length;++T){if(T<o.length)w=o.charCodeAt(T);else {if(w===47)break;w=47;}if(w===47){if(!(u===T-1||l===1))if(u!==T-1&&l===2){if(s.length<2||c!==2||s.charCodeAt(s.length-1)!==46||s.charCodeAt(s.length-2)!==46){if(s.length>2){var x=s.lastIndexOf("/");if(x!==s.length-1){x===-1?(s="",c=0):(s=s.slice(0,x),c=s.length-1-s.lastIndexOf("/")),u=T,l=0;continue}}else if(s.length===2||s.length===1){s="",c=0,u=T,l=0;continue}}a&&(s.length>0?s+="/..":s="..",c=2);}else s.length>0?s+="/"+o.slice(u+1,T):s=o.slice(u+1,T),c=T-u-1;u=T,l=0;}else w===46&&l!==-1?++l:l=-1;}return s}function n(o,a){var s=a.dir||a.root,c=a.base||(a.name||"")+(a.ext||"");return s?s===a.root?s+c:s+o+c:c}var i={resolve:function(){for(var a="",s=!1,c,u=arguments.length-1;u>=-1&&!s;u--){var l;u>=0?l=arguments[u]:(c===void 0&&(c=t.cwd()),l=c),e(l),l.length!==0&&(a=l+"/"+a,s=l.charCodeAt(0)===47);}return a=r(a,!s),s?a.length>0?"/"+a:"/":a.length>0?a:"."},normalize:function(a){if(e(a),a.length===0)return ".";var s=a.charCodeAt(0)===47,c=a.charCodeAt(a.length-1)===47;return a=r(a,!s),a.length===0&&!s&&(a="."),a.length>0&&c&&(a+="/"),s?"/"+a:a},isAbsolute:function(a){return e(a),a.length>0&&a.charCodeAt(0)===47},join:function(){if(arguments.length===0)return ".";for(var a,s=0;s<arguments.length;++s){var c=arguments[s];e(c),c.length>0&&(a===void 0?a=c:a+="/"+c);}return a===void 0?".":i.normalize(a)},relative:function(a,s){if(e(a),e(s),a===s||(a=i.resolve(a),s=i.resolve(s),a===s))return "";for(var c=1;c<a.length&&a.charCodeAt(c)===47;++c);for(var u=a.length,l=u-c,w=1;w<s.length&&s.charCodeAt(w)===47;++w);for(var T=s.length,x=T-w,I=l<x?l:x,k=-1,q=0;q<=I;++q){if(q===I){if(x>I){if(s.charCodeAt(w+q)===47)return s.slice(w+q+1);if(q===0)return s.slice(w+q)}else l>I&&(a.charCodeAt(c+q)===47?k=q:q===0&&(k=0));break}var j=a.charCodeAt(c+q),K=s.charCodeAt(w+q);if(j!==K)break;j===47&&(k=q);}var Z="";for(q=c+k+1;q<=u;++q)(q===u||a.charCodeAt(q)===47)&&(Z.length===0?Z+="..":Z+="/..");return Z.length>0?Z+s.slice(w+k):(w+=k,s.charCodeAt(w)===47&&++w,s.slice(w))},_makeLong:function(a){return a},dirname:function(a){if(e(a),a.length===0)return ".";for(var s=a.charCodeAt(0),c=s===47,u=-1,l=!0,w=a.length-1;w>=1;--w)if(s=a.charCodeAt(w),s===47){if(!l){u=w;break}}else l=!1;return u===-1?c?"/":".":c&&u===1?"//":a.slice(0,u)},basename:function(a,s){if(s!==void 0&&typeof s!="string")throw new TypeError('"ext" argument must be a string');e(a);var c=0,u=-1,l=!0,w;if(s!==void 0&&s.length>0&&s.length<=a.length){if(s.length===a.length&&s===a)return "";var T=s.length-1,x=-1;for(w=a.length-1;w>=0;--w){var I=a.charCodeAt(w);if(I===47){if(!l){c=w+1;break}}else x===-1&&(l=!1,x=w+1),T>=0&&(I===s.charCodeAt(T)?--T===-1&&(u=w):(T=-1,u=x));}return c===u?u=x:u===-1&&(u=a.length),a.slice(c,u)}else {for(w=a.length-1;w>=0;--w)if(a.charCodeAt(w)===47){if(!l){c=w+1;break}}else u===-1&&(l=!1,u=w+1);return u===-1?"":a.slice(c,u)}},extname:function(a){e(a);for(var s=-1,c=0,u=-1,l=!0,w=0,T=a.length-1;T>=0;--T){var x=a.charCodeAt(T);if(x===47){if(!l){c=T+1;break}continue}u===-1&&(l=!1,u=T+1),x===46?s===-1?s=T:w!==1&&(w=1):s!==-1&&(w=-1);}return s===-1||u===-1||w===0||w===1&&s===u-1&&s===c+1?"":a.slice(s,u)},format:function(a){if(a===null||typeof a!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof a);return n("/",a)},parse:function(a){e(a);var s={root:"",dir:"",base:"",ext:"",name:""};if(a.length===0)return s;var c=a.charCodeAt(0),u=c===47,l;u?(s.root="/",l=1):l=0;for(var w=-1,T=0,x=-1,I=!0,k=a.length-1,q=0;k>=l;--k){if(c=a.charCodeAt(k),c===47){if(!I){T=k+1;break}continue}x===-1&&(I=!1,x=k+1),c===46?w===-1?w=k:q!==1&&(q=1):w!==-1&&(q=-1);}return w===-1||x===-1||q===0||q===1&&w===x-1&&w===T+1?x!==-1&&(T===0&&u?s.base=s.name=a.slice(1,x):s.base=s.name=a.slice(T,x)):(T===0&&u?(s.name=a.slice(1,w),s.base=a.slice(1,x)):(s.name=a.slice(T,w),s.base=a.slice(T,x)),s.ext=a.slice(w,x)),T>0?s.dir=a.slice(0,T-1):u&&(s.dir="/"),s},sep:"/",delimiter:":",win32:null,posix:null};return i.posix=i,pA=i,pA}var pA,qB,br,Op=Ur(()=>{v();m();y();g();Hu();pA={},qB=!1;br=vce();});var jv={};Cr(jv,{URL:()=>Wce,Url:()=>jce,default:()=>rr,fileURLToPath:()=>Hv,format:()=>$ce,parse:()=>Kce,pathToFileURL:()=>VB,resolve:()=>Vce,resolveObject:()=>Gce});function ro(){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;}function Np(t,e,r){if(t&&ba.isObject(t)&&t instanceof ro)return t;var n=new ro;return n.parse(t,e,r),n}function Tce(){if(jB)return gA;jB=!0;var t=cr;function e(o){if(typeof o!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(o))}function r(o,a){for(var s="",c=0,u=-1,l=0,w,T=0;T<=o.length;++T){if(T<o.length)w=o.charCodeAt(T);else {if(w===47)break;w=47;}if(w===47){if(!(u===T-1||l===1))if(u!==T-1&&l===2){if(s.length<2||c!==2||s.charCodeAt(s.length-1)!==46||s.charCodeAt(s.length-2)!==46){if(s.length>2){var x=s.lastIndexOf("/");if(x!==s.length-1){x===-1?(s="",c=0):(s=s.slice(0,x),c=s.length-1-s.lastIndexOf("/")),u=T,l=0;continue}}else if(s.length===2||s.length===1){s="",c=0,u=T,l=0;continue}}a&&(s.length>0?s+="/..":s="..",c=2);}else s.length>0?s+="/"+o.slice(u+1,T):s=o.slice(u+1,T),c=T-u-1;u=T,l=0;}else w===46&&l!==-1?++l:l=-1;}return s}function n(o,a){var s=a.dir||a.root,c=a.base||(a.name||"")+(a.ext||"");return s?s===a.root?s+c:s+o+c:c}var i={resolve:function(){for(var a="",s=!1,c,u=arguments.length-1;u>=-1&&!s;u--){var l;u>=0?l=arguments[u]:(c===void 0&&(c=t.cwd()),l=c),e(l),l.length!==0&&(a=l+"/"+a,s=l.charCodeAt(0)===47);}return a=r(a,!s),s?a.length>0?"/"+a:"/":a.length>0?a:"."},normalize:function(a){if(e(a),a.length===0)return ".";var s=a.charCodeAt(0)===47,c=a.charCodeAt(a.length-1)===47;return a=r(a,!s),a.length===0&&!s&&(a="."),a.length>0&&c&&(a+="/"),s?"/"+a:a},isAbsolute:function(a){return e(a),a.length>0&&a.charCodeAt(0)===47},join:function(){if(arguments.length===0)return ".";for(var a,s=0;s<arguments.length;++s){var c=arguments[s];e(c),c.length>0&&(a===void 0?a=c:a+="/"+c);}return a===void 0?".":i.normalize(a)},relative:function(a,s){if(e(a),e(s),a===s||(a=i.resolve(a),s=i.resolve(s),a===s))return "";for(var c=1;c<a.length&&a.charCodeAt(c)===47;++c);for(var u=a.length,l=u-c,w=1;w<s.length&&s.charCodeAt(w)===47;++w);for(var T=s.length,x=T-w,I=l<x?l:x,k=-1,q=0;q<=I;++q){if(q===I){if(x>I){if(s.charCodeAt(w+q)===47)return s.slice(w+q+1);if(q===0)return s.slice(w+q)}else l>I&&(a.charCodeAt(c+q)===47?k=q:q===0&&(k=0));break}var j=a.charCodeAt(c+q),K=s.charCodeAt(w+q);if(j!==K)break;j===47&&(k=q);}var Z="";for(q=c+k+1;q<=u;++q)(q===u||a.charCodeAt(q)===47)&&(Z.length===0?Z+="..":Z+="/..");return Z.length>0?Z+s.slice(w+k):(w+=k,s.charCodeAt(w)===47&&++w,s.slice(w))},_makeLong:function(a){return a},dirname:function(a){if(e(a),a.length===0)return ".";for(var s=a.charCodeAt(0),c=s===47,u=-1,l=!0,w=a.length-1;w>=1;--w)if(s=a.charCodeAt(w),s===47){if(!l){u=w;break}}else l=!1;return u===-1?c?"/":".":c&&u===1?"//":a.slice(0,u)},basename:function(a,s){if(s!==void 0&&typeof s!="string")throw new TypeError('"ext" argument must be a string');e(a);var c=0,u=-1,l=!0,w;if(s!==void 0&&s.length>0&&s.length<=a.length){if(s.length===a.length&&s===a)return "";var T=s.length-1,x=-1;for(w=a.length-1;w>=0;--w){var I=a.charCodeAt(w);if(I===47){if(!l){c=w+1;break}}else x===-1&&(l=!1,x=w+1),T>=0&&(I===s.charCodeAt(T)?--T===-1&&(u=w):(T=-1,u=x));}return c===u?u=x:u===-1&&(u=a.length),a.slice(c,u)}else {for(w=a.length-1;w>=0;--w)if(a.charCodeAt(w)===47){if(!l){c=w+1;break}}else u===-1&&(l=!1,u=w+1);return u===-1?"":a.slice(c,u)}},extname:function(a){e(a);for(var s=-1,c=0,u=-1,l=!0,w=0,T=a.length-1;T>=0;--T){var x=a.charCodeAt(T);if(x===47){if(!l){c=T+1;break}continue}u===-1&&(l=!1,u=T+1),x===46?s===-1?s=T:w!==1&&(w=1):s!==-1&&(w=-1);}return s===-1||u===-1||w===0||w===1&&s===u-1&&s===c+1?"":a.slice(s,u)},format:function(a){if(a===null||typeof a!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof a);return n("/",a)},parse:function(a){e(a);var s={root:"",dir:"",base:"",ext:"",name:""};if(a.length===0)return s;var c=a.charCodeAt(0),u=c===47,l;u?(s.root="/",l=1):l=0;for(var w=-1,T=0,x=-1,I=!0,k=a.length-1,q=0;k>=l;--k){if(c=a.charCodeAt(k),c===47){if(!I){T=k+1;break}continue}x===-1&&(I=!1,x=k+1),c===46?w===-1?w=k:q!==1&&(q=1):w!==-1&&(q=-1);}return w===-1||x===-1||q===0||q===1&&w===x-1&&w===T+1?x!==-1&&(T===0&&u?s.base=s.name=a.slice(1,x):s.base=s.name=a.slice(T,x)):(T===0&&u?(s.name=a.slice(1,w),s.base=a.slice(1,x)):(s.name=a.slice(T,w),s.base=a.slice(T,x)),s.ext=a.slice(w,x)),T>0?s.dir=a.slice(0,T-1):u&&(s.dir="/"),s},sep:"/",delimiter:":",win32:null,posix:null};return i.posix=i,gA=i,gA}function Lce(t){if(typeof t=="string")t=new URL(t);else if(!(t instanceof URL))throw new Deno.errors.InvalidData("invalid argument path , must be a string or URL");if(t.protocol!=="file:")throw new Deno.errors.InvalidData("invalid url scheme");return bA?qce(t):Fce(t)}function qce(t){let e=t.hostname,r=t.pathname;for(let n=0;n<r.length;n++)if(r[n]==="%"){let i=r.codePointAt(n+2)||32;if(r[n+1]==="2"&&i===102||r[n+1]==="5"&&i===99)throw new Deno.errors.InvalidData("must not include encoded \\ or / characters")}if(r=r.replace(Nce,"\\"),r=decodeURIComponent(r),e!=="")return `\\\\${e}${r}`;{let n=r.codePointAt(1)|32,i=r[2];if(n<Mce||n>Oce||i!==":")throw new Deno.errors.InvalidData("file url path must be absolute");return r.slice(1)}}function Fce(t){if(t.hostname!=="")throw new Deno.errors.InvalidData("invalid file url hostname");let e=t.pathname;for(let r=0;r<e.length;r++)if(e[r]==="%"){let n=e.codePointAt(r+2)||32;if(e[r+1]==="2"&&n===102)throw new Deno.errors.InvalidData("must not include encoded / characters")}return decodeURIComponent(e)}function zce(t){let e=$B.resolve(t),r=t.charCodeAt(t.length-1);(r===Ice||bA&&r===xce)&&e[e.length-1]!==$B.sep&&(e+="/");let n=new URL("file://");return e.includes("%")&&(e=e.replace(kce,"%25")),!bA&&e.includes("\\")&&(e=e.replace(Pce,"%5C")),e.includes(`
`)&&(e=e.replace(Bce,"%0A")),e.includes("\r")&&(e=e.replace(Uce,"%0D")),e.includes(" ")&&(e=e.replace(Dce,"%09")),n.pathname=e,n}function Hv(t){if(typeof t=="string")t=new URL(t);else if(!(t instanceof URL))throw new Deno.errors.InvalidData("invalid argument path , must be a string or URL");if(t.protocol!=="file:")throw new Deno.errors.InvalidData("invalid url scheme");return wA?oue(t):aue(t)}function oue(t){let e=t.hostname,r=t.pathname;for(let n=0;n<r.length;n++)if(r[n]==="%"){let i=r.codePointAt(n+2)||32;if(r[n+1]==="2"&&i===102||r[n+1]==="5"&&i===99)throw new Deno.errors.InvalidData("must not include encoded \\ or / characters")}if(r=r.replace(Qce,"\\"),r=decodeURIComponent(r),e!=="")return `\\\\${e}${r}`;{let n=r.codePointAt(1)|32,i=r[2];if(n<Jce||n>Xce||i!==":")throw new Deno.errors.InvalidData("file url path must be absolute");return r.slice(1)}}function aue(t){if(t.hostname!=="")throw new Deno.errors.InvalidData("invalid file url hostname");let e=t.pathname;for(let r=0;r<e.length;r++)if(e[r]==="%"){let n=e.codePointAt(r+2)||32;if(e[r+1]==="2"&&n===102)throw new Deno.errors.InvalidData("must not include encoded / characters")}return decodeURIComponent(e)}function VB(t){let e=br.resolve(t),r=t.charCodeAt(t.length-1);(r===Zce||wA&&r===Yce)&&e[e.length-1]!==br.sep&&(e+="/");let n=new URL("file://");return e.includes("%")&&(e=e.replace(eue,"%25")),!wA&&e.includes("\\")&&(e=e.replace(tue,"%5C")),e.includes(`
`)&&(e=e.replace(rue,"%0A")),e.includes("\r")&&(e=e.replace(nue,"%0D")),e.includes(" ")&&(e=e.replace(iue,"%09")),n.pathname=e,n}var rr,bce,ba,wce,Ece,_ce,Sce,vA,FB,zB,HB,Cce,Ace,mA,sd,yA,gA,jB,$B,Rce,xce,Ice,Mce,Oce,bA,Nce,kce,Pce,Bce,Uce,Dce,Hce,jce,$ce,Vce,Gce,Kce,Wce,Yce,Zce,Jce,Xce,wA,Qce,eue,tue,rue,nue,iue,kp=Ur(()=>{v();m();y();g();fA();dA();Ps();Op();Hu();rr={},bce=ac,ba={isString:function(t){return typeof t=="string"},isObject:function(t){return typeof t=="object"&&t!==null},isNull:function(t){return t===null},isNullOrUndefined:function(t){return t==null}};rr.parse=Np,rr.resolve=function(t,e){return Np(t,!1,!0).resolve(e)},rr.resolveObject=function(t,e){return t?Np(t,!1,!0).resolveObject(e):e},rr.format=function(t){return ba.isString(t)&&(t=Np(t)),t instanceof ro?t.format():ro.prototype.format.call(t)},rr.Url=ro;wce=/^([a-z0-9.+-]+:)/i,Ece=/:[0-9]*$/,_ce=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,Sce=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r",`
`," "]),vA=["'"].concat(Sce),FB=["%","/","?",";","#"].concat(vA),zB=["/","?","#"],HB=/^[+a-z0-9A-Z_-]{0,63}$/,Cce=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Ace={javascript:!0,"javascript:":!0},mA={javascript:!0,"javascript:":!0},sd={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},yA=va;ro.prototype.parse=function(t,e,r){if(!ba.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var n=t.indexOf("?"),i=n!==-1&&n<t.indexOf("#")?"?":"#",o=t.split(i);o[0]=o[0].replace(/\\/g,"/");var a=t=o.join(i);if(a=a.trim(),!r&&t.split("#").length===1){var s=_ce.exec(a);if(s)return this.path=a,this.href=a,this.pathname=s[1],s[2]?(this.search=s[2],this.query=e?yA.parse(this.search.substr(1)):this.search.substr(1)):e&&(this.search="",this.query={}),this}var c=wce.exec(a);if(c){var u=(c=c[0]).toLowerCase();this.protocol=u,a=a.substr(c.length);}if(r||c||a.match(/^\/\/[^@\/]+@[^@\/]+/)){var l=a.substr(0,2)==="//";!l||c&&mA[c]||(a=a.substr(2),this.slashes=!0);}if(!mA[c]&&(l||c&&!sd[c])){for(var w,T,x=-1,I=0;I<zB.length;I++)(k=a.indexOf(zB[I]))!==-1&&(x===-1||k<x)&&(x=k);for((T=x===-1?a.lastIndexOf("@"):a.lastIndexOf("@",x))!==-1&&(w=a.slice(0,T),a=a.slice(T+1),this.auth=decodeURIComponent(w)),x=-1,I=0;I<FB.length;I++){var k;(k=a.indexOf(FB[I]))!==-1&&(x===-1||k<x)&&(x=k);}x===-1&&(x=a.length),this.host=a.slice(0,x),a=a.slice(x),this.parseHost(),this.hostname=this.hostname||"";var q=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!q)for(var j=this.hostname.split(/\./),K=(I=0,j.length);I<K;I++){var Z=j[I];if(Z&&!Z.match(HB)){for(var se="",ce=0,Te=Z.length;ce<Te;ce++)Z.charCodeAt(ce)>127?se+="x":se+=Z[ce];if(!se.match(HB)){var pe=j.slice(0,I),le=j.slice(I+1),Y=Z.match(Cce);Y&&(pe.push(Y[1]),le.unshift(Y[2])),le.length&&(a="/"+le.join(".")+a),this.hostname=pe.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),q||(this.hostname=bce.toASCII(this.hostname));var S=this.port?":"+this.port:"",d=this.hostname||"";this.host=d+S,this.href+=this.host,q&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),a[0]!=="/"&&(a="/"+a));}if(!Ace[u])for(I=0,K=vA.length;I<K;I++){var C=vA[I];if(a.indexOf(C)!==-1){var A=encodeURIComponent(C);A===C&&(A=escape(C)),a=a.split(C).join(A);}}var f=a.indexOf("#");f!==-1&&(this.hash=a.substr(f),a=a.slice(0,f));var _=a.indexOf("?");if(_!==-1?(this.search=a.substr(_),this.query=a.substr(_+1),e&&(this.query=yA.parse(this.query)),a=a.slice(0,_)):e&&(this.search="",this.query={}),a&&(this.pathname=a),sd[u]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){S=this.pathname||"";var M=this.search||"";this.path=S+M;}return this.href=this.format(),this},ro.prototype.format=function(){var t=this.auth||"";t&&(t=(t=encodeURIComponent(t)).replace(/%3A/i,":"),t+="@");var e=this.protocol||"",r=this.pathname||"",n=this.hash||"",i=!1,o="";this.host?i=t+this.host:this.hostname&&(i=t+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(i+=":"+this.port)),this.query&&ba.isObject(this.query)&&Object.keys(this.query).length&&(o=yA.stringify(this.query));var a=this.search||o&&"?"+o||"";return e&&e.substr(-1)!==":"&&(e+=":"),this.slashes||(!e||sd[e])&&i!==!1?(i="//"+(i||""),r&&r.charAt(0)!=="/"&&(r="/"+r)):i||(i=""),n&&n.charAt(0)!=="#"&&(n="#"+n),a&&a.charAt(0)!=="?"&&(a="?"+a),e+i+(r=r.replace(/[?#]/g,function(s){return encodeURIComponent(s)}))+(a=a.replace("#","%23"))+n},ro.prototype.resolve=function(t){return this.resolveObject(Np(t,!1,!0)).format()},ro.prototype.resolveObject=function(t){if(ba.isString(t)){var e=new ro;e.parse(t,!1,!0),t=e;}for(var r=new ro,n=Object.keys(this),i=0;i<n.length;i++){var o=n[i];r[o]=this[o];}if(r.hash=t.hash,t.href==="")return r.href=r.format(),r;if(t.slashes&&!t.protocol){for(var a=Object.keys(t),s=0;s<a.length;s++){var c=a[s];c!=="protocol"&&(r[c]=t[c]);}return sd[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname="/"),r.href=r.format(),r}if(t.protocol&&t.protocol!==r.protocol){if(!sd[t.protocol]){for(var u=Object.keys(t),l=0;l<u.length;l++){var w=u[l];r[w]=t[w];}return r.href=r.format(),r}if(r.protocol=t.protocol,t.host||mA[t.protocol])r.pathname=t.pathname;else {for(var T=(t.pathname||"").split("/");T.length&&!(t.host=T.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),T[0]!==""&&T.unshift(""),T.length<2&&T.unshift(""),r.pathname=T.join("/");}if(r.search=t.search,r.query=t.query,r.host=t.host||"",r.auth=t.auth,r.hostname=t.hostname||t.host,r.port=t.port,r.pathname||r.search){var x=r.pathname||"",I=r.search||"";r.path=x+I;}return r.slashes=r.slashes||t.slashes,r.href=r.format(),r}var k=r.pathname&&r.pathname.charAt(0)==="/",q=t.host||t.pathname&&t.pathname.charAt(0)==="/",j=q||k||r.host&&t.pathname,K=j,Z=r.pathname&&r.pathname.split("/")||[],se=(T=t.pathname&&t.pathname.split("/")||[],r.protocol&&!sd[r.protocol]);if(se&&(r.hostname="",r.port=null,r.host&&(Z[0]===""?Z[0]=r.host:Z.unshift(r.host)),r.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(T[0]===""?T[0]=t.host:T.unshift(t.host)),t.host=null),j=j&&(T[0]===""||Z[0]==="")),q)r.host=t.host||t.host===""?t.host:r.host,r.hostname=t.hostname||t.hostname===""?t.hostname:r.hostname,r.search=t.search,r.query=t.query,Z=T;else if(T.length)Z||(Z=[]),Z.pop(),Z=Z.concat(T),r.search=t.search,r.query=t.query;else if(!ba.isNullOrUndefined(t.search))return se&&(r.hostname=r.host=Z.shift(),(Y=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=Y.shift(),r.host=r.hostname=Y.shift())),r.search=t.search,r.query=t.query,ba.isNull(r.pathname)&&ba.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r;if(!Z.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var ce=Z.slice(-1)[0],Te=(r.host||t.host||Z.length>1)&&(ce==="."||ce==="..")||ce==="",pe=0,le=Z.length;le>=0;le--)(ce=Z[le])==="."?Z.splice(le,1):ce===".."?(Z.splice(le,1),pe++):pe&&(Z.splice(le,1),pe--);if(!j&&!K)for(;pe--;pe)Z.unshift("..");!j||Z[0]===""||Z[0]&&Z[0].charAt(0)==="/"||Z.unshift(""),Te&&Z.join("/").substr(-1)!=="/"&&Z.push("");var Y,S=Z[0]===""||Z[0]&&Z[0].charAt(0)==="/";return se&&(r.hostname=r.host=S?"":Z.length?Z.shift():"",(Y=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=Y.shift(),r.host=r.hostname=Y.shift())),(j=j||r.host&&Z.length)&&!S&&Z.unshift(""),Z.length?r.pathname=Z.join("/"):(r.pathname=null,r.path=null),ba.isNull(r.pathname)&&ba.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=t.auth||r.auth,r.slashes=r.slashes||t.slashes,r.href=r.format(),r},ro.prototype.parseHost=function(){var t=this.host,e=Ece.exec(t);e&&((e=e[0])!==":"&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t);};rr.Url;rr.format;rr.resolve;rr.resolveObject;gA={},jB=!1;$B=Tce(),Rce=typeof Deno!="undefined"?Deno.build.os==="windows"?"win32":Deno.build.os:void 0;rr.URL=typeof URL!="undefined"?URL:null;rr.pathToFileURL=zce;rr.fileURLToPath=Lce;rr.Url;rr.format;rr.resolve;rr.resolveObject;rr.URL;xce=92,Ice=47,Mce=97,Oce=122,bA=Rce==="win32",Nce=/\//g,kce=/%/g,Pce=/\\/g,Bce=/\n/g,Uce=/\r/g,Dce=/\t/g;Hce=typeof Deno!="undefined"?Deno.build.os==="windows"?"win32":Deno.build.os:void 0;rr.URL=typeof URL!="undefined"?URL:null;rr.pathToFileURL=VB;rr.fileURLToPath=Hv;jce=rr.Url,$ce=rr.format,Vce=rr.resolve,Gce=rr.resolveObject,Kce=rr.parse,Wce=rr.URL,Yce=92,Zce=47,Jce=97,Xce=122,wA=Hce==="win32",Qce=/\//g,eue=/%/g,tue=/\\/g,rue=/\n/g,nue=/\r/g,iue=/\t/g;});var cd=ne(KB=>{v();m();y();g();var GB=RB(),sue=cA(),cue=IB(),uue=OB(),lue=(kp(),Dr(jv)),Po=KB;Po.request=function(t,e){typeof t=="string"?t=lue.parse(t):t=cue(t);var r=globalThis.location.protocol.search(/^https?:$/)===-1?"http:":"",n=t.protocol||r,i=t.hostname||t.host,o=t.port,a=t.path||"/";i&&i.indexOf(":")!==-1&&(i="["+i+"]"),t.url=(i?n+"//"+i:"")+(o?":"+o:"")+a,t.method=(t.method||"GET").toUpperCase(),t.headers=t.headers||{};var s=new GB(t);return e&&s.on("response",e),s};Po.get=function(e,r){var n=Po.request(e,r);return n.end(),n};Po.ClientRequest=GB;Po.IncomingMessage=sue.IncomingMessage;Po.Agent=function(){};Po.Agent.defaultMaxSockets=4;Po.globalAgent=new Po.Agent;Po.STATUS_CODES=uue;Po.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"];});var _A=ne((UPe,YB)=>{v();m();y();g();var Pp=cd(),fue=(kp(),Dr(jv)),EA=YB.exports;for($v in Pp)Pp.hasOwnProperty($v)&&(EA[$v]=Pp[$v]);var $v;EA.request=function(t,e){return t=WB(t),Pp.request.call(this,t,e)};EA.get=function(t,e){return t=WB(t),Pp.get.call(this,t,e)};function WB(t){if(typeof t=="string"&&(t=fue.parse(t)),t.protocol||(t.protocol="https:"),t.protocol!=="https:")throw new Error('Protocol "'+t.protocol+'" not supported. Expected "https:"');return t}});var XB=ne(ni=>{v();m();y();g();var due=ni&&ni.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i);}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r];}),hue=ni&&ni.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e});}:function(t,e){t.default=e;}),ZB=ni&&ni.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&due(e,t,r);return hue(e,t),e};Object.defineProperty(ni,"__esModule",{value:!0});ni.req=ni.json=ni.toBuffer=void 0;var pue=ZB(cd()),mue=ZB(_A());function JB(t){return re(this,null,function*(){let e=0,r=[];try{for(var n=H0(t),i,o,a;i=!(o=yield n.next()).done;i=!1){let s=o.value;e+=s.length,r.push(s);}}catch(o){a=[o];}finally{try{i&&(o=n.return)&&(yield o.call(n));}finally{if(a)throw a[0]}}return D.Buffer.concat(r,e)})}ni.toBuffer=JB;function yue(t){return re(this,null,function*(){let r=(yield JB(t)).toString("utf8");try{return JSON.parse(r)}catch(n){let i=n;throw i.message+=` (input: ${r})`,i}})}ni.json=yue;function gue(t,e={}){let n=((typeof t=="string"?t:t.href).startsWith("https:")?mue:pue).request(t,e),i=new Promise((o,a)=>{n.once("response",o).once("error",a).end();});return n.then=i.then.bind(i),n}ni.req=gue;});var tU=ne(Ei=>{v();m();y();g();var eU=Ei&&Ei.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i);}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r];}),vue=Ei&&Ei.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e});}:function(t,e){t.default=e;}),bue=Ei&&Ei.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&eU(e,t,r);return vue(e,t),e},wue=Ei&&Ei.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&eU(e,t,r);};Object.defineProperty(Ei,"__esModule",{value:!0});Ei.Agent=void 0;var QB=bue(cd());wue(XB(),Ei);var wa=Symbol("AgentBaseInternalState"),SA=class extends QB.Agent{constructor(e){super(e),this[wa]={};}isSecureEndpoint(e){if(e){if(typeof e.secureEndpoint=="boolean")return e.secureEndpoint;if(typeof e.protocol=="string")return e.protocol==="https:"}let{stack:r}=new Error;return typeof r!="string"?!1:r.split(`
`).some(n=>n.indexOf("(https.js:")!==-1||n.indexOf("node:https:")!==-1)}createSocket(e,r,n){let i=Me(oe({},r),{secureEndpoint:this.isSecureEndpoint(r)});Promise.resolve().then(()=>this.connect(e,i)).then(o=>{if(o instanceof QB.Agent)return o.addRequest(e,i);this[wa].currentSocket=o,super.createSocket(e,r,n);},n);}createConnection(){let e=this[wa].currentSocket;if(this[wa].currentSocket=void 0,!e)throw new Error("No socket was returned in the `connect()` function");return e}get defaultPort(){var e;return (e=this[wa].defaultPort)!=null?e:this.protocol==="https:"?443:80}set defaultPort(e){this[wa]&&(this[wa].defaultPort=e);}get protocol(){var e;return (e=this[wa].protocol)!=null?e:this.isSecureEndpoint()?"https:":"http:"}set protocol(e){this[wa]&&(this[wa].protocol=e);}};Ei.Agent=SA;});var rU=ne(ud=>{v();m();y();g();var Eue=ud&&ud.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ud,"__esModule",{value:!0});ud.parseProxyResponse=void 0;var _ue=Eue(rA()),Vv=(0, _ue.default)("https-proxy-agent:parse-proxy-response");function Sue(t){return new Promise((e,r)=>{let n=0,i=[];function o(){let l=t.read();l?u(l):t.once("readable",o);}function a(){t.removeListener("end",s),t.removeListener("error",c),t.removeListener("readable",o);}function s(){a(),Vv("onend"),r(new Error("Proxy connection ended before receiving CONNECT response"));}function c(l){a(),Vv("onerror %o",l),r(l);}function u(l){i.push(l),n+=l.length;let w=D.Buffer.concat(i,n),T=w.indexOf(`\r
\r
`);if(T===-1){Vv("have not received end of HTTP headers yet..."),o();return}let x=w.slice(0,T).toString("ascii").split(`\r
`),I=x.shift();if(!I)return t.destroy(),r(new Error("No header received from proxy CONNECT response"));let k=I.split(" "),q=+k[1],j=k.slice(2).join(" "),K={};for(let Z of x){if(!Z)continue;let se=Z.indexOf(":");if(se===-1)return t.destroy(),r(new Error(`Invalid header from proxy CONNECT response: "${Z}"`));let ce=Z.slice(0,se).toLowerCase(),Te=Z.slice(se+1).trimStart(),pe=K[ce];typeof pe=="string"?K[ce]=[pe,Te]:Array.isArray(pe)?pe.push(Te):K[ce]=Te;}Vv("got proxy server response: %o %o",I,K),a(),e({connect:{statusCode:q,statusText:j,headers:K},buffered:w});}t.on("error",c),t.on("end",s),o();})}ud.parseProxyResponse=Sue;});var sU=ne(no=>{v();m();y();g();var Cue=no&&no.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i);}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r];}),Aue=no&&no.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e});}:function(t,e){t.default=e;}),oU=no&&no.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Cue(e,t,r);return Aue(e,t),e},aU=no&&no.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(no,"__esModule",{value:!0});no.HttpsProxyAgent=void 0;var CA=oU((_7(),Dr(E7))),nU=oU((C7(),Dr(S7))),Tue=aU((eo(),Dr(gB))),Rue=aU(rA()),xue=tU(),Iue=(kp(),Dr(jv)),Mue=rU(),Bp=(0, Rue.default)("https-proxy-agent"),Gv=class extends xue.Agent{constructor(e,r){var o;super(r),this.options={path:void 0},this.proxy=typeof e=="string"?new Iue.URL(e):e,this.proxyHeaders=(o=r==null?void 0:r.headers)!=null?o:{},Bp("Creating new HttpsProxyAgent instance: %o",this.proxy.href);let n=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),i=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts=Me(oe({ALPNProtocols:["http/1.1"]},r?iU(r,"headers"):null),{host:n,port:i});}connect(e,r){return re(this,null,function*(){let{proxy:n}=this;if(!r.host)throw new TypeError('No "host" provided');let i;if(n.protocol==="https:"){Bp("Creating `tls.Socket`: %o",this.connectOpts);let T=this.connectOpts.servername||this.connectOpts.host;i=nU.connect(Me(oe({},this.connectOpts),{servername:T}));}else Bp("Creating `net.Socket`: %o",this.connectOpts),i=CA.connect(this.connectOpts);let o=typeof this.proxyHeaders=="function"?this.proxyHeaders():oe({},this.proxyHeaders),a=CA.isIPv6(r.host)?`[${r.host}]`:r.host,s=`CONNECT ${a}:${r.port} HTTP/1.1\r
`;if(n.username||n.password){let T=`${decodeURIComponent(n.username)}:${decodeURIComponent(n.password)}`;o["Proxy-Authorization"]=`Basic ${D.Buffer.from(T).toString("base64")}`;}o.Host=`${a}:${r.port}`,o["Proxy-Connection"]||(o["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let T of Object.keys(o))s+=`${T}: ${o[T]}\r
`;let c=(0, Mue.parseProxyResponse)(i);i.write(`${s}\r
`);let{connect:u,buffered:l}=yield c;if(e.emit("proxyConnect",u),this.emit("proxyConnect",u,e),u.statusCode===200){if(e.once("socket",Oue),r.secureEndpoint){Bp("Upgrading socket connection to TLS");let T=r.servername||r.host;return nU.connect(Me(oe({},iU(r,"host","path","port")),{socket:i,servername:T}))}return i}i.destroy();let w=new CA.Socket({writable:!1});return w.readable=!0,e.once("socket",T=>{Bp("Replaying proxy buffer for failed request"),(0, Tue.default)(T.listenerCount("data")>0),T.push(l),T.push(null);}),w})}};Gv.protocols=["http","https"];no.HttpsProxyAgent=Gv;function Oue(t){t.resume();}function iU(t,...e){let r={},n;for(n in t)e.includes(n)||(r[n]=t[n]);return r}});var qD=ne((wVe,Tfe)=>{Tfe.exports={name:"botframework-connector",author:"Microsoft Corp.",description:"Bot Connector is autorest generated connector client.",version:"4.1.6",license:"MIT",keywords:["botconnector","bots","chatbots"],bugs:{url:"https://github.com/Microsoft/botbuilder-js/issues"},repository:{type:"git",url:"https://github.com/Microsoft/botbuilder-js.git"},main:"lib/index.js",browser:"lib/browser.js",types:"lib/index.d.ts",typesVersions:{"<3.9":{"*":["_ts3.4/*"]}},dependencies:{"@azure/core-http":"^3.0.4","@azure/identity":"^4.4.1","@azure/msal-node":"^2.13.1","@types/jsonwebtoken":"9.0.6",axios:"^1.7.7",base64url:"^3.0.0","botbuilder-stdlib":"4.1.6","botframework-schema":"4.1.6",buffer:"^6.0.3","cross-fetch":"^4.0.0","https-proxy-agent":"^7.0.5",jsonwebtoken:"^9.0.2","node-fetch":"^2.7.0","openssl-wrapper":"^0.3.4","rsa-pem-from-mod-exp":"^0.8.6",zod:"^3.23.8"},devDependencies:{"@types/node":"18.19.47","botbuilder-test-utils":"0.0.0",dotenv:"^16.4.5",nock:"^13.5.5",should:"^13.2.3",uuid:"^11.0.5"},scripts:{build:"tsc -b","build:browser":"npm-run-all build:browser:clean build:browser:run","build:browser:clean":"rimraf --glob lib/browser.*","build:browser:run":"tsup --config ../../tsup/browser.config.ts","build:downlevel-dts":"downlevel-dts lib _ts3.4/lib --checksum",clean:"rimraf _ts3.4 lib tsconfig.tsbuildinfo",depcheck:"depcheck --config ../../.depcheckrc --ignores azure,sinon,browserify-fs,buffer,crypto-browserify,https-browserify,stream-browserify,stream-http",lint:"eslint .",postbuild:"npm-run-all -p build:browser build:downlevel-dts",test:"yarn build && yarn test:mocha","test:mocha":"nyc mocha tests --recursive"},files:["_ts3.4","lib","src"]};});var GF={};Cr(GF,{ChildProcess:()=>Ba,_forkChild:()=>Ba,default:()=>ome,exec:()=>Ba,execFile:()=>Ba,execFileSync:()=>Ba,execSync:()=>Ba,fork:()=>Ba,spawn:()=>Ba,spawnSync:()=>Ba});function Ba(){throw new Error("Node.js child_process is not supported by JSPM core in the browser")}var ome,KF=Ur(()=>{v();m();y();g();ome={_forkChild:Ba,ChildProcess:Ba,exec:Ba,execFile:Ba,execFileSync:Ba,execSync:Ba,fork:Ba,spawn:Ba,spawnSync:Ba};});var ZF=ne(x0=>{v();m();y();g();Object.defineProperty(x0,"__esModule",{value:!0});x0.exec=void 0;x0.default=YF;var ame=(KF(),Dr(GF)),WF=function(e){return typeof e=="function"},sme={"cms.verify":/^verification successful/i,genrsa:/^generating/i,pkcs12:/^mac verified ok/i,"req.new":/^generating/i,"req.verify":/^verify ok/i,rsa:/^writing rsa key/i,"smime.verify":/^verification successful/i,"x509.req":/^signature ok/i};function YF(t,e,r,n){var i=e,o=r,a=n;D.Buffer.isBuffer(i)||(a=o,o=i,i=!1),WF(o)&&(a=o,o={});var s=t.split(".").map(function(I,k){return k?"-"+I:I}),c=[];Object.keys(o).forEach(function(I){o[I]===!1?c.push(I):o[I]===!0?s.push("-"+I):Array.isArray(o[I])?o[I].forEach(function(k){s.push("-"+I,k);}):s.push("-"+I,o[I]);}),s=s.concat(c);var u=(0, ame.spawn)("openssl",s),l=[],w=0,T=[],x=0;return u.stdout.on("data",function(I){w+=I.length,l.push(I);}),u.stderr.on("data",function(I){x+=I.length,T.push(I);}),u.on("close",function(I){var k=D.Buffer.concat(l,w),q=D.Buffer.concat(T,x).toString("utf8"),j=sme[t],K=null;(I||q&&j&&!q.match(j))&&(K=new Error(q),K.code=I),WF(a)&&a.apply(null,[K,k]);}),i&&u.stdin.write(i),u.stdin.end(),u}x0.exec=YF;});var Iz=ne((jc,xz)=>{v();m();y();g();var Aw=typeof globalThis!="undefined"&&globalThis||typeof self!="undefined"&&self||typeof globalThis!="undefined"&&globalThis,Tw=function(){function t(){this.fetch=!1,this.DOMException=Aw.DOMException;}return t.prototype=Aw,new t}();(function(t){(function(r){var n=typeof t!="undefined"&&t||typeof self!="undefined"&&self||typeof n!="undefined"&&n,i={searchParams:"URLSearchParams"in n,iterable:"Symbol"in n&&"iterator"in Symbol,blob:"FileReader"in n&&"Blob"in n&&function(){try{return new Blob,!0}catch(d){return !1}}(),formData:"FormData"in n,arrayBuffer:"ArrayBuffer"in n};function o(d){return d&&DataView.prototype.isPrototypeOf(d)}if(i.arrayBuffer)var a=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],s=ArrayBuffer.isView||function(d){return d&&a.indexOf(Object.prototype.toString.call(d))>-1};function c(d){if(typeof d!="string"&&(d=String(d)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(d)||d==="")throw new TypeError('Invalid character in header field name: "'+d+'"');return d.toLowerCase()}function u(d){return typeof d!="string"&&(d=String(d)),d}function l(d){var C={next:function(){var A=d.shift();return {done:A===void 0,value:A}}};return i.iterable&&(C[Symbol.iterator]=function(){return C}),C}function w(d){this.map={},d instanceof w?d.forEach(function(C,A){this.append(A,C);},this):Array.isArray(d)?d.forEach(function(C){this.append(C[0],C[1]);},this):d&&Object.getOwnPropertyNames(d).forEach(function(C){this.append(C,d[C]);},this);}w.prototype.append=function(d,C){d=c(d),C=u(C);var A=this.map[d];this.map[d]=A?A+", "+C:C;},w.prototype.delete=function(d){delete this.map[c(d)];},w.prototype.get=function(d){return d=c(d),this.has(d)?this.map[d]:null},w.prototype.has=function(d){return this.map.hasOwnProperty(c(d))},w.prototype.set=function(d,C){this.map[c(d)]=u(C);},w.prototype.forEach=function(d,C){for(var A in this.map)this.map.hasOwnProperty(A)&&d.call(C,this.map[A],A,this);},w.prototype.keys=function(){var d=[];return this.forEach(function(C,A){d.push(A);}),l(d)},w.prototype.values=function(){var d=[];return this.forEach(function(C){d.push(C);}),l(d)},w.prototype.entries=function(){var d=[];return this.forEach(function(C,A){d.push([A,C]);}),l(d)},i.iterable&&(w.prototype[Symbol.iterator]=w.prototype.entries);function T(d){if(d.bodyUsed)return Promise.reject(new TypeError("Already read"));d.bodyUsed=!0;}function x(d){return new Promise(function(C,A){d.onload=function(){C(d.result);},d.onerror=function(){A(d.error);};})}function I(d){var C=new FileReader,A=x(C);return C.readAsArrayBuffer(d),A}function k(d){var C=new FileReader,A=x(C);return C.readAsText(d),A}function q(d){for(var C=new Uint8Array(d),A=new Array(C.length),f=0;f<C.length;f++)A[f]=String.fromCharCode(C[f]);return A.join("")}function j(d){if(d.slice)return d.slice(0);var C=new Uint8Array(d.byteLength);return C.set(new Uint8Array(d)),C.buffer}function K(){return this.bodyUsed=!1,this._initBody=function(d){this.bodyUsed=this.bodyUsed,this._bodyInit=d,d?typeof d=="string"?this._bodyText=d:i.blob&&Blob.prototype.isPrototypeOf(d)?this._bodyBlob=d:i.formData&&FormData.prototype.isPrototypeOf(d)?this._bodyFormData=d:i.searchParams&&URLSearchParams.prototype.isPrototypeOf(d)?this._bodyText=d.toString():i.arrayBuffer&&i.blob&&o(d)?(this._bodyArrayBuffer=j(d.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):i.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(d)||s(d))?this._bodyArrayBuffer=j(d):this._bodyText=d=Object.prototype.toString.call(d):this._bodyText="",this.headers.get("content-type")||(typeof d=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):i.searchParams&&URLSearchParams.prototype.isPrototypeOf(d)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"));},i.blob&&(this.blob=function(){var d=T(this);if(d)return d;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){if(this._bodyArrayBuffer){var d=T(this);return d||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}else return this.blob().then(I)}),this.text=function(){var d=T(this);if(d)return d;if(this._bodyBlob)return k(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(q(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},i.formData&&(this.formData=function(){return this.text().then(Te)}),this.json=function(){return this.text().then(JSON.parse)},this}var Z=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function se(d){var C=d.toUpperCase();return Z.indexOf(C)>-1?C:d}function ce(d,C){if(!(this instanceof ce))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');C=C||{};var A=C.body;if(d instanceof ce){if(d.bodyUsed)throw new TypeError("Already read");this.url=d.url,this.credentials=d.credentials,C.headers||(this.headers=new w(d.headers)),this.method=d.method,this.mode=d.mode,this.signal=d.signal,!A&&d._bodyInit!=null&&(A=d._bodyInit,d.bodyUsed=!0);}else this.url=String(d);if(this.credentials=C.credentials||this.credentials||"same-origin",(C.headers||!this.headers)&&(this.headers=new w(C.headers)),this.method=se(C.method||this.method||"GET"),this.mode=C.mode||this.mode||null,this.signal=C.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&A)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(A),(this.method==="GET"||this.method==="HEAD")&&(C.cache==="no-store"||C.cache==="no-cache")){var f=/([?&])_=[^&]*/;if(f.test(this.url))this.url=this.url.replace(f,"$1_="+new Date().getTime());else {var _=/\?/;this.url+=(_.test(this.url)?"&":"?")+"_="+new Date().getTime();}}}ce.prototype.clone=function(){return new ce(this,{body:this._bodyInit})};function Te(d){var C=new FormData;return d.trim().split("&").forEach(function(A){if(A){var f=A.split("="),_=f.shift().replace(/\+/g," "),M=f.join("=").replace(/\+/g," ");C.append(decodeURIComponent(_),decodeURIComponent(M));}}),C}function pe(d){var C=new w,A=d.replace(/\r?\n[\t ]+/g," ");return A.split("\r").map(function(f){return f.indexOf(`
`)===0?f.substr(1,f.length):f}).forEach(function(f){var _=f.split(":"),M=_.shift().trim();if(M){var R=_.join(":").trim();C.append(M,R);}}),C}K.call(ce.prototype);function le(d,C){if(!(this instanceof le))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');C||(C={}),this.type="default",this.status=C.status===void 0?200:C.status,this.ok=this.status>=200&&this.status<300,this.statusText=C.statusText===void 0?"":""+C.statusText,this.headers=new w(C.headers),this.url=C.url||"",this._initBody(d);}K.call(le.prototype),le.prototype.clone=function(){return new le(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new w(this.headers),url:this.url})},le.error=function(){var d=new le(null,{status:0,statusText:""});return d.type="error",d};var Y=[301,302,303,307,308];le.redirect=function(d,C){if(Y.indexOf(C)===-1)throw new RangeError("Invalid status code");return new le(null,{status:C,headers:{location:d}})},r.DOMException=n.DOMException;try{new r.DOMException;}catch(d){r.DOMException=function(C,A){this.message=C,this.name=A;var f=Error(C);this.stack=f.stack;},r.DOMException.prototype=Object.create(Error.prototype),r.DOMException.prototype.constructor=r.DOMException;}function S(d,C){return new Promise(function(A,f){var _=new ce(d,C);if(_.signal&&_.signal.aborted)return f(new r.DOMException("Aborted","AbortError"));var M=new XMLHttpRequest;function R(){M.abort();}M.onload=function(){var b={status:M.status,statusText:M.statusText,headers:pe(M.getAllResponseHeaders()||"")};b.url="responseURL"in M?M.responseURL:b.headers.get("X-Request-URL");var B="response"in M?M.response:M.responseText;setTimeout(function(){A(new le(B,b));},0);},M.onerror=function(){setTimeout(function(){f(new TypeError("Network request failed"));},0);},M.ontimeout=function(){setTimeout(function(){f(new TypeError("Network request failed"));},0);},M.onabort=function(){setTimeout(function(){f(new r.DOMException("Aborted","AbortError"));},0);};function h(b){try{return b===""&&n.location.href?n.location.href:b}catch(B){return b}}M.open(_.method,h(_.url),!0),_.credentials==="include"?M.withCredentials=!0:_.credentials==="omit"&&(M.withCredentials=!1),"responseType"in M&&(i.blob?M.responseType="blob":i.arrayBuffer&&_.headers.get("Content-Type")&&_.headers.get("Content-Type").indexOf("application/octet-stream")!==-1&&(M.responseType="arraybuffer")),C&&typeof C.headers=="object"&&!(C.headers instanceof w)?Object.getOwnPropertyNames(C.headers).forEach(function(b){M.setRequestHeader(b,u(C.headers[b]));}):_.headers.forEach(function(b,B){M.setRequestHeader(B,b);}),_.signal&&(_.signal.addEventListener("abort",R),M.onreadystatechange=function(){M.readyState===4&&_.signal.removeEventListener("abort",R);}),M.send(typeof _._bodyInit=="undefined"?null:_._bodyInit);})}return S.polyfill=!0,n.fetch||(n.fetch=S,n.Headers=w,n.Request=ce,n.Response=le),r.Headers=w,r.Request=ce,r.Response=le,r.fetch=S,r})({});})(Tw);Tw.fetch.ponyfill=!0;delete Tw.fetch.polyfill;var ch=Aw.fetch?Aw:Tw;jc=ch.fetch;jc.default=ch.fetch;jc.fetch=ch.fetch;jc.Headers=ch.Headers;jc.Request=ch.Request;jc.Response=ch.Response;xz.exports=jc;});v();m();y();g();v();m();y();g();v();m();y();g();v();m();y();g();v();m();y();g();var je=class t extends Error{constructor(r,n){super(r);this.statusCode=n;}static isStatusCodeError(r){return !!(r&&typeof r.statusCode=="number")}static determineStatusCodeAndBuildMessage(r){let n=r&&r.message?r.message:"Internal Server Error",i=t.determineStatusCode(n);return `HTTP/1.1 ${i} ${u$e.StatusCodes[i]}\r
${n}\r
Connection: 'close'\r
\r
`}static determineStatusCode(r){if(typeof r=="string"){if(r.toLowerCase().startsWith("unauthorized"))return u$e.StatusCodes.UNAUTHORIZED;if(r.toLowerCase().startsWith("'authheader'"))return u$e.StatusCodes.BAD_REQUEST}return u$e.StatusCodes.INTERNAL_SERVER_ERROR}};v();m();y();g();var Cn=class{constructor(e=[],r,n){this.requiredEndorsements=e;this.validateClaims=r;this.validTokenIssuers=n;}};v();m();y();g();exports.AuthenticationConstants = void 0;(_=>(_.ToChannelFromBotLoginUrl="https://login.microsoftonline.com/botframework.com",_.ToChannelFromBotLoginUrlPrefix="https://login.microsoftonline.com/",_.ToChannelFromBotTokenEndpointPath="/oauth2/v2.0/token",_.DefaultChannelAuthTenant="botframework.com",_.ToChannelFromBotOAuthScope="https://api.botframework.com",_.ToBotFromChannelTokenIssuer="https://api.botframework.com",_.OAuthUrl="https://api.botframework.com",_.BotOpenIdMetadataKey="BotOpenIdMetadata",_.ChannelService="ChannelService",_.OAuthUrlKey="OAuthApiEndpoint",_.EmulateOAuthCardsKey="EmulateOAuthCards",_.ToBotFromChannelOpenIdMetadataUrl="https://login.botframework.com/v1/.well-known/openidconfiguration",_.ToBotFromEnterpriseChannelOpenIdMetadataUrlFormat="https://{channelService}.enterprisechannel.botframework.com/v1/.well-known/openidconfiguration",_.ToBotFromEmulatorOpenIdMetadataUrl="https://login.microsoftonline.com/common/v2.0/.well-known/openid-configuration",_.ValidTokenIssuerUrlTemplateV1="https://sts.windows.net/",_.ValidTokenIssuerUrlTemplateV2="https://login.microsoftonline.com/",_.ValidGovernmentTokenIssuerUrlTemplateV1="https://login.microsoftonline.us/",_.ValidGovernmentTokenIssuerUrlTemplateV2="https://login.microsoftonline.us/",_.AllowedSigningAlgorithms=["RS256","RS384","RS512"],_.AuthorizedParty="azp",_.AudienceClaim="aud",_.IssuerClaim="iss",_.KeyIdHeader="kid",_.VersionClaim="ver",_.AppIdClaim="appid",_.ServiceUrlClaim="serviceurl",_.TenantIdClaim="tid",_.AnonymousSkillAppId="AnonymousSkill",_.AnonymousAuthType="anonymous",_.CertificateThumbprint="CertificateThumbprint",_.CertificatePrivateKey="CertificatePrivateKey"))(exports.AuthenticationConstants||(exports.AuthenticationConstants={}));v();m();y();g();v();m();y();g();var Dp=on(_p());v();m();y();g();var ya=class{constructor(e,r){this.claims=e;this.authenticationType=r;}get isAuthenticated(){return typeof this.authenticationType=="boolean"?this.authenticationType:this.authenticationType!=null}getClaimValue(e){var n;let r=this.claims.find(i=>i.type===e);return (n=r==null?void 0:r.value)!=null?n:null}};v();m();y();g();var Sp=class{static validate(e,r){if(e===null||e.trim()==="")return !0;if(r===null)throw new je("endorsements required",u$e.StatusCodes.UNAUTHORIZED);return new Set(r).has(e)}};v();m();y();g();var uU=on(p7()),lU=on(v7()),AA=on(w7()),fU=on(sU());var Kv=class{constructor(e,r){this.url=e;this.proxySettings=r;this.lastUpdated=0;}getKey(e){return re(this,null,function*(){if(this.lastUpdated<Date.now()-1e3*60*60*24)return yield this.refreshCache(),this.findKey(e);{let r=this.findKey(e);return !r&&this.lastUpdated<Date.now()-1e3*60*60?(yield this.refreshCache(),this.findKey(e)):r}})}refreshCache(){return re(this,null,function*(){let e=null;if(this.proxySettings){let n=`http://${this.proxySettings.host}:${this.proxySettings.port}`;e=new fU.HttpsProxyAgent(n);}let r=yield (0, AA.default)(this.url,{agent:e});if(r.ok){let n=yield r.json(),i=yield (0, AA.default)(n.jwks_uri,{agent:e});if(i.ok)this.lastUpdated=new Date().getTime(),this.keys=(yield i.json()).keys;else throw new je(`Failed to load Keys: ${i.status}`,u$e.StatusCodes.INTERNAL_SERVER_ERROR)}else throw new je(`Failed to load openID config: ${r.status}`,u$e.StatusCodes.INTERNAL_SERVER_ERROR)})}findKey(e){if(!this.keys)return null;for(let r of this.keys)if(r.kid===e){if(!r.n||!r.e)return null;let n=lU.default.toBase64(r.n),i=r.e;return {key:(0, uU.default)(n,i),endorsements:r.endorsements}}return null}};var Wv=class Wv{constructor(e,r,n,i){this.tokenValidationParameters=oe({},e),this.tokenValidationParameters.algorithms=n,this.openIdMetadata=Wv.getOrAddOpenIdMetadata(r,i);}static getOrAddOpenIdMetadata(e,r){let n=this.openIdMetadataCache.get(e);return n||(n=new Kv(e,r),this.openIdMetadataCache.set(e,n)),n}getIdentityFromAuthHeader(e,r,n){return re(this,null,function*(){if(!e)return null;let i=e.split(" ");return i.length===2?yield this.getIdentity(i[0],i[1],r,n||[]):null})}getIdentity(o,a,s){return re(this,arguments,function*(e,r,n,i=[]){return e!=="Bearer"||!r||!this.hasAllowedIssuer(r)?null:yield this.validateToken(r,n,i)})}hasAllowedIssuer(e){let r=(0, Dp.decode)(e),n;if(r&&typeof r=="object")n=r.iss;else return !1;return Array.isArray(this.tokenValidationParameters.issuer)?this.tokenValidationParameters.issuer.indexOf(n)!==-1:typeof this.tokenValidationParameters.issuer=="string"?this.tokenValidationParameters.issuer===n:!1}validateToken(e,r,n){return re(this,null,function*(){let i={},o=(0, Dp.decode)(e,{complete:!0});o&&typeof o=="object"&&(i=o.header);let a=i.kid,s=yield this.openIdMetadata.getKey(a);if(!s)throw new je("Signing Key could not be retrieved.",u$e.StatusCodes.UNAUTHORIZED);try{let c={},u=(0,Dp.verify)(e,s.key,this.tokenValidationParameters);u&&typeof u=="object"&&(c=u);let l=s.endorsements;if(Array.isArray(l)&&l.length!==0){if(!Sp.validate(r,l))throw new je(`Could not validate endorsement for key: ${a} with endorsements: ${l.join(",")}`,u$e.StatusCodes.UNAUTHORIZED);if(!n.every(I=>Sp.validate(I,l)))throw new je(`Could not validate additional endorsement for key: ${a} with endorsements: ${n.join(",")}. Expected endorsements: ${n.join(",")}`,u$e.StatusCodes.UNAUTHORIZED)}if(this.tokenValidationParameters.algorithms&&this.tokenValidationParameters.algorithms.indexOf(i.alg)===-1)throw new je(`"Token signing algorithm '${i.alg}' not in allowed list`,u$e.StatusCodes.UNAUTHORIZED);let w=Object.entries(c).map(([T,x])=>({type:T,value:x}));return new ya(w,!0)}catch(c){throw c.name==="TokenExpiredError"?(console.error(c),new je("The token has expired",u$e.StatusCodes.UNAUTHORIZED)):(console.error(`Error finding key for token. Available keys: ${s.key}`),c)}})}};Wv.openIdMetadataCache=new Map;var dn=Wv;exports.ChannelValidation = void 0;(o=>{o.ToBotFromChannelTokenValidationParameters={issuer:[exports.AuthenticationConstants.ToBotFromChannelTokenIssuer],audience:void 0,clockTolerance:300,ignoreExpiration:!1};function r(w,T,x,I){return re(this,arguments,function*(a,s,c,u,l=new Cn){let k=yield n(a,s,u,l);if(k.getClaimValue(exports.AuthenticationConstants.ServiceUrlClaim)!==c)throw new je("Unauthorized. ServiceUrl claim do not match.",u$e.StatusCodes.UNAUTHORIZED);return k})}o.authenticateChannelTokenWithServiceUrl=r;function n(l,w,T){return re(this,arguments,function*(a,s,c,u=new Cn){let I=yield new dn(o.ToBotFromChannelTokenValidationParameters,o.OpenIdMetadataEndpoint?o.OpenIdMetadataEndpoint:exports.AuthenticationConstants.ToBotFromChannelOpenIdMetadataUrl,exports.AuthenticationConstants.AllowedSigningAlgorithms).getIdentityFromAuthHeader(a,c,u.requiredEndorsements);return yield i(I,s)})}o.authenticateChannelToken=n;function i(a,s){return re(this,null,function*(){if(!a||!a.isAuthenticated)throw new je("Unauthorized. Is not authenticated",u$e.StatusCodes.UNAUTHORIZED);if(a.getClaimValue(exports.AuthenticationConstants.IssuerClaim)!==exports.AuthenticationConstants.ToBotFromChannelTokenIssuer)throw new je("Unauthorized. Issuer Claim MUST be present.",u$e.StatusCodes.UNAUTHORIZED);let c=a.getClaimValue(exports.AuthenticationConstants.AudienceClaim);if(!(yield s.isValidAppId(c||"")))throw new je(`Unauthorized. Invalid AppId passed on token: ${c}`,u$e.StatusCodes.UNAUTHORIZED);return a})}o.validateIdentity=i;})(exports.ChannelValidation||(exports.ChannelValidation={}));v();m();y();g();var dU=on(_p());v();m();y();g();exports.GovernmentConstants = void 0;(u=>(u.ChannelService="https://botframework.azure.us",u.ToChannelFromBotLoginUrl="https://login.microsoftonline.us/MicrosoftServices.onmicrosoft.us",u.ToChannelFromBotLoginUrlPrefix="https://login.microsoftonline.us/",u.DefaultChannelAuthTenant="MicrosoftServices.onmicrosoft.us",u.ToChannelFromBotOAuthScope="https://api.botframework.us",u.ToBotFromChannelTokenIssuer="https://api.botframework.us",u.OAuthUrl="https://api.botframework.azure.us",u.ToBotFromChannelOpenIdMetadataUrl="https://login.botframework.azure.us/v1/.well-known/openidconfiguration",u.ToBotFromEmulatorOpenIdMetadataUrl="https://login.microsoftonline.us/cab8a31a-1906-4287-a0d8-4eef66b95f6e/v2.0/.well-known/openid-configuration"))(exports.GovernmentConstants||(exports.GovernmentConstants={}));v();m();y();g();var Bo={issuer:["https://sts.windows.net/d6d49420-f39b-4df7-a1dc-d59a935871db/","https://login.microsoftonline.com/d6d49420-f39b-4df7-a1dc-d59a935871db/v2.0","https://sts.windows.net/f8cdef31-a31e-4b4a-93e4-5f571e91255a/","https://login.microsoftonline.com/f8cdef31-a31e-4b4a-93e4-5f571e91255a/v2.0","https://sts.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47/","https://sts.windows.net/cab8a31a-1906-4287-a0d8-4eef66b95f6e/","https://login.microsoftonline.us/cab8a31a-1906-4287-a0d8-4eef66b95f6e/v2.0","https://login.microsoftonline.us/f8cdef31-a31e-4b4a-93e4-5f571e91255a/","https://login.microsoftonline.us/f8cdef31-a31e-4b4a-93e4-5f571e91255a/v2.0"],audience:void 0,clockTolerance:5*60,ignoreExpiration:!1},TA={issuer:[],audience:void 0,clockTolerance:5*60,ignoreExpiration:!1};exports.EmulatorValidation = void 0;(n=>{n.ToBotFromEmulatorTokenValidationParameters=Bo;function e(i){var w;if(!i)return !1;let o=i.split(" ");if(o.length!==2)return !1;let a=o[0],s=o[1];if(a!=="Bearer")return !1;let c=(0, dU.decode)(s,{complete:!0});if(!c)return !1;let u=c.payload[exports.AuthenticationConstants.IssuerClaim];if(!u)return !1;let l=Bo.issuer;if(Array.isArray(l)){let T=(w=c==null?void 0:c.payload[exports.AuthenticationConstants.TenantIdClaim])!=null?w:"";T!=""&&l.find(x=>x.includes(T))==null&&(l.push(`${exports.AuthenticationConstants.ValidTokenIssuerUrlTemplateV1}${T}/`),l.push(`${exports.AuthenticationConstants.ValidTokenIssuerUrlTemplateV2}${T}/v2.0`),l.push(`${exports.AuthenticationConstants.ValidGovernmentTokenIssuerUrlTemplateV1}${T}/`),l.push(`${exports.AuthenticationConstants.ValidGovernmentTokenIssuerUrlTemplateV2}${T}/v2.0`));}return !(l&&l.indexOf(u)===-1)}n.isTokenFromEmulator=e;function r(u,l,w,T){return re(this,arguments,function*(i,o,a,s,c=new Cn){let x=a!==void 0&&exports.JwtTokenValidation.isGovernment(a)?exports.GovernmentConstants.ToBotFromEmulatorOpenIdMetadataUrl:exports.AuthenticationConstants.ToBotFromEmulatorOpenIdMetadataUrl,k=yield new dn(n.ToBotFromEmulatorTokenValidationParameters,x,exports.AuthenticationConstants.AllowedSigningAlgorithms).getIdentityFromAuthHeader(i,s,c.requiredEndorsements);if(!k)throw new je("Unauthorized. No valid identity.",u$e.StatusCodes.UNAUTHORIZED);if(!k.isAuthenticated)throw new je("Unauthorized. Is not authenticated",u$e.StatusCodes.UNAUTHORIZED);let q=k.getClaimValue(exports.AuthenticationConstants.VersionClaim);if(q===null)throw new je('Unauthorized. "ver" claim is required on Emulator Tokens.',u$e.StatusCodes.UNAUTHORIZED);let j="";if(!q||q==="1.0"){let K=k.getClaimValue(exports.AuthenticationConstants.AppIdClaim);if(!K)throw new je('Unauthorized. "appid" claim is required on Emulator Token version "1.0".',u$e.StatusCodes.UNAUTHORIZED);j=K;}else if(q==="2.0"){let K=k.getClaimValue(exports.AuthenticationConstants.AuthorizedParty);if(!K)throw new je('Unauthorized. "azp" claim is required on Emulator Token version "2.0".',u$e.StatusCodes.UNAUTHORIZED);j=K;}else throw new je(`Unauthorized. Unknown Emulator Token version "${q}".`,u$e.StatusCodes.UNAUTHORIZED);if(!(yield o.isValidAppId(j)))throw new je(`Unauthorized. Invalid AppId passed on token: ${j}`,u$e.StatusCodes.UNAUTHORIZED);return k})}n.authenticateEmulatorToken=r;})(exports.EmulatorValidation||(exports.EmulatorValidation={}));v();m();y();g();exports.EnterpriseChannelValidation = void 0;(i=>{i.ToBotFromEnterpriseChannelTokenValidationParameters={issuer:[exports.AuthenticationConstants.ToBotFromChannelTokenIssuer],audience:void 0,clockTolerance:300,ignoreExpiration:!1};function e(o,a,s,c,u){return re(this,null,function*(){let l=yield r(o,a,c,u);if(l.getClaimValue(exports.AuthenticationConstants.ServiceUrlClaim)!==s)throw new je("Unauthorized. ServiceUrl claim do not match.",u$e.StatusCodes.UNAUTHORIZED);return l})}i.authenticateChannelTokenWithServiceUrl=e;function r(l,w,T,x){return re(this,arguments,function*(o,a,s,c,u=new Cn){let k=yield new dn(i.ToBotFromEnterpriseChannelTokenValidationParameters,exports.ChannelValidation.OpenIdMetadataEndpoint?exports.ChannelValidation.OpenIdMetadataEndpoint:exports.AuthenticationConstants.ToBotFromEnterpriseChannelOpenIdMetadataUrlFormat.replace("{channelService}",c),exports.AuthenticationConstants.AllowedSigningAlgorithms).getIdentityFromAuthHeader(o,s,u.requiredEndorsements);return yield n(k,a)})}i.authenticateChannelToken=r;function n(o,a){return re(this,null,function*(){if(!o)throw new je("Unauthorized. No valid identity.",u$e.StatusCodes.UNAUTHORIZED);if(!o.isAuthenticated)throw new je("Unauthorized. Is not authenticated",u$e.StatusCodes.UNAUTHORIZED);if(o.getClaimValue(exports.AuthenticationConstants.IssuerClaim)!==exports.AuthenticationConstants.ToBotFromChannelTokenIssuer)throw new je("Unauthorized. Issuer Claim MUST be present.",u$e.StatusCodes.UNAUTHORIZED);let s=o.getClaimValue(exports.AuthenticationConstants.AudienceClaim);if(!(yield a.isValidAppId(s||"")))throw new je(`Unauthorized. Invalid AppId passed on token: ${s}`,u$e.StatusCodes.UNAUTHORIZED);return o})}i.validateIdentity=n;})(exports.EnterpriseChannelValidation||(exports.EnterpriseChannelValidation={}));v();m();y();g();exports.GovernmentChannelValidation = void 0;(o=>{o.ToBotFromGovernmentChannelTokenValidationParameters={issuer:[exports.GovernmentConstants.ToBotFromChannelTokenIssuer],audience:void 0,clockTolerance:300,ignoreExpiration:!1};function r(a,s,c,u){return re(this,null,function*(){let l=yield n(a,s,u);if(l.getClaimValue(exports.AuthenticationConstants.ServiceUrlClaim)!==c)throw new je("Unauthorized. ServiceUrl claim do not match.",u$e.StatusCodes.UNAUTHORIZED);return l})}o.authenticateChannelTokenWithServiceUrl=r;function n(l,w,T){return re(this,arguments,function*(a,s,c,u=new Cn){let I=yield new dn(o.ToBotFromGovernmentChannelTokenValidationParameters,o.OpenIdMetadataEndpoint?o.OpenIdMetadataEndpoint:exports.GovernmentConstants.ToBotFromChannelOpenIdMetadataUrl,exports.AuthenticationConstants.AllowedSigningAlgorithms).getIdentityFromAuthHeader(a,c,u.requiredEndorsements);return yield i(I,s)})}o.authenticateChannelToken=n;function i(a,s){return re(this,null,function*(){if(!a)throw new je("Unauthorized. No valid identity.",u$e.StatusCodes.UNAUTHORIZED);if(!a.isAuthenticated)throw new je("Unauthorized. Is not authenticated",u$e.StatusCodes.UNAUTHORIZED);if(a.getClaimValue(exports.AuthenticationConstants.IssuerClaim)!==exports.GovernmentConstants.ToBotFromChannelTokenIssuer)throw new je("Unauthorized. Issuer Claim MUST be present.",u$e.StatusCodes.UNAUTHORIZED);let c=a.getClaimValue(exports.AuthenticationConstants.AudienceClaim);if(!(yield s.isValidAppId(c||"")))throw new je(`Unauthorized. Invalid AppId passed on token: ${c}`,u$e.StatusCodes.UNAUTHORIZED);return a})}o.validateIdentity=i;})(exports.GovernmentChannelValidation||(exports.GovernmentChannelValidation={}));v();m();y();g();var hU=on(_p());exports.SkillValidation = void 0;(o=>{function t(a){if(!exports.JwtTokenValidation.isValidTokenFormat(a))return !1;let[,...s]=a.trim().split(" "),c=(0, hU.decode)(s.join(" ")),u=[];return c&&typeof c=="object"&&(u=Object.entries(c).map(([l,w])=>({type:l,value:w}))),e(u)}o.isSkillToken=t;function e(a){if(!a)throw new TypeError("SkillValidation.isSkillClaim(): missing claims.");let s=a.reduce((I,k)=>Me(oe({},I),{[k.type]:k}),{}),c=s[exports.AuthenticationConstants.AppIdClaim];if(c&&c.value===exports.AuthenticationConstants.AnonymousSkillAppId)return !0;let u=s[exports.AuthenticationConstants.VersionClaim];if(!(u&&u.value))return !1;let w=s[exports.AuthenticationConstants.AudienceClaim],T=w&&w.value;if(!w||exports.AuthenticationConstants.ToBotFromChannelTokenIssuer===T||exports.GovernmentConstants.ToBotFromChannelTokenIssuer===T)return !1;let x=exports.JwtTokenValidation.getAppIdFromClaims(a);return x?x!==T:!1}o.isSkillClaim=e;function r(a,s,c,u,l){return re(this,null,function*(){var q;if(!l)throw new je("SkillValidation.authenticateChannelToken(): invalid authConfig parameter",u$e.StatusCodes.INTERNAL_SERVER_ERROR);let w=exports.JwtTokenValidation.isGovernment(c)?exports.GovernmentConstants.ToBotFromEmulatorOpenIdMetadataUrl:exports.AuthenticationConstants.ToBotFromEmulatorOpenIdMetadataUrl,T=Me(oe({},Bo),{issuer:[...Bo.issuer,...(q=l.validTokenIssuers)!=null?q:[]]}),x=new dn(T,w,exports.AuthenticationConstants.AllowedSigningAlgorithms),I=a.split(" "),k=yield x.getIdentity(I[0],I[1],u,l.requiredEndorsements);return yield n(k,s),k})}o.authenticateChannelToken=r;function n(a,s){return re(this,null,function*(){if(!a)throw new je("SkillValidation.validateIdentity(): Invalid identity",u$e.StatusCodes.UNAUTHORIZED);if(!a.isAuthenticated)throw new je("SkillValidation.validateIdentity(): Token not authenticated",u$e.StatusCodes.UNAUTHORIZED);if(!a.getClaimValue(exports.AuthenticationConstants.VersionClaim))throw new je(`SkillValidation.validateIdentity(): '${exports.AuthenticationConstants.VersionClaim}' claim is required on skill Tokens.`,u$e.StatusCodes.UNAUTHORIZED);let u=a.getClaimValue(exports.AuthenticationConstants.AudienceClaim);if(!u)throw new je(`SkillValidation.validateIdentity(): '${exports.AuthenticationConstants.AudienceClaim}' claim is required on skill Tokens.`,u$e.StatusCodes.UNAUTHORIZED);if(!(yield s.isValidAppId(u)))throw new je("SkillValidation.validateIdentity(): Invalid audience.",u$e.StatusCodes.UNAUTHORIZED);if(!exports.JwtTokenValidation.getAppIdFromClaims(a.claims))throw new je("SkillValidation.validateIdentity(): Invalid appId.",u$e.StatusCodes.UNAUTHORIZED)})}o.validateIdentity=n;function i(){return new ya([{type:exports.AuthenticationConstants.AppIdClaim,value:exports.AuthenticationConstants.AnonymousSkillAppId}],exports.AuthenticationConstants.AnonymousAuthType)}o.createAnonymousSkillClaim=i;})(exports.SkillValidation||(exports.SkillValidation={}));v();m();y();g();v();m();y();g();var Zv=class{toJSON(){return {name:this.constructor.name,appId:this.appId}}constructor(e,r){this.appId=e,this.appPassword=r;}isValidAppId(e){return Promise.resolve(this.appId===e)}getAppPassword(e){return Promise.resolve(this.appId===e?this.appPassword:null)}isAuthenticationDisabled(){return Promise.resolve(!this.appId)}};exports.AseChannelValidation = void 0;(s=>{let t="AseChannel",e,r;function i(c){let u=c.MicrosoftAppId,l=c.MicrosoftAppTenantId;r=c.ChannelService,s.MetadataUrl=r!==void 0&&exports.JwtTokenValidation.isGovernment(r)?exports.GovernmentConstants.ToBotFromEmulatorOpenIdMetadataUrl:exports.AuthenticationConstants.ToBotFromEmulatorOpenIdMetadataUrl,e=new Zv(u,"");let w=[l,"f8cdef31-a31e-4b4a-93e4-5f571e91255a","d6d49420-f39b-4df7-a1dc-d59a935871db"],T=[];w.forEach(x=>{T.push(`https://sts.windows.net/${x}/`),T.push(`https://login.microsoftonline.com/${x}/v2.0`),T.push(`https://login.microsoftonline.us/${x}/v2.0`);}),TA.issuer=T;}s.init=i;function o(c){return c===t}s.isTokenFromAseChannel=o;function a(l){return re(this,arguments,function*(c,u=new Cn){let T=yield new dn(TA,s.MetadataUrl,exports.AuthenticationConstants.AllowedSigningAlgorithms).getIdentityFromAuthHeader(c,t,u.requiredEndorsements);if(!T)throw new je("Unauthorized. No valid identity.",u$e.StatusCodes.UNAUTHORIZED);if(!T.isAuthenticated)throw new je("Unauthorized. Is not authenticated",u$e.StatusCodes.UNAUTHORIZED);let x=T.getClaimValue(exports.AuthenticationConstants.VersionClaim);if(x===null)throw new je('Unauthorized. "ver" claim is required on Emulator Tokens.',u$e.StatusCodes.UNAUTHORIZED);let I="";if(!x||x==="1.0"){let k=T.getClaimValue(exports.AuthenticationConstants.AppIdClaim);if(!k)throw new je('Unauthorized. "appid" claim is required on Emulator Token version "1.0".',u$e.StatusCodes.UNAUTHORIZED);I=k;}else if(x==="2.0"){let k=T.getClaimValue(exports.AuthenticationConstants.AuthorizedParty);if(!k)throw new je('Unauthorized. "azp" claim is required on Emulator Token version "2.0".',u$e.StatusCodes.UNAUTHORIZED);I=k;}else throw new je(`Unauthorized. Unknown Emulator Token version "${x}".`,u$e.StatusCodes.UNAUTHORIZED);if(!(yield e.isValidAppId(I)))throw new je(`Unauthorized. Invalid AppId passed on token: ${I}`,u$e.StatusCodes.UNAUTHORIZED);return T})}s.authenticateAseChannelToken=a;})(exports.AseChannelValidation||(exports.AseChannelValidation={}));exports.JwtTokenValidation = void 0;(c=>{function t(u,l,w,T,x){return re(this,null,function*(){if(x||(x=new Cn),!l.trim()){if(!(yield w.isAuthenticationDisabled()))throw new je("Unauthorized Access. Request is not authorized",u$e.StatusCodes.UNAUTHORIZED);return u.channelId===u$e.Channels.Emulator&&u.recipient&&u.recipient.role===u$e.RoleTypes.Skill?exports.SkillValidation.createAnonymousSkillClaim():new ya([],exports.AuthenticationConstants.AnonymousAuthType)}return yield e(l,w,T,u.channelId,u.serviceUrl,x)})}c.authenticateRequest=t;function e(k,q,j,K){return re(this,arguments,function*(u,l,w,T,x="",I=new Cn){if(!u.trim())throw new je("'authHeader' required.",u$e.StatusCodes.BAD_REQUEST);let Z=yield r(u,l,w,T,I,x);return yield n(I,Z.claims),Z})}c.validateAuthHeader=e;function r(u,l,w,T,x,I){return re(this,null,function*(){return exports.AseChannelValidation.isTokenFromAseChannel(T)?exports.AseChannelValidation.authenticateAseChannelToken(u):exports.SkillValidation.isSkillToken(u)?yield exports.SkillValidation.authenticateChannelToken(u,l,w,T,x):exports.EmulatorValidation.isTokenFromEmulator(u)?yield exports.EmulatorValidation.authenticateEmulatorToken(u,l,w,T):o(w)?I.trim()?yield exports.ChannelValidation.authenticateChannelTokenWithServiceUrl(u,l,I,T):yield exports.ChannelValidation.authenticateChannelToken(u,l,T):a(w)?I.trim()?yield exports.GovernmentChannelValidation.authenticateChannelTokenWithServiceUrl(u,l,I,T):yield exports.GovernmentChannelValidation.authenticateChannelToken(u,l,T):I.trim()?yield exports.EnterpriseChannelValidation.authenticateChannelTokenWithServiceUrl(u,l,I,T,w):yield exports.EnterpriseChannelValidation.authenticateChannelToken(u,l,T,w)})}function n(w){return re(this,arguments,function*(u,l=[]){if(u.validateClaims)yield u.validateClaims(l);else if(exports.SkillValidation.isSkillClaim(l))throw new je("Unauthorized Access. Request is not authorized. Skill Claims require validation.",u$e.StatusCodes.UNAUTHORIZED)})}function i(u){if(!u)throw new TypeError("JwtTokenValidation.getAppIdFromClaims(): missing claims.");let l,w=u.reduce((I,k)=>Me(oe({},I),{[k.type]:k}),{}),T=w[exports.AuthenticationConstants.VersionClaim],x=T&&T.value;if(!x||x==="1.0"){let I=w[exports.AuthenticationConstants.AppIdClaim];I&&I.value&&(l=I.value);}else if(x==="2.0"){let I=w[exports.AuthenticationConstants.AuthorizedParty];I&&I.value&&(l=I.value);}return l}c.getAppIdFromClaims=i;function o(u){return !u||u.length===0}function a(u){return u&&u.toLowerCase()===exports.GovernmentConstants.ChannelService}c.isGovernment=a;function s(u){if(!u)return !1;let l=u.trim().split(" ");return !(l.length!==2||l[0]!=="Bearer")}c.isValidTokenFormat=s;})(exports.JwtTokenValidation||(exports.JwtTokenValidation={}));eo();function $Be(t){Qt(t),Qt(t.length);let e=new Set(t);return r=>re(this,null,function*(){if(!e.has("*")&&exports.SkillValidation.isSkillClaim(r)){let n=exports.JwtTokenValidation.getAppIdFromClaims(r);if(!e.has(n))throw new Error(`Received a request from an application with an appID of "${n}". To enable requests from this skill, add the skill to your configuration file.`)}})}v();m();y();g();v();m();y();g();v();m();y();g();v();m();y();g();v();m();y();g();function Hp(t){return t.toLowerCase()}function xA(t){if(t&&typeof t=="object"){let e=t;if(typeof e.rawHeaders=="function"&&typeof e.clone=="function"&&typeof e.get=="function"&&typeof e.set=="function"&&typeof e.contains=="function"&&typeof e.remove=="function"&&typeof e.headersArray=="function"&&typeof e.headerValues=="function"&&typeof e.headerNames=="function"&&typeof e.toJson=="function")return !0}return !1}var Uo=class t{constructor(e){if(this._headersMap={},e)for(let r in e)this.set(r,e[r]);}set(e,r){this._headersMap[Hp(e)]={name:e,value:r.toString().trim()};}get(e){let r=this._headersMap[Hp(e)];return r?r.value:void 0}contains(e){return !!this._headersMap[Hp(e)]}remove(e){let r=this.contains(e);return delete this._headersMap[Hp(e)],r}rawHeaders(){return this.toJson({preserveCase:!0})}headersArray(){let e=[];for(let r in this._headersMap)e.push(this._headersMap[r]);return e}headerNames(){let e=[],r=this.headersArray();for(let n=0;n<r.length;++n)e.push(r[n].name);return e}headerValues(){let e=[],r=this.headersArray();for(let n=0;n<r.length;++n)e.push(r[n].value);return e}toJson(e={}){let r={};if(e.preserveCase)for(let n in this._headersMap){let i=this._headersMap[n];r[i.name]=i.value;}else for(let n in this._headersMap){let i=this._headersMap[n];r[Hp(i.name)]=i.value;}return r}toString(){return JSON.stringify(this.toJson({preserveCase:!0}))}clone(){let e={};for(let r in this._headersMap){let n=this._headersMap[r];e[n.name]=n.value;}return new t(e)}};v();m();y();g();v();m();y();g();function IA(t){let e="";for(let r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return btoa(e)}function MA(t){let e=atob(t),r=new Uint8Array(e.length);for(let n=0;n<e.length;n++)r[n]=e.charCodeAt(n);return r}v();m();y();g();v();m();y();g();var io={coreHttpVersion:"3.0.4",HTTP:"http:",HTTPS:"https:",HTTP_PROXY:"HTTP_PROXY",HTTPS_PROXY:"HTTPS_PROXY",NO_PROXY:"NO_PROXY",ALL_PROXY:"ALL_PROXY",HttpConstants:{HttpVerbs:{PUT:"PUT",GET:"GET",DELETE:"DELETE",POST:"POST",MERGE:"MERGE",HEAD:"HEAD",PATCH:"PATCH"},StatusCodes:{TooManyRequests:429,ServiceUnavailable:503}},HeaderConstants:{AUTHORIZATION:"authorization",AUTHORIZATION_SCHEME:"Bearer",RETRY_AFTER:"Retry-After",USER_AGENT:"User-Agent"}};v();m();y();g();var wr="$",oo="_";v();m();y();g();v();m();y();g();var pU=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),Bue=new Uint8Array(16);function OA(){if(!pU)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return pU(Bue)}v();m();y();g();v();m();y();g();v();m();y();g();var mU=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function Uue(t){return typeof t=="string"&&mU.test(t)}var yU=Uue;var wn=[];for(Jv=0;Jv<256;++Jv)wn.push((Jv+256).toString(16).substr(1));var Jv;function Due(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=(wn[t[e+0]]+wn[t[e+1]]+wn[t[e+2]]+wn[t[e+3]]+"-"+wn[t[e+4]]+wn[t[e+5]]+"-"+wn[t[e+6]]+wn[t[e+7]]+"-"+wn[t[e+8]]+wn[t[e+9]]+"-"+wn[t[e+10]]+wn[t[e+11]]+wn[t[e+12]]+wn[t[e+13]]+wn[t[e+14]]+wn[t[e+15]]).toLowerCase();if(!yU(r))throw TypeError("Stringified UUID is invalid");return r}var gU=Due;v();m();y();g();function Lue(t,e,r){t=t||{};var n=t.random||(t.rng||OA)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,e){r=r||0;for(var i=0;i<16;++i)e[r+i]=n[i];return e}return gU(n)}var NA=Lue;var que=/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/i;function vU(t){return que.test(t)}function jp(){return NA()}function bU(t,e,r,n){if(Array.isArray(t)||(t=[t]),!r||!n)return {[e]:t};let i={[e]:t};return i[wr]={[r]:n},i}var Fue=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function wU(t){return Fue.test(t)}function ld(t,e,r){return !t||!e?t:t.split(e).join(r||"")}function EU(t){return typeof t!="object"&&typeof t!="function"||t===null}function _U(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)&&!(t instanceof RegExp)&&!(t instanceof Date)}var Ln=class{constructor(e={},r){this.modelMappers=e,this.isXML=r;}validateConstraints(e,r,n){let i=(o,a)=>{throw new Error(`"${n}" with value "${r}" should satisfy the constraint "${o}": ${a}.`)};if(e.constraints&&r!=null){let o=r,{ExclusiveMaximum:a,ExclusiveMinimum:s,InclusiveMaximum:c,InclusiveMinimum:u,MaxItems:l,MaxLength:w,MinItems:T,MinLength:x,MultipleOf:I,Pattern:k,UniqueItems:q}=e.constraints;a!=null&&o>=a&&i("ExclusiveMaximum",a),s!=null&&o<=s&&i("ExclusiveMinimum",s),c!=null&&o>c&&i("InclusiveMaximum",c),u!=null&&o<u&&i("InclusiveMinimum",u);let j=r;if(l!=null&&j.length>l&&i("MaxItems",l),w!=null&&j.length>w&&i("MaxLength",w),T!=null&&j.length<T&&i("MinItems",T),x!=null&&j.length<x&&i("MinLength",x),I!=null&&o%I!==0&&i("MultipleOf",I),k){let K=typeof k=="string"?new RegExp(k):k;(typeof r!="string"||r.match(K)===null)&&i("Pattern",k);}q&&j.some((K,Z,se)=>se.indexOf(K)!==Z)&&i("UniqueItems",q);}}serialize(e,r,n,i={}){var o,a,s;let c={rootName:(o=i.rootName)!==null&&o!==void 0?o:"",includeRoot:(a=i.includeRoot)!==null&&a!==void 0?a:!1,xmlCharKey:(s=i.xmlCharKey)!==null&&s!==void 0?s:oo},u={},l=e.type.name;n||(n=e.serializedName),l.match(/^Sequence$/i)!==null&&(u=[]),e.isConstant&&(r=e.defaultValue);let{required:w,nullable:T}=e;if(w&&T&&r===void 0)throw new Error(`${n} cannot be undefined.`);if(w&&!T&&r==null)throw new Error(`${n} cannot be null or undefined.`);if(!w&&T===!1&&r===null)throw new Error(`${n} cannot be null.`);return r==null||l.match(/^any$/i)!==null?u=r:l.match(/^(Number|String|Boolean|Object|Stream|Uuid)$/i)!==null?u=Gue(l,n,r):l.match(/^Enum$/i)!==null?u=Kue(n,e.type.allowedValues,r):l.match(/^(Date|DateTime|TimeSpan|DateTimeRfc1123|UnixTime)$/i)!==null?u=Zue(l,r,n):l.match(/^ByteArray$/i)!==null?u=Wue(n,r):l.match(/^Base64Url$/i)!==null?u=Yue(n,r):l.match(/^Sequence$/i)!==null?u=Jue(this,e,r,n,!!this.isXML,c):l.match(/^Dictionary$/i)!==null?u=Xue(this,e,r,n,!!this.isXML,c):l.match(/^Composite$/i)!==null&&(u=ele(this,e,r,n,!!this.isXML,c)),u}deserialize(e,r,n,i={}){var o,a,s;let c={rootName:(o=i.rootName)!==null&&o!==void 0?o:"",includeRoot:(a=i.includeRoot)!==null&&a!==void 0?a:!1,xmlCharKey:(s=i.xmlCharKey)!==null&&s!==void 0?s:oo};if(r==null)return this.isXML&&e.type.name==="Sequence"&&!e.xmlIsWrapped&&(r=[]),e.defaultValue!==void 0&&(r=e.defaultValue),r;let u,l=e.type.name;if(n||(n=e.serializedName),l.match(/^Composite$/i)!==null)u=rle(this,e,r,n,c);else {if(this.isXML){let w=c.xmlCharKey,T=r;T[wr]!=null&&T[w]!=null&&(r=T[w]);}l.match(/^Number$/i)!==null?(u=parseFloat(r),isNaN(u)&&(u=r)):l.match(/^Boolean$/i)!==null?r==="true"?u=!0:r==="false"?u=!1:u=r:l.match(/^(String|Enum|Object|Stream|Uuid|TimeSpan|any)$/i)!==null?u=r:l.match(/^(Date|DateTime|DateTimeRfc1123)$/i)!==null?u=new Date(r):l.match(/^UnixTime$/i)!==null?u=Vue(r):l.match(/^ByteArray$/i)!==null?u=MA(r):l.match(/^Base64Url$/i)!==null?u=jue(r):l.match(/^Sequence$/i)!==null?u=ile(this,e,r,n,c):l.match(/^Dictionary$/i)!==null&&(u=nle(this,e,r,n,c));}return e.isConstant&&(u=e.defaultValue),u}};function zue(t,e){let r=t.length;for(;r-1>=0&&t[r-1]===e;)--r;return t.substr(0,r)}function Hue(t){if(!t)return;if(!(t instanceof Uint8Array))throw new Error("Please provide an input of type Uint8Array for converting to Base64Url.");let e=IA(t);return zue(e,"=").replace(/\+/g,"-").replace(/\//g,"_")}function jue(t){if(t){if(t&&typeof t.valueOf()!="string")throw new Error("Please provide an input of type string for converting to Uint8Array");return t=t.replace(/-/g,"+").replace(/_/g,"/"),MA(t)}}function PA(t){let e=[],r="";if(t){let n=t.split(".");for(let i of n)i.charAt(i.length-1)==="\\"?r+=i.substr(0,i.length-1)+".":(r+=i,e.push(r),r="");}return e}function $ue(t){if(t)return typeof t.valueOf()=="string"&&(t=new Date(t)),Math.floor(t.getTime()/1e3)}function Vue(t){if(t)return new Date(t*1e3)}function Gue(t,e,r){if(r!=null){if(t.match(/^Number$/i)!==null){if(typeof r!="number")throw new Error(`${e} with value ${r} must be of type number.`)}else if(t.match(/^String$/i)!==null){if(typeof r.valueOf()!="string")throw new Error(`${e} with value "${r}" must be of type string.`)}else if(t.match(/^Uuid$/i)!==null){if(!(typeof r.valueOf()=="string"&&vU(r)))throw new Error(`${e} with value "${r}" must be of type string and a valid uuid.`)}else if(t.match(/^Boolean$/i)!==null){if(typeof r!="boolean")throw new Error(`${e} with value ${r} must be of type boolean.`)}else if(t.match(/^Stream$/i)!==null){let n=typeof r;if(n!=="string"&&n!=="function"&&!(r instanceof ArrayBuffer)&&!ArrayBuffer.isView(r)&&!((typeof Blob=="function"||typeof Blob=="object")&&r instanceof Blob))throw new Error(`${e} must be a string, Blob, ArrayBuffer, ArrayBufferView, or a function returning NodeJS.ReadableStream.`)}}return r}function Kue(t,e,r){if(!e)throw new Error(`Please provide a set of allowedValues to validate ${t} as an Enum Type.`);if(!e.some(i=>typeof i.valueOf()=="string"?i.toLowerCase()===r.toLowerCase():i===r))throw new Error(`${r} is not a valid value for ${t}. The valid values are: ${JSON.stringify(e)}.`);return r}function Wue(t,e){let r="";if(e!=null){if(!(e instanceof Uint8Array))throw new Error(`${t} must be of type Uint8Array.`);r=IA(e);}return r}function Yue(t,e){let r="";if(e!=null){if(!(e instanceof Uint8Array))throw new Error(`${t} must be of type Uint8Array.`);r=Hue(e)||"";}return r}function Zue(t,e,r){if(e!=null){if(t.match(/^Date$/i)!==null){if(!(e instanceof Date||typeof e.valueOf()=="string"&&!isNaN(Date.parse(e))))throw new Error(`${r} must be an instanceof Date or a string in ISO8601 format.`);e=e instanceof Date?e.toISOString().substring(0,10):new Date(e).toISOString().substring(0,10);}else if(t.match(/^DateTime$/i)!==null){if(!(e instanceof Date||typeof e.valueOf()=="string"&&!isNaN(Date.parse(e))))throw new Error(`${r} must be an instanceof Date or a string in ISO8601 format.`);e=e instanceof Date?e.toISOString():new Date(e).toISOString();}else if(t.match(/^DateTimeRfc1123$/i)!==null){if(!(e instanceof Date||typeof e.valueOf()=="string"&&!isNaN(Date.parse(e))))throw new Error(`${r} must be an instanceof Date or a string in RFC-1123 format.`);e=e instanceof Date?e.toUTCString():new Date(e).toUTCString();}else if(t.match(/^UnixTime$/i)!==null){if(!(e instanceof Date||typeof e.valueOf()=="string"&&!isNaN(Date.parse(e))))throw new Error(`${r} must be an instanceof Date or a string in RFC-1123/ISO8601 format for it to be serialized in UnixTime/Epoch format.`);e=$ue(e);}else if(t.match(/^TimeSpan$/i)!==null&&!wU(e))throw new Error(`${r} must be a string in ISO 8601 format. Instead was "${e}".`)}return e}function Jue(t,e,r,n,i,o){if(!Array.isArray(r))throw new Error(`${n} must be of type Array.`);let a=e.type.element;if(!a||typeof a!="object")throw new Error(`element" metadata for an Array must be defined in the mapper and it must of type "object" in ${n}.`);let s=[];for(let c=0;c<r.length;c++){let u=t.serialize(a,r[c],n,o);if(i&&a.xmlNamespace){let l=a.xmlNamespacePrefix?`xmlns:${a.xmlNamespacePrefix}`:"xmlns";a.type.name==="Composite"?(s[c]=Object.assign({},u),s[c][wr]={[l]:a.xmlNamespace}):(s[c]={},s[c][o.xmlCharKey]=u,s[c][wr]={[l]:a.xmlNamespace});}else s[c]=u;}return s}function Xue(t,e,r,n,i,o){if(typeof r!="object")throw new Error(`${n} must be of type object.`);let a=e.type.value;if(!a||typeof a!="object")throw new Error(`"value" metadata for a Dictionary must be defined in the mapper and it must of type "object" in ${n}.`);let s={};for(let c of Object.keys(r)){let u=t.serialize(a,r[c],n,o);s[c]=TU(a,u,i,o);}if(i&&e.xmlNamespace){let c=e.xmlNamespacePrefix?`xmlns:${e.xmlNamespacePrefix}`:"xmlns",u=s;return u[wr]={[c]:e.xmlNamespace},u}return s}function Que(t,e,r){let n=e.type.additionalProperties;if(!n&&e.type.className){let i=CU(t,e,r);return i==null?void 0:i.type.additionalProperties}return n}function CU(t,e,r){let n=e.type.className;if(!n)throw new Error(`Class name for model "${r}" is not provided in the mapper "${JSON.stringify(e,void 0,2)}".`);return t.modelMappers[n]}function AU(t,e,r){let n=e.type.modelProperties;if(!n){let i=CU(t,e,r);if(!i)throw new Error(`mapper() cannot be null or undefined for model "${e.type.className}".`);if(n=i==null?void 0:i.type.modelProperties,!n)throw new Error(`modelProperties cannot be null or undefined in the mapper "${JSON.stringify(i)}" of type "${e.type.className}" for object "${r}".`)}return n}function ele(t,e,r,n,i,o){if(Xv(t,e)&&(e=RU(t,e,r,"clientName")),r!=null){let a={},s=AU(t,e,n);for(let u of Object.keys(s)){let l=s[u];if(l.readOnly)continue;let w,T=a;if(t.isXML)l.xmlIsWrapped?w=l.xmlName:w=l.xmlElementName||l.xmlName;else {let x=PA(l.serializedName);w=x.pop();for(let I of x)T[I]==null&&(r[u]!=null||l.defaultValue!==void 0)&&(T[I]={}),T=T[I];}if(T!=null){if(i&&e.xmlNamespace){let j=e.xmlNamespacePrefix?`xmlns:${e.xmlNamespacePrefix}`:"xmlns";T[wr]=Object.assign(Object.assign({},T[wr]),{[j]:e.xmlNamespace});}let x=l.serializedName!==""?n+"."+l.serializedName:n,I=r[u],k=Xv(t,e);k&&k.clientName===u&&I==null&&(I=e.serializedName);let q=t.serialize(l,I,x,o);if(q!==void 0&&w!=null){let j=TU(l,q,i,o);i&&l.xmlIsAttribute?(T[wr]=T[wr]||{},T[wr][w]=q):i&&l.xmlIsWrapped?T[w]={[l.xmlElementName]:j}:T[w]=j;}}}let c=Que(t,e,n);if(c){let u=Object.keys(s);for(let l in r)u.every(T=>T!==l)&&(a[l]=t.serialize(c,r[l],n+'["'+l+'"]',o));}return a}return r}function TU(t,e,r,n){if(!r||!t.xmlNamespace)return e;let o={[t.xmlNamespacePrefix?`xmlns:${t.xmlNamespacePrefix}`:"xmlns"]:t.xmlNamespace};if(["Composite"].includes(t.type.name)){if(e[wr])return e;{let s=Object.assign({},e);return s[wr]=o,s}}let a={};return a[n.xmlCharKey]=e,a[wr]=o,a}function tle(t,e){return [wr,e.xmlCharKey].includes(t)}function rle(t,e,r,n,i){var o,a;let s=(o=i.xmlCharKey)!==null&&o!==void 0?o:oo;Xv(t,e)&&(e=RU(t,e,r,"serializedName"));let c=AU(t,e,n),u={},l=[];for(let T of Object.keys(c)){let x=c[T],I=PA(c[T].serializedName);l.push(I[0]);let{serializedName:k,xmlName:q,xmlElementName:j}=x,K=n;k!==""&&k!==void 0&&(K=n+"."+k);let Z=x.headerCollectionPrefix;if(Z){let se={};for(let ce of Object.keys(r))ce.startsWith(Z)&&(se[ce.substring(Z.length)]=t.deserialize(x.type.value,r[ce],K,i)),l.push(ce);u[T]=se;}else if(t.isXML)if(x.xmlIsAttribute&&r[wr])u[T]=t.deserialize(x,r[wr][q],K,i);else if(x.xmlIsMsText)r[s]!==void 0?u[T]=r[s]:typeof r=="string"&&(u[T]=r);else {let se=j||q||k;if(x.xmlIsWrapped){let ce=r[q],Te=(a=ce==null?void 0:ce[j])!==null&&a!==void 0?a:[];u[T]=t.deserialize(x,Te,K,i),l.push(q);}else {let ce=r[se];u[T]=t.deserialize(x,ce,K,i),l.push(se);}}else {let se,ce=r;for(let le of I){if(!ce)break;ce=ce[le];}se=ce;let Te=e.type.polymorphicDiscriminator;Te&&T===Te.clientName&&se==null&&(se=e.serializedName);let pe;if(Array.isArray(r[T])&&c[T].serializedName===""){se=r[T];let le=t.deserialize(x,se,K,i);for(let[Y,S]of Object.entries(u))Object.prototype.hasOwnProperty.call(le,Y)||(le[Y]=S);u=le;}else (se!==void 0||x.defaultValue!==void 0)&&(pe=t.deserialize(x,se,K,i),u[T]=pe);}}let w=e.type.additionalProperties;if(w){let T=x=>{for(let I in c)if(PA(c[I].serializedName)[0]===x)return !1;return !0};for(let x in r)T(x)&&(u[x]=t.deserialize(w,r[x],n+'["'+x+'"]',i));}else if(r)for(let T of Object.keys(r))u[T]===void 0&&!l.includes(T)&&!tle(T,i)&&(u[T]=r[T]);return u}function nle(t,e,r,n,i){let o=e.type.value;if(!o||typeof o!="object")throw new Error(`"value" metadata for a Dictionary must be defined in the mapper and it must of type "object" in ${n}`);if(r){let a={};for(let s of Object.keys(r))a[s]=t.deserialize(o,r[s],n,i);return a}return r}function ile(t,e,r,n,i){let o=e.type.element;if(!o||typeof o!="object")throw new Error(`element" metadata for an Array must be defined in the mapper and it must of type "object" in ${n}`);if(r){Array.isArray(r)||(r=[r]);let a=[];for(let s=0;s<r.length;s++)a[s]=t.deserialize(o,r[s],`${n}[${s}]`,i);return a}return r}function RU(t,e,r,n){let i=Xv(t,e);if(i){let o=i[n];if(o!=null){let a=r[o];if(a!=null){let s=e.type.uberParent||e.type.className,c=a===s?a:s+"."+a,u=t.modelMappers.discriminators[c];u&&(e=u);}}}return e}function Xv(t,e){return e.type.polymorphicDiscriminator||SU(t,e.type.uberParent)||SU(t,e.type.className)}function SU(t,e){return e&&t.modelMappers[e]&&t.modelMappers[e].type.polymorphicDiscriminator}function ole(t){let e={};for(let r of t)e[r]=r;return e}var Ea=ole(["Base64Url","Boolean","ByteArray","Composite","Date","DateTime","DateTimeRfc1123","Dictionary","Enum","Number","Object","Sequence","String","Stream","TimeSpan","UnixTime"]);function xU(t){if(t&&typeof t=="object"){let e=t;if(typeof e.url=="string"&&typeof e.method=="string"&&typeof e.headers=="object"&&xA(e.headers)&&typeof e.validateRequestProperties=="function"&&typeof e.prepare=="function"&&typeof e.clone=="function")return !0}return !1}var uc=class t{constructor(e,r,n,i,o,a,s,c,u,l,w,T,x,I,k){this.streamResponseBody=a,this.streamResponseStatusCodes=k,this.url=e||"",this.method=r||"GET",this.headers=xA(o)?o:new Uo(o),this.body=n,this.query=i,this.formData=void 0,this.withCredentials=s||!1,this.abortSignal=c,this.timeout=u||0,this.onUploadProgress=l,this.onDownloadProgress=w,this.proxySettings=T,this.keepAlive=x,this.decompressResponse=I,this.requestId=this.headers.get("x-ms-client-request-id")||jp();}validateRequestProperties(){if(!this.method)throw new Error("WebResource.method is required.");if(!this.url)throw new Error("WebResource.url is required.")}prepare(e){if(!e)throw new Error("options object is required");if(e.method===void 0||e.method===null||typeof e.method.valueOf()!="string")throw new Error("options.method must be a string.");if(e.url&&e.pathTemplate)throw new Error("options.url and options.pathTemplate are mutually exclusive. Please provide exactly one of them.");if((e.pathTemplate===void 0||e.pathTemplate===null||typeof e.pathTemplate.valueOf()!="string")&&(e.url===void 0||e.url===null||typeof e.url.valueOf()!="string"))throw new Error("Please provide exactly one of options.pathTemplate or options.url.");if(e.url){if(typeof e.url!="string")throw new Error('options.url must be of type "string".');this.url=e.url;}if(e.method){let r=["GET","PUT","HEAD","DELETE","OPTIONS","POST","PATCH","TRACE"];if(r.indexOf(e.method.toUpperCase())===-1)throw new Error('The provided method "'+e.method+'" is invalid. Supported HTTP methods are: '+JSON.stringify(r))}if(this.method=e.method.toUpperCase(),e.pathTemplate){let{pathTemplate:r,pathParameters:n}=e;if(typeof r!="string")throw new Error('options.pathTemplate must be of type "string".');e.baseUrl||(e.baseUrl="https://management.azure.com");let i=e.baseUrl,o=i+(i.endsWith("/")?"":"/")+(r.startsWith("/")?r.slice(1):r),a=o.match(/({[\w-]*\s*[\w-]*})/gi);if(a&&a.length){if(!n)throw new Error(`pathTemplate: ${r} has been provided. Hence, options.pathParameters must also be provided.`);a.forEach(function(s){let c=s.slice(1,-1),u=n[c];if(u==null||!(typeof u=="string"||typeof u=="object")){let l=JSON.stringify(n,void 0,2);throw new Error(`pathTemplate: ${r} contains the path parameter ${c} however, it is not present in parameters: ${l}.The value of the path parameter can either be a "string" of the form { ${c}: "some sample value" } or it can be an "object" of the form { "${c}": { value: "some sample value", skipUrlEncoding: true } }.`)}if(typeof u.valueOf()=="string"&&(o=o.replace(s,encodeURIComponent(u))),typeof u.valueOf()=="object"){if(!u.value)throw new Error(`options.pathParameters[${c}] is of type "object" but it does not contain a "value" property.`);u.skipUrlEncoding?o=o.replace(s,u.value):o=o.replace(s,encodeURIComponent(u.value));}});}this.url=o;}if(e.queryParameters){let r=e.queryParameters;if(typeof r!="object")throw new Error('options.queryParameters must be of type object. It should be a JSON object of "query-parameter-name" as the key and the "query-parameter-value" as the value. The "query-parameter-value" may be fo type "string" or an "object" of the form { value: "query-parameter-value", skipUrlEncoding: true }.');this.url&&this.url.indexOf("?")===-1&&(this.url+="?");let n=[];this.query={};for(let i in r){let o=r[i];if(o){if(typeof o=="string")n.push(i+"="+encodeURIComponent(o)),this.query[i]=encodeURIComponent(o);else if(typeof o=="object"){if(!o.value)throw new Error(`options.queryParameters[${i}] is of type "object" but it does not contain a "value" property.`);o.skipUrlEncoding?(n.push(i+"="+o.value),this.query[i]=o.value):(n.push(i+"="+encodeURIComponent(o.value)),this.query[i]=encodeURIComponent(o.value));}}}this.url+=n.join("&");}if(e.headers){let r=e.headers;for(let n of Object.keys(e.headers))this.headers.set(n,r[n]);}return this.headers.get("accept-language")||this.headers.set("accept-language","en-US"),!this.headers.get("x-ms-client-request-id")&&!e.disableClientRequestId&&this.headers.set("x-ms-client-request-id",this.requestId),this.headers.get("Content-Type")||this.headers.set("Content-Type","application/json; charset=utf-8"),this.body=e.body,e.body!==void 0&&e.body!==null&&(e.bodyIsStream?(this.headers.get("Transfer-Encoding")||this.headers.set("Transfer-Encoding","chunked"),this.headers.get("Content-Type")!=="application/octet-stream"&&this.headers.set("Content-Type","application/octet-stream")):(e.serializationMapper&&(this.body=new Ln(e.mappers).serialize(e.serializationMapper,e.body,"requestBody")),e.disableJsonStringifyOnBody||(this.body=JSON.stringify(e.body)))),e.spanOptions&&(this.spanOptions=e.spanOptions),e.tracingContext&&(this.tracingContext=e.tracingContext),this.abortSignal=e.abortSignal,this.onDownloadProgress=e.onDownloadProgress,this.onUploadProgress=e.onUploadProgress,this}clone(){let e=new t(this.url,this.method,this.body,this.query,this.headers&&this.headers.clone(),this.streamResponseBody,this.withCredentials,this.abortSignal,this.timeout,this.onUploadProgress,this.onDownloadProgress,this.proxySettings,this.keepAlive,this.decompressResponse,this.streamResponseStatusCodes);return this.formData&&(e.formData=this.formData),this.operationSpec&&(e.operationSpec=this.operationSpec),this.shouldDeserialize&&(e.shouldDeserialize=this.shouldDeserialize),this.operationResponseGetter&&(e.operationResponseGetter=this.operationResponseGetter),e}};v();m();y();g();v();m();y();g();v();m();y();g();v();m();y();g();v();m();y();g();var BA=function(t,e){return BA=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n;}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i]);},BA(t,e)};function IU(t,e){BA(t,e);function r(){this.constructor=t;}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r);}v();m();y();g();var fd=new WeakMap,Qv=new WeakMap,UA=function(){function t(){this.onabort=null,fd.set(this,[]),Qv.set(this,!1);}return Object.defineProperty(t.prototype,"aborted",{get:function(){if(!Qv.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");return Qv.get(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t,"none",{get:function(){return new t},enumerable:!0,configurable:!0}),t.prototype.addEventListener=function(e,r){if(!fd.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");var n=fd.get(this);n.push(r);},t.prototype.removeEventListener=function(e,r){if(!fd.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");var n=fd.get(this),i=n.indexOf(r);i>-1&&n.splice(i,1);},t.prototype.dispatchEvent=function(e){throw new Error("This is a stub dispatchEvent implementation that should not be used. It only exists for type-checking purposes.")},t}();function DA(t){if(!t.aborted){t.onabort&&t.onabort.call(t);var e=fd.get(t);e&&e.forEach(function(r){r.call(t,{type:"abort"});}),Qv.set(t,!0);}}var lc=function(t){IU(e,t);function e(r){var n=t.call(this,r)||this;return n.name="AbortError",n}return e}(Error);(function(){function t(e){var r=this;if(this._signal=new UA,!!e){Array.isArray(e)||(e=arguments);for(var n=0,i=e;n<i.length;n++){var o=i[n];o.aborted?this.abort():o.addEventListener("abort",function(){r.abort();});}}}return Object.defineProperty(t.prototype,"signal",{get:function(){return this._signal},enumerable:!0,configurable:!0}),t.prototype.abort=function(){DA(this._signal);},t.timeout=function(e){var r=new UA,n=setTimeout(DA,e,r);return typeof n.unref=="function"&&n.unref(),r},t})();v();m();y();g();v();m();y();g();v();m();y();g();var Ku=class t{constructor(){this._rawQuery={};}any(){return Object.keys(this._rawQuery).length>0}keys(){return Object.keys(this._rawQuery)}set(e,r){let n=r;if(e)if(n!=null){let i=Array.isArray(n)?n:n.toString();this._rawQuery[e]=i;}else delete this._rawQuery[e];}get(e){return e?this._rawQuery[e]:void 0}toString(){let e="";for(let r in this._rawQuery){e&&(e+="&");let n=this._rawQuery[r];if(Array.isArray(n)){let i=[];for(let o of n)i.push(`${r}=${o}`);e+=i.join("&");}else e+=`${r}=${n}`;}return e}static parse(e){let r=new t;if(e){e.startsWith("?")&&(e=e.substring(1));let n="ParameterName",i="",o="";for(let a=0;a<e.length;++a){let s=e[a];switch(n){case"ParameterName":switch(s){case"=":n="ParameterValue";break;case"&":i="",o="";break;default:i+=s;break}break;case"ParameterValue":switch(s){case"&":r.set(i,o),i="",o="",n="ParameterName";break;default:o+=s;break}break;default:throw new Error("Unrecognized URLQuery parse state: "+n)}}n==="ParameterValue"&&r.set(i,o);}return r}},fc=class t{setScheme(e){e?this.set(e,"SCHEME"):this._scheme=void 0;}getScheme(){return this._scheme}setHost(e){e?this.set(e,"SCHEME_OR_HOST"):this._host=void 0;}getHost(){return this._host}setPort(e){e==null||e===""?this._port=void 0:this.set(e.toString(),"PORT");}getPort(){return this._port}setPath(e){if(!e)this._path=void 0;else {let r=e.indexOf("://");if(r!==-1){let n=e.lastIndexOf("/",r);this.set(n===-1?e:e.substr(n+1),"SCHEME");}else this.set(e,"PATH");}}appendPath(e){if(e){let r=this.getPath();r&&(r.endsWith("/")||(r+="/"),e.startsWith("/")&&(e=e.substring(1)),e=r+e),this.set(e,"PATH");}}getPath(){return this._path}setQuery(e){e?this._query=Ku.parse(e):this._query=void 0;}setQueryParameter(e,r){e&&(this._query||(this._query=new Ku),this._query.set(e,r));}getQueryParameterValue(e){return this._query?this._query.get(e):void 0}getQuery(){return this._query?this._query.toString():void 0}set(e,r){let n=new LA(e,r);for(;n.next();){let i=n.current(),o;if(i)switch(i.type){case"SCHEME":this._scheme=i.text||void 0;break;case"HOST":this._host=i.text||void 0;break;case"PORT":this._port=i.text||void 0;break;case"PATH":o=i.text||void 0,(!this._path||this._path==="/"||o!=="/")&&(this._path=o);break;case"QUERY":this._query=Ku.parse(i.text);break;default:throw new Error(`Unrecognized URLTokenType: ${i.type}`)}}}toString(){let e="";return this._scheme&&(e+=`${this._scheme}://`),this._host&&(e+=this._host),this._port&&(e+=`:${this._port}`),this._path&&(this._path.startsWith("/")||(e+="/"),e+=this._path),this._query&&this._query.any()&&(e+=`?${this._query.toString()}`),e}replaceAll(e,r){e&&(this.setScheme(ld(this.getScheme(),e,r)),this.setHost(ld(this.getHost(),e,r)),this.setPort(ld(this.getPort(),e,r)),this.setPath(ld(this.getPath(),e,r)),this.setQuery(ld(this.getQuery(),e,r)));}static parse(e){let r=new t;return r.set(e,"SCHEME_OR_HOST"),r}},Do=class t{constructor(e,r){this.text=e,this.type=r;}static scheme(e){return new t(e,"SCHEME")}static host(e){return new t(e,"HOST")}static port(e){return new t(e,"PORT")}static path(e){return new t(e,"PATH")}static query(e){return new t(e,"QUERY")}};function sle(t){let e=t.charCodeAt(0);return 48<=e&&e<=57||65<=e&&e<=90||97<=e&&e<=122}var LA=class{constructor(e,r){this._text=e,this._textLength=e?e.length:0,this._currentState=r!=null?r:"SCHEME_OR_HOST",this._currentIndex=0;}current(){return this._currentToken}next(){if(!hc(this))this._currentToken=void 0;else switch(this._currentState){case"SCHEME":lle(this);break;case"SCHEME_OR_HOST":fle(this);break;case"HOST":dle(this);break;case"PORT":hle(this);break;case"PATH":ple(this);break;case"QUERY":mle(this);break;default:throw new Error(`Unrecognized URLTokenizerState: ${this._currentState}`)}return !!this._currentToken}};function cle(t){let e="";return t._currentIndex<t._textLength&&(e=t._text.substring(t._currentIndex),t._currentIndex=t._textLength),e}function hc(t){return t._currentIndex<t._textLength}function dc(t){return t._text[t._currentIndex]}function eb(t,e){hc(t)&&(e||(e=1),t._currentIndex+=e);}function MU(t,e){let r=t._currentIndex+e;return t._textLength<r&&(r=t._textLength),t._text.substring(t._currentIndex,r)}function OU(t,e){let r="";for(;hc(t);){let n=dc(t);if(e(n))r+=n,eb(t);else break}return r}function ule(t){return OU(t,e=>sle(e))}function tb(t,...e){return OU(t,r=>e.indexOf(r)===-1)}function lle(t){let e=ule(t);t._currentToken=Do.scheme(e),hc(t)?t._currentState="HOST":t._currentState="DONE";}function fle(t){let e=tb(t,":","/","?");hc(t)?dc(t)===":"?MU(t,3)==="://"?(t._currentToken=Do.scheme(e),t._currentState="HOST"):(t._currentToken=Do.host(e),t._currentState="PORT"):(t._currentToken=Do.host(e),dc(t)==="/"?t._currentState="PATH":t._currentState="QUERY"):(t._currentToken=Do.host(e),t._currentState="DONE");}function dle(t){MU(t,3)==="://"&&eb(t,3);let e=tb(t,":","/","?");t._currentToken=Do.host(e),hc(t)?dc(t)===":"?t._currentState="PORT":dc(t)==="/"?t._currentState="PATH":t._currentState="QUERY":t._currentState="DONE";}function hle(t){dc(t)===":"&&eb(t);let e=tb(t,"/","?");t._currentToken=Do.port(e),hc(t)?dc(t)==="/"?t._currentState="PATH":t._currentState="QUERY":t._currentState="DONE";}function ple(t){let e=tb(t,"?");t._currentToken=Do.path(e),hc(t)?t._currentState="QUERY":t._currentState="DONE";}function mle(t){dc(t)==="?"&&eb(t);let e=cle(t);t._currentToken=Do.query(e),t._currentState="DONE";}var NU="REDACTED",kU=["x-ms-client-request-id","x-ms-return-client-request-id","x-ms-useragent","x-ms-correlation-request-id","x-ms-request-id","client-request-id","ms-cv","return-client-request-id","traceparent","Access-Control-Allow-Credentials","Access-Control-Allow-Headers","Access-Control-Allow-Methods","Access-Control-Allow-Origin","Access-Control-Expose-Headers","Access-Control-Max-Age","Access-Control-Request-Headers","Access-Control-Request-Method","Origin","Accept","Accept-Encoding","Cache-Control","Connection","Content-Length","Content-Type","Date","ETag","Expires","If-Match","If-Modified-Since","If-None-Match","If-Unmodified-Since","Last-Modified","Pragma","Request-Id","Retry-After","Server","Transfer-Encoding","User-Agent","WWW-Authenticate"],PU=["api-version"],dd=class{constructor({allowedHeaderNames:e=[],allowedQueryParameters:r=[]}={}){e=Array.isArray(e)?kU.concat(e):kU,r=Array.isArray(r)?PU.concat(r):PU,this.allowedHeaderNames=new Set(e.map(n=>n.toLowerCase())),this.allowedQueryParameters=new Set(r.map(n=>n.toLowerCase()));}sanitize(e){let r=new Set;return JSON.stringify(e,(n,i)=>{if(i instanceof Error)return Object.assign(Object.assign({},i),{name:i.name,message:i.message});if(n==="_headersMap")return this.sanitizeHeaders(i);if(n==="url")return this.sanitizeUrl(i);if(n==="query")return this.sanitizeQuery(i);if(n==="body")return;if(n==="response")return;if(n==="operationSpec")return;if(Array.isArray(i)||_U(i)){if(r.has(i))return "[Circular]";r.add(i);}return i},2)}sanitizeHeaders(e){return this.sanitizeObject(e,this.allowedHeaderNames,(r,n)=>r[n].value)}sanitizeQuery(e){return this.sanitizeObject(e,this.allowedQueryParameters,(r,n)=>r[n])}sanitizeObject(e,r,n){if(typeof e!="object"||e===null)return e;let i={};for(let o of Object.keys(e))r.has(o.toLowerCase())?i[o]=n(e,o):i[o]=NU;return i}sanitizeUrl(e){if(typeof e!="string"||e===null)return e;let r=fc.parse(e),n=r.getQuery();if(!n)return e;let i=Ku.parse(n);for(let o of i.keys())this.allowedQueryParameters.has(o.toLowerCase())||i.set(o,NU);return r.setQuery(i.toString()),r.toString()}};v();m();y();g();var BU={};var yle=new dd,qn=class t extends Error{constructor(e,r,n,i,o){super(e),this.name="RestError",this.code=r,this.statusCode=n,this.request=i,this.response=o,Object.setPrototypeOf(this,t.prototype);}[BU](){return `RestError: ${this.message}
${yle.sanitize(this)}`}};qn.REQUEST_SEND_ERROR="REQUEST_SEND_ERROR";qn.PARSE_ERROR="PARSE_ERROR";var $p=class{sendRequest(e){var r;let n=new XMLHttpRequest;if(e.proxySettings)throw new Error("HTTP proxy is not supported in browser environment");let i=e.abortSignal;if(i){if(i.aborted)return Promise.reject(new lc("The operation was aborted."));let o=()=>{n.abort();};i.addEventListener("abort",o),n.addEventListener("readystatechange",()=>{n.readyState===XMLHttpRequest.DONE&&i.removeEventListener("abort",o);});}if(UU(n.upload,e.onUploadProgress),UU(n,e.onDownloadProgress),e.formData){let o=e.formData,a=new FormData,s=(u,l)=>{l&&Object.prototype.hasOwnProperty.call(l,"value")&&Object.prototype.hasOwnProperty.call(l,"options")?a.append(u,l.value,l.options):a.append(u,l);};for(let u of Object.keys(o)){let l=o[u];if(Array.isArray(l))for(let w=0;w<l.length;w++)s(u,l[w]);else s(u,l);}e.body=a,e.formData=void 0;let c=e.headers.get("Content-Type");c&&c.indexOf("multipart/form-data")!==-1&&e.headers.remove("Content-Type");}n.open(e.method,e.url),n.timeout=e.timeout,n.withCredentials=e.withCredentials;for(let o of e.headers.headersArray())n.setRequestHeader(o.name,o.value);return n.responseType=!((r=e.streamResponseStatusCodes)===null||r===void 0)&&r.size||e.streamResponseBody?"blob":"text",n.send(e.body===void 0?null:e.body),n.responseType==="blob"?new Promise((o,a)=>{gle(n,e,o,a),qA(e,n,a);}):new Promise(function(o,a){n.addEventListener("load",()=>o({request:e,status:n.status,headers:rb(n),bodyAsText:n.responseText})),qA(e,n,a);})}};function gle(t,e,r,n){t.addEventListener("readystatechange",()=>{var i;if(t.readyState===XMLHttpRequest.HEADERS_RECEIVED)if(e.streamResponseBody||!((i=e.streamResponseStatusCodes)===null||i===void 0)&&i.has(t.status)){let o=new Promise((a,s)=>{t.addEventListener("load",()=>{a(t.response);}),qA(e,t,s);});r({request:e,status:t.status,headers:rb(t),blobBody:o});}else t.addEventListener("load",()=>{if(t.response){let o=new FileReader;o.onload=function(a){var s;let c=(s=a.target)===null||s===void 0?void 0:s.result;r({request:e,status:t.status,headers:rb(t),bodyAsText:c});},o.onerror=function(a){n(o.error);},o.readAsText(t.response,"UTF-8");}else r({request:e,status:t.status,headers:rb(t)});});});}function UU(t,e){e&&t.addEventListener("progress",r=>e({loadedBytes:r.loaded}));}function rb(t){let e=new Uo,r=t.getAllResponseHeaders().trim().split(/[\r\n]+/);for(let n of r){let i=n.indexOf(":"),o=n.slice(0,i),a=n.slice(i+2);e.set(o,a);}return e}function qA(t,e,r){e.addEventListener("error",()=>r(new qn(`Failed to send request to ${t.url}`,qn.REQUEST_SEND_ERROR,void 0,t)));let n=new lc("The operation was aborted.");e.addEventListener("abort",()=>r(n)),e.addEventListener("timeout",()=>r(n));}v();m();y();g();var nb;(function(t){t[t.OFF=0]="OFF",t[t.ERROR=1]="ERROR",t[t.WARNING=2]="WARNING",t[t.INFO=3]="INFO";})(nb||(nb={}));v();m();y();g();v();m();y();g();v();m();y();g();var Er=class{constructor(e,r){this._nextPolicy=e,this._options=r;}shouldLog(e){return this._options.shouldLog(e)}log(e,r){this._options.log(e,r);}},ib=class{constructor(e){this._logger=e;}shouldLog(e){return !!this._logger&&e!==nb.OFF&&e<=this._logger.minimumLogLevel}log(e,r){this._logger&&this.shouldLog(e)&&this._logger.log(e,r);}};v();m();y();g();if(!self.document||!self.DOMParser||!self.Node||!self.XMLSerializer)throw new Error('This library depends on the following DOM objects: ["document", "DOMParser", "Node", "XMLSerializer"] to parse XML, but some of these are undefined. You may provide a polyfill to make these globally available in order to support your environment. For more information, please refer to https://aka.ms/azsdk/js/web-workers. ');var FA;function jA(){return FA||(FA=document.implementation.createDocument(null,null,null)),FA}var zA;function DU(){return zA||(zA=new DOMParser),zA}var HA;function vle(){return HA||(HA=new XMLSerializer),HA}var Wu;typeof self.trustedTypes!="undefined"&&(Wu=self.trustedTypes.createPolicy("@azure/core-http#xml.browser",{createHTML:t=>t}));function LU(t,e={}){var r,n,i,o;try{let a={rootName:(r=e.rootName)!==null&&r!==void 0?r:"",includeRoot:(n=e.includeRoot)!==null&&n!==void 0?n:!1,xmlCharKey:(i=e.xmlCharKey)!==null&&i!==void 0?i:oo},s=DU().parseFromString((o=Wu==null?void 0:Wu.createHTML(t))!==null&&o!==void 0?o:t,"application/xml");wle(s);let c;return a.includeRoot?c=$A(s,a):c=$A(s.childNodes[0],a),Promise.resolve(c)}catch(a){return Promise.reject(a)}}var Vp;function ble(){var t,e;if(Vp===void 0)try{let r=(t=Wu==null?void 0:Wu.createHTML("INVALID"))!==null&&t!==void 0?t:"INVALID";Vp=(e=DU().parseFromString(r,"text/xml").getElementsByTagName("parsererror")[0].namespaceURI)!==null&&e!==void 0?e:"";}catch(r){Vp="";}return Vp}function wle(t){let e=t.getElementsByTagName("parsererror");if(e.length>0&&ble()){for(let r=0;r<e.length;r++)if(e[r].namespaceURI===Vp)throw new Error(e[r].innerHTML)}}function Ele(t){return !!t.attributes}function _le(t){return Ele(t)&&t.hasAttributes()?t:void 0}function $A(t,e){let r={},n=t.childNodes.length,i=t.childNodes[0],o=i&&n===1&&i.nodeType===Node.TEXT_NODE&&i.nodeValue||void 0,a=_le(t);if(a){r[wr]={};for(let s=0;s<a.attributes.length;s++){let c=a.attributes[s];r[wr][c.nodeName]=c.nodeValue;}o&&(r[e.xmlCharKey]=o);}else n===0?r="":o&&(r=o);if(!o)for(let s=0;s<n;s++){let c=t.childNodes[s];if(c.nodeType!==Node.TEXT_NODE){let u=$A(c,e);r[c.nodeName]?Array.isArray(r[c.nodeName])?r[c.nodeName].push(u):r[c.nodeName]=[r[c.nodeName],u]:r[c.nodeName]=u;}}return r}function GA(t,e={}){var r,n,i;let o={rootName:(r=e.rootName)!==null&&r!==void 0?r:"root",includeRoot:(n=e.includeRoot)!==null&&n!==void 0?n:!1,xmlCharKey:(i=e.xmlCharKey)!==null&&i!==void 0?i:oo},a=VA(t,o.rootName,o)[0];return '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>'+vle().serializeToString(a)}function Sle(t){let e=[];for(let r of Object.keys(t)){let n=jA().createAttribute(r);n.value=t[r].toString(),e.push(n);}return e}function VA(t,e,r){if(t==null||typeof t=="string"||typeof t=="number"||typeof t=="boolean"){let n=jA().createElement(e);return n.textContent=t==null?"":t.toString(),[n]}else if(Array.isArray(t)){let n=[];for(let i of t)for(let o of VA(i,e,r))n.push(o);return n}else if(typeof t=="object"){let n=jA().createElement(e);for(let i of Object.keys(t))if(i===wr)for(let o of Sle(t[i]))n.attributes.setNamedItem(o);else if(i===r.xmlCharKey)n.textContent=t[i].toString();else for(let o of VA(t[i],i,r))n.appendChild(o);return [n]}else throw new Error(`Illegal value passed to buildObject: ${t}`)}function qU(t,e){return {create:(r,n)=>new KA(r,n,t,e)}}var Cle=["application/json","text/json"],Ale=["application/xml","application/atom+xml"];var KA=class extends Er{constructor(e,r,n,i={}){var o;super(e,r),this.jsonContentTypes=n&&n.json||Cle,this.xmlContentTypes=n&&n.xml||Ale,this.xmlCharKey=(o=i.xmlCharKey)!==null&&o!==void 0?o:oo;}sendRequest(e){return re(this,null,function*(){return this._nextPolicy.sendRequest(e).then(r=>xle(this.jsonContentTypes,this.xmlContentTypes,r,{xmlCharKey:this.xmlCharKey}))})}};function Tle(t){let e,r=t.request,n=r.operationSpec;if(n){let i=r.operationResponseGetter;i?e=i(n,t):e=n.responses[t.status];}return e}function Rle(t){let e=t.request.shouldDeserialize,r;return e===void 0?r=!0:typeof e=="boolean"?r=e:r=e(t),r}function xle(t,e,r,n={}){var i,o,a;let s={rootName:(i=n.rootName)!==null&&i!==void 0?i:"",includeRoot:(o=n.includeRoot)!==null&&o!==void 0?o:!1,xmlCharKey:(a=n.xmlCharKey)!==null&&a!==void 0?a:oo};return Ole(t,e,r,s).then(c=>{if(!Rle(c))return c;let u=c.request.operationSpec;if(!u||!u.responses)return c;let l=Tle(c),{error:w,shouldReturnResponse:T}=Mle(c,u,l);if(w)throw w;if(T)return c;if(l){if(l.bodyMapper){let x=c.parsedBody;u.isXML&&l.bodyMapper.type.name===Ea.Sequence&&(x=typeof x=="object"?x[l.bodyMapper.xmlElementName]:[]);try{c.parsedBody=u.serializer.deserialize(l.bodyMapper,x,"operationRes.parsedBody",n);}catch(I){throw new qn(`Error ${I} occurred in deserializing the responseBody - ${c.bodyAsText}`,void 0,c.status,c.request,c)}}else u.httpMethod==="HEAD"&&(c.parsedBody=r.status>=200&&r.status<300);l.headersMapper&&(c.parsedHeaders=u.serializer.deserialize(l.headersMapper,c.headers.toJson(),"operationRes.parsedHeaders",n));}return c})}function Ile(t){let e=Object.keys(t.responses);return e.length===0||e.length===1&&e[0]==="default"}function Mle(t,e,r){var n;let i=200<=t.status&&t.status<300;if(Ile(e)?i:!!r)if(r){if(!r.isError)return {error:null,shouldReturnResponse:!1}}else return {error:null,shouldReturnResponse:!1};let a=r!=null?r:e.responses.default,c=((n=t.request.streamResponseStatusCodes)===null||n===void 0?void 0:n.has(t.status))||t.request.streamResponseBody?`Unexpected status code: ${t.status}`:t.bodyAsText,u=new qn(c,void 0,t.status,t.request,t);if(!a)throw u;let l=a.bodyMapper,w=a.headersMapper;try{if(t.parsedBody){let T=t.parsedBody,x;if(l){let k=T;e.isXML&&l.type.name===Ea.Sequence&&(k=typeof T=="object"?T[l.xmlElementName]:[]),x=e.serializer.deserialize(l,k,"error.response.parsedBody");}let I=T.error||x||T;u.code=I.code,I.message&&(u.message=I.message),l&&(u.response.parsedBody=x);}t.headers&&w&&(u.response.parsedHeaders=e.serializer.deserialize(w,t.headers.toJson(),"operationRes.parsedHeaders"));}catch(T){u.message=`Error "${T.message}" occurred in deserializing the responseBody - "${t.bodyAsText}" for the default response.`;}return {error:u,shouldReturnResponse:!1}}function Ole(t,e,r,n){var i;let o=s=>{let c=`Error "${s}" occurred while parsing the response body - ${r.bodyAsText}.`,u=s.code||qn.PARSE_ERROR,l=new qn(c,u,r.status,r.request,r);return Promise.reject(l)};if(!(((i=r.request.streamResponseStatusCodes)===null||i===void 0?void 0:i.has(r.status))||r.request.streamResponseBody)&&r.bodyAsText){let s=r.bodyAsText,c=r.headers.get("Content-Type")||"",u=c?c.split(";").map(l=>l.toLowerCase()):[];if(u.length===0||u.some(l=>t.indexOf(l)!==-1))return new Promise(l=>{r.parsedBody=JSON.parse(s),l(r);}).catch(o);if(u.some(l=>e.indexOf(l)!==-1))return LU(s,n).then(l=>(r.parsedBody=l,r)).catch(o)}return Promise.resolve(r)}v();m();y();g();var FU=["GET","HEAD"];function zU(t=20){return {create:(e,r)=>new WA(e,r,t)}}var WA=class extends Er{constructor(e,r,n=20){super(e,r),this.maxRetries=n;}sendRequest(e){return this._nextPolicy.sendRequest(e).then(r=>HU(this,r,0))}};function HU(t,e,r){let{request:n,status:i}=e,o=e.headers.get("location");if(o&&(i===300||i===301&&FU.includes(n.method)||i===302&&FU.includes(n.method)||i===303&&n.method==="POST"||i===307)&&(!t.maxRetries||r<t.maxRetries)){let a=fc.parse(n.url);return a.setPath(o),n.url=a.toString(),i===303&&(n.method="GET",delete n.body),t._nextPolicy.sendRequest(n).then(s=>HU(t,s,r+1))}return Promise.resolve(e)}v();m();y();g();v();m();y();g();function ls(t){return typeof t=="number"}function ob(t,e,r,n,i){return e(n,i)?r.retryCount<t:!1}function ab(t,e={retryCount:0,retryInterval:0},r){r&&(e.error&&(r.innerError=e.error),e.error=r),e.retryCount++;let n=Math.pow(2,e.retryCount-1)-1,i=t.retryInterval*.8+Math.floor(Math.random()*(t.retryInterval*.4));return n*=i,e.retryInterval=Math.min(t.minRetryInterval+n,t.maxRetryInterval),e}v();m();y();g();v();m();y();g();v();m();y();g();function jU(t,e){let{cleanupBeforeAbort:r,abortSignal:n,abortErrorMsg:i}=e!=null?e:{};return new Promise((o,a)=>{function s(){a(new lc(i!=null?i:"The operation was aborted."));}function c(){n==null||n.removeEventListener("abort",u);}function u(){r==null||r(),c(),s();}if(n!=null&&n.aborted)return s();try{t(l=>{c(),o(l);},l=>{c(),a(l);});}catch(l){a(l);}n==null||n.addEventListener("abort",u);})}var Nle="The delay was aborted.";function Lo(t,e){let r,{abortSignal:n,abortErrorMsg:i}=e!=null?e:{};return jU(o=>{r=setTimeout(o,t);},{cleanupBeforeAbort:()=>clearTimeout(r),abortSignal:n,abortErrorMsg:i!=null?i:Nle})}v();m();y();g();var YA,ZA,JA,XA;typeof self=="object"&&typeof(self==null?void 0:self.importScripts)=="function"&&(((YA=self.constructor)===null||YA===void 0?void 0:YA.name)==="DedicatedWorkerGlobalScope"||((ZA=self.constructor)===null||ZA===void 0?void 0:ZA.name)==="ServiceWorkerGlobalScope"||((JA=self.constructor)===null||JA===void 0?void 0:JA.name)==="SharedWorkerGlobalScope");var QA=typeof N!="undefined"&&!!N.version&&!!(!((XA=N.versions)===null||XA===void 0)&&XA.node);typeof Deno!="undefined"&&typeof Deno.version!="undefined"&&typeof Deno.version.deno!="undefined";typeof Bun!="undefined"&&typeof Bun.version!="undefined";v();m();y();g();v();m();y();g();v();m();y();g();function Yu(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return {next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Lle(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value);}catch(s){a={error:s};}finally{try{i&&!i.done&&(r=n.return)&&r.call(n);}finally{if(a)throw a.error}}return o}function Zu(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(Lle(arguments[e]));return t}v();m();y();g();v();m();y();g();var qle=console.debug||console.log;function $U(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];qle.apply(void 0,Zu(t));}var VU=typeof N!="undefined"&&N.env&&N.env.DEBUG||void 0,GU,e2=[],t2=[],sb=[];VU&&r2(VU);function r2(t){var e,r,n,i;GU=t,e2=[],t2=[];var o=/\*/g,a=t.split(",").map(function(x){return x.trim().replace(o,".*?")});try{for(var s=Yu(a),c=s.next();!c.done;c=s.next()){var u=c.value;u.startsWith("-")?t2.push(new RegExp("^"+u.substr(1)+"$")):e2.push(new RegExp("^"+u+"$"));}}catch(x){e={error:x};}finally{try{c&&!c.done&&(r=s.return)&&r.call(s);}finally{if(e)throw e.error}}try{for(var l=Yu(sb),w=l.next();!w.done;w=l.next()){var T=w.value;T.enabled=n2(T.namespace);}}catch(x){n={error:x};}finally{try{w&&!w.done&&(i=l.return)&&i.call(l);}finally{if(n)throw n.error}}}function n2(t){var e,r,n,i;if(t.endsWith("*"))return !0;try{for(var o=Yu(t2),a=o.next();!a.done;a=o.next()){var s=a.value;if(s.test(t))return !1}}catch(w){e={error:w};}finally{try{a&&!a.done&&(r=o.return)&&r.call(o);}finally{if(e)throw e.error}}try{for(var c=Yu(e2),u=c.next();!u.done;u=c.next()){var l=u.value;if(l.test(t))return !0}}catch(w){n={error:w};}finally{try{u&&!u.done&&(i=c.return)&&i.call(c);}finally{if(n)throw n.error}}return !1}function Fle(){var t=GU||"";return r2(""),t}function KU(t){function e(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];r.enabled&&(n.length>0&&(n[0]=t+" "+n[0]),r.log.apply(r,Zu(n)));}var r=Object.assign(e,{enabled:n2(t),destroy:zle,log:WU.log,namespace:t,extend:Hle});return sb.push(r),r}function zle(){var t=sb.indexOf(this);return t>=0?(sb.splice(t,1),!0):!1}function Hle(t){var e=KU(this.namespace+":"+t);return e.log=this.log,e}var WU=Object.assign(function(t){return KU(t)},{enable:r2,enabled:n2,disable:Fle,log:$U}),Ju=WU;var ZU=new Set,cb=typeof N!="undefined"&&N.env&&N.env.AZURE_LOG_LEVEL||void 0,i2,o2=Ju("azure");o2.log=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];Ju.log.apply(Ju,Zu(t));};var a2=["verbose","info","warning","error"];cb&&(eD(cb)?jle(cb):console.error("AZURE_LOG_LEVEL set to unknown log level '"+cb+"'; logging is not enabled. Acceptable values: "+a2.join(", ")+"."));function jle(t){var e,r;if(t&&!eD(t))throw new Error("Unknown log level '"+t+"'. Acceptable values: "+a2.join(","));i2=t;var n=[];try{for(var i=Yu(ZU),o=i.next();!o.done;o=i.next()){var a=o.value;QU(a)&&n.push(a.namespace);}}catch(s){e={error:s};}finally{try{o&&!o.done&&(r=i.return)&&r.call(i);}finally{if(e)throw e.error}}Ju.enable(n.join(","));}var YU={verbose:400,info:300,warning:200,error:100};function JU(t){var e=o2.extend(t);return XU(o2,e),{error:ub(e,"error"),warning:ub(e,"warning"),info:ub(e,"info"),verbose:ub(e,"verbose")}}function XU(t,e){e.log=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];t.log.apply(t,Zu(r));};}function ub(t,e){var r=Object.assign(t.extend(e),{level:e});if(XU(t,r),QU(r)){var n=Ju.disable();Ju.enable(n+","+r.namespace);}return ZU.add(r),r}function QU(t){return !!(i2&&YU[t.level]<=YU[i2])}function eD(t){return a2.includes(t)}var _a=JU("core-http");function rD(t,e,r){return {create:(n,i)=>new s2(n,i,t,e,r)}}var tD;(function(t){t[t.Exponential=0]="Exponential";})(tD||(tD={}));var s2=class extends Er{constructor(e,r,n,i,o){super(e,r),this.retryCount=ls(n)?n:3,this.retryInterval=ls(i)?i:3e4,this.maxRetryInterval=ls(o)?o:9e4;}sendRequest(e){return this._nextPolicy.sendRequest(e.clone()).then(r=>lb(this,e,r)).catch(r=>lb(this,e,r.response,void 0,r))}};function lb(t,e,r,n,i){return re(this,null,function*(){function o(s){let c=s==null?void 0:s.status;return !(c===503&&(r!=null&&r.headers.get(io.HeaderConstants.RETRY_AFTER))||c===void 0||c<500&&c!==408||c===501||c===505)}n=ab({retryInterval:t.retryInterval,minRetryInterval:0,maxRetryInterval:t.maxRetryInterval},n,i);let a=e.abortSignal&&e.abortSignal.aborted;if(!a&&ob(t.retryCount,o,n,r)){_a.info(`Retrying request in ${n.retryInterval}`);try{yield Lo(n.retryInterval);let s=yield t._nextPolicy.sendRequest(e.clone());return lb(t,e,s,n)}catch(s){return lb(t,e,r,n,s)}}else {if(a||i||!r)throw n.error||new qn("Failed to send the request.",qn.REQUEST_SEND_ERROR,r&&r.status,r&&r.request,r);return r}})}v();m();y();g();function nD(t={}){return {create:(e,r)=>new f2(e,r,t)}}var f2=class extends Er{constructor(e,r,{logger:n=_a.info,allowedHeaderNames:i=[],allowedQueryParameters:o=[]}={}){super(e,r),this.logger=n,this.sanitizer=new dd({allowedHeaderNames:i,allowedQueryParameters:o});}get allowedHeaderNames(){return this.sanitizer.allowedHeaderNames}set allowedHeaderNames(e){this.sanitizer.allowedHeaderNames=e;}get allowedQueryParameters(){return this.sanitizer.allowedQueryParameters}set allowedQueryParameters(e){this.sanitizer.allowedQueryParameters=e;}sendRequest(e){return this.logger.enabled?(this.logRequest(e),this._nextPolicy.sendRequest(e).then(r=>this.logResponse(r))):this._nextPolicy.sendRequest(e)}logRequest(e){this.logger(`Request: ${this.sanitizer.sanitize(e)}`);}logResponse(e){return this.logger(`Response status code: ${e.status}`),this.logger(`Headers: ${this.sanitizer.sanitize(e.headers)}`),e}};v();m();y();g();function Sa(t){return fb(t.parameterPath,t.mapper)}function fb(t,e){let r;return typeof t=="string"?r=t:Array.isArray(t)?r=t.join("."):r=e.serializedName,r}v();m();y();g();function iD(t){let e=new Set;for(let r in t.responses){let n=t.responses[r];n.bodyMapper&&n.bodyMapper.type.name===Ea.Stream&&e.add(Number(r));}return e}v();m();y();g();v();m();y();g();function d2(t){let e=t;return e&&typeof e.getToken=="function"&&(e.signRequest===void 0||e.getToken.length>0)}v();m();y();g();v();m();y();g();function h2(){return "x-ms-useragent"}function oD(){let t=self.navigator;return [{key:"OS",value:(t.oscpu||t.platform).replace(" ","")}]}function $le(){return [{key:"core-http",value:io.coreHttpVersion}]}function Vle(t,e=" ",r="/"){return t.map(n=>{let i=n.value?`${r}${n.value}`:"";return `${n.key}${i}`}).join(e)}var aD=h2;function Ca(){let t=$le(),e=oD();return Vle(t.concat(e))}function Gp(t){let e=!t||t.key===void 0||t.key===null?h2():t.key,r=!t||t.value===void 0||t.value===null?Ca():t.value;return {create:(n,i)=>new p2(n,i,e,r)}}var p2=class extends Er{constructor(e,r,n,i){super(e,r),this._nextPolicy=e,this._options=r,this.headerKey=n,this.headerValue=i;}sendRequest(e){return this.addUserAgentHeader(e),this._nextPolicy.sendRequest(e)}addUserAgentHeader(e){e.headers||(e.headers=new Uo),!e.headers.get(this.headerKey)&&this.headerValue&&e.headers.set(this.headerKey,this.headerValue);}};v();m();y();g();var fs;(function(t){t.Csv=",",t.Ssv=" ",t.Tsv=" ",t.Pipes="|",t.Multi="Multi";})(fs||(fs={}));v();m();y();g();var Gle={forcedRefreshWindowInMs:1e3,retryIntervalInMs:3e3,refreshWindowInMs:1e3*60*2};function Kle(t,e,r){return re(this,null,function*(){function n(){return re(this,null,function*(){if(Date.now()<r)try{return yield t()}catch(o){return null}else {let o=yield t();if(o===null)throw new Error("Failed to refresh access token.");return o}})}let i=yield n();for(;i===null;)yield Lo(e),i=yield n();return i})}function Wle(t,e,r){let n=null,i=null,o=Object.assign(Object.assign({},Gle),r),a={get isRefreshing(){return n!==null},get shouldRefresh(){var c;return !a.isRefreshing&&((c=i==null?void 0:i.expiresOnTimestamp)!==null&&c!==void 0?c:0)-o.refreshWindowInMs<Date.now()},get mustRefresh(){return i===null||i.expiresOnTimestamp-o.forcedRefreshWindowInMs<Date.now()}};function s(c){var u;return a.isRefreshing||(n=Kle(()=>t.getToken(e,c),o.retryIntervalInMs,(u=i==null?void 0:i.expiresOnTimestamp)!==null&&u!==void 0?u:Date.now()).then(w=>(n=null,i=w,i)).catch(w=>{throw n=null,i=null,w})),n}return c=>re(this,null,function*(){return a.mustRefresh?s(c):(a.shouldRefresh&&s(c),i)})}function sD(t,e){let r=Wle(t,e);class n extends Er{constructor(o,a){super(o,a);}sendRequest(o){return re(this,null,function*(){if(!o.url.toLowerCase().startsWith("https://"))throw new Error("Bearer token authentication is not permitted for non-TLS protected (non-https) URLs.");let{token:a}=yield r({abortSignal:o.abortSignal,tracingOptions:{tracingContext:o.tracingContext}});return o.headers.set(io.HeaderConstants.AUTHORIZATION,`Bearer ${a}`),this._nextPolicy.sendRequest(o)})}}return {create:(i,o)=>new n(i,o)}}v();m();y();g();function cD(t="x-ms-client-request-id"){return {create:(e,r)=>new m2(e,r,t)}}var m2=class extends Er{constructor(e,r,n){super(e,r),this._requestIdHeaderName=n;}sendRequest(e){return e.headers.contains(this._requestIdHeaderName)||e.headers.set(this._requestIdHeaderName,e.requestId),this._nextPolicy.sendRequest(e)}};v();m();y();g();var y2;function uD(){return y2||(y2=new $p),y2}v();m();y();g();var Yle="ProxyPolicy is not supported in browser environment";function lD(t){return {create:(e,r)=>{throw new Error(Yle)}}}v();m();y();g();function fD(t=30){return {create:(e,r)=>new g2(e,r,t)}}var g2=class extends Er{constructor(e,r,n=30){super(e,r),this._retryTimeout=n;}sendRequest(e){return this._nextPolicy.sendRequest(e.clone()).then(r=>Zle(this,e,r))}};function Zle(t,e,r){if(r.status===409){let n=Jle(r.bodyAsText);if(n){let i=Xle(e.url);return Qle(t,i,n,e).catch(()=>!1).then(o=>o?(e.headers.set("x-ms-client-request-id",jp()),t._nextPolicy.sendRequest(e.clone())):r)}}return Promise.resolve(r)}function dD(t,e=!1){let r=t.clone();return e&&(r.url=t.url),r.headers.set("x-ms-client-request-id",jp()),r.headers.set("Content-Type","application/json; charset=utf-8"),r}function Jle(t){let e,r;if(t){try{r=JSON.parse(t);}catch(n){}if(r&&r.error&&r.error.message&&r.error.code&&r.error.code==="MissingSubscriptionRegistration"){let n=r.error.message.match(/.*'(.*)'/i);n&&(e=n.pop());}}return e}function Xle(t){let e,r=t.match(/.*\/subscriptions\/[a-f0-9-]+\//gi);if(r&&r[0])e=r[0];else throw new Error(`Unable to extract subscriptionId from the given url - ${t}.`);return e}function Qle(t,e,r,n){return re(this,null,function*(){let i=`${e}providers/${r}/register?api-version=2016-02-01`,o=`${e}providers/${r}?api-version=2016-02-01`,a=dD(n);if(a.method="POST",a.url=i,(yield t._nextPolicy.sendRequest(a)).status!==200)throw new Error(`Autoregistration of ${r} failed. Please try registering manually.`);return hD(t,o,n)})}function hD(t,e,r){return re(this,null,function*(){let n=dD(r);n.url=e,n.method="GET";let i=yield t._nextPolicy.sendRequest(n),o=i.parsedBody;return i.parsedBody&&o.registrationState&&o.registrationState==="Registered"?!0:(yield Lo(t._retryTimeout*1e3),hD(t,e,r))})}v();m();y();g();function pD(t){return {create:(e,r)=>new v2(e,r,t)}}var v2=class extends Er{constructor(e,r,n){super(e,r),this.authenticationProvider=n;}signRequest(e){return this.authenticationProvider.signRequest(e)}sendRequest(e){return this.signRequest(e).then(r=>this._nextPolicy.sendRequest(r))}};v();m();y();g();function mD(t,e,r,n){return {create:(i,o)=>new b2(i,o,t,e,r,n)}}var b2=class extends Er{constructor(e,r,n,i,o,a){super(e,r),this.retryCount=ls(n)?n:3,this.retryInterval=ls(i)?i:3e4,this.minRetryInterval=ls(o)?o:3e3,this.maxRetryInterval=ls(a)?a:9e4;}sendRequest(e){return this._nextPolicy.sendRequest(e.clone()).catch(r=>yD(this,e,r.response,r))}};function yD(t,e,r,n,i){return re(this,null,function*(){i=ab(t,i,n);function o(a,s){return !!(s&&s.code&&(s.code==="ETIMEDOUT"||s.code==="ESOCKETTIMEDOUT"||s.code==="ECONNREFUSED"||s.code==="ECONNRESET"||s.code==="ENOENT"))}if(ob(t.retryCount,o,i,r,n))try{return yield Lo(i.retryInterval),t._nextPolicy.sendRequest(e.clone())}catch(a){return yD(t,e,r,a,i)}else return n?Promise.reject(i.error):r})}v();m();y();g();var gD=io.HttpConstants.StatusCodes;function bD(){return {create:(t,e)=>new w2(t,e)}}var vD="The operation was aborted.",w2=class t extends Er{constructor(e,r,n){super(e,r),this.numberOfRetries=0,this._handleResponse=n||this._defaultResponseHandler;}sendRequest(e){return re(this,null,function*(){let r=yield this._nextPolicy.sendRequest(e.clone());return r.status!==gD.TooManyRequests&&r.status!==gD.ServiceUnavailable?r:this._handleResponse(e,r)})}_defaultResponseHandler(e,r){return re(this,null,function*(){var n;let i=r.headers.get(io.HeaderConstants.RETRY_AFTER);if(i){let o=t.parseRetryAfterHeader(i);if(o){if(this.numberOfRetries+=1,yield Lo(o,{abortSignal:e.abortSignal,abortErrorMsg:vD}),!((n=e.abortSignal)===null||n===void 0)&&n.aborted)throw new lc(vD);return this.numberOfRetries<3?this.sendRequest(e):this._nextPolicy.sendRequest(e)}}return r})}static parseRetryAfterHeader(e){let r=Number(e);return Number.isNaN(r)?t.parseDateRetryAfterHeader(e):r*1e3}static parseDateRetryAfterHeader(e){try{let r=Date.now(),i=Date.parse(e)-r;return Number.isNaN(i)?void 0:i}catch(r){return}}};var ds=class{constructor(e,r){r||(r={}),this._withCredentials=r.withCredentials||!1,this._httpClient=r.httpClient||uD(),this._requestPolicyOptions=new ib(r.httpPipelineLogger);let n;if(Array.isArray(r.requestPolicyFactories))_a.info("ServiceClient: using custom request policies"),n=r.requestPolicyFactories;else {let i;if(d2(e))_a.info("ServiceClient: creating bearer token authentication policy from provided credentials"),i=(()=>{let a,s=this,c=r;return {create(u,l){let w=ife(c,s.baseUri);if(!w)throw new Error("When using credential, the ServiceClient must contain a baseUri or a credentialScopes in ServiceClientOptions. Unable to create a bearerTokenAuthenticationPolicy");return a==null&&(a=sD(e,w)),a.create(u,l)}}})();else if(e&&typeof e.signRequest=="function")_a.info("ServiceClient: creating signing policy from provided credentials"),i=pD(e);else if(e!=null)throw new Error("The credentials argument must implement the TokenCredential interface");if(_a.info("ServiceClient: using default request policies"),n=nfe(i,r),r.requestPolicyFactories){let o=r.requestPolicyFactories(n);o&&(n=o);}}this._requestPolicyFactories=n;}sendRequest(e){if(e==null||typeof e!="object")throw new Error("options cannot be null or undefined and it must be of type object.");let r;try{xU(e)?(e.validateRequestProperties(),r=e):(r=new uc,r=r.prepare(e));}catch(i){return Promise.reject(i)}let n=this._httpClient;if(this._requestPolicyFactories&&this._requestPolicyFactories.length>0)for(let i=this._requestPolicyFactories.length-1;i>=0;--i)n=this._requestPolicyFactories[i].create(n,this._requestPolicyOptions);return n.sendRequest(r)}sendOperationRequest(e,r,n){return re(this,null,function*(){var i;typeof e.options=="function"&&(n=e.options,e.options=void 0);let o=(i=e.options)===null||i===void 0?void 0:i.serializerOptions,a=new uc,s;try{let u=r.baseUrl||this.baseUri;if(!u)throw new Error("If operationSpec.baseUrl is not specified, then the ServiceClient must have a baseUri string property that contains the base URL to use.");a.method=r.httpMethod,a.operationSpec=r;let l=fc.parse(u);if(r.path&&l.appendPath(r.path),r.urlParameters&&r.urlParameters.length>0)for(let k of r.urlParameters){let q=Kp(this,e,k,r.serializer);q=r.serializer.serialize(k.mapper,q,Sa(k),o),k.skipEncoding||(q=encodeURIComponent(q)),l.replaceAll(`{${k.mapper.serializedName||Sa(k)}}`,q);}if(r.queryParameters&&r.queryParameters.length>0)for(let k of r.queryParameters){let q=Kp(this,e,k,r.serializer);if(q!=null){if(q=r.serializer.serialize(k.mapper,q,Sa(k),o),k.collectionFormat!==void 0&&k.collectionFormat!==null)if(k.collectionFormat===fs.Multi){if(q.length===0)continue;for(let j in q){let K=q[j];q[j]=K==null?"":K.toString();}}else (k.collectionFormat===fs.Ssv||k.collectionFormat===fs.Tsv)&&(q=q.join(k.collectionFormat));if(!k.skipEncoding)if(Array.isArray(q))for(let j in q)q[j]!==void 0&&q[j]!==null&&(q[j]=encodeURIComponent(q[j]));else q=encodeURIComponent(q);k.collectionFormat!==void 0&&k.collectionFormat!==null&&k.collectionFormat!==fs.Multi&&k.collectionFormat!==fs.Ssv&&k.collectionFormat!==fs.Tsv&&(q=q.join(k.collectionFormat)),l.setQueryParameter(k.mapper.serializedName||Sa(k),q);}}a.url=l.toString();let w=r.contentType||this.requestContentType;if(w&&r.requestBody&&a.headers.set("Content-Type",w),r.headerParameters)for(let k of r.headerParameters){let q=Kp(this,e,k,r.serializer);if(q!=null){q=r.serializer.serialize(k.mapper,q,Sa(k),o);let j=k.mapper.headerCollectionPrefix;if(j)for(let K of Object.keys(q))a.headers.set(j+K,q[K]);else a.headers.set(k.mapper.serializedName||Sa(k),q);}}let T=e.options;if(T){if(T.customHeaders)for(let k in T.customHeaders)a.headers.set(k,T.customHeaders[k]);T.abortSignal&&(a.abortSignal=T.abortSignal),T.timeout&&(a.timeout=T.timeout),T.onUploadProgress&&(a.onUploadProgress=T.onUploadProgress),T.onDownloadProgress&&(a.onDownloadProgress=T.onDownloadProgress),T.spanOptions&&(a.spanOptions=T.spanOptions),T.tracingContext&&(a.tracingContext=T.tracingContext),T.shouldDeserialize!==void 0&&T.shouldDeserialize!==null&&(a.shouldDeserialize=T.shouldDeserialize);}a.withCredentials=this._withCredentials,tfe(this,a,e,r),a.streamResponseStatusCodes===void 0&&(a.streamResponseStatusCodes=iD(r));let x,I;try{x=yield this.sendRequest(a);}catch(k){I=k;}I?(I.response&&(I.details=E2(I.response,r.responses[I.statusCode]||r.responses.default)),s=Promise.reject(I)):s=Promise.resolve(E2(x,r.responses[x.status]));}catch(u){s=Promise.reject(u);}let c=n;return c&&s.then(u=>c(null,u._response.parsedBody,u._response.request,u._response)).catch(u=>c(u)),s})}};function tfe(t,e,r,n){var i,o,a,s,c,u;let l=(o=(i=r.options)===null||i===void 0?void 0:i.serializerOptions)!==null&&o!==void 0?o:{},w={rootName:(a=l.rootName)!==null&&a!==void 0?a:"",includeRoot:(s=l.includeRoot)!==null&&s!==void 0?s:!1,xmlCharKey:(c=l.xmlCharKey)!==null&&c!==void 0?c:oo},T=l.xmlCharKey;if(n.requestBody&&n.requestBody.mapper){e.body=Kp(t,r,n.requestBody,n.serializer);let x=n.requestBody.mapper,{required:I,xmlName:k,xmlElementName:q,serializedName:j,xmlNamespace:K,xmlNamespacePrefix:Z}=x,se=x.type.name;try{if(e.body!==void 0&&e.body!==null||I){let ce=Sa(n.requestBody);e.body=n.serializer.serialize(x,e.body,ce,w);let Te=se===Ea.Stream;if(n.isXML){let pe=Z?`xmlns:${Z}`:"xmlns",le=rfe(K,pe,se,e.body,w);se===Ea.Sequence?e.body=GA(bU(le,q||k||j,pe,K),{rootName:k||j,xmlCharKey:T}):Te||(e.body=GA(le,{rootName:k||j,xmlCharKey:T}));}else {if(se===Ea.String&&(!((u=n.contentType)===null||u===void 0)&&u.match("text/plain")||n.mediaType==="text"))return;Te||(e.body=JSON.stringify(e.body));}}}catch(ce){throw new Error(`Error "${ce.message}" occurred in serializing the payload - ${JSON.stringify(j,void 0," ")}.`)}}else if(n.formDataParameters&&n.formDataParameters.length>0){e.formData={};for(let x of n.formDataParameters){let I=Kp(t,r,x,n.serializer);if(I!=null){let k=x.mapper.serializedName||Sa(x);e.formData[k]=n.serializer.serialize(x.mapper,I,Sa(x),w);}}}}function rfe(t,e,r,n,i){if(t&&!["Composite","Sequence","Dictionary"].includes(r)){let o={};return o[i.xmlCharKey]=n,o[wr]={[e]:t},o}return n}function wD(t,e){let r;return typeof t=="string"?r=t:(r=e(),typeof t=="function"&&(r=t(r))),r}function nfe(t,e){let r=[];e.generateClientRequestIdHeader&&r.push(cD(e.clientRequestIdHeaderName)),t&&r.push(t);let n=wD(e.userAgentHeaderName,aD),i=wD(e.userAgent,Ca);return n&&i&&r.push(Gp({key:n,value:i})),r.push(zU()),r.push(fD(e.rpRegistrationRetryTimeout)),e.noRetryPolicy||(r.push(rD()),r.push(mD()),r.push(bD())),r.push(qU(e.deserializationContentTypes)),QA&&r.push(lD(e.proxySettings)),r.push(nD({logger:_a.info})),r}function Kp(t,e,r,n){return _D(t,e,r.parameterPath,r.mapper,n)}function _D(t,e,r,n,i){var o;let a;typeof r=="string"&&(r=[r]);let s=(o=e.options)===null||o===void 0?void 0:o.serializerOptions;if(Array.isArray(r)){if(r.length>0){if(n.isConstant)a=n.defaultValue;else {let u=ED(e,r);u.propertyFound||(u=ED(t,r));let l=!1;u.propertyFound||(l=n.required||r[0]==="options"&&r.length===2),a=l?n.defaultValue:u.propertyValue;}let c=fb(r,n);i.serialize(n,a,c,s);}}else {n.required&&(a={});for(let c in r){let u=n.type.modelProperties[c],l=r[c],w=_D(t,e,l,u,i),T=fb(l,u);i.serialize(u,w,T,s),w!=null&&(a||(a={}),a[c]=w);}}return a}function ED(t,e){let r={propertyFound:!1},n=0;for(;n<e.length;++n){let i=e[n];if(t!=null&&i in t)t=t[i];else break}return n===e.length&&(r.propertyValue=t,r.propertyFound=!0),r}function E2(t,e){let r=t.parsedHeaders,n=e&&e.bodyMapper,i=o=>Object.defineProperty(o,"_response",{value:t});if(n){let o=n.type.name;if(o==="Stream")return i(Object.assign(Object.assign({},r),{blobBody:t.blobBody,readableStreamBody:t.readableStreamBody}));let a=o==="Composite"&&n.type.modelProperties||{},s=Object.keys(a).some(c=>a[c].serializedName==="");if(o==="Sequence"||s){let c=[...t.parsedBody||[]];for(let u of Object.keys(a))a[u].serializedName&&(c[u]=t.parsedBody[u]);if(r)for(let u of Object.keys(r))c[u]=r[u];return i(c),c}if(o==="Composite"||o==="Dictionary")return i(Object.assign(Object.assign({},r),t.parsedBody))}return n||t.request.method==="HEAD"||EU(t.parsedBody)?i(Object.assign(Object.assign({},r),{body:t.parsedBody})):i(Object.assign(Object.assign({},r),t.parsedBody))}function ife(t,e){if(t!=null&&t.credentialScopes)return t.credentialScopes;if(e)return `${e}/.default`}var ofe=io.HeaderConstants,SD="Bearer",Wp=class{constructor(e,r=SD){this.authorizationScheme=SD;if(!e)throw new Error("token cannot be null or undefined.");this.token=e,this.authorizationScheme=r;}signRequest(e){return e.headers||(e.headers=new Uo),e.headers.set(ofe.AUTHORIZATION,`${this.authorizationScheme} ${this.token}`),Promise.resolve(e)}};var Yp=class Yp{toJSON(){return {name:this.constructor.name,appId:this.appId,tenant:this.tenant,oAuthEndpoint:this.oAuthEndpoint,oAuthScope:this.oAuthScope}}constructor(e,r,n=null){this.appId=e,this.tenant=r,this.oAuthEndpoint=this.GetToChannelFromBotLoginUrlPrefix()+this.tenant,this.oAuthScope=n&&n.length>0?n:this.GetToChannelFromBotOAuthScope();}get tenant(){return this._tenant}set tenant(e){this._tenant=e&&e.length>0?e:this.GetDefaultChannelAuthTenant();}get oAuthScope(){return this._oAuthScope}set oAuthScope(e){this._oAuthScope=e,this.tokenCacheKey=`${this.appId}${this.oAuthScope}-cache`;}get oAuthEndpoint(){return this._oAuthEndpoint}set oAuthEndpoint(e){this._oAuthEndpoint=e;}static trustServiceUrl(){}static isTrustedServiceUrl(){return !0}signRequest(e){return re(this,null,function*(){return this.shouldSetToken()?new Wp(yield this.getToken()).signRequest(e):e})}getToken(e=!1){return re(this,null,function*(){if(!e){let n=Yp.cache.get(this.tokenCacheKey);if(n&&n.expiresOn>new Date)return n.accessToken}let r=yield this.refreshToken();if(r&&r.accessToken)return r.expiresOn.setMinutes(r.expiresOn.getMinutes()-5),Yp.cache.set(this.tokenCacheKey,r),r.accessToken;throw new Error("Authentication: No response or error received from MSAL.")})}GetToChannelFromBotOAuthScope(){return exports.AuthenticationConstants.ToChannelFromBotOAuthScope}GetToChannelFromBotLoginUrlPrefix(){return exports.AuthenticationConstants.ToChannelFromBotLoginUrlPrefix}GetDefaultChannelAuthTenant(){return exports.AuthenticationConstants.DefaultChannelAuthTenant}shouldSetToken(){return this.appId&&this.appId!==exports.AuthenticationConstants.AnonymousSkillAppId}};Yp.cache=new Map;var ao=Yp;v();m();y();g();v();m();y();g();v();m();y();g();var db=class{createBotFrameworkClient(){throw new Error("NotImplemented")}getOriginatingAudience(){throw new Error("NotImplemented")}authenticateChannelRequest(e){throw new Error("NotImplemented")}generateCallerId(e,r,n){return re(this,null,function*(){return (yield e.isAuthenticationDisabled())?null:exports.SkillValidation.isSkillClaim(r.claims)?`${u$e.CallerIdConstants.BotToBotPrefix}${exports.JwtTokenValidation.getAppIdFromClaims(r.claims)}`:n})}};v();m();y();g();v();m();y();g();v();m();y();g();v();m();y();g();v();m();y();g();var CD={serializedName:"AttachmentView",type:{name:"Composite",className:"AttachmentView",modelProperties:{viewId:{serializedName:"viewId",type:{name:"String"}},size:{serializedName:"size",type:{name:"Number"}}}}},hb={serializedName:"AttachmentInfo",type:{name:"Composite",className:"AttachmentInfo",modelProperties:{name:{serializedName:"name",type:{name:"String"}},type:{serializedName:"type",type:{name:"String"}},views:{serializedName:"views",type:{name:"Sequence",element:{type:{name:"Composite",className:"AttachmentView"}}}}}}},hd={serializedName:"InnerHttpError",type:{name:"Composite",className:"InnerHttpError",modelProperties:{statusCode:{serializedName:"statusCode",type:{name:"Number"}},body:{serializedName:"body",type:{name:"Object"}}}}},pd={serializedName:"Error",type:{name:"Composite",className:"ErrorModel",modelProperties:{code:{serializedName:"code",type:{name:"String"}},message:{serializedName:"message",type:{name:"String"}},innerHttpError:{serializedName:"innerHttpError",type:{name:"Composite",className:"InnerHttpError"}}}}},Xt={serializedName:"ErrorResponse",type:{name:"Composite",className:"ErrorResponse",modelProperties:{error:{serializedName:"error",type:{name:"Composite",className:"ErrorModel"}}}}},pb={serializedName:"ChannelAccount",type:{name:"Composite",className:"ChannelAccount",modelProperties:{id:{serializedName:"id",type:{name:"String"}},name:{serializedName:"name",type:{name:"String"}},aadObjectId:{serializedName:"aadObjectId",type:{name:"String"}},role:{serializedName:"role",type:{name:"String"}},properties:{serializedName:"properties",type:{name:"Object"}}}}},AD={serializedName:"ConversationAccount",type:{name:"Composite",className:"ConversationAccount",modelProperties:{isGroup:{serializedName:"isGroup",type:{name:"Boolean"}},conversationType:{serializedName:"conversationType",type:{name:"String"}},id:{serializedName:"id",type:{name:"String"}},name:{serializedName:"name",type:{name:"String"}},aadObjectId:{serializedName:"aadObjectId",type:{name:"String"}},role:{serializedName:"role",type:{name:"String"}},tenantId:{serializedName:"tenantId",type:{name:"String"}},properties:{serializedName:"properties",type:{name:"Object"}}}}},TD={serializedName:"MessageReaction",type:{name:"Composite",className:"MessageReaction",modelProperties:{type:{serializedName:"type",type:{name:"String"}}}}},RD={serializedName:"CardAction",type:{name:"Composite",className:"CardAction",modelProperties:{type:{serializedName:"type",type:{name:"String"}},title:{serializedName:"title",type:{name:"String"}},image:{serializedName:"image",type:{name:"String"}},text:{serializedName:"text",type:{name:"String"}},displayText:{serializedName:"displayText",type:{name:"String"}},value:{serializedName:"value",type:{name:"Object"}},channelData:{serializedName:"channelData",type:{name:"Object"}},imageAltText:{serializedName:"imageAltText",type:{name:"String"}}}}},xD={serializedName:"SuggestedActions",type:{name:"Composite",className:"SuggestedActions",modelProperties:{to:{serializedName:"to",type:{name:"Sequence",element:{type:{name:"String"}}}},actions:{serializedName:"actions",type:{name:"Sequence",element:{type:{name:"Composite",className:"CardAction"}}}}}}},ID={serializedName:"Attachment",type:{name:"Composite",className:"Attachment",modelProperties:{contentType:{serializedName:"contentType",type:{name:"String"}},contentUrl:{serializedName:"contentUrl",type:{name:"String"}},content:{serializedName:"content",type:{name:"Object"}},name:{serializedName:"name",type:{name:"String"}},thumbnailUrl:{serializedName:"thumbnailUrl",type:{name:"String"}}}}},MD={serializedName:"Entity",type:{name:"Composite",className:"Entity",modelProperties:{type:{serializedName:"type",type:{name:"String"}},text:{serializedName:"text",type:{name:"String"}},mentioned:{serializedName:"mentioned",type:{name:"Composite",className:"ChannelAccount"}}}}},OD={serializedName:"ConversationReference",type:{name:"Composite",className:"ConversationReference",modelProperties:{activityId:{serializedName:"activityId",type:{name:"String"}},user:{serializedName:"user",type:{name:"Composite",className:"ChannelAccount"}},bot:{serializedName:"bot",type:{name:"Composite",className:"ChannelAccount"}},conversation:{serializedName:"conversation",type:{name:"Composite",className:"ConversationAccount"}},channelId:{serializedName:"channelId",type:{name:"String"}},serviceUrl:{serializedName:"serviceUrl",type:{name:"String"}}}}},ND={serializedName:"TextHighlight",type:{name:"Composite",className:"TextHighlight",modelProperties:{text:{serializedName:"text",type:{name:"String"}},occurrence:{serializedName:"occurrence",type:{name:"Number"}}}}},kD={serializedName:"SemanticAction",type:{name:"Composite",className:"SemanticAction",modelProperties:{id:{serializedName:"id",type:{name:"String"}},state:{serializedName:"state",type:{name:"String"}},entities:{serializedName:"entities",type:{name:"Dictionary",value:{type:{name:"Composite",className:"Entity"}}}}}}},md={serializedName:"Activity",type:{name:"Composite",className:"Activity",modelProperties:{type:{serializedName:"type",type:{name:"String"}},id:{serializedName:"id",type:{name:"String"}},timestamp:{serializedName:"timestamp",type:{name:"DateTime"}},localTimestamp:{serializedName:"localTimestamp",type:{name:"DateTime"}},localTimezone:{serializedName:"localTimezone",type:{name:"String"}},callerId:{serializedName:"callerId",type:{name:"String"}},serviceUrl:{serializedName:"serviceUrl",type:{name:"String"}},channelId:{serializedName:"channelId",type:{name:"String"}},from:{serializedName:"from",type:{name:"Composite",className:"ChannelAccount"}},conversation:{serializedName:"conversation",type:{name:"Composite",className:"ConversationAccount"}},recipient:{serializedName:"recipient",type:{name:"Composite",className:"ChannelAccount"}},textFormat:{serializedName:"textFormat",type:{name:"String"}},attachmentLayout:{serializedName:"attachmentLayout",type:{name:"String"}},membersAdded:{serializedName:"membersAdded",type:{name:"Sequence",element:{type:{name:"Composite",className:"ChannelAccount"}}}},membersRemoved:{serializedName:"membersRemoved",type:{name:"Sequence",element:{type:{name:"Composite",className:"ChannelAccount"}}}},reactionsAdded:{serializedName:"reactionsAdded",type:{name:"Sequence",element:{type:{name:"Composite",className:"MessageReaction"}}}},reactionsRemoved:{serializedName:"reactionsRemoved",type:{name:"Sequence",element:{type:{name:"Composite",className:"MessageReaction"}}}},topicName:{serializedName:"topicName",type:{name:"String"}},historyDisclosed:{serializedName:"historyDisclosed",type:{name:"Boolean"}},locale:{serializedName:"locale",type:{name:"String"}},text:{serializedName:"text",type:{name:"String"}},speak:{serializedName:"speak",type:{name:"String"}},inputHint:{serializedName:"inputHint",type:{name:"String"}},summary:{serializedName:"summary",type:{name:"String"}},suggestedActions:{serializedName:"suggestedActions",type:{name:"Composite",className:"SuggestedActions"}},attachments:{serializedName:"attachments",type:{name:"Sequence",element:{type:{name:"Composite",className:"Attachment"}}}},entities:{serializedName:"entities",type:{name:"Sequence",element:{type:{name:"Composite",className:"Entity",additionalProperties:{type:{name:"Object"}}}}}},channelData:{serializedName:"channelData",type:{name:"Object"}},action:{serializedName:"action",type:{name:"String"}},replyToId:{serializedName:"replyToId",type:{name:"String"}},label:{serializedName:"label",type:{name:"String"}},valueType:{serializedName:"valueType",type:{name:"String"}},value:{serializedName:"value",type:{name:"Object"}},name:{serializedName:"name",type:{name:"String"}},relatesTo:{serializedName:"relatesTo",type:{name:"Composite",className:"ConversationReference"}},code:{serializedName:"code",type:{name:"String"}},expiration:{serializedName:"expiration",type:{name:"DateTime"}},importance:{serializedName:"importance",type:{name:"String"}},deliveryMode:{serializedName:"deliveryMode",type:{name:"String"}},listenFor:{serializedName:"listenFor",type:{name:"Sequence",element:{type:{name:"String"}}}},textHighlights:{serializedName:"textHighlights",type:{name:"Sequence",element:{type:{name:"Composite",className:"TextHighlight"}}}},semanticAction:{serializedName:"semanticAction",type:{name:"Composite",className:"SemanticAction"}}}}},mb={serializedName:"ConversationParameters",type:{name:"Composite",className:"ConversationParameters",modelProperties:{isGroup:{serializedName:"isGroup",type:{name:"Boolean"}},bot:{serializedName:"bot",type:{name:"Composite",className:"ChannelAccount"}},members:{serializedName:"members",type:{name:"Sequence",element:{type:{name:"Composite",className:"ChannelAccount"}}}},topicName:{serializedName:"topicName",type:{name:"String"}},tenantId:{serializedName:"tenantId",type:{name:"String"}},activity:{serializedName:"activity",type:{name:"Composite",className:"Activity"}},channelData:{serializedName:"channelData",type:{name:"Object"}}}}},yd={serializedName:"ConversationResourceResponse",type:{name:"Composite",className:"ConversationResourceResponse",modelProperties:{activityId:{serializedName:"activityId",type:{name:"String"}},serviceUrl:{serializedName:"serviceUrl",type:{name:"String"}},id:{serializedName:"id",type:{name:"String"}}}}},PD={serializedName:"ConversationMembers",type:{name:"Composite",className:"ConversationMembers",modelProperties:{id:{serializedName:"id",type:{name:"String"}},members:{serializedName:"members",type:{name:"Sequence",element:{type:{name:"Composite",className:"ChannelAccount"}}}}}}},yb={serializedName:"ConversationsResult",type:{name:"Composite",className:"ConversationsResult",modelProperties:{continuationToken:{serializedName:"continuationToken",type:{name:"String"}},conversations:{serializedName:"conversations",type:{name:"Sequence",element:{type:{name:"Composite",className:"ConversationMembers"}}}}}}};var pn={serializedName:"ResourceResponse",type:{name:"Composite",className:"ResourceResponse",modelProperties:{id:{serializedName:"id",type:{name:"String"}}}}},gb={serializedName:"Transcript",type:{name:"Composite",className:"Transcript",modelProperties:{activities:{serializedName:"activities",type:{name:"Sequence",element:{type:{name:"Composite",className:"Activity"}}}}}}},vb={serializedName:"PagedMembersResult",type:{name:"Composite",className:"PagedMembersResult",modelProperties:{continuationToken:{serializedName:"continuationToken",type:{name:"String"}},members:{serializedName:"members",type:{name:"Sequence",element:{type:{name:"Composite",className:"ChannelAccount"}}}}}}},bb={serializedName:"AttachmentData",type:{name:"Composite",className:"AttachmentData",modelProperties:{type:{serializedName:"type",type:{name:"String"}},name:{serializedName:"name",type:{name:"String"}},originalBase64:{serializedName:"originalBase64",type:{name:"ByteArray"}},thumbnailBase64:{serializedName:"thumbnailBase64",type:{name:"ByteArray"}}}}};var qo={};v();m();y();g();Jl(qo,u$e__namespace);v();m();y();g();v();m();y();g();var _2={};Cr(_2,{AttachmentInfo:()=>hb,AttachmentView:()=>CD,ErrorModel:()=>pd,ErrorResponse:()=>Xt,InnerHttpError:()=>hd});v();m();y();g();v();m();y();g();var Zp={parameterPath:"activityId",mapper:{required:!0,serializedName:"activityId",type:{name:"String"}}},S2={parameterPath:"attachmentId",mapper:{required:!0,serializedName:"attachmentId",type:{name:"String"}}},C2={parameterPath:["options","continuationToken"],mapper:{serializedName:"continuationToken",type:{name:"String"}}},so={parameterPath:"conversationId",mapper:{required:!0,serializedName:"conversationId",type:{name:"String"}}},A2={parameterPath:"memberId",mapper:{required:!0,serializedName:"memberId",type:{name:"String"}}},BD={parameterPath:["options","pageSize"],mapper:{serializedName:"pageSize",type:{name:"Number"}}},UD={parameterPath:"viewId",mapper:{required:!0,serializedName:"viewId",type:{name:"String"}}};var wb=class{constructor(e){this.client=e;}getAttachmentInfo(e,r,n){return this.client.sendOperationRequest({attachmentId:e,options:r},cfe,n)}getAttachment(e,r,n,i){return this.client.sendOperationRequest({attachmentId:e,viewId:r,options:n},ufe,i)}},LD=new Ln(_2),cfe={httpMethod:"GET",path:"v3/attachments/{attachmentId}",urlParameters:[S2],responses:{200:{bodyMapper:hb},default:{bodyMapper:Xt}},serializer:LD},ufe={httpMethod:"GET",path:"v3/attachments/{attachmentId}/views/{viewId}",urlParameters:[S2,UD],responses:{200:{bodyMapper:{serializedName:"parsedResponse",type:{name:"Stream"}}},301:{},302:{},default:{bodyMapper:Xt}},serializer:LD};v();m();y();g();var T2={};Cr(T2,{Activity:()=>md,Attachment:()=>ID,AttachmentData:()=>bb,CardAction:()=>RD,ChannelAccount:()=>pb,ConversationAccount:()=>AD,ConversationMembers:()=>PD,ConversationParameters:()=>mb,ConversationReference:()=>OD,ConversationResourceResponse:()=>yd,ConversationsResult:()=>yb,Entity:()=>MD,ErrorModel:()=>pd,ErrorResponse:()=>Xt,InnerHttpError:()=>hd,MessageReaction:()=>TD,PagedMembersResult:()=>vb,ResourceResponse:()=>pn,SemanticAction:()=>kD,SuggestedActions:()=>xD,TextHighlight:()=>ND,Transcript:()=>gb});v();m();y();g();var R2={};Cr(R2,{ConversationIdHttpHeaderName:()=>Jp});v();m();y();g();var Jp="x-ms-conversation-id";var Eb=class{constructor(e){this.client=e;}getConversations(e,r){return this.client.sendOperationRequest({options:e},lfe,r)}createConversation(e,r,n){return this.client.sendOperationRequest({parameters:e,options:r},ffe,n)}sendToConversation(e,r,n,i){return this.client.sendOperationRequest({conversationId:e,activity:r,options:n},dfe,i)}sendConversationHistory(e,r,n,i){return this.client.sendOperationRequest({conversationId:e,history:r,options:n},hfe,i)}updateActivity(e,r,n,i,o){return this.client.sendOperationRequest({conversationId:e,activityId:r,activity:n,options:i},pfe,o)}replyToActivity(e,r,n,i,o){return this.client.sendOperationRequest({conversationId:e,activityId:r,activity:n,options:i},mfe,o)}deleteActivity(e,r,n,i){return this.client.sendOperationRequest({conversationId:e,activityId:r,options:n},yfe,i)}getConversationMembers(e,r,n){return this.client.sendOperationRequest({conversationId:e,options:r},gfe,n)}getConversationMember(e,r,n,i){return this.client.sendOperationRequest({conversationId:e,memberId:r,options:n},vfe,i)}getConversationPagedMembers(e,r,n){return this.client.sendOperationRequest({conversationId:e,options:r},bfe,n)}deleteConversationMember(e,r,n,i){return this.client.sendOperationRequest({conversationId:e,memberId:r,options:n},wfe,i)}getActivityMembers(e,r,n,i){return this.client.sendOperationRequest({conversationId:e,activityId:r,options:n},Efe,i)}uploadAttachment(e,r,n,i){return this.client.sendOperationRequest({conversationId:e,attachmentUpload:r,options:n},_fe,i)}},_i=new Ln(T2),lfe={httpMethod:"GET",path:"v3/conversations",queryParameters:[C2],responses:{200:{bodyMapper:yb},default:{bodyMapper:Xt}},serializer:_i},ffe={httpMethod:"POST",path:"v3/conversations",requestBody:{parameterPath:"parameters",mapper:Me(oe({},mb),{required:!0})},responses:{200:{bodyMapper:yd},201:{bodyMapper:yd},202:{bodyMapper:yd},default:{bodyMapper:Xt}},serializer:_i},dfe={httpMethod:"POST",path:"v3/conversations/{conversationId}/activities",urlParameters:[so],requestBody:{parameterPath:"activity",mapper:Me(oe({},md),{required:!0})},responses:{200:{bodyMapper:pn},201:{bodyMapper:pn},202:{bodyMapper:pn},default:{bodyMapper:Xt}},serializer:_i},hfe={httpMethod:"POST",path:"v3/conversations/{conversationId}/activities/history",urlParameters:[so],requestBody:{parameterPath:"history",mapper:Me(oe({},gb),{required:!0})},responses:{200:{bodyMapper:pn},201:{bodyMapper:pn},202:{bodyMapper:pn},default:{bodyMapper:Xt}},serializer:_i},pfe={httpMethod:"PUT",path:"v3/conversations/{conversationId}/activities/{activityId}",urlParameters:[so,Zp],requestBody:{parameterPath:"activity",mapper:Me(oe({},md),{required:!0})},responses:{200:{bodyMapper:pn},201:{bodyMapper:pn},202:{bodyMapper:pn},default:{bodyMapper:Xt}},serializer:_i},mfe={httpMethod:"POST",path:"v3/conversations/{conversationId}/activities/{activityId}",urlParameters:[so,Zp],headerParameters:[{parameterPath:"conversationId",mapper:{serializedName:Jp,type:{name:"String"}}}],requestBody:{parameterPath:"activity",mapper:Me(oe({},md),{required:!0})},responses:{200:{bodyMapper:pn},201:{bodyMapper:pn},202:{bodyMapper:pn},default:{bodyMapper:Xt}},serializer:_i},yfe={httpMethod:"DELETE",path:"v3/conversations/{conversationId}/activities/{activityId}",urlParameters:[so,Zp],responses:{200:{},202:{},default:{bodyMapper:Xt}},serializer:_i},gfe={httpMethod:"GET",path:"v3/conversations/{conversationId}/members",urlParameters:[so],responses:{200:{bodyMapper:{serializedName:"parsedResponse",type:{name:"Sequence",element:{type:{name:"Composite",className:"ChannelAccount"}}}}},default:{bodyMapper:Xt}},serializer:_i},vfe={httpMethod:"GET",path:"v3/conversations/{conversationId}/members/{memberId}",urlParameters:[so,A2],responses:{200:{bodyMapper:pb},default:{bodyMapper:Xt}},serializer:_i},bfe={httpMethod:"GET",path:"v3/conversations/{conversationId}/pagedmembers",urlParameters:[so],queryParameters:[BD,C2],responses:{200:{bodyMapper:vb},default:{}},serializer:_i},wfe={httpMethod:"DELETE",path:"v3/conversations/{conversationId}/members/{memberId}",urlParameters:[so,A2],responses:{200:{},204:{},default:{bodyMapper:Xt}},serializer:_i},Efe={httpMethod:"GET",path:"v3/conversations/{conversationId}/activities/{activityId}/members",urlParameters:[so,Zp],responses:{200:{bodyMapper:{serializedName:"parsedResponse",type:{name:"Sequence",element:{type:{name:"Composite",className:"ChannelAccount"}}}}},default:{bodyMapper:Xt}},serializer:_i},_fe={httpMethod:"POST",path:"v3/conversations/{conversationId}/attachments",urlParameters:[so],requestBody:{parameterPath:"attachmentUpload",mapper:Me(oe({},bb),{required:!0})},responses:{200:{bodyMapper:pn},201:{bodyMapper:pn},202:{bodyMapper:pn},default:{bodyMapper:Xt}},serializer:_i};v();m();y();g();var Cfe="botframework-connector",Afe="4.0.0",_b=class extends ds{constructor(e,r){if(e==null)throw new Error("'credentials' cannot be null.");r||(r={});let n=Ca();r.userAgent=`${Cfe}/${Afe} ${n} ${r.userAgent||""}`,super(e,r),this.baseUri=r.baseUri||this.baseUri||"https://api.botframework.com",this.requestContentType="application/json; charset=utf-8",this.credentials=e;}};var Xp=class extends _b{constructor(e,r){super(e,r),this.attachments=new wb(this),this.conversations=new Eb(this);}};v();m();y();g();var Sb=class{};var FD=qD(),Cb=`Microsoft-BotFramework/3.1 ${FD.name}/${FD.version} ${Ca()} `,Qp=class extends Sb{constructor(r,n,i,o,a,s={}){super();this.appId=r;this.toChannelFromBotOAuthScope=n;this.loginEndpoint=i;this.validateAuthority=o;this.credentialFactory=a;this.connectorClientOptions=s;}create(r,n){return re(this,null,function*(){let i=yield this.credentialFactory.createCredentials(this.appId,n!=null?n:this.toChannelFromBotOAuthScope,this.loginEndpoint,this.validateAuthority),o=this.getClientOptions(r);return new Xp(i,o)})}getClientOptions(r){let u=this.connectorClientOptions,{requestPolicyFactories:n}=u,i=Ns(u,["requestPolicyFactories"]),o=Object.assign({},{baseUri:r},i),a=typeof o.userAgent=="function"?o.userAgent(Cb):o.userAgent,s=Gp({value:`${Cb}${a!=null?a:""}`}),c={create:l=>({sendRequest:w=>(w.headers.contains("accept")||w.headers.set("accept","*/*"),l.sendRequest(w))})};return o.requestPolicyFactories=l=>{let w=[];if(n){if(typeof n=="function"){let T=n(l);T&&(w=T);}else n&&(w=[...n]);w=[...w,s,c];}else w=[c,s,...l];return w},o}};v();m();y();g();v();m();y();g();var Kt;(function(t){t.assertEqual=i=>i;function e(i){}t.assertIs=e;function r(i){throw new Error}t.assertNever=r,t.arrayToEnum=i=>{let o={};for(let a of i)o[a]=a;return o},t.getValidEnumValues=i=>{let o=t.objectKeys(i).filter(s=>typeof i[i[s]]!="number"),a={};for(let s of o)a[s]=i[s];return t.objectValues(a)},t.objectValues=i=>t.objectKeys(i).map(function(o){return i[o]}),t.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{let o=[];for(let a in i)Object.prototype.hasOwnProperty.call(i,a)&&o.push(a);return o},t.find=(i,o)=>{for(let a of i)if(o(a))return a},t.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function n(i,o=" | "){return i.map(a=>typeof a=="string"?`'${a}'`:a).join(o)}t.joinValues=n,t.jsonStringifyReplacer=(i,o)=>typeof o=="bigint"?o.toString():o;})(Kt||(Kt={}));var zD;(function(t){t.mergeShapes=(e,r)=>oe(oe({},e),r);})(zD||(zD={}));var et=Kt.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Xu=t=>{switch(typeof t){case"undefined":return et.undefined;case"string":return et.string;case"number":return isNaN(t)?et.nan:et.number;case"boolean":return et.boolean;case"function":return et.function;case"bigint":return et.bigint;case"symbol":return et.symbol;case"object":return Array.isArray(t)?et.array:t===null?et.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?et.promise:typeof Map!="undefined"&&t instanceof Map?et.map:typeof Set!="undefined"&&t instanceof Set?et.set:typeof Date!="undefined"&&t instanceof Date?et.date:et.object;default:return et.unknown}},Le=Kt.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);var co=class t extends Error{constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n];},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n];};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e;}get errors(){return this.issues}format(e){let r=e||function(o){return o.message},n={_errors:[]},i=o=>{for(let a of o.issues)if(a.code==="invalid_union")a.unionErrors.map(i);else if(a.code==="invalid_return_type")i(a.returnTypeError);else if(a.code==="invalid_arguments")i(a.argumentsError);else if(a.path.length===0)n._errors.push(r(a));else {let s=n,c=0;for(;c<a.path.length;){let u=a.path[c];c===a.path.length-1?(s[u]=s[u]||{_errors:[]},s[u]._errors.push(r(a))):s[u]=s[u]||{_errors:[]},s=s[u],c++;}}};return i(this),n}static assert(e){if(!(e instanceof t))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Kt.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){let r={},n=[];for(let i of this.issues)i.path.length>0?(r[i.path[0]]=r[i.path[0]]||[],r[i.path[0]].push(e(i))):n.push(e(i));return {formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};co.create=t=>new co(t);var nm=(t,e)=>{let r;switch(t.code){case Le.invalid_type:t.received===et.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case Le.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,Kt.jsonStringifyReplacer)}`;break;case Le.unrecognized_keys:r=`Unrecognized key(s) in object: ${Kt.joinValues(t.keys,", ")}`;break;case Le.invalid_union:r="Invalid input";break;case Le.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${Kt.joinValues(t.options)}`;break;case Le.invalid_enum_value:r=`Invalid enum value. Expected ${Kt.joinValues(t.options)}, received '${t.received}'`;break;case Le.invalid_arguments:r="Invalid function arguments";break;case Le.invalid_return_type:r="Invalid function return type";break;case Le.invalid_date:r="Invalid date";break;case Le.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?r=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?r=`Invalid input: must end with "${t.validation.endsWith}"`:Kt.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case Le.too_small:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:r="Invalid input";break;case Le.too_big:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?r=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:r="Invalid input";break;case Le.custom:r="Invalid input";break;case Le.invalid_intersection_types:r="Intersection results could not be merged";break;case Le.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case Le.not_finite:r="Number must be finite";break;default:r=e.defaultError,Kt.assertNever(t);}return {message:r}},Rfe=nm;function I2(){return Rfe}var M2=t=>{let{data:e,path:r,errorMaps:n,issueData:i}=t,o=[...r,...i.path||[]],a=Me(oe({},i),{path:o});if(i.message!==void 0)return Me(oe({},i),{path:o,message:i.message});let s="",c=n.filter(u=>!!u).slice().reverse();for(let u of c)s=u(a,{data:e,defaultError:s}).message;return Me(oe({},i),{path:o,message:s})};function Ye(t,e){let r=I2(),n=M2({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===nm?void 0:nm].filter(i=>!!i)});t.common.issues.push(n);}var Fn=class t{constructor(){this.value="valid";}dirty(){this.value==="valid"&&(this.value="dirty");}abort(){this.value!=="aborted"&&(this.value="aborted");}static mergeArray(e,r){let n=[];for(let i of r){if(i.status==="aborted")return wt;i.status==="dirty"&&e.dirty(),n.push(i.value);}return {status:e.value,value:n}}static mergeObjectAsync(e,r){return re(this,null,function*(){let n=[];for(let i of r){let o=yield i.key,a=yield i.value;n.push({key:o,value:a});}return t.mergeObjectSync(e,n)})}static mergeObjectSync(e,r){let n={};for(let i of r){let{key:o,value:a}=i;if(o.status==="aborted"||a.status==="aborted")return wt;o.status==="dirty"&&e.dirty(),a.status==="dirty"&&e.dirty(),o.value!=="__proto__"&&(typeof a.value!="undefined"||i.alwaysSet)&&(n[o.value]=a.value);}return {status:e.value,value:n}}},wt=Object.freeze({status:"aborted"}),em=t=>({status:"dirty",value:t}),ii=t=>({status:"valid",value:t}),HD=t=>t.status==="aborted",jD=t=>t.status==="dirty",Ab=t=>t.status==="valid",Tb=t=>typeof Promise!="undefined"&&t instanceof Promise;function Rb(t,e,r,n){if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e.get(t)}function VD(t,e,r,n,i){if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e.set(t,r),r}var ct;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message;})(ct||(ct={}));var tm,rm,uo=class{constructor(e,r,n,i){this._cachedPath=[],this.parent=e,this.data=r,this._path=n,this._key=i;}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},$D=(t,e)=>{if(Ab(e))return {success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return {success:!1,get error(){if(this._error)return this._error;let r=new co(t.common.issues);return this._error=r,this._error}}};function Rt(t){if(!t)return {};let{errorMap:e,invalid_type_error:r,required_error:n,description:i}=t;if(e&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:i}:{errorMap:(a,s)=>{var c,u;let{message:l}=t;return a.code==="invalid_enum_value"?{message:l!=null?l:s.defaultError}:typeof s.data=="undefined"?{message:(c=l!=null?l:n)!==null&&c!==void 0?c:s.defaultError}:a.code!=="invalid_type"?{message:s.defaultError}:{message:(u=l!=null?l:r)!==null&&u!==void 0?u:s.defaultError}},description:i}}var Ot=class{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this);}get description(){return this._def.description}_getType(e){return Xu(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:Xu(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return {status:new Fn,ctx:{common:e.parent.common,data:e.data,parsedType:Xu(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let r=this._parse(e);if(Tb(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){let r=this._parse(e);return Promise.resolve(r)}parse(e,r){let n=this.safeParse(e,r);if(n.success)return n.data;throw n.error}safeParse(e,r){var n;let i={common:{issues:[],async:(n=r==null?void 0:r.async)!==null&&n!==void 0?n:!1,contextualErrorMap:r==null?void 0:r.errorMap},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Xu(e)},o=this._parseSync({data:e,path:i.path,parent:i});return $D(i,o)}parseAsync(e,r){return re(this,null,function*(){let n=yield this.safeParseAsync(e,r);if(n.success)return n.data;throw n.error})}safeParseAsync(e,r){return re(this,null,function*(){let n={common:{issues:[],contextualErrorMap:r==null?void 0:r.errorMap,async:!0},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Xu(e)},i=this._parse({data:e,path:n.path,parent:n}),o=yield Tb(i)?i:Promise.resolve(i);return $D(n,o)})}refine(e,r){let n=i=>typeof r=="string"||typeof r=="undefined"?{message:r}:typeof r=="function"?r(i):r;return this._refinement((i,o)=>{let a=e(i),s=()=>o.addIssue(oe({code:Le.custom},n(i)));return typeof Promise!="undefined"&&a instanceof Promise?a.then(c=>c?!0:(s(),!1)):a?!0:(s(),!1)})}refinement(e,r){return this._refinement((n,i)=>e(n)?!0:(i.addIssue(typeof r=="function"?r(n,i):r),!1))}_refinement(e){return new zo({schema:this,typeName:pt.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return Fo.create(this,this._def)}nullable(){return ms.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return mc.create(this,this._def)}promise(){return Qu.create(this,this._def)}or(e){return Ed.create([this,e],this._def)}and(e){return _d.create(this,e,this._def)}transform(e){return new zo(Me(oe({},Rt(this._def)),{schema:this,typeName:pt.ZodEffects,effect:{type:"transform",transform:e}}))}default(e){let r=typeof e=="function"?e:()=>e;return new Rd(Me(oe({},Rt(this._def)),{innerType:this,defaultValue:r,typeName:pt.ZodDefault}))}brand(){return new xb(oe({typeName:pt.ZodBranded,type:this},Rt(this._def)))}catch(e){let r=typeof e=="function"?e:()=>e;return new xd(Me(oe({},Rt(this._def)),{innerType:this,catchValue:r,typeName:pt.ZodCatch}))}describe(e){let r=this.constructor;return new r(Me(oe({},this._def),{description:e}))}pipe(e){return Ib.create(this,e)}readonly(){return Id.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},xfe=/^c[^\s-]{8,}$/i,Ife=/^[0-9a-z]+$/,Mfe=/^[0-9A-HJKMNP-TV-Z]{26}$/,Ofe=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Nfe=/^[a-z0-9_-]{21}$/i,kfe=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Pfe=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Bfe="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",x2,Ufe=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Dfe=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,Lfe=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,GD="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",qfe=new RegExp(`^${GD}$`);function KD(t){let e="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`),e}function Ffe(t){return new RegExp(`^${KD(t)}$`)}function zfe(t){let e=`${GD}T${KD(t)}`,r=[];return r.push(t.local?"Z?":"Z"),t.offset&&r.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${r.join("|")})`,new RegExp(`^${e}$`)}function Hfe(t,e){return !!((e==="v4"||!e)&&Ufe.test(t)||(e==="v6"||!e)&&Dfe.test(t))}var vd=class t extends Ot{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==et.string){let o=this._getOrReturnCtx(e);return Ye(o,{code:Le.invalid_type,expected:et.string,received:o.parsedType}),wt}let n=new Fn,i;for(let o of this._def.checks)if(o.kind==="min")e.data.length<o.value&&(i=this._getOrReturnCtx(e,i),Ye(i,{code:Le.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),n.dirty());else if(o.kind==="max")e.data.length>o.value&&(i=this._getOrReturnCtx(e,i),Ye(i,{code:Le.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),n.dirty());else if(o.kind==="length"){let a=e.data.length>o.value,s=e.data.length<o.value;(a||s)&&(i=this._getOrReturnCtx(e,i),a?Ye(i,{code:Le.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):s&&Ye(i,{code:Le.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),n.dirty());}else if(o.kind==="email")Pfe.test(e.data)||(i=this._getOrReturnCtx(e,i),Ye(i,{validation:"email",code:Le.invalid_string,message:o.message}),n.dirty());else if(o.kind==="emoji")x2||(x2=new RegExp(Bfe,"u")),x2.test(e.data)||(i=this._getOrReturnCtx(e,i),Ye(i,{validation:"emoji",code:Le.invalid_string,message:o.message}),n.dirty());else if(o.kind==="uuid")Ofe.test(e.data)||(i=this._getOrReturnCtx(e,i),Ye(i,{validation:"uuid",code:Le.invalid_string,message:o.message}),n.dirty());else if(o.kind==="nanoid")Nfe.test(e.data)||(i=this._getOrReturnCtx(e,i),Ye(i,{validation:"nanoid",code:Le.invalid_string,message:o.message}),n.dirty());else if(o.kind==="cuid")xfe.test(e.data)||(i=this._getOrReturnCtx(e,i),Ye(i,{validation:"cuid",code:Le.invalid_string,message:o.message}),n.dirty());else if(o.kind==="cuid2")Ife.test(e.data)||(i=this._getOrReturnCtx(e,i),Ye(i,{validation:"cuid2",code:Le.invalid_string,message:o.message}),n.dirty());else if(o.kind==="ulid")Mfe.test(e.data)||(i=this._getOrReturnCtx(e,i),Ye(i,{validation:"ulid",code:Le.invalid_string,message:o.message}),n.dirty());else if(o.kind==="url")try{new URL(e.data);}catch(a){i=this._getOrReturnCtx(e,i),Ye(i,{validation:"url",code:Le.invalid_string,message:o.message}),n.dirty();}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(e.data)||(i=this._getOrReturnCtx(e,i),Ye(i,{validation:"regex",code:Le.invalid_string,message:o.message}),n.dirty())):o.kind==="trim"?e.data=e.data.trim():o.kind==="includes"?e.data.includes(o.value,o.position)||(i=this._getOrReturnCtx(e,i),Ye(i,{code:Le.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),n.dirty()):o.kind==="toLowerCase"?e.data=e.data.toLowerCase():o.kind==="toUpperCase"?e.data=e.data.toUpperCase():o.kind==="startsWith"?e.data.startsWith(o.value)||(i=this._getOrReturnCtx(e,i),Ye(i,{code:Le.invalid_string,validation:{startsWith:o.value},message:o.message}),n.dirty()):o.kind==="endsWith"?e.data.endsWith(o.value)||(i=this._getOrReturnCtx(e,i),Ye(i,{code:Le.invalid_string,validation:{endsWith:o.value},message:o.message}),n.dirty()):o.kind==="datetime"?zfe(o).test(e.data)||(i=this._getOrReturnCtx(e,i),Ye(i,{code:Le.invalid_string,validation:"datetime",message:o.message}),n.dirty()):o.kind==="date"?qfe.test(e.data)||(i=this._getOrReturnCtx(e,i),Ye(i,{code:Le.invalid_string,validation:"date",message:o.message}),n.dirty()):o.kind==="time"?Ffe(o).test(e.data)||(i=this._getOrReturnCtx(e,i),Ye(i,{code:Le.invalid_string,validation:"time",message:o.message}),n.dirty()):o.kind==="duration"?kfe.test(e.data)||(i=this._getOrReturnCtx(e,i),Ye(i,{validation:"duration",code:Le.invalid_string,message:o.message}),n.dirty()):o.kind==="ip"?Hfe(e.data,o.version)||(i=this._getOrReturnCtx(e,i),Ye(i,{validation:"ip",code:Le.invalid_string,message:o.message}),n.dirty()):o.kind==="base64"?Lfe.test(e.data)||(i=this._getOrReturnCtx(e,i),Ye(i,{validation:"base64",code:Le.invalid_string,message:o.message}),n.dirty()):Kt.assertNever(o);return {status:n.value,value:e.data}}_regex(e,r,n){return this.refinement(i=>e.test(i),oe({validation:r,code:Le.invalid_string},ct.errToObj(n)))}_addCheck(e){return new t(Me(oe({},this._def),{checks:[...this._def.checks,e]}))}email(e){return this._addCheck(oe({kind:"email"},ct.errToObj(e)))}url(e){return this._addCheck(oe({kind:"url"},ct.errToObj(e)))}emoji(e){return this._addCheck(oe({kind:"emoji"},ct.errToObj(e)))}uuid(e){return this._addCheck(oe({kind:"uuid"},ct.errToObj(e)))}nanoid(e){return this._addCheck(oe({kind:"nanoid"},ct.errToObj(e)))}cuid(e){return this._addCheck(oe({kind:"cuid"},ct.errToObj(e)))}cuid2(e){return this._addCheck(oe({kind:"cuid2"},ct.errToObj(e)))}ulid(e){return this._addCheck(oe({kind:"ulid"},ct.errToObj(e)))}base64(e){return this._addCheck(oe({kind:"base64"},ct.errToObj(e)))}ip(e){return this._addCheck(oe({kind:"ip"},ct.errToObj(e)))}datetime(e){var r,n;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck(oe({kind:"datetime",precision:typeof(e==null?void 0:e.precision)=="undefined"?null:e==null?void 0:e.precision,offset:(r=e==null?void 0:e.offset)!==null&&r!==void 0?r:!1,local:(n=e==null?void 0:e.local)!==null&&n!==void 0?n:!1},ct.errToObj(e==null?void 0:e.message)))}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck(oe({kind:"time",precision:typeof(e==null?void 0:e.precision)=="undefined"?null:e==null?void 0:e.precision},ct.errToObj(e==null?void 0:e.message)))}duration(e){return this._addCheck(oe({kind:"duration"},ct.errToObj(e)))}regex(e,r){return this._addCheck(oe({kind:"regex",regex:e},ct.errToObj(r)))}includes(e,r){return this._addCheck(oe({kind:"includes",value:e,position:r==null?void 0:r.position},ct.errToObj(r==null?void 0:r.message)))}startsWith(e,r){return this._addCheck(oe({kind:"startsWith",value:e},ct.errToObj(r)))}endsWith(e,r){return this._addCheck(oe({kind:"endsWith",value:e},ct.errToObj(r)))}min(e,r){return this._addCheck(oe({kind:"min",value:e},ct.errToObj(r)))}max(e,r){return this._addCheck(oe({kind:"max",value:e},ct.errToObj(r)))}length(e,r){return this._addCheck(oe({kind:"length",value:e},ct.errToObj(r)))}nonempty(e){return this.min(1,ct.errToObj(e))}trim(){return new t(Me(oe({},this._def),{checks:[...this._def.checks,{kind:"trim"}]}))}toLowerCase(){return new t(Me(oe({},this._def),{checks:[...this._def.checks,{kind:"toLowerCase"}]}))}toUpperCase(){return new t(Me(oe({},this._def),{checks:[...this._def.checks,{kind:"toUpperCase"}]}))}get isDatetime(){return !!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return !!this._def.checks.find(e=>e.kind==="date")}get isTime(){return !!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return !!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return !!this._def.checks.find(e=>e.kind==="email")}get isURL(){return !!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return !!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return !!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return !!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return !!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return !!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return !!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return !!this._def.checks.find(e=>e.kind==="ip")}get isBase64(){return !!this._def.checks.find(e=>e.kind==="base64")}get minLength(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};vd.create=t=>{var e;return new vd(oe({checks:[],typeName:pt.ZodString,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1},Rt(t)))};function jfe(t,e){let r=(t.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,i=r>n?r:n,o=parseInt(t.toFixed(i).replace(".","")),a=parseInt(e.toFixed(i).replace(".",""));return o%a/Math.pow(10,i)}var im=class t extends Ot{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf;}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==et.number){let o=this._getOrReturnCtx(e);return Ye(o,{code:Le.invalid_type,expected:et.number,received:o.parsedType}),wt}let n,i=new Fn;for(let o of this._def.checks)o.kind==="int"?Kt.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),Ye(n,{code:Le.invalid_type,expected:"integer",received:"float",message:o.message}),i.dirty()):o.kind==="min"?(o.inclusive?e.data<o.value:e.data<=o.value)&&(n=this._getOrReturnCtx(e,n),Ye(n,{code:Le.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="max"?(o.inclusive?e.data>o.value:e.data>=o.value)&&(n=this._getOrReturnCtx(e,n),Ye(n,{code:Le.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="multipleOf"?jfe(e.data,o.value)!==0&&(n=this._getOrReturnCtx(e,n),Ye(n,{code:Le.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):o.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),Ye(n,{code:Le.not_finite,message:o.message}),i.dirty()):Kt.assertNever(o);return {status:i.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,ct.toString(r))}gt(e,r){return this.setLimit("min",e,!1,ct.toString(r))}lte(e,r){return this.setLimit("max",e,!0,ct.toString(r))}lt(e,r){return this.setLimit("max",e,!1,ct.toString(r))}setLimit(e,r,n,i){return new t(Me(oe({},this._def),{checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:ct.toString(i)}]}))}_addCheck(e){return new t(Me(oe({},this._def),{checks:[...this._def.checks,e]}))}int(e){return this._addCheck({kind:"int",message:ct.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ct.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ct.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ct.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ct.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:ct.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:ct.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ct.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ct.toString(e)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}get isInt(){return !!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&Kt.isInteger(e.value))}get isFinite(){let e=null,r=null;for(let n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return !0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);}return Number.isFinite(r)&&Number.isFinite(e)}};im.create=t=>new im(oe({checks:[],typeName:pt.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1},Rt(t)));var om=class t extends Ot{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte;}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==et.bigint){let o=this._getOrReturnCtx(e);return Ye(o,{code:Le.invalid_type,expected:et.bigint,received:o.parsedType}),wt}let n,i=new Fn;for(let o of this._def.checks)o.kind==="min"?(o.inclusive?e.data<o.value:e.data<=o.value)&&(n=this._getOrReturnCtx(e,n),Ye(n,{code:Le.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="max"?(o.inclusive?e.data>o.value:e.data>=o.value)&&(n=this._getOrReturnCtx(e,n),Ye(n,{code:Le.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="multipleOf"?e.data%o.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),Ye(n,{code:Le.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):Kt.assertNever(o);return {status:i.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,ct.toString(r))}gt(e,r){return this.setLimit("min",e,!1,ct.toString(r))}lte(e,r){return this.setLimit("max",e,!0,ct.toString(r))}lt(e,r){return this.setLimit("max",e,!1,ct.toString(r))}setLimit(e,r,n,i){return new t(Me(oe({},this._def),{checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:ct.toString(i)}]}))}_addCheck(e){return new t(Me(oe({},this._def),{checks:[...this._def.checks,e]}))}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ct.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ct.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ct.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ct.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:ct.toString(r)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};om.create=t=>{var e;return new om(oe({checks:[],typeName:pt.ZodBigInt,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1},Rt(t)))};var am=class extends Ot{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==et.boolean){let n=this._getOrReturnCtx(e);return Ye(n,{code:Le.invalid_type,expected:et.boolean,received:n.parsedType}),wt}return ii(e.data)}};am.create=t=>new am(oe({typeName:pt.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1},Rt(t)));var sm=class t extends Ot{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==et.date){let o=this._getOrReturnCtx(e);return Ye(o,{code:Le.invalid_type,expected:et.date,received:o.parsedType}),wt}if(isNaN(e.data.getTime())){let o=this._getOrReturnCtx(e);return Ye(o,{code:Le.invalid_date}),wt}let n=new Fn,i;for(let o of this._def.checks)o.kind==="min"?e.data.getTime()<o.value&&(i=this._getOrReturnCtx(e,i),Ye(i,{code:Le.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),n.dirty()):o.kind==="max"?e.data.getTime()>o.value&&(i=this._getOrReturnCtx(e,i),Ye(i,{code:Le.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),n.dirty()):Kt.assertNever(o);return {status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new t(Me(oe({},this._def),{checks:[...this._def.checks,e]}))}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:ct.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:ct.toString(r)})}get minDate(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e!=null?new Date(e):null}};sm.create=t=>new sm(oe({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:pt.ZodDate},Rt(t)));var cm=class extends Ot{_parse(e){if(this._getType(e)!==et.symbol){let n=this._getOrReturnCtx(e);return Ye(n,{code:Le.invalid_type,expected:et.symbol,received:n.parsedType}),wt}return ii(e.data)}};cm.create=t=>new cm(oe({typeName:pt.ZodSymbol},Rt(t)));var bd=class extends Ot{_parse(e){if(this._getType(e)!==et.undefined){let n=this._getOrReturnCtx(e);return Ye(n,{code:Le.invalid_type,expected:et.undefined,received:n.parsedType}),wt}return ii(e.data)}};bd.create=t=>new bd(oe({typeName:pt.ZodUndefined},Rt(t)));var wd=class extends Ot{_parse(e){if(this._getType(e)!==et.null){let n=this._getOrReturnCtx(e);return Ye(n,{code:Le.invalid_type,expected:et.null,received:n.parsedType}),wt}return ii(e.data)}};wd.create=t=>new wd(oe({typeName:pt.ZodNull},Rt(t)));var um=class extends Ot{constructor(){super(...arguments),this._any=!0;}_parse(e){return ii(e.data)}};um.create=t=>new um(oe({typeName:pt.ZodAny},Rt(t)));var pc=class extends Ot{constructor(){super(...arguments),this._unknown=!0;}_parse(e){return ii(e.data)}};pc.create=t=>new pc(oe({typeName:pt.ZodUnknown},Rt(t)));var Aa=class extends Ot{_parse(e){let r=this._getOrReturnCtx(e);return Ye(r,{code:Le.invalid_type,expected:et.never,received:r.parsedType}),wt}};Aa.create=t=>new Aa(oe({typeName:pt.ZodNever},Rt(t)));var lm=class extends Ot{_parse(e){if(this._getType(e)!==et.undefined){let n=this._getOrReturnCtx(e);return Ye(n,{code:Le.invalid_type,expected:et.void,received:n.parsedType}),wt}return ii(e.data)}};lm.create=t=>new lm(oe({typeName:pt.ZodVoid},Rt(t)));var mc=class t extends Ot{_parse(e){let{ctx:r,status:n}=this._processInputParams(e),i=this._def;if(r.parsedType!==et.array)return Ye(r,{code:Le.invalid_type,expected:et.array,received:r.parsedType}),wt;if(i.exactLength!==null){let a=r.data.length>i.exactLength.value,s=r.data.length<i.exactLength.value;(a||s)&&(Ye(r,{code:a?Le.too_big:Le.too_small,minimum:s?i.exactLength.value:void 0,maximum:a?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),n.dirty());}if(i.minLength!==null&&r.data.length<i.minLength.value&&(Ye(r,{code:Le.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),n.dirty()),i.maxLength!==null&&r.data.length>i.maxLength.value&&(Ye(r,{code:Le.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((a,s)=>i.type._parseAsync(new uo(r,a,r.path,s)))).then(a=>Fn.mergeArray(n,a));let o=[...r.data].map((a,s)=>i.type._parseSync(new uo(r,a,r.path,s)));return Fn.mergeArray(n,o)}get element(){return this._def.type}min(e,r){return new t(Me(oe({},this._def),{minLength:{value:e,message:ct.toString(r)}}))}max(e,r){return new t(Me(oe({},this._def),{maxLength:{value:e,message:ct.toString(r)}}))}length(e,r){return new t(Me(oe({},this._def),{exactLength:{value:e,message:ct.toString(r)}}))}nonempty(e){return this.min(1,e)}};mc.create=(t,e)=>new mc(oe({type:t,minLength:null,maxLength:null,exactLength:null,typeName:pt.ZodArray},Rt(e)));function gd(t){if(t instanceof Si){let e={};for(let r in t.shape){let n=t.shape[r];e[r]=Fo.create(gd(n));}return new Si(Me(oe({},t._def),{shape:()=>e}))}else return t instanceof mc?new mc(Me(oe({},t._def),{type:gd(t.element)})):t instanceof Fo?Fo.create(gd(t.unwrap())):t instanceof ms?ms.create(gd(t.unwrap())):t instanceof ps?ps.create(t.items.map(e=>gd(e))):t}var Si=class t extends Ot{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend;}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),r=Kt.objectKeys(e);return this._cached={shape:e,keys:r}}_parse(e){if(this._getType(e)!==et.object){let u=this._getOrReturnCtx(e);return Ye(u,{code:Le.invalid_type,expected:et.object,received:u.parsedType}),wt}let{status:n,ctx:i}=this._processInputParams(e),{shape:o,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof Aa&&this._def.unknownKeys==="strip"))for(let u in i.data)a.includes(u)||s.push(u);let c=[];for(let u of a){let l=o[u],w=i.data[u];c.push({key:{status:"valid",value:u},value:l._parse(new uo(i,w,i.path,u)),alwaysSet:u in i.data});}if(this._def.catchall instanceof Aa){let u=this._def.unknownKeys;if(u==="passthrough")for(let l of s)c.push({key:{status:"valid",value:l},value:{status:"valid",value:i.data[l]}});else if(u==="strict")s.length>0&&(Ye(i,{code:Le.unrecognized_keys,keys:s}),n.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else {let u=this._def.catchall;for(let l of s){let w=i.data[l];c.push({key:{status:"valid",value:l},value:u._parse(new uo(i,w,i.path,l)),alwaysSet:l in i.data});}}return i.common.async?Promise.resolve().then(()=>re(this,null,function*(){let u=[];for(let l of c){let w=yield l.key,T=yield l.value;u.push({key:w,value:T,alwaysSet:l.alwaysSet});}return u})).then(u=>Fn.mergeObjectSync(n,u)):Fn.mergeObjectSync(n,c)}get shape(){return this._def.shape()}strict(e){return ct.errToObj,new t(oe(Me(oe({},this._def),{unknownKeys:"strict"}),e!==void 0?{errorMap:(r,n)=>{var i,o,a,s;let c=(a=(o=(i=this._def).errorMap)===null||o===void 0?void 0:o.call(i,r,n).message)!==null&&a!==void 0?a:n.defaultError;return r.code==="unrecognized_keys"?{message:(s=ct.errToObj(e).message)!==null&&s!==void 0?s:c}:{message:c}}}:{}))}strip(){return new t(Me(oe({},this._def),{unknownKeys:"strip"}))}passthrough(){return new t(Me(oe({},this._def),{unknownKeys:"passthrough"}))}extend(e){return new t(Me(oe({},this._def),{shape:()=>oe(oe({},this._def.shape()),e)}))}merge(e){return new t({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>oe(oe({},this._def.shape()),e._def.shape()),typeName:pt.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new t(Me(oe({},this._def),{catchall:e}))}pick(e){let r={};return Kt.objectKeys(e).forEach(n=>{e[n]&&this.shape[n]&&(r[n]=this.shape[n]);}),new t(Me(oe({},this._def),{shape:()=>r}))}omit(e){let r={};return Kt.objectKeys(this.shape).forEach(n=>{e[n]||(r[n]=this.shape[n]);}),new t(Me(oe({},this._def),{shape:()=>r}))}deepPartial(){return gd(this)}partial(e){let r={};return Kt.objectKeys(this.shape).forEach(n=>{let i=this.shape[n];e&&!e[n]?r[n]=i:r[n]=i.optional();}),new t(Me(oe({},this._def),{shape:()=>r}))}required(e){let r={};return Kt.objectKeys(this.shape).forEach(n=>{if(e&&!e[n])r[n]=this.shape[n];else {let o=this.shape[n];for(;o instanceof Fo;)o=o._def.innerType;r[n]=o;}}),new t(Me(oe({},this._def),{shape:()=>r}))}keyof(){return WD(Kt.objectKeys(this.shape))}};Si.create=(t,e)=>new Si(oe({shape:()=>t,unknownKeys:"strip",catchall:Aa.create(),typeName:pt.ZodObject},Rt(e)));Si.strictCreate=(t,e)=>new Si(oe({shape:()=>t,unknownKeys:"strict",catchall:Aa.create(),typeName:pt.ZodObject},Rt(e)));Si.lazycreate=(t,e)=>new Si(oe({shape:t,unknownKeys:"strip",catchall:Aa.create(),typeName:pt.ZodObject},Rt(e)));var Ed=class extends Ot{_parse(e){let{ctx:r}=this._processInputParams(e),n=this._def.options;function i(o){for(let s of o)if(s.result.status==="valid")return s.result;for(let s of o)if(s.result.status==="dirty")return r.common.issues.push(...s.ctx.common.issues),s.result;let a=o.map(s=>new co(s.ctx.common.issues));return Ye(r,{code:Le.invalid_union,unionErrors:a}),wt}if(r.common.async)return Promise.all(n.map(o=>re(this,null,function*(){let a=Me(oe({},r),{common:Me(oe({},r.common),{issues:[]}),parent:null});return {result:yield o._parseAsync({data:r.data,path:r.path,parent:a}),ctx:a}}))).then(i);{let o,a=[];for(let c of n){let u=Me(oe({},r),{common:Me(oe({},r.common),{issues:[]}),parent:null}),l=c._parseSync({data:r.data,path:r.path,parent:u});if(l.status==="valid")return l;l.status==="dirty"&&!o&&(o={result:l,ctx:u}),u.common.issues.length&&a.push(u.common.issues);}if(o)return r.common.issues.push(...o.ctx.common.issues),o.result;let s=a.map(c=>new co(c));return Ye(r,{code:Le.invalid_union,unionErrors:s}),wt}}get options(){return this._def.options}};Ed.create=(t,e)=>new Ed(oe({options:t,typeName:pt.ZodUnion},Rt(e)));function N2(t,e){let r=Xu(t),n=Xu(e);if(t===e)return {valid:!0,data:t};if(r===et.object&&n===et.object){let i=Kt.objectKeys(e),o=Kt.objectKeys(t).filter(s=>i.indexOf(s)!==-1),a=oe(oe({},t),e);for(let s of o){let c=N2(t[s],e[s]);if(!c.valid)return {valid:!1};a[s]=c.data;}return {valid:!0,data:a}}else if(r===et.array&&n===et.array){if(t.length!==e.length)return {valid:!1};let i=[];for(let o=0;o<t.length;o++){let a=t[o],s=e[o],c=N2(a,s);if(!c.valid)return {valid:!1};i.push(c.data);}return {valid:!0,data:i}}else return r===et.date&&n===et.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}var _d=class extends Ot{_parse(e){let{status:r,ctx:n}=this._processInputParams(e),i=(o,a)=>{if(HD(o)||HD(a))return wt;let s=N2(o.value,a.value);return s.valid?((jD(o)||jD(a))&&r.dirty(),{status:r.value,value:s.data}):(Ye(n,{code:Le.invalid_intersection_types}),wt)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([o,a])=>i(o,a)):i(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};_d.create=(t,e,r)=>new _d(oe({left:t,right:e,typeName:pt.ZodIntersection},Rt(r)));var ps=class t extends Ot{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==et.array)return Ye(n,{code:Le.invalid_type,expected:et.array,received:n.parsedType}),wt;if(n.data.length<this._def.items.length)return Ye(n,{code:Le.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),wt;!this._def.rest&&n.data.length>this._def.items.length&&(Ye(n,{code:Le.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let o=[...n.data].map((a,s)=>{let c=this._def.items[s]||this._def.rest;return c?c._parse(new uo(n,a,n.path,s)):null}).filter(a=>!!a);return n.common.async?Promise.all(o).then(a=>Fn.mergeArray(r,a)):Fn.mergeArray(r,o)}get items(){return this._def.items}rest(e){return new t(Me(oe({},this._def),{rest:e}))}};ps.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ps(oe({items:t,typeName:pt.ZodTuple,rest:null},Rt(e)))};var k2=class t extends Ot{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==et.object)return Ye(n,{code:Le.invalid_type,expected:et.object,received:n.parsedType}),wt;let i=[],o=this._def.keyType,a=this._def.valueType;for(let s in n.data)i.push({key:o._parse(new uo(n,s,n.path,s)),value:a._parse(new uo(n,n.data[s],n.path,s)),alwaysSet:s in n.data});return n.common.async?Fn.mergeObjectAsync(r,i):Fn.mergeObjectSync(r,i)}get element(){return this._def.valueType}static create(e,r,n){return r instanceof Ot?new t(oe({keyType:e,valueType:r,typeName:pt.ZodRecord},Rt(n))):new t(oe({keyType:vd.create(),valueType:e,typeName:pt.ZodRecord},Rt(r)))}},fm=class extends Ot{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==et.map)return Ye(n,{code:Le.invalid_type,expected:et.map,received:n.parsedType}),wt;let i=this._def.keyType,o=this._def.valueType,a=[...n.data.entries()].map(([s,c],u)=>({key:i._parse(new uo(n,s,n.path,[u,"key"])),value:o._parse(new uo(n,c,n.path,[u,"value"]))}));if(n.common.async){let s=new Map;return Promise.resolve().then(()=>re(this,null,function*(){for(let c of a){let u=yield c.key,l=yield c.value;if(u.status==="aborted"||l.status==="aborted")return wt;(u.status==="dirty"||l.status==="dirty")&&r.dirty(),s.set(u.value,l.value);}return {status:r.value,value:s}}))}else {let s=new Map;for(let c of a){let u=c.key,l=c.value;if(u.status==="aborted"||l.status==="aborted")return wt;(u.status==="dirty"||l.status==="dirty")&&r.dirty(),s.set(u.value,l.value);}return {status:r.value,value:s}}}};fm.create=(t,e,r)=>new fm(oe({valueType:e,keyType:t,typeName:pt.ZodMap},Rt(r)));var dm=class t extends Ot{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==et.set)return Ye(n,{code:Le.invalid_type,expected:et.set,received:n.parsedType}),wt;let i=this._def;i.minSize!==null&&n.data.size<i.minSize.value&&(Ye(n,{code:Le.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),r.dirty()),i.maxSize!==null&&n.data.size>i.maxSize.value&&(Ye(n,{code:Le.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),r.dirty());let o=this._def.valueType;function a(c){let u=new Set;for(let l of c){if(l.status==="aborted")return wt;l.status==="dirty"&&r.dirty(),u.add(l.value);}return {status:r.value,value:u}}let s=[...n.data.values()].map((c,u)=>o._parse(new uo(n,c,n.path,u)));return n.common.async?Promise.all(s).then(c=>a(c)):a(s)}min(e,r){return new t(Me(oe({},this._def),{minSize:{value:e,message:ct.toString(r)}}))}max(e,r){return new t(Me(oe({},this._def),{maxSize:{value:e,message:ct.toString(r)}}))}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}};dm.create=(t,e)=>new dm(oe({valueType:t,minSize:null,maxSize:null,typeName:pt.ZodSet},Rt(e)));var Sd=class extends Ot{get schema(){return this._def.getter()}_parse(e){let{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};Sd.create=(t,e)=>new Sd(oe({getter:t,typeName:pt.ZodLazy},Rt(e)));var Cd=class extends Ot{_parse(e){if(e.data!==this._def.value){let r=this._getOrReturnCtx(e);return Ye(r,{received:r.data,code:Le.invalid_literal,expected:this._def.value}),wt}return {status:"valid",value:e.data}}get value(){return this._def.value}};Cd.create=(t,e)=>new Cd(oe({value:t,typeName:pt.ZodLiteral},Rt(e)));function WD(t,e){return new Ad(oe({values:t,typeName:pt.ZodEnum},Rt(e)))}var Ad=class t extends Ot{constructor(){super(...arguments),tm.set(this,void 0);}_parse(e){if(typeof e.data!="string"){let r=this._getOrReturnCtx(e),n=this._def.values;return Ye(r,{expected:Kt.joinValues(n),received:r.parsedType,code:Le.invalid_type}),wt}if(Rb(this,tm)||VD(this,tm,new Set(this._def.values)),!Rb(this,tm).has(e.data)){let r=this._getOrReturnCtx(e),n=this._def.values;return Ye(r,{received:r.data,code:Le.invalid_enum_value,options:n}),wt}return ii(e.data)}get options(){return this._def.values}get enum(){let e={};for(let r of this._def.values)e[r]=r;return e}get Values(){let e={};for(let r of this._def.values)e[r]=r;return e}get Enum(){let e={};for(let r of this._def.values)e[r]=r;return e}extract(e,r=this._def){return t.create(e,oe(oe({},this._def),r))}exclude(e,r=this._def){return t.create(this.options.filter(n=>!e.includes(n)),oe(oe({},this._def),r))}};tm=new WeakMap;Ad.create=WD;var Td=class extends Ot{constructor(){super(...arguments),rm.set(this,void 0);}_parse(e){let r=Kt.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==et.string&&n.parsedType!==et.number){let i=Kt.objectValues(r);return Ye(n,{expected:Kt.joinValues(i),received:n.parsedType,code:Le.invalid_type}),wt}if(Rb(this,rm)||VD(this,rm,new Set(Kt.getValidEnumValues(this._def.values))),!Rb(this,rm).has(e.data)){let i=Kt.objectValues(r);return Ye(n,{received:n.data,code:Le.invalid_enum_value,options:i}),wt}return ii(e.data)}get enum(){return this._def.values}};rm=new WeakMap;Td.create=(t,e)=>new Td(oe({values:t,typeName:pt.ZodNativeEnum},Rt(e)));var Qu=class extends Ot{unwrap(){return this._def.type}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==et.promise&&r.common.async===!1)return Ye(r,{code:Le.invalid_type,expected:et.promise,received:r.parsedType}),wt;let n=r.parsedType===et.promise?r.data:Promise.resolve(r.data);return ii(n.then(i=>this._def.type.parseAsync(i,{path:r.path,errorMap:r.common.contextualErrorMap})))}};Qu.create=(t,e)=>new Qu(oe({type:t,typeName:pt.ZodPromise},Rt(e)));var zo=class extends Ot{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===pt.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:r,ctx:n}=this._processInputParams(e),i=this._def.effect||null,o={addIssue:a=>{Ye(n,a),a.fatal?r.abort():r.dirty();},get path(){return n.path}};if(o.addIssue=o.addIssue.bind(o),i.type==="preprocess"){let a=i.transform(n.data,o);if(n.common.async)return Promise.resolve(a).then(s=>re(this,null,function*(){if(r.value==="aborted")return wt;let c=yield this._def.schema._parseAsync({data:s,path:n.path,parent:n});return c.status==="aborted"?wt:c.status==="dirty"||r.value==="dirty"?em(c.value):c}));{if(r.value==="aborted")return wt;let s=this._def.schema._parseSync({data:a,path:n.path,parent:n});return s.status==="aborted"?wt:s.status==="dirty"||r.value==="dirty"?em(s.value):s}}if(i.type==="refinement"){let a=s=>{let c=i.refinement(s,o);if(n.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(n.common.async===!1){let s=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?wt:(s.status==="dirty"&&r.dirty(),a(s.value),{status:r.value,value:s.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(s=>s.status==="aborted"?wt:(s.status==="dirty"&&r.dirty(),a(s.value).then(()=>({status:r.value,value:s.value}))))}if(i.type==="transform")if(n.common.async===!1){let a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!Ab(a))return a;let s=i.transform(a.value,o);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return {status:r.value,value:s}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>Ab(a)?Promise.resolve(i.transform(a.value,o)).then(s=>({status:r.value,value:s})):a);Kt.assertNever(i);}};zo.create=(t,e,r)=>new zo(oe({schema:t,typeName:pt.ZodEffects,effect:e},Rt(r)));zo.createWithPreprocess=(t,e,r)=>new zo(oe({schema:e,effect:{type:"preprocess",transform:t},typeName:pt.ZodEffects},Rt(r)));var Fo=class extends Ot{_parse(e){return this._getType(e)===et.undefined?ii(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Fo.create=(t,e)=>new Fo(oe({innerType:t,typeName:pt.ZodOptional},Rt(e)));var ms=class extends Ot{_parse(e){return this._getType(e)===et.null?ii(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};ms.create=(t,e)=>new ms(oe({innerType:t,typeName:pt.ZodNullable},Rt(e)));var Rd=class extends Ot{_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return r.parsedType===et.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};Rd.create=(t,e)=>new Rd(oe({innerType:t,typeName:pt.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default},Rt(e)));var xd=class extends Ot{_parse(e){let{ctx:r}=this._processInputParams(e),n=Me(oe({},r),{common:Me(oe({},r.common),{issues:[]})}),i=this._def.innerType._parse({data:n.data,path:n.path,parent:oe({},n)});return Tb(i)?i.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new co(n.common.issues)},input:n.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new co(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};xd.create=(t,e)=>new xd(oe({innerType:t,typeName:pt.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch},Rt(e)));var hm=class extends Ot{_parse(e){if(this._getType(e)!==et.nan){let n=this._getOrReturnCtx(e);return Ye(n,{code:Le.invalid_type,expected:et.nan,received:n.parsedType}),wt}return {status:"valid",value:e.data}}};hm.create=t=>new hm(oe({typeName:pt.ZodNaN},Rt(t)));var xb=class extends Ot{_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}},Ib=class t extends Ot{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.common.async)return re(this,null,function*(){let o=yield this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?wt:o.status==="dirty"?(r.dirty(),em(o.value)):this._def.out._parseAsync({data:o.value,path:n.path,parent:n})});{let i=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?wt:i.status==="dirty"?(r.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:n.path,parent:n})}}static create(e,r){return new t({in:e,out:r,typeName:pt.ZodPipeline})}},Id=class extends Ot{_parse(e){let r=this._def.innerType._parse(e),n=i=>(Ab(i)&&(i.value=Object.freeze(i.value)),i);return Tb(r)?r.then(i=>n(i)):n(r)}unwrap(){return this._def.innerType}};Id.create=(t,e)=>new Id(oe({innerType:t,typeName:pt.ZodReadonly},Rt(e)));({object:Si.lazycreate});var pt;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly";})(pt||(pt={}));var lr=vd.create;im.create;hm.create;om.create;am.create;sm.create;cm.create;bd.create;wd.create;um.create;var Md=pc.create;Aa.create;lm.create;mc.create;var lo=Si.create;Si.strictCreate;Ed.create;_d.create;ps.create;var el=k2.create;fm.create;dm.create;Sd.create;Cd.create;Ad.create;Td.create;Qu.create;zo.create;Fo.create;ms.create;zo.createWithPreprocess;eo();v();m();y();g();v();m();y();g();v();m();y();g();v();m();y();g();function pm(t,e){return function(){return t.apply(e,arguments)}}var{toString:$fe}=Object.prototype,{getPrototypeOf:L2}=Object,Ob=(t=>e=>{let r=$fe.call(e);return t[r]||(t[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Ho=t=>(t=t.toLowerCase(),e=>Ob(e)===t),Nb=t=>e=>typeof e===t,{isArray:Od}=Array,mm=Nb("undefined");function Vfe(t){return t!==null&&!mm(t)&&t.constructor!==null&&!mm(t.constructor)&&Ci(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}var JD=Ho("ArrayBuffer");function Gfe(t){let e;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&JD(t.buffer),e}var Kfe=Nb("string"),Ci=Nb("function"),XD=Nb("number"),kb=t=>t!==null&&typeof t=="object",Wfe=t=>t===!0||t===!1,Mb=t=>{if(Ob(t)!=="object")return !1;let e=L2(t);return (e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},Yfe=Ho("Date"),Zfe=Ho("File"),Jfe=Ho("Blob"),Xfe=Ho("FileList"),Qfe=t=>kb(t)&&Ci(t.pipe),ede=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||Ci(t.append)&&((e=Ob(t))==="formdata"||e==="object"&&Ci(t.toString)&&t.toString()==="[object FormData]"))},tde=Ho("URLSearchParams"),[rde,nde,ide,ode]=["ReadableStream","Request","Response","Headers"].map(Ho),ade=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ym(t,e,{allOwnKeys:r=!1}={}){if(t===null||typeof t=="undefined")return;let n,i;if(typeof t!="object"&&(t=[t]),Od(t))for(n=0,i=t.length;n<i;n++)e.call(null,t[n],n,t);else {let o=r?Object.getOwnPropertyNames(t):Object.keys(t),a=o.length,s;for(n=0;n<a;n++)s=o[n],e.call(null,t[s],s,t);}}function QD(t,e){e=e.toLowerCase();let r=Object.keys(t),n=r.length,i;for(;n-- >0;)if(i=r[n],e===i.toLowerCase())return i;return null}var tl=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:globalThis,eL=t=>!mm(t)&&t!==tl;function D2(){let{caseless:t}=eL(this)&&this||{},e={},r=(n,i)=>{let o=t&&QD(e,i)||i;Mb(e[o])&&Mb(n)?e[o]=D2(e[o],n):Mb(n)?e[o]=D2({},n):Od(n)?e[o]=n.slice():e[o]=n;};for(let n=0,i=arguments.length;n<i;n++)arguments[n]&&ym(arguments[n],r);return e}var sde=(t,e,r,{allOwnKeys:n}={})=>(ym(e,(i,o)=>{r&&Ci(i)?t[o]=pm(i,r):t[o]=i;},{allOwnKeys:n}),t),cde=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),ude=(t,e,r,n)=>{t.prototype=Object.create(e.prototype,n),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),r&&Object.assign(t.prototype,r);},lde=(t,e,r,n)=>{let i,o,a,s={};if(e=e||{},t==null)return e;do{for(i=Object.getOwnPropertyNames(t),o=i.length;o-- >0;)a=i[o],(!n||n(a,t,e))&&!s[a]&&(e[a]=t[a],s[a]=!0);t=r!==!1&&L2(t);}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},fde=(t,e,r)=>{t=String(t),(r===void 0||r>t.length)&&(r=t.length),r-=e.length;let n=t.indexOf(e,r);return n!==-1&&n===r},dde=t=>{if(!t)return null;if(Od(t))return t;let e=t.length;if(!XD(e))return null;let r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},hde=(t=>e=>t&&e instanceof t)(typeof Uint8Array!="undefined"&&L2(Uint8Array)),pde=(t,e)=>{let n=(t&&t[Symbol.iterator]).call(t),i;for(;(i=n.next())&&!i.done;){let o=i.value;e.call(t,o[0],o[1]);}},mde=(t,e)=>{let r,n=[];for(;(r=t.exec(e))!==null;)n.push(r);return n},yde=Ho("HTMLFormElement"),gde=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,i){return n.toUpperCase()+i}),YD=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),vde=Ho("RegExp"),tL=(t,e)=>{let r=Object.getOwnPropertyDescriptors(t),n={};ym(r,(i,o)=>{let a;(a=e(i,o,t))!==!1&&(n[o]=a||i);}),Object.defineProperties(t,n);},bde=t=>{tL(t,(e,r)=>{if(Ci(t)&&["arguments","caller","callee"].indexOf(r)!==-1)return !1;let n=t[r];if(Ci(n)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")});}});},wde=(t,e)=>{let r={},n=i=>{i.forEach(o=>{r[o]=!0;});};return Od(t)?n(t):n(String(t).split(e)),r},Ede=()=>{},_de=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e,U2="abcdefghijklmnopqrstuvwxyz",ZD="0123456789",rL={DIGIT:ZD,ALPHA:U2,ALPHA_DIGIT:U2+U2.toUpperCase()+ZD},Sde=(t=16,e=rL.ALPHA_DIGIT)=>{let r="",{length:n}=e;for(;t--;)r+=e[Math.random()*n|0];return r};function Cde(t){return !!(t&&Ci(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}var Ade=t=>{let e=new Array(10),r=(n,i)=>{if(kb(n)){if(e.indexOf(n)>=0)return;if(!("toJSON"in n)){e[i]=n;let o=Od(n)?[]:{};return ym(n,(a,s)=>{let c=r(a,i+1);!mm(c)&&(o[s]=c);}),e[i]=void 0,o}}return n};return r(t,0)},Tde=Ho("AsyncFunction"),Rde=t=>t&&(kb(t)||Ci(t))&&Ci(t.then)&&Ci(t.catch),nL=((t,e)=>t?setImmediate:e?((r,n)=>(tl.addEventListener("message",({source:i,data:o})=>{i===tl&&o===r&&n.length&&n.shift()();},!1),i=>{n.push(i),tl.postMessage(r,"*");}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",Ci(tl.postMessage)),xde=typeof queueMicrotask!="undefined"?queueMicrotask.bind(tl):typeof N!="undefined"&&N.nextTick||nL,me={isArray:Od,isArrayBuffer:JD,isBuffer:Vfe,isFormData:ede,isArrayBufferView:Gfe,isString:Kfe,isNumber:XD,isBoolean:Wfe,isObject:kb,isPlainObject:Mb,isReadableStream:rde,isRequest:nde,isResponse:ide,isHeaders:ode,isUndefined:mm,isDate:Yfe,isFile:Zfe,isBlob:Jfe,isRegExp:vde,isFunction:Ci,isStream:Qfe,isURLSearchParams:tde,isTypedArray:hde,isFileList:Xfe,forEach:ym,merge:D2,extend:sde,trim:ade,stripBOM:cde,inherits:ude,toFlatObject:lde,kindOf:Ob,kindOfTest:Ho,endsWith:fde,toArray:dde,forEachEntry:pde,matchAll:mde,isHTMLForm:yde,hasOwnProperty:YD,hasOwnProp:YD,reduceDescriptors:tL,freezeMethods:bde,toObjectSet:wde,toCamelCase:gde,noop:Ede,toFiniteNumber:_de,findKey:QD,global:tl,isContextDefined:eL,ALPHABET:rL,generateString:Sde,isSpecCompliantForm:Cde,toJSONObject:Ade,isAsyncFn:Tde,isThenable:Rde,setImmediate:nL,asap:xde};v();m();y();g();v();m();y();g();v();m();y();g();v();m();y();g();v();m();y();g();function Nd(t,e,r,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i,this.status=i.status?i.status:null);}me.inherits(Nd,Error,{toJSON:function(){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:me.toJSONObject(this.config),code:this.code,status:this.status}}});var iL=Nd.prototype,oL={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{oL[t]={value:t};});Object.defineProperties(Nd,oL);Object.defineProperty(iL,"isAxiosError",{value:!0});Nd.from=(t,e,r,n,i,o)=>{let a=Object.create(iL);return me.toFlatObject(t,a,function(c){return c!==Error.prototype},s=>s!=="isAxiosError"),Nd.call(a,t.message,e,r,n,i),a.cause=t,a.name=t.name,o&&Object.assign(a,o),a};var gt=Nd;v();m();y();g();var Pb=null;function q2(t){return me.isPlainObject(t)||me.isArray(t)}function sL(t){return me.endsWith(t,"[]")?t.slice(0,-2):t}function aL(t,e,r){return t?t.concat(e).map(function(i,o){return i=sL(i),!r&&o?"["+i+"]":i}).join(r?".":""):e}function Ide(t){return me.isArray(t)&&!t.some(q2)}var Mde=me.toFlatObject(me,{},null,function(e){return /^is[A-Z]/.test(e)});function Ode(t,e,r){if(!me.isObject(t))throw new TypeError("target must be an object");e=e||new(FormData),r=me.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(k,q){return !me.isUndefined(q[k])});let n=r.metaTokens,i=r.visitor||l,o=r.dots,a=r.indexes,c=(r.Blob||typeof Blob!="undefined"&&Blob)&&me.isSpecCompliantForm(e);if(!me.isFunction(i))throw new TypeError("visitor must be a function");function u(I){if(I===null)return "";if(me.isDate(I))return I.toISOString();if(!c&&me.isBlob(I))throw new gt("Blob is not supported. Use a Buffer instead.");return me.isArrayBuffer(I)||me.isTypedArray(I)?c&&typeof Blob=="function"?new Blob([I]):D.Buffer.from(I):I}function l(I,k,q){let j=I;if(I&&!q&&typeof I=="object"){if(me.endsWith(k,"{}"))k=n?k:k.slice(0,-2),I=JSON.stringify(I);else if(me.isArray(I)&&Ide(I)||(me.isFileList(I)||me.endsWith(k,"[]"))&&(j=me.toArray(I)))return k=sL(k),j.forEach(function(Z,se){!(me.isUndefined(Z)||Z===null)&&e.append(a===!0?aL([k],se,o):a===null?k:k+"[]",u(Z));}),!1}return q2(I)?!0:(e.append(aL(q,k,o),u(I)),!1)}let w=[],T=Object.assign(Mde,{defaultVisitor:l,convertValue:u,isVisitable:q2});function x(I,k){if(!me.isUndefined(I)){if(w.indexOf(I)!==-1)throw Error("Circular reference detected in "+k.join("."));w.push(I),me.forEach(I,function(j,K){(!(me.isUndefined(j)||j===null)&&i.call(e,j,me.isString(K)?K.trim():K,k,T))===!0&&x(j,k?k.concat(K):[K]);}),w.pop();}}if(!me.isObject(t))throw new TypeError("data must be an object");return x(t),e}var yc=Ode;function cL(t){let e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function uL(t,e){this._pairs=[],t&&yc(t,this,e);}var lL=uL.prototype;lL.append=function(e,r){this._pairs.push([e,r]);};lL.toString=function(e){let r=e?function(n){return e.call(this,n,cL)}:cL;return this._pairs.map(function(i){return r(i[0])+"="+r(i[1])},"").join("&")};var Bb=uL;function Nde(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function gm(t,e,r){if(!e)return t;let n=r&&r.encode||Nde,i=r&&r.serialize,o;if(i?o=i(e,r):o=me.isURLSearchParams(e)?e.toString():new Bb(e,r).toString(n),o){let a=t.indexOf("#");a!==-1&&(t=t.slice(0,a)),t+=(t.indexOf("?")===-1?"?":"&")+o;}return t}v();m();y();g();var F2=class{constructor(){this.handlers=[];}use(e,r,n){return this.handlers.push({fulfilled:e,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null);}clear(){this.handlers&&(this.handlers=[]);}forEach(e){me.forEach(this.handlers,function(n){n!==null&&e(n);});}},z2=F2;v();m();y();g();v();m();y();g();v();m();y();g();v();m();y();g();var Ub={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};v();m();y();g();v();m();y();g();v();m();y();g();v();m();y();g();var fL=typeof URLSearchParams!="undefined"?URLSearchParams:Bb;v();m();y();g();var dL=typeof FormData!="undefined"?FormData:null;v();m();y();g();var hL=typeof Blob!="undefined"?Blob:null;var pL={isBrowser:!0,classes:{URLSearchParams:fL,FormData:dL,Blob:hL},protocols:["http","https","file","blob","url","data"]};var $2={};Cr($2,{hasBrowserEnv:()=>j2,hasStandardBrowserEnv:()=>kde,hasStandardBrowserWebWorkerEnv:()=>Pde,navigator:()=>H2,origin:()=>Bde});v();m();y();g();var j2=typeof window!="undefined"&&typeof document!="undefined",H2=typeof navigator=="object"&&navigator||void 0,kde=j2&&(!H2||["ReactNative","NativeScript","NS"].indexOf(H2.product)<0),Pde=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Bde=j2&&window.location.href||"http://localhost";var Fr=oe(oe({},$2),pL);function V2(t,e){return yc(t,new Fr.classes.URLSearchParams,Object.assign({visitor:function(r,n,i,o){return Fr.isNode&&me.isBuffer(r)?(this.append(n,r.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},e))}v();m();y();g();function Ude(t){return me.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function Dde(t){let e={},r=Object.keys(t),n,i=r.length,o;for(n=0;n<i;n++)o=r[n],e[o]=t[o];return e}function Lde(t){function e(r,n,i,o){let a=r[o++];if(a==="__proto__")return !0;let s=Number.isFinite(+a),c=o>=r.length;return a=!a&&me.isArray(i)?i.length:a,c?(me.hasOwnProp(i,a)?i[a]=[i[a],n]:i[a]=n,!s):((!i[a]||!me.isObject(i[a]))&&(i[a]=[]),e(r,n,i[a],o)&&me.isArray(i[a])&&(i[a]=Dde(i[a])),!s)}if(me.isFormData(t)&&me.isFunction(t.entries)){let r={};return me.forEachEntry(t,(n,i)=>{e(Ude(n),i,r,0);}),r}return null}var Db=Lde;function qde(t,e,r){if(me.isString(t))try{return (e||JSON.parse)(t),me.trim(t)}catch(n){if(n.name!=="SyntaxError")throw n}return (0, JSON.stringify)(t)}var G2={transitional:Ub,adapter:["xhr","http","fetch"],transformRequest:[function(e,r){let n=r.getContentType()||"",i=n.indexOf("application/json")>-1,o=me.isObject(e);if(o&&me.isHTMLForm(e)&&(e=new FormData(e)),me.isFormData(e))return i?JSON.stringify(Db(e)):e;if(me.isArrayBuffer(e)||me.isBuffer(e)||me.isStream(e)||me.isFile(e)||me.isBlob(e)||me.isReadableStream(e))return e;if(me.isArrayBufferView(e))return e.buffer;if(me.isURLSearchParams(e))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let s;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return V2(e,this.formSerializer).toString();if((s=me.isFileList(e))||n.indexOf("multipart/form-data")>-1){let c=this.env&&this.env.FormData;return yc(s?{"files[]":e}:e,c&&new c,this.formSerializer)}}return o||i?(r.setContentType("application/json",!1),qde(e)):e}],transformResponse:[function(e){let r=this.transitional||G2.transitional,n=r&&r.forcedJSONParsing,i=this.responseType==="json";if(me.isResponse(e)||me.isReadableStream(e))return e;if(e&&me.isString(e)&&(n&&!this.responseType||i)){let a=!(r&&r.silentJSONParsing)&&i;try{return JSON.parse(e)}catch(s){if(a)throw s.name==="SyntaxError"?gt.from(s,gt.ERR_BAD_RESPONSE,this,null,this.response):s}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Fr.classes.FormData,Blob:Fr.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};me.forEach(["delete","get","head","post","put","patch"],t=>{G2.headers[t]={};});var kd=G2;v();m();y();g();v();m();y();g();var Fde=me.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"]),mL=t=>{let e={},r,n,i;return t&&t.split(`
`).forEach(function(a){i=a.indexOf(":"),r=a.substring(0,i).trim().toLowerCase(),n=a.substring(i+1).trim(),!(!r||e[r]&&Fde[r])&&(r==="set-cookie"?e[r]?e[r].push(n):e[r]=[n]:e[r]=e[r]?e[r]+", "+n:n);}),e};var yL=Symbol("internals");function vm(t){return t&&String(t).trim().toLowerCase()}function Lb(t){return t===!1||t==null?t:me.isArray(t)?t.map(Lb):String(t)}function zde(t){let e=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,n;for(;n=r.exec(t);)e[n[1]]=n[2];return e}var Hde=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function K2(t,e,r,n,i){if(me.isFunction(n))return n.call(this,e,r);if(i&&(e=r),!!me.isString(e)){if(me.isString(n))return e.indexOf(n)!==-1;if(me.isRegExp(n))return n.test(e)}}function jde(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,r,n)=>r.toUpperCase()+n)}function $de(t,e){let r=me.toCamelCase(" "+e);["get","set","has"].forEach(n=>{Object.defineProperty(t,n+r,{value:function(i,o,a){return this[n].call(this,e,i,o,a)},configurable:!0});});}var Pd=class{constructor(e){e&&this.set(e);}set(e,r,n){let i=this;function o(s,c,u){let l=vm(c);if(!l)throw new Error("header name must be a non-empty string");let w=me.findKey(i,l);(!w||i[w]===void 0||u===!0||u===void 0&&i[w]!==!1)&&(i[w||c]=Lb(s));}let a=(s,c)=>me.forEach(s,(u,l)=>o(u,l,c));if(me.isPlainObject(e)||e instanceof this.constructor)a(e,r);else if(me.isString(e)&&(e=e.trim())&&!Hde(e))a(mL(e),r);else if(me.isHeaders(e))for(let[s,c]of e.entries())o(c,s,n);else e!=null&&o(r,e,n);return this}get(e,r){if(e=vm(e),e){let n=me.findKey(this,e);if(n){let i=this[n];if(!r)return i;if(r===!0)return zde(i);if(me.isFunction(r))return r.call(this,i,n);if(me.isRegExp(r))return r.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,r){if(e=vm(e),e){let n=me.findKey(this,e);return !!(n&&this[n]!==void 0&&(!r||K2(this,this[n],n,r)))}return !1}delete(e,r){let n=this,i=!1;function o(a){if(a=vm(a),a){let s=me.findKey(n,a);s&&(!r||K2(n,n[s],s,r))&&(delete n[s],i=!0);}}return me.isArray(e)?e.forEach(o):o(e),i}clear(e){let r=Object.keys(this),n=r.length,i=!1;for(;n--;){let o=r[n];(!e||K2(this,this[o],o,e,!0))&&(delete this[o],i=!0);}return i}normalize(e){let r=this,n={};return me.forEach(this,(i,o)=>{let a=me.findKey(n,o);if(a){r[a]=Lb(i),delete r[o];return}let s=e?jde(o):String(o).trim();s!==o&&delete r[o],r[s]=Lb(i),n[s]=!0;}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let r=Object.create(null);return me.forEach(this,(n,i)=>{n!=null&&n!==!1&&(r[i]=e&&me.isArray(n)?n.join(", "):n);}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,r])=>e+": "+r).join(`
`)}get[Symbol.toStringTag](){return "AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...r){let n=new this(e);return r.forEach(i=>n.set(i)),n}static accessor(e){let n=(this[yL]=this[yL]={accessors:{}}).accessors,i=this.prototype;function o(a){let s=vm(a);n[s]||($de(i,a),n[s]=!0);}return me.isArray(e)?e.forEach(o):o(e),this}};Pd.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);me.reduceDescriptors(Pd.prototype,({value:t},e)=>{let r=e[0].toUpperCase()+e.slice(1);return {get:()=>t,set(n){this[r]=n;}}});me.freezeMethods(Pd);var en=Pd;function bm(t,e){let r=this||kd,n=e||r,i=en.from(n.headers),o=n.data;return me.forEach(t,function(s){o=s.call(r,o,i.normalize(),e?e.status:void 0);}),i.normalize(),o}v();m();y();g();function wm(t){return !!(t&&t.__CANCEL__)}v();m();y();g();function gL(t,e,r){gt.call(this,t==null?"canceled":t,gt.ERR_CANCELED,e,r),this.name="CanceledError";}me.inherits(gL,gt,{__CANCEL__:!0});var Ta=gL;v();m();y();g();v();m();y();g();v();m();y();g();function Em(t,e,r){let n=r.config.validateStatus;!r.status||!n||n(r.status)?t(r):e(new gt("Request failed with status code "+r.status,[gt.ERR_BAD_REQUEST,gt.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r));}v();m();y();g();function W2(t){let e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}v();m();y();g();v();m();y();g();function Vde(t,e){t=t||10;let r=new Array(t),n=new Array(t),i=0,o=0,a;return e=e!==void 0?e:1e3,function(c){let u=Date.now(),l=n[o];a||(a=u),r[i]=c,n[i]=u;let w=o,T=0;for(;w!==i;)T+=r[w++],w=w%t;if(i=(i+1)%t,i===o&&(o=(o+1)%t),u-a<e)return;let x=l&&u-l;return x?Math.round(T*1e3/x):void 0}}var vL=Vde;v();m();y();g();function Gde(t,e){let r=0,n=1e3/e,i,o,a=(u,l=Date.now())=>{r=l,i=null,o&&(clearTimeout(o),o=null),t.apply(null,u);};return [(...u)=>{let l=Date.now(),w=l-r;w>=n?a(u,l):(i=u,o||(o=setTimeout(()=>{o=null,a(i);},n-w)));},()=>i&&a(i)]}var bL=Gde;var Bd=(t,e,r=3)=>{let n=0,i=vL(50,250);return bL(o=>{let a=o.loaded,s=o.lengthComputable?o.total:void 0,c=a-n,u=i(c),l=a<=s;n=a;let w={loaded:a,total:s,progress:s?a/s:void 0,bytes:c,rate:u||void 0,estimated:u&&s&&l?(s-a)/u:void 0,event:o,lengthComputable:s!=null,[e?"download":"upload"]:!0};t(w);},r)},Y2=(t,e)=>{let r=t!=null;return [n=>e[0]({lengthComputable:r,total:t,loaded:n}),e[1]]},Z2=t=>(...e)=>me.asap(()=>t(...e));v();m();y();g();v();m();y();g();var wL=Fr.hasStandardBrowserEnv?function(){let e=Fr.navigator&&/(msie|trident)/i.test(Fr.navigator.userAgent),r=document.createElement("a"),n;function i(o){let a=o;return e&&(r.setAttribute("href",a),a=r.href),r.setAttribute("href",a),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return n=i(window.location.href),function(a){let s=me.isString(a)?i(a):a;return s.protocol===n.protocol&&s.host===n.host}}():function(){return function(){return !0}}();v();m();y();g();var EL=Fr.hasStandardBrowserEnv?{write(t,e,r,n,i,o){let a=[t+"="+encodeURIComponent(e)];me.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),me.isString(n)&&a.push("path="+n),me.isString(i)&&a.push("domain="+i),o===!0&&a.push("secure"),document.cookie=a.join("; ");},read(t){let e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5);}}:{write(){},read(){return null},remove(){}};v();m();y();g();v();m();y();g();function J2(t){return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}v();m();y();g();function X2(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function _m(t,e){return t&&!J2(e)?X2(t,e):e}v();m();y();g();var _L=t=>t instanceof en?oe({},t):t;function jo(t,e){e=e||{};let r={};function n(u,l,w){return me.isPlainObject(u)&&me.isPlainObject(l)?me.merge.call({caseless:w},u,l):me.isPlainObject(l)?me.merge({},l):me.isArray(l)?l.slice():l}function i(u,l,w){if(me.isUndefined(l)){if(!me.isUndefined(u))return n(void 0,u,w)}else return n(u,l,w)}function o(u,l){if(!me.isUndefined(l))return n(void 0,l)}function a(u,l){if(me.isUndefined(l)){if(!me.isUndefined(u))return n(void 0,u)}else return n(void 0,l)}function s(u,l,w){if(w in e)return n(u,l);if(w in t)return n(void 0,u)}let c={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,responseEncoding:a,validateStatus:s,headers:(u,l)=>i(_L(u),_L(l),!0)};return me.forEach(Object.keys(Object.assign({},t,e)),function(l){let w=c[l]||i,T=w(t[l],e[l],l);me.isUndefined(T)&&w!==s||(r[l]=T);}),r}var qb=t=>{let e=jo({},t),{data:r,withXSRFToken:n,xsrfHeaderName:i,xsrfCookieName:o,headers:a,auth:s}=e;e.headers=a=en.from(a),e.url=gm(_m(e.baseURL,e.url),t.params,t.paramsSerializer),s&&a.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):"")));let c;if(me.isFormData(r)){if(Fr.hasStandardBrowserEnv||Fr.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((c=a.getContentType())!==!1){let[u,...l]=c?c.split(";").map(w=>w.trim()).filter(Boolean):[];a.setContentType([u||"multipart/form-data",...l].join("; "));}}if(Fr.hasStandardBrowserEnv&&(n&&me.isFunction(n)&&(n=n(e)),n||n!==!1&&wL(e.url))){let u=i&&o&&EL.read(o);u&&a.set(i,u);}return e};var Kde=typeof XMLHttpRequest!="undefined",SL=Kde&&function(t){return new Promise(function(r,n){let i=qb(t),o=i.data,a=en.from(i.headers).normalize(),{responseType:s,onUploadProgress:c,onDownloadProgress:u}=i,l,w,T,x,I;function k(){x&&x(),I&&I(),i.cancelToken&&i.cancelToken.unsubscribe(l),i.signal&&i.signal.removeEventListener("abort",l);}let q=new XMLHttpRequest;q.open(i.method.toUpperCase(),i.url,!0),q.timeout=i.timeout;function j(){if(!q)return;let Z=en.from("getAllResponseHeaders"in q&&q.getAllResponseHeaders()),ce={data:!s||s==="text"||s==="json"?q.responseText:q.response,status:q.status,statusText:q.statusText,headers:Z,config:t,request:q};Em(function(pe){r(pe),k();},function(pe){n(pe),k();},ce),q=null;}"onloadend"in q?q.onloadend=j:q.onreadystatechange=function(){!q||q.readyState!==4||q.status===0&&!(q.responseURL&&q.responseURL.indexOf("file:")===0)||setTimeout(j);},q.onabort=function(){q&&(n(new gt("Request aborted",gt.ECONNABORTED,t,q)),q=null);},q.onerror=function(){n(new gt("Network Error",gt.ERR_NETWORK,t,q)),q=null;},q.ontimeout=function(){let se=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded",ce=i.transitional||Ub;i.timeoutErrorMessage&&(se=i.timeoutErrorMessage),n(new gt(se,ce.clarifyTimeoutError?gt.ETIMEDOUT:gt.ECONNABORTED,t,q)),q=null;},o===void 0&&a.setContentType(null),"setRequestHeader"in q&&me.forEach(a.toJSON(),function(se,ce){q.setRequestHeader(ce,se);}),me.isUndefined(i.withCredentials)||(q.withCredentials=!!i.withCredentials),s&&s!=="json"&&(q.responseType=i.responseType),u&&([T,I]=Bd(u,!0),q.addEventListener("progress",T)),c&&q.upload&&([w,x]=Bd(c),q.upload.addEventListener("progress",w),q.upload.addEventListener("loadend",x)),(i.cancelToken||i.signal)&&(l=Z=>{q&&(n(!Z||Z.type?new Ta(null,t,q):Z),q.abort(),q=null);},i.cancelToken&&i.cancelToken.subscribe(l),i.signal&&(i.signal.aborted?l():i.signal.addEventListener("abort",l)));let K=W2(i.url);if(K&&Fr.protocols.indexOf(K)===-1){n(new gt("Unsupported protocol "+K+":",gt.ERR_BAD_REQUEST,t));return}q.send(o||null);})};v();m();y();g();v();m();y();g();var Wde=(t,e)=>{let{length:r}=t=t?t.filter(Boolean):[];if(e||r){let n=new AbortController,i,o=function(u){if(!i){i=!0,s();let l=u instanceof Error?u:this.reason;n.abort(l instanceof gt?l:new Ta(l instanceof Error?l.message:l));}},a=e&&setTimeout(()=>{a=null,o(new gt(`timeout ${e} of ms exceeded`,gt.ETIMEDOUT));},e),s=()=>{t&&(a&&clearTimeout(a),a=null,t.forEach(u=>{u.unsubscribe?u.unsubscribe(o):u.removeEventListener("abort",o);}),t=null);};t.forEach(u=>u.addEventListener("abort",o));let{signal:c}=n;return c.unsubscribe=()=>me.asap(s),c}},CL=Wde;v();m();y();g();var Yde=function*(t,e){let r=t.byteLength;if(r<e){yield t;return}let n=0,i;for(;n<r;)i=n+e,yield t.slice(n,i),n=i;},Zde=function(t,e){return Mw(this,null,function*(){try{for(var r=H0(Jde(t)),n,i,o;n=!(i=yield new $c(r.next())).done;n=!1){let a=i.value;yield*Ow(Yde(a,e));}}catch(i){o=[i];}finally{try{n&&(i=r.return)&&(yield new $c(i.call(r)));}finally{if(o)throw o[0]}}})},Jde=function(t){return Mw(this,null,function*(){if(t[Symbol.asyncIterator]){yield*Ow(t);return}let e=t.getReader();try{for(;;){let{done:r,value:n}=yield new $c(e.read());if(r)break;yield n;}}finally{yield new $c(e.cancel());}})},Q2=(t,e,r,n)=>{let i=Zde(t,e),o=0,a,s=u=>{a||(a=!0,n&&n(u));};return new ReadableStream({pull(u){return re(this,null,function*(){try{let{done:l,value:w}=yield i.next();if(l){s(),u.close();return}let T=w.byteLength;if(r){let x=o+=T;r(x);}u.enqueue(new Uint8Array(w));}catch(l){throw s(l),l}})},cancel(u){return s(u),i.return()}},{highWaterMark:2})};var zb=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",TL=zb&&typeof ReadableStream=="function",Xde=zb&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):t=>re(void 0,null,function*(){return new Uint8Array(yield new Response(t).arrayBuffer())})),RL=(t,...e)=>{try{return !!t(...e)}catch(r){return !1}},Qde=TL&&RL(()=>{let t=!1,e=new Request(Fr.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),AL=64*1024,eT=TL&&RL(()=>me.isReadableStream(new Response("").body)),Fb={stream:eT&&(t=>t.body)};zb&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!Fb[e]&&(Fb[e]=me.isFunction(t[e])?r=>r[e]():(r,n)=>{throw new gt(`Response type '${e}' is not supported`,gt.ERR_NOT_SUPPORT,n)});});})(new Response);var ehe=t=>re(void 0,null,function*(){if(t==null)return 0;if(me.isBlob(t))return t.size;if(me.isSpecCompliantForm(t))return (yield new Request(Fr.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(me.isArrayBufferView(t)||me.isArrayBuffer(t))return t.byteLength;if(me.isURLSearchParams(t)&&(t=t+""),me.isString(t))return (yield Xde(t)).byteLength}),the=(t,e)=>re(void 0,null,function*(){let r=me.toFiniteNumber(t.getContentLength());return r==null?ehe(e):r}),xL=zb&&(t=>re(void 0,null,function*(){let{url:e,method:r,data:n,signal:i,cancelToken:o,timeout:a,onDownloadProgress:s,onUploadProgress:c,responseType:u,headers:l,withCredentials:w="same-origin",fetchOptions:T}=qb(t);u=u?(u+"").toLowerCase():"text";let x=CL([i,o&&o.toAbortSignal()],a),I,k=x&&x.unsubscribe&&(()=>{x.unsubscribe();}),q;try{if(c&&Qde&&r!=="get"&&r!=="head"&&(q=yield the(l,n))!==0){let ce=new Request(e,{method:"POST",body:n,duplex:"half"}),Te;if(me.isFormData(n)&&(Te=ce.headers.get("content-type"))&&l.setContentType(Te),ce.body){let[pe,le]=Y2(q,Bd(Z2(c)));n=Q2(ce.body,AL,pe,le);}}me.isString(w)||(w=w?"include":"omit");let j="credentials"in Request.prototype;I=new Request(e,Me(oe({},T),{signal:x,method:r.toUpperCase(),headers:l.normalize().toJSON(),body:n,duplex:"half",credentials:j?w:void 0}));let K=yield fetch(I),Z=eT&&(u==="stream"||u==="response");if(eT&&(s||Z&&k)){let ce={};["status","statusText","headers"].forEach(Y=>{ce[Y]=K[Y];});let Te=me.toFiniteNumber(K.headers.get("content-length")),[pe,le]=s&&Y2(Te,Bd(Z2(s),!0))||[];K=new Response(Q2(K.body,AL,pe,()=>{le&&le(),k&&k();}),ce);}u=u||"text";let se=yield Fb[me.findKey(Fb,u)||"text"](K,t);return !Z&&k&&k(),yield new Promise((ce,Te)=>{Em(ce,Te,{data:se,headers:en.from(K.headers),status:K.status,statusText:K.statusText,config:t,request:I});})}catch(j){throw k&&k(),j&&j.name==="TypeError"&&/fetch/i.test(j.message)?Object.assign(new gt("Network Error",gt.ERR_NETWORK,t,I),{cause:j.cause||j}):gt.from(j,j&&j.code,t,I)}}));var tT={http:Pb,xhr:SL,fetch:xL};me.forEach(tT,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e});}catch(r){}Object.defineProperty(t,"adapterName",{value:e});}});var IL=t=>`- ${t}`,rhe=t=>me.isFunction(t)||t===null||t===!1,Hb={getAdapter:t=>{t=me.isArray(t)?t:[t];let{length:e}=t,r,n,i={};for(let o=0;o<e;o++){r=t[o];let a;if(n=r,!rhe(r)&&(n=tT[(a=String(r)).toLowerCase()],n===void 0))throw new gt(`Unknown adapter '${a}'`);if(n)break;i[a||"#"+o]=n;}if(!n){let o=Object.entries(i).map(([s,c])=>`adapter ${s} `+(c===!1?"is not supported by the environment":"is not available in the build")),a=e?o.length>1?`since :
`+o.map(IL).join(`
`):" "+IL(o[0]):"as no adapter specified";throw new gt("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return n},adapters:tT};function rT(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Ta(null,t)}function jb(t){return rT(t),t.headers=en.from(t.headers),t.data=bm.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Hb.getAdapter(t.adapter||kd.adapter)(t).then(function(n){return rT(t),n.data=bm.call(t,t.transformResponse,n),n.headers=en.from(n.headers),n},function(n){return wm(n)||(rT(t),n&&n.response&&(n.response.data=bm.call(t,t.transformResponse,n.response),n.response.headers=en.from(n.response.headers))),Promise.reject(n)})}v();m();y();g();v();m();y();g();var $b="1.7.7";var nT={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{nT[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t};});var ML={};nT.transitional=function(e,r,n){function i(o,a){return "[Axios v"+$b+"] Transitional option '"+o+"'"+a+(n?". "+n:"")}return (o,a,s)=>{if(e===!1)throw new gt(i(a," has been removed"+(r?" in "+r:"")),gt.ERR_DEPRECATED);return r&&!ML[a]&&(ML[a]=!0,console.warn(i(a," has been deprecated since v"+r+" and will be removed in the near future"))),e?e(o,a,s):!0}};function nhe(t,e,r){if(typeof t!="object")throw new gt("options must be an object",gt.ERR_BAD_OPTION_VALUE);let n=Object.keys(t),i=n.length;for(;i-- >0;){let o=n[i],a=e[o];if(a){let s=t[o],c=s===void 0||a(s,o,t);if(c!==!0)throw new gt("option "+o+" must be "+c,gt.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new gt("Unknown option "+o,gt.ERR_BAD_OPTION)}}var Vb={assertOptions:nhe,validators:nT};var gc=Vb.validators,Ud=class{constructor(e){this.defaults=e,this.interceptors={request:new z2,response:new z2};}request(e,r){return re(this,null,function*(){try{return yield this._request(e,r)}catch(n){if(n instanceof Error){let i;Error.captureStackTrace?Error.captureStackTrace(i={}):i=new Error;let o=i.stack?i.stack.replace(/^.+\n/,""):"";try{n.stack?o&&!String(n.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(n.stack+=`
`+o):n.stack=o;}catch(a){}}throw n}})}_request(e,r){typeof e=="string"?(r=r||{},r.url=e):r=e||{},r=jo(this.defaults,r);let{transitional:n,paramsSerializer:i,headers:o}=r;n!==void 0&&Vb.assertOptions(n,{silentJSONParsing:gc.transitional(gc.boolean),forcedJSONParsing:gc.transitional(gc.boolean),clarifyTimeoutError:gc.transitional(gc.boolean)},!1),i!=null&&(me.isFunction(i)?r.paramsSerializer={serialize:i}:Vb.assertOptions(i,{encode:gc.function,serialize:gc.function},!0)),r.method=(r.method||this.defaults.method||"get").toLowerCase();let a=o&&me.merge(o.common,o[r.method]);o&&me.forEach(["delete","get","head","post","put","patch","common"],I=>{delete o[I];}),r.headers=en.concat(a,o);let s=[],c=!0;this.interceptors.request.forEach(function(k){typeof k.runWhen=="function"&&k.runWhen(r)===!1||(c=c&&k.synchronous,s.unshift(k.fulfilled,k.rejected));});let u=[];this.interceptors.response.forEach(function(k){u.push(k.fulfilled,k.rejected);});let l,w=0,T;if(!c){let I=[jb.bind(this),void 0];for(I.unshift.apply(I,s),I.push.apply(I,u),T=I.length,l=Promise.resolve(r);w<T;)l=l.then(I[w++],I[w++]);return l}T=s.length;let x=r;for(w=0;w<T;){let I=s[w++],k=s[w++];try{x=I(x);}catch(q){k.call(this,q);break}}try{l=jb.call(this,x);}catch(I){return Promise.reject(I)}for(w=0,T=u.length;w<T;)l=l.then(u[w++],u[w++]);return l}getUri(e){e=jo(this.defaults,e);let r=_m(e.baseURL,e.url);return gm(r,e.params,e.paramsSerializer)}};me.forEach(["delete","get","head","options"],function(e){Ud.prototype[e]=function(r,n){return this.request(jo(n||{},{method:e,url:r,data:(n||{}).data}))};});me.forEach(["post","put","patch"],function(e){function r(n){return function(o,a,s){return this.request(jo(s||{},{method:e,headers:n?{"Content-Type":"multipart/form-data"}:{},url:o,data:a}))}}Ud.prototype[e]=r(),Ud.prototype[e+"Form"]=r(!0);});var Sm=Ud;v();m();y();g();var iT=class t{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(o){r=o;});let n=this;this.promise.then(i=>{if(!n._listeners)return;let o=n._listeners.length;for(;o-- >0;)n._listeners[o](i);n._listeners=null;}),this.promise.then=i=>{let o,a=new Promise(s=>{n.subscribe(s),o=s;}).then(i);return a.cancel=function(){n.unsubscribe(o);},a},e(function(o,a,s){n.reason||(n.reason=new Ta(o,a,s),r(n.reason));});}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e];}unsubscribe(e){if(!this._listeners)return;let r=this._listeners.indexOf(e);r!==-1&&this._listeners.splice(r,1);}toAbortSignal(){let e=new AbortController,r=n=>{e.abort(n);};return this.subscribe(r),e.signal.unsubscribe=()=>this.unsubscribe(r),e.signal}static source(){let e;return {token:new t(function(i){e=i;}),cancel:e}}},OL=iT;v();m();y();g();function oT(t){return function(r){return t.apply(null,r)}}v();m();y();g();function aT(t){return me.isObject(t)&&t.isAxiosError===!0}v();m();y();g();var sT={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};Object.entries(sT).forEach(([t,e])=>{sT[e]=t;});var NL=sT;function kL(t){let e=new Sm(t),r=pm(Sm.prototype.request,e);return me.extend(r,Sm.prototype,e,{allOwnKeys:!0}),me.extend(r,e,null,{allOwnKeys:!0}),r.create=function(i){return kL(jo(t,i))},r}var Vr=kL(kd);Vr.Axios=Sm;Vr.CanceledError=Ta;Vr.CancelToken=OL;Vr.isCancel=wm;Vr.VERSION=$b;Vr.toFormData=yc;Vr.AxiosError=gt;Vr.Cancel=Vr.CanceledError;Vr.all=function(e){return Promise.all(e)};Vr.spread=oT;Vr.isAxiosError=aT;Vr.mergeConfig=jo;Vr.AxiosHeaders=en;Vr.formToJSON=t=>Db(me.isHTMLForm(t)?new FormData(t):t);Vr.getAdapter=Hb.getAdapter;Vr.HttpStatusCode=NL;Vr.default=Vr;var Gb=Vr;var ohe=t=>{var i;let{http:e,https:r}=(i=t==null?void 0:t.agentSettings)!=null?i:{http:void 0,https:void 0},n=Gb.create({httpAgent:e,httpsAgent:r,validateStatus:()=>!0});return (o,a)=>re(void 0,null,function*(){let s=lr().parse(o),{body:c,headers:u}=lo({body:lr(),headers:el(lr()).optional()}).parse(a),l=yield n.post(s,c,{headers:u});return {status:l.status,json:()=>l.data}})},Kb=class{constructor(e,r,n,i){this.credentialsFactory=e;this.loginEndpoint=r;this.botFrameworkClientFetch=n;this.connectorClientOptions=i;(this.botFrameworkClientFetch)!=null||(this.botFrameworkClientFetch=ohe(this.connectorClientOptions)),Qt(typeof this.botFrameworkClientFetch=="function");}toJSON(){let n=this;return Ns(n,["connectorClientOptions"])}postActivity(e,r,n,i,o,a){return re(this,null,function*(){lo({fromBotId:lr().optional(),toBotId:lr().optional(),toUrl:lr(),serviceUrl:lr(),conversationId:lr(),activity:el(Md())}).parse({fromBotId:e,toBotId:r,toUrl:n,serviceUrl:i,conversationId:o,activity:a});let s=yield this.credentialsFactory.createCredentials(e,r,this.loginEndpoint,!0),c=a.conversation.id,u=a.serviceUrl,l=a.relatesTo,w=a.recipient;try{a.relatesTo={serviceUrl:a.serviceUrl,activityId:a.id,channelId:a.channelId,conversation:{id:a.conversation.id,name:a.conversation.name,conversationType:a.conversation.conversationType,aadObjectId:a.conversation.aadObjectId,isGroup:a.conversation.isGroup,properties:a.conversation.properties,role:a.conversation.role,tenantId:a.conversation.tenantId},bot:null},a.conversation.id=o,a.serviceUrl=i,a.recipient||(a.recipient={}),a.recipient.role=u$e.RoleTypes.Skill;let T=new uc(n,"POST",JSON.stringify(a),void 0,{Accept:"application/json",[Jp]:o,"Content-Type":"application/json","User-Agent":Cb}),x=yield s.signRequest(T),I={body:x.body,headers:x.headers.rawHeaders()},k=yield this.botFrameworkClientFetch(x.url,I);return {status:k.status,body:yield k.json()}}finally{a.conversation.id=c,a.serviceUrl=u,a.relatesTo=l,a.recipient=w;}})}};v();m();y();g();v();m();y();g();var PL={};v();m();y();g();v();m();y();g();var BL={serializedName:"TokenExchangeResource",type:{name:"Composite",className:"TokenExchangeResource",modelProperties:{id:{serializedName:"id",type:{name:"String"}},uri:{serializedName:"uri",type:{name:"String"}},providerId:{serializedName:"providerId",type:{name:"String"}}}}},Wb={serializedName:"SignInUrlResponse",type:{name:"Composite",className:"SignInUrlResponse",modelProperties:{signInLink:{serializedName:"signInLink",type:{name:"String"}},tokenExchangeResource:{serializedName:"tokenExchangeResource",type:{name:"Composite",className:"TokenExchangeResource"}}}}},rl={serializedName:"TokenResponse",type:{name:"Composite",className:"TokenResponse",modelProperties:{channelId:{serializedName:"channelId",type:{name:"String"}},connectionName:{serializedName:"connectionName",type:{name:"String"}},token:{serializedName:"token",type:{name:"String"}},expiration:{serializedName:"expiration",type:{name:"String"}}}}},UL={serializedName:"InnerHttpError",type:{name:"Composite",className:"InnerHttpError",modelProperties:{statusCode:{serializedName:"statusCode",type:{name:"Number"}},body:{serializedName:"body",type:{name:"Object"}}}}},DL={serializedName:"Error",type:{name:"Composite",className:"ErrorModel",modelProperties:{code:{serializedName:"code",type:{name:"String"}},message:{serializedName:"message",type:{name:"String"}},innerHttpError:{serializedName:"innerHttpError",type:{name:"Composite",className:"InnerHttpError"}}}}},ys={serializedName:"ErrorResponse",type:{name:"Composite",className:"ErrorResponse",modelProperties:{error:{serializedName:"error",type:{name:"Composite",className:"ErrorModel"}}}}},Yb={serializedName:"AadResourceUrls",type:{name:"Composite",className:"AadResourceUrls",modelProperties:{resourceUrls:{serializedName:"resourceUrls",type:{name:"Sequence",element:{type:{name:"String"}}}}}}},LL={serializedName:"TokenStatus",type:{name:"Composite",className:"TokenStatus",modelProperties:{channelId:{serializedName:"channelId",type:{name:"String"}},connectionName:{serializedName:"connectionName",type:{name:"String"}},hasToken:{serializedName:"hasToken",type:{name:"Boolean"}},serviceProviderDisplayName:{serializedName:"serviceProviderDisplayName",type:{name:"String"}}}}},Zb={serializedName:"TokenExchangeRequest",type:{name:"Composite",className:"TokenExchangeRequest",modelProperties:{uri:{serializedName:"uri",type:{name:"String"}},token:{serializedName:"token",type:{name:"String"}}}}};v();m();y();g();v();m();y();g();var cT={};Cr(cT,{SignInUrlResponse:()=>Wb,TokenExchangeResource:()=>BL});v();m();y();g();v();m();y();g();var Cm={parameterPath:["options","channelId"],mapper:{serializedName:"channelId",type:{name:"String"}}},qL={parameterPath:"channelId",mapper:{required:!0,serializedName:"channelId",type:{name:"String"}}},FL={parameterPath:["options","code"],mapper:{serializedName:"code",type:{name:"String"}}},uT={parameterPath:["options","codeChallenge"],mapper:{serializedName:"code_challenge",type:{name:"String"}}},Jb={parameterPath:"connectionName",mapper:{required:!0,serializedName:"connectionName",type:{name:"String"}}},zL={parameterPath:["options","connectionName"],mapper:{serializedName:"connectionName",type:{name:"String"}}},lT={parameterPath:["options","emulatorUrl"],mapper:{serializedName:"emulatorUrl",type:{name:"String"}}},fT={parameterPath:["options","finalRedirect"],mapper:{serializedName:"finalRedirect",type:{name:"String"}}},HL={parameterPath:["options","include"],mapper:{serializedName:"include",type:{name:"String"}}},dT={parameterPath:"state",mapper:{required:!0,serializedName:"state",type:{name:"String"}}},Dd={parameterPath:"userId",mapper:{required:!0,serializedName:"userId",type:{name:"String"}}};var Xb=class{constructor(e){this.client=e;}getSignInUrl(e,r,n){return this.client.sendOperationRequest({state:e,options:r},she,n)}getSignInResource(e,r,n){return this.client.sendOperationRequest({state:e,options:r},che,n)}},$L=new Ln(cT),she={httpMethod:"GET",path:"api/botsignin/GetSignInUrl",queryParameters:[dT,uT,lT,fT],responses:{200:{bodyMapper:{serializedName:"parsedResponse",type:{name:"String"}}},default:{}},serializer:$L},che={httpMethod:"GET",path:"api/botsignin/GetSignInResource",queryParameters:[dT,uT,lT,fT],responses:{200:{bodyMapper:Wb},default:{}},serializer:$L};v();m();y();g();var hT={};Cr(hT,{AadResourceUrls:()=>Yb,ErrorModel:()=>DL,ErrorResponse:()=>ys,InnerHttpError:()=>UL,TokenExchangeRequest:()=>Zb,TokenResponse:()=>rl,TokenStatus:()=>LL});v();m();y();g();var Qb=class{constructor(e){this.client=e;}getToken(e,r,n,i){return this.client.sendOperationRequest({userId:e,connectionName:r,options:n},uhe,i)}getAadTokens(e,r,n,i,o){return this.client.sendOperationRequest({userId:e,connectionName:r,aadResourceUrls:n,options:i},lhe,o)}signOut(e,r,n){return this.client.sendOperationRequest({userId:e,options:r},fhe,n)}getTokenStatus(e,r,n){return this.client.sendOperationRequest({userId:e,options:r},dhe,n)}exchangeAsync(e,r,n,i,o,a){return this.client.sendOperationRequest({userId:e,connectionName:r,channelId:n,exchangeRequest:i,options:o},hhe,a)}},Am=new Ln(hT),uhe={httpMethod:"GET",path:"api/usertoken/GetToken",queryParameters:[Dd,Jb,Cm,FL],responses:{200:{bodyMapper:rl},404:{bodyMapper:rl},default:{bodyMapper:ys}},serializer:Am},lhe={httpMethod:"POST",path:"api/usertoken/GetAadTokens",queryParameters:[Dd,Jb,Cm],requestBody:{parameterPath:"aadResourceUrls",mapper:Me(oe({},Yb),{required:!0})},responses:{200:{bodyMapper:{serializedName:"parsedResponse",type:{name:"Dictionary",value:{type:{name:"Composite",className:"TokenResponse"}}}}},default:{bodyMapper:ys}},serializer:Am},fhe={httpMethod:"DELETE",path:"api/usertoken/SignOut",queryParameters:[Dd,zL,Cm],responses:{200:{bodyMapper:{serializedName:"parsedResponse",type:{name:"Object"}}},204:{},default:{bodyMapper:ys}},serializer:Am},dhe={httpMethod:"GET",path:"api/usertoken/GetTokenStatus",queryParameters:[Dd,Cm,HL],responses:{200:{bodyMapper:{serializedName:"parsedResponse",type:{name:"Sequence",element:{type:{name:"Composite",className:"TokenStatus"}}}}},default:{bodyMapper:ys}},serializer:Am},hhe={httpMethod:"POST",path:"api/usertoken/exchange",queryParameters:[Dd,Jb,qL],requestBody:{parameterPath:"exchangeRequest",mapper:Me(oe({},Zb),{required:!0})},responses:{200:{bodyMapper:rl},400:{bodyMapper:ys},404:{bodyMapper:rl},default:{bodyMapper:ys}},serializer:Am};v();m();y();g();var mhe="botframework-Token",yhe="4.0.0",e1=class extends ds{toJSON(){return {name:this.constructor.name}}constructor(e,r){if(e==null)throw new Error("'credentials' cannot be null.");r||(r={});let n=Ca();r.userAgent=`${mhe}/${yhe} ${n} ${r.userAgent||""}`,super(e,r),this.baseUri=r.baseUri||this.baseUri||"https://token.botframework.com",this.requestContentType="application/json; charset=utf-8",this.credentials=e;}};var Tm=class extends e1{constructor(e,r){super(e,r),this.botSignIn=new Xb(this),this.userToken=new Qb(this);}};v();m();y();g();var Rm=class{static createTokenExchangeState(e,r,n){lo({appId:lr(),connectionName:lr(),activity:el(Md())}).parse({appId:e,connectionName:r,activity:n});let i={connectionName:r,conversation:u$e.ActivityEx.getConversationReference(n),relatesTo:n.relatesTo,msAppId:e};return D.Buffer.from(JSON.stringify(i)).toString("base64")}};var t1=class extends Rm{constructor(r,n,i,o={}){super();this.appId=r;this.client=new Tm(n,Object.assign({baseUri:i},o));}getUserToken(r,n,i,o){return re(this,null,function*(){return lo({userId:lr(),connectionName:lr(),channelId:lr()}).parse({userId:r,connectionName:n,channelId:i}),(yield this.client.userToken.getToken(r,n,{channelId:i,code:o}))._response.parsedBody})}getSignInResource(r,n,i){return re(this,null,function*(){return lo({activity:el(Md()),connectionName:lr()}).parse({activity:n,connectionName:r}),(yield this.client.botSignIn.getSignInResource(Rm.createTokenExchangeState(this.appId,r,n),{finalRedirect:i}))._response.parsedBody})}signOutUser(r,n,i){return re(this,null,function*(){lo({userId:lr(),connectionName:lr(),channelId:lr()}).parse({userId:r,connectionName:n,channelId:i}),yield this.client.userToken.signOut(r,{channelId:i,connectionName:n});})}getTokenStatus(r,n,i){return re(this,null,function*(){return lo({userId:lr(),channelId:lr()}).parse({userId:r,channelId:n}),(yield this.client.userToken.getTokenStatus(r,{channelId:n,include:i}))._response.parsedBody})}getAadTokens(r,n,i,o){return re(this,null,function*(){return lo({userId:lr(),connectionName:lr(),channelId:lr()}).parse({userId:r,connectionName:n,channelId:o}),(yield this.client.userToken.getAadTokens(r,n,{resourceUrls:i},{channelId:o}))._response.parsedBody})}exchangeToken(r,n,i,o){return re(this,null,function*(){return lo({userId:lr(),connectionName:lr(),channelId:lr()}).parse({userId:r,connectionName:n,channelId:i}),(yield this.client.userToken.exchangeAsync(r,n,i,o))._response.parsedBody})}};function pT(t){var e,r;return (r=(e=t.getClaimValue(exports.AuthenticationConstants.AudienceClaim))!=null?e:t.getClaimValue(exports.AuthenticationConstants.AppIdClaim))!=null?r:void 0}var Ld=class extends db{constructor(r,n,i,o,a,s,c,u,l,w,T,x={}){super();this.validateAuthority=r;this.toChannelFromBotLoginUrl=n;this.toChannelFromBotOAuthScope=i;this.toBotFromChannelTokenIssuer=o;this.oAuthUrl=a;this.toBotFromChannelOpenIdMetadataUrl=s;this.toBotFromEmulatorOpenIdMetadataUrl=c;this.callerId=u;this.credentialsFactory=l;this.authConfiguration=w;this.botFrameworkClientFetch=T;this.connectorClientOptions=x;}getOriginatingAudience(){return this.toChannelFromBotOAuthScope}authenticateChannelRequest(r){return re(this,null,function*(){if(!r.trim()){if(!(yield this.credentialsFactory.isAuthenticationDisabled()))throw new je("Unauthorized Access. Request is not authorized",u$e.StatusCodes.UNAUTHORIZED);return exports.SkillValidation.createAnonymousSkillClaim()}return this.JwtTokenValidation_validateAuthHeader(r,"unknown",null)})}authenticateRequest(r,n){return re(this,null,function*(){let i=yield this.JwtTokenValidation_authenticateRequest(r,n),o=exports.SkillValidation.isSkillClaim(i.claims)?exports.JwtTokenValidation.getAppIdFromClaims(i.claims):this.toChannelFromBotOAuthScope,a=yield this.generateCallerId(this.credentialsFactory,i,this.callerId),s=new Qp(pT(i),this.toChannelFromBotOAuthScope,this.toChannelFromBotLoginUrl,this.validateAuthority,this.credentialsFactory,this.connectorClientOptions);return {audience:o,callerId:a,claimsIdentity:i,connectorFactory:s}})}authenticateStreamingRequest(r,n){return re(this,null,function*(){if(!(n!=null&&n.trim())&&!(yield this.credentialsFactory.isAuthenticationDisabled()))throw new je("'channelIdHeader' required.",u$e.StatusCodes.UNAUTHORIZED);let i=yield this.JwtTokenValidation_validateAuthHeader(r,n,null),o=exports.SkillValidation.isSkillClaim(i.claims)?exports.JwtTokenValidation.getAppIdFromClaims(i.claims):this.toChannelFromBotOAuthScope,a=yield this.generateCallerId(this.credentialsFactory,i,this.callerId);return {audience:o,callerId:a,claimsIdentity:i}})}createUserTokenClient(r){return re(this,null,function*(){let n=pT(r),i=yield this.credentialsFactory.createCredentials(n,this.toChannelFromBotOAuthScope,this.toChannelFromBotLoginUrl,this.validateAuthority);return new t1(n,i,this.oAuthUrl,this.connectorClientOptions)})}createConnectorFactory(r){return new Qp(pT(r),this.toChannelFromBotOAuthScope,this.toChannelFromBotLoginUrl,this.validateAuthority,this.credentialsFactory,this.connectorClientOptions)}createBotFrameworkClient(){return new Kb(this.credentialsFactory,this.toChannelFromBotLoginUrl,this.botFrameworkClientFetch,this.connectorClientOptions)}JwtTokenValidation_authenticateRequest(r,n){return re(this,null,function*(){var o;if(!n.trim()){if(!(yield this.credentialsFactory.isAuthenticationDisabled()))throw new je("Unauthorized Access. Request is not authorized",u$e.StatusCodes.UNAUTHORIZED);return r.channelId===u$e.Channels.Emulator&&((o=r.recipient)==null?void 0:o.role)===u$e.RoleTypes.Skill?exports.SkillValidation.createAnonymousSkillClaim():new ya([],exports.AuthenticationConstants.AnonymousAuthType)}return yield this.JwtTokenValidation_validateAuthHeader(n,r.channelId,r.serviceUrl)})}JwtTokenValidation_validateAuthHeader(r,n,i=""){return re(this,null,function*(){let o=yield this.JwtTokenValidation_authenticateToken(r,n,i);return yield this.JwtTokenValidation_validateClaims(o.claims),o})}JwtTokenValidation_validateClaims(){return re(this,arguments,function*(r=[]){if(this.authConfiguration.validateClaims)yield this.authConfiguration.validateClaims(r);else if(exports.SkillValidation.isSkillClaim(r))throw new je("Unauthorized Access. Request is not authorized. Skill Claims require validation.",u$e.StatusCodes.UNAUTHORIZED)})}JwtTokenValidation_authenticateToken(r,n,i){return re(this,null,function*(){return exports.AseChannelValidation.isTokenFromAseChannel(n)?exports.AseChannelValidation.authenticateAseChannelToken(r):exports.SkillValidation.isSkillToken(r)?this.SkillValidation_authenticateChannelToken(r,n):exports.EmulatorValidation.isTokenFromEmulator(r)?this.EmulatorValidation_authenticateEmulatorToken(r,n):this.ChannelValidation_authenticateChannelToken(r,i,n)})}SkillValidation_authenticateChannelToken(r,n){return re(this,null,function*(){var c,u;let i=Me(oe({},Bo),{issuer:[...Bo.issuer,...(c=this.authConfiguration.validTokenIssuers)!=null?c:[]]}),o=new dn(i,this.toBotFromEmulatorOpenIdMetadataUrl,exports.AuthenticationConstants.AllowedSigningAlgorithms,(u=this.connectorClientOptions)==null?void 0:u.proxySettings),a=r.split(" "),s=yield o.getIdentity(a[0],a[1],n,this.authConfiguration.requiredEndorsements);return yield this.SkillValidation_ValidateIdentity(s),s})}SkillValidation_ValidateIdentity(r){return re(this,null,function*(){if(!r)throw new je("SkillValidation.validateIdentity(): Invalid identity",u$e.StatusCodes.UNAUTHORIZED);if(!r.isAuthenticated)throw new je("SkillValidation.validateIdentity(): Token not authenticated",u$e.StatusCodes.UNAUTHORIZED);if(!r.getClaimValue(exports.AuthenticationConstants.VersionClaim))throw new je(`SkillValidation.validateIdentity(): '${exports.AuthenticationConstants.VersionClaim}' claim is required on skill Tokens.`,u$e.StatusCodes.UNAUTHORIZED);let i=r.getClaimValue(exports.AuthenticationConstants.AudienceClaim);if(!i)throw new je(`SkillValidation.validateIdentity(): '${exports.AuthenticationConstants.AudienceClaim}' claim is required on skill Tokens.`,u$e.StatusCodes.UNAUTHORIZED);if(!(yield this.credentialsFactory.isValidAppId(i)))throw new je("SkillValidation.validateIdentity(): Invalid audience.",u$e.StatusCodes.UNAUTHORIZED);if(!exports.JwtTokenValidation.getAppIdFromClaims(r.claims))throw new je("SkillValidation.validateIdentity(): Invalid appId.",u$e.StatusCodes.UNAUTHORIZED)})}EmulatorValidation_authenticateEmulatorToken(r,n){return re(this,null,function*(){var u,l;let i=Me(oe({},Bo),{issuer:[...Bo.issuer,...(u=this.authConfiguration.validTokenIssuers)!=null?u:[]]}),a=yield new dn(i,this.toBotFromEmulatorOpenIdMetadataUrl,exports.AuthenticationConstants.AllowedSigningAlgorithms,(l=this.connectorClientOptions)==null?void 0:l.proxySettings).getIdentityFromAuthHeader(r,n,this.authConfiguration.requiredEndorsements);if(!a)throw new je("Unauthorized. No valid identity.",u$e.StatusCodes.UNAUTHORIZED);if(!a.isAuthenticated)throw new je("Unauthorized. Is not authenticated",u$e.StatusCodes.UNAUTHORIZED);let s=a.getClaimValue(exports.AuthenticationConstants.VersionClaim);if(s===null)throw new je('Unauthorized. "ver" claim is required on Emulator Tokens.',u$e.StatusCodes.UNAUTHORIZED);let c="";if(!s||s==="1.0"){let w=a.getClaimValue(exports.AuthenticationConstants.AppIdClaim);if(!w)throw new je('Unauthorized. "appid" claim is required on Emulator Token version "1.0".',u$e.StatusCodes.UNAUTHORIZED);c=w;}else if(s==="2.0"){let w=a.getClaimValue(exports.AuthenticationConstants.AuthorizedParty);if(!w)throw new je('Unauthorized. "azp" claim is required on Emulator Token version "2.0".',u$e.StatusCodes.UNAUTHORIZED);c=w;}else throw new je(`Unauthorized. Unknown Emulator Token version "${s}".`,u$e.StatusCodes.UNAUTHORIZED);if(!(yield this.credentialsFactory.isValidAppId(c)))throw new je(`Unauthorized. Invalid AppId passed on token: ${c}`,u$e.StatusCodes.UNAUTHORIZED);return a})}ChannelValidation_authenticateChannelToken(r,n,i){return re(this,null,function*(){var c;let o=this.ChannelValidation_GetTokenValidationParameters(),s=yield new dn(o,this.toBotFromChannelOpenIdMetadataUrl,exports.AuthenticationConstants.AllowedSigningAlgorithms,(c=this.connectorClientOptions)==null?void 0:c.proxySettings).getIdentityFromAuthHeader(r,i,this.authConfiguration.requiredEndorsements);return this.governmentChannelValidation_ValidateIdentity(s,n)})}ChannelValidation_GetTokenValidationParameters(){return {issuer:[this.toBotFromChannelTokenIssuer],audience:void 0,clockTolerance:5*60,ignoreExpiration:!1}}governmentChannelValidation_ValidateIdentity(r,n){return re(this,null,function*(){if(!r)throw new je("Unauthorized. No valid identity.",u$e.StatusCodes.UNAUTHORIZED);if(!r.isAuthenticated)throw new je("Unauthorized. Is not authenticated",u$e.StatusCodes.UNAUTHORIZED);if(r.getClaimValue(exports.AuthenticationConstants.IssuerClaim)!==this.toBotFromChannelTokenIssuer)throw new je("Unauthorized. Issuer Claim MUST be present.",u$e.StatusCodes.UNAUTHORIZED);let i=r.getClaimValue(exports.AuthenticationConstants.AudienceClaim);if(!(yield this.credentialsFactory.isValidAppId(i||"")))throw new je(`Unauthorized. Invalid AppId passed on token: ${i}`,u$e.StatusCodes.UNAUTHORIZED);if(n&&r.getClaimValue(exports.AuthenticationConstants.ServiceUrlClaim)!==n)throw new je("Unauthorized. ServiceUrl claim do not match.",u$e.StatusCodes.UNAUTHORIZED);return r})}};var GL=class{static create(e,r,n,i,o,a,s,c,u,l,w,T,x={}){if(!botbuilderStdlib.stringExt.isNilOrEmpty(n)||!botbuilderStdlib.stringExt.isNilOrEmpty(i)||!botbuilderStdlib.stringExt.isNilOrEmpty(o)||!botbuilderStdlib.stringExt.isNilOrEmpty(a)||!botbuilderStdlib.stringExt.isNilOrEmpty(s)||!botbuilderStdlib.stringExt.isNilOrEmpty(c)||!botbuilderStdlib.stringExt.isNilOrEmpty(u))return new Ld(r,n,i,o,a,s,c,u,l,w,T,x);if(botbuilderStdlib.stringExt.isNilOrEmpty(e))return new Ld(!0,exports.AuthenticationConstants.ToChannelFromBotLoginUrl,exports.AuthenticationConstants.ToChannelFromBotOAuthScope,exports.AuthenticationConstants.ToBotFromChannelTokenIssuer,exports.AuthenticationConstants.OAuthUrl,exports.AuthenticationConstants.ToBotFromChannelOpenIdMetadataUrl,exports.AuthenticationConstants.ToBotFromEmulatorOpenIdMetadataUrl,u$e.CallerIdConstants.PublicAzureChannel,l,w,T,x);if(e===exports.GovernmentConstants.ChannelService)return new Ld(!0,exports.GovernmentConstants.ToChannelFromBotLoginUrl,exports.GovernmentConstants.ToChannelFromBotOAuthScope,exports.GovernmentConstants.ToBotFromChannelTokenIssuer,exports.GovernmentConstants.OAuthUrl,exports.GovernmentConstants.ToBotFromChannelOpenIdMetadataUrl,exports.GovernmentConstants.ToBotFromEmulatorOpenIdMetadataUrl,u$e.CallerIdConstants.USGovChannel,l,w,T,x);throw new Error("The provided ChannelService value is not supported.")}};v();m();y();g();v();m();y();g();v();m();y();g();v();m();y();g();var nl=class{static serializeJSONBlob(e){return JSON.stringify(e)}static serializeAccounts(e){let r={};return Object.keys(e).map(function(n){var o;let i=e[n];r[n]={home_account_id:i.homeAccountId,environment:i.environment,realm:i.realm,local_account_id:i.localAccountId,username:i.username,authority_type:i.authorityType,name:i.name,client_info:i.clientInfo,last_modification_time:i.lastModificationTime,last_modification_app:i.lastModificationApp,tenantProfiles:(o=i.tenantProfiles)==null?void 0:o.map(a=>JSON.stringify(a))};}),r}static serializeIdTokens(e){let r={};return Object.keys(e).map(function(n){let i=e[n];r[n]={home_account_id:i.homeAccountId,environment:i.environment,credential_type:i.credentialType,client_id:i.clientId,secret:i.secret,realm:i.realm};}),r}static serializeAccessTokens(e){let r={};return Object.keys(e).map(function(n){let i=e[n];r[n]={home_account_id:i.homeAccountId,environment:i.environment,credential_type:i.credentialType,client_id:i.clientId,secret:i.secret,realm:i.realm,target:i.target,cached_at:i.cachedAt,expires_on:i.expiresOn,extended_expires_on:i.extendedExpiresOn,refresh_on:i.refreshOn,key_id:i.keyId,token_type:i.tokenType,requestedClaims:i.requestedClaims,requestedClaimsHash:i.requestedClaimsHash,userAssertionHash:i.userAssertionHash};}),r}static serializeRefreshTokens(e){let r={};return Object.keys(e).map(function(n){let i=e[n];r[n]={home_account_id:i.homeAccountId,environment:i.environment,credential_type:i.credentialType,client_id:i.clientId,secret:i.secret,family_id:i.familyId,target:i.target,realm:i.realm};}),r}static serializeAppMetadata(e){let r={};return Object.keys(e).map(function(n){let i=e[n];r[n]={client_id:i.clientId,environment:i.environment,family_id:i.familyId};}),r}static serializeAllCache(e){return {Account:this.serializeAccounts(e.accounts),IdToken:this.serializeIdTokens(e.idTokens),AccessToken:this.serializeAccessTokens(e.accessTokens),RefreshToken:this.serializeRefreshTokens(e.refreshTokens),AppMetadata:this.serializeAppMetadata(e.appMetadata)}}};v();m();y();g();v();m();y();g();var c1={};Cr(c1,{checkMaxAge:()=>Gm,extractTokenClaims:()=>Es,getJWSPayload:()=>ZL});v();m();y();g();v();m();y();g();v();m();y();g();v();m();y();g();var be={LIBRARY_NAME:"MSAL.JS",SKU:"msal.js.common",CACHE_PREFIX:"msal",DEFAULT_AUTHORITY:"https://login.microsoftonline.com/common/",DEFAULT_AUTHORITY_HOST:"login.microsoftonline.com",DEFAULT_COMMON_TENANT:"common",ADFS:"adfs",DSTS:"dstsv2",AAD_INSTANCE_DISCOVERY_ENDPT:"https://login.microsoftonline.com/common/discovery/instance?api-version=1.1&authorization_endpoint=",CIAM_AUTH_URL:".ciamlogin.com",AAD_TENANT_DOMAIN_SUFFIX:".onmicrosoft.com",RESOURCE_DELIM:"|",NO_ACCOUNT:"NO_ACCOUNT",CLAIMS:"claims",CONSUMER_UTID:"9188040d-6c67-4c5b-b112-36a304b66dad",OPENID_SCOPE:"openid",PROFILE_SCOPE:"profile",OFFLINE_ACCESS_SCOPE:"offline_access",EMAIL_SCOPE:"email",CODE_RESPONSE_TYPE:"code",CODE_GRANT_TYPE:"authorization_code",RT_GRANT_TYPE:"refresh_token",FRAGMENT_RESPONSE_MODE:"fragment",S256_CODE_CHALLENGE_METHOD:"S256",URL_FORM_CONTENT_TYPE:"application/x-www-form-urlencoded;charset=utf-8",AUTHORIZATION_PENDING:"authorization_pending",NOT_DEFINED:"not_defined",EMPTY_STRING:"",NOT_APPLICABLE:"N/A",NOT_AVAILABLE:"Not Available",FORWARD_SLASH:"/",IMDS_ENDPOINT:"http://169.254.169.254/metadata/instance/compute/location",IMDS_VERSION:"2020-06-01",IMDS_TIMEOUT:2e3,AZURE_REGION_AUTO_DISCOVER_FLAG:"TryAutoDetect",REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX:"login.microsoft.com",KNOWN_PUBLIC_CLOUDS:["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"],TOKEN_RESPONSE_TYPE:"token",ID_TOKEN_RESPONSE_TYPE:"id_token",SHR_NONCE_VALIDITY:240,INVALID_INSTANCE:"invalid_instance"},fr={SUCCESS:200,SUCCESS_RANGE_START:200,SUCCESS_RANGE_END:299,REDIRECT:302,CLIENT_ERROR:400,CLIENT_ERROR_RANGE_START:400,BAD_REQUEST:400,UNAUTHORIZED:401,NOT_FOUND:404,REQUEST_TIMEOUT:408,TOO_MANY_REQUESTS:429,CLIENT_ERROR_RANGE_END:499,SERVER_ERROR:500,SERVER_ERROR_RANGE_START:500,SERVICE_UNAVAILABLE:503,GATEWAY_TIMEOUT:504,SERVER_ERROR_RANGE_END:599,MULTI_SIDED_ERROR:600},Ra=[be.OPENID_SCOPE,be.PROFILE_SCOPE,be.OFFLINE_ACCESS_SCOPE],mT=[...Ra,be.EMAIL_SCOPE],Gr={CONTENT_TYPE:"Content-Type",RETRY_AFTER:"Retry-After",CCS_HEADER:"X-AnchorMailbox",WWWAuthenticate:"WWW-Authenticate",AuthenticationInfo:"Authentication-Info",X_MS_REQUEST_ID:"x-ms-request-id",X_MS_HTTP_VERSION:"x-ms-httpver"};var Ai={COMMON:"common",ORGANIZATIONS:"organizations",CONSUMERS:"consumers"},qd={ACCESS_TOKEN:"access_token",XMS_CC:"xms_cc"},bc={LOGIN:"login",SELECT_ACCOUNT:"select_account",CONSENT:"consent",NONE:"none",CREATE:"create",NO_SESSION:"no_session"},r1={PLAIN:"plain",S256:"S256"},KL={QUERY:"query",FRAGMENT:"fragment"},xm=Me(oe({},KL),{FORM_POST:"form_post"}),$o={IMPLICIT_GRANT:"implicit",AUTHORIZATION_CODE_GRANT:"authorization_code",CLIENT_CREDENTIALS_GRANT:"client_credentials",RESOURCE_OWNER_PASSWORD_GRANT:"password",REFRESH_TOKEN_GRANT:"refresh_token",DEVICE_CODE_GRANT:"device_code",JWT_BEARER:"urn:ietf:params:oauth:grant-type:jwt-bearer"},Fd={MSSTS_ACCOUNT_TYPE:"MSSTS",ADFS_ACCOUNT_TYPE:"ADFS",MSAV1_ACCOUNT_TYPE:"MSA",GENERIC_ACCOUNT_TYPE:"Generic"},kr={CACHE_KEY_SEPARATOR:"-",CLIENT_INFO_SEPARATOR:"."},Wt={ID_TOKEN:"IdToken",ACCESS_TOKEN:"AccessToken",ACCESS_TOKEN_WITH_AUTH_SCHEME:"AccessToken_With_AuthScheme",REFRESH_TOKEN:"RefreshToken"};var Im="appmetadata",WL="client_info",wc="1",zd={CACHE_KEY:"authority-metadata",REFRESH_TIME_SECONDS:3600*24},zn={CONFIG:"config",CACHE:"cache",NETWORK:"network",HARDCODED_VALUES:"hardcoded_values"},tn={SCHEMA_VERSION:5,MAX_CUR_HEADER_BYTES:80,MAX_LAST_HEADER_BYTES:330,MAX_CACHED_ERRORS:50,CACHE_KEY:"server-telemetry",CATEGORY_SEPARATOR:"|",VALUE_SEPARATOR:",",OVERFLOW_TRUE:"1",OVERFLOW_FALSE:"0",UNKNOWN_ERROR:"unknown_error"},Dt={BEARER:"Bearer",POP:"pop",SSH:"ssh-cert"},gs={DEFAULT_THROTTLE_TIME_SECONDS:60,DEFAULT_MAX_THROTTLE_TIME_SECONDS:3600,THROTTLING_PREFIX:"throttling",X_MS_LIB_CAPABILITY_VALUE:"retry-after, h429"},n1={INVALID_GRANT_ERROR:"invalid_grant",CLIENT_MISMATCH_ERROR:"client_mismatch"},i1={username:"username",password:"password"},Mm={httpSuccess:200,httpBadRequest:400},il={FAILED_AUTO_DETECTION:"1",INTERNAL_CACHE:"2",ENVIRONMENT_VARIABLE:"3",IMDS:"4"},o1={CONFIGURED_MATCHES_DETECTED:"1",CONFIGURED_NO_AUTO_DETECTION:"2",CONFIGURED_NOT_DETECTED:"3",AUTO_DETECTION_REQUESTED_SUCCESSFUL:"4",AUTO_DETECTION_REQUESTED_FAILED:"5"},yr={NOT_APPLICABLE:"0",FORCE_REFRESH_OR_CLAIMS:"1",NO_CACHED_ACCESS_TOKEN:"2",CACHED_ACCESS_TOKEN_EXPIRED:"3",PROACTIVELY_REFRESHED:"4"};var Om=300;v();m();y();g();var Yt=class t extends Error{constructor(e,r,n){let i=r?`${e}: ${r}`:e;super(i),Object.setPrototypeOf(this,t.prototype),this.errorCode=e||be.EMPTY_STRING,this.errorMessage=r||be.EMPTY_STRING,this.subError=n||be.EMPTY_STRING,this.name="AuthError";}setCorrelationId(e){this.correlationId=e;}};var Kr={};Cr(Kr,{authTimeNotFound:()=>vs,authorizationCodeMissingFromServerResponse:()=>bl,bindingKeyNotRemoved:()=>wl,cannotAppendScopeSet:()=>yl,cannotRemoveEmptyScope:()=>ml,clientInfoDecodingError:()=>Ec,clientInfoEmptyError:()=>ol,deviceCodeExpired:()=>Bm,deviceCodePollingCancelled:()=>Pm,deviceCodeUnknownError:()=>Um,emptyInputScopeSet:()=>Cc,endSessionEndpointNotSupported:()=>El,endpointResolutionError:()=>Hn,hashNotDeserialized:()=>ul,invalidAssertion:()=>qm,invalidCacheEnvironment:()=>ws,invalidCacheRecord:()=>gl,invalidClientCredential:()=>Fm,invalidState:()=>Vo,keyIdMissing:()=>_l,maxAgeTranspired:()=>dl,methodNotImplemented:()=>At,missingTenantIdError:()=>$m,multipleMatchingAccounts:()=>km,multipleMatchingAppMetadata:()=>hl,multipleMatchingTokens:()=>Nm,nestedAppAuthBridgeDisabled:()=>Vm,networkError:()=>sl,noAccountFound:()=>Dm,noAccountInSilentRequest:()=>bs,noCryptoObject:()=>Ac,noNetworkConnectivity:()=>Hm,nonceMismatch:()=>fl,nullOrEmptyToken:()=>al,openIdConfigError:()=>cl,requestCannotBeMade:()=>pl,stateMismatch:()=>ll,stateNotFound:()=>Sc,tokenClaimsCnfRequiredForSignedJwt:()=>vl,tokenParsingError:()=>_c,tokenRefreshRequired:()=>xa,unexpectedCredentialType:()=>Lm,userCanceled:()=>jm,userTimeoutReached:()=>zm});v();m();y();g();var Ec="client_info_decoding_error",ol="client_info_empty_error",_c="token_parsing_error",al="null_or_empty_token",Hn="endpoints_resolution_error",sl="network_error",cl="openid_config_error",ul="hash_not_deserialized",Vo="invalid_state",ll="state_mismatch",Sc="state_not_found",fl="nonce_mismatch",vs="auth_time_not_found",dl="max_age_transpired",Nm="multiple_matching_tokens",km="multiple_matching_accounts",hl="multiple_matching_appMetadata",pl="request_cannot_be_made",ml="cannot_remove_empty_scope",yl="cannot_append_scopeset",Cc="empty_input_scopeset",Pm="device_code_polling_cancelled",Bm="device_code_expired",Um="device_code_unknown_error",bs="no_account_in_silent_request",gl="invalid_cache_record",ws="invalid_cache_environment",Dm="no_account_found",Ac="no_crypto_object",Lm="unexpected_credential_type",qm="invalid_assertion",Fm="invalid_client_credential",xa="token_refresh_required",zm="user_timeout_reached",vl="token_claims_cnf_required_for_signedjwt",bl="authorization_code_missing_from_server_response",wl="binding_key_not_removed",El="end_session_endpoint_not_supported",_l="key_id_missing",Hm="no_network_connectivity",jm="user_canceled",$m="missing_tenant_id_error",At="method_not_implemented",Vm="nested_app_auth_bridge_disabled";var _t={[Ec]:"The client info could not be parsed/decoded correctly",[ol]:"The client info was empty",[_c]:"Token cannot be parsed",[al]:"The token is null or empty",[Hn]:"Endpoints cannot be resolved",[sl]:"Network request failed",[cl]:"Could not retrieve endpoints. Check your authority and verify the .well-known/openid-configuration endpoint returns the required endpoints.",[ul]:"The hash parameters could not be deserialized",[Vo]:"State was not the expected format",[ll]:"State mismatch error",[Sc]:"State not found",[fl]:"Nonce mismatch error",[vs]:"Max Age was requested and the ID token is missing the auth_time variable. auth_time is an optional claim and is not enabled by default - it must be enabled. See https://aka.ms/msaljs/optional-claims for more information.",[dl]:"Max Age is set to 0, or too much time has elapsed since the last end-user authentication.",[Nm]:"The cache contains multiple tokens satisfying the requirements. Call AcquireToken again providing more requirements such as authority or account.",[km]:"The cache contains multiple accounts satisfying the given parameters. Please pass more info to obtain the correct account",[hl]:"The cache contains multiple appMetadata satisfying the given parameters. Please pass more info to obtain the correct appMetadata",[pl]:"Token request cannot be made without authorization code or refresh token.",[ml]:"Cannot remove null or empty scope from ScopeSet",[yl]:"Cannot append ScopeSet",[Cc]:"Empty input ScopeSet cannot be processed",[Pm]:"Caller has cancelled token endpoint polling during device code flow by setting DeviceCodeRequest.cancel = true.",[Bm]:"Device code is expired.",[Um]:"Device code stopped polling for unknown reasons.",[bs]:"Please pass an account object, silent flow is not supported without account information",[gl]:"Cache record object was null or undefined.",[ws]:"Invalid environment when attempting to create cache entry",[Dm]:"No account found in cache for given key.",[Ac]:"No crypto object detected.",[Lm]:"Unexpected credential type.",[qm]:"Client assertion must meet requirements described in https://tools.ietf.org/html/rfc7515",[Fm]:"Client credential (secret, certificate, or assertion) must not be empty when creating a confidential client. An application should at most have one credential",[xa]:"Cannot return token from cache because it must be refreshed. This may be due to one of the following reasons: forceRefresh parameter is set to true, claims have been requested, there is no cached access token or it is expired.",[zm]:"User defined timeout for device code polling reached",[vl]:"Cannot generate a POP jwt if the token_claims are not populated",[bl]:"Server response does not contain an authorization code to proceed",[wl]:"Could not remove the credential's binding key from storage.",[El]:"The provided authority does not support logout",[_l]:"A keyId value is missing from the requested bound token's cache record and is required to match the token to it's stored binding key.",[Hm]:"No network connectivity. Check your internet connection.",[jm]:"User cancelled the flow.",[$m]:"A tenant id - not common, organizations, or consumers - must be specified when using the client_credentials flow.",[At]:"This method has not been implemented",[Vm]:"The nested app auth bridge is disabled"},Hd=class t extends Yt{constructor(e,r){super(e,r?`${_t[e]}: ${r}`:_t[e]),this.name="ClientAuthError",Object.setPrototypeOf(this,t.prototype);}};function Ae(t,e){return new Hd(t,e)}function Es(t,e){let r=ZL(t);try{let n=e(r);return JSON.parse(n)}catch(n){throw Ae(_c)}}function ZL(t){if(!t)throw Ae(al);let r=/^([^\.\s]*)\.([^\.\s]+)\.([^\.\s]*)$/.exec(t);if(!r||r.length<4)throw Ae(_c);return r[2]}function Gm(t,e){if(e===0||Date.now()-3e5>t+e)throw Ae(dl)}var m1={};Cr(m1,{createDiscoveredInstance:()=>CT});v();m();y();g();v();m();y();g();v();m();y();g();var fo={Default:0,Adfs:1,Dsts:2,Ciam:3};v();m();y();g();function JL(t){return t.hasOwnProperty("authorization_endpoint")&&t.hasOwnProperty("token_endpoint")&&t.hasOwnProperty("issuer")&&t.hasOwnProperty("jwks_uri")}v();m();y();g();v();m();y();g();var u1={};Cr(u1,{authorityMismatch:()=>Qm,authorityUriInsecure:()=>Cl,cannotAllowNativeBroker:()=>Xm,cannotSetOIDCOptions:()=>Jm,claimsRequestParsingError:()=>Km,emptyInputScopesError:()=>Tl,invalidAuthenticationHeader:()=>Zm,invalidAuthorityMetadata:()=>Ol,invalidClaims:()=>_s,invalidCloudDiscoveryMetadata:()=>Tc,invalidCodeChallengeMethod:()=>Ml,invalidPromptValue:()=>Rl,logoutRequestEmpty:()=>Il,missingNonceAuthenticationHeader:()=>Ym,missingSshJwk:()=>Cs,missingSshKid:()=>Wm,pkceParamsMissing:()=>Ss,redirectUriEmpty:()=>Sl,tokenRequestEmpty:()=>xl,untrustedAuthority:()=>Nl,urlEmptyError:()=>Al,urlParseError:()=>Ia});v();m();y();g();var Sl="redirect_uri_empty",Km="claims_request_parsing_error",Cl="authority_uri_insecure",Ia="url_parse_error",Al="empty_url_error",Tl="empty_input_scopes_error",Rl="invalid_prompt_value",_s="invalid_claims",xl="token_request_empty",Il="logout_request_empty",Ml="invalid_code_challenge_method",Ss="pkce_params_missing",Tc="invalid_cloud_discovery_metadata",Ol="invalid_authority_metadata",Nl="untrusted_authority",Cs="missing_ssh_jwk",Wm="missing_ssh_kid",Ym="missing_nonce_authentication_header",Zm="invalid_authentication_header",Jm="cannot_set_OIDCOptions",Xm="cannot_allow_native_broker",Qm="authority_mismatch";var Tr={[Sl]:"A redirect URI is required for all calls, and none has been set.",[Km]:"Could not parse the given claims request object.",[Cl]:"Authority URIs must use https. Please see here for valid authority configuration options: https://docs.microsoft.com/en-us/azure/active-directory/develop/msal-js-initializing-client-applications#configuration-options",[Ia]:"URL could not be parsed into appropriate segments.",[Al]:"URL was empty or null.",[Tl]:"Scopes cannot be passed as null, undefined or empty array because they are required to obtain an access token.",[Rl]:"Please see here for valid configuration options: https://azuread.github.io/microsoft-authentication-library-for-js/ref/modules/_azure_msal_common.html#commonauthorizationurlrequest",[_s]:"Given claims parameter must be a stringified JSON object.",[xl]:"Token request was empty and not found in cache.",[Il]:"The logout request was null or undefined.",[Ml]:'code_challenge_method passed is invalid. Valid values are "plain" and "S256".',[Ss]:"Both params: code_challenge and code_challenge_method are to be passed if to be sent in the request",[Tc]:"Invalid cloudDiscoveryMetadata provided. Must be a stringified JSON object containing tenant_discovery_endpoint and metadata fields",[Ol]:"Invalid authorityMetadata provided. Must by a stringified JSON object containing authorization_endpoint, token_endpoint, issuer fields.",[Nl]:"The provided authority is not a trusted authority. Please include this authority in the knownAuthorities config parameter.",[Cs]:"Missing sshJwk in SSH certificate request. A stringified JSON Web Key is required when using the SSH authentication scheme.",[Wm]:"Missing sshKid in SSH certificate request. A string that uniquely identifies the public SSH key is required when using the SSH authentication scheme.",[Ym]:"Unable to find an authentication header containing server nonce. Either the Authentication-Info or WWW-Authenticate headers must be present in order to obtain a server nonce.",[Zm]:"Invalid authentication header provided",[Jm]:"Cannot set OIDCOptions parameter. Please change the protocol mode to OIDC or use a non-Microsoft authority.",[Xm]:"Cannot set allowNativeBroker parameter to true when not in AAD protocol mode.",[Qm]:"Authority mismatch error. Authority provided in login request or PublicClientApplication config does not match the environment of the provided account. Please use a matching account or make an interactive request to login to this authority."},l1=class t extends Yt{constructor(e){super(e,Tr[e]),this.name="ClientConfigurationError",Object.setPrototypeOf(this,t.prototype);}};function Jt(t){return new l1(t)}v();m();y();g();var Pr=class{static isEmptyObj(e){if(e)try{let r=JSON.parse(e);return Object.keys(r).length===0}catch(r){}return !0}static startsWith(e,r){return e.indexOf(r)===0}static endsWith(e,r){return e.length>=r.length&&e.lastIndexOf(r)===e.length-r.length}static queryStringToObject(e){let r={},n=e.split("&"),i=o=>decodeURIComponent(o.replace(/\+/g," "));return n.forEach(o=>{if(o.trim()){let[a,s]=o.split(/=(.+)/g,2);a&&s&&(r[i(a)]=i(s));}}),r}static trimArrayEntries(e){return e.map(r=>r.trim())}static removeEmptyStringsFromArray(e){return e.filter(r=>!!r)}static jsonParseHelper(e){try{return JSON.parse(e)}catch(r){return null}}static matchPattern(e,r){return new RegExp(e.replace(/\\/g,"\\\\").replace(/\*/g,"[^ ]*").replace(/\?/g,"\\?")).test(r)}};v();m();y();g();function She(t){return t.startsWith("#/")?t.substring(2):t.startsWith("#")||t.startsWith("?")?t.substring(1):t}function XL(t){if(!t||t.indexOf("=")<0)return null;try{let e=She(t),r=Object.fromEntries(new URLSearchParams(e));if(r.code||r.error||r.error_description||r.state)return r}catch(e){throw Ae(ul)}return null}var Ht=class t{get urlString(){return this._urlString}constructor(e){if(this._urlString=e,!this._urlString)throw Jt(Al);e.includes("#")||(this._urlString=t.canonicalizeUri(e));}static canonicalizeUri(e){if(e){let r=e.toLowerCase();return Pr.endsWith(r,"?")?r=r.slice(0,-1):Pr.endsWith(r,"?/")&&(r=r.slice(0,-2)),Pr.endsWith(r,"/")||(r+="/"),r}return e}validateAsUri(){let e;try{e=this.getUrlComponents();}catch(r){throw Jt(Ia)}if(!e.HostNameAndPort||!e.PathSegments)throw Jt(Ia);if(!e.Protocol||e.Protocol.toLowerCase()!=="https:")throw Jt(Cl)}static appendQueryString(e,r){return r?e.indexOf("?")<0?`${e}?${r}`:`${e}&${r}`:e}static removeHashFromUrl(e){return t.canonicalizeUri(e.split("#")[0])}replaceTenantPath(e){let r=this.getUrlComponents(),n=r.PathSegments;return e&&n.length!==0&&(n[0]===Ai.COMMON||n[0]===Ai.ORGANIZATIONS)&&(n[0]=e),t.constructAuthorityUriFromObject(r)}getUrlComponents(){let e=RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?"),r=this.urlString.match(e);if(!r)throw Jt(Ia);let n={Protocol:r[1],HostNameAndPort:r[4],AbsolutePath:r[5],QueryString:r[7]},i=n.AbsolutePath.split("/");return i=i.filter(o=>o&&o.length>0),n.PathSegments=i,n.QueryString&&n.QueryString.endsWith("/")&&(n.QueryString=n.QueryString.substring(0,n.QueryString.length-1)),n}static getDomainFromUrl(e){let r=RegExp("^([^:/?#]+://)?([^/?#]*)"),n=e.match(r);if(!n)throw Jt(Ia);return n[2]}static getAbsoluteUrl(e,r){if(e[0]===be.FORWARD_SLASH){let i=new t(r).getUrlComponents();return i.Protocol+"//"+i.HostNameAndPort+e}return e}static constructAuthorityUriFromObject(e){return new t(e.Protocol+"//"+e.HostNameAndPort+"/"+e.PathSegments.join("/"))}static hashContainsKnownProperties(e){return !!XL(e)}};v();m();y();g();var eq={endpointMetadata:{"login.microsoftonline.com":{token_endpoint:"https://login.microsoftonline.com/{tenantid}/oauth2/v2.0/token",jwks_uri:"https://login.microsoftonline.com/{tenantid}/discovery/v2.0/keys",issuer:"https://login.microsoftonline.com/{tenantid}/v2.0",authorization_endpoint:"https://login.microsoftonline.com/{tenantid}/oauth2/v2.0/authorize",end_session_endpoint:"https://login.microsoftonline.com/{tenantid}/oauth2/v2.0/logout"},"login.chinacloudapi.cn":{token_endpoint:"https://login.chinacloudapi.cn/{tenantid}/oauth2/v2.0/token",jwks_uri:"https://login.chinacloudapi.cn/{tenantid}/discovery/v2.0/keys",issuer:"https://login.partner.microsoftonline.cn/{tenantid}/v2.0",authorization_endpoint:"https://login.chinacloudapi.cn/{tenantid}/oauth2/v2.0/authorize",end_session_endpoint:"https://login.chinacloudapi.cn/{tenantid}/oauth2/v2.0/logout"},"login.microsoftonline.us":{token_endpoint:"https://login.microsoftonline.us/{tenantid}/oauth2/v2.0/token",jwks_uri:"https://login.microsoftonline.us/{tenantid}/discovery/v2.0/keys",issuer:"https://login.microsoftonline.us/{tenantid}/v2.0",authorization_endpoint:"https://login.microsoftonline.us/{tenantid}/oauth2/v2.0/authorize",end_session_endpoint:"https://login.microsoftonline.us/{tenantid}/oauth2/v2.0/logout"}},instanceDiscoveryMetadata:{tenant_discovery_endpoint:"https://{canonicalAuthority}/v2.0/.well-known/openid-configuration",metadata:[{preferred_network:"login.microsoftonline.com",preferred_cache:"login.windows.net",aliases:["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{preferred_network:"login.partner.microsoftonline.cn",preferred_cache:"login.partner.microsoftonline.cn",aliases:["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{preferred_network:"login.microsoftonline.de",preferred_cache:"login.microsoftonline.de",aliases:["login.microsoftonline.de"]},{preferred_network:"login.microsoftonline.us",preferred_cache:"login.microsoftonline.us",aliases:["login.microsoftonline.us","login.usgovcloudapi.net"]},{preferred_network:"login-us.microsoftonline.com",preferred_cache:"login-us.microsoftonline.com",aliases:["login-us.microsoftonline.com"]}]}},yT=eq.endpointMetadata,gT=eq.instanceDiscoveryMetadata,vT=new Set;gT.metadata.forEach(t=>{t.aliases.forEach(e=>{vT.add(e);});});function tq(t,e){var i;let r,n=t.canonicalAuthority;if(n){let o=new Ht(n).getUrlComponents().HostNameAndPort;r=QL(o,(i=t.cloudDiscoveryMetadata)==null?void 0:i.metadata,zn.CONFIG,e)||QL(o,gT.metadata,zn.HARDCODED_VALUES,e)||t.knownAuthorities;}return r||[]}function QL(t,e,r,n){if(n==null||n.trace(`getAliasesFromMetadata called with source: ${r}`),t&&e){let i=e0(e,t);if(i)return n==null||n.trace(`getAliasesFromMetadata: found cloud discovery metadata in ${r}, returning aliases`),i.aliases;n==null||n.trace(`getAliasesFromMetadata: did not find cloud discovery metadata in ${r}`);}return null}function rq(t){return e0(gT.metadata,t)}function e0(t,e){for(let r=0;r<t.length;r++){let n=t[r];if(n.aliases.includes(e))return n}return null}v();m();y();g();var ho={AAD:"AAD",OIDC:"OIDC"};v();m();y();g();var kl={None:"none",AzurePublic:"https://login.microsoftonline.com",AzurePpe:"https://login.windows-ppe.net",AzureChina:"https://login.chinacloudapi.cn",AzureGermany:"https://login.microsoftonline.de",AzureUsGovernment:"https://login.microsoftonline.us"};v();m();y();g();function nq(t){return t.hasOwnProperty("tenant_discovery_endpoint")&&t.hasOwnProperty("metadata")}v();m();y();g();function iq(t){return t.hasOwnProperty("error")&&t.hasOwnProperty("error_description")}v();m();y();g();v();m();y();g();var ge={AcquireTokenByCode:"acquireTokenByCode",AcquireTokenByRefreshToken:"acquireTokenByRefreshToken",AcquireTokenSilent:"acquireTokenSilent",AcquireTokenSilentAsync:"acquireTokenSilentAsync",AcquireTokenPopup:"acquireTokenPopup",AcquireTokenPreRedirect:"acquireTokenPreRedirect",AcquireTokenRedirect:"acquireTokenRedirect",CryptoOptsGetPublicKeyThumbprint:"cryptoOptsGetPublicKeyThumbprint",CryptoOptsSignJwt:"cryptoOptsSignJwt",SilentCacheClientAcquireToken:"silentCacheClientAcquireToken",SilentIframeClientAcquireToken:"silentIframeClientAcquireToken",AwaitConcurrentIframe:"awaitConcurrentIframe",SilentRefreshClientAcquireToken:"silentRefreshClientAcquireToken",SsoSilent:"ssoSilent",StandardInteractionClientGetDiscoveredAuthority:"standardInteractionClientGetDiscoveredAuthority",FetchAccountIdWithNativeBroker:"fetchAccountIdWithNativeBroker",NativeInteractionClientAcquireToken:"nativeInteractionClientAcquireToken",BaseClientCreateTokenRequestHeaders:"baseClientCreateTokenRequestHeaders",RefreshTokenClientExecutePostToTokenEndpoint:"refreshTokenClientExecutePostToTokenEndpoint",AuthorizationCodeClientExecutePostToTokenEndpoint:"authorizationCodeClientExecutePostToTokenEndpoint",BrokerHandhshake:"brokerHandshake",AcquireTokenByRefreshTokenInBroker:"acquireTokenByRefreshTokenInBroker",AcquireTokenByBroker:"acquireTokenByBroker",RefreshTokenClientExecuteTokenRequest:"refreshTokenClientExecuteTokenRequest",RefreshTokenClientAcquireToken:"refreshTokenClientAcquireToken",RefreshTokenClientAcquireTokenWithCachedRefreshToken:"refreshTokenClientAcquireTokenWithCachedRefreshToken",RefreshTokenClientAcquireTokenByRefreshToken:"refreshTokenClientAcquireTokenByRefreshToken",RefreshTokenClientCreateTokenRequestBody:"refreshTokenClientCreateTokenRequestBody",AcquireTokenFromCache:"acquireTokenFromCache",SilentFlowClientAcquireCachedToken:"silentFlowClientAcquireCachedToken",SilentFlowClientGenerateResultFromCacheRecord:"silentFlowClientGenerateResultFromCacheRecord",AcquireTokenBySilentIframe:"acquireTokenBySilentIframe",InitializeBaseRequest:"initializeBaseRequest",InitializeSilentRequest:"initializeSilentRequest",InitializeClientApplication:"initializeClientApplication",SilentIframeClientTokenHelper:"silentIframeClientTokenHelper",SilentHandlerInitiateAuthRequest:"silentHandlerInitiateAuthRequest",SilentHandlerMonitorIframeForHash:"silentHandlerMonitorIframeForHash",SilentHandlerLoadFrame:"silentHandlerLoadFrame",SilentHandlerLoadFrameSync:"silentHandlerLoadFrameSync",StandardInteractionClientCreateAuthCodeClient:"standardInteractionClientCreateAuthCodeClient",StandardInteractionClientGetClientConfiguration:"standardInteractionClientGetClientConfiguration",StandardInteractionClientInitializeAuthorizationRequest:"standardInteractionClientInitializeAuthorizationRequest",StandardInteractionClientInitializeAuthorizationCodeRequest:"standardInteractionClientInitializeAuthorizationCodeRequest",GetAuthCodeUrl:"getAuthCodeUrl",HandleCodeResponseFromServer:"handleCodeResponseFromServer",HandleCodeResponse:"handleCodeResponse",UpdateTokenEndpointAuthority:"updateTokenEndpointAuthority",AuthClientAcquireToken:"authClientAcquireToken",AuthClientExecuteTokenRequest:"authClientExecuteTokenRequest",AuthClientCreateTokenRequestBody:"authClientCreateTokenRequestBody",AuthClientCreateQueryString:"authClientCreateQueryString",PopTokenGenerateCnf:"popTokenGenerateCnf",PopTokenGenerateKid:"popTokenGenerateKid",HandleServerTokenResponse:"handleServerTokenResponse",DeserializeResponse:"deserializeResponse",AuthorityFactoryCreateDiscoveredInstance:"authorityFactoryCreateDiscoveredInstance",AuthorityResolveEndpointsAsync:"authorityResolveEndpointsAsync",AuthorityResolveEndpointsFromLocalSources:"authorityResolveEndpointsFromLocalSources",AuthorityGetCloudDiscoveryMetadataFromNetwork:"authorityGetCloudDiscoveryMetadataFromNetwork",AuthorityUpdateCloudDiscoveryMetadata:"authorityUpdateCloudDiscoveryMetadata",AuthorityGetEndpointMetadataFromNetwork:"authorityGetEndpointMetadataFromNetwork",AuthorityUpdateEndpointMetadata:"authorityUpdateEndpointMetadata",AuthorityUpdateMetadataWithRegionalInformation:"authorityUpdateMetadataWithRegionalInformation",RegionDiscoveryDetectRegion:"regionDiscoveryDetectRegion",RegionDiscoveryGetRegionFromIMDS:"regionDiscoveryGetRegionFromIMDS",RegionDiscoveryGetCurrentVersion:"regionDiscoveryGetCurrentVersion",AcquireTokenByCodeAsync:"acquireTokenByCodeAsync",GetEndpointMetadataFromNetwork:"getEndpointMetadataFromNetwork",GetCloudDiscoveryMetadataFromNetworkMeasurement:"getCloudDiscoveryMetadataFromNetworkMeasurement",HandleRedirectPromiseMeasurement:"handleRedirectPromise",HandleNativeRedirectPromiseMeasurement:"handleNativeRedirectPromise",UpdateCloudDiscoveryMetadataMeasurement:"updateCloudDiscoveryMetadataMeasurement",UsernamePasswordClientAcquireToken:"usernamePasswordClientAcquireToken",NativeMessageHandlerHandshake:"nativeMessageHandlerHandshake",NativeGenerateAuthResult:"nativeGenerateAuthResult",RemoveHiddenIframe:"removeHiddenIframe",ClearTokensAndKeysWithClaims:"clearTokensAndKeysWithClaims",CacheManagerGetRefreshToken:"cacheManagerGetRefreshToken",GeneratePkceCodes:"generatePkceCodes",GenerateCodeVerifier:"generateCodeVerifier",GenerateCodeChallengeFromVerifier:"generateCodeChallengeFromVerifier",Sha256Digest:"sha256Digest",GetRandomValues:"getRandomValues"};v();m();y();g();var oq=(t,e,r,n,i)=>(...o)=>{r.trace(`Executing function ${e}`);let a=n==null?void 0:n.startMeasurement(e,i);if(i){let s=e+"CallCount";n==null||n.incrementFields({[s]:1},i);}try{let s=t(...o);return a==null||a.end({success:!0}),r.trace(`Returning result from ${e}`),s}catch(s){r.trace(`Error occurred in ${e}`);try{r.trace(JSON.stringify(s));}catch(c){r.trace("Unable to print error message.");}throw a==null||a.end({success:!1},s),s}},Lt=(t,e,r,n,i)=>(...o)=>{r.trace(`Executing function ${e}`);let a=n==null?void 0:n.startMeasurement(e,i);if(i){let s=e+"CallCount";n==null||n.incrementFields({[s]:1},i);}return n==null||n.setPreQueueTime(e,i),t(...o).then(s=>(r.trace(`Returning result from ${e}`),a==null||a.end({success:!0}),s)).catch(s=>{r.trace(`Error occurred in ${e}`);try{r.trace(JSON.stringify(s));}catch(c){r.trace("Unable to print error message.");}throw a==null||a.end({success:!1},s),s})};var t0=class t{constructor(e,r,n,i){this.networkInterface=e,this.logger=r,this.performanceClient=n,this.correlationId=i;}detectRegion(e,r){return re(this,null,function*(){var i;(i=this.performanceClient)==null||i.addQueueMeasurement(ge.RegionDiscoveryDetectRegion,this.correlationId);let n=e;if(n)r.region_source=il.ENVIRONMENT_VARIABLE;else {let o=t.IMDS_OPTIONS;try{let a=yield Lt(this.getRegionFromIMDS.bind(this),ge.RegionDiscoveryGetRegionFromIMDS,this.logger,this.performanceClient,this.correlationId)(be.IMDS_VERSION,o);if(a.status===Mm.httpSuccess&&(n=a.body,r.region_source=il.IMDS),a.status===Mm.httpBadRequest){let s=yield Lt(this.getCurrentVersion.bind(this),ge.RegionDiscoveryGetCurrentVersion,this.logger,this.performanceClient,this.correlationId)(o);if(!s)return r.region_source=il.FAILED_AUTO_DETECTION,null;let c=yield Lt(this.getRegionFromIMDS.bind(this),ge.RegionDiscoveryGetRegionFromIMDS,this.logger,this.performanceClient,this.correlationId)(s,o);c.status===Mm.httpSuccess&&(n=c.body,r.region_source=il.IMDS);}}catch(a){return r.region_source=il.FAILED_AUTO_DETECTION,null}}return n||(r.region_source=il.FAILED_AUTO_DETECTION),n||null})}getRegionFromIMDS(e,r){return re(this,null,function*(){var n;return (n=this.performanceClient)==null||n.addQueueMeasurement(ge.RegionDiscoveryGetRegionFromIMDS,this.correlationId),this.networkInterface.sendGetRequestAsync(`${be.IMDS_ENDPOINT}?api-version=${e}&format=text`,r,be.IMDS_TIMEOUT)})}getCurrentVersion(e){return re(this,null,function*(){var r;(r=this.performanceClient)==null||r.addQueueMeasurement(ge.RegionDiscoveryGetCurrentVersion,this.correlationId);try{let n=yield this.networkInterface.sendGetRequestAsync(`${be.IMDS_ENDPOINT}?format=json`,e);return n.status===Mm.httpBadRequest&&n.body&&n.body["newest-versions"]&&n.body["newest-versions"].length>0?n.body["newest-versions"][0]:null}catch(n){return null}})}};t0.IMDS_OPTIONS={headers:{Metadata:"true"}};var rn={};Cr(rn,{createAccessTokenEntity:()=>ET,createIdTokenEntity:()=>wT,createRefreshTokenEntity:()=>_T,generateAppMetadataKey:()=>Bhe,generateAuthorityMetadataExpiresAt:()=>d1,generateCredentialKey:()=>r0,isAccessTokenEntity:()=>Ahe,isAppMetadataEntity:()=>Uhe,isAuthorityMetadataEntity:()=>Dhe,isAuthorityMetadataExpired:()=>h1,isCredentialEntity:()=>f1,isIdTokenEntity:()=>The,isRefreshTokenEntity:()=>Rhe,isServerTelemetryEntity:()=>khe,isThrottlingEntity:()=>Phe,updateAuthorityEndpointMetadata:()=>$d,updateCloudDiscoveryMetadata:()=>n0});v();m();y();g();var mn={};Cr(mn,{delay:()=>Che,isTokenExpired:()=>jd,nowSeconds:()=>Ti,wasClockTurnedBack:()=>bT});v();m();y();g();function Ti(){return Math.round(new Date().getTime()/1e3)}function jd(t,e){let r=Number(t)||0;return Ti()+e>r}function bT(t){return Number(t)>Ti()}function Che(t,e){return new Promise(r=>setTimeout(()=>r(e),t))}function r0(t){return [xhe(t),Ihe(t),Mhe(t),Ohe(t),Nhe(t)].join(kr.CACHE_KEY_SEPARATOR).toLowerCase()}function wT(t,e,r,n,i){return {credentialType:Wt.ID_TOKEN,homeAccountId:t,environment:e,clientId:n,secret:r,realm:i}}function ET(t,e,r,n,i,o,a,s,c,u,l,w,T,x,I){var q,j;let k={homeAccountId:t,credentialType:Wt.ACCESS_TOKEN,secret:r,cachedAt:Ti().toString(),expiresOn:a.toString(),extendedExpiresOn:s.toString(),environment:e,clientId:n,realm:i,target:o,tokenType:l||Dt.BEARER};if(w&&(k.userAssertionHash=w),u&&(k.refreshOn=u.toString()),x&&(k.requestedClaims=x,k.requestedClaimsHash=I),((q=k.tokenType)==null?void 0:q.toLowerCase())!==Dt.BEARER.toLowerCase())switch(k.credentialType=Wt.ACCESS_TOKEN_WITH_AUTH_SCHEME,k.tokenType){case Dt.POP:let K=Es(r,c);if(!((j=K==null?void 0:K.cnf)!=null&&j.kid))throw Ae(vl);k.keyId=K.cnf.kid;break;case Dt.SSH:k.keyId=T;}return k}function _T(t,e,r,n,i,o,a){let s={credentialType:Wt.REFRESH_TOKEN,homeAccountId:t,environment:e,clientId:n,secret:r};return o&&(s.userAssertionHash=o),i&&(s.familyId=i),a&&(s.expiresOn=a.toString()),s}function f1(t){return t.hasOwnProperty("homeAccountId")&&t.hasOwnProperty("environment")&&t.hasOwnProperty("credentialType")&&t.hasOwnProperty("clientId")&&t.hasOwnProperty("secret")}function Ahe(t){return t?f1(t)&&t.hasOwnProperty("realm")&&t.hasOwnProperty("target")&&(t.credentialType===Wt.ACCESS_TOKEN||t.credentialType===Wt.ACCESS_TOKEN_WITH_AUTH_SCHEME):!1}function The(t){return t?f1(t)&&t.hasOwnProperty("realm")&&t.credentialType===Wt.ID_TOKEN:!1}function Rhe(t){return t?f1(t)&&t.credentialType===Wt.REFRESH_TOKEN:!1}function xhe(t){return [t.homeAccountId,t.environment].join(kr.CACHE_KEY_SEPARATOR).toLowerCase()}function Ihe(t){let e=t.credentialType===Wt.REFRESH_TOKEN&&t.familyId||t.clientId;return [t.credentialType,e,t.realm||""].join(kr.CACHE_KEY_SEPARATOR).toLowerCase()}function Mhe(t){return (t.target||"").toLowerCase()}function Ohe(t){return (t.requestedClaimsHash||"").toLowerCase()}function Nhe(t){return t.tokenType&&t.tokenType.toLowerCase()!==Dt.BEARER.toLowerCase()?t.tokenType.toLowerCase():""}function khe(t,e){let r=t.indexOf(tn.CACHE_KEY)===0,n=!0;return e&&(n=e.hasOwnProperty("failedRequests")&&e.hasOwnProperty("errors")&&e.hasOwnProperty("cacheHits")),r&&n}function Phe(t,e){let r=!1;t&&(r=t.indexOf(gs.THROTTLING_PREFIX)===0);let n=!0;return e&&(n=e.hasOwnProperty("throttleTime")),r&&n}function Bhe({environment:t,clientId:e}){return [Im,t,e].join(kr.CACHE_KEY_SEPARATOR).toLowerCase()}function Uhe(t,e){return e?t.indexOf(Im)===0&&e.hasOwnProperty("clientId")&&e.hasOwnProperty("environment"):!1}function Dhe(t,e){return e?t.indexOf(zd.CACHE_KEY)===0&&e.hasOwnProperty("aliases")&&e.hasOwnProperty("preferred_cache")&&e.hasOwnProperty("preferred_network")&&e.hasOwnProperty("canonical_authority")&&e.hasOwnProperty("authorization_endpoint")&&e.hasOwnProperty("token_endpoint")&&e.hasOwnProperty("issuer")&&e.hasOwnProperty("aliasesFromNetwork")&&e.hasOwnProperty("endpointsFromNetwork")&&e.hasOwnProperty("expiresAt")&&e.hasOwnProperty("jwks_uri"):!1}function d1(){return Ti()+zd.REFRESH_TIME_SECONDS}function $d(t,e,r){t.authorization_endpoint=e.authorization_endpoint,t.token_endpoint=e.token_endpoint,t.end_session_endpoint=e.end_session_endpoint,t.issuer=e.issuer,t.endpointsFromNetwork=r,t.jwks_uri=e.jwks_uri;}function n0(t,e,r){t.aliases=e.aliases,t.preferred_cache=e.preferred_cache,t.preferred_network=e.preferred_network,t.aliasesFromNetwork=r;}function h1(t){return t.expiresAt<=Ti()}var Go=class t{constructor(e,r,n,i,o,a,s,c){this.canonicalAuthority=e,this._canonicalAuthority.validateAsUri(),this.networkInterface=r,this.cacheManager=n,this.authorityOptions=i,this.regionDiscoveryMetadata={region_used:void 0,region_source:void 0,region_outcome:void 0},this.logger=o,this.performanceClient=s,this.correlationId=a,this.managedIdentity=c||!1,this.regionDiscovery=new t0(r,this.logger,this.performanceClient,this.correlationId);}getAuthorityType(e){if(e.HostNameAndPort.endsWith(be.CIAM_AUTH_URL))return fo.Ciam;let r=e.PathSegments;if(r.length)switch(r[0].toLowerCase()){case be.ADFS:return fo.Adfs;case be.DSTS:return fo.Dsts}return fo.Default}get authorityType(){return this.getAuthorityType(this.canonicalAuthorityUrlComponents)}get protocolMode(){return this.authorityOptions.protocolMode}get options(){return this.authorityOptions}get canonicalAuthority(){return this._canonicalAuthority.urlString}set canonicalAuthority(e){this._canonicalAuthority=new Ht(e),this._canonicalAuthority.validateAsUri(),this._canonicalAuthorityUrlComponents=null;}get canonicalAuthorityUrlComponents(){return this._canonicalAuthorityUrlComponents||(this._canonicalAuthorityUrlComponents=this._canonicalAuthority.getUrlComponents()),this._canonicalAuthorityUrlComponents}get hostnameAndPort(){return this.canonicalAuthorityUrlComponents.HostNameAndPort.toLowerCase()}get tenant(){return this.canonicalAuthorityUrlComponents.PathSegments[0]}get authorizationEndpoint(){if(this.discoveryComplete())return this.replacePath(this.metadata.authorization_endpoint);throw Ae(Hn)}get tokenEndpoint(){if(this.discoveryComplete())return this.replacePath(this.metadata.token_endpoint);throw Ae(Hn)}get deviceCodeEndpoint(){if(this.discoveryComplete())return this.replacePath(this.metadata.token_endpoint.replace("/token","/devicecode"));throw Ae(Hn)}get endSessionEndpoint(){if(this.discoveryComplete()){if(!this.metadata.end_session_endpoint)throw Ae(El);return this.replacePath(this.metadata.end_session_endpoint)}else throw Ae(Hn)}get selfSignedJwtAudience(){if(this.discoveryComplete())return this.replacePath(this.metadata.issuer);throw Ae(Hn)}get jwksUri(){if(this.discoveryComplete())return this.replacePath(this.metadata.jwks_uri);throw Ae(Hn)}canReplaceTenant(e){return e.PathSegments.length===1&&!t.reservedTenantDomains.has(e.PathSegments[0])&&this.getAuthorityType(e)===fo.Default&&this.protocolMode===ho.AAD}replaceTenant(e){return e.replace(/{tenant}|{tenantid}/g,this.tenant)}replacePath(e){let r=e,i=new Ht(this.metadata.canonical_authority).getUrlComponents(),o=i.PathSegments;return this.canonicalAuthorityUrlComponents.PathSegments.forEach((s,c)=>{let u=o[c];if(c===0&&this.canReplaceTenant(i)){let l=new Ht(this.metadata.authorization_endpoint).getUrlComponents().PathSegments[0];u!==l&&(this.logger.verbose(`Replacing tenant domain name ${u} with id ${l}`),u=l);}s!==u&&(r=r.replace(`/${u}/`,`/${s}/`));}),this.replaceTenant(r)}get defaultOpenIdConfigurationEndpoint(){let e=this.hostnameAndPort;return this.canonicalAuthority.endsWith("v2.0/")||this.authorityType===fo.Adfs||this.protocolMode!==ho.AAD&&!this.isAliasOfKnownMicrosoftAuthority(e)?`${this.canonicalAuthority}.well-known/openid-configuration`:`${this.canonicalAuthority}v2.0/.well-known/openid-configuration`}discoveryComplete(){return !!this.metadata}resolveEndpointsAsync(){return re(this,null,function*(){var i,o;(i=this.performanceClient)==null||i.addQueueMeasurement(ge.AuthorityResolveEndpointsAsync,this.correlationId);let e=this.getCurrentMetadataEntity(),r=yield Lt(this.updateCloudDiscoveryMetadata.bind(this),ge.AuthorityUpdateCloudDiscoveryMetadata,this.logger,this.performanceClient,this.correlationId)(e);this.canonicalAuthority=this.canonicalAuthority.replace(this.hostnameAndPort,e.preferred_network);let n=yield Lt(this.updateEndpointMetadata.bind(this),ge.AuthorityUpdateEndpointMetadata,this.logger,this.performanceClient,this.correlationId)(e);this.updateCachedMetadata(e,r,{source:n}),(o=this.performanceClient)==null||o.addFields({cloudDiscoverySource:r,authorityEndpointSource:n},this.correlationId);})}getCurrentMetadataEntity(){let e=this.cacheManager.getAuthorityMetadataByAlias(this.hostnameAndPort);return e||(e={aliases:[],preferred_cache:this.hostnameAndPort,preferred_network:this.hostnameAndPort,canonical_authority:this.canonicalAuthority,authorization_endpoint:"",token_endpoint:"",end_session_endpoint:"",issuer:"",aliasesFromNetwork:!1,endpointsFromNetwork:!1,expiresAt:d1(),jwks_uri:""}),e}updateCachedMetadata(e,r,n){r!==zn.CACHE&&(n==null?void 0:n.source)!==zn.CACHE&&(e.expiresAt=d1(),e.canonical_authority=this.canonicalAuthority);let i=this.cacheManager.generateAuthorityMetadataCacheKey(e.preferred_cache);this.cacheManager.setAuthorityMetadata(i,e),this.metadata=e;}updateEndpointMetadata(e){return re(this,null,function*(){var i,o,a;(i=this.performanceClient)==null||i.addQueueMeasurement(ge.AuthorityUpdateEndpointMetadata,this.correlationId);let r=this.updateEndpointMetadataFromLocalSources(e);if(r){if(r.source===zn.HARDCODED_VALUES&&(o=this.authorityOptions.azureRegionConfiguration)!=null&&o.azureRegion&&r.metadata){let s=yield Lt(this.updateMetadataWithRegionalInformation.bind(this),ge.AuthorityUpdateMetadataWithRegionalInformation,this.logger,this.performanceClient,this.correlationId)(r.metadata);$d(e,s,!1),e.canonical_authority=this.canonicalAuthority;}return r.source}let n=yield Lt(this.getEndpointMetadataFromNetwork.bind(this),ge.AuthorityGetEndpointMetadataFromNetwork,this.logger,this.performanceClient,this.correlationId)();if(n)return (a=this.authorityOptions.azureRegionConfiguration)!=null&&a.azureRegion&&(n=yield Lt(this.updateMetadataWithRegionalInformation.bind(this),ge.AuthorityUpdateMetadataWithRegionalInformation,this.logger,this.performanceClient,this.correlationId)(n)),$d(e,n,!0),zn.NETWORK;throw Ae(cl,this.defaultOpenIdConfigurationEndpoint)})}updateEndpointMetadataFromLocalSources(e){this.logger.verbose("Attempting to get endpoint metadata from authority configuration");let r=this.getEndpointMetadataFromConfig();if(r)return this.logger.verbose("Found endpoint metadata in authority configuration"),$d(e,r,!1),{source:zn.CONFIG};if(this.logger.verbose("Did not find endpoint metadata in the config... Attempting to get endpoint metadata from the hardcoded values."),this.authorityOptions.skipAuthorityMetadataCache)this.logger.verbose("Skipping hardcoded metadata cache since skipAuthorityMetadataCache is set to true. Attempting to get endpoint metadata from the network metadata cache.");else {let i=this.getEndpointMetadataFromHardcodedValues();if(i)return $d(e,i,!1),{source:zn.HARDCODED_VALUES,metadata:i};this.logger.verbose("Did not find endpoint metadata in hardcoded values... Attempting to get endpoint metadata from the network metadata cache.");}let n=h1(e);return this.isAuthoritySameType(e)&&e.endpointsFromNetwork&&!n?(this.logger.verbose("Found endpoint metadata in the cache."),{source:zn.CACHE}):(n&&this.logger.verbose("The metadata entity is expired."),null)}isAuthoritySameType(e){return new Ht(e.canonical_authority).getUrlComponents().PathSegments.length===this.canonicalAuthorityUrlComponents.PathSegments.length}getEndpointMetadataFromConfig(){if(this.authorityOptions.authorityMetadata)try{return JSON.parse(this.authorityOptions.authorityMetadata)}catch(e){throw Jt(Ol)}return null}getEndpointMetadataFromNetwork(){return re(this,null,function*(){var n;(n=this.performanceClient)==null||n.addQueueMeasurement(ge.AuthorityGetEndpointMetadataFromNetwork,this.correlationId);let e={},r=this.defaultOpenIdConfigurationEndpoint;this.logger.verbose(`Authority.getEndpointMetadataFromNetwork: attempting to retrieve OAuth endpoints from ${r}`);try{let i=yield this.networkInterface.sendGetRequestAsync(r,e);return JL(i.body)?i.body:(this.logger.verbose("Authority.getEndpointMetadataFromNetwork: could not parse response as OpenID configuration"),null)}catch(i){return this.logger.verbose(`Authority.getEndpointMetadataFromNetwork: ${i}`),null}})}getEndpointMetadataFromHardcodedValues(){return this.hostnameAndPort in yT?yT[this.hostnameAndPort]:null}updateMetadataWithRegionalInformation(e){return re(this,null,function*(){var n,i,o;(n=this.performanceClient)==null||n.addQueueMeasurement(ge.AuthorityUpdateMetadataWithRegionalInformation,this.correlationId);let r=(i=this.authorityOptions.azureRegionConfiguration)==null?void 0:i.azureRegion;if(r){if(r!==be.AZURE_REGION_AUTO_DISCOVER_FLAG)return this.regionDiscoveryMetadata.region_outcome=o1.CONFIGURED_NO_AUTO_DETECTION,this.regionDiscoveryMetadata.region_used=r,t.replaceWithRegionalInformation(e,r);let a=yield Lt(this.regionDiscovery.detectRegion.bind(this.regionDiscovery),ge.RegionDiscoveryDetectRegion,this.logger,this.performanceClient,this.correlationId)((o=this.authorityOptions.azureRegionConfiguration)==null?void 0:o.environmentRegion,this.regionDiscoveryMetadata);if(a)return this.regionDiscoveryMetadata.region_outcome=o1.AUTO_DETECTION_REQUESTED_SUCCESSFUL,this.regionDiscoveryMetadata.region_used=a,t.replaceWithRegionalInformation(e,a);this.regionDiscoveryMetadata.region_outcome=o1.AUTO_DETECTION_REQUESTED_FAILED;}return e})}updateCloudDiscoveryMetadata(e){return re(this,null,function*(){var i;(i=this.performanceClient)==null||i.addQueueMeasurement(ge.AuthorityUpdateCloudDiscoveryMetadata,this.correlationId);let r=this.updateCloudDiscoveryMetadataFromLocalSources(e);if(r)return r;let n=yield Lt(this.getCloudDiscoveryMetadataFromNetwork.bind(this),ge.AuthorityGetCloudDiscoveryMetadataFromNetwork,this.logger,this.performanceClient,this.correlationId)();if(n)return n0(e,n,!0),zn.NETWORK;throw Jt(Nl)})}updateCloudDiscoveryMetadataFromLocalSources(e){this.logger.verbose("Attempting to get cloud discovery metadata from authority configuration"),this.logger.verbosePii(`Known Authorities: ${this.authorityOptions.knownAuthorities||be.NOT_APPLICABLE}`),this.logger.verbosePii(`Authority Metadata: ${this.authorityOptions.authorityMetadata||be.NOT_APPLICABLE}`),this.logger.verbosePii(`Canonical Authority: ${e.canonical_authority||be.NOT_APPLICABLE}`);let r=this.getCloudDiscoveryMetadataFromConfig();if(r)return this.logger.verbose("Found cloud discovery metadata in authority configuration"),n0(e,r,!1),zn.CONFIG;if(this.logger.verbose("Did not find cloud discovery metadata in the config... Attempting to get cloud discovery metadata from the hardcoded values."),this.options.skipAuthorityMetadataCache)this.logger.verbose("Skipping hardcoded cloud discovery metadata cache since skipAuthorityMetadataCache is set to true. Attempting to get cloud discovery metadata from the network metadata cache.");else {let i=rq(this.hostnameAndPort);if(i)return this.logger.verbose("Found cloud discovery metadata from hardcoded values."),n0(e,i,!1),zn.HARDCODED_VALUES;this.logger.verbose("Did not find cloud discovery metadata in hardcoded values... Attempting to get cloud discovery metadata from the network metadata cache.");}let n=h1(e);return this.isAuthoritySameType(e)&&e.aliasesFromNetwork&&!n?(this.logger.verbose("Found cloud discovery metadata in the cache."),zn.CACHE):(n&&this.logger.verbose("The metadata entity is expired."),null)}getCloudDiscoveryMetadataFromConfig(){if(this.authorityType===fo.Ciam)return this.logger.verbose("CIAM authorities do not support cloud discovery metadata, generate the aliases from authority host."),t.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort);if(this.authorityOptions.cloudDiscoveryMetadata){this.logger.verbose("The cloud discovery metadata has been provided as a network response, in the config.");try{this.logger.verbose("Attempting to parse the cloud discovery metadata.");let e=JSON.parse(this.authorityOptions.cloudDiscoveryMetadata),r=e0(e.metadata,this.hostnameAndPort);if(this.logger.verbose("Parsed the cloud discovery metadata."),r)return this.logger.verbose("There is returnable metadata attached to the parsed cloud discovery metadata."),r;this.logger.verbose("There is no metadata attached to the parsed cloud discovery metadata.");}catch(e){throw this.logger.verbose("Unable to parse the cloud discovery metadata. Throwing Invalid Cloud Discovery Metadata Error."),Jt(Tc)}}return this.isInKnownAuthorities()?(this.logger.verbose("The host is included in knownAuthorities. Creating new cloud discovery metadata from the host."),t.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort)):null}getCloudDiscoveryMetadataFromNetwork(){return re(this,null,function*(){var i;(i=this.performanceClient)==null||i.addQueueMeasurement(ge.AuthorityGetCloudDiscoveryMetadataFromNetwork,this.correlationId);let e=`${be.AAD_INSTANCE_DISCOVERY_ENDPT}${this.canonicalAuthority}oauth2/v2.0/authorize`,r={},n=null;try{let o=yield this.networkInterface.sendGetRequestAsync(e,r),a,s;if(nq(o.body))a=o.body,s=a.metadata,this.logger.verbosePii(`tenant_discovery_endpoint is: ${a.tenant_discovery_endpoint}`);else if(iq(o.body)){if(this.logger.warning(`A CloudInstanceDiscoveryErrorResponse was returned. The cloud instance discovery network request's status code is: ${o.status}`),a=o.body,a.error===be.INVALID_INSTANCE)return this.logger.error("The CloudInstanceDiscoveryErrorResponse error is invalid_instance."),null;this.logger.warning(`The CloudInstanceDiscoveryErrorResponse error is ${a.error}`),this.logger.warning(`The CloudInstanceDiscoveryErrorResponse error description is ${a.error_description}`),this.logger.warning("Setting the value of the CloudInstanceDiscoveryMetadata (returned from the network) to []"),s=[];}else return this.logger.error("AAD did not return a CloudInstanceDiscoveryResponse or CloudInstanceDiscoveryErrorResponse"),null;this.logger.verbose("Attempting to find a match between the developer's authority and the CloudInstanceDiscoveryMetadata returned from the network request."),n=e0(s,this.hostnameAndPort);}catch(o){if(o instanceof Yt)this.logger.error(`There was a network error while attempting to get the cloud discovery instance metadata.
Error: ${o.errorCode}
Error Description: ${o.errorMessage}`);else {let a=o;this.logger.error(`A non-MSALJS error was thrown while attempting to get the cloud instance discovery metadata.
Error: ${a.name}
Error Description: ${a.message}`);}return null}return n||(this.logger.warning("The developer's authority was not found within the CloudInstanceDiscoveryMetadata returned from the network request."),this.logger.verbose("Creating custom Authority for custom domain scenario."),n=t.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort)),n})}isInKnownAuthorities(){return this.authorityOptions.knownAuthorities.filter(r=>r&&Ht.getDomainFromUrl(r).toLowerCase()===this.hostnameAndPort).length>0}static generateAuthority(e,r){let n;if(r&&r.azureCloudInstance!==kl.None){let i=r.tenant?r.tenant:be.DEFAULT_COMMON_TENANT;n=`${r.azureCloudInstance}/${i}/`;}return n||e}static createCloudDiscoveryMetadataFromHost(e){return {preferred_network:e,preferred_cache:e,aliases:[e]}}getPreferredCache(){if(this.managedIdentity)return be.DEFAULT_AUTHORITY_HOST;if(this.discoveryComplete())return this.metadata.preferred_cache;throw Ae(Hn)}isAlias(e){return this.metadata.aliases.indexOf(e)>-1}isAliasOfKnownMicrosoftAuthority(e){return vT.has(e)}static isPublicCloudAuthority(e){return be.KNOWN_PUBLIC_CLOUDS.indexOf(e)>=0}static buildRegionalAuthorityString(e,r,n){let i=new Ht(e);i.validateAsUri();let o=i.getUrlComponents(),a=`${r}.${o.HostNameAndPort}`;this.isPublicCloudAuthority(o.HostNameAndPort)&&(a=`${r}.${be.REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX}`);let s=Ht.constructAuthorityUriFromObject(Me(oe({},i.getUrlComponents()),{HostNameAndPort:a})).urlString;return n?`${s}?${n}`:s}static replaceWithRegionalInformation(e,r){let n=oe({},e);return n.authorization_endpoint=t.buildRegionalAuthorityString(n.authorization_endpoint,r),n.token_endpoint=t.buildRegionalAuthorityString(n.token_endpoint,r),n.end_session_endpoint&&(n.end_session_endpoint=t.buildRegionalAuthorityString(n.end_session_endpoint,r)),n}static transformCIAMAuthority(e){let r=e,i=new Ht(e).getUrlComponents();if(i.PathSegments.length===0&&i.HostNameAndPort.endsWith(be.CIAM_AUTH_URL)){let o=i.HostNameAndPort.split(".")[0];r=`${r}${o}${be.AAD_TENANT_DOMAIN_SUFFIX}`;}return r}};Go.reservedTenantDomains=new Set(["{tenant}","{tenantid}",Ai.COMMON,Ai.CONSUMERS,Ai.ORGANIZATIONS]);function aq(t){var i;let n=(i=new Ht(t).getUrlComponents().PathSegments.slice(-1)[0])==null?void 0:i.toLowerCase();switch(n){case Ai.COMMON:case Ai.ORGANIZATIONS:case Ai.CONSUMERS:return;default:return n}}function p1(t){return t.endsWith(be.FORWARD_SLASH)?t:`${t}${be.FORWARD_SLASH}`}function ST(t){let e=t.cloudDiscoveryMetadata,r;if(e)try{r=JSON.parse(e);}catch(n){throw Jt(Tc)}return {canonicalAuthority:t.authority?p1(t.authority):void 0,knownAuthorities:t.knownAuthorities,cloudDiscoveryMetadata:r}}function CT(t,e,r,n,i,o,a){return re(this,null,function*(){a==null||a.addQueueMeasurement(ge.AuthorityFactoryCreateDiscoveredInstance,o);let s=Go.transformCIAMAuthority(p1(t)),c=new Go(s,e,r,n,i,o,a);try{return yield Lt(c.resolveEndpointsAsync.bind(c),ge.AuthorityResolveEndpointsAsync,i,a,o)(),c}catch(u){throw Ae(Hn)}})}v();m();y();g();function jn(t,e,r){return re(this,null,function*(){return typeof t=="string"?t:t({clientId:e,tokenEndpoint:r})})}var w1={};Cr(w1,{ACCESS_TOKEN:()=>Fhe,CCS_HEADER:()=>Whe,CLAIMS:()=>xT,CLIENT_ASSERTION:()=>XT,CLIENT_ASSERTION_TYPE:()=>QT,CLIENT_ID:()=>Rc,CLIENT_INFO:()=>Vhe,CLIENT_REQUEST_ID:()=>LT,CLIENT_SECRET:()=>JT,CODE:()=>PT,CODE_CHALLENGE:()=>BT,CODE_CHALLENGE_METHOD:()=>UT,CODE_VERIFIER:()=>DT,DEVICE_CODE:()=>ZT,DOMAIN_HINT:()=>aR,ERROR:()=>Lhe,ERROR_DESCRIPTION:()=>qhe,EXPIRES_IN:()=>Hhe,FOCI:()=>Khe,GRANT_TYPE:()=>RT,ID_TOKEN:()=>zhe,ID_TOKEN_HINT:()=>YT,LOGIN_HINT:()=>oR,LOGOUT_HINT:()=>nR,NATIVE_BROKER:()=>rR,NONCE:()=>NT,OBO_ASSERTION:()=>eR,ON_BEHALF_OF:()=>Ghe,POST_LOGOUT_URI:()=>WT,PROMPT:()=>kT,REDIRECT_URI:()=>AT,REFRESH_TOKEN:()=>MT,REFRESH_TOKEN_EXPIRES_IN:()=>jhe,REQUESTED_TOKEN_USE:()=>tR,REQ_CNF:()=>v1,RESPONSE_MODE:()=>TT,RESPONSE_TYPE:()=>y1,RETURN_SPA_CODE:()=>b1,SCOPE:()=>IT,SESSION_STATE:()=>$he,SID:()=>iR,STATE:()=>OT,TOKEN_TYPE:()=>g1,X_APP_NAME:()=>GT,X_APP_VER:()=>KT,X_CLIENT_CPU:()=>HT,X_CLIENT_CURR_TELEM:()=>jT,X_CLIENT_EXTRA_SKU:()=>Yhe,X_CLIENT_LAST_TELEM:()=>$T,X_CLIENT_OS:()=>zT,X_CLIENT_SKU:()=>qT,X_CLIENT_VER:()=>FT,X_MS_LIB_CAPABILITY:()=>VT});v();m();y();g();var Rc="client_id",AT="redirect_uri",y1="response_type",TT="response_mode",RT="grant_type",xT="claims",IT="scope",Lhe="error",qhe="error_description",Fhe="access_token",zhe="id_token",MT="refresh_token",Hhe="expires_in",jhe="refresh_token_expires_in",OT="state",NT="nonce",kT="prompt",$he="session_state",Vhe="client_info",PT="code",BT="code_challenge",UT="code_challenge_method",DT="code_verifier",LT="client-request-id",qT="x-client-SKU",FT="x-client-VER",zT="x-client-OS",HT="x-client-CPU",jT="x-client-current-telemetry",$T="x-client-last-telemetry",VT="x-ms-lib-capability",GT="x-app-name",KT="x-app-ver",WT="post_logout_redirect_uri",YT="id_token_hint",ZT="device_code",JT="client_secret",XT="client_assertion",QT="client_assertion_type",g1="token_type",v1="req_cnf",eR="assertion",tR="requested_token_use",Ghe="on_behalf_of",Khe="foci",Whe="X-AnchorMailbox",b1="return_spa_code",rR="nativebroker",nR="logout_hint",iR="sid",oR="login_hint",aR="domain_hint",Yhe="x-client-xtra-sku";v();m();y();g();v();m();y();g();v();m();y();g();v();m();y();g();var Vd={createNewGuid:()=>{throw Ae(At)},base64Decode:()=>{throw Ae(At)},base64Encode:()=>{throw Ae(At)},base64UrlEncode:()=>{throw Ae(At)},encodeKid:()=>{throw Ae(At)},getPublicKeyThumbprint(){return re(this,null,function*(){throw Ae(At)})},removeTokenBindingKey(){return re(this,null,function*(){throw Ae(At)})},clearKeystore(){return re(this,null,function*(){throw Ae(At)})},signJwt(){return re(this,null,function*(){throw Ae(At)})},hashString(){return re(this,null,function*(){throw Ae(At)})}};v();m();y();g();var zr;(function(t){t[t.Error=0]="Error",t[t.Warning=1]="Warning",t[t.Info=2]="Info",t[t.Verbose=3]="Verbose",t[t.Trace=4]="Trace";})(zr||(zr={}));var Ko=class t{constructor(e,r,n){this.level=zr.Info;let i=()=>{},o=e||t.createDefaultLoggerOptions();this.localCallback=o.loggerCallback||i,this.piiLoggingEnabled=o.piiLoggingEnabled||!1,this.level=typeof o.logLevel=="number"?o.logLevel:zr.Info,this.correlationId=o.correlationId||be.EMPTY_STRING,this.packageName=r||be.EMPTY_STRING,this.packageVersion=n||be.EMPTY_STRING;}static createDefaultLoggerOptions(){return {loggerCallback:()=>{},piiLoggingEnabled:!1,logLevel:zr.Info}}clone(e,r,n){return new t({loggerCallback:this.localCallback,piiLoggingEnabled:this.piiLoggingEnabled,logLevel:this.level,correlationId:n||this.correlationId},e,r)}logMessage(e,r){if(r.logLevel>this.level||!this.piiLoggingEnabled&&r.containsPii)return;let o=`${`[${new Date().toUTCString()}] : [${r.correlationId||this.correlationId||""}]`} : ${this.packageName}@${this.packageVersion} : ${zr[r.logLevel]} - ${e}`;this.executeCallback(r.logLevel,o,r.containsPii||!1);}executeCallback(e,r,n){this.localCallback&&this.localCallback(e,r,n);}error(e,r){this.logMessage(e,{logLevel:zr.Error,containsPii:!1,correlationId:r||be.EMPTY_STRING});}errorPii(e,r){this.logMessage(e,{logLevel:zr.Error,containsPii:!0,correlationId:r||be.EMPTY_STRING});}warning(e,r){this.logMessage(e,{logLevel:zr.Warning,containsPii:!1,correlationId:r||be.EMPTY_STRING});}warningPii(e,r){this.logMessage(e,{logLevel:zr.Warning,containsPii:!0,correlationId:r||be.EMPTY_STRING});}info(e,r){this.logMessage(e,{logLevel:zr.Info,containsPii:!1,correlationId:r||be.EMPTY_STRING});}infoPii(e,r){this.logMessage(e,{logLevel:zr.Info,containsPii:!0,correlationId:r||be.EMPTY_STRING});}verbose(e,r){this.logMessage(e,{logLevel:zr.Verbose,containsPii:!1,correlationId:r||be.EMPTY_STRING});}verbosePii(e,r){this.logMessage(e,{logLevel:zr.Verbose,containsPii:!0,correlationId:r||be.EMPTY_STRING});}trace(e,r){this.logMessage(e,{logLevel:zr.Trace,containsPii:!1,correlationId:r||be.EMPTY_STRING});}tracePii(e,r){this.logMessage(e,{logLevel:zr.Trace,containsPii:!0,correlationId:r||be.EMPTY_STRING});}isPiiLoggingEnabled(){return this.piiLoggingEnabled||!1}};v();m();y();g();var E1="@azure/msal-common",Gd="14.14.2";v();m();y();g();v();m();y();g();var Wr=class t{constructor(e){let r=e?Pr.trimArrayEntries([...e]):[],n=r?Pr.removeEmptyStringsFromArray(r):[];this.validateInputScopes(n),this.scopes=new Set,n.forEach(i=>this.scopes.add(i));}static fromString(e){let n=(e||be.EMPTY_STRING).split(" ");return new t(n)}static createSearchScopes(e){let r=new t(e);return r.containsOnlyOIDCScopes()?r.removeScope(be.OFFLINE_ACCESS_SCOPE):r.removeOIDCScopes(),r}validateInputScopes(e){if(!e||e.length<1)throw Jt(Tl)}containsScope(e){let r=this.printScopesLowerCase().split(" "),n=new t(r);return e?n.scopes.has(e.toLowerCase()):!1}containsScopeSet(e){return !e||e.scopes.size<=0?!1:this.scopes.size>=e.scopes.size&&e.asArray().every(r=>this.containsScope(r))}containsOnlyOIDCScopes(){let e=0;return mT.forEach(r=>{this.containsScope(r)&&(e+=1);}),this.scopes.size===e}appendScope(e){e&&this.scopes.add(e.trim());}appendScopes(e){try{e.forEach(r=>this.appendScope(r));}catch(r){throw Ae(yl)}}removeScope(e){if(!e)throw Ae(ml);this.scopes.delete(e.trim());}removeOIDCScopes(){mT.forEach(e=>{this.scopes.delete(e);});}unionScopeSets(e){if(!e)throw Ae(Cc);let r=new Set;return e.scopes.forEach(n=>r.add(n.toLowerCase())),this.scopes.forEach(n=>r.add(n.toLowerCase())),r}intersectingScopeSets(e){if(!e)throw Ae(Cc);e.containsOnlyOIDCScopes()||e.removeOIDCScopes();let r=this.unionScopeSets(e),n=e.getScopeCount(),i=this.getScopeCount();return r.size<i+n}getScopeCount(){return this.scopes.size}asArray(){let e=[];return this.scopes.forEach(r=>e.push(r)),e}printScopes(){return this.scopes?this.asArray().join(" "):be.EMPTY_STRING}printScopesLowerCase(){return this.printScopes().toLowerCase()}};v();m();y();g();v();m();y();g();function Kd(t,e){if(!t)throw Ae(ol);try{let r=e(t);return JSON.parse(r)}catch(r){throw Ae(Ec)}}function As(t){if(!t)throw Ae(Ec);let e=t.split(kr.CLIENT_INFO_SEPARATOR,2);return {uid:e[0],utid:e.length<2?be.EMPTY_STRING:e[1]}}v();m();y();g();function i0(t,e){return !!t&&!!e&&t===e.split(".")[1]}function o0(t,e,r,n){if(n){let{oid:i,sub:o,tid:a,name:s,tfp:c,acr:u}=n,l=a||c||u||"";return {tenantId:l,localAccountId:i||o||"",name:s,isHomeTenant:i0(l,t)}}else return {tenantId:r,localAccountId:e,isHomeTenant:i0(r,t)}}function _1(t,e,r,n){let i=t;if(e){let o=e,c=Ns(o,["isHomeTenant"]);i=oe(oe({},t),c);}if(r){let a=o0(t.homeAccountId,t.localAccountId,t.tenantId,r),c=Ns(a,["isHomeTenant"]);return i=Me(oe(oe({},i),c),{idTokenClaims:r,idToken:n}),i}return i}v();m();y();g();function S1(t){return t&&(t.tid||t.tfp||t.acr)||null}var En=class t{generateAccountId(){return [this.homeAccountId,this.environment].join(kr.CACHE_KEY_SEPARATOR).toLowerCase()}generateAccountKey(){return t.generateAccountCacheKey({homeAccountId:this.homeAccountId,environment:this.environment,tenantId:this.realm,username:this.username,localAccountId:this.localAccountId})}getAccountInfo(){return {homeAccountId:this.homeAccountId,environment:this.environment,tenantId:this.realm,username:this.username,localAccountId:this.localAccountId,name:this.name,nativeAccountId:this.nativeAccountId,authorityType:this.authorityType,tenantProfiles:new Map((this.tenantProfiles||[]).map(e=>[e.tenantId,e]))}}isSingleTenant(){return !this.tenantProfiles}static generateAccountCacheKey(e){let r=e.homeAccountId.split(".")[1];return [e.homeAccountId,e.environment||"",r||e.tenantId||""].join(kr.CACHE_KEY_SEPARATOR).toLowerCase()}static createAccount(e,r,n){var u,l,w,T,x,I;let i=new t;r.authorityType===fo.Adfs?i.authorityType=Fd.ADFS_ACCOUNT_TYPE:r.protocolMode===ho.AAD?i.authorityType=Fd.MSSTS_ACCOUNT_TYPE:i.authorityType=Fd.GENERIC_ACCOUNT_TYPE;let o;e.clientInfo&&n&&(o=Kd(e.clientInfo,n)),i.clientInfo=e.clientInfo,i.homeAccountId=e.homeAccountId,i.nativeAccountId=e.nativeAccountId;let a=e.environment||r&&r.getPreferredCache();if(!a)throw Ae(ws);i.environment=a,i.realm=(o==null?void 0:o.utid)||S1(e.idTokenClaims)||"",i.localAccountId=(o==null?void 0:o.uid)||((u=e.idTokenClaims)==null?void 0:u.oid)||((l=e.idTokenClaims)==null?void 0:l.sub)||"";let s=((w=e.idTokenClaims)==null?void 0:w.preferred_username)||((T=e.idTokenClaims)==null?void 0:T.upn),c=(x=e.idTokenClaims)!=null&&x.emails?e.idTokenClaims.emails[0]:null;if(i.username=s||c||"",i.name=((I=e.idTokenClaims)==null?void 0:I.name)||"",i.cloudGraphHostName=e.cloudGraphHostName,i.msGraphHost=e.msGraphHost,e.tenantProfiles)i.tenantProfiles=e.tenantProfiles;else {let k=o0(e.homeAccountId,i.localAccountId,i.realm,e.idTokenClaims);i.tenantProfiles=[k];}return i}static createFromAccountInfo(e,r,n){var o;let i=new t;return i.authorityType=e.authorityType||Fd.GENERIC_ACCOUNT_TYPE,i.homeAccountId=e.homeAccountId,i.localAccountId=e.localAccountId,i.nativeAccountId=e.nativeAccountId,i.realm=e.tenantId,i.environment=e.environment,i.username=e.username,i.name=e.name,i.cloudGraphHostName=r,i.msGraphHost=n,i.tenantProfiles=Array.from(((o=e.tenantProfiles)==null?void 0:o.values())||[]),i}static generateHomeAccountId(e,r,n,i,o){if(!(r===fo.Adfs||r===fo.Dsts)){if(e)try{let a=Kd(e,i.base64Decode);if(a.uid&&a.utid)return `${a.uid}.${a.utid}`}catch(a){}n.warning("No client info in response");}return (o==null?void 0:o.sub)||""}static isAccountEntity(e){return e?e.hasOwnProperty("homeAccountId")&&e.hasOwnProperty("environment")&&e.hasOwnProperty("realm")&&e.hasOwnProperty("localAccountId")&&e.hasOwnProperty("username")&&e.hasOwnProperty("authorityType"):!1}static accountInfoIsEqual(e,r,n){if(!e||!r)return !1;let i=!0;if(n){let o=e.idTokenClaims||{},a=r.idTokenClaims||{};i=o.iat===a.iat&&o.nonce===a.nonce;}return e.homeAccountId===r.homeAccountId&&e.localAccountId===r.localAccountId&&e.username===r.username&&e.tenantId===r.tenantId&&e.environment===r.environment&&e.nativeAccountId===r.nativeAccountId&&i}};v();m();y();g();v();m();y();g();var C1="cache_quota_exceeded",a0="cache_error_unknown";var sR={[C1]:"Exceeded cache storage capacity.",[a0]:"Unexpected error occurred when using cache storage."},Wd=class t extends Error{constructor(e,r){let n=r||(sR[e]?sR[e]:sR[a0]);super(`${e}: ${n}`),Object.setPrototypeOf(this,t.prototype),this.name="CacheError",this.errorCode=e,this.errorMessage=n;}};var xc=class t{constructor(e,r,n,i){this.clientId=e,this.cryptoImpl=r,this.commonLogger=n.clone(E1,Gd),this.staticAuthorityOptions=i;}getAllAccounts(e){return this.buildTenantProfiles(this.getAccountsFilteredBy(e||{}),e)}getAccountInfoFilteredBy(e){let r=this.getAllAccounts(e);return r.length>1?r.sort(i=>i.idTokenClaims?-1:1)[0]:r.length===1?r[0]:null}getBaseAccountInfo(e){let r=this.getAccountsFilteredBy(e);return r.length>0?r[0].getAccountInfo():null}buildTenantProfiles(e,r){return e.flatMap(n=>this.getTenantProfilesFromAccountEntity(n,r==null?void 0:r.tenantId,r))}getTenantedAccountInfoByFilter(e,r,n,i){let o=null,a;if(i&&!this.tenantProfileMatchesFilter(n,i))return null;let s=this.getIdToken(e,r,n.tenantId);return s&&(a=Es(s.secret,this.cryptoImpl.base64Decode),!this.idTokenClaimsMatchTenantProfileFilter(a,i))?null:(o=_1(e,n,a,s==null?void 0:s.secret),o)}getTenantProfilesFromAccountEntity(e,r,n){let i=e.getAccountInfo(),o=i.tenantProfiles||new Map,a=this.getTokenKeys();if(r){let c=o.get(r);if(c)o=new Map([[r,c]]);else return []}let s=[];return o.forEach(c=>{let u=this.getTenantedAccountInfoByFilter(i,a,c,n);u&&s.push(u);}),s}tenantProfileMatchesFilter(e,r){return !(r.localAccountId&&!this.matchLocalAccountIdFromTenantProfile(e,r.localAccountId)||r.name&&e.name!==r.name||r.isHomeTenant!==void 0&&e.isHomeTenant!==r.isHomeTenant)}idTokenClaimsMatchTenantProfileFilter(e,r){return !(r&&(r.localAccountId&&!this.matchLocalAccountIdFromTokenClaims(e,r.localAccountId)||r.loginHint&&!this.matchLoginHintFromTokenClaims(e,r.loginHint)||r.username&&!this.matchUsername(e.preferred_username,r.username)||r.name&&!this.matchName(e,r.name)||r.sid&&!this.matchSid(e,r.sid)))}saveCacheRecord(e,r,n){return re(this,null,function*(){var i,o,a,s;if(!e)throw Ae(gl);try{e.account&&this.setAccount(e.account),e.idToken&&(r==null?void 0:r.idToken)!==!1&&this.setIdTokenCredential(e.idToken),e.accessToken&&(r==null?void 0:r.accessToken)!==!1&&(yield this.saveAccessToken(e.accessToken)),e.refreshToken&&(r==null?void 0:r.refreshToken)!==!1&&this.setRefreshTokenCredential(e.refreshToken),e.appMetadata&&this.setAppMetadata(e.appMetadata);}catch(c){throw (i=this.commonLogger)==null||i.error("CacheManager.saveCacheRecord: failed"),c instanceof Error?((o=this.commonLogger)==null||o.errorPii(`CacheManager.saveCacheRecord: ${c.message}`,n),c.name==="QuotaExceededError"||c.name==="NS_ERROR_DOM_QUOTA_REACHED"||c.message.includes("exceeded the quota")?((a=this.commonLogger)==null||a.error("CacheManager.saveCacheRecord: exceeded storage quota",n),new Wd(C1)):new Wd(c.name,c.message)):((s=this.commonLogger)==null||s.errorPii(`CacheManager.saveCacheRecord: ${c}`,n),new Wd(a0))}})}saveAccessToken(e){return re(this,null,function*(){let r={clientId:e.clientId,credentialType:e.credentialType,environment:e.environment,homeAccountId:e.homeAccountId,realm:e.realm,tokenType:e.tokenType,requestedClaimsHash:e.requestedClaimsHash},n=this.getTokenKeys(),i=Wr.fromString(e.target),o=[];n.accessToken.forEach(a=>{if(!this.accessTokenKeyMatchesFilter(a,r,!1))return;let s=this.getAccessTokenCredential(a);s&&this.credentialMatchesFilter(s,r)&&Wr.fromString(s.target).intersectingScopeSets(i)&&o.push(this.removeAccessToken(a));}),yield Promise.all(o),this.setAccessTokenCredential(e);})}getAccountsFilteredBy(e){let r=this.getAccountKeys(),n=[];return r.forEach(i=>{var c;if(!this.isAccountKey(i,e.homeAccountId))return;let o=this.getAccount(i,this.commonLogger);if(!o||e.homeAccountId&&!this.matchHomeAccountId(o,e.homeAccountId)||e.username&&!this.matchUsername(o.username,e.username)||e.environment&&!this.matchEnvironment(o,e.environment)||e.realm&&!this.matchRealm(o,e.realm)||e.nativeAccountId&&!this.matchNativeAccountId(o,e.nativeAccountId)||e.authorityType&&!this.matchAuthorityType(o,e.authorityType))return;let a={localAccountId:e==null?void 0:e.localAccountId,name:e==null?void 0:e.name},s=(c=o.tenantProfiles)==null?void 0:c.filter(u=>this.tenantProfileMatchesFilter(u,a));s&&s.length===0||n.push(o);}),n}isAccountKey(e,r,n){return !(e.split(kr.CACHE_KEY_SEPARATOR).length<3||r&&!e.toLowerCase().includes(r.toLowerCase())||n&&!e.toLowerCase().includes(n.toLowerCase()))}isCredentialKey(e){if(e.split(kr.CACHE_KEY_SEPARATOR).length<6)return !1;let r=e.toLowerCase();if(r.indexOf(Wt.ID_TOKEN.toLowerCase())===-1&&r.indexOf(Wt.ACCESS_TOKEN.toLowerCase())===-1&&r.indexOf(Wt.ACCESS_TOKEN_WITH_AUTH_SCHEME.toLowerCase())===-1&&r.indexOf(Wt.REFRESH_TOKEN.toLowerCase())===-1)return !1;if(r.indexOf(Wt.REFRESH_TOKEN.toLowerCase())>-1){let n=`${Wt.REFRESH_TOKEN}${kr.CACHE_KEY_SEPARATOR}${this.clientId}${kr.CACHE_KEY_SEPARATOR}`,i=`${Wt.REFRESH_TOKEN}${kr.CACHE_KEY_SEPARATOR}${wc}${kr.CACHE_KEY_SEPARATOR}`;if(r.indexOf(n.toLowerCase())===-1&&r.indexOf(i.toLowerCase())===-1)return !1}else if(r.indexOf(this.clientId.toLowerCase())===-1)return !1;return !0}credentialMatchesFilter(e,r){return !(r.clientId&&!this.matchClientId(e,r.clientId)||r.userAssertionHash&&!this.matchUserAssertionHash(e,r.userAssertionHash)||typeof r.homeAccountId=="string"&&!this.matchHomeAccountId(e,r.homeAccountId)||r.environment&&!this.matchEnvironment(e,r.environment)||r.realm&&!this.matchRealm(e,r.realm)||r.credentialType&&!this.matchCredentialType(e,r.credentialType)||r.familyId&&!this.matchFamilyId(e,r.familyId)||r.target&&!this.matchTarget(e,r.target)||(r.requestedClaimsHash||e.requestedClaimsHash)&&e.requestedClaimsHash!==r.requestedClaimsHash||e.credentialType===Wt.ACCESS_TOKEN_WITH_AUTH_SCHEME&&(r.tokenType&&!this.matchTokenType(e,r.tokenType)||r.tokenType===Dt.SSH&&r.keyId&&!this.matchKeyId(e,r.keyId)))}getAppMetadataFilteredBy(e){let r=this.getKeys(),n={};return r.forEach(i=>{if(!this.isAppMetadata(i))return;let o=this.getAppMetadata(i);o&&(e.environment&&!this.matchEnvironment(o,e.environment)||e.clientId&&!this.matchClientId(o,e.clientId)||(n[i]=o));}),n}getAuthorityMetadataByAlias(e){let r=this.getAuthorityMetadataKeys(),n=null;return r.forEach(i=>{if(!this.isAuthorityMetadata(i)||i.indexOf(this.clientId)===-1)return;let o=this.getAuthorityMetadata(i);o&&o.aliases.indexOf(e)!==-1&&(n=o);}),n}removeAllAccounts(){return re(this,null,function*(){let e=this.getAccountKeys(),r=[];e.forEach(n=>{r.push(this.removeAccount(n));}),yield Promise.all(r);})}removeAccount(e){return re(this,null,function*(){let r=this.getAccount(e,this.commonLogger);r&&(yield this.removeAccountContext(r),this.removeItem(e));})}removeAccountContext(e){return re(this,null,function*(){let r=this.getTokenKeys(),n=e.generateAccountId(),i=[];r.idToken.forEach(o=>{o.indexOf(n)===0&&this.removeIdToken(o);}),r.accessToken.forEach(o=>{o.indexOf(n)===0&&i.push(this.removeAccessToken(o));}),r.refreshToken.forEach(o=>{o.indexOf(n)===0&&this.removeRefreshToken(o);}),yield Promise.all(i);})}updateOutdatedCachedAccount(e,r,n){var i;if(r&&r.isSingleTenant()){(i=this.commonLogger)==null||i.verbose("updateOutdatedCachedAccount: Found a single-tenant (outdated) account entity in the cache, migrating to multi-tenant account entity");let o=this.getAccountKeys().filter(l=>l.startsWith(r.homeAccountId)),a=[];o.forEach(l=>{let w=this.getCachedAccountEntity(l);w&&a.push(w);});let s=a.find(l=>i0(l.realm,l.homeAccountId))||a[0];s.tenantProfiles=a.map(l=>({tenantId:l.realm,localAccountId:l.localAccountId,name:l.name,isHomeTenant:i0(l.realm,l.homeAccountId)}));let c=t.toObject(new En,oe({},s)),u=c.generateAccountKey();return o.forEach(l=>{l!==u&&this.removeOutdatedAccount(e);}),this.setAccount(c),n==null||n.verbose("Updated an outdated account entity in the cache"),c}return r}removeAccessToken(e){return re(this,null,function*(){let r=this.getAccessTokenCredential(e);if(r){if(r.credentialType.toLowerCase()===Wt.ACCESS_TOKEN_WITH_AUTH_SCHEME.toLowerCase()&&r.tokenType===Dt.POP){let i=r.keyId;if(i)try{yield this.cryptoImpl.removeTokenBindingKey(i);}catch(o){throw Ae(wl)}}return this.removeItem(e)}})}removeAppMetadata(){return this.getKeys().forEach(r=>{this.isAppMetadata(r)&&this.removeItem(r);}),!0}readAccountFromCache(e){let r=En.generateAccountCacheKey(e);return this.getAccount(r,this.commonLogger)}getIdToken(e,r,n,i,o){this.commonLogger.trace("CacheManager - getIdToken called");let a={homeAccountId:e.homeAccountId,environment:e.environment,credentialType:Wt.ID_TOKEN,clientId:this.clientId,realm:n},s=this.getIdTokensByFilter(a,r),c=s.size;if(c<1)return this.commonLogger.info("CacheManager:getIdToken - No token found"),null;if(c>1){let u=s;if(!n){let l=new Map;s.forEach((T,x)=>{T.realm===e.tenantId&&l.set(x,T);});let w=l.size;if(w<1)return this.commonLogger.info("CacheManager:getIdToken - Multiple ID tokens found for account but none match account entity tenant id, returning first result"),s.values().next().value;if(w===1)return this.commonLogger.info("CacheManager:getIdToken - Multiple ID tokens found for account, defaulting to home tenant profile"),l.values().next().value;u=l;}return this.commonLogger.info("CacheManager:getIdToken - Multiple matching ID tokens found, clearing them"),u.forEach((l,w)=>{this.removeIdToken(w);}),i&&o&&i.addFields({multiMatchedID:s.size},o),null}return this.commonLogger.info("CacheManager:getIdToken - Returning ID token"),s.values().next().value}getIdTokensByFilter(e,r){let n=r&&r.idToken||this.getTokenKeys().idToken,i=new Map;return n.forEach(o=>{if(!this.idTokenKeyMatchesFilter(o,oe({clientId:this.clientId},e)))return;let a=this.getIdTokenCredential(o);a&&this.credentialMatchesFilter(a,e)&&i.set(o,a);}),i}idTokenKeyMatchesFilter(e,r){let n=e.toLowerCase();return !(r.clientId&&n.indexOf(r.clientId.toLowerCase())===-1||r.homeAccountId&&n.indexOf(r.homeAccountId.toLowerCase())===-1)}removeIdToken(e){this.removeItem(e);}removeRefreshToken(e){this.removeItem(e);}getAccessToken(e,r,n,i,o,a){this.commonLogger.trace("CacheManager - getAccessToken called");let s=Wr.createSearchScopes(r.scopes),c=r.authenticationScheme||Dt.BEARER,u=c&&c.toLowerCase()!==Dt.BEARER.toLowerCase()?Wt.ACCESS_TOKEN_WITH_AUTH_SCHEME:Wt.ACCESS_TOKEN,l={homeAccountId:e.homeAccountId,environment:e.environment,credentialType:u,clientId:this.clientId,realm:i||e.tenantId,target:s,tokenType:c,keyId:r.sshKid,requestedClaimsHash:r.requestedClaimsHash},w=n&&n.accessToken||this.getTokenKeys().accessToken,T=[];w.forEach(I=>{if(this.accessTokenKeyMatchesFilter(I,l,!0)){let k=this.getAccessTokenCredential(I);k&&this.credentialMatchesFilter(k,l)&&T.push(k);}});let x=T.length;return x<1?(this.commonLogger.info("CacheManager:getAccessToken - No token found"),null):x>1?(this.commonLogger.info("CacheManager:getAccessToken - Multiple access tokens found, clearing them"),T.forEach(I=>{this.removeAccessToken(r0(I));}),o&&a&&o.addFields({multiMatchedAT:T.length},a),null):(this.commonLogger.info("CacheManager:getAccessToken - Returning access token"),T[0])}accessTokenKeyMatchesFilter(e,r,n){let i=e.toLowerCase();if(r.clientId&&i.indexOf(r.clientId.toLowerCase())===-1||r.homeAccountId&&i.indexOf(r.homeAccountId.toLowerCase())===-1||r.realm&&i.indexOf(r.realm.toLowerCase())===-1||r.requestedClaimsHash&&i.indexOf(r.requestedClaimsHash.toLowerCase())===-1)return !1;if(r.target){let o=r.target.asArray();for(let a=0;a<o.length;a++){if(n&&!i.includes(o[a].toLowerCase()))return !1;if(!n&&i.includes(o[a].toLowerCase()))return !0}}return !0}getAccessTokensByFilter(e){let r=this.getTokenKeys(),n=[];return r.accessToken.forEach(i=>{if(!this.accessTokenKeyMatchesFilter(i,e,!0))return;let o=this.getAccessTokenCredential(i);o&&this.credentialMatchesFilter(o,e)&&n.push(o);}),n}getRefreshToken(e,r,n,i,o){this.commonLogger.trace("CacheManager - getRefreshToken called");let a=r?wc:void 0,s={homeAccountId:e.homeAccountId,environment:e.environment,credentialType:Wt.REFRESH_TOKEN,clientId:this.clientId,familyId:a},c=n&&n.refreshToken||this.getTokenKeys().refreshToken,u=[];c.forEach(w=>{if(this.refreshTokenKeyMatchesFilter(w,s)){let T=this.getRefreshTokenCredential(w);T&&this.credentialMatchesFilter(T,s)&&u.push(T);}});let l=u.length;return l<1?(this.commonLogger.info("CacheManager:getRefreshToken - No refresh token found."),null):(l>1&&i&&o&&i.addFields({multiMatchedRT:l},o),this.commonLogger.info("CacheManager:getRefreshToken - returning refresh token"),u[0])}refreshTokenKeyMatchesFilter(e,r){let n=e.toLowerCase();return !(r.familyId&&n.indexOf(r.familyId.toLowerCase())===-1||!r.familyId&&r.clientId&&n.indexOf(r.clientId.toLowerCase())===-1||r.homeAccountId&&n.indexOf(r.homeAccountId.toLowerCase())===-1)}readAppMetadataFromCache(e){let r={environment:e,clientId:this.clientId},n=this.getAppMetadataFilteredBy(r),i=Object.keys(n).map(a=>n[a]),o=i.length;if(o<1)return null;if(o>1)throw Ae(hl);return i[0]}isAppMetadataFOCI(e){let r=this.readAppMetadataFromCache(e);return !!(r&&r.familyId===wc)}matchHomeAccountId(e,r){return typeof e.homeAccountId=="string"&&r===e.homeAccountId}matchLocalAccountIdFromTokenClaims(e,r){let n=e.oid||e.sub;return r===n}matchLocalAccountIdFromTenantProfile(e,r){return e.localAccountId===r}matchName(e,r){var n;return r.toLowerCase()===((n=e.name)==null?void 0:n.toLowerCase())}matchUsername(e,r){return !!(e&&typeof e=="string"&&(r==null?void 0:r.toLowerCase())===e.toLowerCase())}matchUserAssertionHash(e,r){return !!(e.userAssertionHash&&r===e.userAssertionHash)}matchEnvironment(e,r){if(this.staticAuthorityOptions){let i=tq(this.staticAuthorityOptions,this.commonLogger);if(i.includes(r)&&i.includes(e.environment))return !0}let n=this.getAuthorityMetadataByAlias(r);return !!(n&&n.aliases.indexOf(e.environment)>-1)}matchCredentialType(e,r){return e.credentialType&&r.toLowerCase()===e.credentialType.toLowerCase()}matchClientId(e,r){return !!(e.clientId&&r===e.clientId)}matchFamilyId(e,r){return !!(e.familyId&&r===e.familyId)}matchRealm(e,r){var n;return ((n=e.realm)==null?void 0:n.toLowerCase())===r.toLowerCase()}matchNativeAccountId(e,r){return !!(e.nativeAccountId&&r===e.nativeAccountId)}matchLoginHintFromTokenClaims(e,r){return e.login_hint===r||e.preferred_username===r||e.upn===r}matchSid(e,r){return e.sid===r}matchAuthorityType(e,r){return !!(e.authorityType&&r.toLowerCase()===e.authorityType.toLowerCase())}matchTarget(e,r){return e.credentialType!==Wt.ACCESS_TOKEN&&e.credentialType!==Wt.ACCESS_TOKEN_WITH_AUTH_SCHEME||!e.target?!1:Wr.fromString(e.target).containsScopeSet(r)}matchTokenType(e,r){return !!(e.tokenType&&e.tokenType===r)}matchKeyId(e,r){return !!(e.keyId&&e.keyId===r)}isAppMetadata(e){return e.indexOf(Im)!==-1}isAuthorityMetadata(e){return e.indexOf(zd.CACHE_KEY)!==-1}generateAuthorityMetadataCacheKey(e){return `${zd.CACHE_KEY}-${this.clientId}-${e}`}static toObject(e,r){for(let n in r)e[n]=r[n];return e}},s0=class extends xc{setAccount(){throw Ae(At)}getAccount(){throw Ae(At)}getCachedAccountEntity(){throw Ae(At)}setIdTokenCredential(){throw Ae(At)}getIdTokenCredential(){throw Ae(At)}setAccessTokenCredential(){throw Ae(At)}getAccessTokenCredential(){throw Ae(At)}setRefreshTokenCredential(){throw Ae(At)}getRefreshTokenCredential(){throw Ae(At)}setAppMetadata(){throw Ae(At)}getAppMetadata(){throw Ae(At)}setServerTelemetry(){throw Ae(At)}getServerTelemetry(){throw Ae(At)}setAuthorityMetadata(){throw Ae(At)}getAuthorityMetadata(){throw Ae(At)}getAuthorityMetadataKeys(){throw Ae(At)}setThrottlingCache(){throw Ae(At)}getThrottlingCache(){throw Ae(At)}removeItem(){throw Ae(At)}getKeys(){throw Ae(At)}getAccountKeys(){throw Ae(At)}getTokenKeys(){throw Ae(At)}clear(){return re(this,null,function*(){throw Ae(At)})}updateCredentialCacheKey(){throw Ae(At)}removeOutdatedAccount(){throw Ae(At)}};var Zhe={tokenRenewalOffsetSeconds:Om,preventCorsPreflight:!1},Jhe={loggerCallback:()=>{},piiLoggingEnabled:!1,logLevel:zr.Info,correlationId:be.EMPTY_STRING},Xhe={claimsBasedCachingEnabled:!1},Qhe={sendGetRequestAsync(){return re(this,null,function*(){throw Ae(At)})},sendPostRequestAsync(){return re(this,null,function*(){throw Ae(At)})}},epe={sku:be.SKU,version:Gd,cpu:be.EMPTY_STRING,os:be.EMPTY_STRING},tpe={clientSecret:be.EMPTY_STRING,clientAssertion:void 0},rpe={azureCloudInstance:kl.None,tenant:`${be.DEFAULT_COMMON_TENANT}`},npe={application:{appName:"",appVersion:""}};function sq({authOptions:t,systemOptions:e,loggerOptions:r,cacheOptions:n,storageInterface:i,networkInterface:o,cryptoInterface:a,clientCredentials:s,libraryInfo:c,telemetry:u,serverTelemetryManager:l,persistencePlugin:w,serializableCache:T}){let x=oe(oe({},Jhe),r);return {authOptions:ipe(t),systemOptions:oe(oe({},Zhe),e),loggerOptions:x,cacheOptions:oe(oe({},Xhe),n),storageInterface:i||new s0(t.clientId,Vd,new Ko(x)),networkInterface:o||Qhe,cryptoInterface:a||Vd,clientCredentials:s||tpe,libraryInfo:oe(oe({},epe),c),telemetry:oe(oe({},npe),u),serverTelemetryManager:l||null,persistencePlugin:w||null,serializableCache:T||null}}function ipe(t){return oe({clientCapabilities:[],azureCloudOptions:rpe,skipAuthorityMetadataCache:!1},t)}function c0(t){return t.authOptions.authority.options.protocolMode===ho.OIDC}v();m();y();g();v();m();y();g();v();m();y();g();var Ts=class t extends Yt{constructor(e,r,n,i,o){super(e,r,n),this.name="ServerError",this.errorNo=i,this.status=o,Object.setPrototypeOf(this,t.prototype);}};var u0=class t{static generateThrottlingStorageKey(e){return `${gs.THROTTLING_PREFIX}.${JSON.stringify(e)}`}static preProcess(e,r){var o;let n=t.generateThrottlingStorageKey(r),i=e.getThrottlingCache(n);if(i){if(i.throttleTime<Date.now()){e.removeItem(n);return}throw new Ts(((o=i.errorCodes)==null?void 0:o.join(" "))||be.EMPTY_STRING,i.errorMessage,i.subError)}}static postProcess(e,r,n){if(t.checkResponseStatus(n)||t.checkResponseForRetryAfter(n)){let i={throttleTime:t.calculateThrottleTime(parseInt(n.headers[Gr.RETRY_AFTER])),error:n.body.error,errorCodes:n.body.error_codes,errorMessage:n.body.error_description,subError:n.body.suberror};e.setThrottlingCache(t.generateThrottlingStorageKey(r),i);}}static checkResponseStatus(e){return e.status===429||e.status>=500&&e.status<600}static checkResponseForRetryAfter(e){return e.headers?e.headers.hasOwnProperty(Gr.RETRY_AFTER)&&(e.status<200||e.status>=300):!1}static calculateThrottleTime(e){let r=e<=0?0:e,n=Date.now()/1e3;return Math.floor(Math.min(n+(r||gs.DEFAULT_THROTTLE_TIME_SECONDS),n+gs.DEFAULT_MAX_THROTTLE_TIME_SECONDS)*1e3)}static removeThrottle(e,r,n,i){let o={clientId:r,authority:n.authority,scopes:n.scopes,homeAccountIdentifier:i,claims:n.claims,authenticationScheme:n.authenticationScheme,resourceRequestMethod:n.resourceRequestMethod,resourceRequestUri:n.resourceRequestUri,shrClaims:n.shrClaims,sshKid:n.sshKid},a=this.generateThrottlingStorageKey(o);e.removeItem(a);}};var A1=class{constructor(e,r){this.networkClient=e,this.cacheManager=r;}sendPostRequest(e,r,n){return re(this,null,function*(){u0.preProcess(this.cacheManager,e);let i;try{i=yield this.networkClient.sendPostRequestAsync(r,n);}catch(o){throw o instanceof Yt?o:Ae(sl)}return u0.postProcess(this.cacheManager,e,i),i})}};v();m();y();g();var $n={HOME_ACCOUNT_ID:"home_account_id",UPN:"UPN"};v();m();y();g();v();m();y();g();var Ma=class{static validateRedirectUri(e){if(!e)throw Jt(Sl)}static validatePrompt(e){let r=[];for(let n in bc)r.push(bc[n]);if(r.indexOf(e)<0)throw Jt(Rl)}static validateClaims(e){try{JSON.parse(e);}catch(r){throw Jt(_s)}}static validateCodeChallengeParams(e,r){if(!e||!r)throw Jt(Ss);this.validateCodeChallengeMethod(r);}static validateCodeChallengeMethod(e){if([r1.PLAIN,r1.S256].indexOf(e)<0)throw Jt(Ml)}};var Yr=class{constructor(){this.parameters=new Map;}addResponseTypeCode(){this.parameters.set(y1,encodeURIComponent(be.CODE_RESPONSE_TYPE));}addResponseTypeForTokenAndIdToken(){this.parameters.set(y1,encodeURIComponent(`${be.TOKEN_RESPONSE_TYPE} ${be.ID_TOKEN_RESPONSE_TYPE}`));}addResponseMode(e){this.parameters.set(TT,encodeURIComponent(e||xm.QUERY));}addNativeBroker(){this.parameters.set(rR,encodeURIComponent("1"));}addScopes(e,r=!0,n=Ra){r&&!n.includes("openid")&&!e.includes("openid")&&n.push("openid");let i=r?[...e||[],...n]:e||[],o=new Wr(i);this.parameters.set(IT,encodeURIComponent(o.printScopes()));}addClientId(e){this.parameters.set(Rc,encodeURIComponent(e));}addRedirectUri(e){Ma.validateRedirectUri(e),this.parameters.set(AT,encodeURIComponent(e));}addPostLogoutRedirectUri(e){Ma.validateRedirectUri(e),this.parameters.set(WT,encodeURIComponent(e));}addIdTokenHint(e){this.parameters.set(YT,encodeURIComponent(e));}addDomainHint(e){this.parameters.set(aR,encodeURIComponent(e));}addLoginHint(e){this.parameters.set(oR,encodeURIComponent(e));}addCcsUpn(e){this.parameters.set(Gr.CCS_HEADER,encodeURIComponent(`UPN:${e}`));}addCcsOid(e){this.parameters.set(Gr.CCS_HEADER,encodeURIComponent(`Oid:${e.uid}@${e.utid}`));}addSid(e){this.parameters.set(iR,encodeURIComponent(e));}addClaims(e,r){let n=this.addClientCapabilitiesToClaims(e,r);Ma.validateClaims(n),this.parameters.set(xT,encodeURIComponent(n));}addCorrelationId(e){this.parameters.set(LT,encodeURIComponent(e));}addLibraryInfo(e){this.parameters.set(qT,e.sku),this.parameters.set(FT,e.version),e.os&&this.parameters.set(zT,e.os),e.cpu&&this.parameters.set(HT,e.cpu);}addApplicationTelemetry(e){e!=null&&e.appName&&this.parameters.set(GT,e.appName),e!=null&&e.appVersion&&this.parameters.set(KT,e.appVersion);}addPrompt(e){Ma.validatePrompt(e),this.parameters.set(`${kT}`,encodeURIComponent(e));}addState(e){e&&this.parameters.set(OT,encodeURIComponent(e));}addNonce(e){this.parameters.set(NT,encodeURIComponent(e));}addCodeChallengeParams(e,r){if(Ma.validateCodeChallengeParams(e,r),e&&r)this.parameters.set(BT,encodeURIComponent(e)),this.parameters.set(UT,encodeURIComponent(r));else throw Jt(Ss)}addAuthorizationCode(e){this.parameters.set(PT,encodeURIComponent(e));}addDeviceCode(e){this.parameters.set(ZT,encodeURIComponent(e));}addRefreshToken(e){this.parameters.set(MT,encodeURIComponent(e));}addCodeVerifier(e){this.parameters.set(DT,encodeURIComponent(e));}addClientSecret(e){this.parameters.set(JT,encodeURIComponent(e));}addClientAssertion(e){e&&this.parameters.set(XT,encodeURIComponent(e));}addClientAssertionType(e){e&&this.parameters.set(QT,encodeURIComponent(e));}addOboAssertion(e){this.parameters.set(eR,encodeURIComponent(e));}addRequestTokenUse(e){this.parameters.set(tR,encodeURIComponent(e));}addGrantType(e){this.parameters.set(RT,encodeURIComponent(e));}addClientInfo(){this.parameters.set(WL,"1");}addExtraQueryParameters(e){Object.entries(e).forEach(([r,n])=>{!this.parameters.has(r)&&n&&this.parameters.set(r,n);});}addClientCapabilitiesToClaims(e,r){let n;if(!e)n={};else try{n=JSON.parse(e);}catch(i){throw Jt(_s)}return r&&r.length>0&&(n.hasOwnProperty(qd.ACCESS_TOKEN)||(n[qd.ACCESS_TOKEN]={}),n[qd.ACCESS_TOKEN][qd.XMS_CC]={values:r}),JSON.stringify(n)}addUsername(e){this.parameters.set(i1.username,encodeURIComponent(e));}addPassword(e){this.parameters.set(i1.password,encodeURIComponent(e));}addPopToken(e){e&&(this.parameters.set(g1,Dt.POP),this.parameters.set(v1,encodeURIComponent(e)));}addSshJwk(e){e&&(this.parameters.set(g1,Dt.SSH),this.parameters.set(v1,encodeURIComponent(e)));}addServerTelemetry(e){this.parameters.set(jT,e.generateCurrentRequestHeaderValue()),this.parameters.set($T,e.generateLastRequestHeaderValue());}addThrottling(){this.parameters.set(VT,gs.X_MS_LIB_CAPABILITY_VALUE);}addLogoutHint(e){this.parameters.set(nR,encodeURIComponent(e));}createQueryString(){let e=new Array;return this.parameters.forEach((r,n)=>{e.push(`${n}=${r}`);}),e.join("&")}};var Vn=class{constructor(e,r){this.config=sq(e),this.logger=new Ko(this.config.loggerOptions,E1,Gd),this.cryptoUtils=this.config.cryptoInterface,this.cacheManager=this.config.storageInterface,this.networkClient=this.config.networkInterface,this.networkManager=new A1(this.networkClient,this.cacheManager),this.serverTelemetryManager=this.config.serverTelemetryManager,this.authority=this.config.authOptions.authority,this.performanceClient=r;}createTokenRequestHeaders(e){let r={};if(r[Gr.CONTENT_TYPE]=be.URL_FORM_CONTENT_TYPE,!this.config.systemOptions.preventCorsPreflight&&e)switch(e.type){case $n.HOME_ACCOUNT_ID:try{let n=As(e.credential);r[Gr.CCS_HEADER]=`Oid:${n.uid}@${n.utid}`;}catch(n){this.logger.verbose("Could not parse home account ID for CCS Header: "+n);}break;case $n.UPN:r[Gr.CCS_HEADER]=`UPN: ${e.credential}`;break}return r}executePostToTokenEndpoint(e,r,n,i,o,a){return re(this,null,function*(){var c,u,l,w;a&&((c=this.performanceClient)==null||c.addQueueMeasurement(a,o));let s=yield this.networkManager.sendPostRequest(i,e,{body:r,headers:n});return (w=this.performanceClient)==null||w.addFields({refreshTokenSize:((u=s.body.refresh_token)==null?void 0:u.length)||0,httpVerToken:((l=s.headers)==null?void 0:l[Gr.X_MS_HTTP_VERSION])||""},o),this.config.serverTelemetryManager&&s.status<500&&s.status!==429&&this.config.serverTelemetryManager.clearTelemetryCache(),s})}updateAuthority(e,r){return re(this,null,function*(){var o;(o=this.performanceClient)==null||o.addQueueMeasurement(ge.UpdateTokenEndpointAuthority,r);let n=`https://${e}/${this.authority.tenant}/`,i=yield CT(n,this.networkClient,this.cacheManager,this.authority.options,this.logger,r,this.performanceClient);this.authority=i;})}createTokenQueryParameters(e){let r=new Yr;return e.tokenQueryParameters&&r.addExtraQueryParameters(e.tokenQueryParameters),r.createQueryString()}};v();m();y();g();v();m();y();g();v();m();y();g();var Pl="no_tokens_found",T1="native_account_unavailable",R1="refresh_token_expired",cq="interaction_required",uq="consent_required",lq="login_required",Bl="bad_token";var fq=[cq,uq,lq,Bl],ope=["message_only","additional_action","basic_action","user_password_expired","consent_required","bad_token"],x1={[Pl]:"No refresh token found in the cache. Please sign-in.",[T1]:"The requested account is not available in the native broker. It may have been deleted or logged out. Please sign-in again using an interactive API.",[R1]:"Refresh token has expired.",[Bl]:"Identity provider returned bad_token due to an expired or invalid refresh token. Please invoke an interactive API to resolve."},Rs=class t extends Yt{constructor(e,r,n,i,o,a,s,c){super(e,r,n),Object.setPrototypeOf(this,t.prototype),this.timestamp=i||be.EMPTY_STRING,this.traceId=o||be.EMPTY_STRING,this.correlationId=a||be.EMPTY_STRING,this.claims=s||be.EMPTY_STRING,this.name="InteractionRequiredAuthError",this.errorNo=c;}};function cR(t,e,r){let n=!!t&&fq.indexOf(t)>-1,i=!!r&&ope.indexOf(r)>-1,o=!!e&&fq.some(a=>e.indexOf(a)>-1);return n||o||i}function uR(t){return new Rs(t,x1[t])}v();m();y();g();var I1=class t{static setRequestState(e,r,n){let i=t.generateLibraryState(e,n);return r?`${i}${be.RESOURCE_DELIM}${r}`:i}static generateLibraryState(e,r){if(!e)throw Ae(Ac);let n={id:e.createNewGuid()};r&&(n.meta=r);let i=JSON.stringify(n);return e.base64Encode(i)}static parseRequestState(e,r){if(!e)throw Ae(Ac);if(!r)throw Ae(Vo);try{let n=r.split(be.RESOURCE_DELIM),i=n[0],o=n.length>1?n.slice(1).join(be.RESOURCE_DELIM):be.EMPTY_STRING,a=e.base64Decode(i),s=JSON.parse(a);return {userRequestState:o||be.EMPTY_STRING,libraryState:s}}catch(n){throw Ae(Vo)}}};v();m();y();g();var ape={SW:"sw",UHW:"uhw"},xs=class{constructor(e,r){this.cryptoUtils=e,this.performanceClient=r;}generateCnf(e,r){return re(this,null,function*(){var o;(o=this.performanceClient)==null||o.addQueueMeasurement(ge.PopTokenGenerateCnf,e.correlationId);let n=yield Lt(this.generateKid.bind(this),ge.PopTokenGenerateCnf,r,this.performanceClient,e.correlationId)(e),i=this.cryptoUtils.base64UrlEncode(JSON.stringify(n));return {kid:n.kid,reqCnfString:i}})}generateKid(e){return re(this,null,function*(){var n;return (n=this.performanceClient)==null||n.addQueueMeasurement(ge.PopTokenGenerateKid,e.correlationId),{kid:yield this.cryptoUtils.getPublicKeyThumbprint(e),xms_ksl:ape.SW}})}signPopToken(e,r,n){return re(this,null,function*(){return this.signPayload(e,r,n)})}signPayload(e,r,n,i){return re(this,null,function*(){let{resourceRequestMethod:o,resourceRequestUri:a,shrClaims:s,shrNonce:c,shrOptions:u}=n,l=a?new Ht(a):void 0,w=l==null?void 0:l.getUrlComponents();return this.cryptoUtils.signJwt(oe({at:e,ts:Ti(),m:o==null?void 0:o.toUpperCase(),u:w==null?void 0:w.HostNameAndPort,nonce:c||this.cryptoUtils.createNewGuid(),p:w==null?void 0:w.AbsolutePath,q:w!=null&&w.QueryString?[[],w.QueryString]:void 0,client_claims:s||void 0},i),r,u,n.correlationId)})}};v();m();y();g();var Oa=class{constructor(e,r){this.cache=e,this.hasChanged=r;}get cacheHasChanged(){return this.hasChanged}get tokenCache(){return this.cache}};function spe(t){var n,i;let e="code=",r=(n=t.error_uri)==null?void 0:n.lastIndexOf(e);return r&&r>=0?(i=t.error_uri)==null?void 0:i.substring(r+e.length):void 0}var Zr=class t{constructor(e,r,n,i,o,a,s){this.clientId=e,this.cacheStorage=r,this.cryptoObj=n,this.logger=i,this.serializableCache=o,this.persistencePlugin=a,this.performanceClient=s;}validateServerAuthorizationCodeResponse(e,r){if(!e.state||!r)throw e.state?Ae(Sc,"Cached State"):Ae(Sc,"Server State");let n,i;try{n=decodeURIComponent(e.state);}catch(o){throw Ae(Vo,e.state)}try{i=decodeURIComponent(r);}catch(o){throw Ae(Vo,e.state)}if(n!==i)throw Ae(ll);if(e.error||e.error_description||e.suberror){let o=spe(e);throw cR(e.error,e.error_description,e.suberror)?new Rs(e.error||"",e.error_description,e.suberror,e.timestamp||"",e.trace_id||"",e.correlation_id||"",e.claims||"",o):new Ts(e.error||"",e.error_description,e.suberror,o)}}validateTokenResponse(e,r){var n;if(e.error||e.error_description||e.suberror){let i=`Error(s): ${e.error_codes||be.NOT_AVAILABLE} - Timestamp: ${e.timestamp||be.NOT_AVAILABLE} - Description: ${e.error_description||be.NOT_AVAILABLE} - Correlation ID: ${e.correlation_id||be.NOT_AVAILABLE} - Trace ID: ${e.trace_id||be.NOT_AVAILABLE}`,o=(n=e.error_codes)!=null&&n.length?e.error_codes[0]:void 0,a=new Ts(e.error,i,e.suberror,o,e.status);if(r&&e.status&&e.status>=fr.SERVER_ERROR_RANGE_START&&e.status<=fr.SERVER_ERROR_RANGE_END){this.logger.warning(`executeTokenRequest:validateTokenResponse - AAD is currently unavailable and the access token is unable to be refreshed.
${a}`);return}else if(r&&e.status&&e.status>=fr.CLIENT_ERROR_RANGE_START&&e.status<=fr.CLIENT_ERROR_RANGE_END){this.logger.warning(`executeTokenRequest:validateTokenResponse - AAD is currently available but is unable to refresh the access token.
${a}`);return}throw cR(e.error,e.error_description,e.suberror)?new Rs(e.error,e.error_description,e.suberror,e.timestamp||be.EMPTY_STRING,e.trace_id||be.EMPTY_STRING,e.correlation_id||be.EMPTY_STRING,e.claims||be.EMPTY_STRING,o):a}}handleServerTokenResponse(e,r,n,i,o,a,s,c,u){return re(this,null,function*(){var I;(I=this.performanceClient)==null||I.addQueueMeasurement(ge.HandleServerTokenResponse,e.correlation_id);let l;if(e.id_token){if(l=Es(e.id_token||be.EMPTY_STRING,this.cryptoObj.base64Decode),o&&o.nonce&&l.nonce!==o.nonce)throw Ae(fl);if(i.maxAge||i.maxAge===0){let k=l.auth_time;if(!k)throw Ae(vs);Gm(k,i.maxAge);}}this.homeAccountIdentifier=En.generateHomeAccountId(e.client_info||be.EMPTY_STRING,r.authorityType,this.logger,this.cryptoObj,l);let w;o&&o.state&&(w=I1.parseRequestState(this.cryptoObj,o.state)),e.key_id=e.key_id||i.sshKid||void 0;let T=this.generateCacheRecord(e,r,n,i,l,a,o),x;try{if(this.persistencePlugin&&this.serializableCache&&(this.logger.verbose("Persistence enabled, calling beforeCacheAccess"),x=new Oa(this.serializableCache,!0),yield this.persistencePlugin.beforeCacheAccess(x)),s&&!c&&T.account){let k=T.account.generateAccountKey();if(!this.cacheStorage.getAccount(k,this.logger))return this.logger.warning("Account used to refresh tokens not in persistence, refreshed tokens will not be stored in the cache"),yield t.generateAuthenticationResult(this.cryptoObj,r,T,!1,i,l,w,void 0,u)}yield this.cacheStorage.saveCacheRecord(T,i.storeInCache,i.correlationId);}finally{this.persistencePlugin&&this.serializableCache&&x&&(this.logger.verbose("Persistence enabled, calling afterCacheAccess"),yield this.persistencePlugin.afterCacheAccess(x));}return t.generateAuthenticationResult(this.cryptoObj,r,T,!1,i,l,w,e,u)})}generateCacheRecord(e,r,n,i,o,a,s){let c=r.getPreferredCache();if(!c)throw Ae(ws);let u=S1(o),l,w;e.id_token&&o&&(l=wT(this.homeAccountIdentifier,c,e.id_token,this.clientId,u||""),w=dq(this.cacheStorage,r,this.homeAccountIdentifier,this.cryptoObj.base64Decode,o,e.client_info,c,u,s,void 0,this.logger));let T=null;if(e.access_token){let k=e.scope?Wr.fromString(e.scope):new Wr(i.scopes||[]),q=(typeof e.expires_in=="string"?parseInt(e.expires_in,10):e.expires_in)||0,j=(typeof e.ext_expires_in=="string"?parseInt(e.ext_expires_in,10):e.ext_expires_in)||0,K=(typeof e.refresh_in=="string"?parseInt(e.refresh_in,10):e.refresh_in)||void 0,Z=n+q,se=Z+j,ce=K&&K>0?n+K:void 0;T=ET(this.homeAccountIdentifier,c,e.access_token,this.clientId,u||r.tenant||"",k.printScopes(),Z,se,this.cryptoObj.base64Decode,ce,e.token_type,a,e.key_id,i.claims,i.requestedClaimsHash);}let x=null;if(e.refresh_token){let k;if(e.refresh_token_expires_in){let q=typeof e.refresh_token_expires_in=="string"?parseInt(e.refresh_token_expires_in,10):e.refresh_token_expires_in;k=n+q;}x=_T(this.homeAccountIdentifier,c,e.refresh_token,this.clientId,e.foci,a,k);}let I=null;return e.foci&&(I={clientId:this.clientId,environment:c,familyId:e.foci}),{account:w,idToken:l,accessToken:T,refreshToken:x,appMetadata:I}}static generateAuthenticationResult(e,r,n,i,o,a,s,c,u){return re(this,null,function*(){var Z,se,ce,Te,pe;let l=be.EMPTY_STRING,w=[],T=null,x,I,k=be.EMPTY_STRING;if(n.accessToken){if(n.accessToken.tokenType===Dt.POP&&!o.popKid){let le=new xs(e),{secret:Y,keyId:S}=n.accessToken;if(!S)throw Ae(_l);l=yield le.signPopToken(Y,S,o);}else l=n.accessToken.secret;w=Wr.fromString(n.accessToken.target).asArray(),T=new Date(Number(n.accessToken.expiresOn)*1e3),x=new Date(Number(n.accessToken.extendedExpiresOn)*1e3),n.accessToken.refreshOn&&(I=new Date(Number(n.accessToken.refreshOn)*1e3));}n.appMetadata&&(k=n.appMetadata.familyId===wc?wc:"");let q=(a==null?void 0:a.oid)||(a==null?void 0:a.sub)||"",j=(a==null?void 0:a.tid)||"";c!=null&&c.spa_accountid&&n.account&&(n.account.nativeAccountId=c==null?void 0:c.spa_accountid);let K=n.account?_1(n.account.getAccountInfo(),void 0,a,(Z=n.idToken)==null?void 0:Z.secret):null;return {authority:r.canonicalAuthority,uniqueId:q,tenantId:j,scopes:w,account:K,idToken:((se=n==null?void 0:n.idToken)==null?void 0:se.secret)||"",idTokenClaims:a||{},accessToken:l,fromCache:i,expiresOn:T,extExpiresOn:x,refreshOn:I,correlationId:o.correlationId,requestId:u||be.EMPTY_STRING,familyId:k,tokenType:((ce=n.accessToken)==null?void 0:ce.tokenType)||be.EMPTY_STRING,state:s?s.userRequestState:be.EMPTY_STRING,cloudGraphHostName:((Te=n.account)==null?void 0:Te.cloudGraphHostName)||be.EMPTY_STRING,msGraphHost:((pe=n.account)==null?void 0:pe.msGraphHost)||be.EMPTY_STRING,code:c==null?void 0:c.spa_code,fromNativeBroker:!1}})}};function dq(t,e,r,n,i,o,a,s,c,u,l){l==null||l.verbose("setCachedAccount called");let T=t.getAccountKeys().find(j=>j.startsWith(r)),x=null;T&&(x=t.getAccount(T,l));let I=x||En.createAccount({homeAccountId:r,idTokenClaims:i,clientInfo:o,environment:a,cloudGraphHostName:c==null?void 0:c.cloud_graph_host_name,msGraphHost:c==null?void 0:c.msgraph_host,nativeAccountId:u},e,n),k=I.tenantProfiles||[],q=s||I.realm;if(q&&!k.find(j=>j.tenantId===q)){let j=o0(r,I.localAccountId,q,i);k.push(j);}return I.tenantProfiles=k,I}var Yd=class extends Vn{constructor(e,r){var n;super(e,r),this.includeRedirectUri=!0,this.oidcDefaultScopes=(n=this.config.authOptions.authority.options.OIDCOptions)==null?void 0:n.defaultScopes;}getAuthCodeUrl(e){return re(this,null,function*(){var n;(n=this.performanceClient)==null||n.addQueueMeasurement(ge.GetAuthCodeUrl,e.correlationId);let r=yield Lt(this.createAuthCodeUrlQueryString.bind(this),ge.AuthClientCreateQueryString,this.logger,this.performanceClient,e.correlationId)(e);return Ht.appendQueryString(this.authority.authorizationEndpoint,r)})}acquireToken(e,r){return re(this,null,function*(){var s,c;if((s=this.performanceClient)==null||s.addQueueMeasurement(ge.AuthClientAcquireToken,e.correlationId),!e.code)throw Ae(pl);let n=Ti(),i=yield Lt(this.executeTokenRequest.bind(this),ge.AuthClientExecuteTokenRequest,this.logger,this.performanceClient,e.correlationId)(this.authority,e),o=(c=i.headers)==null?void 0:c[Gr.X_MS_REQUEST_ID],a=new Zr(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin,this.performanceClient);return a.validateTokenResponse(i.body),Lt(a.handleServerTokenResponse.bind(a),ge.HandleServerTokenResponse,this.logger,this.performanceClient,e.correlationId)(i.body,this.authority,n,e,r,void 0,void 0,void 0,o)})}handleFragmentResponse(e,r){if(new Zr(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,null,null).validateServerAuthorizationCodeResponse(e,r),!e.code)throw Ae(bl);return e}getLogoutUri(e){if(!e)throw Jt(Il);let r=this.createLogoutUrlQueryString(e);return Ht.appendQueryString(this.authority.endSessionEndpoint,r)}executeTokenRequest(e,r){return re(this,null,function*(){var u,l;(u=this.performanceClient)==null||u.addQueueMeasurement(ge.AuthClientExecuteTokenRequest,r.correlationId);let n=this.createTokenQueryParameters(r),i=Ht.appendQueryString(e.tokenEndpoint,n),o=yield Lt(this.createTokenRequestBody.bind(this),ge.AuthClientCreateTokenRequestBody,this.logger,this.performanceClient,r.correlationId)(r),a;if(r.clientInfo)try{let w=Kd(r.clientInfo,this.cryptoUtils.base64Decode);a={credential:`${w.uid}${kr.CLIENT_INFO_SEPARATOR}${w.utid}`,type:$n.HOME_ACCOUNT_ID};}catch(w){this.logger.verbose("Could not parse client info for CCS Header: "+w);}let s=this.createTokenRequestHeaders(a||r.ccsCredential),c={clientId:((l=r.tokenBodyParameters)==null?void 0:l.clientId)||this.config.authOptions.clientId,authority:e.canonicalAuthority,scopes:r.scopes,claims:r.claims,authenticationScheme:r.authenticationScheme,resourceRequestMethod:r.resourceRequestMethod,resourceRequestUri:r.resourceRequestUri,shrClaims:r.shrClaims,sshKid:r.sshKid};return Lt(this.executePostToTokenEndpoint.bind(this),ge.AuthorizationCodeClientExecutePostToTokenEndpoint,this.logger,this.performanceClient,r.correlationId)(i,o,s,c,r.correlationId,ge.AuthorizationCodeClientExecutePostToTokenEndpoint)})}createTokenRequestBody(e){return re(this,null,function*(){var o,a;(o=this.performanceClient)==null||o.addQueueMeasurement(ge.AuthClientCreateTokenRequestBody,e.correlationId);let r=new Yr;if(r.addClientId(((a=e.tokenBodyParameters)==null?void 0:a[Rc])||this.config.authOptions.clientId),this.includeRedirectUri?r.addRedirectUri(e.redirectUri):Ma.validateRedirectUri(e.redirectUri),r.addScopes(e.scopes,!0,this.oidcDefaultScopes),r.addAuthorizationCode(e.code),r.addLibraryInfo(this.config.libraryInfo),r.addApplicationTelemetry(this.config.telemetry.application),r.addThrottling(),this.serverTelemetryManager&&!c0(this.config)&&r.addServerTelemetry(this.serverTelemetryManager),e.codeVerifier&&r.addCodeVerifier(e.codeVerifier),this.config.clientCredentials.clientSecret&&r.addClientSecret(this.config.clientCredentials.clientSecret),this.config.clientCredentials.clientAssertion){let s=this.config.clientCredentials.clientAssertion;r.addClientAssertion(yield jn(s.assertion,this.config.authOptions.clientId,e.resourceRequestUri)),r.addClientAssertionType(s.assertionType);}if(r.addGrantType($o.AUTHORIZATION_CODE_GRANT),r.addClientInfo(),e.authenticationScheme===Dt.POP){let s=new xs(this.cryptoUtils,this.performanceClient),c;e.popKid?c=this.cryptoUtils.encodeKid(e.popKid):c=(yield Lt(s.generateCnf.bind(s),ge.PopTokenGenerateCnf,this.logger,this.performanceClient,e.correlationId)(e,this.logger)).reqCnfString,r.addPopToken(c);}else if(e.authenticationScheme===Dt.SSH)if(e.sshJwk)r.addSshJwk(e.sshJwk);else throw Jt(Cs);let n=e.correlationId||this.config.cryptoInterface.createNewGuid();r.addCorrelationId(n),(!Pr.isEmptyObj(e.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&r.addClaims(e.claims,this.config.authOptions.clientCapabilities);let i;if(e.clientInfo)try{let s=Kd(e.clientInfo,this.cryptoUtils.base64Decode);i={credential:`${s.uid}${kr.CLIENT_INFO_SEPARATOR}${s.utid}`,type:$n.HOME_ACCOUNT_ID};}catch(s){this.logger.verbose("Could not parse client info for CCS Header: "+s);}else i=e.ccsCredential;if(this.config.systemOptions.preventCorsPreflight&&i)switch(i.type){case $n.HOME_ACCOUNT_ID:try{let s=As(i.credential);r.addCcsOid(s);}catch(s){this.logger.verbose("Could not parse home account ID for CCS Header: "+s);}break;case $n.UPN:r.addCcsUpn(i.credential);break}return e.tokenBodyParameters&&r.addExtraQueryParameters(e.tokenBodyParameters),e.enableSpaAuthorizationCode&&(!e.tokenBodyParameters||!e.tokenBodyParameters[b1])&&r.addExtraQueryParameters({[b1]:"1"}),r.createQueryString()})}createAuthCodeUrlQueryString(e){return re(this,null,function*(){var o,a;(o=this.performanceClient)==null||o.addQueueMeasurement(ge.AuthClientCreateQueryString,e.correlationId);let r=new Yr;r.addClientId(((a=e.extraQueryParameters)==null?void 0:a[Rc])||this.config.authOptions.clientId);let n=[...e.scopes||[],...e.extraScopesToConsent||[]];r.addScopes(n,!0,this.oidcDefaultScopes),r.addRedirectUri(e.redirectUri);let i=e.correlationId||this.config.cryptoInterface.createNewGuid();if(r.addCorrelationId(i),r.addResponseMode(e.responseMode),r.addResponseTypeCode(),r.addLibraryInfo(this.config.libraryInfo),c0(this.config)||r.addApplicationTelemetry(this.config.telemetry.application),r.addClientInfo(),e.codeChallenge&&e.codeChallengeMethod&&r.addCodeChallengeParams(e.codeChallenge,e.codeChallengeMethod),e.prompt&&r.addPrompt(e.prompt),e.domainHint&&r.addDomainHint(e.domainHint),e.prompt!==bc.SELECT_ACCOUNT)if(e.sid&&e.prompt===bc.NONE)this.logger.verbose("createAuthCodeUrlQueryString: Prompt is none, adding sid from request"),r.addSid(e.sid);else if(e.account){let s=this.extractAccountSid(e.account),c=this.extractLoginHint(e.account);if(c&&e.domainHint&&(this.logger.warning('AuthorizationCodeClient.createAuthCodeUrlQueryString: "domainHint" param is set, skipping opaque "login_hint" claim. Please consider not passing domainHint'),c=null),c){this.logger.verbose("createAuthCodeUrlQueryString: login_hint claim present on account"),r.addLoginHint(c);try{let u=As(e.account.homeAccountId);r.addCcsOid(u);}catch(u){this.logger.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header");}}else if(s&&e.prompt===bc.NONE){this.logger.verbose("createAuthCodeUrlQueryString: Prompt is none, adding sid from account"),r.addSid(s);try{let u=As(e.account.homeAccountId);r.addCcsOid(u);}catch(u){this.logger.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header");}}else if(e.loginHint)this.logger.verbose("createAuthCodeUrlQueryString: Adding login_hint from request"),r.addLoginHint(e.loginHint),r.addCcsUpn(e.loginHint);else if(e.account.username){this.logger.verbose("createAuthCodeUrlQueryString: Adding login_hint from account"),r.addLoginHint(e.account.username);try{let u=As(e.account.homeAccountId);r.addCcsOid(u);}catch(u){this.logger.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header");}}}else e.loginHint&&(this.logger.verbose("createAuthCodeUrlQueryString: No account, adding login_hint from request"),r.addLoginHint(e.loginHint),r.addCcsUpn(e.loginHint));else this.logger.verbose("createAuthCodeUrlQueryString: Prompt is select_account, ignoring account hints");if(e.nonce&&r.addNonce(e.nonce),e.state&&r.addState(e.state),(e.claims||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&r.addClaims(e.claims,this.config.authOptions.clientCapabilities),e.extraQueryParameters&&r.addExtraQueryParameters(e.extraQueryParameters),e.nativeBroker&&(r.addNativeBroker(),e.authenticationScheme===Dt.POP)){let s=new xs(this.cryptoUtils),c;e.popKid?c=this.cryptoUtils.encodeKid(e.popKid):c=(yield Lt(s.generateCnf.bind(s),ge.PopTokenGenerateCnf,this.logger,this.performanceClient,e.correlationId)(e,this.logger)).reqCnfString,r.addPopToken(c);}return r.createQueryString()})}createLogoutUrlQueryString(e){let r=new Yr;return e.postLogoutRedirectUri&&r.addPostLogoutRedirectUri(e.postLogoutRedirectUri),e.correlationId&&r.addCorrelationId(e.correlationId),e.idTokenHint&&r.addIdTokenHint(e.idTokenHint),e.state&&r.addState(e.state),e.logoutHint&&r.addLogoutHint(e.logoutHint),e.extraQueryParameters&&r.addExtraQueryParameters(e.extraQueryParameters),r.createQueryString()}extractAccountSid(e){var r;return ((r=e.idTokenClaims)==null?void 0:r.sid)||null}extractLoginHint(e){var r;return ((r=e.idTokenClaims)==null?void 0:r.login_hint)||null}};v();m();y();g();var cpe=300,Ic=class extends Vn{constructor(e,r){super(e,r);}acquireToken(e){return re(this,null,function*(){var a,s;(a=this.performanceClient)==null||a.addQueueMeasurement(ge.RefreshTokenClientAcquireToken,e.correlationId);let r=Ti(),n=yield Lt(this.executeTokenRequest.bind(this),ge.RefreshTokenClientExecuteTokenRequest,this.logger,this.performanceClient,e.correlationId)(e,this.authority),i=(s=n.headers)==null?void 0:s[Gr.X_MS_REQUEST_ID],o=new Zr(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin);return o.validateTokenResponse(n.body),Lt(o.handleServerTokenResponse.bind(o),ge.HandleServerTokenResponse,this.logger,this.performanceClient,e.correlationId)(n.body,this.authority,r,e,void 0,void 0,!0,e.forceCache,i)})}acquireTokenByRefreshToken(e){return re(this,null,function*(){var n;if(!e)throw Jt(xl);if((n=this.performanceClient)==null||n.addQueueMeasurement(ge.RefreshTokenClientAcquireTokenByRefreshToken,e.correlationId),!e.account)throw Ae(bs);if(this.cacheManager.isAppMetadataFOCI(e.account.environment))try{return yield Lt(this.acquireTokenWithCachedRefreshToken.bind(this),ge.RefreshTokenClientAcquireTokenWithCachedRefreshToken,this.logger,this.performanceClient,e.correlationId)(e,!0)}catch(i){let o=i instanceof Rs&&i.errorCode===Pl,a=i instanceof Ts&&i.errorCode===n1.INVALID_GRANT_ERROR&&i.subError===n1.CLIENT_MISMATCH_ERROR;if(o||a)return Lt(this.acquireTokenWithCachedRefreshToken.bind(this),ge.RefreshTokenClientAcquireTokenWithCachedRefreshToken,this.logger,this.performanceClient,e.correlationId)(e,!1);throw i}return Lt(this.acquireTokenWithCachedRefreshToken.bind(this),ge.RefreshTokenClientAcquireTokenWithCachedRefreshToken,this.logger,this.performanceClient,e.correlationId)(e,!1)})}acquireTokenWithCachedRefreshToken(e,r){return re(this,null,function*(){var o;(o=this.performanceClient)==null||o.addQueueMeasurement(ge.RefreshTokenClientAcquireTokenWithCachedRefreshToken,e.correlationId);let n=oq(this.cacheManager.getRefreshToken.bind(this.cacheManager),ge.CacheManagerGetRefreshToken,this.logger,this.performanceClient,e.correlationId)(e.account,r,void 0,this.performanceClient,e.correlationId);if(!n)throw uR(Pl);if(n.expiresOn&&jd(n.expiresOn,e.refreshTokenExpirationOffsetSeconds||cpe))throw uR(R1);let i=Me(oe({},e),{refreshToken:n.secret,authenticationScheme:e.authenticationScheme||Dt.BEARER,ccsCredential:{credential:e.account.homeAccountId,type:$n.HOME_ACCOUNT_ID}});try{return yield Lt(this.acquireToken.bind(this),ge.RefreshTokenClientAcquireToken,this.logger,this.performanceClient,e.correlationId)(i)}catch(a){if(a instanceof Rs&&a.subError===Bl){this.logger.verbose("acquireTokenWithRefreshToken: bad refresh token, removing from cache");let s=r0(n);this.cacheManager.removeRefreshToken(s);}throw a}})}executeTokenRequest(e,r){return re(this,null,function*(){var c,u;(c=this.performanceClient)==null||c.addQueueMeasurement(ge.RefreshTokenClientExecuteTokenRequest,e.correlationId);let n=this.createTokenQueryParameters(e),i=Ht.appendQueryString(r.tokenEndpoint,n),o=yield Lt(this.createTokenRequestBody.bind(this),ge.RefreshTokenClientCreateTokenRequestBody,this.logger,this.performanceClient,e.correlationId)(e),a=this.createTokenRequestHeaders(e.ccsCredential),s={clientId:((u=e.tokenBodyParameters)==null?void 0:u.clientId)||this.config.authOptions.clientId,authority:r.canonicalAuthority,scopes:e.scopes,claims:e.claims,authenticationScheme:e.authenticationScheme,resourceRequestMethod:e.resourceRequestMethod,resourceRequestUri:e.resourceRequestUri,shrClaims:e.shrClaims,sshKid:e.sshKid};return Lt(this.executePostToTokenEndpoint.bind(this),ge.RefreshTokenClientExecutePostToTokenEndpoint,this.logger,this.performanceClient,e.correlationId)(i,o,a,s,e.correlationId,ge.RefreshTokenClientExecutePostToTokenEndpoint)})}createTokenRequestBody(e){return re(this,null,function*(){var i,o,a;(i=this.performanceClient)==null||i.addQueueMeasurement(ge.RefreshTokenClientCreateTokenRequestBody,e.correlationId);let r=e.correlationId,n=new Yr;if(n.addClientId(((o=e.tokenBodyParameters)==null?void 0:o[Rc])||this.config.authOptions.clientId),e.redirectUri&&n.addRedirectUri(e.redirectUri),n.addScopes(e.scopes,!0,(a=this.config.authOptions.authority.options.OIDCOptions)==null?void 0:a.defaultScopes),n.addGrantType($o.REFRESH_TOKEN_GRANT),n.addClientInfo(),n.addLibraryInfo(this.config.libraryInfo),n.addApplicationTelemetry(this.config.telemetry.application),n.addThrottling(),this.serverTelemetryManager&&!c0(this.config)&&n.addServerTelemetry(this.serverTelemetryManager),n.addCorrelationId(r),n.addRefreshToken(e.refreshToken),this.config.clientCredentials.clientSecret&&n.addClientSecret(this.config.clientCredentials.clientSecret),this.config.clientCredentials.clientAssertion){let s=this.config.clientCredentials.clientAssertion;n.addClientAssertion(yield jn(s.assertion,this.config.authOptions.clientId,e.resourceRequestUri)),n.addClientAssertionType(s.assertionType);}if(e.authenticationScheme===Dt.POP){let s=new xs(this.cryptoUtils,this.performanceClient),c;e.popKid?c=this.cryptoUtils.encodeKid(e.popKid):c=(yield Lt(s.generateCnf.bind(s),ge.PopTokenGenerateCnf,this.logger,this.performanceClient,e.correlationId)(e,this.logger)).reqCnfString,n.addPopToken(c);}else if(e.authenticationScheme===Dt.SSH)if(e.sshJwk)n.addSshJwk(e.sshJwk);else throw Jt(Cs);if((!Pr.isEmptyObj(e.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&n.addClaims(e.claims,this.config.authOptions.clientCapabilities),this.config.systemOptions.preventCorsPreflight&&e.ccsCredential)switch(e.ccsCredential.type){case $n.HOME_ACCOUNT_ID:try{let s=As(e.ccsCredential.credential);n.addCcsOid(s);}catch(s){this.logger.verbose("Could not parse home account ID for CCS Header: "+s);}break;case $n.UPN:n.addCcsUpn(e.ccsCredential.credential);break}return e.tokenBodyParameters&&n.addExtraQueryParameters(e.tokenBodyParameters),n.createQueryString()})}};v();m();y();g();var l0=class extends Vn{constructor(e,r){super(e,r);}acquireToken(e){return re(this,null,function*(){var r;try{let[n,i]=yield this.acquireCachedToken(Me(oe({},e),{scopes:(r=e.scopes)!=null&&r.length?e.scopes:[...Ra]}));return i===yr.PROACTIVELY_REFRESHED&&(this.logger.info("SilentFlowClient:acquireCachedToken - Cached access token's refreshOn property has been exceeded'. It's not expired, but must be refreshed."),new Ic(this.config,this.performanceClient).acquireTokenByRefreshToken(e).catch(()=>{})),n}catch(n){if(n instanceof Hd&&n.errorCode===xa)return new Ic(this.config,this.performanceClient).acquireTokenByRefreshToken(e);throw n}})}acquireCachedToken(e){return re(this,null,function*(){var c;(c=this.performanceClient)==null||c.addQueueMeasurement(ge.SilentFlowClientAcquireCachedToken,e.correlationId);let r=yr.NOT_APPLICABLE;if(e.forceRefresh||!this.config.cacheOptions.claimsBasedCachingEnabled&&!Pr.isEmptyObj(e.claims))throw this.setCacheOutcome(yr.FORCE_REFRESH_OR_CLAIMS,e.correlationId),Ae(xa);if(!e.account)throw Ae(bs);let n=e.account.tenantId||aq(e.authority),i=this.cacheManager.getTokenKeys(),o=this.cacheManager.getAccessToken(e.account,e,i,n,this.performanceClient,e.correlationId);if(o){if(bT(o.cachedAt)||jd(o.expiresOn,this.config.systemOptions.tokenRenewalOffsetSeconds))throw this.setCacheOutcome(yr.CACHED_ACCESS_TOKEN_EXPIRED,e.correlationId),Ae(xa);o.refreshOn&&jd(o.refreshOn,0)&&(r=yr.PROACTIVELY_REFRESHED);}else throw this.setCacheOutcome(yr.NO_CACHED_ACCESS_TOKEN,e.correlationId),Ae(xa);let a=e.authority||this.authority.getPreferredCache(),s={account:this.cacheManager.readAccountFromCache(e.account),accessToken:o,idToken:this.cacheManager.getIdToken(e.account,i,n,this.performanceClient,e.correlationId),refreshToken:null,appMetadata:this.cacheManager.readAppMetadataFromCache(a)};return this.setCacheOutcome(r,e.correlationId),this.config.serverTelemetryManager&&this.config.serverTelemetryManager.incrementCacheHits(),[yield Lt(this.generateResultFromCacheRecord.bind(this),ge.SilentFlowClientGenerateResultFromCacheRecord,this.logger,this.performanceClient,e.correlationId)(s,e),r]})}setCacheOutcome(e,r){var n,i;(n=this.serverTelemetryManager)==null||n.setCacheOutcome(e),(i=this.performanceClient)==null||i.addFields({cacheOutcome:e},r),e!==yr.NOT_APPLICABLE&&this.logger.info(`Token refresh is required due to cache outcome: ${e}`);}generateResultFromCacheRecord(e,r){return re(this,null,function*(){var i;(i=this.performanceClient)==null||i.addQueueMeasurement(ge.SilentFlowClientGenerateResultFromCacheRecord,r.correlationId);let n;if(e.idToken&&(n=Es(e.idToken.secret,this.config.cryptoInterface.base64Decode)),r.maxAge||r.maxAge===0){let o=n==null?void 0:n.auth_time;if(!o)throw Ae(vs);Gm(o,r.maxAge);}return Zr.generateAuthenticationResult(this.cryptoUtils,this.authority,e,!0,r,n)})}};v();m();y();g();var hq=",",pq="|";function upe(t){let{skus:e,libraryName:r,libraryVersion:n,extensionName:i,extensionVersion:o}=t,a=new Map([[0,[r,n]],[2,[i,o]]]),s=[];if(e!=null&&e.length){if(s=e.split(hq),s.length<4)return e}else s=Array.from({length:4},()=>pq);return a.forEach((c,u)=>{var l,w;c.length===2&&((l=c[0])!=null&&l.length)&&((w=c[1])!=null&&w.length)&&lpe({skuArr:s,index:u,skuName:c[0],skuVersion:c[1]});}),s.join(hq)}function lpe(t){let{skuArr:e,index:r,skuName:n,skuVersion:i}=t;r>=e.length||(e[r]=[n,i].join(pq));}var f0=class t{constructor(e,r){this.cacheOutcome=yr.NOT_APPLICABLE,this.cacheManager=r,this.apiId=e.apiId,this.correlationId=e.correlationId,this.wrapperSKU=e.wrapperSKU||be.EMPTY_STRING,this.wrapperVer=e.wrapperVer||be.EMPTY_STRING,this.telemetryCacheKey=tn.CACHE_KEY+kr.CACHE_KEY_SEPARATOR+e.clientId;}generateCurrentRequestHeaderValue(){let e=`${this.apiId}${tn.VALUE_SEPARATOR}${this.cacheOutcome}`,r=[this.wrapperSKU,this.wrapperVer],n=this.getNativeBrokerErrorCode();n!=null&&n.length&&r.push(`broker_error=${n}`);let i=r.join(tn.VALUE_SEPARATOR),o=this.getRegionDiscoveryFields(),a=[e,o].join(tn.VALUE_SEPARATOR);return [tn.SCHEMA_VERSION,a,i].join(tn.CATEGORY_SEPARATOR)}generateLastRequestHeaderValue(){let e=this.getLastRequests(),r=t.maxErrorsToSend(e),n=e.failedRequests.slice(0,2*r).join(tn.VALUE_SEPARATOR),i=e.errors.slice(0,r).join(tn.VALUE_SEPARATOR),o=e.errors.length,a=r<o?tn.OVERFLOW_TRUE:tn.OVERFLOW_FALSE,s=[o,a].join(tn.VALUE_SEPARATOR);return [tn.SCHEMA_VERSION,e.cacheHits,n,i,s].join(tn.CATEGORY_SEPARATOR)}cacheFailedRequest(e){let r=this.getLastRequests();r.errors.length>=tn.MAX_CACHED_ERRORS&&(r.failedRequests.shift(),r.failedRequests.shift(),r.errors.shift()),r.failedRequests.push(this.apiId,this.correlationId),e instanceof Error&&e&&e.toString()?e instanceof Yt?e.subError?r.errors.push(e.subError):e.errorCode?r.errors.push(e.errorCode):r.errors.push(e.toString()):r.errors.push(e.toString()):r.errors.push(tn.UNKNOWN_ERROR),this.cacheManager.setServerTelemetry(this.telemetryCacheKey,r);}incrementCacheHits(){let e=this.getLastRequests();return e.cacheHits+=1,this.cacheManager.setServerTelemetry(this.telemetryCacheKey,e),e.cacheHits}getLastRequests(){let e={failedRequests:[],errors:[],cacheHits:0};return this.cacheManager.getServerTelemetry(this.telemetryCacheKey)||e}clearTelemetryCache(){let e=this.getLastRequests(),r=t.maxErrorsToSend(e),n=e.errors.length;if(r===n)this.cacheManager.removeItem(this.telemetryCacheKey);else {let i={failedRequests:e.failedRequests.slice(r*2),errors:e.errors.slice(r),cacheHits:0};this.cacheManager.setServerTelemetry(this.telemetryCacheKey,i);}}static maxErrorsToSend(e){let r,n=0,i=0,o=e.errors.length;for(r=0;r<o;r++){let a=e.failedRequests[2*r]||be.EMPTY_STRING,s=e.failedRequests[2*r+1]||be.EMPTY_STRING,c=e.errors[r]||be.EMPTY_STRING;if(i+=a.toString().length+s.toString().length+c.length+3,i<tn.MAX_LAST_HEADER_BYTES)n+=1;else break}return n}getRegionDiscoveryFields(){let e=[];return e.push(this.regionUsed||be.EMPTY_STRING),e.push(this.regionSource||be.EMPTY_STRING),e.push(this.regionOutcome||be.EMPTY_STRING),e.join(",")}updateRegionDiscoveryMetadata(e){this.regionUsed=e.region_used,this.regionSource=e.region_source,this.regionOutcome=e.region_outcome;}setCacheOutcome(e){this.cacheOutcome=e;}setNativeBrokerErrorCode(e){let r=this.getLastRequests();r.nativeBrokerErrorCode=e,this.cacheManager.setServerTelemetry(this.telemetryCacheKey,r);}getNativeBrokerErrorCode(){return this.getLastRequests().nativeBrokerErrorCode}clearNativeBrokerErrorCode(){let e=this.getLastRequests();delete e.nativeBrokerErrorCode,this.cacheManager.setServerTelemetry(this.telemetryCacheKey,e);}static makeExtraSkuString(e){return upe(e)}};var Mc=class{static deserializeJSONBlob(e){return e?JSON.parse(e):{}}static deserializeAccounts(e){let r={};return e&&Object.keys(e).map(function(n){var s;let i=e[n],o={homeAccountId:i.home_account_id,environment:i.environment,realm:i.realm,localAccountId:i.local_account_id,username:i.username,authorityType:i.authority_type,name:i.name,clientInfo:i.client_info,lastModificationTime:i.last_modification_time,lastModificationApp:i.last_modification_app,tenantProfiles:(s=i.tenantProfiles)==null?void 0:s.map(c=>JSON.parse(c))},a=new En;xc.toObject(a,o),r[n]=a;}),r}static deserializeIdTokens(e){let r={};return e&&Object.keys(e).map(function(n){let i=e[n],o={homeAccountId:i.home_account_id,environment:i.environment,credentialType:i.credential_type,clientId:i.client_id,secret:i.secret,realm:i.realm};r[n]=o;}),r}static deserializeAccessTokens(e){let r={};return e&&Object.keys(e).map(function(n){let i=e[n],o={homeAccountId:i.home_account_id,environment:i.environment,credentialType:i.credential_type,clientId:i.client_id,secret:i.secret,realm:i.realm,target:i.target,cachedAt:i.cached_at,expiresOn:i.expires_on,extendedExpiresOn:i.extended_expires_on,refreshOn:i.refresh_on,keyId:i.key_id,tokenType:i.token_type,requestedClaims:i.requestedClaims,requestedClaimsHash:i.requestedClaimsHash,userAssertionHash:i.userAssertionHash};r[n]=o;}),r}static deserializeRefreshTokens(e){let r={};return e&&Object.keys(e).map(function(n){let i=e[n],o={homeAccountId:i.home_account_id,environment:i.environment,credentialType:i.credential_type,clientId:i.client_id,secret:i.secret,familyId:i.family_id,target:i.target,realm:i.realm};r[n]=o;}),r}static deserializeAppMetadata(e){let r={};return e&&Object.keys(e).map(function(n){let i=e[n];r[n]={clientId:i.client_id,environment:i.environment,familyId:i.family_id};}),r}static deserializeAllCache(e){return {accounts:e.Account?this.deserializeAccounts(e.Account):{},idTokens:e.IdToken?this.deserializeIdTokens(e.IdToken):{},accessTokens:e.AccessToken?this.deserializeAccessTokens(e.AccessToken):{},refreshTokens:e.RefreshToken?this.deserializeRefreshTokens(e.RefreshToken):{},appMetadata:e.AppMetadata?this.deserializeAppMetadata(e.AppMetadata):{}}}};v();m();y();g();v();m();y();g();var mq="Authorization",Zd="Metadata",yq="X-IDENTITY-HEADER",gq="secret",Oc="api-version",Na="resource",vq="system_assigned_managed_identity",dpe="managed_identity",lR=`https://login.microsoftonline.com/${dpe}/`,xt={AZURE_POD_IDENTITY_AUTHORITY_HOST:"AZURE_POD_IDENTITY_AUTHORITY_HOST",IDENTITY_ENDPOINT:"IDENTITY_ENDPOINT",IDENTITY_HEADER:"IDENTITY_HEADER",IDENTITY_SERVER_THUMBPRINT:"IDENTITY_SERVER_THUMBPRINT",IMDS_ENDPOINT:"IMDS_ENDPOINT",MSI_ENDPOINT:"MSI_ENDPOINT"},Ut={APP_SERVICE:"AppService",AZURE_ARC:"AzureArc",CLOUD_SHELL:"CloudShell",DEFAULT_TO_IMDS:"DefaultToImds",IMDS:"Imds",SERVICE_FABRIC:"ServiceFabric"},Jr={SYSTEM_ASSIGNED:"system-assigned",USER_ASSIGNED_CLIENT_ID:"user-assigned-client-id",USER_ASSIGNED_RESOURCE_ID:"user-assigned-resource-id",USER_ASSIGNED_OBJECT_ID:"user-assigned-object-id"},Rr={GET:"get",POST:"post"},M1={SUCCESS:fr.SUCCESS,SUCCESS_RANGE_START:fr.SUCCESS_RANGE_START,SUCCESS_RANGE_END:fr.SUCCESS_RANGE_END,SERVER_ERROR:fr.SERVER_ERROR},bq="REGION_NAME",wq=32,Eq={SHA256:"sha256"},O1={CV_CHARSET:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~"},ka={MSAL_SKU:"msal.js.node",JWT_BEARER_ASSERTION_TYPE:"urn:ietf:params:oauth:client-assertion-type:jwt-bearer",AUTHORIZATION_PENDING:"authorization_pending",HTTP_PROTOCOL:"http://",LOCALHOST:"localhost"},Nc={acquireTokenSilent:62,acquireTokenByUsernamePassword:371,acquireTokenByDeviceCode:671,acquireTokenByClientCredential:771,acquireTokenByCode:871,acquireTokenByRefreshToken:872},po={ALGORITHM:"alg",RSA_256:"RS256",PSS_256:"PS256",X5T_256:"x5t#S256",X5T:"x5t",X5C:"x5c",AUDIENCE:"aud",EXPIRATION_TIME:"exp",ISSUER:"iss",SUBJECT:"sub",NOT_BEFORE:"nbf",JWT_ID:"jti"};var _q=4096,Sq=3,Cq=1e3,Aq=[fr.NOT_FOUND,fr.REQUEST_TIMEOUT,fr.TOO_MANY_REQUESTS,fr.SERVER_ERROR,fr.SERVICE_UNAVAILABLE,fr.GATEWAY_TIMEOUT];v();m();y();g();v();m();y();g();v();m();y();g();v();m();y();g();var Jd=class{static getNetworkResponse(e,r,n){return {headers:e,body:r,status:n}}static urlToHttpOptions(e){let r={protocol:e.protocol,hostname:e.hostname&&e.hostname.startsWith("[")?e.hostname.slice(1,-1):e.hostname,hash:e.hash,search:e.search,pathname:e.pathname,path:`${e.pathname||""}${e.search||""}`,href:e.href};return e.port!==""&&(r.port=Number(e.port)),(e.username||e.password)&&(r.auth=`${decodeURIComponent(e.username)}:${decodeURIComponent(e.password)}`),r}};var N1=on(cd(),1),fR=on(_A(),1);var Xd=class{constructor(e,r){this.proxyUrl=e||"",this.customAgentOptions=r||{};}sendGetRequestAsync(e,r,n){return re(this,null,function*(){return this.proxyUrl?Tq(e,this.proxyUrl,Rr.GET,r,this.customAgentOptions,n):Rq(e,Rr.GET,r,this.customAgentOptions,n)})}sendPostRequestAsync(e,r){return re(this,null,function*(){return this.proxyUrl?Tq(e,this.proxyUrl,Rr.POST,r,this.customAgentOptions):Rq(e,Rr.POST,r,this.customAgentOptions)})}},Tq=(t,e,r,n,i,o)=>{let a=new URL(t),s=new URL(e),c=(n==null?void 0:n.headers)||{},u={host:s.hostname,port:s.port,method:"CONNECT",path:a.hostname,headers:c};i&&Object.keys(i).length&&(u.agent=new N1.default.Agent(i));let l="";if(r===Rr.POST){let T=(n==null?void 0:n.body)||"";l=`Content-Type: application/x-www-form-urlencoded\r
Content-Length: ${T.length}\r
\r
${T}`;}else o&&(u.timeout=o);let w=`${r.toUpperCase()} ${a.href} HTTP/1.1\r
Host: ${a.host}\r
Connection: close\r
`+l+`\r
`;return new Promise((T,x)=>{let I=N1.default.request(u);o&&I.on("timeout",()=>{I.destroy(),x(new Error("Request time out"));}),I.end(),I.on("connect",(k,q)=>{let j=(k==null?void 0:k.statusCode)||M1.SERVER_ERROR;(j<M1.SUCCESS_RANGE_START||j>M1.SUCCESS_RANGE_END)&&(I.destroy(),q.destroy(),x(new Error(`Error connecting to proxy. Http status code: ${k.statusCode}. Http status message: ${(k==null?void 0:k.statusMessage)||"Unknown"}`))),q.write(w);let K=[];q.on("data",Z=>{K.push(Z);}),q.on("end",()=>{let se=D.Buffer.concat([...K]).toString().split(`\r
`),ce=parseInt(se[0].split(" ")[1]),Te=se[0].split(" ").slice(2).join(" "),pe=se[se.length-1],le=se.slice(1,se.length-2),Y=new Map;le.forEach(A=>{let f=A.split(new RegExp(new RegExp(":\\s(.*)","s"))),_=f[0],M=f[1];try{let R=JSON.parse(M);R&&typeof R=="object"&&(M=R);}catch(R){}Y.set(_,M);});let d=Object.fromEntries(Y),C=Jd.getNetworkResponse(d,xq(ce,Te,d,pe),ce);(ce<fr.SUCCESS_RANGE_START||ce>fr.SUCCESS_RANGE_END)&&C.body.error!==ka.AUTHORIZATION_PENDING&&I.destroy(),T(C);}),q.on("error",Z=>{I.destroy(),q.destroy(),x(new Error(Z.toString()));});}),I.on("error",k=>{I.destroy(),x(new Error(k.toString()));});})},Rq=(t,e,r,n,i)=>{let o=e===Rr.POST,a=(r==null?void 0:r.body)||"",s=new URL(t),c=(r==null?void 0:r.headers)||{},u=oe({method:e,headers:c},Jd.urlToHttpOptions(s));return n&&Object.keys(n).length&&(u.agent=new fR.default.Agent(n)),o?u.headers=Me(oe({},u.headers),{"Content-Length":a.length}):i&&(u.timeout=i),new Promise((l,w)=>{let T;u.protocol==="http:"?T=N1.default.request(u):T=fR.default.request(u),o&&T.write(a),i&&T.on("timeout",()=>{T.destroy(),w(new Error("Request time out"));}),T.end(),T.on("response",x=>{let I=x.headers,k=x.statusCode,q=x.statusMessage,j=[];x.on("data",K=>{j.push(K);}),x.on("end",()=>{let K=D.Buffer.concat([...j]).toString(),Z=I,se=Jd.getNetworkResponse(Z,xq(k,q,Z,K),k);(k<fr.SUCCESS_RANGE_START||k>fr.SUCCESS_RANGE_END)&&se.body.error!==ka.AUTHORIZATION_PENDING&&T.destroy(),l(se);});}),T.on("error",x=>{T.destroy(),w(new Error(x.toString()));});})},xq=(t,e,r,n)=>{let i;try{i=JSON.parse(n);}catch(o){let a,s;t>=fr.CLIENT_ERROR_RANGE_START&&t<=fr.CLIENT_ERROR_RANGE_END?(a="client_error",s="A client"):t>=fr.SERVER_ERROR_RANGE_START&&t<=fr.SERVER_ERROR_RANGE_END?(a="server_error",s="A server"):(a="unknown_error",s="An unknown"),i={error:a,error_description:`${s} error occured.
Http status code: ${t}
Http status message: ${e||"Unknown"}
Headers: ${JSON.stringify(r)}`};}return i};v();m();y();g();v();m();y();g();v();m();y();g();var k1="invalid_file_extension",P1="invalid_file_path",kc="invalid_managed_identity_id_type",B1="invalid_secret",Iq="missing_client_id",Mq="network_unavailable",U1="platform_not_supported",D1="unable_to_create_azure_arc",L1="unable_to_create_cloud_shell",q1="unable_to_create_source",d0="unable_to_read_secret_file",Oq="user_assigned_not_available_at_runtime",F1="www_authenticate_header_missing",z1="www_authenticate_header_unsupported_format",Ul={[xt.AZURE_POD_IDENTITY_AUTHORITY_HOST]:"azure_pod_identity_authority_host_url_malformed",[xt.IDENTITY_ENDPOINT]:"identity_endpoint_url_malformed",[xt.IMDS_ENDPOINT]:"imds_endpoint_url_malformed",[xt.MSI_ENDPOINT]:"msi_endpoint_url_malformed"};var hpe={[k1]:"The file path in the WWW-Authenticate header does not contain a .key file.",[P1]:"The file path in the WWW-Authenticate header is not in a valid Windows or Linux Format.",[kc]:"More than one ManagedIdentityIdType was provided.",[B1]:"The secret in the file on the file path in the WWW-Authenticate header is greater than 4096 bytes.",[U1]:"The platform is not supported by Azure Arc. Azure Arc only supports Windows and Linux.",[Iq]:"A ManagedIdentityId id was not provided.",[Ul.AZURE_POD_IDENTITY_AUTHORITY_HOST]:`The Managed Identity's '${xt.AZURE_POD_IDENTITY_AUTHORITY_HOST}' environment variable is malformed.`,[Ul.IDENTITY_ENDPOINT]:`The Managed Identity's '${xt.IDENTITY_ENDPOINT}' environment variable is malformed.`,[Ul.IMDS_ENDPOINT]:`The Managed Identity's '${xt.IMDS_ENDPOINT}' environment variable is malformed.`,[Ul.MSI_ENDPOINT]:`The Managed Identity's '${xt.MSI_ENDPOINT}' environment variable is malformed.`,[Mq]:"Authentication unavailable. The request to the managed identity endpoint timed out.",[D1]:"Azure Arc Managed Identities can only be system assigned.",[L1]:"Cloud Shell Managed Identities can only be system assigned.",[q1]:"Unable to create a Managed Identity source based on environment variables.",[d0]:"Unable to read the secret file.",[Oq]:"Service Fabric user assigned managed identity ClientId or ResourceId is not configurable at runtime.",[F1]:"A 401 response was received form the Azure Arc Managed Identity, but the www-authenticate header is missing.",[z1]:"A 401 response was received form the Azure Arc Managed Identity, but the www-authenticate header is in an unsupported format."},dR=class t extends Yt{constructor(e){super(e,hpe[e]),this.name="ManagedIdentityError",Object.setPrototypeOf(this,t.prototype);}};function Hr(t){return new dR(t)}var H1=class{get id(){return this._id}set id(e){this._id=e;}get idType(){return this._idType}set idType(e){this._idType=e;}constructor(e){let r=e==null?void 0:e.userAssignedClientId,n=e==null?void 0:e.userAssignedResourceId,i=e==null?void 0:e.userAssignedObjectId;if(r){if(n||i)throw Hr(kc);this.id=r,this.idType=Jr.USER_ASSIGNED_CLIENT_ID;}else if(n){if(r||i)throw Hr(kc);this.id=n,this.idType=Jr.USER_ASSIGNED_RESOURCE_ID;}else if(i){if(r||n)throw Hr(kc);this.id=i,this.idType=Jr.USER_ASSIGNED_OBJECT_ID;}else this.id=vq,this.idType=Jr.SYSTEM_ASSIGNED;}};v();m();y();g();var j1=class{constructor(e,r,n){this.maxRetries=e,this.retryDelay=r,this.httpStatusCodesToRetryOn=n;}retryAfterMillisecondsToSleep(e){if(!e)return 0;let r=Math.round(parseFloat(e)*1e3);return isNaN(r)&&(r=Math.max(0,new Date(e).valueOf()-new Date().valueOf())),r}pauseForRetry(e,r,n){return re(this,null,function*(){if(this.httpStatusCodesToRetryOn.includes(e)&&r<this.maxRetries){let i=this.retryAfterMillisecondsToSleep(n);return yield new Promise(o=>setTimeout(o,i||this.retryDelay)),!0}return !1})}};v();m();y();g();var $1=class{constructor(e,r){this.httpClientNoRetries=e,this.retryPolicy=r;}sendNetworkRequestAsyncHelper(e,r,n){return re(this,null,function*(){return e===Rr.GET?this.httpClientNoRetries.sendGetRequestAsync(r,n):this.httpClientNoRetries.sendPostRequestAsync(r,n)})}sendNetworkRequestAsync(e,r,n){return re(this,null,function*(){let i=yield this.sendNetworkRequestAsyncHelper(e,r,n),o=0;for(;yield this.retryPolicy.pauseForRetry(i.status,o,i.headers[Gr.RETRY_AFTER]);)i=yield this.sendNetworkRequestAsyncHelper(e,r,n),o++;return i})}sendGetRequestAsync(e,r){return re(this,null,function*(){return this.sendNetworkRequestAsync(Rr.GET,e,r)})}sendPostRequestAsync(e,r){return re(this,null,function*(){return this.sendNetworkRequestAsync(Rr.POST,e,r)})}};v();m();y();g();var _n={invalidLoopbackAddressType:{code:"invalid_loopback_server_address_type",desc:"Loopback server address is not type string. This is unexpected."},unableToLoadRedirectUri:{code:"unable_to_load_redirectUrl",desc:"Loopback server callback was invoked without a url. This is unexpected."},noAuthCodeInResponse:{code:"no_auth_code_in_response",desc:"No auth code found in the server response. Please check your network trace to determine what happened."},noLoopbackServerExists:{code:"no_loopback_server_exists",desc:"No loopback server exists yet."},loopbackServerAlreadyExists:{code:"loopback_server_already_exists",desc:"Loopback server already exists. Cannot create another."},loopbackServerTimeout:{code:"loopback_server_timeout",desc:"Timed out waiting for auth code listener to be registered."},stateNotFoundError:{code:"state_not_found",desc:"State not found. Please verify that the request originated from msal."},thumbprintMissing:{code:"thumbprint_missing_from_client_certificate",desc:"Client certificate does not contain a SHA-1 or SHA-256 thumbprint."}},Pc=class t extends Yt{constructor(e,r){super(e,r),this.name="NodeAuthError";}static createInvalidLoopbackAddressTypeError(){return new t(_n.invalidLoopbackAddressType.code,`${_n.invalidLoopbackAddressType.desc}`)}static createUnableToLoadRedirectUrlError(){return new t(_n.unableToLoadRedirectUri.code,`${_n.unableToLoadRedirectUri.desc}`)}static createNoAuthCodeInResponseError(){return new t(_n.noAuthCodeInResponse.code,`${_n.noAuthCodeInResponse.desc}`)}static createNoLoopbackServerExistsError(){return new t(_n.noLoopbackServerExists.code,`${_n.noLoopbackServerExists.desc}`)}static createLoopbackServerAlreadyExistsError(){return new t(_n.loopbackServerAlreadyExists.code,`${_n.loopbackServerAlreadyExists.desc}`)}static createLoopbackServerTimeoutError(){return new t(_n.loopbackServerTimeout.code,`${_n.loopbackServerTimeout.desc}`)}static createStateNotFoundError(){return new t(_n.stateNotFoundError.code,_n.stateNotFoundError.desc)}static createThumbprintMissingError(){return new t(_n.thumbprintMissing.code,_n.thumbprintMissing.desc)}};var ppe={clientId:be.EMPTY_STRING,authority:be.DEFAULT_AUTHORITY,clientSecret:be.EMPTY_STRING,clientAssertion:be.EMPTY_STRING,clientCertificate:{thumbprint:be.EMPTY_STRING,thumbprintSha256:be.EMPTY_STRING,privateKey:be.EMPTY_STRING,x5c:be.EMPTY_STRING},knownAuthorities:[],cloudDiscoveryMetadata:be.EMPTY_STRING,authorityMetadata:be.EMPTY_STRING,clientCapabilities:[],protocolMode:ho.AAD,azureCloudOptions:{azureCloudInstance:kl.None,tenant:be.EMPTY_STRING},skipAuthorityMetadataCache:!1},mpe={claimsBasedCachingEnabled:!1},hR={loggerCallback:()=>{},piiLoggingEnabled:!1,logLevel:zr.Info},ype={loggerOptions:hR,networkClient:new Xd,proxyUrl:be.EMPTY_STRING,customAgentOptions:{},disableInternalRetries:!1},gpe={application:{appName:be.EMPTY_STRING,appVersion:be.EMPTY_STRING}};function pR({auth:t,broker:e,cache:r,system:n,telemetry:i}){let o=Me(oe({},ype),{networkClient:new Xd(n==null?void 0:n.proxyUrl,n==null?void 0:n.customAgentOptions),loggerOptions:(n==null?void 0:n.loggerOptions)||hR,disableInternalRetries:(n==null?void 0:n.disableInternalRetries)||!1});if(t.clientCertificate&&!t.clientCertificate.thumbprint&&!t.clientCertificate.thumbprintSha256)throw Pc.createStateNotFoundError();return {auth:oe(oe({},ppe),t),broker:oe({},e),cache:oe(oe({},mpe),r),system:oe(oe({},o),n),telemetry:oe(oe({},gpe),i)}}function Nq({managedIdentityIdParams:t,system:e}){let r=new H1(t),n=(e==null?void 0:e.loggerOptions)||hR,i;if(e!=null&&e.networkClient?i=e.networkClient:i=new Xd(e==null?void 0:e.proxyUrl,e==null?void 0:e.customAgentOptions),!(e!=null&&e.disableInternalRetries)){let o=new j1(Sq,Cq,Aq);i=new $1(i,o);}return {managedIdentityId:r,system:{loggerOptions:n,networkClient:i}}}v();m();y();g();v();m();y();g();v();m();y();g();v();m();y();g();var kq=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),vpe=new Uint8Array(16);function mR(){if(!kq)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return kq(vpe)}v();m();y();g();v();m();y();g();v();m();y();g();var Pq=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function bpe(t){return typeof t=="string"&&Pq.test(t)}var Bq=bpe;var Sn=[];for(V1=0;V1<256;++V1)Sn.push((V1+256).toString(16).substr(1));var V1;function wpe(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=(Sn[t[e+0]]+Sn[t[e+1]]+Sn[t[e+2]]+Sn[t[e+3]]+"-"+Sn[t[e+4]]+Sn[t[e+5]]+"-"+Sn[t[e+6]]+Sn[t[e+7]]+"-"+Sn[t[e+8]]+Sn[t[e+9]]+"-"+Sn[t[e+10]]+Sn[t[e+11]]+Sn[t[e+12]]+Sn[t[e+13]]+Sn[t[e+14]]+Sn[t[e+15]]).toLowerCase();if(!Bq(r))throw TypeError("Stringified UUID is invalid");return r}var Uq=wpe;v();m();y();g();function Epe(t,e,r){t=t||{};var n=t.random||(t.rng||mR)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,e){r=r||0;for(var i=0;i<16;++i)e[r+i]=n[i];return e}return Uq(n)}var yR=Epe;var G1=class{generateGuid(){return yR()}isGuid(e){return /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(e)}};v();m();y();g();var Ri=class t{static base64Encode(e,r){return D.Buffer.from(e,r).toString("base64")}static base64EncodeUrl(e,r){return t.base64Encode(e,r).replace(/=/g,be.EMPTY_STRING).replace(/\+/g,"-").replace(/\//g,"_")}static base64Decode(e){return D.Buffer.from(e,"base64").toString("utf8")}static base64DecodeUrl(e){let r=e.replace(/-/g,"+").replace(/_/g,"/");for(;r.length%4;)r+="=";return t.base64Decode(r)}};v();m();y();g();v();m();y();g();var Dq=on(mu(),1);var Qd=class{sha256(e){return Dq.default.createHash(Eq.SHA256).update(e).digest()}};var Lq=on(mu(),1);var K1=class{constructor(){this.hashUtils=new Qd;}generatePkceCodes(){return re(this,null,function*(){let e=this.generateCodeVerifier(),r=this.generateCodeChallengeFromVerifier(e);return {verifier:e,challenge:r}})}generateCodeVerifier(){let e=[],r=256-256%O1.CV_CHARSET.length;for(;e.length<=wq;){let i=Lq.default.randomBytes(1)[0];if(i>=r)continue;let o=i%O1.CV_CHARSET.length;e.push(O1.CV_CHARSET[o]);}let n=e.join(be.EMPTY_STRING);return Ri.base64EncodeUrl(n)}generateCodeChallengeFromVerifier(e){return Ri.base64EncodeUrl(this.hashUtils.sha256(e).toString("base64"),"base64")}};var Dl=class{constructor(){this.pkceGenerator=new K1,this.guidGenerator=new G1,this.hashUtils=new Qd;}base64UrlEncode(){throw new Error("Method not implemented.")}encodeKid(){throw new Error("Method not implemented.")}createNewGuid(){return this.guidGenerator.generateGuid()}base64Encode(e){return Ri.base64Encode(e)}base64Decode(e){return Ri.base64Decode(e)}generatePkceCodes(){return this.pkceGenerator.generatePkceCodes()}getPublicKeyThumbprint(){throw new Error("Method not implemented.")}removeTokenBindingKey(){throw new Error("Method not implemented.")}clearKeystore(){throw new Error("Method not implemented.")}signJwt(){throw new Error("Method not implemented.")}hashString(e){return re(this,null,function*(){return Ri.base64EncodeUrl(this.hashUtils.sha256(e).toString("base64"),"base64")})}};v();m();y();g();var Ll=class extends xc{constructor(e,r,n,i){super(r,n,e,i),this.cache={},this.changeEmitters=[],this.logger=e;}registerChangeEmitter(e){this.changeEmitters.push(e);}emitChange(){this.changeEmitters.forEach(e=>e.call(null));}cacheToInMemoryCache(e){let r={accounts:{},idTokens:{},accessTokens:{},refreshTokens:{},appMetadata:{}};for(let n in e){let i=e[n];if(typeof i=="object")if(i instanceof En)r.accounts[n]=i;else if(rn.isIdTokenEntity(i))r.idTokens[n]=i;else if(rn.isAccessTokenEntity(i))r.accessTokens[n]=i;else if(rn.isRefreshTokenEntity(i))r.refreshTokens[n]=i;else if(rn.isAppMetadataEntity(n,i))r.appMetadata[n]=i;else continue}return r}inMemoryCacheToCache(e){let r=this.getCache();return r=oe(oe(oe(oe(oe(oe({},r),e.accounts),e.idTokens),e.accessTokens),e.refreshTokens),e.appMetadata),r}getInMemoryCache(){return this.logger.trace("Getting in-memory cache"),this.cacheToInMemoryCache(this.getCache())}setInMemoryCache(e){this.logger.trace("Setting in-memory cache");let r=this.inMemoryCacheToCache(e);this.setCache(r),this.emitChange();}getCache(){return this.logger.trace("Getting cache key-value store"),this.cache}setCache(e){this.logger.trace("Setting cache key value store"),this.cache=e,this.emitChange();}getItem(e){return this.logger.tracePii(`Item key: ${e}`),this.getCache()[e]}setItem(e,r){this.logger.tracePii(`Item key: ${e}`);let n=this.getCache();n[e]=r,this.setCache(n);}getAccountKeys(){let e=this.getInMemoryCache();return Object.keys(e.accounts)}getTokenKeys(){let e=this.getInMemoryCache();return {idToken:Object.keys(e.idTokens),accessToken:Object.keys(e.accessTokens),refreshToken:Object.keys(e.refreshTokens)}}getAccount(e){let r=this.getCachedAccountEntity(e);return r&&En.isAccountEntity(r)?this.updateOutdatedCachedAccount(e,r):null}getCachedAccountEntity(e){return this.getItem(e)?Object.assign(new En,this.getItem(e)):null}setAccount(e){let r=e.generateAccountKey();this.setItem(r,e);}getIdTokenCredential(e){let r=this.getItem(e);return rn.isIdTokenEntity(r)?r:null}setIdTokenCredential(e){let r=rn.generateCredentialKey(e);this.setItem(r,e);}getAccessTokenCredential(e){let r=this.getItem(e);return rn.isAccessTokenEntity(r)?r:null}setAccessTokenCredential(e){let r=rn.generateCredentialKey(e);this.setItem(r,e);}getRefreshTokenCredential(e){let r=this.getItem(e);return rn.isRefreshTokenEntity(r)?r:null}setRefreshTokenCredential(e){let r=rn.generateCredentialKey(e);this.setItem(r,e);}getAppMetadata(e){let r=this.getItem(e);return rn.isAppMetadataEntity(e,r)?r:null}setAppMetadata(e){let r=rn.generateAppMetadataKey(e);this.setItem(r,e);}getServerTelemetry(e){let r=this.getItem(e);return r&&rn.isServerTelemetryEntity(e,r)?r:null}setServerTelemetry(e,r){this.setItem(e,r);}getAuthorityMetadata(e){let r=this.getItem(e);return r&&rn.isAuthorityMetadataEntity(e,r)?r:null}getAuthorityMetadataKeys(){return this.getKeys().filter(e=>this.isAuthorityMetadata(e))}setAuthorityMetadata(e,r){this.setItem(e,r);}getThrottlingCache(e){let r=this.getItem(e);return r&&rn.isThrottlingEntity(e,r)?r:null}setThrottlingCache(e,r){this.setItem(e,r);}removeItem(e){this.logger.tracePii(`Item key: ${e}`);let r=!1,n=this.getCache();return n[e]&&(delete n[e],r=!0),r&&(this.setCache(n),this.emitChange()),r}removeOutdatedAccount(e){this.removeItem(e);}containsKey(e){return this.getKeys().includes(e)}getKeys(){this.logger.trace("Retrieving all cache keys");let e=this.getCache();return [...Object.keys(e)]}clear(){return re(this,null,function*(){this.logger.trace("Clearing cache entries created by MSAL"),this.getKeys().forEach(r=>{this.removeItem(r);}),this.emitChange();})}static generateInMemoryCache(e){return Mc.deserializeAllCache(Mc.deserializeJSONBlob(e))}static generateJsonCache(e){return nl.serializeAllCache(e)}updateCredentialCacheKey(e,r){let n=rn.generateCredentialKey(r);if(e!==n){let i=this.getItem(e);if(i)return this.removeItem(e),this.setItem(n,i),this.logger.verbose(`Updated an outdated ${r.credentialType} cache key`),n;this.logger.error(`Attempted to update an outdated ${r.credentialType} cache key but no item matching the outdated key was found in storage`);}return e}};v();m();y();g();var h0={Account:{},IdToken:{},AccessToken:{},RefreshToken:{},AppMetadata:{}},p0=class{constructor(e,r,n){this.cacheHasChanged=!1,this.storage=e,this.storage.registerChangeEmitter(this.handleChangeEvent.bind(this)),n&&(this.persistence=n),this.logger=r;}hasChanged(){return this.cacheHasChanged}serialize(){this.logger.trace("Serializing in-memory cache");let e=nl.serializeAllCache(this.storage.getInMemoryCache());return this.cacheSnapshot?(this.logger.trace("Reading cache snapshot from disk"),e=this.mergeState(JSON.parse(this.cacheSnapshot),e)):this.logger.trace("No cache snapshot to merge"),this.cacheHasChanged=!1,JSON.stringify(e)}deserialize(e){if(this.logger.trace("Deserializing JSON to in-memory cache"),this.cacheSnapshot=e,this.cacheSnapshot){this.logger.trace("Reading cache snapshot from disk");let r=Mc.deserializeAllCache(this.overlayDefaults(JSON.parse(this.cacheSnapshot)));this.storage.setInMemoryCache(r);}else this.logger.trace("No cache snapshot to deserialize");}getKVStore(){return this.storage.getCache()}getAllAccounts(){return re(this,null,function*(){this.logger.trace("getAllAccounts called");let e;try{return this.persistence&&(e=new Oa(this,!0),yield this.persistence.beforeCacheAccess(e)),this.storage.getAllAccounts()}finally{this.persistence&&e&&(yield this.persistence.afterCacheAccess(e));}})}getAccountByHomeId(e){return re(this,null,function*(){let r=yield this.getAllAccounts();return e&&r&&r.length&&r.filter(n=>n.homeAccountId===e)[0]||null})}getAccountByLocalId(e){return re(this,null,function*(){let r=yield this.getAllAccounts();return e&&r&&r.length&&r.filter(n=>n.localAccountId===e)[0]||null})}removeAccount(e){return re(this,null,function*(){this.logger.trace("removeAccount called");let r;try{this.persistence&&(r=new Oa(this,!0),yield this.persistence.beforeCacheAccess(r)),yield this.storage.removeAccount(En.generateAccountCacheKey(e));}finally{this.persistence&&r&&(yield this.persistence.afterCacheAccess(r));}})}handleChangeEvent(){this.cacheHasChanged=!0;}mergeState(e,r){this.logger.trace("Merging in-memory cache with cache snapshot");let n=this.mergeRemovals(e,r);return this.mergeUpdates(n,r)}mergeUpdates(e,r){return Object.keys(r).forEach(n=>{let i=r[n];if(!e.hasOwnProperty(n))i!==null&&(e[n]=i);else {let o=i!==null,a=typeof i=="object",s=!Array.isArray(i),c=typeof e[n]!="undefined"&&e[n]!==null;o&&a&&s&&c?this.mergeUpdates(e[n],i):e[n]=i;}}),e}mergeRemovals(e,r){this.logger.trace("Remove updated entries in cache");let n=e.Account?this.mergeRemovalsDict(e.Account,r.Account):e.Account,i=e.AccessToken?this.mergeRemovalsDict(e.AccessToken,r.AccessToken):e.AccessToken,o=e.RefreshToken?this.mergeRemovalsDict(e.RefreshToken,r.RefreshToken):e.RefreshToken,a=e.IdToken?this.mergeRemovalsDict(e.IdToken,r.IdToken):e.IdToken,s=e.AppMetadata?this.mergeRemovalsDict(e.AppMetadata,r.AppMetadata):e.AppMetadata;return Me(oe({},e),{Account:n,AccessToken:i,RefreshToken:o,IdToken:a,AppMetadata:s})}mergeRemovalsDict(e,r){let n=oe({},e);return Object.keys(e).forEach(i=>{(!r||!r.hasOwnProperty(i))&&delete n[i];}),n}overlayDefaults(e){return this.logger.trace("Overlaying input cache with the default cache"),{Account:oe(oe({},h0.Account),e.Account),IdToken:oe(oe({},h0.IdToken),e.IdToken),AccessToken:oe(oe({},h0.AccessToken),e.AccessToken),RefreshToken:oe(oe({},h0.RefreshToken),e.RefreshToken),AppMetadata:oe(oe({},h0.AppMetadata),e.AppMetadata)}}};v();m();y();g();var qq=on(_p(),1);var Bc=class t{static fromAssertion(e){let r=new t;return r.jwt=e,r}static fromCertificate(e,r,n){let i=new t;return i.privateKey=r,i.thumbprint=e,i.useSha256=!1,n&&(i.publicCertificate=this.parseCertificate(n)),i}static fromCertificateWithSha256Thumbprint(e,r,n){let i=new t;return i.privateKey=r,i.thumbprint=e,i.useSha256=!0,n&&(i.publicCertificate=this.parseCertificate(n)),i}getJwt(e,r,n){if(this.privateKey&&this.thumbprint)return this.jwt&&!this.isExpired()&&r===this.issuer&&n===this.jwtAudience?this.jwt:this.createJwt(e,r,n);if(this.jwt)return this.jwt;throw Ae(Kr.invalidAssertion)}createJwt(e,r,n){this.issuer=r,this.jwtAudience=n;let i=mn.nowSeconds();this.expirationTime=i+600;let a={alg:this.useSha256?po.PSS_256:po.RSA_256},s=this.useSha256?po.X5T_256:po.X5T;Object.assign(a,{[s]:Ri.base64EncodeUrl(this.thumbprint,"hex")}),this.publicCertificate&&Object.assign(a,{[po.X5C]:this.publicCertificate});let c={[po.AUDIENCE]:this.jwtAudience,[po.EXPIRATION_TIME]:this.expirationTime,[po.ISSUER]:this.issuer,[po.SUBJECT]:this.issuer,[po.NOT_BEFORE]:i,[po.JWT_ID]:e.createNewGuid()};return this.jwt=qq.default.sign(c,this.privateKey,{header:a}),this.jwt}isExpired(){return this.expirationTime<mn.nowSeconds()}static parseCertificate(e){let r=new RegExp("-----BEGIN CERTIFICATE-----\\r*\\n(.+?)\\r*\\n-----END CERTIFICATE-----","gs"),n=[],i;for(;(i=r.exec(e))!==null;)n.push(i[1].replace(/\r*\n/g,be.EMPTY_STRING));return n}};v();m();y();g();var W1="@azure/msal-node",ql="2.13.1";v();m();y();g();var m0=class extends Vn{constructor(e){super(e);}acquireToken(e){return re(this,null,function*(){this.logger.info("in acquireToken call in username-password client");let r=mn.nowSeconds(),n=yield this.executeTokenRequest(this.authority,e),i=new Zr(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin);return i.validateTokenResponse(n.body),i.handleServerTokenResponse(n.body,this.authority,r,e)})}executeTokenRequest(e,r){return re(this,null,function*(){let n=this.createTokenQueryParameters(r),i=Ht.appendQueryString(e.tokenEndpoint,n),o=yield this.createTokenRequestBody(r),a=this.createTokenRequestHeaders({credential:r.username,type:$n.UPN}),s={clientId:this.config.authOptions.clientId,authority:e.canonicalAuthority,scopes:r.scopes,claims:r.claims,authenticationScheme:r.authenticationScheme,resourceRequestMethod:r.resourceRequestMethod,resourceRequestUri:r.resourceRequestUri,shrClaims:r.shrClaims,sshKid:r.sshKid};return this.executePostToTokenEndpoint(i,o,a,s,r.correlationId)})}createTokenRequestBody(e){return re(this,null,function*(){let r=new Yr;r.addClientId(this.config.authOptions.clientId),r.addUsername(e.username),r.addPassword(e.password),r.addScopes(e.scopes),r.addResponseTypeForTokenAndIdToken(),r.addGrantType($o.RESOURCE_OWNER_PASSWORD_GRANT),r.addClientInfo(),r.addLibraryInfo(this.config.libraryInfo),r.addApplicationTelemetry(this.config.telemetry.application),r.addThrottling(),this.serverTelemetryManager&&r.addServerTelemetry(this.serverTelemetryManager);let n=e.correlationId||this.config.cryptoInterface.createNewGuid();r.addCorrelationId(n),this.config.clientCredentials.clientSecret&&r.addClientSecret(this.config.clientCredentials.clientSecret);let i=this.config.clientCredentials.clientAssertion;return i&&(r.addClientAssertion(yield jn(i.assertion,this.config.authOptions.clientId,e.resourceRequestUri)),r.addClientAssertionType(i.assertionType)),(!Pr.isEmptyObj(e.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&r.addClaims(e.claims,this.config.authOptions.clientCapabilities),this.config.systemOptions.preventCorsPreflight&&e.username&&r.addCcsUpn(e.username),r.createQueryString()})}};var eh=class{constructor(e){this.config=pR(e),this.cryptoProvider=new Dl,this.logger=new Ko(this.config.system.loggerOptions,W1,ql),this.storage=new Ll(this.logger,this.config.auth.clientId,this.cryptoProvider,ST(this.config.auth)),this.tokenCache=new p0(this.storage,this.logger,this.config.cache.cachePlugin);}getAuthCodeUrl(e){return re(this,null,function*(){this.logger.info("getAuthCodeUrl called",e.correlationId);let r=Me(oe(oe({},e),yield this.initializeBaseRequest(e)),{responseMode:e.responseMode||xm.QUERY,authenticationScheme:Dt.BEARER}),n=yield this.buildOauthClientConfiguration(r.authority,r.correlationId,void 0,void 0,e.azureCloudOptions),i=new Yd(n);return this.logger.verbose("Auth code client created",r.correlationId),i.getAuthCodeUrl(r)})}acquireTokenByCode(e,r){return re(this,null,function*(){this.logger.info("acquireTokenByCode called"),e.state&&r&&(this.logger.info("acquireTokenByCode - validating state"),this.validateState(e.state,r.state||""),r=Me(oe({},r),{state:""}));let n=Me(oe(oe({},e),yield this.initializeBaseRequest(e)),{authenticationScheme:Dt.BEARER}),i=this.initializeServerTelemetryManager(Nc.acquireTokenByCode,n.correlationId);try{let o=yield this.buildOauthClientConfiguration(n.authority,n.correlationId,i,void 0,e.azureCloudOptions),a=new Yd(o);return this.logger.verbose("Auth code client created",n.correlationId),yield a.acquireToken(n,r)}catch(o){throw o instanceof Yt&&o.setCorrelationId(n.correlationId),i.cacheFailedRequest(o),o}})}acquireTokenByRefreshToken(e){return re(this,null,function*(){this.logger.info("acquireTokenByRefreshToken called",e.correlationId);let r=Me(oe(oe({},e),yield this.initializeBaseRequest(e)),{authenticationScheme:Dt.BEARER}),n=this.initializeServerTelemetryManager(Nc.acquireTokenByRefreshToken,r.correlationId);try{let i=yield this.buildOauthClientConfiguration(r.authority,r.correlationId,n,void 0,e.azureCloudOptions),o=new Ic(i);return this.logger.verbose("Refresh token client created",r.correlationId),yield o.acquireToken(r)}catch(i){throw i instanceof Yt&&i.setCorrelationId(r.correlationId),n.cacheFailedRequest(i),i}})}acquireTokenSilent(e){return re(this,null,function*(){let r=Me(oe(oe({},e),yield this.initializeBaseRequest(e)),{forceRefresh:e.forceRefresh||!1}),n=this.initializeServerTelemetryManager(Nc.acquireTokenSilent,r.correlationId,r.forceRefresh);try{let i=yield this.buildOauthClientConfiguration(r.authority,r.correlationId,n,void 0,e.azureCloudOptions),o=new l0(i);return this.logger.verbose("Silent flow client created",r.correlationId),yield o.acquireToken(r)}catch(i){throw i instanceof Yt&&i.setCorrelationId(r.correlationId),n.cacheFailedRequest(i),i}})}acquireTokenByUsernamePassword(e){return re(this,null,function*(){this.logger.info("acquireTokenByUsernamePassword called",e.correlationId);let r=oe(oe({},e),yield this.initializeBaseRequest(e)),n=this.initializeServerTelemetryManager(Nc.acquireTokenByUsernamePassword,r.correlationId);try{let i=yield this.buildOauthClientConfiguration(r.authority,r.correlationId,n,void 0,e.azureCloudOptions),o=new m0(i);return this.logger.verbose("Username password client created",r.correlationId),yield o.acquireToken(r)}catch(i){throw i instanceof Yt&&i.setCorrelationId(r.correlationId),n.cacheFailedRequest(i),i}})}getTokenCache(){return this.logger.info("getTokenCache called"),this.tokenCache}validateState(e,r){if(!e)throw Pc.createStateNotFoundError();if(e!==r)throw Ae(Kr.stateMismatch)}getLogger(){return this.logger}setLogger(e){this.logger=e;}buildOauthClientConfiguration(e,r,n,i,o){return re(this,null,function*(){this.logger.verbose("buildOauthClientConfiguration called",r);let a=o||this.config.auth.azureCloudOptions,s=yield this.createAuthority(e,r,i,a);return this.logger.info(`Building oauth client configuration with the following authority: ${s.tokenEndpoint}.`,r),n==null||n.updateRegionDiscoveryMetadata(s.regionDiscoveryMetadata),{authOptions:{clientId:this.config.auth.clientId,authority:s,clientCapabilities:this.config.auth.clientCapabilities},loggerOptions:{logLevel:this.config.system.loggerOptions.logLevel,loggerCallback:this.config.system.loggerOptions.loggerCallback,piiLoggingEnabled:this.config.system.loggerOptions.piiLoggingEnabled,correlationId:r},cacheOptions:{claimsBasedCachingEnabled:this.config.cache.claimsBasedCachingEnabled},cryptoInterface:this.cryptoProvider,networkInterface:this.config.system.networkClient,storageInterface:this.storage,serverTelemetryManager:n,clientCredentials:{clientSecret:this.clientSecret,clientAssertion:yield this.getClientAssertion(s)},libraryInfo:{sku:ka.MSAL_SKU,version:ql,cpu:N.arch||be.EMPTY_STRING,os:N.platform||be.EMPTY_STRING},telemetry:this.config.telemetry,persistencePlugin:this.config.cache.cachePlugin,serializableCache:this.tokenCache}})}getClientAssertion(e){return re(this,null,function*(){return this.developerProvidedClientAssertion&&(this.clientAssertion=Bc.fromAssertion(yield jn(this.developerProvidedClientAssertion,this.config.auth.clientId,e.tokenEndpoint))),this.clientAssertion&&{assertion:this.clientAssertion.getJwt(this.cryptoProvider,this.config.auth.clientId,e.tokenEndpoint),assertionType:ka.JWT_BEARER_ASSERTION_TYPE}})}initializeBaseRequest(e){return re(this,null,function*(){return this.logger.verbose("initializeRequestScopes called",e.correlationId),e.authenticationScheme&&e.authenticationScheme===Dt.POP&&this.logger.verbose("Authentication Scheme 'pop' is not supported yet, setting Authentication Scheme to 'Bearer' for request",e.correlationId),e.authenticationScheme=Dt.BEARER,this.config.cache.claimsBasedCachingEnabled&&e.claims&&!Pr.isEmptyObj(e.claims)&&(e.requestedClaimsHash=yield this.cryptoProvider.hashString(e.claims)),Me(oe({},e),{scopes:[...e&&e.scopes||[],...Ra],correlationId:e&&e.correlationId||this.cryptoProvider.createNewGuid(),authority:e.authority||this.config.auth.authority})})}initializeServerTelemetryManager(e,r,n){let i={clientId:this.config.auth.clientId,correlationId:r,apiId:e,forceRefresh:n||!1};return new f0(i,this.storage)}createAuthority(e,r,n,i){return re(this,null,function*(){this.logger.verbose("createAuthority called",r);let o=Go.generateAuthority(e,i),a={protocolMode:this.config.auth.protocolMode,knownAuthorities:this.config.auth.knownAuthorities,cloudDiscoveryMetadata:this.config.auth.cloudDiscoveryMetadata,authorityMetadata:this.config.auth.authorityMetadata,azureRegionConfiguration:n,skipAuthorityMetadataCache:this.config.auth.skipAuthorityMetadataCache};return m1.createDiscoveredInstance(o,this.config.system.networkClient,this.storage,a,this.logger,r)})}clearCache(){this.storage.clear();}};v();m();y();g();on(cd(),1);v();m();y();g();v();m();y();g();v();m();y();g();var Fl=class extends Vn{constructor(e,r){super(e),this.appTokenProvider=r;}acquireToken(e){return re(this,null,function*(){if(e.skipCache||e.claims)return this.executeTokenRequest(e,this.authority);let[r,n]=yield this.getCachedAuthenticationResult(e,this.config,this.cryptoUtils,this.authority,this.cacheManager,this.serverTelemetryManager);return r?(n===yr.PROACTIVELY_REFRESHED&&(this.logger.info("ClientCredentialClient:getCachedAuthenticationResult - Cached access token's refreshOn property has been exceeded'. It's not expired, but must be refreshed."),yield this.executeTokenRequest(e,this.authority,!0)),r):this.executeTokenRequest(e,this.authority)})}getCachedAuthenticationResult(e,r,n,i,o,a){return re(this,null,function*(){var T,x;let s=r,c=r,u=yr.NOT_APPLICABLE,l;s.serializableCache&&s.persistencePlugin&&(l=new Oa(s.serializableCache,!1),yield s.persistencePlugin.beforeCacheAccess(l));let w=this.readAccessTokenFromCache(i,((T=c.managedIdentityId)==null?void 0:T.id)||s.authOptions.clientId,new Wr(e.scopes||[]),o);return s.serializableCache&&s.persistencePlugin&&l&&(yield s.persistencePlugin.afterCacheAccess(l)),w?mn.isTokenExpired(w.expiresOn,((x=s.systemOptions)==null?void 0:x.tokenRenewalOffsetSeconds)||Om)?(a==null||a.setCacheOutcome(yr.CACHED_ACCESS_TOKEN_EXPIRED),[null,yr.CACHED_ACCESS_TOKEN_EXPIRED]):(w.refreshOn&&mn.isTokenExpired(w.refreshOn.toString(),0)&&(u=yr.PROACTIVELY_REFRESHED,a==null||a.setCacheOutcome(yr.PROACTIVELY_REFRESHED)),[yield Zr.generateAuthenticationResult(n,i,{account:null,idToken:null,accessToken:w,refreshToken:null,appMetadata:null},!0,e),u]):(a==null||a.setCacheOutcome(yr.NO_CACHED_ACCESS_TOKEN),[null,yr.NO_CACHED_ACCESS_TOKEN])})}readAccessTokenFromCache(e,r,n,i){let o={homeAccountId:be.EMPTY_STRING,environment:e.canonicalAuthorityUrlComponents.HostNameAndPort,credentialType:Wt.ACCESS_TOKEN,clientId:r,realm:e.tenant,target:Wr.createSearchScopes(n.asArray())},a=i.getAccessTokensByFilter(o);if(a.length<1)return null;if(a.length>1)throw Ae(Kr.multipleMatchingTokens);return a[0]}executeTokenRequest(e,r,n){return re(this,null,function*(){let i,o;if(this.appTokenProvider){this.logger.info("Using appTokenProvider extensibility.");let c={correlationId:e.correlationId,tenantId:this.config.authOptions.authority.tenant,scopes:e.scopes,claims:e.claims};o=mn.nowSeconds();let u=yield this.appTokenProvider(c);i={access_token:u.accessToken,expires_in:u.expiresInSeconds,refresh_in:u.refreshInSeconds,token_type:Dt.BEARER};}else {let c=this.createTokenQueryParameters(e),u=Ht.appendQueryString(r.tokenEndpoint,c),l=yield this.createTokenRequestBody(e),w=this.createTokenRequestHeaders(),T={clientId:this.config.authOptions.clientId,authority:e.authority,scopes:e.scopes,claims:e.claims,authenticationScheme:e.authenticationScheme,resourceRequestMethod:e.resourceRequestMethod,resourceRequestUri:e.resourceRequestUri,shrClaims:e.shrClaims,sshKid:e.sshKid};this.logger.info("Sending token request to endpoint: "+r.tokenEndpoint),o=mn.nowSeconds();let x=yield this.executePostToTokenEndpoint(u,l,w,T,e.correlationId);i=x.body,i.status=x.status;}let a=new Zr(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin);return a.validateTokenResponse(i,n),yield a.handleServerTokenResponse(i,this.authority,o,e)})}createTokenRequestBody(e){return re(this,null,function*(){let r=new Yr;r.addClientId(this.config.authOptions.clientId),r.addScopes(e.scopes,!1),r.addGrantType($o.CLIENT_CREDENTIALS_GRANT),r.addLibraryInfo(this.config.libraryInfo),r.addApplicationTelemetry(this.config.telemetry.application),r.addThrottling(),this.serverTelemetryManager&&r.addServerTelemetry(this.serverTelemetryManager);let n=e.correlationId||this.config.cryptoInterface.createNewGuid();r.addCorrelationId(n),this.config.clientCredentials.clientSecret&&r.addClientSecret(this.config.clientCredentials.clientSecret);let i=e.clientAssertion||this.config.clientCredentials.clientAssertion;return i&&(r.addClientAssertion(yield jn(i.assertion,this.config.authOptions.clientId,e.resourceRequestUri)),r.addClientAssertionType(i.assertionType)),(!Pr.isEmptyObj(e.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&r.addClaims(e.claims,this.config.authOptions.clientCapabilities),r.createQueryString()})}};v();m();y();g();var y0=class extends Vn{constructor(e){super(e);}acquireToken(e){return re(this,null,function*(){if(this.scopeSet=new Wr(e.scopes||[]),this.userAssertionHash=yield this.cryptoUtils.hashString(e.oboAssertion),e.skipCache||e.claims)return this.executeTokenRequest(e,this.authority,this.userAssertionHash);try{return yield this.getCachedAuthenticationResult(e)}catch(r){return yield this.executeTokenRequest(e,this.authority,this.userAssertionHash)}})}getCachedAuthenticationResult(e){return re(this,null,function*(){var a,s;let r=this.readAccessTokenFromCacheForOBO(this.config.authOptions.clientId,e);if(r){if(mn.isTokenExpired(r.expiresOn,this.config.systemOptions.tokenRenewalOffsetSeconds))throw (s=this.serverTelemetryManager)==null||s.setCacheOutcome(yr.CACHED_ACCESS_TOKEN_EXPIRED),this.logger.info(`OnbehalfofFlow:getCachedAuthenticationResult - Cached access token is expired or will expire within ${this.config.systemOptions.tokenRenewalOffsetSeconds} seconds.`),Ae(Kr.tokenRefreshRequired)}else throw (a=this.serverTelemetryManager)==null||a.setCacheOutcome(yr.NO_CACHED_ACCESS_TOKEN),this.logger.info("SilentFlowClient:acquireCachedToken - No access token found in cache for the given properties."),Ae(Kr.tokenRefreshRequired);let n=this.readIdTokenFromCacheForOBO(r.homeAccountId),i,o=null;if(n){i=c1.extractTokenClaims(n.secret,Ri.base64Decode);let c=i.oid||i.sub,u={homeAccountId:n.homeAccountId,environment:n.environment,tenantId:n.realm,username:be.EMPTY_STRING,localAccountId:c||be.EMPTY_STRING};o=this.cacheManager.readAccountFromCache(u);}return this.config.serverTelemetryManager&&this.config.serverTelemetryManager.incrementCacheHits(),Zr.generateAuthenticationResult(this.cryptoUtils,this.authority,{account:o,accessToken:r,idToken:n,refreshToken:null,appMetadata:null},!0,e,i)})}readIdTokenFromCacheForOBO(e){let r={homeAccountId:e,environment:this.authority.canonicalAuthorityUrlComponents.HostNameAndPort,credentialType:Wt.ID_TOKEN,clientId:this.config.authOptions.clientId,realm:this.authority.tenant},n=this.cacheManager.getIdTokensByFilter(r);return Object.values(n).length<1?null:Object.values(n)[0]}readAccessTokenFromCacheForOBO(e,r){let n=r.authenticationScheme||Dt.BEARER,o={credentialType:n&&n.toLowerCase()!==Dt.BEARER.toLowerCase()?Wt.ACCESS_TOKEN_WITH_AUTH_SCHEME:Wt.ACCESS_TOKEN,clientId:e,target:Wr.createSearchScopes(this.scopeSet.asArray()),tokenType:n,keyId:r.sshKid,requestedClaimsHash:r.requestedClaimsHash,userAssertionHash:this.userAssertionHash},a=this.cacheManager.getAccessTokensByFilter(o),s=a.length;if(s<1)return null;if(s>1)throw Ae(Kr.multipleMatchingTokens);return a[0]}executeTokenRequest(e,r,n){return re(this,null,function*(){let i=this.createTokenQueryParameters(e),o=Ht.appendQueryString(r.tokenEndpoint,i),a=yield this.createTokenRequestBody(e),s=this.createTokenRequestHeaders(),c={clientId:this.config.authOptions.clientId,authority:e.authority,scopes:e.scopes,claims:e.claims,authenticationScheme:e.authenticationScheme,resourceRequestMethod:e.resourceRequestMethod,resourceRequestUri:e.resourceRequestUri,shrClaims:e.shrClaims,sshKid:e.sshKid},u=mn.nowSeconds(),l=yield this.executePostToTokenEndpoint(o,a,s,c,e.correlationId),w=new Zr(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin);return w.validateTokenResponse(l.body),yield w.handleServerTokenResponse(l.body,this.authority,u,e,void 0,n)})}createTokenRequestBody(e){return re(this,null,function*(){let r=new Yr;r.addClientId(this.config.authOptions.clientId),r.addScopes(e.scopes),r.addGrantType($o.JWT_BEARER),r.addClientInfo(),r.addLibraryInfo(this.config.libraryInfo),r.addApplicationTelemetry(this.config.telemetry.application),r.addThrottling(),this.serverTelemetryManager&&r.addServerTelemetry(this.serverTelemetryManager);let n=e.correlationId||this.config.cryptoInterface.createNewGuid();r.addCorrelationId(n),r.addRequestTokenUse(w1.ON_BEHALF_OF),r.addOboAssertion(e.oboAssertion),this.config.clientCredentials.clientSecret&&r.addClientSecret(this.config.clientCredentials.clientSecret);let i=this.config.clientCredentials.clientAssertion;return i&&(r.addClientAssertion(yield jn(i.assertion,this.config.authOptions.clientId,e.resourceRequestUri)),r.addClientAssertionType(i.assertionType)),(e.claims||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&r.addClaims(e.claims,this.config.authOptions.clientCapabilities),r.createQueryString()})}};var Is=class extends eh{constructor(e){super(e),this.setClientCredential(),this.appTokenProvider=void 0;}SetAppTokenProvider(e){this.appTokenProvider=e;}acquireTokenByClientCredential(e){return re(this,null,function*(){this.logger.info("acquireTokenByClientCredential called",e.correlationId);let r;e.clientAssertion&&(r={assertion:yield jn(e.clientAssertion,this.config.auth.clientId),assertionType:ka.JWT_BEARER_ASSERTION_TYPE});let n=yield this.initializeBaseRequest(e),i=Me(oe({},n),{scopes:n.scopes.filter(l=>!Ra.includes(l))}),o=Me(oe(oe({},e),i),{clientAssertion:r}),s=new Ht(o.authority).getUrlComponents().PathSegments[0];if(Object.values(Ai).includes(s))throw Ae(Kr.missingTenantIdError);let c={azureRegion:o.azureRegion,environmentRegion:N.env[bq]},u=this.initializeServerTelemetryManager(Nc.acquireTokenByClientCredential,o.correlationId,o.skipCache);try{let l=yield this.buildOauthClientConfiguration(o.authority,o.correlationId,u,c,e.azureCloudOptions),w=new Fl(l,this.appTokenProvider);return this.logger.verbose("Client credential client created",o.correlationId),yield w.acquireToken(o)}catch(l){throw l instanceof Yt&&l.setCorrelationId(o.correlationId),u.cacheFailedRequest(l),l}})}acquireTokenOnBehalfOf(e){return re(this,null,function*(){this.logger.info("acquireTokenOnBehalfOf called",e.correlationId);let r=oe(oe({},e),yield this.initializeBaseRequest(e));try{let n=yield this.buildOauthClientConfiguration(r.authority,r.correlationId,void 0,void 0,e.azureCloudOptions),i=new y0(n);return this.logger.verbose("On behalf of client created",r.correlationId),yield i.acquireToken(r)}catch(n){throw n instanceof Yt&&n.setCorrelationId(r.correlationId),n}})}setClientCredential(){var i,o,a;let e=!!this.config.auth.clientSecret,r=!!this.config.auth.clientAssertion,n=(!!((i=this.config.auth.clientCertificate)!=null&&i.thumbprint)||!!((o=this.config.auth.clientCertificate)!=null&&o.thumbprintSha256))&&!!((a=this.config.auth.clientCertificate)!=null&&a.privateKey);if(!this.appTokenProvider){if(e&&r||r&&n||e&&n)throw Ae(Kr.invalidClientCredential);if(this.config.auth.clientSecret){this.clientSecret=this.config.auth.clientSecret;return}if(this.config.auth.clientAssertion){this.developerProvidedClientAssertion=this.config.auth.clientAssertion;return}if(n)this.clientAssertion=this.config.auth.clientCertificate.thumbprintSha256?Bc.fromCertificateWithSha256Thumbprint(this.config.auth.clientCertificate.thumbprintSha256,this.config.auth.clientCertificate.privateKey,this.config.auth.clientCertificate.x5c):Bc.fromCertificate(this.config.auth.clientCertificate.thumbprint,this.config.auth.clientCertificate.privateKey,this.config.auth.clientCertificate.x5c);else throw Ae(Kr.invalidClientCredential)}}};v();m();y();g();v();m();y();g();v();m();y();g();v();m();y();g();var gR={MANAGED_IDENTITY_CLIENT_ID:"client_id",MANAGED_IDENTITY_OBJECT_ID:"object_id",MANAGED_IDENTITY_RESOURCE_ID:"mi_res_id"},xi=class{constructor(e,r,n,i){this.logger=e,this.nodeStorage=r,this.networkClient=n,this.cryptoProvider=i;}getServerTokenResponseAsync(e,r,n,i){return re(this,null,function*(){return this.getServerTokenResponse(e)})}getServerTokenResponse(e){var o,a;let r,n;return e.body.expires_on&&(n=e.body.expires_on-mn.nowSeconds(),n>2*3600&&(r=n/2)),{status:e.status,access_token:e.body.access_token,expires_in:n,scope:e.body.resource,token_type:e.body.token_type,refresh_in:r,correlation_id:e.body.correlation_id||e.body.correlationId,error:typeof e.body.error=="string"?e.body.error:(o=e.body.error)==null?void 0:o.code,error_description:e.body.message||(typeof e.body.error=="string"?e.body.error_description:(a=e.body.error)==null?void 0:a.message),error_codes:e.body.error_codes,timestamp:e.body.timestamp,trace_id:e.body.trace_id}}acquireTokenWithManagedIdentity(e,r,n,i){return re(this,null,function*(){let o=this.createRequest(e.resource,r),a=o.headers;a[Gr.CONTENT_TYPE]=be.URL_FORM_CONTENT_TYPE;let s={headers:a};Object.keys(o.bodyParameters).length&&(s.body=o.computeParametersBodyString());let c=mn.nowSeconds(),u;try{o.httpMethod===Rr.POST?u=yield this.networkClient.sendPostRequestAsync(o.computeUri(),s):u=yield this.networkClient.sendGetRequestAsync(o.computeUri(),s);}catch(T){throw T instanceof Yt?T:Ae(Kr.networkError)}let l=new Zr(r.id,this.nodeStorage,this.cryptoProvider,this.logger,null,null),w=yield this.getServerTokenResponseAsync(u,this.networkClient,o,s);return l.validateTokenResponse(w,i),l.handleServerTokenResponse(w,n,c,e)})}getManagedIdentityUserAssignedIdQueryParameterKey(e){switch(e){case Jr.USER_ASSIGNED_CLIENT_ID:return this.logger.info("[Managed Identity] Adding user assigned client id to the request."),gR.MANAGED_IDENTITY_CLIENT_ID;case Jr.USER_ASSIGNED_RESOURCE_ID:return this.logger.info("[Managed Identity] Adding user assigned resource id to the request."),gR.MANAGED_IDENTITY_RESOURCE_ID;case Jr.USER_ASSIGNED_OBJECT_ID:return this.logger.info("[Managed Identity] Adding user assigned object id to the request."),gR.MANAGED_IDENTITY_OBJECT_ID;default:throw Hr(kc)}}};xi.getValidatedEnvVariableUrlString=(t,e,r,n)=>{try{return new Ht(e).urlString}catch(i){throw n.info(`[Managed Identity] ${r} managed identity is unavailable because the '${t}' environment variable is malformed.`),Hr(Ul[t])}};v();m();y();g();var mo=class{constructor(e,r){this.httpMethod=e,this._baseEndpoint=r,this.headers={},this.bodyParameters={},this.queryParameters={};}computeUri(){let e=new Yr;this.queryParameters&&e.addExtraQueryParameters(this.queryParameters);let r=e.createQueryString();return Ht.appendQueryString(this._baseEndpoint,r)}computeParametersBodyString(){let e=new Yr;return this.bodyParameters&&e.addExtraQueryParameters(this.bodyParameters),e.createQueryString()}};var Cpe="2019-08-01",g0=class t extends xi{constructor(e,r,n,i,o,a){super(e,r,n,i),this.identityEndpoint=o,this.identityHeader=a;}static getEnvironmentVariables(){let e=N.env[xt.IDENTITY_ENDPOINT],r=N.env[xt.IDENTITY_HEADER];return [e,r]}static tryCreate(e,r,n,i){let[o,a]=t.getEnvironmentVariables();if(!o||!a)return e.info(`[Managed Identity] ${Ut.APP_SERVICE} managed identity is unavailable because one or both of the '${xt.IDENTITY_HEADER}' and '${xt.IDENTITY_ENDPOINT}' environment variables are not defined.`),null;let s=t.getValidatedEnvVariableUrlString(xt.IDENTITY_ENDPOINT,o,Ut.APP_SERVICE,e);return e.info(`[Managed Identity] Environment variables validation passed for ${Ut.APP_SERVICE} managed identity. Endpoint URI: ${s}. Creating ${Ut.APP_SERVICE} managed identity.`),new t(e,r,n,i,o,a)}createRequest(e,r){let n=new mo(Rr.GET,this.identityEndpoint);return n.headers[yq]=this.identityHeader,n.queryParameters[Oc]=Cpe,n.queryParameters[Na]=e,r.idType!==Jr.SYSTEM_ASSIGNED&&(n.queryParameters[this.getManagedIdentityUserAssignedIdQueryParameterKey(r.idType)]=r.id),n}};v();m();y();g();v();m();y();g();v();m();y();g();Yc();mh();Us();Hu();mf();var v0={},Fq=!1;function Ape(){if(Fq)return v0;Fq=!0,v0.byteLength=s,v0.toByteArray=u,v0.fromByteArray=T;for(var t=[],e=[],r=typeof Uint8Array!="undefined"?Uint8Array:Array,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0,o=n.length;i<o;++i)t[i]=n[i],e[n.charCodeAt(i)]=i;e[45]=62,e[95]=63;function a(x){var I=x.length;if(I%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var k=x.indexOf("=");k===-1&&(k=I);var q=k===I?0:4-k%4;return [k,q]}function s(x){var I=a(x),k=I[0],q=I[1];return (k+q)*3/4-q}function c(x,I,k){return (I+k)*3/4-k}function u(x){var I,k=a(x),q=k[0],j=k[1],K=new r(c(x,q,j)),Z=0,se=j>0?q-4:q,ce;for(ce=0;ce<se;ce+=4)I=e[x.charCodeAt(ce)]<<18|e[x.charCodeAt(ce+1)]<<12|e[x.charCodeAt(ce+2)]<<6|e[x.charCodeAt(ce+3)],K[Z++]=I>>16&255,K[Z++]=I>>8&255,K[Z++]=I&255;return j===2&&(I=e[x.charCodeAt(ce)]<<2|e[x.charCodeAt(ce+1)]>>4,K[Z++]=I&255),j===1&&(I=e[x.charCodeAt(ce)]<<10|e[x.charCodeAt(ce+1)]<<4|e[x.charCodeAt(ce+2)]>>2,K[Z++]=I>>8&255,K[Z++]=I&255),K}function l(x){return t[x>>18&63]+t[x>>12&63]+t[x>>6&63]+t[x&63]}function w(x,I,k){for(var q,j=[],K=I;K<k;K+=3)q=(x[K]<<16&16711680)+(x[K+1]<<8&65280)+(x[K+2]&255),j.push(l(q));return j.join("")}function T(x){for(var I,k=x.length,q=k%3,j=[],K=16383,Z=0,se=k-q;Z<se;Z+=K)j.push(w(x,Z,Z+K>se?se:Z+K));return q===1?(I=x[k-1],j.push(t[I>>2]+t[I<<4&63]+"==")):q===2&&(I=(x[k-2]<<8)+x[k-1],j.push(t[I>>10]+t[I>>4&63]+t[I<<2&63]+"=")),j.join("")}return v0}var Y1={},zq=!1;function Tpe(){if(zq)return Y1;zq=!0;return Y1.read=function(t,e,r,n,i){var o,a,s=i*8-n-1,c=(1<<s)-1,u=c>>1,l=-7,w=r?i-1:0,T=r?-1:1,x=t[e+w];for(w+=T,o=x&(1<<-l)-1,x>>=-l,l+=s;l>0;o=o*256+t[e+w],w+=T,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=n;l>0;a=a*256+t[e+w],w+=T,l-=8);if(o===0)o=1-u;else {if(o===c)return a?NaN:(x?-1:1)*(1/0);a=a+Math.pow(2,n),o=o-u;}return (x?-1:1)*a*Math.pow(2,o-n)},Y1.write=function(t,e,r,n,i,o){var a,s,c,u=o*8-i-1,l=(1<<u)-1,w=l>>1,T=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,x=n?0:o-1,I=n?1:-1,k=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=l):(a=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-a))<1&&(a--,c*=2),a+w>=1?e+=T/c:e+=T*Math.pow(2,1-w),e*c>=2&&(a++,c/=2),a+w>=l?(s=0,a=l):a+w>=1?(s=(e*c-1)*Math.pow(2,i),a=a+w):(s=e*Math.pow(2,w-1)*Math.pow(2,i),a=0));i>=8;t[r+x]=s&255,x+=I,s/=256,i-=8);for(a=a<<i|s,u+=i;u>0;t[r+x]=a&255,x+=I,a/=256,u-=8);t[r+x-I]|=k*128;},Y1}var zl={},Hq=!1;function Rpe(){if(Hq)return zl;Hq=!0;let t=Ape(),e=Tpe(),r=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;zl.Buffer=a,zl.SlowBuffer=j,zl.INSPECT_MAX_BYTES=50;let n=2147483647;zl.kMaxLength=n,a.TYPED_ARRAY_SUPPORT=i(),!a.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 i(){try{let O=new Uint8Array(1),p={foo:function(){return 42}};return Object.setPrototypeOf(p,Uint8Array.prototype),Object.setPrototypeOf(O,p),O.foo()===42}catch(O){return !1}}Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}});function o(O){if(O>n)throw new RangeError('The value "'+O+'" is invalid for option "size"');let p=new Uint8Array(O);return Object.setPrototypeOf(p,a.prototype),p}function a(O,p,E){if(typeof O=="number"){if(typeof p=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return l(O)}return s(O,p,E)}a.poolSize=8192;function s(O,p,E){if(typeof O=="string")return w(O,p);if(ArrayBuffer.isView(O))return x(O);if(O==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof O);if(ze(O,ArrayBuffer)||O&&ze(O.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(ze(O,SharedArrayBuffer)||O&&ze(O.buffer,SharedArrayBuffer)))return I(O,p,E);if(typeof O=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let U=O.valueOf&&O.valueOf();if(U!=null&&U!==O)return a.from(U,p,E);let $=k(O);if($)return $;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof O[Symbol.toPrimitive]=="function")return a.from(O[Symbol.toPrimitive]("string"),p,E);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof O)}a.from=function(O,p,E){return s(O,p,E)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array);function c(O){if(typeof O!="number")throw new TypeError('"size" argument must be of type number');if(O<0)throw new RangeError('The value "'+O+'" is invalid for option "size"')}function u(O,p,E){return c(O),O<=0?o(O):p!==void 0?typeof E=="string"?o(O).fill(p,E):o(O).fill(p):o(O)}a.alloc=function(O,p,E){return u(O,p,E)};function l(O){return c(O),o(O<0?0:q(O)|0)}a.allocUnsafe=function(O){return l(O)},a.allocUnsafeSlow=function(O){return l(O)};function w(O,p){if((typeof p!="string"||p==="")&&(p="utf8"),!a.isEncoding(p))throw new TypeError("Unknown encoding: "+p);let E=K(O,p)|0,U=o(E),$=U.write(O,p);return $!==E&&(U=U.slice(0,$)),U}function T(O){let p=O.length<0?0:q(O.length)|0,E=o(p);for(let U=0;U<p;U+=1)E[U]=O[U]&255;return E}function x(O){if(ze(O,Uint8Array)){let p=new Uint8Array(O);return I(p.buffer,p.byteOffset,p.byteLength)}return T(O)}function I(O,p,E){if(p<0||O.byteLength<p)throw new RangeError('"offset" is outside of buffer bounds');if(O.byteLength<p+(E||0))throw new RangeError('"length" is outside of buffer bounds');let U;return p===void 0&&E===void 0?U=new Uint8Array(O):E===void 0?U=new Uint8Array(O,p):U=new Uint8Array(O,p,E),Object.setPrototypeOf(U,a.prototype),U}function k(O){if(a.isBuffer(O)){let p=q(O.length)|0,E=o(p);return E.length===0||O.copy(E,0,0,p),E}if(O.length!==void 0)return typeof O.length!="number"||Tt(O.length)?o(0):T(O);if(O.type==="Buffer"&&Array.isArray(O.data))return T(O.data)}function q(O){if(O>=n)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n.toString(16)+" bytes");return O|0}function j(O){return +O!=O&&(O=0),a.alloc(+O)}a.isBuffer=function(p){return p!=null&&p._isBuffer===!0&&p!==a.prototype},a.compare=function(p,E){if(ze(p,Uint8Array)&&(p=a.from(p,p.offset,p.byteLength)),ze(E,Uint8Array)&&(E=a.from(E,E.offset,E.byteLength)),!a.isBuffer(p)||!a.isBuffer(E))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(p===E)return 0;let U=p.length,$=E.length;for(let X=0,te=Math.min(U,$);X<te;++X)if(p[X]!==E[X]){U=p[X],$=E[X];break}return U<$?-1:$<U?1:0},a.isEncoding=function(p){switch(String(p).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}},a.concat=function(p,E){if(!Array.isArray(p))throw new TypeError('"list" argument must be an Array of Buffers');if(p.length===0)return a.alloc(0);let U;if(E===void 0)for(E=0,U=0;U<p.length;++U)E+=p[U].length;let $=a.allocUnsafe(E),X=0;for(U=0;U<p.length;++U){let te=p[U];if(ze(te,Uint8Array))X+te.length>$.length?(a.isBuffer(te)||(te=a.from(te)),te.copy($,X)):Uint8Array.prototype.set.call($,te,X);else if(a.isBuffer(te))te.copy($,X);else throw new TypeError('"list" argument must be an Array of Buffers');X+=te.length;}return $};function K(O,p){if(a.isBuffer(O))return O.length;if(ArrayBuffer.isView(O)||ze(O,ArrayBuffer))return O.byteLength;if(typeof O!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof O);let E=O.length,U=arguments.length>2&&arguments[2]===!0;if(!U&&E===0)return 0;let $=!1;for(;;)switch(p){case"ascii":case"latin1":case"binary":return E;case"utf8":case"utf-8":return Pe(O).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E*2;case"hex":return E>>>1;case"base64":return St(O).length;default:if($)return U?-1:Pe(O).length;p=(""+p).toLowerCase(),$=!0;}}a.byteLength=K;function Z(O,p,E){let U=!1;if((p===void 0||p<0)&&(p=0),p>this.length||((E===void 0||E>this.length)&&(E=this.length),E<=0)||(E>>>=0,p>>>=0,E<=p))return "";for(O||(O="utf8");;)switch(O){case"hex":return h(this,p,E);case"utf8":case"utf-8":return A(this,p,E);case"ascii":return M(this,p,E);case"latin1":case"binary":return R(this,p,E);case"base64":return C(this,p,E);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return b(this,p,E);default:if(U)throw new TypeError("Unknown encoding: "+O);O=(O+"").toLowerCase(),U=!0;}}a.prototype._isBuffer=!0;function se(O,p,E){let U=O[p];O[p]=O[E],O[E]=U;}a.prototype.swap16=function(){let p=this.length;if(p%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let E=0;E<p;E+=2)se(this,E,E+1);return this},a.prototype.swap32=function(){let p=this.length;if(p%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let E=0;E<p;E+=4)se(this,E,E+3),se(this,E+1,E+2);return this},a.prototype.swap64=function(){let p=this.length;if(p%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let E=0;E<p;E+=8)se(this,E,E+7),se(this,E+1,E+6),se(this,E+2,E+5),se(this,E+3,E+4);return this},a.prototype.toString=function(){let p=this.length;return p===0?"":arguments.length===0?A(this,0,p):Z.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(p){if(!a.isBuffer(p))throw new TypeError("Argument must be a Buffer");return this===p?!0:a.compare(this,p)===0},a.prototype.inspect=function(){let p="",E=zl.INSPECT_MAX_BYTES;return p=this.toString("hex",0,E).replace(/(.{2})/g,"$1 ").trim(),this.length>E&&(p+=" ... "),"<Buffer "+p+">"},r&&(a.prototype[r]=a.prototype.inspect),a.prototype.compare=function(p,E,U,$,X){if(ze(p,Uint8Array)&&(p=a.from(p,p.offset,p.byteLength)),!a.isBuffer(p))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof p);if(E===void 0&&(E=0),U===void 0&&(U=p?p.length:0),$===void 0&&($=0),X===void 0&&(X=this.length),E<0||U>p.length||$<0||X>this.length)throw new RangeError("out of range index");if($>=X&&E>=U)return 0;if($>=X)return -1;if(E>=U)return 1;if(E>>>=0,U>>>=0,$>>>=0,X>>>=0,this===p)return 0;let te=X-$,Se=U-E,Ve=Math.min(te,Se),Ie=this.slice($,X),De=p.slice(E,U);for(let qe=0;qe<Ve;++qe)if(Ie[qe]!==De[qe]){te=Ie[qe],Se=De[qe];break}return te<Se?-1:Se<te?1:0};function ce(O,p,E,U,$){if(O.length===0)return -1;if(typeof E=="string"?(U=E,E=0):E>2147483647?E=2147483647:E<-2147483648&&(E=-2147483648),E=+E,Tt(E)&&(E=$?0:O.length-1),E<0&&(E=O.length+E),E>=O.length){if($)return -1;E=O.length-1;}else if(E<0)if($)E=0;else return -1;if(typeof p=="string"&&(p=a.from(p,U)),a.isBuffer(p))return p.length===0?-1:Te(O,p,E,U,$);if(typeof p=="number")return p=p&255,typeof Uint8Array.prototype.indexOf=="function"?$?Uint8Array.prototype.indexOf.call(O,p,E):Uint8Array.prototype.lastIndexOf.call(O,p,E):Te(O,[p],E,U,$);throw new TypeError("val must be string, number or Buffer")}function Te(O,p,E,U,$){let X=1,te=O.length,Se=p.length;if(U!==void 0&&(U=String(U).toLowerCase(),U==="ucs2"||U==="ucs-2"||U==="utf16le"||U==="utf-16le")){if(O.length<2||p.length<2)return -1;X=2,te/=2,Se/=2,E/=2;}function Ve(De,qe){return X===1?De[qe]:De.readUInt16BE(qe*X)}let Ie;if($){let De=-1;for(Ie=E;Ie<te;Ie++)if(Ve(O,Ie)===Ve(p,De===-1?0:Ie-De)){if(De===-1&&(De=Ie),Ie-De+1===Se)return De*X}else De!==-1&&(Ie-=Ie-De),De=-1;}else for(E+Se>te&&(E=te-Se),Ie=E;Ie>=0;Ie--){let De=!0;for(let qe=0;qe<Se;qe++)if(Ve(O,Ie+qe)!==Ve(p,qe)){De=!1;break}if(De)return Ie}return -1}a.prototype.includes=function(p,E,U){return this.indexOf(p,E,U)!==-1},a.prototype.indexOf=function(p,E,U){return ce(this,p,E,U,!0)},a.prototype.lastIndexOf=function(p,E,U){return ce(this,p,E,U,!1)};function pe(O,p,E,U){E=Number(E)||0;let $=O.length-E;U?(U=Number(U),U>$&&(U=$)):U=$;let X=p.length;U>X/2&&(U=X/2);let te;for(te=0;te<U;++te){let Se=parseInt(p.substr(te*2,2),16);if(Tt(Se))return te;O[E+te]=Se;}return te}function le(O,p,E,U){return Fe(Pe(p,O.length-E),O,E,U)}function Y(O,p,E,U){return Fe(Oe(p),O,E,U)}function S(O,p,E,U){return Fe(St(p),O,E,U)}function d(O,p,E,U){return Fe(He(p,O.length-E),O,E,U)}a.prototype.write=function(p,E,U,$){if(E===void 0)$="utf8",U=this.length,E=0;else if(U===void 0&&typeof E=="string")$=E,U=this.length,E=0;else if(isFinite(E))E=E>>>0,isFinite(U)?(U=U>>>0,$===void 0&&($="utf8")):($=U,U=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let X=this.length-E;if((U===void 0||U>X)&&(U=X),p.length>0&&(U<0||E<0)||E>this.length)throw new RangeError("Attempt to write outside buffer bounds");$||($="utf8");let te=!1;for(;;)switch($){case"hex":return pe(this,p,E,U);case"utf8":case"utf-8":return le(this,p,E,U);case"ascii":case"latin1":case"binary":return Y(this,p,E,U);case"base64":return S(this,p,E,U);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return d(this,p,E,U);default:if(te)throw new TypeError("Unknown encoding: "+$);$=(""+$).toLowerCase(),te=!0;}},a.prototype.toJSON=function(){return {type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function C(O,p,E){return p===0&&E===O.length?t.fromByteArray(O):t.fromByteArray(O.slice(p,E))}function A(O,p,E){E=Math.min(O.length,E);let U=[],$=p;for(;$<E;){let X=O[$],te=null,Se=X>239?4:X>223?3:X>191?2:1;if($+Se<=E){let Ve,Ie,De,qe;switch(Se){case 1:X<128&&(te=X);break;case 2:Ve=O[$+1],(Ve&192)===128&&(qe=(X&31)<<6|Ve&63,qe>127&&(te=qe));break;case 3:Ve=O[$+1],Ie=O[$+2],(Ve&192)===128&&(Ie&192)===128&&(qe=(X&15)<<12|(Ve&63)<<6|Ie&63,qe>2047&&(qe<55296||qe>57343)&&(te=qe));break;case 4:Ve=O[$+1],Ie=O[$+2],De=O[$+3],(Ve&192)===128&&(Ie&192)===128&&(De&192)===128&&(qe=(X&15)<<18|(Ve&63)<<12|(Ie&63)<<6|De&63,qe>65535&&qe<1114112&&(te=qe));}}te===null?(te=65533,Se=1):te>65535&&(te-=65536,U.push(te>>>10&1023|55296),te=56320|te&1023),U.push(te),$+=Se;}return _(U)}let f=4096;function _(O){let p=O.length;if(p<=f)return String.fromCharCode.apply(String,O);let E="",U=0;for(;U<p;)E+=String.fromCharCode.apply(String,O.slice(U,U+=f));return E}function M(O,p,E){let U="";E=Math.min(O.length,E);for(let $=p;$<E;++$)U+=String.fromCharCode(O[$]&127);return U}function R(O,p,E){let U="";E=Math.min(O.length,E);for(let $=p;$<E;++$)U+=String.fromCharCode(O[$]);return U}function h(O,p,E){let U=O.length;(!p||p<0)&&(p=0),(!E||E<0||E>U)&&(E=U);let $="";for(let X=p;X<E;++X)$+=Ge[O[X]];return $}function b(O,p,E){let U=O.slice(p,E),$="";for(let X=0;X<U.length-1;X+=2)$+=String.fromCharCode(U[X]+U[X+1]*256);return $}a.prototype.slice=function(p,E){let U=this.length;p=~~p,E=E===void 0?U:~~E,p<0?(p+=U,p<0&&(p=0)):p>U&&(p=U),E<0?(E+=U,E<0&&(E=0)):E>U&&(E=U),E<p&&(E=p);let $=this.subarray(p,E);return Object.setPrototypeOf($,a.prototype),$};function B(O,p,E){if(O%1!==0||O<0)throw new RangeError("offset is not uint");if(O+p>E)throw new RangeError("Trying to access beyond buffer length")}a.prototype.readUintLE=a.prototype.readUIntLE=function(p,E,U){p=p>>>0,E=E>>>0,U||B(p,E,this.length);let $=this[p],X=1,te=0;for(;++te<E&&(X*=256);)$+=this[p+te]*X;return $},a.prototype.readUintBE=a.prototype.readUIntBE=function(p,E,U){p=p>>>0,E=E>>>0,U||B(p,E,this.length);let $=this[p+--E],X=1;for(;E>0&&(X*=256);)$+=this[p+--E]*X;return $},a.prototype.readUint8=a.prototype.readUInt8=function(p,E){return p=p>>>0,E||B(p,1,this.length),this[p]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(p,E){return p=p>>>0,E||B(p,2,this.length),this[p]|this[p+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(p,E){return p=p>>>0,E||B(p,2,this.length),this[p]<<8|this[p+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(p,E){return p=p>>>0,E||B(p,4,this.length),(this[p]|this[p+1]<<8|this[p+2]<<16)+this[p+3]*16777216},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(p,E){return p=p>>>0,E||B(p,4,this.length),this[p]*16777216+(this[p+1]<<16|this[p+2]<<8|this[p+3])},a.prototype.readBigUInt64LE=We(function(p){p=p>>>0,J(p,"offset");let E=this[p],U=this[p+7];(E===void 0||U===void 0)&&ee(p,this.length-8);let $=E+this[++p]*$e(2,8)+this[++p]*$e(2,16)+this[++p]*$e(2,24),X=this[++p]+this[++p]*$e(2,8)+this[++p]*$e(2,16)+U*$e(2,24);return BigInt($)+(BigInt(X)<<BigInt(32))}),a.prototype.readBigUInt64BE=We(function(p){p=p>>>0,J(p,"offset");let E=this[p],U=this[p+7];(E===void 0||U===void 0)&&ee(p,this.length-8);let $=E*$e(2,24)+this[++p]*$e(2,16)+this[++p]*$e(2,8)+this[++p],X=this[++p]*$e(2,24)+this[++p]*$e(2,16)+this[++p]*$e(2,8)+U;return (BigInt($)<<BigInt(32))+BigInt(X)}),a.prototype.readIntLE=function(p,E,U){p=p>>>0,E=E>>>0,U||B(p,E,this.length);let $=this[p],X=1,te=0;for(;++te<E&&(X*=256);)$+=this[p+te]*X;return X*=128,$>=X&&($-=Math.pow(2,8*E)),$},a.prototype.readIntBE=function(p,E,U){p=p>>>0,E=E>>>0,U||B(p,E,this.length);let $=E,X=1,te=this[p+--$];for(;$>0&&(X*=256);)te+=this[p+--$]*X;return X*=128,te>=X&&(te-=Math.pow(2,8*E)),te},a.prototype.readInt8=function(p,E){return p=p>>>0,E||B(p,1,this.length),this[p]&128?(255-this[p]+1)*-1:this[p]},a.prototype.readInt16LE=function(p,E){p=p>>>0,E||B(p,2,this.length);let U=this[p]|this[p+1]<<8;return U&32768?U|4294901760:U},a.prototype.readInt16BE=function(p,E){p=p>>>0,E||B(p,2,this.length);let U=this[p+1]|this[p]<<8;return U&32768?U|4294901760:U},a.prototype.readInt32LE=function(p,E){return p=p>>>0,E||B(p,4,this.length),this[p]|this[p+1]<<8|this[p+2]<<16|this[p+3]<<24},a.prototype.readInt32BE=function(p,E){return p=p>>>0,E||B(p,4,this.length),this[p]<<24|this[p+1]<<16|this[p+2]<<8|this[p+3]},a.prototype.readBigInt64LE=We(function(p){p=p>>>0,J(p,"offset");let E=this[p],U=this[p+7];(E===void 0||U===void 0)&&ee(p,this.length-8);let $=this[p+4]+this[p+5]*$e(2,8)+this[p+6]*$e(2,16)+(U<<24);return (BigInt($)<<BigInt(32))+BigInt(E+this[++p]*$e(2,8)+this[++p]*$e(2,16)+this[++p]*$e(2,24))}),a.prototype.readBigInt64BE=We(function(p){p=p>>>0,J(p,"offset");let E=this[p],U=this[p+7];(E===void 0||U===void 0)&&ee(p,this.length-8);let $=(E<<24)+this[++p]*$e(2,16)+this[++p]*$e(2,8)+this[++p];return (BigInt($)<<BigInt(32))+BigInt(this[++p]*$e(2,24)+this[++p]*$e(2,16)+this[++p]*$e(2,8)+U)}),a.prototype.readFloatLE=function(p,E){return p=p>>>0,E||B(p,4,this.length),e.read(this,p,!0,23,4)},a.prototype.readFloatBE=function(p,E){return p=p>>>0,E||B(p,4,this.length),e.read(this,p,!1,23,4)},a.prototype.readDoubleLE=function(p,E){return p=p>>>0,E||B(p,8,this.length),e.read(this,p,!0,52,8)},a.prototype.readDoubleBE=function(p,E){return p=p>>>0,E||B(p,8,this.length),e.read(this,p,!1,52,8)};function z(O,p,E,U,$,X){if(!a.isBuffer(O))throw new TypeError('"buffer" argument must be a Buffer instance');if(p>$||p<X)throw new RangeError('"value" argument is out of bounds');if(E+U>O.length)throw new RangeError("Index out of range")}a.prototype.writeUintLE=a.prototype.writeUIntLE=function(p,E,U,$){if(p=+p,E=E>>>0,U=U>>>0,!$){let Se=Math.pow(2,8*U)-1;z(this,p,E,U,Se,0);}let X=1,te=0;for(this[E]=p&255;++te<U&&(X*=256);)this[E+te]=p/X&255;return E+U},a.prototype.writeUintBE=a.prototype.writeUIntBE=function(p,E,U,$){if(p=+p,E=E>>>0,U=U>>>0,!$){let Se=Math.pow(2,8*U)-1;z(this,p,E,U,Se,0);}let X=U-1,te=1;for(this[E+X]=p&255;--X>=0&&(te*=256);)this[E+X]=p/te&255;return E+U},a.prototype.writeUint8=a.prototype.writeUInt8=function(p,E,U){return p=+p,E=E>>>0,U||z(this,p,E,1,255,0),this[E]=p&255,E+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(p,E,U){return p=+p,E=E>>>0,U||z(this,p,E,2,65535,0),this[E]=p&255,this[E+1]=p>>>8,E+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(p,E,U){return p=+p,E=E>>>0,U||z(this,p,E,2,65535,0),this[E]=p>>>8,this[E+1]=p&255,E+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(p,E,U){return p=+p,E=E>>>0,U||z(this,p,E,4,4294967295,0),this[E+3]=p>>>24,this[E+2]=p>>>16,this[E+1]=p>>>8,this[E]=p&255,E+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(p,E,U){return p=+p,E=E>>>0,U||z(this,p,E,4,4294967295,0),this[E]=p>>>24,this[E+1]=p>>>16,this[E+2]=p>>>8,this[E+3]=p&255,E+4};function P(O,p,E,U,$){Re(p,U,$,O,E,7);let X=Number(p&BigInt(4294967295));O[E++]=X,X=X>>8,O[E++]=X,X=X>>8,O[E++]=X,X=X>>8,O[E++]=X;let te=Number(p>>BigInt(32)&BigInt(4294967295));return O[E++]=te,te=te>>8,O[E++]=te,te=te>>8,O[E++]=te,te=te>>8,O[E++]=te,E}function V(O,p,E,U,$){Re(p,U,$,O,E,7);let X=Number(p&BigInt(4294967295));O[E+7]=X,X=X>>8,O[E+6]=X,X=X>>8,O[E+5]=X,X=X>>8,O[E+4]=X;let te=Number(p>>BigInt(32)&BigInt(4294967295));return O[E+3]=te,te=te>>8,O[E+2]=te,te=te>>8,O[E+1]=te,te=te>>8,O[E]=te,E+8}a.prototype.writeBigUInt64LE=We(function(p,E=0){return P(this,p,E,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeBigUInt64BE=We(function(p,E=0){return V(this,p,E,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeIntLE=function(p,E,U,$){if(p=+p,E=E>>>0,!$){let Ve=Math.pow(2,8*U-1);z(this,p,E,U,Ve-1,-Ve);}let X=0,te=1,Se=0;for(this[E]=p&255;++X<U&&(te*=256);)p<0&&Se===0&&this[E+X-1]!==0&&(Se=1),this[E+X]=(p/te>>0)-Se&255;return E+U},a.prototype.writeIntBE=function(p,E,U,$){if(p=+p,E=E>>>0,!$){let Ve=Math.pow(2,8*U-1);z(this,p,E,U,Ve-1,-Ve);}let X=U-1,te=1,Se=0;for(this[E+X]=p&255;--X>=0&&(te*=256);)p<0&&Se===0&&this[E+X+1]!==0&&(Se=1),this[E+X]=(p/te>>0)-Se&255;return E+U},a.prototype.writeInt8=function(p,E,U){return p=+p,E=E>>>0,U||z(this,p,E,1,127,-128),p<0&&(p=255+p+1),this[E]=p&255,E+1},a.prototype.writeInt16LE=function(p,E,U){return p=+p,E=E>>>0,U||z(this,p,E,2,32767,-32768),this[E]=p&255,this[E+1]=p>>>8,E+2},a.prototype.writeInt16BE=function(p,E,U){return p=+p,E=E>>>0,U||z(this,p,E,2,32767,-32768),this[E]=p>>>8,this[E+1]=p&255,E+2},a.prototype.writeInt32LE=function(p,E,U){return p=+p,E=E>>>0,U||z(this,p,E,4,2147483647,-2147483648),this[E]=p&255,this[E+1]=p>>>8,this[E+2]=p>>>16,this[E+3]=p>>>24,E+4},a.prototype.writeInt32BE=function(p,E,U){return p=+p,E=E>>>0,U||z(this,p,E,4,2147483647,-2147483648),p<0&&(p=4294967295+p+1),this[E]=p>>>24,this[E+1]=p>>>16,this[E+2]=p>>>8,this[E+3]=p&255,E+4},a.prototype.writeBigInt64LE=We(function(p,E=0){return P(this,p,E,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),a.prototype.writeBigInt64BE=We(function(p,E=0){return V(this,p,E,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function fe(O,p,E,U,$,X){if(E+U>O.length)throw new RangeError("Index out of range");if(E<0)throw new RangeError("Index out of range")}function ye(O,p,E,U,$){return p=+p,E=E>>>0,$||fe(O,p,E,4),e.write(O,p,E,U,23,4),E+4}a.prototype.writeFloatLE=function(p,E,U){return ye(this,p,E,!0,U)},a.prototype.writeFloatBE=function(p,E,U){return ye(this,p,E,!1,U)};function Ce(O,p,E,U,$){return p=+p,E=E>>>0,$||fe(O,p,E,8),e.write(O,p,E,U,52,8),E+8}a.prototype.writeDoubleLE=function(p,E,U){return Ce(this,p,E,!0,U)},a.prototype.writeDoubleBE=function(p,E,U){return Ce(this,p,E,!1,U)},a.prototype.copy=function(p,E,U,$){if(!a.isBuffer(p))throw new TypeError("argument should be a Buffer");if(U||(U=0),!$&&$!==0&&($=this.length),E>=p.length&&(E=p.length),E||(E=0),$>0&&$<U&&($=U),$===U||p.length===0||this.length===0)return 0;if(E<0)throw new RangeError("targetStart out of bounds");if(U<0||U>=this.length)throw new RangeError("Index out of range");if($<0)throw new RangeError("sourceEnd out of bounds");$>this.length&&($=this.length),p.length-E<$-U&&($=p.length-E+U);let X=$-U;return this===p&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(E,U,$):Uint8Array.prototype.set.call(p,this.subarray(U,$),E),X},a.prototype.fill=function(p,E,U,$){if(typeof p=="string"){if(typeof E=="string"?($=E,E=0,U=this.length):typeof U=="string"&&($=U,U=this.length),$!==void 0&&typeof $!="string")throw new TypeError("encoding must be a string");if(typeof $=="string"&&!a.isEncoding($))throw new TypeError("Unknown encoding: "+$);if(p.length===1){let te=p.charCodeAt(0);($==="utf8"&&te<128||$==="latin1")&&(p=te);}}else typeof p=="number"?p=p&255:typeof p=="boolean"&&(p=Number(p));if(E<0||this.length<E||this.length<U)throw new RangeError("Out of range index");if(U<=E)return this;E=E>>>0,U=U===void 0?this.length:U>>>0,p||(p=0);let X;if(typeof p=="number")for(X=E;X<U;++X)this[X]=p;else {let te=a.isBuffer(p)?p:a.from(p,$),Se=te.length;if(Se===0)throw new TypeError('The value "'+p+'" is invalid for argument "value"');for(X=0;X<U-E;++X)this[X+E]=te[X%Se];}return this};let ae={};function ie(O,p,E){ae[O]=class extends E{constructor(){super(),Object.defineProperty(this,"message",{value:p.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${O}]`,this.stack,delete this.name;}get code(){return O}set code($){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:$,writable:!0});}toString(){return `${this.name} [${O}]: ${this.message}`}};}ie("ERR_BUFFER_OUT_OF_BOUNDS",function(O){return O?`${O} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),ie("ERR_INVALID_ARG_TYPE",function(O,p){return `The "${O}" argument must be of type number. Received type ${typeof p}`},TypeError),ie("ERR_OUT_OF_RANGE",function(O,p,E){let U=`The value of "${O}" is out of range.`,$=E;return Number.isInteger(E)&&Math.abs(E)>$e(2,32)?$=he(String(E)):typeof E=="bigint"&&($=String(E),(E>$e(BigInt(2),BigInt(32))||E<-$e(BigInt(2),BigInt(32)))&&($=he($)),$+="n"),U+=` It must be ${p}. Received ${$}`,U},RangeError);function he(O){let p="",E=O.length,U=O[0]==="-"?1:0;for(;E>=U+4;E-=3)p=`_${O.slice(E-3,E)}${p}`;return `${O.slice(0,E)}${p}`}function Be(O,p,E){J(p,"offset"),(O[p]===void 0||O[p+E]===void 0)&&ee(p,O.length-(E+1));}function Re(O,p,E,U,$,X){if(O>E||O<p){let te=typeof p=="bigint"?"n":"",Se;throw p===0||p===BigInt(0)?Se=`>= 0${te} and < 2${te} ** ${(X+1)*8}${te}`:Se=`>= -(2${te} ** ${(X+1)*8-1}${te}) and < 2 ** ${(X+1)*8-1}${te}`,new ae.ERR_OUT_OF_RANGE("value",Se,O)}Be(U,$,X);}function J(O,p){if(typeof O!="number")throw new ae.ERR_INVALID_ARG_TYPE(p,"number",O)}function ee(O,p,E){throw Math.floor(O)!==O?(J(O,E),new ae.ERR_OUT_OF_RANGE("offset","an integer",O)):p<0?new ae.ERR_BUFFER_OUT_OF_BOUNDS:new ae.ERR_OUT_OF_RANGE("offset",`>= ${0} and <= ${p}`,O)}let de=/[^+/0-9A-Za-z-_]/g;function xe(O){if(O=O.split("=")[0],O=O.trim().replace(de,""),O.length<2)return "";for(;O.length%4!==0;)O=O+"=";return O}function Pe(O,p){p=p||1/0;let E,U=O.length,$=null,X=[];for(let te=0;te<U;++te){if(E=O.charCodeAt(te),E>55295&&E<57344){if(!$){if(E>56319){(p-=3)>-1&&X.push(239,191,189);continue}else if(te+1===U){(p-=3)>-1&&X.push(239,191,189);continue}$=E;continue}if(E<56320){(p-=3)>-1&&X.push(239,191,189),$=E;continue}E=($-55296<<10|E-56320)+65536;}else $&&(p-=3)>-1&&X.push(239,191,189);if($=null,E<128){if((p-=1)<0)break;X.push(E);}else if(E<2048){if((p-=2)<0)break;X.push(E>>6|192,E&63|128);}else if(E<65536){if((p-=3)<0)break;X.push(E>>12|224,E>>6&63|128,E&63|128);}else if(E<1114112){if((p-=4)<0)break;X.push(E>>18|240,E>>12&63|128,E>>6&63|128,E&63|128);}else throw new Error("Invalid code point")}return X}function Oe(O){let p=[];for(let E=0;E<O.length;++E)p.push(O.charCodeAt(E)&255);return p}function He(O,p){let E,U,$,X=[];for(let te=0;te<O.length&&!((p-=2)<0);++te)E=O.charCodeAt(te),U=E>>8,$=E%256,X.push($),X.push(U);return X}function St(O){return t.toByteArray(xe(O))}function Fe(O,p,E,U){let $;for($=0;$<U&&!($+E>=p.length||$>=O.length);++$)p[$+E]=O[$];return $}function ze(O,p){return O instanceof p||O!=null&&O.constructor!=null&&O.constructor.name!=null&&O.constructor.name===p.name}function Tt(O){return O!==O}let Ge=function(){let O="0123456789abcdef",p=new Array(256);for(let E=0;E<16;++E){let U=E*16;for(let $=0;$<16;++$)p[U+$]=O[E]+O[$];}return p}();function We(O){return typeof BigInt=="undefined"?Pt:O}function Pt(){throw new Error("BigInt not supported")}return zl}var Uc=Rpe();Uc.Buffer;Uc.INSPECT_MAX_BYTES;Uc.kMaxLength;var Z1={},jq=!1;function jl(){return jq||(jq=!0,typeof Object.create=="function"?Z1=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}));}:Z1=function(e,r){if(r){e.super_=r;var n=function(){};n.prototype=r.prototype,e.prototype=new n,e.prototype.constructor=e;}}),Z1}var vR={},$q=!1;function oF(){return $q||($q=!0,vR=xr.EventEmitter),vR}var bR={},Vq=!1;function xpe(){if(Vq)return bR;Vq=!0;function t(T,x){var I=Object.keys(T);if(Object.getOwnPropertySymbols){var k=Object.getOwnPropertySymbols(T);x&&(k=k.filter(function(q){return Object.getOwnPropertyDescriptor(T,q).enumerable})),I.push.apply(I,k);}return I}function e(T){for(var x=1;x<arguments.length;x++){var I=arguments[x]!=null?arguments[x]:{};x%2?t(Object(I),!0).forEach(function(k){r(T,k,I[k]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(T,Object.getOwnPropertyDescriptors(I)):t(Object(I)).forEach(function(k){Object.defineProperty(T,k,Object.getOwnPropertyDescriptor(I,k));});}return T}function r(T,x,I){return x in T?Object.defineProperty(T,x,{value:I,enumerable:!0,configurable:!0,writable:!0}):T[x]=I,T}function n(T,x){if(!(T instanceof x))throw new TypeError("Cannot call a class as a function")}function i(T,x){for(var I=0;I<x.length;I++){var k=x[I];k.enumerable=k.enumerable||!1,k.configurable=!0,"value"in k&&(k.writable=!0),Object.defineProperty(T,k.key,k);}}function o(T,x,I){return x&&i(T.prototype,x),T}var a=Uc,s=a.Buffer,c=we,u=c.inspect,l=u&&u.custom||"inspect";function w(T,x,I){s.prototype.copy.call(T,x,I);}return bR=function(){function T(){n(this,T),this.head=null,this.tail=null,this.length=0;}return o(T,[{key:"push",value:function(I){var k={data:I,next:null};this.length>0?this.tail.next=k:this.head=k,this.tail=k,++this.length;}},{key:"unshift",value:function(I){var k={data:I,next:this.head};this.length===0&&(this.tail=k),this.head=k,++this.length;}},{key:"shift",value:function(){if(this.length!==0){var I=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,I}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0;}},{key:"join",value:function(I){if(this.length===0)return "";for(var k=this.head,q=""+k.data;k=k.next;)q+=I+k.data;return q}},{key:"concat",value:function(I){if(this.length===0)return s.alloc(0);for(var k=s.allocUnsafe(I>>>0),q=this.head,j=0;q;)w(q.data,k,j),j+=q.data.length,q=q.next;return k}},{key:"consume",value:function(I,k){var q;return I<this.head.data.length?(q=this.head.data.slice(0,I),this.head.data=this.head.data.slice(I)):I===this.head.data.length?q=this.shift():q=k?this._getString(I):this._getBuffer(I),q}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(I){var k=this.head,q=1,j=k.data;for(I-=j.length;k=k.next;){var K=k.data,Z=I>K.length?K.length:I;if(Z===K.length?j+=K:j+=K.slice(0,I),I-=Z,I===0){Z===K.length?(++q,k.next?this.head=k.next:this.head=this.tail=null):(this.head=k,k.data=K.slice(Z));break}++q;}return this.length-=q,j}},{key:"_getBuffer",value:function(I){var k=s.allocUnsafe(I),q=this.head,j=1;for(q.data.copy(k),I-=q.data.length;q=q.next;){var K=q.data,Z=I>K.length?K.length:I;if(K.copy(k,k.length-I,0,Z),I-=Z,I===0){Z===K.length?(++j,q.next?this.head=q.next:this.head=this.tail=null):(this.head=q,q.data=K.slice(Z));break}++j;}return this.length-=j,k}},{key:l,value:function(I,k){return u(this,e({},k,{depth:0,customInspect:!1}))}}]),T}(),bR}var wR={},Gq=!1;function aF(){if(Gq)return wR;Gq=!0;var t=zt;function e(s,c){var u=this,l=this._readableState&&this._readableState.destroyed,w=this._writableState&&this._writableState.destroyed;return l||w?(c?c(s):s&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,t.nextTick(o,this,s)):t.nextTick(o,this,s)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(s||null,function(T){!c&&T?u._writableState?u._writableState.errorEmitted?t.nextTick(n,u):(u._writableState.errorEmitted=!0,t.nextTick(r,u,T)):t.nextTick(r,u,T):c?(t.nextTick(n,u),c(T)):t.nextTick(n,u);}),this)}function r(s,c){o(s,c),n(s);}function n(s){s._writableState&&!s._writableState.emitClose||s._readableState&&!s._readableState.emitClose||s.emit("close");}function i(){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);}function o(s,c){s.emit("error",c);}function a(s,c){var u=s._readableState,l=s._writableState;u&&u.autoDestroy||l&&l.autoDestroy?s.destroy(c):s.emit("error",c);}return wR={destroy:e,undestroy:i,errorOrDestroy:a},wR}var ER={},Kq=!1;function th(){if(Kq)return ER;Kq=!0;let t={};function e(a,s,c){c||(c=Error);function u(w,T,x){return typeof s=="string"?s:s(w,T,x)}class l extends c{constructor(T,x,I){super(u(T,x,I));}}l.prototype.name=c.name,l.prototype.code=a,t[a]=l;}function r(a,s){if(Array.isArray(a)){let c=a.length;return a=a.map(u=>String(u)),c>2?`one of ${s} ${a.slice(0,c-1).join(", ")}, or `+a[c-1]:c===2?`one of ${s} ${a[0]} or ${a[1]}`:`of ${s} ${a[0]}`}else return `of ${s} ${String(a)}`}function n(a,s,c){return a.substr(0,s.length)===s}function i(a,s,c){return (c===void 0||c>a.length)&&(c=a.length),a.substring(c-s.length,c)===s}function o(a,s,c){return typeof c!="number"&&(c=0),c+s.length>a.length?!1:a.indexOf(s,c)!==-1}return e("ERR_INVALID_OPT_VALUE",function(a,s){return 'The value "'+s+'" is invalid for option "'+a+'"'},TypeError),e("ERR_INVALID_ARG_TYPE",function(a,s,c){let u;typeof s=="string"&&n(s,"not ")?(u="must not be",s=s.replace(/^not /,"")):u="must be";let l;if(i(a," argument"))l=`The ${a} ${u} ${r(s,"type")}`;else {let w=o(a,".")?"property":"argument";l=`The "${a}" ${w} ${u} ${r(s,"type")}`;}return l+=`. Received type ${typeof c}`,l},TypeError),e("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),e("ERR_METHOD_NOT_IMPLEMENTED",function(a){return "The "+a+" method is not implemented"}),e("ERR_STREAM_PREMATURE_CLOSE","Premature close"),e("ERR_STREAM_DESTROYED",function(a){return "Cannot call "+a+" after a stream was destroyed"}),e("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),e("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),e("ERR_STREAM_WRITE_AFTER_END","write after end"),e("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),e("ERR_UNKNOWN_ENCODING",function(a){return "Unknown encoding: "+a},TypeError),e("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),ER.codes=t,ER}var _R={},Wq=!1;function sF(){if(Wq)return _R;Wq=!0;var t=th().codes.ERR_INVALID_OPT_VALUE;function e(n,i,o){return n.highWaterMark!=null?n.highWaterMark:i?n[o]:null}function r(n,i,o,a){var s=e(i,a,o);if(s!=null){if(!(isFinite(s)&&Math.floor(s)===s)||s<0){var c=a?o:"highWaterMark";throw new t(c,s)}return Math.floor(s)}return n.objectMode?16:16*1024}return _R={getHighWaterMark:r},_R}var SR={},Yq=!1,CR=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:globalThis;function Ipe(){if(Yq)return SR;Yq=!0,SR=t;function t(r,n){if(e("noDeprecation"))return r;var i=!1;function o(){if(!i){if(e("throwDeprecation"))throw new Error(n);e("traceDeprecation")?console.trace(n):console.warn(n),i=!0;}return r.apply(this||CR,arguments)}return o}function e(r){try{if(!CR.localStorage)return !1}catch(i){return !1}var n=CR.localStorage[r];return n==null?!1:String(n).toLowerCase()==="true"}return SR}var AR={},Zq=!1,Mpe=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:globalThis;function PR(){if(Zq)return AR;Zq=!0;var t=zt;AR=Y;function e(ae){var ie=this;this.next=null,this.entry=null,this.finish=function(){Ce(ie,ae);};}var r;Y.WritableState=pe;var n={deprecate:Ipe()},i=oF(),o=Uc.Buffer,a=Mpe.Uint8Array||function(){};function s(ae){return o.from(ae)}function c(ae){return o.isBuffer(ae)||ae instanceof a}var u=aF(),l=sF(),w=l.getHighWaterMark,T=th().codes,x=T.ERR_INVALID_ARG_TYPE,I=T.ERR_METHOD_NOT_IMPLEMENTED,k=T.ERR_MULTIPLE_CALLBACK,q=T.ERR_STREAM_CANNOT_PIPE,j=T.ERR_STREAM_DESTROYED,K=T.ERR_STREAM_NULL_VALUES,Z=T.ERR_STREAM_WRITE_AFTER_END,se=T.ERR_UNKNOWN_ENCODING,ce=u.errorOrDestroy;jl()(Y,i);function Te(){}function pe(ae,ie,he){r=r||Hl(),ae=ae||{},typeof he!="boolean"&&(he=ie instanceof r),this.objectMode=!!ae.objectMode,he&&(this.objectMode=this.objectMode||!!ae.writableObjectMode),this.highWaterMark=w(this,ae,"writableHighWaterMark",he),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var Be=ae.decodeStrings===!1;this.decodeStrings=!Be,this.defaultEncoding=ae.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(Re){R(ie,Re);},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=ae.emitClose!==!1,this.autoDestroy=!!ae.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new e(this);}pe.prototype.getBuffer=function(){for(var ie=this.bufferedRequest,he=[];ie;)he.push(ie),ie=ie.next;return he},function(){try{Object.defineProperty(pe.prototype,"buffer",{get:n.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")});}catch(ae){}}();var le;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(le=Function.prototype[Symbol.hasInstance],Object.defineProperty(Y,Symbol.hasInstance,{value:function(ie){return le.call(this,ie)?!0:this!==Y?!1:ie&&ie._writableState instanceof pe}})):le=function(ie){return ie instanceof this};function Y(ae){r=r||Hl();var ie=this instanceof r;if(!ie&&!le.call(Y,this))return new Y(ae);this._writableState=new pe(ae,this,ie),this.writable=!0,ae&&(typeof ae.write=="function"&&(this._write=ae.write),typeof ae.writev=="function"&&(this._writev=ae.writev),typeof ae.destroy=="function"&&(this._destroy=ae.destroy),typeof ae.final=="function"&&(this._final=ae.final)),i.call(this);}Y.prototype.pipe=function(){ce(this,new q);};function S(ae,ie){var he=new Z;ce(ae,he),t.nextTick(ie,he);}function d(ae,ie,he,Be){var Re;return he===null?Re=new K:typeof he!="string"&&!ie.objectMode&&(Re=new x("chunk",["string","Buffer"],he)),Re?(ce(ae,Re),t.nextTick(Be,Re),!1):!0}Y.prototype.write=function(ae,ie,he){var Be=this._writableState,Re=!1,J=!Be.objectMode&&c(ae);return J&&!o.isBuffer(ae)&&(ae=s(ae)),typeof ie=="function"&&(he=ie,ie=null),J?ie="buffer":ie||(ie=Be.defaultEncoding),typeof he!="function"&&(he=Te),Be.ending?S(this,he):(J||d(this,Be,ae,he))&&(Be.pendingcb++,Re=A(this,Be,J,ae,ie,he)),Re},Y.prototype.cork=function(){this._writableState.corked++;},Y.prototype.uncork=function(){var ae=this._writableState;ae.corked&&(ae.corked--,!ae.writing&&!ae.corked&&!ae.bufferProcessing&&ae.bufferedRequest&&B(this,ae));},Y.prototype.setDefaultEncoding=function(ie){if(typeof ie=="string"&&(ie=ie.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((ie+"").toLowerCase())>-1))throw new se(ie);return this._writableState.defaultEncoding=ie,this},Object.defineProperty(Y.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function C(ae,ie,he){return !ae.objectMode&&ae.decodeStrings!==!1&&typeof ie=="string"&&(ie=o.from(ie,he)),ie}Object.defineProperty(Y.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function A(ae,ie,he,Be,Re,J){if(!he){var ee=C(ie,Be,Re);Be!==ee&&(he=!0,Re="buffer",Be=ee);}var de=ie.objectMode?1:Be.length;ie.length+=de;var xe=ie.length<ie.highWaterMark;if(xe||(ie.needDrain=!0),ie.writing||ie.corked){var Pe=ie.lastBufferedRequest;ie.lastBufferedRequest={chunk:Be,encoding:Re,isBuf:he,callback:J,next:null},Pe?Pe.next=ie.lastBufferedRequest:ie.bufferedRequest=ie.lastBufferedRequest,ie.bufferedRequestCount+=1;}else f(ae,ie,!1,de,Be,Re,J);return xe}function f(ae,ie,he,Be,Re,J,ee){ie.writelen=Be,ie.writecb=ee,ie.writing=!0,ie.sync=!0,ie.destroyed?ie.onwrite(new j("write")):he?ae._writev(Re,ie.onwrite):ae._write(Re,J,ie.onwrite),ie.sync=!1;}function _(ae,ie,he,Be,Re){--ie.pendingcb,he?(t.nextTick(Re,Be),t.nextTick(fe,ae,ie),ae._writableState.errorEmitted=!0,ce(ae,Be)):(Re(Be),ae._writableState.errorEmitted=!0,ce(ae,Be),fe(ae,ie));}function M(ae){ae.writing=!1,ae.writecb=null,ae.length-=ae.writelen,ae.writelen=0;}function R(ae,ie){var he=ae._writableState,Be=he.sync,Re=he.writecb;if(typeof Re!="function")throw new k;if(M(he),ie)_(ae,he,Be,ie,Re);else {var J=z(he)||ae.destroyed;!J&&!he.corked&&!he.bufferProcessing&&he.bufferedRequest&&B(ae,he),Be?t.nextTick(h,ae,he,J,Re):h(ae,he,J,Re);}}function h(ae,ie,he,Be){he||b(ae,ie),ie.pendingcb--,Be(),fe(ae,ie);}function b(ae,ie){ie.length===0&&ie.needDrain&&(ie.needDrain=!1,ae.emit("drain"));}function B(ae,ie){ie.bufferProcessing=!0;var he=ie.bufferedRequest;if(ae._writev&&he&&he.next){var Be=ie.bufferedRequestCount,Re=new Array(Be),J=ie.corkedRequestsFree;J.entry=he;for(var ee=0,de=!0;he;)Re[ee]=he,he.isBuf||(de=!1),he=he.next,ee+=1;Re.allBuffers=de,f(ae,ie,!0,ie.length,Re,"",J.finish),ie.pendingcb++,ie.lastBufferedRequest=null,J.next?(ie.corkedRequestsFree=J.next,J.next=null):ie.corkedRequestsFree=new e(ie),ie.bufferedRequestCount=0;}else {for(;he;){var xe=he.chunk,Pe=he.encoding,Oe=he.callback,He=ie.objectMode?1:xe.length;if(f(ae,ie,!1,He,xe,Pe,Oe),he=he.next,ie.bufferedRequestCount--,ie.writing)break}he===null&&(ie.lastBufferedRequest=null);}ie.bufferedRequest=he,ie.bufferProcessing=!1;}Y.prototype._write=function(ae,ie,he){he(new I("_write()"));},Y.prototype._writev=null,Y.prototype.end=function(ae,ie,he){var Be=this._writableState;return typeof ae=="function"?(he=ae,ae=null,ie=null):typeof ie=="function"&&(he=ie,ie=null),ae!=null&&this.write(ae,ie),Be.corked&&(Be.corked=1,this.uncork()),Be.ending||ye(this,Be,he),this},Object.defineProperty(Y.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function z(ae){return ae.ending&&ae.length===0&&ae.bufferedRequest===null&&!ae.finished&&!ae.writing}function P(ae,ie){ae._final(function(he){ie.pendingcb--,he&&ce(ae,he),ie.prefinished=!0,ae.emit("prefinish"),fe(ae,ie);});}function V(ae,ie){!ie.prefinished&&!ie.finalCalled&&(typeof ae._final=="function"&&!ie.destroyed?(ie.pendingcb++,ie.finalCalled=!0,t.nextTick(P,ae,ie)):(ie.prefinished=!0,ae.emit("prefinish")));}function fe(ae,ie){var he=z(ie);if(he&&(V(ae,ie),ie.pendingcb===0&&(ie.finished=!0,ae.emit("finish"),ie.autoDestroy))){var Be=ae._readableState;(!Be||Be.autoDestroy&&Be.endEmitted)&&ae.destroy();}return he}function ye(ae,ie,he){ie.ending=!0,fe(ae,ie),he&&(ie.finished?t.nextTick(he):ae.once("finish",he)),ie.ended=!0,ae.writable=!1;}function Ce(ae,ie,he){var Be=ae.entry;for(ae.entry=null;Be;){var Re=Be.callback;ie.pendingcb--,Re(he),Be=Be.next;}ie.corkedRequestsFree.next=ae;}return Object.defineProperty(Y.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(ie){this._writableState&&(this._writableState.destroyed=ie);}}),Y.prototype.destroy=u.destroy,Y.prototype._undestroy=u.undestroy,Y.prototype._destroy=function(ae,ie){ie(ae);},AR}var TR={},Jq=!1;function Hl(){if(Jq)return TR;Jq=!0;var t=zt,e=Object.keys||function(l){var w=[];for(var T in l)w.push(T);return w};TR=s;var r=BR(),n=PR();jl()(s,r);for(var i=e(n.prototype),o=0;o<i.length;o++){var a=i[o];s.prototype[a]||(s.prototype[a]=n.prototype[a]);}function s(l){if(!(this instanceof s))return new s(l);r.call(this,l),n.call(this,l),this.allowHalfOpen=!0,l&&(l.readable===!1&&(this.readable=!1),l.writable===!1&&(this.writable=!1),l.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",c)));}Object.defineProperty(s.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(s.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(s.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function c(){this._writableState.ended||t.nextTick(u,this);}function u(l){l.end();}return Object.defineProperty(s.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(w){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=w,this._writableState.destroyed=w);}}),TR}var RR={},Xq=!1;function J1(){if(Xq)return RR;Xq=!0;var t=th().codes.ERR_STREAM_PREMATURE_CLOSE;function e(o){var a=!1;return function(){if(!a){a=!0;for(var s=arguments.length,c=new Array(s),u=0;u<s;u++)c[u]=arguments[u];o.apply(this,c);}}}function r(){}function n(o){return o.setHeader&&typeof o.abort=="function"}function i(o,a,s){if(typeof a=="function")return i(o,null,a);a||(a={}),s=e(s||r);var c=a.readable||a.readable!==!1&&o.readable,u=a.writable||a.writable!==!1&&o.writable,l=function(){o.writable||T();},w=o._writableState&&o._writableState.finished,T=function(){u=!1,w=!0,c||s.call(o);},x=o._readableState&&o._readableState.endEmitted,I=function(){c=!1,x=!0,u||s.call(o);},k=function(Z){s.call(o,Z);},q=function(){var Z;if(c&&!x)return (!o._readableState||!o._readableState.ended)&&(Z=new t),s.call(o,Z);if(u&&!w)return (!o._writableState||!o._writableState.ended)&&(Z=new t),s.call(o,Z)},j=function(){o.req.on("finish",T);};return n(o)?(o.on("complete",T),o.on("abort",q),o.req?j():o.on("request",j)):u&&!o._writableState&&(o.on("end",l),o.on("close",l)),o.on("end",I),o.on("finish",T),a.error!==!1&&o.on("error",k),o.on("close",q),function(){o.removeListener("complete",T),o.removeListener("abort",q),o.removeListener("request",j),o.req&&o.req.removeListener("finish",T),o.removeListener("end",l),o.removeListener("close",l),o.removeListener("finish",T),o.removeListener("end",I),o.removeListener("error",k),o.removeListener("close",q);}}return RR=i,RR}var xR={},Qq=!1;function Ope(){if(Qq)return xR;Qq=!0;var t=zt,e;function r(K,Z,se){return Z in K?Object.defineProperty(K,Z,{value:se,enumerable:!0,configurable:!0,writable:!0}):K[Z]=se,K}var n=J1(),i=Symbol("lastResolve"),o=Symbol("lastReject"),a=Symbol("error"),s=Symbol("ended"),c=Symbol("lastPromise"),u=Symbol("handlePromise"),l=Symbol("stream");function w(K,Z){return {value:K,done:Z}}function T(K){var Z=K[i];if(Z!==null){var se=K[l].read();se!==null&&(K[c]=null,K[i]=null,K[o]=null,Z(w(se,!1)));}}function x(K){t.nextTick(T,K);}function I(K,Z){return function(se,ce){K.then(function(){if(Z[s]){se(w(void 0,!0));return}Z[u](se,ce);},ce);}}var k=Object.getPrototypeOf(function(){}),q=Object.setPrototypeOf((e={get stream(){return this[l]},next:function(){var Z=this,se=this[a];if(se!==null)return Promise.reject(se);if(this[s])return Promise.resolve(w(void 0,!0));if(this[l].destroyed)return new Promise(function(le,Y){t.nextTick(function(){Z[a]?Y(Z[a]):le(w(void 0,!0));});});var ce=this[c],Te;if(ce)Te=new Promise(I(ce,this));else {var pe=this[l].read();if(pe!==null)return Promise.resolve(w(pe,!1));Te=new Promise(this[u]);}return this[c]=Te,Te}},r(e,Symbol.asyncIterator,function(){return this}),r(e,"return",function(){var Z=this;return new Promise(function(se,ce){Z[l].destroy(null,function(Te){if(Te){ce(Te);return}se(w(void 0,!0));});})}),e),k),j=function(Z){var se,ce=Object.create(q,(se={},r(se,l,{value:Z,writable:!0}),r(se,i,{value:null,writable:!0}),r(se,o,{value:null,writable:!0}),r(se,a,{value:null,writable:!0}),r(se,s,{value:Z._readableState.endEmitted,writable:!0}),r(se,u,{value:function(pe,le){var Y=ce[l].read();Y?(ce[c]=null,ce[i]=null,ce[o]=null,pe(w(Y,!1))):(ce[i]=pe,ce[o]=le);},writable:!0}),se));return ce[c]=null,n(Z,function(Te){if(Te&&Te.code!=="ERR_STREAM_PREMATURE_CLOSE"){var pe=ce[o];pe!==null&&(ce[c]=null,ce[i]=null,ce[o]=null,pe(Te)),ce[a]=Te;return}var le=ce[i];le!==null&&(ce[c]=null,ce[i]=null,ce[o]=null,le(w(void 0,!0))),ce[s]=!0;}),Z.on("readable",x.bind(null,ce)),ce};return xR=j,xR}var IR={},eF=!1;function Npe(){return eF||(eF=!0,IR=function(){throw new Error("Readable.from is not available in the browser")}),IR}var MR={},tF=!1,kpe=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:globalThis;function BR(){if(tF)return MR;tF=!0;var t=zt;MR=S;var e;S.ReadableState=Y,xr.EventEmitter;var r=function(ee,de){return ee.listeners(de).length},n=oF(),i=Uc.Buffer,o=kpe.Uint8Array||function(){};function a(J){return i.from(J)}function s(J){return i.isBuffer(J)||J instanceof o}var c=we,u;c&&c.debuglog?u=c.debuglog("stream"):u=function(){};var l=xpe(),w=aF(),T=sF(),x=T.getHighWaterMark,I=th().codes,k=I.ERR_INVALID_ARG_TYPE,q=I.ERR_STREAM_PUSH_AFTER_EOF,j=I.ERR_METHOD_NOT_IMPLEMENTED,K=I.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,Z,se,ce;jl()(S,n);var Te=w.errorOrDestroy,pe=["error","close","destroy","pause","resume"];function le(J,ee,de){if(typeof J.prependListener=="function")return J.prependListener(ee,de);!J._events||!J._events[ee]?J.on(ee,de):Array.isArray(J._events[ee])?J._events[ee].unshift(de):J._events[ee]=[de,J._events[ee]];}function Y(J,ee,de){e=e||Hl(),J=J||{},typeof de!="boolean"&&(de=ee instanceof e),this.objectMode=!!J.objectMode,de&&(this.objectMode=this.objectMode||!!J.readableObjectMode),this.highWaterMark=x(this,J,"readableHighWaterMark",de),this.buffer=new l,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=J.emitClose!==!1,this.autoDestroy=!!J.autoDestroy,this.destroyed=!1,this.defaultEncoding=J.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,J.encoding&&(Z||(Z=na.StringDecoder),this.decoder=new Z(J.encoding),this.encoding=J.encoding);}function S(J){if(e=e||Hl(),!(this instanceof S))return new S(J);var ee=this instanceof e;this._readableState=new Y(J,this,ee),this.readable=!0,J&&(typeof J.read=="function"&&(this._read=J.read),typeof J.destroy=="function"&&(this._destroy=J.destroy)),n.call(this);}Object.defineProperty(S.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(ee){this._readableState&&(this._readableState.destroyed=ee);}}),S.prototype.destroy=w.destroy,S.prototype._undestroy=w.undestroy,S.prototype._destroy=function(J,ee){ee(J);},S.prototype.push=function(J,ee){var de=this._readableState,xe;return de.objectMode?xe=!0:typeof J=="string"&&(ee=ee||de.defaultEncoding,ee!==de.encoding&&(J=i.from(J,ee),ee=""),xe=!0),d(this,J,ee,!1,xe)},S.prototype.unshift=function(J){return d(this,J,null,!0,!1)};function d(J,ee,de,xe,Pe){u("readableAddChunk",ee);var Oe=J._readableState;if(ee===null)Oe.reading=!1,R(J,Oe);else {var He;if(Pe||(He=A(Oe,ee)),He)Te(J,He);else if(Oe.objectMode||ee&&ee.length>0)if(typeof ee!="string"&&!Oe.objectMode&&Object.getPrototypeOf(ee)!==i.prototype&&(ee=a(ee)),xe)Oe.endEmitted?Te(J,new K):C(J,Oe,ee,!0);else if(Oe.ended)Te(J,new q);else {if(Oe.destroyed)return !1;Oe.reading=!1,Oe.decoder&&!de?(ee=Oe.decoder.write(ee),Oe.objectMode||ee.length!==0?C(J,Oe,ee,!1):B(J,Oe)):C(J,Oe,ee,!1);}else xe||(Oe.reading=!1,B(J,Oe));}return !Oe.ended&&(Oe.length<Oe.highWaterMark||Oe.length===0)}function C(J,ee,de,xe){ee.flowing&&ee.length===0&&!ee.sync?(ee.awaitDrain=0,J.emit("data",de)):(ee.length+=ee.objectMode?1:de.length,xe?ee.buffer.unshift(de):ee.buffer.push(de),ee.needReadable&&h(J)),B(J,ee);}function A(J,ee){var de;return !s(ee)&&typeof ee!="string"&&ee!==void 0&&!J.objectMode&&(de=new k("chunk",["string","Buffer","Uint8Array"],ee)),de}S.prototype.isPaused=function(){return this._readableState.flowing===!1},S.prototype.setEncoding=function(J){Z||(Z=na.StringDecoder);var ee=new Z(J);this._readableState.decoder=ee,this._readableState.encoding=this._readableState.decoder.encoding;for(var de=this._readableState.buffer.head,xe="";de!==null;)xe+=ee.write(de.data),de=de.next;return this._readableState.buffer.clear(),xe!==""&&this._readableState.buffer.push(xe),this._readableState.length=xe.length,this};var f=1073741824;function _(J){return J>=f?J=f:(J--,J|=J>>>1,J|=J>>>2,J|=J>>>4,J|=J>>>8,J|=J>>>16,J++),J}function M(J,ee){return J<=0||ee.length===0&&ee.ended?0:ee.objectMode?1:J!==J?ee.flowing&&ee.length?ee.buffer.head.data.length:ee.length:(J>ee.highWaterMark&&(ee.highWaterMark=_(J)),J<=ee.length?J:ee.ended?ee.length:(ee.needReadable=!0,0))}S.prototype.read=function(J){u("read",J),J=parseInt(J,10);var ee=this._readableState,de=J;if(J!==0&&(ee.emittedReadable=!1),J===0&&ee.needReadable&&((ee.highWaterMark!==0?ee.length>=ee.highWaterMark:ee.length>0)||ee.ended))return u("read: emitReadable",ee.length,ee.ended),ee.length===0&&ee.ended?he(this):h(this),null;if(J=M(J,ee),J===0&&ee.ended)return ee.length===0&&he(this),null;var xe=ee.needReadable;u("need readable",xe),(ee.length===0||ee.length-J<ee.highWaterMark)&&(xe=!0,u("length less than watermark",xe)),ee.ended||ee.reading?(xe=!1,u("reading or ended",xe)):xe&&(u("do read"),ee.reading=!0,ee.sync=!0,ee.length===0&&(ee.needReadable=!0),this._read(ee.highWaterMark),ee.sync=!1,ee.reading||(J=M(de,ee)));var Pe;return J>0?Pe=ie(J,ee):Pe=null,Pe===null?(ee.needReadable=ee.length<=ee.highWaterMark,J=0):(ee.length-=J,ee.awaitDrain=0),ee.length===0&&(ee.ended||(ee.needReadable=!0),de!==J&&ee.ended&&he(this)),Pe!==null&&this.emit("data",Pe),Pe};function R(J,ee){if(u("onEofChunk"),!ee.ended){if(ee.decoder){var de=ee.decoder.end();de&&de.length&&(ee.buffer.push(de),ee.length+=ee.objectMode?1:de.length);}ee.ended=!0,ee.sync?h(J):(ee.needReadable=!1,ee.emittedReadable||(ee.emittedReadable=!0,b(J)));}}function h(J){var ee=J._readableState;u("emitReadable",ee.needReadable,ee.emittedReadable),ee.needReadable=!1,ee.emittedReadable||(u("emitReadable",ee.flowing),ee.emittedReadable=!0,t.nextTick(b,J));}function b(J){var ee=J._readableState;u("emitReadable_",ee.destroyed,ee.length,ee.ended),!ee.destroyed&&(ee.length||ee.ended)&&(J.emit("readable"),ee.emittedReadable=!1),ee.needReadable=!ee.flowing&&!ee.ended&&ee.length<=ee.highWaterMark,ae(J);}function B(J,ee){ee.readingMore||(ee.readingMore=!0,t.nextTick(z,J,ee));}function z(J,ee){for(;!ee.reading&&!ee.ended&&(ee.length<ee.highWaterMark||ee.flowing&&ee.length===0);){var de=ee.length;if(u("maybeReadMore read 0"),J.read(0),de===ee.length)break}ee.readingMore=!1;}S.prototype._read=function(J){Te(this,new j("_read()"));},S.prototype.pipe=function(J,ee){var de=this,xe=this._readableState;switch(xe.pipesCount){case 0:xe.pipes=J;break;case 1:xe.pipes=[xe.pipes,J];break;default:xe.pipes.push(J);break}xe.pipesCount+=1,u("pipe count=%d opts=%j",xe.pipesCount,ee);var Pe=(!ee||ee.end!==!1)&&J!==t.stdout&&J!==t.stderr,Oe=Pe?St:p;xe.endEmitted?t.nextTick(Oe):de.once("end",Oe),J.on("unpipe",He);function He(E,U){u("onunpipe"),E===de&&U&&U.hasUnpiped===!1&&(U.hasUnpiped=!0,Tt());}function St(){u("onend"),J.end();}var Fe=P(de);J.on("drain",Fe);var ze=!1;function Tt(){u("cleanup"),J.removeListener("close",Pt),J.removeListener("finish",O),J.removeListener("drain",Fe),J.removeListener("error",We),J.removeListener("unpipe",He),de.removeListener("end",St),de.removeListener("end",p),de.removeListener("data",Ge),ze=!0,xe.awaitDrain&&(!J._writableState||J._writableState.needDrain)&&Fe();}de.on("data",Ge);function Ge(E){u("ondata");var U=J.write(E);u("dest.write",U),U===!1&&((xe.pipesCount===1&&xe.pipes===J||xe.pipesCount>1&&Re(xe.pipes,J)!==-1)&&!ze&&(u("false write response, pause",xe.awaitDrain),xe.awaitDrain++),de.pause());}function We(E){u("onerror",E),p(),J.removeListener("error",We),r(J,"error")===0&&Te(J,E);}le(J,"error",We);function Pt(){J.removeListener("finish",O),p();}J.once("close",Pt);function O(){u("onfinish"),J.removeListener("close",Pt),p();}J.once("finish",O);function p(){u("unpipe"),de.unpipe(J);}return J.emit("pipe",de),xe.flowing||(u("pipe resume"),de.resume()),J};function P(J){return function(){var de=J._readableState;u("pipeOnDrain",de.awaitDrain),de.awaitDrain&&de.awaitDrain--,de.awaitDrain===0&&r(J,"data")&&(de.flowing=!0,ae(J));}}S.prototype.unpipe=function(J){var ee=this._readableState,de={hasUnpiped:!1};if(ee.pipesCount===0)return this;if(ee.pipesCount===1)return J&&J!==ee.pipes?this:(J||(J=ee.pipes),ee.pipes=null,ee.pipesCount=0,ee.flowing=!1,J&&J.emit("unpipe",this,de),this);if(!J){var xe=ee.pipes,Pe=ee.pipesCount;ee.pipes=null,ee.pipesCount=0,ee.flowing=!1;for(var Oe=0;Oe<Pe;Oe++)xe[Oe].emit("unpipe",this,{hasUnpiped:!1});return this}var He=Re(ee.pipes,J);return He===-1?this:(ee.pipes.splice(He,1),ee.pipesCount-=1,ee.pipesCount===1&&(ee.pipes=ee.pipes[0]),J.emit("unpipe",this,de),this)},S.prototype.on=function(J,ee){var de=n.prototype.on.call(this,J,ee),xe=this._readableState;return J==="data"?(xe.readableListening=this.listenerCount("readable")>0,xe.flowing!==!1&&this.resume()):J==="readable"&&!xe.endEmitted&&!xe.readableListening&&(xe.readableListening=xe.needReadable=!0,xe.flowing=!1,xe.emittedReadable=!1,u("on readable",xe.length,xe.reading),xe.length?h(this):xe.reading||t.nextTick(fe,this)),de},S.prototype.addListener=S.prototype.on,S.prototype.removeListener=function(J,ee){var de=n.prototype.removeListener.call(this,J,ee);return J==="readable"&&t.nextTick(V,this),de},S.prototype.removeAllListeners=function(J){var ee=n.prototype.removeAllListeners.apply(this,arguments);return (J==="readable"||J===void 0)&&t.nextTick(V,this),ee};function V(J){var ee=J._readableState;ee.readableListening=J.listenerCount("readable")>0,ee.resumeScheduled&&!ee.paused?ee.flowing=!0:J.listenerCount("data")>0&&J.resume();}function fe(J){u("readable nexttick read 0"),J.read(0);}S.prototype.resume=function(){var J=this._readableState;return J.flowing||(u("resume"),J.flowing=!J.readableListening,ye(this,J)),J.paused=!1,this};function ye(J,ee){ee.resumeScheduled||(ee.resumeScheduled=!0,t.nextTick(Ce,J,ee));}function Ce(J,ee){u("resume",ee.reading),ee.reading||J.read(0),ee.resumeScheduled=!1,J.emit("resume"),ae(J),ee.flowing&&!ee.reading&&J.read(0);}S.prototype.pause=function(){return u("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(u("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function ae(J){var ee=J._readableState;for(u("flow",ee.flowing);ee.flowing&&J.read()!==null;);}S.prototype.wrap=function(J){var ee=this,de=this._readableState,xe=!1;J.on("end",function(){if(u("wrapped end"),de.decoder&&!de.ended){var He=de.decoder.end();He&&He.length&&ee.push(He);}ee.push(null);}),J.on("data",function(He){if(u("wrapped data"),de.decoder&&(He=de.decoder.write(He)),!(de.objectMode&&He==null)&&!(!de.objectMode&&(!He||!He.length))){var St=ee.push(He);St||(xe=!0,J.pause());}});for(var Pe in J)this[Pe]===void 0&&typeof J[Pe]=="function"&&(this[Pe]=function(St){return function(){return J[St].apply(J,arguments)}}(Pe));for(var Oe=0;Oe<pe.length;Oe++)J.on(pe[Oe],this.emit.bind(this,pe[Oe]));return this._read=function(He){u("wrapped _read",He),xe&&(xe=!1,J.resume());},this},typeof Symbol=="function"&&(S.prototype[Symbol.asyncIterator]=function(){return se===void 0&&(se=Ope()),se(this)}),Object.defineProperty(S.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(S.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(S.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(ee){this._readableState&&(this._readableState.flowing=ee);}}),S._fromList=ie,Object.defineProperty(S.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function ie(J,ee){if(ee.length===0)return null;var de;return ee.objectMode?de=ee.buffer.shift():!J||J>=ee.length?(ee.decoder?de=ee.buffer.join(""):ee.buffer.length===1?de=ee.buffer.first():de=ee.buffer.concat(ee.length),ee.buffer.clear()):de=ee.buffer.consume(J,ee.decoder),de}function he(J){var ee=J._readableState;u("endReadable",ee.endEmitted),ee.endEmitted||(ee.ended=!0,t.nextTick(Be,ee,J));}function Be(J,ee){if(u("endReadableNT",J.endEmitted,J.length),!J.endEmitted&&J.length===0&&(J.endEmitted=!0,ee.readable=!1,ee.emit("end"),J.autoDestroy)){var de=ee._writableState;(!de||de.autoDestroy&&de.finished)&&ee.destroy();}}typeof Symbol=="function"&&(S.from=function(J,ee){return ce===void 0&&(ce=Npe()),ce(S,J,ee)});function Re(J,ee){for(var de=0,xe=J.length;de<xe;de++)if(J[de]===ee)return de;return -1}return MR}var OR={},rF=!1;function UR(){if(rF)return OR;rF=!0,OR=s;var t=th().codes,e=t.ERR_METHOD_NOT_IMPLEMENTED,r=t.ERR_MULTIPLE_CALLBACK,n=t.ERR_TRANSFORM_ALREADY_TRANSFORMING,i=t.ERR_TRANSFORM_WITH_LENGTH_0,o=Hl();jl()(s,o);function a(l,w){var T=this._transformState;T.transforming=!1;var x=T.writecb;if(x===null)return this.emit("error",new r);T.writechunk=null,T.writecb=null,w!=null&&this.push(w),x(l);var I=this._readableState;I.reading=!1,(I.needReadable||I.length<I.highWaterMark)&&this._read(I.highWaterMark);}function s(l){if(!(this instanceof s))return new s(l);o.call(this,l),this._transformState={afterTransform:a.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,l&&(typeof l.transform=="function"&&(this._transform=l.transform),typeof l.flush=="function"&&(this._flush=l.flush)),this.on("prefinish",c);}function c(){var l=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(w,T){u(l,w,T);}):u(this,null,null);}s.prototype.push=function(l,w){return this._transformState.needTransform=!1,o.prototype.push.call(this,l,w)},s.prototype._transform=function(l,w,T){T(new e("_transform()"));},s.prototype._write=function(l,w,T){var x=this._transformState;if(x.writecb=T,x.writechunk=l,x.writeencoding=w,!x.transforming){var I=this._readableState;(x.needTransform||I.needReadable||I.length<I.highWaterMark)&&this._read(I.highWaterMark);}},s.prototype._read=function(l){var w=this._transformState;w.writechunk!==null&&!w.transforming?(w.transforming=!0,this._transform(w.writechunk,w.writeencoding,w.afterTransform)):w.needTransform=!0;},s.prototype._destroy=function(l,w){o.prototype._destroy.call(this,l,function(T){w(T);});};function u(l,w,T){if(w)return l.emit("error",w);if(T!=null&&l.push(T),l._writableState.length)throw new i;if(l._transformState.transforming)throw new n;return l.push(null)}return OR}var NR={},nF=!1;function cF(){if(nF)return NR;nF=!0,NR=e;var t=UR();jl()(e,t);function e(r){if(!(this instanceof e))return new e(r);t.call(this,r);}return e.prototype._transform=function(r,n,i){i(null,r);},NR}var kR={},iF=!1;function uF(){if(iF)return kR;iF=!0;var t;function e(T){var x=!1;return function(){x||(x=!0,T.apply(void 0,arguments));}}var r=th().codes,n=r.ERR_MISSING_ARGS,i=r.ERR_STREAM_DESTROYED;function o(T){if(T)throw T}function a(T){return T.setHeader&&typeof T.abort=="function"}function s(T,x,I,k){k=e(k);var q=!1;T.on("close",function(){q=!0;}),t===void 0&&(t=J1()),t(T,{readable:x,writable:I},function(K){if(K)return k(K);q=!0,k();});var j=!1;return function(K){if(!q&&!j){if(j=!0,a(T))return T.abort();if(typeof T.destroy=="function")return T.destroy();k(K||new i("pipe"));}}}function c(T){T();}function u(T,x){return T.pipe(x)}function l(T){return !T.length||typeof T[T.length-1]!="function"?o:T.pop()}function w(){for(var T=arguments.length,x=new Array(T),I=0;I<T;I++)x[I]=arguments[I];var k=l(x);if(Array.isArray(x[0])&&(x=x[0]),x.length<2)throw new n("streams");var q,j=x.map(function(K,Z){var se=Z<x.length-1,ce=Z>0;return s(K,se,ce,function(Te){q||(q=Te),Te&&j.forEach(c),!se&&(j.forEach(c),k(q));})});return x.reduce(u)}return kR=w,kR}eo();Ni();Us();v();m();y();g();Op();Op();Hu();br._makeLong;br.basename;br.delimiter;br.dirname;br.extname;br.format;br.isAbsolute;br.join;br.normalize;br.parse;br.posix;br.relative;br.resolve;br.sep;br.win32;Hu();qa();Yc();v();m();y();g();v();m();y();g();qa();Yc();var DR={},lF=!1,LR=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:globalThis;function Ppe(){if(lF)return DR;lF=!0,DR=r;var t=xr.EventEmitter,e=jl();e(r,t),r.Readable=BR(),r.Writable=PR(),r.Duplex=Hl(),r.Transform=UR(),r.PassThrough=cF(),r.finished=J1(),r.pipeline=uF(),r.Stream=r;function r(){t.call(this||LR);}return r.prototype.pipe=function(n,i){var o=this||LR;function a(x){n.writable&&n.write(x)===!1&&o.pause&&o.pause();}o.on("data",a);function s(){o.readable&&o.resume&&o.resume();}n.on("drain",s),!n._isStdio&&(!i||i.end!==!1)&&(o.on("end",u),o.on("close",l));var c=!1;function u(){c||(c=!0,n.end());}function l(){c||(c=!0,typeof n.destroy=="function"&&n.destroy());}function w(x){if(T(),t.listenerCount(this||LR,"error")===0)throw x}o.on("error",w),n.on("error",w);function T(){o.removeListener("data",a),n.removeListener("drain",s),o.removeListener("end",u),o.removeListener("close",l),o.removeListener("error",w),n.removeListener("error",w),o.removeListener("end",T),o.removeListener("close",T),n.removeListener("close",T);}return o.on("end",T),o.on("close",T),n.on("close",T),n.emit("pipe",o),n},DR}var oi=Ppe();Ni();qa();Yc();mh();Us();Ps();Hu();mf();var fF=oi.Readable;fF.wrap=function(t,e){return e=Object.assign({objectMode:t.readableObjectMode!=null||t.objectMode!=null||!0},e),e.destroy=function(r,n){t.destroy(r),n(r);},new fF(e).wrap(t)};oi.Writable;oi.Duplex;oi.Transform;oi.PassThrough;oi.finished;oi.pipeline;oi.Stream;({finished:uf(oi.finished),pipeline:uf(oi.pipeline)});kp();Op();v();m();y();g();var b0={},dF=!1;function Bpe(){if(dF)return b0;dF=!0,b0.byteLength=s,b0.toByteArray=u,b0.fromByteArray=T;for(var t=[],e=[],r=typeof Uint8Array!="undefined"?Uint8Array:Array,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0,o=n.length;i<o;++i)t[i]=n[i],e[n.charCodeAt(i)]=i;e[45]=62,e[95]=63;function a(x){var I=x.length;if(I%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var k=x.indexOf("=");k===-1&&(k=I);var q=k===I?0:4-k%4;return [k,q]}function s(x){var I=a(x),k=I[0],q=I[1];return (k+q)*3/4-q}function c(x,I,k){return (I+k)*3/4-k}function u(x){var I,k=a(x),q=k[0],j=k[1],K=new r(c(x,q,j)),Z=0,se=j>0?q-4:q,ce;for(ce=0;ce<se;ce+=4)I=e[x.charCodeAt(ce)]<<18|e[x.charCodeAt(ce+1)]<<12|e[x.charCodeAt(ce+2)]<<6|e[x.charCodeAt(ce+3)],K[Z++]=I>>16&255,K[Z++]=I>>8&255,K[Z++]=I&255;return j===2&&(I=e[x.charCodeAt(ce)]<<2|e[x.charCodeAt(ce+1)]>>4,K[Z++]=I&255),j===1&&(I=e[x.charCodeAt(ce)]<<10|e[x.charCodeAt(ce+1)]<<4|e[x.charCodeAt(ce+2)]>>2,K[Z++]=I>>8&255,K[Z++]=I&255),K}function l(x){return t[x>>18&63]+t[x>>12&63]+t[x>>6&63]+t[x&63]}function w(x,I,k){for(var q,j=[],K=I;K<k;K+=3)q=(x[K]<<16&16711680)+(x[K+1]<<8&65280)+(x[K+2]&255),j.push(l(q));return j.join("")}function T(x){for(var I,k=x.length,q=k%3,j=[],K=16383,Z=0,se=k-q;Z<se;Z+=K)j.push(w(x,Z,Z+K>se?se:Z+K));return q===1?(I=x[k-1],j.push(t[I>>2]+t[I<<4&63]+"==")):q===2&&(I=(x[k-2]<<8)+x[k-1],j.push(t[I>>10]+t[I>>4&63]+t[I<<2&63]+"=")),j.join("")}return b0}var X1={},hF=!1;function Upe(){if(hF)return X1;hF=!0;return X1.read=function(t,e,r,n,i){var o,a,s=i*8-n-1,c=(1<<s)-1,u=c>>1,l=-7,w=r?i-1:0,T=r?-1:1,x=t[e+w];for(w+=T,o=x&(1<<-l)-1,x>>=-l,l+=s;l>0;o=o*256+t[e+w],w+=T,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=n;l>0;a=a*256+t[e+w],w+=T,l-=8);if(o===0)o=1-u;else {if(o===c)return a?NaN:(x?-1:1)*(1/0);a=a+Math.pow(2,n),o=o-u;}return (x?-1:1)*a*Math.pow(2,o-n)},X1.write=function(t,e,r,n,i,o){var a,s,c,u=o*8-i-1,l=(1<<u)-1,w=l>>1,T=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,x=n?0:o-1,I=n?1:-1,k=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=l):(a=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-a))<1&&(a--,c*=2),a+w>=1?e+=T/c:e+=T*Math.pow(2,1-w),e*c>=2&&(a++,c/=2),a+w>=l?(s=0,a=l):a+w>=1?(s=(e*c-1)*Math.pow(2,i),a=a+w):(s=e*Math.pow(2,w-1)*Math.pow(2,i),a=0));i>=8;t[r+x]=s&255,x+=I,s/=256,i-=8);for(a=a<<i|s,u+=i;u>0;t[r+x]=a&255,x+=I,a/=256,u-=8);t[r+x-I]|=k*128;},X1}var $l={},pF=!1;function Dpe(){if(pF)return $l;pF=!0;let t=Bpe(),e=Upe(),r=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;$l.Buffer=a,$l.SlowBuffer=j,$l.INSPECT_MAX_BYTES=50;let n=2147483647;$l.kMaxLength=n,a.TYPED_ARRAY_SUPPORT=i(),!a.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 i(){try{let O=new Uint8Array(1),p={foo:function(){return 42}};return Object.setPrototypeOf(p,Uint8Array.prototype),Object.setPrototypeOf(O,p),O.foo()===42}catch(O){return !1}}Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}});function o(O){if(O>n)throw new RangeError('The value "'+O+'" is invalid for option "size"');let p=new Uint8Array(O);return Object.setPrototypeOf(p,a.prototype),p}function a(O,p,E){if(typeof O=="number"){if(typeof p=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return l(O)}return s(O,p,E)}a.poolSize=8192;function s(O,p,E){if(typeof O=="string")return w(O,p);if(ArrayBuffer.isView(O))return x(O);if(O==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof O);if(ze(O,ArrayBuffer)||O&&ze(O.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(ze(O,SharedArrayBuffer)||O&&ze(O.buffer,SharedArrayBuffer)))return I(O,p,E);if(typeof O=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let U=O.valueOf&&O.valueOf();if(U!=null&&U!==O)return a.from(U,p,E);let $=k(O);if($)return $;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof O[Symbol.toPrimitive]=="function")return a.from(O[Symbol.toPrimitive]("string"),p,E);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof O)}a.from=function(O,p,E){return s(O,p,E)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array);function c(O){if(typeof O!="number")throw new TypeError('"size" argument must be of type number');if(O<0)throw new RangeError('The value "'+O+'" is invalid for option "size"')}function u(O,p,E){return c(O),O<=0?o(O):p!==void 0?typeof E=="string"?o(O).fill(p,E):o(O).fill(p):o(O)}a.alloc=function(O,p,E){return u(O,p,E)};function l(O){return c(O),o(O<0?0:q(O)|0)}a.allocUnsafe=function(O){return l(O)},a.allocUnsafeSlow=function(O){return l(O)};function w(O,p){if((typeof p!="string"||p==="")&&(p="utf8"),!a.isEncoding(p))throw new TypeError("Unknown encoding: "+p);let E=K(O,p)|0,U=o(E),$=U.write(O,p);return $!==E&&(U=U.slice(0,$)),U}function T(O){let p=O.length<0?0:q(O.length)|0,E=o(p);for(let U=0;U<p;U+=1)E[U]=O[U]&255;return E}function x(O){if(ze(O,Uint8Array)){let p=new Uint8Array(O);return I(p.buffer,p.byteOffset,p.byteLength)}return T(O)}function I(O,p,E){if(p<0||O.byteLength<p)throw new RangeError('"offset" is outside of buffer bounds');if(O.byteLength<p+(E||0))throw new RangeError('"length" is outside of buffer bounds');let U;return p===void 0&&E===void 0?U=new Uint8Array(O):E===void 0?U=new Uint8Array(O,p):U=new Uint8Array(O,p,E),Object.setPrototypeOf(U,a.prototype),U}function k(O){if(a.isBuffer(O)){let p=q(O.length)|0,E=o(p);return E.length===0||O.copy(E,0,0,p),E}if(O.length!==void 0)return typeof O.length!="number"||Tt(O.length)?o(0):T(O);if(O.type==="Buffer"&&Array.isArray(O.data))return T(O.data)}function q(O){if(O>=n)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n.toString(16)+" bytes");return O|0}function j(O){return +O!=O&&(O=0),a.alloc(+O)}a.isBuffer=function(p){return p!=null&&p._isBuffer===!0&&p!==a.prototype},a.compare=function(p,E){if(ze(p,Uint8Array)&&(p=a.from(p,p.offset,p.byteLength)),ze(E,Uint8Array)&&(E=a.from(E,E.offset,E.byteLength)),!a.isBuffer(p)||!a.isBuffer(E))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(p===E)return 0;let U=p.length,$=E.length;for(let X=0,te=Math.min(U,$);X<te;++X)if(p[X]!==E[X]){U=p[X],$=E[X];break}return U<$?-1:$<U?1:0},a.isEncoding=function(p){switch(String(p).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}},a.concat=function(p,E){if(!Array.isArray(p))throw new TypeError('"list" argument must be an Array of Buffers');if(p.length===0)return a.alloc(0);let U;if(E===void 0)for(E=0,U=0;U<p.length;++U)E+=p[U].length;let $=a.allocUnsafe(E),X=0;for(U=0;U<p.length;++U){let te=p[U];if(ze(te,Uint8Array))X+te.length>$.length?(a.isBuffer(te)||(te=a.from(te)),te.copy($,X)):Uint8Array.prototype.set.call($,te,X);else if(a.isBuffer(te))te.copy($,X);else throw new TypeError('"list" argument must be an Array of Buffers');X+=te.length;}return $};function K(O,p){if(a.isBuffer(O))return O.length;if(ArrayBuffer.isView(O)||ze(O,ArrayBuffer))return O.byteLength;if(typeof O!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof O);let E=O.length,U=arguments.length>2&&arguments[2]===!0;if(!U&&E===0)return 0;let $=!1;for(;;)switch(p){case"ascii":case"latin1":case"binary":return E;case"utf8":case"utf-8":return Pe(O).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E*2;case"hex":return E>>>1;case"base64":return St(O).length;default:if($)return U?-1:Pe(O).length;p=(""+p).toLowerCase(),$=!0;}}a.byteLength=K;function Z(O,p,E){let U=!1;if((p===void 0||p<0)&&(p=0),p>this.length||((E===void 0||E>this.length)&&(E=this.length),E<=0)||(E>>>=0,p>>>=0,E<=p))return "";for(O||(O="utf8");;)switch(O){case"hex":return h(this,p,E);case"utf8":case"utf-8":return A(this,p,E);case"ascii":return M(this,p,E);case"latin1":case"binary":return R(this,p,E);case"base64":return C(this,p,E);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return b(this,p,E);default:if(U)throw new TypeError("Unknown encoding: "+O);O=(O+"").toLowerCase(),U=!0;}}a.prototype._isBuffer=!0;function se(O,p,E){let U=O[p];O[p]=O[E],O[E]=U;}a.prototype.swap16=function(){let p=this.length;if(p%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let E=0;E<p;E+=2)se(this,E,E+1);return this},a.prototype.swap32=function(){let p=this.length;if(p%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let E=0;E<p;E+=4)se(this,E,E+3),se(this,E+1,E+2);return this},a.prototype.swap64=function(){let p=this.length;if(p%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let E=0;E<p;E+=8)se(this,E,E+7),se(this,E+1,E+6),se(this,E+2,E+5),se(this,E+3,E+4);return this},a.prototype.toString=function(){let p=this.length;return p===0?"":arguments.length===0?A(this,0,p):Z.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(p){if(!a.isBuffer(p))throw new TypeError("Argument must be a Buffer");return this===p?!0:a.compare(this,p)===0},a.prototype.inspect=function(){let p="",E=$l.INSPECT_MAX_BYTES;return p=this.toString("hex",0,E).replace(/(.{2})/g,"$1 ").trim(),this.length>E&&(p+=" ... "),"<Buffer "+p+">"},r&&(a.prototype[r]=a.prototype.inspect),a.prototype.compare=function(p,E,U,$,X){if(ze(p,Uint8Array)&&(p=a.from(p,p.offset,p.byteLength)),!a.isBuffer(p))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof p);if(E===void 0&&(E=0),U===void 0&&(U=p?p.length:0),$===void 0&&($=0),X===void 0&&(X=this.length),E<0||U>p.length||$<0||X>this.length)throw new RangeError("out of range index");if($>=X&&E>=U)return 0;if($>=X)return -1;if(E>=U)return 1;if(E>>>=0,U>>>=0,$>>>=0,X>>>=0,this===p)return 0;let te=X-$,Se=U-E,Ve=Math.min(te,Se),Ie=this.slice($,X),De=p.slice(E,U);for(let qe=0;qe<Ve;++qe)if(Ie[qe]!==De[qe]){te=Ie[qe],Se=De[qe];break}return te<Se?-1:Se<te?1:0};function ce(O,p,E,U,$){if(O.length===0)return -1;if(typeof E=="string"?(U=E,E=0):E>2147483647?E=2147483647:E<-2147483648&&(E=-2147483648),E=+E,Tt(E)&&(E=$?0:O.length-1),E<0&&(E=O.length+E),E>=O.length){if($)return -1;E=O.length-1;}else if(E<0)if($)E=0;else return -1;if(typeof p=="string"&&(p=a.from(p,U)),a.isBuffer(p))return p.length===0?-1:Te(O,p,E,U,$);if(typeof p=="number")return p=p&255,typeof Uint8Array.prototype.indexOf=="function"?$?Uint8Array.prototype.indexOf.call(O,p,E):Uint8Array.prototype.lastIndexOf.call(O,p,E):Te(O,[p],E,U,$);throw new TypeError("val must be string, number or Buffer")}function Te(O,p,E,U,$){let X=1,te=O.length,Se=p.length;if(U!==void 0&&(U=String(U).toLowerCase(),U==="ucs2"||U==="ucs-2"||U==="utf16le"||U==="utf-16le")){if(O.length<2||p.length<2)return -1;X=2,te/=2,Se/=2,E/=2;}function Ve(De,qe){return X===1?De[qe]:De.readUInt16BE(qe*X)}let Ie;if($){let De=-1;for(Ie=E;Ie<te;Ie++)if(Ve(O,Ie)===Ve(p,De===-1?0:Ie-De)){if(De===-1&&(De=Ie),Ie-De+1===Se)return De*X}else De!==-1&&(Ie-=Ie-De),De=-1;}else for(E+Se>te&&(E=te-Se),Ie=E;Ie>=0;Ie--){let De=!0;for(let qe=0;qe<Se;qe++)if(Ve(O,Ie+qe)!==Ve(p,qe)){De=!1;break}if(De)return Ie}return -1}a.prototype.includes=function(p,E,U){return this.indexOf(p,E,U)!==-1},a.prototype.indexOf=function(p,E,U){return ce(this,p,E,U,!0)},a.prototype.lastIndexOf=function(p,E,U){return ce(this,p,E,U,!1)};function pe(O,p,E,U){E=Number(E)||0;let $=O.length-E;U?(U=Number(U),U>$&&(U=$)):U=$;let X=p.length;U>X/2&&(U=X/2);let te;for(te=0;te<U;++te){let Se=parseInt(p.substr(te*2,2),16);if(Tt(Se))return te;O[E+te]=Se;}return te}function le(O,p,E,U){return Fe(Pe(p,O.length-E),O,E,U)}function Y(O,p,E,U){return Fe(Oe(p),O,E,U)}function S(O,p,E,U){return Fe(St(p),O,E,U)}function d(O,p,E,U){return Fe(He(p,O.length-E),O,E,U)}a.prototype.write=function(p,E,U,$){if(E===void 0)$="utf8",U=this.length,E=0;else if(U===void 0&&typeof E=="string")$=E,U=this.length,E=0;else if(isFinite(E))E=E>>>0,isFinite(U)?(U=U>>>0,$===void 0&&($="utf8")):($=U,U=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let X=this.length-E;if((U===void 0||U>X)&&(U=X),p.length>0&&(U<0||E<0)||E>this.length)throw new RangeError("Attempt to write outside buffer bounds");$||($="utf8");let te=!1;for(;;)switch($){case"hex":return pe(this,p,E,U);case"utf8":case"utf-8":return le(this,p,E,U);case"ascii":case"latin1":case"binary":return Y(this,p,E,U);case"base64":return S(this,p,E,U);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return d(this,p,E,U);default:if(te)throw new TypeError("Unknown encoding: "+$);$=(""+$).toLowerCase(),te=!0;}},a.prototype.toJSON=function(){return {type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function C(O,p,E){return p===0&&E===O.length?t.fromByteArray(O):t.fromByteArray(O.slice(p,E))}function A(O,p,E){E=Math.min(O.length,E);let U=[],$=p;for(;$<E;){let X=O[$],te=null,Se=X>239?4:X>223?3:X>191?2:1;if($+Se<=E){let Ve,Ie,De,qe;switch(Se){case 1:X<128&&(te=X);break;case 2:Ve=O[$+1],(Ve&192)===128&&(qe=(X&31)<<6|Ve&63,qe>127&&(te=qe));break;case 3:Ve=O[$+1],Ie=O[$+2],(Ve&192)===128&&(Ie&192)===128&&(qe=(X&15)<<12|(Ve&63)<<6|Ie&63,qe>2047&&(qe<55296||qe>57343)&&(te=qe));break;case 4:Ve=O[$+1],Ie=O[$+2],De=O[$+3],(Ve&192)===128&&(Ie&192)===128&&(De&192)===128&&(qe=(X&15)<<18|(Ve&63)<<12|(Ie&63)<<6|De&63,qe>65535&&qe<1114112&&(te=qe));}}te===null?(te=65533,Se=1):te>65535&&(te-=65536,U.push(te>>>10&1023|55296),te=56320|te&1023),U.push(te),$+=Se;}return _(U)}let f=4096;function _(O){let p=O.length;if(p<=f)return String.fromCharCode.apply(String,O);let E="",U=0;for(;U<p;)E+=String.fromCharCode.apply(String,O.slice(U,U+=f));return E}function M(O,p,E){let U="";E=Math.min(O.length,E);for(let $=p;$<E;++$)U+=String.fromCharCode(O[$]&127);return U}function R(O,p,E){let U="";E=Math.min(O.length,E);for(let $=p;$<E;++$)U+=String.fromCharCode(O[$]);return U}function h(O,p,E){let U=O.length;(!p||p<0)&&(p=0),(!E||E<0||E>U)&&(E=U);let $="";for(let X=p;X<E;++X)$+=Ge[O[X]];return $}function b(O,p,E){let U=O.slice(p,E),$="";for(let X=0;X<U.length-1;X+=2)$+=String.fromCharCode(U[X]+U[X+1]*256);return $}a.prototype.slice=function(p,E){let U=this.length;p=~~p,E=E===void 0?U:~~E,p<0?(p+=U,p<0&&(p=0)):p>U&&(p=U),E<0?(E+=U,E<0&&(E=0)):E>U&&(E=U),E<p&&(E=p);let $=this.subarray(p,E);return Object.setPrototypeOf($,a.prototype),$};function B(O,p,E){if(O%1!==0||O<0)throw new RangeError("offset is not uint");if(O+p>E)throw new RangeError("Trying to access beyond buffer length")}a.prototype.readUintLE=a.prototype.readUIntLE=function(p,E,U){p=p>>>0,E=E>>>0,U||B(p,E,this.length);let $=this[p],X=1,te=0;for(;++te<E&&(X*=256);)$+=this[p+te]*X;return $},a.prototype.readUintBE=a.prototype.readUIntBE=function(p,E,U){p=p>>>0,E=E>>>0,U||B(p,E,this.length);let $=this[p+--E],X=1;for(;E>0&&(X*=256);)$+=this[p+--E]*X;return $},a.prototype.readUint8=a.prototype.readUInt8=function(p,E){return p=p>>>0,E||B(p,1,this.length),this[p]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(p,E){return p=p>>>0,E||B(p,2,this.length),this[p]|this[p+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(p,E){return p=p>>>0,E||B(p,2,this.length),this[p]<<8|this[p+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(p,E){return p=p>>>0,E||B(p,4,this.length),(this[p]|this[p+1]<<8|this[p+2]<<16)+this[p+3]*16777216},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(p,E){return p=p>>>0,E||B(p,4,this.length),this[p]*16777216+(this[p+1]<<16|this[p+2]<<8|this[p+3])},a.prototype.readBigUInt64LE=We(function(p){p=p>>>0,J(p,"offset");let E=this[p],U=this[p+7];(E===void 0||U===void 0)&&ee(p,this.length-8);let $=E+this[++p]*$e(2,8)+this[++p]*$e(2,16)+this[++p]*$e(2,24),X=this[++p]+this[++p]*$e(2,8)+this[++p]*$e(2,16)+U*$e(2,24);return BigInt($)+(BigInt(X)<<BigInt(32))}),a.prototype.readBigUInt64BE=We(function(p){p=p>>>0,J(p,"offset");let E=this[p],U=this[p+7];(E===void 0||U===void 0)&&ee(p,this.length-8);let $=E*$e(2,24)+this[++p]*$e(2,16)+this[++p]*$e(2,8)+this[++p],X=this[++p]*$e(2,24)+this[++p]*$e(2,16)+this[++p]*$e(2,8)+U;return (BigInt($)<<BigInt(32))+BigInt(X)}),a.prototype.readIntLE=function(p,E,U){p=p>>>0,E=E>>>0,U||B(p,E,this.length);let $=this[p],X=1,te=0;for(;++te<E&&(X*=256);)$+=this[p+te]*X;return X*=128,$>=X&&($-=Math.pow(2,8*E)),$},a.prototype.readIntBE=function(p,E,U){p=p>>>0,E=E>>>0,U||B(p,E,this.length);let $=E,X=1,te=this[p+--$];for(;$>0&&(X*=256);)te+=this[p+--$]*X;return X*=128,te>=X&&(te-=Math.pow(2,8*E)),te},a.prototype.readInt8=function(p,E){return p=p>>>0,E||B(p,1,this.length),this[p]&128?(255-this[p]+1)*-1:this[p]},a.prototype.readInt16LE=function(p,E){p=p>>>0,E||B(p,2,this.length);let U=this[p]|this[p+1]<<8;return U&32768?U|4294901760:U},a.prototype.readInt16BE=function(p,E){p=p>>>0,E||B(p,2,this.length);let U=this[p+1]|this[p]<<8;return U&32768?U|4294901760:U},a.prototype.readInt32LE=function(p,E){return p=p>>>0,E||B(p,4,this.length),this[p]|this[p+1]<<8|this[p+2]<<16|this[p+3]<<24},a.prototype.readInt32BE=function(p,E){return p=p>>>0,E||B(p,4,this.length),this[p]<<24|this[p+1]<<16|this[p+2]<<8|this[p+3]},a.prototype.readBigInt64LE=We(function(p){p=p>>>0,J(p,"offset");let E=this[p],U=this[p+7];(E===void 0||U===void 0)&&ee(p,this.length-8);let $=this[p+4]+this[p+5]*$e(2,8)+this[p+6]*$e(2,16)+(U<<24);return (BigInt($)<<BigInt(32))+BigInt(E+this[++p]*$e(2,8)+this[++p]*$e(2,16)+this[++p]*$e(2,24))}),a.prototype.readBigInt64BE=We(function(p){p=p>>>0,J(p,"offset");let E=this[p],U=this[p+7];(E===void 0||U===void 0)&&ee(p,this.length-8);let $=(E<<24)+this[++p]*$e(2,16)+this[++p]*$e(2,8)+this[++p];return (BigInt($)<<BigInt(32))+BigInt(this[++p]*$e(2,24)+this[++p]*$e(2,16)+this[++p]*$e(2,8)+U)}),a.prototype.readFloatLE=function(p,E){return p=p>>>0,E||B(p,4,this.length),e.read(this,p,!0,23,4)},a.prototype.readFloatBE=function(p,E){return p=p>>>0,E||B(p,4,this.length),e.read(this,p,!1,23,4)},a.prototype.readDoubleLE=function(p,E){return p=p>>>0,E||B(p,8,this.length),e.read(this,p,!0,52,8)},a.prototype.readDoubleBE=function(p,E){return p=p>>>0,E||B(p,8,this.length),e.read(this,p,!1,52,8)};function z(O,p,E,U,$,X){if(!a.isBuffer(O))throw new TypeError('"buffer" argument must be a Buffer instance');if(p>$||p<X)throw new RangeError('"value" argument is out of bounds');if(E+U>O.length)throw new RangeError("Index out of range")}a.prototype.writeUintLE=a.prototype.writeUIntLE=function(p,E,U,$){if(p=+p,E=E>>>0,U=U>>>0,!$){let Se=Math.pow(2,8*U)-1;z(this,p,E,U,Se,0);}let X=1,te=0;for(this[E]=p&255;++te<U&&(X*=256);)this[E+te]=p/X&255;return E+U},a.prototype.writeUintBE=a.prototype.writeUIntBE=function(p,E,U,$){if(p=+p,E=E>>>0,U=U>>>0,!$){let Se=Math.pow(2,8*U)-1;z(this,p,E,U,Se,0);}let X=U-1,te=1;for(this[E+X]=p&255;--X>=0&&(te*=256);)this[E+X]=p/te&255;return E+U},a.prototype.writeUint8=a.prototype.writeUInt8=function(p,E,U){return p=+p,E=E>>>0,U||z(this,p,E,1,255,0),this[E]=p&255,E+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(p,E,U){return p=+p,E=E>>>0,U||z(this,p,E,2,65535,0),this[E]=p&255,this[E+1]=p>>>8,E+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(p,E,U){return p=+p,E=E>>>0,U||z(this,p,E,2,65535,0),this[E]=p>>>8,this[E+1]=p&255,E+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(p,E,U){return p=+p,E=E>>>0,U||z(this,p,E,4,4294967295,0),this[E+3]=p>>>24,this[E+2]=p>>>16,this[E+1]=p>>>8,this[E]=p&255,E+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(p,E,U){return p=+p,E=E>>>0,U||z(this,p,E,4,4294967295,0),this[E]=p>>>24,this[E+1]=p>>>16,this[E+2]=p>>>8,this[E+3]=p&255,E+4};function P(O,p,E,U,$){Re(p,U,$,O,E,7);let X=Number(p&BigInt(4294967295));O[E++]=X,X=X>>8,O[E++]=X,X=X>>8,O[E++]=X,X=X>>8,O[E++]=X;let te=Number(p>>BigInt(32)&BigInt(4294967295));return O[E++]=te,te=te>>8,O[E++]=te,te=te>>8,O[E++]=te,te=te>>8,O[E++]=te,E}function V(O,p,E,U,$){Re(p,U,$,O,E,7);let X=Number(p&BigInt(4294967295));O[E+7]=X,X=X>>8,O[E+6]=X,X=X>>8,O[E+5]=X,X=X>>8,O[E+4]=X;let te=Number(p>>BigInt(32)&BigInt(4294967295));return O[E+3]=te,te=te>>8,O[E+2]=te,te=te>>8,O[E+1]=te,te=te>>8,O[E]=te,E+8}a.prototype.writeBigUInt64LE=We(function(p,E=0){return P(this,p,E,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeBigUInt64BE=We(function(p,E=0){return V(this,p,E,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeIntLE=function(p,E,U,$){if(p=+p,E=E>>>0,!$){let Ve=Math.pow(2,8*U-1);z(this,p,E,U,Ve-1,-Ve);}let X=0,te=1,Se=0;for(this[E]=p&255;++X<U&&(te*=256);)p<0&&Se===0&&this[E+X-1]!==0&&(Se=1),this[E+X]=(p/te>>0)-Se&255;return E+U},a.prototype.writeIntBE=function(p,E,U,$){if(p=+p,E=E>>>0,!$){let Ve=Math.pow(2,8*U-1);z(this,p,E,U,Ve-1,-Ve);}let X=U-1,te=1,Se=0;for(this[E+X]=p&255;--X>=0&&(te*=256);)p<0&&Se===0&&this[E+X+1]!==0&&(Se=1),this[E+X]=(p/te>>0)-Se&255;return E+U},a.prototype.writeInt8=function(p,E,U){return p=+p,E=E>>>0,U||z(this,p,E,1,127,-128),p<0&&(p=255+p+1),this[E]=p&255,E+1},a.prototype.writeInt16LE=function(p,E,U){return p=+p,E=E>>>0,U||z(this,p,E,2,32767,-32768),this[E]=p&255,this[E+1]=p>>>8,E+2},a.prototype.writeInt16BE=function(p,E,U){return p=+p,E=E>>>0,U||z(this,p,E,2,32767,-32768),this[E]=p>>>8,this[E+1]=p&255,E+2},a.prototype.writeInt32LE=function(p,E,U){return p=+p,E=E>>>0,U||z(this,p,E,4,2147483647,-2147483648),this[E]=p&255,this[E+1]=p>>>8,this[E+2]=p>>>16,this[E+3]=p>>>24,E+4},a.prototype.writeInt32BE=function(p,E,U){return p=+p,E=E>>>0,U||z(this,p,E,4,2147483647,-2147483648),p<0&&(p=4294967295+p+1),this[E]=p>>>24,this[E+1]=p>>>16,this[E+2]=p>>>8,this[E+3]=p&255,E+4},a.prototype.writeBigInt64LE=We(function(p,E=0){return P(this,p,E,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),a.prototype.writeBigInt64BE=We(function(p,E=0){return V(this,p,E,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function fe(O,p,E,U,$,X){if(E+U>O.length)throw new RangeError("Index out of range");if(E<0)throw new RangeError("Index out of range")}function ye(O,p,E,U,$){return p=+p,E=E>>>0,$||fe(O,p,E,4),e.write(O,p,E,U,23,4),E+4}a.prototype.writeFloatLE=function(p,E,U){return ye(this,p,E,!0,U)},a.prototype.writeFloatBE=function(p,E,U){return ye(this,p,E,!1,U)};function Ce(O,p,E,U,$){return p=+p,E=E>>>0,$||fe(O,p,E,8),e.write(O,p,E,U,52,8),E+8}a.prototype.writeDoubleLE=function(p,E,U){return Ce(this,p,E,!0,U)},a.prototype.writeDoubleBE=function(p,E,U){return Ce(this,p,E,!1,U)},a.prototype.copy=function(p,E,U,$){if(!a.isBuffer(p))throw new TypeError("argument should be a Buffer");if(U||(U=0),!$&&$!==0&&($=this.length),E>=p.length&&(E=p.length),E||(E=0),$>0&&$<U&&($=U),$===U||p.length===0||this.length===0)return 0;if(E<0)throw new RangeError("targetStart out of bounds");if(U<0||U>=this.length)throw new RangeError("Index out of range");if($<0)throw new RangeError("sourceEnd out of bounds");$>this.length&&($=this.length),p.length-E<$-U&&($=p.length-E+U);let X=$-U;return this===p&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(E,U,$):Uint8Array.prototype.set.call(p,this.subarray(U,$),E),X},a.prototype.fill=function(p,E,U,$){if(typeof p=="string"){if(typeof E=="string"?($=E,E=0,U=this.length):typeof U=="string"&&($=U,U=this.length),$!==void 0&&typeof $!="string")throw new TypeError("encoding must be a string");if(typeof $=="string"&&!a.isEncoding($))throw new TypeError("Unknown encoding: "+$);if(p.length===1){let te=p.charCodeAt(0);($==="utf8"&&te<128||$==="latin1")&&(p=te);}}else typeof p=="number"?p=p&255:typeof p=="boolean"&&(p=Number(p));if(E<0||this.length<E||this.length<U)throw new RangeError("Out of range index");if(U<=E)return this;E=E>>>0,U=U===void 0?this.length:U>>>0,p||(p=0);let X;if(typeof p=="number")for(X=E;X<U;++X)this[X]=p;else {let te=a.isBuffer(p)?p:a.from(p,$),Se=te.length;if(Se===0)throw new TypeError('The value "'+p+'" is invalid for argument "value"');for(X=0;X<U-E;++X)this[X+E]=te[X%Se];}return this};let ae={};function ie(O,p,E){ae[O]=class extends E{constructor(){super(),Object.defineProperty(this,"message",{value:p.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${O}]`,this.stack,delete this.name;}get code(){return O}set code($){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:$,writable:!0});}toString(){return `${this.name} [${O}]: ${this.message}`}};}ie("ERR_BUFFER_OUT_OF_BOUNDS",function(O){return O?`${O} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),ie("ERR_INVALID_ARG_TYPE",function(O,p){return `The "${O}" argument must be of type number. Received type ${typeof p}`},TypeError),ie("ERR_OUT_OF_RANGE",function(O,p,E){let U=`The value of "${O}" is out of range.`,$=E;return Number.isInteger(E)&&Math.abs(E)>$e(2,32)?$=he(String(E)):typeof E=="bigint"&&($=String(E),(E>$e(BigInt(2),BigInt(32))||E<-$e(BigInt(2),BigInt(32)))&&($=he($)),$+="n"),U+=` It must be ${p}. Received ${$}`,U},RangeError);function he(O){let p="",E=O.length,U=O[0]==="-"?1:0;for(;E>=U+4;E-=3)p=`_${O.slice(E-3,E)}${p}`;return `${O.slice(0,E)}${p}`}function Be(O,p,E){J(p,"offset"),(O[p]===void 0||O[p+E]===void 0)&&ee(p,O.length-(E+1));}function Re(O,p,E,U,$,X){if(O>E||O<p){let te=typeof p=="bigint"?"n":"",Se;throw p===0||p===BigInt(0)?Se=`>= 0${te} and < 2${te} ** ${(X+1)*8}${te}`:Se=`>= -(2${te} ** ${(X+1)*8-1}${te}) and < 2 ** ${(X+1)*8-1}${te}`,new ae.ERR_OUT_OF_RANGE("value",Se,O)}Be(U,$,X);}function J(O,p){if(typeof O!="number")throw new ae.ERR_INVALID_ARG_TYPE(p,"number",O)}function ee(O,p,E){throw Math.floor(O)!==O?(J(O,E),new ae.ERR_OUT_OF_RANGE("offset","an integer",O)):p<0?new ae.ERR_BUFFER_OUT_OF_BOUNDS:new ae.ERR_OUT_OF_RANGE("offset",`>= ${0} and <= ${p}`,O)}let de=/[^+/0-9A-Za-z-_]/g;function xe(O){if(O=O.split("=")[0],O=O.trim().replace(de,""),O.length<2)return "";for(;O.length%4!==0;)O=O+"=";return O}function Pe(O,p){p=p||1/0;let E,U=O.length,$=null,X=[];for(let te=0;te<U;++te){if(E=O.charCodeAt(te),E>55295&&E<57344){if(!$){if(E>56319){(p-=3)>-1&&X.push(239,191,189);continue}else if(te+1===U){(p-=3)>-1&&X.push(239,191,189);continue}$=E;continue}if(E<56320){(p-=3)>-1&&X.push(239,191,189),$=E;continue}E=($-55296<<10|E-56320)+65536;}else $&&(p-=3)>-1&&X.push(239,191,189);if($=null,E<128){if((p-=1)<0)break;X.push(E);}else if(E<2048){if((p-=2)<0)break;X.push(E>>6|192,E&63|128);}else if(E<65536){if((p-=3)<0)break;X.push(E>>12|224,E>>6&63|128,E&63|128);}else if(E<1114112){if((p-=4)<0)break;X.push(E>>18|240,E>>12&63|128,E>>6&63|128,E&63|128);}else throw new Error("Invalid code point")}return X}function Oe(O){let p=[];for(let E=0;E<O.length;++E)p.push(O.charCodeAt(E)&255);return p}function He(O,p){let E,U,$,X=[];for(let te=0;te<O.length&&!((p-=2)<0);++te)E=O.charCodeAt(te),U=E>>8,$=E%256,X.push($),X.push(U);return X}function St(O){return t.toByteArray(xe(O))}function Fe(O,p,E,U){let $;for($=0;$<U&&!($+E>=p.length||$>=O.length);++$)p[$+E]=O[$];return $}function ze(O,p){return O instanceof p||O!=null&&O.constructor!=null&&O.constructor.name!=null&&O.constructor.name===p.name}function Tt(O){return O!==O}let Ge=function(){let O="0123456789abcdef",p=new Array(256);for(let E=0;E<16;++E){let U=E*16;for(let $=0;$<16;++$)p[U+$]=O[E]+O[$];}return p}();function We(O){return typeof BigInt=="undefined"?Pt:O}function Pt(){throw new Error("BigInt not supported")}return $l}var Vl=Dpe();Vl.Buffer;Vl.SlowBuffer;Vl.INSPECT_MAX_BYTES;Vl.kMaxLength;var qR=Vl.Buffer;Vl.INSPECT_MAX_BYTES;Vl.kMaxLength;mh();Ps();mf();fA();dA();var w0={},mF=!1;function _0(){return mF||(mF=!0,Object.defineProperty(w0,"__esModule",{value:!0}),w0.constants=void 0,w0.constants={O_RDONLY:0,O_WRONLY:1,O_RDWR:2,S_IFMT:61440,S_IFREG:32768,S_IFDIR:16384,S_IFCHR:8192,S_IFBLK:24576,S_IFIFO:4096,S_IFLNK:40960,S_IFSOCK:49152,O_CREAT:64,O_EXCL:128,O_NOCTTY:256,O_TRUNC:512,O_APPEND:1024,O_DIRECTORY:65536,O_NOATIME:262144,O_NOFOLLOW:131072,O_SYNC:1052672,O_DIRECT:16384,O_NONBLOCK:2048,S_IRWXU:448,S_IRUSR:256,S_IWUSR:128,S_IXUSR:64,S_IRWXG:56,S_IRGRP:32,S_IWGRP:16,S_IXGRP:8,S_IRWXO:7,S_IROTH:4,S_IWOTH:2,S_IXOTH:1,F_OK:0,R_OK:4,W_OK:2,X_OK:1,UV_FS_SYMLINK_DIR:1,UV_FS_SYMLINK_JUNCTION:2,UV_FS_COPYFILE_EXCL:1,UV_FS_COPYFILE_FICLONE:2,UV_FS_COPYFILE_FICLONE_FORCE:4,COPYFILE_EXCL:1,COPYFILE_FICLONE:2,COPYFILE_FICLONE_FORCE:4}),w0}var Q1={},yF=!1;function Lpe(){return yF||(yF=!0,typeof BigInt=="function"?Q1.default=BigInt:Q1.default=function(){throw new Error("BigInt is not supported in this environment.")}),Q1}var rh={},gF=!1;function FR(){if(gF)return rh;gF=!0,Object.defineProperty(rh,"__esModule",{value:!0}),rh.Stats=void 0;var t=_0(),e=Lpe(),r=t.constants.S_IFMT,n=t.constants.S_IFDIR,i=t.constants.S_IFREG,o=t.constants.S_IFBLK,a=t.constants.S_IFCHR,s=t.constants.S_IFLNK,c=t.constants.S_IFIFO,u=t.constants.S_IFSOCK,l=function(){function w(){}return w.build=function(T,x){x===void 0&&(x=!1);var I=new w,k=T.uid,q=T.gid,j=T.atime,K=T.mtime,Z=T.ctime,se=x?e.default:function(Te){return Te};I.uid=se(k),I.gid=se(q),I.rdev=se(0),I.blksize=se(4096),I.ino=se(T.ino),I.size=se(T.getSize()),I.blocks=se(1),I.atime=j,I.mtime=K,I.ctime=Z,I.birthtime=Z,I.atimeMs=se(j.getTime()),I.mtimeMs=se(K.getTime());var ce=se(Z.getTime());return I.ctimeMs=ce,I.birthtimeMs=ce,I.dev=se(0),I.mode=se(T.mode),I.nlink=se(T.nlink),I},w.prototype._checkModeProperty=function(T){return (Number(this.mode)&r)===T},w.prototype.isDirectory=function(){return this._checkModeProperty(n)},w.prototype.isFile=function(){return this._checkModeProperty(i)},w.prototype.isBlockDevice=function(){return this._checkModeProperty(o)},w.prototype.isCharacterDevice=function(){return this._checkModeProperty(a)},w.prototype.isSymbolicLink=function(){return this._checkModeProperty(s)},w.prototype.isFIFO=function(){return this._checkModeProperty(c)},w.prototype.isSocket=function(){return this._checkModeProperty(u)},w}();return rh.Stats=l,rh.default=l,rh}var Wo={},vF=!1;function zR(){if(vF)return Wo;vF=!0;var t=Wo&&Wo.__spreadArray||function(o,a,s){if(s||arguments.length===2)for(var c=0,u=a.length,l;c<u;c++)(l||!(c in a))&&(l||(l=Array.prototype.slice.call(a,0,c)),l[c]=a[c]);return o.concat(l||Array.prototype.slice.call(a))};Object.defineProperty(Wo,"__esModule",{value:!0}),Wo.bufferFrom=Wo.bufferAllocUnsafe=Wo.Buffer=void 0;var e=Uc;Object.defineProperty(Wo,"Buffer",{enumerable:!0,get:function(){return e.Buffer}});function r(o){for(var a=[],s=1;s<arguments.length;s++)a[s-1]=arguments[s];return new(e.Buffer.bind.apply(e.Buffer,t([void 0,o],a,!1)))}var n=e.Buffer.allocUnsafe||r;Wo.bufferAllocUnsafe=n;var i=e.Buffer.from||r;return Wo.bufferFrom=i,Wo}var nn={},bF=!1,qpe=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:globalThis;function NF(){if(bF)return nn;bF=!0;var t=nn&&nn.__extends||function(){var I=function(k,q){return I=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(j,K){j.__proto__=K;}||function(j,K){for(var Z in K)Object.prototype.hasOwnProperty.call(K,Z)&&(j[Z]=K[Z]);},I(k,q)};return function(k,q){if(typeof q!="function"&&q!==null)throw new TypeError("Class extends value "+String(q)+" is not a constructor or null");I(k,q);function j(){this.constructor=k;}k.prototype=q===null?Object.create(q):(j.prototype=q.prototype,new j);}}();Object.defineProperty(nn,"__esModule",{value:!0}),nn.E=nn.AssertionError=nn.message=nn.RangeError=nn.TypeError=nn.Error=void 0;var e=ut,r=we,n=typeof Symbol=="undefined"?"_kCode":Symbol("code"),i={};function o(I){return function(k){t(q,k);function q(j){for(var K=[],Z=1;Z<arguments.length;Z++)K[Z-1]=arguments[Z];var se=k.call(this,c(j,K))||this;return se.code=j,se[n]=j,se.name=k.prototype.name+" ["+se[n]+"]",se}return q}(I)}var a=typeof globalThis!="undefined"?globalThis:qpe,s=function(I){t(k,I);function k(q){var j=this;if(typeof q!="object"||q===null)throw new nn.TypeError("ERR_INVALID_ARG_TYPE","options","object");return q.message?j=I.call(this,q.message)||this:j=I.call(this,r.inspect(q.actual).slice(0,128)+" "+(q.operator+" "+r.inspect(q.expected).slice(0,128)))||this,j.generatedMessage=!q.message,j.name="AssertionError [ERR_ASSERTION]",j.code="ERR_ASSERTION",j.actual=q.actual,j.expected=q.expected,j.operator=q.operator,nn.Error.captureStackTrace(j,q.stackStartFunction),j}return k}(a.Error);nn.AssertionError=s;function c(I,k){e.strictEqual(typeof I,"string");var q=i[I];e(q,"An invalid error message key was used: "+I+".");var j;if(typeof q=="function")j=q;else {if(j=r.format,k===void 0||k.length===0)return q;k.unshift(q);}return String(j.apply(null,k))}nn.message=c;function u(I,k){i[I]=typeof k=="function"?k:String(k);}nn.E=u,nn.Error=o(a.Error),nn.TypeError=o(a.TypeError),nn.RangeError=o(a.RangeError),u("ERR_ARG_NOT_ITERABLE","%s must be iterable"),u("ERR_ASSERTION","%s"),u("ERR_BUFFER_OUT_OF_BOUNDS",x),u("ERR_CHILD_CLOSED_BEFORE_REPLY","Child closed before reply received"),u("ERR_CONSOLE_WRITABLE_STREAM","Console expects a writable stream instance for %s"),u("ERR_CPU_USAGE","Unable to obtain cpu usage %s"),u("ERR_DNS_SET_SERVERS_FAILED",function(I,k){return 'c-ares failed to set servers: "'+I+'" ['+k+"]"}),u("ERR_FALSY_VALUE_REJECTION","Promise was rejected with falsy value"),u("ERR_ENCODING_NOT_SUPPORTED",function(I){return 'The "'+I+'" encoding is not supported'}),u("ERR_ENCODING_INVALID_ENCODED_DATA",function(I){return "The encoded data was not valid for encoding "+I}),u("ERR_HTTP_HEADERS_SENT","Cannot render headers after they are sent to the client"),u("ERR_HTTP_INVALID_STATUS_CODE","Invalid status code: %s"),u("ERR_HTTP_TRAILER_INVALID","Trailers are invalid with this transfer encoding"),u("ERR_INDEX_OUT_OF_RANGE","Index out of range"),u("ERR_INVALID_ARG_TYPE",l),u("ERR_INVALID_ARRAY_LENGTH",function(I,k,q){return e.strictEqual(typeof q,"number"),'The array "'+I+'" (length '+q+") must be of length "+k+"."}),u("ERR_INVALID_BUFFER_SIZE","Buffer size must be a multiple of %s"),u("ERR_INVALID_CALLBACK","Callback must be a function"),u("ERR_INVALID_CHAR","Invalid character in %s"),u("ERR_INVALID_CURSOR_POS","Cannot set cursor row without setting its column"),u("ERR_INVALID_FD",'"fd" must be a positive integer: %s'),u("ERR_INVALID_FILE_URL_HOST",'File URL host must be "localhost" or empty on %s'),u("ERR_INVALID_FILE_URL_PATH","File URL path %s"),u("ERR_INVALID_HANDLE_TYPE","This handle type cannot be sent"),u("ERR_INVALID_IP_ADDRESS","Invalid IP address: %s"),u("ERR_INVALID_OPT_VALUE",function(I,k){return 'The value "'+String(k)+'" is invalid for option "'+I+'"'}),u("ERR_INVALID_OPT_VALUE_ENCODING",function(I){return 'The value "'+String(I)+'" is invalid for option "encoding"'}),u("ERR_INVALID_REPL_EVAL_CONFIG",'Cannot specify both "breakEvalOnSigint" and "eval" for REPL'),u("ERR_INVALID_SYNC_FORK_INPUT","Asynchronous forks do not support Buffer, Uint8Array or string input: %s"),u("ERR_INVALID_THIS",'Value of "this" must be of type %s'),u("ERR_INVALID_TUPLE","%s must be an iterable %s tuple"),u("ERR_INVALID_URL","Invalid URL: %s"),u("ERR_INVALID_URL_SCHEME",function(I){return "The URL must be "+T(I,"scheme")}),u("ERR_IPC_CHANNEL_CLOSED","Channel closed"),u("ERR_IPC_DISCONNECTED","IPC channel is already disconnected"),u("ERR_IPC_ONE_PIPE","Child process can have only one IPC pipe"),u("ERR_IPC_SYNC_FORK","IPC cannot be used with synchronous forks"),u("ERR_MISSING_ARGS",w),u("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),u("ERR_NAPI_CONS_FUNCTION","Constructor must be a function"),u("ERR_NAPI_CONS_PROTOTYPE_OBJECT","Constructor.prototype must be an object"),u("ERR_NO_CRYPTO","Node.js is not compiled with OpenSSL crypto support"),u("ERR_NO_LONGER_SUPPORTED","%s is no longer supported"),u("ERR_PARSE_HISTORY_DATA","Could not parse history data in %s"),u("ERR_SOCKET_ALREADY_BOUND","Socket is already bound"),u("ERR_SOCKET_BAD_PORT","Port should be > 0 and < 65536"),u("ERR_SOCKET_BAD_TYPE","Bad socket type specified. Valid types are: udp4, udp6"),u("ERR_SOCKET_CANNOT_SEND","Unable to send data"),u("ERR_SOCKET_CLOSED","Socket is closed"),u("ERR_SOCKET_DGRAM_NOT_RUNNING","Not running"),u("ERR_STDERR_CLOSE","process.stderr cannot be closed"),u("ERR_STDOUT_CLOSE","process.stdout cannot be closed"),u("ERR_STREAM_WRAP","Stream has StringDecoder set or is in objectMode"),u("ERR_TLS_CERT_ALTNAME_INVALID","Hostname/IP does not match certificate's altnames: %s"),u("ERR_TLS_DH_PARAM_SIZE",function(I){return "DH parameter size "+I+" is less than 2048"}),u("ERR_TLS_HANDSHAKE_TIMEOUT","TLS handshake timeout"),u("ERR_TLS_RENEGOTIATION_FAILED","Failed to renegotiate"),u("ERR_TLS_REQUIRED_SERVER_NAME",'"servername" is required parameter for Server.addContext'),u("ERR_TLS_SESSION_ATTACK","TSL session renegotiation attack detected"),u("ERR_TRANSFORM_ALREADY_TRANSFORMING","Calling transform done when still transforming"),u("ERR_TRANSFORM_WITH_LENGTH_0","Calling transform done when writableState.length != 0"),u("ERR_UNKNOWN_ENCODING","Unknown encoding: %s"),u("ERR_UNKNOWN_SIGNAL","Unknown signal: %s"),u("ERR_UNKNOWN_STDIN_TYPE","Unknown stdin file type"),u("ERR_UNKNOWN_STREAM_TYPE","Unknown stream file type"),u("ERR_V8BREAKITERATOR","Full ICU data not installed. See https://github.com/nodejs/node/wiki/Intl");function l(I,k,q){e(I,"name is required");var j;k.includes("not ")?(j="must not be",k=k.split("not ")[1]):j="must be";var K;if(Array.isArray(I)){var Z=I.map(function(ce){return '"'+ce+'"'}).join(", ");K="The "+Z+" arguments "+j+" "+T(k,"type");}else if(I.includes(" argument"))K="The "+I+" "+j+" "+T(k,"type");else {var se=I.includes(".")?"property":"argument";K='The "'+I+'" '+se+" "+j+" "+T(k,"type");}return arguments.length>=3&&(K+=". Received type "+(q!==null?typeof q:"null")),K}function w(){for(var I=[],k=0;k<arguments.length;k++)I[k]=arguments[k];e(I.length>0,"At least one arg needs to be specified");var q="The ",j=I.length;switch(I=I.map(function(K){return '"'+K+'"'}),j){case 1:q+=I[0]+" argument";break;case 2:q+=I[0]+" and "+I[1]+" arguments";break;default:q+=I.slice(0,j-1).join(", "),q+=", and "+I[j-1]+" arguments";break}return q+" must be specified"}function T(I,k){if(e(I,"expected is required"),e(typeof k=="string","thing is required"),Array.isArray(I)){var q=I.length;return e(q>0,"At least one expected value needs to be specified"),I=I.map(function(j){return String(j)}),q>2?"one of "+k+" "+I.slice(0,q-1).join(", ")+", or "+I[q-1]:q===2?"one of "+k+" "+I[0]+" or "+I[1]:"of "+k+" "+I[0]}else return "of "+k+" "+String(I)}function x(I,k){return k?"Attempt to write outside buffer bounds":'"'+I+'" is outside of buffer bounds'}return nn}var Pa={},wF=!1;function kF(){if(wF)return Pa;wF=!0,Object.defineProperty(Pa,"__esModule",{value:!0}),Pa.strToEncoding=Pa.assertEncoding=Pa.ENCODING_UTF8=void 0;var t=zR(),e=NF();Pa.ENCODING_UTF8="utf8";function r(i){if(i&&!t.Buffer.isEncoding(i))throw new e.TypeError("ERR_INVALID_OPT_VALUE_ENCODING",i)}Pa.assertEncoding=r;function n(i,o){return !o||o===Pa.ENCODING_UTF8?i:o==="buffer"?new t.Buffer(i):new t.Buffer(i).toString(o)}return Pa.strToEncoding=n,Pa}var nh={},EF=!1;function PF(){if(EF)return nh;EF=!0,Object.defineProperty(nh,"__esModule",{value:!0}),nh.Dirent=void 0;var t=_0(),e=kF(),r=t.constants.S_IFMT,n=t.constants.S_IFDIR,i=t.constants.S_IFREG,o=t.constants.S_IFBLK,a=t.constants.S_IFCHR,s=t.constants.S_IFLNK,c=t.constants.S_IFIFO,u=t.constants.S_IFSOCK,l=function(){function w(){this.name="",this.mode=0;}return w.build=function(T,x){var I=new w,k=T.getNode().mode;return I.name=(0, e.strToEncoding)(T.getName(),x),I.mode=k,I},w.prototype._checkModeProperty=function(T){return (this.mode&r)===T},w.prototype.isDirectory=function(){return this._checkModeProperty(n)},w.prototype.isFile=function(){return this._checkModeProperty(i)},w.prototype.isBlockDevice=function(){return this._checkModeProperty(o)},w.prototype.isCharacterDevice=function(){return this._checkModeProperty(a)},w.prototype.isSymbolicLink=function(){return this._checkModeProperty(s)},w.prototype.isFIFO=function(){return this._checkModeProperty(c)},w.prototype.isSocket=function(){return this._checkModeProperty(u)},w}();return nh.Dirent=l,nh.default=l,nh}var ew={},_F=!1,SF=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:globalThis;function BF(){if(_F)return ew;_F=!0;var t=zt;Object.defineProperty(ew,"__esModule",{value:!0});var e;return typeof t.nextTick=="function"?e=t.nextTick.bind(typeof globalThis!="undefined"?globalThis:SF):e=setTimeout.bind(typeof globalThis!="undefined"?globalThis:SF),ew.default=e,ew}var ih={},CF=!1;function UF(){if(CF)return ih;CF=!0;var t=zt;Object.defineProperty(ih,"__esModule",{value:!0}),ih.createProcess=void 0;var e=function(){if(typeof t!="undefined")return t;try{return zt}catch(n){return}};function r(){var n=e()||{};return n.getuid||(n.getuid=function(){return 0}),n.getgid||(n.getgid=function(){return 0}),n.cwd||(n.cwd=function(){return "/"}),n.nextTick||(n.nextTick=BF().default),n.emitWarning||(n.emitWarning=function(i,o){console.warn(""+o+(o?": ":"")+i);}),n.env||(n.env={}),n}return ih.createProcess=r,ih.default=r(),ih}var ai={},AF=!1;function Fpe(){if(AF)return ai;AF=!0;var t=ai&&ai.__extends||function(){var I=function(k,q){return I=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(j,K){j.__proto__=K;}||function(j,K){for(var Z in K)Object.prototype.hasOwnProperty.call(K,Z)&&(j[Z]=K[Z]);},I(k,q)};return function(k,q){if(typeof q!="function"&&q!==null)throw new TypeError("Class extends value "+String(q)+" is not a constructor or null");I(k,q);function j(){this.constructor=k;}k.prototype=q===null?Object.create(q):(j.prototype=q.prototype,new j);}}();Object.defineProperty(ai,"__esModule",{value:!0}),ai.File=ai.Link=ai.Node=ai.SEP=void 0;var e=UF(),r=zR(),n=_0(),i=xr,o=FR(),a=n.constants.S_IFMT,s=n.constants.S_IFDIR,c=n.constants.S_IFREG,u=n.constants.S_IFLNK,l=n.constants.O_APPEND;ai.SEP="/";var w=function(I){t(k,I);function k(q,j){j===void 0&&(j=438);var K=I.call(this)||this;return K.uid=e.default.getuid(),K.gid=e.default.getgid(),K.atime=new Date,K.mtime=new Date,K.ctime=new Date,K.perm=438,K.mode=c,K.nlink=1,K.perm=j,K.mode|=j,K.ino=q,K}return k.prototype.getString=function(q){return q===void 0&&(q="utf8"),this.getBuffer().toString(q)},k.prototype.setString=function(q){this.buf=(0, r.bufferFrom)(q,"utf8"),this.touch();},k.prototype.getBuffer=function(){return this.buf||this.setBuffer((0, r.bufferAllocUnsafe)(0)),(0, r.bufferFrom)(this.buf)},k.prototype.setBuffer=function(q){this.buf=(0, r.bufferFrom)(q),this.touch();},k.prototype.getSize=function(){return this.buf?this.buf.length:0},k.prototype.setModeProperty=function(q){this.mode=this.mode&~a|q;},k.prototype.setIsFile=function(){this.setModeProperty(c);},k.prototype.setIsDirectory=function(){this.setModeProperty(s);},k.prototype.setIsSymlink=function(){this.setModeProperty(u);},k.prototype.isFile=function(){return (this.mode&a)===c},k.prototype.isDirectory=function(){return (this.mode&a)===s},k.prototype.isSymlink=function(){return (this.mode&a)===u},k.prototype.makeSymlink=function(q){this.symlink=q,this.setIsSymlink();},k.prototype.write=function(q,j,K,Z){if(j===void 0&&(j=0),K===void 0&&(K=q.length),Z===void 0&&(Z=0),this.buf||(this.buf=(0, r.bufferAllocUnsafe)(0)),Z+K>this.buf.length){var se=(0, r.bufferAllocUnsafe)(Z+K);this.buf.copy(se,0,0,this.buf.length),this.buf=se;}return q.copy(this.buf,Z,j,j+K),this.touch(),K},k.prototype.read=function(q,j,K,Z){j===void 0&&(j=0),K===void 0&&(K=q.byteLength),Z===void 0&&(Z=0),this.buf||(this.buf=(0, r.bufferAllocUnsafe)(0));var se=K;return se>q.byteLength&&(se=q.byteLength),se+Z>this.buf.length&&(se=this.buf.length-Z),this.buf.copy(q,j,Z,Z+se),se},k.prototype.truncate=function(q){if(q===void 0&&(q=0),!q)this.buf=(0, r.bufferAllocUnsafe)(0);else if(this.buf||(this.buf=(0, r.bufferAllocUnsafe)(0)),q<=this.buf.length)this.buf=this.buf.slice(0,q);else {var j=(0, r.bufferAllocUnsafe)(0);this.buf.copy(j),j.fill(0,q);}this.touch();},k.prototype.chmod=function(q){this.perm=q,this.mode=this.mode&-512|q,this.touch();},k.prototype.chown=function(q,j){this.uid=q,this.gid=j,this.touch();},k.prototype.touch=function(){this.mtime=new Date,this.emit("change",this);},k.prototype.canRead=function(q,j){return q===void 0&&(q=e.default.getuid()),j===void 0&&(j=e.default.getgid()),!!(this.perm&4||j===this.gid&&this.perm&32||q===this.uid&&this.perm&256)},k.prototype.canWrite=function(q,j){return q===void 0&&(q=e.default.getuid()),j===void 0&&(j=e.default.getgid()),!!(this.perm&2||j===this.gid&&this.perm&16||q===this.uid&&this.perm&128)},k.prototype.del=function(){this.emit("delete",this);},k.prototype.toJSON=function(){return {ino:this.ino,uid:this.uid,gid:this.gid,atime:this.atime.getTime(),mtime:this.mtime.getTime(),ctime:this.ctime.getTime(),perm:this.perm,mode:this.mode,nlink:this.nlink,symlink:this.symlink,data:this.getString()}},k}(i.EventEmitter);ai.Node=w;var T=function(I){t(k,I);function k(q,j,K){var Z=I.call(this)||this;return Z.children={},Z.steps=[],Z.ino=0,Z.length=0,Z.vol=q,Z.parent=j,Z.steps=j?j.steps.concat([K]):[K],Z}return k.prototype.setNode=function(q){this.node=q,this.ino=q.ino;},k.prototype.getNode=function(){return this.node},k.prototype.createChild=function(q,j){j===void 0&&(j=this.vol.createNode());var K=new k(this.vol,this,q);return K.setNode(j),j.isDirectory(),this.setChild(q,K),K},k.prototype.setChild=function(q,j){return j===void 0&&(j=new k(this.vol,this,q)),this.children[q]=j,j.parent=this,this.length++,this.emit("child:add",j,this),j},k.prototype.deleteChild=function(q){delete this.children[q.getName()],this.length--,this.emit("child:delete",q,this);},k.prototype.getChild=function(q){if(Object.hasOwnProperty.call(this.children,q))return this.children[q]},k.prototype.getPath=function(){return this.steps.join(ai.SEP)},k.prototype.getName=function(){return this.steps[this.steps.length-1]},k.prototype.walk=function(q,j,K){if(j===void 0&&(j=q.length),K===void 0&&(K=0),K>=q.length)return this;if(K>=j)return this;var Z=q[K],se=this.getChild(Z);return se?se.walk(q,j,K+1):null},k.prototype.toJSON=function(){return {steps:this.steps,ino:this.ino,children:Object.keys(this.children)}},k}(i.EventEmitter);ai.Link=T;var x=function(){function I(k,q,j,K){this.position=0,this.link=k,this.node=q,this.flags=j,this.fd=K;}return I.prototype.getString=function(k){return this.node.getString()},I.prototype.setString=function(k){this.node.setString(k);},I.prototype.getBuffer=function(){return this.node.getBuffer()},I.prototype.setBuffer=function(k){this.node.setBuffer(k);},I.prototype.getSize=function(){return this.node.getSize()},I.prototype.truncate=function(k){this.node.truncate(k);},I.prototype.seekTo=function(k){this.position=k;},I.prototype.stats=function(){return o.default.build(this.node)},I.prototype.write=function(k,q,j,K){q===void 0&&(q=0),j===void 0&&(j=k.length),typeof K!="number"&&(K=this.position),this.flags&l&&(K=this.getSize());var Z=this.node.write(k,q,j,K);return this.position=K+Z,Z},I.prototype.read=function(k,q,j,K){q===void 0&&(q=0),j===void 0&&(j=k.byteLength),typeof K!="number"&&(K=this.position);var Z=this.node.read(k,q,j,K);return this.position=K+Z,Z},I.prototype.chmod=function(k){this.node.chmod(k);},I.prototype.chown=function(k,q){this.node.chown(k,q);},I}();return ai.File=x,ai}var tw={},TF=!1,zpe=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:globalThis;function Hpe(){if(TF)return tw;TF=!0,Object.defineProperty(tw,"__esModule",{value:!0});function t(e,r,n){var i=setTimeout.apply(typeof globalThis!="undefined"?globalThis:zpe,arguments);return i&&typeof i=="object"&&typeof i.unref=="function"&&i.unref(),i}return tw.default=t,tw}var Dc={},RF=!1;function jpe(){if(RF)return Dc;RF=!0;var t=Dc&&Dc.__spreadArray||function(i,o,a){if(a||arguments.length===2)for(var s=0,c=o.length,u;s<c;s++)(u||!(s in o))&&(u||(u=Array.prototype.slice.call(o,0,s)),u[s]=o[s]);return i.concat(u||Array.prototype.slice.call(o))};Object.defineProperty(Dc,"__esModule",{value:!0}),Dc.FileHandle=void 0;function e(i,o,a){return a===void 0&&(a=function(s){return s}),function(){for(var s=[],c=0;c<arguments.length;c++)s[c]=arguments[c];return new Promise(function(u,l){i[o].bind(i).apply(void 0,t(t([],s,!1),[function(w,T){return w?l(w):u(a(T))}],!1));})}}var r=function(){function i(o,a){this.vol=o,this.fd=a;}return i.prototype.appendFile=function(o,a){return e(this.vol,"appendFile")(this.fd,o,a)},i.prototype.chmod=function(o){return e(this.vol,"fchmod")(this.fd,o)},i.prototype.chown=function(o,a){return e(this.vol,"fchown")(this.fd,o,a)},i.prototype.close=function(){return e(this.vol,"close")(this.fd)},i.prototype.datasync=function(){return e(this.vol,"fdatasync")(this.fd)},i.prototype.read=function(o,a,s,c){return e(this.vol,"read",function(u){return {bytesRead:u,buffer:o}})(this.fd,o,a,s,c)},i.prototype.readFile=function(o){return e(this.vol,"readFile")(this.fd,o)},i.prototype.stat=function(o){return e(this.vol,"fstat")(this.fd,o)},i.prototype.sync=function(){return e(this.vol,"fsync")(this.fd)},i.prototype.truncate=function(o){return e(this.vol,"ftruncate")(this.fd,o)},i.prototype.utimes=function(o,a){return e(this.vol,"futimes")(this.fd,o,a)},i.prototype.write=function(o,a,s,c){return e(this.vol,"write",function(u){return {bytesWritten:u,buffer:o}})(this.fd,o,a,s,c)},i.prototype.writeFile=function(o,a){return e(this.vol,"writeFile")(this.fd,o,a)},i}();Dc.FileHandle=r;function n(i){return typeof Promise=="undefined"?null:{FileHandle:r,access:function(o,a){return e(i,"access")(o,a)},appendFile:function(o,a,s){return e(i,"appendFile")(o instanceof r?o.fd:o,a,s)},chmod:function(o,a){return e(i,"chmod")(o,a)},chown:function(o,a,s){return e(i,"chown")(o,a,s)},copyFile:function(o,a,s){return e(i,"copyFile")(o,a,s)},lchmod:function(o,a){return e(i,"lchmod")(o,a)},lchown:function(o,a,s){return e(i,"lchown")(o,a,s)},link:function(o,a){return e(i,"link")(o,a)},lstat:function(o,a){return e(i,"lstat")(o,a)},mkdir:function(o,a){return e(i,"mkdir")(o,a)},mkdtemp:function(o,a){return e(i,"mkdtemp")(o,a)},open:function(o,a,s){return e(i,"open",function(c){return new r(i,c)})(o,a,s)},readdir:function(o,a){return e(i,"readdir")(o,a)},readFile:function(o,a){return e(i,"readFile")(o instanceof r?o.fd:o,a)},readlink:function(o,a){return e(i,"readlink")(o,a)},realpath:function(o,a){return e(i,"realpath")(o,a)},rename:function(o,a){return e(i,"rename")(o,a)},rmdir:function(o){return e(i,"rmdir")(o)},stat:function(o,a){return e(i,"stat")(o,a)},symlink:function(o,a,s){return e(i,"symlink")(o,a,s)},truncate:function(o,a){return e(i,"truncate")(o,a)},unlink:function(o){return e(i,"unlink")(o)},utimes:function(o,a,s){return e(i,"utimes")(o,a,s)},writeFile:function(o,a,s){return e(i,"writeFile")(o instanceof r?o.fd:o,a,s)}}}return Dc.default=n,Dc}var E0={},xF=!1;function $pe(){if(xF)return E0;xF=!0;var t=zt;Object.defineProperty(E0,"__esModule",{value:!0}),E0.unixify=o,E0.correctPath=a;var e=t.platform==="win32";function r(s){var c=s.length-1;if(c<2)return s;for(;n(s,c);)c--;return s.substr(0,c+1)}function n(s,c){var u=s[c];return c>0&&(u==="/"||e&&u==="\\")}function i(s,c){if(typeof s!="string")throw new TypeError("expected a string");return s=s.replace(/[\\\/]+/g,"/"),c!==!1&&(s=r(s)),s}function o(s){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return e?(s=i(s,c),s.replace(/^([a-zA-Z]+:|\.\/)/,"")):s}function a(s){return o(s.replace(/^\\\\\?\\.:\\/,"\\"))}return E0}var jt={},IF=!1,Vpe=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:globalThis;function DF(){if(IF)return jt;IF=!0;var t=jt&&jt.__extends||function(){var W=function(F,H){return W=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(G,Q){G.__proto__=Q;}||function(G,Q){for(var ue in Q)Object.prototype.hasOwnProperty.call(Q,ue)&&(G[ue]=Q[ue]);},W(F,H)};return function(F,H){if(typeof H!="function"&&H!==null)throw new TypeError("Class extends value "+String(H)+" is not a constructor or null");W(F,H);function G(){this.constructor=F;}F.prototype=H===null?Object.create(H):(G.prototype=H.prototype,new G);}}(),e=jt&&jt.__spreadArray||function(W,F,H){if(H||arguments.length===2)for(var G=0,Q=F.length,ue;G<Q;G++)(ue||!(G in F))&&(ue||(ue=Array.prototype.slice.call(F,0,G)),ue[G]=F[G]);return W.concat(ue||Array.prototype.slice.call(F))};Object.defineProperty(jt,"__esModule",{value:!0}),jt.FSWatcher=jt.StatWatcher=jt.Volume=jt.toUnixTimestamp=jt.bufferToEncoding=jt.dataToBuffer=jt.dataToStr=jt.pathToSteps=jt.filenameToSteps=jt.pathToFilename=jt.flagsToNumber=jt.FLAGS=void 0;var r=br,n=Fpe(),i=FR(),o=PF(),a=zR(),s=BF(),c=UF(),u=Hpe(),l=oi,w=_0(),T=xr,x=kF(),I=NF(),k=we,q=jpe(),j=r.resolve,K=w.constants.O_RDONLY,Z=w.constants.O_WRONLY,se=w.constants.O_RDWR,ce=w.constants.O_CREAT,Te=w.constants.O_EXCL,pe=w.constants.O_TRUNC,le=w.constants.O_APPEND,Y=w.constants.O_SYNC,S=w.constants.O_DIRECTORY,d=w.constants.F_OK,C=w.constants.COPYFILE_EXCL,A=w.constants.COPYFILE_FICLONE_FORCE,f=r.posix?r.posix:r,_=f.sep,M=f.relative,R=f.join,h=f.dirname,b=c.default.platform==="win32",B=128,z={PATH_STR:"path must be a string or Buffer",FD:"fd must be a file descriptor",MODE_INT:"mode must be an int",CB:"callback must be a function",UID:"uid must be an unsigned int",GID:"gid must be an unsigned int",LEN:"len must be an integer",ATIME:"atime must be an integer",MTIME:"mtime must be an integer",PREFIX:"filename prefix is required",BUFFER:"buffer must be an instance of Buffer or StaticBuffer",OFFSET:"offset must be an integer",LENGTH:"length must be an integer",POSITION:"position must be an integer"},P=function(W){return "Expected options to be either an object or a string, but got "+W+" instead"},V="ENOENT",fe="EBADF",ye="EINVAL",Ce="EPERM",ae="EPROTO",ie="EEXIST",he="ENOTDIR",Be="EMFILE",Re="EACCES",J="EISDIR",ee="ENOTEMPTY",de="ENOSYS";function xe(W,F,H,G){F===void 0&&(F=""),H===void 0&&(H=""),G===void 0&&(G="");var Q="";switch(H&&(Q=" '"+H+"'"),G&&(Q+=" -> '"+G+"'"),W){case V:return "ENOENT: no such file or directory, "+F+Q;case fe:return "EBADF: bad file descriptor, "+F+Q;case ye:return "EINVAL: invalid argument, "+F+Q;case Ce:return "EPERM: operation not permitted, "+F+Q;case ae:return "EPROTO: protocol error, "+F+Q;case ie:return "EEXIST: file already exists, "+F+Q;case he:return "ENOTDIR: not a directory, "+F+Q;case J:return "EISDIR: illegal operation on a directory, "+F+Q;case Re:return "EACCES: permission denied, "+F+Q;case ee:return "ENOTEMPTY: directory not empty, "+F+Q;case Be:return "EMFILE: too many open files, "+F+Q;case de:return "ENOSYS: function not implemented, "+F+Q;default:return W+": error occurred, "+F+Q}}function Pe(W,F,H,G,Q){F===void 0&&(F=""),H===void 0&&(H=""),G===void 0&&(G=""),Q===void 0&&(Q=Error);var ue=new Q(xe(W,F,H,G));return ue.code=W,ue}var Oe;(function(W){W[W.r=K]="r",W[W["r+"]=se]="r+",W[W.rs=K|Y]="rs",W[W.sr=W.rs]="sr",W[W["rs+"]=se|Y]="rs+",W[W["sr+"]=W["rs+"]]="sr+",W[W.w=Z|ce|pe]="w",W[W.wx=Z|ce|pe|Te]="wx",W[W.xw=W.wx]="xw",W[W["w+"]=se|ce|pe]="w+",W[W["wx+"]=se|ce|pe|Te]="wx+",W[W["xw+"]=W["wx+"]]="xw+",W[W.a=Z|le|ce]="a",W[W.ax=Z|le|ce|Te]="ax",W[W.xa=W.ax]="xa",W[W["a+"]=se|le|ce]="a+",W[W["ax+"]=se|le|ce|Te]="ax+",W[W["xa+"]=W["ax+"]]="xa+";})(Oe=jt.FLAGS||(jt.FLAGS={}));function He(W){if(typeof W=="number")return W;if(typeof W=="string"){var F=Oe[W];if(typeof F!="undefined")return F}throw new I.TypeError("ERR_INVALID_OPT_VALUE","flags",W)}jt.flagsToNumber=He;function St(W,F){var H;if(F){var G=typeof F;switch(G){case"string":H=Object.assign({},W,{encoding:F});break;case"object":H=Object.assign({},W,F);break;default:throw TypeError(P(G))}}else return W;return H.encoding!=="buffer"&&(0, x.assertEncoding)(H.encoding),H}function Fe(W){return function(F){return St(W,F)}}function ze(W){if(typeof W!="function")throw TypeError(z.CB);return W}function Tt(W){return function(F,H){return typeof F=="function"?[W(),F]:[W(F),ze(H)]}}var Ge={encoding:"utf8"},We=Fe(Ge),Pt=Tt(We),O={flag:"r"},p=Fe(O),E={encoding:"utf8",mode:438,flag:Oe[Oe.w]},U=Fe(E),$={encoding:"utf8",mode:438,flag:Oe[Oe.a]},X=Fe($),te=Tt(X),Se=Ge,Ve=Fe(Se),Ie=Tt(Ve),De={mode:511,recursive:!1},qe=function(W){return typeof W=="number"?Object.assign({},De,{mode:W}):Object.assign({},De,W)},it={recursive:!1},mt=function(W){return Object.assign({},it,W)},nr={encoding:"utf8",withFileTypes:!1},nt=Fe(nr),vt=Tt(nt),ir={bigint:!1},Je=function(W){return W===void 0&&(W={}),Object.assign({},ir,W)},ht=function(W,F){return typeof W=="function"?[Je(),W]:[Je(W),ze(F)]};function or(W){if(W.hostname!=="")throw new I.TypeError("ERR_INVALID_FILE_URL_HOST",c.default.platform);for(var F=W.pathname,H=0;H<F.length;H++)if(F[H]==="%"){var G=F.codePointAt(H+2)|32;if(F[H+1]==="2"&&G===102)throw new I.TypeError("ERR_INVALID_FILE_URL_PATH","must not include encoded / characters")}return decodeURIComponent(F)}function _e(W){if(typeof W!="string"&&!a.Buffer.isBuffer(W)){try{if(!(W instanceof rr.URL))throw new TypeError(z.PATH_STR)}catch(H){throw new TypeError(z.PATH_STR)}W=or(W);}var F=String(W);return rt(F),F}jt.pathToFilename=_e;var dt=function(W,F){return F===void 0&&(F=c.default.cwd()),j(F,W)};if(b){var ar=dt,ot=$pe().unixify;dt=function(W,F){return ot(ar(W,F))};}function tt(W,F){var H=dt(W,F),G=H.substr(1);return G?G.split(_):[]}jt.filenameToSteps=tt;function er(W){return tt(_e(W))}jt.pathToSteps=er;function at(W,F){return F===void 0&&(F=x.ENCODING_UTF8),a.Buffer.isBuffer(W)?W.toString(F):W instanceof Uint8Array?(0, a.bufferFrom)(W).toString(F):String(W)}jt.dataToStr=at;function ft(W,F){return F===void 0&&(F=x.ENCODING_UTF8),a.Buffer.isBuffer(W)?W:W instanceof Uint8Array?(0, a.bufferFrom)(W):(0, a.bufferFrom)(String(W),F)}jt.dataToBuffer=ft;function tr(W,F){return !F||F==="buffer"?W:W.toString(F)}jt.bufferToEncoding=tr;function rt(W,F){if((""+W).indexOf("\0")!==-1){var H=new Error("Path must be a string without null bytes");if(H.code=V,typeof F!="function")throw H;}return !0}function bt(W,F){if(typeof W=="number")return W;if(typeof W=="string")return parseInt(W,8);if(F)return It(F)}function It(W,F){var H=bt(W,F);if(typeof H!="number"||isNaN(H))throw new TypeError(z.MODE_INT);return H}function Ze(W){return W>>>0===W}function lt(W){if(!Ze(W))throw TypeError(z.FD)}function jr(W){if(typeof W=="string"&&+W==W)return +W;if(W instanceof Date)return W.getTime()/1e3;if(isFinite(W))return W<0?Date.now()/1e3:W;throw new Error("Cannot parse time: "+W)}jt.toUnixTimestamp=jr;function qt(W){if(typeof W!="number")throw TypeError(z.UID)}function Ft(W){if(typeof W!="number")throw TypeError(z.GID)}function ci(W){var F={};function H(G,Q){for(var ue in Q){var ve=Q[ue],ke=R(G,ue);typeof ve=="string"?F[ke]=ve:typeof ve=="object"&&ve!==null&&Object.keys(ve).length>0?H(ke,ve):F[ke]=null;}}return H("",W),F}var ui=function(){function W(F){F===void 0&&(F={}),this.ino=0,this.inodes={},this.releasedInos=[],this.fds={},this.releasedFds=[],this.maxFiles=1e4,this.openFiles=0,this.promisesApi=(0, q.default)(this),this.statWatchers={},this.props=Object.assign({Node:n.Node,Link:n.Link,File:n.File},F);var H=this.createLink();H.setNode(this.createNode(!0));var G=this;this.StatWatcher=function(ve){t(ke,ve);function ke(){return ve.call(this,G)||this}return ke}(Kn);var Q=Sr;this.ReadStream=function(ve){t(ke,ve);function ke(){for(var Ke=[],st=0;st<arguments.length;st++)Ke[st]=arguments[st];return ve.apply(this,e([G],Ke,!1))||this}return ke}(Q);var ue=vr;this.WriteStream=function(ve){t(ke,ve);function ke(){for(var Ke=[],st=0;st<arguments.length;st++)Ke[st]=arguments[st];return ve.apply(this,e([G],Ke,!1))||this}return ke}(ue),this.FSWatcher=function(ve){t(ke,ve);function ke(){return ve.call(this,G)||this}return ke}(Wn),this.root=H;}return W.fromJSON=function(F,H){var G=new W;return G.fromJSON(F,H),G},W.fromNestedJSON=function(F,H){var G=new W;return G.fromNestedJSON(F,H),G},Object.defineProperty(W.prototype,"promises",{get:function(){if(this.promisesApi===null)throw new Error("Promise is not supported in this environment.");return this.promisesApi},enumerable:!1,configurable:!0}),W.prototype.createLink=function(F,H,G,Q){if(G===void 0&&(G=!1),!F)return new this.props.Link(this,null,"");if(!H)throw new Error("createLink: name cannot be empty");return F.createChild(H,this.createNode(G,Q))},W.prototype.deleteLink=function(F){var H=F.parent;return H?(H.deleteChild(F),!0):!1},W.prototype.newInoNumber=function(){var F=this.releasedInos.pop();return F||(this.ino=(this.ino+1)%4294967295,this.ino)},W.prototype.newFdNumber=function(){var F=this.releasedFds.pop();return typeof F=="number"?F:W.fd--},W.prototype.createNode=function(F,H){F===void 0&&(F=!1);var G=new this.props.Node(this.newInoNumber(),H);return F&&G.setIsDirectory(),this.inodes[G.ino]=G,G},W.prototype.getNode=function(F){return this.inodes[F]},W.prototype.deleteNode=function(F){F.del(),delete this.inodes[F.ino],this.releasedInos.push(F.ino);},W.prototype.genRndStr=function(){var F=(Math.random()+1).toString(36).substr(2,6);return F.length===6?F:this.genRndStr()},W.prototype.getLink=function(F){return this.root.walk(F)},W.prototype.getLinkOrThrow=function(F,H){var G=tt(F),Q=this.getLink(G);if(!Q)throw Pe(V,H,F);return Q},W.prototype.getResolvedLink=function(F){for(var H=typeof F=="string"?tt(F):F,G=this.root,Q=0;Q<H.length;){var ue=H[Q];if(G=G.getChild(ue),!G)return null;var ve=G.getNode();if(ve.isSymlink()){H=ve.symlink.concat(H.slice(Q+1)),G=this.root,Q=0;continue}Q++;}return G},W.prototype.getResolvedLinkOrThrow=function(F,H){var G=this.getResolvedLink(F);if(!G)throw Pe(V,H,F);return G},W.prototype.resolveSymlinks=function(F){return this.getResolvedLink(F.steps.slice(1))},W.prototype.getLinkAsDirOrThrow=function(F,H){var G=this.getLinkOrThrow(F,H);if(!G.getNode().isDirectory())throw Pe(he,H,F);return G},W.prototype.getLinkParent=function(F){return this.root.walk(F,F.length-1)},W.prototype.getLinkParentAsDirOrThrow=function(F,H){var G=F instanceof Array?F:tt(F),Q=this.getLinkParent(G);if(!Q)throw Pe(V,H,_+G.join(_));if(!Q.getNode().isDirectory())throw Pe(he,H,_+G.join(_));return Q},W.prototype.getFileByFd=function(F){return this.fds[String(F)]},W.prototype.getFileByFdOrThrow=function(F,H){if(!Ze(F))throw TypeError(z.FD);var G=this.getFileByFd(F);if(!G)throw Pe(fe,H);return G},W.prototype.getNodeByIdOrCreate=function(F,H,G){if(typeof F=="number"){var Q=this.getFileByFd(F);if(!Q)throw Error("File nto found");return Q.node}else {var ue=er(F),ve=this.getLink(ue);if(ve)return ve.getNode();if(H&ce){var ke=this.getLinkParent(ue);if(ke){var Ke=ue[ue.length-1];return ve=this.createLink(ke,Ke,!1,G),ve.getNode()}}throw Pe(V,"getNodeByIdOrCreate",_e(F))}},W.prototype.wrapAsync=function(F,H,G){var Q=this;ze(G),(0, s.default)(function(){var ue;try{ue=F.apply(Q,H);}catch(ve){G(ve);return}G(null,ue);});},W.prototype._toJSON=function(F,H,G){var Q;F===void 0&&(F=this.root),H===void 0&&(H={});var ue=!0,ve=F.children;F.getNode().isFile()&&(ve=(Q={},Q[F.getName()]=F.parent.getChild(F.getName()),Q),F=F.parent);for(var ke in ve){ue=!1;var Ke=F.getChild(ke);if(!Ke)throw new Error("_toJSON: unexpected undefined");var st=Ke.getNode();if(st.isFile()){var $t=Ke.getPath();G&&($t=M(G,$t)),H[$t]=st.getString();}else st.isDirectory()&&this._toJSON(Ke,H,G);}var Br=F.getPath();return G&&(Br=M(G,Br)),Br&&ue&&(H[Br]=null),H},W.prototype.toJSON=function(F,H,G){H===void 0&&(H={}),G===void 0&&(G=!1);var Q=[];if(F){F instanceof Array||(F=[F]);for(var ue=0,ve=F;ue<ve.length;ue++){var ke=ve[ue],Ke=_e(ke),st=this.getResolvedLink(Ke);st&&Q.push(st);}}else Q.push(this.root);if(!Q.length)return H;for(var $t=0,Br=Q;$t<Br.length;$t++){var st=Br[$t];this._toJSON(st,H,G?st.getPath():"");}return H},W.prototype.fromJSON=function(F,H){H===void 0&&(H=c.default.cwd());for(var G in F){var Q=F[G];if(G=dt(G,H),typeof Q=="string"){var ue=h(G);this.mkdirpBase(ue,511),this.writeFileSync(G,Q);}else this.mkdirpBase(G,511);}},W.prototype.fromNestedJSON=function(F,H){this.fromJSON(ci(F),H);},W.prototype.reset=function(){this.ino=0,this.inodes={},this.releasedInos=[],this.fds={},this.releasedFds=[],this.openFiles=0,this.root=this.createLink(),this.root.setNode(this.createNode(!0));},W.prototype.mountSync=function(F,H){this.fromJSON(H,F);},W.prototype.openLink=function(F,H,G){if(G===void 0&&(G=!0),this.openFiles>=this.maxFiles)throw Pe(Be,"open",F.getPath());var Q=F;if(G&&(Q=this.resolveSymlinks(F)),!Q)throw Pe(V,"open",F.getPath());var ue=Q.getNode();if(ue.isDirectory()){if((H&(K|se|Z))!==K)throw Pe(J,"open",F.getPath())}else if(H&S)throw Pe(he,"open",F.getPath());if(!(H&Z)&&!ue.canRead())throw Pe(Re,"open",F.getPath());var ve=new this.props.File(F,ue,H,this.newFdNumber());return this.fds[ve.fd]=ve,this.openFiles++,H&pe&&ve.truncate(),ve},W.prototype.openFile=function(F,H,G,Q){Q===void 0&&(Q=!0);var ue=tt(F),ve=Q?this.getResolvedLink(ue):this.getLink(ue);if(!ve&&H&ce){var ke=this.getResolvedLink(ue.slice(0,ue.length-1));if(!ke)throw Pe(V,"open",_+ue.join(_));H&ce&&typeof G=="number"&&(ve=this.createLink(ke,ue[ue.length-1],!1,G));}if(ve)return this.openLink(ve,H,Q);throw Pe(V,"open",F)},W.prototype.openBase=function(F,H,G,Q){Q===void 0&&(Q=!0);var ue=this.openFile(F,H,G,Q);if(!ue)throw Pe(V,"open",F);return ue.fd},W.prototype.openSync=function(F,H,G){G===void 0&&(G=438);var Q=It(G),ue=_e(F),ve=He(H);return this.openBase(ue,ve,Q)},W.prototype.open=function(F,H,G,Q){var ue=G,ve=Q;typeof G=="function"&&(ue=438,ve=G),ue=ue||438;var ke=It(ue),Ke=_e(F),st=He(H);this.wrapAsync(this.openBase,[Ke,st,ke],ve);},W.prototype.closeFile=function(F){this.fds[F.fd]&&(this.openFiles--,delete this.fds[F.fd],this.releasedFds.push(F.fd));},W.prototype.closeSync=function(F){lt(F);var H=this.getFileByFdOrThrow(F,"close");this.closeFile(H);},W.prototype.close=function(F,H){lt(F),this.wrapAsync(this.closeSync,[F],H);},W.prototype.openFileOrGetById=function(F,H,G){if(typeof F=="number"){var Q=this.fds[F];if(!Q)throw Pe(V);return Q}else return this.openFile(_e(F),H,G)},W.prototype.readBase=function(F,H,G,Q,ue){var ve=this.getFileByFdOrThrow(F);return ve.read(H,Number(G),Number(Q),ue)},W.prototype.readSync=function(F,H,G,Q,ue){return lt(F),this.readBase(F,H,G,Q,ue)},W.prototype.read=function(F,H,G,Q,ue,ve){var ke=this;if(ze(ve),Q===0)return c.default.nextTick(function(){ve&&ve(null,0,H);});(0, s.default)(function(){try{var Ke=ke.readBase(F,H,G,Q,ue);ve(null,Ke,H);}catch(st){ve(st);}});},W.prototype.readFileBase=function(F,H,G){var Q,ue=typeof F=="number",ve=ue&&Ze(F),ke;if(ve)ke=F;else {var Ke=_e(F),st=tt(Ke),$t=this.getResolvedLink(st);if($t){var Br=$t.getNode();if(Br.isDirectory())throw Pe(J,"open",$t.getPath())}ke=this.openSync(F,H);}try{Q=tr(this.getFileByFdOrThrow(ke).getBuffer(),G);}finally{ve||this.closeSync(ke);}return Q},W.prototype.readFileSync=function(F,H){var G=p(H),Q=He(G.flag);return this.readFileBase(F,Q,G.encoding)},W.prototype.readFile=function(F,H,G){var Q=Tt(p)(H,G),ue=Q[0],ve=Q[1],ke=He(ue.flag);this.wrapAsync(this.readFileBase,[F,ke,ue.encoding],ve);},W.prototype.writeBase=function(F,H,G,Q,ue){var ve=this.getFileByFdOrThrow(F,"write");return ve.write(H,G,Q,ue)},W.prototype.writeSync=function(F,H,G,Q,ue){lt(F);var ve,ke,Ke,st,$t=typeof H!="string";$t?(ke=(G||0)|0,Ke=Q,st=ue):(st=G,ve=Q);var Br=ft(H,ve);return $t?typeof Ke=="undefined"&&(Ke=Br.length):(ke=0,Ke=Br.length),this.writeBase(F,Br,ke,Ke,st)},W.prototype.write=function(F,H,G,Q,ue,ve){var ke=this;lt(F);var Ke,st,$t,Br,go,Rw=typeof H,bx=typeof G,wx=typeof Q,Ex=typeof ue;Rw!=="string"?bx==="function"?go=G:wx==="function"?(Ke=G|0,go=Q):Ex==="function"?(Ke=G|0,st=Q,go=ue):(Ke=G|0,st=Q,$t=ue,go=ve):bx==="function"?go=G:wx==="function"?($t=G,go=Q):Ex==="function"&&($t=G,Br=Q,go=ue);var q0=ft(H,Br);Rw!=="string"?typeof st=="undefined"&&(st=q0.length):(Ke=0,st=q0.length);var xw=ze(go);(0, s.default)(function(){try{var _x=ke.writeBase(F,q0,Ke,st,$t);Rw!=="string"?xw(null,_x,q0):xw(null,_x,H);}catch(Oz){xw(Oz);}});},W.prototype.writeFileBase=function(F,H,G,Q){var ue=typeof F=="number",ve;ue?ve=F:ve=this.openBase(_e(F),G,Q);var ke=0,Ke=H.length,st=G&le?void 0:0;try{for(;Ke>0;){var $t=this.writeSync(ve,H,ke,Ke,st);ke+=$t,Ke-=$t,st!==void 0&&(st+=$t);}}finally{ue||this.closeSync(ve);}},W.prototype.writeFileSync=function(F,H,G){var Q=U(G),ue=He(Q.flag),ve=It(Q.mode),ke=ft(H,Q.encoding);this.writeFileBase(F,ke,ue,ve);},W.prototype.writeFile=function(F,H,G,Q){var ue=G,ve=Q;typeof G=="function"&&(ue=E,ve=G);var ke=ze(ve),Ke=U(ue),st=He(Ke.flag),$t=It(Ke.mode),Br=ft(H,Ke.encoding);this.wrapAsync(this.writeFileBase,[F,Br,st,$t],ke);},W.prototype.linkBase=function(F,H){var G=tt(F),Q=this.getLink(G);if(!Q)throw Pe(V,"link",F,H);var ue=tt(H),ve=this.getLinkParent(ue);if(!ve)throw Pe(V,"link",F,H);var ke=ue[ue.length-1];if(ve.getChild(ke))throw Pe(ie,"link",F,H);var Ke=Q.getNode();Ke.nlink++,ve.createChild(ke,Ke);},W.prototype.copyFileBase=function(F,H,G){var Q=this.readFileSync(F);if(G&C&&this.existsSync(H))throw Pe(ie,"copyFile",F,H);if(G&A)throw Pe(de,"copyFile",F,H);this.writeFileBase(H,Q,Oe.w,438);},W.prototype.copyFileSync=function(F,H,G){var Q=_e(F),ue=_e(H);return this.copyFileBase(Q,ue,(G||0)|0)},W.prototype.copyFile=function(F,H,G,Q){var ue=_e(F),ve=_e(H),ke,Ke;typeof G=="function"?(ke=0,Ke=G):(ke=G,Ke=Q),ze(Ke),this.wrapAsync(this.copyFileBase,[ue,ve,ke],Ke);},W.prototype.linkSync=function(F,H){var G=_e(F),Q=_e(H);this.linkBase(G,Q);},W.prototype.link=function(F,H,G){var Q=_e(F),ue=_e(H);this.wrapAsync(this.linkBase,[Q,ue],G);},W.prototype.unlinkBase=function(F){var H=tt(F),G=this.getLink(H);if(!G)throw Pe(V,"unlink",F);if(G.length)throw Error("Dir not empty...");this.deleteLink(G);var Q=G.getNode();Q.nlink--,Q.nlink<=0&&this.deleteNode(Q);},W.prototype.unlinkSync=function(F){var H=_e(F);this.unlinkBase(H);},W.prototype.unlink=function(F,H){var G=_e(F);this.wrapAsync(this.unlinkBase,[G],H);},W.prototype.symlinkBase=function(F,H){var G=tt(H),Q=this.getLinkParent(G);if(!Q)throw Pe(V,"symlink",F,H);var ue=G[G.length-1];if(Q.getChild(ue))throw Pe(ie,"symlink",F,H);var ve=Q.createChild(ue);return ve.getNode().makeSymlink(tt(F)),ve},W.prototype.symlinkSync=function(F,H,G){var Q=_e(F),ue=_e(H);this.symlinkBase(Q,ue);},W.prototype.symlink=function(F,H,G,Q){var ue=ze(typeof G=="function"?G:Q),ve=_e(F),ke=_e(H);this.wrapAsync(this.symlinkBase,[ve,ke],ue);},W.prototype.realpathBase=function(F,H){var G=tt(F),Q=this.getResolvedLink(G);if(!Q)throw Pe(V,"realpath",F);return (0, x.strToEncoding)(Q.getPath(),H)},W.prototype.realpathSync=function(F,H){return this.realpathBase(_e(F),Ve(H).encoding)},W.prototype.realpath=function(F,H,G){var Q=Ie(H,G),ue=Q[0],ve=Q[1],ke=_e(F);this.wrapAsync(this.realpathBase,[ke,ue.encoding],ve);},W.prototype.lstatBase=function(F,H){H===void 0&&(H=!1);var G=this.getLink(tt(F));if(!G)throw Pe(V,"lstat",F);return i.default.build(G.getNode(),H)},W.prototype.lstatSync=function(F,H){return this.lstatBase(_e(F),Je(H).bigint)},W.prototype.lstat=function(F,H,G){var Q=ht(H,G),ue=Q[0],ve=Q[1];this.wrapAsync(this.lstatBase,[_e(F),ue.bigint],ve);},W.prototype.statBase=function(F,H){H===void 0&&(H=!1);var G=this.getResolvedLink(tt(F));if(!G)throw Pe(V,"stat",F);return i.default.build(G.getNode(),H)},W.prototype.statSync=function(F,H){return this.statBase(_e(F),Je(H).bigint)},W.prototype.stat=function(F,H,G){var Q=ht(H,G),ue=Q[0],ve=Q[1];this.wrapAsync(this.statBase,[_e(F),ue.bigint],ve);},W.prototype.fstatBase=function(F,H){H===void 0&&(H=!1);var G=this.getFileByFd(F);if(!G)throw Pe(fe,"fstat");return i.default.build(G.node,H)},W.prototype.fstatSync=function(F,H){return this.fstatBase(F,Je(H).bigint)},W.prototype.fstat=function(F,H,G){var Q=ht(H,G),ue=Q[0],ve=Q[1];this.wrapAsync(this.fstatBase,[F,ue.bigint],ve);},W.prototype.renameBase=function(F,H){var G=this.getLink(tt(F));if(!G)throw Pe(V,"rename",F,H);var Q=tt(H),ue=this.getLinkParent(Q);if(!ue)throw Pe(V,"rename",F,H);var ve=G.parent;ve&&ve.deleteChild(G);var ke=Q[Q.length-1];G.steps=e(e([],ue.steps,!0),[ke],!1),ue.setChild(G.getName(),G);},W.prototype.renameSync=function(F,H){var G=_e(F),Q=_e(H);this.renameBase(G,Q);},W.prototype.rename=function(F,H,G){var Q=_e(F),ue=_e(H);this.wrapAsync(this.renameBase,[Q,ue],G);},W.prototype.existsBase=function(F){return !!this.statBase(F)},W.prototype.existsSync=function(F){try{return this.existsBase(_e(F))}catch(H){return !1}},W.prototype.exists=function(F,H){var G=this,Q=_e(F);if(typeof H!="function")throw Error(z.CB);(0, s.default)(function(){try{H(G.existsBase(Q));}catch(ue){H(!1);}});},W.prototype.accessBase=function(F,H){this.getLinkOrThrow(F,"access");},W.prototype.accessSync=function(F,H){H===void 0&&(H=d);var G=_e(F);H=H|0,this.accessBase(G,H);},W.prototype.access=function(F,H,G){var Q=d,ue;typeof H!="function"?(Q=H|0,ue=ze(G)):ue=H;var ve=_e(F);this.wrapAsync(this.accessBase,[ve,Q],ue);},W.prototype.appendFileSync=function(F,H,G){G===void 0&&(G=$);var Q=X(G);(!Q.flag||Ze(F))&&(Q.flag="a"),this.writeFileSync(F,H,Q);},W.prototype.appendFile=function(F,H,G,Q){var ue=te(G,Q),ve=ue[0],ke=ue[1];(!ve.flag||Ze(F))&&(ve.flag="a"),this.writeFile(F,H,ve,ke);},W.prototype.readdirBase=function(F,H){var G=tt(F),Q=this.getResolvedLink(G);if(!Q)throw Pe(V,"readdir",F);var ue=Q.getNode();if(!ue.isDirectory())throw Pe(he,"scandir",F);if(H.withFileTypes){var ve=[];for(var ke in Q.children){var Ke=Q.getChild(ke);Ke&&ve.push(o.default.build(Ke,H.encoding));}return !b&&H.encoding!=="buffer"&&ve.sort(function(Br,go){return Br.name<go.name?-1:Br.name>go.name?1:0}),ve}var st=[];for(var $t in Q.children)st.push((0, x.strToEncoding)($t,H.encoding));return !b&&H.encoding!=="buffer"&&st.sort(),st},W.prototype.readdirSync=function(F,H){var G=nt(H),Q=_e(F);return this.readdirBase(Q,G)},W.prototype.readdir=function(F,H,G){var Q=vt(H,G),ue=Q[0],ve=Q[1],ke=_e(F);this.wrapAsync(this.readdirBase,[ke,ue],ve);},W.prototype.readlinkBase=function(F,H){var G=this.getLinkOrThrow(F,"readlink"),Q=G.getNode();if(!Q.isSymlink())throw Pe(ye,"readlink",F);var ue=_+Q.symlink.join(_);return (0, x.strToEncoding)(ue,H)},W.prototype.readlinkSync=function(F,H){var G=We(H),Q=_e(F);return this.readlinkBase(Q,G.encoding)},W.prototype.readlink=function(F,H,G){var Q=Pt(H,G),ue=Q[0],ve=Q[1],ke=_e(F);this.wrapAsync(this.readlinkBase,[ke,ue.encoding],ve);},W.prototype.fsyncBase=function(F){this.getFileByFdOrThrow(F,"fsync");},W.prototype.fsyncSync=function(F){this.fsyncBase(F);},W.prototype.fsync=function(F,H){this.wrapAsync(this.fsyncBase,[F],H);},W.prototype.fdatasyncBase=function(F){this.getFileByFdOrThrow(F,"fdatasync");},W.prototype.fdatasyncSync=function(F){this.fdatasyncBase(F);},W.prototype.fdatasync=function(F,H){this.wrapAsync(this.fdatasyncBase,[F],H);},W.prototype.ftruncateBase=function(F,H){var G=this.getFileByFdOrThrow(F,"ftruncate");G.truncate(H);},W.prototype.ftruncateSync=function(F,H){this.ftruncateBase(F,H);},W.prototype.ftruncate=function(F,H,G){var Q=typeof H=="number"?H:0,ue=ze(typeof H=="number"?G:H);this.wrapAsync(this.ftruncateBase,[F,Q],ue);},W.prototype.truncateBase=function(F,H){var G=this.openSync(F,"r+");try{this.ftruncateSync(G,H);}finally{this.closeSync(G);}},W.prototype.truncateSync=function(F,H){if(Ze(F))return this.ftruncateSync(F,H);this.truncateBase(F,H);},W.prototype.truncate=function(F,H,G){var Q=typeof H=="number"?H:0,ue=ze(typeof H=="number"?G:H);if(Ze(F))return this.ftruncate(F,Q,ue);this.wrapAsync(this.truncateBase,[F,Q],ue);},W.prototype.futimesBase=function(F,H,G){var Q=this.getFileByFdOrThrow(F,"futimes"),ue=Q.node;ue.atime=new Date(H*1e3),ue.mtime=new Date(G*1e3);},W.prototype.futimesSync=function(F,H,G){this.futimesBase(F,jr(H),jr(G));},W.prototype.futimes=function(F,H,G,Q){this.wrapAsync(this.futimesBase,[F,jr(H),jr(G)],Q);},W.prototype.utimesBase=function(F,H,G){var Q=this.openSync(F,"r+");try{this.futimesBase(Q,H,G);}finally{this.closeSync(Q);}},W.prototype.utimesSync=function(F,H,G){this.utimesBase(_e(F),jr(H),jr(G));},W.prototype.utimes=function(F,H,G,Q){this.wrapAsync(this.utimesBase,[_e(F),jr(H),jr(G)],Q);},W.prototype.mkdirBase=function(F,H){var G=tt(F);if(!G.length)throw Pe(ie,"mkdir",F);var Q=this.getLinkParentAsDirOrThrow(F,"mkdir"),ue=G[G.length-1];if(Q.getChild(ue))throw Pe(ie,"mkdir",F);Q.createChild(ue,this.createNode(!0,H));},W.prototype.mkdirpBase=function(F,H){for(var G=tt(F),Q=this.root,ue=0;ue<G.length;ue++){var ve=G[ue];if(!Q.getNode().isDirectory())throw Pe(he,"mkdir",Q.getPath());var ke=Q.getChild(ve);if(ke)if(ke.getNode().isDirectory())Q=ke;else throw Pe(he,"mkdir",ke.getPath());else Q=Q.createChild(ve,this.createNode(!0,H));}},W.prototype.mkdirSync=function(F,H){var G=qe(H),Q=It(G.mode,511),ue=_e(F);G.recursive?this.mkdirpBase(ue,Q):this.mkdirBase(ue,Q);},W.prototype.mkdir=function(F,H,G){var Q=qe(H),ue=ze(typeof H=="function"?H:G),ve=It(Q.mode,511),ke=_e(F);Q.recursive?this.wrapAsync(this.mkdirpBase,[ke,ve],ue):this.wrapAsync(this.mkdirBase,[ke,ve],ue);},W.prototype.mkdirpSync=function(F,H){this.mkdirSync(F,{mode:H,recursive:!0});},W.prototype.mkdirp=function(F,H,G){var Q=typeof H=="function"?void 0:H,ue=ze(typeof H=="function"?H:G);this.mkdir(F,{mode:Q,recursive:!0},ue);},W.prototype.mkdtempBase=function(F,H,G){G===void 0&&(G=5);var Q=F+this.genRndStr();try{return this.mkdirBase(Q,511),(0,x.strToEncoding)(Q,H)}catch(ue){if(ue.code===ie){if(G>1)return this.mkdtempBase(F,H,G-1);throw Error("Could not create temp dir.")}else throw ue}},W.prototype.mkdtempSync=function(F,H){var G=We(H).encoding;if(!F||typeof F!="string")throw new TypeError("filename prefix is required");return rt(F),this.mkdtempBase(F,G)},W.prototype.mkdtemp=function(F,H,G){var Q=Pt(H,G),ue=Q[0].encoding,ve=Q[1];if(!F||typeof F!="string")throw new TypeError("filename prefix is required");rt(F)&&this.wrapAsync(this.mkdtempBase,[F,ue],ve);},W.prototype.rmdirBase=function(F,H){var G=mt(H),Q=this.getLinkAsDirOrThrow(F,"rmdir");if(Q.length&&!G.recursive)throw Pe(ee,"rmdir",F);this.deleteLink(Q);},W.prototype.rmdirSync=function(F,H){this.rmdirBase(_e(F),H);},W.prototype.rmdir=function(F,H,G){var Q=mt(H),ue=ze(typeof H=="function"?H:G);this.wrapAsync(this.rmdirBase,[_e(F),Q],ue);},W.prototype.fchmodBase=function(F,H){var G=this.getFileByFdOrThrow(F,"fchmod");G.chmod(H);},W.prototype.fchmodSync=function(F,H){this.fchmodBase(F,It(H));},W.prototype.fchmod=function(F,H,G){this.wrapAsync(this.fchmodBase,[F,It(H)],G);},W.prototype.chmodBase=function(F,H){var G=this.openSync(F,"r+");try{this.fchmodBase(G,H);}finally{this.closeSync(G);}},W.prototype.chmodSync=function(F,H){var G=It(H),Q=_e(F);this.chmodBase(Q,G);},W.prototype.chmod=function(F,H,G){var Q=It(H),ue=_e(F);this.wrapAsync(this.chmodBase,[ue,Q],G);},W.prototype.lchmodBase=function(F,H){var G=this.openBase(F,se,0,!1);try{this.fchmodBase(G,H);}finally{this.closeSync(G);}},W.prototype.lchmodSync=function(F,H){var G=It(H),Q=_e(F);this.lchmodBase(Q,G);},W.prototype.lchmod=function(F,H,G){var Q=It(H),ue=_e(F);this.wrapAsync(this.lchmodBase,[ue,Q],G);},W.prototype.fchownBase=function(F,H,G){this.getFileByFdOrThrow(F,"fchown").chown(H,G);},W.prototype.fchownSync=function(F,H,G){qt(H),Ft(G),this.fchownBase(F,H,G);},W.prototype.fchown=function(F,H,G,Q){qt(H),Ft(G),this.wrapAsync(this.fchownBase,[F,H,G],Q);},W.prototype.chownBase=function(F,H,G){var Q=this.getResolvedLinkOrThrow(F,"chown"),ue=Q.getNode();ue.chown(H,G);},W.prototype.chownSync=function(F,H,G){qt(H),Ft(G),this.chownBase(_e(F),H,G);},W.prototype.chown=function(F,H,G,Q){qt(H),Ft(G),this.wrapAsync(this.chownBase,[_e(F),H,G],Q);},W.prototype.lchownBase=function(F,H,G){this.getLinkOrThrow(F,"lchown").getNode().chown(H,G);},W.prototype.lchownSync=function(F,H,G){qt(H),Ft(G),this.lchownBase(_e(F),H,G);},W.prototype.lchown=function(F,H,G,Q){qt(H),Ft(G),this.wrapAsync(this.lchownBase,[_e(F),H,G],Q);},W.prototype.watchFile=function(F,H,G){var Q=_e(F),ue=H,ve=G;if(typeof ue=="function"&&(ve=H,ue=null),typeof ve!="function")throw Error('"watchFile()" requires a listener function');var ke=5007,Ke=!0;ue&&typeof ue=="object"&&(typeof ue.interval=="number"&&(ke=ue.interval),typeof ue.persistent=="boolean"&&(Ke=ue.persistent));var st=this.statWatchers[Q];return st||(st=new this.StatWatcher,st.start(Q,Ke,ke),this.statWatchers[Q]=st),st.addListener("change",ve),st},W.prototype.unwatchFile=function(F,H){var G=_e(F),Q=this.statWatchers[G];Q&&(typeof H=="function"?Q.removeListener("change",H):Q.removeAllListeners("change"),Q.listenerCount("change")===0&&(Q.stop(),delete this.statWatchers[G]));},W.prototype.createReadStream=function(F,H){return new this.ReadStream(F,H)},W.prototype.createWriteStream=function(F,H){return new this.WriteStream(F,H)},W.prototype.watch=function(F,H,G){var Q=_e(F),ue=H;typeof H=="function"&&(G=H,ue=null);var ve=We(ue),ke=ve.persistent,Ke=ve.recursive,st=ve.encoding;ke===void 0&&(ke=!0),Ke===void 0&&(Ke=!1);var $t=new this.FSWatcher;return $t.start(Q,ke,Ke,st),G&&$t.addListener("change",G),$t},W.fd=2147483647,W}();jt.Volume=ui;function li(W){W.emit("stop");}var Kn=function(W){t(F,W);function F(H){var G=W.call(this)||this;return G.onInterval=function(){try{var Q=G.vol.statSync(G.filename);G.hasChanged(Q)&&(G.emit("change",Q,G.prev),G.prev=Q);}finally{G.loop();}},G.vol=H,G}return F.prototype.loop=function(){this.timeoutRef=this.setTimeout(this.onInterval,this.interval);},F.prototype.hasChanged=function(H){return H.mtimeMs>this.prev.mtimeMs||H.nlink!==this.prev.nlink},F.prototype.start=function(H,G,Q){G===void 0&&(G=!0),Q===void 0&&(Q=5007),this.filename=_e(H),this.setTimeout=G?setTimeout.bind(typeof globalThis!="undefined"?globalThis:Vpe):u.default,this.interval=Q,this.prev=this.vol.statSync(this.filename),this.loop();},F.prototype.stop=function(){clearTimeout(this.timeoutRef),c.default.nextTick(li,this);},F}(T.EventEmitter);jt.StatWatcher=Kn;var gr;function fi(W){gr=(0, a.bufferAllocUnsafe)(W),gr.used=0;}k.inherits(Sr,l.Readable),jt.ReadStream=Sr;function Sr(W,F,H){if(!(this instanceof Sr))return new Sr(W,F,H);if(this._vol=W,H=Object.assign({},St(H,{})),H.highWaterMark===void 0&&(H.highWaterMark=64*1024),l.Readable.call(this,H),this.path=_e(F),this.fd=H.fd===void 0?null:H.fd,this.flags=H.flags===void 0?"r":H.flags,this.mode=H.mode===void 0?438:H.mode,this.start=H.start,this.end=H.end,this.autoClose=H.autoClose===void 0?!0:H.autoClose,this.pos=void 0,this.bytesRead=0,this.start!==void 0){if(typeof this.start!="number")throw new TypeError('"start" option must be a Number');if(this.end===void 0)this.end=1/0;else if(typeof this.end!="number")throw new TypeError('"end" option must be a Number');if(this.start>this.end)throw new Error('"start" option must be <= "end" option');this.pos=this.start;}typeof this.fd!="number"&&this.open(),this.on("end",function(){this.autoClose&&this.destroy&&this.destroy();});}Sr.prototype.open=function(){var W=this;this._vol.open(this.path,this.flags,this.mode,function(F,H){if(F){W.autoClose&&W.destroy&&W.destroy(),W.emit("error",F);return}W.fd=H,W.emit("open",H),W.read();});},Sr.prototype._read=function(W){if(typeof this.fd!="number")return this.once("open",function(){this._read(W);});if(this.destroyed)return;(!gr||gr.length-gr.used<B)&&fi(this._readableState.highWaterMark);var F=gr,H=Math.min(gr.length-gr.used,W),G=gr.used;if(this.pos!==void 0&&(H=Math.min(this.end-this.pos+1,H)),H<=0)return this.push(null);var Q=this;this._vol.read(this.fd,gr,gr.used,H,this.pos,ue),this.pos!==void 0&&(this.pos+=H),gr.used+=H;function ue(ve,ke){if(ve)Q.autoClose&&Q.destroy&&Q.destroy(),Q.emit("error",ve);else {var Ke=null;ke>0&&(Q.bytesRead+=ke,Ke=F.slice(G,G+ke)),Q.push(Ke);}}},Sr.prototype._destroy=function(W,F){this.close(function(H){F(W||H);});},Sr.prototype.close=function(W){var F=this;if(W&&this.once("close",W),this.closed||typeof this.fd!="number"){if(typeof this.fd!="number"){this.once("open",di);return}return c.default.nextTick(function(){return F.emit("close")})}this.closed=!0,this._vol.close(this.fd,function(H){H?F.emit("error",H):F.emit("close");}),this.fd=null;};function di(W){this.close();}k.inherits(vr,l.Writable),jt.WriteStream=vr;function vr(W,F,H){if(!(this instanceof vr))return new vr(W,F,H);if(this._vol=W,H=Object.assign({},St(H,{})),l.Writable.call(this,H),this.path=_e(F),this.fd=H.fd===void 0?null:H.fd,this.flags=H.flags===void 0?"w":H.flags,this.mode=H.mode===void 0?438:H.mode,this.start=H.start,this.autoClose=H.autoClose===void 0?!0:!!H.autoClose,this.pos=void 0,this.bytesWritten=0,this.start!==void 0){if(typeof this.start!="number")throw new TypeError('"start" option must be a Number');if(this.start<0)throw new Error('"start" must be >= zero');this.pos=this.start;}H.encoding&&this.setDefaultEncoding(H.encoding),typeof this.fd!="number"&&this.open(),this.once("finish",function(){this.autoClose&&this.close();});}vr.prototype.open=function(){this._vol.open(this.path,this.flags,this.mode,function(W,F){if(W){this.autoClose&&this.destroy&&this.destroy(),this.emit("error",W);return}this.fd=F,this.emit("open",F);}.bind(this));},vr.prototype._write=function(W,F,H){if(!(W instanceof a.Buffer))return this.emit("error",new Error("Invalid data"));if(typeof this.fd!="number")return this.once("open",function(){this._write(W,F,H);});var G=this;this._vol.write(this.fd,W,0,W.length,this.pos,function(Q,ue){if(Q)return G.autoClose&&G.destroy&&G.destroy(),H(Q);G.bytesWritten+=ue,H();}),this.pos!==void 0&&(this.pos+=W.length);},vr.prototype._writev=function(W,F){if(typeof this.fd!="number")return this.once("open",function(){this._writev(W,F);});for(var H=this,G=W.length,Q=new Array(G),ue=0,ve=0;ve<G;ve++){var ke=W[ve].chunk;Q[ve]=ke,ue+=ke.length;}var Ke=a.Buffer.concat(Q);this._vol.write(this.fd,Ke,0,Ke.length,this.pos,function(st,$t){if(st)return H.destroy&&H.destroy(),F(st);H.bytesWritten+=$t,F();}),this.pos!==void 0&&(this.pos+=ue);},vr.prototype._destroy=Sr.prototype._destroy,vr.prototype.close=Sr.prototype.close,vr.prototype.destroySoon=vr.prototype.end;var Wn=function(W){t(F,W);function F(H){var G=W.call(this)||this;return G._filename="",G._filenameEncoded="",G._recursive=!1,G._encoding=x.ENCODING_UTF8,G._onNodeChange=function(){G._emit("change");},G._onParentChild=function(Q){Q.getName()===G._getName()&&G._emit("rename");},G._emit=function(Q){G.emit("change",Q,G._filenameEncoded);},G._persist=function(){G._timer=setTimeout(G._persist,1e6);},G._vol=H,G}return F.prototype._getName=function(){return this._steps[this._steps.length-1]},F.prototype.start=function(H,G,Q,ue){G===void 0&&(G=!0),Q===void 0&&(Q=!1),ue===void 0&&(ue=x.ENCODING_UTF8),this._filename=_e(H),this._steps=tt(this._filename),this._filenameEncoded=(0, x.strToEncoding)(this._filename),this._recursive=Q,this._encoding=ue;try{this._link=this._vol.getLinkOrThrow(this._filename,"FSWatcher");}catch(Ke){var ve=new Error("watch "+this._filename+" "+Ke.code);throw ve.code=Ke.code,ve.errno=Ke.code,ve}this._link.getNode().on("change",this._onNodeChange),this._link.on("child:add",this._onNodeChange),this._link.on("child:delete",this._onNodeChange);var ke=this._link.parent;ke&&(ke.setMaxListeners(ke.getMaxListeners()+1),ke.on("child:delete",this._onParentChild)),G&&this._persist();},F.prototype.close=function(){clearTimeout(this._timer),this._link.getNode().removeListener("change",this._onNodeChange);var H=this._link.parent;H&&H.removeListener("child:delete",this._onParentChild);},F}(T.EventEmitter);return jt.FSWatcher=Wn,jt}var Ms={},MF=!1;function Gpe(){if(MF)return Ms;MF=!0,Object.defineProperty(Ms,"__esModule",{value:!0}),Ms.fsAsyncMethods=Ms.fsSyncMethods=Ms.fsProps=void 0;var t=["constants","F_OK","R_OK","W_OK","X_OK","Stats"];Ms.fsProps=t;var e=["renameSync","ftruncateSync","truncateSync","chownSync","fchownSync","lchownSync","chmodSync","fchmodSync","lchmodSync","statSync","lstatSync","fstatSync","linkSync","symlinkSync","readlinkSync","realpathSync","unlinkSync","rmdirSync","mkdirSync","mkdirpSync","readdirSync","closeSync","openSync","utimesSync","futimesSync","fsyncSync","writeSync","readSync","readFileSync","writeFileSync","appendFileSync","existsSync","accessSync","fdatasyncSync","mkdtempSync","copyFileSync","createReadStream","createWriteStream"];Ms.fsSyncMethods=e;var r=["rename","ftruncate","truncate","chown","fchown","lchown","chmod","fchmod","lchmod","stat","lstat","fstat","link","symlink","readlink","realpath","unlink","rmdir","mkdir","mkdirp","readdir","close","open","utimes","futimes","fsync","write","read","readFile","writeFile","appendFile","exists","access","fdatasync","mkdtemp","copyFile","watchFile","unwatchFile","watch"];return Ms.fsAsyncMethods=r,Ms}var yn={},OF=!1;function Kpe(){if(OF)return yn;OF=!0;var t=yn&&yn.__assign||function(){return t=Object.assign||function(x){for(var I,k=1,q=arguments.length;k<q;k++){I=arguments[k];for(var j in I)Object.prototype.hasOwnProperty.call(I,j)&&(x[j]=I[j]);}return x},t.apply(this,arguments)};Object.defineProperty(yn,"__esModule",{value:!0}),yn.fs=yn.createFsFromVolume=yn.vol=yn.Volume=void 0;var e=FR(),r=PF(),n=DF(),i=Gpe(),o=i.fsSyncMethods,a=i.fsAsyncMethods,s=_0(),c=s.constants.F_OK,u=s.constants.R_OK,l=s.constants.W_OK,w=s.constants.X_OK;yn.Volume=n.Volume,yn.vol=new n.Volume;function T(x){for(var I={F_OK:c,R_OK:u,W_OK:l,X_OK:w,constants:s.constants,Stats:e.default,Dirent:r.default},k=0,q=o;k<q.length;k++){var j=q[k];typeof x[j]=="function"&&(I[j]=x[j].bind(x));}for(var K=0,Z=a;K<Z.length;K++){var j=Z[K];typeof x[j]=="function"&&(I[j]=x[j].bind(x));}return I.StatWatcher=x.StatWatcher,I.FSWatcher=x.FSWatcher,I.WriteStream=x.WriteStream,I.ReadStream=x.ReadStream,I.promises=x.promises,I._toUnixTimestamp=n.toUnixTimestamp,I}return yn.createFsFromVolume=T,yn.fs=T(yn.vol),yn=t(t({},yn),yn.fs),yn.semantic=!0,yn}var Gl=Kpe();Gl.__esModule;Gl.fs;Gl.createFsFromVolume;Gl.vol;Gl.Volume;Gl.semantic;var Gn=DF();Gn.__esModule;Gn.FSWatcher;Gn.StatWatcher;Gn.Volume;Gn.toUnixTimestamp;Gn.bufferToEncoding;Gn.dataToBuffer;Gn.dataToStr;Gn.pathToSteps;Gn.filenameToSteps;Gn.pathToFilename;Gn.flagsToNumber;Gn.FLAGS;Gn.ReadStream;Gn.WriteStream;var{vol:Os,createFsFromVolume:Wpe}=Gl;function Ii(t){throw new Error(`Node.js fs ${t} is not supported by JSPM core in the browser`)}Os.fromNestedJSON({"/dev":{stdin:"",stdout:"",stderr:""},"/usr/bin":{},"/home":{},"/tmp":{}});Os.releasedFds=[2,1,0];Os.openSync("/dev/stdin","w");Os.openSync("/dev/stdout","r");Os.openSync("/dev/stderr","r");LF("/dev/stdout",1,console.log);LF("/dev/stderr",2,console.error);function LF(t,e,r){let n=0,i=new TextDecoder;Os.watch(t,"utf8",()=>{let{size:o}=Os.fstatSync(e),a=qR.alloc(o-n);Os.readSync(e,a,0,a.length,n),n=o,r(i.decode(a,{stream:!0}));});}var _r=Wpe(Os);_r.opendir=()=>Ii("opendir");_r.opendirSync=()=>Ii("opendirSync");_r.promises.opendir=()=>Ii("promises.opendir");_r.cp=()=>Ii("cp");_r.cpSync=()=>Ii("cpSync");_r.promises.cp=()=>Ii("promises.cp");_r.readv=()=>Ii("readv");_r.readvSync=()=>Ii("readvSync");_r.rm=()=>Ii("rm");_r.rmSync=()=>Ii("rmSync");_r.promises.rm=()=>Ii("promises.rm");_r.Dir=()=>Ii("Dir");_r.promises.watch=()=>Ii("promises.watch");_r.FileReadStream=_r.ReadStream;_r.FileWriteStream=_r.WriteStream;function HR(t,e){if(t.protocol==="file:")return Hv(t);if(t.protocol==="https:"||t.protocol==="http:"){let r="\\\\url\\"+t.href.replaceAll(/\//g,"\\\\");if(Xpe(r))return r;if(e)throw new Error(`Cannot sync request URL ${t} via FS. JSPM FS support for network URLs requires using async FS methods or priming the MemFS cache first with an async request before a sync request.`);return re(this,null,function*(){let n=yield fetch(t);if(!n.ok)throw new Error(`Unable to fetch ${t.href}, ${n.status}`);let i=yield n.arrayBuffer();return Qpe(r,qR.from(i)),r})}throw new Error("URL "+t+" not supported in JSPM FS implementation.")}function Ype(t){return function(e,...r){return e instanceof URL?t(HR(e,!0),...r):t(e,...r)}}function Zpe(t){return function(e,...r){return re(this,null,function*(){return e instanceof URL?t(yield HR(e),...r):t(e,...r)})}}function Jpe(t){return function(e,...r){let n=r[r.length-1];e instanceof URL&&typeof n=="function"?HR(e).then(i=>{t(i,...r);},n):t(e,...r);}}_r.promises.readFile=Zpe(_r.promises.readFile);_r.readFile=Jpe(_r.readFile);_r.readFileSync=Ype(_r.readFileSync);var{appendFile:zgt,appendFileSync:Hgt,access:jgt,accessSync:qF,chown:$gt,chownSync:Vgt,chmod:Ggt,chmodSync:Kgt,close:Wgt,closeSync:Ygt,copyFile:Zgt,copyFileSync:Jgt,cp:Xgt,cpSync:Qgt,createReadStream:evt,createWriteStream:tvt,exists:rvt,existsSync:Xpe,fchown:nvt,fchownSync:ivt,fchmod:ovt,fchmodSync:avt,fdatasync:svt,fdatasyncSync:cvt,fstat:uvt,fstatSync:lvt,fsync:fvt,fsyncSync:dvt,ftruncate:hvt,ftruncateSync:pvt,futimes:mvt,futimesSync:yvt,lchown:gvt,lchownSync:vvt,lchmod:bvt,lchmodSync:wvt,link:Evt,linkSync:_vt,lstat:Svt,lstatSync:Cvt,mkdir:Avt,mkdirSync:Tvt,mkdtemp:Rvt,mkdtempSync:xvt,open:Ivt,openSync:Mvt,opendir:Ovt,opendirSync:Nvt,readdir:kvt,readdirSync:Pvt,read:Bvt,readSync:Uvt,readv:Dvt,readvSync:Lvt,readFile:qvt,readFileSync:FF,readlink:Fvt,readlinkSync:zvt,realpath:Hvt,realpathSync:jvt,rename:$vt,renameSync:Vvt,rm:Gvt,rmSync:Kvt,rmdir:Wvt,rmdirSync:Yvt,stat:Zvt,statSync:zF,symlink:Jvt,symlinkSync:Xvt,truncate:Qvt,truncateSync:ebt,unwatchFile:tbt,unlink:rbt,unlinkSync:nbt,utimes:ibt,utimesSync:obt,watch:abt,watchFile:sbt,writeFile:cbt,writeFileSync:Qpe,write:ubt,writeSync:lbt,writev:fbt,writevSync:dbt,Dir:hbt,Dirent:pbt,Stats:mbt,ReadStream:ybt,WriteStream:gbt,FileReadStream:vbt,FileWriteStream:bbt,_toUnixTimestamp:wbt,constants:{F_OK:Ebt,R_OK:_bt,W_OK:Sbt,X_OK:Cbt},constants:jR,promises:Abt}=_r;var eme="2019-11-01",HF="http://127.0.0.1:40342/metadata/identity/oauth2/token",jF="N/A: himds executable exists",$F={win32:`${N.env.ProgramData}\\AzureConnectedMachineAgent\\Tokens\\`,linux:"/var/opt/azcmagent/tokens/"},tme={win32:`${N.env.ProgramFiles}\\AzureConnectedMachineAgent\\himds.exe`,linux:"/opt/azcmagent/bin/himds"},S0=class t extends xi{constructor(e,r,n,i,o){super(e,r,n,i),this.identityEndpoint=o;}static getEnvironmentVariables(){let e=N.env[xt.IDENTITY_ENDPOINT],r=N.env[xt.IMDS_ENDPOINT];if(!e||!r){let n=tme[N.platform];try{qF(n,jR.F_OK|jR.R_OK),e=HF,r=jF;}catch(i){}}return [e,r]}static tryCreate(e,r,n,i,o){let[a,s]=t.getEnvironmentVariables();if(!a||!s)return e.info(`[Managed Identity] ${Ut.AZURE_ARC} managed identity is unavailable through environment variables because one or both of '${xt.IDENTITY_ENDPOINT}' and '${xt.IMDS_ENDPOINT}' are not defined. ${Ut.AZURE_ARC} managed identity is also unavailable through file detection.`),null;if(s===jF)e.info(`[Managed Identity] ${Ut.AZURE_ARC} managed identity is available through file detection. Defaulting to known ${Ut.AZURE_ARC} endpoint: ${HF}. Creating ${Ut.AZURE_ARC} managed identity.`);else {let c=t.getValidatedEnvVariableUrlString(xt.IDENTITY_ENDPOINT,a,Ut.AZURE_ARC,e);c.endsWith("/")&&c.slice(0,-1),t.getValidatedEnvVariableUrlString(xt.IMDS_ENDPOINT,s,Ut.AZURE_ARC,e),e.info(`[Managed Identity] Environment variables validation passed for ${Ut.AZURE_ARC} managed identity. Endpoint URI: ${c}. Creating ${Ut.AZURE_ARC} managed identity.`);}if(o.idType!==Jr.SYSTEM_ASSIGNED)throw Hr(D1);return new t(e,r,n,i,a)}createRequest(e){let r=new mo(Rr.GET,this.identityEndpoint.replace("localhost","127.0.0.1"));return r.headers[Zd]="true",r.queryParameters[Oc]=eme,r.queryParameters[Na]=e,r}getServerTokenResponseAsync(e,r,n,i){return re(this,null,function*(){let o;if(e.status===fr.UNAUTHORIZED){let a=e.headers["www-authenticate"];if(!a)throw Hr(F1);if(!a.includes("Basic realm="))throw Hr(z1);let s=a.split("Basic realm=")[1];if(!$F.hasOwnProperty(N.platform))throw Hr(U1);let c=$F[N.platform],u=br.basename(s);if(!u.endsWith(".key"))throw Hr(k1);if(c+u!==s)throw Hr(P1);let l;try{l=yield zF(s).size;}catch(x){throw Hr(d0)}if(l>_q)throw Hr(B1);let w;try{w=FF(s,"utf-8");}catch(x){throw Hr(d0)}let T=`Basic ${w}`;this.logger.info("[Managed Identity] Adding authorization header to the request."),n.headers[mq]=T;try{o=yield r.sendGetRequestAsync(n.computeUri(),i);}catch(x){throw x instanceof Yt?x:Ae(Kr.networkError)}}return this.getServerTokenResponse(o||e)})}};v();m();y();g();var C0=class t extends xi{constructor(e,r,n,i,o){super(e,r,n,i),this.msiEndpoint=o;}static getEnvironmentVariables(){return [N.env[xt.MSI_ENDPOINT]]}static tryCreate(e,r,n,i,o){let[a]=t.getEnvironmentVariables();if(!a)return e.info(`[Managed Identity] ${Ut.CLOUD_SHELL} managed identity is unavailable because the '${xt.MSI_ENDPOINT} environment variable is not defined.`),null;let s=t.getValidatedEnvVariableUrlString(xt.MSI_ENDPOINT,a,Ut.CLOUD_SHELL,e);if(e.info(`[Managed Identity] Environment variable validation passed for ${Ut.CLOUD_SHELL} managed identity. Endpoint URI: ${s}. Creating ${Ut.CLOUD_SHELL} managed identity.`),o.idType!==Jr.SYSTEM_ASSIGNED)throw Hr(L1);return new t(e,r,n,i,a)}createRequest(e){let r=new mo(Rr.POST,this.msiEndpoint);return r.headers[Zd]="true",r.bodyParameters[Na]=e,r}};v();m();y();g();var VF="/metadata/identity/oauth2/token",rme=`http://169.254.169.254${VF}`,nme="2018-02-01",rw=class t extends xi{constructor(e,r,n,i,o){super(e,r,n,i),this.identityEndpoint=o;}static tryCreate(e,r,n,i){let o;return N.env[xt.AZURE_POD_IDENTITY_AUTHORITY_HOST]?(e.info(`[Managed Identity] Environment variable ${xt.AZURE_POD_IDENTITY_AUTHORITY_HOST} for ${Ut.IMDS} returned endpoint: ${N.env[xt.AZURE_POD_IDENTITY_AUTHORITY_HOST]}`),o=t.getValidatedEnvVariableUrlString(xt.AZURE_POD_IDENTITY_AUTHORITY_HOST,`${N.env[xt.AZURE_POD_IDENTITY_AUTHORITY_HOST]}${VF}`,Ut.IMDS,e)):(e.info(`[Managed Identity] Unable to find ${xt.AZURE_POD_IDENTITY_AUTHORITY_HOST} environment variable for ${Ut.IMDS}, using the default endpoint.`),o=rme),new t(e,r,n,i,o)}createRequest(e,r){let n=new mo(Rr.GET,this.identityEndpoint);return n.headers[Zd]="true",n.queryParameters[Oc]=nme,n.queryParameters[Na]=e,r.idType!==Jr.SYSTEM_ASSIGNED&&(n.queryParameters[this.getManagedIdentityUserAssignedIdQueryParameterKey(r.idType)]=r.id),n}};v();m();y();g();var ime="2019-07-01-preview",A0=class t extends xi{constructor(e,r,n,i,o,a){super(e,r,n,i),this.identityEndpoint=o,this.identityHeader=a;}static getEnvironmentVariables(){let e=N.env[xt.IDENTITY_ENDPOINT],r=N.env[xt.IDENTITY_HEADER],n=N.env[xt.IDENTITY_SERVER_THUMBPRINT];return [e,r,n]}static tryCreate(e,r,n,i,o){let[a,s,c]=t.getEnvironmentVariables();if(!a||!s||!c)return e.info(`[Managed Identity] ${Ut.SERVICE_FABRIC} managed identity is unavailable because one or all of the '${xt.IDENTITY_HEADER}', '${xt.IDENTITY_ENDPOINT}' or '${xt.IDENTITY_SERVER_THUMBPRINT}' environment variables are not defined.`),null;let u=t.getValidatedEnvVariableUrlString(xt.IDENTITY_ENDPOINT,a,Ut.SERVICE_FABRIC,e);return e.info(`[Managed Identity] Environment variables validation passed for ${Ut.SERVICE_FABRIC} managed identity. Endpoint URI: ${u}. Creating ${Ut.SERVICE_FABRIC} managed identity.`),o.idType!==Jr.SYSTEM_ASSIGNED&&e.warning(`[Managed Identity] ${Ut.SERVICE_FABRIC} user assigned managed identity is configured in the cluster, not during runtime. See also: https://learn.microsoft.com/en-us/azure/service-fabric/configure-existing-cluster-enable-managed-identity-token-service.`),new t(e,r,n,i,a,s)}createRequest(e,r){let n=new mo(Rr.GET,this.identityEndpoint);return n.headers[gq]=this.identityHeader,n.queryParameters[Oc]=ime,n.queryParameters[Na]=e,r.idType!==Jr.SYSTEM_ASSIGNED&&(n.queryParameters[this.getManagedIdentityUserAssignedIdQueryParameterKey(r.idType)]=r.id),n}};var T0=class t{constructor(e,r,n,i){this.logger=e,this.nodeStorage=r,this.networkClient=n,this.cryptoProvider=i;}sendManagedIdentityTokenRequest(e,r,n,i){return re(this,null,function*(){return t.identitySource||(t.identitySource=this.selectManagedIdentitySource(this.logger,this.nodeStorage,this.networkClient,this.cryptoProvider,r)),t.identitySource.acquireTokenWithManagedIdentity(e,r,n,i)})}allEnvironmentVariablesAreDefined(e){return Object.values(e).every(r=>r!==void 0)}getManagedIdentitySource(){return t.sourceName=this.allEnvironmentVariablesAreDefined(A0.getEnvironmentVariables())?Ut.SERVICE_FABRIC:this.allEnvironmentVariablesAreDefined(g0.getEnvironmentVariables())?Ut.APP_SERVICE:this.allEnvironmentVariablesAreDefined(C0.getEnvironmentVariables())?Ut.CLOUD_SHELL:this.allEnvironmentVariablesAreDefined(S0.getEnvironmentVariables())?Ut.AZURE_ARC:Ut.DEFAULT_TO_IMDS,t.sourceName}selectManagedIdentitySource(e,r,n,i,o){let a=A0.tryCreate(e,r,n,i,o)||g0.tryCreate(e,r,n,i)||C0.tryCreate(e,r,n,i,o)||S0.tryCreate(e,r,n,i,o)||rw.tryCreate(e,r,n,i);if(!a)throw Hr(q1);return a}};var R0=class t{constructor(e){this.config=Nq(e||{}),this.logger=new Ko(this.config.system.loggerOptions,W1,ql);let r={canonicalAuthority:be.DEFAULT_AUTHORITY};t.nodeStorage||(t.nodeStorage=new Ll(this.logger,this.config.managedIdentityId.id,Vd,r)),this.networkClient=this.config.system.networkClient,this.cryptoProvider=new Dl;let n={protocolMode:ho.AAD,knownAuthorities:[lR],cloudDiscoveryMetadata:"",authorityMetadata:""};this.fakeAuthority=new Go(lR,this.networkClient,t.nodeStorage,n,this.logger,this.cryptoProvider.createNewGuid(),void 0,!0),this.fakeClientCredentialClient=new Fl({authOptions:{clientId:this.config.managedIdentityId.id,authority:this.fakeAuthority}}),this.managedIdentityClient=new T0(this.logger,t.nodeStorage,this.networkClient,this.cryptoProvider);}acquireToken(e){return re(this,null,function*(){if(!e.resource)throw Jt(u1.urlEmptyError);let r={forceRefresh:e.forceRefresh,resource:e.resource.replace("/.default",""),scopes:[e.resource.replace("/.default","")],authority:this.fakeAuthority.canonicalAuthority,correlationId:this.cryptoProvider.createNewGuid()};if(r.forceRefresh)return this.managedIdentityClient.sendManagedIdentityTokenRequest(r,this.config.managedIdentityId,this.fakeAuthority);let[n,i]=yield this.fakeClientCredentialClient.getCachedAuthenticationResult(r,this.config,this.cryptoProvider,this.fakeAuthority,t.nodeStorage);return n?(i===yr.PROACTIVELY_REFRESHED&&(this.logger.info("ClientCredentialClient:getCachedAuthenticationResult - Cached access token's refreshOn property has been exceeded'. It's not expired, but must be refreshed."),yield this.managedIdentityClient.sendManagedIdentityTokenRequest(r,this.config.managedIdentityId,this.fakeAuthority,!0)),n):this.managedIdentityClient.sendManagedIdentityTokenRequest(r,this.config.managedIdentityId,this.fakeAuthority)})}getManagedIdentitySource(){return T0.sourceName||this.managedIdentityClient.getManagedIdentitySource()}};v();m();y();g();v();m();y();g();var nw=class nw extends ao{constructor(e,r,n,i){let o=typeof e=="string"?e:typeof r=="string"?r:void 0;if(super(o,void 0,i),typeof e!="string")this.clientApplication=e;else {let a={authority:n,clientId:o};a.clientCertificate=typeof r!="string"?r:void 0,a.clientSecret=typeof r=="string"?r:"",this.clientApplication=new Is({auth:a});}}refreshToken(){return re(this,null,function*(){if(!this.clientApplication)throw new Error("getToken should not be called for empty credentials.");let e="/.default",r=this.oAuthScope;r.endsWith(e)||(r=`${r}${e}`);let n=yield this.clientApplication.acquireTokenByClientCredential({scopes:[r],skipCache:!0}),{accessToken:i}=n!=null?n:{};if(typeof i!="string")throw new Error("Authentication: No access token received from MSAL.");return {accessToken:n.accessToken,expiresOn:n.expiresOn}})}};nw.Empty=new nw;var si=nw;var iw=class extends ao{constructor(e,r,n,i,o,a){super(e,i,o),this.certificateThumbprint=r,this.certificatePrivateKey=n,this.x5c=a;}getToken(e=!1){return re(this,null,function*(){return (this.credentials)!=null||(this.credentials=new si(this.createClientApplication(),this.appId,this.oAuthEndpoint,this.oAuthScope)),this.credentials.getToken(e)})}refreshToken(){throw new Error("Method not implemented.")}createClientApplication(){return new Is({auth:{clientId:this.appId,authority:this.oAuthEndpoint,clientCertificate:{thumbprint:this.certificateThumbprint,privateKey:this.certificatePrivateKey,x5c:this.x5c}}})}};v();m();y();g();v();m();y();g();var Lc=class{};eo();Ni();var XF=on(ZF());var cme=uf(XF.default),JF=class extends Lc{constructor(e,r,n,i,o){super(),Qt(e==null?void 0:e.trim(),"CertificateServiceClientCredentialsFactory.constructor(): missing appId."),Qt(n==null?void 0:n.trim(),"CertificateServiceClientCredentialsFactory.constructor(): missing certificatePrivateKey."),r!=null&&r.includes("-----BEGIN CERTIFICATE-----")?this.x5c=r:(Qt(r==null?void 0:r.trim(),"CertificateServiceClientCredentialsFactory.constructor(): missing certificateThumbprint or x5c value."),this.certificateThumbprint=r,this.x5c=o),this.appId=e,this.certificatePrivateKey=n,this.tenantId=i;}isValidAppId(e){return re(this,null,function*(){return e===this.appId})}getThumbprint(e){return re(this,null,function*(){let r=yield cme("x509",D.Buffer.from(e),{fingerprint:!0,noout:!0});return D.Buffer.from(r).toString().replace(/^.*Fingerprint=/,"").replace(/:/g,"").trim()})}isAuthenticationDisabled(){return re(this,null,function*(){})}createCredentials(e,r){return re(this,null,function*(){var n;return Qt(yield this.isValidAppId(e),"CertificateServiceClientCredentialsFactory.createCredentials(): Invalid Managed ID."),new iw(this.appId,(n=this.certificateThumbprint)!=null?n:yield this.getThumbprint(this.x5c),this.certificatePrivateKey,this.tenantId,r,this.x5c)})}};v();m();y();g();eo();var ow=class extends ao{constructor(e,r,n,i,o){super(e,n,i),Qt(e==null?void 0:e.trim(),"FederatedAppCredentials.constructor(): missing appId."),this.clientAudience=o!=null?o:"api://AzureADTokenExchange",this.managedIdentityClientAssertion=new R0({managedIdentityIdParams:{userAssignedClientId:r}});}getToken(e=!1){return re(this,null,function*(){return (this.credentials)!=null||(this.credentials=new si(this.createClientApplication(yield this.fetchExternalToken(e)),this.oAuthEndpoint,this.oAuthEndpoint,this.oAuthScope)),this.credentials.getToken(e)})}refreshToken(){throw new Error("Method not implemented.")}createClientApplication(e){return new Is({auth:{clientId:this.appId,authority:this.oAuthEndpoint,clientAssertion:e}})}fetchExternalToken(e=!1){return re(this,null,function*(){return (yield this.managedIdentityClientAssertion.acquireToken({resource:this.clientAudience,forceRefresh:e})).accessToken})}};v();m();y();g();eo();var QF=class extends Lc{constructor(r,n,i,o){super();this.appId=r;this.clientId=n;this.tenantId=i;this.clientAudience=o;Qt(r==null?void 0:r.trim(),"FederatedServiceClientCredentialsFactory.constructor(): missing appId."),Qt(n==null?void 0:n.trim(),"FederatedServiceClientCredentialsFactory.constructor(): missing clientId.");}isValidAppId(r=""){return re(this,null,function*(){return r===this.appId})}isAuthenticationDisabled(){return re(this,null,function*(){})}createCredentials(r,n){return re(this,null,function*(){return Qt(yield this.isValidAppId(r),"FederatedServiceClientCredentialsFactory.createCredentials(): Invalid App ID."),new ow(this.appId,this.clientId,this.tenantId,n,this.clientAudience)})}};v();m();y();g();v();m();y();g();v();m();y();g();v();m();y();g();v();m();y();g();v();m();y();g();function Kl(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return {next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function ume(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value);}catch(s){a={error:s};}finally{try{i&&!i.done&&(r=n.return)&&r.call(n);}finally{if(a)throw a.error}}return o}function Wl(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(ume(arguments[e]));return t}v();m();y();g();v();m();y();g();var lme=console.debug||console.log;function ez(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];lme.apply(void 0,Wl(t));}var tz=typeof N!="undefined"&&N.env&&N.env.DEBUG||void 0,rz,$R=[],VR=[],aw=[];tz&&GR(tz);function GR(t){var e,r,n,i;rz=t,$R=[],VR=[];var o=/\*/g,a=t.split(",").map(function(x){return x.trim().replace(o,".*?")});try{for(var s=Kl(a),c=s.next();!c.done;c=s.next()){var u=c.value;u.startsWith("-")?VR.push(new RegExp("^"+u.substr(1)+"$")):$R.push(new RegExp("^"+u+"$"));}}catch(x){e={error:x};}finally{try{c&&!c.done&&(r=s.return)&&r.call(s);}finally{if(e)throw e.error}}try{for(var l=Kl(aw),w=l.next();!w.done;w=l.next()){var T=w.value;T.enabled=KR(T.namespace);}}catch(x){n={error:x};}finally{try{w&&!w.done&&(i=l.return)&&i.call(l);}finally{if(n)throw n.error}}}function KR(t){var e,r,n,i;if(t.endsWith("*"))return !0;try{for(var o=Kl(VR),a=o.next();!a.done;a=o.next()){var s=a.value;if(s.test(t))return !1}}catch(w){e={error:w};}finally{try{a&&!a.done&&(r=o.return)&&r.call(o);}finally{if(e)throw e.error}}try{for(var c=Kl($R),u=c.next();!u.done;u=c.next()){var l=u.value;if(l.test(t))return !0}}catch(w){n={error:w};}finally{try{u&&!u.done&&(i=c.return)&&i.call(c);}finally{if(n)throw n.error}}return !1}function fme(){var t=rz||"";return GR(""),t}function nz(t){function e(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];r.enabled&&(n.length>0&&(n[0]=t+" "+n[0]),r.log.apply(r,Wl(n)));}var r=Object.assign(e,{enabled:KR(t),destroy:dme,log:iz.log,namespace:t,extend:hme});return aw.push(r),r}function dme(){var t=aw.indexOf(this);return t>=0?(aw.splice(t,1),!0):!1}function hme(t){var e=nz(this.namespace+":"+t);return e.log=this.log,e}var iz=Object.assign(function(t){return nz(t)},{enable:GR,enabled:KR,disable:fme,log:ez}),Yl=iz;var az=new Set,sw=typeof N!="undefined"&&N.env&&N.env.AZURE_LOG_LEVEL||void 0,WR,YR=Yl("azure");YR.log=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];Yl.log.apply(Yl,Wl(t));};var ZR=["verbose","info","warning","error"];sw&&(lz(sw)?pme(sw):console.error("AZURE_LOG_LEVEL set to unknown log level '"+sw+"'; logging is not enabled. Acceptable values: "+ZR.join(", ")+"."));function pme(t){var e,r;if(t&&!lz(t))throw new Error("Unknown log level '"+t+"'. Acceptable values: "+ZR.join(","));WR=t;var n=[];try{for(var i=Kl(az),o=i.next();!o.done;o=i.next()){var a=o.value;uz(a)&&n.push(a.namespace);}}catch(s){e={error:s};}finally{try{o&&!o.done&&(r=i.return)&&r.call(i);}finally{if(e)throw e.error}}Yl.enable(n.join(","));}var oz={verbose:400,info:300,warning:200,error:100};function sz(t){var e=YR.extend(t);return cz(YR,e),{error:cw(e,"error"),warning:cw(e,"warning"),info:cw(e,"info"),verbose:cw(e,"verbose")}}function cz(t,e){e.log=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];t.log.apply(t,Wl(r));};}function cw(t,e){var r=Object.assign(t.extend(e),{level:e});if(cz(t,r),uz(r)){var n=Yl.disable();Yl.enable(n+","+r.namespace);}return az.add(r),r}function uz(t){return !!(WR&&oz[t.level]<=oz[WR])}function lz(t){return ZR.includes(t)}var dz=sz("identity");function hz(t){return `SUCCESS. Scopes: ${Array.isArray(t)?t.join(", "):t}.`}function oh(t,e){let r="ERROR.";return t!=null&&t.length&&(r+=` Scopes: ${Array.isArray(t)?t.join(", "):t}.`),`${r} Error message: ${typeof e=="string"?e:e.message}.`}function fz(t,e,r=dz){let n=e?`${e.fullTitle} ${t}`:t;function i(c){r.info(`${n} =>`,c);}function o(c){r.warning(`${n} =>`,c);}function a(c){r.verbose(`${n} =>`,c);}function s(c){r.error(`${n} =>`,c);}return {title:t,fullTitle:n,info:i,warning:o,verbose:a,error:s}}function uw(t,e=dz){let r=fz(t,void 0,e);return Object.assign(Object.assign({},r),{parent:e,getToken:fz("=> getToken()",r,e)})}v();m();y();g();v();m();y();g();var mme="CredentialUnavailableError",lw=class extends Error{constructor(e){super(e),this.name=mme;}};var yme="AggregateAuthenticationError",fw=class extends Error{constructor(e,r){let n=e.join(`
`);super(`${r}
${n}`),this.errors=e,this.name=yme;}};v();m();y();g();v();m();y();g();var pz="4.4.1";var JR;(function(t){t.AzureChina="https://login.chinacloudapi.cn",t.AzureGermany="https://login.microsoftonline.de",t.AzureGovernment="https://login.microsoftonline.us",t.AzurePublicCloud="https://login.microsoftonline.com";})(JR||(JR={}));JR.AzurePublicCloud;v();m();y();g();v();m();y();g();v();m();y();g();var ah={span:Symbol.for("@azure/core-tracing span"),namespace:Symbol.for("@azure/core-tracing namespace")};function mz(t={}){let e=new XR(t.parentContext);return t.span&&(e=e.setValue(ah.span,t.span)),t.namespace&&(e=e.setValue(ah.namespace,t.namespace)),e}var XR=class t{constructor(e){this._contextMap=e instanceof t?new Map(e._contextMap):new Map;}setValue(e,r){let n=new t(this);return n._contextMap.set(e,r),n}getValue(e){return this._contextMap.get(e)}deleteValue(e){let r=new t(this);return r._contextMap.delete(e),r}};v();m();y();g();var dw={instrumenterImplementation:void 0};function gme(){return {end:()=>{},isRecording:()=>!1,recordException:()=>{},setAttribute:()=>{},setStatus:()=>{}}}function vme(){return {createRequestHeaders:()=>({}),parseTraceparentHeader:()=>{},startSpan:(t,e)=>({span:gme(),tracingContext:mz({parentContext:e.tracingContext})}),withContext(t,e,...r){return e(...r)}}}function I0(){return dw.instrumenterImplementation||(dw.instrumenterImplementation=vme()),dw.instrumenterImplementation}v();m();y();g();function QR(t){let{namespace:e,packageName:r,packageVersion:n}=t;function i(u,l,w){var T;let x=I0().startSpan(u,Object.assign(Object.assign({},w),{packageName:r,packageVersion:n,tracingContext:(T=l==null?void 0:l.tracingOptions)===null||T===void 0?void 0:T.tracingContext})),I=x.tracingContext,k=x.span;I.getValue(ah.namespace)||(I=I.setValue(ah.namespace,e)),k.setAttribute("az.namespace",I.getValue(ah.namespace));let q=Object.assign({},l,{tracingOptions:Object.assign(Object.assign({},l==null?void 0:l.tracingOptions),{tracingContext:I})});return {span:k,updatedOptions:q}}function o(u,l,w,T){return re(this,null,function*(){let{span:x,updatedOptions:I}=i(u,l,T);try{let k=yield a(I.tracingOptions.tracingContext,()=>Promise.resolve(w(I,x)));return x.setStatus({status:"success"}),k}catch(k){throw x.setStatus({status:"error",error:k}),k}finally{x.end();}})}function a(u,l,...w){return I0().withContext(u,l,...w)}function s(u){return I0().parseTraceparentHeader(u)}function c(u){return I0().createRequestHeaders(u)}return {startSpan:i,withSpan:o,withContext:a,parseTraceparentHeader:s,createRequestHeaders:c}}var yz=QR({namespace:"Microsoft.AAD",packageName:"@azure/identity",packageVersion:pz});var ex=uw("ChainedTokenCredential"),hw=class{constructor(...e){this._sources=[],this._sources=e;}getToken(n){return re(this,arguments,function*(e,r={}){let{token:i}=yield this.getTokenInternal(e,r);return i})}getTokenInternal(n){return re(this,arguments,function*(e,r={}){let i=null,o,a=[];return yz.withSpan("ChainedTokenCredential.getToken",r,s=>re(this,null,function*(){for(let c=0;c<this._sources.length&&i===null;c++)try{i=yield this._sources[c].getToken(e,s),o=this._sources[c];}catch(u){if(u.name==="CredentialUnavailableError"||u.name==="AuthenticationRequiredError")a.push(u);else throw ex.getToken.info(oh(e,u)),u}if(!i&&a.length>0){let c=new fw(a,"ChainedTokenCredential authentication failed.");throw ex.getToken.info(oh(e,c)),c}if(ex.getToken.info(`Result for ${o.constructor.name}: ${hz(e)}`),i===null)throw new lw("Failed to retrieve a valid token");return {token:i,successfulCredential:o}}))})}};var pw=new Error("DefaultAzureCredential is not supported in the browser. Use InteractiveBrowserCredential instead."),gz=uw("DefaultAzureCredential"),M0=class extends hw{constructor(e){throw super(),gz.info(oh("",pw)),pw}getToken(){throw gz.getToken.info(oh("",pw)),pw}};eo();var vz=class{createAzureServiceTokenProvider(e){return Qt(e==null?void 0:e.trim(),"jwtTokenProviderFactory.createAzureServiceTokenProvider(): missing appId."),new M0({managedIdentityClientId:e})}};v();m();y();g();eo();v();m();y();g();eo();var mw=class{constructor(e,r,n){Qt(e==null?void 0:e.trim(),"ManagedIdentityAuthenticator.constructor(): missing appId."),Qt(r==null?void 0:r.trim(),"ManagedIdentityAuthenticator.constructor(): missing resource."),Qt(n,"ManagedIdentityAuthenticator.constructor(): missing tokenProviderFactory.");let i="/.default";r.endsWith(i)||(r=`${r}${i}`),this.resource=r,this.tokenProvider=n.createAzureServiceTokenProvider(e);}getToken(){return re(this,null,function*(){return botbuilderStdlib.retry(()=>this.tokenProvider.getToken(this.resource),5,10)})}};var yw=class extends ao{constructor(e,r,n){super(e,null,r),Qt(e==null?void 0:e.trim(),"ManagedIdentityAppCredentials.constructor(): missing appId."),Qt(n,"ManagedIdentityAppCredentials.constructor(): missing tokenProviderFactory."),this.tokenProviderFactory=n,super.appId=e,this.authenticator=new mw(this.appId,this.oAuthScope,this.tokenProviderFactory);}refreshToken(){return re(this,null,function*(){let e=yield this.authenticator.getToken();return {accessToken:e.token,expiresOn:new Date(e.expiresOnTimestamp)}})}};v();m();y();g();eo();var bz=class extends Lc{constructor(e,r){super(),Qt(e==null?void 0:e.trim(),"ManagedIdentityServiceClientCredentialsFactory.constructor(): missing appId."),Qt(r,"ManagedIdentityServiceClientCredentialsFactory.constructor(): missing tokenProviderFactory."),this.appId=e,this.tokenProviderFactory=r;}isValidAppId(e){return re(this,null,function*(){return e===this.appId})}isAuthenticationDisabled(){return re(this,null,function*(){return !1})}createCredentials(e,r){return re(this,null,function*(){return Qt(yield this.isValidAppId(e),"ManagedIdentityServiceClientCredentialsFactory.createCredentials(): Invalid Managed ID."),new yw(this.appId,r,this.tokenProviderFactory)})}};v();m();y();g();var gw=class gw extends ao{constructor(r,n,i,o){super(r,i,o);this.appPassword=n;}getToken(r=!1){return re(this,null,function*(){return (this.credentials)!=null||(this.credentials=new si(this.appId,this.appPassword,this.oAuthEndpoint,this.oAuthScope)),this.credentials.getToken(r)})}refreshToken(){throw new Error("Method not implemented.")}};gw.Empty=new gw(null,null);var qc=gw;v();m();y();g();var vw=class extends qc{constructor(r,n,i,o){super(r,n,i,o);this.appPassword=n;}GetToChannelFromBotOAuthScope(){return exports.GovernmentConstants.ToChannelFromBotOAuthScope}GetToChannelFromBotLoginUrlPrefix(){return exports.GovernmentConstants.ToChannelFromBotLoginUrlPrefix}GetDefaultChannelAuthTenant(){return exports.GovernmentConstants.DefaultChannelAuthTenant}};v();m();y();g();var wz=class{toJSON(){return {name:this.constructor.name,appId:this.appId}}constructor(e,r,n){this.appId=e,this.password=r,this.tenantId=n!=null?n:null;}isValidAppId(e=""){return re(this,null,function*(){return e===this.appId})}isAuthenticationDisabled(){return re(this,null,function*(){return botbuilderStdlib.stringExt.isNilOrEmpty(this.appId)})}createCredentials(e,r,n,i){return re(this,null,function*(){if(yield this.isAuthenticationDisabled())return qc.Empty;if(!(yield this.isValidAppId(e)))throw new Error("Invalid appId.");let o,a=n==null?void 0:n.toLowerCase();return a!=null&&a.startsWith(exports.AuthenticationConstants.ToChannelFromBotLoginUrlPrefix)?o=new qc(e,this.password,this.tenantId,r):a!=null&&a.startsWith(exports.GovernmentConstants.ToChannelFromBotLoginUrlPrefix)?o=new vw(e,this.password,this.tenantId,r):o=new tx(e,this.password,this.tenantId,r,a,i),o})}},tx=class extends qc{constructor(e,r,n,i,o,a){super(e,r,n,i),this.oAuthEndpoint=o,this._validateAuthority=a;}get validateAuthority(){return this._validateAuthority}get oAuthEndpoint(){return this.__oAuthEndpoint}set oAuthEndpoint(e){this.__oAuthEndpoint=e;}};v();m();y();g();var rx=class{constructor(e,r){this.clientApplication=r;this.appId=e;}isValidAppId(e){return re(this,null,function*(){return e===this.appId})}isAuthenticationDisabled(){return re(this,null,function*(){return !this.appId})}createCredentials(e,r,n,i){return re(this,null,function*(){if(yield this.isAuthenticationDisabled())return si.Empty;if(!(yield this.isValidAppId(e)))throw new Error("Invalid appId.");let o=n.toLowerCase();return o.startsWith(exports.AuthenticationConstants.ToChannelFromBotLoginUrlPrefix)?new si(this.clientApplication,e,void 0,r||exports.AuthenticationConstants.ToBotFromChannelTokenIssuer):o.startsWith(exports.GovernmentConstants.ToChannelFromBotLoginUrlPrefix)?new si(this.clientApplication,e,void 0,r||exports.GovernmentConstants.ToChannelFromBotOAuthScope):new si(this.clientApplication,e,n,r)})}};v();m();y();g();v();m();y();g();var Eme={};v();m();y();g();var Sz={};Cr(Sz,{Activity:()=>lx,AppBasedLinkQuery:()=>y0e,Attachment:()=>ww,BatchOperationRequest:()=>Fc,BatchOperationResponse:()=>zc,CacheInfo:()=>o0e,CardAction:()=>Rme,CardImage:()=>xme,ChannelAccount:()=>Ez,ChannelInfo:()=>nx,ConversationList:()=>O0,FileConsentCard:()=>c0e,FileConsentCardResponse:()=>d0e,FileDownloadInfo:()=>u0e,FileInfoCard:()=>l0e,FileUploadInfo:()=>f0e,GetTeamsFailedEntriesResponse:()=>L0,GetTeamsOperationStateResponse:()=>D0,Meeting:()=>ox,MeetingNotification:()=>B0,MeetingNotificationChannelData:()=>sx,MeetingNotificationRecipientFailureInfo:()=>ux,MeetingNotificationResponse:()=>sh,MessageActionsPayload:()=>e0e,MessageActionsPayloadApp:()=>Wme,MessageActionsPayloadAttachment:()=>Jme,MessageActionsPayloadBody:()=>Zme,MessageActionsPayloadConversation:()=>fx,MessageActionsPayloadFrom:()=>Yme,MessageActionsPayloadMention:()=>Xme,MessageActionsPayloadReaction:()=>Qme,MessageActionsPayloadUser:()=>Kme,MessagingExtensionAction:()=>t0e,MessagingExtensionActionResponse:()=>a0e,MessagingExtensionAttachment:()=>r0e,MessagingExtensionParameter:()=>Vme,MessagingExtensionQuery:()=>Gme,MessagingExtensionQueryOptions:()=>$me,MessagingExtensionResponse:()=>s0e,MessagingExtensionResult:()=>i0e,MessagingExtensionSuggestedAction:()=>n0e,NotificationInfo:()=>Sme,O365ConnectorCard:()=>Nme,O365ConnectorCardActionBase:()=>U0,O365ConnectorCardActionCard:()=>Dme,O365ConnectorCardActionQuery:()=>Hme,O365ConnectorCardDateInput:()=>qme,O365ConnectorCardFact:()=>Ime,O365ConnectorCardHttpPOST:()=>Ume,O365ConnectorCardImage:()=>Mme,O365ConnectorCardInputBase:()=>bw,O365ConnectorCardMultichoiceInput:()=>zme,O365ConnectorCardMultichoiceInputChoice:()=>Fme,O365ConnectorCardOpenUri:()=>Bme,O365ConnectorCardOpenUriTarget:()=>Pme,O365ConnectorCardSection:()=>Ome,O365ConnectorCardTextInput:()=>Lme,O365ConnectorCardViewAction:()=>kme,OnBehalfOf:()=>cx,SigninStateVerificationQuery:()=>jme,TaskModuleContinueResponse:()=>px,TaskModuleMessageResponse:()=>h0e,TaskModuleRequest:()=>_z,TaskModuleRequestContext:()=>m0e,TaskModuleResponse:()=>p0e,TaskModuleResponseBase:()=>dx,TaskModuleTaskInfo:()=>hx,TeamDetails:()=>N0,TeamInfo:()=>_me,TeamsChannelAccount:()=>ix,TeamsChannelData:()=>Ame,TeamsChannelDataSettings:()=>Tme,TeamsMeetingDetails:()=>ax,TeamsMeetingInfo:()=>P0,TeamsMeetingParticipant:()=>k0,TeamsMember:()=>mx,TenantInfo:()=>Cme});v();m();y();g();var nx={serializedName:"ChannelInfo",type:{name:"Composite",className:"ChannelInfo",modelProperties:{id:{serializedName:"id",type:{name:"String"}},name:{serializedName:"name",type:{name:"String"}},type:{serializedName:"type",type:{name:"String"}}}}},O0={serializedName:"ConversationList",type:{name:"Composite",className:"ConversationList",modelProperties:{conversations:{serializedName:"conversations",type:{name:"Sequence",element:{type:{name:"Composite",className:"ChannelInfo"}}}}}}},N0={serializedName:"TeamDetails",type:{name:"Composite",className:"TeamDetails",modelProperties:{id:{serializedName:"id",type:{name:"String"}},name:{serializedName:"name",type:{name:"String"}},aadGroupId:{serializedName:"aadGroupId",type:{name:"String"}},type:{serializedName:"type",type:{name:"String"}}}}},_me={serializedName:"TeamInfo",type:{name:"Composite",className:"TeamInfo",modelProperties:{id:{serializedName:"id",type:{name:"String"}},name:{serializedName:"name",type:{name:"String"}},aadGroupId:{serializedName:"aadGroupId",type:{name:"String"}}}}},Sme={serializedName:"NotificationInfo",type:{name:"Composite",className:"NotificationInfo",modelProperties:{alert:{serializedName:"alert",type:{name:"Boolean"}},alertInMeeting:{serializedName:"alertInMeeting",type:{name:"Boolean"}},externalResourceUrl:{serializedName:"externalResourceUrl",type:{name:"String"}}}}},Cme={serializedName:"TenantInfo",type:{name:"Composite",className:"TenantInfo",modelProperties:{id:{serializedName:"id",type:{name:"String"}}}}},Ame={serializedName:"TeamsChannelData",type:{name:"Composite",className:"TeamsChannelData",modelProperties:{channel:{serializedName:"channel",type:{name:"Composite",className:"ChannelInfo"}},eventType:{serializedName:"eventType",type:{name:"String"}},team:{serializedName:"team",type:{name:"Composite",className:"TeamInfo"}},notification:{serializedName:"notification",type:{name:"Composite",className:"NotificationInfo"}},tenant:{serializedName:"tenant",type:{name:"Composite",className:"TenantInfo"}},settings:{serializedName:"settings",type:{name:"Composite",className:"TeamsChannelDataSettings"}}}}},Tme={serializedName:"TeamsChannelDataSettings",type:{name:"Composite",className:"TeamsChannelDataSettings",modelProperties:{selectedChannel:{serializedName:"selectedChannel",type:{name:"Composite",className:"ChannelInfo"}}}}},Ez={serializedName:"ChannelAccount",type:{name:"Composite",className:"ChannelAccount",modelProperties:{id:{serializedName:"id",type:{name:"String"}},name:{serializedName:"name",type:{name:"String"}}}}},ix={serializedName:"TeamsChannelAccount",type:{name:"Composite",className:"TeamsChannelAccount",modelProperties:Me(oe({},Ez.type.modelProperties),{givenName:{serializedName:"givenName",type:{name:"String"}},surname:{serializedName:"surname",type:{name:"String"}},email:{serializedName:"email",type:{name:"String"}},userPrincipalName:{serializedName:"userPrincipalName",type:{name:"String"}},tenantId:{serializedName:"tenantId",type:{name:"String"}},userRole:{serializedName:"userRole",type:{name:"String"}}})}},ox={serializedName:"meeting",type:{name:"Composite",className:"Meeting",modelProperties:{role:{serializedName:"role",type:{name:"String"}},inMeeting:{serializedName:"inMeeting",type:{name:"Boolean"}}}}},k0={serializedName:"TeamsMeetingParticipant",type:{name:"Composite",className:"TeamsMeetingParticipant",modelProperties:{user:{serializedName:"user",type:{name:"Composite",className:"TeamsChannelAccount"}},meeting:{serializedName:"meeting",type:{name:"Composite",className:"Meeting"}},conversation:{serializedName:"conversation",type:{name:"Composite",className:"MessageActionsPayloadConversation"}}}}},P0={serializedName:"TeamsMeetingInfo",type:{name:"Composite",className:"TeamsMeetingInfo",modelProperties:{details:{serializedName:"details",type:{name:"Composite",className:"TeamsMeetingDetails"}},conversation:{serializedName:"conversation",type:{name:"Composite",className:"MessageActionsPayloadConversation"}},organizer:{serializedName:"organizer",type:{name:"Composite",className:"TeamsChannelAccount"}}}}},ax={serializedName:"TeamsMeetingDetails",type:{name:"Composite",className:"TeamsMeetingDetails",modelProperties:{id:{serializedName:"id",type:{name:"String"}},msGraphResourceId:{serializedName:"msGraphResourceId",type:{name:"String"}},scheduledStartTime:{serializedName:"scheduledStartTime",type:{name:"DateTime"}},scheduledEndTime:{serializedName:"scheduledEndTime",type:{name:"DateTime"}},joinUrl:{serializedName:"joinUrl",type:{name:"String"}},title:{serializedName:"title",type:{name:"String"}},type:{serializedName:"type",type:{name:"String"}}}}},B0={serializedName:"MeetingNotification",type:{name:"Composite",className:"MeetingNotification",modelProperties:{type:{serializedName:"type",type:{name:"String"}},value:{serializedName:"value",type:{name:"any"}},channelData:{serializedName:"channelData",type:{name:"Composite",className:"MeetingNotificationChannelData"}}}}},sx={serializedName:"MeetingNotificationChannelData",type:{name:"Composite",className:"MeetingNotificationChannelData",modelProperties:{onBehalfOf:{serializedName:"onBehalfOf",type:{name:"Sequence",element:{type:{name:"Composite",className:"OnBehalfOf"}}}}}}},cx={serializedName:"OnBehalfOf",type:{name:"Composite",className:"OnBehalfOf",modelProperties:{itemid:{serializedName:"itemid",type:{name:"Number"}},mentionType:{serializedName:"mentionType",type:{name:"String"}},mri:{serializedName:"mri",type:{name:"String"}},displayName:{serializedName:"displayName",type:{name:"String"}}}}},ux={serializedName:"MeetingNotificationRecipientFailureInfo",type:{name:"Composite",className:"MeetingNotificationRecipientFailureInfo",modelProperties:{recipientMri:{serializedName:"recipientMri",type:{name:"String"}},failureReason:{serializedName:"failureReason",type:{name:"String"}},errorCode:{serializedName:"errorCode",type:{name:"String"}}}}},sh={serializedName:"MeetingNotificationResponse",type:{name:"Composite",className:"MeetingNotificationResponse",modelProperties:{recipientsFailureInfo:{serializedName:"recipientsFailureInfo",type:{name:"Sequence",element:{type:{name:"Composite",className:"MeetingNotificationRecipientFailureInfo"}}}}}}},Rme={serializedName:"CardAction",type:{name:"Composite",className:"CardAction",modelProperties:{type:{serializedName:"type",type:{name:"String"}},title:{serializedName:"title",type:{name:"String"}},image:{serializedName:"image",type:{name:"String"}},value:{serializedName:"value",type:{name:"Object"}}}}},xme={serializedName:"CardImage",type:{name:"Composite",className:"CardImage",modelProperties:{url:{serializedName:"url",type:{name:"String"}},alt:{serializedName:"alt",type:{name:"String"}},tap:{serializedName:"tap",type:{name:"Composite",className:"CardAction"}}}}},Ime={serializedName:"O365ConnectorCardFact",type:{name:"Composite",className:"O365ConnectorCardFact",modelProperties:{name:{serializedName:"name",type:{name:"String"}},value:{serializedName:"value",type:{name:"String"}}}}},Mme={serializedName:"O365ConnectorCardImage",type:{name:"Composite",className:"O365ConnectorCardImage",modelProperties:{image:{serializedName:"image",type:{name:"String"}},title:{serializedName:"title",type:{name:"String"}}}}},U0={serializedName:"O365ConnectorCardActionBase",type:{name:"Composite",className:"O365ConnectorCardActionBase",modelProperties:{type:{serializedName:"@type",type:{name:"String"}},name:{serializedName:"name",type:{name:"String"}},id:{serializedName:"@id",type:{name:"String"}}}}},Ome={serializedName:"O365ConnectorCardSection",type:{name:"Composite",className:"O365ConnectorCardSection",modelProperties:{title:{serializedName:"title",type:{name:"String"}},text:{serializedName:"text",type:{name:"String"}},activityTitle:{serializedName:"activityTitle",type:{name:"String"}},activitySubtitle:{serializedName:"activitySubtitle",type:{name:"String"}},activityText:{serializedName:"activityText",type:{name:"String"}},activityImage:{serializedName:"activityImage",type:{name:"String"}},activityImageType:{serializedName:"activityImageType",type:{name:"String"}},markdown:{serializedName:"markdown",type:{name:"Boolean"}},facts:{serializedName:"facts",type:{name:"Sequence",element:{type:{name:"Composite",className:"O365ConnectorCardFact"}}}},images:{serializedName:"images",type:{name:"Sequence",element:{type:{name:"Composite",className:"O365ConnectorCardImage"}}}},potentialAction:{serializedName:"potentialAction",type:{name:"Sequence",element:{type:{name:"Composite",className:"O365ConnectorCardActionBase"}}}}}}},Nme={serializedName:"O365ConnectorCard",type:{name:"Composite",className:"O365ConnectorCard",modelProperties:{title:{serializedName:"title",type:{name:"String"}},text:{serializedName:"text",type:{name:"String"}},summary:{serializedName:"summary",type:{name:"String"}},themeColor:{serializedName:"themeColor",type:{name:"String"}},sections:{serializedName:"sections",type:{name:"Sequence",element:{type:{name:"Composite",className:"O365ConnectorCardSection"}}}},potentialAction:{serializedName:"potentialAction",type:{name:"Sequence",element:{type:{name:"Composite",className:"O365ConnectorCardActionBase"}}}}}}},kme={serializedName:"O365ConnectorCardViewAction",type:{name:"Composite",className:"O365ConnectorCardViewAction",modelProperties:Me(oe({},U0.type.modelProperties),{target:{serializedName:"target",type:{name:"Sequence",element:{type:{name:"String"}}}}})}},Pme={serializedName:"O365ConnectorCardOpenUriTarget",type:{name:"Composite",className:"O365ConnectorCardOpenUriTarget",modelProperties:{os:{serializedName:"os",type:{name:"String"}},uri:{serializedName:"uri",type:{name:"String"}}}}},Bme={serializedName:"O365ConnectorCardOpenUri",type:{name:"Composite",className:"O365ConnectorCardOpenUri",modelProperties:Me(oe({},U0.type.modelProperties),{targets:{serializedName:"targets",type:{name:"Sequence",element:{type:{name:"Composite",className:"O365ConnectorCardOpenUriTarget"}}}}})}},Ume={serializedName:"O365ConnectorCardHttpPOST",type:{name:"Composite",className:"O365ConnectorCardHttpPOST",modelProperties:Me(oe({},U0.type.modelProperties),{body:{serializedName:"body",type:{name:"String"}}})}},bw={serializedName:"O365ConnectorCardInputBase",type:{name:"Composite",className:"O365ConnectorCardInputBase",modelProperties:{type:{serializedName:"@type",type:{name:"String"}},id:{serializedName:"id",type:{name:"String"}},isRequired:{serializedName:"isRequired",type:{name:"Boolean"}},title:{serializedName:"title",type:{name:"String"}},value:{serializedName:"value",type:{name:"String"}}}}},Dme={serializedName:"O365ConnectorCardActionCard",type:{name:"Composite",className:"O365ConnectorCardActionCard",modelProperties:Me(oe({},U0.type.modelProperties),{inputs:{serializedName:"inputs",type:{name:"Sequence",element:{type:{name:"Composite",className:"O365ConnectorCardInputBase"}}}},actions:{serializedName:"actions",type:{name:"Sequence",element:{type:{name:"Composite",className:"O365ConnectorCardActionBase"}}}}})}},Lme={serializedName:"O365ConnectorCardTextInput",type:{name:"Composite",className:"O365ConnectorCardTextInput",modelProperties:Me(oe({},bw.type.modelProperties),{isMultiline:{serializedName:"isMultiline",type:{name:"Boolean"}},maxLength:{serializedName:"maxLength",type:{name:"Number"}}})}},qme={serializedName:"O365ConnectorCardDateInput",type:{name:"Composite",className:"O365ConnectorCardDateInput",modelProperties:Me(oe({},bw.type.modelProperties),{includeTime:{serializedName:"includeTime",type:{name:"Boolean"}}})}},Fme={serializedName:"O365ConnectorCardMultichoiceInputChoice",type:{name:"Composite",className:"O365ConnectorCardMultichoiceInputChoice",modelProperties:{display:{serializedName:"display",type:{name:"String"}},value:{serializedName:"value",type:{name:"String"}}}}},zme={serializedName:"O365ConnectorCardMultichoiceInput",type:{name:"Composite",className:"O365ConnectorCardMultichoiceInput",modelProperties:Me(oe({},bw.type.modelProperties),{choices:{serializedName:"choices",type:{name:"Sequence",element:{type:{name:"Composite",className:"O365ConnectorCardMultichoiceInputChoice"}}}},style:{serializedName:"style",type:{name:"String"}},isMultiSelect:{serializedName:"isMultiSelect",type:{name:"Boolean"}}})}},Hme={serializedName:"O365ConnectorCardActionQuery",type:{name:"Composite",className:"O365ConnectorCardActionQuery",modelProperties:{body:{serializedName:"body",type:{name:"String"}},actionId:{serializedName:"actionId",type:{name:"String"}}}}},jme={serializedName:"SigninStateVerificationQuery",type:{name:"Composite",className:"SigninStateVerificationQuery",modelProperties:{state:{serializedName:"state",type:{name:"String"}}}}},$me={serializedName:"MessagingExtensionQueryOptions",type:{name:"Composite",className:"MessagingExtensionQueryOptions",modelProperties:{skip:{serializedName:"skip",type:{name:"Number"}},count:{serializedName:"count",type:{name:"Number"}}}}},Vme={serializedName:"MessagingExtensionParameter",type:{name:"Composite",className:"MessagingExtensionParameter",modelProperties:{name:{serializedName:"name",type:{name:"String"}},value:{serializedName:"value",type:{name:"Object"}}}}},Gme={serializedName:"MessagingExtensionQuery",type:{name:"Composite",className:"MessagingExtensionQuery",modelProperties:{commandId:{serializedName:"commandId",type:{name:"String"}},parameters:{serializedName:"parameters",type:{name:"Sequence",element:{type:{name:"Composite",className:"MessagingExtensionParameter"}}}},queryOptions:{serializedName:"queryOptions",type:{name:"Composite",className:"MessagingExtensionQueryOptions"}},state:{serializedName:"state",type:{name:"String"}}}}},lx={serializedName:"Activity",type:{name:"Composite",className:"Activity",modelProperties:{dummyProperty:{serializedName:"dummyProperty",type:{name:"String"}},text:{serializedName:"text",type:{name:"String"}}}}},Kme={serializedName:"MessageActionsPayloadUser",type:{name:"Composite",className:"MessageActionsPayloadUser",modelProperties:{userIdentityType:{serializedName:"userIdentityType",type:{name:"String"}},id:{serializedName:"id",type:{name:"String"}},displayName:{serializedName:"displayName",type:{name:"String"}}}}},Wme={serializedName:"MessageActionsPayloadApp",type:{name:"Composite",className:"MessageActionsPayloadApp",modelProperties:{applicationIdentityType:{serializedName:"applicationIdentityType",type:{name:"String"}},id:{serializedName:"id",type:{name:"String"}},displayName:{serializedName:"displayName",type:{name:"String"}}}}},fx={serializedName:"MessageActionsPayloadConversation",type:{name:"Composite",className:"MessageActionsPayloadConversation",modelProperties:{conversationIdentityType:{serializedName:"conversationIdentityType",type:{name:"String"}},id:{serializedName:"id",type:{name:"String"}},displayName:{serializedName:"displayName",type:{name:"String"}}}}},Yme={serializedName:"MessageActionsPayloadFrom",type:{name:"Composite",className:"MessageActionsPayloadFrom",modelProperties:{user:{serializedName:"user",type:{name:"Composite",className:"MessageActionsPayloadUser"}},application:{serializedName:"application",type:{name:"Composite",className:"MessageActionsPayloadApp"}},conversation:{serializedName:"conversation",type:{name:"Composite",className:"MessageActionsPayloadConversation"}}}}},Zme={serializedName:"MessageActionsPayload_body",type:{name:"Composite",className:"MessageActionsPayloadBody",modelProperties:{contentType:{serializedName:"contentType",type:{name:"String"}},content:{serializedName:"content",type:{name:"String"}},textContent:{serializedName:"textContent",type:{name:"String"}}}}},Jme={serializedName:"MessageActionsPayloadAttachment",type:{name:"Composite",className:"MessageActionsPayloadAttachment",modelProperties:{id:{serializedName:"id",type:{name:"String"}},contentType:{serializedName:"contentType",type:{name:"String"}},contentUrl:{serializedName:"contentUrl",type:{name:"String"}},content:{serializedName:"content",type:{name:"Object"}},name:{serializedName:"name",type:{name:"String"}},thumbnailUrl:{serializedName:"thumbnailUrl",type:{name:"String"}}}}},Xme={serializedName:"MessageActionsPayloadMention",type:{name:"Composite",className:"MessageActionsPayloadMention",modelProperties:{id:{serializedName:"id",type:{name:"Number"}},mentionText:{serializedName:"mentionText",type:{name:"String"}},mentioned:{serializedName:"mentioned",type:{name:"Composite",className:"MessageActionsPayloadFrom"}}}}},Qme={serializedName:"MessageActionsPayloadReaction",type:{name:"Composite",className:"MessageActionsPayloadReaction",modelProperties:{reactionType:{serializedName:"reactionType",type:{name:"String"}},createdDateTime:{serializedName:"createdDateTime",type:{name:"String"}},user:{serializedName:"user",type:{name:"Composite",className:"MessageActionsPayloadFrom"}}}}},e0e={serializedName:"MessageActionsPayload",type:{name:"Composite",className:"MessageActionsPayload",modelProperties:{id:{serializedName:"id",type:{name:"String"}},replyToId:{serializedName:"replyToId",type:{name:"String"}},messageType:{serializedName:"messageType",type:{name:"String"}},createdDateTime:{serializedName:"createdDateTime",type:{name:"String"}},lastModifiedDateTime:{serializedName:"lastModifiedDateTime",type:{name:"String"}},deleted:{serializedName:"deleted",type:{name:"Boolean"}},subject:{serializedName:"subject",type:{name:"String"}},summary:{serializedName:"summary",type:{name:"String"}},importance:{serializedName:"importance",type:{name:"String"}},locale:{serializedName:"locale",type:{name:"String"}},from:{serializedName:"from",type:{name:"Composite",className:"MessageActionsPayloadFrom"}},body:{serializedName:"body",type:{name:"Composite",className:"MessageActionsPayloadBody"}},attachmentLayout:{serializedName:"attachmentLayout",type:{name:"String"}},attachments:{serializedName:"attachments",type:{name:"Sequence",element:{type:{name:"Composite",className:"MessageActionsPayloadAttachment"}}}},mentions:{serializedName:"mentions",type:{name:"Sequence",element:{type:{name:"Composite",className:"MessageActionsPayloadMention"}}}},reactions:{serializedName:"reactions",type:{name:"Sequence",element:{type:{name:"Composite",className:"MessageActionsPayloadReaction"}}}},linkToMessage:{serializedName:"linkToMessage",type:{name:"String"}}}}},_z={serializedName:"TaskModuleRequest",type:{name:"Composite",className:"TaskModuleRequest",modelProperties:{data:{serializedName:"data",type:{name:"Object"}},context:{serializedName:"context",type:{name:"Composite",className:"TaskModuleRequestContext"}}}}},t0e={serializedName:"MessagingExtensionAction",type:{name:"Composite",className:"MessagingExtensionAction",modelProperties:Me(oe({},_z.type.modelProperties),{commandId:{serializedName:"commandId",type:{name:"String"}},commandContext:{serializedName:"commandContext",type:{name:"String"}},botMessagePreviewAction:{serializedName:"botMessagePreviewAction",type:{name:"String"}},botActivityPreview:{serializedName:"botActivityPreview",type:{name:"Sequence",element:{type:{name:"Composite",className:"Activity"}}}},messagePayload:{serializedName:"messagePayload",type:{name:"Composite",className:"MessageActionsPayload"}}})}},dx={serializedName:"TaskModuleResponseBase",type:{name:"Composite",className:"TaskModuleResponseBase",modelProperties:{type:{serializedName:"type",type:{name:"String"}}}}},ww={serializedName:"Attachment",type:{name:"Composite",className:"Attachment",modelProperties:{contentType:{serializedName:"contentType",type:{name:"String"}},contentUrl:{serializedName:"contentUrl",type:{name:"String"}},content:{serializedName:"content",type:{name:"Object"}},name:{serializedName:"name",type:{name:"String"}},thumbnailUrl:{serializedName:"thumbnailUrl",type:{name:"String"}}}}},r0e={serializedName:"MessagingExtensionAttachment",type:{name:"Composite",className:"MessagingExtensionAttachment",modelProperties:Me(oe({},ww.type.modelProperties),{preview:{serializedName:"preview",type:{name:"Composite",className:"Attachment"}}})}},n0e={serializedName:"MessagingExtensionSuggestedAction",type:{name:"Composite",className:"MessagingExtensionSuggestedAction",modelProperties:{actions:{serializedName:"actions",type:{name:"Sequence",element:{type:{name:"Composite",className:"CardAction"}}}}}}},i0e={serializedName:"MessagingExtensionResult",type:{name:"Composite",className:"MessagingExtensionResult",modelProperties:{attachmentLayout:{serializedName:"attachmentLayout",type:{name:"String"}},type:{serializedName:"type",type:{name:"String"}},attachments:{serializedName:"attachments",type:{name:"Sequence",element:{type:{name:"Composite",className:"MessagingExtensionAttachment"}}}},suggestedActions:{serializedName:"suggestedActions",type:{name:"Composite",className:"MessagingExtensionSuggestedAction"}},text:{serializedName:"text",type:{name:"String"}},activityPreview:{serializedName:"activityPreview",type:{name:"Composite",className:"Activity"}}}}},o0e={serializedName:"cacheInfo",type:{name:"Composite",className:"cacheInfo",modelProperties:{cacheType:{serializedName:"cacheType",type:{name:"String"}},cacheDuration:{serializedName:"cacheDuration",type:{name:"Number"}}}}},a0e={serializedName:"MessagingExtensionActionResponse",type:{name:"Composite",className:"MessagingExtensionActionResponse",modelProperties:{task:{serializedName:"task",type:{name:"Composite",className:"TaskModuleResponseBase"}},composeExtension:{serializedName:"composeExtension",type:{name:"Composite",className:"MessagingExtensionResult"}},cacheInfo:{serializedName:"cacheInfo",type:{name:"Composite",className:"cacheInfo"}}}}},s0e={serializedName:"MessagingExtensionResponse",type:{name:"Composite",className:"MessagingExtensionResponse",modelProperties:{composeExtension:{serializedName:"composeExtension",type:{name:"Composite",className:"MessagingExtensionResult"}},cacheInfo:{serializedName:"cacheInfo",type:{name:"Composite",className:"cacheInfo"}}}}},c0e={serializedName:"FileConsentCard",type:{name:"Composite",className:"FileConsentCard",modelProperties:{description:{serializedName:"description",type:{name:"String"}},sizeInBytes:{serializedName:"sizeInBytes",type:{name:"Number"}},acceptContext:{serializedName:"acceptContext",type:{name:"Object"}},declineContext:{serializedName:"declineContext",type:{name:"Object"}}}}},u0e={serializedName:"FileDownloadInfo",type:{name:"Composite",className:"FileDownloadInfo",modelProperties:{downloadUrl:{serializedName:"downloadUrl",type:{name:"String"}},uniqueId:{serializedName:"uniqueId",type:{name:"String"}},fileType:{serializedName:"fileType",type:{name:"String"}},etag:{serializedName:"etag",type:{name:"Object"}}}}},l0e={serializedName:"FileInfoCard",type:{name:"Composite",className:"FileInfoCard",modelProperties:{uniqueId:{serializedName:"uniqueId",type:{name:"String"}},fileType:{serializedName:"fileType",type:{name:"String"}},etag:{serializedName:"etag",type:{name:"Object"}}}}},f0e={serializedName:"FileUploadInfo",type:{name:"Composite",className:"FileUploadInfo",modelProperties:{name:{serializedName:"name",type:{name:"String"}},uploadUrl:{serializedName:"uploadUrl",type:{name:"String"}},contentUrl:{serializedName:"contentUrl",type:{name:"String"}},uniqueId:{serializedName:"uniqueId",type:{name:"String"}},fileType:{serializedName:"fileType",type:{name:"String"}}}}},d0e={serializedName:"FileConsentCardResponse",type:{name:"Composite",className:"FileConsentCardResponse",modelProperties:{action:{serializedName:"action",type:{name:"String"}},context:{serializedName:"context",type:{name:"Object"}},uploadInfo:{serializedName:"uploadInfo",type:{name:"Composite",className:"FileUploadInfo"}}}}},hx={serializedName:"TaskModuleTaskInfo",type:{name:"Composite",className:"TaskModuleTaskInfo",modelProperties:{title:{serializedName:"title",type:{name:"String"}},height:{serializedName:"height",type:{name:"Object"}},width:{serializedName:"width",type:{name:"Object"}},url:{serializedName:"url",type:{name:"String"}},card:{serializedName:"card",type:{name:"Composite",className:"Attachment"}},fallbackUrl:{serializedName:"fallbackUrl",type:{name:"String"}},completionBotId:{serializedName:"completionBotId",type:{name:"String"}}}}},px={serializedName:"TaskModuleContinueResponse",type:{name:"Composite",className:"TaskModuleContinueResponse",modelProperties:Me(oe({},dx.type.modelProperties),{value:{serializedName:"value",type:{name:"Composite",className:"TaskModuleTaskInfo"}}})}},h0e={serializedName:"TaskModuleMessageResponse",type:{name:"Composite",className:"TaskModuleMessageResponse",modelProperties:Me(oe({},dx.type.modelProperties),{value:{serializedName:"value",type:{name:"String"}}})}},p0e={serializedName:"TaskModuleResponse",type:{name:"Composite",className:"TaskModuleResponse",modelProperties:{task:{serializedName:"task",type:{name:"Composite",className:"TaskModuleResponseBase"}},cacheInfo:{serializedName:"cacheInfo",type:{name:"Composite",className:"cacheInfo"}}}}},m0e={serializedName:"TaskModuleRequest_context",type:{name:"Composite",className:"TaskModuleRequestContext",modelProperties:{theme:{serializedName:"theme",type:{name:"String"}}}}},y0e={serializedName:"AppBasedLinkQuery",type:{name:"Composite",className:"AppBasedLinkQuery",modelProperties:{url:{serializedName:"url",type:{name:"String"}},state:{serializedName:"state",type:{name:"String"}}}}},Fc={serializedName:"BatchOperationRequest",type:{name:"Composite",className:"BatchOperationRequest",modelProperties:{activity:{serializedName:"activity",type:{name:"Composite",className:"Activity",modelProperties:{text:{serializedName:"text",type:{name:"String"}},type:{serializedName:"type",type:{name:"String"}}}}},tenantId:{serializedName:"tenantId",type:{name:"String"}},teamId:{serializedName:"teamId",type:{name:"String"}},members:{serializedName:"members",type:{name:"Sequence",element:{type:{name:"Composite",className:"TeamsMember",modelProperties:{id:{serializedName:"id",type:{name:"String"}}}}}}}}}},zc={serializedName:"BatchOperationResponse",type:{name:"Composite",className:"BatchOperationResponse",modelProperties:{operationId:{serializedName:"operationId",type:{name:"String"}}}}},D0={serializedName:"GetTeamsOperationStateResponse",type:{name:"Composite",className:"GetTeamsOperationStateResponse",modelProperties:{state:{serializedName:"state",type:{name:"String"}},stateMap:{serializedName:"stateMap",type:{name:"Dictionary",value:{type:{name:"Number"}}}},retryAfter:{serializedName:"retryAfter",type:{name:"DateTime"}},totalEntriesCount:{serializedName:"totalEntriesCount",type:{name:"Number"}}}}},L0={serializedName:"BatchFailedEntriesResponse",type:{name:"Composite",className:"BatchFailedEntriesResponse",modelProperties:{continuationToken:{serializedName:"continuationToken",type:{name:"String"}},failedEntryResponses:{serializedName:"failedEntryResponses",type:{name:"Sequence",element:{type:{name:"Composite",className:"BatchFailedEntry",modelProperties:{id:{serializedName:"Id",type:{name:"String"}},error:{serializedName:"error",type:{name:"String"}}}}}}}}}},mx={serializedName:"TeamsMember",type:{name:"Composite",className:"TeamsMember",modelProperties:{id:{serializedName:"id",type:{name:"String"}}}}};v();m();y();g();v();m();y();g();var yx={};Cr(yx,{Activity:()=>lx,Attachment:()=>ww,BatchOperationRequest:()=>Fc,BatchOperationResponse:()=>zc,ChannelInfo:()=>nx,ConversationList:()=>O0,ErrorModel:()=>pd,ErrorResponse:()=>Xt,GetTeamsFailedEntriesResponse:()=>L0,GetTeamsOperationStateResponse:()=>D0,InnerHttpError:()=>hd,Meeting:()=>ox,MeetingNotification:()=>B0,MeetingNotificationChannelData:()=>sx,MeetingNotificationRecipientFailureInfo:()=>ux,MeetingNotificationResponse:()=>sh,MessageActionsPayloadConversation:()=>fx,OnBehalfOf:()=>cx,TaskModuleContinueResponse:()=>px,TaskModuleTaskInfo:()=>hx,TeamDetails:()=>N0,TeamsChannelAccount:()=>ix,TeamsMeetingDetails:()=>ax,TeamsMeetingInfo:()=>P0,TeamsMeetingParticipant:()=>k0,TeamsMember:()=>mx});v();m();y();g();v();m();y();g();var gx={parameterPath:"teamId",mapper:{required:!0,serializedName:"teamId",type:{name:"String"}}},Ew={parameterPath:"meetingId",mapper:{required:!0,serializedName:"meetingId",type:{name:"String"}}},Cz={parameterPath:"participantId",mapper:{required:!0,serializedName:"participantId",type:{name:"String"}}},Az={parameterPath:["options","tenantId"],mapper:{serializedName:"tenantId",type:{name:"String"}}},_w={parameterPath:"operationId",mapper:{serializedName:"operationId",type:{name:"String"}}};var Sw=class{constructor(e){this.retryCount=10;this.client=e;}fetchChannelList(e,r,n){return this.client.sendOperationRequest({teamId:e,options:r},v0e,n)}fetchTeamDetails(e,r,n){return this.client.sendOperationRequest({teamId:e,options:r},b0e,n)}fetchMeetingParticipant(e,r,n,i){return this.client.sendOperationRequest({meetingId:e,participantId:r,options:n},w0e,i)}fetchMeetingInfo(e,r,n){return this.client.sendOperationRequest({meetingId:e,options:r},E0e,n)}sendMeetingNotification(e,r,n,i){return this.client.sendOperationRequest({meetingId:e,notification:r,options:n},_0e,i)}sendMessageToListOfUsers(e,r,n,i,o){let a={activity:e,members:n,tenantId:r};return Hc(()=>this.client.sendOperationRequest({content:a,options:i},S0e,o),this.retryCount)}sendMessageToAllUsersInTenant(e,r,n,i){let o={activity:e,tenantId:r};return Hc(()=>this.client.sendOperationRequest({content:o,options:n},C0e,i),this.retryCount)}sendMessageToAllUsersInTeam(e,r,n,i,o){let a={activity:e,tenantId:r,teamId:n};return Hc(()=>this.client.sendOperationRequest({content:a,options:i},A0e,o),this.retryCount)}sendMessageToListOfChannels(e,r,n,i,o){let a={activity:e,tenantId:r,members:n};return Hc(()=>this.client.sendOperationRequest({content:a,options:i},T0e,o),this.retryCount)}getOperationState(e,r,n){return Hc(()=>this.client.sendOperationRequest({operationId:e,options:r},R0e,n),this.retryCount)}getOperationFailedEntries(e,r,n){return Hc(()=>this.client.sendOperationRequest({operationId:e,options:r},x0e,n),this.retryCount)}cancelOperation(e,r){return Hc(()=>this.client.sendOperationRequest({operationId:e,options:r},I0e),this.retryCount)}},yo=new Ln(yx),v0e={httpMethod:"GET",path:"v3/teams/{teamId}/conversations",urlParameters:[gx],responses:{200:{bodyMapper:O0},default:{}},serializer:yo},b0e={httpMethod:"GET",path:"v3/teams/{teamId}",urlParameters:[gx],responses:{200:{bodyMapper:N0},default:{}},serializer:yo},w0e={httpMethod:"GET",path:"v1/meetings/{meetingId}/participants/{participantId}",urlParameters:[Ew,Cz],queryParameters:[Az],responses:{200:{bodyMapper:k0},default:{}},serializer:yo},E0e={httpMethod:"GET",path:"v1/meetings/{meetingId}",urlParameters:[Ew],responses:{200:{bodyMapper:P0},default:{}},serializer:yo},_0e={httpMethod:"POST",path:"v1/meetings/{meetingId}/notification",urlParameters:[Ew],requestBody:{parameterPath:"notification",mapper:Me(oe({},B0),{required:!0})},responses:{202:{bodyMapper:sh},207:{bodyMapper:sh},default:{bodyMapper:Xt}},serializer:yo},S0e={httpMethod:"POST",path:"v3/batch/conversation/users",requestBody:{parameterPath:"content",mapper:Me(oe({},Fc),{required:!0})},responses:{201:{bodyMapper:zc},default:{bodyMapper:Xt}},serializer:yo},C0e={httpMethod:"POST",path:"v3/batch/conversation/tenant",requestBody:{parameterPath:"content",mapper:Me(oe({},Fc),{required:!0})},responses:{201:{bodyMapper:zc},default:{bodyMapper:Xt}},serializer:yo},A0e={httpMethod:"POST",path:"v3/batch/conversation/team",requestBody:{parameterPath:"content",mapper:Me(oe({},Fc),{required:!0})},responses:{201:{bodyMapper:zc},default:{bodyMapper:Xt}},serializer:yo},T0e={httpMethod:"POST",path:"v3/batch/conversation/channels",requestBody:{parameterPath:"content",mapper:Me(oe({},Fc),{required:!0})},responses:{201:{bodyMapper:zc},default:{bodyMapper:Xt}},serializer:yo},R0e={httpMethod:"GET",path:"v3/batch/conversation/{operationId}",urlParameters:[_w],responses:{200:{bodyMapper:D0},default:{bodyMapper:Xt}},serializer:yo},x0e={httpMethod:"GET",path:"v3/batch/conversation/failedentries/{operationId}",urlParameters:[_w],responses:{200:{bodyMapper:L0},default:{bodyMapper:Xt}},serializer:yo},I0e={httpMethod:"DELETE",path:"v3/batch/conversation/{operationId}",urlParameters:[_w],responses:{200:{},default:{bodyMapper:Xt}},serializer:yo};v();m();y();g();var Cw=class extends ds{constructor(e,r){r||(r={}),super(e,r),this.baseUri=r.baseUri||this.baseUri||"https://api.botframework.com",this.requestContentType="application/json; charset=utf-8",this.credentials=e;}};var Tz=class extends Cw{constructor(e,r){super(e,r),this.teams=new Sw(this);}};v();m();y();g();var Rz=class t{constructor(e){this.lastReadMessageId=e;}static isMessageRead(e,r){if(e&&e.trim().length>0&&r&&r.trim().length>0){let n=Number(e),i=Number(r);if(n&&i)return n<=i}return !1}isMessageRead(e){return t.isMessageRead(e,this.lastReadMessageId)}};v();m();y();g();function Hc(t,e,r=500){return re(this,null,function*(){let n=r,i=1,o,a=[];e=Math.max(e,1);do try{return yield t(i)}catch(s){a.push(s),o=s.statusCode,s.statusCode==429&&(yield new Promise(c=>setTimeout(c,n)),n*=i,i++);}while(i<=e&&o===429);throw {errors:a,message:"Failed to perform the required operation."}})}v();m();y();g();v();m();y();g();v();m();y();g();var Mz=on(Iz());var vx=class{static emulateOAuthCards(e,r,n){return re(this,null,function*(){let i=yield e.getToken(),o=r+(r.endsWith("/")?"":"/")+`api/usertoken/emulateOAuthCards?emulate=${(!!n).toString()}`,a=yield (0, Mz.default)(o,{method:"POST",headers:{Authorization:`Bearer ${i}`}});if(a.ok)return !0;throw new Error(`EmulateOAuthCards failed with status code: ${a.status}`)})}};var export_ConnectorClientOptions=qo.ConnectorClientOptions;/*! Bundled license information:
ieee754/index.js:
(*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> *)
buffer/index.js:
(*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*)
safe-buffer/index.js:
(*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)
@jspm/core/nodelibs/browser/assert.js:
(*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
* @license MIT
*)
tslib/tslib.es6.js:
(*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** *)
tslib/tslib.es6.js:
(*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** *)
@azure/msal-node/dist/cache/serializer/Serializer.mjs:
(*! @azure/msal-node v2.13.1 2024-08-29 *)
@azure/msal-common/dist/utils/Constants.mjs:
(*! @azure/msal-common v14.14.2 2024-08-28 *)
@azure/msal-common/dist/error/AuthErrorCodes.mjs:
(*! @azure/msal-common v14.14.2 2024-08-28 *)
@azure/msal-common/dist/error/AuthError.mjs:
(*! @azure/msal-common v14.14.2 2024-08-28 *)
@azure/msal-common/dist/error/ClientAuthErrorCodes.mjs:
(*! @azure/msal-common v14.14.2 2024-08-28 *)
@azure/msal-common/dist/error/ClientAuthError.mjs:
(*! @azure/msal-common v14.14.2 2024-08-28 *)
@azure/msal-common/dist/account/AuthToken.mjs:
(*! @azure/msal-common v14.14.2 2024-08-28 *)
@azure/msal-common/dist/authority/AuthorityType.mjs:
(*! @azure/msal-common v14.14.2 2024-08-28 *)
@azure/msal-common/dist/authority/OpenIdConfigResponse.mjs:
(*! @azure/msal-common v14.14.2 2024-08-28 *)
@azure/msal-common/dist/error/ClientConfigurationErrorCodes.mjs:
(*! @azure/msal-common v14.14.2 2024-08-28 *)
@azure/msal-common/dist/error/ClientConfigurationError.mjs:
(*! @azure/msal-common v14.14.2 2024-08-28 *)
@azure/msal-common/dist/utils/StringUtils.mjs:
(*! @azure/msal-common v14.14.2 2024-08-28 *)
@azure/msal-common/dist/utils/UrlUtils.mjs:
(*! @azure/msal-common v14.14.2 2024-08-28 *)
@azure/msal-common/dist/url/UrlString.mjs:
(*! @azure/msal-common v14.14.2 2024-08-28 *)
@azure/msal-common/dist/authority/AuthorityMetadata.mjs:
(*! @azure/msal-common v14.14.2 2024-08-28 *)
@azure/msal-common/dist/authority/ProtocolMode.mjs:
(*! @azure/msal-common v14.14.2 2024-08-28 *)
@azure/msal-common/dist/authority/AuthorityOptions.mjs:
(*! @azure/msal-common v14.14.2 2024-08-28 *)
@azure/msal-common/dist/authority/CloudInstanceDiscoveryResponse.mjs:
(*! @azure/msal-common v14.14.2 2024-08-28 *)
@azure/msal-common/dist/authority/CloudInstanceDiscoveryErrorResponse.mjs:
(*! @azure/msal-common v14.14.2 2024-08-28 *)
@azure/msal-common/dist/telemetry/performance/PerformanceEvent.mjs:
(*! @azure/msal-common v14.14.2 2024-08-28 *)
@azure/msal-common/dist/utils/FunctionWrappers.mjs:
(*! @azure/msal-common v14.14.2 2024-08-28 *)
@azure/msal-common/dist/authority/RegionDiscovery.mjs:
(*! @azure/msal-common v14.14.2 2024-08-28 *)
@azure/msal-common/dist/utils/TimeUtils.mjs:
(*! @azure/msal-common v14.14.2 2024-08-28 *)
@azure/msal-common/dist/cache/utils/CacheHelpers.mjs:
(*! @azure/msal-common v14.14.2 2024-08-28 *)
@azure/msal-common/dist/authority/Authority.mjs:
(*! @azure/msal-common v14.14.2 2024-08-28 *)
@azure/msal-common/dist/authority/AuthorityFactory.mjs:
(*! @azure/msal-common v14.14.2 2024-08-28 *)
@azure/msal-common/dist/utils/ClientAssertionUtils.mjs:
(*! @azure/msal-common v14.14.2 2024-08-28 *)
@azure/msal-common/dist/constants/AADServerParamKeys.mjs:
(*! @azure/msal-common v14.14.2 2024-08-28 *)
@azure/msal-common/dist/crypto/ICrypto.mjs:
(*! @azure/msal-common v14.14.2 2024-08-28 *)
@azure/msal-common/dist/logger/Logger.mjs:
(*! @azure/msal-common v14.14.2 2024-08-28 *)
@azure/msal-common/dist/packageMetadata.mjs:
(*! @azure/msal-common v14.14.2 2024-08-28 *)
@azure/msal-common/dist/request/ScopeSet.mjs:
(*! @azure/msal-common v14.14.2 2024-08-28 *)
@azure/msal-common/dist/account/ClientInfo.mjs:
(*! @azure/msal-common v14.14.2 2024-08-28 *)
@azure/msal-common/dist/account/AccountInfo.mjs:
(*! @azure/msal-common v14.14.2 2024-08-28 *)
@azure/msal-common/dist/account/TokenClaims.mjs:
(*! @azure/msal-common v14.14.2 2024-08-28 *)
@azure/msal-common/dist/cache/entities/AccountEntity.mjs:
(*! @azure/msal-common v14.14.2 2024-08-28 *)
@azure/msal-common/dist/error/CacheErrorCodes.mjs:
(*! @azure/msal-common v14.14.2 2024-08-28 *)
@azure/msal-common/dist/error/CacheError.mjs:
(*! @azure/msal-common v14.14.2 2024-08-28 *)
@azure/msal-common/dist/cache/CacheManager.mjs:
(*! @azure/msal-common v14.14.2 2024-08-28 *)
@azure/msal-common/dist/config/ClientConfiguration.mjs:
(*! @azure/msal-common v14.14.2 2024-08-28 *)
@azure/msal-common/dist/error/ServerError.mjs:
(*! @azure/msal-common v14.14.2 2024-08-28 *)
@azure/msal-common/dist/network/ThrottlingUtils.mjs:
(*! @azure/msal-common v14.14.2 2024-08-28 *)
@azure/msal-common/dist/network/NetworkManager.mjs:
(*! @azure/msal-common v14.14.2 2024-08-28 *)
@azure/msal-common/dist/account/CcsCredential.mjs:
(*! @azure/msal-common v14.14.2 2024-08-28 *)
@azure/msal-common/dist/request/RequestValidator.mjs:
(*! @azure/msal-common v14.14.2 2024-08-28 *)
@azure/msal-common/dist/request/RequestParameterBuilder.mjs:
(*! @azure/msal-common v14.14.2 2024-08-28 *)
@azure/msal-common/dist/client/BaseClient.mjs:
(*! @azure/msal-common v14.14.2 2024-08-28 *)
@azure/msal-common/dist/error/InteractionRequiredAuthErrorCodes.mjs:
(*! @azure/msal-common v14.14.2 2024-08-28 *)
@azure/msal-common/dist/error/InteractionRequiredAuthError.mjs:
(*! @azure/msal-common v14.14.2 2024-08-28 *)
@azure/msal-common/dist/utils/ProtocolUtils.mjs:
(*! @azure/msal-common v14.14.2 2024-08-28 *)
@azure/msal-common/dist/crypto/PopTokenGenerator.mjs:
(*! @azure/msal-common v14.14.2 2024-08-28 *)
@azure/msal-common/dist/cache/persistence/TokenCacheContext.mjs:
(*! @azure/msal-common v14.14.2 2024-08-28 *)
@azure/msal-common/dist/response/ResponseHandler.mjs:
(*! @azure/msal-common v14.14.2 2024-08-28 *)
@azure/msal-common/dist/client/AuthorizationCodeClient.mjs:
(*! @azure/msal-common v14.14.2 2024-08-28 *)
@azure/msal-common/dist/client/RefreshTokenClient.mjs:
(*! @azure/msal-common v14.14.2 2024-08-28 *)
@azure/msal-common/dist/client/SilentFlowClient.mjs:
(*! @azure/msal-common v14.14.2 2024-08-28 *)
@azure/msal-common/dist/telemetry/server/ServerTelemetryManager.mjs:
(*! @azure/msal-common v14.14.2 2024-08-28 *)
@azure/msal-common/dist/index.mjs:
(*! @azure/msal-common v14.14.2 2024-08-28 *)
@azure/msal-node/dist/cache/serializer/Deserializer.mjs:
(*! @azure/msal-node v2.13.1 2024-08-29 *)
@azure/msal-node/dist/internals.mjs:
(*! @azure/msal-node v2.13.1 2024-08-29 *)
@azure/msal-node/dist/utils/Constants.mjs:
(*! @azure/msal-node v2.13.1 2024-08-29 *)
@azure/msal-node/dist/utils/NetworkUtils.mjs:
(*! @azure/msal-node v2.13.1 2024-08-29 *)
@azure/msal-node/dist/network/HttpClient.mjs:
(*! @azure/msal-node v2.13.1 2024-08-29 *)
@azure/msal-node/dist/error/ManagedIdentityErrorCodes.mjs:
(*! @azure/msal-node v2.13.1 2024-08-29 *)
@azure/msal-node/dist/error/ManagedIdentityError.mjs:
(*! @azure/msal-node v2.13.1 2024-08-29 *)
@azure/msal-node/dist/config/ManagedIdentityId.mjs:
(*! @azure/msal-node v2.13.1 2024-08-29 *)
@azure/msal-node/dist/retry/LinearRetryPolicy.mjs:
(*! @azure/msal-node v2.13.1 2024-08-29 *)
@azure/msal-node/dist/network/HttpClientWithRetries.mjs:
(*! @azure/msal-node v2.13.1 2024-08-29 *)
@azure/msal-node/dist/error/NodeAuthError.mjs:
(*! @azure/msal-node v2.13.1 2024-08-29 *)
@azure/msal-node/dist/config/Configuration.mjs:
(*! @azure/msal-node v2.13.1 2024-08-29 *)
@azure/msal-node/dist/crypto/GuidGenerator.mjs:
(*! @azure/msal-node v2.13.1 2024-08-29 *)
@azure/msal-node/dist/utils/EncodingUtils.mjs:
(*! @azure/msal-node v2.13.1 2024-08-29 *)
@azure/msal-node/dist/crypto/HashUtils.mjs:
(*! @azure/msal-node v2.13.1 2024-08-29 *)
@azure/msal-node/dist/crypto/PkceGenerator.mjs:
(*! @azure/msal-node v2.13.1 2024-08-29 *)
@azure/msal-node/dist/crypto/CryptoProvider.mjs:
(*! @azure/msal-node v2.13.1 2024-08-29 *)
@azure/msal-node/dist/cache/NodeStorage.mjs:
(*! @azure/msal-node v2.13.1 2024-08-29 *)
@azure/msal-node/dist/cache/TokenCache.mjs:
(*! @azure/msal-node v2.13.1 2024-08-29 *)
@azure/msal-node/dist/client/ClientAssertion.mjs:
(*! @azure/msal-node v2.13.1 2024-08-29 *)
@azure/msal-node/dist/packageMetadata.mjs:
(*! @azure/msal-node v2.13.1 2024-08-29 *)
@azure/msal-node/dist/client/UsernamePasswordClient.mjs:
(*! @azure/msal-node v2.13.1 2024-08-29 *)
@azure/msal-node/dist/client/ClientApplication.mjs:
(*! @azure/msal-node v2.13.1 2024-08-29 *)
@azure/msal-node/dist/network/LoopbackClient.mjs:
(*! @azure/msal-node v2.13.1 2024-08-29 *)
@azure/msal-node/dist/client/DeviceCodeClient.mjs:
(*! @azure/msal-node v2.13.1 2024-08-29 *)
@azure/msal-node/dist/client/PublicClientApplication.mjs:
(*! @azure/msal-node v2.13.1 2024-08-29 *)
@azure/msal-node/dist/client/ClientCredentialClient.mjs:
(*! @azure/msal-node v2.13.1 2024-08-29 *)
@azure/msal-node/dist/client/OnBehalfOfClient.mjs:
(*! @azure/msal-node v2.13.1 2024-08-29 *)
@azure/msal-node/dist/client/ConfidentialClientApplication.mjs:
(*! @azure/msal-node v2.13.1 2024-08-29 *)
@azure/msal-node/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.mjs:
(*! @azure/msal-node v2.13.1 2024-08-29 *)
@azure/msal-node/dist/config/ManagedIdentityRequestParameters.mjs:
(*! @azure/msal-node v2.13.1 2024-08-29 *)
@azure/msal-node/dist/client/ManagedIdentitySources/AppService.mjs:
(*! @azure/msal-node v2.13.1 2024-08-29 *)
@jspm/core/nodelibs/browser/chunk-44e51b61.js:
(*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> *)
@jspm/core/nodelibs/browser/buffer.js:
(*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> *)
@azure/msal-node/dist/client/ManagedIdentitySources/AzureArc.mjs:
(*! @azure/msal-node v2.13.1 2024-08-29 *)
@azure/msal-node/dist/client/ManagedIdentitySources/CloudShell.mjs:
(*! @azure/msal-node v2.13.1 2024-08-29 *)
@azure/msal-node/dist/client/ManagedIdentitySources/Imds.mjs:
(*! @azure/msal-node v2.13.1 2024-08-29 *)
@azure/msal-node/dist/client/ManagedIdentitySources/ServiceFabric.mjs:
(*! @azure/msal-node v2.13.1 2024-08-29 *)
@azure/msal-node/dist/client/ManagedIdentityClient.mjs:
(*! @azure/msal-node v2.13.1 2024-08-29 *)
@azure/msal-node/dist/client/ManagedIdentityApplication.mjs:
(*! @azure/msal-node v2.13.1 2024-08-29 *)
@azure/msal-node/dist/cache/distributed/DistributedCachePlugin.mjs:
(*! @azure/msal-node v2.13.1 2024-08-29 *)
@azure/msal-node/dist/index.mjs:
(*! @azure/msal-node v2.13.1 2024-08-29 *)
tslib/tslib.es6.js:
(*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** *)
*/
Object.defineProperty(exports, "SignInUrlResponse", {
enumerable: true,
get: function () { return u$e.SignInUrlResponse; }
});
Object.defineProperty(exports, "TokenExchangeRequest", {
enumerable: true,
get: function () { return u$e.TokenExchangeRequest; }
});
Object.defineProperty(exports, "TokenStatus", {
enumerable: true,
get: function () { return u$e.TokenStatus; }
});
exports.AppCredentials = ao;
exports.AuthenticationConfiguration = Cn;
exports.AuthenticationError = je;
exports.BetweenBotAndAseChannelTokenValidationParameters = TA;
exports.BotFrameworkAuthentication = db;
exports.BotFrameworkAuthenticationFactory = GL;
exports.CertificateAppCredentials = iw;
exports.CertificateServiceClientCredentialsFactory = JF;
exports.ClaimsIdentity = ya;
exports.ConnectorClient = Xp;
exports.ConnectorClientOptions = export_ConnectorClientOptions;
exports.ConnectorFactory = Sb;
exports.ConversationConstants = R2;
exports.EmulatorApiClient = vx;
exports.EndorsementsValidator = Sp;
exports.FederatedAppCredentials = ow;
exports.FederatedServiceClientCredentialsFactory = QF;
exports.JwtTokenProviderFactory = vz;
exports.ManagedIdentityAppCredentials = yw;
exports.ManagedIdentityAuthenticator = mw;
exports.ManagedIdentityServiceClientCredentialsFactory = bz;
exports.MicrosoftAppCredentials = qc;
exports.MicrosoftGovernmentAppCredentials = vw;
exports.MsalAppCredentials = si;
exports.MsalServiceClientCredentialsFactory = rx;
exports.PasswordServiceClientCredentialFactory = wz;
exports.ReadReceiptInfo = Rz;
exports.ServiceClientCredentialsFactory = Lc;
exports.SimpleCredentialProvider = Zv;
exports.Teams = Sw;
exports.TeamsConnectorClient = Tz;
exports.TeamsConnectorClientContext = Cw;
exports.TeamsConnectorMappers = Sz;
exports.TeamsConnectorModels = Eme;
exports.ToBotFromBotOrEmulatorTokenValidationParameters = Bo;
exports.TokenApiClient = Tm;
exports.TokenApiModels = PL;
exports.TokenCredentials = Wp;
exports.UserTokenClient = Rm;
exports.allowedCallersClaimsValidator = $Be;
exports.retryAction = Hc;
//# sourceMappingURL=browser.js.map
//# sourceMappingURL=browser.js.map