rmapi-js 6.0.0 → 7.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1,21 @@
1
- function lt(t){return o[t>>18&63]+o[t>>12&63]+o[t>>6&63]+o[t&63]}function ot(t,n,r){var u,i=[];for(var c=n;c<r;c+=3)u=(t[c]<<16&16711680)+(t[c+1]<<8&65280)+(t[c+2]&255),i.push(lt(u));return i.join("")}function at(t){var n,r=t.length,u=r%3,i=[],c=16383;for(var a=0,d=r-u;a<d;a+=c)i.push(ot(t,a,a+c>d?d:a+c));if(u===1)n=t[r-1],i.push(o[n>>2]+o[n<<4&63]+"==");else if(u===2)n=(t[r-2]<<8)+t[r-1],i.push(o[n>>10]+o[n>>4&63]+o[n<<2&63]+"=");return i.join("")}var P=at;var o=[],U=[];var K="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(w=0,I=K.length;w<I;++w)o[w]=K[w],U[K.charCodeAt(w)]=w;var w,I;U["-".charCodeAt(0)]=62;U["_".charCodeAt(0)]=63;function X(t){return typeof t==="object"&&t!==null&&!Array.isArray(t)}function M(t=0.5){return Math.random()<t}function q(t,n){return t+Math.floor(Math.random()*(n-t))}function D(t){return t[q(0,t.length)]}function S(){if(j===void 0){const t=Math.sqrt(-2*Math.log(Math.random())),n=2*Math.PI*Math.random();return j=t*Math.sin(n),t*Math.cos(n)}else{const t=j;return j=void 0,t}}function h(t=1){const n=Math.exp(-t);let r=0,u=Math.random();while(u>n)r++,u*=Math.random();return r}function A(t){return Array(t).fill(null).map(()=>Y.charAt(Math.floor(Math.random()*Y.length))).join("")}function*e(...t){for(let n of t)yield*n}function*O(t,n){let r=0;for(let u of t)yield n(u,r++)}function*ht(t,n){let r=0;for(let u of t)if(n(u,r++))yield u}function*mt(t){for(let n=0;n<t;++n)yield n}function _(){return new V}function F(){return new b("float64")}function l(){return new R}function C(...t){const n=new Set(t);if(n.size!==t.length)throw new Error("enum can't contain duplicates");else return new y(t,n)}function Z(t){if(t.definitions)throw new Error("definitions can only exist on a root schema");else return new k(t)}function N(t){if(t.definitions)throw new Error("definitions can only exist on a root schema");else return new L(t)}function m(t,n,r){return zt(t?Object.entries(t):void 0,n?Object.entries(n):void 0,r)}function B(t,n){return ft(t,n,Object.entries(n))}var wt={int8:[-128,128],int16:[-32768,32768],int32:[-2147483648,2147483648],uint8:[0,256],uint16:[0,65536],uint32:[0,4294967296]},j,Y="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 ;,'\"",zt=function(t,n,r){const u=new Set(O(e(t??[],n??[]),([i])=>i));if(t?.some(([,i])=>i.definitions))throw new Error("definitions can only exist on a root schema");else if(n?.some(([,i])=>i.definitions))throw new Error("definitions can only exist on a root schema");else if(u.size!==(t?.length??0)+(n?.length??0))throw new Error("properties and optionalProperties keys must be unique");else return new H(t,n,r??!1,u)},ft=function(t,n,r){if(r.some(([,u])=>u.definitions))throw new Error("definitions can only exist on a root schema");else if(r.some(([,u])=>u.keys?.has(t)??!0))throw new Error("all discriminator mappings must be properties schemas that don't contain discriminator");else return new p(t,n,r)};class dt{#t;definitions;nullable=!0;constructor(t){this.#t=t,this.definitions=t.definitions}guard(t){return t===null||this.#t.guard(t)}fuzz(){return M(0.1)?null:this.#t.fuzz()}schema(){return{...this.#t.schema(),nullable:!0}}}class jt{#t;#n;definitions;nullable;constructor(t,n){this.#t=t,this.#n=n,this.definitions=t.definitions,this.nullable=t.nullable}guard(t){return this.#t.guard(t)}fuzz(){return this.#t.fuzz()}schema(){return{...this.#t.schema(),metadata:this.#n}}}class V{guard(t){return typeof t==="boolean"}fuzz(){return M()}schema(){return{type:"boolean"}}}class Ot{#t;#n;#r;constructor(t){this.#t=t,[this.#n,this.#r]=wt[t]}guard(t){return typeof t==="number"&&t%1===0&&this.#n<=t&&t<this.#r}fuzz(){return q(this.#n,this.#r)}schema(){return{type:this.#t}}}class b{#t;constructor(t){this.#t=t}guard(t){return typeof t==="number"}fuzz(){return S()}schema(){return{type:this.#t}}}class R{guard(t){return typeof t==="string"}fuzz(){return A(h(3))}schema(){return{type:"string"}}}class y{#t;#n;constructor(t,n){this.#t=t,this.#n=n}guard(t){return typeof t==="string"&&this.#n.has(t)}fuzz(){return D(this.#t)}schema(){return{enum:[...this.#t]}}}class k{#t;constructor(t){this.#t=t}guard(t){return Array.isArray(t)&&t.every((n)=>this.#t.guard(n))}fuzz(){return Array(h()).fill(null).map(()=>this.#t.fuzz())}schema(){return{elements:this.#t.schema()}}}class L{#t;constructor(t){this.#t=t}guard(t){return X(t)&&Object.values(t).every((n)=>this.#t.guard(n))}fuzz(){return Object.fromEntries(Array(h()).fill(null).map(()=>[A(h(3)),this.#t.fuzz()]))}schema(){return{values:this.#t.schema()}}}class H{#t;#n;#r;keys;constructor(t,n,r,u){this.#t=t,this.#n=n,this.#r=r,this.keys=u}guard(t){return X(t)&&(this.#t?.every(([n,r])=>r.guard(t[n]))??!0)&&(this.#n?.every(([n,r])=>t[n]===void 0||r.guard(t[n]))??!0)&&(this.#r||Object.keys(t).every((n)=>this.keys.has(n)))}fuzz(){const t=O(this.#t??[],([u,i])=>[u,i.fuzz()]),n=O(ht(this.#n??[],()=>M()),([u,i])=>[u,i.fuzz()]),r=this.#r?O(mt(h()),()=>[A(h(3)),D([()=>null,M,S,()=>A(h()),()=>[],()=>({})])()]):[];return Object.fromEntries(e(t,n,r))}schema(){const t={};if(this.#t)t.properties=Object.fromEntries(this.#t.map(([n,r])=>[n,r.schema()]));if(this.#n)t.optionalProperties=Object.fromEntries(this.#n.map(([n,r])=>[n,r.schema()]));if(this.#r)t.additionalProperties=!0;return t}}class p{#t;#n;#r;constructor(t,n,r){this.#t=t,this.#n=n,this.#r=r}guard(t){if(!X(t))return!1;const{[this.#t]:n,...r}=t;if(typeof n!=="string")return!1;return this.#n[n]?.guard(r)??!1}fuzz(){const[t,n]=D(this.#r);return{...n.fuzz(),[this.#t]:t}}schema(){const t=Object.fromEntries(this.#r.map(([n,r])=>[n,r.schema()]));return{discriminator:this.#t,mapping:t}}}class T{#t;#n;definitions=!0;constructor(t,n){this.#t=t,this.#n=n}guard(t){return this.#n.guard(t)}fuzz(){return this.#n.fuzz()}schema(){const t=Object.fromEntries(Object.entries(this.#t).map(([n,r])=>[n,r.schema()]));return{...this.#n.schema(),definitions:t}}}class v{#t;#n;constructor(t,n){this.#t=t,this.#n=n}guard(t){return this.#n.guard(t)}fuzz(){return this.#n.fuzz()}schema(){return{ref:this.#t}}}class tt{#t;#n;constructor(t,n){this.#t=t,this.#n=n}def(t,n){const r=n(this.#n);return new tt({...this.#t,[t]:r},{...this.#n,[t]:new v(t,r)})}build(t){return new T(this.#t,t(this.#n))}}class Mt{#t;#n;constructor(t,n){this.#n=t,this.#t=n}guard(t){return this.#n[this.#t].guard(t)}fuzz(){return this.#n[this.#t].fuzz()}schema(){return{ref:this.#t}}}function nt(t,n=0){return(s[t[n+0]]+s[t[n+1]]+s[t[n+2]]+s[t[n+3]]+"-"+s[t[n+4]]+s[t[n+5]]+"-"+s[t[n+6]]+s[t[n+7]]+"-"+s[t[n+8]]+s[t[n+9]]+"-"+s[t[n+10]]+s[t[n+11]]+s[t[n+12]]+s[t[n+13]]+s[t[n+14]]+s[t[n+15]]).toLowerCase()}var s=[];for(E=0;E<256;++E)s.push((E+256).toString(16).slice(1));var E;var J,At=new Uint8Array(16);function $(){if(!J){if(J=typeof crypto!=="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!J)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported")}return J(At)}var Et=typeof crypto!=="undefined"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),G={randomUUID:Et};function Jt(t,n,r){if(G.randomUUID&&!n&&!t)return G.randomUUID();t=t||{};var u=t.random||(t.rng||$)();if(u[6]=u[6]&15|64,u[8]=u[8]&63|128,n){r=r||0;for(var i=0;i<16;++i)n[r+i]=u[i];return n}return nt(u)}var W=Jt;function x(t,n,r){if(!r||n.guard(t))return t;else throw new Error(`couldn't validate schema: ${JSON.stringify(t)} didn't match schema ${JSON.stringify(n.schema())}`)}async function Bt(t,{deviceDesc:n="browser-chrome",uuid:r=W(),authHost:u=it,fetch:i=globalThis.fetch}={}){if(t.length!==8)throw new Error(`code should be length 8, but was ${t.length}`);const c=await i(`${u}/token/json/2/device/new`,{method:"POST",headers:{Authorization:"Bearer"},body:JSON.stringify({code:t,deviceDesc:n,deviceID:r})});if(!c.ok)throw new g(c.status,c.statusText,"couldn't register api");else return await c.text()}async function Vt(t,{fetch:n=globalThis.fetch,authHost:r=it,syncHost:u=Qt}={}){const i=await n(`${r}/token/json/2/user/new`,{method:"POST",headers:{Authorization:`Bearer ${t}`}});if(!i.ok)throw new Error(`couldn't fetch auth token: ${i.statusText}`);const c=await i.text();return new ct(c,n,u)}var it="https://webapp-prod.cloud.remarkable.engineering",Qt="https://web.eu.tectonic.remarkable.com",z=/^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}||trash)$/,Q=/^[0-9a-f]{64}$/,rt={id:l(),hash:l(),visibleName:l(),lastModified:l(),pinned:_()},ut={parent:l(),tags:Z(m({name:l(),timestamp:F()}))},xt=B("type",{CollectionType:m(rt,ut,!0),DocumentType:m({...rt,lastOpened:l(),fileType:C("epub","pdf","notebook")},ut,!0)}),Kt=Z(xt),Ut=m({docID:l(),hash:l()}),Pt=m({hash:l()}),Xt=m({hashes:N(l())});class g extends Error{status;statusText;constructor(t,n,r){super(r);this.status=t,this.statusText=n}}class f extends Error{field;regex;constructor(t,n,r){super(r);this.field=t,this.regex=n}}class ct{#t;#n;#r;constructor(t,n,r){this.#t=t,this.#n=n,this.#r=r}async#s(t,{body:n,method:r="POST",headers:u={}}){const i=await this.#n(t,{method:r,headers:{Authorization:`Bearer ${this.#t}`,...u},body:n});if(!i.ok){const c=await i.text();throw new g(i.status,i.statusText,`failed reMarkable request: ${c}`)}else return i}async#u({meta:t="",method:n="GET",contentType:r="text/plain;charset=UTF-8",body:u,hash:i}={}){const a=new TextEncoder().encode(t),d=i===void 0?"":`/${i}`,st=await(await this.#s(`${this.#r}/doc/v2/files${d}`,{body:u,method:n,headers:{"content-type":r,"rm-meta":P(a),"rm-source":"WebLibrary"}})).text();return JSON.parse(st)}async listFiles({verify:t=!0}={}){const n=await this.#u();return x(n,Kt,t)}async#i(t,n,r,u,i){if(i&&!z.test(t))throw new f(t,z,"parent must be a valid document id");const c=await this.#u({meta:JSON.stringify({parent:t,file_name:n}),method:"POST",contentType:u,body:r});return x(c,Ut,i)}async createFolder(t,{parent:n="",verify:r=!0}={}){return await this.#i(n,t,new ArrayBuffer(0),"folder",r)}async uploadEpub(t,n,{parent:r="",verify:u=!0}={}){return await this.#i(r,t,n,"application/epub+zip",u)}async uploadPdf(t,n,{parent:r="",verify:u=!0}={}){return await this.#i(r,t,n,"application/pdf",u)}async#c(t,n,r){if(r&&!Q.test(t))throw new f(t,Q,"hash to modify was not a valid hash");const u=await this.#u({hash:t,body:JSON.stringify(n),method:"PATCH"});return x(u,Pt,r)}async move(t,n,{verify:r=!0}={}){if(r&&!z.test(n))throw new f(n,z,"parent must be a valid document id");return await this.#c(t,{parent:n},r)}async delete(t,n={}){return await this.move(t,"trash",n)}async rename(t,n,{verify:r=!0}={}){return await this.#c(t,{file_name:n},r)}async#l(t,n,r){if(r){if(t.filter((c)=>!Q.test(c)).length)throw new f(t.join(", "),Q,"hashes to modify were not a valid hashes")}const u=await this.#u({body:JSON.stringify({updates:n,hashes:t}),method:"PATCH"});return x(u,Xt,r)}async bulkMove(t,n,{verify:r=!0}={}){if(r&&!z.test(n))throw new f(n,z,"parent must be a valid document id");return await this.#l(t,{parent:n},r)}async bulkDelete(t,n={}){return await this.bulkMove(t,"trash",n)}}export{Vt as remarkable,Bt as register,f as ValidationError,g as ResponseError};
1
+ var oV=Object.create;var{getPrototypeOf:iV,defineProperty:M1,getOwnPropertyNames:R$,getOwnPropertyDescriptor:nV}=Object,A$=Object.prototype.hasOwnProperty;var x$=($,V,Q)=>{Q=$!=null?oV(iV($)):{};let q=V||!$||!$.__esModule?M1(Q,"default",{value:$,enumerable:!0}):Q;for(let K of R$($))if(!A$.call(q,K))M1(q,K,{get:()=>$[K],enumerable:!0});return q},v$=new WeakMap,T$=($)=>{var V=v$.get($),Q;if(V)return V;if(V=M1({},"__esModule",{value:!0}),$&&typeof $==="object"||typeof $==="function")R$($).map((q)=>!A$.call(V,q)&&M1(V,q,{get:()=>$[q],enumerable:!(Q=nV($,q))||Q.enumerable}));return v$.set($,V),V},$0=($,V)=>()=>(V||$((V={exports:{}}).exports,V),V.exports);var aV=($,V)=>{for(var Q in V)M1($,Q,{get:V[Q],enumerable:!0,configurable:!0,set:(q)=>V[Q]=()=>q})};var rV=($,V)=>()=>($&&(V=$($=0)),V);var g$=$0((c2)=>{/*! crc32.js (C) 2014-present SheetJS -- http://sheetjs.com */var k$;(function($){if(typeof DO_NOT_EXPORT_CRC==="undefined")if(typeof c2==="object")$(c2);else if(typeof define==="function"&&define.amd)define(function(){var V={};return $(V),V});else $(k$={});else $(k$={})})(function($){$.version="1.2.2";function V(){var L=0,T=new Array(256);for(var E=0;E!=256;++E)L=E,L=L&1?-2097792136^L>>>1:L>>>1,L=L&1?-2097792136^L>>>1:L>>>1,L=L&1?-2097792136^L>>>1:L>>>1,L=L&1?-2097792136^L>>>1:L>>>1,L=L&1?-2097792136^L>>>1:L>>>1,L=L&1?-2097792136^L>>>1:L>>>1,L=L&1?-2097792136^L>>>1:L>>>1,L=L&1?-2097792136^L>>>1:L>>>1,T[E]=L;return typeof Int32Array!=="undefined"?new Int32Array(T):T}var Q=V();function q(L){var T=0,E=0,f=0,b=typeof Int32Array!=="undefined"?new Int32Array(4096):new Array(4096);for(f=0;f!=256;++f)b[f]=L[f];for(f=0;f!=256;++f){E=L[f];for(T=256+f;T<4096;T+=256)E=b[T]=E>>>8^L[E&255]}var F=[];for(f=1;f!=16;++f)F[f-1]=typeof Int32Array!=="undefined"?b.subarray(f*256,f*256+256):b.slice(f*256,f*256+256);return F}var K=q(Q),G=K[0],W=K[1],J=K[2],P=K[3],j=K[4],z=K[5],I=K[6],N=K[7],A=K[8],x=K[9],k=K[10],g=K[11],y=K[12],Z=K[13],O=K[14];function M(L,T){var E=T^-1;for(var f=0,b=L.length;f<b;)E=E>>>8^Q[(E^L.charCodeAt(f++))&255];return~E}function R(L,T){var E=T^-1,f=L.length-15,b=0;for(;b<f;)E=O[L[b++]^E&255]^Z[L[b++]^E>>8&255]^y[L[b++]^E>>16&255]^g[L[b++]^E>>>24]^k[L[b++]]^x[L[b++]]^A[L[b++]]^N[L[b++]]^I[L[b++]]^z[L[b++]]^j[L[b++]]^P[L[b++]]^J[L[b++]]^W[L[b++]]^G[L[b++]]^Q[L[b++]];f+=15;while(b<f)E=E>>>8^Q[(E^L[b++])&255];return~E}function C(L,T){var E=T^-1;for(var f=0,b=L.length,F=0,m=0;f<b;)if(F=L.charCodeAt(f++),F<128)E=E>>>8^Q[(E^F)&255];else if(F<2048)E=E>>>8^Q[(E^(192|F>>6&31))&255],E=E>>>8^Q[(E^(128|F&63))&255];else if(F>=55296&&F<57344)F=(F&1023)+64,m=L.charCodeAt(f++)&1023,E=E>>>8^Q[(E^(240|F>>8&7))&255],E=E>>>8^Q[(E^(128|F>>2&63))&255],E=E>>>8^Q[(E^(128|m>>6&15|(F&3)<<4))&255],E=E>>>8^Q[(E^(128|m&63))&255];else E=E>>>8^Q[(E^(224|F>>12&15))&255],E=E>>>8^Q[(E^(128|F>>6&63))&255],E=E>>>8^Q[(E^(128|F&63))&255];return~E}$.table=Q,$.bstr=M,$.buf=R,$.str=C})});var a2={};aV(a2,{default:()=>l$});var $7,o1,Q7,V7,q7,X7,Y7=($,V)=>()=>($&&(V=$($=0)),V),j0=($,V)=>()=>(V||$((V={exports:{}}).exports,V),V.exports),y$=($,V)=>{for(var Q in V)o1($,Q,{get:V[Q],enumerable:!0})},d1=($,V,Q,q)=>{if(V&&typeof V=="object"||typeof V=="function")for(let K of V7(V))!X7.call($,K)&&K!==Q&&o1($,K,{get:()=>V[K],enumerable:!(q=Q7(V,K))||q.enumerable});return $},b$=($,V,Q)=>(d1($,V,"default"),Q&&d1(Q,V,"default")),l1=($,V,Q)=>(Q=$!=null?$7(q7($)):{},d1(V||!$||!$.__esModule?o1(Q,"default",{value:$,enumerable:!0}):Q,$)),g6=($)=>d1(o1({},"__esModule",{value:!0}),$),K7,J7,H6,x0,X6,u2,f0,i1,E$,K6,f$,E6,y6,b6,G7,r6,d2,l2,o2,U7,i2,W7,j7,h$,n1,_$,P7,Y6,m$,p$,n2,z7,c$,Z7,u$,d$,l$;var r2=rV(()=>{$7=Object.create,o1=Object.defineProperty,Q7=Object.getOwnPropertyDescriptor,V7=Object.getOwnPropertyNames,q7=Object.getPrototypeOf,X7=Object.prototype.hasOwnProperty,K7=j0(($)=>{$.byteLength=P,$.toByteArray=z,$.fromByteArray=A;var V=[],Q=[],q=typeof Uint8Array<"u"?Uint8Array:Array,K="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(G=0,W=K.length;G<W;++G)V[G]=K[G],Q[K.charCodeAt(G)]=G;var G,W;Q[45]=62,Q[95]=63;function J(x){var k=x.length;if(k%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var g=x.indexOf("=");g===-1&&(g=k);var y=g===k?0:4-g%4;return[g,y]}function P(x){var k=J(x),g=k[0],y=k[1];return(g+y)*3/4-y}function j(x,k,g){return(k+g)*3/4-g}function z(x){var k,g=J(x),y=g[0],Z=g[1],O=new q(j(x,y,Z)),M=0,R=Z>0?y-4:y,C;for(C=0;C<R;C+=4)k=Q[x.charCodeAt(C)]<<18|Q[x.charCodeAt(C+1)]<<12|Q[x.charCodeAt(C+2)]<<6|Q[x.charCodeAt(C+3)],O[M++]=k>>16&255,O[M++]=k>>8&255,O[M++]=k&255;return Z===2&&(k=Q[x.charCodeAt(C)]<<2|Q[x.charCodeAt(C+1)]>>4,O[M++]=k&255),Z===1&&(k=Q[x.charCodeAt(C)]<<10|Q[x.charCodeAt(C+1)]<<4|Q[x.charCodeAt(C+2)]>>2,O[M++]=k>>8&255,O[M++]=k&255),O}function I(x){return V[x>>18&63]+V[x>>12&63]+V[x>>6&63]+V[x&63]}function N(x,k,g){for(var y,Z=[],O=k;O<g;O+=3)y=(x[O]<<16&16711680)+(x[O+1]<<8&65280)+(x[O+2]&255),Z.push(I(y));return Z.join("")}function A(x){for(var k,g=x.length,y=g%3,Z=[],O=16383,M=0,R=g-y;M<R;M+=O)Z.push(N(x,M,M+O>R?R:M+O));return y===1?(k=x[g-1],Z.push(V[k>>2]+V[k<<4&63]+"==")):y===2&&(k=(x[g-2]<<8)+x[g-1],Z.push(V[k>>10]+V[k>>4&63]+V[k<<2&63]+"=")),Z.join("")}}),J7=j0(($)=>{$.read=function(V,Q,q,K,G){var W,J,P=G*8-K-1,j=(1<<P)-1,z=j>>1,I=-7,N=q?G-1:0,A=q?-1:1,x=V[Q+N];for(N+=A,W=x&(1<<-I)-1,x>>=-I,I+=P;I>0;W=W*256+V[Q+N],N+=A,I-=8);for(J=W&(1<<-I)-1,W>>=-I,I+=K;I>0;J=J*256+V[Q+N],N+=A,I-=8);if(W===0)W=1-z;else{if(W===j)return J?NaN:(x?-1:1)*(1/0);J=J+Math.pow(2,K),W=W-z}return(x?-1:1)*J*Math.pow(2,W-K)},$.write=function(V,Q,q,K,G,W){var J,P,j,z=W*8-G-1,I=(1<<z)-1,N=I>>1,A=G===23?Math.pow(2,-24)-Math.pow(2,-77):0,x=K?0:W-1,k=K?1:-1,g=Q<0||Q===0&&1/Q<0?1:0;for(Q=Math.abs(Q),isNaN(Q)||Q===1/0?(P=isNaN(Q)?1:0,J=I):(J=Math.floor(Math.log(Q)/Math.LN2),Q*(j=Math.pow(2,-J))<1&&(J--,j*=2),J+N>=1?Q+=A/j:Q+=A*Math.pow(2,1-N),Q*j>=2&&(J++,j/=2),J+N>=I?(P=0,J=I):J+N>=1?(P=(Q*j-1)*Math.pow(2,G),J=J+N):(P=Q*Math.pow(2,N-1)*Math.pow(2,G),J=0));G>=8;V[q+x]=P&255,x+=k,P/=256,G-=8);for(J=J<<G|P,z+=G;z>0;V[q+x]=J&255,x+=k,J/=256,z-=8);V[q+x-k]|=g*128}}),H6=j0(($)=>{var V=K7(),Q=J7(),q=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;$.Buffer=J,$.SlowBuffer=Z,$.INSPECT_MAX_BYTES=50;var K=2147483647;$.kMaxLength=K,J.TYPED_ARRAY_SUPPORT=G(),!J.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&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 G(){try{let X=new Uint8Array(1),Y={foo:function(){return 42}};return Object.setPrototypeOf(Y,Uint8Array.prototype),Object.setPrototypeOf(X,Y),X.foo()===42}catch{return!1}}Object.defineProperty(J.prototype,"parent",{enumerable:!0,get:function(){if(J.isBuffer(this))return this.buffer}}),Object.defineProperty(J.prototype,"offset",{enumerable:!0,get:function(){if(J.isBuffer(this))return this.byteOffset}});function W(X){if(X>K)throw new RangeError('The value "'+X+'" is invalid for option "size"');let Y=new Uint8Array(X);return Object.setPrototypeOf(Y,J.prototype),Y}function J(X,Y,U){if(typeof X=="number"){if(typeof Y=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return I(X)}return P(X,Y,U)}J.poolSize=8192;function P(X,Y,U){if(typeof X=="string")return N(X,Y);if(ArrayBuffer.isView(X))return x(X);if(X==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof X);if(z0(X,ArrayBuffer)||X&&z0(X.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(z0(X,SharedArrayBuffer)||X&&z0(X.buffer,SharedArrayBuffer)))return k(X,Y,U);if(typeof X=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let H=X.valueOf&&X.valueOf();if(H!=null&&H!==X)return J.from(H,Y,U);let w=g(X);if(w)return w;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof X[Symbol.toPrimitive]=="function")return J.from(X[Symbol.toPrimitive]("string"),Y,U);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof X)}J.from=function(X,Y,U){return P(X,Y,U)},Object.setPrototypeOf(J.prototype,Uint8Array.prototype),Object.setPrototypeOf(J,Uint8Array);function j(X){if(typeof X!="number")throw new TypeError('"size" argument must be of type number');if(X<0)throw new RangeError('The value "'+X+'" is invalid for option "size"')}function z(X,Y,U){return j(X),X<=0?W(X):Y!==void 0?typeof U=="string"?W(X).fill(Y,U):W(X).fill(Y):W(X)}J.alloc=function(X,Y,U){return z(X,Y,U)};function I(X){return j(X),W(X<0?0:y(X)|0)}J.allocUnsafe=function(X){return I(X)},J.allocUnsafeSlow=function(X){return I(X)};function N(X,Y){if((typeof Y!="string"||Y==="")&&(Y="utf8"),!J.isEncoding(Y))throw new TypeError("Unknown encoding: "+Y);let U=O(X,Y)|0,H=W(U),w=H.write(X,Y);return w!==U&&(H=H.slice(0,w)),H}function A(X){let Y=X.length<0?0:y(X.length)|0,U=W(Y);for(let H=0;H<Y;H+=1)U[H]=X[H]&255;return U}function x(X){if(z0(X,Uint8Array)){let Y=new Uint8Array(X);return k(Y.buffer,Y.byteOffset,Y.byteLength)}return A(X)}function k(X,Y,U){if(Y<0||X.byteLength<Y)throw new RangeError('"offset" is outside of buffer bounds');if(X.byteLength<Y+(U||0))throw new RangeError('"length" is outside of buffer bounds');let H;return Y===void 0&&U===void 0?H=new Uint8Array(X):U===void 0?H=new Uint8Array(X,Y):H=new Uint8Array(X,Y,U),Object.setPrototypeOf(H,J.prototype),H}function g(X){if(J.isBuffer(X)){let Y=y(X.length)|0,U=W(Y);return U.length===0||X.copy(U,0,0,Y),U}if(X.length!==void 0)return typeof X.length!="number"||b0(X.length)?W(0):A(X);if(X.type==="Buffer"&&Array.isArray(X.data))return A(X.data)}function y(X){if(X>=K)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+K.toString(16)+" bytes");return X|0}function Z(X){return+X!=X&&(X=0),J.alloc(+X)}J.isBuffer=function(X){return X!=null&&X._isBuffer===!0&&X!==J.prototype},J.compare=function(X,Y){if(z0(X,Uint8Array)&&(X=J.from(X,X.offset,X.byteLength)),z0(Y,Uint8Array)&&(Y=J.from(Y,Y.offset,Y.byteLength)),!J.isBuffer(X)||!J.isBuffer(Y))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(X===Y)return 0;let U=X.length,H=Y.length;for(let w=0,h=Math.min(U,H);w<h;++w)if(X[w]!==Y[w]){U=X[w],H=Y[w];break}return U<H?-1:H<U?1:0},J.isEncoding=function(X){switch(String(X).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},J.concat=function(X,Y){if(!Array.isArray(X))throw new TypeError('"list" argument must be an Array of Buffers');if(X.length===0)return J.alloc(0);let U;if(Y===void 0)for(Y=0,U=0;U<X.length;++U)Y+=X[U].length;let H=J.allocUnsafe(Y),w=0;for(U=0;U<X.length;++U){let h=X[U];if(z0(h,Uint8Array))w+h.length>H.length?(J.isBuffer(h)||(h=J.from(h)),h.copy(H,w)):Uint8Array.prototype.set.call(H,h,w);else if(J.isBuffer(h))h.copy(H,w);else throw new TypeError('"list" argument must be an Array of Buffers');w+=h.length}return H};function O(X,Y){if(J.isBuffer(X))return X.length;if(ArrayBuffer.isView(X)||z0(X,ArrayBuffer))return X.byteLength;if(typeof X!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof X);let U=X.length,H=arguments.length>2&&arguments[2]===!0;if(!H&&U===0)return 0;let w=!1;for(;;)switch(Y){case"ascii":case"latin1":case"binary":return U;case"utf8":case"utf-8":return _(X).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U*2;case"hex":return U>>>1;case"base64":return W0(X).length;default:if(w)return H?-1:_(X).length;Y=(""+Y).toLowerCase(),w=!0}}J.byteLength=O;function M(X,Y,U){let H=!1;if((Y===void 0||Y<0)&&(Y=0),Y>this.length||((U===void 0||U>this.length)&&(U=this.length),U<=0)||(U>>>=0,Y>>>=0,U<=Y))return"";for(X||(X="utf8");;)switch(X){case"hex":return e(this,Y,U);case"utf8":case"utf-8":return n(this,Y,U);case"ascii":return u(this,Y,U);case"latin1":case"binary":return i(this,Y,U);case"base64":return m(this,Y,U);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return d(this,Y,U);default:if(H)throw new TypeError("Unknown encoding: "+X);X=(X+"").toLowerCase(),H=!0}}J.prototype._isBuffer=!0;function R(X,Y,U){let H=X[Y];X[Y]=X[U],X[U]=H}J.prototype.swap16=function(){let X=this.length;if(X%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let Y=0;Y<X;Y+=2)R(this,Y,Y+1);return this},J.prototype.swap32=function(){let X=this.length;if(X%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let Y=0;Y<X;Y+=4)R(this,Y,Y+3),R(this,Y+1,Y+2);return this},J.prototype.swap64=function(){let X=this.length;if(X%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let Y=0;Y<X;Y+=8)R(this,Y,Y+7),R(this,Y+1,Y+6),R(this,Y+2,Y+5),R(this,Y+3,Y+4);return this},J.prototype.toString=function(){let X=this.length;return X===0?"":arguments.length===0?n(this,0,X):M.apply(this,arguments)},J.prototype.toLocaleString=J.prototype.toString,J.prototype.equals=function(X){if(!J.isBuffer(X))throw new TypeError("Argument must be a Buffer");return this===X?!0:J.compare(this,X)===0},J.prototype.inspect=function(){let X="",Y=$.INSPECT_MAX_BYTES;return X=this.toString("hex",0,Y).replace(/(.{2})/g,"$1 ").trim(),this.length>Y&&(X+=" ... "),"<Buffer "+X+">"},q&&(J.prototype[q]=J.prototype.inspect),J.prototype.compare=function(X,Y,U,H,w){if(z0(X,Uint8Array)&&(X=J.from(X,X.offset,X.byteLength)),!J.isBuffer(X))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof X);if(Y===void 0&&(Y=0),U===void 0&&(U=X?X.length:0),H===void 0&&(H=0),w===void 0&&(w=this.length),Y<0||U>X.length||H<0||w>this.length)throw new RangeError("out of range index");if(H>=w&&Y>=U)return 0;if(H>=w)return-1;if(Y>=U)return 1;if(Y>>>=0,U>>>=0,H>>>=0,w>>>=0,this===X)return 0;let h=w-H,o=U-Y,U0=Math.min(h,o),A0=this.slice(H,w),O0=X.slice(Y,U);for(let Z0=0;Z0<U0;++Z0)if(A0[Z0]!==O0[Z0]){h=A0[Z0],o=O0[Z0];break}return h<o?-1:o<h?1:0};function C(X,Y,U,H,w){if(X.length===0)return-1;if(typeof U=="string"?(H=U,U=0):U>2147483647?U=2147483647:U<-2147483648&&(U=-2147483648),U=+U,b0(U)&&(U=w?0:X.length-1),U<0&&(U=X.length+U),U>=X.length){if(w)return-1;U=X.length-1}else if(U<0)if(w)U=0;else return-1;if(typeof Y=="string"&&(Y=J.from(Y,H)),J.isBuffer(Y))return Y.length===0?-1:L(X,Y,U,H,w);if(typeof Y=="number")return Y=Y&255,typeof Uint8Array.prototype.indexOf=="function"?w?Uint8Array.prototype.indexOf.call(X,Y,U):Uint8Array.prototype.lastIndexOf.call(X,Y,U):L(X,[Y],U,H,w);throw new TypeError("val must be string, number or Buffer")}function L(X,Y,U,H,w){let h=1,o=X.length,U0=Y.length;if(H!==void 0&&(H=String(H).toLowerCase(),H==="ucs2"||H==="ucs-2"||H==="utf16le"||H==="utf-16le")){if(X.length<2||Y.length<2)return-1;h=2,o/=2,U0/=2,U/=2}function A0(Z0,D0){return h===1?Z0[D0]:Z0.readUInt16BE(D0*h)}let O0;if(w){let Z0=-1;for(O0=U;O0<o;O0++)if(A0(X,O0)===A0(Y,Z0===-1?0:O0-Z0)){if(Z0===-1&&(Z0=O0),O0-Z0+1===U0)return Z0*h}else Z0!==-1&&(O0-=O0-Z0),Z0=-1}else for(U+U0>o&&(U=o-U0),O0=U;O0>=0;O0--){let Z0=!0;for(let D0=0;D0<U0;D0++)if(A0(X,O0+D0)!==A0(Y,D0)){Z0=!1;break}if(Z0)return O0}return-1}J.prototype.includes=function(X,Y,U){return this.indexOf(X,Y,U)!==-1},J.prototype.indexOf=function(X,Y,U){return C(this,X,Y,U,!0)},J.prototype.lastIndexOf=function(X,Y,U){return C(this,X,Y,U,!1)};function T(X,Y,U,H){U=Number(U)||0;let w=X.length-U;H?(H=Number(H),H>w&&(H=w)):H=w;let h=Y.length;H>h/2&&(H=h/2);let o;for(o=0;o<H;++o){let U0=parseInt(Y.substr(o*2,2),16);if(b0(U0))return o;X[U+o]=U0}return o}function E(X,Y,U,H){return X0(_(Y,X.length-U),X,U,H)}function f(X,Y,U,H){return X0(a(Y),X,U,H)}function b(X,Y,U,H){return X0(W0(Y),X,U,H)}function F(X,Y,U,H){return X0(s(Y,X.length-U),X,U,H)}J.prototype.write=function(X,Y,U,H){if(Y===void 0)H="utf8",U=this.length,Y=0;else if(U===void 0&&typeof Y=="string")H=Y,U=this.length,Y=0;else if(isFinite(Y))Y=Y>>>0,isFinite(U)?(U=U>>>0,H===void 0&&(H="utf8")):(H=U,U=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let w=this.length-Y;if((U===void 0||U>w)&&(U=w),X.length>0&&(U<0||Y<0)||Y>this.length)throw new RangeError("Attempt to write outside buffer bounds");H||(H="utf8");let h=!1;for(;;)switch(H){case"hex":return T(this,X,Y,U);case"utf8":case"utf-8":return E(this,X,Y,U);case"ascii":case"latin1":case"binary":return f(this,X,Y,U);case"base64":return b(this,X,Y,U);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return F(this,X,Y,U);default:if(h)throw new TypeError("Unknown encoding: "+H);H=(""+H).toLowerCase(),h=!0}},J.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function m(X,Y,U){return Y===0&&U===X.length?V.fromByteArray(X):V.fromByteArray(X.slice(Y,U))}function n(X,Y,U){U=Math.min(X.length,U);let H=[],w=Y;for(;w<U;){let h=X[w],o=null,U0=h>239?4:h>223?3:h>191?2:1;if(w+U0<=U){let A0,O0,Z0,D0;switch(U0){case 1:h<128&&(o=h);break;case 2:A0=X[w+1],(A0&192)===128&&(D0=(h&31)<<6|A0&63,D0>127&&(o=D0));break;case 3:A0=X[w+1],O0=X[w+2],(A0&192)===128&&(O0&192)===128&&(D0=(h&15)<<12|(A0&63)<<6|O0&63,D0>2047&&(D0<55296||D0>57343)&&(o=D0));break;case 4:A0=X[w+1],O0=X[w+2],Z0=X[w+3],(A0&192)===128&&(O0&192)===128&&(Z0&192)===128&&(D0=(h&15)<<18|(A0&63)<<12|(O0&63)<<6|Z0&63,D0>65535&&D0<1114112&&(o=D0))}}o===null?(o=65533,U0=1):o>65535&&(o-=65536,H.push(o>>>10&1023|55296),o=56320|o&1023),H.push(o),w+=U0}return c(H)}var v=4096;function c(X){let Y=X.length;if(Y<=v)return String.fromCharCode.apply(String,X);let U="",H=0;for(;H<Y;)U+=String.fromCharCode.apply(String,X.slice(H,H+=v));return U}function u(X,Y,U){let H="";U=Math.min(X.length,U);for(let w=Y;w<U;++w)H+=String.fromCharCode(X[w]&127);return H}function i(X,Y,U){let H="";U=Math.min(X.length,U);for(let w=Y;w<U;++w)H+=String.fromCharCode(X[w]);return H}function e(X,Y,U){let H=X.length;(!Y||Y<0)&&(Y=0),(!U||U<0||U>H)&&(U=H);let w="";for(let h=Y;h<U;++h)w+=V6[X[h]];return w}function d(X,Y,U){let H=X.slice(Y,U),w="";for(let h=0;h<H.length-1;h+=2)w+=String.fromCharCode(H[h]+H[h+1]*256);return w}J.prototype.slice=function(X,Y){let U=this.length;X=~~X,Y=Y===void 0?U:~~Y,X<0?(X+=U,X<0&&(X=0)):X>U&&(X=U),Y<0?(Y+=U,Y<0&&(Y=0)):Y>U&&(Y=U),Y<X&&(Y=X);let H=this.subarray(X,Y);return Object.setPrototypeOf(H,J.prototype),H};function l(X,Y,U){if(X%1!==0||X<0)throw new RangeError("offset is not uint");if(X+Y>U)throw new RangeError("Trying to access beyond buffer length")}J.prototype.readUintLE=J.prototype.readUIntLE=function(X,Y,U){X=X>>>0,Y=Y>>>0,U||l(X,Y,this.length);let H=this[X],w=1,h=0;for(;++h<Y&&(w*=256);)H+=this[X+h]*w;return H},J.prototype.readUintBE=J.prototype.readUIntBE=function(X,Y,U){X=X>>>0,Y=Y>>>0,U||l(X,Y,this.length);let H=this[X+--Y],w=1;for(;Y>0&&(w*=256);)H+=this[X+--Y]*w;return H},J.prototype.readUint8=J.prototype.readUInt8=function(X,Y){return X=X>>>0,Y||l(X,1,this.length),this[X]},J.prototype.readUint16LE=J.prototype.readUInt16LE=function(X,Y){return X=X>>>0,Y||l(X,2,this.length),this[X]|this[X+1]<<8},J.prototype.readUint16BE=J.prototype.readUInt16BE=function(X,Y){return X=X>>>0,Y||l(X,2,this.length),this[X]<<8|this[X+1]},J.prototype.readUint32LE=J.prototype.readUInt32LE=function(X,Y){return X=X>>>0,Y||l(X,4,this.length),(this[X]|this[X+1]<<8|this[X+2]<<16)+this[X+3]*16777216},J.prototype.readUint32BE=J.prototype.readUInt32BE=function(X,Y){return X=X>>>0,Y||l(X,4,this.length),this[X]*16777216+(this[X+1]<<16|this[X+2]<<8|this[X+3])},J.prototype.readBigUInt64LE=I0(function(X){X=X>>>0,B0(X,"offset");let Y=this[X],U=this[X+7];(Y===void 0||U===void 0)&&p(X,this.length-8);let H=Y+this[++X]*256+this[++X]*65536+this[++X]*16777216,w=this[++X]+this[++X]*256+this[++X]*65536+U*16777216;return BigInt(H)+(BigInt(w)<<BigInt(32))}),J.prototype.readBigUInt64BE=I0(function(X){X=X>>>0,B0(X,"offset");let Y=this[X],U=this[X+7];(Y===void 0||U===void 0)&&p(X,this.length-8);let H=Y*16777216+this[++X]*65536+this[++X]*256+this[++X],w=this[++X]*16777216+this[++X]*65536+this[++X]*256+U;return(BigInt(H)<<BigInt(32))+BigInt(w)}),J.prototype.readIntLE=function(X,Y,U){X=X>>>0,Y=Y>>>0,U||l(X,Y,this.length);let H=this[X],w=1,h=0;for(;++h<Y&&(w*=256);)H+=this[X+h]*w;return w*=128,H>=w&&(H-=Math.pow(2,8*Y)),H},J.prototype.readIntBE=function(X,Y,U){X=X>>>0,Y=Y>>>0,U||l(X,Y,this.length);let H=Y,w=1,h=this[X+--H];for(;H>0&&(w*=256);)h+=this[X+--H]*w;return w*=128,h>=w&&(h-=Math.pow(2,8*Y)),h},J.prototype.readInt8=function(X,Y){return X=X>>>0,Y||l(X,1,this.length),this[X]&128?(255-this[X]+1)*-1:this[X]},J.prototype.readInt16LE=function(X,Y){X=X>>>0,Y||l(X,2,this.length);let U=this[X]|this[X+1]<<8;return U&32768?U|4294901760:U},J.prototype.readInt16BE=function(X,Y){X=X>>>0,Y||l(X,2,this.length);let U=this[X+1]|this[X]<<8;return U&32768?U|4294901760:U},J.prototype.readInt32LE=function(X,Y){return X=X>>>0,Y||l(X,4,this.length),this[X]|this[X+1]<<8|this[X+2]<<16|this[X+3]<<24},J.prototype.readInt32BE=function(X,Y){return X=X>>>0,Y||l(X,4,this.length),this[X]<<24|this[X+1]<<16|this[X+2]<<8|this[X+3]},J.prototype.readBigInt64LE=I0(function(X){X=X>>>0,B0(X,"offset");let Y=this[X],U=this[X+7];(Y===void 0||U===void 0)&&p(X,this.length-8);let H=this[X+4]+this[X+5]*256+this[X+6]*65536+(U<<24);return(BigInt(H)<<BigInt(32))+BigInt(Y+this[++X]*256+this[++X]*65536+this[++X]*16777216)}),J.prototype.readBigInt64BE=I0(function(X){X=X>>>0,B0(X,"offset");let Y=this[X],U=this[X+7];(Y===void 0||U===void 0)&&p(X,this.length-8);let H=(Y<<24)+this[++X]*65536+this[++X]*256+this[++X];return(BigInt(H)<<BigInt(32))+BigInt(this[++X]*16777216+this[++X]*65536+this[++X]*256+U)}),J.prototype.readFloatLE=function(X,Y){return X=X>>>0,Y||l(X,4,this.length),Q.read(this,X,!0,23,4)},J.prototype.readFloatBE=function(X,Y){return X=X>>>0,Y||l(X,4,this.length),Q.read(this,X,!1,23,4)},J.prototype.readDoubleLE=function(X,Y){return X=X>>>0,Y||l(X,8,this.length),Q.read(this,X,!0,52,8)},J.prototype.readDoubleBE=function(X,Y){return X=X>>>0,Y||l(X,8,this.length),Q.read(this,X,!1,52,8)};function S(X,Y,U,H,w,h){if(!J.isBuffer(X))throw new TypeError('"buffer" argument must be a Buffer instance');if(Y>w||Y<h)throw new RangeError('"value" argument is out of bounds');if(U+H>X.length)throw new RangeError("Index out of range")}J.prototype.writeUintLE=J.prototype.writeUIntLE=function(X,Y,U,H){if(X=+X,Y=Y>>>0,U=U>>>0,!H){let o=Math.pow(2,8*U)-1;S(this,X,Y,U,o,0)}let w=1,h=0;for(this[Y]=X&255;++h<U&&(w*=256);)this[Y+h]=X/w&255;return Y+U},J.prototype.writeUintBE=J.prototype.writeUIntBE=function(X,Y,U,H){if(X=+X,Y=Y>>>0,U=U>>>0,!H){let o=Math.pow(2,8*U)-1;S(this,X,Y,U,o,0)}let w=U-1,h=1;for(this[Y+w]=X&255;--w>=0&&(h*=256);)this[Y+w]=X/h&255;return Y+U},J.prototype.writeUint8=J.prototype.writeUInt8=function(X,Y,U){return X=+X,Y=Y>>>0,U||S(this,X,Y,1,255,0),this[Y]=X&255,Y+1},J.prototype.writeUint16LE=J.prototype.writeUInt16LE=function(X,Y,U){return X=+X,Y=Y>>>0,U||S(this,X,Y,2,65535,0),this[Y]=X&255,this[Y+1]=X>>>8,Y+2},J.prototype.writeUint16BE=J.prototype.writeUInt16BE=function(X,Y,U){return X=+X,Y=Y>>>0,U||S(this,X,Y,2,65535,0),this[Y]=X>>>8,this[Y+1]=X&255,Y+2},J.prototype.writeUint32LE=J.prototype.writeUInt32LE=function(X,Y,U){return X=+X,Y=Y>>>0,U||S(this,X,Y,4,4294967295,0),this[Y+3]=X>>>24,this[Y+2]=X>>>16,this[Y+1]=X>>>8,this[Y]=X&255,Y+4},J.prototype.writeUint32BE=J.prototype.writeUInt32BE=function(X,Y,U){return X=+X,Y=Y>>>0,U||S(this,X,Y,4,4294967295,0),this[Y]=X>>>24,this[Y+1]=X>>>16,this[Y+2]=X>>>8,this[Y+3]=X&255,Y+4};function r(X,Y,U,H,w){Q0(Y,H,w,X,U,7);let h=Number(Y&BigInt(4294967295));X[U++]=h,h=h>>8,X[U++]=h,h=h>>8,X[U++]=h,h=h>>8,X[U++]=h;let o=Number(Y>>BigInt(32)&BigInt(4294967295));return X[U++]=o,o=o>>8,X[U++]=o,o=o>>8,X[U++]=o,o=o>>8,X[U++]=o,U}function t(X,Y,U,H,w){Q0(Y,H,w,X,U,7);let h=Number(Y&BigInt(4294967295));X[U+7]=h,h=h>>8,X[U+6]=h,h=h>>8,X[U+5]=h,h=h>>8,X[U+4]=h;let o=Number(Y>>BigInt(32)&BigInt(4294967295));return X[U+3]=o,o=o>>8,X[U+2]=o,o=o>>8,X[U+1]=o,o=o>>8,X[U]=o,U+8}J.prototype.writeBigUInt64LE=I0(function(X,Y=0){return r(this,X,Y,BigInt(0),BigInt("0xffffffffffffffff"))}),J.prototype.writeBigUInt64BE=I0(function(X,Y=0){return t(this,X,Y,BigInt(0),BigInt("0xffffffffffffffff"))}),J.prototype.writeIntLE=function(X,Y,U,H){if(X=+X,Y=Y>>>0,!H){let U0=Math.pow(2,8*U-1);S(this,X,Y,U,U0-1,-U0)}let w=0,h=1,o=0;for(this[Y]=X&255;++w<U&&(h*=256);)X<0&&o===0&&this[Y+w-1]!==0&&(o=1),this[Y+w]=(X/h>>0)-o&255;return Y+U},J.prototype.writeIntBE=function(X,Y,U,H){if(X=+X,Y=Y>>>0,!H){let U0=Math.pow(2,8*U-1);S(this,X,Y,U,U0-1,-U0)}let w=U-1,h=1,o=0;for(this[Y+w]=X&255;--w>=0&&(h*=256);)X<0&&o===0&&this[Y+w+1]!==0&&(o=1),this[Y+w]=(X/h>>0)-o&255;return Y+U},J.prototype.writeInt8=function(X,Y,U){return X=+X,Y=Y>>>0,U||S(this,X,Y,1,127,-128),X<0&&(X=255+X+1),this[Y]=X&255,Y+1},J.prototype.writeInt16LE=function(X,Y,U){return X=+X,Y=Y>>>0,U||S(this,X,Y,2,32767,-32768),this[Y]=X&255,this[Y+1]=X>>>8,Y+2},J.prototype.writeInt16BE=function(X,Y,U){return X=+X,Y=Y>>>0,U||S(this,X,Y,2,32767,-32768),this[Y]=X>>>8,this[Y+1]=X&255,Y+2},J.prototype.writeInt32LE=function(X,Y,U){return X=+X,Y=Y>>>0,U||S(this,X,Y,4,2147483647,-2147483648),this[Y]=X&255,this[Y+1]=X>>>8,this[Y+2]=X>>>16,this[Y+3]=X>>>24,Y+4},J.prototype.writeInt32BE=function(X,Y,U){return X=+X,Y=Y>>>0,U||S(this,X,Y,4,2147483647,-2147483648),X<0&&(X=4294967295+X+1),this[Y]=X>>>24,this[Y+1]=X>>>16,this[Y+2]=X>>>8,this[Y+3]=X&255,Y+4},J.prototype.writeBigInt64LE=I0(function(X,Y=0){return r(this,X,Y,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),J.prototype.writeBigInt64BE=I0(function(X,Y=0){return t(this,X,Y,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function K0(X,Y,U,H,w,h){if(U+H>X.length)throw new RangeError("Index out of range");if(U<0)throw new RangeError("Index out of range")}function H0(X,Y,U,H,w){return Y=+Y,U=U>>>0,w||K0(X,Y,U,4,340282346638528860000000000000000000000,-340282346638528860000000000000000000000),Q.write(X,Y,U,H,23,4),U+4}J.prototype.writeFloatLE=function(X,Y,U){return H0(this,X,Y,!0,U)},J.prototype.writeFloatBE=function(X,Y,U){return H0(this,X,Y,!1,U)};function q0(X,Y,U,H,w){return Y=+Y,U=U>>>0,w||K0(X,Y,U,8,179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,-179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000),Q.write(X,Y,U,H,52,8),U+8}J.prototype.writeDoubleLE=function(X,Y,U){return q0(this,X,Y,!0,U)},J.prototype.writeDoubleBE=function(X,Y,U){return q0(this,X,Y,!1,U)},J.prototype.copy=function(X,Y,U,H){if(!J.isBuffer(X))throw new TypeError("argument should be a Buffer");if(U||(U=0),!H&&H!==0&&(H=this.length),Y>=X.length&&(Y=X.length),Y||(Y=0),H>0&&H<U&&(H=U),H===U||X.length===0||this.length===0)return 0;if(Y<0)throw new RangeError("targetStart out of bounds");if(U<0||U>=this.length)throw new RangeError("Index out of range");if(H<0)throw new RangeError("sourceEnd out of bounds");H>this.length&&(H=this.length),X.length-Y<H-U&&(H=X.length-Y+U);let w=H-U;return this===X&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(Y,U,H):Uint8Array.prototype.set.call(X,this.subarray(U,H),Y),w},J.prototype.fill=function(X,Y,U,H){if(typeof X=="string"){if(typeof Y=="string"?(H=Y,Y=0,U=this.length):typeof U=="string"&&(H=U,U=this.length),H!==void 0&&typeof H!="string")throw new TypeError("encoding must be a string");if(typeof H=="string"&&!J.isEncoding(H))throw new TypeError("Unknown encoding: "+H);if(X.length===1){let h=X.charCodeAt(0);(H==="utf8"&&h<128||H==="latin1")&&(X=h)}}else typeof X=="number"?X=X&255:typeof X=="boolean"&&(X=Number(X));if(Y<0||this.length<Y||this.length<U)throw new RangeError("Out of range index");if(U<=Y)return this;Y=Y>>>0,U=U===void 0?this.length:U>>>0,X||(X=0);let w;if(typeof X=="number")for(w=Y;w<U;++w)this[w]=X;else{let h=J.isBuffer(X)?X:J.from(X,H),o=h.length;if(o===0)throw new TypeError('The value "'+X+'" is invalid for argument "value"');for(w=0;w<U-Y;++w)this[w+Y]=h[w%o]}return this};var G0={};function Y0(X,Y,U){G0[X]=class extends U{constructor(){super(),Object.defineProperty(this,"message",{value:Y.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${X}]`,this.stack,delete this.name}get code(){return X}set code(H){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:H,writable:!0})}toString(){return`${this.name} [${X}]: ${this.message}`}}}Y0("ERR_BUFFER_OUT_OF_BOUNDS",function(X){return X?`${X} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),Y0("ERR_INVALID_ARG_TYPE",function(X,Y){return`The "${X}" argument must be of type number. Received type ${typeof Y}`},TypeError),Y0("ERR_OUT_OF_RANGE",function(X,Y,U){let H=`The value of "${X}" is out of range.`,w=U;return Number.isInteger(U)&&Math.abs(U)>4294967296?w=M0(String(U)):typeof U=="bigint"&&(w=String(U),(U>BigInt(2)**BigInt(32)||U<-(BigInt(2)**BigInt(32)))&&(w=M0(w)),w+="n"),H+=` It must be ${Y}. Received ${w}`,H},RangeError);function M0(X){let Y="",U=X.length,H=X[0]==="-"?1:0;for(;U>=H+4;U-=3)Y=`_${X.slice(U-3,U)}${Y}`;return`${X.slice(0,U)}${Y}`}function L0(X,Y,U){B0(Y,"offset"),(X[Y]===void 0||X[Y+U]===void 0)&&p(Y,X.length-(U+1))}function Q0(X,Y,U,H,w,h){if(X>U||X<Y){let o=typeof Y=="bigint"?"n":"",U0;throw h>3?Y===0||Y===BigInt(0)?U0=`>= 0${o} and < 2${o} ** ${(h+1)*8}${o}`:U0=`>= -(2${o} ** ${(h+1)*8-1}${o}) and < 2 ** ${(h+1)*8-1}${o}`:U0=`>= ${Y}${o} and <= ${U}${o}`,new G0.ERR_OUT_OF_RANGE("value",U0,X)}L0(H,w,h)}function B0(X,Y){if(typeof X!="number")throw new G0.ERR_INVALID_ARG_TYPE(Y,"number",X)}function p(X,Y,U){throw Math.floor(X)!==X?(B0(X,U),new G0.ERR_OUT_OF_RANGE(U||"offset","an integer",X)):Y<0?new G0.ERR_BUFFER_OUT_OF_BOUNDS:new G0.ERR_OUT_OF_RANGE(U||"offset",`>= ${U?1:0} and <= ${Y}`,X)}var B=/[^+/0-9A-Za-z-_]/g;function D(X){if(X=X.split("=")[0],X=X.trim().replace(B,""),X.length<2)return"";for(;X.length%4!==0;)X=X+"=";return X}function _(X,Y){Y=Y||1/0;let U,H=X.length,w=null,h=[];for(let o=0;o<H;++o){if(U=X.charCodeAt(o),U>55295&&U<57344){if(!w){if(U>56319){(Y-=3)>-1&&h.push(239,191,189);continue}else if(o+1===H){(Y-=3)>-1&&h.push(239,191,189);continue}w=U;continue}if(U<56320){(Y-=3)>-1&&h.push(239,191,189),w=U;continue}U=(w-55296<<10|U-56320)+65536}else w&&(Y-=3)>-1&&h.push(239,191,189);if(w=null,U<128){if((Y-=1)<0)break;h.push(U)}else if(U<2048){if((Y-=2)<0)break;h.push(U>>6|192,U&63|128)}else if(U<65536){if((Y-=3)<0)break;h.push(U>>12|224,U>>6&63|128,U&63|128)}else if(U<1114112){if((Y-=4)<0)break;h.push(U>>18|240,U>>12&63|128,U>>6&63|128,U&63|128)}else throw new Error("Invalid code point")}return h}function a(X){let Y=[];for(let U=0;U<X.length;++U)Y.push(X.charCodeAt(U)&255);return Y}function s(X,Y){let U,H,w,h=[];for(let o=0;o<X.length&&!((Y-=2)<0);++o)U=X.charCodeAt(o),H=U>>8,w=U%256,h.push(w),h.push(H);return h}function W0(X){return V.toByteArray(D(X))}function X0(X,Y,U,H){let w;for(w=0;w<H&&!(w+U>=Y.length||w>=X.length);++w)Y[w+U]=X[w];return w}function z0(X,Y){return X instanceof Y||X!=null&&X.constructor!=null&&X.constructor.name!=null&&X.constructor.name===Y.name}function b0(X){return X!==X}var V6=function(){let X="0123456789abcdef",Y=new Array(256);for(let U=0;U<16;++U){let H=U*16;for(let w=0;w<16;++w)Y[H+w]=X[U]+X[w]}return Y}();function I0(X){return typeof BigInt>"u"?c1:X}function c1(){throw new Error("BigInt not supported")}}),x0=j0(($,V)=>{V.exports={ArrayIsArray(Q){return Array.isArray(Q)},ArrayPrototypeIncludes(Q,q){return Q.includes(q)},ArrayPrototypeIndexOf(Q,q){return Q.indexOf(q)},ArrayPrototypeJoin(Q,q){return Q.join(q)},ArrayPrototypeMap(Q,q){return Q.map(q)},ArrayPrototypePop(Q,q){return Q.pop(q)},ArrayPrototypePush(Q,q){return Q.push(q)},ArrayPrototypeSlice(Q,q,K){return Q.slice(q,K)},Error,FunctionPrototypeCall(Q,q,...K){return Q.call(q,...K)},FunctionPrototypeSymbolHasInstance(Q,q){return Function.prototype[Symbol.hasInstance].call(Q,q)},MathFloor:Math.floor,Number,NumberIsInteger:Number.isInteger,NumberIsNaN:Number.isNaN,NumberMAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,NumberMIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER,NumberParseInt:Number.parseInt,ObjectDefineProperties(Q,q){return Object.defineProperties(Q,q)},ObjectDefineProperty(Q,q,K){return Object.defineProperty(Q,q,K)},ObjectGetOwnPropertyDescriptor(Q,q){return Object.getOwnPropertyDescriptor(Q,q)},ObjectKeys(Q){return Object.keys(Q)},ObjectSetPrototypeOf(Q,q){return Object.setPrototypeOf(Q,q)},Promise,PromisePrototypeCatch(Q,q){return Q.catch(q)},PromisePrototypeThen(Q,q,K){return Q.then(q,K)},PromiseReject(Q){return Promise.reject(Q)},ReflectApply:Reflect.apply,RegExpPrototypeTest(Q,q){return Q.test(q)},SafeSet:Set,String,StringPrototypeSlice(Q,q,K){return Q.slice(q,K)},StringPrototypeToLowerCase(Q){return Q.toLowerCase()},StringPrototypeToUpperCase(Q){return Q.toUpperCase()},StringPrototypeTrim(Q){return Q.trim()},Symbol,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,TypedArrayPrototypeSet(Q,q,K){return Q.set(q,K)},Uint8Array}}),X6=j0(($,V)=>{var Q=H6(),q=Object.getPrototypeOf(async function(){}).constructor,K=globalThis.Blob||Q.Blob,G=typeof K<"u"?function(J){return J instanceof K}:function(J){return!1},W=class extends Error{constructor(J){if(!Array.isArray(J))throw new TypeError(`Expected input to be an Array, got ${typeof J}`);let P="";for(let j=0;j<J.length;j++)P+=` ${J[j].stack}
2
+ `;super(P),this.name="AggregateError",this.errors=J}};V.exports={AggregateError:W,kEmptyObject:Object.freeze({}),once(J){let P=!1;return function(...j){P||(P=!0,J.apply(this,j))}},createDeferredPromise:function(){let J,P;return{promise:new Promise((j,z)=>{J=j,P=z}),resolve:J,reject:P}},promisify(J){return new Promise((P,j)=>{J((z,...I)=>z?j(z):P(...I))})},debuglog(){return function(){}},format(J,...P){return J.replace(/%([sdifj])/g,function(...[j,z]){let I=P.shift();return z==="f"?I.toFixed(6):z==="j"?JSON.stringify(I):z==="s"&&typeof I=="object"?`${I.constructor!==Object?I.constructor.name:""} {}`.trim():I.toString()})},inspect(J){switch(typeof J){case"string":if(J.includes("'"))if(J.includes('"')){if(!J.includes("`")&&!J.includes("${"))return`\`${J}\``}else return`"${J}"`;return`'${J}'`;case"number":return isNaN(J)?"NaN":Object.is(J,-0)?String(J):J;case"bigint":return`${String(J)}n`;case"boolean":case"undefined":return String(J);case"object":return"{}"}},types:{isAsyncFunction(J){return J instanceof q},isArrayBufferView(J){return ArrayBuffer.isView(J)}},isBlob:G},V.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")}),u2=j0(($,V)=>{var{AbortController:Q,AbortSignal:q}=typeof self<"u"?self:typeof window<"u"?window:void 0;V.exports=Q,V.exports.AbortSignal=q,V.exports.default=Q}),f0=j0(($,V)=>{var{format:Q,inspect:q,AggregateError:K}=X6(),G=globalThis.AggregateError||K,W=Symbol("kIsNodeError"),J=["string","function","number","object","Function","Object","boolean","bigint","symbol"],P=/^([A-Z][a-z0-9]*)+$/,j="__node_internal_",z={};function I(Z,O){if(!Z)throw new z.ERR_INTERNAL_ASSERTION(O)}function N(Z){let O="",M=Z.length,R=Z[0]==="-"?1:0;for(;M>=R+4;M-=3)O=`_${Z.slice(M-3,M)}${O}`;return`${Z.slice(0,M)}${O}`}function A(Z,O,M){if(typeof O=="function")return I(O.length<=M.length,`Code: ${Z}; The provided arguments length (${M.length}) does not match the required ones (${O.length}).`),O(...M);let R=(O.match(/%[dfijoOs]/g)||[]).length;return I(R===M.length,`Code: ${Z}; The provided arguments length (${M.length}) does not match the required ones (${R}).`),M.length===0?O:Q(O,...M)}function x(Z,O,M){M||(M=Error);class R extends M{constructor(...C){super(A(Z,O,C))}toString(){return`${this.name} [${Z}]: ${this.message}`}}Object.defineProperties(R.prototype,{name:{value:M.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${Z}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),R.prototype.code=Z,R.prototype[W]=!0,z[Z]=R}function k(Z){let O=j+Z.name;return Object.defineProperty(Z,"name",{value:O}),Z}function g(Z,O){if(Z&&O&&Z!==O){if(Array.isArray(O.errors))return O.errors.push(Z),O;let M=new G([O,Z],O.message);return M.code=O.code,M}return Z||O}var y=class extends Error{constructor(Z="The operation was aborted",O=void 0){if(O!==void 0&&typeof O!="object")throw new z.ERR_INVALID_ARG_TYPE("options","Object",O);super(Z,O),this.code="ABORT_ERR",this.name="AbortError"}};x("ERR_ASSERTION","%s",Error),x("ERR_INVALID_ARG_TYPE",(Z,O,M)=>{I(typeof Z=="string","'name' must be a string"),Array.isArray(O)||(O=[O]);let R="The ";Z.endsWith(" argument")?R+=`${Z} `:R+=`"${Z}" ${Z.includes(".")?"property":"argument"} `,R+="must be ";let C=[],L=[],T=[];for(let f of O)I(typeof f=="string","All expected entries have to be of type string"),J.includes(f)?C.push(f.toLowerCase()):P.test(f)?L.push(f):(I(f!=="object",'The value "object" should be written as "Object"'),T.push(f));if(L.length>0){let f=C.indexOf("object");f!==-1&&(C.splice(C,f,1),L.push("Object"))}if(C.length>0){switch(C.length){case 1:R+=`of type ${C[0]}`;break;case 2:R+=`one of type ${C[0]} or ${C[1]}`;break;default:{let f=C.pop();R+=`one of type ${C.join(", ")}, or ${f}`}}(L.length>0||T.length>0)&&(R+=" or ")}if(L.length>0){switch(L.length){case 1:R+=`an instance of ${L[0]}`;break;case 2:R+=`an instance of ${L[0]} or ${L[1]}`;break;default:{let f=L.pop();R+=`an instance of ${L.join(", ")}, or ${f}`}}T.length>0&&(R+=" or ")}switch(T.length){case 0:break;case 1:T[0].toLowerCase()!==T[0]&&(R+="an "),R+=`${T[0]}`;break;case 2:R+=`one of ${T[0]} or ${T[1]}`;break;default:{let f=T.pop();R+=`one of ${T.join(", ")}, or ${f}`}}if(M==null)R+=`. Received ${M}`;else if(typeof M=="function"&&M.name)R+=`. Received function ${M.name}`;else if(typeof M=="object"){var E;(E=M.constructor)!==null&&E!==void 0&&E.name?R+=`. Received an instance of ${M.constructor.name}`:R+=`. Received ${q(M,{depth:-1})}`}else{let f=q(M,{colors:!1});f.length>25&&(f=`${f.slice(0,25)}...`),R+=`. Received type ${typeof M} (${f})`}return R},TypeError),x("ERR_INVALID_ARG_VALUE",(Z,O,M="is invalid")=>{let R=q(O);return R.length>128&&(R=R.slice(0,128)+"..."),`The ${Z.includes(".")?"property":"argument"} '${Z}' ${M}. Received ${R}`},TypeError),x("ERR_INVALID_RETURN_VALUE",(Z,O,M)=>{var R;let C=M!=null&&(R=M.constructor)!==null&&R!==void 0&&R.name?`instance of ${M.constructor.name}`:`type ${typeof M}`;return`Expected ${Z} to be returned from the "${O}" function but got ${C}.`},TypeError),x("ERR_MISSING_ARGS",(...Z)=>{I(Z.length>0,"At least one arg needs to be specified");let O,M=Z.length;switch(Z=(Array.isArray(Z)?Z:[Z]).map((R)=>`"${R}"`).join(" or "),M){case 1:O+=`The ${Z[0]} argument`;break;case 2:O+=`The ${Z[0]} and ${Z[1]} arguments`;break;default:{let R=Z.pop();O+=`The ${Z.join(", ")}, and ${R} arguments`}break}return`${O} must be specified`},TypeError),x("ERR_OUT_OF_RANGE",(Z,O,M)=>{I(O,'Missing "range" argument');let R;return Number.isInteger(M)&&Math.abs(M)>4294967296?R=N(String(M)):typeof M=="bigint"?(R=String(M),(M>2n**32n||M<-(2n**32n))&&(R=N(R)),R+="n"):R=q(M),`The value of "${Z}" is out of range. It must be ${O}. Received ${R}`},RangeError),x("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error),x("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error),x("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error),x("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error),x("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error),x("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),x("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error),x("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error),x("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error),x("ERR_STREAM_WRITE_AFTER_END","write after end",Error),x("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError),V.exports={AbortError:y,aggregateTwoErrors:k(g),hideStackFrames:k,codes:z}}),i1=j0(($,V)=>{var{ArrayIsArray:Q,ArrayPrototypeIncludes:q,ArrayPrototypeJoin:K,ArrayPrototypeMap:G,NumberIsInteger:W,NumberIsNaN:J,NumberMAX_SAFE_INTEGER:P,NumberMIN_SAFE_INTEGER:j,NumberParseInt:z,ObjectPrototypeHasOwnProperty:I,RegExpPrototypeExec:N,String:A,StringPrototypeToUpperCase:x,StringPrototypeTrim:k}=x0(),{hideStackFrames:g,codes:{ERR_SOCKET_BAD_PORT:y,ERR_INVALID_ARG_TYPE:Z,ERR_INVALID_ARG_VALUE:O,ERR_OUT_OF_RANGE:M,ERR_UNKNOWN_SIGNAL:R}}=f0(),{normalizeEncoding:C}=X6(),{isAsyncFunction:L,isArrayBufferView:T}=X6().types,E={};function f(p){return p===(p|0)}function b(p){return p===p>>>0}var F=/^[0-7]+$/,m="must be a 32-bit unsigned integer or an octal string";function n(p,B,D){if(typeof p>"u"&&(p=D),typeof p=="string"){if(N(F,p)===null)throw new O(B,p,m);p=z(p,8)}return u(p,B),p}var v=g((p,B,D=j,_=P)=>{if(typeof p!="number")throw new Z(B,"number",p);if(!W(p))throw new M(B,"an integer",p);if(p<D||p>_)throw new M(B,`>= ${D} && <= ${_}`,p)}),c=g((p,B,D=-2147483648,_=2147483647)=>{if(typeof p!="number")throw new Z(B,"number",p);if(!W(p))throw new M(B,"an integer",p);if(p<D||p>_)throw new M(B,`>= ${D} && <= ${_}`,p)}),u=g((p,B,D=!1)=>{if(typeof p!="number")throw new Z(B,"number",p);if(!W(p))throw new M(B,"an integer",p);let _=D?1:0,a=4294967295;if(p<_||p>a)throw new M(B,`>= ${_} && <= ${a}`,p)});function i(p,B){if(typeof p!="string")throw new Z(B,"string",p)}function e(p,B,D=void 0,_){if(typeof p!="number")throw new Z(B,"number",p);if(D!=null&&p<D||_!=null&&p>_||(D!=null||_!=null)&&J(p))throw new M(B,`${D!=null?`>= ${D}`:""}${D!=null&&_!=null?" && ":""}${_!=null?`<= ${_}`:""}`,p)}var d=g((p,B,D)=>{if(!q(D,p)){let _=K(G(D,(s)=>typeof s=="string"?`'${s}'`:A(s)),", "),a="must be one of: "+_;throw new O(B,p,a)}});function l(p,B){if(typeof p!="boolean")throw new Z(B,"boolean",p)}function S(p,B,D){return p==null||!I(p,B)?D:p[B]}var r=g((p,B,D=null)=>{let _=S(D,"allowArray",!1),a=S(D,"allowFunction",!1);if(!S(D,"nullable",!1)&&p===null||!_&&Q(p)||typeof p!="object"&&(!a||typeof p!="function"))throw new Z(B,"Object",p)}),t=g((p,B,D=0)=>{if(!Q(p))throw new Z(B,"Array",p);if(p.length<D){let _=`must be longer than ${D}`;throw new O(B,p,_)}});function K0(p,B="signal"){if(i(p,B),E[p]===void 0)throw E[x(p)]!==void 0?new R(p+" (signals must use all capital letters)"):new R(p)}var H0=g((p,B="buffer")=>{if(!T(p))throw new Z(B,["Buffer","TypedArray","DataView"],p)});function q0(p,B){let D=C(B),_=p.length;if(D==="hex"&&_%2!==0)throw new O("encoding",B,`is invalid for data of length ${_}`)}function G0(p,B="Port",D=!0){if(typeof p!="number"&&typeof p!="string"||typeof p=="string"&&k(p).length===0||+p!==+p>>>0||p>65535||p===0&&!D)throw new y(B,p,D);return p|0}var Y0=g((p,B)=>{if(p!==void 0&&(p===null||typeof p!="object"||!("aborted"in p)))throw new Z(B,"AbortSignal",p)}),M0=g((p,B)=>{if(typeof p!="function")throw new Z(B,"Function",p)}),L0=g((p,B)=>{if(typeof p!="function"||L(p))throw new Z(B,"Function",p)}),Q0=g((p,B)=>{if(p!==void 0)throw new Z(B,"undefined",p)});function B0(p,B,D){if(!q(D,p))throw new Z(B,`('${K(D,"|")}')`,p)}V.exports={isInt32:f,isUint32:b,parseFileMode:n,validateArray:t,validateBoolean:l,validateBuffer:H0,validateEncoding:q0,validateFunction:M0,validateInt32:c,validateInteger:v,validateNumber:e,validateObject:r,validateOneOf:d,validatePlainFunction:L0,validatePort:G0,validateSignalName:K0,validateString:i,validateUint32:u,validateUndefined:Q0,validateUnion:B0,validateAbortSignal:Y0}}),E$=j0(($,V)=>{var Q=V.exports={},q,K;function G(){throw new Error("setTimeout has not been defined")}function W(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?q=setTimeout:q=G}catch{q=G}try{typeof clearTimeout=="function"?K=clearTimeout:K=W}catch{K=W}})();function J(y){if(q===setTimeout)return setTimeout(y,0);if((q===G||!q)&&setTimeout)return q=setTimeout,setTimeout(y,0);try{return q(y,0)}catch{try{return q.call(null,y,0)}catch{return q.call(this,y,0)}}}function P(y){if(K===clearTimeout)return clearTimeout(y);if((K===W||!K)&&clearTimeout)return K=clearTimeout,clearTimeout(y);try{return K(y)}catch{try{return K.call(null,y)}catch{return K.call(this,y)}}}var j=[],z=!1,I,N=-1;function A(){!z||!I||(z=!1,I.length?j=I.concat(j):N=-1,j.length&&x())}function x(){if(!z){var y=J(A);z=!0;for(var Z=j.length;Z;){for(I=j,j=[];++N<Z;)I&&I[N].run();N=-1,Z=j.length}I=null,z=!1,P(y)}}Q.nextTick=function(y){var Z=new Array(arguments.length-1);if(arguments.length>1)for(var O=1;O<arguments.length;O++)Z[O-1]=arguments[O];j.push(new k(y,Z)),j.length===1&&!z&&J(x)};function k(y,Z){this.fun=y,this.array=Z}k.prototype.run=function(){this.fun.apply(null,this.array)},Q.title="browser",Q.browser=!0,Q.env={},Q.argv=[],Q.version="",Q.versions={};function g(){}Q.on=g,Q.addListener=g,Q.once=g,Q.off=g,Q.removeListener=g,Q.removeAllListeners=g,Q.emit=g,Q.prependListener=g,Q.prependOnceListener=g,Q.listeners=function(y){return[]},Q.binding=function(y){throw new Error("process.binding is not supported")},Q.cwd=function(){return"/"},Q.chdir=function(y){throw new Error("process.chdir is not supported")},Q.umask=function(){return 0}}),K6={};y$(K6,{default:()=>f$});E6=Y7(()=>{b$(K6,l1(E$())),f$=l1(E$())}),y6=j0(($,V)=>{var{Symbol:Q,SymbolAsyncIterator:q,SymbolIterator:K}=x0(),G=Q("kDestroyed"),W=Q("kIsErrored"),J=Q("kIsReadable"),P=Q("kIsDisturbed");function j(v,c=!1){var u;return!!(v&&typeof v.pipe=="function"&&typeof v.on=="function"&&(!c||typeof v.pause=="function"&&typeof v.resume=="function")&&(!v._writableState||((u=v._readableState)===null||u===void 0?void 0:u.readable)!==!1)&&(!v._writableState||v._readableState))}function z(v){var c;return!!(v&&typeof v.write=="function"&&typeof v.on=="function"&&(!v._readableState||((c=v._writableState)===null||c===void 0?void 0:c.writable)!==!1))}function I(v){return!!(v&&typeof v.pipe=="function"&&v._readableState&&typeof v.on=="function"&&typeof v.write=="function")}function N(v){return v&&(v._readableState||v._writableState||typeof v.write=="function"&&typeof v.on=="function"||typeof v.pipe=="function"&&typeof v.on=="function")}function A(v,c){return v==null?!1:c===!0?typeof v[q]=="function":c===!1?typeof v[K]=="function":typeof v[q]=="function"||typeof v[K]=="function"}function x(v){if(!N(v))return null;let{_writableState:c,_readableState:u}=v,i=c||u;return!!(v.destroyed||v[G]||i!=null&&i.destroyed)}function k(v){if(!z(v))return null;if(v.writableEnded===!0)return!0;let c=v._writableState;return c!=null&&c.errored?!1:typeof c?.ended!="boolean"?null:c.ended}function g(v,c){if(!z(v))return null;if(v.writableFinished===!0)return!0;let u=v._writableState;return u!=null&&u.errored?!1:typeof u?.finished!="boolean"?null:!!(u.finished||c===!1&&u.ended===!0&&u.length===0)}function y(v){if(!j(v))return null;if(v.readableEnded===!0)return!0;let c=v._readableState;return!c||c.errored?!1:typeof c?.ended!="boolean"?null:c.ended}function Z(v,c){if(!j(v))return null;let u=v._readableState;return u!=null&&u.errored?!1:typeof u?.endEmitted!="boolean"?null:!!(u.endEmitted||c===!1&&u.ended===!0&&u.length===0)}function O(v){return v&&v[J]!=null?v[J]:typeof v?.readable!="boolean"?null:x(v)?!1:j(v)&&v.readable&&!Z(v)}function M(v){return typeof v?.writable!="boolean"?null:x(v)?!1:z(v)&&v.writable&&!k(v)}function R(v,c){return N(v)?x(v)?!0:!(c?.readable!==!1&&O(v)||c?.writable!==!1&&M(v)):null}function C(v){var c,u;return N(v)?v.writableErrored?v.writableErrored:(c=(u=v._writableState)===null||u===void 0?void 0:u.errored)!==null&&c!==void 0?c:null:null}function L(v){var c,u;return N(v)?v.readableErrored?v.readableErrored:(c=(u=v._readableState)===null||u===void 0?void 0:u.errored)!==null&&c!==void 0?c:null:null}function T(v){if(!N(v))return null;if(typeof v.closed=="boolean")return v.closed;let{_writableState:c,_readableState:u}=v;return typeof c?.closed=="boolean"||typeof u?.closed=="boolean"?c?.closed||u?.closed:typeof v._closed=="boolean"&&E(v)?v._closed:null}function E(v){return typeof v._closed=="boolean"&&typeof v._defaultKeepAlive=="boolean"&&typeof v._removedConnection=="boolean"&&typeof v._removedContLen=="boolean"}function f(v){return typeof v._sent100=="boolean"&&E(v)}function b(v){var c;return typeof v._consuming=="boolean"&&typeof v._dumped=="boolean"&&((c=v.req)===null||c===void 0?void 0:c.upgradeOrConnect)===void 0}function F(v){if(!N(v))return null;let{_writableState:c,_readableState:u}=v,i=c||u;return!i&&f(v)||!!(i&&i.autoDestroy&&i.emitClose&&i.closed===!1)}function m(v){var c;return!!(v&&((c=v[P])!==null&&c!==void 0?c:v.readableDidRead||v.readableAborted))}function n(v){var c,u,i,e,d,l,S,r,t,K0;return!!(v&&((c=(u=(i=(e=(d=(l=v[W])!==null&&l!==void 0?l:v.readableErrored)!==null&&d!==void 0?d:v.writableErrored)!==null&&e!==void 0?e:(S=v._readableState)===null||S===void 0?void 0:S.errorEmitted)!==null&&i!==void 0?i:(r=v._writableState)===null||r===void 0?void 0:r.errorEmitted)!==null&&u!==void 0?u:(t=v._readableState)===null||t===void 0?void 0:t.errored)!==null&&c!==void 0?c:(K0=v._writableState)===null||K0===void 0?void 0:K0.errored))}V.exports={kDestroyed:G,isDisturbed:m,kIsDisturbed:P,isErrored:n,kIsErrored:W,isReadable:O,kIsReadable:J,isClosed:T,isDestroyed:x,isDuplexNodeStream:I,isFinished:R,isIterable:A,isReadableNodeStream:j,isReadableEnded:y,isReadableFinished:Z,isReadableErrored:L,isNodeStream:N,isWritable:M,isWritableNodeStream:z,isWritableEnded:k,isWritableFinished:g,isWritableErrored:C,isServerRequest:b,isServerResponse:f,willEmitClose:F}}),b6=j0(($,V)=>{var Q=(E6(),g6(K6)),{AbortError:q,codes:K}=f0(),{ERR_INVALID_ARG_TYPE:G,ERR_STREAM_PREMATURE_CLOSE:W}=K,{kEmptyObject:J,once:P}=X6(),{validateAbortSignal:j,validateFunction:z,validateObject:I}=i1(),{Promise:N}=x0(),{isClosed:A,isReadable:x,isReadableNodeStream:k,isReadableFinished:g,isReadableErrored:y,isWritable:Z,isWritableNodeStream:O,isWritableFinished:M,isWritableErrored:R,isNodeStream:C,willEmitClose:L}=y6();function T(F){return F.setHeader&&typeof F.abort=="function"}var E=()=>{};function f(F,m,n){var v,c;arguments.length===2?(n=m,m=J):m==null?m=J:I(m,"options"),z(n,"callback"),j(m.signal,"options.signal"),n=P(n);let u=(v=m.readable)!==null&&v!==void 0?v:k(F),i=(c=m.writable)!==null&&c!==void 0?c:O(F);if(!C(F))throw new G("stream","Stream",F);let{_writableState:e,_readableState:d}=F,l=()=>{F.writable||t()},S=L(F)&&k(F)===u&&O(F)===i,r=M(F,!1),t=()=>{r=!0,F.destroyed&&(S=!1),!(S&&(!F.readable||u))&&(!u||K0)&&n.call(F)},K0=g(F,!1),H0=()=>{K0=!0,F.destroyed&&(S=!1),!(S&&(!F.writable||i))&&(!i||r)&&n.call(F)},q0=(Q0)=>{n.call(F,Q0)},G0=A(F),Y0=()=>{G0=!0;let Q0=R(F)||y(F);if(Q0&&typeof Q0!="boolean")return n.call(F,Q0);if(u&&!K0&&k(F,!0)&&!g(F,!1))return n.call(F,new W);if(i&&!r&&!M(F,!1))return n.call(F,new W);n.call(F)},M0=()=>{F.req.on("finish",t)};T(F)?(F.on("complete",t),S||F.on("abort",Y0),F.req?M0():F.on("request",M0)):i&&!e&&(F.on("end",l),F.on("close",l)),!S&&typeof F.aborted=="boolean"&&F.on("aborted",Y0),F.on("end",H0),F.on("finish",t),m.error!==!1&&F.on("error",q0),F.on("close",Y0),G0?Q.nextTick(Y0):e!=null&&e.errorEmitted||d!=null&&d.errorEmitted?S||Q.nextTick(Y0):(!u&&(!S||x(F))&&(r||Z(F)===!1)||!i&&(!S||Z(F))&&(K0||x(F)===!1)||d&&F.req&&F.aborted)&&Q.nextTick(Y0);let L0=()=>{n=E,F.removeListener("aborted",Y0),F.removeListener("complete",t),F.removeListener("abort",Y0),F.removeListener("request",M0),F.req&&F.req.removeListener("finish",t),F.removeListener("end",l),F.removeListener("close",l),F.removeListener("finish",t),F.removeListener("end",H0),F.removeListener("error",q0),F.removeListener("close",Y0)};if(m.signal&&!G0){let Q0=()=>{let B0=n;L0(),B0.call(F,new q(void 0,{cause:m.signal.reason}))};if(m.signal.aborted)Q.nextTick(Q0);else{let B0=n;n=P((...p)=>{m.signal.removeEventListener("abort",Q0),B0.apply(F,p)}),m.signal.addEventListener("abort",Q0)}}return L0}function b(F,m){return new N((n,v)=>{f(F,m,(c)=>{c?v(c):n()})})}V.exports=f,V.exports.finished=b}),G7=j0(($,V)=>{var Q=globalThis.AbortController||u2().AbortController,{codes:{ERR_INVALID_ARG_TYPE:q,ERR_MISSING_ARGS:K,ERR_OUT_OF_RANGE:G},AbortError:W}=f0(),{validateAbortSignal:J,validateInteger:P,validateObject:j}=i1(),z=x0().Symbol("kWeak"),{finished:I}=b6(),{ArrayPrototypePush:N,MathFloor:A,Number:x,NumberIsNaN:k,Promise:g,PromiseReject:y,PromisePrototypeThen:Z,Symbol:O}=x0(),M=O("kEmpty"),R=O("kEof");function C(d,l){if(typeof d!="function")throw new q("fn",["Function","AsyncFunction"],d);l!=null&&j(l,"options"),l?.signal!=null&&J(l.signal,"options.signal");let S=1;return l?.concurrency!=null&&(S=A(l.concurrency)),P(S,"concurrency",1),async function*(){var r,t;let K0=new Q,H0=this,q0=[],G0=K0.signal,Y0={signal:G0},M0=()=>K0.abort();l!=null&&(r=l.signal)!==null&&r!==void 0&&r.aborted&&M0(),l==null||(t=l.signal)===null||t===void 0||t.addEventListener("abort",M0);let L0,Q0,B0=!1;function p(){B0=!0}async function B(){try{for await(let a of H0){var D;if(B0)return;if(G0.aborted)throw new W;try{a=d(a,Y0)}catch(s){a=y(s)}a!==M&&(typeof((D=a)===null||D===void 0?void 0:D.catch)=="function"&&a.catch(p),q0.push(a),L0&&(L0(),L0=null),!B0&&q0.length&&q0.length>=S&&await new g((s)=>{Q0=s}))}q0.push(R)}catch(a){let s=y(a);Z(s,void 0,p),q0.push(s)}finally{var _;B0=!0,L0&&(L0(),L0=null),l==null||(_=l.signal)===null||_===void 0||_.removeEventListener("abort",M0)}}B();try{for(;;){for(;q0.length>0;){let D=await q0[0];if(D===R)return;if(G0.aborted)throw new W;D!==M&&(yield D),q0.shift(),Q0&&(Q0(),Q0=null)}await new g((D)=>{L0=D})}}finally{K0.abort(),B0=!0,Q0&&(Q0(),Q0=null)}}.call(this)}function L(d=void 0){return d!=null&&j(d,"options"),d?.signal!=null&&J(d.signal,"options.signal"),async function*(){let l=0;for await(let r of this){var S;if(d!=null&&(S=d.signal)!==null&&S!==void 0&&S.aborted)throw new W({cause:d.signal.reason});yield[l++,r]}}.call(this)}async function T(d,l=void 0){for await(let S of F.call(this,d,l))return!0;return!1}async function E(d,l=void 0){if(typeof d!="function")throw new q("fn",["Function","AsyncFunction"],d);return!await T.call(this,async(...S)=>!await d(...S),l)}async function f(d,l){for await(let S of F.call(this,d,l))return S}async function b(d,l){if(typeof d!="function")throw new q("fn",["Function","AsyncFunction"],d);async function S(r,t){return await d(r,t),M}for await(let r of C.call(this,S,l));}function F(d,l){if(typeof d!="function")throw new q("fn",["Function","AsyncFunction"],d);async function S(r,t){return await d(r,t)?r:M}return C.call(this,S,l)}var m=class extends K{constructor(){super("reduce"),this.message="Reduce of an empty stream requires an initial value"}};async function n(d,l,S){var r;if(typeof d!="function")throw new q("reducer",["Function","AsyncFunction"],d);S!=null&&j(S,"options"),S?.signal!=null&&J(S.signal,"options.signal");let t=arguments.length>1;if(S!=null&&(r=S.signal)!==null&&r!==void 0&&r.aborted){let Y0=new W(void 0,{cause:S.signal.reason});throw this.once("error",()=>{}),await I(this.destroy(Y0)),Y0}let K0=new Q,H0=K0.signal;if(S!=null&&S.signal){let Y0={once:!0,[z]:this};S.signal.addEventListener("abort",()=>K0.abort(),Y0)}let q0=!1;try{for await(let Y0 of this){var G0;if(q0=!0,S!=null&&(G0=S.signal)!==null&&G0!==void 0&&G0.aborted)throw new W;t?l=await d(l,Y0,{signal:H0}):(l=Y0,t=!0)}if(!q0&&!t)throw new m}finally{K0.abort()}return l}async function v(d){d!=null&&j(d,"options"),d?.signal!=null&&J(d.signal,"options.signal");let l=[];for await(let r of this){var S;if(d!=null&&(S=d.signal)!==null&&S!==void 0&&S.aborted)throw new W(void 0,{cause:d.signal.reason});N(l,r)}return l}function c(d,l){let S=C.call(this,d,l);return async function*(){for await(let r of S)yield*r}.call(this)}function u(d){if(d=x(d),k(d))return 0;if(d<0)throw new G("number",">= 0",d);return d}function i(d,l=void 0){return l!=null&&j(l,"options"),l?.signal!=null&&J(l.signal,"options.signal"),d=u(d),async function*(){var S;if(l!=null&&(S=l.signal)!==null&&S!==void 0&&S.aborted)throw new W;for await(let t of this){var r;if(l!=null&&(r=l.signal)!==null&&r!==void 0&&r.aborted)throw new W;d--<=0&&(yield t)}}.call(this)}function e(d,l=void 0){return l!=null&&j(l,"options"),l?.signal!=null&&J(l.signal,"options.signal"),d=u(d),async function*(){var S;if(l!=null&&(S=l.signal)!==null&&S!==void 0&&S.aborted)throw new W;for await(let t of this){var r;if(l!=null&&(r=l.signal)!==null&&r!==void 0&&r.aborted)throw new W;if(d-- >0)yield t;else return}}.call(this)}V.exports.streamReturningOperators={asIndexedPairs:L,drop:i,filter:F,flatMap:c,map:C,take:e},V.exports.promiseReturningOperators={every:E,forEach:b,reduce:n,toArray:v,some:T,find:f}}),r6=j0(($,V)=>{var Q=(E6(),g6(K6)),{aggregateTwoErrors:q,codes:{ERR_MULTIPLE_CALLBACK:K},AbortError:G}=f0(),{Symbol:W}=x0(),{kDestroyed:J,isDestroyed:P,isFinished:j,isServerRequest:z}=y6(),I=W("kDestroy"),N=W("kConstruct");function A(F,m,n){F&&(F.stack,m&&!m.errored&&(m.errored=F),n&&!n.errored&&(n.errored=F))}function x(F,m){let n=this._readableState,v=this._writableState,c=v||n;return v&&v.destroyed||n&&n.destroyed?(typeof m=="function"&&m(),this):(A(F,v,n),v&&(v.destroyed=!0),n&&(n.destroyed=!0),c.constructed?k(this,F,m):this.once(I,function(u){k(this,q(u,F),m)}),this)}function k(F,m,n){let v=!1;function c(u){if(v)return;v=!0;let{_readableState:i,_writableState:e}=F;A(u,e,i),e&&(e.closed=!0),i&&(i.closed=!0),typeof n=="function"&&n(u),u?Q.nextTick(g,F,u):Q.nextTick(y,F)}try{F._destroy(m||null,c)}catch(u){c(u)}}function g(F,m){Z(F,m),y(F)}function y(F){let{_readableState:m,_writableState:n}=F;n&&(n.closeEmitted=!0),m&&(m.closeEmitted=!0),(n&&n.emitClose||m&&m.emitClose)&&F.emit("close")}function Z(F,m){let{_readableState:n,_writableState:v}=F;v&&v.errorEmitted||n&&n.errorEmitted||(v&&(v.errorEmitted=!0),n&&(n.errorEmitted=!0),F.emit("error",m))}function O(){let F=this._readableState,m=this._writableState;F&&(F.constructed=!0,F.closed=!1,F.closeEmitted=!1,F.destroyed=!1,F.errored=null,F.errorEmitted=!1,F.reading=!1,F.ended=F.readable===!1,F.endEmitted=F.readable===!1),m&&(m.constructed=!0,m.destroyed=!1,m.closed=!1,m.closeEmitted=!1,m.errored=null,m.errorEmitted=!1,m.finalCalled=!1,m.prefinished=!1,m.ended=m.writable===!1,m.ending=m.writable===!1,m.finished=m.writable===!1)}function M(F,m,n){let{_readableState:v,_writableState:c}=F;if(c&&c.destroyed||v&&v.destroyed)return this;v&&v.autoDestroy||c&&c.autoDestroy?F.destroy(m):m&&(m.stack,c&&!c.errored&&(c.errored=m),v&&!v.errored&&(v.errored=m),n?Q.nextTick(Z,F,m):Z(F,m))}function R(F,m){if(typeof F._construct!="function")return;let{_readableState:n,_writableState:v}=F;n&&(n.constructed=!1),v&&(v.constructed=!1),F.once(N,m),!(F.listenerCount(N)>1)&&Q.nextTick(C,F)}function C(F){let m=!1;function n(v){if(m){M(F,v??new K);return}m=!0;let{_readableState:c,_writableState:u}=F,i=u||c;c&&(c.constructed=!0),u&&(u.constructed=!0),i.destroyed?F.emit(I,v):v?M(F,v,!0):Q.nextTick(L,F)}try{F._construct(n)}catch(v){n(v)}}function L(F){F.emit(N)}function T(F){return F&&F.setHeader&&typeof F.abort=="function"}function E(F){F.emit("close")}function f(F,m){F.emit("error",m),Q.nextTick(E,F)}function b(F,m){!F||P(F)||(!m&&!j(F)&&(m=new G),z(F)?(F.socket=null,F.destroy(m)):T(F)?F.abort():T(F.req)?F.req.abort():typeof F.destroy=="function"?F.destroy(m):typeof F.close=="function"?F.close():m?Q.nextTick(f,F,m):Q.nextTick(E,F),F.destroyed||(F[J]=!0))}V.exports={construct:R,destroyer:b,destroy:x,undestroy:O,errorOrDestroy:M}}),d2=j0(($,V)=>{var Q=typeof Reflect=="object"?Reflect:null,q=Q&&typeof Q.apply=="function"?Q.apply:function(C,L,T){return Function.prototype.apply.call(C,L,T)},K;Q&&typeof Q.ownKeys=="function"?K=Q.ownKeys:Object.getOwnPropertySymbols?K=function(C){return Object.getOwnPropertyNames(C).concat(Object.getOwnPropertySymbols(C))}:K=function(C){return Object.getOwnPropertyNames(C)};function G(C){console&&console.warn&&console.warn(C)}var W=Number.isNaN||function(C){return C!==C};function J(){J.init.call(this)}V.exports=J,V.exports.once=O,J.EventEmitter=J,J.prototype._events=void 0,J.prototype._eventsCount=0,J.prototype._maxListeners=void 0;var P=10;function j(C){if(typeof C!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof C)}Object.defineProperty(J,"defaultMaxListeners",{enumerable:!0,get:function(){return P},set:function(C){if(typeof C!="number"||C<0||W(C))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+C+".");P=C}}),J.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},J.prototype.setMaxListeners=function(C){if(typeof C!="number"||C<0||W(C))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+C+".");return this._maxListeners=C,this};function z(C){return C._maxListeners===void 0?J.defaultMaxListeners:C._maxListeners}J.prototype.getMaxListeners=function(){return z(this)},J.prototype.emit=function(C){for(var L=[],T=1;T<arguments.length;T++)L.push(arguments[T]);var E=C==="error",f=this._events;if(f!==void 0)E=E&&f.error===void 0;else if(!E)return!1;if(E){var b;if(L.length>0&&(b=L[0]),b instanceof Error)throw b;var F=new Error("Unhandled error."+(b?" ("+b.message+")":""));throw F.context=b,F}var m=f[C];if(m===void 0)return!1;if(typeof m=="function")q(m,this,L);else for(var n=m.length,v=g(m,n),T=0;T<n;++T)q(v[T],this,L);return!0};function I(C,L,T,E){var f,b,F;if(j(T),b=C._events,b===void 0?(b=C._events=Object.create(null),C._eventsCount=0):(b.newListener!==void 0&&(C.emit("newListener",L,T.listener?T.listener:T),b=C._events),F=b[L]),F===void 0)F=b[L]=T,++C._eventsCount;else if(typeof F=="function"?F=b[L]=E?[T,F]:[F,T]:E?F.unshift(T):F.push(T),f=z(C),f>0&&F.length>f&&!F.warned){F.warned=!0;var m=new Error("Possible EventEmitter memory leak detected. "+F.length+" "+String(L)+" listeners added. Use emitter.setMaxListeners() to increase limit");m.name="MaxListenersExceededWarning",m.emitter=C,m.type=L,m.count=F.length,G(m)}return C}J.prototype.addListener=function(C,L){return I(this,C,L,!1)},J.prototype.on=J.prototype.addListener,J.prototype.prependListener=function(C,L){return I(this,C,L,!0)};function N(){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 A(C,L,T){var E={fired:!1,wrapFn:void 0,target:C,type:L,listener:T},f=N.bind(E);return f.listener=T,E.wrapFn=f,f}J.prototype.once=function(C,L){return j(L),this.on(C,A(this,C,L)),this},J.prototype.prependOnceListener=function(C,L){return j(L),this.prependListener(C,A(this,C,L)),this},J.prototype.removeListener=function(C,L){var T,E,f,b,F;if(j(L),E=this._events,E===void 0)return this;if(T=E[C],T===void 0)return this;if(T===L||T.listener===L)--this._eventsCount===0?this._events=Object.create(null):(delete E[C],E.removeListener&&this.emit("removeListener",C,T.listener||L));else if(typeof T!="function"){for(f=-1,b=T.length-1;b>=0;b--)if(T[b]===L||T[b].listener===L){F=T[b].listener,f=b;break}if(f<0)return this;f===0?T.shift():y(T,f),T.length===1&&(E[C]=T[0]),E.removeListener!==void 0&&this.emit("removeListener",C,F||L)}return this},J.prototype.off=J.prototype.removeListener,J.prototype.removeAllListeners=function(C){var L,T,E;if(T=this._events,T===void 0)return this;if(T.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):T[C]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete T[C]),this;if(arguments.length===0){var f=Object.keys(T),b;for(E=0;E<f.length;++E)b=f[E],b!=="removeListener"&&this.removeAllListeners(b);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(L=T[C],typeof L=="function")this.removeListener(C,L);else if(L!==void 0)for(E=L.length-1;E>=0;E--)this.removeListener(C,L[E]);return this};function x(C,L,T){var E=C._events;if(E===void 0)return[];var f=E[L];return f===void 0?[]:typeof f=="function"?T?[f.listener||f]:[f]:T?Z(f):g(f,f.length)}J.prototype.listeners=function(C){return x(this,C,!0)},J.prototype.rawListeners=function(C){return x(this,C,!1)},J.listenerCount=function(C,L){return typeof C.listenerCount=="function"?C.listenerCount(L):k.call(C,L)},J.prototype.listenerCount=k;function k(C){var L=this._events;if(L!==void 0){var T=L[C];if(typeof T=="function")return 1;if(T!==void 0)return T.length}return 0}J.prototype.eventNames=function(){return this._eventsCount>0?K(this._events):[]};function g(C,L){for(var T=new Array(L),E=0;E<L;++E)T[E]=C[E];return T}function y(C,L){for(;L+1<C.length;L++)C[L]=C[L+1];C.pop()}function Z(C){for(var L=new Array(C.length),T=0;T<L.length;++T)L[T]=C[T].listener||C[T];return L}function O(C,L){return new Promise(function(T,E){function f(F){C.removeListener(L,b),E(F)}function b(){typeof C.removeListener=="function"&&C.removeListener("error",f),T([].slice.call(arguments))}R(C,L,b,{once:!0}),L!=="error"&&M(C,f,{once:!0})})}function M(C,L,T){typeof C.on=="function"&&R(C,"error",L,T)}function R(C,L,T,E){if(typeof C.on=="function")E.once?C.once(L,T):C.on(L,T);else if(typeof C.addEventListener=="function")C.addEventListener(L,function f(b){E.once&&C.removeEventListener(L,f),T(b)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof C)}}),l2=j0(($,V)=>{var{ArrayIsArray:Q,ObjectSetPrototypeOf:q}=x0(),{EventEmitter:K}=d2();function G(J){K.call(this,J)}q(G.prototype,K.prototype),q(G,K),G.prototype.pipe=function(J,P){let j=this;function z(y){J.writable&&J.write(y)===!1&&j.pause&&j.pause()}j.on("data",z);function I(){j.readable&&j.resume&&j.resume()}J.on("drain",I),!J._isStdio&&(!P||P.end!==!1)&&(j.on("end",A),j.on("close",x));let N=!1;function A(){N||(N=!0,J.end())}function x(){N||(N=!0,typeof J.destroy=="function"&&J.destroy())}function k(y){g(),K.listenerCount(this,"error")===0&&this.emit("error",y)}W(j,"error",k),W(J,"error",k);function g(){j.removeListener("data",z),J.removeListener("drain",I),j.removeListener("end",A),j.removeListener("close",x),j.removeListener("error",k),J.removeListener("error",k),j.removeListener("end",g),j.removeListener("close",g),J.removeListener("close",g)}return j.on("end",g),j.on("close",g),J.on("close",g),J.emit("pipe",j),J};function W(J,P,j){if(typeof J.prependListener=="function")return J.prependListener(P,j);!J._events||!J._events[P]?J.on(P,j):Q(J._events[P])?J._events[P].unshift(j):J._events[P]=[j,J._events[P]]}V.exports={Stream:G,prependListener:W}}),o2=j0(($,V)=>{var{AbortError:Q,codes:q}=f0(),K=b6(),{ERR_INVALID_ARG_TYPE:G}=q,W=(P,j)=>{if(typeof P!="object"||!("aborted"in P))throw new G(j,"AbortSignal",P)};function J(P){return!!(P&&typeof P.pipe=="function")}V.exports.addAbortSignal=function(P,j){if(W(P,"signal"),!J(j))throw new G("stream","stream.Stream",j);return V.exports.addAbortSignalNoValidate(P,j)},V.exports.addAbortSignalNoValidate=function(P,j){if(typeof P!="object"||!("aborted"in P))return j;let z=()=>{j.destroy(new Q(void 0,{cause:P.reason}))};return P.aborted?z():(P.addEventListener("abort",z),K(j,()=>P.removeEventListener("abort",z))),j}}),U7=j0(($,V)=>{var{StringPrototypeSlice:Q,SymbolIterator:q,TypedArrayPrototypeSet:K,Uint8Array:G}=x0(),{Buffer:W}=H6(),{inspect:J}=X6();V.exports=class{constructor(){this.head=null,this.tail=null,this.length=0}push(P){let j={data:P,next:null};this.length>0?this.tail.next=j:this.head=j,this.tail=j,++this.length}unshift(P){let j={data:P,next:this.head};this.length===0&&(this.tail=j),this.head=j,++this.length}shift(){if(this.length===0)return;let P=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,P}clear(){this.head=this.tail=null,this.length=0}join(P){if(this.length===0)return"";let j=this.head,z=""+j.data;for(;(j=j.next)!==null;)z+=P+j.data;return z}concat(P){if(this.length===0)return W.alloc(0);let j=W.allocUnsafe(P>>>0),z=this.head,I=0;for(;z;)K(j,z.data,I),I+=z.data.length,z=z.next;return j}consume(P,j){let z=this.head.data;if(P<z.length){let I=z.slice(0,P);return this.head.data=z.slice(P),I}return P===z.length?this.shift():j?this._getString(P):this._getBuffer(P)}first(){return this.head.data}*[q](){for(let P=this.head;P;P=P.next)yield P.data}_getString(P){let j="",z=this.head,I=0;do{let N=z.data;if(P>N.length)j+=N,P-=N.length;else{P===N.length?(j+=N,++I,z.next?this.head=z.next:this.head=this.tail=null):(j+=Q(N,0,P),this.head=z,z.data=Q(N,P));break}++I}while((z=z.next)!==null);return this.length-=I,j}_getBuffer(P){let j=W.allocUnsafe(P),z=P,I=this.head,N=0;do{let A=I.data;if(P>A.length)K(j,A,z-P),P-=A.length;else{P===A.length?(K(j,A,z-P),++N,I.next?this.head=I.next:this.head=this.tail=null):(K(j,new G(A.buffer,A.byteOffset,P),z-P),this.head=I,I.data=A.slice(P));break}++N}while((I=I.next)!==null);return this.length-=N,j}[Symbol.for("nodejs.util.inspect.custom")](P,j){return J(this,{...j,depth:0,customInspect:!1})}}}),i2=j0(($,V)=>{var{MathFloor:Q,NumberIsInteger:q}=x0(),{ERR_INVALID_ARG_VALUE:K}=f0().codes;function G(P,j,z){return P.highWaterMark!=null?P.highWaterMark:j?P[z]:null}function W(P){return P?16:16384}function J(P,j,z,I){let N=G(j,I,z);if(N!=null){if(!q(N)||N<0){let A=I?`options.${z}`:"options.highWaterMark";throw new K(A,N)}return Q(N)}return W(P.objectMode)}V.exports={getHighWaterMark:J,getDefaultHighWaterMark:W}}),W7=j0(($,V)=>{var Q=H6(),q=Q.Buffer;function K(W,J){for(var P in W)J[P]=W[P]}q.from&&q.alloc&&q.allocUnsafe&&q.allocUnsafeSlow?V.exports=Q:(K(Q,$),$.Buffer=G);function G(W,J,P){return q(W,J,P)}G.prototype=Object.create(q.prototype),K(q,G),G.from=function(W,J,P){if(typeof W=="number")throw new TypeError("Argument must not be a number");return q(W,J,P)},G.alloc=function(W,J,P){if(typeof W!="number")throw new TypeError("Argument must be a number");var j=q(W);return J!==void 0?typeof P=="string"?j.fill(J,P):j.fill(J):j.fill(0),j},G.allocUnsafe=function(W){if(typeof W!="number")throw new TypeError("Argument must be a number");return q(W)},G.allocUnsafeSlow=function(W){if(typeof W!="number")throw new TypeError("Argument must be a number");return Q.SlowBuffer(W)}}),j7=j0(($)=>{var V=W7().Buffer,Q=V.isEncoding||function(Z){switch(Z=""+Z,Z&&Z.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 q(Z){if(!Z)return"utf8";for(var O;;)switch(Z){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 Z;default:if(O)return;Z=(""+Z).toLowerCase(),O=!0}}function K(Z){var O=q(Z);if(typeof O!="string"&&(V.isEncoding===Q||!Q(Z)))throw new Error("Unknown encoding: "+Z);return O||Z}$.StringDecoder=G;function G(Z){this.encoding=K(Z);var O;switch(this.encoding){case"utf16le":this.text=N,this.end=A,O=4;break;case"utf8":this.fillLast=j,O=4;break;case"base64":this.text=x,this.end=k,O=3;break;default:this.write=g,this.end=y;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=V.allocUnsafe(O)}G.prototype.write=function(Z){if(Z.length===0)return"";var O,M;if(this.lastNeed){if(O=this.fillLast(Z),O===void 0)return"";M=this.lastNeed,this.lastNeed=0}else M=0;return M<Z.length?O?O+this.text(Z,M):this.text(Z,M):O||""},G.prototype.end=I,G.prototype.text=z,G.prototype.fillLast=function(Z){if(this.lastNeed<=Z.length)return Z.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);Z.copy(this.lastChar,this.lastTotal-this.lastNeed,0,Z.length),this.lastNeed-=Z.length};function W(Z){return Z<=127?0:Z>>5===6?2:Z>>4===14?3:Z>>3===30?4:Z>>6===2?-1:-2}function J(Z,O,M){var R=O.length-1;if(R<M)return 0;var C=W(O[R]);return C>=0?(C>0&&(Z.lastNeed=C-1),C):--R<M||C===-2?0:(C=W(O[R]),C>=0?(C>0&&(Z.lastNeed=C-2),C):--R<M||C===-2?0:(C=W(O[R]),C>=0?(C>0&&(C===2?C=0:Z.lastNeed=C-3),C):0))}function P(Z,O,M){if((O[0]&192)!==128)return Z.lastNeed=0,"�";if(Z.lastNeed>1&&O.length>1){if((O[1]&192)!==128)return Z.lastNeed=1,"�";if(Z.lastNeed>2&&O.length>2&&(O[2]&192)!==128)return Z.lastNeed=2,"�"}}function j(Z){var O=this.lastTotal-this.lastNeed,M=P(this,Z,O);if(M!==void 0)return M;if(this.lastNeed<=Z.length)return Z.copy(this.lastChar,O,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);Z.copy(this.lastChar,O,0,Z.length),this.lastNeed-=Z.length}function z(Z,O){var M=J(this,Z,O);if(!this.lastNeed)return Z.toString("utf8",O);this.lastTotal=M;var R=Z.length-(M-this.lastNeed);return Z.copy(this.lastChar,0,R),Z.toString("utf8",O,R)}function I(Z){var O=Z&&Z.length?this.write(Z):"";return this.lastNeed?O+"�":O}function N(Z,O){if((Z.length-O)%2===0){var M=Z.toString("utf16le",O);if(M){var R=M.charCodeAt(M.length-1);if(R>=55296&&R<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=Z[Z.length-2],this.lastChar[1]=Z[Z.length-1],M.slice(0,-1)}return M}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=Z[Z.length-1],Z.toString("utf16le",O,Z.length-1)}function A(Z){var O=Z&&Z.length?this.write(Z):"";if(this.lastNeed){var M=this.lastTotal-this.lastNeed;return O+this.lastChar.toString("utf16le",0,M)}return O}function x(Z,O){var M=(Z.length-O)%3;return M===0?Z.toString("base64",O):(this.lastNeed=3-M,this.lastTotal=3,M===1?this.lastChar[0]=Z[Z.length-1]:(this.lastChar[0]=Z[Z.length-2],this.lastChar[1]=Z[Z.length-1]),Z.toString("base64",O,Z.length-M))}function k(Z){var O=Z&&Z.length?this.write(Z):"";return this.lastNeed?O+this.lastChar.toString("base64",0,3-this.lastNeed):O}function g(Z){return Z.toString(this.encoding)}function y(Z){return Z&&Z.length?this.write(Z):""}}),h$=j0(($,V)=>{var Q=(E6(),g6(K6)),{PromisePrototypeThen:q,SymbolAsyncIterator:K,SymbolIterator:G}=x0(),{Buffer:W}=H6(),{ERR_INVALID_ARG_TYPE:J,ERR_STREAM_NULL_VALUES:P}=f0().codes;function j(z,I,N){let A;if(typeof I=="string"||I instanceof W)return new z({objectMode:!0,...N,read(){this.push(I),this.push(null)}});let x;if(I&&I[K])x=!0,A=I[K]();else if(I&&I[G])x=!1,A=I[G]();else throw new J("iterable",["Iterable"],I);let k=new z({objectMode:!0,highWaterMark:1,...N}),g=!1;k._read=function(){g||(g=!0,Z())},k._destroy=function(O,M){q(y(O),()=>Q.nextTick(M,O),(R)=>Q.nextTick(M,R||O))};async function y(O){let M=O!=null,R=typeof A.throw=="function";if(M&&R){let{value:C,done:L}=await A.throw(O);if(await C,L)return}if(typeof A.return=="function"){let{value:C}=await A.return();await C}}async function Z(){for(;;){try{let{value:O,done:M}=x?await A.next():A.next();if(M)k.push(null);else{let R=O&&typeof O.then=="function"?await O:O;if(R===null)throw g=!1,new P;if(k.push(R))continue;g=!1}}catch(O){k.destroy(O)}break}}return k}V.exports=j}),n1=j0(($,V)=>{var Q=(E6(),g6(K6)),{ArrayPrototypeIndexOf:q,NumberIsInteger:K,NumberIsNaN:G,NumberParseInt:W,ObjectDefineProperties:J,ObjectKeys:P,ObjectSetPrototypeOf:j,Promise:z,SafeSet:I,SymbolAsyncIterator:N,Symbol:A}=x0();V.exports=S,S.ReadableState=l;var{EventEmitter:x}=d2(),{Stream:k,prependListener:g}=l2(),{Buffer:y}=H6(),{addAbortSignal:Z}=o2(),O=b6(),M=X6().debuglog("stream",(X)=>{M=X}),R=U7(),C=r6(),{getHighWaterMark:L,getDefaultHighWaterMark:T}=i2(),{aggregateTwoErrors:E,codes:{ERR_INVALID_ARG_TYPE:f,ERR_METHOD_NOT_IMPLEMENTED:b,ERR_OUT_OF_RANGE:F,ERR_STREAM_PUSH_AFTER_EOF:m,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:n}}=f0(),{validateObject:v}=i1(),c=A("kPaused"),{StringDecoder:u}=j7(),i=h$();j(S.prototype,k.prototype),j(S,k);var e=()=>{},{errorOrDestroy:d}=C;function l(X,Y,U){typeof U!="boolean"&&(U=Y instanceof Y6()),this.objectMode=!!(X&&X.objectMode),U&&(this.objectMode=this.objectMode||!!(X&&X.readableObjectMode)),this.highWaterMark=X?L(this,X,"readableHighWaterMark",U):T(!1),this.buffer=new R,this.length=0,this.pipes=[],this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.constructed=!0,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this[c]=null,this.errorEmitted=!1,this.emitClose=!X||X.emitClose!==!1,this.autoDestroy=!X||X.autoDestroy!==!1,this.destroyed=!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this.defaultEncoding=X&&X.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.multiAwaitDrain=!1,this.readingMore=!1,this.dataEmitted=!1,this.decoder=null,this.encoding=null,X&&X.encoding&&(this.decoder=new u(X.encoding),this.encoding=X.encoding)}function S(X){if(!(this instanceof S))return new S(X);let Y=this instanceof Y6();this._readableState=new l(X,this,Y),X&&(typeof X.read=="function"&&(this._read=X.read),typeof X.destroy=="function"&&(this._destroy=X.destroy),typeof X.construct=="function"&&(this._construct=X.construct),X.signal&&!Y&&Z(X.signal,this)),k.call(this,X),C.construct(this,()=>{this._readableState.needReadable&&L0(this,this._readableState)})}S.prototype.destroy=C.destroy,S.prototype._undestroy=C.undestroy,S.prototype._destroy=function(X,Y){Y(X)},S.prototype[x.captureRejectionSymbol]=function(X){this.destroy(X)},S.prototype.push=function(X,Y){return r(this,X,Y,!1)},S.prototype.unshift=function(X,Y){return r(this,X,Y,!0)};function r(X,Y,U,H){M("readableAddChunk",Y);let w=X._readableState,h;if(w.objectMode||(typeof Y=="string"?(U=U||w.defaultEncoding,w.encoding!==U&&(H&&w.encoding?Y=y.from(Y,U).toString(w.encoding):(Y=y.from(Y,U),U=""))):Y instanceof y?U="":k._isUint8Array(Y)?(Y=k._uint8ArrayToBuffer(Y),U=""):Y!=null&&(h=new f("chunk",["string","Buffer","Uint8Array"],Y))),h)d(X,h);else if(Y===null)w.reading=!1,G0(X,w);else if(w.objectMode||Y&&Y.length>0)if(H)if(w.endEmitted)d(X,new n);else{if(w.destroyed||w.errored)return!1;t(X,w,Y,!0)}else if(w.ended)d(X,new m);else{if(w.destroyed||w.errored)return!1;w.reading=!1,w.decoder&&!U?(Y=w.decoder.write(Y),w.objectMode||Y.length!==0?t(X,w,Y,!1):L0(X,w)):t(X,w,Y,!1)}else H||(w.reading=!1,L0(X,w));return!w.ended&&(w.length<w.highWaterMark||w.length===0)}function t(X,Y,U,H){Y.flowing&&Y.length===0&&!Y.sync&&X.listenerCount("data")>0?(Y.multiAwaitDrain?Y.awaitDrainWriters.clear():Y.awaitDrainWriters=null,Y.dataEmitted=!0,X.emit("data",U)):(Y.length+=Y.objectMode?1:U.length,H?Y.buffer.unshift(U):Y.buffer.push(U),Y.needReadable&&Y0(X)),L0(X,Y)}S.prototype.isPaused=function(){let X=this._readableState;return X[c]===!0||X.flowing===!1},S.prototype.setEncoding=function(X){let Y=new u(X);this._readableState.decoder=Y,this._readableState.encoding=this._readableState.decoder.encoding;let U=this._readableState.buffer,H="";for(let w of U)H+=Y.write(w);return U.clear(),H!==""&&U.push(H),this._readableState.length=H.length,this};var K0=1073741824;function H0(X){if(X>K0)throw new F("size","<= 1GiB",X);return X--,X|=X>>>1,X|=X>>>2,X|=X>>>4,X|=X>>>8,X|=X>>>16,X++,X}function q0(X,Y){return X<=0||Y.length===0&&Y.ended?0:Y.objectMode?1:G(X)?Y.flowing&&Y.length?Y.buffer.first().length:Y.length:X<=Y.length?X:Y.ended?Y.length:0}S.prototype.read=function(X){M("read",X),X===void 0?X=NaN:K(X)||(X=W(X,10));let Y=this._readableState,U=X;if(X>Y.highWaterMark&&(Y.highWaterMark=H0(X)),X!==0&&(Y.emittedReadable=!1),X===0&&Y.needReadable&&((Y.highWaterMark!==0?Y.length>=Y.highWaterMark:Y.length>0)||Y.ended))return M("read: emitReadable",Y.length,Y.ended),Y.length===0&&Y.ended?z0(this):Y0(this),null;if(X=q0(X,Y),X===0&&Y.ended)return Y.length===0&&z0(this),null;let H=Y.needReadable;if(M("need readable",H),(Y.length===0||Y.length-X<Y.highWaterMark)&&(H=!0,M("length less than watermark",H)),Y.ended||Y.reading||Y.destroyed||Y.errored||!Y.constructed)H=!1,M("reading, ended or constructing",H);else if(H){M("do read"),Y.reading=!0,Y.sync=!0,Y.length===0&&(Y.needReadable=!0);try{this._read(Y.highWaterMark)}catch(h){d(this,h)}Y.sync=!1,Y.reading||(X=q0(U,Y))}let w;return X>0?w=X0(X,Y):w=null,w===null?(Y.needReadable=Y.length<=Y.highWaterMark,X=0):(Y.length-=X,Y.multiAwaitDrain?Y.awaitDrainWriters.clear():Y.awaitDrainWriters=null),Y.length===0&&(Y.ended||(Y.needReadable=!0),U!==X&&Y.ended&&z0(this)),w!==null&&!Y.errorEmitted&&!Y.closeEmitted&&(Y.dataEmitted=!0,this.emit("data",w)),w};function G0(X,Y){if(M("onEofChunk"),!Y.ended){if(Y.decoder){let U=Y.decoder.end();U&&U.length&&(Y.buffer.push(U),Y.length+=Y.objectMode?1:U.length)}Y.ended=!0,Y.sync?Y0(X):(Y.needReadable=!1,Y.emittedReadable=!0,M0(X))}}function Y0(X){let Y=X._readableState;M("emitReadable",Y.needReadable,Y.emittedReadable),Y.needReadable=!1,Y.emittedReadable||(M("emitReadable",Y.flowing),Y.emittedReadable=!0,Q.nextTick(M0,X))}function M0(X){let Y=X._readableState;M("emitReadable_",Y.destroyed,Y.length,Y.ended),!Y.destroyed&&!Y.errored&&(Y.length||Y.ended)&&(X.emit("readable"),Y.emittedReadable=!1),Y.needReadable=!Y.flowing&&!Y.ended&&Y.length<=Y.highWaterMark,a(X)}function L0(X,Y){!Y.readingMore&&Y.constructed&&(Y.readingMore=!0,Q.nextTick(Q0,X,Y))}function Q0(X,Y){for(;!Y.reading&&!Y.ended&&(Y.length<Y.highWaterMark||Y.flowing&&Y.length===0);){let U=Y.length;if(M("maybeReadMore read 0"),X.read(0),U===Y.length)break}Y.readingMore=!1}S.prototype._read=function(X){throw new b("_read()")},S.prototype.pipe=function(X,Y){let U=this,H=this._readableState;H.pipes.length===1&&(H.multiAwaitDrain||(H.multiAwaitDrain=!0,H.awaitDrainWriters=new I(H.awaitDrainWriters?[H.awaitDrainWriters]:[]))),H.pipes.push(X),M("pipe count=%d opts=%j",H.pipes.length,Y);let w=(!Y||Y.end!==!1)&&X!==Q.stdout&&X!==Q.stderr?o:H1;H.endEmitted?Q.nextTick(w):U.once("end",w),X.on("unpipe",h);function h(S6,q6){M("onunpipe"),S6===U&&q6&&q6.hasUnpiped===!1&&(q6.hasUnpiped=!0,O0())}function o(){M("onend"),X.end()}let U0,A0=!1;function O0(){M("cleanup"),X.removeListener("close",h2),X.removeListener("finish",_2),U0&&X.removeListener("drain",U0),X.removeListener("error",f2),X.removeListener("unpipe",h),U.removeListener("end",o),U.removeListener("end",H1),U.removeListener("data",D0),A0=!0,U0&&H.awaitDrainWriters&&(!X._writableState||X._writableState.needDrain)&&U0()}function Z0(){A0||(H.pipes.length===1&&H.pipes[0]===X?(M("false write response, pause",0),H.awaitDrainWriters=X,H.multiAwaitDrain=!1):H.pipes.length>1&&H.pipes.includes(X)&&(M("false write response, pause",H.awaitDrainWriters.size),H.awaitDrainWriters.add(X)),U.pause()),U0||(U0=B0(U,X),X.on("drain",U0))}U.on("data",D0);function D0(S6){M("ondata");let q6=X.write(S6);M("dest.write",q6),q6===!1&&Z0()}function f2(S6){if(M("onerror",S6),H1(),X.removeListener("error",f2),X.listenerCount("error")===0){let q6=X._writableState||X._readableState;q6&&!q6.errorEmitted?d(X,S6):X.emit("error",S6)}}g(X,"error",f2);function h2(){X.removeListener("finish",_2),H1()}X.once("close",h2);function _2(){M("onfinish"),X.removeListener("close",h2),H1()}X.once("finish",_2);function H1(){M("unpipe"),U.unpipe(X)}return X.emit("pipe",U),X.writableNeedDrain===!0?H.flowing&&Z0():H.flowing||(M("pipe resume"),U.resume()),X};function B0(X,Y){return function(){let U=X._readableState;U.awaitDrainWriters===Y?(M("pipeOnDrain",1),U.awaitDrainWriters=null):U.multiAwaitDrain&&(M("pipeOnDrain",U.awaitDrainWriters.size),U.awaitDrainWriters.delete(Y)),(!U.awaitDrainWriters||U.awaitDrainWriters.size===0)&&X.listenerCount("data")&&X.resume()}}S.prototype.unpipe=function(X){let Y=this._readableState,U={hasUnpiped:!1};if(Y.pipes.length===0)return this;if(!X){let w=Y.pipes;Y.pipes=[],this.pause();for(let h=0;h<w.length;h++)w[h].emit("unpipe",this,{hasUnpiped:!1});return this}let H=q(Y.pipes,X);return H===-1?this:(Y.pipes.splice(H,1),Y.pipes.length===0&&this.pause(),X.emit("unpipe",this,U),this)},S.prototype.on=function(X,Y){let U=k.prototype.on.call(this,X,Y),H=this._readableState;return X==="data"?(H.readableListening=this.listenerCount("readable")>0,H.flowing!==!1&&this.resume()):X==="readable"&&!H.endEmitted&&!H.readableListening&&(H.readableListening=H.needReadable=!0,H.flowing=!1,H.emittedReadable=!1,M("on readable",H.length,H.reading),H.length?Y0(this):H.reading||Q.nextTick(B,this)),U},S.prototype.addListener=S.prototype.on,S.prototype.removeListener=function(X,Y){let U=k.prototype.removeListener.call(this,X,Y);return X==="readable"&&Q.nextTick(p,this),U},S.prototype.off=S.prototype.removeListener,S.prototype.removeAllListeners=function(X){let Y=k.prototype.removeAllListeners.apply(this,arguments);return(X==="readable"||X===void 0)&&Q.nextTick(p,this),Y};function p(X){let Y=X._readableState;Y.readableListening=X.listenerCount("readable")>0,Y.resumeScheduled&&Y[c]===!1?Y.flowing=!0:X.listenerCount("data")>0?X.resume():Y.readableListening||(Y.flowing=null)}function B(X){M("readable nexttick read 0"),X.read(0)}S.prototype.resume=function(){let X=this._readableState;return X.flowing||(M("resume"),X.flowing=!X.readableListening,D(this,X)),X[c]=!1,this};function D(X,Y){Y.resumeScheduled||(Y.resumeScheduled=!0,Q.nextTick(_,X,Y))}function _(X,Y){M("resume",Y.reading),Y.reading||X.read(0),Y.resumeScheduled=!1,X.emit("resume"),a(X),Y.flowing&&!Y.reading&&X.read(0)}S.prototype.pause=function(){return M("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(M("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState[c]=!0,this};function a(X){let Y=X._readableState;for(M("flow",Y.flowing);Y.flowing&&X.read()!==null;);}S.prototype.wrap=function(X){let Y=!1;X.on("data",(H)=>{!this.push(H)&&X.pause&&(Y=!0,X.pause())}),X.on("end",()=>{this.push(null)}),X.on("error",(H)=>{d(this,H)}),X.on("close",()=>{this.destroy()}),X.on("destroy",()=>{this.destroy()}),this._read=()=>{Y&&X.resume&&(Y=!1,X.resume())};let U=P(X);for(let H=1;H<U.length;H++){let w=U[H];this[w]===void 0&&typeof X[w]=="function"&&(this[w]=X[w].bind(X))}return this},S.prototype[N]=function(){return s(this)},S.prototype.iterator=function(X){return X!==void 0&&v(X,"options"),s(this,X)};function s(X,Y){typeof X.read!="function"&&(X=S.wrap(X,{objectMode:!0}));let U=W0(X,Y);return U.stream=X,U}async function*W0(X,Y){let U=e;function H(o){this===X?(U(),U=e):U=o}X.on("readable",H);let w,h=O(X,{writable:!1},(o)=>{w=o?E(w,o):null,U(),U=e});try{for(;;){let o=X.destroyed?null:X.read();if(o!==null)yield o;else{if(w)throw w;if(w===null)return;await new z(H)}}}catch(o){throw w=E(w,o),w}finally{(w||Y?.destroyOnReturn!==!1)&&(w===void 0||X._readableState.autoDestroy)?C.destroyer(X,null):(X.off("readable",H),h())}}J(S.prototype,{readable:{__proto__:null,get(){let X=this._readableState;return!!X&&X.readable!==!1&&!X.destroyed&&!X.errorEmitted&&!X.endEmitted},set(X){this._readableState&&(this._readableState.readable=!!X)}},readableDidRead:{__proto__:null,enumerable:!1,get:function(){return this._readableState.dataEmitted}},readableAborted:{__proto__:null,enumerable:!1,get:function(){return!!(this._readableState.readable!==!1&&(this._readableState.destroyed||this._readableState.errored)&&!this._readableState.endEmitted)}},readableHighWaterMark:{__proto__:null,enumerable:!1,get:function(){return this._readableState.highWaterMark}},readableBuffer:{__proto__:null,enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}},readableFlowing:{__proto__:null,enumerable:!1,get:function(){return this._readableState.flowing},set:function(X){this._readableState&&(this._readableState.flowing=X)}},readableLength:{__proto__:null,enumerable:!1,get(){return this._readableState.length}},readableObjectMode:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.objectMode:!1}},readableEncoding:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.encoding:null}},errored:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.errored:null}},closed:{__proto__:null,get(){return this._readableState?this._readableState.closed:!1}},destroyed:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.destroyed:!1},set(X){!this._readableState||(this._readableState.destroyed=X)}},readableEnded:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.endEmitted:!1}}}),J(l.prototype,{pipesCount:{__proto__:null,get(){return this.pipes.length}},paused:{__proto__:null,get(){return this[c]!==!1},set(X){this[c]=!!X}}}),S._fromList=X0;function X0(X,Y){if(Y.length===0)return null;let U;return Y.objectMode?U=Y.buffer.shift():!X||X>=Y.length?(Y.decoder?U=Y.buffer.join(""):Y.buffer.length===1?U=Y.buffer.first():U=Y.buffer.concat(Y.length),Y.buffer.clear()):U=Y.buffer.consume(X,Y.decoder),U}function z0(X){let Y=X._readableState;M("endReadable",Y.endEmitted),Y.endEmitted||(Y.ended=!0,Q.nextTick(b0,Y,X))}function b0(X,Y){if(M("endReadableNT",X.endEmitted,X.length),!X.errored&&!X.closeEmitted&&!X.endEmitted&&X.length===0){if(X.endEmitted=!0,Y.emit("end"),Y.writable&&Y.allowHalfOpen===!1)Q.nextTick(V6,Y);else if(X.autoDestroy){let U=Y._writableState;(!U||U.autoDestroy&&(U.finished||U.writable===!1))&&Y.destroy()}}}function V6(X){X.writable&&!X.writableEnded&&!X.destroyed&&X.end()}S.from=function(X,Y){return i(S,X,Y)};var I0;function c1(){return I0===void 0&&(I0={}),I0}S.fromWeb=function(X,Y){return c1().newStreamReadableFromReadableStream(X,Y)},S.toWeb=function(X,Y){return c1().newReadableStreamFromStreamReadable(X,Y)},S.wrap=function(X,Y){var U,H;return new S({objectMode:(U=(H=X.readableObjectMode)!==null&&H!==void 0?H:X.objectMode)!==null&&U!==void 0?U:!0,...Y,destroy(w,h){C.destroyer(X,w),h(w)}}).wrap(X)}}),_$=j0(($,V)=>{var Q=(E6(),g6(K6)),{ArrayPrototypeSlice:q,Error:K,FunctionPrototypeSymbolHasInstance:G,ObjectDefineProperty:W,ObjectDefineProperties:J,ObjectSetPrototypeOf:P,StringPrototypeToLowerCase:j,Symbol:z,SymbolHasInstance:I}=x0();V.exports=u,u.WritableState=v;var{EventEmitter:N}=d2(),A=l2().Stream,{Buffer:x}=H6(),k=r6(),{addAbortSignal:g}=o2(),{getHighWaterMark:y,getDefaultHighWaterMark:Z}=i2(),{ERR_INVALID_ARG_TYPE:O,ERR_METHOD_NOT_IMPLEMENTED:M,ERR_MULTIPLE_CALLBACK:R,ERR_STREAM_CANNOT_PIPE:C,ERR_STREAM_DESTROYED:L,ERR_STREAM_ALREADY_FINISHED:T,ERR_STREAM_NULL_VALUES:E,ERR_STREAM_WRITE_AFTER_END:f,ERR_UNKNOWN_ENCODING:b}=f0().codes,{errorOrDestroy:F}=k;P(u.prototype,A.prototype),P(u,A);function m(){}var n=z("kOnFinished");function v(B,D,_){typeof _!="boolean"&&(_=D instanceof Y6()),this.objectMode=!!(B&&B.objectMode),_&&(this.objectMode=this.objectMode||!!(B&&B.writableObjectMode)),this.highWaterMark=B?y(this,B,"writableHighWaterMark",_):Z(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;let a=!!(B&&B.decodeStrings===!1);this.decodeStrings=!a,this.defaultEncoding=B&&B.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=S.bind(void 0,D),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,c(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!B||B.emitClose!==!1,this.autoDestroy=!B||B.autoDestroy!==!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[n]=[]}function c(B){B.buffered=[],B.bufferedIndex=0,B.allBuffers=!0,B.allNoop=!0}v.prototype.getBuffer=function(){return q(this.buffered,this.bufferedIndex)},W(v.prototype,"bufferedRequestCount",{__proto__:null,get(){return this.buffered.length-this.bufferedIndex}});function u(B){let D=this instanceof Y6();if(!D&&!G(u,this))return new u(B);this._writableState=new v(B,this,D),B&&(typeof B.write=="function"&&(this._write=B.write),typeof B.writev=="function"&&(this._writev=B.writev),typeof B.destroy=="function"&&(this._destroy=B.destroy),typeof B.final=="function"&&(this._final=B.final),typeof B.construct=="function"&&(this._construct=B.construct),B.signal&&g(B.signal,this)),A.call(this,B),k.construct(this,()=>{let _=this._writableState;_.writing||H0(this,_),M0(this,_)})}W(u,I,{__proto__:null,value:function(B){return G(this,B)?!0:this!==u?!1:B&&B._writableState instanceof v}}),u.prototype.pipe=function(){F(this,new C)};function i(B,D,_,a){let s=B._writableState;if(typeof _=="function")a=_,_=s.defaultEncoding;else{if(!_)_=s.defaultEncoding;else if(_!=="buffer"&&!x.isEncoding(_))throw new b(_);typeof a!="function"&&(a=m)}if(D===null)throw new E;if(!s.objectMode)if(typeof D=="string")s.decodeStrings!==!1&&(D=x.from(D,_),_="buffer");else if(D instanceof x)_="buffer";else if(A._isUint8Array(D))D=A._uint8ArrayToBuffer(D),_="buffer";else throw new O("chunk",["string","Buffer","Uint8Array"],D);let W0;return s.ending?W0=new f:s.destroyed&&(W0=new L("write")),W0?(Q.nextTick(a,W0),F(B,W0,!0),W0):(s.pendingcb++,e(B,s,D,_,a))}u.prototype.write=function(B,D,_){return i(this,B,D,_)===!0},u.prototype.cork=function(){this._writableState.corked++},u.prototype.uncork=function(){let B=this._writableState;B.corked&&(B.corked--,B.writing||H0(this,B))},u.prototype.setDefaultEncoding=function(B){if(typeof B=="string"&&(B=j(B)),!x.isEncoding(B))throw new b(B);return this._writableState.defaultEncoding=B,this};function e(B,D,_,a,s){let W0=D.objectMode?1:_.length;D.length+=W0;let X0=D.length<D.highWaterMark;return X0||(D.needDrain=!0),D.writing||D.corked||D.errored||!D.constructed?(D.buffered.push({chunk:_,encoding:a,callback:s}),D.allBuffers&&a!=="buffer"&&(D.allBuffers=!1),D.allNoop&&s!==m&&(D.allNoop=!1)):(D.writelen=W0,D.writecb=s,D.writing=!0,D.sync=!0,B._write(_,a,D.onwrite),D.sync=!1),X0&&!D.errored&&!D.destroyed}function d(B,D,_,a,s,W0,X0){D.writelen=a,D.writecb=X0,D.writing=!0,D.sync=!0,D.destroyed?D.onwrite(new L("write")):_?B._writev(s,D.onwrite):B._write(s,W0,D.onwrite),D.sync=!1}function l(B,D,_,a){--D.pendingcb,a(_),K0(D),F(B,_)}function S(B,D){let _=B._writableState,a=_.sync,s=_.writecb;if(typeof s!="function"){F(B,new R);return}_.writing=!1,_.writecb=null,_.length-=_.writelen,_.writelen=0,D?(D.stack,_.errored||(_.errored=D),B._readableState&&!B._readableState.errored&&(B._readableState.errored=D),a?Q.nextTick(l,B,_,D,s):l(B,_,D,s)):(_.buffered.length>_.bufferedIndex&&H0(B,_),a?_.afterWriteTickInfo!==null&&_.afterWriteTickInfo.cb===s?_.afterWriteTickInfo.count++:(_.afterWriteTickInfo={count:1,cb:s,stream:B,state:_},Q.nextTick(r,_.afterWriteTickInfo)):t(B,_,1,s))}function r({stream:B,state:D,count:_,cb:a}){return D.afterWriteTickInfo=null,t(B,D,_,a)}function t(B,D,_,a){for(!D.ending&&!B.destroyed&&D.length===0&&D.needDrain&&(D.needDrain=!1,B.emit("drain"));_-- >0;)D.pendingcb--,a();D.destroyed&&K0(D),M0(B,D)}function K0(B){if(B.writing)return;for(let s=B.bufferedIndex;s<B.buffered.length;++s){var D;let{chunk:W0,callback:X0}=B.buffered[s],z0=B.objectMode?1:W0.length;B.length-=z0,X0((D=B.errored)!==null&&D!==void 0?D:new L("write"))}let _=B[n].splice(0);for(let s=0;s<_.length;s++){var a;_[s]((a=B.errored)!==null&&a!==void 0?a:new L("end"))}c(B)}function H0(B,D){if(D.corked||D.bufferProcessing||D.destroyed||!D.constructed)return;let{buffered:_,bufferedIndex:a,objectMode:s}=D,W0=_.length-a;if(!W0)return;let X0=a;if(D.bufferProcessing=!0,W0>1&&B._writev){D.pendingcb-=W0-1;let z0=D.allNoop?m:(V6)=>{for(let I0=X0;I0<_.length;++I0)_[I0].callback(V6)},b0=D.allNoop&&X0===0?_:q(_,X0);b0.allBuffers=D.allBuffers,d(B,D,!0,D.length,b0,"",z0),c(D)}else{do{let{chunk:z0,encoding:b0,callback:V6}=_[X0];_[X0++]=null;let I0=s?1:z0.length;d(B,D,!1,I0,z0,b0,V6)}while(X0<_.length&&!D.writing);X0===_.length?c(D):X0>256?(_.splice(0,X0),D.bufferedIndex=0):D.bufferedIndex=X0}D.bufferProcessing=!1}u.prototype._write=function(B,D,_){if(this._writev)this._writev([{chunk:B,encoding:D}],_);else throw new M("_write()")},u.prototype._writev=null,u.prototype.end=function(B,D,_){let a=this._writableState;typeof B=="function"?(_=B,B=null,D=null):typeof D=="function"&&(_=D,D=null);let s;if(B!=null){let W0=i(this,B,D);W0 instanceof K&&(s=W0)}return a.corked&&(a.corked=1,this.uncork()),s||(!a.errored&&!a.ending?(a.ending=!0,M0(this,a,!0),a.ended=!0):a.finished?s=new T("end"):a.destroyed&&(s=new L("end"))),typeof _=="function"&&(s||a.finished?Q.nextTick(_,s):a[n].push(_)),this};function q0(B){return B.ending&&!B.destroyed&&B.constructed&&B.length===0&&!B.errored&&B.buffered.length===0&&!B.finished&&!B.writing&&!B.errorEmitted&&!B.closeEmitted}function G0(B,D){let _=!1;function a(s){if(_){F(B,s??R());return}if(_=!0,D.pendingcb--,s){let W0=D[n].splice(0);for(let X0=0;X0<W0.length;X0++)W0[X0](s);F(B,s,D.sync)}else q0(D)&&(D.prefinished=!0,B.emit("prefinish"),D.pendingcb++,Q.nextTick(L0,B,D))}D.sync=!0,D.pendingcb++;try{B._final(a)}catch(s){a(s)}D.sync=!1}function Y0(B,D){!D.prefinished&&!D.finalCalled&&(typeof B._final=="function"&&!D.destroyed?(D.finalCalled=!0,G0(B,D)):(D.prefinished=!0,B.emit("prefinish")))}function M0(B,D,_){q0(D)&&(Y0(B,D),D.pendingcb===0&&(_?(D.pendingcb++,Q.nextTick((a,s)=>{q0(s)?L0(a,s):s.pendingcb--},B,D)):q0(D)&&(D.pendingcb++,L0(B,D))))}function L0(B,D){D.pendingcb--,D.finished=!0;let _=D[n].splice(0);for(let a=0;a<_.length;a++)_[a]();if(B.emit("finish"),D.autoDestroy){let a=B._readableState;(!a||a.autoDestroy&&(a.endEmitted||a.readable===!1))&&B.destroy()}}J(u.prototype,{closed:{__proto__:null,get(){return this._writableState?this._writableState.closed:!1}},destroyed:{__proto__:null,get(){return this._writableState?this._writableState.destroyed:!1},set(B){this._writableState&&(this._writableState.destroyed=B)}},writable:{__proto__:null,get(){let B=this._writableState;return!!B&&B.writable!==!1&&!B.destroyed&&!B.errored&&!B.ending&&!B.ended},set(B){this._writableState&&(this._writableState.writable=!!B)}},writableFinished:{__proto__:null,get(){return this._writableState?this._writableState.finished:!1}},writableObjectMode:{__proto__:null,get(){return this._writableState?this._writableState.objectMode:!1}},writableBuffer:{__proto__:null,get(){return this._writableState&&this._writableState.getBuffer()}},writableEnded:{__proto__:null,get(){return this._writableState?this._writableState.ending:!1}},writableNeedDrain:{__proto__:null,get(){let B=this._writableState;return B?!B.destroyed&&!B.ending&&B.needDrain:!1}},writableHighWaterMark:{__proto__:null,get(){return this._writableState&&this._writableState.highWaterMark}},writableCorked:{__proto__:null,get(){return this._writableState?this._writableState.corked:0}},writableLength:{__proto__:null,get(){return this._writableState&&this._writableState.length}},errored:{__proto__:null,enumerable:!1,get(){return this._writableState?this._writableState.errored:null}},writableAborted:{__proto__:null,enumerable:!1,get:function(){return!!(this._writableState.writable!==!1&&(this._writableState.destroyed||this._writableState.errored)&&!this._writableState.finished)}}});var Q0=k.destroy;u.prototype.destroy=function(B,D){let _=this._writableState;return!_.destroyed&&(_.bufferedIndex<_.buffered.length||_[n].length)&&Q.nextTick(K0,_),Q0.call(this,B,D),this},u.prototype._undestroy=k.undestroy,u.prototype._destroy=function(B,D){D(B)},u.prototype[N.captureRejectionSymbol]=function(B){this.destroy(B)};var B0;function p(){return B0===void 0&&(B0={}),B0}u.fromWeb=function(B,D){return p().newStreamWritableFromWritableStream(B,D)},u.toWeb=function(B){return p().newWritableStreamFromStreamWritable(B)}}),P7=j0(($,V)=>{var Q=(E6(),g6(K6)),q=H6(),{isReadable:K,isWritable:G,isIterable:W,isNodeStream:J,isReadableNodeStream:P,isWritableNodeStream:j,isDuplexNodeStream:z}=y6(),I=b6(),{AbortError:N,codes:{ERR_INVALID_ARG_TYPE:A,ERR_INVALID_RETURN_VALUE:x}}=f0(),{destroyer:k}=r6(),g=Y6(),y=n1(),{createDeferredPromise:Z}=X6(),O=h$(),M=globalThis.Blob||q.Blob,R=typeof M<"u"?function(b){return b instanceof M}:function(b){return!1},C=globalThis.AbortController||u2().AbortController,{FunctionPrototypeCall:L}=x0(),T=class extends g{constructor(b){super(b),b?.readable===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),b?.writable===!1&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)}};V.exports=function b(F,m){if(z(F))return F;if(P(F))return f({readable:F});if(j(F))return f({writable:F});if(J(F))return f({writable:!1,readable:!1});if(typeof F=="function"){let{value:v,write:c,final:u,destroy:i}=E(F);if(W(v))return O(T,v,{objectMode:!0,write:c,final:u,destroy:i});let e=v?.then;if(typeof e=="function"){let d,l=L(e,v,(S)=>{if(S!=null)throw new x("nully","body",S)},(S)=>{k(d,S)});return d=new T({objectMode:!0,readable:!1,write:c,final(S){u(async()=>{try{await l,Q.nextTick(S,null)}catch(r){Q.nextTick(S,r)}})},destroy:i})}throw new x("Iterable, AsyncIterable or AsyncFunction",m,v)}if(R(F))return b(F.arrayBuffer());if(W(F))return O(T,F,{objectMode:!0,writable:!1});if(typeof F?.writable=="object"||typeof F?.readable=="object"){let v=F!=null&&F.readable?P(F?.readable)?F?.readable:b(F.readable):void 0,c=F!=null&&F.writable?j(F?.writable)?F?.writable:b(F.writable):void 0;return f({readable:v,writable:c})}let n=F?.then;if(typeof n=="function"){let v;return L(n,F,(c)=>{c!=null&&v.push(c),v.push(null)},(c)=>{k(v,c)}),v=new T({objectMode:!0,writable:!1,read(){}})}throw new A(m,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],F)};function E(b){let{promise:F,resolve:m}=Z(),n=new C,v=n.signal;return{value:b(async function*(){for(;;){let c=F;F=null;let{chunk:u,done:i,cb:e}=await c;if(Q.nextTick(e),i)return;if(v.aborted)throw new N(void 0,{cause:v.reason});({promise:F,resolve:m}=Z()),yield u}}(),{signal:v}),write(c,u,i){let e=m;m=null,e({chunk:c,done:!1,cb:i})},final(c){let u=m;m=null,u({done:!0,cb:c})},destroy(c,u){n.abort(),u(c)}}}function f(b){let F=b.readable&&typeof b.readable.read!="function"?y.wrap(b.readable):b.readable,m=b.writable,n=!!K(F),v=!!G(m),c,u,i,e,d;function l(S){let r=e;e=null,r?r(S):S?d.destroy(S):!n&&!v&&d.destroy()}return d=new T({readableObjectMode:!!(F!=null&&F.readableObjectMode),writableObjectMode:!!(m!=null&&m.writableObjectMode),readable:n,writable:v}),v&&(I(m,(S)=>{v=!1,S&&k(F,S),l(S)}),d._write=function(S,r,t){m.write(S,r)?t():c=t},d._final=function(S){m.end(),u=S},m.on("drain",function(){if(c){let S=c;c=null,S()}}),m.on("finish",function(){if(u){let S=u;u=null,S()}})),n&&(I(F,(S)=>{n=!1,S&&k(F,S),l(S)}),F.on("readable",function(){if(i){let S=i;i=null,S()}}),F.on("end",function(){d.push(null)}),d._read=function(){for(;;){let S=F.read();if(S===null){i=d._read;return}if(!d.push(S))return}}),d._destroy=function(S,r){!S&&e!==null&&(S=new N),i=null,c=null,u=null,e===null?r(S):(e=r,k(m,S),k(F,S))},d}}),Y6=j0(($,V)=>{var{ObjectDefineProperties:Q,ObjectGetOwnPropertyDescriptor:q,ObjectKeys:K,ObjectSetPrototypeOf:G}=x0();V.exports=P;var W=n1(),J=_$();G(P.prototype,W.prototype),G(P,W);{let N=K(J.prototype);for(let A=0;A<N.length;A++){let x=N[A];P.prototype[x]||(P.prototype[x]=J.prototype[x])}}function P(N){if(!(this instanceof P))return new P(N);W.call(this,N),J.call(this,N),N?(this.allowHalfOpen=N.allowHalfOpen!==!1,N.readable===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),N.writable===!1&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)):this.allowHalfOpen=!0}Q(P.prototype,{writable:{__proto__:null,...q(J.prototype,"writable")},writableHighWaterMark:{__proto__:null,...q(J.prototype,"writableHighWaterMark")},writableObjectMode:{__proto__:null,...q(J.prototype,"writableObjectMode")},writableBuffer:{__proto__:null,...q(J.prototype,"writableBuffer")},writableLength:{__proto__:null,...q(J.prototype,"writableLength")},writableFinished:{__proto__:null,...q(J.prototype,"writableFinished")},writableCorked:{__proto__:null,...q(J.prototype,"writableCorked")},writableEnded:{__proto__:null,...q(J.prototype,"writableEnded")},writableNeedDrain:{__proto__:null,...q(J.prototype,"writableNeedDrain")},destroyed:{__proto__:null,get(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set(N){this._readableState&&this._writableState&&(this._readableState.destroyed=N,this._writableState.destroyed=N)}}});var j;function z(){return j===void 0&&(j={}),j}P.fromWeb=function(N,A){return z().newStreamDuplexFromReadableWritablePair(N,A)},P.toWeb=function(N){return z().newReadableWritablePairFromDuplex(N)};var I;P.from=function(N){return I||(I=P7()),I(N,"body")}}),m$=j0(($,V)=>{var{ObjectSetPrototypeOf:Q,Symbol:q}=x0();V.exports=P;var{ERR_METHOD_NOT_IMPLEMENTED:K}=f0().codes,G=Y6(),{getHighWaterMark:W}=i2();Q(P.prototype,G.prototype),Q(P,G);var J=q("kCallback");function P(I){if(!(this instanceof P))return new P(I);let N=I?W(this,I,"readableHighWaterMark",!0):null;N===0&&(I={...I,highWaterMark:null,readableHighWaterMark:N,writableHighWaterMark:I.writableHighWaterMark||0}),G.call(this,I),this._readableState.sync=!1,this[J]=null,I&&(typeof I.transform=="function"&&(this._transform=I.transform),typeof I.flush=="function"&&(this._flush=I.flush)),this.on("prefinish",z)}function j(I){typeof this._flush=="function"&&!this.destroyed?this._flush((N,A)=>{if(N){I?I(N):this.destroy(N);return}A!=null&&this.push(A),this.push(null),I&&I()}):(this.push(null),I&&I())}function z(){this._final!==j&&j.call(this)}P.prototype._final=j,P.prototype._transform=function(I,N,A){throw new K("_transform()")},P.prototype._write=function(I,N,A){let x=this._readableState,k=this._writableState,g=x.length;this._transform(I,N,(y,Z)=>{if(y){A(y);return}Z!=null&&this.push(Z),k.ended||g===x.length||x.length<x.highWaterMark?A():this[J]=A})},P.prototype._read=function(){if(this[J]){let I=this[J];this[J]=null,I()}}}),p$=j0(($,V)=>{var{ObjectSetPrototypeOf:Q}=x0();V.exports=K;var q=m$();Q(K.prototype,q.prototype),Q(K,q);function K(G){if(!(this instanceof K))return new K(G);q.call(this,G)}K.prototype._transform=function(G,W,J){J(null,G)}}),n2=j0(($,V)=>{var Q=(E6(),g6(K6)),{ArrayIsArray:q,Promise:K,SymbolAsyncIterator:G}=x0(),W=b6(),{once:J}=X6(),P=r6(),j=Y6(),{aggregateTwoErrors:z,codes:{ERR_INVALID_ARG_TYPE:I,ERR_INVALID_RETURN_VALUE:N,ERR_MISSING_ARGS:A,ERR_STREAM_DESTROYED:x,ERR_STREAM_PREMATURE_CLOSE:k},AbortError:g}=f0(),{validateFunction:y,validateAbortSignal:Z}=i1(),{isIterable:O,isReadable:M,isReadableNodeStream:R,isNodeStream:C}=y6(),L=globalThis.AbortController||u2().AbortController,T,E;function f(i,e,d){let l=!1;i.on("close",()=>{l=!0});let S=W(i,{readable:e,writable:d},(r)=>{l=!r});return{destroy:(r)=>{l||(l=!0,P.destroyer(i,r||new x("pipe")))},cleanup:S}}function b(i){return y(i[i.length-1],"streams[stream.length - 1]"),i.pop()}function F(i){if(O(i))return i;if(R(i))return m(i);throw new I("val",["Readable","Iterable","AsyncIterable"],i)}async function*m(i){E||(E=n1()),yield*E.prototype[G].call(i)}async function n(i,e,d,{end:l}){let S,r=null,t=(q0)=>{if(q0&&(S=q0),r){let G0=r;r=null,G0()}},K0=()=>new K((q0,G0)=>{S?G0(S):r=()=>{S?G0(S):q0()}});e.on("drain",t);let H0=W(e,{readable:!1},t);try{e.writableNeedDrain&&await K0();for await(let q0 of i)e.write(q0)||await K0();l&&e.end(),await K0(),d()}catch(q0){d(S!==q0?z(S,q0):q0)}finally{H0(),e.off("drain",t)}}function v(...i){return c(i,J(b(i)))}function c(i,e,d){if(i.length===1&&q(i[0])&&(i=i[0]),i.length<2)throw new A("streams");let l=new L,S=l.signal,r=d?.signal,t=[];Z(r,"options.signal");function K0(){L0(new g)}r?.addEventListener("abort",K0);let H0,q0,G0=[],Y0=0;function M0(B){L0(B,--Y0===0)}function L0(B,D){if(B&&(!H0||H0.code==="ERR_STREAM_PREMATURE_CLOSE")&&(H0=B),!(!H0&&!D)){for(;G0.length;)G0.shift()(H0);r?.removeEventListener("abort",K0),l.abort(),D&&(H0||t.forEach((_)=>_()),Q.nextTick(e,H0,q0))}}let Q0;for(let B=0;B<i.length;B++){let D=i[B],_=B<i.length-1,a=B>0,s=_||d?.end!==!1,W0=B===i.length-1;if(C(D)){let X0=function(z0){z0&&z0.name!=="AbortError"&&z0.code!=="ERR_STREAM_PREMATURE_CLOSE"&&M0(z0)};var B0=X0;if(s){let{destroy:z0,cleanup:b0}=f(D,_,a);G0.push(z0),M(D)&&W0&&t.push(b0)}D.on("error",X0),M(D)&&W0&&t.push(()=>{D.removeListener("error",X0)})}if(B===0)if(typeof D=="function"){if(Q0=D({signal:S}),!O(Q0))throw new N("Iterable, AsyncIterable or Stream","source",Q0)}else O(D)||R(D)?Q0=D:Q0=j.from(D);else if(typeof D=="function")if(Q0=F(Q0),Q0=D(Q0,{signal:S}),_){if(!O(Q0,!0))throw new N("AsyncIterable",`transform[${B-1}]`,Q0)}else{var p;T||(T=p$());let X0=new T({objectMode:!0}),z0=(p=Q0)===null||p===void 0?void 0:p.then;if(typeof z0=="function")Y0++,z0.call(Q0,(I0)=>{q0=I0,I0!=null&&X0.write(I0),s&&X0.end(),Q.nextTick(M0)},(I0)=>{X0.destroy(I0),Q.nextTick(M0,I0)});else if(O(Q0,!0))Y0++,n(Q0,X0,M0,{end:s});else throw new N("AsyncIterable or Promise","destination",Q0);Q0=X0;let{destroy:b0,cleanup:V6}=f(Q0,!1,!0);G0.push(b0),W0&&t.push(V6)}else if(C(D)){if(R(Q0)){Y0+=2;let X0=u(Q0,D,M0,{end:s});M(D)&&W0&&t.push(X0)}else if(O(Q0))Y0++,n(Q0,D,M0,{end:s});else throw new I("val",["Readable","Iterable","AsyncIterable"],Q0);Q0=D}else Q0=j.from(D)}return(S!=null&&S.aborted||r!=null&&r.aborted)&&Q.nextTick(K0),Q0}function u(i,e,d,{end:l}){let S=!1;return e.on("close",()=>{S||d(new k)}),i.pipe(e,{end:l}),l?i.once("end",()=>{S=!0,e.end()}):d(),W(i,{readable:!0,writable:!1},(r)=>{let t=i._readableState;r&&r.code==="ERR_STREAM_PREMATURE_CLOSE"&&t&&t.ended&&!t.errored&&!t.errorEmitted?i.once("end",d).once("error",d):d(r)}),W(e,{readable:!1,writable:!0},d)}V.exports={pipelineImpl:c,pipeline:v}}),z7=j0(($,V)=>{var{pipeline:Q}=n2(),q=Y6(),{destroyer:K}=r6(),{isNodeStream:G,isReadable:W,isWritable:J}=y6(),{AbortError:P,codes:{ERR_INVALID_ARG_VALUE:j,ERR_MISSING_ARGS:z}}=f0();V.exports=function(...I){if(I.length===0)throw new z("streams");if(I.length===1)return q.from(I[0]);let N=[...I];if(typeof I[0]=="function"&&(I[0]=q.from(I[0])),typeof I[I.length-1]=="function"){let L=I.length-1;I[L]=q.from(I[L])}for(let L=0;L<I.length;++L)if(G(I[L])){if(L<I.length-1&&!W(I[L]))throw new j(`streams[${L}]`,N[L],"must be readable");if(L>0&&!J(I[L]))throw new j(`streams[${L}]`,N[L],"must be writable")}let A,x,k,g,y;function Z(L){let T=g;g=null,T?T(L):L?y.destroy(L):!C&&!R&&y.destroy()}let O=I[0],M=Q(I,Z),R=!!J(O),C=!!W(M);return y=new q({writableObjectMode:!!(O!=null&&O.writableObjectMode),readableObjectMode:!!(M!=null&&M.writableObjectMode),writable:R,readable:C}),R&&(y._write=function(L,T,E){O.write(L,T)?E():A=E},y._final=function(L){O.end(),x=L},O.on("drain",function(){if(A){let L=A;A=null,L()}}),M.on("finish",function(){if(x){let L=x;x=null,L()}})),C&&(M.on("readable",function(){if(k){let L=k;k=null,L()}}),M.on("end",function(){y.push(null)}),y._read=function(){for(;;){let L=M.read();if(L===null){k=y._read;return}if(!y.push(L))return}}),y._destroy=function(L,T){!L&&g!==null&&(L=new P),k=null,A=null,x=null,g===null?T(L):(g=T,K(M,L))},y}}),c$=j0(($,V)=>{var{ArrayPrototypePop:Q,Promise:q}=x0(),{isIterable:K,isNodeStream:G}=y6(),{pipelineImpl:W}=n2(),{finished:J}=b6();function P(...j){return new q((z,I)=>{let N,A,x=j[j.length-1];if(x&&typeof x=="object"&&!G(x)&&!K(x)){let k=Q(j);N=k.signal,A=k.end}W(j,(k,g)=>{k?I(k):z(g)},{signal:N,end:A})})}V.exports={finished:J,pipeline:P}}),Z7=j0(($,V)=>{var{Buffer:Q}=H6(),{ObjectDefineProperty:q,ObjectKeys:K,ReflectApply:G}=x0(),{promisify:{custom:W}}=X6(),{streamReturningOperators:J,promiseReturningOperators:P}=G7(),{codes:{ERR_ILLEGAL_CONSTRUCTOR:j}}=f0(),z=z7(),{pipeline:I}=n2(),{destroyer:N}=r6(),A=b6(),x=c$(),k=y6(),g=V.exports=l2().Stream;g.isDisturbed=k.isDisturbed,g.isErrored=k.isErrored,g.isReadable=k.isReadable,g.Readable=n1();for(let O of K(J)){let M=function(...C){if(new.target)throw j();return g.Readable.from(G(R,this,C))};y=M;let R=J[O];q(M,"name",{__proto__:null,value:R.name}),q(M,"length",{__proto__:null,value:R.length}),q(g.Readable.prototype,O,{__proto__:null,value:M,enumerable:!1,configurable:!0,writable:!0})}var y;for(let O of K(P)){let M=function(...C){if(new.target)throw j();return G(R,this,C)};y=M;let R=P[O];q(M,"name",{__proto__:null,value:R.name}),q(M,"length",{__proto__:null,value:R.length}),q(g.Readable.prototype,O,{__proto__:null,value:M,enumerable:!1,configurable:!0,writable:!0})}var y;g.Writable=_$(),g.Duplex=Y6(),g.Transform=m$(),g.PassThrough=p$(),g.pipeline=I;var{addAbortSignal:Z}=o2();g.addAbortSignal=Z,g.finished=A,g.destroy=N,g.compose=z,q(g,"promises",{__proto__:null,configurable:!0,enumerable:!0,get(){return x}}),q(I,W,{__proto__:null,enumerable:!0,get(){return x.pipeline}}),q(A,W,{__proto__:null,enumerable:!0,get(){return x.finished}}),g.Stream=g,g._isUint8Array=function(O){return O instanceof Uint8Array},g._uint8ArrayToBuffer=function(O){return Q.from(O.buffer,O.byteOffset,O.byteLength)}}),u$=j0(($,V)=>{var Q=Z7(),q=c$(),K=Q.Readable.destroy;V.exports=Q.Readable,V.exports._uint8ArrayToBuffer=Q._uint8ArrayToBuffer,V.exports._isUint8Array=Q._isUint8Array,V.exports.isDisturbed=Q.isDisturbed,V.exports.isErrored=Q.isErrored,V.exports.isReadable=Q.isReadable,V.exports.Readable=Q.Readable,V.exports.Writable=Q.Writable,V.exports.Duplex=Q.Duplex,V.exports.Transform=Q.Transform,V.exports.PassThrough=Q.PassThrough,V.exports.addAbortSignal=Q.addAbortSignal,V.exports.finished=Q.finished,V.exports.destroy=Q.destroy,V.exports.destroy=K,V.exports.pipeline=Q.pipeline,V.exports.compose=Q.compose,Object.defineProperty(Q,"promises",{configurable:!0,enumerable:!0,get(){return q}}),V.exports.Stream=Q.Stream,V.exports.default=V.exports}),d$={};y$(d$,{default:()=>l$});b$(d$,l1(u$()));l$=l1(u$());/*!
3
+ * The buffer module from node.js, for the browser.
4
+ *
5
+ * @author Feross Aboukhadijeh <https://feross.org>
6
+ * @license MIT
7
+ *//*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> *//*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */});var J6=$0((H7)=>{H7.base64=!0;H7.array=!0;H7.string=!0;H7.arraybuffer=typeof ArrayBuffer!=="undefined"&&typeof Uint8Array!=="undefined";H7.nodebuffer=typeof Buffer!=="undefined";H7.uint8array=typeof Uint8Array!=="undefined";if(typeof ArrayBuffer==="undefined")H7.blob=!1;else{t2=new ArrayBuffer(0);try{H7.blob=new Blob([t2],{type:"application/zip"}).size===0}catch($){try{o$=self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder,e2=new o$,e2.append(t2),H7.blob=e2.getBlob("application/zip").size===0}catch(V){H7.blob=!1}}}var t2,o$,e2;try{H7.nodestream=!!(r2(),T$(a2)).Readable}catch($){H7.nodestream=!1}});var $8=$0((N7)=>{var w7=N0(),D7=J6(),s0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";N7.encode=function($){var V=[],Q,q,K,G,W,J,P,j=0,z=$.length,I=z,N=w7.getTypeOf($)!=="string";while(j<$.length){if(I=z-j,!N)Q=$.charCodeAt(j++),q=j<z?$.charCodeAt(j++):0,K=j<z?$.charCodeAt(j++):0;else Q=$[j++],q=j<z?$[j++]:0,K=j<z?$[j++]:0;G=Q>>2,W=(Q&3)<<4|q>>4,J=I>1?(q&15)<<2|K>>6:64,P=I>2?K&63:64,V.push(s0.charAt(G)+s0.charAt(W)+s0.charAt(J)+s0.charAt(P))}return V.join("")};N7.decode=function($){var V,Q,q,K,G,W,J,P=0,j=0,z="data:";if($.substr(0,z.length)===z)throw new Error("Invalid base64 input, it looks like a data url.");$=$.replace(/[^A-Za-z0-9+/=]/g,"");var I=$.length*3/4;if($.charAt($.length-1)===s0.charAt(64))I--;if($.charAt($.length-2)===s0.charAt(64))I--;if(I%1!==0)throw new Error("Invalid base64 input, bad content length.");var N;if(D7.uint8array)N=new Uint8Array(I|0);else N=new Array(I|0);while(P<$.length){if(K=s0.indexOf($.charAt(P++)),G=s0.indexOf($.charAt(P++)),W=s0.indexOf($.charAt(P++)),J=s0.indexOf($.charAt(P++)),V=K<<2|G>>4,Q=(G&15)<<4|W>>2,q=(W&3)<<6|J,N[j++]=V,W!==64)N[j++]=Q;if(J!==64)N[j++]=q}return N}});var L1=$0((GK,i$)=>{i$.exports={isNode:typeof Buffer!=="undefined",newBufferFrom:function($,V){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from($,V);else{if(typeof $==="number")throw new Error('The "data" argument must not be a number');return new Buffer($,V)}},allocBuffer:function($){if(Buffer.alloc)return Buffer.alloc($);else{var V=new Buffer($);return V.fill(0),V}},isBuffer:function($){return Buffer.isBuffer($)},isStream:function($){return $&&typeof $.on==="function"&&typeof $.pause==="function"&&typeof $.resume==="function"}}});var s$=$0((UK,r$)=>{var n$=global.MutationObserver||global.WebKitMutationObserver,O1;if(n$)Q8=0,a$=new n$(a1),V8=global.document.createTextNode(""),a$.observe(V8,{characterData:!0}),O1=function(){V8.data=Q8=++Q8%2};else if(!global.setImmediate&&typeof global.MessageChannel!=="undefined")q8=new global.MessageChannel,q8.port1.onmessage=a1,O1=function(){q8.port2.postMessage(0)};else if("document"in global&&"onreadystatechange"in global.document.createElement("script"))O1=function(){var $=global.document.createElement("script");$.onreadystatechange=function(){a1(),$.onreadystatechange=null,$.parentNode.removeChild($),$=null},global.document.documentElement.appendChild($)};else O1=function(){setTimeout(a1,0)};var Q8,a$,V8,q8,X8,C1=[];function a1(){X8=!0;var $,V,Q=C1.length;while(Q){V=C1,C1=[],$=-1;while(++$<Q)V[$]();Q=C1.length}X8=!1}r$.exports=A7;function A7($){if(C1.push($)===1&&!X8)O1()}});var qQ=$0((WK,VQ)=>{var x7=s$();function s6(){}var g0={},t$=["REJECTED"],Y8=["FULFILLED"],e$=["PENDING"];VQ.exports=M6;function M6($){if(typeof $!=="function")throw new TypeError("resolver must be a function");if(this.state=e$,this.queue=[],this.outcome=void 0,$!==s6)$Q(this,$)}M6.prototype.finally=function($){if(typeof $!=="function")return this;var V=this.constructor;return this.then(Q,q);function Q(K){function G(){return K}return V.resolve($()).then(G)}function q(K){function G(){throw K}return V.resolve($()).then(G)}};M6.prototype.catch=function($){return this.then(null,$)};M6.prototype.then=function($,V){if(typeof $!=="function"&&this.state===Y8||typeof V!=="function"&&this.state===t$)return this;var Q=new this.constructor(s6);if(this.state!==e$){var q=this.state===Y8?$:V;K8(Q,q,this.outcome)}else this.queue.push(new B1(Q,$,V));return Q};function B1($,V,Q){if(this.promise=$,typeof V==="function")this.onFulfilled=V,this.callFulfilled=this.otherCallFulfilled;if(typeof Q==="function")this.onRejected=Q,this.callRejected=this.otherCallRejected}B1.prototype.callFulfilled=function($){g0.resolve(this.promise,$)};B1.prototype.otherCallFulfilled=function($){K8(this.promise,this.onFulfilled,$)};B1.prototype.callRejected=function($){g0.reject(this.promise,$)};B1.prototype.otherCallRejected=function($){K8(this.promise,this.onRejected,$)};function K8($,V,Q){x7(function(){var q;try{q=V(Q)}catch(K){return g0.reject($,K)}if(q===$)g0.reject($,new TypeError("Cannot resolve promise with itself"));else g0.resolve($,q)})}g0.resolve=function($,V){var Q=QQ(T7,V);if(Q.status==="error")return g0.reject($,Q.value);var q=Q.value;if(q)$Q($,q);else{$.state=Y8,$.outcome=V;var K=-1,G=$.queue.length;while(++K<G)$.queue[K].callFulfilled(V)}return $};g0.reject=function($,V){$.state=t$,$.outcome=V;var Q=-1,q=$.queue.length;while(++Q<q)$.queue[Q].callRejected(V);return $};function T7($){var V=$&&$.then;if($&&(typeof $==="object"||typeof $==="function")&&typeof V==="function")return function Q(){V.apply($,arguments)}}function $Q($,V){var Q=!1;function q(J){if(Q)return;Q=!0,g0.reject($,J)}function K(J){if(Q)return;Q=!0,g0.resolve($,J)}function G(){V(K,q)}var W=QQ(G);if(W.status==="error")q(W.value)}function QQ($,V){var Q={};try{Q.value=$(V),Q.status="success"}catch(q){Q.status="error",Q.value=q}return Q}M6.resolve=S7;function S7($){if($ instanceof this)return $;return g0.resolve(new this(s6),$)}M6.reject=k7;function k7($){var V=new this(s6);return g0.reject(V,$)}M6.all=g7;function g7($){var V=this;if(Object.prototype.toString.call($)!=="[object Array]")return this.reject(new TypeError("must be an array"));var Q=$.length,q=!1;if(!Q)return this.resolve([]);var K=new Array(Q),G=0,W=-1,J=new this(s6);while(++W<Q)P($[W],W);return J;function P(j,z){V.resolve(j).then(I,function(N){if(!q)q=!0,g0.reject(J,N)});function I(N){if(K[z]=N,++G===Q&&!q)q=!0,g0.resolve(J,K)}}}M6.race=E7;function E7($){var V=this;if(Object.prototype.toString.call($)!=="[object Array]")return this.reject(new TypeError("must be an array"));var Q=$.length,q=!1;if(!Q)return this.resolve([]);var K=-1,G=new this(s6);while(++K<Q)W($[K]);return G;function W(J){V.resolve(J).then(function(P){if(!q)q=!0,g0.resolve(G,P)},function(P){if(!q)q=!0,g0.reject(G,P)})}}});var t6=$0((jK,XQ)=>{var J8=null;if(typeof Promise!=="undefined")J8=Promise;else J8=qQ();XQ.exports={Promise:J8}});var KQ=$0((YQ)=>{(function($,V){if($.setImmediate)return;var Q=1,q={},K=!1,G=$.document,W;function J(Z){if(typeof Z!=="function")Z=new Function(""+Z);var O=new Array(arguments.length-1);for(var M=0;M<O.length;M++)O[M]=arguments[M+1];var R={callback:Z,args:O};return q[Q]=R,W(Q),Q++}function P(Z){delete q[Z]}function j(Z){var{callback:O,args:M}=Z;switch(M.length){case 0:O();break;case 1:O(M[0]);break;case 2:O(M[0],M[1]);break;case 3:O(M[0],M[1],M[2]);break;default:O.apply(V,M);break}}function z(Z){if(K)setTimeout(z,0,Z);else{var O=q[Z];if(O){K=!0;try{j(O)}finally{P(Z),K=!1}}}}function I(){W=function(Z){process.nextTick(function(){z(Z)})}}function N(){if($.postMessage&&!$.importScripts){var Z=!0,O=$.onmessage;return $.onmessage=function(){Z=!1},$.postMessage("","*"),$.onmessage=O,Z}}function A(){var Z="setImmediate$"+Math.random()+"$",O=function(M){if(M.source===$&&typeof M.data==="string"&&M.data.indexOf(Z)===0)z(+M.data.slice(Z.length))};if($.addEventListener)$.addEventListener("message",O,!1);else $.attachEvent("onmessage",O);W=function(M){$.postMessage(Z+M,"*")}}function x(){var Z=new MessageChannel;Z.port1.onmessage=function(O){var M=O.data;z(M)},W=function(O){Z.port2.postMessage(O)}}function k(){var Z=G.documentElement;W=function(O){var M=G.createElement("script");M.onreadystatechange=function(){z(O),M.onreadystatechange=null,Z.removeChild(M),M=null},Z.appendChild(M)}}function g(){W=function(Z){setTimeout(z,0,Z)}}var y=Object.getPrototypeOf&&Object.getPrototypeOf($);if(y=y&&y.setTimeout?y:$,{}.toString.call($.process)==="[object process]")I();else if(N())A();else if($.MessageChannel)x();else if(G&&"onreadystatechange"in G.createElement("script"))k();else g();y.setImmediate=J,y.clearImmediate=P})(typeof self==="undefined"?typeof global==="undefined"?YQ:global:self)});var N0=$0((f7)=>{var L6=J6(),y7=$8(),e6=L1(),G8=t6();KQ();function b7($){var V=null;if(L6.uint8array)V=new Uint8Array($.length);else V=new Array($.length);return s1($,V)}f7.newBlob=function($,V){f7.checkSupport("blob");try{return new Blob([$],{type:V})}catch(K){try{var Q=self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder,q=new Q;return q.append($),q.getBlob(V)}catch(G){throw new Error("Bug : can't construct the Blob.")}}};function I1($){return $}function s1($,V){for(var Q=0;Q<$.length;++Q)V[Q]=$.charCodeAt(Q)&255;return V}var r1={stringifyByChunk:function($,V,Q){var q=[],K=0,G=$.length;if(G<=Q)return String.fromCharCode.apply(null,$);while(K<G){if(V==="array"||V==="nodebuffer")q.push(String.fromCharCode.apply(null,$.slice(K,Math.min(K+Q,G))));else q.push(String.fromCharCode.apply(null,$.subarray(K,Math.min(K+Q,G))));K+=Q}return q.join("")},stringifyByChar:function($){var V="";for(var Q=0;Q<$.length;Q++)V+=String.fromCharCode($[Q]);return V},applyCanBeUsed:{uint8array:function(){try{return L6.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch($){return!1}}(),nodebuffer:function(){try{return L6.nodebuffer&&String.fromCharCode.apply(null,e6.allocBuffer(1)).length===1}catch($){return!1}}()}};function w1($){var V=65536,Q=f7.getTypeOf($),q=!0;if(Q==="uint8array")q=r1.applyCanBeUsed.uint8array;else if(Q==="nodebuffer")q=r1.applyCanBeUsed.nodebuffer;if(q)while(V>1)try{return r1.stringifyByChunk($,Q,V)}catch(K){V=Math.floor(V/2)}return r1.stringifyByChar($)}f7.applyFromCharCode=w1;function t1($,V){for(var Q=0;Q<$.length;Q++)V[Q]=$[Q];return V}var O6={};O6.string={string:I1,array:function($){return s1($,new Array($.length))},arraybuffer:function($){return O6.string.uint8array($).buffer},uint8array:function($){return s1($,new Uint8Array($.length))},nodebuffer:function($){return s1($,e6.allocBuffer($.length))}};O6.array={string:w1,array:I1,arraybuffer:function($){return new Uint8Array($).buffer},uint8array:function($){return new Uint8Array($)},nodebuffer:function($){return e6.newBufferFrom($)}};O6.arraybuffer={string:function($){return w1(new Uint8Array($))},array:function($){return t1(new Uint8Array($),new Array($.byteLength))},arraybuffer:I1,uint8array:function($){return new Uint8Array($)},nodebuffer:function($){return e6.newBufferFrom(new Uint8Array($))}};O6.uint8array={string:w1,array:function($){return t1($,new Array($.length))},arraybuffer:function($){return $.buffer},uint8array:I1,nodebuffer:function($){return e6.newBufferFrom($)}};O6.nodebuffer={string:w1,array:function($){return t1($,new Array($.length))},arraybuffer:function($){return O6.nodebuffer.uint8array($).buffer},uint8array:function($){return t1($,new Uint8Array($.length))},nodebuffer:I1};f7.transformTo=function($,V){if(!V)V="";if(!$)return V;f7.checkSupport($);var Q=f7.getTypeOf(V),q=O6[Q][$](V);return q};f7.resolve=function($){var V=$.split("/"),Q=[];for(var q=0;q<V.length;q++){var K=V[q];if(K==="."||K===""&&q!==0&&q!==V.length-1)continue;else if(K==="..")Q.pop();else Q.push(K)}return Q.join("/")};f7.getTypeOf=function($){if(typeof $==="string")return"string";if(Object.prototype.toString.call($)==="[object Array]")return"array";if(L6.nodebuffer&&e6.isBuffer($))return"nodebuffer";if(L6.uint8array&&$ instanceof Uint8Array)return"uint8array";if(L6.arraybuffer&&$ instanceof ArrayBuffer)return"arraybuffer"};f7.checkSupport=function($){var V=L6[$.toLowerCase()];if(!V)throw new Error($+" is not supported by this platform")};f7.MAX_VALUE_16BITS=65535;f7.MAX_VALUE_32BITS=-1;f7.pretty=function($){var V="",Q,q;for(q=0;q<($||"").length;q++)Q=$.charCodeAt(q),V+="\\x"+(Q<16?"0":"")+Q.toString(16).toUpperCase();return V};f7.delay=function($,V,Q){setImmediate(function(){$.apply(Q||null,V||[])})};f7.inherits=function($,V){var Q=function(){};Q.prototype=V.prototype,$.prototype=new Q};f7.extend=function(){var $={},V,Q;for(V=0;V<arguments.length;V++)for(Q in arguments[V])if(Object.prototype.hasOwnProperty.call(arguments[V],Q)&&typeof $[Q]==="undefined")$[Q]=arguments[V][Q];return $};f7.prepareContent=function($,V,Q,q,K){var G=G8.Promise.resolve(V).then(function(W){var J=L6.blob&&(W instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(W))!==-1);if(J&&typeof FileReader!=="undefined")return new G8.Promise(function(P,j){var z=new FileReader;z.onload=function(I){P(I.target.result)},z.onerror=function(I){j(I.target.error)},z.readAsArrayBuffer(W)});else return W});return G.then(function(W){var J=f7.getTypeOf(W);if(!J)return G8.Promise.reject(new Error("Can't read the data of '"+$+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"));if(J==="arraybuffer")W=f7.transformTo("uint8array",W);else if(J==="string"){if(K)W=y7.decode(W);else if(Q){if(q!==!0)W=b7(W)}}return W})}});var _0=$0((ZK,WQ)=>{function UQ($){this.name=$||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}UQ.prototype={push:function($){this.emit("data",$)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch($){this.emit("error",$)}return!0},error:function($){if(this.isFinished)return!1;if(this.isPaused)this.generatedError=$;else{if(this.isFinished=!0,this.emit("error",$),this.previous)this.previous.error($);this.cleanUp()}return!0},on:function($,V){return this._listeners[$].push(V),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function($,V){if(this._listeners[$])for(var Q=0;Q<this._listeners[$].length;Q++)this._listeners[$][Q].call(this,V)},pipe:function($){return $.registerPrevious(this)},registerPrevious:function($){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=$.streamInfo,this.mergeStreamInfo(),this.previous=$;var V=this;return $.on("data",function(Q){V.processChunk(Q)}),$.on("end",function(){V.end()}),$.on("error",function(Q){V.error(Q)}),this},pause:function(){if(this.isPaused||this.isFinished)return!1;if(this.isPaused=!0,this.previous)this.previous.pause();return!0},resume:function(){if(!this.isPaused||this.isFinished)return!1;this.isPaused=!1;var $=!1;if(this.generatedError)this.error(this.generatedError),$=!0;if(this.previous)this.previous.resume();return!$},flush:function(){},processChunk:function($){this.push($)},withStreamInfo:function($,V){return this.extraStreamInfo[$]=V,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var $ in this.extraStreamInfo){if(!Object.prototype.hasOwnProperty.call(this.extraStreamInfo,$))continue;this.streamInfo[$]=this.extraStreamInfo[$]}},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");if(this.isLocked=!0,this.previous)this.previous.lock()},toString:function(){var $="Worker "+this.name;if(this.previous)return this.previous+" -> "+$;else return $}};WQ.exports=UQ});var Q1=$0((t7)=>{var $1=N0(),f6=J6(),n7=L1(),e1=_0(),D1=new Array(256);for(G6=0;G6<256;G6++)D1[G6]=G6>=252?6:G6>=248?5:G6>=240?4:G6>=224?3:G6>=192?2:1;var G6;D1[254]=D1[254]=1;var a7=function($){var V,Q,q,K,G,W=$.length,J=0;for(K=0;K<W;K++){if(Q=$.charCodeAt(K),(Q&64512)===55296&&K+1<W){if(q=$.charCodeAt(K+1),(q&64512)===56320)Q=65536+(Q-55296<<10)+(q-56320),K++}J+=Q<128?1:Q<2048?2:Q<65536?3:4}if(f6.uint8array)V=new Uint8Array(J);else V=new Array(J);for(G=0,K=0;G<J;K++){if(Q=$.charCodeAt(K),(Q&64512)===55296&&K+1<W){if(q=$.charCodeAt(K+1),(q&64512)===56320)Q=65536+(Q-55296<<10)+(q-56320),K++}if(Q<128)V[G++]=Q;else if(Q<2048)V[G++]=192|Q>>>6,V[G++]=128|Q&63;else if(Q<65536)V[G++]=224|Q>>>12,V[G++]=128|Q>>>6&63,V[G++]=128|Q&63;else V[G++]=240|Q>>>18,V[G++]=128|Q>>>12&63,V[G++]=128|Q>>>6&63,V[G++]=128|Q&63}return V},r7=function($,V){var Q;if(V=V||$.length,V>$.length)V=$.length;Q=V-1;while(Q>=0&&($[Q]&192)===128)Q--;if(Q<0)return V;if(Q===0)return V;return Q+D1[$[Q]]>V?Q:V},s7=function($){var V,Q,q,K,G=$.length,W=new Array(G*2);for(Q=0,V=0;V<G;){if(q=$[V++],q<128){W[Q++]=q;continue}if(K=D1[q],K>4){W[Q++]=65533,V+=K-1;continue}q&=K===2?31:K===3?15:7;while(K>1&&V<G)q=q<<6|$[V++]&63,K--;if(K>1){W[Q++]=65533;continue}if(q<65536)W[Q++]=q;else q-=65536,W[Q++]=55296|q>>10&1023,W[Q++]=56320|q&1023}if(W.length!==Q)if(W.subarray)W=W.subarray(0,Q);else W.length=Q;return $1.applyFromCharCode(W)};t7.utf8encode=function $(V){if(f6.nodebuffer)return n7.newBufferFrom(V,"utf-8");return a7(V)};t7.utf8decode=function $(V){if(f6.nodebuffer)return $1.transformTo("nodebuffer",V).toString("utf-8");return V=$1.transformTo(f6.uint8array?"uint8array":"array",V),s7(V)};function $2(){e1.call(this,"utf-8 decode"),this.leftOver=null}$1.inherits($2,e1);$2.prototype.processChunk=function($){var V=$1.transformTo(f6.uint8array?"uint8array":"array",$.data);if(this.leftOver&&this.leftOver.length){if(f6.uint8array){var Q=V;V=new Uint8Array(Q.length+this.leftOver.length),V.set(this.leftOver,0),V.set(Q,this.leftOver.length)}else V=this.leftOver.concat(V);this.leftOver=null}var q=r7(V),K=V;if(q!==V.length)if(f6.uint8array)K=V.subarray(0,q),this.leftOver=V.subarray(q,V.length);else K=V.slice(0,q),this.leftOver=V.slice(q,V.length);this.push({data:t7.utf8decode(K),meta:$.meta})};$2.prototype.flush=function(){if(this.leftOver&&this.leftOver.length)this.push({data:t7.utf8decode(this.leftOver),meta:{}}),this.leftOver=null};t7.Utf8DecodeWorker=$2;function W8(){e1.call(this,"utf-8 encode")}$1.inherits(W8,e1);W8.prototype.processChunk=function($){this.push({data:t7.utf8encode($.data),meta:$.meta})};t7.Utf8EncodeWorker=W8});var FQ=$0((HK,ZQ)=>{var PQ=_0(),zQ=N0();function P8($){PQ.call(this,"ConvertWorker to "+$),this.destType=$}zQ.inherits(P8,PQ);P8.prototype.processChunk=function($){this.push({data:zQ.transformTo(this.destType,$.data),meta:$.meta})};ZQ.exports=P8});var LQ=$0((MK,MQ)=>{var HQ=(r2(),T$(a2)).Readable,Qq=N0();Qq.inherits(z8,HQ);function z8($,V,Q){HQ.call(this,V),this._helper=$;var q=this;$.on("data",function(K,G){if(!q.push(K))q._helper.pause();if(Q)Q(G)}).on("error",function(K){q.emit("error",K)}).on("end",function(){q.push(null)})}z8.prototype._read=function(){this._helper.resume()};MQ.exports=z8});var Z8=$0((LK,BQ)=>{var h6=N0(),Vq=FQ(),qq=_0(),Xq=$8(),Yq=J6(),Kq=t6(),OQ=null;if(Yq.nodestream)try{OQ=LQ()}catch($){}function Jq($,V,Q){switch($){case"blob":return h6.newBlob(h6.transformTo("arraybuffer",V),Q);case"base64":return Xq.encode(V);default:return h6.transformTo($,V)}}function Gq($,V){var Q,q=0,K=null,G=0;for(Q=0;Q<V.length;Q++)G+=V[Q].length;switch($){case"string":return V.join("");case"array":return Array.prototype.concat.apply([],V);case"uint8array":K=new Uint8Array(G);for(Q=0;Q<V.length;Q++)K.set(V[Q],q),q+=V[Q].length;return K;case"nodebuffer":return Buffer.concat(V);default:throw new Error("concat : unsupported type '"+$+"'")}}function Uq($,V){return new Kq.Promise(function(Q,q){var K=[],G=$._internalType,W=$._outputType,J=$._mimeType;$.on("data",function(P,j){if(K.push(P),V)V(j)}).on("error",function(P){K=[],q(P)}).on("end",function(){try{var P=Jq(W,Gq(G,K),J);Q(P)}catch(j){q(j)}K=[]}).resume()})}function CQ($,V,Q){var q=V;switch(V){case"blob":case"arraybuffer":q="uint8array";break;case"base64":q="string";break}try{this._internalType=q,this._outputType=V,this._mimeType=Q,h6.checkSupport(q),this._worker=$.pipe(new Vq(q)),$.lock()}catch(K){this._worker=new qq("error"),this._worker.error(K)}}CQ.prototype={accumulate:function($){return Uq(this,$)},on:function($,V){var Q=this;if($==="data")this._worker.on($,function(q){V.call(Q,q.data,q.meta)});else this._worker.on($,function(){h6.delay(V,arguments,Q)});return this},resume:function(){return h6.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function($){if(h6.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new OQ(this,{objectMode:this._outputType!=="nodebuffer"},$)}};BQ.exports=CQ});var F8=$0((Wq)=>{Wq.base64=!1;Wq.binary=!1;Wq.dir=!1;Wq.createFolders=!0;Wq.date=null;Wq.compression=null;Wq.compressionOptions=null;Wq.comment=null;Wq.unixPermissions=null;Wq.dosPermissions=null});var H8=$0((CK,IQ)=>{var Q2=N0(),V2=_0(),Bq=16384;function V1($){V2.call(this,"DataWorker");var V=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,$.then(function(Q){if(V.dataIsReady=!0,V.data=Q,V.max=Q&&Q.length||0,V.type=Q2.getTypeOf(Q),!V.isPaused)V._tickAndRepeat()},function(Q){V.error(Q)})}Q2.inherits(V1,V2);V1.prototype.cleanUp=function(){V2.prototype.cleanUp.call(this),this.data=null};V1.prototype.resume=function(){if(!V2.prototype.resume.call(this))return!1;if(!this._tickScheduled&&this.dataIsReady)this._tickScheduled=!0,Q2.delay(this._tickAndRepeat,[],this);return!0};V1.prototype._tickAndRepeat=function(){if(this._tickScheduled=!1,this.isPaused||this.isFinished)return;if(this._tick(),!this.isFinished)Q2.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0};V1.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var $=Bq,V=null,Q=Math.min(this.max,this.index+$);if(this.index>=this.max)return this.end();else{switch(this.type){case"string":V=this.data.substring(this.index,Q);break;case"uint8array":V=this.data.subarray(this.index,Q);break;case"array":case"nodebuffer":V=this.data.slice(this.index,Q);break}return this.index=Q,this.push({data:V,meta:{percent:this.max?this.index/this.max*100:0}})}};IQ.exports=V1});var q2=$0((BK,DQ)=>{var Iq=N0();function wq(){var $,V=[];for(var Q=0;Q<256;Q++){$=Q;for(var q=0;q<8;q++)$=$&1?3988292384^$>>>1:$>>>1;V[Q]=$}return V}var wQ=wq();function Dq($,V,Q,q){var K=wQ,G=q+Q;$=$^-1;for(var W=q;W<G;W++)$=$>>>8^K[($^V[W])&255];return $^-1}function Nq($,V,Q,q){var K=wQ,G=q+Q;$=$^-1;for(var W=q;W<G;W++)$=$>>>8^K[($^V.charCodeAt(W))&255];return $^-1}DQ.exports=function $(V,Q){if(typeof V==="undefined"||!V.length)return 0;var q=Iq.getTypeOf(V)!=="string";if(q)return Dq(Q|0,V,V.length,0);else return Nq(Q|0,V,V.length,0)}});var L8=$0((IK,vQ)=>{var NQ=_0(),vq=q2(),Rq=N0();function M8(){NQ.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}Rq.inherits(M8,NQ);M8.prototype.processChunk=function($){this.streamInfo.crc32=vq($.data,this.streamInfo.crc32||0),this.push($)};vQ.exports=M8});var AQ=$0((wK,RQ)=>{var Aq=N0(),O8=_0();function C8($){O8.call(this,"DataLengthProbe for "+$),this.propName=$,this.withStreamInfo($,0)}Aq.inherits(C8,O8);C8.prototype.processChunk=function($){if($){var V=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=V+$.data.length}O8.prototype.processChunk.call(this,$)};RQ.exports=C8});var X2=$0((DK,SQ)=>{var xQ=t6(),TQ=H8(),xq=L8(),B8=AQ();function I8($,V,Q,q,K){this.compressedSize=$,this.uncompressedSize=V,this.crc32=Q,this.compression=q,this.compressedContent=K}I8.prototype={getContentWorker:function(){var $=new TQ(xQ.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new B8("data_length")),V=this;return $.on("end",function(){if(this.streamInfo.data_length!==V.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),$},getCompressedWorker:function(){return new TQ(xQ.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}};I8.createWorkerFrom=function($,V,Q){return $.pipe(new xq).pipe(new B8("uncompressedSize")).pipe(V.compressWorker(Q)).pipe(new B8("compressedSize")).withStreamInfo("compression",V)};SQ.exports=I8});var yQ=$0((NK,EQ)=>{var Tq=Z8(),Sq=H8(),w8=Q1(),D8=X2(),kQ=_0(),N8=function($,V,Q){this.name=$,this.dir=Q.dir,this.date=Q.date,this.comment=Q.comment,this.unixPermissions=Q.unixPermissions,this.dosPermissions=Q.dosPermissions,this._data=V,this._dataBinary=Q.binary,this.options={compression:Q.compression,compressionOptions:Q.compressionOptions}};N8.prototype={internalStream:function($){var V=null,Q="string";try{if(!$)throw new Error("No output type specified.");Q=$.toLowerCase();var q=Q==="string"||Q==="text";if(Q==="binarystring"||Q==="text")Q="string";V=this._decompressWorker();var K=!this._dataBinary;if(K&&!q)V=V.pipe(new w8.Utf8EncodeWorker);if(!K&&q)V=V.pipe(new w8.Utf8DecodeWorker)}catch(G){V=new kQ("error"),V.error(G)}return new Tq(V,Q,"")},async:function($,V){return this.internalStream($).accumulate(V)},nodeStream:function($,V){return this.internalStream($||"nodebuffer").toNodejsStream(V)},_compressWorker:function($,V){if(this._data instanceof D8&&this._data.compression.magic===$.magic)return this._data.getCompressedWorker();else{var Q=this._decompressWorker();if(!this._dataBinary)Q=Q.pipe(new w8.Utf8EncodeWorker);return D8.createWorkerFrom(Q,$,V)}},_decompressWorker:function(){if(this._data instanceof D8)return this._data.getContentWorker();else if(this._data instanceof kQ)return this._data;else return new Sq(this._data)}};var gQ=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],kq=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")};for(Y2=0;Y2<gQ.length;Y2++)N8.prototype[gQ[Y2]]=kq;var Y2;EQ.exports=N8});var U6=$0((v8)=>{var bq=typeof Uint8Array!=="undefined"&&typeof Uint16Array!=="undefined"&&typeof Int32Array!=="undefined";function fq($,V){return Object.prototype.hasOwnProperty.call($,V)}v8.assign=function($){var V=Array.prototype.slice.call(arguments,1);while(V.length){var Q=V.shift();if(!Q)continue;if(typeof Q!=="object")throw new TypeError(Q+"must be non-object");for(var q in Q)if(fq(Q,q))$[q]=Q[q]}return $};v8.shrinkBuf=function($,V){if($.length===V)return $;if($.subarray)return $.subarray(0,V);return $.length=V,$};var hq={arraySet:function($,V,Q,q,K){if(V.subarray&&$.subarray){$.set(V.subarray(Q,Q+q),K);return}for(var G=0;G<q;G++)$[K+G]=V[Q+G]},flattenChunks:function($){var V,Q,q,K,G,W;q=0;for(V=0,Q=$.length;V<Q;V++)q+=$[V].length;W=new Uint8Array(q),K=0;for(V=0,Q=$.length;V<Q;V++)G=$[V],W.set(G,K),K+=G.length;return W}},_q={arraySet:function($,V,Q,q,K){for(var G=0;G<q;G++)$[K+G]=V[Q+G]},flattenChunks:function($){return[].concat.apply([],$)}};v8.setTyped=function($){if($)v8.Buf8=Uint8Array,v8.Buf16=Uint16Array,v8.Buf32=Int32Array,v8.assign(v8,hq);else v8.Buf8=Array,v8.Buf16=Array,v8.Buf32=Array,v8.assign(v8,_q)};v8.setTyped(bq)});var Y5=$0((G3)=>{var pq=U6(),cq=4,fQ=0,hQ=1,uq=2;function X1($){var V=$.length;while(--V>=0)$[V]=0}var dq=0,dQ=1,lq=2,oq=3,iq=258,E8=29,T1=256,v1=T1+1+E8,q1=30,y8=19,lQ=2*v1+1,_6=15,A8=16,nq=7,b8=256,oQ=16,iQ=17,nQ=18,k8=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],K2=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],aq=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],aQ=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],rq=512,W6=new Array((v1+2)*2);X1(W6);var N1=new Array(q1*2);X1(N1);var R1=new Array(rq);X1(R1);var A1=new Array(iq-oq+1);X1(A1);var f8=new Array(E8);X1(f8);var J2=new Array(q1);X1(J2);function x8($,V,Q,q,K){this.static_tree=$,this.extra_bits=V,this.extra_base=Q,this.elems=q,this.max_length=K,this.has_stree=$&&$.length}var rQ,sQ,tQ;function T8($,V){this.dyn_tree=$,this.max_code=0,this.stat_desc=V}function eQ($){return $<256?R1[$]:R1[256+($>>>7)]}function x1($,V){$.pending_buf[$.pending++]=V&255,$.pending_buf[$.pending++]=V>>>8&255}function h0($,V,Q){if($.bi_valid>A8-Q)$.bi_buf|=V<<$.bi_valid&65535,x1($,$.bi_buf),$.bi_buf=V>>A8-$.bi_valid,$.bi_valid+=Q-A8;else $.bi_buf|=V<<$.bi_valid&65535,$.bi_valid+=Q}function t0($,V,Q){h0($,Q[V*2],Q[V*2+1])}function $5($,V){var Q=0;do Q|=$&1,$>>>=1,Q<<=1;while(--V>0);return Q>>>1}function sq($){if($.bi_valid===16)x1($,$.bi_buf),$.bi_buf=0,$.bi_valid=0;else if($.bi_valid>=8)$.pending_buf[$.pending++]=$.bi_buf&255,$.bi_buf>>=8,$.bi_valid-=8}function tq($,V){var{dyn_tree:Q,max_code:q}=V,K=V.stat_desc.static_tree,G=V.stat_desc.has_stree,W=V.stat_desc.extra_bits,J=V.stat_desc.extra_base,P=V.stat_desc.max_length,j,z,I,N,A,x,k=0;for(N=0;N<=_6;N++)$.bl_count[N]=0;Q[$.heap[$.heap_max]*2+1]=0;for(j=$.heap_max+1;j<lQ;j++){if(z=$.heap[j],N=Q[Q[z*2+1]*2+1]+1,N>P)N=P,k++;if(Q[z*2+1]=N,z>q)continue;if($.bl_count[N]++,A=0,z>=J)A=W[z-J];if(x=Q[z*2],$.opt_len+=x*(N+A),G)$.static_len+=x*(K[z*2+1]+A)}if(k===0)return;do{N=P-1;while($.bl_count[N]===0)N--;$.bl_count[N]--,$.bl_count[N+1]+=2,$.bl_count[P]--,k-=2}while(k>0);for(N=P;N!==0;N--){z=$.bl_count[N];while(z!==0){if(I=$.heap[--j],I>q)continue;if(Q[I*2+1]!==N)$.opt_len+=(N-Q[I*2+1])*Q[I*2],Q[I*2+1]=N;z--}}}function Q5($,V,Q){var q=new Array(_6+1),K=0,G,W;for(G=1;G<=_6;G++)q[G]=K=K+Q[G-1]<<1;for(W=0;W<=V;W++){var J=$[W*2+1];if(J===0)continue;$[W*2]=$5(q[J]++,J)}}function eq(){var $,V,Q,q,K,G=new Array(_6+1);Q=0;for(q=0;q<E8-1;q++){f8[q]=Q;for($=0;$<1<<k8[q];$++)A1[Q++]=q}A1[Q-1]=q,K=0;for(q=0;q<16;q++){J2[q]=K;for($=0;$<1<<K2[q];$++)R1[K++]=q}K>>=7;for(;q<q1;q++){J2[q]=K<<7;for($=0;$<1<<K2[q]-7;$++)R1[256+K++]=q}for(V=0;V<=_6;V++)G[V]=0;$=0;while($<=143)W6[$*2+1]=8,$++,G[8]++;while($<=255)W6[$*2+1]=9,$++,G[9]++;while($<=279)W6[$*2+1]=7,$++,G[7]++;while($<=287)W6[$*2+1]=8,$++,G[8]++;Q5(W6,v1+1,G);for($=0;$<q1;$++)N1[$*2+1]=5,N1[$*2]=$5($,5);rQ=new x8(W6,k8,T1+1,v1,_6),sQ=new x8(N1,K2,0,q1,_6),tQ=new x8(new Array(0),aq,0,y8,nq)}function V5($){var V;for(V=0;V<v1;V++)$.dyn_ltree[V*2]=0;for(V=0;V<q1;V++)$.dyn_dtree[V*2]=0;for(V=0;V<y8;V++)$.bl_tree[V*2]=0;$.dyn_ltree[b8*2]=1,$.opt_len=$.static_len=0,$.last_lit=$.matches=0}function q5($){if($.bi_valid>8)x1($,$.bi_buf);else if($.bi_valid>0)$.pending_buf[$.pending++]=$.bi_buf;$.bi_buf=0,$.bi_valid=0}function $3($,V,Q,q){if(q5($),q)x1($,Q),x1($,~Q);pq.arraySet($.pending_buf,$.window,V,Q,$.pending),$.pending+=Q}function _Q($,V,Q,q){var K=V*2,G=Q*2;return $[K]<$[G]||$[K]===$[G]&&q[V]<=q[Q]}function S8($,V,Q){var q=$.heap[Q],K=Q<<1;while(K<=$.heap_len){if(K<$.heap_len&&_Q(V,$.heap[K+1],$.heap[K],$.depth))K++;if(_Q(V,q,$.heap[K],$.depth))break;$.heap[Q]=$.heap[K],Q=K,K<<=1}$.heap[Q]=q}function mQ($,V,Q){var q,K,G=0,W,J;if($.last_lit!==0)do if(q=$.pending_buf[$.d_buf+G*2]<<8|$.pending_buf[$.d_buf+G*2+1],K=$.pending_buf[$.l_buf+G],G++,q===0)t0($,K,V);else{if(W=A1[K],t0($,W+T1+1,V),J=k8[W],J!==0)K-=f8[W],h0($,K,J);if(q--,W=eQ(q),t0($,W,Q),J=K2[W],J!==0)q-=J2[W],h0($,q,J)}while(G<$.last_lit);t0($,b8,V)}function g8($,V){var Q=V.dyn_tree,q=V.stat_desc.static_tree,K=V.stat_desc.has_stree,G=V.stat_desc.elems,W,J,P=-1,j;$.heap_len=0,$.heap_max=lQ;for(W=0;W<G;W++)if(Q[W*2]!==0)$.heap[++$.heap_len]=P=W,$.depth[W]=0;else Q[W*2+1]=0;while($.heap_len<2)if(j=$.heap[++$.heap_len]=P<2?++P:0,Q[j*2]=1,$.depth[j]=0,$.opt_len--,K)$.static_len-=q[j*2+1];V.max_code=P;for(W=$.heap_len>>1;W>=1;W--)S8($,Q,W);j=G;do W=$.heap[1],$.heap[1]=$.heap[$.heap_len--],S8($,Q,1),J=$.heap[1],$.heap[--$.heap_max]=W,$.heap[--$.heap_max]=J,Q[j*2]=Q[W*2]+Q[J*2],$.depth[j]=($.depth[W]>=$.depth[J]?$.depth[W]:$.depth[J])+1,Q[W*2+1]=Q[J*2+1]=j,$.heap[1]=j++,S8($,Q,1);while($.heap_len>=2);$.heap[--$.heap_max]=$.heap[1],tq($,V),Q5(Q,P,$.bl_count)}function pQ($,V,Q){var q,K=-1,G,W=V[1],J=0,P=7,j=4;if(W===0)P=138,j=3;V[(Q+1)*2+1]=65535;for(q=0;q<=Q;q++){if(G=W,W=V[(q+1)*2+1],++J<P&&G===W)continue;else if(J<j)$.bl_tree[G*2]+=J;else if(G!==0){if(G!==K)$.bl_tree[G*2]++;$.bl_tree[oQ*2]++}else if(J<=10)$.bl_tree[iQ*2]++;else $.bl_tree[nQ*2]++;if(J=0,K=G,W===0)P=138,j=3;else if(G===W)P=6,j=3;else P=7,j=4}}function cQ($,V,Q){var q,K=-1,G,W=V[1],J=0,P=7,j=4;if(W===0)P=138,j=3;for(q=0;q<=Q;q++){if(G=W,W=V[(q+1)*2+1],++J<P&&G===W)continue;else if(J<j)do t0($,G,$.bl_tree);while(--J!==0);else if(G!==0){if(G!==K)t0($,G,$.bl_tree),J--;t0($,oQ,$.bl_tree),h0($,J-3,2)}else if(J<=10)t0($,iQ,$.bl_tree),h0($,J-3,3);else t0($,nQ,$.bl_tree),h0($,J-11,7);if(J=0,K=G,W===0)P=138,j=3;else if(G===W)P=6,j=3;else P=7,j=4}}function Q3($){var V;pQ($,$.dyn_ltree,$.l_desc.max_code),pQ($,$.dyn_dtree,$.d_desc.max_code),g8($,$.bl_desc);for(V=y8-1;V>=3;V--)if($.bl_tree[aQ[V]*2+1]!==0)break;return $.opt_len+=3*(V+1)+5+5+4,V}function V3($,V,Q,q){var K;h0($,V-257,5),h0($,Q-1,5),h0($,q-4,4);for(K=0;K<q;K++)h0($,$.bl_tree[aQ[K]*2+1],3);cQ($,$.dyn_ltree,V-1),cQ($,$.dyn_dtree,Q-1)}function q3($){var V=4093624447,Q;for(Q=0;Q<=31;Q++,V>>>=1)if(V&1&&$.dyn_ltree[Q*2]!==0)return fQ;if($.dyn_ltree[18]!==0||$.dyn_ltree[20]!==0||$.dyn_ltree[26]!==0)return hQ;for(Q=32;Q<T1;Q++)if($.dyn_ltree[Q*2]!==0)return hQ;return fQ}var uQ=!1;function X3($){if(!uQ)eq(),uQ=!0;$.l_desc=new T8($.dyn_ltree,rQ),$.d_desc=new T8($.dyn_dtree,sQ),$.bl_desc=new T8($.bl_tree,tQ),$.bi_buf=0,$.bi_valid=0,V5($)}function X5($,V,Q,q){h0($,(dq<<1)+(q?1:0),3),$3($,V,Q,!0)}function Y3($){h0($,dQ<<1,3),t0($,b8,W6),sq($)}function K3($,V,Q,q){var K,G,W=0;if($.level>0){if($.strm.data_type===uq)$.strm.data_type=q3($);if(g8($,$.l_desc),g8($,$.d_desc),W=Q3($),K=$.opt_len+3+7>>>3,G=$.static_len+3+7>>>3,G<=K)K=G}else K=G=Q+5;if(Q+4<=K&&V!==-1)X5($,V,Q,q);else if($.strategy===cq||G===K)h0($,(dQ<<1)+(q?1:0),3),mQ($,W6,N1);else h0($,(lq<<1)+(q?1:0),3),V3($,$.l_desc.max_code+1,$.d_desc.max_code+1,W+1),mQ($,$.dyn_ltree,$.dyn_dtree);if(V5($),q)q5($)}function J3($,V,Q){if($.pending_buf[$.d_buf+$.last_lit*2]=V>>>8&255,$.pending_buf[$.d_buf+$.last_lit*2+1]=V&255,$.pending_buf[$.l_buf+$.last_lit]=Q&255,$.last_lit++,V===0)$.dyn_ltree[Q*2]++;else $.matches++,V--,$.dyn_ltree[(A1[Q]+T1+1)*2]++,$.dyn_dtree[eQ(V)*2]++;return $.last_lit===$.lit_bufsize-1}G3._tr_init=X3;G3._tr_stored_block=X5;G3._tr_flush_block=K3;G3._tr_tally=J3;G3._tr_align=Y3});var h8=$0((AK,K5)=>{function Z3($,V,Q,q){var K=$&65535|0,G=$>>>16&65535|0,W=0;while(Q!==0){W=Q>2000?2000:Q,Q-=W;do K=K+V[q++]|0,G=G+K|0;while(--W);K%=65521,G%=65521}return K|G<<16|0}K5.exports=Z3});var _8=$0((xK,J5)=>{function F3(){var $,V=[];for(var Q=0;Q<256;Q++){$=Q;for(var q=0;q<8;q++)$=$&1?3988292384^$>>>1:$>>>1;V[Q]=$}return V}var H3=F3();function M3($,V,Q,q){var K=H3,G=q+Q;$^=-1;for(var W=q;W<G;W++)$=$>>>8^K[($^V[W])&255];return $^-1}J5.exports=M3});var G2=$0((TK,G5)=>{G5.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}});var M5=$0((r3)=>{var y0=U6(),p0=Y5(),P5=h8(),C6=_8(),L3=G2(),u6=0,O3=1,C3=3,N6=4,U5=5,$6=0,W5=1,c0=-2,B3=-3,m8=-5,I3=-1,w3=1,U2=2,D3=3,N3=4,v3=0,R3=2,z2=8,A3=9,x3=15,T3=8,S3=29,k3=256,c8=k3+1+S3,g3=30,E3=19,y3=2*c8+1,b3=15,J0=3,w6=258,o0=w6+J0+1,f3=32,Z2=42,u8=69,W2=73,j2=91,P2=103,m6=113,k1=666,T0=1,g1=2,p6=3,J1=4,h3=3;function D6($,V){return $.msg=L3[V],V}function j5($){return($<<1)-($>4?9:0)}function I6($){var V=$.length;while(--V>=0)$[V]=0}function B6($){var V=$.state,Q=V.pending;if(Q>$.avail_out)Q=$.avail_out;if(Q===0)return;if(y0.arraySet($.output,V.pending_buf,V.pending_out,Q,$.next_out),$.next_out+=Q,V.pending_out+=Q,$.total_out+=Q,$.avail_out-=Q,V.pending-=Q,V.pending===0)V.pending_out=0}function S0($,V){p0._tr_flush_block($,$.block_start>=0?$.block_start:-1,$.strstart-$.block_start,V),$.block_start=$.strstart,B6($.strm)}function P0($,V){$.pending_buf[$.pending++]=V}function S1($,V){$.pending_buf[$.pending++]=V>>>8&255,$.pending_buf[$.pending++]=V&255}function _3($,V,Q,q){var K=$.avail_in;if(K>q)K=q;if(K===0)return 0;if($.avail_in-=K,y0.arraySet(V,$.input,$.next_in,K,Q),$.state.wrap===1)$.adler=P5($.adler,V,K,Q);else if($.state.wrap===2)$.adler=C6($.adler,V,K,Q);return $.next_in+=K,$.total_in+=K,K}function z5($,V){var{max_chain_length:Q,strstart:q}=$,K,G,W=$.prev_length,J=$.nice_match,P=$.strstart>$.w_size-o0?$.strstart-($.w_size-o0):0,j=$.window,z=$.w_mask,I=$.prev,N=$.strstart+w6,A=j[q+W-1],x=j[q+W];if($.prev_length>=$.good_match)Q>>=2;if(J>$.lookahead)J=$.lookahead;do{if(K=V,j[K+W]!==x||j[K+W-1]!==A||j[K]!==j[q]||j[++K]!==j[q+1])continue;q+=2,K++;do;while(j[++q]===j[++K]&&j[++q]===j[++K]&&j[++q]===j[++K]&&j[++q]===j[++K]&&j[++q]===j[++K]&&j[++q]===j[++K]&&j[++q]===j[++K]&&j[++q]===j[++K]&&q<N);if(G=w6-(N-q),q=N-w6,G>W){if($.match_start=V,W=G,G>=J)break;A=j[q+W-1],x=j[q+W]}}while((V=I[V&z])>P&&--Q!==0);if(W<=$.lookahead)return W;return $.lookahead}function c6($){var V=$.w_size,Q,q,K,G,W;do{if(G=$.window_size-$.lookahead-$.strstart,$.strstart>=V+(V-o0)){y0.arraySet($.window,$.window,V,V,0),$.match_start-=V,$.strstart-=V,$.block_start-=V,q=$.hash_size,Q=q;do K=$.head[--Q],$.head[Q]=K>=V?K-V:0;while(--q);q=V,Q=q;do K=$.prev[--Q],$.prev[Q]=K>=V?K-V:0;while(--q);G+=V}if($.strm.avail_in===0)break;if(q=_3($.strm,$.window,$.strstart+$.lookahead,G),$.lookahead+=q,$.lookahead+$.insert>=J0){W=$.strstart-$.insert,$.ins_h=$.window[W],$.ins_h=($.ins_h<<$.hash_shift^$.window[W+1])&$.hash_mask;while($.insert)if($.ins_h=($.ins_h<<$.hash_shift^$.window[W+J0-1])&$.hash_mask,$.prev[W&$.w_mask]=$.head[$.ins_h],$.head[$.ins_h]=W,W++,$.insert--,$.lookahead+$.insert<J0)break}}while($.lookahead<o0&&$.strm.avail_in!==0)}function m3($,V){var Q=65535;if(Q>$.pending_buf_size-5)Q=$.pending_buf_size-5;for(;;){if($.lookahead<=1){if(c6($),$.lookahead===0&&V===u6)return T0;if($.lookahead===0)break}$.strstart+=$.lookahead,$.lookahead=0;var q=$.block_start+Q;if($.strstart===0||$.strstart>=q){if($.lookahead=$.strstart-q,$.strstart=q,S0($,!1),$.strm.avail_out===0)return T0}if($.strstart-$.block_start>=$.w_size-o0){if(S0($,!1),$.strm.avail_out===0)return T0}}if($.insert=0,V===N6){if(S0($,!0),$.strm.avail_out===0)return p6;return J1}if($.strstart>$.block_start){if(S0($,!1),$.strm.avail_out===0)return T0}return T0}function p8($,V){var Q,q;for(;;){if($.lookahead<o0){if(c6($),$.lookahead<o0&&V===u6)return T0;if($.lookahead===0)break}if(Q=0,$.lookahead>=J0)$.ins_h=($.ins_h<<$.hash_shift^$.window[$.strstart+J0-1])&$.hash_mask,Q=$.prev[$.strstart&$.w_mask]=$.head[$.ins_h],$.head[$.ins_h]=$.strstart;if(Q!==0&&$.strstart-Q<=$.w_size-o0)$.match_length=z5($,Q);if($.match_length>=J0)if(q=p0._tr_tally($,$.strstart-$.match_start,$.match_length-J0),$.lookahead-=$.match_length,$.match_length<=$.max_lazy_match&&$.lookahead>=J0){$.match_length--;do $.strstart++,$.ins_h=($.ins_h<<$.hash_shift^$.window[$.strstart+J0-1])&$.hash_mask,Q=$.prev[$.strstart&$.w_mask]=$.head[$.ins_h],$.head[$.ins_h]=$.strstart;while(--$.match_length!==0);$.strstart++}else $.strstart+=$.match_length,$.match_length=0,$.ins_h=$.window[$.strstart],$.ins_h=($.ins_h<<$.hash_shift^$.window[$.strstart+1])&$.hash_mask;else q=p0._tr_tally($,0,$.window[$.strstart]),$.lookahead--,$.strstart++;if(q){if(S0($,!1),$.strm.avail_out===0)return T0}}if($.insert=$.strstart<J0-1?$.strstart:J0-1,V===N6){if(S0($,!0),$.strm.avail_out===0)return p6;return J1}if($.last_lit){if(S0($,!1),$.strm.avail_out===0)return T0}return g1}function Y1($,V){var Q,q,K;for(;;){if($.lookahead<o0){if(c6($),$.lookahead<o0&&V===u6)return T0;if($.lookahead===0)break}if(Q=0,$.lookahead>=J0)$.ins_h=($.ins_h<<$.hash_shift^$.window[$.strstart+J0-1])&$.hash_mask,Q=$.prev[$.strstart&$.w_mask]=$.head[$.ins_h],$.head[$.ins_h]=$.strstart;if($.prev_length=$.match_length,$.prev_match=$.match_start,$.match_length=J0-1,Q!==0&&$.prev_length<$.max_lazy_match&&$.strstart-Q<=$.w_size-o0){if($.match_length=z5($,Q),$.match_length<=5&&($.strategy===w3||$.match_length===J0&&$.strstart-$.match_start>4096))$.match_length=J0-1}if($.prev_length>=J0&&$.match_length<=$.prev_length){K=$.strstart+$.lookahead-J0,q=p0._tr_tally($,$.strstart-1-$.prev_match,$.prev_length-J0),$.lookahead-=$.prev_length-1,$.prev_length-=2;do if(++$.strstart<=K)$.ins_h=($.ins_h<<$.hash_shift^$.window[$.strstart+J0-1])&$.hash_mask,Q=$.prev[$.strstart&$.w_mask]=$.head[$.ins_h],$.head[$.ins_h]=$.strstart;while(--$.prev_length!==0);if($.match_available=0,$.match_length=J0-1,$.strstart++,q){if(S0($,!1),$.strm.avail_out===0)return T0}}else if($.match_available){if(q=p0._tr_tally($,0,$.window[$.strstart-1]),q)S0($,!1);if($.strstart++,$.lookahead--,$.strm.avail_out===0)return T0}else $.match_available=1,$.strstart++,$.lookahead--}if($.match_available)q=p0._tr_tally($,0,$.window[$.strstart-1]),$.match_available=0;if($.insert=$.strstart<J0-1?$.strstart:J0-1,V===N6){if(S0($,!0),$.strm.avail_out===0)return p6;return J1}if($.last_lit){if(S0($,!1),$.strm.avail_out===0)return T0}return g1}function p3($,V){var Q,q,K,G,W=$.window;for(;;){if($.lookahead<=w6){if(c6($),$.lookahead<=w6&&V===u6)return T0;if($.lookahead===0)break}if($.match_length=0,$.lookahead>=J0&&$.strstart>0){if(K=$.strstart-1,q=W[K],q===W[++K]&&q===W[++K]&&q===W[++K]){G=$.strstart+w6;do;while(q===W[++K]&&q===W[++K]&&q===W[++K]&&q===W[++K]&&q===W[++K]&&q===W[++K]&&q===W[++K]&&q===W[++K]&&K<G);if($.match_length=w6-(G-K),$.match_length>$.lookahead)$.match_length=$.lookahead}}if($.match_length>=J0)Q=p0._tr_tally($,1,$.match_length-J0),$.lookahead-=$.match_length,$.strstart+=$.match_length,$.match_length=0;else Q=p0._tr_tally($,0,$.window[$.strstart]),$.lookahead--,$.strstart++;if(Q){if(S0($,!1),$.strm.avail_out===0)return T0}}if($.insert=0,V===N6){if(S0($,!0),$.strm.avail_out===0)return p6;return J1}if($.last_lit){if(S0($,!1),$.strm.avail_out===0)return T0}return g1}function c3($,V){var Q;for(;;){if($.lookahead===0){if(c6($),$.lookahead===0){if(V===u6)return T0;break}}if($.match_length=0,Q=p0._tr_tally($,0,$.window[$.strstart]),$.lookahead--,$.strstart++,Q){if(S0($,!1),$.strm.avail_out===0)return T0}}if($.insert=0,V===N6){if(S0($,!0),$.strm.avail_out===0)return p6;return J1}if($.last_lit){if(S0($,!1),$.strm.avail_out===0)return T0}return g1}function e0($,V,Q,q,K){this.good_length=$,this.max_lazy=V,this.nice_length=Q,this.max_chain=q,this.func=K}var K1;K1=[new e0(0,0,0,0,m3),new e0(4,4,8,4,p8),new e0(4,5,16,8,p8),new e0(4,6,32,32,p8),new e0(4,4,16,16,Y1),new e0(8,16,32,32,Y1),new e0(8,16,128,128,Y1),new e0(8,32,128,256,Y1),new e0(32,128,258,1024,Y1),new e0(32,258,258,4096,Y1)];function u3($){$.window_size=2*$.w_size,I6($.head),$.max_lazy_match=K1[$.level].max_lazy,$.good_match=K1[$.level].good_length,$.nice_match=K1[$.level].nice_length,$.max_chain_length=K1[$.level].max_chain,$.strstart=0,$.block_start=0,$.lookahead=0,$.insert=0,$.match_length=$.prev_length=J0-1,$.match_available=0,$.ins_h=0}function d3(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=z2,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new y0.Buf16(y3*2),this.dyn_dtree=new y0.Buf16((2*g3+1)*2),this.bl_tree=new y0.Buf16((2*E3+1)*2),I6(this.dyn_ltree),I6(this.dyn_dtree),I6(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new y0.Buf16(b3+1),this.heap=new y0.Buf16(2*c8+1),I6(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new y0.Buf16(2*c8+1),I6(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function Z5($){var V;if(!$||!$.state)return D6($,c0);if($.total_in=$.total_out=0,$.data_type=R3,V=$.state,V.pending=0,V.pending_out=0,V.wrap<0)V.wrap=-V.wrap;return V.status=V.wrap?Z2:m6,$.adler=V.wrap===2?0:1,V.last_flush=u6,p0._tr_init(V),$6}function F5($){var V=Z5($);if(V===$6)u3($.state);return V}function l3($,V){if(!$||!$.state)return c0;if($.state.wrap!==2)return c0;return $.state.gzhead=V,$6}function H5($,V,Q,q,K,G){if(!$)return c0;var W=1;if(V===I3)V=6;if(q<0)W=0,q=-q;else if(q>15)W=2,q-=16;if(K<1||K>A3||Q!==z2||q<8||q>15||V<0||V>9||G<0||G>N3)return D6($,c0);if(q===8)q=9;var J=new d3;return $.state=J,J.strm=$,J.wrap=W,J.gzhead=null,J.w_bits=q,J.w_size=1<<J.w_bits,J.w_mask=J.w_size-1,J.hash_bits=K+7,J.hash_size=1<<J.hash_bits,J.hash_mask=J.hash_size-1,J.hash_shift=~~((J.hash_bits+J0-1)/J0),J.window=new y0.Buf8(J.w_size*2),J.head=new y0.Buf16(J.hash_size),J.prev=new y0.Buf16(J.w_size),J.lit_bufsize=1<<K+6,J.pending_buf_size=J.lit_bufsize*4,J.pending_buf=new y0.Buf8(J.pending_buf_size),J.d_buf=1*J.lit_bufsize,J.l_buf=3*J.lit_bufsize,J.level=V,J.strategy=G,J.method=Q,F5($)}function o3($,V){return H5($,V,z2,x3,T3,v3)}function i3($,V){var Q,q,K,G;if(!$||!$.state||V>U5||V<0)return $?D6($,c0):c0;if(q=$.state,!$.output||!$.input&&$.avail_in!==0||q.status===k1&&V!==N6)return D6($,$.avail_out===0?m8:c0);if(q.strm=$,Q=q.last_flush,q.last_flush=V,q.status===Z2)if(q.wrap===2)if($.adler=0,P0(q,31),P0(q,139),P0(q,8),!q.gzhead)P0(q,0),P0(q,0),P0(q,0),P0(q,0),P0(q,0),P0(q,q.level===9?2:q.strategy>=U2||q.level<2?4:0),P0(q,h3),q.status=m6;else{if(P0(q,(q.gzhead.text?1:0)+(q.gzhead.hcrc?2:0)+(!q.gzhead.extra?0:4)+(!q.gzhead.name?0:8)+(!q.gzhead.comment?0:16)),P0(q,q.gzhead.time&255),P0(q,q.gzhead.time>>8&255),P0(q,q.gzhead.time>>16&255),P0(q,q.gzhead.time>>24&255),P0(q,q.level===9?2:q.strategy>=U2||q.level<2?4:0),P0(q,q.gzhead.os&255),q.gzhead.extra&&q.gzhead.extra.length)P0(q,q.gzhead.extra.length&255),P0(q,q.gzhead.extra.length>>8&255);if(q.gzhead.hcrc)$.adler=C6($.adler,q.pending_buf,q.pending,0);q.gzindex=0,q.status=u8}else{var W=z2+(q.w_bits-8<<4)<<8,J=-1;if(q.strategy>=U2||q.level<2)J=0;else if(q.level<6)J=1;else if(q.level===6)J=2;else J=3;if(W|=J<<6,q.strstart!==0)W|=f3;if(W+=31-W%31,q.status=m6,S1(q,W),q.strstart!==0)S1(q,$.adler>>>16),S1(q,$.adler&65535);$.adler=1}if(q.status===u8)if(q.gzhead.extra){K=q.pending;while(q.gzindex<(q.gzhead.extra.length&65535)){if(q.pending===q.pending_buf_size){if(q.gzhead.hcrc&&q.pending>K)$.adler=C6($.adler,q.pending_buf,q.pending-K,K);if(B6($),K=q.pending,q.pending===q.pending_buf_size)break}P0(q,q.gzhead.extra[q.gzindex]&255),q.gzindex++}if(q.gzhead.hcrc&&q.pending>K)$.adler=C6($.adler,q.pending_buf,q.pending-K,K);if(q.gzindex===q.gzhead.extra.length)q.gzindex=0,q.status=W2}else q.status=W2;if(q.status===W2)if(q.gzhead.name){K=q.pending;do{if(q.pending===q.pending_buf_size){if(q.gzhead.hcrc&&q.pending>K)$.adler=C6($.adler,q.pending_buf,q.pending-K,K);if(B6($),K=q.pending,q.pending===q.pending_buf_size){G=1;break}}if(q.gzindex<q.gzhead.name.length)G=q.gzhead.name.charCodeAt(q.gzindex++)&255;else G=0;P0(q,G)}while(G!==0);if(q.gzhead.hcrc&&q.pending>K)$.adler=C6($.adler,q.pending_buf,q.pending-K,K);if(G===0)q.gzindex=0,q.status=j2}else q.status=j2;if(q.status===j2)if(q.gzhead.comment){K=q.pending;do{if(q.pending===q.pending_buf_size){if(q.gzhead.hcrc&&q.pending>K)$.adler=C6($.adler,q.pending_buf,q.pending-K,K);if(B6($),K=q.pending,q.pending===q.pending_buf_size){G=1;break}}if(q.gzindex<q.gzhead.comment.length)G=q.gzhead.comment.charCodeAt(q.gzindex++)&255;else G=0;P0(q,G)}while(G!==0);if(q.gzhead.hcrc&&q.pending>K)$.adler=C6($.adler,q.pending_buf,q.pending-K,K);if(G===0)q.status=P2}else q.status=P2;if(q.status===P2)if(q.gzhead.hcrc){if(q.pending+2>q.pending_buf_size)B6($);if(q.pending+2<=q.pending_buf_size)P0(q,$.adler&255),P0(q,$.adler>>8&255),$.adler=0,q.status=m6}else q.status=m6;if(q.pending!==0){if(B6($),$.avail_out===0)return q.last_flush=-1,$6}else if($.avail_in===0&&j5(V)<=j5(Q)&&V!==N6)return D6($,m8);if(q.status===k1&&$.avail_in!==0)return D6($,m8);if($.avail_in!==0||q.lookahead!==0||V!==u6&&q.status!==k1){var P=q.strategy===U2?c3(q,V):q.strategy===D3?p3(q,V):K1[q.level].func(q,V);if(P===p6||P===J1)q.status=k1;if(P===T0||P===p6){if($.avail_out===0)q.last_flush=-1;return $6}if(P===g1){if(V===O3)p0._tr_align(q);else if(V!==U5){if(p0._tr_stored_block(q,0,0,!1),V===C3){if(I6(q.head),q.lookahead===0)q.strstart=0,q.block_start=0,q.insert=0}}if(B6($),$.avail_out===0)return q.last_flush=-1,$6}}if(V!==N6)return $6;if(q.wrap<=0)return W5;if(q.wrap===2)P0(q,$.adler&255),P0(q,$.adler>>8&255),P0(q,$.adler>>16&255),P0(q,$.adler>>24&255),P0(q,$.total_in&255),P0(q,$.total_in>>8&255),P0(q,$.total_in>>16&255),P0(q,$.total_in>>24&255);else S1(q,$.adler>>>16),S1(q,$.adler&65535);if(B6($),q.wrap>0)q.wrap=-q.wrap;return q.pending!==0?$6:W5}function n3($){var V;if(!$||!$.state)return c0;if(V=$.state.status,V!==Z2&&V!==u8&&V!==W2&&V!==j2&&V!==P2&&V!==m6&&V!==k1)return D6($,c0);return $.state=null,V===m6?D6($,B3):$6}function a3($,V){var Q=V.length,q,K,G,W,J,P,j,z;if(!$||!$.state)return c0;if(q=$.state,W=q.wrap,W===2||W===1&&q.status!==Z2||q.lookahead)return c0;if(W===1)$.adler=P5($.adler,V,Q,0);if(q.wrap=0,Q>=q.w_size){if(W===0)I6(q.head),q.strstart=0,q.block_start=0,q.insert=0;z=new y0.Buf8(q.w_size),y0.arraySet(z,V,Q-q.w_size,q.w_size,0),V=z,Q=q.w_size}J=$.avail_in,P=$.next_in,j=$.input,$.avail_in=Q,$.next_in=0,$.input=V,c6(q);while(q.lookahead>=J0){K=q.strstart,G=q.lookahead-(J0-1);do q.ins_h=(q.ins_h<<q.hash_shift^q.window[K+J0-1])&q.hash_mask,q.prev[K&q.w_mask]=q.head[q.ins_h],q.head[q.ins_h]=K,K++;while(--G);q.strstart=K,q.lookahead=J0-1,c6(q)}return q.strstart+=q.lookahead,q.block_start=q.strstart,q.insert=q.lookahead,q.lookahead=0,q.match_length=q.prev_length=J0-1,q.match_available=0,$.next_in=P,$.input=j,$.avail_in=J,q.wrap=W,$6}r3.deflateInit=o3;r3.deflateInit2=H5;r3.deflateReset=F5;r3.deflateResetKeep=Z5;r3.deflateSetHeader=l3;r3.deflate=i3;r3.deflateEnd=n3;r3.deflateSetDictionary=a3;r3.deflateInfo="pako deflate (from Nodeca project)"});var d8=$0((KX)=>{var F2=U6(),L5=!0,O5=!0;try{String.fromCharCode.apply(null,[0])}catch($){L5=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch($){O5=!1}var E1=new F2.Buf8(256);for(j6=0;j6<256;j6++)E1[j6]=j6>=252?6:j6>=248?5:j6>=240?4:j6>=224?3:j6>=192?2:1;var j6;E1[254]=E1[254]=1;KX.string2buf=function($){var V,Q,q,K,G,W=$.length,J=0;for(K=0;K<W;K++){if(Q=$.charCodeAt(K),(Q&64512)===55296&&K+1<W){if(q=$.charCodeAt(K+1),(q&64512)===56320)Q=65536+(Q-55296<<10)+(q-56320),K++}J+=Q<128?1:Q<2048?2:Q<65536?3:4}V=new F2.Buf8(J);for(G=0,K=0;G<J;K++){if(Q=$.charCodeAt(K),(Q&64512)===55296&&K+1<W){if(q=$.charCodeAt(K+1),(q&64512)===56320)Q=65536+(Q-55296<<10)+(q-56320),K++}if(Q<128)V[G++]=Q;else if(Q<2048)V[G++]=192|Q>>>6,V[G++]=128|Q&63;else if(Q<65536)V[G++]=224|Q>>>12,V[G++]=128|Q>>>6&63,V[G++]=128|Q&63;else V[G++]=240|Q>>>18,V[G++]=128|Q>>>12&63,V[G++]=128|Q>>>6&63,V[G++]=128|Q&63}return V};function C5($,V){if(V<65534){if($.subarray&&O5||!$.subarray&&L5)return String.fromCharCode.apply(null,F2.shrinkBuf($,V))}var Q="";for(var q=0;q<V;q++)Q+=String.fromCharCode($[q]);return Q}KX.buf2binstring=function($){return C5($,$.length)};KX.binstring2buf=function($){var V=new F2.Buf8($.length);for(var Q=0,q=V.length;Q<q;Q++)V[Q]=$.charCodeAt(Q);return V};KX.buf2string=function($,V){var Q,q,K,G,W=V||$.length,J=new Array(W*2);for(q=0,Q=0;Q<W;){if(K=$[Q++],K<128){J[q++]=K;continue}if(G=E1[K],G>4){J[q++]=65533,Q+=G-1;continue}K&=G===2?31:G===3?15:7;while(G>1&&Q<W)K=K<<6|$[Q++]&63,G--;if(G>1){J[q++]=65533;continue}if(K<65536)J[q++]=K;else K-=65536,J[q++]=55296|K>>10&1023,J[q++]=56320|K&1023}return C5(J,q)};KX.utf8border=function($,V){var Q;if(V=V||$.length,V>$.length)V=$.length;Q=V-1;while(Q>=0&&($[Q]&192)===128)Q--;if(Q<0)return V;if(Q===0)return V;return Q+E1[$[Q]]>V?Q:V}});var l8=$0((gK,B5)=>{function PX(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}B5.exports=PX});var N5=$0((CX)=>{var y1=M5(),b1=U6(),i8=d8(),n8=G2(),zX=l8(),D5=Object.prototype.toString,ZX=0,o8=4,G1=0,I5=1,w5=2,FX=-1,HX=0,MX=8;function d6($){if(!(this instanceof d6))return new d6($);this.options=b1.assign({level:FX,method:MX,chunkSize:16384,windowBits:15,memLevel:8,strategy:HX,to:""},$||{});var V=this.options;if(V.raw&&V.windowBits>0)V.windowBits=-V.windowBits;else if(V.gzip&&V.windowBits>0&&V.windowBits<16)V.windowBits+=16;this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new zX,this.strm.avail_out=0;var Q=y1.deflateInit2(this.strm,V.level,V.method,V.windowBits,V.memLevel,V.strategy);if(Q!==G1)throw new Error(n8[Q]);if(V.header)y1.deflateSetHeader(this.strm,V.header);if(V.dictionary){var q;if(typeof V.dictionary==="string")q=i8.string2buf(V.dictionary);else if(D5.call(V.dictionary)==="[object ArrayBuffer]")q=new Uint8Array(V.dictionary);else q=V.dictionary;if(Q=y1.deflateSetDictionary(this.strm,q),Q!==G1)throw new Error(n8[Q]);this._dict_set=!0}}d6.prototype.push=function($,V){var Q=this.strm,q=this.options.chunkSize,K,G;if(this.ended)return!1;if(G=V===~~V?V:V===!0?o8:ZX,typeof $==="string")Q.input=i8.string2buf($);else if(D5.call($)==="[object ArrayBuffer]")Q.input=new Uint8Array($);else Q.input=$;Q.next_in=0,Q.avail_in=Q.input.length;do{if(Q.avail_out===0)Q.output=new b1.Buf8(q),Q.next_out=0,Q.avail_out=q;if(K=y1.deflate(Q,G),K!==I5&&K!==G1)return this.onEnd(K),this.ended=!0,!1;if(Q.avail_out===0||Q.avail_in===0&&(G===o8||G===w5))if(this.options.to==="string")this.onData(i8.buf2binstring(b1.shrinkBuf(Q.output,Q.next_out)));else this.onData(b1.shrinkBuf(Q.output,Q.next_out))}while((Q.avail_in>0||Q.avail_out===0)&&K!==I5);if(G===o8)return K=y1.deflateEnd(this.strm),this.onEnd(K),this.ended=!0,K===G1;if(G===w5)return this.onEnd(G1),Q.avail_out=0,!0;return!0};d6.prototype.onData=function($){this.chunks.push($)};d6.prototype.onEnd=function($){if($===G1)if(this.options.to==="string")this.result=this.chunks.join("");else this.result=b1.flattenChunks(this.chunks);this.chunks=[],this.err=$,this.msg=this.strm.msg};function a8($,V){var Q=new d6(V);if(Q.push($,!0),Q.err)throw Q.msg||n8[Q.err];return Q.result}function LX($,V){return V=V||{},V.raw=!0,a8($,V)}function OX($,V){return V=V||{},V.gzip=!0,a8($,V)}CX.Deflate=d6;CX.deflate=a8;CX.deflateRaw=LX;CX.gzip=OX});var R5=$0((yK,v5)=>{var H2=30,NX=12;v5.exports=function $(V,Q){var q,K,G,W,J,P,j,z,I,N,A,x,k,g,y,Z,O,M,R,C,L,T,E,f,b;q=V.state,K=V.next_in,f=V.input,G=K+(V.avail_in-5),W=V.next_out,b=V.output,J=W-(Q-V.avail_out),P=W+(V.avail_out-257),j=q.dmax,z=q.wsize,I=q.whave,N=q.wnext,A=q.window,x=q.hold,k=q.bits,g=q.lencode,y=q.distcode,Z=(1<<q.lenbits)-1,O=(1<<q.distbits)-1;$:do{if(k<15)x+=f[K++]<<k,k+=8,x+=f[K++]<<k,k+=8;M=g[x&Z];Q:for(;;){if(R=M>>>24,x>>>=R,k-=R,R=M>>>16&255,R===0)b[W++]=M&65535;else if(R&16){if(C=M&65535,R&=15,R){if(k<R)x+=f[K++]<<k,k+=8;C+=x&(1<<R)-1,x>>>=R,k-=R}if(k<15)x+=f[K++]<<k,k+=8,x+=f[K++]<<k,k+=8;M=y[x&O];V:for(;;){if(R=M>>>24,x>>>=R,k-=R,R=M>>>16&255,R&16){if(L=M&65535,R&=15,k<R){if(x+=f[K++]<<k,k+=8,k<R)x+=f[K++]<<k,k+=8}if(L+=x&(1<<R)-1,L>j){V.msg="invalid distance too far back",q.mode=H2;break $}if(x>>>=R,k-=R,R=W-J,L>R){if(R=L-R,R>I){if(q.sane){V.msg="invalid distance too far back",q.mode=H2;break $}}if(T=0,E=A,N===0){if(T+=z-R,R<C){C-=R;do b[W++]=A[T++];while(--R);T=W-L,E=b}}else if(N<R){if(T+=z+N-R,R-=N,R<C){C-=R;do b[W++]=A[T++];while(--R);if(T=0,N<C){R=N,C-=R;do b[W++]=A[T++];while(--R);T=W-L,E=b}}}else if(T+=N-R,R<C){C-=R;do b[W++]=A[T++];while(--R);T=W-L,E=b}while(C>2)b[W++]=E[T++],b[W++]=E[T++],b[W++]=E[T++],C-=3;if(C){if(b[W++]=E[T++],C>1)b[W++]=E[T++]}}else{T=W-L;do b[W++]=b[T++],b[W++]=b[T++],b[W++]=b[T++],C-=3;while(C>2);if(C){if(b[W++]=b[T++],C>1)b[W++]=b[T++]}}}else if((R&64)===0){M=y[(M&65535)+(x&(1<<R)-1)];continue V}else{V.msg="invalid distance code",q.mode=H2;break $}break}}else if((R&64)===0){M=g[(M&65535)+(x&(1<<R)-1)];continue Q}else if(R&32){q.mode=NX;break $}else{V.msg="invalid literal/length code",q.mode=H2;break $}break}}while(K<G&&W<P);C=k>>3,K-=C,k-=C<<3,x&=(1<<k)-1,V.next_in=K,V.next_out=W,V.avail_in=K<G?5+(G-K):5-(K-G),V.avail_out=W<P?257+(P-W):257-(W-P),q.hold=x,q.bits=k;return}});var E5=$0((bK,g5)=>{var A5=U6(),U1=15,x5=852,T5=592,S5=0,r8=1,k5=2,vX=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],RX=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],AX=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],xX=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];g5.exports=function $(V,Q,q,K,G,W,J,P){var j=P.bits,z=0,I=0,N=0,A=0,x=0,k=0,g=0,y=0,Z=0,O=0,M,R,C,L,T,E=null,f=0,b,F=new A5.Buf16(U1+1),m=new A5.Buf16(U1+1),n=null,v=0,c,u,i;for(z=0;z<=U1;z++)F[z]=0;for(I=0;I<K;I++)F[Q[q+I]]++;x=j;for(A=U1;A>=1;A--)if(F[A]!==0)break;if(x>A)x=A;if(A===0)return G[W++]=20971520,G[W++]=20971520,P.bits=1,0;for(N=1;N<A;N++)if(F[N]!==0)break;if(x<N)x=N;y=1;for(z=1;z<=U1;z++)if(y<<=1,y-=F[z],y<0)return-1;if(y>0&&(V===S5||A!==1))return-1;m[1]=0;for(z=1;z<U1;z++)m[z+1]=m[z]+F[z];for(I=0;I<K;I++)if(Q[q+I]!==0)J[m[Q[q+I]]++]=I;if(V===S5)E=n=J,b=19;else if(V===r8)E=vX,f-=257,n=RX,v-=257,b=256;else E=AX,n=xX,b=-1;if(O=0,I=0,z=N,T=W,k=x,g=0,C=-1,Z=1<<x,L=Z-1,V===r8&&Z>x5||V===k5&&Z>T5)return 1;for(;;){if(c=z-g,J[I]<b)u=0,i=J[I];else if(J[I]>b)u=n[v+J[I]],i=E[f+J[I]];else u=96,i=0;M=1<<z-g,R=1<<k,N=R;do R-=M,G[T+(O>>g)+R]=c<<24|u<<16|i|0;while(R!==0);M=1<<z-1;while(O&M)M>>=1;if(M!==0)O&=M-1,O+=M;else O=0;if(I++,--F[z]===0){if(z===A)break;z=Q[q+J[I]]}if(z>x&&(O&L)!==C){if(g===0)g=x;T+=N,k=z-g,y=1<<k;while(k+g<A){if(y-=F[k+g],y<=0)break;k++,y<<=1}if(Z+=1<<k,V===r8&&Z>x5||V===k5&&Z>T5)return 1;C=O&L,G[C]=x<<24|k<<16|T-W|0}}if(O!==0)G[T+O]=z-g<<24|4194304|0;return P.bits=x,0}});var F9=$0((nX)=>{var m0=U6(),V$=h8(),Q6=_8(),TX=R5(),f1=E5(),SX=0,K9=1,J9=2,y5=4,kX=5,M2=6,l6=0,gX=1,EX=2,u0=-2,G9=-3,q$=-4,yX=-5,b5=8,U9=1,f5=2,h5=3,_5=4,m5=5,p5=6,c5=7,u5=8,d5=9,l5=10,C2=11,P6=12,s8=13,o5=14,t8=15,i5=16,n5=17,a5=18,r5=19,L2=20,O2=21,s5=22,t5=23,e5=24,$9=25,Q9=26,e8=27,V9=28,q9=29,w0=30,X$=31,bX=32,fX=852,hX=592,_X=15,mX=_X;function X9($){return($>>>24&255)+($>>>8&65280)+(($&65280)<<8)+(($&255)<<24)}function pX(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new m0.Buf16(320),this.work=new m0.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function W9($){var V;if(!$||!$.state)return u0;if(V=$.state,$.total_in=$.total_out=V.total=0,$.msg="",V.wrap)$.adler=V.wrap&1;return V.mode=U9,V.last=0,V.havedict=0,V.dmax=32768,V.head=null,V.hold=0,V.bits=0,V.lencode=V.lendyn=new m0.Buf32(fX),V.distcode=V.distdyn=new m0.Buf32(hX),V.sane=1,V.back=-1,l6}function j9($){var V;if(!$||!$.state)return u0;return V=$.state,V.wsize=0,V.whave=0,V.wnext=0,W9($)}function P9($,V){var Q,q;if(!$||!$.state)return u0;if(q=$.state,V<0)Q=0,V=-V;else if(Q=(V>>4)+1,V<48)V&=15;if(V&&(V<8||V>15))return u0;if(q.window!==null&&q.wbits!==V)q.window=null;return q.wrap=Q,q.wbits=V,j9($)}function z9($,V){var Q,q;if(!$)return u0;if(q=new pX,$.state=q,q.window=null,Q=P9($,V),Q!==l6)$.state=null;return Q}function cX($){return z9($,mX)}var Y9=!0,$$,Q$;function uX($){if(Y9){var V;$$=new m0.Buf32(512),Q$=new m0.Buf32(32),V=0;while(V<144)$.lens[V++]=8;while(V<256)$.lens[V++]=9;while(V<280)$.lens[V++]=7;while(V<288)$.lens[V++]=8;f1(K9,$.lens,0,288,$$,0,$.work,{bits:9}),V=0;while(V<32)$.lens[V++]=5;f1(J9,$.lens,0,32,Q$,0,$.work,{bits:5}),Y9=!1}$.lencode=$$,$.lenbits=9,$.distcode=Q$,$.distbits=5}function Z9($,V,Q,q){var K,G=$.state;if(G.window===null)G.wsize=1<<G.wbits,G.wnext=0,G.whave=0,G.window=new m0.Buf8(G.wsize);if(q>=G.wsize)m0.arraySet(G.window,V,Q-G.wsize,G.wsize,0),G.wnext=0,G.whave=G.wsize;else{if(K=G.wsize-G.wnext,K>q)K=q;if(m0.arraySet(G.window,V,Q-q,K,G.wnext),q-=K,q)m0.arraySet(G.window,V,Q-q,q,0),G.wnext=q,G.whave=G.wsize;else{if(G.wnext+=K,G.wnext===G.wsize)G.wnext=0;if(G.whave<G.wsize)G.whave+=K}}return 0}function dX($,V){var Q,q,K,G,W,J,P,j,z,I,N,A,x,k,g=0,y,Z,O,M,R,C,L,T,E=new m0.Buf8(4),f,b,F=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!$||!$.state||!$.output||!$.input&&$.avail_in!==0)return u0;if(Q=$.state,Q.mode===P6)Q.mode=s8;W=$.next_out,K=$.output,P=$.avail_out,G=$.next_in,q=$.input,J=$.avail_in,j=Q.hold,z=Q.bits,I=J,N=P,T=l6;$:for(;;)switch(Q.mode){case U9:if(Q.wrap===0){Q.mode=s8;break}while(z<16){if(J===0)break $;J--,j+=q[G++]<<z,z+=8}if(Q.wrap&2&&j===35615){Q.check=0,E[0]=j&255,E[1]=j>>>8&255,Q.check=Q6(Q.check,E,2,0),j=0,z=0,Q.mode=f5;break}if(Q.flags=0,Q.head)Q.head.done=!1;if(!(Q.wrap&1)||(((j&255)<<8)+(j>>8))%31){$.msg="incorrect header check",Q.mode=w0;break}if((j&15)!==b5){$.msg="unknown compression method",Q.mode=w0;break}if(j>>>=4,z-=4,L=(j&15)+8,Q.wbits===0)Q.wbits=L;else if(L>Q.wbits){$.msg="invalid window size",Q.mode=w0;break}Q.dmax=1<<L,$.adler=Q.check=1,Q.mode=j&512?l5:P6,j=0,z=0;break;case f5:while(z<16){if(J===0)break $;J--,j+=q[G++]<<z,z+=8}if(Q.flags=j,(Q.flags&255)!==b5){$.msg="unknown compression method",Q.mode=w0;break}if(Q.flags&57344){$.msg="unknown header flags set",Q.mode=w0;break}if(Q.head)Q.head.text=j>>8&1;if(Q.flags&512)E[0]=j&255,E[1]=j>>>8&255,Q.check=Q6(Q.check,E,2,0);j=0,z=0,Q.mode=h5;case h5:while(z<32){if(J===0)break $;J--,j+=q[G++]<<z,z+=8}if(Q.head)Q.head.time=j;if(Q.flags&512)E[0]=j&255,E[1]=j>>>8&255,E[2]=j>>>16&255,E[3]=j>>>24&255,Q.check=Q6(Q.check,E,4,0);j=0,z=0,Q.mode=_5;case _5:while(z<16){if(J===0)break $;J--,j+=q[G++]<<z,z+=8}if(Q.head)Q.head.xflags=j&255,Q.head.os=j>>8;if(Q.flags&512)E[0]=j&255,E[1]=j>>>8&255,Q.check=Q6(Q.check,E,2,0);j=0,z=0,Q.mode=m5;case m5:if(Q.flags&1024){while(z<16){if(J===0)break $;J--,j+=q[G++]<<z,z+=8}if(Q.length=j,Q.head)Q.head.extra_len=j;if(Q.flags&512)E[0]=j&255,E[1]=j>>>8&255,Q.check=Q6(Q.check,E,2,0);j=0,z=0}else if(Q.head)Q.head.extra=null;Q.mode=p5;case p5:if(Q.flags&1024){if(A=Q.length,A>J)A=J;if(A){if(Q.head){if(L=Q.head.extra_len-Q.length,!Q.head.extra)Q.head.extra=new Array(Q.head.extra_len);m0.arraySet(Q.head.extra,q,G,A,L)}if(Q.flags&512)Q.check=Q6(Q.check,q,A,G);J-=A,G+=A,Q.length-=A}if(Q.length)break $}Q.length=0,Q.mode=c5;case c5:if(Q.flags&2048){if(J===0)break $;A=0;do if(L=q[G+A++],Q.head&&L&&Q.length<65536)Q.head.name+=String.fromCharCode(L);while(L&&A<J);if(Q.flags&512)Q.check=Q6(Q.check,q,A,G);if(J-=A,G+=A,L)break $}else if(Q.head)Q.head.name=null;Q.length=0,Q.mode=u5;case u5:if(Q.flags&4096){if(J===0)break $;A=0;do if(L=q[G+A++],Q.head&&L&&Q.length<65536)Q.head.comment+=String.fromCharCode(L);while(L&&A<J);if(Q.flags&512)Q.check=Q6(Q.check,q,A,G);if(J-=A,G+=A,L)break $}else if(Q.head)Q.head.comment=null;Q.mode=d5;case d5:if(Q.flags&512){while(z<16){if(J===0)break $;J--,j+=q[G++]<<z,z+=8}if(j!==(Q.check&65535)){$.msg="header crc mismatch",Q.mode=w0;break}j=0,z=0}if(Q.head)Q.head.hcrc=Q.flags>>9&1,Q.head.done=!0;$.adler=Q.check=0,Q.mode=P6;break;case l5:while(z<32){if(J===0)break $;J--,j+=q[G++]<<z,z+=8}$.adler=Q.check=X9(j),j=0,z=0,Q.mode=C2;case C2:if(Q.havedict===0)return $.next_out=W,$.avail_out=P,$.next_in=G,$.avail_in=J,Q.hold=j,Q.bits=z,EX;$.adler=Q.check=1,Q.mode=P6;case P6:if(V===kX||V===M2)break $;case s8:if(Q.last){j>>>=z&7,z-=z&7,Q.mode=e8;break}while(z<3){if(J===0)break $;J--,j+=q[G++]<<z,z+=8}switch(Q.last=j&1,j>>>=1,z-=1,j&3){case 0:Q.mode=o5;break;case 1:if(uX(Q),Q.mode=L2,V===M2){j>>>=2,z-=2;break $}break;case 2:Q.mode=n5;break;case 3:$.msg="invalid block type",Q.mode=w0}j>>>=2,z-=2;break;case o5:j>>>=z&7,z-=z&7;while(z<32){if(J===0)break $;J--,j+=q[G++]<<z,z+=8}if((j&65535)!==(j>>>16^65535)){$.msg="invalid stored block lengths",Q.mode=w0;break}if(Q.length=j&65535,j=0,z=0,Q.mode=t8,V===M2)break $;case t8:Q.mode=i5;case i5:if(A=Q.length,A){if(A>J)A=J;if(A>P)A=P;if(A===0)break $;m0.arraySet(K,q,G,A,W),J-=A,G+=A,P-=A,W+=A,Q.length-=A;break}Q.mode=P6;break;case n5:while(z<14){if(J===0)break $;J--,j+=q[G++]<<z,z+=8}if(Q.nlen=(j&31)+257,j>>>=5,z-=5,Q.ndist=(j&31)+1,j>>>=5,z-=5,Q.ncode=(j&15)+4,j>>>=4,z-=4,Q.nlen>286||Q.ndist>30){$.msg="too many length or distance symbols",Q.mode=w0;break}Q.have=0,Q.mode=a5;case a5:while(Q.have<Q.ncode){while(z<3){if(J===0)break $;J--,j+=q[G++]<<z,z+=8}Q.lens[F[Q.have++]]=j&7,j>>>=3,z-=3}while(Q.have<19)Q.lens[F[Q.have++]]=0;if(Q.lencode=Q.lendyn,Q.lenbits=7,f={bits:Q.lenbits},T=f1(SX,Q.lens,0,19,Q.lencode,0,Q.work,f),Q.lenbits=f.bits,T){$.msg="invalid code lengths set",Q.mode=w0;break}Q.have=0,Q.mode=r5;case r5:while(Q.have<Q.nlen+Q.ndist){for(;;){if(g=Q.lencode[j&(1<<Q.lenbits)-1],y=g>>>24,Z=g>>>16&255,O=g&65535,y<=z)break;if(J===0)break $;J--,j+=q[G++]<<z,z+=8}if(O<16)j>>>=y,z-=y,Q.lens[Q.have++]=O;else{if(O===16){b=y+2;while(z<b){if(J===0)break $;J--,j+=q[G++]<<z,z+=8}if(j>>>=y,z-=y,Q.have===0){$.msg="invalid bit length repeat",Q.mode=w0;break}L=Q.lens[Q.have-1],A=3+(j&3),j>>>=2,z-=2}else if(O===17){b=y+3;while(z<b){if(J===0)break $;J--,j+=q[G++]<<z,z+=8}j>>>=y,z-=y,L=0,A=3+(j&7),j>>>=3,z-=3}else{b=y+7;while(z<b){if(J===0)break $;J--,j+=q[G++]<<z,z+=8}j>>>=y,z-=y,L=0,A=11+(j&127),j>>>=7,z-=7}if(Q.have+A>Q.nlen+Q.ndist){$.msg="invalid bit length repeat",Q.mode=w0;break}while(A--)Q.lens[Q.have++]=L}}if(Q.mode===w0)break;if(Q.lens[256]===0){$.msg="invalid code -- missing end-of-block",Q.mode=w0;break}if(Q.lenbits=9,f={bits:Q.lenbits},T=f1(K9,Q.lens,0,Q.nlen,Q.lencode,0,Q.work,f),Q.lenbits=f.bits,T){$.msg="invalid literal/lengths set",Q.mode=w0;break}if(Q.distbits=6,Q.distcode=Q.distdyn,f={bits:Q.distbits},T=f1(J9,Q.lens,Q.nlen,Q.ndist,Q.distcode,0,Q.work,f),Q.distbits=f.bits,T){$.msg="invalid distances set",Q.mode=w0;break}if(Q.mode=L2,V===M2)break $;case L2:Q.mode=O2;case O2:if(J>=6&&P>=258){if($.next_out=W,$.avail_out=P,$.next_in=G,$.avail_in=J,Q.hold=j,Q.bits=z,TX($,N),W=$.next_out,K=$.output,P=$.avail_out,G=$.next_in,q=$.input,J=$.avail_in,j=Q.hold,z=Q.bits,Q.mode===P6)Q.back=-1;break}Q.back=0;for(;;){if(g=Q.lencode[j&(1<<Q.lenbits)-1],y=g>>>24,Z=g>>>16&255,O=g&65535,y<=z)break;if(J===0)break $;J--,j+=q[G++]<<z,z+=8}if(Z&&(Z&240)===0){M=y,R=Z,C=O;for(;;){if(g=Q.lencode[C+((j&(1<<M+R)-1)>>M)],y=g>>>24,Z=g>>>16&255,O=g&65535,M+y<=z)break;if(J===0)break $;J--,j+=q[G++]<<z,z+=8}j>>>=M,z-=M,Q.back+=M}if(j>>>=y,z-=y,Q.back+=y,Q.length=O,Z===0){Q.mode=Q9;break}if(Z&32){Q.back=-1,Q.mode=P6;break}if(Z&64){$.msg="invalid literal/length code",Q.mode=w0;break}Q.extra=Z&15,Q.mode=s5;case s5:if(Q.extra){b=Q.extra;while(z<b){if(J===0)break $;J--,j+=q[G++]<<z,z+=8}Q.length+=j&(1<<Q.extra)-1,j>>>=Q.extra,z-=Q.extra,Q.back+=Q.extra}Q.was=Q.length,Q.mode=t5;case t5:for(;;){if(g=Q.distcode[j&(1<<Q.distbits)-1],y=g>>>24,Z=g>>>16&255,O=g&65535,y<=z)break;if(J===0)break $;J--,j+=q[G++]<<z,z+=8}if((Z&240)===0){M=y,R=Z,C=O;for(;;){if(g=Q.distcode[C+((j&(1<<M+R)-1)>>M)],y=g>>>24,Z=g>>>16&255,O=g&65535,M+y<=z)break;if(J===0)break $;J--,j+=q[G++]<<z,z+=8}j>>>=M,z-=M,Q.back+=M}if(j>>>=y,z-=y,Q.back+=y,Z&64){$.msg="invalid distance code",Q.mode=w0;break}Q.offset=O,Q.extra=Z&15,Q.mode=e5;case e5:if(Q.extra){b=Q.extra;while(z<b){if(J===0)break $;J--,j+=q[G++]<<z,z+=8}Q.offset+=j&(1<<Q.extra)-1,j>>>=Q.extra,z-=Q.extra,Q.back+=Q.extra}if(Q.offset>Q.dmax){$.msg="invalid distance too far back",Q.mode=w0;break}Q.mode=$9;case $9:if(P===0)break $;if(A=N-P,Q.offset>A){if(A=Q.offset-A,A>Q.whave){if(Q.sane){$.msg="invalid distance too far back",Q.mode=w0;break}}if(A>Q.wnext)A-=Q.wnext,x=Q.wsize-A;else x=Q.wnext-A;if(A>Q.length)A=Q.length;k=Q.window}else k=K,x=W-Q.offset,A=Q.length;if(A>P)A=P;P-=A,Q.length-=A;do K[W++]=k[x++];while(--A);if(Q.length===0)Q.mode=O2;break;case Q9:if(P===0)break $;K[W++]=Q.length,P--,Q.mode=O2;break;case e8:if(Q.wrap){while(z<32){if(J===0)break $;J--,j|=q[G++]<<z,z+=8}if(N-=P,$.total_out+=N,Q.total+=N,N)$.adler=Q.check=Q.flags?Q6(Q.check,K,N,W-N):V$(Q.check,K,N,W-N);if(N=P,(Q.flags?j:X9(j))!==Q.check){$.msg="incorrect data check",Q.mode=w0;break}j=0,z=0}Q.mode=V9;case V9:if(Q.wrap&&Q.flags){while(z<32){if(J===0)break $;J--,j+=q[G++]<<z,z+=8}if(j!==(Q.total&4294967295)){$.msg="incorrect length check",Q.mode=w0;break}j=0,z=0}Q.mode=q9;case q9:T=gX;break $;case w0:T=G9;break $;case X$:return q$;case bX:default:return u0}if($.next_out=W,$.avail_out=P,$.next_in=G,$.avail_in=J,Q.hold=j,Q.bits=z,Q.wsize||N!==$.avail_out&&Q.mode<w0&&(Q.mode<e8||V!==y5)){if(Z9($,$.output,$.next_out,N-$.avail_out))return Q.mode=X$,q$}if(I-=$.avail_in,N-=$.avail_out,$.total_in+=I,$.total_out+=N,Q.total+=N,Q.wrap&&N)$.adler=Q.check=Q.flags?Q6(Q.check,K,N,$.next_out-N):V$(Q.check,K,N,$.next_out-N);if($.data_type=Q.bits+(Q.last?64:0)+(Q.mode===P6?128:0)+(Q.mode===L2||Q.mode===t8?256:0),(I===0&&N===0||V===y5)&&T===l6)T=yX;return T}function lX($){if(!$||!$.state)return u0;var V=$.state;if(V.window)V.window=null;return $.state=null,l6}function oX($,V){var Q;if(!$||!$.state)return u0;if(Q=$.state,(Q.wrap&2)===0)return u0;return Q.head=V,V.done=!1,l6}function iX($,V){var Q=V.length,q,K,G;if(!$||!$.state)return u0;if(q=$.state,q.wrap!==0&&q.mode!==C2)return u0;if(q.mode===C2){if(K=1,K=V$(K,V,Q,0),K!==q.check)return G9}if(G=Z9($,V,Q,Q),G)return q.mode=X$,q$;return q.havedict=1,l6}nX.inflateReset=j9;nX.inflateReset2=P9;nX.inflateResetKeep=W9;nX.inflateInit=cX;nX.inflateInit2=z9;nX.inflate=dX;nX.inflateEnd=lX;nX.inflateGetHeader=oX;nX.inflateSetDictionary=iX;nX.inflateInfo="pako inflate (from Nodeca project)"});var Y$=$0((hK,H9)=>{H9.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}});var L9=$0((_K,M9)=>{function Y4(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}M9.exports=Y4});var C9=$0((U4)=>{var W1=F9(),h1=U6(),B2=d8(),R0=Y$(),K$=G2(),K4=l8(),J4=L9(),O9=Object.prototype.toString;function o6($){if(!(this instanceof o6))return new o6($);this.options=h1.assign({chunkSize:16384,windowBits:0,to:""},$||{});var V=this.options;if(V.raw&&V.windowBits>=0&&V.windowBits<16){if(V.windowBits=-V.windowBits,V.windowBits===0)V.windowBits=-15}if(V.windowBits>=0&&V.windowBits<16&&!($&&$.windowBits))V.windowBits+=32;if(V.windowBits>15&&V.windowBits<48){if((V.windowBits&15)===0)V.windowBits|=15}this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new K4,this.strm.avail_out=0;var Q=W1.inflateInit2(this.strm,V.windowBits);if(Q!==R0.Z_OK)throw new Error(K$[Q]);if(this.header=new J4,W1.inflateGetHeader(this.strm,this.header),V.dictionary){if(typeof V.dictionary==="string")V.dictionary=B2.string2buf(V.dictionary);else if(O9.call(V.dictionary)==="[object ArrayBuffer]")V.dictionary=new Uint8Array(V.dictionary);if(V.raw){if(Q=W1.inflateSetDictionary(this.strm,V.dictionary),Q!==R0.Z_OK)throw new Error(K$[Q])}}}o6.prototype.push=function($,V){var Q=this.strm,q=this.options.chunkSize,K=this.options.dictionary,G,W,J,P,j,z=!1;if(this.ended)return!1;if(W=V===~~V?V:V===!0?R0.Z_FINISH:R0.Z_NO_FLUSH,typeof $==="string")Q.input=B2.binstring2buf($);else if(O9.call($)==="[object ArrayBuffer]")Q.input=new Uint8Array($);else Q.input=$;Q.next_in=0,Q.avail_in=Q.input.length;do{if(Q.avail_out===0)Q.output=new h1.Buf8(q),Q.next_out=0,Q.avail_out=q;if(G=W1.inflate(Q,R0.Z_NO_FLUSH),G===R0.Z_NEED_DICT&&K)G=W1.inflateSetDictionary(this.strm,K);if(G===R0.Z_BUF_ERROR&&z===!0)G=R0.Z_OK,z=!1;if(G!==R0.Z_STREAM_END&&G!==R0.Z_OK)return this.onEnd(G),this.ended=!0,!1;if(Q.next_out){if(Q.avail_out===0||G===R0.Z_STREAM_END||Q.avail_in===0&&(W===R0.Z_FINISH||W===R0.Z_SYNC_FLUSH))if(this.options.to==="string"){if(J=B2.utf8border(Q.output,Q.next_out),P=Q.next_out-J,j=B2.buf2string(Q.output,J),Q.next_out=P,Q.avail_out=q-P,P)h1.arraySet(Q.output,Q.output,J,P,0);this.onData(j)}else this.onData(h1.shrinkBuf(Q.output,Q.next_out))}if(Q.avail_in===0&&Q.avail_out===0)z=!0}while((Q.avail_in>0||Q.avail_out===0)&&G!==R0.Z_STREAM_END);if(G===R0.Z_STREAM_END)W=R0.Z_FINISH;if(W===R0.Z_FINISH)return G=W1.inflateEnd(this.strm),this.onEnd(G),this.ended=!0,G===R0.Z_OK;if(W===R0.Z_SYNC_FLUSH)return this.onEnd(R0.Z_OK),Q.avail_out=0,!0;return!0};o6.prototype.onData=function($){this.chunks.push($)};o6.prototype.onEnd=function($){if($===R0.Z_OK)if(this.options.to==="string")this.result=this.chunks.join("");else this.result=h1.flattenChunks(this.chunks);this.chunks=[],this.err=$,this.msg=this.strm.msg};function J$($,V){var Q=new o6(V);if(Q.push($,!0),Q.err)throw Q.msg||K$[Q.err];return Q.result}function G4($,V){return V=V||{},V.raw=!0,J$($,V)}U4.Inflate=o6;U4.inflate=J$;U4.inflateRaw=G4;U4.ungzip=J$});var w9=$0((pK,I9)=>{var Z4=U6().assign,F4=N5(),H4=C9(),M4=Y$(),B9={};Z4(B9,F4,H4,M4);I9.exports=B9});var N9=$0((B4)=>{var L4=typeof Uint8Array!=="undefined"&&typeof Uint16Array!=="undefined"&&typeof Uint32Array!=="undefined",O4=w9(),D9=N0(),I2=_0(),C4=L4?"uint8array":"array";B4.magic="\b\x00";function i6($,V){I2.call(this,"FlateWorker/"+$),this._pako=null,this._pakoAction=$,this._pakoOptions=V,this.meta={}}D9.inherits(i6,I2);i6.prototype.processChunk=function($){if(this.meta=$.meta,this._pako===null)this._createPako();this._pako.push(D9.transformTo(C4,$.data),!1)};i6.prototype.flush=function(){if(I2.prototype.flush.call(this),this._pako===null)this._createPako();this._pako.push([],!0)};i6.prototype.cleanUp=function(){I2.prototype.cleanUp.call(this),this._pako=null};i6.prototype._createPako=function(){this._pako=new O4[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var $=this;this._pako.onData=function(V){$.push({data:V,meta:$.meta})}};B4.compressWorker=function($){return new i6("Deflate",$)};B4.uncompressWorker=function(){return new i6("Inflate",{})}});var G$=$0((N4)=>{var v9=_0();N4.STORE={magic:"\x00\x00",compressWorker:function(){return new v9("STORE compression")},uncompressWorker:function(){return new v9("STORE decompression")}};N4.DEFLATE=N9()});var U$=$0((A4)=>{A4.LOCAL_FILE_HEADER="PK\x03\x04";A4.CENTRAL_FILE_HEADER="PK\x01\x02";A4.CENTRAL_DIRECTORY_END="PK\x05\x06";A4.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x06\x07";A4.ZIP64_CENTRAL_DIRECTORY_END="PK\x06\x06";A4.DATA_DESCRIPTOR="PK\x07\b"});var T9=$0((lK,x9)=>{var j1=N0(),P1=_0(),W$=Q1(),R9=q2(),w2=U$(),C0=function($,V){var Q="",q;for(q=0;q<V;q++)Q+=String.fromCharCode($&255),$=$>>>8;return Q},y4=function($,V){var Q=$;if(!$)Q=V?16893:33204;return(Q&65535)<<16},b4=function($){return($||0)&63},A9=function($,V,Q,q,K,G){var{file:W,compression:J}=$,P=G!==W$.utf8encode,j=j1.transformTo("string",G(W.name)),z=j1.transformTo("string",W$.utf8encode(W.name)),I=W.comment,N=j1.transformTo("string",G(I)),A=j1.transformTo("string",W$.utf8encode(I)),x=z.length!==W.name.length,k=A.length!==I.length,g,y,Z="",O="",M="",R=W.dir,C=W.date,L={crc32:0,compressedSize:0,uncompressedSize:0};if(!V||Q)L.crc32=$.crc32,L.compressedSize=$.compressedSize,L.uncompressedSize=$.uncompressedSize;var T=0;if(V)T|=8;if(!P&&(x||k))T|=2048;var E=0,f=0;if(R)E|=16;if(K==="UNIX")f=798,E|=y4(W.unixPermissions,R);else f=20,E|=b4(W.dosPermissions,R);if(g=C.getUTCHours(),g=g<<6,g=g|C.getUTCMinutes(),g=g<<5,g=g|C.getUTCSeconds()/2,y=C.getUTCFullYear()-1980,y=y<<4,y=y|C.getUTCMonth()+1,y=y<<5,y=y|C.getUTCDate(),x)O=C0(1,1)+C0(R9(j),4)+z,Z+="up"+C0(O.length,2)+O;if(k)M=C0(1,1)+C0(R9(N),4)+A,Z+="uc"+C0(M.length,2)+M;var b="";b+=`
8
+ \x00`,b+=C0(T,2),b+=J.magic,b+=C0(g,2),b+=C0(y,2),b+=C0(L.crc32,4),b+=C0(L.compressedSize,4),b+=C0(L.uncompressedSize,4),b+=C0(j.length,2),b+=C0(Z.length,2);var F=w2.LOCAL_FILE_HEADER+b+j+Z,m=w2.CENTRAL_FILE_HEADER+C0(f,2)+b+C0(N.length,2)+"\x00\x00\x00\x00"+C0(E,4)+C0(q,4)+j+Z+N;return{fileRecord:F,dirRecord:m}},f4=function($,V,Q,q,K){var G="",W=j1.transformTo("string",K(q));return G=w2.CENTRAL_DIRECTORY_END+"\x00\x00\x00\x00"+C0($,2)+C0($,2)+C0(V,4)+C0(Q,4)+C0(W.length,2)+W,G},h4=function($){var V="";return V=w2.DATA_DESCRIPTOR+C0($.crc32,4)+C0($.compressedSize,4)+C0($.uncompressedSize,4),V};function i0($,V,Q,q){P1.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=V,this.zipPlatform=Q,this.encodeFileName=q,this.streamFiles=$,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}j1.inherits(i0,P1);i0.prototype.push=function($){var V=$.meta.percent||0,Q=this.entriesCount,q=this._sources.length;if(this.accumulate)this.contentBuffer.push($);else this.bytesWritten+=$.data.length,P1.prototype.push.call(this,{data:$.data,meta:{currentFile:this.currentFile,percent:Q?(V+100*(Q-q-1))/Q:100}})};i0.prototype.openedSource=function($){this.currentSourceOffset=this.bytesWritten,this.currentFile=$.file.name;var V=this.streamFiles&&!$.file.dir;if(V){var Q=A9($,V,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:Q.fileRecord,meta:{percent:0}})}else this.accumulate=!0};i0.prototype.closedSource=function($){this.accumulate=!1;var V=this.streamFiles&&!$.file.dir,Q=A9($,V,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(Q.dirRecord),V)this.push({data:h4($),meta:{percent:100}});else{this.push({data:Q.fileRecord,meta:{percent:0}});while(this.contentBuffer.length)this.push(this.contentBuffer.shift())}this.currentFile=null};i0.prototype.flush=function(){var $=this.bytesWritten;for(var V=0;V<this.dirRecords.length;V++)this.push({data:this.dirRecords[V],meta:{percent:100}});var Q=this.bytesWritten-$,q=f4(this.dirRecords.length,Q,$,this.zipComment,this.encodeFileName);this.push({data:q,meta:{percent:100}})};i0.prototype.prepareNextSource=function(){if(this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused)this.previous.pause();else this.previous.resume()};i0.prototype.registerPrevious=function($){this._sources.push($);var V=this;return $.on("data",function(Q){V.processChunk(Q)}),$.on("end",function(){if(V.closedSource(V.previous.streamInfo),V._sources.length)V.prepareNextSource();else V.end()}),$.on("error",function(Q){V.error(Q)}),this};i0.prototype.resume=function(){if(!P1.prototype.resume.call(this))return!1;if(!this.previous&&this._sources.length)return this.prepareNextSource(),!0;if(!this.previous&&!this._sources.length&&!this.generatedError)return this.end(),!0};i0.prototype.error=function($){var V=this._sources;if(!P1.prototype.error.call(this,$))return!1;for(var Q=0;Q<V.length;Q++)try{V[Q].error($)}catch(q){}return!0};i0.prototype.lock=function(){P1.prototype.lock.call(this);var $=this._sources;for(var V=0;V<$.length;V++)$[V].lock()};x9.exports=i0});var S9=$0((c4)=>{var _4=G$(),m4=T9(),p4=function($,V){var Q=$||V,q=_4[Q];if(!q)throw new Error(Q+" is not a valid compression method !");return q};c4.generateWorker=function($,V,Q){var q=new m4(V.streamFiles,Q,V.platform,V.encodeFileName),K=0;try{$.forEach(function(G,W){K++;var J=p4(W.options.compression,V.compression),P=W.options.compressionOptions||V.compressionOptions||{},j=W.dir,z=W.date;W._compressWorker(J,P).withStreamInfo("file",{name:G,dir:j,date:z,comment:W.comment||"",unixPermissions:W.unixPermissions,dosPermissions:W.dosPermissions}).pipe(q)}),q.entriesCount=K}catch(G){q.error(G)}return q}});var g9=$0((iK,k9)=>{var d4=N0(),D2=_0();function _1($,V){D2.call(this,"Nodejs stream input adapter for "+$),this._upstreamEnded=!1,this._bindStream(V)}d4.inherits(_1,D2);_1.prototype._bindStream=function($){var V=this;this._stream=$,$.pause(),$.on("data",function(Q){V.push({data:Q,meta:{percent:0}})}).on("error",function(Q){if(V.isPaused)this.generatedError=Q;else V.error(Q)}).on("end",function(){if(V.isPaused)V._upstreamEnded=!0;else V.end()})};_1.prototype.pause=function(){if(!D2.prototype.pause.call(this))return!1;return this._stream.pause(),!0};_1.prototype.resume=function(){if(!D2.prototype.resume.call(this))return!1;if(this._upstreamEnded)this.end();else this._stream.resume();return!0};k9.exports=_1});var u9=$0((nK,c9)=>{var l4=Q1(),m1=N0(),f9=_0(),o4=Z8(),h9=F8(),E9=X2(),i4=yQ(),n4=S9(),y9=L1(),a4=g9(),_9=function($,V,Q){var q=m1.getTypeOf(V),K,G=m1.extend(Q||{},h9);if(G.date=G.date||new Date,G.compression!==null)G.compression=G.compression.toUpperCase();if(typeof G.unixPermissions==="string")G.unixPermissions=parseInt(G.unixPermissions,8);if(G.unixPermissions&&G.unixPermissions&16384)G.dir=!0;if(G.dosPermissions&&G.dosPermissions&16)G.dir=!0;if(G.dir)$=m9($);if(G.createFolders&&(K=r4($)))p9.call(this,K,!0);var W=q==="string"&&G.binary===!1&&G.base64===!1;if(!Q||typeof Q.binary==="undefined")G.binary=!W;var J=V instanceof E9&&V.uncompressedSize===0;if(J||G.dir||!V||V.length===0)G.base64=!1,G.binary=!0,V="",G.compression="STORE",q="string";var P=null;if(V instanceof E9||V instanceof f9)P=V;else if(y9.isNode&&y9.isStream(V))P=new a4($,V);else P=m1.prepareContent($,V,G.binary,G.optimizedBinaryString,G.base64);var j=new i4($,P,G);this.files[$]=j},r4=function($){if($.slice(-1)==="/")$=$.substring(0,$.length-1);var V=$.lastIndexOf("/");return V>0?$.substring(0,V):""},m9=function($){if($.slice(-1)!=="/")$+="/";return $},p9=function($,V){if(V=typeof V!=="undefined"?V:h9.createFolders,$=m9($),!this.files[$])_9.call(this,$,null,{dir:!0,createFolders:V});return this.files[$]};function b9($){return Object.prototype.toString.call($)==="[object RegExp]"}var s4={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function($){var V,Q,q;for(V in this.files)if(q=this.files[V],Q=V.slice(this.root.length,V.length),Q&&V.slice(0,this.root.length)===this.root)$(Q,q)},filter:function($){var V=[];return this.forEach(function(Q,q){if($(Q,q))V.push(q)}),V},file:function($,V,Q){if(arguments.length===1)if(b9($)){var q=$;return this.filter(function(G,W){return!W.dir&&q.test(G)})}else{var K=this.files[this.root+$];if(K&&!K.dir)return K;else return null}else $=this.root+$,_9.call(this,$,V,Q);return this},folder:function($){if(!$)return this;if(b9($))return this.filter(function(K,G){return G.dir&&$.test(K)});var V=this.root+$,Q=p9.call(this,V),q=this.clone();return q.root=Q.name,q},remove:function($){$=this.root+$;var V=this.files[$];if(!V){if($.slice(-1)!=="/")$+="/";V=this.files[$]}if(V&&!V.dir)delete this.files[$];else{var Q=this.filter(function(K,G){return G.name.slice(0,$.length)===$});for(var q=0;q<Q.length;q++)delete this.files[Q[q].name]}return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function($){var V,Q={};try{if(Q=m1.extend($||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:l4.utf8encode}),Q.type=Q.type.toLowerCase(),Q.compression=Q.compression.toUpperCase(),Q.type==="binarystring")Q.type="string";if(!Q.type)throw new Error("No output type specified.");if(m1.checkSupport(Q.type),Q.platform==="darwin"||Q.platform==="freebsd"||Q.platform==="linux"||Q.platform==="sunos")Q.platform="UNIX";if(Q.platform==="win32")Q.platform="DOS";var q=Q.comment||this.comment||"";V=n4.generateWorker(this,Q,q)}catch(K){V=new f9("error"),V.error(K)}return new o4(V,Q.type||"string",Q.mimeType)},generateAsync:function($,V){return this.generateInternalStream($).accumulate(V)},generateNodeStream:function($,V){if($=$||{},!$.type)$.type="nodebuffer";return this.generateInternalStream($).toNodejsStream(V)}};c9.exports=s4});var j$=$0((aK,l9)=>{var t4=N0();function d9($){this.data=$,this.length=$.length,this.index=0,this.zero=0}d9.prototype={checkOffset:function($){this.checkIndex(this.index+$)},checkIndex:function($){if(this.length<this.zero+$||$<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+$+"). Corrupted zip ?")},setIndex:function($){this.checkIndex($),this.index=$},skip:function($){this.setIndex(this.index+$)},byteAt:function(){},readInt:function($){var V=0,Q;this.checkOffset($);for(Q=this.index+$-1;Q>=this.index;Q--)V=(V<<8)+this.byteAt(Q);return this.index+=$,V},readString:function($){return t4.transformTo("string",this.readData($))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var $=this.readInt(4);return new Date(Date.UTC(($>>25&127)+1980,($>>21&15)-1,$>>16&31,$>>11&31,$>>5&63,($&31)<<1))}};l9.exports=d9});var P$=$0((rK,i9)=>{var o9=j$(),e4=N0();function z1($){o9.call(this,$);for(var V=0;V<this.data.length;V++)$[V]=$[V]&255}e4.inherits(z1,o9);z1.prototype.byteAt=function($){return this.data[this.zero+$]};z1.prototype.lastIndexOfSignature=function($){var V=$.charCodeAt(0),Q=$.charCodeAt(1),q=$.charCodeAt(2),K=$.charCodeAt(3);for(var G=this.length-4;G>=0;--G)if(this.data[G]===V&&this.data[G+1]===Q&&this.data[G+2]===q&&this.data[G+3]===K)return G-this.zero;return-1};z1.prototype.readAndCheckSignature=function($){var V=$.charCodeAt(0),Q=$.charCodeAt(1),q=$.charCodeAt(2),K=$.charCodeAt(3),G=this.readData(4);return V===G[0]&&Q===G[1]&&q===G[2]&&K===G[3]};z1.prototype.readData=function($){if(this.checkOffset($),$===0)return[];var V=this.data.slice(this.zero+this.index,this.zero+this.index+$);return this.index+=$,V};i9.exports=z1});var r9=$0((sK,a9)=>{var n9=j$(),$Y=N0();function Z1($){n9.call(this,$)}$Y.inherits(Z1,n9);Z1.prototype.byteAt=function($){return this.data.charCodeAt(this.zero+$)};Z1.prototype.lastIndexOfSignature=function($){return this.data.lastIndexOf($)-this.zero};Z1.prototype.readAndCheckSignature=function($){var V=this.readData(4);return $===V};Z1.prototype.readData=function($){this.checkOffset($);var V=this.data.slice(this.zero+this.index,this.zero+this.index+$);return this.index+=$,V};a9.exports=Z1});var Z$=$0((tK,t9)=>{var s9=P$(),QY=N0();function z$($){s9.call(this,$)}QY.inherits(z$,s9);z$.prototype.readData=function($){if(this.checkOffset($),$===0)return new Uint8Array(0);var V=this.data.subarray(this.zero+this.index,this.zero+this.index+$);return this.index+=$,V};t9.exports=z$});var QV=$0((eK,$V)=>{var e9=Z$(),VY=N0();function F$($){e9.call(this,$)}VY.inherits(F$,e9);F$.prototype.readData=function($){this.checkOffset($);var V=this.data.slice(this.zero+this.index,this.zero+this.index+$);return this.index+=$,V};$V.exports=F$});var H$=$0(($J,qV)=>{var N2=N0(),VV=J6(),qY=P$(),XY=r9(),YY=QV(),KY=Z$();qV.exports=function($){var V=N2.getTypeOf($);if(N2.checkSupport(V),V==="string"&&!VV.uint8array)return new XY($);if(V==="nodebuffer")return new YY($);if(VV.uint8array)return new KY(N2.transformTo("uint8array",$));return new qY(N2.transformTo("array",$))}});var JV=$0((QJ,KV)=>{var M$=H$(),v6=N0(),JY=X2(),XV=q2(),v2=Q1(),R2=G$(),GY=J6(),UY=0,WY=3,jY=function($){for(var V in R2){if(!Object.prototype.hasOwnProperty.call(R2,V))continue;if(R2[V].magic===$)return R2[V]}return null};function YV($,V){this.options=$,this.loadOptions=V}YV.prototype={isEncrypted:function(){return(this.bitFlag&1)===1},useUTF8:function(){return(this.bitFlag&2048)===2048},readLocalPart:function($){var V,Q;if($.skip(22),this.fileNameLength=$.readInt(2),Q=$.readInt(2),this.fileName=$.readData(this.fileNameLength),$.skip(Q),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(V=jY(this.compressionMethod),V===null)throw new Error("Corrupted zip : compression "+v6.pretty(this.compressionMethod)+" unknown (inner file : "+v6.transformTo("string",this.fileName)+")");this.decompressed=new JY(this.compressedSize,this.uncompressedSize,this.crc32,V,$.readData(this.compressedSize))},readCentralPart:function($){this.versionMadeBy=$.readInt(2),$.skip(2),this.bitFlag=$.readInt(2),this.compressionMethod=$.readString(2),this.date=$.readDate(),this.crc32=$.readInt(4),this.compressedSize=$.readInt(4),this.uncompressedSize=$.readInt(4);var V=$.readInt(2);if(this.extraFieldsLength=$.readInt(2),this.fileCommentLength=$.readInt(2),this.diskNumberStart=$.readInt(2),this.internalFileAttributes=$.readInt(2),this.externalFileAttributes=$.readInt(4),this.localHeaderOffset=$.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");$.skip(V),this.readExtraFields($),this.parseZIP64ExtraField($),this.fileComment=$.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var $=this.versionMadeBy>>8;if(this.dir=this.externalFileAttributes&16?!0:!1,$===UY)this.dosPermissions=this.externalFileAttributes&63;if($===WY)this.unixPermissions=this.externalFileAttributes>>16&65535;if(!this.dir&&this.fileNameStr.slice(-1)==="/")this.dir=!0},parseZIP64ExtraField:function(){if(!this.extraFields[1])return;var $=M$(this.extraFields[1].value);if(this.uncompressedSize===v6.MAX_VALUE_32BITS)this.uncompressedSize=$.readInt(8);if(this.compressedSize===v6.MAX_VALUE_32BITS)this.compressedSize=$.readInt(8);if(this.localHeaderOffset===v6.MAX_VALUE_32BITS)this.localHeaderOffset=$.readInt(8);if(this.diskNumberStart===v6.MAX_VALUE_32BITS)this.diskNumberStart=$.readInt(4)},readExtraFields:function($){var V=$.index+this.extraFieldsLength,Q,q,K;if(!this.extraFields)this.extraFields={};while($.index+4<V)Q=$.readInt(2),q=$.readInt(2),K=$.readData(q),this.extraFields[Q]={id:Q,length:q,value:K};$.setIndex(V)},handleUTF8:function(){var $=GY.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=v2.utf8decode(this.fileName),this.fileCommentStr=v2.utf8decode(this.fileComment);else{var V=this.findExtraFieldUnicodePath();if(V!==null)this.fileNameStr=V;else{var Q=v6.transformTo($,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(Q)}var q=this.findExtraFieldUnicodeComment();if(q!==null)this.fileCommentStr=q;else{var K=v6.transformTo($,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(K)}}},findExtraFieldUnicodePath:function(){var $=this.extraFields[28789];if($){var V=M$($.value);if(V.readInt(1)!==1)return null;if(XV(this.fileName)!==V.readInt(4))return null;return v2.utf8decode(V.readData($.length-5))}return null},findExtraFieldUnicodeComment:function(){var $=this.extraFields[25461];if($){var V=M$($.value);if(V.readInt(1)!==1)return null;if(XV(this.fileComment)!==V.readInt(4))return null;return v2.utf8decode(V.readData($.length-5))}return null}};KV.exports=YV});var WV=$0((VJ,UV)=>{var PY=H$(),z6=N0(),n0=U$(),zY=JV(),ZY=J6();function GV($){this.files=[],this.loadOptions=$}GV.prototype={checkSignature:function($){if(!this.reader.readAndCheckSignature($)){this.reader.index-=4;var V=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+z6.pretty(V)+", expected "+z6.pretty($)+")")}},isSignature:function($,V){var Q=this.reader.index;this.reader.setIndex($);var q=this.reader.readString(4),K=q===V;return this.reader.setIndex(Q),K},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var $=this.reader.readData(this.zipCommentLength),V=ZY.uint8array?"uint8array":"array",Q=z6.transformTo(V,$);this.zipComment=this.loadOptions.decodeFileName(Q)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};var $=this.zip64EndOfCentralSize-44,V=0,Q,q,K;while(V<$)Q=this.reader.readInt(2),q=this.reader.readInt(4),K=this.reader.readData(q),this.zip64ExtensibleData[Q]={id:Q,length:q,value:K}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),this.disksCount>1)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var $,V;for($=0;$<this.files.length;$++)V=this.files[$],this.reader.setIndex(V.localHeaderOffset),this.checkSignature(n0.LOCAL_FILE_HEADER),V.readLocalPart(this.reader),V.handleUTF8(),V.processAttributes()},readCentralDir:function(){var $;this.reader.setIndex(this.centralDirOffset);while(this.reader.readAndCheckSignature(n0.CENTRAL_FILE_HEADER))$=new zY({zip64:this.zip64},this.loadOptions),$.readCentralPart(this.reader),this.files.push($);if(this.centralDirRecords!==this.files.length){if(this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)}},readEndOfCentral:function(){var $=this.reader.lastIndexOfSignature(n0.CENTRAL_DIRECTORY_END);if($<0){var V=!this.isSignature(0,n0.LOCAL_FILE_HEADER);if(V)throw new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");else throw new Error("Corrupted zip: can't find end of central directory")}this.reader.setIndex($);var Q=$;if(this.checkSignature(n0.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===z6.MAX_VALUE_16BITS||this.diskWithCentralDirStart===z6.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===z6.MAX_VALUE_16BITS||this.centralDirRecords===z6.MAX_VALUE_16BITS||this.centralDirSize===z6.MAX_VALUE_32BITS||this.centralDirOffset===z6.MAX_VALUE_32BITS){if(this.zip64=!0,$=this.reader.lastIndexOfSignature(n0.ZIP64_CENTRAL_DIRECTORY_LOCATOR),$<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex($),this.checkSignature(n0.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,n0.ZIP64_CENTRAL_DIRECTORY_END)){if(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(n0.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory")}this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(n0.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var q=this.centralDirOffset+this.centralDirSize;if(this.zip64)q+=20,q+=12+this.zip64EndOfCentralSize;var K=Q-q;if(K>0)if(this.isSignature(Q,n0.CENTRAL_FILE_HEADER));else this.reader.zero=K;else if(K<0)throw new Error("Corrupted zip: missing "+Math.abs(K)+" bytes.")},prepareReader:function($){this.reader=PY($)},load:function($){this.prepareReader($),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}};UV.exports=GV});var zV=$0((qJ,PV)=>{var L$=N0(),A2=t6(),FY=Q1(),HY=WV(),MY=L8(),jV=L1();function LY($){return new A2.Promise(function(V,Q){var q=$.decompressed.getContentWorker().pipe(new MY);q.on("error",function(K){Q(K)}).on("end",function(){if(q.streamInfo.crc32!==$.decompressed.crc32)Q(new Error("Corrupted zip : CRC32 mismatch"));else V()}).resume()})}PV.exports=function($,V){var Q=this;if(V=L$.extend(V||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:FY.utf8decode}),jV.isNode&&jV.isStream($))return A2.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file."));return L$.prepareContent("the loaded zip file",$,!0,V.optimizedBinaryString,V.base64).then(function(q){var K=new HY(V);return K.load(q),K}).then(function q(K){var G=[A2.Promise.resolve(K)],W=K.files;if(V.checkCRC32)for(var J=0;J<W.length;J++)G.push(LY(W[J]));return A2.Promise.all(G)}).then(function q(K){var G=K.shift(),W=G.files;for(var J=0;J<W.length;J++){var P=W[J],j=P.fileNameStr,z=L$.resolve(P.fileNameStr);if(Q.file(z,P.decompressed,{binary:!0,optimizedBinaryString:!0,date:P.date,dir:P.dir,comment:P.fileCommentStr.length?P.fileCommentStr:null,unixPermissions:P.unixPermissions,dosPermissions:P.dosPermissions,createFolders:V.createFolders}),!P.dir)Q.file(z).unsafeOriginalName=j}if(G.zipComment.length)Q.comment=G.zipComment;return Q})}});var FV=$0((XJ,ZV)=>{function d0(){if(!(this instanceof d0))return new d0;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var $=new d0;for(var V in this)if(typeof this[V]!=="function")$[V]=this[V];return $}}d0.prototype=u9();d0.prototype.loadAsync=zV();d0.support=J6();d0.defaults=F8();d0.version="3.10.1";d0.loadAsync=function($,V){return new d0().loadAsync($,V)};d0.external=t6();ZV.exports=d0});var u1=eV;var r0=[],p2=[];var m2="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(k6=0,S$=m2.length;k6<S$;++k6)r0[k6]=m2[k6],p2[m2.charCodeAt(k6)]=k6;var k6,S$;p2[45]=62;p2[95]=63;function sV($){return r0[$>>18&63]+r0[$>>12&63]+r0[$>>6&63]+r0[$&63]}function tV($,V,Q){var q,K=[];for(var G=V;G<Q;G+=3)q=($[G]<<16&16711680)+($[G+1]<<8&65280)+($[G+2]&255),K.push(sV(q));return K.join("")}function eV($){var V,Q=$.length,q=Q%3,K=[],G=16383;for(var W=0,J=Q-q;W<J;W+=G)K.push(tV($,W,W+G>J?J:W+G));if(q===1)V=$[Q-1],K.push(r0[V>>2]+r0[V<<4&63]+"==");else if(q===2)V=($[Q-2]<<8)+$[Q-1],K.push(r0[V>>10]+r0[V>>4&63]+r0[V<<2&63]+"=");return K.join("")}var mV=x$(g$(),1),pV=x$(FV(),1);var OY=/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(\.\d+)?([zZ]|((\+|-)(\d{2}):(\d{2})))$/;function CY($){let V=OY.exec($);if(!V)return!1;let[,Q,q,K,G,W,J]=V.map((P)=>parseInt(P));return Q!==void 0&&q!==void 0&&K!==void 0&&G!==void 0&&W!==void 0&&J!==void 0&&0<q&&q<=12&&K<=BY(Q,q)&&G<24&&W<60&&J<=60}function BY($,V){if(V===2)return IY($)?29:28;return wY[V-1]??0}function IY($){return $%4===0&&($%100!==0||$%400===0)}var wY=[31,0,31,30,31,30,31,31,30,31,30,31];function S2($){return typeof $==="object"&&$!==null&&!Array.isArray($)}var DY={int8:[-128,128],int16:[-32768,32768],int32:[-2147483648,2147483648],uint8:[0,256],uint16:[0,65536],uint32:[0,4294967296]};function k2($=0.5){return Math.random()<$}function MV($,V){return $+Math.floor(Math.random()*(V-$))}function O$($){let V=$[MV(0,$.length)];if(V===void 0)throw new Error("choices was empty in random choice");else return V}var x2;function LV(){if(x2===void 0){let $=Math.sqrt(-2*Math.log(Math.random())),V=2*Math.PI*Math.random();return x2=$*Math.sin(V),$*Math.cos(V)}else{let $=x2;return x2=void 0,$}}function n6($=1){let V=Math.exp(-$),Q=0,q=Math.random();while(q>V)Q++,q*=Math.random();return Q}var HV=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 ;,'"`;function g2($){return Array($).fill(null).map(()=>HV.charAt(Math.floor(Math.random()*HV.length))).join("")}function*OV(...$){for(let V of $)yield*V}function*T2($,V){let Q=0;for(let q of $)yield V(q,Q++)}function*NY($,V){let Q=0;for(let q of $)if(V(q,Q++))yield q}function*vY($){for(let V=0;V<$;++V)yield V}function F1($){return/^[a-zA-Z_][a-zA-Z0-9_]*$/.test($)?`.${$}`:`["${$}"]`}function l0($){return $===null?"null":Array.isArray($)?"array":typeof $}class E0{guard($){for(let V of this.pathErrors($))return!1;return!0}guardAssert($){let V=[];for(let[Q,q]of this.pathErrors($)){let K=Q.reverse().join("")||".";V.push(`${K}: ${q}`)}if(V.length){let Q=JSON.stringify($,null,2),q=JSON.stringify(this.schema(),null,2);throw new Error(`Validation errors:
9
+ ${V.join(`
10
+ `)}
11
+
12
+ While trying to validate:
13
+ ${Q}
14
+
15
+ Against schema:
16
+ ${q}`)}else return!0}}class CV extends E0{#$;definitions;nullable=!0;constructor($){super();this.#$=$,this.definitions=$.definitions}*pathErrors($){if($!==null)for(let[V,Q]of this.#$.pathErrors($))yield[V,`${Q} or ${l0($)} is not null`]}fuzz(){return k2(0.1)?null:this.#$.fuzz()}schema(){return{...this.#$.schema(),nullable:!0}}}function BV($){return new CV($)}class RY extends E0{#$;#Q;definitions;nullable;constructor($,V){super();this.#$=$,this.#Q=V,this.definitions=$.definitions,this.nullable=$.nullable}*pathErrors($){yield*this.#$.pathErrors($)}fuzz(){return this.#$.fuzz()}schema(){return{...this.#$.schema(),metadata:this.#Q}}}class IV extends E0{*pathErrors($){if(typeof $!=="boolean")yield[[],`${l0($)} is not a boolean`]}fuzz(){return k2()}schema(){return{type:"boolean"}}}function R6(){return new IV}class E2 extends E0{#$;#Q;#V;constructor($){super();this.#$=$,[this.#Q,this.#V]=DY[$]}*pathErrors($){if(typeof $!=="number")yield[[],`${l0($)} is not a number`];else if($%1!==0)yield[[],`${$.toPrecision()} is not an integer`];else if($<this.#Q)yield[[],`${$.toFixed()} is less than ${this.#Q.toFixed()}`];else if($>=this.#V)yield[[],`${$.toFixed()} is greater than ${(this.#V-1).toFixed()}`]}fuzz(){return MV(this.#Q,this.#V)}schema(){return{type:this.#$}}}function y2(){return new E2("uint8")}function A6(){return new E2("int32")}function a6(){return new E2("uint32")}class wV extends E0{#$;constructor($){super();this.#$=$}*pathErrors($){if(typeof $!=="number")yield[[],`${l0($)} is not number, expected a float`]}fuzz(){return LV()}schema(){return{type:this.#$}}}function v0(){return new wV("float64")}class DV extends E0{*pathErrors($){if(typeof $!=="string")yield[[],`${l0($)} is not a string`]}fuzz(){return g2(n6(3))}schema(){return{type:"string"}}}function V0(){return new DV}class NV extends E0{*pathErrors($){if(typeof $!=="string")yield[[],`${l0($)} is not a string`];else if(!CY($))yield[[],`${$} is not a valid timestamp`]}fuzz(){return new Date(Math.random()*3153600000000).toISOString()}schema(){return{type:"timestamp"}}}function vV(){return new NV}class RV extends E0{#$;#Q;constructor($,V){super();this.#$=$,this.#Q=V}*pathErrors($){if(typeof $!=="string")yield[[],`${l0($)} is not a string`];else if(!this.#Q.has($))yield[[],`${$} is not one of ${this.#$.join(", ")}`]}fuzz(){return O$(this.#$)}schema(){return{enum:[...this.#$]}}}function Z6(...$){let V=new Set($);if(V.size!==$.length)throw new Error("enum can't contain duplicates");else return new RV($,V)}class AV extends E0{#$;constructor($){super();this.#$=$}*pathErrors($){if(!Array.isArray($))yield[[],`${l0($)} is not an array`];else for(let[V,Q]of $.entries())for(let[q,K]of this.#$.pathErrors(Q))q.push(`[${V.toFixed()}]`),yield[q,K]}fuzz(){return Array(n6()).fill(null).map(()=>this.#$.fuzz())}schema(){return{elements:this.#$.schema()}}}function a0($){if($.definitions)throw new Error("definitions can only exist on a root schema");else return new AV($)}class xV extends E0{#$;constructor($){super();this.#$=$}*pathErrors($){if(!S2($))yield[[],`${l0($)} is not a record`];else for(let[V,Q]of Object.entries($))for(let[q,K]of this.#$.pathErrors(Q))q.push(F1(V)),yield[q,K]}fuzz(){return Object.fromEntries(Array(n6()).fill(null).map(()=>[g2(n6(3)),this.#$.fuzz()]))}schema(){return{values:this.#$.schema()}}}function b2($){if($.definitions)throw new Error("definitions can only exist on a root schema");else return new xV($)}class TV extends E0{#$;#Q;#V;keys;constructor($,V,Q,q){super();this.#$=$,this.#Q=V,this.#V=Q,this.keys=q}*pathErrors($){if(!S2($))yield[[],`${l0($)} is not a record`];else{if(this.#$)for(let[V,Q]of this.#$){let q=$[V];if(q===void 0)yield[[],`required key '${V}' is missing`];else for(let[K,G]of Q.pathErrors(q))K.push(F1(V)),yield[K,G]}if(this.#Q){for(let[V,Q]of this.#Q)if($[V]!==void 0)for(let[q,K]of Q.pathErrors($[V]))q.push(F1(V)),yield[q,K]}if(!this.#V){for(let V of Object.keys($))if(!this.keys.has(V))yield[[F1(V)],`'${V}' is not a valid property and additional properties are not allowed`]}}}fuzz(){let $=T2(this.#$??[],([q,K])=>[q,K.fuzz()]),V=T2(NY(this.#Q??[],()=>k2()),([q,K])=>[q,K.fuzz()]),Q=this.#V?T2(vY(n6()),()=>[g2(n6(3)),O$([()=>null,k2,LV,()=>g2(n6()),()=>[],()=>({})])()]):[];return Object.fromEntries(OV($,V,Q))}schema(){let $={};if(this.#$)$.properties=Object.fromEntries(this.#$.map(([V,Q])=>[V,Q.schema()]));if(this.#Q)$.optionalProperties=Object.fromEntries(this.#Q.map(([V,Q])=>[V,Q.schema()]));if(this.#V)$.additionalProperties=!0;return $}}function AY($,V,Q){let q=new Set(T2(OV($??[],V??[]),([K])=>K));if($?.some(([,K])=>K.definitions))throw new Error("definitions can only exist on a root schema");else if(V?.some(([,K])=>K.definitions))throw new Error("definitions can only exist on a root schema");else if(q.size!==($?.length??0)+(V?.length??0))throw new Error("properties and optionalProperties keys must be unique");else return new TV($,V,Q??!1,q)}function F0($,V,Q){return AY($?Object.entries($):void 0,V?Object.entries(V):void 0,Q)}class SV extends E0{#$;#Q;#V;constructor($,V,Q){super();this.#$=$,this.#Q=V,this.#V=Q}guard($){if(!S2($))return!1;let{[this.#$]:V,...Q}=$;if(typeof V!=="string")return!1;return this.#Q[V]?.guard(Q)??!1}*pathErrors($){if(!S2($))yield[[],`${l0($)} is not an object`];else{let{[this.#$]:V,...Q}=$;if(V===void 0)yield[[],`discriminator key '${this.#$}' is missing`];else if(typeof V!=="string")yield[[F1(this.#$)],`${l0(V)} is not a string`];else{let q=this.#Q[V];if(q===void 0)yield[[F1(this.#$)],`'${V}' is not a valid discriminator value (${Object.keys(this.#Q).join(", ")})`];else yield*q.pathErrors(Q)}}}fuzz(){let[$,V]=O$(this.#V);return{...V.fuzz(),[this.#$]:$}}schema(){let $=Object.fromEntries(this.#V.map(([V,Q])=>[V,Q.schema()]));return{discriminator:this.#$,mapping:$}}}function xY($,V,Q){if(Q.some(([,q])=>q.definitions))throw new Error("definitions can only exist on a root schema");else if(Q.some(([,q])=>q.keys?.has($)??!0))throw new Error("all discriminator mappings must be properties schemas that don't contain discriminator");else return new SV($,V,Q)}function kV($,V){return xY($,V,Object.entries(V))}class gV extends E0{#$;#Q;definitions=!0;constructor($,V){super();this.#$=$,this.#Q=V}*pathErrors($){yield*this.#Q.pathErrors($)}fuzz(){return this.#Q.fuzz()}schema(){let $=Object.fromEntries(Object.entries(this.#$).map(([V,Q])=>[V,Q.schema()]));return{...this.#Q.schema(),definitions:$}}}class EV extends E0{#$;#Q;constructor($,V){super();this.#$=$,this.#Q=V}*pathErrors($){yield*this.#Q.pathErrors($)}fuzz(){return this.#Q.fuzz()}schema(){return{ref:this.#$}}}class yV{#$;#Q;constructor($,V){this.#$=$,this.#Q=V}def($,V){let Q=V(this.#Q);return new yV({...this.#$,[$]:Q},{...this.#Q,[$]:new EV($,Q)})}build($){return new gV(this.#$,$(this.#Q))}}class TY extends E0{#$;#Q;constructor($,V){super();this.#Q=$,this.#$=V}#V(){let $=this.#Q[this.#$];if($===void 0)throw new Error(`ref ${this.#$} was not in definitions after ref builder was finished`);else return $}*pathErrors($){yield*this.#V().pathErrors($)}fuzz(){return this.#V().fuzz()}schema(){return{ref:this.#$}}}var k0=[];for(let $=0;$<256;++$)k0.push(($+256).toString(16).slice(1));function bV($,V=0){return(k0[$[V+0]]+k0[$[V+1]]+k0[$[V+2]]+k0[$[V+3]]+"-"+k0[$[V+4]]+k0[$[V+5]]+"-"+k0[$[V+6]]+k0[$[V+7]]+"-"+k0[$[V+8]]+k0[$[V+9]]+"-"+k0[$[V+10]]+k0[$[V+11]]+k0[$[V+12]]+k0[$[V+13]]+k0[$[V+14]]+k0[$[V+15]]).toLowerCase()}var C$,SY=new Uint8Array(16);function B$(){if(!C$){if(typeof crypto==="undefined"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");C$=crypto.getRandomValues.bind(crypto)}return C$(SY)}var kY=typeof crypto!=="undefined"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),I$={randomUUID:kY};function gY($,V,Q){if(I$.randomUUID&&!V&&!$)return I$.randomUUID();$=$||{};let q=$.random??$.rng?.()??B$();if(q.length<16)throw new Error("Random bytes length must be >= 16");if(q[6]=q[6]&15|64,q[8]=q[8]&63|128,V){if(Q=Q||0,Q<0||Q+16>V.length)throw new RangeError(`UUID byte range ${Q}:${Q+15} is out of buffer bounds`);for(let K=0;K<16;++K)V[Q+K]=q[K];return V}return bV(q)}var p1=gY;class w$ extends Map{#$;#Q=0;constructor($,V=[]){super();this.#$=$;for(let[Q,q]of V)this.set(Q,q)}get($){let V=super.get($);if(V!==void 0)super.delete($),super.set($,V);return V}set($,V){let Q=super.get($);if(Q===void 0)this.#Q+=$.length;else if(Q!==null)this.#Q-=Q.length;if(V!==null)this.#Q+=V.length;super.delete($);let q;while(this.#Q>this.#$&&(q=this.entries().next().value)){let[K,G]=q;if(super.delete(K),this.#Q-=K.length,G!==null)this.#Q-=G.length}return super.set($,V),this}delete($){let V=super.get($);if(V===void 0)return!1;if(super.delete($),V!==null)this.#Q-=V.length;return this.#Q-=$.length,!0}clear(){super.clear(),this.#Q=0}}var cV="https://webapp-prod.cloud.remarkable.engineering",EY="https://eu.tectonic.remarkable.com",yY="https://web.eu.tectonic.remarkable.com",x6=/^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}||trash)$/,T6=/^[0-9a-f]{64}$/,uV=F0({name:V0(),timestamp:v0()},void 0,!0),bY=F0({name:V0(),pageId:V0(),timestamp:v0()},void 0,!0),fV={id:V0(),hash:V0(),visibleName:V0(),lastModified:V0(),pinned:R6()},hV={parent:V0(),tags:a0(F0({name:V0(),timestamp:v0()},void 0,!0))},fY=kV("type",{CollectionType:F0(fV,hV,!0),DocumentType:F0({...fV,lastOpened:V0(),fileType:Z6("epub","pdf","notebook")},hV,!0)}),hY=a0(fY),_Y=F0({docID:V0(),hash:V0()},void 0,!0),mY=F0({hash:V0()},void 0,!0),pY=F0({hashes:b2(V0())},void 0,!0);class D$ extends Error{constructor(){super("root generation was stale; try put again")}}class N$ extends Error{status;statusText;constructor($,V,Q){super(Q);this.status=$,this.statusText=V}}class F6 extends Error{field;regex;constructor($,V,Q){super(Q);this.field=$,this.regex=V}}async function CJ($,{deviceDesc:V="browser-chrome",uuid:Q=p1(),authHost:q=cV}={}){if($.length!==8)throw new Error(`code should be length 8, but was ${$.length}`);let K=await fetch(`${q}/token/json/2/device/new`,{method:"POST",headers:{Authorization:"Bearer"},body:JSON.stringify({code:$,deviceDesc:V,deviceID:Q})});if(!K.ok)throw new N$(K.status,K.statusText,"couldn't register api");else return await K.text()}var cY=F0(void 0,{authors:a0(V0()),title:V0(),publicationDate:V0(),publisher:V0()},!0),uY=F0({id:V0(),idx:F0({timestamp:V0(),value:V0()},void 0,!0)},{template:F0({timestamp:V0(),value:V0()},void 0,!0),redir:F0({timestamp:V0(),value:A6()},void 0,!0),scrollTime:F0({timestamp:V0(),value:vV()},void 0,!0),verticalScroll:F0({timestamp:V0(),value:v0()},void 0,!0),deleted:F0({timestamp:V0(),value:A6()},void 0,!0)},!0),dY=F0({lastOpened:F0({timestamp:V0(),value:V0()},void 0,!0),original:F0({timestamp:V0(),value:A6()},void 0,!0),pages:a0(uY),uuids:a0(F0({first:V0(),second:a6()},void 0,!0))},void 0,!0),lY=F0(void 0,{tags:a0(uV)}),oY=F0({coverPageNumber:A6(),documentMetadata:cY,extraMetadata:b2(V0()),fileType:Z6("epub","notebook","pdf"),fontName:V0(),formatVersion:y2(),lineHeight:A6(),margins:a6(),orientation:Z6("portrait","landscape"),pageCount:a6(),sizeInBytes:V0(),textAlignment:Z6("justify","left"),textScale:v0()},{cPages:dY,customZoomCenterX:v0(),customZoomCenterY:v0(),customZoomOrientation:Z6("portrait","landscape"),customZoomPageHeight:v0(),customZoomPageWidth:v0(),customZoomScale:v0(),dummyDocument:R6(),keyboardMetadata:F0({count:a6(),timestamp:v0()},void 0,!0),lastOpenedPage:a6(),originalPageCount:A6(),pages:a0(V0()),pageTags:a0(bY),redirectionPageMap:a0(A6()),tags:a0(uV),transform:F0({m11:v0(),m12:v0(),m13:v0(),m21:v0(),m22:v0(),m23:v0(),m31:v0(),m32:v0(),m33:v0()},void 0,!0),viewBackgroundFilter:Z6("off","fullpage"),zoomMode:Z6("bestFit","customFit","fitToHeight","fitToWidth")},!0),iY=F0({lastModified:V0(),parent:V0(),pinned:R6(),type:Z6("DocumentType","CollectionType"),visibleName:V0()},{lastOpened:V0(),lastOpenedPage:a6(),createdTime:V0(),deleted:R6(),metadatamodified:R6(),modified:R6(),synced:R6(),version:y2()},!0),nY=F0({hash:V0(),generation:v0()},void 0,!0),aY=F0({hash:V0(),generation:v0(),schemaVersion:y2()},void 0,!0);async function _V($){let V=await crypto.subtle.digest("SHA-256",$);return[...new Uint8Array(V)].map((Q)=>Q.toString(16).padStart(2,"0")).join("")}class dV{#$;#Q;#V;constructor($,V,Q){this.#$=$,this.#V=V,this.#Q=Q}async getRootHash(){let V=await(await this.#$("GET",`${this.#Q}/sync/v4/root`)).text(),Q=JSON.parse(V);if(!aY.guardAssert(Q))throw Error("invalid root hash");let{hash:q,generation:K,schemaVersion:G}=Q;if(G!==3)throw new Error(`schema version ${G} not supported`);else if(!Number.isSafeInteger(K))throw new Error(`generation ${K} was not a safe integer; please file a bug report`);else return[q,K]}async#q($){if(!T6.test($))throw new F6($,T6,"hash was not a valid hash");let Q=await(await this.#$("GET",`${this.#Q}/sync/v3/files/${$}`)).arrayBuffer();return new Uint8Array(Q)}async getHash($){let V=this.#V.get($);if(V!=null)return new TextEncoder().encode(V);else{let Q=await this.#q($);if(this.#V.get($)===void 0)this.#V.set($,null);return Q}}async getText($){let V=this.#V.get($);if(V!=null)return V;else{let Q=await this.#q($),K=new TextDecoder().decode(Q);return this.#V.set($,K),K}}async getEntries($){let V=await this.getText($),[Q,...q]=V.slice(0,-1).split(`
17
+ `);if(Q!="3")throw new Error(`schema version ${Q} not supported`);else return q.map((K)=>{let[G,W,J,P,j]=K.split(":");if(G===void 0||W===void 0||J===void 0||P===void 0||j===void 0)throw new Error(`line '${K}' was not formatted correctly`);else if(W==="80000000")return{hash:G,type:80000000,id:J,subfiles:parseInt(P),size:parseInt(j)};else if(W==="0"&&P==="0")return{hash:G,type:0,id:J,subfiles:0,size:parseInt(j)};else throw new Error(`line '${K}' was not formatted correctly`)})}async getContent($){let V=await this.getText($),Q=JSON.parse(V);if(lY.guard(Q))return Q;else if(oY.guardAssert(Q))return Q;else throw Error("invalid content")}async getMetadata($){let V=await this.getText($),Q=JSON.parse(V);if(!iY.guardAssert(Q))throw Error("invalid metadata");return Q}async putRootHash($,V,Q=!0){if(!Number.isSafeInteger(V))throw new Error(`generation ${V} was not a safe integer`);else if(!T6.test($))throw new F6($,T6,"rootHash was not a valid hash");let q=JSON.stringify({hash:$,generation:V,broadcast:Q}),G=await(await this.#$("PUT",`${this.#Q}/sync/v3/root`,{body:q})).text(),W=JSON.parse(G);if(!nY.guardAssert(W))throw Error("invalid root hash");let{hash:J,generation:P}=W;if(Number.isSafeInteger(P))return[J,P];else throw new Error(`new generation ${P} was not a safe integer; please file a bug report`)}async#X($,V,Q){if(!this.#V.has($)){let q=mV.default.buf(Q,0),K=new ArrayBuffer(4);new DataView(K).setInt32(0,q,!1);let G=u1(new Uint8Array(K));if(await this.#$("PUT",`${this.#Q}/sync/v3/files/${$}`,{body:Q,headers:{"rm-filename":V,"x-goog-hash":`crc32c=${G}`}}),this.#V.get($)===void 0)this.#V.set($,null)}}async putFile($,V){let Q=await _V(V);return[{id:$,hash:Q,type:0,subfiles:0,size:V.length},this.#X(Q,$,V)]}async putText($,V){let q=new TextEncoder().encode(V),[K,G]=await this.putFile($,q);return[K,G.then(()=>{this.#V.set(K.hash,V)})]}async putContent($,V){if(!$.endsWith(".content"))throw new Error(`id ${$} did not end with '.content'`);else return await this.putText($,JSON.stringify(V))}async putMetadata($,V){if(!$.endsWith(".metadata"))throw new Error(`id ${$} did not end with '.metadata'`);else return await this.putText($,JSON.stringify(V))}async putEntries($,V){V.sort((P,j)=>P.id.localeCompare(j.id));let Q=new Uint8Array(V.length*32);for(let[P,{hash:j}]of V.entries())for(let[z,I]of(j.match(/../g)??[]).entries())Q[P*32+z]=parseInt(I,16);let q=await _V(Q),K=V.reduce((P,j)=>P+j.size,0),G=[`3
18
+ `];for(let{hash:P,type:j,id:z,subfiles:I,size:N}of V)G.push(`${P}:${j}:${z}:${I}:${N}
19
+ `);let W={id:$,hash:q,type:80000000,subfiles:V.length,size:K},J=new TextEncoder;return[W,this.#X(q,`${$}.docSchema`,J.encode(G.join("")))]}dumpCache(){return JSON.stringify(Object.fromEntries(this.#V))}clearCache(){this.#V.clear()}}class lV{#$;#Q;#V;raw;#q;constructor($,V,Q,q){this.#$=$,this.#Q=V,this.#V=q,this.raw=new dV((K,G,{body:W,headers:J}={})=>this.#J(G,{method:K,body:W,headers:J}),q,Q)}async#X($=!1){if($||this.#q===void 0)this.#q=await this.raw.getRootHash();return this.#q}async#W($,V){try{this.#q=await this.raw.putRootHash($,V)}catch(Q){if(Q instanceof D$)this.#q=void 0;throw Q}}async#J($,{body:V,method:Q="POST",headers:q={}}){let K=await fetch($,{method:Q,headers:{Authorization:`Bearer ${this.#$}`,...q},body:V});if(!K.ok){let G=await K.text();if(G===`{"message":"precondition failed"}
20
+ `)throw new D$;else throw new N$(K.status,K.statusText,`failed reMarkable request: ${G}`)}else return K}async#Y({meta:$="",method:V="GET",contentType:Q="text/plain;charset=UTF-8",body:q,hash:K}={}){let W=new TextEncoder().encode($),J=K===void 0?"":`/${K}`,j=await(await this.#J(`${this.#Q}/doc/v2/files${J}`,{body:q,method:V,headers:{"content-type":Q,"rm-meta":u1(W),"rm-source":"WebLibrary"}})).text();return JSON.parse(j)}async listItems(){let $=await this.#Y();if(!hY.guardAssert($))throw Error("invalid entries");return $}async listIds($=!1){let[V]=await this.#X($);return(await this.raw.getEntries(V)).map(({id:q,hash:K})=>({id:q,hash:K}))}async getContent($){let V=await this.raw.getEntries($),[Q]=V.filter((q)=>q.id.endsWith(".content"));if(Q===void 0)throw new Error(`couldn't find contents for hash ${$}`);else return await this.raw.getContent(Q.hash)}async getMetadata($){let V=await this.raw.getEntries($),[Q]=V.filter((q)=>q.id.endsWith(".metadata"));if(Q===void 0)throw new Error(`couldn't find metadata for hash ${$}`);else return await this.raw.getMetadata(Q.hash)}async getPdf($){let V=await this.raw.getEntries($),[Q]=V.filter((q)=>q.id.endsWith(".pdf"));if(Q===void 0)throw new Error(`couldn't find pdf for hash ${$}`);else return await this.raw.getHash(Q.hash)}async getEpub($){let V=await this.raw.getEntries($),[Q]=V.filter((q)=>q.id.endsWith(".epub"));if(Q===void 0)throw new Error(`couldn't find epub for hash ${$}`);else return await this.raw.getHash(Q.hash)}async getDocument($){let V=await this.raw.getEntries($),Q=new pV.default;for(let q of V)Q.file(q.id,this.raw.getHash(q.hash));return Q.generateAsync({type:"uint8array"})}async#G($,V,Q,{refresh:q,parent:K="",pinned:G=!1,zoomMode:W="bestFit",viewBackgroundFilter:J,textScale:P=1,textAlignment:j="justify",fontName:z="",coverPageNumber:I=-1,authors:N,title:A,publicationDate:x,publisher:k,extraMetadata:g={},lineHeight:y=-1,margins:Z=125,orientation:O="portrait",tags:M}){if(K&&!x6.test(K))throw new F6(K,x6,"parent must be a valid document id");let R=p1(),C=new Date,L=new TextEncoder,[[T,E],[f,b],[F,m],[n,v],[c,u]]=await Promise.all([this.raw.putContent(`${R}.content`,{coverPageNumber:I,documentMetadata:{authors:N,title:A,publicationDate:x,publisher:k},extraMetadata:g,lineHeight:y,margins:Z,orientation:O,fileType:V,formatVersion:1,tags:M?.map((r)=>({name:r,timestamp:+C}))??[],fontName:z,textAlignment:j,textScale:P,zoomMode:W,viewBackgroundFilter:J,originalPageCount:1,pageCount:1,pageTags:[],pages:[p1()],redirectionPageMap:[0],sizeInBytes:Q.length.toFixed()}),this.raw.putMetadata(`${R}.metadata`,{parent:K,pinned:G,lastModified:(+C).toFixed(),createdTime:(+C).toFixed(),type:"DocumentType",visibleName:$,lastOpened:"0",lastOpenedPage:0}),this.raw.putFile(`${R}.pagedata`,L.encode(`
21
+ `)),this.raw.putFile(`${R}.${V}`,Q),this.#X(q)]),[[i,e],d]=await Promise.all([this.raw.putEntries(R,[T,f,F,n]),this.raw.getEntries(c)]);d.push(i);let[l,S]=await this.raw.putEntries("root",d);return await Promise.all([E,b,m,v,e,S]),await this.#W(l.hash,u),{id:R,hash:i.hash}}async putPdf($,V,Q={}){return await this.#G($,"pdf",V,Q)}async putEpub($,V,Q={}){return await this.#G($,"epub",V,Q)}async#K($,V,Q,q){if(!x6.test($))throw new F6($,x6,"parent must be a valid document id");let K=await this.#Y({meta:JSON.stringify({parent:$,file_name:V}),method:"POST",contentType:q,body:Q});if(this.#q=void 0,!_Y.guardAssert(K))throw Error("invalid upload entry");let{hash:G,docID:W}=K;return{hash:G,id:W}}async createFolder($,{parent:V=""}={}){return await this.#K(V,$,new Uint8Array(0),"folder")}async uploadEpub($,V,{parent:Q=""}={}){return await this.#K(Q,$,V,"application/epub+zip")}async uploadPdf($,V,{parent:Q=""}={}){return await this.#K(Q,$,V,"application/pdf")}async#U($,V){if(!T6.test($))throw new F6($,T6,"hash to modify was not a valid hash");let Q=await this.#Y({hash:$,body:JSON.stringify(V),method:"PATCH"});if(this.#q=void 0,!mY.guardAssert(Q))throw Error("invalid hash entry");return Q}async move($,V){if(!x6.test(V))throw new F6(V,x6,"parent must be a valid document id");return await this.#U($,{parent:V})}async delete($){return await this.move($,"trash")}async rename($,V){return await this.#U($,{file_name:V})}async#j($,V){if($.filter((K)=>!T6.test(K)).length)throw new F6($.join(", "),T6,"hashes to modify were not a valid hashes");let q=await this.#Y({body:JSON.stringify({updates:V,hashes:$}),method:"PATCH"});if(this.#q=void 0,!pY.guardAssert(q))throw Error("invalid hashes entry");return q}async bulkMove($,V){if(!x6.test(V))throw new F6(V,x6,"parent must be a valid document id");return await this.#j($,{parent:V})}async bulkDelete($){return await this.bulkMove($,"trash")}dumpCache(){return this.raw.dumpCache()}async pruneCache($){let[V]=await this.#X($),Q=new Set(this.#V.keys()),q=[await this.raw.getEntries(V)],K=[];while(q.length){for(let G of q)for(let{hash:W,type:J}of G)if(Q.add(W),J===80000000)K.push(this.raw.getEntries(W));q=await Promise.all(K),K=[]}for(let G of Q)this.#V.delete(G)}clearCache(){this.raw.clearCache()}}var rY=b2(BV(V0()));async function BJ($,{authHost:V=cV,syncHost:Q=yY,rawHost:q=EY,cache:K,maxCacheSize:G=1/0}={}){let W=await fetch(`${V}/token/json/2/user/new`,{method:"POST",headers:{Authorization:`Bearer ${$}`}});if(!W.ok)throw new Error(`couldn't fetch auth token: ${W.statusText}`);let J=await W.text(),P=JSON.parse(K??"{}");if(rY.guard(P)){let j=Object.entries(P),z=G===1/0?new Map(j):new w$(G,j);return new lV(J,Q,q,z)}else throw new Error("cache was not a valid cache (json string mapping); your cache must be corrupted somehow. Either initialize remarkable without a cache, or fix its format.")}export{BJ as remarkable,CJ as register,F6 as ValidationError,N$ as ResponseError,D$ as GenerationError};