rmapi-js 12.0.3 → 13.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.
- package/dist/index.d.ts +182 -36
- package/dist/index.js +730 -236
- package/dist/lru.d.ts +4 -4
- package/dist/lru.js +4 -4
- package/dist/raw.d.ts +169 -36
- package/dist/raw.js +214 -74
- package/dist/rm5.d.ts +1 -1
- package/dist/rm6.d.ts +38 -13
- package/dist/rm6.js +418 -39
- package/dist/rmapi-js.esm.min.js +13 -9
- package/package.json +1 -1
package/dist/rmapi-js.esm.min.js
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
var QU=Object.create;var{getPrototypeOf:$U,defineProperty:f6,getOwnPropertyNames:iQ,getOwnPropertyDescriptor:JU}=Object,nQ=Object.prototype.hasOwnProperty;function oQ(Q){return this[Q]}var qU,XU,y6=(Q,$,J)=>{var q=Q!=null&&typeof Q==="object";if(q){var X=$?qU??=new WeakMap:XU??=new WeakMap,Y=X.get(Q);if(Y)return Y}J=Q!=null?QU($U(Q)):{};let W=$||!Q||!Q.__esModule?f6(J,"default",{value:Q,enumerable:!0}):J;for(let B of iQ(Q))if(!nQ.call(W,B))f6(W,B,{get:oQ.bind(Q,B),enumerable:!0});if(q)X.set(Q,W);return W},W2=(Q)=>{var $=(dQ??=new WeakMap).get(Q),J;if($)return $;if($=f6({},"__esModule",{value:!0}),Q&&typeof Q==="object"||typeof Q==="function"){for(var q of iQ(Q))if(!nQ.call($,q))f6($,q,{get:oQ.bind(Q,q),enumerable:!(J=JU(Q,q))||J.enumerable})}return dQ.set(Q,$),$},dQ,f=(Q,$)=>()=>($||Q(($={exports:{}}).exports,$),$.exports);var YU=(Q)=>Q;function WU(Q,$){this[Q]=YU.bind(null,$)}var a5=(Q,$)=>{for(var J in $)f6(Q,J,{get:$[J],enumerable:!0,configurable:!0,set:WU.bind($,J)})};var rQ=(Q,$)=>()=>(Q&&($=Q(Q=0)),$);var m2={};a5(m2,{transcode:()=>dU,resolveObjectURL:()=>cU,kStringMaxLength:()=>X$,kMaxLength:()=>h6,isUtf8:()=>pU,isAscii:()=>lU,default:()=>iU,constants:()=>zU,btoa:()=>HU,atob:()=>jU,INSPECT_MAX_BYTES:()=>q$,File:()=>MU,Buffer:()=>b,Blob:()=>FU});function BU(Q){var $=Q.length;if($%4>0)throw Error("Invalid string. Length must be a multiple of 4");var J=Q.indexOf("=");if(J===-1)J=$;var q=J===$?0:4-J%4;return[J,q]}function UU(Q,$){return(Q+$)*3/4-$}function GU(Q){var $,J=BU(Q),q=J[0],X=J[1],Y=new Uint8Array(UU(q,X)),W=0,B=X>0?q-4:q,U;for(U=0;U<B;U+=4)$=B2[Q.charCodeAt(U)]<<18|B2[Q.charCodeAt(U+1)]<<12|B2[Q.charCodeAt(U+2)]<<6|B2[Q.charCodeAt(U+3)],Y[W++]=$>>16&255,Y[W++]=$>>8&255,Y[W++]=$&255;if(X===2)$=B2[Q.charCodeAt(U)]<<2|B2[Q.charCodeAt(U+1)]>>4,Y[W++]=$&255;if(X===1)$=B2[Q.charCodeAt(U)]<<10|B2[Q.charCodeAt(U+1)]<<4|B2[Q.charCodeAt(U+2)]>>2,Y[W++]=$>>8&255,Y[W++]=$&255;return Y}function VU(Q){return R2[Q>>18&63]+R2[Q>>12&63]+R2[Q>>6&63]+R2[Q&63]}function KU(Q,$,J){var q,X=[];for(var Y=$;Y<J;Y+=3)q=(Q[Y]<<16&16711680)+(Q[Y+1]<<8&65280)+(Q[Y+2]&255),X.push(VU(q));return X.join("")}function sQ(Q){var $,J=Q.length,q=J%3,X=[],Y=16383;for(var W=0,B=J-q;W<B;W+=Y)X.push(KU(Q,W,W+Y>B?B:W+Y));if(q===1)$=Q[J-1],X.push(R2[$>>2]+R2[$<<4&63]+"==");else if(q===2)$=(Q[J-2]<<8)+Q[J-1],X.push(R2[$>>10]+R2[$>>4&63]+R2[$<<2&63]+"=");return X.join("")}function v8(Q,$,J,q,X){var Y,W,B=X*8-q-1,U=(1<<B)-1,G=U>>1,V=-7,F=J?X-1:0,M=J?-1:1,H=Q[$+F];F+=M,Y=H&(1<<-V)-1,H>>=-V,V+=B;for(;V>0;Y=Y*256+Q[$+F],F+=M,V-=8);W=Y&(1<<-V)-1,Y>>=-V,V+=q;for(;V>0;W=W*256+Q[$+F],F+=M,V-=8);if(Y===0)Y=1-G;else if(Y===U)return W?NaN:(H?-1:1)*(1/0);else W=W+Math.pow(2,q),Y=Y-G;return(H?-1:1)*W*Math.pow(2,Y-q)}function J$(Q,$,J,q,X,Y){var W,B,U,G=Y*8-X-1,V=(1<<G)-1,F=V>>1,M=X===23?Math.pow(2,-24)-Math.pow(2,-77):0,H=q?0:Y-1,_=q?1:-1,T=$<0||$===0&&1/$<0?1:0;if($=Math.abs($),isNaN($)||$===1/0)B=isNaN($)?1:0,W=V;else{if(W=Math.floor(Math.log($)/Math.LN2),$*(U=Math.pow(2,-W))<1)W--,U*=2;if(W+F>=1)$+=M/U;else $+=M*Math.pow(2,1-F);if($*U>=2)W++,U/=2;if(W+F>=V)B=0,W=V;else if(W+F>=1)B=($*U-1)*Math.pow(2,X),W=W+F;else B=$*Math.pow(2,F-1)*Math.pow(2,X),W=0}for(;X>=8;Q[J+H]=B&255,H+=_,B/=256,X-=8);W=W<<X|B,G+=X;for(;G>0;Q[J+H]=W&255,H+=_,W/=256,G-=8);Q[J+H-_]|=T*128}function b2(Q){if(Q>h6)throw RangeError('The value "'+Q+'" is invalid for option "size"');let $=new Uint8Array(Q);return Object.setPrototypeOf($,b.prototype),$}function J4(Q,$,J){return class extends J{constructor(){super();Object.defineProperty(this,"message",{value:$.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${Q}]`,this.stack,delete this.name}get code(){return Q}set code(q){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:q,writable:!0})}toString(){return`${this.name} [${Q}]: ${this.message}`}}}function b(Q,$,J){if(typeof Q==="number"){if(typeof $==="string")throw TypeError('The "string" argument must be of type string. Received type number');return q4(Q)}return Y$(Q,$,J)}function Y$(Q,$,J){if(typeof Q==="string")return DU(Q,$);if(ArrayBuffer.isView(Q))return CU(Q);if(Q==null)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Q);if(I2(Q,ArrayBuffer)||Q&&I2(Q.buffer,ArrayBuffer))return Q4(Q,$,J);if(typeof SharedArrayBuffer<"u"&&(I2(Q,SharedArrayBuffer)||Q&&I2(Q.buffer,SharedArrayBuffer)))return Q4(Q,$,J);if(typeof Q==="number")throw TypeError('The "value" argument must not be of type number. Received type number');let q=Q.valueOf&&Q.valueOf();if(q!=null&&q!==Q)return b.from(q,$,J);let X=OU(Q);if(X)return X;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof Q[Symbol.toPrimitive]==="function")return b.from(Q[Symbol.toPrimitive]("string"),$,J);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Q)}function W$(Q){if(typeof Q!=="number")throw TypeError('"size" argument must be of type number');else if(Q<0)throw RangeError('The value "'+Q+'" is invalid for option "size"')}function NU(Q,$,J){if(W$(Q),Q<=0)return b2(Q);if($!==void 0)return typeof J==="string"?b2(Q).fill($,J):b2(Q).fill($);return b2(Q)}function q4(Q){return W$(Q),b2(Q<0?0:X4(Q)|0)}function DU(Q,$){if(typeof $!=="string"||$==="")$="utf8";if(!b.isEncoding($))throw TypeError("Unknown encoding: "+$);let J=B$(Q,$)|0,q=b2(J),X=q.write(Q,$);if(X!==J)q=q.slice(0,X);return q}function e5(Q){let $=Q.length<0?0:X4(Q.length)|0,J=b2($);for(let q=0;q<$;q+=1)J[q]=Q[q]&255;return J}function CU(Q){if(I2(Q,Uint8Array)){let $=new Uint8Array(Q);return Q4($.buffer,$.byteOffset,$.byteLength)}return e5(Q)}function Q4(Q,$,J){if($<0||Q.byteLength<$)throw RangeError('"offset" is outside of buffer bounds');if(Q.byteLength<$+(J||0))throw RangeError('"length" is outside of buffer bounds');let q;if($===void 0&&J===void 0)q=new Uint8Array(Q);else if(J===void 0)q=new Uint8Array(Q,$);else q=new Uint8Array(Q,$,J);return Object.setPrototypeOf(q,b.prototype),q}function OU(Q){if(b.isBuffer(Q)){let $=X4(Q.length)|0,J=b2($);if(J.length===0)return J;return Q.copy(J,0,0,$),J}if(Q.length!==void 0){if(typeof Q.length!=="number"||Number.isNaN(Q.length))return b2(0);return e5(Q)}if(Q.type==="Buffer"&&Array.isArray(Q.data))return e5(Q.data)}function X4(Q){if(Q>=h6)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+h6.toString(16)+" bytes");return Q|0}function B$(Q,$){if(b.isBuffer(Q))return Q.length;if(ArrayBuffer.isView(Q)||I2(Q,ArrayBuffer))return Q.byteLength;if(typeof Q!=="string")throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof Q);let J=Q.length,q=arguments.length>2&&arguments[2]===!0;if(!q&&J===0)return 0;let X=!1;for(;;)switch($){case"ascii":case"latin1":case"binary":return J;case"utf8":case"utf-8":return $4(Q).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return J*2;case"hex":return J>>>1;case"base64":return z$(Q).length;default:if(X)return q?-1:$4(Q).length;$=(""+$).toLowerCase(),X=!0}}function PU(Q,$,J){let q=!1;if($===void 0||$<0)$=0;if($>this.length)return"";if(J===void 0||J>this.length)J=this.length;if(J<=0)return"";if(J>>>=0,$>>>=0,J<=$)return"";if(!Q)Q="utf8";while(!0)switch(Q){case"hex":return xU(this,$,J);case"utf8":case"utf-8":return G$(this,$,J);case"ascii":return kU(this,$,J);case"latin1":case"binary":return TU(this,$,J);case"base64":return EU(this,$,J);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return gU(this,$,J);default:if(q)throw TypeError("Unknown encoding: "+Q);Q=(Q+"").toLowerCase(),q=!0}}function I1(Q,$,J){let q=Q[$];Q[$]=Q[J],Q[J]=q}function U$(Q,$,J,q,X){if(Q.length===0)return-1;if(typeof J==="string")q=J,J=0;else if(J>2147483647)J=2147483647;else if(J<-2147483648)J=-2147483648;if(J=+J,Number.isNaN(J))J=X?0:Q.length-1;if(J<0)J=Q.length+J;if(J>=Q.length)if(X)return-1;else J=Q.length-1;else if(J<0)if(X)J=0;else return-1;if(typeof $==="string")$=b.from($,q);if(b.isBuffer($)){if($.length===0)return-1;return eQ(Q,$,J,q,X)}else if(typeof $==="number"){if($=$&255,typeof Uint8Array.prototype.indexOf==="function")if(X)return Uint8Array.prototype.indexOf.call(Q,$,J);else return Uint8Array.prototype.lastIndexOf.call(Q,$,J);return eQ(Q,[$],J,q,X)}throw TypeError("val must be string, number or Buffer")}function eQ(Q,$,J,q,X){let Y=1,W=Q.length,B=$.length;if(q!==void 0){if(q=String(q).toLowerCase(),q==="ucs2"||q==="ucs-2"||q==="utf16le"||q==="utf-16le"){if(Q.length<2||$.length<2)return-1;Y=2,W/=2,B/=2,J/=2}}function U(V,F){if(Y===1)return V[F];else return V.readUInt16BE(F*Y)}let G;if(X){let V=-1;for(G=J;G<W;G++)if(U(Q,G)===U($,V===-1?0:G-V)){if(V===-1)V=G;if(G-V+1===B)return V*Y}else{if(V!==-1)G-=G-V;V=-1}}else{if(J+B>W)J=W-B;for(G=J;G>=0;G--){let V=!0;for(let F=0;F<B;F++)if(U(Q,G+F)!==U($,F)){V=!1;break}if(V)return G}}return-1}function AU(Q,$,J,q){J=Number(J)||0;let X=Q.length-J;if(!q)q=X;else if(q=Number(q),q>X)q=X;let Y=$.length;if(q>Y/2)q=Y/2;let W;for(W=0;W<q;++W){let B=parseInt($.substr(W*2,2),16);if(Number.isNaN(B))return W;Q[J+W]=B}return W}function RU(Q,$,J,q){return E8($4($,Q.length-J),Q,J,q)}function IU(Q,$,J,q){return E8(hU($),Q,J,q)}function SU(Q,$,J,q){return E8(z$($),Q,J,q)}function vU(Q,$,J,q){return E8(bU($,Q.length-J),Q,J,q)}function EU(Q,$,J){if($===0&&J===Q.length)return sQ(Q);else return sQ(Q.slice($,J))}function G$(Q,$,J){J=Math.min(Q.length,J);let q=[],X=$;while(X<J){let Y=Q[X],W=null,B=Y>239?4:Y>223?3:Y>191?2:1;if(X+B<=J){let U,G,V,F;switch(B){case 1:if(Y<128)W=Y;break;case 2:if(U=Q[X+1],(U&192)===128){if(F=(Y&31)<<6|U&63,F>127)W=F}break;case 3:if(U=Q[X+1],G=Q[X+2],(U&192)===128&&(G&192)===128){if(F=(Y&15)<<12|(U&63)<<6|G&63,F>2047&&(F<55296||F>57343))W=F}break;case 4:if(U=Q[X+1],G=Q[X+2],V=Q[X+3],(U&192)===128&&(G&192)===128&&(V&192)===128){if(F=(Y&15)<<18|(U&63)<<12|(G&63)<<6|V&63,F>65535&&F<1114112)W=F}}}if(W===null)W=65533,B=1;else if(W>65535)W-=65536,q.push(W>>>10&1023|55296),W=56320|W&1023;q.push(W),X+=B}return ZU(q)}function ZU(Q){let $=Q.length;if($<=Q$)return String.fromCharCode.apply(String,Q);let J="",q=0;while(q<$)J+=String.fromCharCode.apply(String,Q.slice(q,q+=Q$));return J}function kU(Q,$,J){let q="";J=Math.min(Q.length,J);for(let X=$;X<J;++X)q+=String.fromCharCode(Q[X]&127);return q}function TU(Q,$,J){let q="";J=Math.min(Q.length,J);for(let X=$;X<J;++X)q+=String.fromCharCode(Q[X]);return q}function xU(Q,$,J){let q=Q.length;if(!$||$<0)$=0;if(!J||J<0||J>q)J=q;let X="";for(let Y=$;Y<J;++Y)X+=mU[Q[Y]];return X}function gU(Q,$,J){let q=Q.slice($,J),X="";for(let Y=0;Y<q.length-1;Y+=2)X+=String.fromCharCode(q[Y]+q[Y+1]*256);return X}function y0(Q,$,J){if(Q%1!==0||Q<0)throw RangeError("offset is not uint");if(Q+$>J)throw RangeError("Trying to access beyond buffer length")}function a0(Q,$,J,q,X,Y){if(!b.isBuffer(Q))throw TypeError('"buffer" argument must be a Buffer instance');if($>X||$<Y)throw RangeError('"value" argument is out of bounds');if(J+q>Q.length)throw RangeError("Index out of range")}function V$(Q,$,J,q,X){F$($,q,X,Q,J,7);let Y=Number($&BigInt(4294967295));Q[J++]=Y,Y=Y>>8,Q[J++]=Y,Y=Y>>8,Q[J++]=Y,Y=Y>>8,Q[J++]=Y;let W=Number($>>BigInt(32)&BigInt(4294967295));return Q[J++]=W,W=W>>8,Q[J++]=W,W=W>>8,Q[J++]=W,W=W>>8,Q[J++]=W,J}function K$(Q,$,J,q,X){F$($,q,X,Q,J,7);let Y=Number($&BigInt(4294967295));Q[J+7]=Y,Y=Y>>8,Q[J+6]=Y,Y=Y>>8,Q[J+5]=Y,Y=Y>>8,Q[J+4]=Y;let W=Number($>>BigInt(32)&BigInt(4294967295));return Q[J+3]=W,W=W>>8,Q[J+2]=W,W=W>>8,Q[J+1]=W,W=W>>8,Q[J]=W,J+8}function H$(Q,$,J,q,X,Y){if(J+q>Q.length)throw RangeError("Index out of range");if(J<0)throw RangeError("Index out of range")}function j$(Q,$,J,q,X){if($=+$,J=J>>>0,!X)H$(Q,$,J,4,340282346638528860000000000000000000000,-340282346638528860000000000000000000000);return J$(Q,$,J,q,23,4),J+4}function M$(Q,$,J,q,X){if($=+$,J=J>>>0,!X)H$(Q,$,J,8,179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,-179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000);return J$(Q,$,J,q,52,8),J+8}function $$(Q){let $="",J=Q.length,q=Q[0]==="-"?1:0;for(;J>=q+4;J-=3)$=`_${Q.slice(J-3,J)}${$}`;return`${Q.slice(0,J)}${$}`}function _U(Q,$,J){if(s1($,"offset"),Q[$]===void 0||Q[$+J]===void 0)b6($,Q.length-(J+1))}function F$(Q,$,J,q,X,Y){if(Q>J||Q<$){let W=typeof $==="bigint"?"n":"",B;if(Y>3)if($===0||$===BigInt(0))B=`>= 0${W} and < 2${W} ** ${(Y+1)*8}${W}`;else B=`>= -(2${W} ** ${(Y+1)*8-1}${W}) and < 2 ** ${(Y+1)*8-1}${W}`;else B=`>= ${$}${W} and <= ${J}${W}`;throw new t5("value",B,Q)}_U(q,X,Y)}function s1(Q,$){if(typeof Q!=="number")throw new wU($,"number",Q)}function b6(Q,$,J){if(Math.floor(Q)!==Q)throw s1(Q,J),new t5(J||"offset","an integer",Q);if($<0)throw new LU;throw new t5(J||"offset",`>= ${J?1:0} and <= ${$}`,Q)}function yU(Q){if(Q=Q.split("=")[0],Q=Q.trim().replace(fU,""),Q.length<2)return"";while(Q.length%4!==0)Q=Q+"=";return Q}function $4(Q,$){$=$||1/0;let J,q=Q.length,X=null,Y=[];for(let W=0;W<q;++W){if(J=Q.charCodeAt(W),J>55295&&J<57344){if(!X){if(J>56319){if(($-=3)>-1)Y.push(239,191,189);continue}else if(W+1===q){if(($-=3)>-1)Y.push(239,191,189);continue}X=J;continue}if(J<56320){if(($-=3)>-1)Y.push(239,191,189);X=J;continue}J=(X-55296<<10|J-56320)+65536}else if(X){if(($-=3)>-1)Y.push(239,191,189)}if(X=null,J<128){if(($-=1)<0)break;Y.push(J)}else if(J<2048){if(($-=2)<0)break;Y.push(J>>6|192,J&63|128)}else if(J<65536){if(($-=3)<0)break;Y.push(J>>12|224,J>>6&63|128,J&63|128)}else if(J<1114112){if(($-=4)<0)break;Y.push(J>>18|240,J>>12&63|128,J>>6&63|128,J&63|128)}else throw Error("Invalid code point")}return Y}function hU(Q){let $=[];for(let J=0;J<Q.length;++J)$.push(Q.charCodeAt(J)&255);return $}function bU(Q,$){let J,q,X,Y=[];for(let W=0;W<Q.length;++W){if(($-=2)<0)break;J=Q.charCodeAt(W),q=J>>8,X=J%256,Y.push(X),Y.push(q)}return Y}function z$(Q){return GU(yU(Q))}function E8(Q,$,J,q){let X;for(X=0;X<q;++X){if(X+J>=$.length||X>=Q.length)break;$[X+J]=Q[X]}return X}function I2(Q,$){return Q instanceof $||Q!=null&&Q.constructor!=null&&Q.constructor.name!=null&&Q.constructor.name===$.name}function e2(Q){return typeof BigInt>"u"?uU:Q}function uU(){throw Error("BigInt not supported")}function Y4(Q){return()=>{throw Error(Q+" is not implemented for node:buffer browser polyfill")}}var R2,B2,s5="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",R1,aQ,tQ,q$=50,h6=2147483647,X$=536870888,HU,jU,MU,FU,zU,LU,wU,t5,Q$=4096,fU,mU,cU,pU,lU=(Q)=>{for(let $ of Q)if($.charCodeAt(0)>127)return!1;return!0},dU,iU;var u2=rQ(()=>{R2=[],B2=[];for(R1=0,aQ=s5.length;R1<aQ;++R1)R2[R1]=s5[R1],B2[s5.charCodeAt(R1)]=R1;B2[45]=62;B2[95]=63;tQ=typeof Symbol==="function"&&typeof Symbol.for==="function"?Symbol.for("nodejs.util.inspect.custom"):null,HU=globalThis.btoa,jU=globalThis.atob,MU=globalThis.File,FU=globalThis.Blob,zU={MAX_LENGTH:h6,MAX_STRING_LENGTH:X$};LU=J4("ERR_BUFFER_OUT_OF_BOUNDS",function(Q){if(Q)return`${Q} is outside of buffer bounds`;return"Attempt to access memory outside buffer bounds"},RangeError),wU=J4("ERR_INVALID_ARG_TYPE",function(Q,$){return`The "${Q}" argument must be of type number. Received type ${typeof $}`},TypeError),t5=J4("ERR_OUT_OF_RANGE",function(Q,$,J){let q=`The value of "${Q}" is out of range.`,X=J;if(Number.isInteger(J)&&Math.abs(J)>4294967296)X=$$(String(J));else if(typeof J==="bigint"){if(X=String(J),J>BigInt(2)**BigInt(32)||J<-(BigInt(2)**BigInt(32)))X=$$(X);X+="n"}return q+=` It must be ${$}. Received ${X}`,q},RangeError);Object.defineProperty(b.prototype,"parent",{enumerable:!0,get:function(){if(!b.isBuffer(this))return;return this.buffer}});Object.defineProperty(b.prototype,"offset",{enumerable:!0,get:function(){if(!b.isBuffer(this))return;return this.byteOffset}});b.poolSize=8192;b.from=function(Q,$,J){return Y$(Q,$,J)};Object.setPrototypeOf(b.prototype,Uint8Array.prototype);Object.setPrototypeOf(b,Uint8Array);b.alloc=function(Q,$,J){return NU(Q,$,J)};b.allocUnsafe=function(Q){return q4(Q)};b.allocUnsafeSlow=function(Q){return q4(Q)};b.isBuffer=function(Q){return Q!=null&&Q._isBuffer===!0&&Q!==b.prototype};b.compare=function(Q,$){if(I2(Q,Uint8Array))Q=b.from(Q,Q.offset,Q.byteLength);if(I2($,Uint8Array))$=b.from($,$.offset,$.byteLength);if(!b.isBuffer(Q)||!b.isBuffer($))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(Q===$)return 0;let J=Q.length,q=$.length;for(let X=0,Y=Math.min(J,q);X<Y;++X)if(Q[X]!==$[X]){J=Q[X],q=$[X];break}if(J<q)return-1;if(q<J)return 1;return 0};b.isEncoding=function(Q){switch(String(Q).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}};b.concat=function(Q,$){if(!Array.isArray(Q))throw TypeError('"list" argument must be an Array of Buffers');if(Q.length===0)return b.alloc(0);let J;if($===void 0){$=0;for(J=0;J<Q.length;++J)$+=Q[J].length}let q=b.allocUnsafe($),X=0;for(J=0;J<Q.length;++J){let Y=Q[J];if(I2(Y,Uint8Array))if(X+Y.length>q.length){if(!b.isBuffer(Y))Y=b.from(Y);Y.copy(q,X)}else Uint8Array.prototype.set.call(q,Y,X);else if(!b.isBuffer(Y))throw TypeError('"list" argument must be an Array of Buffers');else Y.copy(q,X);X+=Y.length}return q};b.byteLength=B$;b.prototype._isBuffer=!0;b.prototype.swap16=function(){let Q=this.length;if(Q%2!==0)throw RangeError("Buffer size must be a multiple of 16-bits");for(let $=0;$<Q;$+=2)I1(this,$,$+1);return this};b.prototype.swap32=function(){let Q=this.length;if(Q%4!==0)throw RangeError("Buffer size must be a multiple of 32-bits");for(let $=0;$<Q;$+=4)I1(this,$,$+3),I1(this,$+1,$+2);return this};b.prototype.swap64=function(){let Q=this.length;if(Q%8!==0)throw RangeError("Buffer size must be a multiple of 64-bits");for(let $=0;$<Q;$+=8)I1(this,$,$+7),I1(this,$+1,$+6),I1(this,$+2,$+5),I1(this,$+3,$+4);return this};b.prototype.toString=function(){let Q=this.length;if(Q===0)return"";if(arguments.length===0)return G$(this,0,Q);return PU.apply(this,arguments)};b.prototype.toLocaleString=b.prototype.toString;b.prototype.equals=function(Q){if(!b.isBuffer(Q))throw TypeError("Argument must be a Buffer");if(this===Q)return!0;return b.compare(this,Q)===0};b.prototype.inspect=function(){let Q="",$=q$;if(Q=this.toString("hex",0,$).replace(/(.{2})/g,"$1 ").trim(),this.length>$)Q+=" ... ";return"<Buffer "+Q+">"};if(tQ)b.prototype[tQ]=b.prototype.inspect;b.prototype.compare=function(Q,$,J,q,X){if(I2(Q,Uint8Array))Q=b.from(Q,Q.offset,Q.byteLength);if(!b.isBuffer(Q))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof Q);if($===void 0)$=0;if(J===void 0)J=Q?Q.length:0;if(q===void 0)q=0;if(X===void 0)X=this.length;if($<0||J>Q.length||q<0||X>this.length)throw RangeError("out of range index");if(q>=X&&$>=J)return 0;if(q>=X)return-1;if($>=J)return 1;if($>>>=0,J>>>=0,q>>>=0,X>>>=0,this===Q)return 0;let Y=X-q,W=J-$,B=Math.min(Y,W),U=this.slice(q,X),G=Q.slice($,J);for(let V=0;V<B;++V)if(U[V]!==G[V]){Y=U[V],W=G[V];break}if(Y<W)return-1;if(W<Y)return 1;return 0};b.prototype.includes=function(Q,$,J){return this.indexOf(Q,$,J)!==-1};b.prototype.indexOf=function(Q,$,J){return U$(this,Q,$,J,!0)};b.prototype.lastIndexOf=function(Q,$,J){return U$(this,Q,$,J,!1)};b.prototype.write=function(Q,$,J,q){if($===void 0)q="utf8",J=this.length,$=0;else if(J===void 0&&typeof $==="string")q=$,J=this.length,$=0;else if(isFinite($))if($=$>>>0,isFinite(J)){if(J=J>>>0,q===void 0)q="utf8"}else q=J,J=void 0;else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let X=this.length-$;if(J===void 0||J>X)J=X;if(Q.length>0&&(J<0||$<0)||$>this.length)throw RangeError("Attempt to write outside buffer bounds");if(!q)q="utf8";let Y=!1;for(;;)switch(q){case"hex":return AU(this,Q,$,J);case"utf8":case"utf-8":return RU(this,Q,$,J);case"ascii":case"latin1":case"binary":return IU(this,Q,$,J);case"base64":return SU(this,Q,$,J);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return vU(this,Q,$,J);default:if(Y)throw TypeError("Unknown encoding: "+q);q=(""+q).toLowerCase(),Y=!0}};b.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};b.prototype.slice=function(Q,$){let J=this.length;if(Q=~~Q,$=$===void 0?J:~~$,Q<0){if(Q+=J,Q<0)Q=0}else if(Q>J)Q=J;if($<0){if($+=J,$<0)$=0}else if($>J)$=J;if($<Q)$=Q;let q=this.subarray(Q,$);return Object.setPrototypeOf(q,b.prototype),q};b.prototype.readUintLE=b.prototype.readUIntLE=function(Q,$,J){if(Q=Q>>>0,$=$>>>0,!J)y0(Q,$,this.length);let q=this[Q],X=1,Y=0;while(++Y<$&&(X*=256))q+=this[Q+Y]*X;return q};b.prototype.readUintBE=b.prototype.readUIntBE=function(Q,$,J){if(Q=Q>>>0,$=$>>>0,!J)y0(Q,$,this.length);let q=this[Q+--$],X=1;while($>0&&(X*=256))q+=this[Q+--$]*X;return q};b.prototype.readUint8=b.prototype.readUInt8=function(Q,$){if(Q=Q>>>0,!$)y0(Q,1,this.length);return this[Q]};b.prototype.readUint16LE=b.prototype.readUInt16LE=function(Q,$){if(Q=Q>>>0,!$)y0(Q,2,this.length);return this[Q]|this[Q+1]<<8};b.prototype.readUint16BE=b.prototype.readUInt16BE=function(Q,$){if(Q=Q>>>0,!$)y0(Q,2,this.length);return this[Q]<<8|this[Q+1]};b.prototype.readUint32LE=b.prototype.readUInt32LE=function(Q,$){if(Q=Q>>>0,!$)y0(Q,4,this.length);return(this[Q]|this[Q+1]<<8|this[Q+2]<<16)+this[Q+3]*16777216};b.prototype.readUint32BE=b.prototype.readUInt32BE=function(Q,$){if(Q=Q>>>0,!$)y0(Q,4,this.length);return this[Q]*16777216+(this[Q+1]<<16|this[Q+2]<<8|this[Q+3])};b.prototype.readBigUInt64LE=e2(function(Q){Q=Q>>>0,s1(Q,"offset");let $=this[Q],J=this[Q+7];if($===void 0||J===void 0)b6(Q,this.length-8);let q=$+this[++Q]*256+this[++Q]*65536+this[++Q]*16777216,X=this[++Q]+this[++Q]*256+this[++Q]*65536+J*16777216;return BigInt(q)+(BigInt(X)<<BigInt(32))});b.prototype.readBigUInt64BE=e2(function(Q){Q=Q>>>0,s1(Q,"offset");let $=this[Q],J=this[Q+7];if($===void 0||J===void 0)b6(Q,this.length-8);let q=$*16777216+this[++Q]*65536+this[++Q]*256+this[++Q],X=this[++Q]*16777216+this[++Q]*65536+this[++Q]*256+J;return(BigInt(q)<<BigInt(32))+BigInt(X)});b.prototype.readIntLE=function(Q,$,J){if(Q=Q>>>0,$=$>>>0,!J)y0(Q,$,this.length);let q=this[Q],X=1,Y=0;while(++Y<$&&(X*=256))q+=this[Q+Y]*X;if(X*=128,q>=X)q-=Math.pow(2,8*$);return q};b.prototype.readIntBE=function(Q,$,J){if(Q=Q>>>0,$=$>>>0,!J)y0(Q,$,this.length);let q=$,X=1,Y=this[Q+--q];while(q>0&&(X*=256))Y+=this[Q+--q]*X;if(X*=128,Y>=X)Y-=Math.pow(2,8*$);return Y};b.prototype.readInt8=function(Q,$){if(Q=Q>>>0,!$)y0(Q,1,this.length);if(!(this[Q]&128))return this[Q];return(255-this[Q]+1)*-1};b.prototype.readInt16LE=function(Q,$){if(Q=Q>>>0,!$)y0(Q,2,this.length);let J=this[Q]|this[Q+1]<<8;return J&32768?J|4294901760:J};b.prototype.readInt16BE=function(Q,$){if(Q=Q>>>0,!$)y0(Q,2,this.length);let J=this[Q+1]|this[Q]<<8;return J&32768?J|4294901760:J};b.prototype.readInt32LE=function(Q,$){if(Q=Q>>>0,!$)y0(Q,4,this.length);return this[Q]|this[Q+1]<<8|this[Q+2]<<16|this[Q+3]<<24};b.prototype.readInt32BE=function(Q,$){if(Q=Q>>>0,!$)y0(Q,4,this.length);return this[Q]<<24|this[Q+1]<<16|this[Q+2]<<8|this[Q+3]};b.prototype.readBigInt64LE=e2(function(Q){Q=Q>>>0,s1(Q,"offset");let $=this[Q],J=this[Q+7];if($===void 0||J===void 0)b6(Q,this.length-8);let q=this[Q+4]+this[Q+5]*256+this[Q+6]*65536+(J<<24);return(BigInt(q)<<BigInt(32))+BigInt($+this[++Q]*256+this[++Q]*65536+this[++Q]*16777216)});b.prototype.readBigInt64BE=e2(function(Q){Q=Q>>>0,s1(Q,"offset");let $=this[Q],J=this[Q+7];if($===void 0||J===void 0)b6(Q,this.length-8);let q=($<<24)+this[++Q]*65536+this[++Q]*256+this[++Q];return(BigInt(q)<<BigInt(32))+BigInt(this[++Q]*16777216+this[++Q]*65536+this[++Q]*256+J)});b.prototype.readFloatLE=function(Q,$){if(Q=Q>>>0,!$)y0(Q,4,this.length);return v8(this,Q,!0,23,4)};b.prototype.readFloatBE=function(Q,$){if(Q=Q>>>0,!$)y0(Q,4,this.length);return v8(this,Q,!1,23,4)};b.prototype.readDoubleLE=function(Q,$){if(Q=Q>>>0,!$)y0(Q,8,this.length);return v8(this,Q,!0,52,8)};b.prototype.readDoubleBE=function(Q,$){if(Q=Q>>>0,!$)y0(Q,8,this.length);return v8(this,Q,!1,52,8)};b.prototype.writeUintLE=b.prototype.writeUIntLE=function(Q,$,J,q){if(Q=+Q,$=$>>>0,J=J>>>0,!q){let W=Math.pow(2,8*J)-1;a0(this,Q,$,J,W,0)}let X=1,Y=0;this[$]=Q&255;while(++Y<J&&(X*=256))this[$+Y]=Q/X&255;return $+J};b.prototype.writeUintBE=b.prototype.writeUIntBE=function(Q,$,J,q){if(Q=+Q,$=$>>>0,J=J>>>0,!q){let W=Math.pow(2,8*J)-1;a0(this,Q,$,J,W,0)}let X=J-1,Y=1;this[$+X]=Q&255;while(--X>=0&&(Y*=256))this[$+X]=Q/Y&255;return $+J};b.prototype.writeUint8=b.prototype.writeUInt8=function(Q,$,J){if(Q=+Q,$=$>>>0,!J)a0(this,Q,$,1,255,0);return this[$]=Q&255,$+1};b.prototype.writeUint16LE=b.prototype.writeUInt16LE=function(Q,$,J){if(Q=+Q,$=$>>>0,!J)a0(this,Q,$,2,65535,0);return this[$]=Q&255,this[$+1]=Q>>>8,$+2};b.prototype.writeUint16BE=b.prototype.writeUInt16BE=function(Q,$,J){if(Q=+Q,$=$>>>0,!J)a0(this,Q,$,2,65535,0);return this[$]=Q>>>8,this[$+1]=Q&255,$+2};b.prototype.writeUint32LE=b.prototype.writeUInt32LE=function(Q,$,J){if(Q=+Q,$=$>>>0,!J)a0(this,Q,$,4,4294967295,0);return this[$+3]=Q>>>24,this[$+2]=Q>>>16,this[$+1]=Q>>>8,this[$]=Q&255,$+4};b.prototype.writeUint32BE=b.prototype.writeUInt32BE=function(Q,$,J){if(Q=+Q,$=$>>>0,!J)a0(this,Q,$,4,4294967295,0);return this[$]=Q>>>24,this[$+1]=Q>>>16,this[$+2]=Q>>>8,this[$+3]=Q&255,$+4};b.prototype.writeBigUInt64LE=e2(function(Q,$=0){return V$(this,Q,$,BigInt(0),BigInt("0xffffffffffffffff"))});b.prototype.writeBigUInt64BE=e2(function(Q,$=0){return K$(this,Q,$,BigInt(0),BigInt("0xffffffffffffffff"))});b.prototype.writeIntLE=function(Q,$,J,q){if(Q=+Q,$=$>>>0,!q){let B=Math.pow(2,8*J-1);a0(this,Q,$,J,B-1,-B)}let X=0,Y=1,W=0;this[$]=Q&255;while(++X<J&&(Y*=256)){if(Q<0&&W===0&&this[$+X-1]!==0)W=1;this[$+X]=(Q/Y>>0)-W&255}return $+J};b.prototype.writeIntBE=function(Q,$,J,q){if(Q=+Q,$=$>>>0,!q){let B=Math.pow(2,8*J-1);a0(this,Q,$,J,B-1,-B)}let X=J-1,Y=1,W=0;this[$+X]=Q&255;while(--X>=0&&(Y*=256)){if(Q<0&&W===0&&this[$+X+1]!==0)W=1;this[$+X]=(Q/Y>>0)-W&255}return $+J};b.prototype.writeInt8=function(Q,$,J){if(Q=+Q,$=$>>>0,!J)a0(this,Q,$,1,127,-128);if(Q<0)Q=255+Q+1;return this[$]=Q&255,$+1};b.prototype.writeInt16LE=function(Q,$,J){if(Q=+Q,$=$>>>0,!J)a0(this,Q,$,2,32767,-32768);return this[$]=Q&255,this[$+1]=Q>>>8,$+2};b.prototype.writeInt16BE=function(Q,$,J){if(Q=+Q,$=$>>>0,!J)a0(this,Q,$,2,32767,-32768);return this[$]=Q>>>8,this[$+1]=Q&255,$+2};b.prototype.writeInt32LE=function(Q,$,J){if(Q=+Q,$=$>>>0,!J)a0(this,Q,$,4,2147483647,-2147483648);return this[$]=Q&255,this[$+1]=Q>>>8,this[$+2]=Q>>>16,this[$+3]=Q>>>24,$+4};b.prototype.writeInt32BE=function(Q,$,J){if(Q=+Q,$=$>>>0,!J)a0(this,Q,$,4,2147483647,-2147483648);if(Q<0)Q=4294967295+Q+1;return this[$]=Q>>>24,this[$+1]=Q>>>16,this[$+2]=Q>>>8,this[$+3]=Q&255,$+4};b.prototype.writeBigInt64LE=e2(function(Q,$=0){return V$(this,Q,$,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});b.prototype.writeBigInt64BE=e2(function(Q,$=0){return K$(this,Q,$,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});b.prototype.writeFloatLE=function(Q,$,J){return j$(this,Q,$,!0,J)};b.prototype.writeFloatBE=function(Q,$,J){return j$(this,Q,$,!1,J)};b.prototype.writeDoubleLE=function(Q,$,J){return M$(this,Q,$,!0,J)};b.prototype.writeDoubleBE=function(Q,$,J){return M$(this,Q,$,!1,J)};b.prototype.copy=function(Q,$,J,q){if(!b.isBuffer(Q))throw TypeError("argument should be a Buffer");if(!J)J=0;if(!q&&q!==0)q=this.length;if($>=Q.length)$=Q.length;if(!$)$=0;if(q>0&&q<J)q=J;if(q===J)return 0;if(Q.length===0||this.length===0)return 0;if($<0)throw RangeError("targetStart out of bounds");if(J<0||J>=this.length)throw RangeError("Index out of range");if(q<0)throw RangeError("sourceEnd out of bounds");if(q>this.length)q=this.length;if(Q.length-$<q-J)q=Q.length-$+J;let X=q-J;if(this===Q&&typeof Uint8Array.prototype.copyWithin==="function")this.copyWithin($,J,q);else Uint8Array.prototype.set.call(Q,this.subarray(J,q),$);return X};b.prototype.fill=function(Q,$,J,q){if(typeof Q==="string"){if(typeof $==="string")q=$,$=0,J=this.length;else if(typeof J==="string")q=J,J=this.length;if(q!==void 0&&typeof q!=="string")throw TypeError("encoding must be a string");if(typeof q==="string"&&!b.isEncoding(q))throw TypeError("Unknown encoding: "+q);if(Q.length===1){let Y=Q.charCodeAt(0);if(q==="utf8"&&Y<128||q==="latin1")Q=Y}}else if(typeof Q==="number")Q=Q&255;else if(typeof Q==="boolean")Q=Number(Q);if($<0||this.length<$||this.length<J)throw RangeError("Out of range index");if(J<=$)return this;if($=$>>>0,J=J===void 0?this.length:J>>>0,!Q)Q=0;let X;if(typeof Q==="number")for(X=$;X<J;++X)this[X]=Q;else{let Y=b.isBuffer(Q)?Q:b.from(Q,q),W=Y.length;if(W===0)throw TypeError('The value "'+Q+'" is invalid for argument "value"');for(X=0;X<J-$;++X)this[X+$]=Y[X%W]}return this};fU=/[^+/0-9A-Za-z-_]/g;mU=function(){let Q=Array(256);for(let $=0;$<16;++$){let J=$*16;for(let q=0;q<16;++q)Q[J+q]="0123456789abcdef"[$]+"0123456789abcdef"[q]}return Q}();cU=Y4("resolveObjectURL"),pU=Y4("isUtf8"),dU=Y4("transcode"),iU=b});var u6={};a5(u6,{setMaxListeners:()=>S$,once:()=>R$,listenerCount:()=>v$,init:()=>Q1,getMaxListeners:()=>Z$,getEventListeners:()=>I$,default:()=>$G,captureRejectionSymbol:()=>C$,addAbortListener:()=>k$,EventEmitter:()=>Q1});function O$(Q,$){var{_events:J}=Q;if($[0]??=Error("Unhandled error."),!J)throw $[0];var q=J[D$];if(q)for(var X of w$.call(q))X.apply(Q,$);var Y=J.error;if(!Y)throw $[0];for(var X of w$.call(Y))X.apply(Q,$);return!0}function rU(Q,$,J,q){$.then(void 0,function(X){queueMicrotask(()=>aU(Q,X,J,q))})}function aU(Q,$,J,q){if(typeof Q[L$]==="function")Q[L$]($,J,...q);else try{Q[S1]=!1,Q.emit("error",$)}finally{Q[S1]=!0}}function P$(Q,$,J){J.warned=!0;let q=Error(`Possible EventEmitter memory leak detected. ${J.length} ${String($)} listeners added to [${Q.constructor.name}]. Use emitter.setMaxListeners() to increase limit`);q.name="MaxListenersExceededWarning",q.emitter=Q,q.type=$,q.count=J.length,console.warn(q)}function A$(Q,$,...J){this.removeListener(Q,$),$.apply(this,J)}function R$(Q,$,J){var q=J?.signal;if(E$(q,"options.signal"),q?.aborted)throw new W4(void 0,{cause:q?.reason});let{resolve:X,reject:Y,promise:W}=$newPromiseCapability(Promise),B=(V)=>{if(Q.removeListener($,U),q!=null)Z8(q,"abort",G);Y(V)},U=(...V)=>{if(typeof Q.removeListener==="function")Q.removeListener("error",B);if(q!=null)Z8(q,"abort",G);X(V)};if(N$(Q,$,U,{once:!0}),$!=="error"&&typeof Q.once==="function")Q.once("error",B);function G(){Z8(Q,$,U),Z8(Q,"error",B),Y(new W4(void 0,{cause:q?.reason}))}if(q!=null)N$(q,"abort",G,{once:!0});return W}function I$(Q,$){return Q.listeners($)}function S$(Q,...$){U4(Q,"setMaxListeners",0);var J;if($&&(J=$.length))for(let q=0;q<J;q++)$[q].setMaxListeners(Q);else v1=Q}function v$(Q,$){return Q.listenerCount($)}function Z8(Q,$,J,q){if(typeof Q.removeListener==="function")Q.removeListener($,J);else Q.removeEventListener($,J,q)}function N$(Q,$,J,q){if(typeof Q.on==="function")if(q.once)Q.once($,J);else Q.on($,J);else Q.addEventListener($,J,q)}function t1(Q,$,J){let q=TypeError(`The "${Q}" argument must be of type ${$}. Received ${J}`);return q.code="ERR_INVALID_ARG_TYPE",q}function eU(Q,$,J){let q=RangeError(`The "${Q}" argument is out of range. It must be ${$}. Received ${J}`);return q.code="ERR_OUT_OF_RANGE",q}function E$(Q,$){if(Q!==void 0&&(Q===null||typeof Q!=="object"||!("aborted"in Q)))throw t1($,"AbortSignal",Q)}function U4(Q,$,J,q){if(typeof Q!=="number")throw t1($,"number",Q);if(J!=null&&Q<J||q!=null&&Q>q||(J!=null||q!=null)&&Number.isNaN(Q))throw eU($,`${J!=null?`>= ${J}`:""}${J!=null&&q!=null?" && ":""}${q!=null?`<= ${q}`:""}`,Q)}function m6(Q){if(typeof Q!=="function")throw TypeError("The listener must be a function")}function QG(Q,$){if(typeof Q!=="boolean")throw t1($,"boolean",Q)}function Z$(Q){return Q?._maxListeners??v1}function k$(Q,$){if(Q===void 0)throw t1("signal","AbortSignal",Q);if(E$(Q,"signal"),typeof $!=="function")throw t1("listener","function",$);let J;if(Q.aborted)queueMicrotask(()=>$());else Q.addEventListener("abort",$,{__proto__:null,once:!0}),J=()=>{Q.removeEventListener("abort",$)};return{__proto__:null,[Symbol.dispose](){J?.()}}}var B4,S1,D$,nU,oU,L$,C$,w$,v1=10,Q1=function(Q){if(this._events===void 0||this._events===this.__proto__._events)this._events={__proto__:null},this._eventsCount=0;if(this._maxListeners??=void 0,this[S1]=Q?.captureRejections?Boolean(Q?.captureRejections):Z0[S1])this.emit=tU},Z0,sU=function(Q,...$){if(Q==="error")return O$(this,$);var{_events:J}=this;if(J===void 0)return!1;var q=J[Q];if(q===void 0)return!1;let X=q.length>1?q.slice():q;for(let Y=0,{length:W}=X;Y<W;Y++){let B=X[Y];switch($.length){case 0:B.call(this);break;case 1:B.call(this,$[0]);break;case 2:B.call(this,$[0],$[1]);break;case 3:B.call(this,$[0],$[1],$[2]);break;default:B.apply(this,$);break}}return!0},tU=function(Q,...$){if(Q==="error")return O$(this,$);var{_events:J}=this;if(J===void 0)return!1;var q=J[Q];if(q===void 0)return!1;let X=q.length>1?q.slice():q;for(let Y=0,{length:W}=X;Y<W;Y++){let B=X[Y],U;switch($.length){case 0:U=B.call(this);break;case 1:U=B.call(this,$[0]);break;case 2:U=B.call(this,$[0],$[1]);break;case 3:U=B.call(this,$[0],$[1],$[2]);break;default:U=B.apply(this,$);break}if(U!==void 0&&typeof U?.then==="function"&&U.then===Promise.prototype.then)rU(this,U,Q,$)}return!0},W4,$G;var c6=rQ(()=>{B4=Symbol.for,S1=Symbol("kCapture"),D$=B4("events.errorMonitor"),nU=Symbol("events.maxEventTargetListeners"),oU=Symbol("events.maxEventTargetListenersWarned"),L$=B4("nodejs.rejection"),C$=B4("nodejs.rejection"),w$=Array.prototype.slice,Z0=Q1.prototype={};Z0._events=void 0;Z0._eventsCount=0;Z0._maxListeners=void 0;Z0.setMaxListeners=function(Q){return U4(Q,"setMaxListeners",0),this._maxListeners=Q,this};Z0.constructor=Q1;Z0.getMaxListeners=function(){return this?._maxListeners??v1};Z0.emit=sU;Z0.addListener=function(Q,$){m6($);var J=this._events;if(!J)J=this._events={__proto__:null},this._eventsCount=0;else if(J.newListener)this.emit("newListener",Q,$.listener??$);var q=J[Q];if(!q)J[Q]=[$],this._eventsCount++;else{q.push($);var X=this._maxListeners??v1;if(X>0&&q.length>X&&!q.warned)P$(this,Q,q)}return this};Z0.on=Z0.addListener;Z0.prependListener=function(Q,$){m6($);var J=this._events;if(!J)J=this._events={__proto__:null},this._eventsCount=0;else if(J.newListener)this.emit("newListener",Q,$.listener??$);var q=J[Q];if(!q)J[Q]=[$],this._eventsCount++;else{q.unshift($);var X=this._maxListeners??v1;if(X>0&&q.length>X&&!q.warned)P$(this,Q,q)}return this};Z0.once=function(Q,$){m6($);let J=A$.bind(this,Q,$);return J.listener=$,this.addListener(Q,J),this};Z0.prependOnceListener=function(Q,$){m6($);let J=A$.bind(this,Q,$);return J.listener=$,this.prependListener(Q,J),this};Z0.removeListener=function(Q,$){m6($);var{_events:J}=this;if(!J)return this;var q=J[Q];if(!q)return this;var X=q.length;let Y=-1;for(let W=X-1;W>=0;W--)if(q[W]===$||q[W].listener===$){Y=W;break}if(Y<0)return this;if(Y===0)q.shift();else q.splice(Y,1);if(q.length===0)delete J[Q],this._eventsCount--;return this};Z0.off=Z0.removeListener;Z0.removeAllListeners=function(Q){var{_events:$}=this;if(Q&&$){if($[Q])delete $[Q],this._eventsCount--}else this._events={__proto__:null};return this};Z0.listeners=function(Q){var{_events:$}=this;if(!$)return[];var J=$[Q];if(!J)return[];return J.map((q)=>q.listener??q)};Z0.rawListeners=function(Q){var{_events:$}=this;if(!$)return[];var J=$[Q];if(!J)return[];return J.slice()};Z0.listenerCount=function(Q){var{_events:$}=this;if(!$)return 0;return $[Q]?.length??0};Z0.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};Z0[S1]=!1;W4=class W4 extends Error{constructor(Q="The operation was aborted",$=void 0){if($!==void 0&&typeof $!=="object")throw t1("options","Object",$);super(Q,$);this.code="ABORT_ERR",this.name="AbortError"}};Object.defineProperties(Q1,{captureRejections:{get(){return Z0[S1]},set(Q){QG(Q,"EventEmitter.captureRejections"),Z0[S1]=Q},enumerable:!0},defaultMaxListeners:{enumerable:!0,get:()=>{return v1},set:(Q)=>{U4(Q,"defaultMaxListeners",0),v1=Q}},kMaxEventTargetListeners:{value:nU,enumerable:!1,configurable:!1,writable:!1},kMaxEventTargetListenersWarned:{value:oU,enumerable:!1,configurable:!1,writable:!1}});Object.assign(Q1,{once:R$,getEventListeners:I$,getMaxListeners:Z$,setMaxListeners:S$,EventEmitter:Q1,usingDomains:!1,captureRejectionSymbol:C$,errorMonitor:D$,addAbortListener:k$,init:Q1,listenerCount:v$});$G=Q1});var g8=f((RN,b$)=>{var S0=(Q,$)=>()=>($||Q(($={exports:{}}).exports,$),$.exports),T0=S0((Q,$)=>{class J extends Error{constructor(q){if(!Array.isArray(q))throw TypeError(`Expected input to be an Array, got ${typeof q}`);let X="";for(let Y=0;Y<q.length;Y++)X+=` ${q[Y].stack}
|
|
2
|
-
`;super(X);this.name="AggregateError",this.errors=q}}$.exports={AggregateError:J,ArrayIsArray(q){return Array.isArray(q)},ArrayPrototypeIncludes(q,X){return q.includes(X)},ArrayPrototypeIndexOf(q,X){return q.indexOf(X)},ArrayPrototypeJoin(q,X){return q.join(X)},ArrayPrototypeMap(q,X){return q.map(X)},ArrayPrototypePop(q,X){return q.pop(X)},ArrayPrototypePush(q,X){return q.push(X)},ArrayPrototypeSlice(q,X,Y){return q.slice(X,Y)},Error,FunctionPrototypeCall(q,X,...Y){return q.call(X,...Y)},FunctionPrototypeSymbolHasInstance(q,X){return Function.prototype[Symbol.hasInstance].call(q,X)},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,X){return Object.defineProperties(q,X)},ObjectDefineProperty(q,X,Y){return Object.defineProperty(q,X,Y)},ObjectGetOwnPropertyDescriptor(q,X){return Object.getOwnPropertyDescriptor(q,X)},ObjectKeys(q){return Object.keys(q)},ObjectSetPrototypeOf(q,X){return Object.setPrototypeOf(q,X)},Promise,PromisePrototypeCatch(q,X){return q.catch(X)},PromisePrototypeThen(q,X,Y){return q.then(X,Y)},PromiseReject(q){return Promise.reject(q)},PromiseResolve(q){return Promise.resolve(q)},ReflectApply:Reflect.apply,RegExpPrototypeTest(q,X){return q.test(X)},SafeSet:Set,String,StringPrototypeSlice(q,X,Y){return q.slice(X,Y)},StringPrototypeToLowerCase(q){return q.toLowerCase()},StringPrototypeToUpperCase(q){return q.toUpperCase()},StringPrototypeTrim(q){return q.trim()},Symbol,SymbolFor:Symbol.for,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,SymbolDispose:Symbol.dispose||Symbol("Symbol.dispose"),SymbolAsyncDispose:Symbol.asyncDispose||Symbol("Symbol.asyncDispose"),TypedArrayPrototypeSet(q,X,Y){return q.set(X,Y)},Boolean,Uint8Array}}),T$=S0((Q,$)=>{$.exports={format(J,...q){return J.replace(/%([sdifj])/g,function(...[X,Y]){let W=q.shift();if(Y==="f")return W.toFixed(6);else if(Y==="j")return JSON.stringify(W);else if(Y==="s"&&typeof W==="object")return`${W.constructor!==Object?W.constructor.name:""} {}`.trim();else return W.toString()})},inspect(J){switch(typeof J){case"string":if(J.includes("'")){if(!J.includes('"'))return`"${J}"`;else if(!J.includes("`")&&!J.includes("${"))return`\`${J}\``}return`'${J}'`;case"number":if(isNaN(J))return"NaN";else if(Object.is(J,-0))return String(J);return J;case"bigint":return`${String(J)}n`;case"boolean":case"undefined":return String(J);case"object":return"{}"}}}}),n0=S0((Q,$)=>{var{format:J,inspect:q}=T$(),{AggregateError:X}=T0(),Y=globalThis.AggregateError||X,W=Symbol("kIsNodeError"),B=["string","function","number","object","Function","Object","boolean","bigint","symbol"],U=/^([A-Z][a-z0-9]*)+$/,G={};function V(O,K){if(!O)throw new G.ERR_INTERNAL_ASSERTION(K)}function F(O){let K="",L=O.length,w=O[0]==="-"?1:0;for(;L>=w+4;L-=3)K=`_${O.slice(L-3,L)}${K}`;return`${O.slice(0,L)}${K}`}function M(O,K,L){if(typeof K==="function")return V(K.length<=L.length,`Code: ${O}; The provided arguments length (${L.length}) does not match the required ones (${K.length}).`),K(...L);let w=(K.match(/%[dfijoOs]/g)||[]).length;if(V(w===L.length,`Code: ${O}; The provided arguments length (${L.length}) does not match the required ones (${w}).`),L.length===0)return K;return J(K,...L)}function H(O,K,L){if(!L)L=Error;class w extends L{constructor(...P){super(M(O,K,P))}toString(){return`${this.name} [${O}]: ${this.message}`}}Object.defineProperties(w.prototype,{name:{value:L.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${O}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),w.prototype.code=O,w.prototype[W]=!0,G[O]=w}function _(O){let K="__node_internal_"+O.name;return Object.defineProperty(O,"name",{value:K}),O}function T(O,K){if(O&&K&&O!==K){if(Array.isArray(K.errors))return K.errors.push(O),K;let L=new Y([K,O],K.message);return L.code=K.code,L}return O||K}class C extends Error{constructor(O="The operation was aborted",K=void 0){if(K!==void 0&&typeof K!=="object")throw new G.ERR_INVALID_ARG_TYPE("options","Object",K);super(O,K);this.code="ABORT_ERR",this.name="AbortError"}}H("ERR_ASSERTION","%s",Error),H("ERR_INVALID_ARG_TYPE",(O,K,L)=>{if(V(typeof O==="string","'name' must be a string"),!Array.isArray(K))K=[K];let w="The ";if(O.endsWith(" argument"))w+=`${O} `;else w+=`"${O}" ${O.includes(".")?"property":"argument"} `;w+="must be ";let P=[],h=[],k=[];for(let S of K)if(V(typeof S==="string","All expected entries have to be of type string"),B.includes(S))P.push(S.toLowerCase());else if(U.test(S))h.push(S);else V(S!=="object",'The value "object" should be written as "Object"'),k.push(S);if(h.length>0){let S=P.indexOf("object");if(S!==-1)P.splice(P,S,1),h.push("Object")}if(P.length>0){switch(P.length){case 1:w+=`of type ${P[0]}`;break;case 2:w+=`one of type ${P[0]} or ${P[1]}`;break;default:{let S=P.pop();w+=`one of type ${P.join(", ")}, or ${S}`}}if(h.length>0||k.length>0)w+=" or "}if(h.length>0){switch(h.length){case 1:w+=`an instance of ${h[0]}`;break;case 2:w+=`an instance of ${h[0]} or ${h[1]}`;break;default:{let S=h.pop();w+=`an instance of ${h.join(", ")}, or ${S}`}}if(k.length>0)w+=" or "}switch(k.length){case 0:break;case 1:if(k[0].toLowerCase()!==k[0])w+="an ";w+=`${k[0]}`;break;case 2:w+=`one of ${k[0]} or ${k[1]}`;break;default:{let S=k.pop();w+=`one of ${k.join(", ")}, or ${S}`}}if(L==null)w+=`. Received ${L}`;else if(typeof L==="function"&&L.name)w+=`. Received function ${L.name}`;else if(typeof L==="object"){var d;if((d=L.constructor)!==null&&d!==void 0&&d.name)w+=`. Received an instance of ${L.constructor.name}`;else{let S=q(L,{depth:-1});w+=`. Received ${S}`}}else{let S=q(L,{colors:!1});if(S.length>25)S=`${S.slice(0,25)}...`;w+=`. Received type ${typeof L} (${S})`}return w},TypeError),H("ERR_INVALID_ARG_VALUE",(O,K,L="is invalid")=>{let w=q(K);if(w.length>128)w=w.slice(0,128)+"...";return`The ${O.includes(".")?"property":"argument"} '${O}' ${L}. Received ${w}`},TypeError),H("ERR_INVALID_RETURN_VALUE",(O,K,L)=>{var w;let P=L!==null&&L!==void 0&&(w=L.constructor)!==null&&w!==void 0&&w.name?`instance of ${L.constructor.name}`:`type ${typeof L}`;return`Expected ${O} to be returned from the "${K}" function but got ${P}.`},TypeError),H("ERR_MISSING_ARGS",(...O)=>{V(O.length>0,"At least one arg needs to be specified");let K,L=O.length;switch(O=(Array.isArray(O)?O:[O]).map((w)=>`"${w}"`).join(" or "),L){case 1:K+=`The ${O[0]} argument`;break;case 2:K+=`The ${O[0]} and ${O[1]} arguments`;break;default:{let w=O.pop();K+=`The ${O.join(", ")}, and ${w} arguments`}break}return`${K} must be specified`},TypeError),H("ERR_OUT_OF_RANGE",(O,K,L)=>{V(K,'Missing "range" argument');let w;if(Number.isInteger(L)&&Math.abs(L)>4294967296)w=F(String(L));else if(typeof L==="bigint"){w=String(L);let P=BigInt(2)**BigInt(32);if(L>P||L<-P)w=F(w);w+="n"}else w=q(L);return`The value of "${O}" is out of range. It must be ${K}. Received ${w}`},RangeError),H("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error),H("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error),H("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error),H("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error),H("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error),H("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),H("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error),H("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error),H("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error),H("ERR_STREAM_WRITE_AFTER_END","write after end",Error),H("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError),$.exports={AbortError:C,aggregateTwoErrors:_(T),hideStackFrames:_,codes:G}}),JG=S0((Q,$)=>{Object.defineProperty(Q,"__esModule",{value:!0});var J=new WeakMap,q=new WeakMap;function X(v){let A=J.get(v);return console.assert(A!=null,"'this' is expected an Event object, but got",v),A}function Y(v){if(v.passiveListener!=null){if(typeof console<"u"&&typeof console.error==="function")console.error("Unable to preventDefault inside passive event listener invocation.",v.passiveListener);return}if(!v.event.cancelable)return;if(v.canceled=!0,typeof v.event.preventDefault==="function")v.event.preventDefault()}function W(v,A){J.set(this,{eventTarget:v,event:A,eventPhase:2,currentTarget:v,canceled:!1,stopped:!1,immediateStopped:!1,passiveListener:null,timeStamp:A.timeStamp||Date.now()}),Object.defineProperty(this,"isTrusted",{value:!1,enumerable:!0});let N=Object.keys(A);for(let x=0;x<N.length;++x){let y=N[x];if(!(y in this))Object.defineProperty(this,y,B(y))}}if(W.prototype={get type(){return X(this).event.type},get target(){return X(this).eventTarget},get currentTarget(){return X(this).currentTarget},composedPath(){let v=X(this).currentTarget;if(v==null)return[];return[v]},get NONE(){return 0},get CAPTURING_PHASE(){return 1},get AT_TARGET(){return 2},get BUBBLING_PHASE(){return 3},get eventPhase(){return X(this).eventPhase},stopPropagation(){let v=X(this);if(v.stopped=!0,typeof v.event.stopPropagation==="function")v.event.stopPropagation()},stopImmediatePropagation(){let v=X(this);if(v.stopped=!0,v.immediateStopped=!0,typeof v.event.stopImmediatePropagation==="function")v.event.stopImmediatePropagation()},get bubbles(){return Boolean(X(this).event.bubbles)},get cancelable(){return Boolean(X(this).event.cancelable)},preventDefault(){Y(X(this))},get defaultPrevented(){return X(this).canceled},get composed(){return Boolean(X(this).event.composed)},get timeStamp(){return X(this).timeStamp},get srcElement(){return X(this).eventTarget},get cancelBubble(){return X(this).stopped},set cancelBubble(v){if(!v)return;let A=X(this);if(A.stopped=!0,typeof A.event.cancelBubble==="boolean")A.event.cancelBubble=!0},get returnValue(){return!X(this).canceled},set returnValue(v){if(!v)Y(X(this))},initEvent(){}},Object.defineProperty(W.prototype,"constructor",{value:W,configurable:!0,writable:!0}),typeof window<"u"&&typeof window.Event<"u")Object.setPrototypeOf(W.prototype,window.Event.prototype),q.set(window.Event.prototype,W);function B(v){return{get(){return X(this).event[v]},set(A){X(this).event[v]=A},configurable:!0,enumerable:!0}}function U(v){return{value(){let A=X(this).event;return A[v].apply(A,arguments)},configurable:!0,enumerable:!0}}function G(v,A){let N=Object.keys(A);if(N.length===0)return v;function x(y,Z){v.call(this,y,Z)}x.prototype=Object.create(v.prototype,{constructor:{value:x,configurable:!0,writable:!0}});for(let y=0;y<N.length;++y){let Z=N[y];if(!(Z in v.prototype)){let t=typeof Object.getOwnPropertyDescriptor(A,Z).value==="function";Object.defineProperty(x.prototype,Z,t?U(Z):B(Z))}}return x}function V(v){if(v==null||v===Object.prototype)return W;let A=q.get(v);if(A==null)A=G(V(Object.getPrototypeOf(v)),v),q.set(v,A);return A}function F(v,A){return new(V(Object.getPrototypeOf(A)))(v,A)}function M(v){return X(v).immediateStopped}function H(v,A){X(v).eventPhase=A}function _(v,A){X(v).currentTarget=A}function T(v,A){X(v).passiveListener=A}var C=new WeakMap,O=1,K=2,L=3;function w(v){return v!==null&&typeof v==="object"}function P(v){let A=C.get(v);if(A==null)throw TypeError("'this' is expected an EventTarget object, but got another value.");return A}function h(v){return{get(){let A=P(this).get(v);while(A!=null){if(A.listenerType===L)return A.listener;A=A.next}return null},set(A){if(typeof A!=="function"&&!w(A))A=null;let N=P(this),x=null,y=N.get(v);while(y!=null){if(y.listenerType===L)if(x!==null)x.next=y.next;else if(y.next!==null)N.set(v,y.next);else N.delete(v);else x=y;y=y.next}if(A!==null){let Z={listener:A,listenerType:L,passive:!1,once:!1,next:null};if(x===null)N.set(v,Z);else x.next=Z}},configurable:!0,enumerable:!0}}function k(v,A){Object.defineProperty(v,`on${A}`,h(A))}function d(v){function A(){S.call(this)}A.prototype=Object.create(S.prototype,{constructor:{value:A,configurable:!0,writable:!0}});for(let N=0;N<v.length;++N)k(A.prototype,v[N]);return A}function S(){if(this instanceof S){C.set(this,new Map);return}if(arguments.length===1&&Array.isArray(arguments[0]))return d(arguments[0]);if(arguments.length>0){let v=Array(arguments.length);for(let A=0;A<arguments.length;++A)v[A]=arguments[A];return d(v)}throw TypeError("Cannot call a class as a function")}if(S.prototype={addEventListener(v,A,N){if(A==null)return;if(typeof A!=="function"&&!w(A))throw TypeError("'listener' should be a function or an object.");let x=P(this),y=w(N),Z=(y?Boolean(N.capture):Boolean(N))?O:K,t={listener:A,listenerType:Z,passive:y&&Boolean(N.passive),once:y&&Boolean(N.once),next:null},q0=x.get(v);if(q0===void 0){x.set(v,t);return}let U0=null;while(q0!=null){if(q0.listener===A&&q0.listenerType===Z)return;U0=q0,q0=q0.next}U0.next=t},removeEventListener(v,A,N){if(A==null)return;let x=P(this),y=(w(N)?Boolean(N.capture):Boolean(N))?O:K,Z=null,t=x.get(v);while(t!=null){if(t.listener===A&&t.listenerType===y){if(Z!==null)Z.next=t.next;else if(t.next!==null)x.set(v,t.next);else x.delete(v);return}Z=t,t=t.next}},dispatchEvent(v){if(v==null||typeof v.type!=="string")throw TypeError('"event.type" should be a string.');let A=P(this),N=v.type,x=A.get(N);if(x==null)return!0;let y=F(this,v),Z=null;while(x!=null){if(x.once)if(Z!==null)Z.next=x.next;else if(x.next!==null)A.set(N,x.next);else A.delete(N);else Z=x;if(T(y,x.passive?x.listener:null),typeof x.listener==="function")try{x.listener.call(this,y)}catch(t){if(typeof console<"u"&&typeof console.error==="function")console.error(t)}else if(x.listenerType!==L&&typeof x.listener.handleEvent==="function")x.listener.handleEvent(y);if(M(y))break;x=x.next}return T(y,null),H(y,0),_(y,null),!y.defaultPrevented}},Object.defineProperty(S.prototype,"constructor",{value:S,configurable:!0,writable:!0}),typeof window<"u"&&typeof window.EventTarget<"u")Object.setPrototypeOf(S.prototype,window.EventTarget.prototype);Q.defineEventAttribute=k,Q.EventTarget=S,Q.default=S,$.exports=S,$.exports.EventTarget=$.exports.default=S,$.exports.defineEventAttribute=k}),p6=S0((Q,$)=>{Object.defineProperty(Q,"__esModule",{value:!0});var J=JG();class q extends J.EventTarget{constructor(){super();throw TypeError("AbortSignal cannot be constructed directly")}get aborted(){let V=W.get(this);if(typeof V!=="boolean")throw TypeError(`Expected 'this' to be an 'AbortSignal' object, but got ${this===null?"null":typeof this}`);return V}}J.defineEventAttribute(q.prototype,"abort");function X(){let V=Object.create(q.prototype);return J.EventTarget.call(V),W.set(V,!1),V}function Y(V){if(W.get(V)!==!1)return;W.set(V,!0),V.dispatchEvent({type:"abort"})}var W=new WeakMap;if(Object.defineProperties(q.prototype,{aborted:{enumerable:!0}}),typeof Symbol==="function"&&typeof Symbol.toStringTag==="symbol")Object.defineProperty(q.prototype,Symbol.toStringTag,{configurable:!0,value:"AbortSignal"});class B{constructor(){U.set(this,X())}get signal(){return G(this)}abort(){Y(G(this))}}var U=new WeakMap;function G(V){let F=U.get(V);if(F==null)throw TypeError(`Expected 'this' to be an 'AbortController' object, but got ${V===null?"null":typeof V}`);return F}if(Object.defineProperties(B.prototype,{signal:{enumerable:!0},abort:{enumerable:!0}}),typeof Symbol==="function"&&typeof Symbol.toStringTag==="symbol")Object.defineProperty(B.prototype,Symbol.toStringTag,{configurable:!0,value:"AbortController"});Q.AbortController=B,Q.AbortSignal=q,Q.default=B,$.exports=B,$.exports.AbortController=$.exports.default=B,$.exports.AbortSignal=q}),s0=S0((Q,$)=>{var J=(u2(),W2(m2)),{format:q,inspect:X}=T$(),{codes:{ERR_INVALID_ARG_TYPE:Y}}=n0(),{kResistStopPropagation:W,AggregateError:B,SymbolDispose:U}=T0(),G=globalThis.AbortSignal||p6().AbortSignal,V=globalThis.AbortController||p6().AbortController,F=Object.getPrototypeOf(async function(){}).constructor,M=globalThis.Blob||J.Blob,H=typeof M<"u"?function(C){return C instanceof M}:function(C){return!1},_=(C,O)=>{if(C!==void 0&&(C===null||typeof C!=="object"||!("aborted"in C)))throw new Y(O,"AbortSignal",C)},T=(C,O)=>{if(typeof C!=="function")throw new Y(O,"Function",C)};$.exports={AggregateError:B,kEmptyObject:Object.freeze({}),once(C){let O=!1;return function(...K){if(O)return;O=!0,C.apply(this,K)}},createDeferredPromise:function(){let C,O;return{promise:new Promise((K,L)=>{C=K,O=L}),resolve:C,reject:O}},promisify(C){return new Promise((O,K)=>{C((L,...w)=>{if(L)return K(L);return O(...w)})})},debuglog(){return function(){}},format:q,inspect:X,types:{isAsyncFunction(C){return C instanceof F},isArrayBufferView(C){return ArrayBuffer.isView(C)}},isBlob:H,deprecate(C,O){return C},addAbortListener:(c6(),W2(u6)).addAbortListener||function(C,O){if(C===void 0)throw new Y("signal","AbortSignal",C);_(C,"signal"),T(O,"listener");let K;if(C.aborted)queueMicrotask(()=>O());else C.addEventListener("abort",O,{__proto__:null,once:!0,[W]:!0}),K=()=>{C.removeEventListener("abort",O)};return{__proto__:null,[U](){var L;(L=K)===null||L===void 0||L()}}},AbortSignalAny:G.any||function(C){if(C.length===1)return C[0];let O=new V,K=()=>O.abort();return C.forEach((L)=>{_(L,"signals"),L.addEventListener("abort",K,{once:!0})}),O.signal.addEventListener("abort",()=>{C.forEach((L)=>L.removeEventListener("abort",K))},{once:!0}),O.signal}},$.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")}),l6=S0((Q,$)=>{var{ArrayIsArray:J,ArrayPrototypeIncludes:q,ArrayPrototypeJoin:X,ArrayPrototypeMap:Y,NumberIsInteger:W,NumberIsNaN:B,NumberMAX_SAFE_INTEGER:U,NumberMIN_SAFE_INTEGER:G,NumberParseInt:V,ObjectPrototypeHasOwnProperty:F,RegExpPrototypeExec:M,String:H,StringPrototypeToUpperCase:_,StringPrototypeTrim:T}=T0(),{hideStackFrames:C,codes:{ERR_SOCKET_BAD_PORT:O,ERR_INVALID_ARG_TYPE:K,ERR_INVALID_ARG_VALUE:L,ERR_OUT_OF_RANGE:w,ERR_UNKNOWN_SIGNAL:P}}=n0(),{normalizeEncoding:h}=s0(),{isAsyncFunction:k,isArrayBufferView:d}=s0().types,S={};function v(I){return I===(I|0)}function A(I){return I===I>>>0}var N=/^[0-7]+$/,x="must be a 32-bit unsigned integer or an octal string";function y(I,n,X0){if(typeof I>"u")I=X0;if(typeof I==="string"){if(M(N,I)===null)throw new L(n,I,x);I=V(I,8)}return q0(I,n),I}var Z=C((I,n,X0=G,o=U)=>{if(typeof I!=="number")throw new K(n,"number",I);if(!W(I))throw new w(n,"an integer",I);if(I<X0||I>o)throw new w(n,`>= ${X0} && <= ${o}`,I)}),t=C((I,n,X0=-2147483648,o=2147483647)=>{if(typeof I!=="number")throw new K(n,"number",I);if(!W(I))throw new w(n,"an integer",I);if(I<X0||I>o)throw new w(n,`>= ${X0} && <= ${o}`,I)}),q0=C((I,n,X0=!1)=>{if(typeof I!=="number")throw new K(n,"number",I);if(!W(I))throw new w(n,"an integer",I);let o=X0?1:0,j0=4294967295;if(I<o||I>j0)throw new w(n,`>= ${o} && <= ${j0}`,I)});function U0(I,n){if(typeof I!=="string")throw new K(n,"string",I)}function N0(I,n,X0=void 0,o){if(typeof I!=="number")throw new K(n,"number",I);if(X0!=null&&I<X0||o!=null&&I>o||(X0!=null||o!=null)&&B(I))throw new w(n,`${X0!=null?`>= ${X0}`:""}${X0!=null&&o!=null?" && ":""}${o!=null?`<= ${o}`:""}`,I)}var c=C((I,n,X0)=>{if(!q(X0,I)){let o="must be one of: "+X(Y(X0,(j0)=>typeof j0==="string"?`'${j0}'`:H(j0)),", ");throw new L(n,I,o)}});function H0(I,n){if(typeof I!=="boolean")throw new K(n,"boolean",I)}function D(I,n,X0){return I==null||!F(I,n)?X0:I[n]}var i=C((I,n,X0=null)=>{let o=D(X0,"allowArray",!1),j0=D(X0,"allowFunction",!1);if(!D(X0,"nullable",!1)&&I===null||!o&&J(I)||typeof I!=="object"&&(!j0||typeof I!=="function"))throw new K(n,"Object",I)}),W0=C((I,n)=>{if(I!=null&&typeof I!=="object"&&typeof I!=="function")throw new K(n,"a dictionary",I)}),u=C((I,n,X0=0)=>{if(!J(I))throw new K(n,"Array",I);if(I.length<X0){let o=`must be longer than ${X0}`;throw new L(n,I,o)}});function G0(I,n){u(I,n);for(let X0=0;X0<I.length;X0++)U0(I[X0],`${n}[${X0}]`)}function M0(I,n){u(I,n);for(let X0=0;X0<I.length;X0++)H0(I[X0],`${n}[${X0}]`)}function A0(I,n){u(I,n);for(let X0=0;X0<I.length;X0++){let o=I[X0],j0=`${n}[${X0}]`;if(o==null)throw new K(j0,"AbortSignal",o);L0(o,j0)}}function D0(I,n="signal"){if(U0(I,n),S[I]===void 0){if(S[_(I)]!==void 0)throw new P(I+" (signals must use all capital letters)");throw new P(I)}}var p=C((I,n="buffer")=>{if(!d(I))throw new K(n,["Buffer","TypedArray","DataView"],I)});function l(I,n){let X0=h(n),o=I.length;if(X0==="hex"&&o%2!==0)throw new L("encoding",n,`is invalid for data of length ${o}`)}function e(I,n="Port",X0=!0){if(typeof I!=="number"&&typeof I!=="string"||typeof I==="string"&&T(I).length===0||+I!==+I>>>0||I>65535||I===0&&!X0)throw new O(n,I,X0);return I|0}var L0=C((I,n)=>{if(I!==void 0&&(I===null||typeof I!=="object"||!("aborted"in I)))throw new K(n,"AbortSignal",I)}),w0=C((I,n)=>{if(typeof I!=="function")throw new K(n,"Function",I)}),R=C((I,n)=>{if(typeof I!=="function"||k(I))throw new K(n,"Function",I)}),E=C((I,n)=>{if(I!==void 0)throw new K(n,"undefined",I)});function m(I,n,X0){if(!q(X0,I))throw new K(n,`('${X(X0,"|")}')`,I)}var s=/^(?:<[^>]*>)(?:\s*;\s*[^;"\s]+(?:=(")?[^;"\s]*\1)?)*$/;function J0(I,n){if(typeof I>"u"||!M(s,I))throw new L(n,I,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}function Q0(I){if(typeof I==="string")return J0(I,"hints"),I;else if(J(I)){let n=I.length,X0="";if(n===0)return X0;for(let o=0;o<n;o++){let j0=I[o];if(J0(j0,"hints"),X0+=j0,o!==n-1)X0+=", "}return X0}throw new L("hints",I,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}$.exports={isInt32:v,isUint32:A,parseFileMode:y,validateArray:u,validateStringArray:G0,validateBooleanArray:M0,validateAbortSignalArray:A0,validateBoolean:H0,validateBuffer:p,validateDictionary:W0,validateEncoding:l,validateFunction:w0,validateInt32:t,validateInteger:Z,validateNumber:N0,validateObject:i,validateOneOf:c,validatePlainFunction:R,validatePort:e,validateSignalName:D0,validateString:U0,validateUint32:q0,validateUndefined:E,validateUnion:m,validateAbortSignal:L0,validateLinkHeaderValue:Q0}}),E1=S0((Q,$)=>{$.exports=globalThis.process}),p2=S0((Q,$)=>{var{SymbolAsyncIterator:J,SymbolIterator:q,SymbolFor:X}=T0(),Y=X("nodejs.stream.destroyed"),W=X("nodejs.stream.errored"),B=X("nodejs.stream.readable"),U=X("nodejs.stream.writable"),G=X("nodejs.stream.disturbed"),V=X("nodejs.webstream.isClosedPromise"),F=X("nodejs.webstream.controllerErrorFunction");function M(D,i=!1){var W0;return!!(D&&typeof D.pipe==="function"&&typeof D.on==="function"&&(!i||typeof D.pause==="function"&&typeof D.resume==="function")&&(!D._writableState||((W0=D._readableState)===null||W0===void 0?void 0:W0.readable)!==!1)&&(!D._writableState||D._readableState))}function H(D){var i;return!!(D&&typeof D.write==="function"&&typeof D.on==="function"&&(!D._readableState||((i=D._writableState)===null||i===void 0?void 0:i.writable)!==!1))}function _(D){return!!(D&&typeof D.pipe==="function"&&D._readableState&&typeof D.on==="function"&&typeof D.write==="function")}function T(D){return D&&(D._readableState||D._writableState||typeof D.write==="function"&&typeof D.on==="function"||typeof D.pipe==="function"&&typeof D.on==="function")}function C(D){return!!(D&&!T(D)&&typeof D.pipeThrough==="function"&&typeof D.getReader==="function"&&typeof D.cancel==="function")}function O(D){return!!(D&&!T(D)&&typeof D.getWriter==="function"&&typeof D.abort==="function")}function K(D){return!!(D&&!T(D)&&typeof D.readable==="object"&&typeof D.writable==="object")}function L(D){return C(D)||O(D)||K(D)}function w(D,i){if(D==null)return!1;if(i===!0)return typeof D[J]==="function";if(i===!1)return typeof D[q]==="function";return typeof D[J]==="function"||typeof D[q]==="function"}function P(D){if(!T(D))return null;let{_writableState:i,_readableState:W0}=D,u=i||W0;return!!(D.destroyed||D[Y]||u!==null&&u!==void 0&&u.destroyed)}function h(D){if(!H(D))return null;if(D.writableEnded===!0)return!0;let i=D._writableState;if(i!==null&&i!==void 0&&i.errored)return!1;if(typeof(i===null||i===void 0?void 0:i.ended)!=="boolean")return null;return i.ended}function k(D,i){if(!H(D))return null;if(D.writableFinished===!0)return!0;let W0=D._writableState;if(W0!==null&&W0!==void 0&&W0.errored)return!1;if(typeof(W0===null||W0===void 0?void 0:W0.finished)!=="boolean")return null;return!!(W0.finished||i===!1&&W0.ended===!0&&W0.length===0)}function d(D){if(!M(D))return null;if(D.readableEnded===!0)return!0;let i=D._readableState;if(!i||i.errored)return!1;if(typeof(i===null||i===void 0?void 0:i.ended)!=="boolean")return null;return i.ended}function S(D,i){if(!M(D))return null;let W0=D._readableState;if(W0!==null&&W0!==void 0&&W0.errored)return!1;if(typeof(W0===null||W0===void 0?void 0:W0.endEmitted)!=="boolean")return null;return!!(W0.endEmitted||i===!1&&W0.ended===!0&&W0.length===0)}function v(D){if(D&&D[B]!=null)return D[B];if(typeof(D===null||D===void 0?void 0:D.readable)!=="boolean")return null;if(P(D))return!1;return M(D)&&D.readable&&!S(D)}function A(D){if(D&&D[U]!=null)return D[U];if(typeof(D===null||D===void 0?void 0:D.writable)!=="boolean")return null;if(P(D))return!1;return H(D)&&D.writable&&!h(D)}function N(D,i){if(!T(D))return null;if(P(D))return!0;if((i===null||i===void 0?void 0:i.readable)!==!1&&v(D))return!1;if((i===null||i===void 0?void 0:i.writable)!==!1&&A(D))return!1;return!0}function x(D){var i,W0;if(!T(D))return null;if(D.writableErrored)return D.writableErrored;return(i=(W0=D._writableState)===null||W0===void 0?void 0:W0.errored)!==null&&i!==void 0?i:null}function y(D){var i,W0;if(!T(D))return null;if(D.readableErrored)return D.readableErrored;return(i=(W0=D._readableState)===null||W0===void 0?void 0:W0.errored)!==null&&i!==void 0?i:null}function Z(D){if(!T(D))return null;if(typeof D.closed==="boolean")return D.closed;let{_writableState:i,_readableState:W0}=D;if(typeof(i===null||i===void 0?void 0:i.closed)==="boolean"||typeof(W0===null||W0===void 0?void 0:W0.closed)==="boolean")return(i===null||i===void 0?void 0:i.closed)||(W0===null||W0===void 0?void 0:W0.closed);if(typeof D._closed==="boolean"&&t(D))return D._closed;return null}function t(D){return typeof D._closed==="boolean"&&typeof D._defaultKeepAlive==="boolean"&&typeof D._removedConnection==="boolean"&&typeof D._removedContLen==="boolean"}function q0(D){return typeof D._sent100==="boolean"&&t(D)}function U0(D){var i;return typeof D._consuming==="boolean"&&typeof D._dumped==="boolean"&&((i=D.req)===null||i===void 0?void 0:i.upgradeOrConnect)===void 0}function N0(D){if(!T(D))return null;let{_writableState:i,_readableState:W0}=D,u=i||W0;return!u&&q0(D)||!!(u&&u.autoDestroy&&u.emitClose&&u.closed===!1)}function c(D){var i;return!!(D&&((i=D[G])!==null&&i!==void 0?i:D.readableDidRead||D.readableAborted))}function H0(D){var i,W0,u,G0,M0,A0,D0,p,l,e;return!!(D&&((i=(W0=(u=(G0=(M0=(A0=D[W])!==null&&A0!==void 0?A0:D.readableErrored)!==null&&M0!==void 0?M0:D.writableErrored)!==null&&G0!==void 0?G0:(D0=D._readableState)===null||D0===void 0?void 0:D0.errorEmitted)!==null&&u!==void 0?u:(p=D._writableState)===null||p===void 0?void 0:p.errorEmitted)!==null&&W0!==void 0?W0:(l=D._readableState)===null||l===void 0?void 0:l.errored)!==null&&i!==void 0?i:(e=D._writableState)===null||e===void 0?void 0:e.errored))}$.exports={isDestroyed:P,kIsDestroyed:Y,isDisturbed:c,kIsDisturbed:G,isErrored:H0,kIsErrored:W,isReadable:v,kIsReadable:B,kIsClosedPromise:V,kControllerErrorFunction:F,kIsWritable:U,isClosed:Z,isDuplexNodeStream:_,isFinished:N,isIterable:w,isReadableNodeStream:M,isReadableStream:C,isReadableEnded:d,isReadableFinished:S,isReadableErrored:y,isNodeStream:T,isWebStream:L,isWritable:A,isWritableNodeStream:H,isWritableStream:O,isWritableEnded:h,isWritableFinished:k,isWritableErrored:x,isServerRequest:U0,isServerResponse:q0,willEmitClose:N0,isTransformStream:K}}),$1=S0((Q,$)=>{var J=E1(),{AbortError:q,codes:X}=n0(),{ERR_INVALID_ARG_TYPE:Y,ERR_STREAM_PREMATURE_CLOSE:W}=X,{kEmptyObject:B,once:U}=s0(),{validateAbortSignal:G,validateFunction:V,validateObject:F,validateBoolean:M}=l6(),{Promise:H,PromisePrototypeThen:_,SymbolDispose:T}=T0(),{isClosed:C,isReadable:O,isReadableNodeStream:K,isReadableStream:L,isReadableFinished:w,isReadableErrored:P,isWritable:h,isWritableNodeStream:k,isWritableStream:d,isWritableFinished:S,isWritableErrored:v,isNodeStream:A,willEmitClose:N,kIsClosedPromise:x}=p2(),y;function Z(c){return c.setHeader&&typeof c.abort==="function"}var t=()=>{};function q0(c,H0,D){var i,W0;if(arguments.length===2)D=H0,H0=B;else if(H0==null)H0=B;else F(H0,"options");if(V(D,"callback"),G(H0.signal,"options.signal"),D=U(D),L(c)||d(c))return U0(c,H0,D);if(!A(c))throw new Y("stream",["ReadableStream","WritableStream","Stream"],c);let u=(i=H0.readable)!==null&&i!==void 0?i:K(c),G0=(W0=H0.writable)!==null&&W0!==void 0?W0:k(c),M0=c._writableState,A0=c._readableState,D0=()=>{if(!c.writable)e()},p=N(c)&&K(c)===u&&k(c)===G0,l=S(c,!1),e=()=>{if(l=!0,c.destroyed)p=!1;if(p&&(!c.readable||u))return;if(!u||L0)D.call(c)},L0=w(c,!1),w0=()=>{if(L0=!0,c.destroyed)p=!1;if(p&&(!c.writable||G0))return;if(!G0||l)D.call(c)},R=(I)=>{D.call(c,I)},E=C(c),m=()=>{E=!0;let I=v(c)||P(c);if(I&&typeof I!=="boolean")return D.call(c,I);if(u&&!L0&&K(c,!0)){if(!w(c,!1))return D.call(c,new W)}if(G0&&!l){if(!S(c,!1))return D.call(c,new W)}D.call(c)},s=()=>{E=!0;let I=v(c)||P(c);if(I&&typeof I!=="boolean")return D.call(c,I);D.call(c)},J0=()=>{c.req.on("finish",e)};if(Z(c)){if(c.on("complete",e),!p)c.on("abort",m);if(c.req)J0();else c.on("request",J0)}else if(G0&&!M0)c.on("end",D0),c.on("close",D0);if(!p&&typeof c.aborted==="boolean")c.on("aborted",m);if(c.on("end",w0),c.on("finish",e),H0.error!==!1)c.on("error",R);if(c.on("close",m),E)J.nextTick(m);else if(M0!==null&&M0!==void 0&&M0.errorEmitted||A0!==null&&A0!==void 0&&A0.errorEmitted){if(!p)J.nextTick(s)}else if(!u&&(!p||O(c))&&(l||h(c)===!1))J.nextTick(s);else if(!G0&&(!p||h(c))&&(L0||O(c)===!1))J.nextTick(s);else if(A0&&c.req&&c.aborted)J.nextTick(s);let Q0=()=>{if(D=t,c.removeListener("aborted",m),c.removeListener("complete",e),c.removeListener("abort",m),c.removeListener("request",J0),c.req)c.req.removeListener("finish",e);c.removeListener("end",D0),c.removeListener("close",D0),c.removeListener("finish",e),c.removeListener("end",w0),c.removeListener("error",R),c.removeListener("close",m)};if(H0.signal&&!E){let I=()=>{let n=D;Q0(),n.call(c,new q(void 0,{cause:H0.signal.reason}))};if(H0.signal.aborted)J.nextTick(I);else{y=y||s0().addAbortListener;let n=y(H0.signal,I),X0=D;D=U((...o)=>{n[T](),X0.apply(c,o)})}}return Q0}function U0(c,H0,D){let i=!1,W0=t;if(H0.signal)if(W0=()=>{i=!0,D.call(c,new q(void 0,{cause:H0.signal.reason}))},H0.signal.aborted)J.nextTick(W0);else{y=y||s0().addAbortListener;let G0=y(H0.signal,W0),M0=D;D=U((...A0)=>{G0[T](),M0.apply(c,A0)})}let u=(...G0)=>{if(!i)J.nextTick(()=>D.apply(c,G0))};return _(c[x].promise,u,u),t}function N0(c,H0){var D;let i=!1;if(H0===null)H0=B;if((D=H0)!==null&&D!==void 0&&D.cleanup)M(H0.cleanup,"cleanup"),i=H0.cleanup;return new H((W0,u)=>{let G0=q0(c,H0,(M0)=>{if(i)G0();if(M0)u(M0);else W0()})})}$.exports=q0,$.exports.finished=N0}),e1=S0((Q,$)=>{var J=E1(),{aggregateTwoErrors:q,codes:{ERR_MULTIPLE_CALLBACK:X},AbortError:Y}=n0(),{Symbol:W}=T0(),{kIsDestroyed:B,isDestroyed:U,isFinished:G,isServerRequest:V}=p2(),F=W("kDestroy"),M=W("kConstruct");function H(N,x,y){if(N){if(N.stack,x&&!x.errored)x.errored=N;if(y&&!y.errored)y.errored=N}}function _(N,x){let y=this._readableState,Z=this._writableState,t=Z||y;if(Z!==null&&Z!==void 0&&Z.destroyed||y!==null&&y!==void 0&&y.destroyed){if(typeof x==="function")x();return this}if(H(N,Z,y),Z)Z.destroyed=!0;if(y)y.destroyed=!0;if(!t.constructed)this.once(F,function(q0){T(this,q(q0,N),x)});else T(this,N,x);return this}function T(N,x,y){let Z=!1;function t(q0){if(Z)return;Z=!0;let{_readableState:U0,_writableState:N0}=N;if(H(q0,N0,U0),N0)N0.closed=!0;if(U0)U0.closed=!0;if(typeof y==="function")y(q0);if(q0)J.nextTick(C,N,q0);else J.nextTick(O,N)}try{N._destroy(x||null,t)}catch(q0){t(q0)}}function C(N,x){K(N,x),O(N)}function O(N){let{_readableState:x,_writableState:y}=N;if(y)y.closeEmitted=!0;if(x)x.closeEmitted=!0;if(y!==null&&y!==void 0&&y.emitClose||x!==null&&x!==void 0&&x.emitClose)N.emit("close")}function K(N,x){let{_readableState:y,_writableState:Z}=N;if(Z!==null&&Z!==void 0&&Z.errorEmitted||y!==null&&y!==void 0&&y.errorEmitted)return;if(Z)Z.errorEmitted=!0;if(y)y.errorEmitted=!0;N.emit("error",x)}function L(){let N=this._readableState,x=this._writableState;if(N)N.constructed=!0,N.closed=!1,N.closeEmitted=!1,N.destroyed=!1,N.errored=null,N.errorEmitted=!1,N.reading=!1,N.ended=N.readable===!1,N.endEmitted=N.readable===!1;if(x)x.constructed=!0,x.destroyed=!1,x.closed=!1,x.closeEmitted=!1,x.errored=null,x.errorEmitted=!1,x.finalCalled=!1,x.prefinished=!1,x.ended=x.writable===!1,x.ending=x.writable===!1,x.finished=x.writable===!1}function w(N,x,y){let{_readableState:Z,_writableState:t}=N;if(t!==null&&t!==void 0&&t.destroyed||Z!==null&&Z!==void 0&&Z.destroyed)return this;if(Z!==null&&Z!==void 0&&Z.autoDestroy||t!==null&&t!==void 0&&t.autoDestroy)N.destroy(x);else if(x){if(x.stack,t&&!t.errored)t.errored=x;if(Z&&!Z.errored)Z.errored=x;if(y)J.nextTick(K,N,x);else K(N,x)}}function P(N,x){if(typeof N._construct!=="function")return;let{_readableState:y,_writableState:Z}=N;if(y)y.constructed=!1;if(Z)Z.constructed=!1;if(N.once(M,x),N.listenerCount(M)>1)return;J.nextTick(h,N)}function h(N){let x=!1;function y(Z){if(x){w(N,Z!==null&&Z!==void 0?Z:new X);return}x=!0;let{_readableState:t,_writableState:q0}=N,U0=q0||t;if(t)t.constructed=!0;if(q0)q0.constructed=!0;if(U0.destroyed)N.emit(F,Z);else if(Z)w(N,Z,!0);else J.nextTick(k,N)}try{N._construct((Z)=>{J.nextTick(y,Z)})}catch(Z){J.nextTick(y,Z)}}function k(N){N.emit(M)}function d(N){return(N===null||N===void 0?void 0:N.setHeader)&&typeof N.abort==="function"}function S(N){N.emit("close")}function v(N,x){N.emit("error",x),J.nextTick(S,N)}function A(N,x){if(!N||U(N))return;if(!x&&!G(N))x=new Y;if(V(N))N.socket=null,N.destroy(x);else if(d(N))N.abort();else if(d(N.req))N.req.abort();else if(typeof N.destroy==="function")N.destroy(x);else if(typeof N.close==="function")N.close();else if(x)J.nextTick(v,N,x);else J.nextTick(S,N);if(!N.destroyed)N[B]=!0}$.exports={construct:P,destroyer:A,destroy:_,undestroy:L,errorOrDestroy:w}}),G4=S0((Q,$)=>{var{ArrayIsArray:J,ObjectSetPrototypeOf:q}=T0(),{EventEmitter:X}=(c6(),W2(u6));function Y(B){X.call(this,B)}q(Y.prototype,X.prototype),q(Y,X),Y.prototype.pipe=function(B,U){let G=this;function V(O){if(B.writable&&B.write(O)===!1&&G.pause)G.pause()}G.on("data",V);function F(){if(G.readable&&G.resume)G.resume()}if(B.on("drain",F),!B._isStdio&&(!U||U.end!==!1))G.on("end",H),G.on("close",_);let M=!1;function H(){if(M)return;M=!0,B.end()}function _(){if(M)return;if(M=!0,typeof B.destroy==="function")B.destroy()}function T(O){if(C(),X.listenerCount(this,"error")===0)this.emit("error",O)}W(G,"error",T),W(B,"error",T);function C(){G.removeListener("data",V),B.removeListener("drain",F),G.removeListener("end",H),G.removeListener("close",_),G.removeListener("error",T),B.removeListener("error",T),G.removeListener("end",C),G.removeListener("close",C),B.removeListener("close",C)}return G.on("end",C),G.on("close",C),B.on("close",C),B.emit("pipe",G),B};function W(B,U,G){if(typeof B.prependListener==="function")return B.prependListener(U,G);if(!B._events||!B._events[U])B.on(U,G);else if(J(B._events[U]))B._events[U].unshift(G);else B._events[U]=[G,B._events[U]]}$.exports={Stream:Y,prependListener:W}}),k8=S0((Q,$)=>{var{SymbolDispose:J}=T0(),{AbortError:q,codes:X}=n0(),{isNodeStream:Y,isWebStream:W,kControllerErrorFunction:B}=p2(),U=$1(),{ERR_INVALID_ARG_TYPE:G}=X,V,F=(M,H)=>{if(typeof M!=="object"||!("aborted"in M))throw new G(H,"AbortSignal",M)};$.exports.addAbortSignal=function(M,H){if(F(M,"signal"),!Y(H)&&!W(H))throw new G("stream",["ReadableStream","WritableStream","Stream"],H);return $.exports.addAbortSignalNoValidate(M,H)},$.exports.addAbortSignalNoValidate=function(M,H){if(typeof M!=="object"||!("aborted"in M))return H;let _=Y(H)?()=>{H.destroy(new q(void 0,{cause:M.reason}))}:()=>{H[B](new q(void 0,{cause:M.reason}))};if(M.aborted)_();else{V=V||s0().addAbortListener;let T=V(M,_);U(H,T[J])}return H}}),qG=S0((Q,$)=>{var{StringPrototypeSlice:J,SymbolIterator:q,TypedArrayPrototypeSet:X,Uint8Array:Y}=T0(),{Buffer:W}=(u2(),W2(m2)),{inspect:B}=s0();$.exports=class{constructor(){this.head=null,this.tail=null,this.length=0}push(U){let G={data:U,next:null};if(this.length>0)this.tail.next=G;else this.head=G;this.tail=G,++this.length}unshift(U){let G={data:U,next:this.head};if(this.length===0)this.tail=G;this.head=G,++this.length}shift(){if(this.length===0)return;let U=this.head.data;if(this.length===1)this.head=this.tail=null;else this.head=this.head.next;return--this.length,U}clear(){this.head=this.tail=null,this.length=0}join(U){if(this.length===0)return"";let G=this.head,V=""+G.data;while((G=G.next)!==null)V+=U+G.data;return V}concat(U){if(this.length===0)return W.alloc(0);let G=W.allocUnsafe(U>>>0),V=this.head,F=0;while(V)X(G,V.data,F),F+=V.data.length,V=V.next;return G}consume(U,G){let V=this.head.data;if(U<V.length){let F=V.slice(0,U);return this.head.data=V.slice(U),F}if(U===V.length)return this.shift();return G?this._getString(U):this._getBuffer(U)}first(){return this.head.data}*[q](){for(let U=this.head;U;U=U.next)yield U.data}_getString(U){let G="",V=this.head,F=0;do{let M=V.data;if(U>M.length)G+=M,U-=M.length;else{if(U===M.length)if(G+=M,++F,V.next)this.head=V.next;else this.head=this.tail=null;else G+=J(M,0,U),this.head=V,V.data=J(M,U);break}++F}while((V=V.next)!==null);return this.length-=F,G}_getBuffer(U){let G=W.allocUnsafe(U),V=U,F=this.head,M=0;do{let H=F.data;if(U>H.length)X(G,H,V-U),U-=H.length;else{if(U===H.length)if(X(G,H,V-U),++M,F.next)this.head=F.next;else this.head=this.tail=null;else X(G,new Y(H.buffer,H.byteOffset,U),V-U),this.head=F,F.data=H.slice(U);break}++M}while((F=F.next)!==null);return this.length-=M,G}[Symbol.for("nodejs.util.inspect.custom")](U,G){return B(this,{...G,depth:0,customInspect:!1})}}}),T8=S0((Q,$)=>{var{MathFloor:J,NumberIsInteger:q}=T0(),{validateInteger:X}=l6(),{ERR_INVALID_ARG_VALUE:Y}=n0().codes,W=16384,B=16;function U(M,H,_){return M.highWaterMark!=null?M.highWaterMark:H?M[_]:null}function G(M){return M?B:W}function V(M,H){if(X(H,"value",0),M)B=H;else W=H}function F(M,H,_,T){let C=U(H,T,_);if(C!=null){if(!q(C)||C<0){let O=T?`options.${_}`:"options.highWaterMark";throw new Y(O,C)}return J(C)}return G(M.objectMode)}$.exports={getHighWaterMark:F,getDefaultHighWaterMark:G,setDefaultHighWaterMark:V}}),XG=S0((Q,$)=>{/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var J=(u2(),W2(m2)),q=J.Buffer;function X(W,B){for(var U in W)B[U]=W[U]}if(q.from&&q.alloc&&q.allocUnsafe&&q.allocUnsafeSlow)$.exports=J;else X(J,Q),Q.Buffer=Y;function Y(W,B,U){return q(W,B,U)}Y.prototype=Object.create(q.prototype),X(q,Y),Y.from=function(W,B,U){if(typeof W==="number")throw TypeError("Argument must not be a number");return q(W,B,U)},Y.alloc=function(W,B,U){if(typeof W!=="number")throw TypeError("Argument must be a number");var G=q(W);if(B!==void 0)if(typeof U==="string")G.fill(B,U);else G.fill(B);else G.fill(0);return G},Y.allocUnsafe=function(W){if(typeof W!=="number")throw TypeError("Argument must be a number");return q(W)},Y.allocUnsafeSlow=function(W){if(typeof W!=="number")throw TypeError("Argument must be a number");return J.SlowBuffer(W)}}),YG=S0((Q)=>{var $=XG().Buffer,J=$.isEncoding||function(K){switch(K=""+K,K&&K.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(K){if(!K)return"utf8";var L;while(!0)switch(K){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 K;default:if(L)return;K=(""+K).toLowerCase(),L=!0}}function X(K){var L=q(K);if(typeof L!=="string"&&($.isEncoding===J||!J(K)))throw Error("Unknown encoding: "+K);return L||K}Q.StringDecoder=Y;function Y(K){this.encoding=X(K);var L;switch(this.encoding){case"utf16le":this.text=M,this.end=H,L=4;break;case"utf8":this.fillLast=G,L=4;break;case"base64":this.text=_,this.end=T,L=3;break;default:this.write=C,this.end=O;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=$.allocUnsafe(L)}Y.prototype.write=function(K){if(K.length===0)return"";var L,w;if(this.lastNeed){if(L=this.fillLast(K),L===void 0)return"";w=this.lastNeed,this.lastNeed=0}else w=0;if(w<K.length)return L?L+this.text(K,w):this.text(K,w);return L||""},Y.prototype.end=F,Y.prototype.text=V,Y.prototype.fillLast=function(K){if(this.lastNeed<=K.length)return K.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);K.copy(this.lastChar,this.lastTotal-this.lastNeed,0,K.length),this.lastNeed-=K.length};function W(K){if(K<=127)return 0;else if(K>>5===6)return 2;else if(K>>4===14)return 3;else if(K>>3===30)return 4;return K>>6===2?-1:-2}function B(K,L,w){var P=L.length-1;if(P<w)return 0;var h=W(L[P]);if(h>=0){if(h>0)K.lastNeed=h-1;return h}if(--P<w||h===-2)return 0;if(h=W(L[P]),h>=0){if(h>0)K.lastNeed=h-2;return h}if(--P<w||h===-2)return 0;if(h=W(L[P]),h>=0){if(h>0)if(h===2)h=0;else K.lastNeed=h-3;return h}return 0}function U(K,L,w){if((L[0]&192)!==128)return K.lastNeed=0,"�";if(K.lastNeed>1&&L.length>1){if((L[1]&192)!==128)return K.lastNeed=1,"�";if(K.lastNeed>2&&L.length>2){if((L[2]&192)!==128)return K.lastNeed=2,"�"}}}function G(K){var L=this.lastTotal-this.lastNeed,w=U(this,K,L);if(w!==void 0)return w;if(this.lastNeed<=K.length)return K.copy(this.lastChar,L,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);K.copy(this.lastChar,L,0,K.length),this.lastNeed-=K.length}function V(K,L){var w=B(this,K,L);if(!this.lastNeed)return K.toString("utf8",L);this.lastTotal=w;var P=K.length-(w-this.lastNeed);return K.copy(this.lastChar,0,P),K.toString("utf8",L,P)}function F(K){var L=K&&K.length?this.write(K):"";if(this.lastNeed)return L+"�";return L}function M(K,L){if((K.length-L)%2===0){var w=K.toString("utf16le",L);if(w){var P=w.charCodeAt(w.length-1);if(P>=55296&&P<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=K[K.length-2],this.lastChar[1]=K[K.length-1],w.slice(0,-1)}return w}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=K[K.length-1],K.toString("utf16le",L,K.length-1)}function H(K){var L=K&&K.length?this.write(K):"";if(this.lastNeed){var w=this.lastTotal-this.lastNeed;return L+this.lastChar.toString("utf16le",0,w)}return L}function _(K,L){var w=(K.length-L)%3;if(w===0)return K.toString("base64",L);if(this.lastNeed=3-w,this.lastTotal=3,w===1)this.lastChar[0]=K[K.length-1];else this.lastChar[0]=K[K.length-2],this.lastChar[1]=K[K.length-1];return K.toString("base64",L,K.length-w)}function T(K){var L=K&&K.length?this.write(K):"";if(this.lastNeed)return L+this.lastChar.toString("base64",0,3-this.lastNeed);return L}function C(K){return K.toString(this.encoding)}function O(K){return K&&K.length?this.write(K):""}}),x$=S0((Q,$)=>{var J=E1(),{PromisePrototypeThen:q,SymbolAsyncIterator:X,SymbolIterator:Y}=T0(),{Buffer:W}=(u2(),W2(m2)),{ERR_INVALID_ARG_TYPE:B,ERR_STREAM_NULL_VALUES:U}=n0().codes;function G(V,F,M){let H;if(typeof F==="string"||F instanceof W)return new V({objectMode:!0,...M,read(){this.push(F),this.push(null)}});let _;if(F&&F[X])_=!0,H=F[X]();else if(F&&F[Y])_=!1,H=F[Y]();else throw new B("iterable",["Iterable"],F);let T=new V({objectMode:!0,highWaterMark:1,...M}),C=!1;T._read=function(){if(!C)C=!0,K()},T._destroy=function(L,w){q(O(L),()=>J.nextTick(w,L),(P)=>J.nextTick(w,P||L))};async function O(L){let w=L!==void 0&&L!==null,P=typeof H.throw==="function";if(w&&P){let{value:h,done:k}=await H.throw(L);if(await h,k)return}if(typeof H.return==="function"){let{value:h}=await H.return();await h}}async function K(){for(;;){try{let{value:L,done:w}=_?await H.next():H.next();if(w)T.push(null);else{let P=L&&typeof L.then==="function"?await L:L;if(P===null)throw C=!1,new U;else if(T.push(P))continue;else C=!1}}catch(L){T.destroy(L)}break}}return T}$.exports=G}),x8=S0((Q,$)=>{var J=E1(),{ArrayPrototypeIndexOf:q,NumberIsInteger:X,NumberIsNaN:Y,NumberParseInt:W,ObjectDefineProperties:B,ObjectKeys:U,ObjectSetPrototypeOf:G,Promise:V,SafeSet:F,SymbolAsyncDispose:M,SymbolAsyncIterator:H,Symbol:_}=T0();$.exports=o,o.ReadableState=X0;var{EventEmitter:T}=(c6(),W2(u6)),{Stream:C,prependListener:O}=G4(),{Buffer:K}=(u2(),W2(m2)),{addAbortSignal:L}=k8(),w=$1(),P=s0().debuglog("stream",(j)=>{P=j}),h=qG(),k=e1(),{getHighWaterMark:d,getDefaultHighWaterMark:S}=T8(),{aggregateTwoErrors:v,codes:{ERR_INVALID_ARG_TYPE:A,ERR_METHOD_NOT_IMPLEMENTED:N,ERR_OUT_OF_RANGE:x,ERR_STREAM_PUSH_AFTER_EOF:y,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:Z},AbortError:t}=n0(),{validateObject:q0}=l6(),U0=_("kPaused"),{StringDecoder:N0}=YG(),c=x$();G(o.prototype,C.prototype),G(o,C);var H0=()=>{},{errorOrDestroy:D}=k,i=1,W0=2,u=4,G0=8,M0=16,A0=32,D0=64,p=128,l=256,e=512,L0=1024,w0=2048,R=4096,E=8192,m=16384,s=32768,J0=65536,Q0=131072,I=262144;function n(j){return{enumerable:!1,get(){return(this.state&j)!==0},set(z){if(z)this.state|=j;else this.state&=~j}}}B(X0.prototype,{objectMode:n(i),ended:n(W0),endEmitted:n(u),reading:n(G0),constructed:n(M0),sync:n(A0),needReadable:n(D0),emittedReadable:n(p),readableListening:n(l),resumeScheduled:n(e),errorEmitted:n(L0),emitClose:n(w0),autoDestroy:n(R),destroyed:n(E),closed:n(m),closeEmitted:n(s),multiAwaitDrain:n(J0),readingMore:n(Q0),dataEmitted:n(I)});function X0(j,z,a){if(typeof a!=="boolean")a=z instanceof c2();if(this.state=w0|R|M0|A0,j&&j.objectMode)this.state|=i;if(a&&j&&j.readableObjectMode)this.state|=i;if(this.highWaterMark=j?d(this,j,"readableHighWaterMark",a):S(!1),this.buffer=new h,this.length=0,this.pipes=[],this.flowing=null,this[U0]=null,j&&j.emitClose===!1)this.state&=~w0;if(j&&j.autoDestroy===!1)this.state&=~R;if(this.errored=null,this.defaultEncoding=j&&j.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.decoder=null,this.encoding=null,j&&j.encoding)this.decoder=new N0(j.encoding),this.encoding=j.encoding}function o(j){if(!(this instanceof o))return new o(j);let z=this instanceof c2();if(this._readableState=new X0(j,this,z),j){if(typeof j.read==="function")this._read=j.read;if(typeof j.destroy==="function")this._destroy=j.destroy;if(typeof j.construct==="function")this._construct=j.construct;if(j.signal&&!z)L(j.signal,this)}C.call(this,j),k.construct(this,()=>{if(this._readableState.needReadable)a1(this,this._readableState)})}o.prototype.destroy=k.destroy,o.prototype._undestroy=k.undestroy,o.prototype._destroy=function(j,z){z(j)},o.prototype[T.captureRejectionSymbol]=function(j){this.destroy(j)},o.prototype[M]=function(){let j;if(!this.destroyed)j=this.readableEnded?null:new t,this.destroy(j);return new V((z,a)=>w(this,(B0)=>B0&&B0!==j?a(B0):z(null)))},o.prototype.push=function(j,z){return j0(this,j,z,!1)},o.prototype.unshift=function(j,z){return j0(this,j,z,!0)};function j0(j,z,a,B0){P("readableAddChunk",z);let V0=j._readableState,p0;if((V0.state&i)===0){if(typeof z==="string"){if(a=a||V0.defaultEncoding,V0.encoding!==a)if(B0&&V0.encoding)z=K.from(z,a).toString(V0.encoding);else z=K.from(z,a),a=""}else if(z instanceof K)a="";else if(C._isUint8Array(z))z=C._uint8ArrayToBuffer(z),a="";else if(z!=null)p0=new A("chunk",["string","Buffer","Uint8Array"],z)}if(p0)D(j,p0);else if(z===null)V0.state&=~G0,c0(j,V0);else if((V0.state&i)!==0||z&&z.length>0)if(B0)if((V0.state&u)!==0)D(j,new Z);else if(V0.destroyed||V0.errored)return!1;else v0(j,V0,z,!0);else if(V0.ended)D(j,new y);else if(V0.destroyed||V0.errored)return!1;else if(V0.state&=~G0,V0.decoder&&!a)if(z=V0.decoder.write(z),V0.objectMode||z.length!==0)v0(j,V0,z,!1);else a1(j,V0);else v0(j,V0,z,!1);else if(!B0)V0.state&=~G0,a1(j,V0);return!V0.ended&&(V0.length<V0.highWaterMark||V0.length===0)}function v0(j,z,a,B0){if(z.flowing&&z.length===0&&!z.sync&&j.listenerCount("data")>0){if((z.state&J0)!==0)z.awaitDrainWriters.clear();else z.awaitDrainWriters=null;z.dataEmitted=!0,j.emit("data",a)}else{if(z.length+=z.objectMode?1:a.length,B0)z.buffer.unshift(a);else z.buffer.push(a);if((z.state&D0)!==0)r0(j)}a1(j,z)}o.prototype.isPaused=function(){let j=this._readableState;return j[U0]===!0||j.flowing===!1},o.prototype.setEncoding=function(j){let z=new N0(j);this._readableState.decoder=z,this._readableState.encoding=this._readableState.decoder.encoding;let a=this._readableState.buffer,B0="";for(let V0 of a)B0+=z.write(V0);if(a.clear(),B0!=="")a.push(B0);return this._readableState.length=B0.length,this};var q2=1073741824;function X2(j){if(j>q2)throw new x("size","<= 1GiB",j);else j--,j|=j>>>1,j|=j>>>2,j|=j>>>4,j|=j>>>8,j|=j>>>16,j++;return j}function O1(j,z){if(j<=0||z.length===0&&z.ended)return 0;if((z.state&i)!==0)return 1;if(Y(j)){if(z.flowing&&z.length)return z.buffer.first().length;return z.length}if(j<=z.length)return j;return z.ended?z.length:0}o.prototype.read=function(j){if(P("read",j),j===void 0)j=NaN;else if(!X(j))j=W(j,10);let z=this._readableState,a=j;if(j>z.highWaterMark)z.highWaterMark=X2(j);if(j!==0)z.state&=~p;if(j===0&&z.needReadable&&((z.highWaterMark!==0?z.length>=z.highWaterMark:z.length>0)||z.ended)){if(P("read: emitReadable",z.length,z.ended),z.length===0&&z.ended)d5(this);else r0(this);return null}if(j=O1(j,z),j===0&&z.ended){if(z.length===0)d5(this);return null}let B0=(z.state&D0)!==0;if(P("need readable",B0),z.length===0||z.length-j<z.highWaterMark)B0=!0,P("length less than watermark",B0);if(z.ended||z.reading||z.destroyed||z.errored||!z.constructed)B0=!1,P("reading, ended or constructing",B0);else if(B0){if(P("do read"),z.state|=G0|A0,z.length===0)z.state|=D0;try{this._read(z.highWaterMark)}catch(p0){D(this,p0)}if(z.state&=~A0,!z.reading)j=O1(a,z)}let V0;if(j>0)V0=mQ(j,z);else V0=null;if(V0===null)z.needReadable=z.length<=z.highWaterMark,j=0;else if(z.length-=j,z.multiAwaitDrain)z.awaitDrainWriters.clear();else z.awaitDrainWriters=null;if(z.length===0){if(!z.ended)z.needReadable=!0;if(a!==j&&z.ended)d5(this)}if(V0!==null&&!z.errorEmitted&&!z.closeEmitted)z.dataEmitted=!0,this.emit("data",V0);return V0};function c0(j,z){if(P("onEofChunk"),z.ended)return;if(z.decoder){let a=z.decoder.end();if(a&&a.length)z.buffer.push(a),z.length+=z.objectMode?1:a.length}if(z.ended=!0,z.sync)r0(j);else z.needReadable=!1,z.emittedReadable=!0,r1(j)}function r0(j){let z=j._readableState;if(P("emitReadable",z.needReadable,z.emittedReadable),z.needReadable=!1,!z.emittedReadable)P("emitReadable",z.flowing),z.emittedReadable=!0,J.nextTick(r1,j)}function r1(j){let z=j._readableState;if(P("emitReadable_",z.destroyed,z.length,z.ended),!z.destroyed&&!z.errored&&(z.length||z.ended))j.emit("readable"),z.emittedReadable=!1;z.needReadable=!z.flowing&&!z.ended&&z.length<=z.highWaterMark,hQ(j)}function a1(j,z){if(!z.readingMore&&z.constructed)z.readingMore=!0,J.nextTick(A2,j,z)}function A2(j,z){while(!z.reading&&!z.ended&&(z.length<z.highWaterMark||z.flowing&&z.length===0)){let a=z.length;if(P("maybeReadMore read 0"),j.read(0),a===z.length)break}z.readingMore=!1}o.prototype._read=function(j){throw new N("_read()")},o.prototype.pipe=function(j,z){let a=this,B0=this._readableState;if(B0.pipes.length===1){if(!B0.multiAwaitDrain)B0.multiAwaitDrain=!0,B0.awaitDrainWriters=new F(B0.awaitDrainWriters?[B0.awaitDrainWriters]:[])}B0.pipes.push(j),P("pipe count=%d opts=%j",B0.pipes.length,z);let V0=(!z||z.end!==!1)&&j!==J.stdout&&j!==J.stderr?Y2:_6;if(B0.endEmitted)J.nextTick(V0);else a.once("end",V0);j.on("unpipe",p0);function p0(A1,h2){if(P("onunpipe"),A1===a){if(h2&&h2.hasUnpiped===!1)h2.hasUnpiped=!0,eB()}}function Y2(){P("onend"),j.end()}let P1,cQ=!1;function eB(){if(P("cleanup"),j.removeListener("close",o5),j.removeListener("finish",r5),P1)j.removeListener("drain",P1);if(j.removeListener("error",n5),j.removeListener("unpipe",p0),a.removeListener("end",Y2),a.removeListener("end",_6),a.removeListener("data",lQ),cQ=!0,P1&&B0.awaitDrainWriters&&(!j._writableState||j._writableState.needDrain))P1()}function pQ(){if(!cQ){if(B0.pipes.length===1&&B0.pipes[0]===j)P("false write response, pause",0),B0.awaitDrainWriters=j,B0.multiAwaitDrain=!1;else if(B0.pipes.length>1&&B0.pipes.includes(j))P("false write response, pause",B0.awaitDrainWriters.size),B0.awaitDrainWriters.add(j);a.pause()}if(!P1)P1=iB(a,j),j.on("drain",P1)}a.on("data",lQ);function lQ(A1){P("ondata");let h2=j.write(A1);if(P("dest.write",h2),h2===!1)pQ()}function n5(A1){if(P("onerror",A1),_6(),j.removeListener("error",n5),j.listenerCount("error")===0){let h2=j._writableState||j._readableState;if(h2&&!h2.errorEmitted)D(j,A1);else j.emit("error",A1)}}O(j,"error",n5);function o5(){j.removeListener("finish",r5),_6()}j.once("close",o5);function r5(){P("onfinish"),j.removeListener("close",o5),_6()}j.once("finish",r5);function _6(){P("unpipe"),a.unpipe(j)}if(j.emit("pipe",a),j.writableNeedDrain===!0)pQ();else if(!B0.flowing)P("pipe resume"),a.resume();return j};function iB(j,z){return function(){let a=j._readableState;if(a.awaitDrainWriters===z)P("pipeOnDrain",1),a.awaitDrainWriters=null;else if(a.multiAwaitDrain)P("pipeOnDrain",a.awaitDrainWriters.size),a.awaitDrainWriters.delete(z);if((!a.awaitDrainWriters||a.awaitDrainWriters.size===0)&&j.listenerCount("data"))j.resume()}}o.prototype.unpipe=function(j){let z=this._readableState,a={hasUnpiped:!1};if(z.pipes.length===0)return this;if(!j){let V0=z.pipes;z.pipes=[],this.pause();for(let p0=0;p0<V0.length;p0++)V0[p0].emit("unpipe",this,{hasUnpiped:!1});return this}let B0=q(z.pipes,j);if(B0===-1)return this;if(z.pipes.splice(B0,1),z.pipes.length===0)this.pause();return j.emit("unpipe",this,a),this},o.prototype.on=function(j,z){let a=C.prototype.on.call(this,j,z),B0=this._readableState;if(j==="data"){if(B0.readableListening=this.listenerCount("readable")>0,B0.flowing!==!1)this.resume()}else if(j==="readable"){if(!B0.endEmitted&&!B0.readableListening){if(B0.readableListening=B0.needReadable=!0,B0.flowing=!1,B0.emittedReadable=!1,P("on readable",B0.length,B0.reading),B0.length)r0(this);else if(!B0.reading)J.nextTick(nB,this)}}return a},o.prototype.addListener=o.prototype.on,o.prototype.removeListener=function(j,z){let a=C.prototype.removeListener.call(this,j,z);if(j==="readable")J.nextTick(yQ,this);return a},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(j){let z=C.prototype.removeAllListeners.apply(this,arguments);if(j==="readable"||j===void 0)J.nextTick(yQ,this);return z};function yQ(j){let z=j._readableState;if(z.readableListening=j.listenerCount("readable")>0,z.resumeScheduled&&z[U0]===!1)z.flowing=!0;else if(j.listenerCount("data")>0)j.resume();else if(!z.readableListening)z.flowing=null}function nB(j){P("readable nexttick read 0"),j.read(0)}o.prototype.resume=function(){let j=this._readableState;if(!j.flowing)P("resume"),j.flowing=!j.readableListening,oB(this,j);return j[U0]=!1,this};function oB(j,z){if(!z.resumeScheduled)z.resumeScheduled=!0,J.nextTick(rB,j,z)}function rB(j,z){if(P("resume",z.reading),!z.reading)j.read(0);if(z.resumeScheduled=!1,j.emit("resume"),hQ(j),z.flowing&&!z.reading)j.read(0)}o.prototype.pause=function(){if(P("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1)P("pause"),this._readableState.flowing=!1,this.emit("pause");return this._readableState[U0]=!0,this};function hQ(j){let z=j._readableState;P("flow",z.flowing);while(z.flowing&&j.read()!==null);}o.prototype.wrap=function(j){let z=!1;j.on("data",(B0)=>{if(!this.push(B0)&&j.pause)z=!0,j.pause()}),j.on("end",()=>{this.push(null)}),j.on("error",(B0)=>{D(this,B0)}),j.on("close",()=>{this.destroy()}),j.on("destroy",()=>{this.destroy()}),this._read=()=>{if(z&&j.resume)z=!1,j.resume()};let a=U(j);for(let B0=1;B0<a.length;B0++){let V0=a[B0];if(this[V0]===void 0&&typeof j[V0]==="function")this[V0]=j[V0].bind(j)}return this},o.prototype[H]=function(){return bQ(this)},o.prototype.iterator=function(j){if(j!==void 0)q0(j,"options");return bQ(this,j)};function bQ(j,z){if(typeof j.read!=="function")j=o.wrap(j,{objectMode:!0});let a=aB(j,z);return a.stream=j,a}async function*aB(j,z){let a=H0;function B0(Y2){if(this===j)a(),a=H0;else a=Y2}j.on("readable",B0);let V0,p0=w(j,{writable:!1},(Y2)=>{V0=Y2?v(V0,Y2):null,a(),a=H0});try{while(!0){let Y2=j.destroyed?null:j.read();if(Y2!==null)yield Y2;else if(V0)throw V0;else if(V0===null)return;else await new V(B0)}}catch(Y2){throw V0=v(V0,Y2),V0}finally{if((V0||(z===null||z===void 0?void 0:z.destroyOnReturn)!==!1)&&(V0===void 0||j._readableState.autoDestroy))k.destroyer(j,null);else j.off("readable",B0),p0()}}B(o.prototype,{readable:{__proto__:null,get(){let j=this._readableState;return!!j&&j.readable!==!1&&!j.destroyed&&!j.errorEmitted&&!j.endEmitted},set(j){if(this._readableState)this._readableState.readable=!!j}},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(j){if(this._readableState)this._readableState.flowing=j}},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(j){if(!this._readableState)return;this._readableState.destroyed=j}},readableEnded:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.endEmitted:!1}}}),B(X0.prototype,{pipesCount:{__proto__:null,get(){return this.pipes.length}},paused:{__proto__:null,get(){return this[U0]!==!1},set(j){this[U0]=!!j}}}),o._fromList=mQ;function mQ(j,z){if(z.length===0)return null;let a;if(z.objectMode)a=z.buffer.shift();else if(!j||j>=z.length){if(z.decoder)a=z.buffer.join("");else if(z.buffer.length===1)a=z.buffer.first();else a=z.buffer.concat(z.length);z.buffer.clear()}else a=z.buffer.consume(j,z.decoder);return a}function d5(j){let z=j._readableState;if(P("endReadable",z.endEmitted),!z.endEmitted)z.ended=!0,J.nextTick(sB,z,j)}function sB(j,z){if(P("endReadableNT",j.endEmitted,j.length),!j.errored&&!j.closeEmitted&&!j.endEmitted&&j.length===0){if(j.endEmitted=!0,z.emit("end"),z.writable&&z.allowHalfOpen===!1)J.nextTick(tB,z);else if(j.autoDestroy){let a=z._writableState;if(!a||a.autoDestroy&&(a.finished||a.writable===!1))z.destroy()}}}function tB(j){if(j.writable&&!j.writableEnded&&!j.destroyed)j.end()}o.from=function(j,z){return c(o,j,z)};var i5;function uQ(){if(i5===void 0)i5={};return i5}o.fromWeb=function(j,z){return uQ().newStreamReadableFromReadableStream(j,z)},o.toWeb=function(j,z){return uQ().newReadableStreamFromStreamReadable(j,z)},o.wrap=function(j,z){var a,B0;return new o({objectMode:(a=(B0=j.readableObjectMode)!==null&&B0!==void 0?B0:j.objectMode)!==null&&a!==void 0?a:!0,...z,destroy(V0,p0){k.destroyer(j,V0),p0(V0)}}).wrap(j)}}),V4=S0((Q,$)=>{var J=E1(),{ArrayPrototypeSlice:q,Error:X,FunctionPrototypeSymbolHasInstance:Y,ObjectDefineProperty:W,ObjectDefineProperties:B,ObjectSetPrototypeOf:U,StringPrototypeToLowerCase:G,Symbol:V,SymbolHasInstance:F}=T0();$.exports=q0,q0.WritableState=Z;var{EventEmitter:M}=(c6(),W2(u6)),H=G4().Stream,{Buffer:_}=(u2(),W2(m2)),T=e1(),{addAbortSignal:C}=k8(),{getHighWaterMark:O,getDefaultHighWaterMark:K}=T8(),{ERR_INVALID_ARG_TYPE:L,ERR_METHOD_NOT_IMPLEMENTED:w,ERR_MULTIPLE_CALLBACK:P,ERR_STREAM_CANNOT_PIPE:h,ERR_STREAM_DESTROYED:k,ERR_STREAM_ALREADY_FINISHED:d,ERR_STREAM_NULL_VALUES:S,ERR_STREAM_WRITE_AFTER_END:v,ERR_UNKNOWN_ENCODING:A}=n0().codes,{errorOrDestroy:N}=T;U(q0.prototype,H.prototype),U(q0,H);function x(){}var y=V("kOnFinished");function Z(R,E,m){if(typeof m!=="boolean")m=E instanceof c2();if(this.objectMode=!!(R&&R.objectMode),m)this.objectMode=this.objectMode||!!(R&&R.writableObjectMode);this.highWaterMark=R?O(this,R,"writableHighWaterMark",m):K(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;let s=!!(R&&R.decodeStrings===!1);this.decodeStrings=!s,this.defaultEncoding=R&&R.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=D.bind(void 0,E),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,t(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!R||R.emitClose!==!1,this.autoDestroy=!R||R.autoDestroy!==!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[y]=[]}function t(R){R.buffered=[],R.bufferedIndex=0,R.allBuffers=!0,R.allNoop=!0}Z.prototype.getBuffer=function(){return q(this.buffered,this.bufferedIndex)},W(Z.prototype,"bufferedRequestCount",{__proto__:null,get(){return this.buffered.length-this.bufferedIndex}});function q0(R){let E=this instanceof c2();if(!E&&!Y(q0,this))return new q0(R);if(this._writableState=new Z(R,this,E),R){if(typeof R.write==="function")this._write=R.write;if(typeof R.writev==="function")this._writev=R.writev;if(typeof R.destroy==="function")this._destroy=R.destroy;if(typeof R.final==="function")this._final=R.final;if(typeof R.construct==="function")this._construct=R.construct;if(R.signal)C(R.signal,this)}H.call(this,R),T.construct(this,()=>{let m=this._writableState;if(!m.writing)G0(this,m);p(this,m)})}W(q0,F,{__proto__:null,value:function(R){if(Y(this,R))return!0;if(this!==q0)return!1;return R&&R._writableState instanceof Z}}),q0.prototype.pipe=function(){N(this,new h)};function U0(R,E,m,s){let J0=R._writableState;if(typeof m==="function")s=m,m=J0.defaultEncoding;else{if(!m)m=J0.defaultEncoding;else if(m!=="buffer"&&!_.isEncoding(m))throw new A(m);if(typeof s!=="function")s=x}if(E===null)throw new S;else if(!J0.objectMode)if(typeof E==="string"){if(J0.decodeStrings!==!1)E=_.from(E,m),m="buffer"}else if(E instanceof _)m="buffer";else if(H._isUint8Array(E))E=H._uint8ArrayToBuffer(E),m="buffer";else throw new L("chunk",["string","Buffer","Uint8Array"],E);let Q0;if(J0.ending)Q0=new v;else if(J0.destroyed)Q0=new k("write");if(Q0)return J.nextTick(s,Q0),N(R,Q0,!0),Q0;return J0.pendingcb++,N0(R,J0,E,m,s)}q0.prototype.write=function(R,E,m){return U0(this,R,E,m)===!0},q0.prototype.cork=function(){this._writableState.corked++},q0.prototype.uncork=function(){let R=this._writableState;if(R.corked){if(R.corked--,!R.writing)G0(this,R)}},q0.prototype.setDefaultEncoding=function(R){if(typeof R==="string")R=G(R);if(!_.isEncoding(R))throw new A(R);return this._writableState.defaultEncoding=R,this};function N0(R,E,m,s,J0){let Q0=E.objectMode?1:m.length;E.length+=Q0;let I=E.length<E.highWaterMark;if(!I)E.needDrain=!0;if(E.writing||E.corked||E.errored||!E.constructed){if(E.buffered.push({chunk:m,encoding:s,callback:J0}),E.allBuffers&&s!=="buffer")E.allBuffers=!1;if(E.allNoop&&J0!==x)E.allNoop=!1}else E.writelen=Q0,E.writecb=J0,E.writing=!0,E.sync=!0,R._write(m,s,E.onwrite),E.sync=!1;return I&&!E.errored&&!E.destroyed}function c(R,E,m,s,J0,Q0,I){if(E.writelen=s,E.writecb=I,E.writing=!0,E.sync=!0,E.destroyed)E.onwrite(new k("write"));else if(m)R._writev(J0,E.onwrite);else R._write(J0,Q0,E.onwrite);E.sync=!1}function H0(R,E,m,s){--E.pendingcb,s(m),u(E),N(R,m)}function D(R,E){let m=R._writableState,s=m.sync,J0=m.writecb;if(typeof J0!=="function"){N(R,new P);return}if(m.writing=!1,m.writecb=null,m.length-=m.writelen,m.writelen=0,E){if(E.stack,!m.errored)m.errored=E;if(R._readableState&&!R._readableState.errored)R._readableState.errored=E;if(s)J.nextTick(H0,R,m,E,J0);else H0(R,m,E,J0)}else{if(m.buffered.length>m.bufferedIndex)G0(R,m);if(s)if(m.afterWriteTickInfo!==null&&m.afterWriteTickInfo.cb===J0)m.afterWriteTickInfo.count++;else m.afterWriteTickInfo={count:1,cb:J0,stream:R,state:m},J.nextTick(i,m.afterWriteTickInfo);else W0(R,m,1,J0)}}function i({stream:R,state:E,count:m,cb:s}){return E.afterWriteTickInfo=null,W0(R,E,m,s)}function W0(R,E,m,s){if(!E.ending&&!R.destroyed&&E.length===0&&E.needDrain)E.needDrain=!1,R.emit("drain");while(m-- >0)E.pendingcb--,s();if(E.destroyed)u(E);p(R,E)}function u(R){if(R.writing)return;for(let J0=R.bufferedIndex;J0<R.buffered.length;++J0){var E;let{chunk:Q0,callback:I}=R.buffered[J0],n=R.objectMode?1:Q0.length;R.length-=n,I((E=R.errored)!==null&&E!==void 0?E:new k("write"))}let m=R[y].splice(0);for(let J0=0;J0<m.length;J0++){var s;m[J0]((s=R.errored)!==null&&s!==void 0?s:new k("end"))}t(R)}function G0(R,E){if(E.corked||E.bufferProcessing||E.destroyed||!E.constructed)return;let{buffered:m,bufferedIndex:s,objectMode:J0}=E,Q0=m.length-s;if(!Q0)return;let I=s;if(E.bufferProcessing=!0,Q0>1&&R._writev){E.pendingcb-=Q0-1;let n=E.allNoop?x:(o)=>{for(let j0=I;j0<m.length;++j0)m[j0].callback(o)},X0=E.allNoop&&I===0?m:q(m,I);X0.allBuffers=E.allBuffers,c(R,E,!0,E.length,X0,"",n),t(E)}else{do{let{chunk:n,encoding:X0,callback:o}=m[I];m[I++]=null;let j0=J0?1:n.length;c(R,E,!1,j0,n,X0,o)}while(I<m.length&&!E.writing);if(I===m.length)t(E);else if(I>256)m.splice(0,I),E.bufferedIndex=0;else E.bufferedIndex=I}E.bufferProcessing=!1}q0.prototype._write=function(R,E,m){if(this._writev)this._writev([{chunk:R,encoding:E}],m);else throw new w("_write()")},q0.prototype._writev=null,q0.prototype.end=function(R,E,m){let s=this._writableState;if(typeof R==="function")m=R,R=null,E=null;else if(typeof E==="function")m=E,E=null;let J0;if(R!==null&&R!==void 0){let Q0=U0(this,R,E);if(Q0 instanceof X)J0=Q0}if(s.corked)s.corked=1,this.uncork();if(J0);else if(!s.errored&&!s.ending)s.ending=!0,p(this,s,!0),s.ended=!0;else if(s.finished)J0=new d("end");else if(s.destroyed)J0=new k("end");if(typeof m==="function")if(J0||s.finished)J.nextTick(m,J0);else s[y].push(m);return this};function M0(R){return R.ending&&!R.destroyed&&R.constructed&&R.length===0&&!R.errored&&R.buffered.length===0&&!R.finished&&!R.writing&&!R.errorEmitted&&!R.closeEmitted}function A0(R,E){let m=!1;function s(J0){if(m){N(R,J0!==null&&J0!==void 0?J0:P());return}if(m=!0,E.pendingcb--,J0){let Q0=E[y].splice(0);for(let I=0;I<Q0.length;I++)Q0[I](J0);N(R,J0,E.sync)}else if(M0(E))E.prefinished=!0,R.emit("prefinish"),E.pendingcb++,J.nextTick(l,R,E)}E.sync=!0,E.pendingcb++;try{R._final(s)}catch(J0){s(J0)}E.sync=!1}function D0(R,E){if(!E.prefinished&&!E.finalCalled)if(typeof R._final==="function"&&!E.destroyed)E.finalCalled=!0,A0(R,E);else E.prefinished=!0,R.emit("prefinish")}function p(R,E,m){if(M0(E)){if(D0(R,E),E.pendingcb===0){if(m)E.pendingcb++,J.nextTick((s,J0)=>{if(M0(J0))l(s,J0);else J0.pendingcb--},R,E);else if(M0(E))E.pendingcb++,l(R,E)}}}function l(R,E){E.pendingcb--,E.finished=!0;let m=E[y].splice(0);for(let s=0;s<m.length;s++)m[s]();if(R.emit("finish"),E.autoDestroy){let s=R._readableState;if(!s||s.autoDestroy&&(s.endEmitted||s.readable===!1))R.destroy()}}B(q0.prototype,{closed:{__proto__:null,get(){return this._writableState?this._writableState.closed:!1}},destroyed:{__proto__:null,get(){return this._writableState?this._writableState.destroyed:!1},set(R){if(this._writableState)this._writableState.destroyed=R}},writable:{__proto__:null,get(){let R=this._writableState;return!!R&&R.writable!==!1&&!R.destroyed&&!R.errored&&!R.ending&&!R.ended},set(R){if(this._writableState)this._writableState.writable=!!R}},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 R=this._writableState;if(!R)return!1;return!R.destroyed&&!R.ending&&R.needDrain}},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 e=T.destroy;q0.prototype.destroy=function(R,E){let m=this._writableState;if(!m.destroyed&&(m.bufferedIndex<m.buffered.length||m[y].length))J.nextTick(u,m);return e.call(this,R,E),this},q0.prototype._undestroy=T.undestroy,q0.prototype._destroy=function(R,E){E(R)},q0.prototype[M.captureRejectionSymbol]=function(R){this.destroy(R)};var L0;function w0(){if(L0===void 0)L0={};return L0}q0.fromWeb=function(R,E){return w0().newStreamWritableFromWritableStream(R,E)},q0.toWeb=function(R){return w0().newWritableStreamFromStreamWritable(R)}}),WG=S0((Q,$)=>{var J=E1(),q=(u2(),W2(m2)),{isReadable:X,isWritable:Y,isIterable:W,isNodeStream:B,isReadableNodeStream:U,isWritableNodeStream:G,isDuplexNodeStream:V,isReadableStream:F,isWritableStream:M}=p2(),H=$1(),{AbortError:_,codes:{ERR_INVALID_ARG_TYPE:T,ERR_INVALID_RETURN_VALUE:C}}=n0(),{destroyer:O}=e1(),K=c2(),L=x8(),w=V4(),{createDeferredPromise:P}=s0(),h=x$(),k=globalThis.Blob||q.Blob,d=typeof k<"u"?function(y){return y instanceof k}:function(y){return!1},S=globalThis.AbortController||p6().AbortController,{FunctionPrototypeCall:v}=T0();class A extends K{constructor(y){super(y);if((y===null||y===void 0?void 0:y.readable)===!1)this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0;if((y===null||y===void 0?void 0:y.writable)===!1)this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0}}$.exports=function y(Z,t){if(V(Z))return Z;if(U(Z))return x({readable:Z});if(G(Z))return x({writable:Z});if(B(Z))return x({writable:!1,readable:!1});if(F(Z))return x({readable:L.fromWeb(Z)});if(M(Z))return x({writable:w.fromWeb(Z)});if(typeof Z==="function"){let{value:U0,write:N0,final:c,destroy:H0}=N(Z);if(W(U0))return h(A,U0,{objectMode:!0,write:N0,final:c,destroy:H0});let D=U0===null||U0===void 0?void 0:U0.then;if(typeof D==="function"){let i,W0=v(D,U0,(u)=>{if(u!=null)throw new C("nully","body",u)},(u)=>{O(i,u)});return i=new A({objectMode:!0,readable:!1,write:N0,final(u){c(async()=>{try{await W0,J.nextTick(u,null)}catch(G0){J.nextTick(u,G0)}})},destroy:H0})}throw new C("Iterable, AsyncIterable or AsyncFunction",t,U0)}if(d(Z))return y(Z.arrayBuffer());if(W(Z))return h(A,Z,{objectMode:!0,writable:!1});if(F(Z===null||Z===void 0?void 0:Z.readable)&&M(Z===null||Z===void 0?void 0:Z.writable))return A.fromWeb(Z);if(typeof(Z===null||Z===void 0?void 0:Z.writable)==="object"||typeof(Z===null||Z===void 0?void 0:Z.readable)==="object"){let U0=Z!==null&&Z!==void 0&&Z.readable?U(Z===null||Z===void 0?void 0:Z.readable)?Z===null||Z===void 0?void 0:Z.readable:y(Z.readable):void 0,N0=Z!==null&&Z!==void 0&&Z.writable?G(Z===null||Z===void 0?void 0:Z.writable)?Z===null||Z===void 0?void 0:Z.writable:y(Z.writable):void 0;return x({readable:U0,writable:N0})}let q0=Z===null||Z===void 0?void 0:Z.then;if(typeof q0==="function"){let U0;return v(q0,Z,(N0)=>{if(N0!=null)U0.push(N0);U0.push(null)},(N0)=>{O(U0,N0)}),U0=new A({objectMode:!0,writable:!1,read(){}})}throw new T(t,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],Z)};function N(y){let{promise:Z,resolve:t}=P(),q0=new S,U0=q0.signal;return{value:y(async function*(){while(!0){let N0=Z;Z=null;let{chunk:c,done:H0,cb:D}=await N0;if(J.nextTick(D),H0)return;if(U0.aborted)throw new _(void 0,{cause:U0.reason});({promise:Z,resolve:t}=P()),yield c}}(),{signal:U0}),write(N0,c,H0){let D=t;t=null,D({chunk:N0,done:!1,cb:H0})},final(N0){let c=t;t=null,c({done:!0,cb:N0})},destroy(N0,c){q0.abort(),c(N0)}}}function x(y){let Z=y.readable&&typeof y.readable.read!=="function"?L.wrap(y.readable):y.readable,t=y.writable,q0=!!X(Z),U0=!!Y(t),N0,c,H0,D,i;function W0(u){let G0=D;if(D=null,G0)G0(u);else if(u)i.destroy(u)}if(i=new A({readableObjectMode:!!(Z!==null&&Z!==void 0&&Z.readableObjectMode),writableObjectMode:!!(t!==null&&t!==void 0&&t.writableObjectMode),readable:q0,writable:U0}),U0)H(t,(u)=>{if(U0=!1,u)O(Z,u);W0(u)}),i._write=function(u,G0,M0){if(t.write(u,G0))M0();else N0=M0},i._final=function(u){t.end(),c=u},t.on("drain",function(){if(N0){let u=N0;N0=null,u()}}),t.on("finish",function(){if(c){let u=c;c=null,u()}});if(q0)H(Z,(u)=>{if(q0=!1,u)O(Z,u);W0(u)}),Z.on("readable",function(){if(H0){let u=H0;H0=null,u()}}),Z.on("end",function(){i.push(null)}),i._read=function(){while(!0){let u=Z.read();if(u===null){H0=i._read;return}if(!i.push(u))return}};return i._destroy=function(u,G0){if(!u&&D!==null)u=new _;if(H0=null,N0=null,c=null,D===null)G0(u);else D=G0,O(t,u),O(Z,u)},i}}),c2=S0((Q,$)=>{var{ObjectDefineProperties:J,ObjectGetOwnPropertyDescriptor:q,ObjectKeys:X,ObjectSetPrototypeOf:Y}=T0();$.exports=U;var W=x8(),B=V4();Y(U.prototype,W.prototype),Y(U,W);{let M=X(B.prototype);for(let H=0;H<M.length;H++){let _=M[H];if(!U.prototype[_])U.prototype[_]=B.prototype[_]}}function U(M){if(!(this instanceof U))return new U(M);if(W.call(this,M),B.call(this,M),M){if(this.allowHalfOpen=M.allowHalfOpen!==!1,M.readable===!1)this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0;if(M.writable===!1)this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0}else this.allowHalfOpen=!0}J(U.prototype,{writable:{__proto__:null,...q(B.prototype,"writable")},writableHighWaterMark:{__proto__:null,...q(B.prototype,"writableHighWaterMark")},writableObjectMode:{__proto__:null,...q(B.prototype,"writableObjectMode")},writableBuffer:{__proto__:null,...q(B.prototype,"writableBuffer")},writableLength:{__proto__:null,...q(B.prototype,"writableLength")},writableFinished:{__proto__:null,...q(B.prototype,"writableFinished")},writableCorked:{__proto__:null,...q(B.prototype,"writableCorked")},writableEnded:{__proto__:null,...q(B.prototype,"writableEnded")},writableNeedDrain:{__proto__:null,...q(B.prototype,"writableNeedDrain")},destroyed:{__proto__:null,get(){if(this._readableState===void 0||this._writableState===void 0)return!1;return this._readableState.destroyed&&this._writableState.destroyed},set(M){if(this._readableState&&this._writableState)this._readableState.destroyed=M,this._writableState.destroyed=M}}});var G;function V(){if(G===void 0)G={};return G}U.fromWeb=function(M,H){return V().newStreamDuplexFromReadableWritablePair(M,H)},U.toWeb=function(M){return V().newReadableWritablePairFromDuplex(M)};var F;U.from=function(M){if(!F)F=WG();return F(M,"body")}}),g$=S0((Q,$)=>{var{ObjectSetPrototypeOf:J,Symbol:q}=T0();$.exports=U;var{ERR_METHOD_NOT_IMPLEMENTED:X}=n0().codes,Y=c2(),{getHighWaterMark:W}=T8();J(U.prototype,Y.prototype),J(U,Y);var B=q("kCallback");function U(F){if(!(this instanceof U))return new U(F);let M=F?W(this,F,"readableHighWaterMark",!0):null;if(M===0)F={...F,highWaterMark:null,readableHighWaterMark:M,writableHighWaterMark:F.writableHighWaterMark||0};if(Y.call(this,F),this._readableState.sync=!1,this[B]=null,F){if(typeof F.transform==="function")this._transform=F.transform;if(typeof F.flush==="function")this._flush=F.flush}this.on("prefinish",V)}function G(F){if(typeof this._flush==="function"&&!this.destroyed)this._flush((M,H)=>{if(M){if(F)F(M);else this.destroy(M);return}if(H!=null)this.push(H);if(this.push(null),F)F()});else if(this.push(null),F)F()}function V(){if(this._final!==G)G.call(this)}U.prototype._final=G,U.prototype._transform=function(F,M,H){throw new X("_transform()")},U.prototype._write=function(F,M,H){let _=this._readableState,T=this._writableState,C=_.length;this._transform(F,M,(O,K)=>{if(O){H(O);return}if(K!=null)this.push(K);if(T.ended||C===_.length||_.length<_.highWaterMark)H();else this[B]=H})},U.prototype._read=function(){if(this[B]){let F=this[B];this[B]=null,F()}}}),_$=S0((Q,$)=>{var{ObjectSetPrototypeOf:J}=T0();$.exports=X;var q=g$();J(X.prototype,q.prototype),J(X,q);function X(Y){if(!(this instanceof X))return new X(Y);q.call(this,Y)}X.prototype._transform=function(Y,W,B){B(null,Y)}}),K4=S0((Q,$)=>{var J=E1(),{ArrayIsArray:q,Promise:X,SymbolAsyncIterator:Y,SymbolDispose:W}=T0(),B=$1(),{once:U}=s0(),G=e1(),V=c2(),{aggregateTwoErrors:F,codes:{ERR_INVALID_ARG_TYPE:M,ERR_INVALID_RETURN_VALUE:H,ERR_MISSING_ARGS:_,ERR_STREAM_DESTROYED:T,ERR_STREAM_PREMATURE_CLOSE:C},AbortError:O}=n0(),{validateFunction:K,validateAbortSignal:L}=l6(),{isIterable:w,isReadable:P,isReadableNodeStream:h,isNodeStream:k,isTransformStream:d,isWebStream:S,isReadableStream:v,isReadableFinished:A}=p2(),N=globalThis.AbortController||p6().AbortController,x,y,Z;function t(u,G0,M0){let A0=!1;u.on("close",()=>{A0=!0});let D0=B(u,{readable:G0,writable:M0},(p)=>{A0=!p});return{destroy:(p)=>{if(A0)return;A0=!0,G.destroyer(u,p||new T("pipe"))},cleanup:D0}}function q0(u){return K(u[u.length-1],"streams[stream.length - 1]"),u.pop()}function U0(u){if(w(u))return u;else if(h(u))return N0(u);throw new M("val",["Readable","Iterable","AsyncIterable"],u)}async function*N0(u){if(!y)y=x8();yield*y.prototype[Y].call(u)}async function c(u,G0,M0,{end:A0}){let D0,p=null,l=(w0)=>{if(w0)D0=w0;if(p){let R=p;p=null,R()}},e=()=>new X((w0,R)=>{if(D0)R(D0);else p=()=>{if(D0)R(D0);else w0()}});G0.on("drain",l);let L0=B(G0,{readable:!1},l);try{if(G0.writableNeedDrain)await e();for await(let w0 of u)if(!G0.write(w0))await e();if(A0)G0.end(),await e();M0()}catch(w0){M0(D0!==w0?F(D0,w0):w0)}finally{L0(),G0.off("drain",l)}}async function H0(u,G0,M0,{end:A0}){if(d(G0))G0=G0.writable;let D0=G0.getWriter();try{for await(let p of u)await D0.ready,D0.write(p).catch(()=>{});if(await D0.ready,A0)await D0.close();M0()}catch(p){try{await D0.abort(p),M0(p)}catch(l){M0(l)}}}function D(...u){return i(u,U(q0(u)))}function i(u,G0,M0){if(u.length===1&&q(u[0]))u=u[0];if(u.length<2)throw new _("streams");let A0=new N,D0=A0.signal,p=M0===null||M0===void 0?void 0:M0.signal,l=[];L(p,"options.signal");function e(){J0(new O)}Z=Z||s0().addAbortListener;let L0;if(p)L0=Z(p,e);let w0,R,E=[],m=0;function s(o){J0(o,--m===0)}function J0(o,j0){var v0;if(o&&(!w0||w0.code==="ERR_STREAM_PREMATURE_CLOSE"))w0=o;if(!w0&&!j0)return;while(E.length)E.shift()(w0);if((v0=L0)===null||v0===void 0||v0[W](),A0.abort(),j0){if(!w0)l.forEach((q2)=>q2());J.nextTick(G0,w0,R)}}let Q0;for(let o=0;o<u.length;o++){let j0=u[o],v0=o<u.length-1,q2=o>0,X2=v0||(M0===null||M0===void 0?void 0:M0.end)!==!1,O1=o===u.length-1;if(k(j0)){let c0=function(r0){if(r0&&r0.name!=="AbortError"&&r0.code!=="ERR_STREAM_PREMATURE_CLOSE")s(r0)};var I=c0;if(X2){let{destroy:r0,cleanup:r1}=t(j0,v0,q2);if(E.push(r0),P(j0)&&O1)l.push(r1)}if(j0.on("error",c0),P(j0)&&O1)l.push(()=>{j0.removeListener("error",c0)})}if(o===0)if(typeof j0==="function"){if(Q0=j0({signal:D0}),!w(Q0))throw new H("Iterable, AsyncIterable or Stream","source",Q0)}else if(w(j0)||h(j0)||d(j0))Q0=j0;else Q0=V.from(j0);else if(typeof j0==="function"){if(d(Q0)){var n;Q0=U0((n=Q0)===null||n===void 0?void 0:n.readable)}else Q0=U0(Q0);if(Q0=j0(Q0,{signal:D0}),v0){if(!w(Q0,!0))throw new H("AsyncIterable",`transform[${o-1}]`,Q0)}else{var X0;if(!x)x=_$();let c0=new x({objectMode:!0}),r0=(X0=Q0)===null||X0===void 0?void 0:X0.then;if(typeof r0==="function")m++,r0.call(Q0,(A2)=>{if(R=A2,A2!=null)c0.write(A2);if(X2)c0.end();J.nextTick(s)},(A2)=>{c0.destroy(A2),J.nextTick(s,A2)});else if(w(Q0,!0))m++,c(Q0,c0,s,{end:X2});else if(v(Q0)||d(Q0)){let A2=Q0.readable||Q0;m++,c(A2,c0,s,{end:X2})}else throw new H("AsyncIterable or Promise","destination",Q0);Q0=c0;let{destroy:r1,cleanup:a1}=t(Q0,!1,!0);if(E.push(r1),O1)l.push(a1)}}else if(k(j0)){if(h(Q0)){m+=2;let c0=W0(Q0,j0,s,{end:X2});if(P(j0)&&O1)l.push(c0)}else if(d(Q0)||v(Q0)){let c0=Q0.readable||Q0;m++,c(c0,j0,s,{end:X2})}else if(w(Q0))m++,c(Q0,j0,s,{end:X2});else throw new M("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],Q0);Q0=j0}else if(S(j0)){if(h(Q0))m++,H0(U0(Q0),j0,s,{end:X2});else if(v(Q0)||w(Q0))m++,H0(Q0,j0,s,{end:X2});else if(d(Q0))m++,H0(Q0.readable,j0,s,{end:X2});else throw new M("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],Q0);Q0=j0}else Q0=V.from(j0)}if(D0!==null&&D0!==void 0&&D0.aborted||p!==null&&p!==void 0&&p.aborted)J.nextTick(e);return Q0}function W0(u,G0,M0,{end:A0}){let D0=!1;if(G0.on("close",()=>{if(!D0)M0(new C)}),u.pipe(G0,{end:!1}),A0){let l=function(){D0=!0,G0.end()};var p=l;if(A(u))J.nextTick(l);else u.once("end",l)}else M0();return B(u,{readable:!0,writable:!1},(l)=>{let e=u._readableState;if(l&&l.code==="ERR_STREAM_PREMATURE_CLOSE"&&e&&e.ended&&!e.errored&&!e.errorEmitted)u.once("end",M0).once("error",M0);else M0(l)}),B(G0,{readable:!1,writable:!0},M0)}$.exports={pipelineImpl:i,pipeline:D}}),f$=S0((Q,$)=>{var{pipeline:J}=K4(),q=c2(),{destroyer:X}=e1(),{isNodeStream:Y,isReadable:W,isWritable:B,isWebStream:U,isTransformStream:G,isWritableStream:V,isReadableStream:F}=p2(),{AbortError:M,codes:{ERR_INVALID_ARG_VALUE:H,ERR_MISSING_ARGS:_}}=n0(),T=$1();$.exports=function(...C){if(C.length===0)throw new _("streams");if(C.length===1)return q.from(C[0]);let O=[...C];if(typeof C[0]==="function")C[0]=q.from(C[0]);if(typeof C[C.length-1]==="function"){let N=C.length-1;C[N]=q.from(C[N])}for(let N=0;N<C.length;++N){if(!Y(C[N])&&!U(C[N]))continue;if(N<C.length-1&&!(W(C[N])||F(C[N])||G(C[N])))throw new H(`streams[${N}]`,O[N],"must be readable");if(N>0&&!(B(C[N])||V(C[N])||G(C[N])))throw new H(`streams[${N}]`,O[N],"must be writable")}let K,L,w,P,h;function k(N){let x=P;if(P=null,x)x(N);else if(N)h.destroy(N);else if(!A&&!v)h.destroy()}let d=C[0],S=J(C,k),v=!!(B(d)||V(d)||G(d)),A=!!(W(S)||F(S)||G(S));if(h=new q({writableObjectMode:!!(d!==null&&d!==void 0&&d.writableObjectMode),readableObjectMode:!!(S!==null&&S!==void 0&&S.readableObjectMode),writable:v,readable:A}),v){if(Y(d))h._write=function(x,y,Z){if(d.write(x,y))Z();else K=Z},h._final=function(x){d.end(),L=x},d.on("drain",function(){if(K){let x=K;K=null,x()}});else if(U(d)){let x=(G(d)?d.writable:d).getWriter();h._write=async function(y,Z,t){try{await x.ready,x.write(y).catch(()=>{}),t()}catch(q0){t(q0)}},h._final=async function(y){try{await x.ready,x.close().catch(()=>{}),L=y}catch(Z){y(Z)}}}let N=G(S)?S.readable:S;T(N,()=>{if(L){let x=L;L=null,x()}})}if(A){if(Y(S))S.on("readable",function(){if(w){let N=w;w=null,N()}}),S.on("end",function(){h.push(null)}),h._read=function(){while(!0){let N=S.read();if(N===null){w=h._read;return}if(!h.push(N))return}};else if(U(S)){let N=(G(S)?S.readable:S).getReader();h._read=async function(){while(!0)try{let{value:x,done:y}=await N.read();if(!h.push(x))return;if(y){h.push(null);return}}catch{return}}}}return h._destroy=function(N,x){if(!N&&P!==null)N=new M;if(w=null,K=null,L=null,P===null)x(N);else if(P=x,Y(S))X(S,N)},h}}),BG=S0((Q,$)=>{var J=globalThis.AbortController||p6().AbortController,{codes:{ERR_INVALID_ARG_VALUE:q,ERR_INVALID_ARG_TYPE:X,ERR_MISSING_ARGS:Y,ERR_OUT_OF_RANGE:W},AbortError:B}=n0(),{validateAbortSignal:U,validateInteger:G,validateObject:V}=l6(),F=T0().Symbol("kWeak"),M=T0().Symbol("kResistStopPropagation"),{finished:H}=$1(),_=f$(),{addAbortSignalNoValidate:T}=k8(),{isWritable:C,isNodeStream:O}=p2(),{deprecate:K}=s0(),{ArrayPrototypePush:L,Boolean:w,MathFloor:P,Number:h,NumberIsNaN:k,Promise:d,PromiseReject:S,PromiseResolve:v,PromisePrototypeThen:A,Symbol:N}=T0(),x=N("kEmpty"),y=N("kEof");function Z(p,l){if(l!=null)V(l,"options");if((l===null||l===void 0?void 0:l.signal)!=null)U(l.signal,"options.signal");if(O(p)&&!C(p))throw new q("stream",p,"must be writable");let e=_(this,p);if(l!==null&&l!==void 0&&l.signal)T(l.signal,e);return e}function t(p,l){if(typeof p!=="function")throw new X("fn",["Function","AsyncFunction"],p);if(l!=null)V(l,"options");if((l===null||l===void 0?void 0:l.signal)!=null)U(l.signal,"options.signal");let e=1;if((l===null||l===void 0?void 0:l.concurrency)!=null)e=P(l.concurrency);let L0=e-1;if((l===null||l===void 0?void 0:l.highWaterMark)!=null)L0=P(l.highWaterMark);return G(e,"options.concurrency",1),G(L0,"options.highWaterMark",0),L0+=e,async function*(){let w0=s0().AbortSignalAny([l===null||l===void 0?void 0:l.signal].filter(w)),R=this,E=[],m={signal:w0},s,J0,Q0=!1,I=0;function n(){Q0=!0,X0()}function X0(){I-=1,o()}function o(){if(J0&&!Q0&&I<e&&E.length<L0)J0(),J0=null}async function j0(){try{for await(let v0 of R){if(Q0)return;if(w0.aborted)throw new B;try{if(v0=p(v0,m),v0===x)continue;v0=v(v0)}catch(q2){v0=S(q2)}if(I+=1,A(v0,X0,n),E.push(v0),s)s(),s=null;if(!Q0&&(E.length>=L0||I>=e))await new d((q2)=>{J0=q2})}E.push(y)}catch(v0){let q2=S(v0);A(q2,X0,n),E.push(q2)}finally{if(Q0=!0,s)s(),s=null}}j0();try{while(!0){while(E.length>0){let v0=await E[0];if(v0===y)return;if(w0.aborted)throw new B;if(v0!==x)yield v0;E.shift(),o()}await new d((v0)=>{s=v0})}}finally{if(Q0=!0,J0)J0(),J0=null}}.call(this)}function q0(p=void 0){if(p!=null)V(p,"options");if((p===null||p===void 0?void 0:p.signal)!=null)U(p.signal,"options.signal");return async function*(){let l=0;for await(let L0 of this){var e;if(p!==null&&p!==void 0&&(e=p.signal)!==null&&e!==void 0&&e.aborted)throw new B({cause:p.signal.reason});yield[l++,L0]}}.call(this)}async function U0(p,l=void 0){for await(let e of D.call(this,p,l))return!0;return!1}async function N0(p,l=void 0){if(typeof p!=="function")throw new X("fn",["Function","AsyncFunction"],p);return!await U0.call(this,async(...e)=>{return!await p(...e)},l)}async function c(p,l){for await(let e of D.call(this,p,l))return e;return}async function H0(p,l){if(typeof p!=="function")throw new X("fn",["Function","AsyncFunction"],p);async function e(L0,w0){return await p(L0,w0),x}for await(let L0 of t.call(this,e,l));}function D(p,l){if(typeof p!=="function")throw new X("fn",["Function","AsyncFunction"],p);async function e(L0,w0){if(await p(L0,w0))return L0;return x}return t.call(this,e,l)}class i extends Y{constructor(){super("reduce");this.message="Reduce of an empty stream requires an initial value"}}async function W0(p,l,e){var L0;if(typeof p!=="function")throw new X("reducer",["Function","AsyncFunction"],p);if(e!=null)V(e,"options");if((e===null||e===void 0?void 0:e.signal)!=null)U(e.signal,"options.signal");let w0=arguments.length>1;if(e!==null&&e!==void 0&&(L0=e.signal)!==null&&L0!==void 0&&L0.aborted){let J0=new B(void 0,{cause:e.signal.reason});throw this.once("error",()=>{}),await H(this.destroy(J0)),J0}let R=new J,E=R.signal;if(e!==null&&e!==void 0&&e.signal){let J0={once:!0,[F]:this,[M]:!0};e.signal.addEventListener("abort",()=>R.abort(),J0)}let m=!1;try{for await(let J0 of this){var s;if(m=!0,e!==null&&e!==void 0&&(s=e.signal)!==null&&s!==void 0&&s.aborted)throw new B;if(!w0)l=J0,w0=!0;else l=await p(l,J0,{signal:E})}if(!m&&!w0)throw new i}finally{R.abort()}return l}async function u(p){if(p!=null)V(p,"options");if((p===null||p===void 0?void 0:p.signal)!=null)U(p.signal,"options.signal");let l=[];for await(let L0 of this){var e;if(p!==null&&p!==void 0&&(e=p.signal)!==null&&e!==void 0&&e.aborted)throw new B(void 0,{cause:p.signal.reason});L(l,L0)}return l}function G0(p,l){let e=t.call(this,p,l);return async function*(){for await(let L0 of e)yield*L0}.call(this)}function M0(p){if(p=h(p),k(p))return 0;if(p<0)throw new W("number",">= 0",p);return p}function A0(p,l=void 0){if(l!=null)V(l,"options");if((l===null||l===void 0?void 0:l.signal)!=null)U(l.signal,"options.signal");return p=M0(p),async function*(){var e;if(l!==null&&l!==void 0&&(e=l.signal)!==null&&e!==void 0&&e.aborted)throw new B;for await(let w0 of this){var L0;if(l!==null&&l!==void 0&&(L0=l.signal)!==null&&L0!==void 0&&L0.aborted)throw new B;if(p--<=0)yield w0}}.call(this)}function D0(p,l=void 0){if(l!=null)V(l,"options");if((l===null||l===void 0?void 0:l.signal)!=null)U(l.signal,"options.signal");return p=M0(p),async function*(){var e;if(l!==null&&l!==void 0&&(e=l.signal)!==null&&e!==void 0&&e.aborted)throw new B;for await(let w0 of this){var L0;if(l!==null&&l!==void 0&&(L0=l.signal)!==null&&L0!==void 0&&L0.aborted)throw new B;if(p-- >0)yield w0;if(p<=0)return}}.call(this)}$.exports.streamReturningOperators={asIndexedPairs:K(q0,"readable.asIndexedPairs will be removed in a future version."),drop:A0,filter:D,flatMap:G0,map:t,take:D0,compose:Z},$.exports.promiseReturningOperators={every:N0,forEach:H0,reduce:W0,toArray:u,some:U0,find:c}}),y$=S0((Q,$)=>{var{ArrayPrototypePop:J,Promise:q}=T0(),{isIterable:X,isNodeStream:Y,isWebStream:W}=p2(),{pipelineImpl:B}=K4(),{finished:U}=$1();h$();function G(...V){return new q((F,M)=>{let H,_,T=V[V.length-1];if(T&&typeof T==="object"&&!Y(T)&&!X(T)&&!W(T)){let C=J(V);H=C.signal,_=C.end}B(V,(C,O)=>{if(C)M(C);else F(O)},{signal:H,end:_})})}$.exports={finished:U,pipeline:G}}),h$=S0((Q,$)=>{var{Buffer:J}=(u2(),W2(m2)),{ObjectDefineProperty:q,ObjectKeys:X,ReflectApply:Y}=T0(),{promisify:{custom:W}}=s0(),{streamReturningOperators:B,promiseReturningOperators:U}=BG(),{codes:{ERR_ILLEGAL_CONSTRUCTOR:G}}=n0(),V=f$(),{setDefaultHighWaterMark:F,getDefaultHighWaterMark:M}=T8(),{pipeline:H}=K4(),{destroyer:_}=e1(),T=$1(),C=y$(),O=p2(),K=$.exports=G4().Stream;K.isDestroyed=O.isDestroyed,K.isDisturbed=O.isDisturbed,K.isErrored=O.isErrored,K.isReadable=O.isReadable,K.isWritable=O.isWritable,K.Readable=x8();for(let w of X(B)){let P=function(...k){if(new.target)throw G();return K.Readable.from(Y(h,this,k))},h=B[w];q(P,"name",{__proto__:null,value:h.name}),q(P,"length",{__proto__:null,value:h.length}),q(K.Readable.prototype,w,{__proto__:null,value:P,enumerable:!1,configurable:!0,writable:!0})}for(let w of X(U)){let P=function(...k){if(new.target)throw G();return Y(h,this,k)},h=U[w];q(P,"name",{__proto__:null,value:h.name}),q(P,"length",{__proto__:null,value:h.length}),q(K.Readable.prototype,w,{__proto__:null,value:P,enumerable:!1,configurable:!0,writable:!0})}K.Writable=V4(),K.Duplex=c2(),K.Transform=g$(),K.PassThrough=_$(),K.pipeline=H;var{addAbortSignal:L}=k8();K.addAbortSignal=L,K.finished=T,K.destroy=_,K.compose=V,K.setDefaultHighWaterMark=F,K.getDefaultHighWaterMark=M,q(K,"promises",{__proto__:null,configurable:!0,enumerable:!0,get(){return C}}),q(H,W,{__proto__:null,enumerable:!0,get(){return C.pipeline}}),q(T,W,{__proto__:null,enumerable:!0,get(){return C.finished}}),K.Stream=K,K._isUint8Array=function(w){return w instanceof Uint8Array},K._uint8ArrayToBuffer=function(w){return J.from(w.buffer,w.byteOffset,w.byteLength)}}),UG=S0((Q,$)=>{var J=g8();{let q=h$(),X=y$(),Y=q.Readable.destroy;$.exports=q.Readable,$.exports._uint8ArrayToBuffer=q._uint8ArrayToBuffer,$.exports._isUint8Array=q._isUint8Array,$.exports.isDisturbed=q.isDisturbed,$.exports.isErrored=q.isErrored,$.exports.isReadable=q.isReadable,$.exports.Readable=q.Readable,$.exports.Writable=q.Writable,$.exports.Duplex=q.Duplex,$.exports.Transform=q.Transform,$.exports.PassThrough=q.PassThrough,$.exports.addAbortSignal=q.addAbortSignal,$.exports.finished=q.finished,$.exports.destroy=q.destroy,$.exports.destroy=Y,$.exports.pipeline=q.pipeline,$.exports.compose=q.compose,Object.defineProperty(q,"promises",{configurable:!0,enumerable:!0,get(){return X}}),$.exports.Stream=q.Stream}$.exports.default=$.exports});b$.exports=UG()});var l2=f((VG)=>{VG.base64=!0;VG.array=!0;VG.string=!0;VG.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u";VG.nodebuffer=typeof Buffer<"u";VG.uint8array=typeof Uint8Array<"u";if(typeof ArrayBuffer>"u")VG.blob=!1;else{_8=new ArrayBuffer(0);try{VG.blob=new Blob([_8],{type:"application/zip"}).size===0}catch(Q){try{j4=self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder,f8=new j4,f8.append(_8),VG.blob=f8.getBlob("application/zip").size===0}catch($){VG.blob=!1}}}var _8,j4,f8;try{VG.nodestream=!!g8().Readable}catch(Q){VG.nodestream=!1}});var M4=f((NG)=>{var LG=x0(),wG=l2(),S2="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";NG.encode=function(Q){var $=[],J,q,X,Y,W,B,U,G=0,V=Q.length,F=V,M=LG.getTypeOf(Q)!=="string";while(G<Q.length){if(F=V-G,!M)J=Q.charCodeAt(G++),q=G<V?Q.charCodeAt(G++):0,X=G<V?Q.charCodeAt(G++):0;else J=Q[G++],q=G<V?Q[G++]:0,X=G<V?Q[G++]:0;Y=J>>2,W=(J&3)<<4|q>>4,B=F>1?(q&15)<<2|X>>6:64,U=F>2?X&63:64,$.push(S2.charAt(Y)+S2.charAt(W)+S2.charAt(B)+S2.charAt(U))}return $.join("")};NG.decode=function(Q){var $,J,q,X,Y,W,B,U=0,G=0,V="data:";if(Q.substr(0,V.length)===V)throw Error("Invalid base64 input, it looks like a data url.");Q=Q.replace(/[^A-Za-z0-9+/=]/g,"");var F=Q.length*3/4;if(Q.charAt(Q.length-1)===S2.charAt(64))F--;if(Q.charAt(Q.length-2)===S2.charAt(64))F--;if(F%1!==0)throw Error("Invalid base64 input, bad content length.");var M;if(wG.uint8array)M=new Uint8Array(F|0);else M=Array(F|0);while(U<Q.length){if(X=S2.indexOf(Q.charAt(U++)),Y=S2.indexOf(Q.charAt(U++)),W=S2.indexOf(Q.charAt(U++)),B=S2.indexOf(Q.charAt(U++)),$=X<<2|Y>>4,J=(Y&15)<<4|W>>2,q=(W&3)<<6|B,M[G++]=$,W!==64)M[G++]=J;if(B!==64)M[G++]=q}return M}});var d6=f((EN,m$)=>{m$.exports={isNode:typeof Buffer<"u",newBufferFrom:function(Q,$){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(Q,$);else{if(typeof Q==="number")throw Error('The "data" argument must not be a number');return new Buffer(Q,$)}},allocBuffer:function(Q){if(Buffer.alloc)return Buffer.alloc(Q);else{var $=new Buffer(Q);return $.fill(0),$}},isBuffer:function(Q){return Buffer.isBuffer(Q)},isStream:function(Q){return Q&&typeof Q.on==="function"&&typeof Q.pause==="function"&&typeof Q.resume==="function"}}});var p$=f((ZN,c$)=>{var u$=global.MutationObserver||global.WebKitMutationObserver,i6;if(u$)h8=0,F4=new u$(y8),b8=global.document.createTextNode(""),F4.observe(b8,{characterData:!0}),i6=function(){b8.data=h8=++h8%2};else if(!global.setImmediate&&typeof global.MessageChannel<"u")m8=new global.MessageChannel,m8.port1.onmessage=y8,i6=function(){m8.port2.postMessage(0)};else if("document"in global&&"onreadystatechange"in global.document.createElement("script"))i6=function(){var Q=global.document.createElement("script");Q.onreadystatechange=function(){y8(),Q.onreadystatechange=null,Q.parentNode.removeChild(Q),Q=null},global.document.documentElement.appendChild(Q)};else i6=function(){setTimeout(y8,0)};var h8,F4,b8,m8,z4,n6=[];function y8(){z4=!0;var Q,$,J=n6.length;while(J){$=n6,n6=[],Q=-1;while(++Q<J)$[Q]();J=n6.length}z4=!1}c$.exports=OG;function OG(Q){if(n6.push(Q)===1&&!z4)i6()}});var r$=f((kN,o$)=>{var PG=p$();function Q6(){}var l0={},l$=["REJECTED"],L4=["FULFILLED"],d$=["PENDING"];o$.exports=J1;function J1(Q){if(typeof Q!=="function")throw TypeError("resolver must be a function");if(this.state=d$,this.queue=[],this.outcome=void 0,Q!==Q6)i$(this,Q)}J1.prototype.finally=function(Q){if(typeof Q!=="function")return this;var $=this.constructor;return this.then(J,q);function J(X){function Y(){return X}return $.resolve(Q()).then(Y)}function q(X){function Y(){throw X}return $.resolve(Q()).then(Y)}};J1.prototype.catch=function(Q){return this.then(null,Q)};J1.prototype.then=function(Q,$){if(typeof Q!=="function"&&this.state===L4||typeof $!=="function"&&this.state===l$)return this;var J=new this.constructor(Q6);if(this.state!==d$){var q=this.state===L4?Q:$;w4(J,q,this.outcome)}else this.queue.push(new o6(J,Q,$));return J};function o6(Q,$,J){if(this.promise=Q,typeof $==="function")this.onFulfilled=$,this.callFulfilled=this.otherCallFulfilled;if(typeof J==="function")this.onRejected=J,this.callRejected=this.otherCallRejected}o6.prototype.callFulfilled=function(Q){l0.resolve(this.promise,Q)};o6.prototype.otherCallFulfilled=function(Q){w4(this.promise,this.onFulfilled,Q)};o6.prototype.callRejected=function(Q){l0.reject(this.promise,Q)};o6.prototype.otherCallRejected=function(Q){w4(this.promise,this.onRejected,Q)};function w4(Q,$,J){PG(function(){var q;try{q=$(J)}catch(X){return l0.reject(Q,X)}if(q===Q)l0.reject(Q,TypeError("Cannot resolve promise with itself"));else l0.resolve(Q,q)})}l0.resolve=function(Q,$){var J=n$(AG,$);if(J.status==="error")return l0.reject(Q,J.value);var q=J.value;if(q)i$(Q,q);else{Q.state=L4,Q.outcome=$;var X=-1,Y=Q.queue.length;while(++X<Y)Q.queue[X].callFulfilled($)}return Q};l0.reject=function(Q,$){Q.state=l$,Q.outcome=$;var J=-1,q=Q.queue.length;while(++J<q)Q.queue[J].callRejected($);return Q};function AG(Q){var $=Q&&Q.then;if(Q&&(typeof Q==="object"||typeof Q==="function")&&typeof $==="function")return function(){$.apply(Q,arguments)}}function i$(Q,$){var J=!1;function q(B){if(J)return;J=!0,l0.reject(Q,B)}function X(B){if(J)return;J=!0,l0.resolve(Q,B)}function Y(){$(X,q)}var W=n$(Y);if(W.status==="error")q(W.value)}function n$(Q,$){var J={};try{J.value=Q($),J.status="success"}catch(q){J.status="error",J.value=q}return J}J1.resolve=RG;function RG(Q){if(Q instanceof this)return Q;return l0.resolve(new this(Q6),Q)}J1.reject=IG;function IG(Q){var $=new this(Q6);return l0.reject($,Q)}J1.all=SG;function SG(Q){var $=this;if(Object.prototype.toString.call(Q)!=="[object Array]")return this.reject(TypeError("must be an array"));var J=Q.length,q=!1;if(!J)return this.resolve([]);var X=Array(J),Y=0,W=-1,B=new this(Q6);while(++W<J)U(Q[W],W);return B;function U(G,V){$.resolve(G).then(F,function(M){if(!q)q=!0,l0.reject(B,M)});function F(M){if(X[V]=M,++Y===J&&!q)q=!0,l0.resolve(B,X)}}}J1.race=vG;function vG(Q){var $=this;if(Object.prototype.toString.call(Q)!=="[object Array]")return this.reject(TypeError("must be an array"));var J=Q.length,q=!1;if(!J)return this.resolve([]);var X=-1,Y=new this(Q6);while(++X<J)W(Q[X]);return Y;function W(B){$.resolve(B).then(function(U){if(!q)q=!0,l0.resolve(Y,U)},function(U){if(!q)q=!0,l0.reject(Y,U)})}}});var $6=f((TN,a$)=>{var N4=null;if(typeof Promise<"u")N4=Promise;else N4=r$();a$.exports={Promise:N4}});var t$=f((s$)=>{(function(Q,$){if(Q.setImmediate)return;var J=1,q={},X=!1,Y=Q.document,W;function B(K){if(typeof K!=="function")K=Function(""+K);var L=Array(arguments.length-1);for(var w=0;w<L.length;w++)L[w]=arguments[w+1];var P={callback:K,args:L};return q[J]=P,W(J),J++}function U(K){delete q[K]}function G(K){var{callback:L,args:w}=K;switch(w.length){case 0:L();break;case 1:L(w[0]);break;case 2:L(w[0],w[1]);break;case 3:L(w[0],w[1],w[2]);break;default:L.apply($,w);break}}function V(K){if(X)setTimeout(V,0,K);else{var L=q[K];if(L){X=!0;try{G(L)}finally{U(K),X=!1}}}}function F(){W=function(K){process.nextTick(function(){V(K)})}}function M(){if(Q.postMessage&&!Q.importScripts){var K=!0,L=Q.onmessage;return Q.onmessage=function(){K=!1},Q.postMessage("","*"),Q.onmessage=L,K}}function H(){var K="setImmediate$"+Math.random()+"$",L=function(w){if(w.source===Q&&typeof w.data==="string"&&w.data.indexOf(K)===0)V(+w.data.slice(K.length))};if(Q.addEventListener)Q.addEventListener("message",L,!1);else Q.attachEvent("onmessage",L);W=function(w){Q.postMessage(K+w,"*")}}function _(){var K=new MessageChannel;K.port1.onmessage=function(L){var w=L.data;V(w)},W=function(L){K.port2.postMessage(L)}}function T(){var K=Y.documentElement;W=function(L){var w=Y.createElement("script");w.onreadystatechange=function(){V(L),w.onreadystatechange=null,K.removeChild(w),w=null},K.appendChild(w)}}function C(){W=function(K){setTimeout(V,0,K)}}var O=Object.getPrototypeOf&&Object.getPrototypeOf(Q);if(O=O&&O.setTimeout?O:Q,{}.toString.call(Q.process)==="[object process]")F();else if(M())H();else if(Q.MessageChannel)_();else if(Y&&"onreadystatechange"in Y.createElement("script"))T();else C();O.setImmediate=B,O.clearImmediate=U})(typeof self>"u"?typeof global>"u"?s$:global:self)});var x0=f((kG)=>{var q1=l2(),EG=M4(),J6=d6(),D4=$6();t$();function ZG(Q){var $=null;if(q1.uint8array)$=new Uint8Array(Q.length);else $=Array(Q.length);return c8(Q,$)}kG.newBlob=function(Q,$){kG.checkSupport("blob");try{return new Blob([Q],{type:$})}catch(X){try{var J=self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder,q=new J;return q.append(Q),q.getBlob($)}catch(Y){throw Error("Bug : can't construct the Blob.")}}};function r6(Q){return Q}function c8(Q,$){for(var J=0;J<Q.length;++J)$[J]=Q.charCodeAt(J)&255;return $}var u8={stringifyByChunk:function(Q,$,J){var q=[],X=0,Y=Q.length;if(Y<=J)return String.fromCharCode.apply(null,Q);while(X<Y){if($==="array"||$==="nodebuffer")q.push(String.fromCharCode.apply(null,Q.slice(X,Math.min(X+J,Y))));else q.push(String.fromCharCode.apply(null,Q.subarray(X,Math.min(X+J,Y))));X+=J}return q.join("")},stringifyByChar:function(Q){var $="";for(var J=0;J<Q.length;J++)$+=String.fromCharCode(Q[J]);return $},applyCanBeUsed:{uint8array:function(){try{return q1.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch(Q){return!1}}(),nodebuffer:function(){try{return q1.nodebuffer&&String.fromCharCode.apply(null,J6.allocBuffer(1)).length===1}catch(Q){return!1}}()}};function a6(Q){var $=65536,J=kG.getTypeOf(Q),q=!0;if(J==="uint8array")q=u8.applyCanBeUsed.uint8array;else if(J==="nodebuffer")q=u8.applyCanBeUsed.nodebuffer;if(q)while($>1)try{return u8.stringifyByChunk(Q,J,$)}catch(X){$=Math.floor($/2)}return u8.stringifyByChar(Q)}kG.applyFromCharCode=a6;function p8(Q,$){for(var J=0;J<Q.length;J++)$[J]=Q[J];return $}var X1={};X1.string={string:r6,array:function(Q){return c8(Q,Array(Q.length))},arraybuffer:function(Q){return X1.string.uint8array(Q).buffer},uint8array:function(Q){return c8(Q,new Uint8Array(Q.length))},nodebuffer:function(Q){return c8(Q,J6.allocBuffer(Q.length))}};X1.array={string:a6,array:r6,arraybuffer:function(Q){return new Uint8Array(Q).buffer},uint8array:function(Q){return new Uint8Array(Q)},nodebuffer:function(Q){return J6.newBufferFrom(Q)}};X1.arraybuffer={string:function(Q){return a6(new Uint8Array(Q))},array:function(Q){return p8(new Uint8Array(Q),Array(Q.byteLength))},arraybuffer:r6,uint8array:function(Q){return new Uint8Array(Q)},nodebuffer:function(Q){return J6.newBufferFrom(new Uint8Array(Q))}};X1.uint8array={string:a6,array:function(Q){return p8(Q,Array(Q.length))},arraybuffer:function(Q){return Q.buffer},uint8array:r6,nodebuffer:function(Q){return J6.newBufferFrom(Q)}};X1.nodebuffer={string:a6,array:function(Q){return p8(Q,Array(Q.length))},arraybuffer:function(Q){return X1.nodebuffer.uint8array(Q).buffer},uint8array:function(Q){return p8(Q,new Uint8Array(Q.length))},nodebuffer:r6};kG.transformTo=function(Q,$){if(!$)$="";if(!Q)return $;kG.checkSupport(Q);var J=kG.getTypeOf($),q=X1[J][Q]($);return q};kG.resolve=function(Q){var $=Q.split("/"),J=[];for(var q=0;q<$.length;q++){var X=$[q];if(X==="."||X===""&&q!==0&&q!==$.length-1)continue;else if(X==="..")J.pop();else J.push(X)}return J.join("/")};kG.getTypeOf=function(Q){if(typeof Q==="string")return"string";if(Object.prototype.toString.call(Q)==="[object Array]")return"array";if(q1.nodebuffer&&J6.isBuffer(Q))return"nodebuffer";if(q1.uint8array&&Q instanceof Uint8Array)return"uint8array";if(q1.arraybuffer&&Q instanceof ArrayBuffer)return"arraybuffer"};kG.checkSupport=function(Q){var $=q1[Q.toLowerCase()];if(!$)throw Error(Q+" is not supported by this platform")};kG.MAX_VALUE_16BITS=65535;kG.MAX_VALUE_32BITS=-1;kG.pretty=function(Q){var $="",J,q;for(q=0;q<(Q||"").length;q++)J=Q.charCodeAt(q),$+="\\x"+(J<16?"0":"")+J.toString(16).toUpperCase();return $};kG.delay=function(Q,$,J){setImmediate(function(){Q.apply(J||null,$||[])})};kG.inherits=function(Q,$){var J=function(){};J.prototype=$.prototype,Q.prototype=new J};kG.extend=function(){var Q={},$,J;for($=0;$<arguments.length;$++)for(J in arguments[$])if(Object.prototype.hasOwnProperty.call(arguments[$],J)&&typeof Q[J]>"u")Q[J]=arguments[$][J];return Q};kG.prepareContent=function(Q,$,J,q,X){var Y=D4.Promise.resolve($).then(function(W){var B=q1.blob&&(W instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(W))!==-1);if(B&&typeof FileReader<"u")return new D4.Promise(function(U,G){var V=new FileReader;V.onload=function(F){U(F.target.result)},V.onerror=function(F){G(F.target.error)},V.readAsArrayBuffer(W)});else return W});return Y.then(function(W){var B=kG.getTypeOf(W);if(!B)return D4.Promise.reject(Error("Can't read the data of '"+Q+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"));if(B==="arraybuffer")W=kG.transformTo("uint8array",W);else if(B==="string"){if(X)W=EG.decode(W);else if(J){if(q!==!0)W=ZG(W)}}return W})}});var $2=f((_N,JJ)=>{function $J(Q){this.name=Q||"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}$J.prototype={push:function(Q){this.emit("data",Q)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(Q){this.emit("error",Q)}return!0},error:function(Q){if(this.isFinished)return!1;if(this.isPaused)this.generatedError=Q;else{if(this.isFinished=!0,this.emit("error",Q),this.previous)this.previous.error(Q);this.cleanUp()}return!0},on:function(Q,$){return this._listeners[Q].push($),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(Q,$){if(this._listeners[Q])for(var J=0;J<this._listeners[Q].length;J++)this._listeners[Q][J].call(this,$)},pipe:function(Q){return Q.registerPrevious(this)},registerPrevious:function(Q){if(this.isLocked)throw Error("The stream '"+this+"' has already been used.");this.streamInfo=Q.streamInfo,this.mergeStreamInfo(),this.previous=Q;var $=this;return Q.on("data",function(J){$.processChunk(J)}),Q.on("end",function(){$.end()}),Q.on("error",function(J){$.error(J)}),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 Q=!1;if(this.generatedError)this.error(this.generatedError),Q=!0;if(this.previous)this.previous.resume();return!Q},flush:function(){},processChunk:function(Q){this.push(Q)},withStreamInfo:function(Q,$){return this.extraStreamInfo[Q]=$,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var Q in this.extraStreamInfo){if(!Object.prototype.hasOwnProperty.call(this.extraStreamInfo,Q))continue;this.streamInfo[Q]=this.extraStreamInfo[Q]}},lock:function(){if(this.isLocked)throw Error("The stream '"+this+"' has already been used.");if(this.isLocked=!0,this.previous)this.previous.lock()},toString:function(){var Q="Worker "+this.name;if(this.previous)return this.previous+" -> "+Q;else return Q}};JJ.exports=$J});var X6=f((iG)=>{var q6=x0(),Z1=l2(),cG=d6(),l8=$2(),s6=Array(256);for(v2=0;v2<256;v2++)s6[v2]=v2>=252?6:v2>=248?5:v2>=240?4:v2>=224?3:v2>=192?2:1;var v2;s6[254]=s6[254]=1;var pG=function(Q){var $,J,q,X,Y,W=Q.length,B=0;for(X=0;X<W;X++){if(J=Q.charCodeAt(X),(J&64512)===55296&&X+1<W){if(q=Q.charCodeAt(X+1),(q&64512)===56320)J=65536+(J-55296<<10)+(q-56320),X++}B+=J<128?1:J<2048?2:J<65536?3:4}if(Z1.uint8array)$=new Uint8Array(B);else $=Array(B);for(Y=0,X=0;Y<B;X++){if(J=Q.charCodeAt(X),(J&64512)===55296&&X+1<W){if(q=Q.charCodeAt(X+1),(q&64512)===56320)J=65536+(J-55296<<10)+(q-56320),X++}if(J<128)$[Y++]=J;else if(J<2048)$[Y++]=192|J>>>6,$[Y++]=128|J&63;else if(J<65536)$[Y++]=224|J>>>12,$[Y++]=128|J>>>6&63,$[Y++]=128|J&63;else $[Y++]=240|J>>>18,$[Y++]=128|J>>>12&63,$[Y++]=128|J>>>6&63,$[Y++]=128|J&63}return $},lG=function(Q,$){var J;if($=$||Q.length,$>Q.length)$=Q.length;J=$-1;while(J>=0&&(Q[J]&192)===128)J--;if(J<0)return $;if(J===0)return $;return J+s6[Q[J]]>$?J:$},dG=function(Q){var $,J,q,X,Y=Q.length,W=Array(Y*2);for(J=0,$=0;$<Y;){if(q=Q[$++],q<128){W[J++]=q;continue}if(X=s6[q],X>4){W[J++]=65533,$+=X-1;continue}q&=X===2?31:X===3?15:7;while(X>1&&$<Y)q=q<<6|Q[$++]&63,X--;if(X>1){W[J++]=65533;continue}if(q<65536)W[J++]=q;else q-=65536,W[J++]=55296|q>>10&1023,W[J++]=56320|q&1023}if(W.length!==J)if(W.subarray)W=W.subarray(0,J);else W.length=J;return q6.applyFromCharCode(W)};iG.utf8encode=function($){if(Z1.nodebuffer)return cG.newBufferFrom($,"utf-8");return pG($)};iG.utf8decode=function($){if(Z1.nodebuffer)return q6.transformTo("nodebuffer",$).toString("utf-8");return $=q6.transformTo(Z1.uint8array?"uint8array":"array",$),dG($)};function d8(){l8.call(this,"utf-8 decode"),this.leftOver=null}q6.inherits(d8,l8);d8.prototype.processChunk=function(Q){var $=q6.transformTo(Z1.uint8array?"uint8array":"array",Q.data);if(this.leftOver&&this.leftOver.length){if(Z1.uint8array){var J=$;$=new Uint8Array(J.length+this.leftOver.length),$.set(this.leftOver,0),$.set(J,this.leftOver.length)}else $=this.leftOver.concat($);this.leftOver=null}var q=lG($),X=$;if(q!==$.length)if(Z1.uint8array)X=$.subarray(0,q),this.leftOver=$.subarray(q,$.length);else X=$.slice(0,q),this.leftOver=$.slice(q,$.length);this.push({data:iG.utf8decode(X),meta:Q.meta})};d8.prototype.flush=function(){if(this.leftOver&&this.leftOver.length)this.push({data:iG.utf8decode(this.leftOver),meta:{}}),this.leftOver=null};iG.Utf8DecodeWorker=d8;function O4(){l8.call(this,"utf-8 encode")}q6.inherits(O4,l8);O4.prototype.processChunk=function(Q){this.push({data:iG.utf8encode(Q.data),meta:Q.meta})};iG.Utf8EncodeWorker=O4});var BJ=f((yN,WJ)=>{var XJ=$2(),YJ=x0();function A4(Q){XJ.call(this,"ConvertWorker to "+Q),this.destType=Q}YJ.inherits(A4,XJ);A4.prototype.processChunk=function(Q){this.push({data:YJ.transformTo(this.destType,Q.data),meta:Q.meta})};WJ.exports=A4});var VJ=f((hN,GJ)=>{var UJ=g8().Readable,rG=x0();rG.inherits(R4,UJ);function R4(Q,$,J){UJ.call(this,$),this._helper=Q;var q=this;Q.on("data",function(X,Y){if(!q.push(X))q._helper.pause();if(J)J(Y)}).on("error",function(X){q.emit("error",X)}).on("end",function(){q.push(null)})}R4.prototype._read=function(){this._helper.resume()};GJ.exports=R4});var I4=f((bN,jJ)=>{var k1=x0(),aG=BJ(),sG=$2(),tG=M4(),eG=l2(),QV=$6(),KJ=null;if(eG.nodestream)try{KJ=VJ()}catch(Q){}function $V(Q,$,J){switch(Q){case"blob":return k1.newBlob(k1.transformTo("arraybuffer",$),J);case"base64":return tG.encode($);default:return k1.transformTo(Q,$)}}function JV(Q,$){var J,q=0,X=null,Y=0;for(J=0;J<$.length;J++)Y+=$[J].length;switch(Q){case"string":return $.join("");case"array":return Array.prototype.concat.apply([],$);case"uint8array":X=new Uint8Array(Y);for(J=0;J<$.length;J++)X.set($[J],q),q+=$[J].length;return X;case"nodebuffer":return Buffer.concat($);default:throw Error("concat : unsupported type '"+Q+"'")}}function qV(Q,$){return new QV.Promise(function(J,q){var X=[],Y=Q._internalType,W=Q._outputType,B=Q._mimeType;Q.on("data",function(U,G){if(X.push(U),$)$(G)}).on("error",function(U){X=[],q(U)}).on("end",function(){try{var U=$V(W,JV(Y,X),B);J(U)}catch(G){q(G)}X=[]}).resume()})}function HJ(Q,$,J){var q=$;switch($){case"blob":case"arraybuffer":q="uint8array";break;case"base64":q="string";break}try{this._internalType=q,this._outputType=$,this._mimeType=J,k1.checkSupport(q),this._worker=Q.pipe(new aG(q)),Q.lock()}catch(X){this._worker=new sG("error"),this._worker.error(X)}}HJ.prototype={accumulate:function(Q){return qV(this,Q)},on:function(Q,$){var J=this;if(Q==="data")this._worker.on(Q,function(q){$.call(J,q.data,q.meta)});else this._worker.on(Q,function(){k1.delay($,arguments,J)});return this},resume:function(){return k1.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(Q){if(k1.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw Error(this._outputType+" is not supported by this method");return new KJ(this,{objectMode:this._outputType!=="nodebuffer"},Q)}};jJ.exports=HJ});var S4=f((XV)=>{XV.base64=!1;XV.binary=!1;XV.dir=!1;XV.createFolders=!0;XV.date=null;XV.compression=null;XV.compressionOptions=null;XV.comment=null;XV.unixPermissions=null;XV.dosPermissions=null});var v4=f((uN,MJ)=>{var i8=x0(),n8=$2(),FV=16384;function Y6(Q){n8.call(this,"DataWorker");var $=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,Q.then(function(J){if($.dataIsReady=!0,$.data=J,$.max=J&&J.length||0,$.type=i8.getTypeOf(J),!$.isPaused)$._tickAndRepeat()},function(J){$.error(J)})}i8.inherits(Y6,n8);Y6.prototype.cleanUp=function(){n8.prototype.cleanUp.call(this),this.data=null};Y6.prototype.resume=function(){if(!n8.prototype.resume.call(this))return!1;if(!this._tickScheduled&&this.dataIsReady)this._tickScheduled=!0,i8.delay(this._tickAndRepeat,[],this);return!0};Y6.prototype._tickAndRepeat=function(){if(this._tickScheduled=!1,this.isPaused||this.isFinished)return;if(this._tick(),!this.isFinished)i8.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0};Y6.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var Q=FV,$=null,J=Math.min(this.max,this.index+Q);if(this.index>=this.max)return this.end();else{switch(this.type){case"string":$=this.data.substring(this.index,J);break;case"uint8array":$=this.data.subarray(this.index,J);break;case"array":case"nodebuffer":$=this.data.slice(this.index,J);break}return this.index=J,this.push({data:$,meta:{percent:this.max?this.index/this.max*100:0}})}};MJ.exports=Y6});var o8=f((cN,zJ)=>{var zV=x0();function LV(){var Q,$=[];for(var J=0;J<256;J++){Q=J;for(var q=0;q<8;q++)Q=Q&1?3988292384^Q>>>1:Q>>>1;$[J]=Q}return $}var FJ=LV();function wV(Q,$,J,q){var X=FJ,Y=q+J;Q=Q^-1;for(var W=q;W<Y;W++)Q=Q>>>8^X[(Q^$[W])&255];return Q^-1}function NV(Q,$,J,q){var X=FJ,Y=q+J;Q=Q^-1;for(var W=q;W<Y;W++)Q=Q>>>8^X[(Q^$.charCodeAt(W))&255];return Q^-1}zJ.exports=function($,J){if(typeof $>"u"||!$.length)return 0;var q=zV.getTypeOf($)!=="string";if(q)return wV(J|0,$,$.length,0);else return NV(J|0,$,$.length,0)}});var Z4=f((pN,wJ)=>{var LJ=$2(),DV=o8(),CV=x0();function E4(){LJ.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}CV.inherits(E4,LJ);E4.prototype.processChunk=function(Q){this.streamInfo.crc32=DV(Q.data,this.streamInfo.crc32||0),this.push(Q)};wJ.exports=E4});var DJ=f((lN,NJ)=>{var OV=x0(),k4=$2();function T4(Q){k4.call(this,"DataLengthProbe for "+Q),this.propName=Q,this.withStreamInfo(Q,0)}OV.inherits(T4,k4);T4.prototype.processChunk=function(Q){if(Q){var $=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=$+Q.data.length}k4.prototype.processChunk.call(this,Q)};NJ.exports=T4});var r8=f((dN,PJ)=>{var CJ=$6(),OJ=v4(),PV=Z4(),x4=DJ();function g4(Q,$,J,q,X){this.compressedSize=Q,this.uncompressedSize=$,this.crc32=J,this.compression=q,this.compressedContent=X}g4.prototype={getContentWorker:function(){var Q=new OJ(CJ.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new x4("data_length")),$=this;return Q.on("end",function(){if(this.streamInfo.data_length!==$.uncompressedSize)throw Error("Bug : uncompressed data size mismatch")}),Q},getCompressedWorker:function(){return new OJ(CJ.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}};g4.createWorkerFrom=function(Q,$,J){return Q.pipe(new PV).pipe(new x4("uncompressedSize")).pipe($.compressWorker(J)).pipe(new x4("compressedSize")).withStreamInfo("compression",$)};PJ.exports=g4});var SJ=f((iN,IJ)=>{var AV=I4(),RV=v4(),_4=X6(),f4=r8(),AJ=$2(),y4=function(Q,$,J){this.name=Q,this.dir=J.dir,this.date=J.date,this.comment=J.comment,this.unixPermissions=J.unixPermissions,this.dosPermissions=J.dosPermissions,this._data=$,this._dataBinary=J.binary,this.options={compression:J.compression,compressionOptions:J.compressionOptions}};y4.prototype={internalStream:function(Q){var $=null,J="string";try{if(!Q)throw Error("No output type specified.");J=Q.toLowerCase();var q=J==="string"||J==="text";if(J==="binarystring"||J==="text")J="string";$=this._decompressWorker();var X=!this._dataBinary;if(X&&!q)$=$.pipe(new _4.Utf8EncodeWorker);if(!X&&q)$=$.pipe(new _4.Utf8DecodeWorker)}catch(Y){$=new AJ("error"),$.error(Y)}return new AV($,J,"")},async:function(Q,$){return this.internalStream(Q).accumulate($)},nodeStream:function(Q,$){return this.internalStream(Q||"nodebuffer").toNodejsStream($)},_compressWorker:function(Q,$){if(this._data instanceof f4&&this._data.compression.magic===Q.magic)return this._data.getCompressedWorker();else{var J=this._decompressWorker();if(!this._dataBinary)J=J.pipe(new _4.Utf8EncodeWorker);return f4.createWorkerFrom(J,Q,$)}},_decompressWorker:function(){if(this._data instanceof f4)return this._data.getContentWorker();else if(this._data instanceof AJ)return this._data;else return new RV(this._data)}};var RJ=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],IV=function(){throw Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")};for(t6=0;t6<RJ.length;t6++)y4.prototype[RJ[t6]]=IV;var t6;IJ.exports=y4});var d2=f((h4)=>{var ZV=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function kV(Q,$){return Object.prototype.hasOwnProperty.call(Q,$)}h4.assign=function(Q){var $=Array.prototype.slice.call(arguments,1);while($.length){var J=$.shift();if(!J)continue;if(typeof J!=="object")throw TypeError(J+"must be non-object");for(var q in J)if(kV(J,q))Q[q]=J[q]}return Q};h4.shrinkBuf=function(Q,$){if(Q.length===$)return Q;if(Q.subarray)return Q.subarray(0,$);return Q.length=$,Q};var TV={arraySet:function(Q,$,J,q,X){if($.subarray&&Q.subarray){Q.set($.subarray(J,J+q),X);return}for(var Y=0;Y<q;Y++)Q[X+Y]=$[J+Y]},flattenChunks:function(Q){var $,J,q,X,Y,W;q=0;for($=0,J=Q.length;$<J;$++)q+=Q[$].length;W=new Uint8Array(q),X=0;for($=0,J=Q.length;$<J;$++)Y=Q[$],W.set(Y,X),X+=Y.length;return W}},xV={arraySet:function(Q,$,J,q,X){for(var Y=0;Y<q;Y++)Q[X+Y]=$[J+Y]},flattenChunks:function(Q){return[].concat.apply([],Q)}};h4.setTyped=function(Q){if(Q)h4.Buf8=Uint8Array,h4.Buf16=Uint16Array,h4.Buf32=Int32Array,h4.assign(h4,TV);else h4.Buf8=Array,h4.Buf16=Array,h4.Buf32=Array,h4.assign(h4,xV)};h4.setTyped(ZV)});var sJ=f((JK)=>{var _V=d2(),fV=4,EJ=0,ZJ=1,yV=2;function B6(Q){var $=Q.length;while(--$>=0)Q[$]=0}var hV=0,fJ=1,bV=2,mV=3,uV=258,i4=29,X8=256,Q8=X8+1+i4,W6=30,n4=19,yJ=2*Q8+1,T1=15,m4=16,cV=7,o4=256,hJ=16,bJ=17,mJ=18,l4=[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],a8=[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],pV=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],uJ=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],lV=512,i2=Array((Q8+2)*2);B6(i2);var e6=Array(W6*2);B6(e6);var $8=Array(lV);B6($8);var J8=Array(uV-mV+1);B6(J8);var r4=Array(i4);B6(r4);var s8=Array(W6);B6(s8);function u4(Q,$,J,q,X){this.static_tree=Q,this.extra_bits=$,this.extra_base=J,this.elems=q,this.max_length=X,this.has_stree=Q&&Q.length}var cJ,pJ,lJ;function c4(Q,$){this.dyn_tree=Q,this.max_code=0,this.stat_desc=$}function dJ(Q){return Q<256?$8[Q]:$8[256+(Q>>>7)]}function q8(Q,$){Q.pending_buf[Q.pending++]=$&255,Q.pending_buf[Q.pending++]=$>>>8&255}function t0(Q,$,J){if(Q.bi_valid>m4-J)Q.bi_buf|=$<<Q.bi_valid&65535,q8(Q,Q.bi_buf),Q.bi_buf=$>>m4-Q.bi_valid,Q.bi_valid+=J-m4;else Q.bi_buf|=$<<Q.bi_valid&65535,Q.bi_valid+=J}function E2(Q,$,J){t0(Q,J[$*2],J[$*2+1])}function iJ(Q,$){var J=0;do J|=Q&1,Q>>>=1,J<<=1;while(--$>0);return J>>>1}function dV(Q){if(Q.bi_valid===16)q8(Q,Q.bi_buf),Q.bi_buf=0,Q.bi_valid=0;else if(Q.bi_valid>=8)Q.pending_buf[Q.pending++]=Q.bi_buf&255,Q.bi_buf>>=8,Q.bi_valid-=8}function iV(Q,$){var{dyn_tree:J,max_code:q}=$,X=$.stat_desc.static_tree,Y=$.stat_desc.has_stree,W=$.stat_desc.extra_bits,B=$.stat_desc.extra_base,U=$.stat_desc.max_length,G,V,F,M,H,_,T=0;for(M=0;M<=T1;M++)Q.bl_count[M]=0;J[Q.heap[Q.heap_max]*2+1]=0;for(G=Q.heap_max+1;G<yJ;G++){if(V=Q.heap[G],M=J[J[V*2+1]*2+1]+1,M>U)M=U,T++;if(J[V*2+1]=M,V>q)continue;if(Q.bl_count[M]++,H=0,V>=B)H=W[V-B];if(_=J[V*2],Q.opt_len+=_*(M+H),Y)Q.static_len+=_*(X[V*2+1]+H)}if(T===0)return;do{M=U-1;while(Q.bl_count[M]===0)M--;Q.bl_count[M]--,Q.bl_count[M+1]+=2,Q.bl_count[U]--,T-=2}while(T>0);for(M=U;M!==0;M--){V=Q.bl_count[M];while(V!==0){if(F=Q.heap[--G],F>q)continue;if(J[F*2+1]!==M)Q.opt_len+=(M-J[F*2+1])*J[F*2],J[F*2+1]=M;V--}}}function nJ(Q,$,J){var q=Array(T1+1),X=0,Y,W;for(Y=1;Y<=T1;Y++)q[Y]=X=X+J[Y-1]<<1;for(W=0;W<=$;W++){var B=Q[W*2+1];if(B===0)continue;Q[W*2]=iJ(q[B]++,B)}}function nV(){var Q,$,J,q,X,Y=Array(T1+1);J=0;for(q=0;q<i4-1;q++){r4[q]=J;for(Q=0;Q<1<<l4[q];Q++)J8[J++]=q}J8[J-1]=q,X=0;for(q=0;q<16;q++){s8[q]=X;for(Q=0;Q<1<<a8[q];Q++)$8[X++]=q}X>>=7;for(;q<W6;q++){s8[q]=X<<7;for(Q=0;Q<1<<a8[q]-7;Q++)$8[256+X++]=q}for($=0;$<=T1;$++)Y[$]=0;Q=0;while(Q<=143)i2[Q*2+1]=8,Q++,Y[8]++;while(Q<=255)i2[Q*2+1]=9,Q++,Y[9]++;while(Q<=279)i2[Q*2+1]=7,Q++,Y[7]++;while(Q<=287)i2[Q*2+1]=8,Q++,Y[8]++;nJ(i2,Q8+1,Y);for(Q=0;Q<W6;Q++)e6[Q*2+1]=5,e6[Q*2]=iJ(Q,5);cJ=new u4(i2,l4,X8+1,Q8,T1),pJ=new u4(e6,a8,0,W6,T1),lJ=new u4([],pV,0,n4,cV)}function oJ(Q){var $;for($=0;$<Q8;$++)Q.dyn_ltree[$*2]=0;for($=0;$<W6;$++)Q.dyn_dtree[$*2]=0;for($=0;$<n4;$++)Q.bl_tree[$*2]=0;Q.dyn_ltree[o4*2]=1,Q.opt_len=Q.static_len=0,Q.last_lit=Q.matches=0}function rJ(Q){if(Q.bi_valid>8)q8(Q,Q.bi_buf);else if(Q.bi_valid>0)Q.pending_buf[Q.pending++]=Q.bi_buf;Q.bi_buf=0,Q.bi_valid=0}function oV(Q,$,J,q){if(rJ(Q),q)q8(Q,J),q8(Q,~J);_V.arraySet(Q.pending_buf,Q.window,$,J,Q.pending),Q.pending+=J}function kJ(Q,$,J,q){var X=$*2,Y=J*2;return Q[X]<Q[Y]||Q[X]===Q[Y]&&q[$]<=q[J]}function p4(Q,$,J){var q=Q.heap[J],X=J<<1;while(X<=Q.heap_len){if(X<Q.heap_len&&kJ($,Q.heap[X+1],Q.heap[X],Q.depth))X++;if(kJ($,q,Q.heap[X],Q.depth))break;Q.heap[J]=Q.heap[X],J=X,X<<=1}Q.heap[J]=q}function TJ(Q,$,J){var q,X,Y=0,W,B;if(Q.last_lit!==0)do if(q=Q.pending_buf[Q.d_buf+Y*2]<<8|Q.pending_buf[Q.d_buf+Y*2+1],X=Q.pending_buf[Q.l_buf+Y],Y++,q===0)E2(Q,X,$);else{if(W=J8[X],E2(Q,W+X8+1,$),B=l4[W],B!==0)X-=r4[W],t0(Q,X,B);if(q--,W=dJ(q),E2(Q,W,J),B=a8[W],B!==0)q-=s8[W],t0(Q,q,B)}while(Y<Q.last_lit);E2(Q,o4,$)}function d4(Q,$){var J=$.dyn_tree,q=$.stat_desc.static_tree,X=$.stat_desc.has_stree,Y=$.stat_desc.elems,W,B,U=-1,G;Q.heap_len=0,Q.heap_max=yJ;for(W=0;W<Y;W++)if(J[W*2]!==0)Q.heap[++Q.heap_len]=U=W,Q.depth[W]=0;else J[W*2+1]=0;while(Q.heap_len<2)if(G=Q.heap[++Q.heap_len]=U<2?++U:0,J[G*2]=1,Q.depth[G]=0,Q.opt_len--,X)Q.static_len-=q[G*2+1];$.max_code=U;for(W=Q.heap_len>>1;W>=1;W--)p4(Q,J,W);G=Y;do W=Q.heap[1],Q.heap[1]=Q.heap[Q.heap_len--],p4(Q,J,1),B=Q.heap[1],Q.heap[--Q.heap_max]=W,Q.heap[--Q.heap_max]=B,J[G*2]=J[W*2]+J[B*2],Q.depth[G]=(Q.depth[W]>=Q.depth[B]?Q.depth[W]:Q.depth[B])+1,J[W*2+1]=J[B*2+1]=G,Q.heap[1]=G++,p4(Q,J,1);while(Q.heap_len>=2);Q.heap[--Q.heap_max]=Q.heap[1],iV(Q,$),nJ(J,U,Q.bl_count)}function xJ(Q,$,J){var q,X=-1,Y,W=$[1],B=0,U=7,G=4;if(W===0)U=138,G=3;$[(J+1)*2+1]=65535;for(q=0;q<=J;q++){if(Y=W,W=$[(q+1)*2+1],++B<U&&Y===W)continue;else if(B<G)Q.bl_tree[Y*2]+=B;else if(Y!==0){if(Y!==X)Q.bl_tree[Y*2]++;Q.bl_tree[hJ*2]++}else if(B<=10)Q.bl_tree[bJ*2]++;else Q.bl_tree[mJ*2]++;if(B=0,X=Y,W===0)U=138,G=3;else if(Y===W)U=6,G=3;else U=7,G=4}}function gJ(Q,$,J){var q,X=-1,Y,W=$[1],B=0,U=7,G=4;if(W===0)U=138,G=3;for(q=0;q<=J;q++){if(Y=W,W=$[(q+1)*2+1],++B<U&&Y===W)continue;else if(B<G)do E2(Q,Y,Q.bl_tree);while(--B!==0);else if(Y!==0){if(Y!==X)E2(Q,Y,Q.bl_tree),B--;E2(Q,hJ,Q.bl_tree),t0(Q,B-3,2)}else if(B<=10)E2(Q,bJ,Q.bl_tree),t0(Q,B-3,3);else E2(Q,mJ,Q.bl_tree),t0(Q,B-11,7);if(B=0,X=Y,W===0)U=138,G=3;else if(Y===W)U=6,G=3;else U=7,G=4}}function rV(Q){var $;xJ(Q,Q.dyn_ltree,Q.l_desc.max_code),xJ(Q,Q.dyn_dtree,Q.d_desc.max_code),d4(Q,Q.bl_desc);for($=n4-1;$>=3;$--)if(Q.bl_tree[uJ[$]*2+1]!==0)break;return Q.opt_len+=3*($+1)+5+5+4,$}function aV(Q,$,J,q){var X;t0(Q,$-257,5),t0(Q,J-1,5),t0(Q,q-4,4);for(X=0;X<q;X++)t0(Q,Q.bl_tree[uJ[X]*2+1],3);gJ(Q,Q.dyn_ltree,$-1),gJ(Q,Q.dyn_dtree,J-1)}function sV(Q){var $=4093624447,J;for(J=0;J<=31;J++,$>>>=1)if($&1&&Q.dyn_ltree[J*2]!==0)return EJ;if(Q.dyn_ltree[18]!==0||Q.dyn_ltree[20]!==0||Q.dyn_ltree[26]!==0)return ZJ;for(J=32;J<X8;J++)if(Q.dyn_ltree[J*2]!==0)return ZJ;return EJ}var _J=!1;function tV(Q){if(!_J)nV(),_J=!0;Q.l_desc=new c4(Q.dyn_ltree,cJ),Q.d_desc=new c4(Q.dyn_dtree,pJ),Q.bl_desc=new c4(Q.bl_tree,lJ),Q.bi_buf=0,Q.bi_valid=0,oJ(Q)}function aJ(Q,$,J,q){t0(Q,(hV<<1)+(q?1:0),3),oV(Q,$,J,!0)}function eV(Q){t0(Q,fJ<<1,3),E2(Q,o4,i2),dV(Q)}function QK(Q,$,J,q){var X,Y,W=0;if(Q.level>0){if(Q.strm.data_type===yV)Q.strm.data_type=sV(Q);if(d4(Q,Q.l_desc),d4(Q,Q.d_desc),W=rV(Q),X=Q.opt_len+3+7>>>3,Y=Q.static_len+3+7>>>3,Y<=X)X=Y}else X=Y=J+5;if(J+4<=X&&$!==-1)aJ(Q,$,J,q);else if(Q.strategy===fV||Y===X)t0(Q,(fJ<<1)+(q?1:0),3),TJ(Q,i2,e6);else t0(Q,(bV<<1)+(q?1:0),3),aV(Q,Q.l_desc.max_code+1,Q.d_desc.max_code+1,W+1),TJ(Q,Q.dyn_ltree,Q.dyn_dtree);if(oJ(Q),q)rJ(Q)}function $K(Q,$,J){if(Q.pending_buf[Q.d_buf+Q.last_lit*2]=$>>>8&255,Q.pending_buf[Q.d_buf+Q.last_lit*2+1]=$&255,Q.pending_buf[Q.l_buf+Q.last_lit]=J&255,Q.last_lit++,$===0)Q.dyn_ltree[J*2]++;else Q.matches++,$--,Q.dyn_ltree[(J8[J]+X8+1)*2]++,Q.dyn_dtree[dJ($)*2]++;return Q.last_lit===Q.lit_bufsize-1}JK._tr_init=tV;JK._tr_stored_block=aJ;JK._tr_flush_block=QK;JK._tr_tally=$K;JK._tr_align=eV});var a4=f((rN,tJ)=>{function UK(Q,$,J,q){var X=Q&65535|0,Y=Q>>>16&65535|0,W=0;while(J!==0){W=J>2000?2000:J,J-=W;do X=X+$[q++]|0,Y=Y+X|0;while(--W);X%=65521,Y%=65521}return X|Y<<16|0}tJ.exports=UK});var s4=f((aN,eJ)=>{function GK(){var Q,$=[];for(var J=0;J<256;J++){Q=J;for(var q=0;q<8;q++)Q=Q&1?3988292384^Q>>>1:Q>>>1;$[J]=Q}return $}var VK=GK();function KK(Q,$,J,q){var X=VK,Y=q+J;Q^=-1;for(var W=q;W<Y;W++)Q=Q>>>8^X[(Q^$[W])&255];return Q^-1}eJ.exports=KK});var t8=f((sN,Qq)=>{Qq.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 Gq=f((lK)=>{var o0=d2(),U2=sJ(),Xq=a4(),Y1=s4(),HK=t8(),f1=0,jK=1,MK=3,V1=4,$q=5,k2=0,Jq=1,G2=-2,FK=-3,t4=-5,zK=-1,LK=1,e8=2,wK=3,NK=4,DK=0,CK=2,q5=8,OK=9,PK=15,AK=8,RK=29,IK=256,Q7=IK+1+RK,SK=30,vK=19,EK=2*Q7+1,ZK=15,R0=3,U1=258,M2=U1+R0+1,kK=32,X5=42,$7=69,Q5=73,$5=91,J5=103,x1=113,W8=666,f0=1,B8=2,g1=3,V6=4,TK=3;function G1(Q,$){return Q.msg=HK[$],$}function qq(Q){return(Q<<1)-(Q>4?9:0)}function B1(Q){var $=Q.length;while(--$>=0)Q[$]=0}function W1(Q){var $=Q.state,J=$.pending;if(J>Q.avail_out)J=Q.avail_out;if(J===0)return;if(o0.arraySet(Q.output,$.pending_buf,$.pending_out,J,Q.next_out),Q.next_out+=J,$.pending_out+=J,Q.total_out+=J,Q.avail_out-=J,$.pending-=J,$.pending===0)$.pending_out=0}function b0(Q,$){U2._tr_flush_block(Q,Q.block_start>=0?Q.block_start:-1,Q.strstart-Q.block_start,$),Q.block_start=Q.strstart,W1(Q.strm)}function I0(Q,$){Q.pending_buf[Q.pending++]=$}function Y8(Q,$){Q.pending_buf[Q.pending++]=$>>>8&255,Q.pending_buf[Q.pending++]=$&255}function xK(Q,$,J,q){var X=Q.avail_in;if(X>q)X=q;if(X===0)return 0;if(Q.avail_in-=X,o0.arraySet($,Q.input,Q.next_in,X,J),Q.state.wrap===1)Q.adler=Xq(Q.adler,$,X,J);else if(Q.state.wrap===2)Q.adler=Y1(Q.adler,$,X,J);return Q.next_in+=X,Q.total_in+=X,X}function Yq(Q,$){var{max_chain_length:J,strstart:q}=Q,X,Y,W=Q.prev_length,B=Q.nice_match,U=Q.strstart>Q.w_size-M2?Q.strstart-(Q.w_size-M2):0,G=Q.window,V=Q.w_mask,F=Q.prev,M=Q.strstart+U1,H=G[q+W-1],_=G[q+W];if(Q.prev_length>=Q.good_match)J>>=2;if(B>Q.lookahead)B=Q.lookahead;do{if(X=$,G[X+W]!==_||G[X+W-1]!==H||G[X]!==G[q]||G[++X]!==G[q+1])continue;q+=2,X++;do;while(G[++q]===G[++X]&&G[++q]===G[++X]&&G[++q]===G[++X]&&G[++q]===G[++X]&&G[++q]===G[++X]&&G[++q]===G[++X]&&G[++q]===G[++X]&&G[++q]===G[++X]&&q<M);if(Y=U1-(M-q),q=M-U1,Y>W){if(Q.match_start=$,W=Y,Y>=B)break;H=G[q+W-1],_=G[q+W]}}while(($=F[$&V])>U&&--J!==0);if(W<=Q.lookahead)return W;return Q.lookahead}function _1(Q){var $=Q.w_size,J,q,X,Y,W;do{if(Y=Q.window_size-Q.lookahead-Q.strstart,Q.strstart>=$+($-M2)){o0.arraySet(Q.window,Q.window,$,$,0),Q.match_start-=$,Q.strstart-=$,Q.block_start-=$,q=Q.hash_size,J=q;do X=Q.head[--J],Q.head[J]=X>=$?X-$:0;while(--q);q=$,J=q;do X=Q.prev[--J],Q.prev[J]=X>=$?X-$:0;while(--q);Y+=$}if(Q.strm.avail_in===0)break;if(q=xK(Q.strm,Q.window,Q.strstart+Q.lookahead,Y),Q.lookahead+=q,Q.lookahead+Q.insert>=R0){W=Q.strstart-Q.insert,Q.ins_h=Q.window[W],Q.ins_h=(Q.ins_h<<Q.hash_shift^Q.window[W+1])&Q.hash_mask;while(Q.insert)if(Q.ins_h=(Q.ins_h<<Q.hash_shift^Q.window[W+R0-1])&Q.hash_mask,Q.prev[W&Q.w_mask]=Q.head[Q.ins_h],Q.head[Q.ins_h]=W,W++,Q.insert--,Q.lookahead+Q.insert<R0)break}}while(Q.lookahead<M2&&Q.strm.avail_in!==0)}function gK(Q,$){var J=65535;if(J>Q.pending_buf_size-5)J=Q.pending_buf_size-5;for(;;){if(Q.lookahead<=1){if(_1(Q),Q.lookahead===0&&$===f1)return f0;if(Q.lookahead===0)break}Q.strstart+=Q.lookahead,Q.lookahead=0;var q=Q.block_start+J;if(Q.strstart===0||Q.strstart>=q){if(Q.lookahead=Q.strstart-q,Q.strstart=q,b0(Q,!1),Q.strm.avail_out===0)return f0}if(Q.strstart-Q.block_start>=Q.w_size-M2){if(b0(Q,!1),Q.strm.avail_out===0)return f0}}if(Q.insert=0,$===V1){if(b0(Q,!0),Q.strm.avail_out===0)return g1;return V6}if(Q.strstart>Q.block_start){if(b0(Q,!1),Q.strm.avail_out===0)return f0}return f0}function e4(Q,$){var J,q;for(;;){if(Q.lookahead<M2){if(_1(Q),Q.lookahead<M2&&$===f1)return f0;if(Q.lookahead===0)break}if(J=0,Q.lookahead>=R0)Q.ins_h=(Q.ins_h<<Q.hash_shift^Q.window[Q.strstart+R0-1])&Q.hash_mask,J=Q.prev[Q.strstart&Q.w_mask]=Q.head[Q.ins_h],Q.head[Q.ins_h]=Q.strstart;if(J!==0&&Q.strstart-J<=Q.w_size-M2)Q.match_length=Yq(Q,J);if(Q.match_length>=R0)if(q=U2._tr_tally(Q,Q.strstart-Q.match_start,Q.match_length-R0),Q.lookahead-=Q.match_length,Q.match_length<=Q.max_lazy_match&&Q.lookahead>=R0){Q.match_length--;do Q.strstart++,Q.ins_h=(Q.ins_h<<Q.hash_shift^Q.window[Q.strstart+R0-1])&Q.hash_mask,J=Q.prev[Q.strstart&Q.w_mask]=Q.head[Q.ins_h],Q.head[Q.ins_h]=Q.strstart;while(--Q.match_length!==0);Q.strstart++}else Q.strstart+=Q.match_length,Q.match_length=0,Q.ins_h=Q.window[Q.strstart],Q.ins_h=(Q.ins_h<<Q.hash_shift^Q.window[Q.strstart+1])&Q.hash_mask;else q=U2._tr_tally(Q,0,Q.window[Q.strstart]),Q.lookahead--,Q.strstart++;if(q){if(b0(Q,!1),Q.strm.avail_out===0)return f0}}if(Q.insert=Q.strstart<R0-1?Q.strstart:R0-1,$===V1){if(b0(Q,!0),Q.strm.avail_out===0)return g1;return V6}if(Q.last_lit){if(b0(Q,!1),Q.strm.avail_out===0)return f0}return B8}function U6(Q,$){var J,q,X;for(;;){if(Q.lookahead<M2){if(_1(Q),Q.lookahead<M2&&$===f1)return f0;if(Q.lookahead===0)break}if(J=0,Q.lookahead>=R0)Q.ins_h=(Q.ins_h<<Q.hash_shift^Q.window[Q.strstart+R0-1])&Q.hash_mask,J=Q.prev[Q.strstart&Q.w_mask]=Q.head[Q.ins_h],Q.head[Q.ins_h]=Q.strstart;if(Q.prev_length=Q.match_length,Q.prev_match=Q.match_start,Q.match_length=R0-1,J!==0&&Q.prev_length<Q.max_lazy_match&&Q.strstart-J<=Q.w_size-M2){if(Q.match_length=Yq(Q,J),Q.match_length<=5&&(Q.strategy===LK||Q.match_length===R0&&Q.strstart-Q.match_start>4096))Q.match_length=R0-1}if(Q.prev_length>=R0&&Q.match_length<=Q.prev_length){X=Q.strstart+Q.lookahead-R0,q=U2._tr_tally(Q,Q.strstart-1-Q.prev_match,Q.prev_length-R0),Q.lookahead-=Q.prev_length-1,Q.prev_length-=2;do if(++Q.strstart<=X)Q.ins_h=(Q.ins_h<<Q.hash_shift^Q.window[Q.strstart+R0-1])&Q.hash_mask,J=Q.prev[Q.strstart&Q.w_mask]=Q.head[Q.ins_h],Q.head[Q.ins_h]=Q.strstart;while(--Q.prev_length!==0);if(Q.match_available=0,Q.match_length=R0-1,Q.strstart++,q){if(b0(Q,!1),Q.strm.avail_out===0)return f0}}else if(Q.match_available){if(q=U2._tr_tally(Q,0,Q.window[Q.strstart-1]),q)b0(Q,!1);if(Q.strstart++,Q.lookahead--,Q.strm.avail_out===0)return f0}else Q.match_available=1,Q.strstart++,Q.lookahead--}if(Q.match_available)q=U2._tr_tally(Q,0,Q.window[Q.strstart-1]),Q.match_available=0;if(Q.insert=Q.strstart<R0-1?Q.strstart:R0-1,$===V1){if(b0(Q,!0),Q.strm.avail_out===0)return g1;return V6}if(Q.last_lit){if(b0(Q,!1),Q.strm.avail_out===0)return f0}return B8}function _K(Q,$){var J,q,X,Y,W=Q.window;for(;;){if(Q.lookahead<=U1){if(_1(Q),Q.lookahead<=U1&&$===f1)return f0;if(Q.lookahead===0)break}if(Q.match_length=0,Q.lookahead>=R0&&Q.strstart>0){if(X=Q.strstart-1,q=W[X],q===W[++X]&&q===W[++X]&&q===W[++X]){Y=Q.strstart+U1;do;while(q===W[++X]&&q===W[++X]&&q===W[++X]&&q===W[++X]&&q===W[++X]&&q===W[++X]&&q===W[++X]&&q===W[++X]&&X<Y);if(Q.match_length=U1-(Y-X),Q.match_length>Q.lookahead)Q.match_length=Q.lookahead}}if(Q.match_length>=R0)J=U2._tr_tally(Q,1,Q.match_length-R0),Q.lookahead-=Q.match_length,Q.strstart+=Q.match_length,Q.match_length=0;else J=U2._tr_tally(Q,0,Q.window[Q.strstart]),Q.lookahead--,Q.strstart++;if(J){if(b0(Q,!1),Q.strm.avail_out===0)return f0}}if(Q.insert=0,$===V1){if(b0(Q,!0),Q.strm.avail_out===0)return g1;return V6}if(Q.last_lit){if(b0(Q,!1),Q.strm.avail_out===0)return f0}return B8}function fK(Q,$){var J;for(;;){if(Q.lookahead===0){if(_1(Q),Q.lookahead===0){if($===f1)return f0;break}}if(Q.match_length=0,J=U2._tr_tally(Q,0,Q.window[Q.strstart]),Q.lookahead--,Q.strstart++,J){if(b0(Q,!1),Q.strm.avail_out===0)return f0}}if(Q.insert=0,$===V1){if(b0(Q,!0),Q.strm.avail_out===0)return g1;return V6}if(Q.last_lit){if(b0(Q,!1),Q.strm.avail_out===0)return f0}return B8}function Z2(Q,$,J,q,X){this.good_length=Q,this.max_lazy=$,this.nice_length=J,this.max_chain=q,this.func=X}var G6;G6=[new Z2(0,0,0,0,gK),new Z2(4,4,8,4,e4),new Z2(4,5,16,8,e4),new Z2(4,6,32,32,e4),new Z2(4,4,16,16,U6),new Z2(8,16,32,32,U6),new Z2(8,16,128,128,U6),new Z2(8,32,128,256,U6),new Z2(32,128,258,1024,U6),new Z2(32,258,258,4096,U6)];function yK(Q){Q.window_size=2*Q.w_size,B1(Q.head),Q.max_lazy_match=G6[Q.level].max_lazy,Q.good_match=G6[Q.level].good_length,Q.nice_match=G6[Q.level].nice_length,Q.max_chain_length=G6[Q.level].max_chain,Q.strstart=0,Q.block_start=0,Q.lookahead=0,Q.insert=0,Q.match_length=Q.prev_length=R0-1,Q.match_available=0,Q.ins_h=0}function hK(){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=q5,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 o0.Buf16(EK*2),this.dyn_dtree=new o0.Buf16((2*SK+1)*2),this.bl_tree=new o0.Buf16((2*vK+1)*2),B1(this.dyn_ltree),B1(this.dyn_dtree),B1(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new o0.Buf16(ZK+1),this.heap=new o0.Buf16(2*Q7+1),B1(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new o0.Buf16(2*Q7+1),B1(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 Wq(Q){var $;if(!Q||!Q.state)return G1(Q,G2);if(Q.total_in=Q.total_out=0,Q.data_type=CK,$=Q.state,$.pending=0,$.pending_out=0,$.wrap<0)$.wrap=-$.wrap;return $.status=$.wrap?X5:x1,Q.adler=$.wrap===2?0:1,$.last_flush=f1,U2._tr_init($),k2}function Bq(Q){var $=Wq(Q);if($===k2)yK(Q.state);return $}function bK(Q,$){if(!Q||!Q.state)return G2;if(Q.state.wrap!==2)return G2;return Q.state.gzhead=$,k2}function Uq(Q,$,J,q,X,Y){if(!Q)return G2;var W=1;if($===zK)$=6;if(q<0)W=0,q=-q;else if(q>15)W=2,q-=16;if(X<1||X>OK||J!==q5||q<8||q>15||$<0||$>9||Y<0||Y>NK)return G1(Q,G2);if(q===8)q=9;var B=new hK;return Q.state=B,B.strm=Q,B.wrap=W,B.gzhead=null,B.w_bits=q,B.w_size=1<<B.w_bits,B.w_mask=B.w_size-1,B.hash_bits=X+7,B.hash_size=1<<B.hash_bits,B.hash_mask=B.hash_size-1,B.hash_shift=~~((B.hash_bits+R0-1)/R0),B.window=new o0.Buf8(B.w_size*2),B.head=new o0.Buf16(B.hash_size),B.prev=new o0.Buf16(B.w_size),B.lit_bufsize=1<<X+6,B.pending_buf_size=B.lit_bufsize*4,B.pending_buf=new o0.Buf8(B.pending_buf_size),B.d_buf=1*B.lit_bufsize,B.l_buf=3*B.lit_bufsize,B.level=$,B.strategy=Y,B.method=J,Bq(Q)}function mK(Q,$){return Uq(Q,$,q5,PK,AK,DK)}function uK(Q,$){var J,q,X,Y;if(!Q||!Q.state||$>$q||$<0)return Q?G1(Q,G2):G2;if(q=Q.state,!Q.output||!Q.input&&Q.avail_in!==0||q.status===W8&&$!==V1)return G1(Q,Q.avail_out===0?t4:G2);if(q.strm=Q,J=q.last_flush,q.last_flush=$,q.status===X5)if(q.wrap===2)if(Q.adler=0,I0(q,31),I0(q,139),I0(q,8),!q.gzhead)I0(q,0),I0(q,0),I0(q,0),I0(q,0),I0(q,0),I0(q,q.level===9?2:q.strategy>=e8||q.level<2?4:0),I0(q,TK),q.status=x1;else{if(I0(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)),I0(q,q.gzhead.time&255),I0(q,q.gzhead.time>>8&255),I0(q,q.gzhead.time>>16&255),I0(q,q.gzhead.time>>24&255),I0(q,q.level===9?2:q.strategy>=e8||q.level<2?4:0),I0(q,q.gzhead.os&255),q.gzhead.extra&&q.gzhead.extra.length)I0(q,q.gzhead.extra.length&255),I0(q,q.gzhead.extra.length>>8&255);if(q.gzhead.hcrc)Q.adler=Y1(Q.adler,q.pending_buf,q.pending,0);q.gzindex=0,q.status=$7}else{var W=q5+(q.w_bits-8<<4)<<8,B=-1;if(q.strategy>=e8||q.level<2)B=0;else if(q.level<6)B=1;else if(q.level===6)B=2;else B=3;if(W|=B<<6,q.strstart!==0)W|=kK;if(W+=31-W%31,q.status=x1,Y8(q,W),q.strstart!==0)Y8(q,Q.adler>>>16),Y8(q,Q.adler&65535);Q.adler=1}if(q.status===$7)if(q.gzhead.extra){X=q.pending;while(q.gzindex<(q.gzhead.extra.length&65535)){if(q.pending===q.pending_buf_size){if(q.gzhead.hcrc&&q.pending>X)Q.adler=Y1(Q.adler,q.pending_buf,q.pending-X,X);if(W1(Q),X=q.pending,q.pending===q.pending_buf_size)break}I0(q,q.gzhead.extra[q.gzindex]&255),q.gzindex++}if(q.gzhead.hcrc&&q.pending>X)Q.adler=Y1(Q.adler,q.pending_buf,q.pending-X,X);if(q.gzindex===q.gzhead.extra.length)q.gzindex=0,q.status=Q5}else q.status=Q5;if(q.status===Q5)if(q.gzhead.name){X=q.pending;do{if(q.pending===q.pending_buf_size){if(q.gzhead.hcrc&&q.pending>X)Q.adler=Y1(Q.adler,q.pending_buf,q.pending-X,X);if(W1(Q),X=q.pending,q.pending===q.pending_buf_size){Y=1;break}}if(q.gzindex<q.gzhead.name.length)Y=q.gzhead.name.charCodeAt(q.gzindex++)&255;else Y=0;I0(q,Y)}while(Y!==0);if(q.gzhead.hcrc&&q.pending>X)Q.adler=Y1(Q.adler,q.pending_buf,q.pending-X,X);if(Y===0)q.gzindex=0,q.status=$5}else q.status=$5;if(q.status===$5)if(q.gzhead.comment){X=q.pending;do{if(q.pending===q.pending_buf_size){if(q.gzhead.hcrc&&q.pending>X)Q.adler=Y1(Q.adler,q.pending_buf,q.pending-X,X);if(W1(Q),X=q.pending,q.pending===q.pending_buf_size){Y=1;break}}if(q.gzindex<q.gzhead.comment.length)Y=q.gzhead.comment.charCodeAt(q.gzindex++)&255;else Y=0;I0(q,Y)}while(Y!==0);if(q.gzhead.hcrc&&q.pending>X)Q.adler=Y1(Q.adler,q.pending_buf,q.pending-X,X);if(Y===0)q.status=J5}else q.status=J5;if(q.status===J5)if(q.gzhead.hcrc){if(q.pending+2>q.pending_buf_size)W1(Q);if(q.pending+2<=q.pending_buf_size)I0(q,Q.adler&255),I0(q,Q.adler>>8&255),Q.adler=0,q.status=x1}else q.status=x1;if(q.pending!==0){if(W1(Q),Q.avail_out===0)return q.last_flush=-1,k2}else if(Q.avail_in===0&&qq($)<=qq(J)&&$!==V1)return G1(Q,t4);if(q.status===W8&&Q.avail_in!==0)return G1(Q,t4);if(Q.avail_in!==0||q.lookahead!==0||$!==f1&&q.status!==W8){var U=q.strategy===e8?fK(q,$):q.strategy===wK?_K(q,$):G6[q.level].func(q,$);if(U===g1||U===V6)q.status=W8;if(U===f0||U===g1){if(Q.avail_out===0)q.last_flush=-1;return k2}if(U===B8){if($===jK)U2._tr_align(q);else if($!==$q){if(U2._tr_stored_block(q,0,0,!1),$===MK){if(B1(q.head),q.lookahead===0)q.strstart=0,q.block_start=0,q.insert=0}}if(W1(Q),Q.avail_out===0)return q.last_flush=-1,k2}}if($!==V1)return k2;if(q.wrap<=0)return Jq;if(q.wrap===2)I0(q,Q.adler&255),I0(q,Q.adler>>8&255),I0(q,Q.adler>>16&255),I0(q,Q.adler>>24&255),I0(q,Q.total_in&255),I0(q,Q.total_in>>8&255),I0(q,Q.total_in>>16&255),I0(q,Q.total_in>>24&255);else Y8(q,Q.adler>>>16),Y8(q,Q.adler&65535);if(W1(Q),q.wrap>0)q.wrap=-q.wrap;return q.pending!==0?k2:Jq}function cK(Q){var $;if(!Q||!Q.state)return G2;if($=Q.state.status,$!==X5&&$!==$7&&$!==Q5&&$!==$5&&$!==J5&&$!==x1&&$!==W8)return G1(Q,G2);return Q.state=null,$===x1?G1(Q,FK):k2}function pK(Q,$){var J=$.length,q,X,Y,W,B,U,G,V;if(!Q||!Q.state)return G2;if(q=Q.state,W=q.wrap,W===2||W===1&&q.status!==X5||q.lookahead)return G2;if(W===1)Q.adler=Xq(Q.adler,$,J,0);if(q.wrap=0,J>=q.w_size){if(W===0)B1(q.head),q.strstart=0,q.block_start=0,q.insert=0;V=new o0.Buf8(q.w_size),o0.arraySet(V,$,J-q.w_size,q.w_size,0),$=V,J=q.w_size}B=Q.avail_in,U=Q.next_in,G=Q.input,Q.avail_in=J,Q.next_in=0,Q.input=$,_1(q);while(q.lookahead>=R0){X=q.strstart,Y=q.lookahead-(R0-1);do q.ins_h=(q.ins_h<<q.hash_shift^q.window[X+R0-1])&q.hash_mask,q.prev[X&q.w_mask]=q.head[q.ins_h],q.head[q.ins_h]=X,X++;while(--Y);q.strstart=X,q.lookahead=R0-1,_1(q)}return q.strstart+=q.lookahead,q.block_start=q.strstart,q.insert=q.lookahead,q.lookahead=0,q.match_length=q.prev_length=R0-1,q.match_available=0,Q.next_in=U,Q.input=G,Q.avail_in=B,q.wrap=W,k2}lK.deflateInit=mK;lK.deflateInit2=Uq;lK.deflateReset=Bq;lK.deflateResetKeep=Wq;lK.deflateSetHeader=bK;lK.deflate=uK;lK.deflateEnd=cK;lK.deflateSetDictionary=pK;lK.deflateInfo="pako deflate (from Nodeca project)"});var J7=f((QH)=>{var Y5=d2(),Vq=!0,Kq=!0;try{String.fromCharCode.apply(null,[0])}catch(Q){Vq=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(Q){Kq=!1}var U8=new Y5.Buf8(256);for(T2=0;T2<256;T2++)U8[T2]=T2>=252?6:T2>=248?5:T2>=240?4:T2>=224?3:T2>=192?2:1;var T2;U8[254]=U8[254]=1;QH.string2buf=function(Q){var $,J,q,X,Y,W=Q.length,B=0;for(X=0;X<W;X++){if(J=Q.charCodeAt(X),(J&64512)===55296&&X+1<W){if(q=Q.charCodeAt(X+1),(q&64512)===56320)J=65536+(J-55296<<10)+(q-56320),X++}B+=J<128?1:J<2048?2:J<65536?3:4}$=new Y5.Buf8(B);for(Y=0,X=0;Y<B;X++){if(J=Q.charCodeAt(X),(J&64512)===55296&&X+1<W){if(q=Q.charCodeAt(X+1),(q&64512)===56320)J=65536+(J-55296<<10)+(q-56320),X++}if(J<128)$[Y++]=J;else if(J<2048)$[Y++]=192|J>>>6,$[Y++]=128|J&63;else if(J<65536)$[Y++]=224|J>>>12,$[Y++]=128|J>>>6&63,$[Y++]=128|J&63;else $[Y++]=240|J>>>18,$[Y++]=128|J>>>12&63,$[Y++]=128|J>>>6&63,$[Y++]=128|J&63}return $};function Hq(Q,$){if($<65534){if(Q.subarray&&Kq||!Q.subarray&&Vq)return String.fromCharCode.apply(null,Y5.shrinkBuf(Q,$))}var J="";for(var q=0;q<$;q++)J+=String.fromCharCode(Q[q]);return J}QH.buf2binstring=function(Q){return Hq(Q,Q.length)};QH.binstring2buf=function(Q){var $=new Y5.Buf8(Q.length);for(var J=0,q=$.length;J<q;J++)$[J]=Q.charCodeAt(J);return $};QH.buf2string=function(Q,$){var J,q,X,Y,W=$||Q.length,B=Array(W*2);for(q=0,J=0;J<W;){if(X=Q[J++],X<128){B[q++]=X;continue}if(Y=U8[X],Y>4){B[q++]=65533,J+=Y-1;continue}X&=Y===2?31:Y===3?15:7;while(Y>1&&J<W)X=X<<6|Q[J++]&63,Y--;if(Y>1){B[q++]=65533;continue}if(X<65536)B[q++]=X;else X-=65536,B[q++]=55296|X>>10&1023,B[q++]=56320|X&1023}return Hq(B,q)};QH.utf8border=function(Q,$){var J;if($=$||Q.length,$>Q.length)$=Q.length;J=$-1;while(J>=0&&(Q[J]&192)===128)J--;if(J<0)return $;if(J===0)return $;return J+U8[Q[J]]>$?J:$}});var q7=f((QD,jq)=>{function WH(){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}jq.exports=WH});var Lq=f((MH)=>{var G8=Gq(),V8=d2(),Y7=J7(),W7=t8(),BH=q7(),zq=Object.prototype.toString,UH=0,X7=4,K6=0,Mq=1,Fq=2,GH=-1,VH=0,KH=8;function y1(Q){if(!(this instanceof y1))return new y1(Q);this.options=V8.assign({level:GH,method:KH,chunkSize:16384,windowBits:15,memLevel:8,strategy:VH,to:""},Q||{});var $=this.options;if($.raw&&$.windowBits>0)$.windowBits=-$.windowBits;else if($.gzip&&$.windowBits>0&&$.windowBits<16)$.windowBits+=16;this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new BH,this.strm.avail_out=0;var J=G8.deflateInit2(this.strm,$.level,$.method,$.windowBits,$.memLevel,$.strategy);if(J!==K6)throw Error(W7[J]);if($.header)G8.deflateSetHeader(this.strm,$.header);if($.dictionary){var q;if(typeof $.dictionary==="string")q=Y7.string2buf($.dictionary);else if(zq.call($.dictionary)==="[object ArrayBuffer]")q=new Uint8Array($.dictionary);else q=$.dictionary;if(J=G8.deflateSetDictionary(this.strm,q),J!==K6)throw Error(W7[J]);this._dict_set=!0}}y1.prototype.push=function(Q,$){var J=this.strm,q=this.options.chunkSize,X,Y;if(this.ended)return!1;if(Y=$===~~$?$:$===!0?X7:UH,typeof Q==="string")J.input=Y7.string2buf(Q);else if(zq.call(Q)==="[object ArrayBuffer]")J.input=new Uint8Array(Q);else J.input=Q;J.next_in=0,J.avail_in=J.input.length;do{if(J.avail_out===0)J.output=new V8.Buf8(q),J.next_out=0,J.avail_out=q;if(X=G8.deflate(J,Y),X!==Mq&&X!==K6)return this.onEnd(X),this.ended=!0,!1;if(J.avail_out===0||J.avail_in===0&&(Y===X7||Y===Fq))if(this.options.to==="string")this.onData(Y7.buf2binstring(V8.shrinkBuf(J.output,J.next_out)));else this.onData(V8.shrinkBuf(J.output,J.next_out))}while((J.avail_in>0||J.avail_out===0)&&X!==Mq);if(Y===X7)return X=G8.deflateEnd(this.strm),this.onEnd(X),this.ended=!0,X===K6;if(Y===Fq)return this.onEnd(K6),J.avail_out=0,!0;return!0};y1.prototype.onData=function(Q){this.chunks.push(Q)};y1.prototype.onEnd=function(Q){if(Q===K6)if(this.options.to==="string")this.result=this.chunks.join("");else this.result=V8.flattenChunks(this.chunks);this.chunks=[],this.err=Q,this.msg=this.strm.msg};function B7(Q,$){var J=new y1($);if(J.push(Q,!0),J.err)throw J.msg||W7[J.err];return J.result}function HH(Q,$){return $=$||{},$.raw=!0,B7(Q,$)}function jH(Q,$){return $=$||{},$.gzip=!0,B7(Q,$)}MH.Deflate=y1;MH.deflate=B7;MH.deflateRaw=HH;MH.gzip=jH});var Nq=f((JD,wq)=>{var W5=30,NH=12;wq.exports=function($,J){var q,X,Y,W,B,U,G,V,F,M,H,_,T,C,O,K,L,w,P,h,k,d,S,v,A;q=$.state,X=$.next_in,v=$.input,Y=X+($.avail_in-5),W=$.next_out,A=$.output,B=W-(J-$.avail_out),U=W+($.avail_out-257),G=q.dmax,V=q.wsize,F=q.whave,M=q.wnext,H=q.window,_=q.hold,T=q.bits,C=q.lencode,O=q.distcode,K=(1<<q.lenbits)-1,L=(1<<q.distbits)-1;Q:do{if(T<15)_+=v[X++]<<T,T+=8,_+=v[X++]<<T,T+=8;w=C[_&K];$:for(;;){if(P=w>>>24,_>>>=P,T-=P,P=w>>>16&255,P===0)A[W++]=w&65535;else if(P&16){if(h=w&65535,P&=15,P){if(T<P)_+=v[X++]<<T,T+=8;h+=_&(1<<P)-1,_>>>=P,T-=P}if(T<15)_+=v[X++]<<T,T+=8,_+=v[X++]<<T,T+=8;w=O[_&L];J:for(;;){if(P=w>>>24,_>>>=P,T-=P,P=w>>>16&255,P&16){if(k=w&65535,P&=15,T<P){if(_+=v[X++]<<T,T+=8,T<P)_+=v[X++]<<T,T+=8}if(k+=_&(1<<P)-1,k>G){$.msg="invalid distance too far back",q.mode=W5;break Q}if(_>>>=P,T-=P,P=W-B,k>P){if(P=k-P,P>F){if(q.sane){$.msg="invalid distance too far back",q.mode=W5;break Q}}if(d=0,S=H,M===0){if(d+=V-P,P<h){h-=P;do A[W++]=H[d++];while(--P);d=W-k,S=A}}else if(M<P){if(d+=V+M-P,P-=M,P<h){h-=P;do A[W++]=H[d++];while(--P);if(d=0,M<h){P=M,h-=P;do A[W++]=H[d++];while(--P);d=W-k,S=A}}}else if(d+=M-P,P<h){h-=P;do A[W++]=H[d++];while(--P);d=W-k,S=A}while(h>2)A[W++]=S[d++],A[W++]=S[d++],A[W++]=S[d++],h-=3;if(h){if(A[W++]=S[d++],h>1)A[W++]=S[d++]}}else{d=W-k;do A[W++]=A[d++],A[W++]=A[d++],A[W++]=A[d++],h-=3;while(h>2);if(h){if(A[W++]=A[d++],h>1)A[W++]=A[d++]}}}else if((P&64)===0){w=O[(w&65535)+(_&(1<<P)-1)];continue J}else{$.msg="invalid distance code",q.mode=W5;break Q}break}}else if((P&64)===0){w=C[(w&65535)+(_&(1<<P)-1)];continue $}else if(P&32){q.mode=NH;break Q}else{$.msg="invalid literal/length code",q.mode=W5;break Q}break}}while(X<Y&&W<U);h=T>>3,X-=h,T-=h<<3,_&=(1<<T)-1,$.next_in=X,$.next_out=W,$.avail_in=X<Y?5+(Y-X):5-(X-Y),$.avail_out=W<U?257+(U-W):257-(W-U),q.hold=_,q.bits=T;return}});var Iq=f((qD,Rq)=>{var Dq=d2(),H6=15,Cq=852,Oq=592,Pq=0,U7=1,Aq=2,DH=[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],CH=[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],OH=[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],PH=[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];Rq.exports=function($,J,q,X,Y,W,B,U){var G=U.bits,V=0,F=0,M=0,H=0,_=0,T=0,C=0,O=0,K=0,L=0,w,P,h,k,d,S=null,v=0,A,N=new Dq.Buf16(H6+1),x=new Dq.Buf16(H6+1),y=null,Z=0,t,q0,U0;for(V=0;V<=H6;V++)N[V]=0;for(F=0;F<X;F++)N[J[q+F]]++;_=G;for(H=H6;H>=1;H--)if(N[H]!==0)break;if(_>H)_=H;if(H===0)return Y[W++]=20971520,Y[W++]=20971520,U.bits=1,0;for(M=1;M<H;M++)if(N[M]!==0)break;if(_<M)_=M;O=1;for(V=1;V<=H6;V++)if(O<<=1,O-=N[V],O<0)return-1;if(O>0&&($===Pq||H!==1))return-1;x[1]=0;for(V=1;V<H6;V++)x[V+1]=x[V]+N[V];for(F=0;F<X;F++)if(J[q+F]!==0)B[x[J[q+F]]++]=F;if($===Pq)S=y=B,A=19;else if($===U7)S=DH,v-=257,y=CH,Z-=257,A=256;else S=OH,y=PH,A=-1;if(L=0,F=0,V=M,d=W,T=_,C=0,h=-1,K=1<<_,k=K-1,$===U7&&K>Cq||$===Aq&&K>Oq)return 1;for(;;){if(t=V-C,B[F]<A)q0=0,U0=B[F];else if(B[F]>A)q0=y[Z+B[F]],U0=S[v+B[F]];else q0=96,U0=0;w=1<<V-C,P=1<<T,M=P;do P-=w,Y[d+(L>>C)+P]=t<<24|q0<<16|U0|0;while(P!==0);w=1<<V-1;while(L&w)w>>=1;if(w!==0)L&=w-1,L+=w;else L=0;if(F++,--N[V]===0){if(V===H)break;V=J[q+B[F]]}if(V>_&&(L&k)!==h){if(C===0)C=_;d+=M,T=V-C,O=1<<T;while(T+C<H){if(O-=N[T+C],O<=0)break;T++,O<<=1}if(K+=1<<T,$===U7&&K>Cq||$===Aq&&K>Oq)return 1;h=L&k,Y[h]=_<<24|T<<16|d-W|0}}if(L!==0)Y[d+L]=V-C<<24|4194304|0;return U.bits=_,0}});var B9=f((cH)=>{var J2=d2(),M7=a4(),x2=s4(),AH=Nq(),K8=Iq(),RH=0,tq=1,eq=2,Sq=4,IH=5,B5=6,h1=0,SH=1,vH=2,V2=-2,Q9=-3,F7=-4,EH=-5,vq=8,$9=1,Eq=2,Zq=3,kq=4,Tq=5,xq=6,gq=7,_q=8,fq=9,yq=10,V5=11,n2=12,G7=13,hq=14,V7=15,bq=16,mq=17,uq=18,cq=19,U5=20,G5=21,pq=22,lq=23,dq=24,iq=25,nq=26,K7=27,oq=28,rq=29,k0=30,z7=31,ZH=32,kH=852,TH=592,xH=15,gH=xH;function aq(Q){return(Q>>>24&255)+(Q>>>8&65280)+((Q&65280)<<8)+((Q&255)<<24)}function _H(){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 J2.Buf16(320),this.work=new J2.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function J9(Q){var $;if(!Q||!Q.state)return V2;if($=Q.state,Q.total_in=Q.total_out=$.total=0,Q.msg="",$.wrap)Q.adler=$.wrap&1;return $.mode=$9,$.last=0,$.havedict=0,$.dmax=32768,$.head=null,$.hold=0,$.bits=0,$.lencode=$.lendyn=new J2.Buf32(kH),$.distcode=$.distdyn=new J2.Buf32(TH),$.sane=1,$.back=-1,h1}function q9(Q){var $;if(!Q||!Q.state)return V2;return $=Q.state,$.wsize=0,$.whave=0,$.wnext=0,J9(Q)}function X9(Q,$){var J,q;if(!Q||!Q.state)return V2;if(q=Q.state,$<0)J=0,$=-$;else if(J=($>>4)+1,$<48)$&=15;if($&&($<8||$>15))return V2;if(q.window!==null&&q.wbits!==$)q.window=null;return q.wrap=J,q.wbits=$,q9(Q)}function Y9(Q,$){var J,q;if(!Q)return V2;if(q=new _H,Q.state=q,q.window=null,J=X9(Q,$),J!==h1)Q.state=null;return J}function fH(Q){return Y9(Q,gH)}var sq=!0,H7,j7;function yH(Q){if(sq){var $;H7=new J2.Buf32(512),j7=new J2.Buf32(32),$=0;while($<144)Q.lens[$++]=8;while($<256)Q.lens[$++]=9;while($<280)Q.lens[$++]=7;while($<288)Q.lens[$++]=8;K8(tq,Q.lens,0,288,H7,0,Q.work,{bits:9}),$=0;while($<32)Q.lens[$++]=5;K8(eq,Q.lens,0,32,j7,0,Q.work,{bits:5}),sq=!1}Q.lencode=H7,Q.lenbits=9,Q.distcode=j7,Q.distbits=5}function W9(Q,$,J,q){var X,Y=Q.state;if(Y.window===null)Y.wsize=1<<Y.wbits,Y.wnext=0,Y.whave=0,Y.window=new J2.Buf8(Y.wsize);if(q>=Y.wsize)J2.arraySet(Y.window,$,J-Y.wsize,Y.wsize,0),Y.wnext=0,Y.whave=Y.wsize;else{if(X=Y.wsize-Y.wnext,X>q)X=q;if(J2.arraySet(Y.window,$,J-q,X,Y.wnext),q-=X,q)J2.arraySet(Y.window,$,J-q,q,0),Y.wnext=q,Y.whave=Y.wsize;else{if(Y.wnext+=X,Y.wnext===Y.wsize)Y.wnext=0;if(Y.whave<Y.wsize)Y.whave+=X}}return 0}function hH(Q,$){var J,q,X,Y,W,B,U,G,V,F,M,H,_,T,C=0,O,K,L,w,P,h,k,d,S=new J2.Buf8(4),v,A,N=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!Q||!Q.state||!Q.output||!Q.input&&Q.avail_in!==0)return V2;if(J=Q.state,J.mode===n2)J.mode=G7;W=Q.next_out,X=Q.output,U=Q.avail_out,Y=Q.next_in,q=Q.input,B=Q.avail_in,G=J.hold,V=J.bits,F=B,M=U,d=h1;Q:for(;;)switch(J.mode){case $9:if(J.wrap===0){J.mode=G7;break}while(V<16){if(B===0)break Q;B--,G+=q[Y++]<<V,V+=8}if(J.wrap&2&&G===35615){J.check=0,S[0]=G&255,S[1]=G>>>8&255,J.check=x2(J.check,S,2,0),G=0,V=0,J.mode=Eq;break}if(J.flags=0,J.head)J.head.done=!1;if(!(J.wrap&1)||(((G&255)<<8)+(G>>8))%31){Q.msg="incorrect header check",J.mode=k0;break}if((G&15)!==vq){Q.msg="unknown compression method",J.mode=k0;break}if(G>>>=4,V-=4,k=(G&15)+8,J.wbits===0)J.wbits=k;else if(k>J.wbits){Q.msg="invalid window size",J.mode=k0;break}J.dmax=1<<k,Q.adler=J.check=1,J.mode=G&512?yq:n2,G=0,V=0;break;case Eq:while(V<16){if(B===0)break Q;B--,G+=q[Y++]<<V,V+=8}if(J.flags=G,(J.flags&255)!==vq){Q.msg="unknown compression method",J.mode=k0;break}if(J.flags&57344){Q.msg="unknown header flags set",J.mode=k0;break}if(J.head)J.head.text=G>>8&1;if(J.flags&512)S[0]=G&255,S[1]=G>>>8&255,J.check=x2(J.check,S,2,0);G=0,V=0,J.mode=Zq;case Zq:while(V<32){if(B===0)break Q;B--,G+=q[Y++]<<V,V+=8}if(J.head)J.head.time=G;if(J.flags&512)S[0]=G&255,S[1]=G>>>8&255,S[2]=G>>>16&255,S[3]=G>>>24&255,J.check=x2(J.check,S,4,0);G=0,V=0,J.mode=kq;case kq:while(V<16){if(B===0)break Q;B--,G+=q[Y++]<<V,V+=8}if(J.head)J.head.xflags=G&255,J.head.os=G>>8;if(J.flags&512)S[0]=G&255,S[1]=G>>>8&255,J.check=x2(J.check,S,2,0);G=0,V=0,J.mode=Tq;case Tq:if(J.flags&1024){while(V<16){if(B===0)break Q;B--,G+=q[Y++]<<V,V+=8}if(J.length=G,J.head)J.head.extra_len=G;if(J.flags&512)S[0]=G&255,S[1]=G>>>8&255,J.check=x2(J.check,S,2,0);G=0,V=0}else if(J.head)J.head.extra=null;J.mode=xq;case xq:if(J.flags&1024){if(H=J.length,H>B)H=B;if(H){if(J.head){if(k=J.head.extra_len-J.length,!J.head.extra)J.head.extra=Array(J.head.extra_len);J2.arraySet(J.head.extra,q,Y,H,k)}if(J.flags&512)J.check=x2(J.check,q,H,Y);B-=H,Y+=H,J.length-=H}if(J.length)break Q}J.length=0,J.mode=gq;case gq:if(J.flags&2048){if(B===0)break Q;H=0;do if(k=q[Y+H++],J.head&&k&&J.length<65536)J.head.name+=String.fromCharCode(k);while(k&&H<B);if(J.flags&512)J.check=x2(J.check,q,H,Y);if(B-=H,Y+=H,k)break Q}else if(J.head)J.head.name=null;J.length=0,J.mode=_q;case _q:if(J.flags&4096){if(B===0)break Q;H=0;do if(k=q[Y+H++],J.head&&k&&J.length<65536)J.head.comment+=String.fromCharCode(k);while(k&&H<B);if(J.flags&512)J.check=x2(J.check,q,H,Y);if(B-=H,Y+=H,k)break Q}else if(J.head)J.head.comment=null;J.mode=fq;case fq:if(J.flags&512){while(V<16){if(B===0)break Q;B--,G+=q[Y++]<<V,V+=8}if(G!==(J.check&65535)){Q.msg="header crc mismatch",J.mode=k0;break}G=0,V=0}if(J.head)J.head.hcrc=J.flags>>9&1,J.head.done=!0;Q.adler=J.check=0,J.mode=n2;break;case yq:while(V<32){if(B===0)break Q;B--,G+=q[Y++]<<V,V+=8}Q.adler=J.check=aq(G),G=0,V=0,J.mode=V5;case V5:if(J.havedict===0)return Q.next_out=W,Q.avail_out=U,Q.next_in=Y,Q.avail_in=B,J.hold=G,J.bits=V,vH;Q.adler=J.check=1,J.mode=n2;case n2:if($===IH||$===B5)break Q;case G7:if(J.last){G>>>=V&7,V-=V&7,J.mode=K7;break}while(V<3){if(B===0)break Q;B--,G+=q[Y++]<<V,V+=8}switch(J.last=G&1,G>>>=1,V-=1,G&3){case 0:J.mode=hq;break;case 1:if(yH(J),J.mode=U5,$===B5){G>>>=2,V-=2;break Q}break;case 2:J.mode=mq;break;case 3:Q.msg="invalid block type",J.mode=k0}G>>>=2,V-=2;break;case hq:G>>>=V&7,V-=V&7;while(V<32){if(B===0)break Q;B--,G+=q[Y++]<<V,V+=8}if((G&65535)!==(G>>>16^65535)){Q.msg="invalid stored block lengths",J.mode=k0;break}if(J.length=G&65535,G=0,V=0,J.mode=V7,$===B5)break Q;case V7:J.mode=bq;case bq:if(H=J.length,H){if(H>B)H=B;if(H>U)H=U;if(H===0)break Q;J2.arraySet(X,q,Y,H,W),B-=H,Y+=H,U-=H,W+=H,J.length-=H;break}J.mode=n2;break;case mq:while(V<14){if(B===0)break Q;B--,G+=q[Y++]<<V,V+=8}if(J.nlen=(G&31)+257,G>>>=5,V-=5,J.ndist=(G&31)+1,G>>>=5,V-=5,J.ncode=(G&15)+4,G>>>=4,V-=4,J.nlen>286||J.ndist>30){Q.msg="too many length or distance symbols",J.mode=k0;break}J.have=0,J.mode=uq;case uq:while(J.have<J.ncode){while(V<3){if(B===0)break Q;B--,G+=q[Y++]<<V,V+=8}J.lens[N[J.have++]]=G&7,G>>>=3,V-=3}while(J.have<19)J.lens[N[J.have++]]=0;if(J.lencode=J.lendyn,J.lenbits=7,v={bits:J.lenbits},d=K8(RH,J.lens,0,19,J.lencode,0,J.work,v),J.lenbits=v.bits,d){Q.msg="invalid code lengths set",J.mode=k0;break}J.have=0,J.mode=cq;case cq:while(J.have<J.nlen+J.ndist){for(;;){if(C=J.lencode[G&(1<<J.lenbits)-1],O=C>>>24,K=C>>>16&255,L=C&65535,O<=V)break;if(B===0)break Q;B--,G+=q[Y++]<<V,V+=8}if(L<16)G>>>=O,V-=O,J.lens[J.have++]=L;else{if(L===16){A=O+2;while(V<A){if(B===0)break Q;B--,G+=q[Y++]<<V,V+=8}if(G>>>=O,V-=O,J.have===0){Q.msg="invalid bit length repeat",J.mode=k0;break}k=J.lens[J.have-1],H=3+(G&3),G>>>=2,V-=2}else if(L===17){A=O+3;while(V<A){if(B===0)break Q;B--,G+=q[Y++]<<V,V+=8}G>>>=O,V-=O,k=0,H=3+(G&7),G>>>=3,V-=3}else{A=O+7;while(V<A){if(B===0)break Q;B--,G+=q[Y++]<<V,V+=8}G>>>=O,V-=O,k=0,H=11+(G&127),G>>>=7,V-=7}if(J.have+H>J.nlen+J.ndist){Q.msg="invalid bit length repeat",J.mode=k0;break}while(H--)J.lens[J.have++]=k}}if(J.mode===k0)break;if(J.lens[256]===0){Q.msg="invalid code -- missing end-of-block",J.mode=k0;break}if(J.lenbits=9,v={bits:J.lenbits},d=K8(tq,J.lens,0,J.nlen,J.lencode,0,J.work,v),J.lenbits=v.bits,d){Q.msg="invalid literal/lengths set",J.mode=k0;break}if(J.distbits=6,J.distcode=J.distdyn,v={bits:J.distbits},d=K8(eq,J.lens,J.nlen,J.ndist,J.distcode,0,J.work,v),J.distbits=v.bits,d){Q.msg="invalid distances set",J.mode=k0;break}if(J.mode=U5,$===B5)break Q;case U5:J.mode=G5;case G5:if(B>=6&&U>=258){if(Q.next_out=W,Q.avail_out=U,Q.next_in=Y,Q.avail_in=B,J.hold=G,J.bits=V,AH(Q,M),W=Q.next_out,X=Q.output,U=Q.avail_out,Y=Q.next_in,q=Q.input,B=Q.avail_in,G=J.hold,V=J.bits,J.mode===n2)J.back=-1;break}J.back=0;for(;;){if(C=J.lencode[G&(1<<J.lenbits)-1],O=C>>>24,K=C>>>16&255,L=C&65535,O<=V)break;if(B===0)break Q;B--,G+=q[Y++]<<V,V+=8}if(K&&(K&240)===0){w=O,P=K,h=L;for(;;){if(C=J.lencode[h+((G&(1<<w+P)-1)>>w)],O=C>>>24,K=C>>>16&255,L=C&65535,w+O<=V)break;if(B===0)break Q;B--,G+=q[Y++]<<V,V+=8}G>>>=w,V-=w,J.back+=w}if(G>>>=O,V-=O,J.back+=O,J.length=L,K===0){J.mode=nq;break}if(K&32){J.back=-1,J.mode=n2;break}if(K&64){Q.msg="invalid literal/length code",J.mode=k0;break}J.extra=K&15,J.mode=pq;case pq:if(J.extra){A=J.extra;while(V<A){if(B===0)break Q;B--,G+=q[Y++]<<V,V+=8}J.length+=G&(1<<J.extra)-1,G>>>=J.extra,V-=J.extra,J.back+=J.extra}J.was=J.length,J.mode=lq;case lq:for(;;){if(C=J.distcode[G&(1<<J.distbits)-1],O=C>>>24,K=C>>>16&255,L=C&65535,O<=V)break;if(B===0)break Q;B--,G+=q[Y++]<<V,V+=8}if((K&240)===0){w=O,P=K,h=L;for(;;){if(C=J.distcode[h+((G&(1<<w+P)-1)>>w)],O=C>>>24,K=C>>>16&255,L=C&65535,w+O<=V)break;if(B===0)break Q;B--,G+=q[Y++]<<V,V+=8}G>>>=w,V-=w,J.back+=w}if(G>>>=O,V-=O,J.back+=O,K&64){Q.msg="invalid distance code",J.mode=k0;break}J.offset=L,J.extra=K&15,J.mode=dq;case dq:if(J.extra){A=J.extra;while(V<A){if(B===0)break Q;B--,G+=q[Y++]<<V,V+=8}J.offset+=G&(1<<J.extra)-1,G>>>=J.extra,V-=J.extra,J.back+=J.extra}if(J.offset>J.dmax){Q.msg="invalid distance too far back",J.mode=k0;break}J.mode=iq;case iq:if(U===0)break Q;if(H=M-U,J.offset>H){if(H=J.offset-H,H>J.whave){if(J.sane){Q.msg="invalid distance too far back",J.mode=k0;break}}if(H>J.wnext)H-=J.wnext,_=J.wsize-H;else _=J.wnext-H;if(H>J.length)H=J.length;T=J.window}else T=X,_=W-J.offset,H=J.length;if(H>U)H=U;U-=H,J.length-=H;do X[W++]=T[_++];while(--H);if(J.length===0)J.mode=G5;break;case nq:if(U===0)break Q;X[W++]=J.length,U--,J.mode=G5;break;case K7:if(J.wrap){while(V<32){if(B===0)break Q;B--,G|=q[Y++]<<V,V+=8}if(M-=U,Q.total_out+=M,J.total+=M,M)Q.adler=J.check=J.flags?x2(J.check,X,M,W-M):M7(J.check,X,M,W-M);if(M=U,(J.flags?G:aq(G))!==J.check){Q.msg="incorrect data check",J.mode=k0;break}G=0,V=0}J.mode=oq;case oq:if(J.wrap&&J.flags){while(V<32){if(B===0)break Q;B--,G+=q[Y++]<<V,V+=8}if(G!==(J.total&4294967295)){Q.msg="incorrect length check",J.mode=k0;break}G=0,V=0}J.mode=rq;case rq:d=SH;break Q;case k0:d=Q9;break Q;case z7:return F7;case ZH:default:return V2}if(Q.next_out=W,Q.avail_out=U,Q.next_in=Y,Q.avail_in=B,J.hold=G,J.bits=V,J.wsize||M!==Q.avail_out&&J.mode<k0&&(J.mode<K7||$!==Sq)){if(W9(Q,Q.output,Q.next_out,M-Q.avail_out))return J.mode=z7,F7}if(F-=Q.avail_in,M-=Q.avail_out,Q.total_in+=F,Q.total_out+=M,J.total+=M,J.wrap&&M)Q.adler=J.check=J.flags?x2(J.check,X,M,Q.next_out-M):M7(J.check,X,M,Q.next_out-M);if(Q.data_type=J.bits+(J.last?64:0)+(J.mode===n2?128:0)+(J.mode===U5||J.mode===V7?256:0),(F===0&&M===0||$===Sq)&&d===h1)d=EH;return d}function bH(Q){if(!Q||!Q.state)return V2;var $=Q.state;if($.window)$.window=null;return Q.state=null,h1}function mH(Q,$){var J;if(!Q||!Q.state)return V2;if(J=Q.state,(J.wrap&2)===0)return V2;return J.head=$,$.done=!1,h1}function uH(Q,$){var J=$.length,q,X,Y;if(!Q||!Q.state)return V2;if(q=Q.state,q.wrap!==0&&q.mode!==V5)return V2;if(q.mode===V5){if(X=1,X=M7(X,$,J,0),X!==q.check)return Q9}if(Y=W9(Q,$,J,J),Y)return q.mode=z7,F7;return q.havedict=1,h1}cH.inflateReset=q9;cH.inflateReset2=X9;cH.inflateResetKeep=J9;cH.inflateInit=fH;cH.inflateInit2=Y9;cH.inflate=hH;cH.inflateEnd=bH;cH.inflateGetHeader=mH;cH.inflateSetDictionary=uH;cH.inflateInfo="pako inflate (from Nodeca project)"});var L7=f((YD,U9)=>{U9.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 V9=f((WD,G9)=>{function eH(){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}G9.exports=eH});var H9=f((qj)=>{var j6=B9(),H8=d2(),K5=J7(),_0=L7(),w7=t8(),Qj=q7(),$j=V9(),K9=Object.prototype.toString;function b1(Q){if(!(this instanceof b1))return new b1(Q);this.options=H8.assign({chunkSize:16384,windowBits:0,to:""},Q||{});var $=this.options;if($.raw&&$.windowBits>=0&&$.windowBits<16){if($.windowBits=-$.windowBits,$.windowBits===0)$.windowBits=-15}if($.windowBits>=0&&$.windowBits<16&&!(Q&&Q.windowBits))$.windowBits+=32;if($.windowBits>15&&$.windowBits<48){if(($.windowBits&15)===0)$.windowBits|=15}this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Qj,this.strm.avail_out=0;var J=j6.inflateInit2(this.strm,$.windowBits);if(J!==_0.Z_OK)throw Error(w7[J]);if(this.header=new $j,j6.inflateGetHeader(this.strm,this.header),$.dictionary){if(typeof $.dictionary==="string")$.dictionary=K5.string2buf($.dictionary);else if(K9.call($.dictionary)==="[object ArrayBuffer]")$.dictionary=new Uint8Array($.dictionary);if($.raw){if(J=j6.inflateSetDictionary(this.strm,$.dictionary),J!==_0.Z_OK)throw Error(w7[J])}}}b1.prototype.push=function(Q,$){var J=this.strm,q=this.options.chunkSize,X=this.options.dictionary,Y,W,B,U,G,V=!1;if(this.ended)return!1;if(W=$===~~$?$:$===!0?_0.Z_FINISH:_0.Z_NO_FLUSH,typeof Q==="string")J.input=K5.binstring2buf(Q);else if(K9.call(Q)==="[object ArrayBuffer]")J.input=new Uint8Array(Q);else J.input=Q;J.next_in=0,J.avail_in=J.input.length;do{if(J.avail_out===0)J.output=new H8.Buf8(q),J.next_out=0,J.avail_out=q;if(Y=j6.inflate(J,_0.Z_NO_FLUSH),Y===_0.Z_NEED_DICT&&X)Y=j6.inflateSetDictionary(this.strm,X);if(Y===_0.Z_BUF_ERROR&&V===!0)Y=_0.Z_OK,V=!1;if(Y!==_0.Z_STREAM_END&&Y!==_0.Z_OK)return this.onEnd(Y),this.ended=!0,!1;if(J.next_out){if(J.avail_out===0||Y===_0.Z_STREAM_END||J.avail_in===0&&(W===_0.Z_FINISH||W===_0.Z_SYNC_FLUSH))if(this.options.to==="string"){if(B=K5.utf8border(J.output,J.next_out),U=J.next_out-B,G=K5.buf2string(J.output,B),J.next_out=U,J.avail_out=q-U,U)H8.arraySet(J.output,J.output,B,U,0);this.onData(G)}else this.onData(H8.shrinkBuf(J.output,J.next_out))}if(J.avail_in===0&&J.avail_out===0)V=!0}while((J.avail_in>0||J.avail_out===0)&&Y!==_0.Z_STREAM_END);if(Y===_0.Z_STREAM_END)W=_0.Z_FINISH;if(W===_0.Z_FINISH)return Y=j6.inflateEnd(this.strm),this.onEnd(Y),this.ended=!0,Y===_0.Z_OK;if(W===_0.Z_SYNC_FLUSH)return this.onEnd(_0.Z_OK),J.avail_out=0,!0;return!0};b1.prototype.onData=function(Q){this.chunks.push(Q)};b1.prototype.onEnd=function(Q){if(Q===_0.Z_OK)if(this.options.to==="string")this.result=this.chunks.join("");else this.result=H8.flattenChunks(this.chunks);this.chunks=[],this.err=Q,this.msg=this.strm.msg};function N7(Q,$){var J=new b1($);if(J.push(Q,!0),J.err)throw J.msg||w7[J.err];return J.result}function Jj(Q,$){return $=$||{},$.raw=!0,N7(Q,$)}qj.Inflate=b1;qj.inflate=N7;qj.inflateRaw=Jj;qj.ungzip=N7});var F9=f((UD,M9)=>{var Uj=d2().assign,Gj=Lq(),Vj=H9(),Kj=L7(),j9={};Uj(j9,Gj,Vj,Kj);M9.exports=j9});var L9=f((Fj)=>{var Hj=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",jj=F9(),z9=x0(),H5=$2(),Mj=Hj?"uint8array":"array";Fj.magic="\b\x00";function m1(Q,$){H5.call(this,"FlateWorker/"+Q),this._pako=null,this._pakoAction=Q,this._pakoOptions=$,this.meta={}}z9.inherits(m1,H5);m1.prototype.processChunk=function(Q){if(this.meta=Q.meta,this._pako===null)this._createPako();this._pako.push(z9.transformTo(Mj,Q.data),!1)};m1.prototype.flush=function(){if(H5.prototype.flush.call(this),this._pako===null)this._createPako();this._pako.push([],!0)};m1.prototype.cleanUp=function(){H5.prototype.cleanUp.call(this),this._pako=null};m1.prototype._createPako=function(){this._pako=new jj[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var Q=this;this._pako.onData=function($){Q.push({data:$,meta:Q.meta})}};Fj.compressWorker=function(Q){return new m1("Deflate",Q)};Fj.uncompressWorker=function(){return new m1("Inflate",{})}});var D7=f((Nj)=>{var w9=$2();Nj.STORE={magic:"\x00\x00",compressWorker:function(){return new w9("STORE compression")},uncompressWorker:function(){return new w9("STORE decompression")}};Nj.DEFLATE=L9()});var C7=f((Oj)=>{Oj.LOCAL_FILE_HEADER="PK\x03\x04";Oj.CENTRAL_FILE_HEADER="PK\x01\x02";Oj.CENTRAL_DIRECTORY_END="PK\x05\x06";Oj.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x06\x07";Oj.ZIP64_CENTRAL_DIRECTORY_END="PK\x06\x06";Oj.DATA_DESCRIPTOR="PK\x07\b"});var O9=f((HD,C9)=>{var M6=x0(),F6=$2(),O7=X6(),N9=o8(),j5=C7(),E0=function(Q,$){var J="",q;for(q=0;q<$;q++)J+=String.fromCharCode(Q&255),Q=Q>>>8;return J},Ej=function(Q,$){var J=Q;if(!Q)J=$?16893:33204;return(J&65535)<<16},Zj=function(Q){return(Q||0)&63},D9=function(Q,$,J,q,X,Y){var{file:W,compression:B}=Q,U=Y!==O7.utf8encode,G=M6.transformTo("string",Y(W.name)),V=M6.transformTo("string",O7.utf8encode(W.name)),F=W.comment,M=M6.transformTo("string",Y(F)),H=M6.transformTo("string",O7.utf8encode(F)),_=V.length!==W.name.length,T=H.length!==F.length,C,O,K="",L="",w="",P=W.dir,h=W.date,k={crc32:0,compressedSize:0,uncompressedSize:0};if(!$||J)k.crc32=Q.crc32,k.compressedSize=Q.compressedSize,k.uncompressedSize=Q.uncompressedSize;var d=0;if($)d|=8;if(!U&&(_||T))d|=2048;var S=0,v=0;if(P)S|=16;if(X==="UNIX")v=798,S|=Ej(W.unixPermissions,P);else v=20,S|=Zj(W.dosPermissions,P);if(C=h.getUTCHours(),C=C<<6,C=C|h.getUTCMinutes(),C=C<<5,C=C|h.getUTCSeconds()/2,O=h.getUTCFullYear()-1980,O=O<<4,O=O|h.getUTCMonth()+1,O=O<<5,O=O|h.getUTCDate(),_)L=E0(1,1)+E0(N9(G),4)+V,K+="up"+E0(L.length,2)+L;if(T)w=E0(1,1)+E0(N9(M),4)+H,K+="uc"+E0(w.length,2)+w;var A="";A+=`
|
|
3
|
-
\x00`,A+=E0(d,2),A+=B.magic,A+=E0(C,2),A+=E0(O,2),A+=E0(k.crc32,4),A+=E0(k.compressedSize,4),A+=E0(k.uncompressedSize,4),A+=E0(G.length,2),A+=E0(K.length,2);var N=j5.LOCAL_FILE_HEADER+A+G+K,x=j5.CENTRAL_FILE_HEADER+E0(v,2)+A+E0(M.length,2)+"\x00\x00\x00\x00"+E0(S,4)+E0(q,4)+G+K+M;return{fileRecord:N,dirRecord:x}},kj=function(Q,$,J,q,X){var Y="",W=M6.transformTo("string",X(q));return Y=j5.CENTRAL_DIRECTORY_END+"\x00\x00\x00\x00"+E0(Q,2)+E0(Q,2)+E0($,4)+E0(J,4)+E0(W.length,2)+W,Y},Tj=function(Q){var $="";return $=j5.DATA_DESCRIPTOR+E0(Q.crc32,4)+E0(Q.compressedSize,4)+E0(Q.uncompressedSize,4),$};function F2(Q,$,J,q){F6.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=$,this.zipPlatform=J,this.encodeFileName=q,this.streamFiles=Q,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}M6.inherits(F2,F6);F2.prototype.push=function(Q){var $=Q.meta.percent||0,J=this.entriesCount,q=this._sources.length;if(this.accumulate)this.contentBuffer.push(Q);else this.bytesWritten+=Q.data.length,F6.prototype.push.call(this,{data:Q.data,meta:{currentFile:this.currentFile,percent:J?($+100*(J-q-1))/J:100}})};F2.prototype.openedSource=function(Q){this.currentSourceOffset=this.bytesWritten,this.currentFile=Q.file.name;var $=this.streamFiles&&!Q.file.dir;if($){var J=D9(Q,$,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:J.fileRecord,meta:{percent:0}})}else this.accumulate=!0};F2.prototype.closedSource=function(Q){this.accumulate=!1;var $=this.streamFiles&&!Q.file.dir,J=D9(Q,$,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(J.dirRecord),$)this.push({data:Tj(Q),meta:{percent:100}});else{this.push({data:J.fileRecord,meta:{percent:0}});while(this.contentBuffer.length)this.push(this.contentBuffer.shift())}this.currentFile=null};F2.prototype.flush=function(){var Q=this.bytesWritten;for(var $=0;$<this.dirRecords.length;$++)this.push({data:this.dirRecords[$],meta:{percent:100}});var J=this.bytesWritten-Q,q=kj(this.dirRecords.length,J,Q,this.zipComment,this.encodeFileName);this.push({data:q,meta:{percent:100}})};F2.prototype.prepareNextSource=function(){if(this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused)this.previous.pause();else this.previous.resume()};F2.prototype.registerPrevious=function(Q){this._sources.push(Q);var $=this;return Q.on("data",function(J){$.processChunk(J)}),Q.on("end",function(){if($.closedSource($.previous.streamInfo),$._sources.length)$.prepareNextSource();else $.end()}),Q.on("error",function(J){$.error(J)}),this};F2.prototype.resume=function(){if(!F6.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};F2.prototype.error=function(Q){var $=this._sources;if(!F6.prototype.error.call(this,Q))return!1;for(var J=0;J<$.length;J++)try{$[J].error(Q)}catch(q){}return!0};F2.prototype.lock=function(){F6.prototype.lock.call(this);var Q=this._sources;for(var $=0;$<Q.length;$++)Q[$].lock()};C9.exports=F2});var P9=f((fj)=>{var xj=D7(),gj=O9(),_j=function(Q,$){var J=Q||$,q=xj[J];if(!q)throw Error(J+" is not a valid compression method !");return q};fj.generateWorker=function(Q,$,J){var q=new gj($.streamFiles,J,$.platform,$.encodeFileName),X=0;try{Q.forEach(function(Y,W){X++;var B=_j(W.options.compression,$.compression),U=W.options.compressionOptions||$.compressionOptions||{},G=W.dir,V=W.date;W._compressWorker(B,U).withStreamInfo("file",{name:Y,dir:G,date:V,comment:W.comment||"",unixPermissions:W.unixPermissions,dosPermissions:W.dosPermissions}).pipe(q)}),q.entriesCount=X}catch(Y){q.error(Y)}return q}});var R9=f((MD,A9)=>{var hj=x0(),M5=$2();function j8(Q,$){M5.call(this,"Nodejs stream input adapter for "+Q),this._upstreamEnded=!1,this._bindStream($)}hj.inherits(j8,M5);j8.prototype._bindStream=function(Q){var $=this;this._stream=Q,Q.pause(),Q.on("data",function(J){$.push({data:J,meta:{percent:0}})}).on("error",function(J){if($.isPaused)this.generatedError=J;else $.error(J)}).on("end",function(){if($.isPaused)$._upstreamEnded=!0;else $.end()})};j8.prototype.pause=function(){if(!M5.prototype.pause.call(this))return!1;return this._stream.pause(),!0};j8.prototype.resume=function(){if(!M5.prototype.resume.call(this))return!1;if(this._upstreamEnded)this.end();else this._stream.resume();return!0};A9.exports=j8});var _9=f((FD,g9)=>{var bj=X6(),M8=x0(),E9=$2(),mj=I4(),Z9=S4(),I9=r8(),uj=SJ(),cj=P9(),S9=d6(),pj=R9(),k9=function(Q,$,J){var q=M8.getTypeOf($),X,Y=M8.extend(J||{},Z9);if(Y.date=Y.date||new Date,Y.compression!==null)Y.compression=Y.compression.toUpperCase();if(typeof Y.unixPermissions==="string")Y.unixPermissions=parseInt(Y.unixPermissions,8);if(Y.unixPermissions&&Y.unixPermissions&16384)Y.dir=!0;if(Y.dosPermissions&&Y.dosPermissions&16)Y.dir=!0;if(Y.dir)Q=T9(Q);if(Y.createFolders&&(X=lj(Q)))x9.call(this,X,!0);var W=q==="string"&&Y.binary===!1&&Y.base64===!1;if(!J||typeof J.binary>"u")Y.binary=!W;var B=$ instanceof I9&&$.uncompressedSize===0;if(B||Y.dir||!$||$.length===0)Y.base64=!1,Y.binary=!0,$="",Y.compression="STORE",q="string";var U=null;if($ instanceof I9||$ instanceof E9)U=$;else if(S9.isNode&&S9.isStream($))U=new pj(Q,$);else U=M8.prepareContent(Q,$,Y.binary,Y.optimizedBinaryString,Y.base64);var G=new uj(Q,U,Y);this.files[Q]=G},lj=function(Q){if(Q.slice(-1)==="/")Q=Q.substring(0,Q.length-1);var $=Q.lastIndexOf("/");return $>0?Q.substring(0,$):""},T9=function(Q){if(Q.slice(-1)!=="/")Q+="/";return Q},x9=function(Q,$){if($=typeof $<"u"?$:Z9.createFolders,Q=T9(Q),!this.files[Q])k9.call(this,Q,null,{dir:!0,createFolders:$});return this.files[Q]};function v9(Q){return Object.prototype.toString.call(Q)==="[object RegExp]"}var dj={load:function(){throw Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(Q){var $,J,q;for($ in this.files)if(q=this.files[$],J=$.slice(this.root.length,$.length),J&&$.slice(0,this.root.length)===this.root)Q(J,q)},filter:function(Q){var $=[];return this.forEach(function(J,q){if(Q(J,q))$.push(q)}),$},file:function(Q,$,J){if(arguments.length===1)if(v9(Q)){var q=Q;return this.filter(function(Y,W){return!W.dir&&q.test(Y)})}else{var X=this.files[this.root+Q];if(X&&!X.dir)return X;else return null}else Q=this.root+Q,k9.call(this,Q,$,J);return this},folder:function(Q){if(!Q)return this;if(v9(Q))return this.filter(function(X,Y){return Y.dir&&Q.test(X)});var $=this.root+Q,J=x9.call(this,$),q=this.clone();return q.root=J.name,q},remove:function(Q){Q=this.root+Q;var $=this.files[Q];if(!$){if(Q.slice(-1)!=="/")Q+="/";$=this.files[Q]}if($&&!$.dir)delete this.files[Q];else{var J=this.filter(function(X,Y){return Y.name.slice(0,Q.length)===Q});for(var q=0;q<J.length;q++)delete this.files[J[q].name]}return this},generate:function(){throw Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(Q){var $,J={};try{if(J=M8.extend(Q||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:bj.utf8encode}),J.type=J.type.toLowerCase(),J.compression=J.compression.toUpperCase(),J.type==="binarystring")J.type="string";if(!J.type)throw Error("No output type specified.");if(M8.checkSupport(J.type),J.platform==="darwin"||J.platform==="freebsd"||J.platform==="linux"||J.platform==="sunos")J.platform="UNIX";if(J.platform==="win32")J.platform="DOS";var q=J.comment||this.comment||"";$=cj.generateWorker(this,J,q)}catch(X){$=new E9("error"),$.error(X)}return new mj($,J.type||"string",J.mimeType)},generateAsync:function(Q,$){return this.generateInternalStream(Q).accumulate($)},generateNodeStream:function(Q,$){if(Q=Q||{},!Q.type)Q.type="nodebuffer";return this.generateInternalStream(Q).toNodejsStream($)}};g9.exports=dj});var P7=f((zD,y9)=>{var ij=x0();function f9(Q){this.data=Q,this.length=Q.length,this.index=0,this.zero=0}f9.prototype={checkOffset:function(Q){this.checkIndex(this.index+Q)},checkIndex:function(Q){if(this.length<this.zero+Q||Q<0)throw Error("End of data reached (data length = "+this.length+", asked index = "+Q+"). Corrupted zip ?")},setIndex:function(Q){this.checkIndex(Q),this.index=Q},skip:function(Q){this.setIndex(this.index+Q)},byteAt:function(){},readInt:function(Q){var $=0,J;this.checkOffset(Q);for(J=this.index+Q-1;J>=this.index;J--)$=($<<8)+this.byteAt(J);return this.index+=Q,$},readString:function(Q){return ij.transformTo("string",this.readData(Q))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var Q=this.readInt(4);return new Date(Date.UTC((Q>>25&127)+1980,(Q>>21&15)-1,Q>>16&31,Q>>11&31,Q>>5&63,(Q&31)<<1))}};y9.exports=f9});var A7=f((LD,b9)=>{var h9=P7(),nj=x0();function z6(Q){h9.call(this,Q);for(var $=0;$<this.data.length;$++)Q[$]=Q[$]&255}nj.inherits(z6,h9);z6.prototype.byteAt=function(Q){return this.data[this.zero+Q]};z6.prototype.lastIndexOfSignature=function(Q){var $=Q.charCodeAt(0),J=Q.charCodeAt(1),q=Q.charCodeAt(2),X=Q.charCodeAt(3);for(var Y=this.length-4;Y>=0;--Y)if(this.data[Y]===$&&this.data[Y+1]===J&&this.data[Y+2]===q&&this.data[Y+3]===X)return Y-this.zero;return-1};z6.prototype.readAndCheckSignature=function(Q){var $=Q.charCodeAt(0),J=Q.charCodeAt(1),q=Q.charCodeAt(2),X=Q.charCodeAt(3),Y=this.readData(4);return $===Y[0]&&J===Y[1]&&q===Y[2]&&X===Y[3]};z6.prototype.readData=function(Q){if(this.checkOffset(Q),Q===0)return[];var $=this.data.slice(this.zero+this.index,this.zero+this.index+Q);return this.index+=Q,$};b9.exports=z6});var c9=f((wD,u9)=>{var m9=P7(),oj=x0();function L6(Q){m9.call(this,Q)}oj.inherits(L6,m9);L6.prototype.byteAt=function(Q){return this.data.charCodeAt(this.zero+Q)};L6.prototype.lastIndexOfSignature=function(Q){return this.data.lastIndexOf(Q)-this.zero};L6.prototype.readAndCheckSignature=function(Q){var $=this.readData(4);return Q===$};L6.prototype.readData=function(Q){this.checkOffset(Q);var $=this.data.slice(this.zero+this.index,this.zero+this.index+Q);return this.index+=Q,$};u9.exports=L6});var I7=f((ND,l9)=>{var p9=A7(),rj=x0();function R7(Q){p9.call(this,Q)}rj.inherits(R7,p9);R7.prototype.readData=function(Q){if(this.checkOffset(Q),Q===0)return new Uint8Array(0);var $=this.data.subarray(this.zero+this.index,this.zero+this.index+Q);return this.index+=Q,$};l9.exports=R7});var n9=f((DD,i9)=>{var d9=I7(),aj=x0();function S7(Q){d9.call(this,Q)}aj.inherits(S7,d9);S7.prototype.readData=function(Q){this.checkOffset(Q);var $=this.data.slice(this.zero+this.index,this.zero+this.index+Q);return this.index+=Q,$};i9.exports=S7});var v7=f((CD,r9)=>{var F5=x0(),o9=l2(),sj=A7(),tj=c9(),ej=n9(),QM=I7();r9.exports=function(Q){var $=F5.getTypeOf(Q);if(F5.checkSupport($),$==="string"&&!o9.uint8array)return new tj(Q);if($==="nodebuffer")return new ej(Q);if(o9.uint8array)return new QM(F5.transformTo("uint8array",Q));return new sj(F5.transformTo("array",Q))}});var e9=f((OD,t9)=>{var E7=v7(),K1=x0(),$M=r8(),a9=o8(),z5=X6(),L5=D7(),JM=l2(),qM=0,XM=3,YM=function(Q){for(var $ in L5){if(!Object.prototype.hasOwnProperty.call(L5,$))continue;if(L5[$].magic===Q)return L5[$]}return null};function s9(Q,$){this.options=Q,this.loadOptions=$}s9.prototype={isEncrypted:function(){return(this.bitFlag&1)===1},useUTF8:function(){return(this.bitFlag&2048)===2048},readLocalPart:function(Q){var $,J;if(Q.skip(22),this.fileNameLength=Q.readInt(2),J=Q.readInt(2),this.fileName=Q.readData(this.fileNameLength),Q.skip(J),this.compressedSize===-1||this.uncompressedSize===-1)throw Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if($=YM(this.compressionMethod),$===null)throw Error("Corrupted zip : compression "+K1.pretty(this.compressionMethod)+" unknown (inner file : "+K1.transformTo("string",this.fileName)+")");this.decompressed=new $M(this.compressedSize,this.uncompressedSize,this.crc32,$,Q.readData(this.compressedSize))},readCentralPart:function(Q){this.versionMadeBy=Q.readInt(2),Q.skip(2),this.bitFlag=Q.readInt(2),this.compressionMethod=Q.readString(2),this.date=Q.readDate(),this.crc32=Q.readInt(4),this.compressedSize=Q.readInt(4),this.uncompressedSize=Q.readInt(4);var $=Q.readInt(2);if(this.extraFieldsLength=Q.readInt(2),this.fileCommentLength=Q.readInt(2),this.diskNumberStart=Q.readInt(2),this.internalFileAttributes=Q.readInt(2),this.externalFileAttributes=Q.readInt(4),this.localHeaderOffset=Q.readInt(4),this.isEncrypted())throw Error("Encrypted zip are not supported");Q.skip($),this.readExtraFields(Q),this.parseZIP64ExtraField(Q),this.fileComment=Q.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var Q=this.versionMadeBy>>8;if(this.dir=this.externalFileAttributes&16?!0:!1,Q===qM)this.dosPermissions=this.externalFileAttributes&63;if(Q===XM)this.unixPermissions=this.externalFileAttributes>>16&65535;if(!this.dir&&this.fileNameStr.slice(-1)==="/")this.dir=!0},parseZIP64ExtraField:function(){if(!this.extraFields[1])return;var Q=E7(this.extraFields[1].value);if(this.uncompressedSize===K1.MAX_VALUE_32BITS)this.uncompressedSize=Q.readInt(8);if(this.compressedSize===K1.MAX_VALUE_32BITS)this.compressedSize=Q.readInt(8);if(this.localHeaderOffset===K1.MAX_VALUE_32BITS)this.localHeaderOffset=Q.readInt(8);if(this.diskNumberStart===K1.MAX_VALUE_32BITS)this.diskNumberStart=Q.readInt(4)},readExtraFields:function(Q){var $=Q.index+this.extraFieldsLength,J,q,X;if(!this.extraFields)this.extraFields={};while(Q.index+4<$)J=Q.readInt(2),q=Q.readInt(2),X=Q.readData(q),this.extraFields[J]={id:J,length:q,value:X};Q.setIndex($)},handleUTF8:function(){var Q=JM.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=z5.utf8decode(this.fileName),this.fileCommentStr=z5.utf8decode(this.fileComment);else{var $=this.findExtraFieldUnicodePath();if($!==null)this.fileNameStr=$;else{var J=K1.transformTo(Q,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(J)}var q=this.findExtraFieldUnicodeComment();if(q!==null)this.fileCommentStr=q;else{var X=K1.transformTo(Q,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(X)}}},findExtraFieldUnicodePath:function(){var Q=this.extraFields[28789];if(Q){var $=E7(Q.value);if($.readInt(1)!==1)return null;if(a9(this.fileName)!==$.readInt(4))return null;return z5.utf8decode($.readData(Q.length-5))}return null},findExtraFieldUnicodeComment:function(){var Q=this.extraFields[25461];if(Q){var $=E7(Q.value);if($.readInt(1)!==1)return null;if(a9(this.fileComment)!==$.readInt(4))return null;return z5.utf8decode($.readData(Q.length-5))}return null}};t9.exports=s9});var JX=f((PD,$X)=>{var WM=v7(),o2=x0(),z2=C7(),BM=e9(),UM=l2();function QX(Q){this.files=[],this.loadOptions=Q}QX.prototype={checkSignature:function(Q){if(!this.reader.readAndCheckSignature(Q)){this.reader.index-=4;var $=this.reader.readString(4);throw Error("Corrupted zip or bug: unexpected signature ("+o2.pretty($)+", expected "+o2.pretty(Q)+")")}},isSignature:function(Q,$){var J=this.reader.index;this.reader.setIndex(Q);var q=this.reader.readString(4),X=q===$;return this.reader.setIndex(J),X},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 Q=this.reader.readData(this.zipCommentLength),$=UM.uint8array?"uint8array":"array",J=o2.transformTo($,Q);this.zipComment=this.loadOptions.decodeFileName(J)},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 Q=this.zip64EndOfCentralSize-44,$=0,J,q,X;while($<Q)J=this.reader.readInt(2),q=this.reader.readInt(4),X=this.reader.readData(q),this.zip64ExtensibleData[J]={id:J,length:q,value:X}},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 Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var Q,$;for(Q=0;Q<this.files.length;Q++)$=this.files[Q],this.reader.setIndex($.localHeaderOffset),this.checkSignature(z2.LOCAL_FILE_HEADER),$.readLocalPart(this.reader),$.handleUTF8(),$.processAttributes()},readCentralDir:function(){var Q;this.reader.setIndex(this.centralDirOffset);while(this.reader.readAndCheckSignature(z2.CENTRAL_FILE_HEADER))Q=new BM({zip64:this.zip64},this.loadOptions),Q.readCentralPart(this.reader),this.files.push(Q);if(this.centralDirRecords!==this.files.length){if(this.centralDirRecords!==0&&this.files.length===0)throw Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)}},readEndOfCentral:function(){var Q=this.reader.lastIndexOfSignature(z2.CENTRAL_DIRECTORY_END);if(Q<0){var $=!this.isSignature(0,z2.LOCAL_FILE_HEADER);if($)throw 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 Error("Corrupted zip: can't find end of central directory")}this.reader.setIndex(Q);var J=Q;if(this.checkSignature(z2.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===o2.MAX_VALUE_16BITS||this.diskWithCentralDirStart===o2.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===o2.MAX_VALUE_16BITS||this.centralDirRecords===o2.MAX_VALUE_16BITS||this.centralDirSize===o2.MAX_VALUE_32BITS||this.centralDirOffset===o2.MAX_VALUE_32BITS){if(this.zip64=!0,Q=this.reader.lastIndexOfSignature(z2.ZIP64_CENTRAL_DIRECTORY_LOCATOR),Q<0)throw Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(Q),this.checkSignature(z2.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,z2.ZIP64_CENTRAL_DIRECTORY_END)){if(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(z2.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0)throw Error("Corrupted zip: can't find the ZIP64 end of central directory")}this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(z2.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var q=this.centralDirOffset+this.centralDirSize;if(this.zip64)q+=20,q+=12+this.zip64EndOfCentralSize;var X=J-q;if(X>0)if(this.isSignature(J,z2.CENTRAL_FILE_HEADER));else this.reader.zero=X;else if(X<0)throw Error("Corrupted zip: missing "+Math.abs(X)+" bytes.")},prepareReader:function(Q){this.reader=WM(Q)},load:function(Q){this.prepareReader(Q),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}};$X.exports=QX});var YX=f((AD,XX)=>{var Z7=x0(),w5=$6(),GM=X6(),VM=JX(),KM=Z4(),qX=d6();function HM(Q){return new w5.Promise(function($,J){var q=Q.decompressed.getContentWorker().pipe(new KM);q.on("error",function(X){J(X)}).on("end",function(){if(q.streamInfo.crc32!==Q.decompressed.crc32)J(Error("Corrupted zip : CRC32 mismatch"));else $()}).resume()})}XX.exports=function(Q,$){var J=this;if($=Z7.extend($||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:GM.utf8decode}),qX.isNode&&qX.isStream(Q))return w5.Promise.reject(Error("JSZip can't accept a stream when loading a zip file."));return Z7.prepareContent("the loaded zip file",Q,!0,$.optimizedBinaryString,$.base64).then(function(q){var X=new VM($);return X.load(q),X}).then(function(X){var Y=[w5.Promise.resolve(X)],W=X.files;if($.checkCRC32)for(var B=0;B<W.length;B++)Y.push(HM(W[B]));return w5.Promise.all(Y)}).then(function(X){var Y=X.shift(),W=Y.files;for(var B=0;B<W.length;B++){var U=W[B],G=U.fileNameStr,V=Z7.resolve(U.fileNameStr);if(J.file(V,U.decompressed,{binary:!0,optimizedBinaryString:!0,date:U.date,dir:U.dir,comment:U.fileCommentStr.length?U.fileCommentStr:null,unixPermissions:U.unixPermissions,dosPermissions:U.dosPermissions,createFolders:$.createFolders}),!U.dir)J.file(V).unsafeOriginalName=G}if(Y.zipComment.length)J.comment=Y.zipComment;return J})}});var BX=f((RD,WX)=>{function K2(){if(!(this instanceof K2))return new K2;if(arguments.length)throw 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 Q=new K2;for(var $ in this)if(typeof this[$]!=="function")Q[$]=this[$];return Q}}K2.prototype=_9();K2.prototype.loadAsync=YX();K2.support=l2();K2.defaults=S4();K2.version="3.10.1";K2.loadAsync=function(Q,$){return new K2().loadAsync(Q,$)};K2.external=$6();WX.exports=K2});var h0=f((f7,DX)=>{var P8=function(Q){return Q&&Q.Math===Math&&Q};DX.exports=P8(typeof globalThis=="object"&&globalThis)||P8(typeof window=="object"&&window)||P8(typeof self=="object"&&self)||P8(typeof global=="object"&&global)||P8(typeof f7=="object"&&f7)||function(){return this}()||Function("return this")()});var t2=f((xC,CX)=>{CX.exports=function(Q){try{return!!Q()}catch($){return!0}}});var L1=f((gC,OX)=>{var IF=t2();OX.exports=!IF(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})});var y7=f((_C,PX)=>{var SF=t2();PX.exports=!SF(function(){var Q=function(){}.bind();return typeof Q!="function"||Q.hasOwnProperty("prototype")})});var A5=f((fC,AX)=>{var vF=y7(),P5=Function.prototype.call;AX.exports=vF?P5.bind(P5):function(){return P5.apply(P5,arguments)}});var SX=f((ZF)=>{var RX={}.propertyIsEnumerable,IX=Object.getOwnPropertyDescriptor,EF=IX&&!RX.call({1:2},1);ZF.f=EF?function($){var J=IX(this,$);return!!J&&J.enumerable}:RX});var h7=f((hC,vX)=>{vX.exports=function(Q,$){return{enumerable:!(Q&1),configurable:!(Q&2),writable:!(Q&4),value:$}}});var Q2=f((bC,kX)=>{var EX=y7(),ZX=Function.prototype,b7=ZX.call,TF=EX&&ZX.bind.bind(b7,b7);kX.exports=EX?TF:function(Q){return function(){return b7.apply(Q,arguments)}}});var R5=f((mC,xX)=>{var TX=Q2(),xF=TX({}.toString),gF=TX("".slice);xX.exports=function(Q){return gF(xF(Q),8,-1)}});var _X=f((uC,gX)=>{var _F=Q2(),fF=t2(),yF=R5(),m7=Object,hF=_F("".split);gX.exports=fF(function(){return!m7("z").propertyIsEnumerable(0)})?function(Q){return yF(Q)==="String"?hF(Q,""):m7(Q)}:m7});var u7=f((cC,fX)=>{fX.exports=function(Q){return Q===null||Q===void 0}});var c7=f((pC,yX)=>{var bF=u7(),mF=TypeError;yX.exports=function(Q){if(bF(Q))throw new mF("Can't call method on "+Q);return Q}});var I5=f((lC,hX)=>{var uF=_X(),cF=c7();hX.exports=function(Q){return uF(cF(Q))}});var H2=f((dC,bX)=>{var p7=typeof document=="object"&&document.all;bX.exports=typeof p7>"u"&&p7!==void 0?function(Q){return typeof Q=="function"||Q===p7}:function(Q){return typeof Q=="function"}});var n1=f((iC,mX)=>{var pF=H2();mX.exports=function(Q){return typeof Q=="object"?Q!==null:pF(Q)}});var d7=f((nC,uX)=>{var l7=h0(),lF=H2(),dF=function(Q){return lF(Q)?Q:void 0};uX.exports=function(Q,$){return arguments.length<2?dF(l7[Q]):l7[Q]&&l7[Q][$]}});var pX=f((oC,cX)=>{var iF=Q2();cX.exports=iF({}.isPrototypeOf)});var nX=f((rC,iX)=>{var nF=h0(),lX=nF.navigator,dX=lX&&lX.userAgent;iX.exports=dX?String(dX):""});var QY=f((aC,eX)=>{var tX=h0(),i7=nX(),oX=tX.process,rX=tX.Deno,aX=oX&&oX.versions||rX&&rX.version,sX=aX&&aX.v8,P2,S5;if(sX)P2=sX.split("."),S5=P2[0]>0&&P2[0]<4?1:+(P2[0]+P2[1]);if(!S5&&i7){if(P2=i7.match(/Edge\/(\d+)/),!P2||P2[1]>=74){if(P2=i7.match(/Chrome\/(\d+)/),P2)S5=+P2[1]}}eX.exports=S5});var n7=f((sC,JY)=>{var $Y=QY(),oF=t2(),rF=h0(),aF=rF.String;JY.exports=!!Object.getOwnPropertySymbols&&!oF(function(){var Q=Symbol("symbol detection");return!aF(Q)||!(Object(Q)instanceof Symbol)||!Symbol.sham&&$Y&&$Y<41})});var o7=f((tC,qY)=>{var sF=n7();qY.exports=sF&&!Symbol.sham&&typeof Symbol.iterator=="symbol"});var r7=f((eC,XY)=>{var tF=d7(),eF=H2(),Q3=pX(),$3=o7(),J3=Object;XY.exports=$3?function(Q){return typeof Q=="symbol"}:function(Q){var $=tF("Symbol");return eF($)&&Q3($.prototype,J3(Q))}});var WY=f((QO,YY)=>{var q3=String;YY.exports=function(Q){try{return q3(Q)}catch($){return"Object"}}});var a7=f(($O,BY)=>{var X3=H2(),Y3=WY(),W3=TypeError;BY.exports=function(Q){if(X3(Q))return Q;throw new W3(Y3(Q)+" is not a function")}});var GY=f((JO,UY)=>{var B3=a7(),U3=u7();UY.exports=function(Q,$){var J=Q[$];return U3(J)?void 0:B3(J)}});var KY=f((qO,VY)=>{var s7=A5(),t7=H2(),e7=n1(),G3=TypeError;VY.exports=function(Q,$){var J,q;if($==="string"&&t7(J=Q.toString)&&!e7(q=s7(J,Q)))return q;if(t7(J=Q.valueOf)&&!e7(q=s7(J,Q)))return q;if($!=="string"&&t7(J=Q.toString)&&!e7(q=s7(J,Q)))return q;throw new G3("Can't convert object to primitive value")}});var jY=f((XO,HY)=>{HY.exports=!1});var v5=f((YO,FY)=>{var MY=h0(),V3=Object.defineProperty;FY.exports=function(Q,$){try{V3(MY,Q,{value:$,configurable:!0,writable:!0})}catch(J){MY[Q]=$}return $}});var E5=f((WO,wY)=>{var K3=jY(),H3=h0(),j3=v5(),zY="__core-js_shared__",LY=wY.exports=H3[zY]||j3(zY,{});(LY.versions||(LY.versions=[])).push({version:"3.50.0",mode:K3?"pure":"global",copyright:"© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.",license:"https://github.com/zloirock/core-js/blob/v3.50.0/LICENSE",source:"https://github.com/zloirock/core-js"})});var QQ=f((BO,DY)=>{var NY=E5(),M3=Object.create||Object;DY.exports=function(Q,$){return NY[Q]||(NY[Q]=$||M3(null))}});var OY=f((UO,CY)=>{var F3=c7(),z3=Object;CY.exports=function(Q){return z3(F3(Q))}});var w1=f((GO,PY)=>{var L3=Q2(),w3=OY(),N3=L3({}.hasOwnProperty);PY.exports=Object.hasOwn||function($,J){return N3(w3($),J)}});var $Q=f((VO,AY)=>{var D3=Q2(),C3=0,O3=Math.random(),P3=D3(1.1 .toString);AY.exports=function(Q){return"Symbol("+(Q===void 0?"":Q)+")_"+P3(++C3+O3,36)}});var Z5=f((KO,IY)=>{var A3=h0(),R3=QQ(),RY=w1(),I3=$Q(),S3=n7(),v3=o7(),x6=A3.Symbol,JQ=R3("wks"),E3=v3?x6.for||x6:x6&&x6.withoutSetter||I3;IY.exports=function(Q){if(!RY(JQ,Q))JQ[Q]=S3&&RY(x6,Q)?x6[Q]:E3("Symbol."+Q);return JQ[Q]}});var ZY=f((HO,EY)=>{var Z3=A5(),SY=n1(),vY=r7(),k3=GY(),T3=KY(),x3=Z5(),g3=TypeError,_3=x3("toPrimitive");EY.exports=function(Q,$){if(!SY(Q)||vY(Q))return Q;var J=k3(Q,_3),q;if(J){if($===void 0)$="default";if(q=Z3(J,Q,$),!SY(q)||vY(q))return q;throw new g3("Can't convert object to primitive value")}if($===void 0)$="number";return T3(Q,$)}});var qQ=f((jO,kY)=>{var f3=ZY(),y3=r7();kY.exports=function(Q){var $=f3(Q,"string");return y3($)?$:$+""}});var gY=f((MO,xY)=>{var h3=h0(),TY=n1(),XQ=h3.document,b3=TY(XQ)&&TY(XQ.createElement);xY.exports=function(Q){return b3?XQ.createElement(Q):{}}});var YQ=f((FO,_Y)=>{var m3=L1(),u3=t2(),c3=gY();_Y.exports=!m3&&!u3(function(){return Object.defineProperty(c3("div"),"a",{get:function(){return 7}}).a!==7})});var WQ=f((s3)=>{var p3=L1(),l3=A5(),d3=SX(),i3=h7(),n3=I5(),o3=qQ(),r3=w1(),a3=YQ(),fY=Object.getOwnPropertyDescriptor;s3.f=p3?fY:function($,J){if($=n3($),J=o3(J),a3)try{return fY($,J)}catch(q){}if(r3($,J))return i3(!l3(d3.f,$,J),$[J])}});var hY=f((LO,yY)=>{var e3=L1(),Qz=t2();yY.exports=e3&&Qz(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})});var BQ=f((wO,bY)=>{var $z=n1(),Jz=String,qz=TypeError;bY.exports=function(Q){if($z(Q))return Q;throw new qz(Jz(Q)+" is not an object")}});var T5=f((Gz)=>{var Xz=L1(),Yz=YQ(),Wz=hY(),k5=BQ(),mY=qQ(),Bz=TypeError,UQ=Object.defineProperty,Uz=Object.getOwnPropertyDescriptor,GQ="enumerable",VQ="configurable",KQ="writable";Gz.f=Xz?Wz?function($,J,q){if(k5($),J=mY(J),k5(q),typeof $==="function"&&J==="prototype"&&"value"in q&&KQ in q&&!q[KQ]){var X=Uz($,J);if(X&&X[KQ])$[J]=q.value,q={configurable:VQ in q?q[VQ]:X[VQ],enumerable:GQ in q?q[GQ]:X[GQ],writable:!1}}return UQ($,J,q)}:UQ:function($,J,q){if(k5($),J=mY(J),k5(q),Yz)try{return UQ($,J,q)}catch(X){}if("get"in q||"set"in q)throw new Bz("Accessors not supported");if("value"in q)$[J]=q.value;return $}});var HQ=f((DO,uY)=>{var Kz=L1(),Hz=T5(),jz=h7();uY.exports=Kz?function(Q,$,J){return Hz.f(Q,$,jz(1,J))}:function(Q,$,J){return Q[$]=J,Q}});var lY=f((CO,pY)=>{var jQ=L1(),Mz=w1(),cY=Function.prototype,Fz=jQ&&Object.getOwnPropertyDescriptor,MQ=Mz(cY,"name"),zz=MQ&&function(){}.name==="something",Lz=MQ&&(!jQ||jQ&&Fz(cY,"name").configurable);pY.exports={EXISTS:MQ,PROPER:zz,CONFIGURABLE:Lz}});var iY=f((OO,dY)=>{var wz=Q2(),Nz=H2(),FQ=E5(),Dz=wz(Function.toString);if(!Nz(FQ.inspectSource))FQ.inspectSource=function(Q){return Dz(Q)};dY.exports=FQ.inspectSource});var rY=f((PO,oY)=>{var Cz=h0(),Oz=H2(),nY=Cz.WeakMap;oY.exports=Oz(nY)&&/native code/.test(String(nY))});var tY=f((AO,sY)=>{var Pz=QQ(),Az=$Q(),aY=Pz("keys");sY.exports=function(Q){return aY[Q]||(aY[Q]=Az(Q))}});var zQ=f((RO,eY)=>{eY.exports={}});var qW=f((IO,JW)=>{var Rz=rY(),$W=h0(),Iz=n1(),Sz=HQ(),LQ=w1(),wQ=E5(),vz=tY(),Ez=zQ(),QW="Object already initialized",NQ=$W.TypeError,Zz=$W.WeakMap,x5,A8,g5,kz=function(Q){return g5(Q)?A8(Q):x5(Q,{})},Tz=function(Q){return function($){var J;if(!Iz($)||(J=A8($)).type!==Q)throw new NQ("Incompatible receiver, "+Q+" required");return J}};if(Rz||wQ.state)j2=wQ.state||(wQ.state=new Zz),j2.get=j2.get,j2.has=j2.has,j2.set=j2.set,x5=function(Q,$){if(j2.has(Q))throw new NQ(QW);return $.facade=Q,j2.set(Q,$),$},A8=function(Q){return j2.get(Q)||{}},g5=function(Q){return j2.has(Q)};else N1=vz("state"),Ez[N1]=!0,x5=function(Q,$){if(LQ(Q,N1))throw new NQ(QW);return $.facade=Q,Sz(Q,N1,$),$},A8=function(Q){return LQ(Q,N1)?Q[N1]:{}},g5=function(Q){return LQ(Q,N1)};var j2,N1;JW.exports={set:x5,get:A8,has:g5,enforce:kz,getterFor:Tz}});var BW=f((SO,WW)=>{var CQ=Q2(),xz=t2(),gz=H2(),_5=w1(),DQ=L1(),_z=lY().CONFIGURABLE,fz=iY(),YW=qW(),yz=YW.enforce,hz=YW.get,XW=String,f5=Object.defineProperty,bz=CQ("".slice),mz=CQ("".replace),uz=CQ([].join),cz=DQ&&!xz(function(){return f5(function(){},"length",{value:8}).length!==8}),pz=String(String).split("String"),lz=WW.exports=function(Q,$,J){if(bz(XW($),0,7)==="Symbol(")$="["+mz(XW($),/^Symbol\(([^)]*)\).*$/,"$1")+"]";if(J&&J.getter)$="get "+$;if(J&&J.setter)$="set "+$;if(!_5(Q,"name")||_z&&Q.name!==$)if(DQ)f5(Q,"name",{value:$,configurable:!0});else Q.name=$;if(cz&&J&&_5(J,"arity")&&Q.length!==J.arity)f5(Q,"length",{value:J.arity});try{if(J&&_5(J,"constructor")&&J.constructor){if(DQ)f5(Q,"prototype",{writable:!1})}else if(Q.prototype)Q.prototype=void 0}catch(X){}var q=yz(Q);if(!_5(q,"source"))q.source=uz(pz,typeof $=="string"?$:"");return Q};Function.prototype.toString=lz(function(){return gz(this)&&hz(this).source||fz(this)},"toString")});var GW=f((vO,UW)=>{var dz=H2(),iz=T5(),nz=BW(),oz=v5();UW.exports=function(Q,$,J,q){if(!q)q={};var X=q.enumerable,Y=q.name!==void 0?q.name:$;if(dz(J))nz(J,Y,q);if(q.global)if(X)Q[$]=J;else oz($,J);else{try{if(!q.unsafe)delete Q[$];else if(Q[$])X=!0}catch(W){}if(X)Q[$]=J;else iz.f(Q,$,{value:J,enumerable:!1,configurable:!q.nonConfigurable,writable:!q.nonWritable})}return Q}});var KW=f((EO,VW)=>{var{ceil:rz,floor:az}=Math;VW.exports=Math.trunc||function($){var J=+$;return(J>0?az:rz)(J)}});var OQ=f((ZO,HW)=>{var sz=KW();HW.exports=function(Q){var $=+Q;return $!==$||$===0?0:sz($)}});var MW=f((kO,jW)=>{var tz=OQ(),ez=Math.max,QL=Math.min;jW.exports=function(Q,$){var J=tz(Q);return J<0?ez(J+$,0):QL(J,$)}});var zW=f((TO,FW)=>{var $L=OQ(),JL=Math.min;FW.exports=function(Q){var $=$L(Q);return $>0?JL($,9007199254740991):0}});var wW=f((xO,LW)=>{var qL=zW();LW.exports=function(Q){return qL(Q.length)}});var CW=f((gO,DW)=>{var XL=I5(),YL=MW(),WL=wW(),NW=function(Q){return function($,J,q){var X=XL($),Y=WL(X);if(Y===0)return!Q&&-1;var W=YL(q,Y),B;if(Q&&J!==J){while(Y>W)if(B=X[W++],B!==B)return!0}else for(;Y>W;W++)if((Q||(W in X))&&X[W]===J)return Q||W||0;return!Q&&-1}};DW.exports={includes:NW(!0),indexOf:NW(!1)}});var AW=f((_O,PW)=>{var BL=Q2(),PQ=w1(),UL=I5(),GL=CW().indexOf,VL=zQ(),OW=BL([].push);PW.exports=function(Q,$){var J=UL(Q),q=0,X=[],Y;for(Y in J)!PQ(VL,Y)&&PQ(J,Y)&&OW(X,Y);while($.length>q)if(PQ(J,Y=$[q++]))~GL(X,Y)||OW(X,Y);return X}});var IW=f((fO,RW)=>{RW.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]});var SW=f((ML)=>{var KL=AW(),HL=IW(),jL=HL.concat("length","prototype");ML.f=Object.getOwnPropertyNames||function($){return KL($,jL)}});var vW=f((zL)=>{zL.f=Object.getOwnPropertySymbols});var ZW=f((bO,EW)=>{var wL=d7(),NL=Q2(),DL=SW(),CL=vW(),OL=BQ(),PL=NL([].concat);EW.exports=wL("Reflect","ownKeys")||function($){var J=DL.f(OL($)),q=CL.f;return q?PL(J,q($)):J}});var xW=f((mO,TW)=>{var kW=w1(),AL=ZW(),RL=WQ(),IL=T5();TW.exports=function(Q,$,J){var q=AL($),X=IL.f,Y=RL.f;for(var W=0;W<q.length;W++){var B=q[W];if(!kW(Q,B)&&!(J&&kW(J,B)))X(Q,B,Y($,B))}}});var _W=f((uO,gW)=>{var SL=t2(),vL=H2(),EL=/#|\.prototype\./,R8=function(Q,$){var J=kL[ZL(Q)];return J===xL?!0:J===TL?!1:vL($)?SL($):!!$},ZL=R8.normalize=function(Q){return String(Q).replace(EL,".").toLowerCase()},kL=R8.data={},TL=R8.NATIVE="N",xL=R8.POLYFILL="P";gW.exports=R8});var h5=f((cO,fW)=>{var y5=h0(),gL=WQ().f,_L=HQ(),fL=GW(),yL=v5(),hL=xW(),bL=_W();fW.exports=function(Q,$){var{target:J,global:q,stat:X}=Q,Y,W,B,U,G,V;if(q)W=y5;else if(X)W=y5[J]||yL(J,{});else W=y5[J]&&y5[J].prototype;if(W)for(B in $){if(G=$[B],Q.dontCallGetSet)V=gL(W,B),U=V&&V.value;else U=W[B];if(Y=bL(q?B:J+(X?".":"#")+B,Q.forced),!Y&&U!==void 0){if(typeof G==typeof U)continue;hL(G,U)}if(Q.sham||U&&U.sham)_L(G,"sham",!0);fL(W,B,G,Q)}}});var hW=f((pO,yW)=>{var mL=TypeError;yW.exports=function(Q){if(typeof Q=="string")return Q;throw new mL("Argument is not a string")}});var cW=f((lO,uW)=>{var mW=h0(),uL=Q2(),cL=mW.Uint8Array,bW=mW.SyntaxError,pL=Math.min,lL=uL("".match);uW.exports=function(Q,$){var J=Q.length;if(J%2!==0)throw new bW("String should be an even number of characters");var q=$?pL($.length,J/2):J/2,X=$||new cL(q),Y=lL(Q,/[\S\s]{2}/g),W=0;for(;W<q;W++){var B=+("0x"+Y[W]+"0");if(B!==B)throw new bW("String should only contain hex characters");X[W]=B>>4}return{bytes:X,read:W<<1}}});var pW=f(()=>{var dL=h5(),iL=h0(),nL=hW(),oL=cW();if(iL.Uint8Array)dL({target:"Uint8Array",stat:!0},{fromHex:function($){return oL(nL($)).bytes}})});var dW=f((nO,lW)=>{var rL=n1(),aL=String,sL=TypeError;lW.exports=function(Q){if(Q===void 0||rL(Q))return Q;throw new sL(aL(Q)+" is not an object or undefined")}});var oW=f((oO,nW)=>{var tL=Z5(),eL=tL("toStringTag"),iW={};iW[eL]="z";nW.exports=String(iW)==="[object z]"});var aW=f((rO,rW)=>{var Qw=oW(),$w=H2(),b5=R5(),Jw=Z5(),qw=Jw("toStringTag"),Xw=Object,Yw=b5(function(){return arguments}())==="Arguments",Ww=function(Q,$){try{return Q[$]}catch(J){}};rW.exports=Qw?b5:function(Q){var $,J,q;return Q===void 0?"Undefined":Q===null?"Null":typeof(J=Ww($=Xw(Q),qw))=="string"?J:Yw?b5($):(q=b5($))==="Object"&&$w($.callee)?"Arguments":q}});var AQ=f((aO,sW)=>{var Bw=aW(),Uw=TypeError;sW.exports=function(Q){if(Bw(Q)==="Uint8Array")return Q;throw new Uw("Argument is not an Uint8Array")}});var eW=f((sO,tW)=>{tW.exports=typeof ArrayBuffer<"u"&&typeof DataView<"u"});var $B=f((tO,QB)=>{var Gw=Q2(),Vw=a7();QB.exports=function(Q,$,J){try{return Gw(Vw(Object.getOwnPropertyDescriptor(Q,$)[J]))}catch(q){}}});var YB=f((eO,XB)=>{var qB=h0(),Kw=$B(),Hw=R5(),JB=qB.ArrayBuffer,jw=qB.TypeError;XB.exports=JB&&Kw(JB.prototype,"byteLength","get")||function(Q){if(Hw(Q)!=="ArrayBuffer")throw new jw("ArrayBuffer expected");return Q.byteLength}});var BB=f((QP,WB)=>{var Mw=h0(),Fw=eW(),zw=YB(),Lw=Mw.DataView;WB.exports=function(Q){if(!Fw||zw(Q)!==0)return!1;try{return new Lw(Q),!1}catch($){return!0}}});var RQ=f(($P,UB)=>{var ww=BB(),Nw=TypeError;UB.exports=function(Q){if(ww(Q))throw new Nw("ArrayBuffer is detached");return Q}});var MB=f((JP,jB)=>{var HB="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",GB=HB+"+/",VB=HB+"-_",KB=function(Q){var $={},J=0;for(;J<64;J++)$[Q.charAt(J)]=J;return $};jB.exports={i2c:GB,c2i:KB(GB),i2cUrl:VB,c2iUrl:KB(VB)}});var zB=f((qP,FB)=>{var Dw=TypeError;FB.exports=function(Q){var $=Q&&Q.alphabet;if($===void 0||$==="base64"||$==="base64url")return $||"base64";throw new Dw("Incorrect `alphabet` option")}});var DB=f(()=>{var Cw=h5(),LB=h0(),wB=Q2(),Ow=dW(),Pw=AQ(),Aw=RQ(),NB=MB(),Rw=zB(),Iw=NB.i2c,Sw=NB.i2cUrl,vw=Math.floor,Ew=Math.ceil,Zw=wB("".charAt),m5=LB.Uint8Array,kw=LB.Array,Tw=wB([].join),xw=!m5||!m5.prototype.toBase64||!function(){try{var Q=new m5;Q.toBase64(null)}catch($){return!0}}();if(m5)Cw({target:"Uint8Array",proto:!0,forced:xw},{toBase64:function(){var $=Pw(this),J=arguments.length?Ow(arguments[0]):void 0,q=Rw(J)==="base64"?Iw:Sw,X=!!J&&!!J.omitPadding;Aw(this.buffer);var Y=0,W=$.length,B=kw(X?vw(W/3)*4+(W%3?W%3+1:0):Ew(W/3)*4),U=0,G,V=function(F){return Zw(q,G>>6*F&63)};for(;Y+2<W;Y+=3)G=($[Y]<<16)+($[Y+1]<<8)+$[Y+2],B[U++]=V(3),B[U++]=V(2),B[U++]=V(1),B[U++]=V(0);if(Y+2===W){if(G=($[Y]<<16)+($[Y+1]<<8),B[U++]=V(3),B[U++]=V(2),B[U++]=V(1),!X)B[U++]="="}else if(Y+1===W){if(G=$[Y]<<16,B[U++]=V(3),B[U++]=V(2),!X)B[U++]="=",B[U++]="="}return Tw(B,"")}})});var OB=f(()=>{var gw=h5(),_w=h0(),CB=Q2(),fw=AQ(),yw=RQ(),hw=CB(1.1 .toString),bw=CB([].join),mw=Array,u5=_w.Uint8Array,uw=!u5||!u5.prototype.toHex||!function(){try{var Q=new u5([255,255,255,255,255,255,255,255]);return Q.toHex()==="ffffffffffffffff"}catch($){return!1}}();if(u5)gw({target:"Uint8Array",proto:!0,forced:uw},{toHex:function(){fw(this),yw(this.buffer);var $=mw(this.length);for(var J=0,q=this.length;J<q;J++){var X=hw(this[J],16);$[J]=X.length===1?"0"+X:X}return bw($,"")}})});var AB=f((IQ)=>{/*! crc32.js (C) 2014-present SheetJS -- http://sheetjs.com */var PB;(function(Q){if(typeof DO_NOT_EXPORT_CRC>"u")if(typeof IQ==="object")Q(IQ);else if(typeof define==="function"&&define.amd)define(function(){var $={};return Q($),$});else Q(PB={});else Q(PB={})})(function(Q){Q.version="1.2.2";function $(){var k=0,d=Array(256);for(var S=0;S!=256;++S)k=S,k=k&1?-2097792136^k>>>1:k>>>1,k=k&1?-2097792136^k>>>1:k>>>1,k=k&1?-2097792136^k>>>1:k>>>1,k=k&1?-2097792136^k>>>1:k>>>1,k=k&1?-2097792136^k>>>1:k>>>1,k=k&1?-2097792136^k>>>1:k>>>1,k=k&1?-2097792136^k>>>1:k>>>1,k=k&1?-2097792136^k>>>1:k>>>1,d[S]=k;return typeof Int32Array<"u"?new Int32Array(d):d}var J=$();function q(k){var d=0,S=0,v=0,A=typeof Int32Array<"u"?new Int32Array(4096):Array(4096);for(v=0;v!=256;++v)A[v]=k[v];for(v=0;v!=256;++v){S=k[v];for(d=256+v;d<4096;d+=256)S=A[d]=S>>>8^k[S&255]}var N=[];for(v=1;v!=16;++v)N[v-1]=typeof Int32Array<"u"?A.subarray(v*256,v*256+256):A.slice(v*256,v*256+256);return N}var X=q(J),Y=X[0],W=X[1],B=X[2],U=X[3],G=X[4],V=X[5],F=X[6],M=X[7],H=X[8],_=X[9],T=X[10],C=X[11],O=X[12],K=X[13],L=X[14];function w(k,d){var S=d^-1;for(var v=0,A=k.length;v<A;)S=S>>>8^J[(S^k.charCodeAt(v++))&255];return~S}function P(k,d){var S=d^-1,v=k.length-15,A=0;for(;A<v;)S=L[k[A++]^S&255]^K[k[A++]^S>>8&255]^O[k[A++]^S>>16&255]^C[k[A++]^S>>>24]^T[k[A++]]^_[k[A++]]^H[k[A++]]^M[k[A++]]^F[k[A++]]^V[k[A++]]^G[k[A++]]^U[k[A++]]^B[k[A++]]^W[k[A++]]^Y[k[A++]]^J[k[A++]];v+=15;while(A<v)S=S>>>8^J[(S^k[A++])&255];return~S}function h(k,d){var S=d^-1;for(var v=0,A=k.length,N=0,x=0;v<A;)if(N=k.charCodeAt(v++),N<128)S=S>>>8^J[(S^N)&255];else if(N<2048)S=S>>>8^J[(S^(192|N>>6&31))&255],S=S>>>8^J[(S^(128|N&63))&255];else if(N>=55296&&N<57344)N=(N&1023)+64,x=k.charCodeAt(v++)&1023,S=S>>>8^J[(S^(240|N>>8&7))&255],S=S>>>8^J[(S^(128|N>>2&63))&255],S=S>>>8^J[(S^(128|x>>6&15|(N&3)<<4))&255],S=S>>>8^J[(S^(128|x&63))&255];else S=S>>>8^J[(S^(224|N>>12&15))&255],S=S>>>8^J[(S^(128|N>>6&63))&255],S=S>>>8^J[(S^(128|N&63))&255];return~S}Q.table=J,Q.bstr=w,Q.buf=P,Q.str=h})});var _Q=y6(BX(),1);var jM=new Uint8Array(16);function k7(){return crypto.getRandomValues(jM)}var m0=[];for(let Q=0;Q<256;++Q)m0.push((Q+256).toString(16).slice(1));function UX(Q,$=0){return(m0[Q[$+0]]+m0[Q[$+1]]+m0[Q[$+2]]+m0[Q[$+3]]+"-"+m0[Q[$+4]]+m0[Q[$+5]]+"-"+m0[Q[$+6]]+m0[Q[$+7]]+"-"+m0[Q[$+8]]+m0[Q[$+9]]+"-"+m0[Q[$+10]]+m0[Q[$+11]]+m0[Q[$+12]]+m0[Q[$+13]]+m0[Q[$+14]]+m0[Q[$+15]]).toLowerCase()}function MM(Q,$,J){if(!$&&!Q&&crypto.randomUUID)return crypto.randomUUID();return FM(Q,$,J)}function FM(Q,$,J){Q=Q||{};let q=Q.random??Q.rng?.()??k7();if(q.length<16)throw Error("Random bytes length must be >= 16");if(q[6]=q[6]&15|64,q[8]=q[8]&63|128,$){if(J=J||0,J<0||J+16>$.length)throw RangeError(`UUID byte range ${J}:${J+15} is out of buffer bounds`);for(let X=0;X<16;++X)$[J+X]=q[X];return $}return UX(q)}var u1=MM;var g={};a5(g,{void:()=>eM,util:()=>P0,unknown:()=>sM,union:()=>qF,undefined:()=>oM,tuple:()=>WF,transformer:()=>zF,symbol:()=>nM,string:()=>LX,strictObject:()=>JF,setErrorMap:()=>wM,set:()=>GF,record:()=>BF,quotelessJson:()=>zM,promise:()=>FF,preprocess:()=>NF,pipeline:()=>DF,ostring:()=>CF,optional:()=>LF,onumber:()=>OF,oboolean:()=>PF,objectUtil:()=>T7,object:()=>$F,number:()=>wX,nullable:()=>wF,null:()=>rM,never:()=>tM,nativeEnum:()=>MF,nan:()=>lM,map:()=>UF,makeIssue:()=>F8,literal:()=>HF,lazy:()=>KF,late:()=>cM,isValid:()=>H1,isDirty:()=>D5,isAsync:()=>N6,isAborted:()=>N5,intersection:()=>YF,instanceof:()=>pM,getParsedType:()=>g2,getErrorMap:()=>w6,function:()=>VF,enum:()=>jF,effect:()=>zF,discriminatedUnion:()=>XF,defaultErrorMap:()=>r2,datetimeRegex:()=>MX,date:()=>iM,custom:()=>zX,coerce:()=>AF,boolean:()=>NX,bigint:()=>dM,array:()=>QF,any:()=>aM,addIssueToContext:()=>Y0,ZodVoid:()=>L8,ZodUnknown:()=>j1,ZodUnion:()=>R6,ZodUndefined:()=>P6,ZodType:()=>O0,ZodTuple:()=>f2,ZodTransformer:()=>C2,ZodSymbol:()=>z8,ZodString:()=>L2,ZodSet:()=>d1,ZodSchema:()=>O0,ZodRecord:()=>w8,ZodReadonly:()=>T6,ZodPromise:()=>i1,ZodPipeline:()=>C8,ZodParsedType:()=>$0,ZodOptional:()=>N2,ZodObject:()=>g0,ZodNumber:()=>M1,ZodNullable:()=>s2,ZodNull:()=>A6,ZodNever:()=>_2,ZodNativeEnum:()=>E6,ZodNaN:()=>D8,ZodMap:()=>N8,ZodLiteral:()=>v6,ZodLazy:()=>S6,ZodIssueCode:()=>r,ZodIntersection:()=>I6,ZodFunction:()=>C6,ZodFirstPartyTypeKind:()=>z0,ZodError:()=>e0,ZodEnum:()=>z1,ZodEffects:()=>C2,ZodDiscriminatedUnion:()=>C5,ZodDefault:()=>Z6,ZodDate:()=>p1,ZodCatch:()=>k6,ZodBranded:()=>O5,ZodBoolean:()=>O6,ZodBigInt:()=>F1,ZodArray:()=>w2,ZodAny:()=>l1,Schema:()=>O0,ParseStatus:()=>u0,OK:()=>d0,NEVER:()=>RF,INVALID:()=>F0,EMPTY_PATH:()=>NM,DIRTY:()=>c1,BRAND:()=>uM});var P0;(function(Q){Q.assertEqual=(X)=>{};function $(X){}Q.assertIs=$;function J(X){throw Error()}Q.assertNever=J,Q.arrayToEnum=(X)=>{let Y={};for(let W of X)Y[W]=W;return Y},Q.getValidEnumValues=(X)=>{let Y=Q.objectKeys(X).filter((B)=>typeof X[X[B]]!=="number"),W={};for(let B of Y)W[B]=X[B];return Q.objectValues(W)},Q.objectValues=(X)=>{return Q.objectKeys(X).map(function(Y){return X[Y]})},Q.objectKeys=typeof Object.keys==="function"?(X)=>Object.keys(X):(X)=>{let Y=[];for(let W in X)if(Object.prototype.hasOwnProperty.call(X,W))Y.push(W);return Y},Q.find=(X,Y)=>{for(let W of X)if(Y(W))return W;return},Q.isInteger=typeof Number.isInteger==="function"?(X)=>Number.isInteger(X):(X)=>typeof X==="number"&&Number.isFinite(X)&&Math.floor(X)===X;function q(X,Y=" | "){return X.map((W)=>typeof W==="string"?`'${W}'`:W).join(Y)}Q.joinValues=q,Q.jsonStringifyReplacer=(X,Y)=>{if(typeof Y==="bigint")return Y.toString();return Y}})(P0||(P0={}));var T7;(function(Q){Q.mergeShapes=($,J)=>{return{...$,...J}}})(T7||(T7={}));var $0=P0.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),g2=(Q)=>{switch(typeof Q){case"undefined":return $0.undefined;case"string":return $0.string;case"number":return Number.isNaN(Q)?$0.nan:$0.number;case"boolean":return $0.boolean;case"function":return $0.function;case"bigint":return $0.bigint;case"symbol":return $0.symbol;case"object":if(Array.isArray(Q))return $0.array;if(Q===null)return $0.null;if(Q.then&&typeof Q.then==="function"&&Q.catch&&typeof Q.catch==="function")return $0.promise;if(typeof Map<"u"&&Q instanceof Map)return $0.map;if(typeof Set<"u"&&Q instanceof Set)return $0.set;if(typeof Date<"u"&&Q instanceof Date)return $0.date;return $0.object;default:return $0.unknown}};var r=P0.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),zM=(Q)=>{return JSON.stringify(Q,null,2).replace(/"([^"]+)":/g,"$1:")};class e0 extends Error{get errors(){return this.issues}constructor(Q){super();this.issues=[],this.addIssue=(J)=>{this.issues=[...this.issues,J]},this.addIssues=(J=[])=>{this.issues=[...this.issues,...J]};let $=new.target.prototype;if(Object.setPrototypeOf)Object.setPrototypeOf(this,$);else this.__proto__=$;this.name="ZodError",this.issues=Q}format(Q){let $=Q||function(X){return X.message},J={_errors:[]},q=(X)=>{for(let Y of X.issues)if(Y.code==="invalid_union")Y.unionErrors.map(q);else if(Y.code==="invalid_return_type")q(Y.returnTypeError);else if(Y.code==="invalid_arguments")q(Y.argumentsError);else if(Y.path.length===0)J._errors.push($(Y));else{let W=J,B=0;while(B<Y.path.length){let U=Y.path[B];if(B!==Y.path.length-1)W[U]=W[U]||{_errors:[]};else W[U]=W[U]||{_errors:[]},W[U]._errors.push($(Y));W=W[U],B++}}};return q(this),J}static assert(Q){if(!(Q instanceof e0))throw Error(`Not a ZodError: ${Q}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,P0.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(Q=($)=>$.message){let $={},J=[];for(let q of this.issues)if(q.path.length>0){let X=q.path[0];$[X]=$[X]||[],$[X].push(Q(q))}else J.push(Q(q));return{formErrors:J,fieldErrors:$}}get formErrors(){return this.flatten()}}e0.create=(Q)=>{return new e0(Q)};var LM=(Q,$)=>{let J;switch(Q.code){case r.invalid_type:if(Q.received===$0.undefined)J="Required";else J=`Expected ${Q.expected}, received ${Q.received}`;break;case r.invalid_literal:J=`Invalid literal value, expected ${JSON.stringify(Q.expected,P0.jsonStringifyReplacer)}`;break;case r.unrecognized_keys:J=`Unrecognized key(s) in object: ${P0.joinValues(Q.keys,", ")}`;break;case r.invalid_union:J="Invalid input";break;case r.invalid_union_discriminator:J=`Invalid discriminator value. Expected ${P0.joinValues(Q.options)}`;break;case r.invalid_enum_value:J=`Invalid enum value. Expected ${P0.joinValues(Q.options)}, received '${Q.received}'`;break;case r.invalid_arguments:J="Invalid function arguments";break;case r.invalid_return_type:J="Invalid function return type";break;case r.invalid_date:J="Invalid date";break;case r.invalid_string:if(typeof Q.validation==="object")if("includes"in Q.validation){if(J=`Invalid input: must include "${Q.validation.includes}"`,typeof Q.validation.position==="number")J=`${J} at one or more positions greater than or equal to ${Q.validation.position}`}else if("startsWith"in Q.validation)J=`Invalid input: must start with "${Q.validation.startsWith}"`;else if("endsWith"in Q.validation)J=`Invalid input: must end with "${Q.validation.endsWith}"`;else P0.assertNever(Q.validation);else if(Q.validation!=="regex")J=`Invalid ${Q.validation}`;else J="Invalid";break;case r.too_small:if(Q.type==="array")J=`Array must contain ${Q.exact?"exactly":Q.inclusive?"at least":"more than"} ${Q.minimum} element(s)`;else if(Q.type==="string")J=`String must contain ${Q.exact?"exactly":Q.inclusive?"at least":"over"} ${Q.minimum} character(s)`;else if(Q.type==="number")J=`Number must be ${Q.exact?"exactly equal to ":Q.inclusive?"greater than or equal to ":"greater than "}${Q.minimum}`;else if(Q.type==="bigint")J=`Number must be ${Q.exact?"exactly equal to ":Q.inclusive?"greater than or equal to ":"greater than "}${Q.minimum}`;else if(Q.type==="date")J=`Date must be ${Q.exact?"exactly equal to ":Q.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(Q.minimum))}`;else J="Invalid input";break;case r.too_big:if(Q.type==="array")J=`Array must contain ${Q.exact?"exactly":Q.inclusive?"at most":"less than"} ${Q.maximum} element(s)`;else if(Q.type==="string")J=`String must contain ${Q.exact?"exactly":Q.inclusive?"at most":"under"} ${Q.maximum} character(s)`;else if(Q.type==="number")J=`Number must be ${Q.exact?"exactly":Q.inclusive?"less than or equal to":"less than"} ${Q.maximum}`;else if(Q.type==="bigint")J=`BigInt must be ${Q.exact?"exactly":Q.inclusive?"less than or equal to":"less than"} ${Q.maximum}`;else if(Q.type==="date")J=`Date must be ${Q.exact?"exactly":Q.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(Q.maximum))}`;else J="Invalid input";break;case r.custom:J="Invalid input";break;case r.invalid_intersection_types:J="Intersection results could not be merged";break;case r.not_multiple_of:J=`Number must be a multiple of ${Q.multipleOf}`;break;case r.not_finite:J="Number must be finite";break;default:J=$.defaultError,P0.assertNever(Q)}return{message:J}},r2=LM;var GX=r2;function wM(Q){GX=Q}function w6(){return GX}var F8=(Q)=>{let{data:$,path:J,errorMaps:q,issueData:X}=Q,Y=[...J,...X.path||[]],W={...X,path:Y};if(X.message!==void 0)return{...X,path:Y,message:X.message};let B="",U=q.filter((G)=>!!G).slice().reverse();for(let G of U)B=G(W,{data:$,defaultError:B}).message;return{...X,path:Y,message:B}},NM=[];function Y0(Q,$){let J=w6(),q=F8({issueData:$,data:Q.data,path:Q.path,errorMaps:[Q.common.contextualErrorMap,Q.schemaErrorMap,J,J===r2?void 0:r2].filter((X)=>!!X)});Q.common.issues.push(q)}class u0{constructor(){this.value="valid"}dirty(){if(this.value==="valid")this.value="dirty"}abort(){if(this.value!=="aborted")this.value="aborted"}static mergeArray(Q,$){let J=[];for(let q of $){if(q.status==="aborted")return F0;if(q.status==="dirty")Q.dirty();J.push(q.value)}return{status:Q.value,value:J}}static async mergeObjectAsync(Q,$){let J=[];for(let q of $){let X=await q.key,Y=await q.value;J.push({key:X,value:Y})}return u0.mergeObjectSync(Q,J)}static mergeObjectSync(Q,$){let J={};for(let q of $){let{key:X,value:Y}=q;if(X.status==="aborted")return F0;if(Y.status==="aborted")return F0;if(X.status==="dirty")Q.dirty();if(Y.status==="dirty")Q.dirty();if(X.value!=="__proto__"&&(typeof Y.value<"u"||q.alwaysSet))J[X.value]=Y.value}return{status:Q.value,value:J}}}var F0=Object.freeze({status:"aborted"}),c1=(Q)=>({status:"dirty",value:Q}),d0=(Q)=>({status:"valid",value:Q}),N5=(Q)=>Q.status==="aborted",D5=(Q)=>Q.status==="dirty",H1=(Q)=>Q.status==="valid",N6=(Q)=>typeof Promise<"u"&&Q instanceof Promise;var K0;(function(Q){Q.errToObj=($)=>typeof $==="string"?{message:$}:$||{},Q.toString=($)=>typeof $==="string"?$:$?.message})(K0||(K0={}));class D2{constructor(Q,$,J,q){this._cachedPath=[],this.parent=Q,this.data=$,this._path=J,this._key=q}get path(){if(!this._cachedPath.length)if(Array.isArray(this._key))this._cachedPath.push(...this._path,...this._key);else this._cachedPath.push(...this._path,this._key);return this._cachedPath}}var VX=(Q,$)=>{if(H1($))return{success:!0,data:$.value};else{if(!Q.common.issues.length)throw Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let J=new e0(Q.common.issues);return this._error=J,this._error}}}};function C0(Q){if(!Q)return{};let{errorMap:$,invalid_type_error:J,required_error:q,description:X}=Q;if($&&(J||q))throw Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);if($)return{errorMap:$,description:X};return{errorMap:(W,B)=>{let{message:U}=Q;if(W.code==="invalid_enum_value")return{message:U??B.defaultError};if(typeof B.data>"u")return{message:U??q??B.defaultError};if(W.code!=="invalid_type")return{message:B.defaultError};return{message:U??J??B.defaultError}},description:X}}class O0{get description(){return this._def.description}_getType(Q){return g2(Q.data)}_getOrReturnCtx(Q,$){return $||{common:Q.parent.common,data:Q.data,parsedType:g2(Q.data),schemaErrorMap:this._def.errorMap,path:Q.path,parent:Q.parent}}_processInputParams(Q){return{status:new u0,ctx:{common:Q.parent.common,data:Q.data,parsedType:g2(Q.data),schemaErrorMap:this._def.errorMap,path:Q.path,parent:Q.parent}}}_parseSync(Q){let $=this._parse(Q);if(N6($))throw Error("Synchronous parse encountered promise.");return $}_parseAsync(Q){let $=this._parse(Q);return Promise.resolve($)}parse(Q,$){let J=this.safeParse(Q,$);if(J.success)return J.data;throw J.error}safeParse(Q,$){let J={common:{issues:[],async:$?.async??!1,contextualErrorMap:$?.errorMap},path:$?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:Q,parsedType:g2(Q)},q=this._parseSync({data:Q,path:J.path,parent:J});return VX(J,q)}"~validate"(Q){let $={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:Q,parsedType:g2(Q)};if(!this["~standard"].async)try{let J=this._parseSync({data:Q,path:[],parent:$});return H1(J)?{value:J.value}:{issues:$.common.issues}}catch(J){if(J?.message?.toLowerCase()?.includes("encountered"))this["~standard"].async=!0;$.common={issues:[],async:!0}}return this._parseAsync({data:Q,path:[],parent:$}).then((J)=>H1(J)?{value:J.value}:{issues:$.common.issues})}async parseAsync(Q,$){let J=await this.safeParseAsync(Q,$);if(J.success)return J.data;throw J.error}async safeParseAsync(Q,$){let J={common:{issues:[],contextualErrorMap:$?.errorMap,async:!0},path:$?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:Q,parsedType:g2(Q)},q=this._parse({data:Q,path:J.path,parent:J}),X=await(N6(q)?q:Promise.resolve(q));return VX(J,X)}refine(Q,$){let J=(q)=>{if(typeof $==="string"||typeof $>"u")return{message:$};else if(typeof $==="function")return $(q);else return $};return this._refinement((q,X)=>{let Y=Q(q),W=()=>X.addIssue({code:r.custom,...J(q)});if(typeof Promise<"u"&&Y instanceof Promise)return Y.then((B)=>{if(!B)return W(),!1;else return!0});if(!Y)return W(),!1;else return!0})}refinement(Q,$){return this._refinement((J,q)=>{if(!Q(J))return q.addIssue(typeof $==="function"?$(J,q):$),!1;else return!0})}_refinement(Q){return new C2({schema:this,typeName:z0.ZodEffects,effect:{type:"refinement",refinement:Q}})}superRefine(Q){return this._refinement(Q)}constructor(Q){this.spa=this.safeParseAsync,this._def=Q,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:($)=>this["~validate"]($)}}optional(){return N2.create(this,this._def)}nullable(){return s2.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return w2.create(this)}promise(){return i1.create(this,this._def)}or(Q){return R6.create([this,Q],this._def)}and(Q){return I6.create(this,Q,this._def)}transform(Q){return new C2({...C0(this._def),schema:this,typeName:z0.ZodEffects,effect:{type:"transform",transform:Q}})}default(Q){let $=typeof Q==="function"?Q:()=>Q;return new Z6({...C0(this._def),innerType:this,defaultValue:$,typeName:z0.ZodDefault})}brand(){return new O5({typeName:z0.ZodBranded,type:this,...C0(this._def)})}catch(Q){let $=typeof Q==="function"?Q:()=>Q;return new k6({...C0(this._def),innerType:this,catchValue:$,typeName:z0.ZodCatch})}describe(Q){return new this.constructor({...this._def,description:Q})}pipe(Q){return C8.create(this,Q)}readonly(){return T6.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}var DM=/^c[^\s-]{8,}$/i,CM=/^[0-9a-z]+$/,OM=/^[0-9A-HJKMNP-TV-Z]{26}$/i,PM=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,AM=/^[a-z0-9_-]{21}$/i,RM=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,IM=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,SM=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,vM="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",x7,EM=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ZM=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,kM=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,TM=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,xM=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,gM=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,HX="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",_M=new RegExp(`^${HX}$`);function jX(Q){let $="[0-5]\\d";if(Q.precision)$=`${$}\\.\\d{${Q.precision}}`;else if(Q.precision==null)$=`${$}(\\.\\d+)?`;let J=Q.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${$})${J}`}function fM(Q){return new RegExp(`^${jX(Q)}$`)}function MX(Q){let $=`${HX}T${jX(Q)}`,J=[];if(J.push(Q.local?"Z?":"Z"),Q.offset)J.push("([+-]\\d{2}:?\\d{2})");return $=`${$}(${J.join("|")})`,new RegExp(`^${$}$`)}function yM(Q,$){if(($==="v4"||!$)&&EM.test(Q))return!0;if(($==="v6"||!$)&&kM.test(Q))return!0;return!1}function hM(Q,$){if(!RM.test(Q))return!1;try{let[J]=Q.split(".");if(!J)return!1;let q=J.replace(/-/g,"+").replace(/_/g,"/").padEnd(J.length+(4-J.length%4)%4,"="),X=JSON.parse(atob(q));if(typeof X!=="object"||X===null)return!1;if("typ"in X&&X?.typ!=="JWT")return!1;if(!X.alg)return!1;if($&&X.alg!==$)return!1;return!0}catch{return!1}}function bM(Q,$){if(($==="v4"||!$)&&ZM.test(Q))return!0;if(($==="v6"||!$)&&TM.test(Q))return!0;return!1}class L2 extends O0{_parse(Q){if(this._def.coerce)Q.data=String(Q.data);if(this._getType(Q)!==$0.string){let X=this._getOrReturnCtx(Q);return Y0(X,{code:r.invalid_type,expected:$0.string,received:X.parsedType}),F0}let J=new u0,q=void 0;for(let X of this._def.checks)if(X.kind==="min"){if(Q.data.length<X.value)q=this._getOrReturnCtx(Q,q),Y0(q,{code:r.too_small,minimum:X.value,type:"string",inclusive:!0,exact:!1,message:X.message}),J.dirty()}else if(X.kind==="max"){if(Q.data.length>X.value)q=this._getOrReturnCtx(Q,q),Y0(q,{code:r.too_big,maximum:X.value,type:"string",inclusive:!0,exact:!1,message:X.message}),J.dirty()}else if(X.kind==="length"){let Y=Q.data.length>X.value,W=Q.data.length<X.value;if(Y||W){if(q=this._getOrReturnCtx(Q,q),Y)Y0(q,{code:r.too_big,maximum:X.value,type:"string",inclusive:!0,exact:!0,message:X.message});else if(W)Y0(q,{code:r.too_small,minimum:X.value,type:"string",inclusive:!0,exact:!0,message:X.message});J.dirty()}}else if(X.kind==="email"){if(!SM.test(Q.data))q=this._getOrReturnCtx(Q,q),Y0(q,{validation:"email",code:r.invalid_string,message:X.message}),J.dirty()}else if(X.kind==="emoji"){if(!x7)x7=new RegExp(vM,"u");if(!x7.test(Q.data))q=this._getOrReturnCtx(Q,q),Y0(q,{validation:"emoji",code:r.invalid_string,message:X.message}),J.dirty()}else if(X.kind==="uuid"){if(!PM.test(Q.data))q=this._getOrReturnCtx(Q,q),Y0(q,{validation:"uuid",code:r.invalid_string,message:X.message}),J.dirty()}else if(X.kind==="nanoid"){if(!AM.test(Q.data))q=this._getOrReturnCtx(Q,q),Y0(q,{validation:"nanoid",code:r.invalid_string,message:X.message}),J.dirty()}else if(X.kind==="cuid"){if(!DM.test(Q.data))q=this._getOrReturnCtx(Q,q),Y0(q,{validation:"cuid",code:r.invalid_string,message:X.message}),J.dirty()}else if(X.kind==="cuid2"){if(!CM.test(Q.data))q=this._getOrReturnCtx(Q,q),Y0(q,{validation:"cuid2",code:r.invalid_string,message:X.message}),J.dirty()}else if(X.kind==="ulid"){if(!OM.test(Q.data))q=this._getOrReturnCtx(Q,q),Y0(q,{validation:"ulid",code:r.invalid_string,message:X.message}),J.dirty()}else if(X.kind==="url")try{new URL(Q.data)}catch{q=this._getOrReturnCtx(Q,q),Y0(q,{validation:"url",code:r.invalid_string,message:X.message}),J.dirty()}else if(X.kind==="regex"){if(X.regex.lastIndex=0,!X.regex.test(Q.data))q=this._getOrReturnCtx(Q,q),Y0(q,{validation:"regex",code:r.invalid_string,message:X.message}),J.dirty()}else if(X.kind==="trim")Q.data=Q.data.trim();else if(X.kind==="includes"){if(!Q.data.includes(X.value,X.position))q=this._getOrReturnCtx(Q,q),Y0(q,{code:r.invalid_string,validation:{includes:X.value,position:X.position},message:X.message}),J.dirty()}else if(X.kind==="toLowerCase")Q.data=Q.data.toLowerCase();else if(X.kind==="toUpperCase")Q.data=Q.data.toUpperCase();else if(X.kind==="startsWith"){if(!Q.data.startsWith(X.value))q=this._getOrReturnCtx(Q,q),Y0(q,{code:r.invalid_string,validation:{startsWith:X.value},message:X.message}),J.dirty()}else if(X.kind==="endsWith"){if(!Q.data.endsWith(X.value))q=this._getOrReturnCtx(Q,q),Y0(q,{code:r.invalid_string,validation:{endsWith:X.value},message:X.message}),J.dirty()}else if(X.kind==="datetime"){if(!MX(X).test(Q.data))q=this._getOrReturnCtx(Q,q),Y0(q,{code:r.invalid_string,validation:"datetime",message:X.message}),J.dirty()}else if(X.kind==="date"){if(!_M.test(Q.data))q=this._getOrReturnCtx(Q,q),Y0(q,{code:r.invalid_string,validation:"date",message:X.message}),J.dirty()}else if(X.kind==="time"){if(!fM(X).test(Q.data))q=this._getOrReturnCtx(Q,q),Y0(q,{code:r.invalid_string,validation:"time",message:X.message}),J.dirty()}else if(X.kind==="duration"){if(!IM.test(Q.data))q=this._getOrReturnCtx(Q,q),Y0(q,{validation:"duration",code:r.invalid_string,message:X.message}),J.dirty()}else if(X.kind==="ip"){if(!yM(Q.data,X.version))q=this._getOrReturnCtx(Q,q),Y0(q,{validation:"ip",code:r.invalid_string,message:X.message}),J.dirty()}else if(X.kind==="jwt"){if(!hM(Q.data,X.alg))q=this._getOrReturnCtx(Q,q),Y0(q,{validation:"jwt",code:r.invalid_string,message:X.message}),J.dirty()}else if(X.kind==="cidr"){if(!bM(Q.data,X.version))q=this._getOrReturnCtx(Q,q),Y0(q,{validation:"cidr",code:r.invalid_string,message:X.message}),J.dirty()}else if(X.kind==="base64"){if(!xM.test(Q.data))q=this._getOrReturnCtx(Q,q),Y0(q,{validation:"base64",code:r.invalid_string,message:X.message}),J.dirty()}else if(X.kind==="base64url"){if(!gM.test(Q.data))q=this._getOrReturnCtx(Q,q),Y0(q,{validation:"base64url",code:r.invalid_string,message:X.message}),J.dirty()}else P0.assertNever(X);return{status:J.value,value:Q.data}}_regex(Q,$,J){return this.refinement((q)=>Q.test(q),{validation:$,code:r.invalid_string,...K0.errToObj(J)})}_addCheck(Q){return new L2({...this._def,checks:[...this._def.checks,Q]})}email(Q){return this._addCheck({kind:"email",...K0.errToObj(Q)})}url(Q){return this._addCheck({kind:"url",...K0.errToObj(Q)})}emoji(Q){return this._addCheck({kind:"emoji",...K0.errToObj(Q)})}uuid(Q){return this._addCheck({kind:"uuid",...K0.errToObj(Q)})}nanoid(Q){return this._addCheck({kind:"nanoid",...K0.errToObj(Q)})}cuid(Q){return this._addCheck({kind:"cuid",...K0.errToObj(Q)})}cuid2(Q){return this._addCheck({kind:"cuid2",...K0.errToObj(Q)})}ulid(Q){return this._addCheck({kind:"ulid",...K0.errToObj(Q)})}base64(Q){return this._addCheck({kind:"base64",...K0.errToObj(Q)})}base64url(Q){return this._addCheck({kind:"base64url",...K0.errToObj(Q)})}jwt(Q){return this._addCheck({kind:"jwt",...K0.errToObj(Q)})}ip(Q){return this._addCheck({kind:"ip",...K0.errToObj(Q)})}cidr(Q){return this._addCheck({kind:"cidr",...K0.errToObj(Q)})}datetime(Q){if(typeof Q==="string")return this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:Q});return this._addCheck({kind:"datetime",precision:typeof Q?.precision>"u"?null:Q?.precision,offset:Q?.offset??!1,local:Q?.local??!1,...K0.errToObj(Q?.message)})}date(Q){return this._addCheck({kind:"date",message:Q})}time(Q){if(typeof Q==="string")return this._addCheck({kind:"time",precision:null,message:Q});return this._addCheck({kind:"time",precision:typeof Q?.precision>"u"?null:Q?.precision,...K0.errToObj(Q?.message)})}duration(Q){return this._addCheck({kind:"duration",...K0.errToObj(Q)})}regex(Q,$){return this._addCheck({kind:"regex",regex:Q,...K0.errToObj($)})}includes(Q,$){return this._addCheck({kind:"includes",value:Q,position:$?.position,...K0.errToObj($?.message)})}startsWith(Q,$){return this._addCheck({kind:"startsWith",value:Q,...K0.errToObj($)})}endsWith(Q,$){return this._addCheck({kind:"endsWith",value:Q,...K0.errToObj($)})}min(Q,$){return this._addCheck({kind:"min",value:Q,...K0.errToObj($)})}max(Q,$){return this._addCheck({kind:"max",value:Q,...K0.errToObj($)})}length(Q,$){return this._addCheck({kind:"length",value:Q,...K0.errToObj($)})}nonempty(Q){return this.min(1,K0.errToObj(Q))}trim(){return new L2({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new L2({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new L2({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find((Q)=>Q.kind==="datetime")}get isDate(){return!!this._def.checks.find((Q)=>Q.kind==="date")}get isTime(){return!!this._def.checks.find((Q)=>Q.kind==="time")}get isDuration(){return!!this._def.checks.find((Q)=>Q.kind==="duration")}get isEmail(){return!!this._def.checks.find((Q)=>Q.kind==="email")}get isURL(){return!!this._def.checks.find((Q)=>Q.kind==="url")}get isEmoji(){return!!this._def.checks.find((Q)=>Q.kind==="emoji")}get isUUID(){return!!this._def.checks.find((Q)=>Q.kind==="uuid")}get isNANOID(){return!!this._def.checks.find((Q)=>Q.kind==="nanoid")}get isCUID(){return!!this._def.checks.find((Q)=>Q.kind==="cuid")}get isCUID2(){return!!this._def.checks.find((Q)=>Q.kind==="cuid2")}get isULID(){return!!this._def.checks.find((Q)=>Q.kind==="ulid")}get isIP(){return!!this._def.checks.find((Q)=>Q.kind==="ip")}get isCIDR(){return!!this._def.checks.find((Q)=>Q.kind==="cidr")}get isBase64(){return!!this._def.checks.find((Q)=>Q.kind==="base64")}get isBase64url(){return!!this._def.checks.find((Q)=>Q.kind==="base64url")}get minLength(){let Q=null;for(let $ of this._def.checks)if($.kind==="min"){if(Q===null||$.value>Q)Q=$.value}return Q}get maxLength(){let Q=null;for(let $ of this._def.checks)if($.kind==="max"){if(Q===null||$.value<Q)Q=$.value}return Q}}L2.create=(Q)=>{return new L2({checks:[],typeName:z0.ZodString,coerce:Q?.coerce??!1,...C0(Q)})};function mM(Q,$){let J=(Q.toString().split(".")[1]||"").length,q=($.toString().split(".")[1]||"").length,X=J>q?J:q,Y=Number.parseInt(Q.toFixed(X).replace(".","")),W=Number.parseInt($.toFixed(X).replace(".",""));return Y%W/10**X}class M1 extends O0{constructor(){super(...arguments);this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(Q){if(this._def.coerce)Q.data=Number(Q.data);if(this._getType(Q)!==$0.number){let X=this._getOrReturnCtx(Q);return Y0(X,{code:r.invalid_type,expected:$0.number,received:X.parsedType}),F0}let J=void 0,q=new u0;for(let X of this._def.checks)if(X.kind==="int"){if(!P0.isInteger(Q.data))J=this._getOrReturnCtx(Q,J),Y0(J,{code:r.invalid_type,expected:"integer",received:"float",message:X.message}),q.dirty()}else if(X.kind==="min"){if(X.inclusive?Q.data<X.value:Q.data<=X.value)J=this._getOrReturnCtx(Q,J),Y0(J,{code:r.too_small,minimum:X.value,type:"number",inclusive:X.inclusive,exact:!1,message:X.message}),q.dirty()}else if(X.kind==="max"){if(X.inclusive?Q.data>X.value:Q.data>=X.value)J=this._getOrReturnCtx(Q,J),Y0(J,{code:r.too_big,maximum:X.value,type:"number",inclusive:X.inclusive,exact:!1,message:X.message}),q.dirty()}else if(X.kind==="multipleOf"){if(mM(Q.data,X.value)!==0)J=this._getOrReturnCtx(Q,J),Y0(J,{code:r.not_multiple_of,multipleOf:X.value,message:X.message}),q.dirty()}else if(X.kind==="finite"){if(!Number.isFinite(Q.data))J=this._getOrReturnCtx(Q,J),Y0(J,{code:r.not_finite,message:X.message}),q.dirty()}else P0.assertNever(X);return{status:q.value,value:Q.data}}gte(Q,$){return this.setLimit("min",Q,!0,K0.toString($))}gt(Q,$){return this.setLimit("min",Q,!1,K0.toString($))}lte(Q,$){return this.setLimit("max",Q,!0,K0.toString($))}lt(Q,$){return this.setLimit("max",Q,!1,K0.toString($))}setLimit(Q,$,J,q){return new M1({...this._def,checks:[...this._def.checks,{kind:Q,value:$,inclusive:J,message:K0.toString(q)}]})}_addCheck(Q){return new M1({...this._def,checks:[...this._def.checks,Q]})}int(Q){return this._addCheck({kind:"int",message:K0.toString(Q)})}positive(Q){return this._addCheck({kind:"min",value:0,inclusive:!1,message:K0.toString(Q)})}negative(Q){return this._addCheck({kind:"max",value:0,inclusive:!1,message:K0.toString(Q)})}nonpositive(Q){return this._addCheck({kind:"max",value:0,inclusive:!0,message:K0.toString(Q)})}nonnegative(Q){return this._addCheck({kind:"min",value:0,inclusive:!0,message:K0.toString(Q)})}multipleOf(Q,$){return this._addCheck({kind:"multipleOf",value:Q,message:K0.toString($)})}finite(Q){return this._addCheck({kind:"finite",message:K0.toString(Q)})}safe(Q){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:K0.toString(Q)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:K0.toString(Q)})}get minValue(){let Q=null;for(let $ of this._def.checks)if($.kind==="min"){if(Q===null||$.value>Q)Q=$.value}return Q}get maxValue(){let Q=null;for(let $ of this._def.checks)if($.kind==="max"){if(Q===null||$.value<Q)Q=$.value}return Q}get isInt(){return!!this._def.checks.find((Q)=>Q.kind==="int"||Q.kind==="multipleOf"&&P0.isInteger(Q.value))}get isFinite(){let Q=null,$=null;for(let J of this._def.checks)if(J.kind==="finite"||J.kind==="int"||J.kind==="multipleOf")return!0;else if(J.kind==="min"){if($===null||J.value>$)$=J.value}else if(J.kind==="max"){if(Q===null||J.value<Q)Q=J.value}return Number.isFinite($)&&Number.isFinite(Q)}}M1.create=(Q)=>{return new M1({checks:[],typeName:z0.ZodNumber,coerce:Q?.coerce||!1,...C0(Q)})};class F1 extends O0{constructor(){super(...arguments);this.min=this.gte,this.max=this.lte}_parse(Q){if(this._def.coerce)try{Q.data=BigInt(Q.data)}catch{return this._getInvalidInput(Q)}if(this._getType(Q)!==$0.bigint)return this._getInvalidInput(Q);let J=void 0,q=new u0;for(let X of this._def.checks)if(X.kind==="min"){if(X.inclusive?Q.data<X.value:Q.data<=X.value)J=this._getOrReturnCtx(Q,J),Y0(J,{code:r.too_small,type:"bigint",minimum:X.value,inclusive:X.inclusive,message:X.message}),q.dirty()}else if(X.kind==="max"){if(X.inclusive?Q.data>X.value:Q.data>=X.value)J=this._getOrReturnCtx(Q,J),Y0(J,{code:r.too_big,type:"bigint",maximum:X.value,inclusive:X.inclusive,message:X.message}),q.dirty()}else if(X.kind==="multipleOf"){if(Q.data%X.value!==BigInt(0))J=this._getOrReturnCtx(Q,J),Y0(J,{code:r.not_multiple_of,multipleOf:X.value,message:X.message}),q.dirty()}else P0.assertNever(X);return{status:q.value,value:Q.data}}_getInvalidInput(Q){let $=this._getOrReturnCtx(Q);return Y0($,{code:r.invalid_type,expected:$0.bigint,received:$.parsedType}),F0}gte(Q,$){return this.setLimit("min",Q,!0,K0.toString($))}gt(Q,$){return this.setLimit("min",Q,!1,K0.toString($))}lte(Q,$){return this.setLimit("max",Q,!0,K0.toString($))}lt(Q,$){return this.setLimit("max",Q,!1,K0.toString($))}setLimit(Q,$,J,q){return new F1({...this._def,checks:[...this._def.checks,{kind:Q,value:$,inclusive:J,message:K0.toString(q)}]})}_addCheck(Q){return new F1({...this._def,checks:[...this._def.checks,Q]})}positive(Q){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:K0.toString(Q)})}negative(Q){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:K0.toString(Q)})}nonpositive(Q){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:K0.toString(Q)})}nonnegative(Q){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:K0.toString(Q)})}multipleOf(Q,$){return this._addCheck({kind:"multipleOf",value:Q,message:K0.toString($)})}get minValue(){let Q=null;for(let $ of this._def.checks)if($.kind==="min"){if(Q===null||$.value>Q)Q=$.value}return Q}get maxValue(){let Q=null;for(let $ of this._def.checks)if($.kind==="max"){if(Q===null||$.value<Q)Q=$.value}return Q}}F1.create=(Q)=>{return new F1({checks:[],typeName:z0.ZodBigInt,coerce:Q?.coerce??!1,...C0(Q)})};class O6 extends O0{_parse(Q){if(this._def.coerce)Q.data=Boolean(Q.data);if(this._getType(Q)!==$0.boolean){let J=this._getOrReturnCtx(Q);return Y0(J,{code:r.invalid_type,expected:$0.boolean,received:J.parsedType}),F0}return d0(Q.data)}}O6.create=(Q)=>{return new O6({typeName:z0.ZodBoolean,coerce:Q?.coerce||!1,...C0(Q)})};class p1 extends O0{_parse(Q){if(this._def.coerce)Q.data=new Date(Q.data);if(this._getType(Q)!==$0.date){let X=this._getOrReturnCtx(Q);return Y0(X,{code:r.invalid_type,expected:$0.date,received:X.parsedType}),F0}if(Number.isNaN(Q.data.getTime())){let X=this._getOrReturnCtx(Q);return Y0(X,{code:r.invalid_date}),F0}let J=new u0,q=void 0;for(let X of this._def.checks)if(X.kind==="min"){if(Q.data.getTime()<X.value)q=this._getOrReturnCtx(Q,q),Y0(q,{code:r.too_small,message:X.message,inclusive:!0,exact:!1,minimum:X.value,type:"date"}),J.dirty()}else if(X.kind==="max"){if(Q.data.getTime()>X.value)q=this._getOrReturnCtx(Q,q),Y0(q,{code:r.too_big,message:X.message,inclusive:!0,exact:!1,maximum:X.value,type:"date"}),J.dirty()}else P0.assertNever(X);return{status:J.value,value:new Date(Q.data.getTime())}}_addCheck(Q){return new p1({...this._def,checks:[...this._def.checks,Q]})}min(Q,$){return this._addCheck({kind:"min",value:Q.getTime(),message:K0.toString($)})}max(Q,$){return this._addCheck({kind:"max",value:Q.getTime(),message:K0.toString($)})}get minDate(){let Q=null;for(let $ of this._def.checks)if($.kind==="min"){if(Q===null||$.value>Q)Q=$.value}return Q!=null?new Date(Q):null}get maxDate(){let Q=null;for(let $ of this._def.checks)if($.kind==="max"){if(Q===null||$.value<Q)Q=$.value}return Q!=null?new Date(Q):null}}p1.create=(Q)=>{return new p1({checks:[],coerce:Q?.coerce||!1,typeName:z0.ZodDate,...C0(Q)})};class z8 extends O0{_parse(Q){if(this._getType(Q)!==$0.symbol){let J=this._getOrReturnCtx(Q);return Y0(J,{code:r.invalid_type,expected:$0.symbol,received:J.parsedType}),F0}return d0(Q.data)}}z8.create=(Q)=>{return new z8({typeName:z0.ZodSymbol,...C0(Q)})};class P6 extends O0{_parse(Q){if(this._getType(Q)!==$0.undefined){let J=this._getOrReturnCtx(Q);return Y0(J,{code:r.invalid_type,expected:$0.undefined,received:J.parsedType}),F0}return d0(Q.data)}}P6.create=(Q)=>{return new P6({typeName:z0.ZodUndefined,...C0(Q)})};class A6 extends O0{_parse(Q){if(this._getType(Q)!==$0.null){let J=this._getOrReturnCtx(Q);return Y0(J,{code:r.invalid_type,expected:$0.null,received:J.parsedType}),F0}return d0(Q.data)}}A6.create=(Q)=>{return new A6({typeName:z0.ZodNull,...C0(Q)})};class l1 extends O0{constructor(){super(...arguments);this._any=!0}_parse(Q){return d0(Q.data)}}l1.create=(Q)=>{return new l1({typeName:z0.ZodAny,...C0(Q)})};class j1 extends O0{constructor(){super(...arguments);this._unknown=!0}_parse(Q){return d0(Q.data)}}j1.create=(Q)=>{return new j1({typeName:z0.ZodUnknown,...C0(Q)})};class _2 extends O0{_parse(Q){let $=this._getOrReturnCtx(Q);return Y0($,{code:r.invalid_type,expected:$0.never,received:$.parsedType}),F0}}_2.create=(Q)=>{return new _2({typeName:z0.ZodNever,...C0(Q)})};class L8 extends O0{_parse(Q){if(this._getType(Q)!==$0.undefined){let J=this._getOrReturnCtx(Q);return Y0(J,{code:r.invalid_type,expected:$0.void,received:J.parsedType}),F0}return d0(Q.data)}}L8.create=(Q)=>{return new L8({typeName:z0.ZodVoid,...C0(Q)})};class w2 extends O0{_parse(Q){let{ctx:$,status:J}=this._processInputParams(Q),q=this._def;if($.parsedType!==$0.array)return Y0($,{code:r.invalid_type,expected:$0.array,received:$.parsedType}),F0;if(q.exactLength!==null){let Y=$.data.length>q.exactLength.value,W=$.data.length<q.exactLength.value;if(Y||W)Y0($,{code:Y?r.too_big:r.too_small,minimum:W?q.exactLength.value:void 0,maximum:Y?q.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:q.exactLength.message}),J.dirty()}if(q.minLength!==null){if($.data.length<q.minLength.value)Y0($,{code:r.too_small,minimum:q.minLength.value,type:"array",inclusive:!0,exact:!1,message:q.minLength.message}),J.dirty()}if(q.maxLength!==null){if($.data.length>q.maxLength.value)Y0($,{code:r.too_big,maximum:q.maxLength.value,type:"array",inclusive:!0,exact:!1,message:q.maxLength.message}),J.dirty()}if($.common.async)return Promise.all([...$.data].map((Y,W)=>{return q.type._parseAsync(new D2($,Y,$.path,W))})).then((Y)=>{return u0.mergeArray(J,Y)});let X=[...$.data].map((Y,W)=>{return q.type._parseSync(new D2($,Y,$.path,W))});return u0.mergeArray(J,X)}get element(){return this._def.type}min(Q,$){return new w2({...this._def,minLength:{value:Q,message:K0.toString($)}})}max(Q,$){return new w2({...this._def,maxLength:{value:Q,message:K0.toString($)}})}length(Q,$){return new w2({...this._def,exactLength:{value:Q,message:K0.toString($)}})}nonempty(Q){return this.min(1,Q)}}w2.create=(Q,$)=>{return new w2({type:Q,minLength:null,maxLength:null,exactLength:null,typeName:z0.ZodArray,...C0($)})};function D6(Q){if(Q instanceof g0){let $={};for(let J in Q.shape){let q=Q.shape[J];$[J]=N2.create(D6(q))}return new g0({...Q._def,shape:()=>$})}else if(Q instanceof w2)return new w2({...Q._def,type:D6(Q.element)});else if(Q instanceof N2)return N2.create(D6(Q.unwrap()));else if(Q instanceof s2)return s2.create(D6(Q.unwrap()));else if(Q instanceof f2)return f2.create(Q.items.map(($)=>D6($)));else return Q}class g0 extends O0{constructor(){super(...arguments);this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let Q=this._def.shape(),$=P0.objectKeys(Q);return this._cached={shape:Q,keys:$},this._cached}_parse(Q){if(this._getType(Q)!==$0.object){let U=this._getOrReturnCtx(Q);return Y0(U,{code:r.invalid_type,expected:$0.object,received:U.parsedType}),F0}let{status:J,ctx:q}=this._processInputParams(Q),{shape:X,keys:Y}=this._getCached(),W=[];if(!(this._def.catchall instanceof _2&&this._def.unknownKeys==="strip")){for(let U in q.data)if(!Y.includes(U))W.push(U)}let B=[];for(let U of Y){let G=X[U],V=q.data[U];B.push({key:{status:"valid",value:U},value:G._parse(new D2(q,V,q.path,U)),alwaysSet:U in q.data})}if(this._def.catchall instanceof _2){let U=this._def.unknownKeys;if(U==="passthrough")for(let G of W)B.push({key:{status:"valid",value:G},value:{status:"valid",value:q.data[G]}});else if(U==="strict"){if(W.length>0)Y0(q,{code:r.unrecognized_keys,keys:W}),J.dirty()}else if(U==="strip");else throw Error("Internal ZodObject error: invalid unknownKeys value.")}else{let U=this._def.catchall;for(let G of W){let V=q.data[G];B.push({key:{status:"valid",value:G},value:U._parse(new D2(q,V,q.path,G)),alwaysSet:G in q.data})}}if(q.common.async)return Promise.resolve().then(async()=>{let U=[];for(let G of B){let V=await G.key,F=await G.value;U.push({key:V,value:F,alwaysSet:G.alwaysSet})}return U}).then((U)=>{return u0.mergeObjectSync(J,U)});else return u0.mergeObjectSync(J,B)}get shape(){return this._def.shape()}strict(Q){return K0.errToObj,new g0({...this._def,unknownKeys:"strict",...Q!==void 0?{errorMap:($,J)=>{let q=this._def.errorMap?.($,J).message??J.defaultError;if($.code==="unrecognized_keys")return{message:K0.errToObj(Q).message??q};return{message:q}}}:{}})}strip(){return new g0({...this._def,unknownKeys:"strip"})}passthrough(){return new g0({...this._def,unknownKeys:"passthrough"})}extend(Q){return new g0({...this._def,shape:()=>({...this._def.shape(),...Q})})}merge(Q){return new g0({unknownKeys:Q._def.unknownKeys,catchall:Q._def.catchall,shape:()=>({...this._def.shape(),...Q._def.shape()}),typeName:z0.ZodObject})}setKey(Q,$){return this.augment({[Q]:$})}catchall(Q){return new g0({...this._def,catchall:Q})}pick(Q){let $={};for(let J of P0.objectKeys(Q))if(Q[J]&&this.shape[J])$[J]=this.shape[J];return new g0({...this._def,shape:()=>$})}omit(Q){let $={};for(let J of P0.objectKeys(this.shape))if(!Q[J])$[J]=this.shape[J];return new g0({...this._def,shape:()=>$})}deepPartial(){return D6(this)}partial(Q){let $={};for(let J of P0.objectKeys(this.shape)){let q=this.shape[J];if(Q&&!Q[J])$[J]=q;else $[J]=q.optional()}return new g0({...this._def,shape:()=>$})}required(Q){let $={};for(let J of P0.objectKeys(this.shape))if(Q&&!Q[J])$[J]=this.shape[J];else{let X=this.shape[J];while(X instanceof N2)X=X._def.innerType;$[J]=X}return new g0({...this._def,shape:()=>$})}keyof(){return FX(P0.objectKeys(this.shape))}}g0.create=(Q,$)=>{return new g0({shape:()=>Q,unknownKeys:"strip",catchall:_2.create(),typeName:z0.ZodObject,...C0($)})};g0.strictCreate=(Q,$)=>{return new g0({shape:()=>Q,unknownKeys:"strict",catchall:_2.create(),typeName:z0.ZodObject,...C0($)})};g0.lazycreate=(Q,$)=>{return new g0({shape:Q,unknownKeys:"strip",catchall:_2.create(),typeName:z0.ZodObject,...C0($)})};class R6 extends O0{_parse(Q){let{ctx:$}=this._processInputParams(Q),J=this._def.options;function q(X){for(let W of X)if(W.result.status==="valid")return W.result;for(let W of X)if(W.result.status==="dirty")return $.common.issues.push(...W.ctx.common.issues),W.result;let Y=X.map((W)=>new e0(W.ctx.common.issues));return Y0($,{code:r.invalid_union,unionErrors:Y}),F0}if($.common.async)return Promise.all(J.map(async(X)=>{let Y={...$,common:{...$.common,issues:[]},parent:null};return{result:await X._parseAsync({data:$.data,path:$.path,parent:Y}),ctx:Y}})).then(q);else{let X=void 0,Y=[];for(let B of J){let U={...$,common:{...$.common,issues:[]},parent:null},G=B._parseSync({data:$.data,path:$.path,parent:U});if(G.status==="valid")return G;else if(G.status==="dirty"&&!X)X={result:G,ctx:U};if(U.common.issues.length)Y.push(U.common.issues)}if(X)return $.common.issues.push(...X.ctx.common.issues),X.result;let W=Y.map((B)=>new e0(B));return Y0($,{code:r.invalid_union,unionErrors:W}),F0}}get options(){return this._def.options}}R6.create=(Q,$)=>{return new R6({options:Q,typeName:z0.ZodUnion,...C0($)})};var a2=(Q)=>{if(Q instanceof S6)return a2(Q.schema);else if(Q instanceof C2)return a2(Q.innerType());else if(Q instanceof v6)return[Q.value];else if(Q instanceof z1)return Q.options;else if(Q instanceof E6)return P0.objectValues(Q.enum);else if(Q instanceof Z6)return a2(Q._def.innerType);else if(Q instanceof P6)return[void 0];else if(Q instanceof A6)return[null];else if(Q instanceof N2)return[void 0,...a2(Q.unwrap())];else if(Q instanceof s2)return[null,...a2(Q.unwrap())];else if(Q instanceof O5)return a2(Q.unwrap());else if(Q instanceof T6)return a2(Q.unwrap());else if(Q instanceof k6)return a2(Q._def.innerType);else return[]};class C5 extends O0{_parse(Q){let{ctx:$}=this._processInputParams(Q);if($.parsedType!==$0.object)return Y0($,{code:r.invalid_type,expected:$0.object,received:$.parsedType}),F0;let J=this.discriminator,q=$.data[J],X=this.optionsMap.get(q);if(!X)return Y0($,{code:r.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[J]}),F0;if($.common.async)return X._parseAsync({data:$.data,path:$.path,parent:$});else return X._parseSync({data:$.data,path:$.path,parent:$})}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(Q,$,J){let q=new Map;for(let X of $){let Y=a2(X.shape[Q]);if(!Y.length)throw Error(`A discriminator value for key \`${Q}\` could not be extracted from all schema options`);for(let W of Y){if(q.has(W))throw Error(`Discriminator property ${String(Q)} has duplicate value ${String(W)}`);q.set(W,X)}}return new C5({typeName:z0.ZodDiscriminatedUnion,discriminator:Q,options:$,optionsMap:q,...C0(J)})}}function g7(Q,$){let J=g2(Q),q=g2($);if(Q===$)return{valid:!0,data:Q};else if(J===$0.object&&q===$0.object){let X=P0.objectKeys($),Y=P0.objectKeys(Q).filter((B)=>X.indexOf(B)!==-1),W={...Q,...$};for(let B of Y){let U=g7(Q[B],$[B]);if(!U.valid)return{valid:!1};W[B]=U.data}return{valid:!0,data:W}}else if(J===$0.array&&q===$0.array){if(Q.length!==$.length)return{valid:!1};let X=[];for(let Y=0;Y<Q.length;Y++){let W=Q[Y],B=$[Y],U=g7(W,B);if(!U.valid)return{valid:!1};X.push(U.data)}return{valid:!0,data:X}}else if(J===$0.date&&q===$0.date&&+Q===+$)return{valid:!0,data:Q};else return{valid:!1}}class I6 extends O0{_parse(Q){let{status:$,ctx:J}=this._processInputParams(Q),q=(X,Y)=>{if(N5(X)||N5(Y))return F0;let W=g7(X.value,Y.value);if(!W.valid)return Y0(J,{code:r.invalid_intersection_types}),F0;if(D5(X)||D5(Y))$.dirty();return{status:$.value,value:W.data}};if(J.common.async)return Promise.all([this._def.left._parseAsync({data:J.data,path:J.path,parent:J}),this._def.right._parseAsync({data:J.data,path:J.path,parent:J})]).then(([X,Y])=>q(X,Y));else return q(this._def.left._parseSync({data:J.data,path:J.path,parent:J}),this._def.right._parseSync({data:J.data,path:J.path,parent:J}))}}I6.create=(Q,$,J)=>{return new I6({left:Q,right:$,typeName:z0.ZodIntersection,...C0(J)})};class f2 extends O0{_parse(Q){let{status:$,ctx:J}=this._processInputParams(Q);if(J.parsedType!==$0.array)return Y0(J,{code:r.invalid_type,expected:$0.array,received:J.parsedType}),F0;if(J.data.length<this._def.items.length)return Y0(J,{code:r.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),F0;if(!this._def.rest&&J.data.length>this._def.items.length)Y0(J,{code:r.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),$.dirty();let X=[...J.data].map((Y,W)=>{let B=this._def.items[W]||this._def.rest;if(!B)return null;return B._parse(new D2(J,Y,J.path,W))}).filter((Y)=>!!Y);if(J.common.async)return Promise.all(X).then((Y)=>{return u0.mergeArray($,Y)});else return u0.mergeArray($,X)}get items(){return this._def.items}rest(Q){return new f2({...this._def,rest:Q})}}f2.create=(Q,$)=>{if(!Array.isArray(Q))throw Error("You must pass an array of schemas to z.tuple([ ... ])");return new f2({items:Q,typeName:z0.ZodTuple,rest:null,...C0($)})};class w8 extends O0{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(Q){let{status:$,ctx:J}=this._processInputParams(Q);if(J.parsedType!==$0.object)return Y0(J,{code:r.invalid_type,expected:$0.object,received:J.parsedType}),F0;let q=[],X=this._def.keyType,Y=this._def.valueType;for(let W in J.data)q.push({key:X._parse(new D2(J,W,J.path,W)),value:Y._parse(new D2(J,J.data[W],J.path,W)),alwaysSet:W in J.data});if(J.common.async)return u0.mergeObjectAsync($,q);else return u0.mergeObjectSync($,q)}get element(){return this._def.valueType}static create(Q,$,J){if($ instanceof O0)return new w8({keyType:Q,valueType:$,typeName:z0.ZodRecord,...C0(J)});return new w8({keyType:L2.create(),valueType:Q,typeName:z0.ZodRecord,...C0($)})}}class N8 extends O0{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(Q){let{status:$,ctx:J}=this._processInputParams(Q);if(J.parsedType!==$0.map)return Y0(J,{code:r.invalid_type,expected:$0.map,received:J.parsedType}),F0;let q=this._def.keyType,X=this._def.valueType,Y=[...J.data.entries()].map(([W,B],U)=>{return{key:q._parse(new D2(J,W,J.path,[U,"key"])),value:X._parse(new D2(J,B,J.path,[U,"value"]))}});if(J.common.async){let W=new Map;return Promise.resolve().then(async()=>{for(let B of Y){let U=await B.key,G=await B.value;if(U.status==="aborted"||G.status==="aborted")return F0;if(U.status==="dirty"||G.status==="dirty")$.dirty();W.set(U.value,G.value)}return{status:$.value,value:W}})}else{let W=new Map;for(let B of Y){let{key:U,value:G}=B;if(U.status==="aborted"||G.status==="aborted")return F0;if(U.status==="dirty"||G.status==="dirty")$.dirty();W.set(U.value,G.value)}return{status:$.value,value:W}}}}N8.create=(Q,$,J)=>{return new N8({valueType:$,keyType:Q,typeName:z0.ZodMap,...C0(J)})};class d1 extends O0{_parse(Q){let{status:$,ctx:J}=this._processInputParams(Q);if(J.parsedType!==$0.set)return Y0(J,{code:r.invalid_type,expected:$0.set,received:J.parsedType}),F0;let q=this._def;if(q.minSize!==null){if(J.data.size<q.minSize.value)Y0(J,{code:r.too_small,minimum:q.minSize.value,type:"set",inclusive:!0,exact:!1,message:q.minSize.message}),$.dirty()}if(q.maxSize!==null){if(J.data.size>q.maxSize.value)Y0(J,{code:r.too_big,maximum:q.maxSize.value,type:"set",inclusive:!0,exact:!1,message:q.maxSize.message}),$.dirty()}let X=this._def.valueType;function Y(B){let U=new Set;for(let G of B){if(G.status==="aborted")return F0;if(G.status==="dirty")$.dirty();U.add(G.value)}return{status:$.value,value:U}}let W=[...J.data.values()].map((B,U)=>X._parse(new D2(J,B,J.path,U)));if(J.common.async)return Promise.all(W).then((B)=>Y(B));else return Y(W)}min(Q,$){return new d1({...this._def,minSize:{value:Q,message:K0.toString($)}})}max(Q,$){return new d1({...this._def,maxSize:{value:Q,message:K0.toString($)}})}size(Q,$){return this.min(Q,$).max(Q,$)}nonempty(Q){return this.min(1,Q)}}d1.create=(Q,$)=>{return new d1({valueType:Q,minSize:null,maxSize:null,typeName:z0.ZodSet,...C0($)})};class C6 extends O0{constructor(){super(...arguments);this.validate=this.implement}_parse(Q){let{ctx:$}=this._processInputParams(Q);if($.parsedType!==$0.function)return Y0($,{code:r.invalid_type,expected:$0.function,received:$.parsedType}),F0;function J(W,B){return F8({data:W,path:$.path,errorMaps:[$.common.contextualErrorMap,$.schemaErrorMap,w6(),r2].filter((U)=>!!U),issueData:{code:r.invalid_arguments,argumentsError:B}})}function q(W,B){return F8({data:W,path:$.path,errorMaps:[$.common.contextualErrorMap,$.schemaErrorMap,w6(),r2].filter((U)=>!!U),issueData:{code:r.invalid_return_type,returnTypeError:B}})}let X={errorMap:$.common.contextualErrorMap},Y=$.data;if(this._def.returns instanceof i1){let W=this;return d0(async function(...B){let U=new e0([]),G=await W._def.args.parseAsync(B,X).catch((M)=>{throw U.addIssue(J(B,M)),U}),V=await Reflect.apply(Y,this,G);return await W._def.returns._def.type.parseAsync(V,X).catch((M)=>{throw U.addIssue(q(V,M)),U})})}else{let W=this;return d0(function(...B){let U=W._def.args.safeParse(B,X);if(!U.success)throw new e0([J(B,U.error)]);let G=Reflect.apply(Y,this,U.data),V=W._def.returns.safeParse(G,X);if(!V.success)throw new e0([q(G,V.error)]);return V.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...Q){return new C6({...this._def,args:f2.create(Q).rest(j1.create())})}returns(Q){return new C6({...this._def,returns:Q})}implement(Q){return this.parse(Q)}strictImplement(Q){return this.parse(Q)}static create(Q,$,J){return new C6({args:Q?Q:f2.create([]).rest(j1.create()),returns:$||j1.create(),typeName:z0.ZodFunction,...C0(J)})}}class S6 extends O0{get schema(){return this._def.getter()}_parse(Q){let{ctx:$}=this._processInputParams(Q);return this._def.getter()._parse({data:$.data,path:$.path,parent:$})}}S6.create=(Q,$)=>{return new S6({getter:Q,typeName:z0.ZodLazy,...C0($)})};class v6 extends O0{_parse(Q){if(Q.data!==this._def.value){let $=this._getOrReturnCtx(Q);return Y0($,{received:$.data,code:r.invalid_literal,expected:this._def.value}),F0}return{status:"valid",value:Q.data}}get value(){return this._def.value}}v6.create=(Q,$)=>{return new v6({value:Q,typeName:z0.ZodLiteral,...C0($)})};function FX(Q,$){return new z1({values:Q,typeName:z0.ZodEnum,...C0($)})}class z1 extends O0{_parse(Q){if(typeof Q.data!=="string"){let $=this._getOrReturnCtx(Q),J=this._def.values;return Y0($,{expected:P0.joinValues(J),received:$.parsedType,code:r.invalid_type}),F0}if(!this._cache)this._cache=new Set(this._def.values);if(!this._cache.has(Q.data)){let $=this._getOrReturnCtx(Q),J=this._def.values;return Y0($,{received:$.data,code:r.invalid_enum_value,options:J}),F0}return d0(Q.data)}get options(){return this._def.values}get enum(){let Q={};for(let $ of this._def.values)Q[$]=$;return Q}get Values(){let Q={};for(let $ of this._def.values)Q[$]=$;return Q}get Enum(){let Q={};for(let $ of this._def.values)Q[$]=$;return Q}extract(Q,$=this._def){return z1.create(Q,{...this._def,...$})}exclude(Q,$=this._def){return z1.create(this.options.filter((J)=>!Q.includes(J)),{...this._def,...$})}}z1.create=FX;class E6 extends O0{_parse(Q){let $=P0.getValidEnumValues(this._def.values),J=this._getOrReturnCtx(Q);if(J.parsedType!==$0.string&&J.parsedType!==$0.number){let q=P0.objectValues($);return Y0(J,{expected:P0.joinValues(q),received:J.parsedType,code:r.invalid_type}),F0}if(!this._cache)this._cache=new Set(P0.getValidEnumValues(this._def.values));if(!this._cache.has(Q.data)){let q=P0.objectValues($);return Y0(J,{received:J.data,code:r.invalid_enum_value,options:q}),F0}return d0(Q.data)}get enum(){return this._def.values}}E6.create=(Q,$)=>{return new E6({values:Q,typeName:z0.ZodNativeEnum,...C0($)})};class i1 extends O0{unwrap(){return this._def.type}_parse(Q){let{ctx:$}=this._processInputParams(Q);if($.parsedType!==$0.promise&&$.common.async===!1)return Y0($,{code:r.invalid_type,expected:$0.promise,received:$.parsedType}),F0;let J=$.parsedType===$0.promise?$.data:Promise.resolve($.data);return d0(J.then((q)=>{return this._def.type.parseAsync(q,{path:$.path,errorMap:$.common.contextualErrorMap})}))}}i1.create=(Q,$)=>{return new i1({type:Q,typeName:z0.ZodPromise,...C0($)})};class C2 extends O0{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===z0.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(Q){let{status:$,ctx:J}=this._processInputParams(Q),q=this._def.effect||null,X={addIssue:(Y)=>{if(Y0(J,Y),Y.fatal)$.abort();else $.dirty()},get path(){return J.path}};if(X.addIssue=X.addIssue.bind(X),q.type==="preprocess"){let Y=q.transform(J.data,X);if(J.common.async)return Promise.resolve(Y).then(async(W)=>{if($.value==="aborted")return F0;let B=await this._def.schema._parseAsync({data:W,path:J.path,parent:J});if(B.status==="aborted")return F0;if(B.status==="dirty")return c1(B.value);if($.value==="dirty")return c1(B.value);return B});else{if($.value==="aborted")return F0;let W=this._def.schema._parseSync({data:Y,path:J.path,parent:J});if(W.status==="aborted")return F0;if(W.status==="dirty")return c1(W.value);if($.value==="dirty")return c1(W.value);return W}}if(q.type==="refinement"){let Y=(W)=>{let B=q.refinement(W,X);if(J.common.async)return Promise.resolve(B);if(B instanceof Promise)throw Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return W};if(J.common.async===!1){let W=this._def.schema._parseSync({data:J.data,path:J.path,parent:J});if(W.status==="aborted")return F0;if(W.status==="dirty")$.dirty();return Y(W.value),{status:$.value,value:W.value}}else return this._def.schema._parseAsync({data:J.data,path:J.path,parent:J}).then((W)=>{if(W.status==="aborted")return F0;if(W.status==="dirty")$.dirty();return Y(W.value).then(()=>{return{status:$.value,value:W.value}})})}if(q.type==="transform")if(J.common.async===!1){let Y=this._def.schema._parseSync({data:J.data,path:J.path,parent:J});if(!H1(Y))return F0;let W=q.transform(Y.value,X);if(W instanceof Promise)throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:$.value,value:W}}else return this._def.schema._parseAsync({data:J.data,path:J.path,parent:J}).then((Y)=>{if(!H1(Y))return F0;return Promise.resolve(q.transform(Y.value,X)).then((W)=>({status:$.value,value:W}))});P0.assertNever(q)}}C2.create=(Q,$,J)=>{return new C2({schema:Q,typeName:z0.ZodEffects,effect:$,...C0(J)})};C2.createWithPreprocess=(Q,$,J)=>{return new C2({schema:$,effect:{type:"preprocess",transform:Q},typeName:z0.ZodEffects,...C0(J)})};class N2 extends O0{_parse(Q){if(this._getType(Q)===$0.undefined)return d0(void 0);return this._def.innerType._parse(Q)}unwrap(){return this._def.innerType}}N2.create=(Q,$)=>{return new N2({innerType:Q,typeName:z0.ZodOptional,...C0($)})};class s2 extends O0{_parse(Q){if(this._getType(Q)===$0.null)return d0(null);return this._def.innerType._parse(Q)}unwrap(){return this._def.innerType}}s2.create=(Q,$)=>{return new s2({innerType:Q,typeName:z0.ZodNullable,...C0($)})};class Z6 extends O0{_parse(Q){let{ctx:$}=this._processInputParams(Q),J=$.data;if($.parsedType===$0.undefined)J=this._def.defaultValue();return this._def.innerType._parse({data:J,path:$.path,parent:$})}removeDefault(){return this._def.innerType}}Z6.create=(Q,$)=>{return new Z6({innerType:Q,typeName:z0.ZodDefault,defaultValue:typeof $.default==="function"?$.default:()=>$.default,...C0($)})};class k6 extends O0{_parse(Q){let{ctx:$}=this._processInputParams(Q),J={...$,common:{...$.common,issues:[]}},q=this._def.innerType._parse({data:J.data,path:J.path,parent:{...J}});if(N6(q))return q.then((X)=>{return{status:"valid",value:X.status==="valid"?X.value:this._def.catchValue({get error(){return new e0(J.common.issues)},input:J.data})}});else return{status:"valid",value:q.status==="valid"?q.value:this._def.catchValue({get error(){return new e0(J.common.issues)},input:J.data})}}removeCatch(){return this._def.innerType}}k6.create=(Q,$)=>{return new k6({innerType:Q,typeName:z0.ZodCatch,catchValue:typeof $.catch==="function"?$.catch:()=>$.catch,...C0($)})};class D8 extends O0{_parse(Q){if(this._getType(Q)!==$0.nan){let J=this._getOrReturnCtx(Q);return Y0(J,{code:r.invalid_type,expected:$0.nan,received:J.parsedType}),F0}return{status:"valid",value:Q.data}}}D8.create=(Q)=>{return new D8({typeName:z0.ZodNaN,...C0(Q)})};var uM=Symbol("zod_brand");class O5 extends O0{_parse(Q){let{ctx:$}=this._processInputParams(Q),J=$.data;return this._def.type._parse({data:J,path:$.path,parent:$})}unwrap(){return this._def.type}}class C8 extends O0{_parse(Q){let{status:$,ctx:J}=this._processInputParams(Q);if(J.common.async)return(async()=>{let X=await this._def.in._parseAsync({data:J.data,path:J.path,parent:J});if(X.status==="aborted")return F0;if(X.status==="dirty")return $.dirty(),c1(X.value);else return this._def.out._parseAsync({data:X.value,path:J.path,parent:J})})();else{let q=this._def.in._parseSync({data:J.data,path:J.path,parent:J});if(q.status==="aborted")return F0;if(q.status==="dirty")return $.dirty(),{status:"dirty",value:q.value};else return this._def.out._parseSync({data:q.value,path:J.path,parent:J})}}static create(Q,$){return new C8({in:Q,out:$,typeName:z0.ZodPipeline})}}class T6 extends O0{_parse(Q){let $=this._def.innerType._parse(Q),J=(q)=>{if(H1(q))q.value=Object.freeze(q.value);return q};return N6($)?$.then((q)=>J(q)):J($)}unwrap(){return this._def.innerType}}T6.create=(Q,$)=>{return new T6({innerType:Q,typeName:z0.ZodReadonly,...C0($)})};function KX(Q,$){let J=typeof Q==="function"?Q($):typeof Q==="string"?{message:Q}:Q;return typeof J==="string"?{message:J}:J}function zX(Q,$={},J){if(Q)return l1.create().superRefine((q,X)=>{let Y=Q(q);if(Y instanceof Promise)return Y.then((W)=>{if(!W){let B=KX($,q),U=B.fatal??J??!0;X.addIssue({code:"custom",...B,fatal:U})}});if(!Y){let W=KX($,q),B=W.fatal??J??!0;X.addIssue({code:"custom",...W,fatal:B})}return});return l1.create()}var cM={object:g0.lazycreate},z0;(function(Q){Q.ZodString="ZodString",Q.ZodNumber="ZodNumber",Q.ZodNaN="ZodNaN",Q.ZodBigInt="ZodBigInt",Q.ZodBoolean="ZodBoolean",Q.ZodDate="ZodDate",Q.ZodSymbol="ZodSymbol",Q.ZodUndefined="ZodUndefined",Q.ZodNull="ZodNull",Q.ZodAny="ZodAny",Q.ZodUnknown="ZodUnknown",Q.ZodNever="ZodNever",Q.ZodVoid="ZodVoid",Q.ZodArray="ZodArray",Q.ZodObject="ZodObject",Q.ZodUnion="ZodUnion",Q.ZodDiscriminatedUnion="ZodDiscriminatedUnion",Q.ZodIntersection="ZodIntersection",Q.ZodTuple="ZodTuple",Q.ZodRecord="ZodRecord",Q.ZodMap="ZodMap",Q.ZodSet="ZodSet",Q.ZodFunction="ZodFunction",Q.ZodLazy="ZodLazy",Q.ZodLiteral="ZodLiteral",Q.ZodEnum="ZodEnum",Q.ZodEffects="ZodEffects",Q.ZodNativeEnum="ZodNativeEnum",Q.ZodOptional="ZodOptional",Q.ZodNullable="ZodNullable",Q.ZodDefault="ZodDefault",Q.ZodCatch="ZodCatch",Q.ZodPromise="ZodPromise",Q.ZodBranded="ZodBranded",Q.ZodPipeline="ZodPipeline",Q.ZodReadonly="ZodReadonly"})(z0||(z0={}));var pM=(Q,$={message:`Input not instance of ${Q.name}`})=>zX((J)=>J instanceof Q,$),LX=L2.create,wX=M1.create,lM=D8.create,dM=F1.create,NX=O6.create,iM=p1.create,nM=z8.create,oM=P6.create,rM=A6.create,aM=l1.create,sM=j1.create,tM=_2.create,eM=L8.create,QF=w2.create,$F=g0.create,JF=g0.strictCreate,qF=R6.create,XF=C5.create,YF=I6.create,WF=f2.create,BF=w8.create,UF=N8.create,GF=d1.create,VF=C6.create,KF=S6.create,HF=v6.create,jF=z1.create,MF=E6.create,FF=i1.create,zF=C2.create,LF=N2.create,wF=s2.create,NF=C2.createWithPreprocess,DF=C8.create,CF=()=>LX().optional(),OF=()=>wX().optional(),PF=()=>NX().optional(),AF={string:(Q)=>L2.create({...Q,coerce:!0}),number:(Q)=>M1.create({...Q,coerce:!0}),boolean:(Q)=>O6.create({...Q,coerce:!0}),bigint:(Q)=>F1.create({...Q,coerce:!0}),date:(Q)=>p1.create({...Q,coerce:!0})};var RF=F0;class O2 extends Error{field;regex;constructor(Q,$,J){super(J);this.field=Q,this.regex=$}}class O8 extends Error{hash;constructor(Q){super(`'${Q}' not found in the root hash`);this.hash=Q}}class _7 extends Map{#$;#Q=0;constructor(Q,$=[]){super();this.#$=Q;for(let[J,q]of $)this.set(J,q)}get(Q){let $=super.get(Q);if($!==void 0)super.delete(Q),super.set(Q,$);return $}set(Q,$){let J=super.get(Q);if(J===void 0)this.#Q+=Q.length;else if(J!==null)this.#Q-=J.length;if($!==null)this.#Q+=$.length;super.delete(Q);let q;while(this.#Q>this.#$&&(q=this.entries().next().value)){let[X,Y]=q;if(super.delete(X),this.#Q-=X.length,Y!==null)this.#Q-=Y.length}return super.set(Q,$),this}delete(Q){let $=super.get(Q);if($===void 0)return!1;if(super.delete(Q),$!==null)this.#Q-=$.length;return this.#Q-=Q.length,!0}clear(){super.clear(),this.#Q=0}}var HP=y6(pW(),1),jP=y6(DB(),1),MP=y6(OB(),1),gB=y6(AB(),1);var cw={0:"brush",12:"brush",1:"pencil",14:"pencil",2:"ballpoint",15:"ballpoint",3:"marker",16:"marker",4:"fineliner",17:"fineliner",5:"highlighter",18:"highlighter",6:"eraser",7:"mechanicalPencil",13:"mechanicalPencil",8:"eraseArea",21:"calligraphy",23:"shader"};function pw(Q){return cw[Q]}var lw={0:"black",1:"gray",2:"white"},D1=43,c5="reMarkable .lines file, version=";function RB(Q,$){let J=new DataView(Q.buffer,Q.byteOffset,Q.byteLength),q=D1,X=()=>{let U=J.getInt32(q,!0);return q+=4,U},Y=()=>{let U=J.getFloat32(q,!0);return q+=4,U},W=X(),B=[];for(let U=0;U<W;U++){let G=X(),V=[];for(let F=0;F<G;F++){let M=X(),H=X(),_=X(),T=Y(),C=$===5?X():void 0,O=X(),K=Array(O);for(let w=0;w<O;w++)K[w]={x:Y(),y:Y(),speed:Y(),direction:Y(),width:Y(),pressure:Y()};let L={brushType:M,color:H,padding:_,brushBaseSize:T,points:K};if(C!==void 0)L.unknown=C;V.push(L)}B.push({lines:V})}return{version:$,layers:B}}function IB(Q){let{version:$}=Q;if($!==3&&$!==5)throw Error(`rendering version ${$} .lines files is not supported (only 3 and 5)`);let J=$===5?24:20,q=D1+4;for(let V of Q.layers){q+=4;for(let F of V.lines)q+=J+F.points.length*24}let X=new Uint8Array(q),Y=new DataView(X.buffer),W=`${c5}${$}`.padEnd(D1," ");for(let V=0;V<D1;V++)X[V]=W.charCodeAt(V);let B=D1,U=(V)=>{Y.setInt32(B,V,!0),B+=4},G=(V)=>{Y.setFloat32(B,V,!0),B+=4};U(Q.layers.length);for(let V of Q.layers){U(V.lines.length);for(let F of V.lines){if(U(F.brushType),U(F.color),U(F.padding??0),G(F.brushBaseSize),$===5)U(F.unknown??0);U(F.points.length);for(let M of F.points)G(M.x),G(M.y),G(M.speed),G(M.direction),G(M.width),G(M.pressure)}}return X}var SQ={authorId:0,counter:1},EQ={authorId:0,counter:0};function i0(Q){return`${Q.authorId}:${Q.counter}`}var SB=43,dw="reMarkable .lines file, version=6",vB=1,C1=4,iw=8,o1=12,vQ=15;class ZB{#$;#Q;#Y;#J=[];constructor(Q,$){this.#$=new DataView(Q.buffer,Q.byteOffset,Q.byteLength),this.#Q=$,this.#Y=Q.byteLength}get offset(){return this.#Q}get atFileEnd(){return this.#Q>=this.#Y}#q(){return this.#J.length>0?this.#J[this.#J.length-1]:this.#Y}bytesRemaining(){return this.#q()-this.#Q}u8(){let Q=this.#$.getUint8(this.#Q);return this.#Q+=1,Q}u16(){let Q=this.#$.getUint16(this.#Q,!0);return this.#Q+=2,Q}u32(){let Q=this.#$.getUint32(this.#Q,!0);return this.#Q+=4,Q}f32(){let Q=this.#$.getFloat32(this.#Q,!0);return this.#Q+=4,Q}f64(){let Q=this.#$.getFloat64(this.#Q,!0);return this.#Q+=8,Q}varuint(){let Q=0,$=0,J;do J=this.u8(),Q+=(J&127)*2**$,$+=7;while(J&128);return Q}crdtId(){return{authorId:this.u8(),counter:this.varuint()}}bytes(Q){let $=this.#$.byteOffset+this.#Q,J=new Uint8Array(this.#$.buffer,$,Q);return this.#Q+=Q,J.slice()}peekTag(){if(this.#Q>=this.#q())return;let Q=this.#Q,$=this.varuint();return this.#Q=Q,[Math.floor($/16),$%16]}hasTag(Q,$){let J=this.peekTag();return J!==void 0&&J[0]===Q&&J[1]===$}#X(Q,$){let J=this.varuint();if(Math.floor(J/16)!==Q||J%16!==$)throw Error(`unexpected v6 tag ${J} (wanted ${Q}/${$})`)}readInt(Q){return this.#X(Q,C1),this.u32()}readFloat(Q){return this.#X(Q,C1),this.f32()}readDouble(Q){return this.#X(Q,iw),this.f64()}readId(Q){return this.#X(Q,vQ),this.crdtId()}readBool(Q){return this.#X(Q,vB),this.u8()!==0}readByte(Q){return this.#X(Q,vB),this.u8()}subblock(Q,$){this.#X(Q,o1);let J=this.u32(),q=this.#Q+J;this.#J.push(q);try{return $()}finally{this.#J.pop(),this.#Q=q}}seek(Q){this.#Q=Q}bounded(Q,$){this.#J.push(Q);try{let J=$();if(this.#Q>Q)throw Error("block body overran its declared length");return[J,this.bytes(Q-this.#Q)]}finally{this.#J.pop(),this.#Q=Q}}readLww(Q,$){return this.subblock(Q,()=>{let J=this.readId(1),q=$();return{timestamp:J,value:q}})}readString(Q){return this.subblock(Q,()=>{let $=this.varuint();return this.u8(),new TextDecoder().decode(this.bytes($))})}readStringWithFormat(Q){return this.subblock(Q,()=>{let $=this.varuint();this.u8();let J=new TextDecoder().decode(this.bytes($));if(this.hasTag(2,C1))return this.readInt(2);else return J})}}function I8(Q,$){let J=Q.readId(1),q=Q.readId(2),X=Q.readId(3),Y=Q.readId(4),W=Q.readInt(5),B;if(Q.hasTag(6,o1))B=Q.subblock(6,()=>{let U=Q.u8();return $(U)});return{parentId:J,item:{itemId:q,leftId:X,rightId:Y,deletedLength:W,value:B}}}function nw(Q,$){let J=Q.readInt(1),q=Q.readInt(2),X=Q.readDouble(3),Y=Q.readFloat(4),W=Q.subblock(5,()=>{let U=$===1?24:14,G=Q.bytesRemaining(),V=Math.floor(G/U),F=Array(V);for(let M=0;M<V;M++){let H=Q.f32(),_=Q.f32();if($===1)F[M]={x:H,y:_,speed:Q.f32()*4,direction:Q.f32()*255/(2*Math.PI),width:Math.round(Q.f32()*4),pressure:Q.f32()*255};else{let T=Q.u16(),C=Q.u16(),O=Q.u8(),K=Q.u8();F[M]={x:H,y:_,speed:T,width:C,direction:O,pressure:K}}}return F}),B={tool:J,color:q,thicknessScale:X,startingLength:Y,points:W};if(Q.hasTag(6,vQ))Q.readId(6);if(Q.hasTag(7,vQ))Q.readId(7);if(Q.hasTag(8,C1))B.colorRgba=Q.readInt(8);return B}function ow(Q){let $=Q.hasTag(2,C1)?Q.readInt(2):void 0,J=Q.hasTag(3,C1)?Q.readInt(3):void 0,q=Q.readInt(4),X=Q.readString(5),Y=Q.subblock(6,()=>{let B=Q.varuint(),U=Array(B);for(let G=0;G<B;G++)U[G]={x:Q.f64(),y:Q.f64(),w:Q.f64(),h:Q.f64()};return U}),W={length:J??X.length,color:q,text:X,rectangles:Y};if($!==void 0)W.start=$;if(Q.hasTag(10,C1))W.colorRgba=Q.readInt(10);return W}function rw(Q){let $=[],J=new Map;Q.subblock(2,()=>{Q.subblock(1,()=>{Q.subblock(1,()=>{let W=Q.varuint();for(let B=0;B<W;B++)$.push(Q.subblock(0,()=>{let U=Q.readId(2),G=Q.readId(3),V=Q.readId(4),F=Q.readInt(5),M=Q.hasTag(6,o1)?Q.readStringWithFormat(6):"";return{itemId:U,leftId:G,rightId:V,deletedLength:F,value:M}}))})}),Q.subblock(2,()=>{Q.subblock(1,()=>{let W=Q.varuint();for(let B=0;B<W;B++){let U=Q.crdtId(),G=Q.readId(1),V=Q.subblock(2,()=>{return Q.u8(),Q.u8()});J.set(i0(U),{timestamp:G,value:V})}})})});let[q,X]=Q.subblock(3,()=>[Q.f64(),Q.f64()]),Y=Q.readFloat(4);return{items:$,styles:J,posX:q,posY:X,width:Y}}function aw(Q,$,J){switch($){case 0:return{type:"migrationInfo",migrationId:Q.readId(1),isDevice:Q.readBool(2)};case 1:return{type:"sceneTree",treeId:Q.readId(1),nodeId:Q.readId(2),isUpdate:Q.readBool(3),parentId:Q.subblock(4,()=>Q.readId(1))};case 2:{let q=Q.readId(1),X=Q.readLww(2,()=>Q.readString(2)),Y=Q.readLww(3,()=>Q.readBool(2)),W={type:"treeNode",nodeId:q,label:X,visible:Y};if(Q.bytesRemaining()>0&&Q.hasTag(7,o1))W.anchorId=Q.readLww(7,()=>Q.readId(2)),W.anchorType=Q.readLww(8,()=>Q.readByte(2)),W.anchorThreshold=Q.readLww(9,()=>Q.readFloat(2)),W.anchorOriginX=Q.readLww(10,()=>Q.readFloat(2));return W}case 3:return{type:"sceneGlyphItem",...I8(Q,(q)=>q===1?ow(Q):void 0)};case 4:return{type:"sceneGroupItem",...I8(Q,(q)=>q===2?Q.readId(2):void 0)};case 5:return{type:"sceneLineItem",...I8(Q,(q)=>q===3?nw(Q,J):void 0)};case 6:return{type:"sceneTextItem",...I8(Q,()=>{return})};case 7:return{type:"rootText",blockId:Q.readId(1),text:rw(Q)};case 8:return{type:"sceneTombstone",...I8(Q,()=>{return})};case 9:{let q=new Map,X=Q.varuint();for(let Y=0;Y<X;Y++)Q.subblock(0,()=>{let W=Q.varuint(),B=Q.bytes(W),U=Q.u16();q.set(U,sw(B))});return{type:"authorIds",authors:q}}case 10:return{type:"pageInfo",loadsCount:Q.readInt(1),mergesCount:Q.readInt(2),textCharsCount:Q.readInt(3),textLinesCount:Q.readInt(4),typeFolioUseCount:Q.hasTag(5,C1)?Q.readInt(5):0};case 13:{let q={type:"sceneInfo",currentLayer:Q.readLww(1,()=>Q.readId(2))};if(Q.hasTag(2,o1))q.backgroundVisible=Q.readLww(2,()=>Q.readBool(2));if(Q.hasTag(3,o1))q.rootDocumentVisible=Q.readLww(3,()=>Q.readBool(2));if(Q.hasTag(5,o1))q.paperSize=Q.subblock(5,()=>[Q.u32(),Q.u32()]);return q}default:throw Error(`unknown v6 block type 0x${$.toString(16)}`)}}function sw(Q){let $=[...Q],q=[$[3],$[2],$[1],$[0],$[5],$[4],$[7],$[6],$[8],$[9],$[10],$[11],$[12],$[13],$[14],$[15]].map((X)=>(X??0).toString(16).padStart(2,"0"));return`${q.slice(0,4).join("")}-${q.slice(4,6).join("")}-${q.slice(6,8).join("")}-${q.slice(8,10).join("")}-${q.slice(10,16).join("")}`}function tw(Q){let $=new TextDecoder().decode(Q.subarray(0,SB));if(!$.startsWith(dw))throw Error(`not a version 6 .lines file: ${JSON.stringify($)}`);let J=new ZB(Q,SB),q=[];while(!J.atFileEnd){if(J.bytesRemaining()<8)break;let X=J.u32();J.u8();let Y=J.u8(),W=J.u8(),B=J.u8(),U=J.offset,G=U+X,V;try{let[F,M]=J.bounded(G,()=>aw(J,B,W));V={...F,minVersion:Y,currentVersion:W,extraData:M}}catch{J.seek(U),V={type:"unknown",blockType:B,data:J.bytes(X),minVersion:Y,currentVersion:W,extraData:new Uint8Array}}J.seek(G),q.push(V)}return q}function ew(Q,$){let[J,q]=Q,[X,Y]=$;return J-X||q-Y}function EB(Q){if(Q.length<=1)return[...Q];let $="\x00start",J="\x00end",q=new Set(Q.map((H)=>i0(H.itemId))),X=new Map([[$,[]],[J,[]]]),Y=new Map([[$,0],[J,0]]);for(let H of Q)X.set(i0(H.itemId),[]),Y.set(i0(H.itemId),0);let W=(H,_)=>{let T=i0(H);return T===i0(EQ)||!q.has(T)?_:T},B=(H,_)=>{X.get(H).push(_),Y.set(_,(Y.get(_)??0)+1)};for(let H of Q)B(W(H.leftId,$),i0(H.itemId)),B(i0(H.itemId),W(H.rightId,J));let U=new Map(Q.map((H)=>[i0(H.itemId),H])),G=(H)=>{if(H===$)return[-1/0,-1/0];if(H===J)return[1/0,1/0];let _=U.get(H);return[-_.itemId.authorId,_.itemId.counter]},V=new Set;for(let[H,_]of Y)if(_===0)V.add(H);let F=[],M=new Set;while(V.size>0){let H;for(let T of V)if(H===void 0||ew(G(T),G(H))<0)H=T;V.delete(H),M.add(H);let _=U.get(H);if(_)F.push(_);for(let T of X.get(H)??[])if(Y.set(T,Y.get(T)-1),Y.get(T)===0)V.add(T)}if(F.length<Q.length){for(let H of Q)if(!M.has(i0(H.itemId)))F.push(H)}return F}class kB{version=6;blocks;authors;paperSize;#$=new Map;#Q;constructor(Q){this.blocks=Q,this.authors=new Map;let $=(J)=>{let q=this.#$.get(i0(J));if(q===void 0)q={id:J,parentId:EQ,children:[]},this.#$.set(i0(J),q);return q};$(SQ);for(let J of Q)if(J.type==="sceneTree")$(J.treeId).parentId=J.parentId;else if(J.type==="treeNode"){let q=$(J.nodeId);q.label=J.label.value,q.visible=J.visible.value}else if(J.type==="sceneGroupItem"&&J.item.value)$(J.parentId).children.push({...J.item,value:{kind:"group",id:J.item.value}});else if(J.type==="sceneLineItem"&&J.item.value)$(J.parentId).children.push({...J.item,value:{kind:"line",line:J.item.value}});else if(J.type==="sceneGlyphItem"&&J.item.value)$(J.parentId).children.push({...J.item,value:{kind:"glyph",glyph:J.item.value}});else if(J.type==="rootText")this.#Q=J.text;else if(J.type==="authorIds")for(let[q,X]of J.authors)this.authors.set(q,X);else if(J.type==="sceneInfo"&&J.paperSize)this.paperSize=J.paperSize}#Y(Q){let $=[];for(let q of EB(Q.children))if(q.value.kind==="group"){let X=this.#$.get(i0(q.value.id));if(X)$.push({kind:"layer",layer:this.#Y(X)})}else if(q.value.kind==="line")$.push({kind:"line",line:q.value.line});else $.push({kind:"glyph",glyph:q.value.glyph});let J={id:Q.id,items:$};if(Q.label!==void 0)J.label=Q.label;if(Q.visible!==void 0)J.visible=Q.visible;return J}layers(){let Q=this.#$.get(i0(SQ));if(Q===void 0)return[];let $=[];for(let J of EB(Q.children))if(J.value.kind==="group"){let q=this.#$.get(i0(J.value.id));if(q)$.push(this.#Y(q))}return $}strokes(){let Q=[],$=(J)=>{for(let q of J.items)if(q.kind==="line")Q.push(q.line);else if(q.kind==="layer")$(q.layer)};for(let J of this.layers())$(J);return Q}text(){return this.#Q}}function ZQ(Q){return new kB(tw(Q))}function TB(Q){let $=Q.reduce((X,Y)=>X+Y.length,0),J=new Uint8Array($),q=0;for(let X of Q)J.set(X,q),q+=X.length;return J}var p5=/^[0-9a-f]{64}$/;function QN(Q){if(Q.length<D1)throw Error("data is too short to be a reMarkable .lines file");let $=new TextDecoder().decode(Q.subarray(0,D1));if(!$.startsWith(c5))throw Error(`unrecognized .lines header: ${JSON.stringify($)}`);let J=$.charAt(c5.length);if(J==="6")return ZQ(Q);else if(J==="3"||J==="5")return RB(Q,J==="3"?3:5);else throw Error(`unsupported .lines version '${J}'`)}var _B=g.object({name:g.string(),timestamp:g.number()}).passthrough(),$N=g.object({name:g.string(),pageId:g.string(),timestamp:g.number()}).passthrough(),JN=g.object({authors:g.array(g.string()).optional(),title:g.string().optional(),publicationDate:g.string().optional(),publisher:g.string().optional()}).passthrough(),qN=g.object({id:g.string(),idx:g.object({timestamp:g.string(),value:g.string()}).passthrough(),template:g.object({timestamp:g.string(),value:g.string()}).passthrough().optional(),redir:g.object({timestamp:g.string(),value:g.number().int()}).passthrough().optional(),scrollTime:g.object({timestamp:g.string(),value:g.string().datetime({offset:!0})}).passthrough().optional(),verticalScroll:g.object({timestamp:g.string(),value:g.number()}).passthrough().optional(),deleted:g.object({timestamp:g.string(),value:g.number().int()}).passthrough().optional(),modifed:g.string().optional()}).passthrough(),XN=g.object({lastOpened:g.object({timestamp:g.string(),value:g.string()}).passthrough(),original:g.object({timestamp:g.string(),value:g.number().int()}).passthrough(),pages:g.array(qN),uuids:g.array(g.object({first:g.string(),second:g.number().int().nonnegative()}).passthrough()).nullable()}).passthrough(),YN=g.object({tags:g.array(_B).optional()}).strict(),WN=g.object({tags:g.array(g.string()).optional()}).strict(),BN={coverPageNumber:g.number().int(),documentMetadata:JN,extraMetadata:g.record(g.string(),g.string()),fileType:g.enum(["epub","notebook","pdf"]),fontName:g.string(),lineHeight:g.number().int(),orientation:g.enum(["portrait","landscape"]),pageCount:g.number().int().nonnegative(),textAlignment:g.enum(["","justify","left"]),textScale:g.number()},UN={cPages:XN.optional(),customZoomCenterX:g.number().optional(),customZoomCenterY:g.number().optional(),customZoomOrientation:g.enum(["portrait","landscape"]).optional(),customZoomPageHeight:g.number().optional(),customZoomPageWidth:g.number().optional(),customZoomScale:g.number().optional(),dummyDocument:g.boolean().optional(),formatVersion:g.number().int().nonnegative().optional(),keyboardMetadata:g.object({count:g.number().int().nonnegative(),timestamp:g.number()}).passthrough().optional(),lastOpenedPage:g.number().int().optional(),margins:g.number().int().nonnegative().optional(),originalPageCount:g.number().int().optional(),pages:g.array(g.string()).nullable().optional(),pageTags:g.array($N).optional(),redirectionPageMap:g.array(g.number().int()).optional(),sizeInBytes:g.string().optional(),transform:g.object({m11:g.number().optional(),m12:g.number().optional(),m13:g.number().optional(),m21:g.number().optional(),m22:g.number().optional(),m23:g.number().optional(),m31:g.number().optional(),m32:g.number().optional(),m33:g.number().optional()}).passthrough().optional(),viewBackgroundFilter:g.enum(["off","fullpage"]).optional(),zoomMode:g.enum(["bestFit","customFit","fitToHeight","fitToWidth"]).optional()},fB=g.object({...BN,...UN}).passthrough(),GN=fB.extend({tags:g.array(_B).optional()}).passthrough(),VN=fB.extend({tags:g.array(g.string()).optional()}).passthrough(),KN=g.object({id:g.string().optional(),name:g.string(),author:g.string(),iconData:g.string(),categories:g.array(g.string()),labels:g.array(g.string()).optional(),orientation:g.enum(["portrait","landscape"]),templateVersion:g.string(),supportedScreens:g.array(g.enum(["rm2","rmPP"])).optional(),constants:g.array(g.record(g.string(),g.union([g.number(),g.string()]))).optional(),items:g.array(g.unknown()),formatVersion:g.number().int().nonnegative().optional()}).passthrough(),HN=g.union([YN,WN,KN,GN,VN]),yB=g.object({lastModified:g.string().optional(),parent:g.string(),pinned:g.boolean(),type:g.enum(["DocumentType","CollectionType","TemplateType"]),visibleName:g.string(),lastOpened:g.string().optional(),lastOpenedPage:g.number().int().optional(),createdTime:g.string().optional(),deleted:g.boolean().nullish(),metadatamodified:g.boolean().nullish(),modified:g.boolean().nullish(),synced:g.boolean().nullish(),version:g.number().int().nonnegative().optional(),new:g.boolean().optional(),source:g.string().optional()}).passthrough();function hB(Q){let $=JSON.parse(Q);return yB.parse($)}var jN=g.object({hash:g.string(),generation:g.number()}).passthrough(),MN=g.object({hash:g.string(),generation:g.number(),schemaVersion:g.number().int().nonnegative()}).passthrough(),FN=g.object({docID:g.string(),hash:g.string()}).passthrough();async function kQ(Q){let $=await crypto.subtle.digest("SHA-256",Q);return new Uint8Array($).toHex()}function xB(Q){let[$,J,q,X,Y]=Q.split(":");if($===void 0||J===void 0||q===void 0||X===void 0||Y===void 0)throw Error(`line '${Q}' was not formatted correctly`);else if(J==="80000000"||J==="0")return{hash:$,type:J==="0"?0:80000000,id:q,subfiles:parseInt(X,10),size:parseInt(Y,10)};else throw Error(`line '${Q}' was not formatted correctly`)}class TQ{#$;#Q;#Y;#J;constructor(Q,$,J,q){this.#$=Q,this.#J=$,this.#Q=J,this.#Y=q}async getRootHash(){let $=await(await this.#$("GET",`${this.#Q}/sync/v4/root`)).text(),J=JSON.parse($),{hash:q,generation:X,schemaVersion:Y}=MN.parse(J);if(Y!==3&&Y!==4)throw Error(`schema version ${Y} not supported`);else if(!Number.isSafeInteger(X))throw Error(`generation ${X} was not a safe integer; please file a bug report`);else return[q,X,Y]}async#q(Q,$){if(!p5.test($))throw new O2($,p5,"hash was not a valid hash");let q=await(await this.#$("GET",`${this.#Q}/sync/v3/files/${$}`,{headers:{"rm-filename":Q}})).arrayBuffer();return new Uint8Array(q)}async getHash({id:Q,hash:$}){let J=this.#J.get($);if(J!=null)return new TextEncoder().encode(J);else{let q=await this.#q(Q,$);if(this.#J.get($)===void 0)this.#J.set($,null);return q}}async getText({id:Q,hash:$}){let J=this.#J.get($);if(J!=null)return J;else{let q=await this.#q(Q,$),Y=new TextDecoder().decode(q);return this.#J.set($,Y),Y}}async getEntries(Q){let $=await this.getText(Q),[J,...q]=$.slice(0,-1).split(`
|
|
4
|
-
`);if(J==="3")return{entries:q.map(xB)};else if(J==="4"){let[X,...Y]=q;if(!X)throw Error("missing info line for schema version 4");let[W,B,U,G]=X.split(":");if(W!=="0"||B===void 0||U===void 0||G===void 0)throw Error(`schema 4 info line '${X}' was not formatted correctly`);let V=Y.map(xB);if(parseInt(U,10)!==V.length)throw Error(`schema 4 expected ${U} entries, but found ${V.length}`);else return{entries:V,id:B,size:parseInt(G,10)}}else throw Error(`schema version ${J} not supported`)}async getContent(Q){let $=await this.getText(Q),J=JSON.parse($);return HN.parse(J)}async getMetadata(Q){let $=await this.getText(Q),J=JSON.parse($);return yB.parse(J)}async getRm(Q){let $=await this.getHash(Q);return QN($)}async putRm(Q,$){if(!Q.endsWith(".rm"))throw Error(`fileName ${Q} did not end with '.rm'`);else return await this.putFile(Q,IB($))}async putRootHash(Q,$,J=!0){if(!Number.isSafeInteger($))throw Error(`generation ${$} was not a safe integer`);else if(!p5.test(Q))throw new O2(Q,p5,"rootHash was not a valid hash");let q=JSON.stringify({hash:Q,generation:$,broadcast:J}),Y=await(await this.#$("PUT",`${this.#Q}/sync/v3/root`,{body:q})).text(),W=JSON.parse(Y),{hash:B,generation:U}=jN.parse(W);if(Number.isSafeInteger(U))return[B,U];else throw Error(`new generation ${U} was not a safe integer; please file a bug report`)}async#X(Q,$,J){if(!this.#J.has($)){let q=gB.default.buf(J,0),X=new ArrayBuffer(4);new DataView(X).setInt32(0,q,!1);let Y=new Uint8Array(X).toBase64();if(await this.#$("PUT",`${this.#Q}/sync/v3/files/${$}`,{body:J,headers:{"rm-filename":Q,"x-goog-hash":`crc32c=${Y}`}}),this.#J.get($)===void 0)this.#J.set($,null)}}async putFile(Q,$){let J=await kQ($);return[{id:Q,hash:J,type:0,subfiles:0,size:$.length},this.#X(Q,J,$)]}async putText(Q,$){let q=new TextEncoder().encode($),[X,Y]=await this.putFile(Q,q);return[X,Y.then(()=>{this.#J.set(X.hash,$)})]}async putContent(Q,$){if(!Q.endsWith(".content"))throw Error(`fileName ${Q} did not end with '.content'`);else return await this.putText(Q,JSON.stringify($))}async putMetadata(Q,$){if(!Q.endsWith(".metadata"))throw Error(`fileName ${Q} did not end with '.metadata'`);else return await this.putText(Q,JSON.stringify($))}async putEntries(Q,$,J){if(Q==="root"&&J===3)console.warn('writing a schema 3 root index, which reMarkable rejects with a 400 "Software must be updated" error; write the root index with schema version 4 instead');let q=[...$].sort((V,F)=>V.id.localeCompare(F.id)),X=q.reduce((V,F)=>V+F.size,0),Y=[`${J}
|
|
5
|
-
`];if(
|
|
6
|
-
`)}
|
|
7
|
-
`)}
|
|
8
|
-
`
|
|
9
|
-
`)
|
|
1
|
+
var NB=Object.create;var{getPrototypeOf:DB,defineProperty:o6,getOwnPropertyNames:SJ,getOwnPropertyDescriptor:CB}=Object,ZJ=Object.prototype.hasOwnProperty;function vJ(Q){return this[Q]}var OB,PB,X1=(Q,J,$)=>{var q=Q!=null&&typeof Q==="object";if(q){var X=J?OB??=new WeakMap:PB??=new WeakMap,Y=X.get(Q);if(Y)return Y}$=Q!=null?NB(DB(Q)):{};let W=J||!Q||!Q.__esModule?o6($,"default",{value:Q,enumerable:!0}):$;for(let U of SJ(Q))if(!ZJ.call(W,U))o6(W,U,{get:vJ.bind(Q,U),enumerable:!0});if(q)X.set(Q,W);return W},B2=(Q)=>{var J=(IJ??=new WeakMap).get(Q),$;if(J)return J;if(J=o6({},"__esModule",{value:!0}),Q&&typeof Q==="object"||typeof Q==="function"){for(var q of SJ(Q))if(!ZJ.call(J,q))o6(J,q,{get:vJ.bind(Q,q),enumerable:!($=CB(Q,q))||$.enumerable})}return IJ.set(Q,J),J},IJ,f=(Q,J)=>()=>(J||Q((J={exports:{}}).exports,J),J.exports);var AB=(Q)=>Q;function RB(Q,J){this[Q]=AB.bind(null,J)}var O4=(Q,J)=>{for(var $ in J)o6(Q,$,{get:J[$],enumerable:!0,configurable:!0,set:RB.bind(J,$)})};var EJ=(Q,J)=>()=>(Q&&(J=Q(Q=0)),J);var wB=Symbol.dispose||Symbol.for("Symbol.dispose"),IB=Symbol.asyncDispose||Symbol.for("Symbol.asyncDispose"),_0=(Q,J,$)=>{if(J!=null){if(typeof J!=="object"&&typeof J!=="function")throw TypeError('Object expected to be assigned to "using" declaration');var q;if($)q=J[IB];if(q===void 0)q=J[wB];if(typeof q!=="function")throw TypeError("Object not disposable");Q.push([$,q,J])}else if($)Q.push([$]);return J},$2=(Q,J,$)=>{var q=typeof SuppressedError==="function"?SuppressedError:function(W,U,G,B){return B=Error(G),B.name="SuppressedError",B.error=W,B.suppressed=U,B},X=(W)=>J=$?new q(W,J,"An error was suppressed during disposal"):($=!0,W),Y=(W)=>{while(W=Q.pop())try{var U=W[1]&&W[1].call(W[2]);if(W[0])return Promise.resolve(U).then(Y,(G)=>(X(G),Y()))}catch(G){X(G)}if($)throw J};return Y()};var l2={};O4(l2,{transcode:()=>VK,resolveObjectURL:()=>GK,kStringMaxLength:()=>bJ,kMaxLength:()=>r6,isUtf8:()=>BK,isAscii:()=>KK,default:()=>HK,constants:()=>fB,btoa:()=>TB,atob:()=>xB,INSPECT_MAX_BYTES:()=>hJ,File:()=>gB,Buffer:()=>b,Blob:()=>_B});function SB(Q){var J=Q.length;if(J%4>0)throw Error("Invalid string. Length must be a multiple of 4");var $=Q.indexOf("=");if($===-1)$=J;var q=$===J?0:4-$%4;return[$,q]}function ZB(Q,J){return(Q+J)*3/4-J}function vB(Q){var J,$=SB(Q),q=$[0],X=$[1],Y=new Uint8Array(ZB(q,X)),W=0,U=X>0?q-4:q,G;for(G=0;G<U;G+=4)J=K2[Q.charCodeAt(G)]<<18|K2[Q.charCodeAt(G+1)]<<12|K2[Q.charCodeAt(G+2)]<<6|K2[Q.charCodeAt(G+3)],Y[W++]=J>>16&255,Y[W++]=J>>8&255,Y[W++]=J&255;if(X===2)J=K2[Q.charCodeAt(G)]<<2|K2[Q.charCodeAt(G+1)]>>4,Y[W++]=J&255;if(X===1)J=K2[Q.charCodeAt(G)]<<10|K2[Q.charCodeAt(G+1)]<<4|K2[Q.charCodeAt(G+2)]>>2,Y[W++]=J>>8&255,Y[W++]=J&255;return Y}function EB(Q){return S2[Q>>18&63]+S2[Q>>12&63]+S2[Q>>6&63]+S2[Q&63]}function kB(Q,J,$){var q,X=[];for(var Y=J;Y<$;Y+=3)q=(Q[Y]<<16&16711680)+(Q[Y+1]<<8&65280)+(Q[Y+2]&255),X.push(EB(q));return X.join("")}function TJ(Q){var J,$=Q.length,q=$%3,X=[],Y=16383;for(var W=0,U=$-q;W<U;W+=Y)X.push(kB(Q,W,W+Y>U?U:W+Y));if(q===1)J=Q[$-1],X.push(S2[J>>2]+S2[J<<4&63]+"==");else if(q===2)J=(Q[$-2]<<8)+Q[$-1],X.push(S2[J>>10]+S2[J>>4&63]+S2[J<<2&63]+"=");return X.join("")}function c8(Q,J,$,q,X){var Y,W,U=X*8-q-1,G=(1<<U)-1,B=G>>1,K=-7,j=$?X-1:0,F=$?-1:1,H=Q[J+j];j+=F,Y=H&(1<<-K)-1,H>>=-K,K+=U;for(;K>0;Y=Y*256+Q[J+j],j+=F,K-=8);W=Y&(1<<-K)-1,Y>>=-K,K+=q;for(;K>0;W=W*256+Q[J+j],j+=F,K-=8);if(Y===0)Y=1-B;else if(Y===G)return W?NaN:(H?-1:1)*(1/0);else W=W+Math.pow(2,q),Y=Y-B;return(H?-1:1)*W*Math.pow(2,Y-q)}function yJ(Q,J,$,q,X,Y){var W,U,G,B=Y*8-X-1,K=(1<<B)-1,j=K>>1,F=X===23?Math.pow(2,-24)-Math.pow(2,-77):0,H=q?0:Y-1,E=q?1:-1,g=J<0||J===0&&1/J<0?1:0;if(J=Math.abs(J),isNaN(J)||J===1/0)U=isNaN(J)?1:0,W=K;else{if(W=Math.floor(Math.log(J)/Math.LN2),J*(G=Math.pow(2,-W))<1)W--,G*=2;if(W+j>=1)J+=F/G;else J+=F*Math.pow(2,1-j);if(J*G>=2)W++,G/=2;if(W+j>=K)U=0,W=K;else if(W+j>=1)U=(J*G-1)*Math.pow(2,X),W=W+j;else U=J*Math.pow(2,j-1)*Math.pow(2,X),W=0}for(;X>=8;Q[$+H]=U&255,H+=E,U/=256,X-=8);W=W<<X|U,B+=X;for(;B>0;Q[$+H]=W&255,H+=E,W/=256,B-=8);Q[$+H-E]|=g*128}function p2(Q){if(Q>r6)throw RangeError('The value "'+Q+'" is invalid for option "size"');let J=new Uint8Array(Q);return Object.setPrototypeOf(J,b.prototype),J}function S4(Q,J,$){return class extends ${constructor(){super();Object.defineProperty(this,"message",{value:J.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${Q}]`,this.stack,delete this.name}get code(){return Q}set code(q){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:q,writable:!0})}toString(){return`${this.name} [${Q}]: ${this.message}`}}}function b(Q,J,$){if(typeof Q==="number"){if(typeof J==="string")throw TypeError('The "string" argument must be of type string. Received type number');return Z4(Q)}return mJ(Q,J,$)}function mJ(Q,J,$){if(typeof Q==="string")return mB(Q,J);if(ArrayBuffer.isView(Q))return uB(Q);if(Q==null)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Q);if(Z2(Q,ArrayBuffer)||Q&&Z2(Q.buffer,ArrayBuffer))return w4(Q,J,$);if(typeof SharedArrayBuffer<"u"&&(Z2(Q,SharedArrayBuffer)||Q&&Z2(Q.buffer,SharedArrayBuffer)))return w4(Q,J,$);if(typeof Q==="number")throw TypeError('The "value" argument must not be of type number. Received type number');let q=Q.valueOf&&Q.valueOf();if(q!=null&&q!==Q)return b.from(q,J,$);let X=cB(Q);if(X)return X;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof Q[Symbol.toPrimitive]==="function")return b.from(Q[Symbol.toPrimitive]("string"),J,$);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Q)}function uJ(Q){if(typeof Q!=="number")throw TypeError('"size" argument must be of type number');else if(Q<0)throw RangeError('The value "'+Q+'" is invalid for option "size"')}function bB(Q,J,$){if(uJ(Q),Q<=0)return p2(Q);if(J!==void 0)return typeof $==="string"?p2(Q).fill(J,$):p2(Q).fill(J);return p2(Q)}function Z4(Q){return uJ(Q),p2(Q<0?0:v4(Q)|0)}function mB(Q,J){if(typeof J!=="string"||J==="")J="utf8";if(!b.isEncoding(J))throw TypeError("Unknown encoding: "+J);let $=cJ(Q,J)|0,q=p2($),X=q.write(Q,J);if(X!==$)q=q.slice(0,X);return q}function R4(Q){let J=Q.length<0?0:v4(Q.length)|0,$=p2(J);for(let q=0;q<J;q+=1)$[q]=Q[q]&255;return $}function uB(Q){if(Z2(Q,Uint8Array)){let J=new Uint8Array(Q);return w4(J.buffer,J.byteOffset,J.byteLength)}return R4(Q)}function w4(Q,J,$){if(J<0||Q.byteLength<J)throw RangeError('"offset" is outside of buffer bounds');if(Q.byteLength<J+($||0))throw RangeError('"length" is outside of buffer bounds');let q;if(J===void 0&&$===void 0)q=new Uint8Array(Q);else if($===void 0)q=new Uint8Array(Q,J);else q=new Uint8Array(Q,J,$);return Object.setPrototypeOf(q,b.prototype),q}function cB(Q){if(b.isBuffer(Q)){let J=v4(Q.length)|0,$=p2(J);if($.length===0)return $;return Q.copy($,0,0,J),$}if(Q.length!==void 0){if(typeof Q.length!=="number"||Number.isNaN(Q.length))return p2(0);return R4(Q)}if(Q.type==="Buffer"&&Array.isArray(Q.data))return R4(Q.data)}function v4(Q){if(Q>=r6)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r6.toString(16)+" bytes");return Q|0}function cJ(Q,J){if(b.isBuffer(Q))return Q.length;if(ArrayBuffer.isView(Q)||Z2(Q,ArrayBuffer))return Q.byteLength;if(typeof Q!=="string")throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof Q);let $=Q.length,q=arguments.length>2&&arguments[2]===!0;if(!q&&$===0)return 0;let X=!1;for(;;)switch(J){case"ascii":case"latin1":case"binary":return $;case"utf8":case"utf-8":return I4(Q).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return $*2;case"hex":return $>>>1;case"base64":return sJ(Q).length;default:if(X)return q?-1:I4(Q).length;J=(""+J).toLowerCase(),X=!0}}function pB(Q,J,$){let q=!1;if(J===void 0||J<0)J=0;if(J>this.length)return"";if($===void 0||$>this.length)$=this.length;if($<=0)return"";if($>>>=0,J>>>=0,$<=J)return"";if(!Q)Q="utf8";while(!0)switch(Q){case"hex":return eB(this,J,$);case"utf8":case"utf-8":return lJ(this,J,$);case"ascii":return sB(this,J,$);case"latin1":case"binary":return tB(this,J,$);case"base64":return rB(this,J,$);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return QK(this,J,$);default:if(q)throw TypeError("Unknown encoding: "+Q);Q=(Q+"").toLowerCase(),q=!0}}function T1(Q,J,$){let q=Q[J];Q[J]=Q[$],Q[$]=q}function pJ(Q,J,$,q,X){if(Q.length===0)return-1;if(typeof $==="string")q=$,$=0;else if($>2147483647)$=2147483647;else if($<-2147483648)$=-2147483648;if($=+$,Number.isNaN($))$=X?0:Q.length-1;if($<0)$=Q.length+$;if($>=Q.length)if(X)return-1;else $=Q.length-1;else if($<0)if(X)$=0;else return-1;if(typeof J==="string")J=b.from(J,q);if(b.isBuffer(J)){if(J.length===0)return-1;return gJ(Q,J,$,q,X)}else if(typeof J==="number"){if(J=J&255,typeof Uint8Array.prototype.indexOf==="function")if(X)return Uint8Array.prototype.indexOf.call(Q,J,$);else return Uint8Array.prototype.lastIndexOf.call(Q,J,$);return gJ(Q,[J],$,q,X)}throw TypeError("val must be string, number or Buffer")}function gJ(Q,J,$,q,X){let Y=1,W=Q.length,U=J.length;if(q!==void 0){if(q=String(q).toLowerCase(),q==="ucs2"||q==="ucs-2"||q==="utf16le"||q==="utf-16le"){if(Q.length<2||J.length<2)return-1;Y=2,W/=2,U/=2,$/=2}}function G(K,j){if(Y===1)return K[j];else return K.readUInt16BE(j*Y)}let B;if(X){let K=-1;for(B=$;B<W;B++)if(G(Q,B)===G(J,K===-1?0:B-K)){if(K===-1)K=B;if(B-K+1===U)return K*Y}else{if(K!==-1)B-=B-K;K=-1}}else{if($+U>W)$=W-U;for(B=$;B>=0;B--){let K=!0;for(let j=0;j<U;j++)if(G(Q,B+j)!==G(J,j)){K=!1;break}if(K)return B}}return-1}function lB(Q,J,$,q){$=Number($)||0;let X=Q.length-$;if(!q)q=X;else if(q=Number(q),q>X)q=X;let Y=J.length;if(q>Y/2)q=Y/2;let W;for(W=0;W<q;++W){let U=parseInt(J.substr(W*2,2),16);if(Number.isNaN(U))return W;Q[$+W]=U}return W}function dB(Q,J,$,q){return p8(I4(J,Q.length-$),Q,$,q)}function iB(Q,J,$,q){return p8(XK(J),Q,$,q)}function nB(Q,J,$,q){return p8(sJ(J),Q,$,q)}function oB(Q,J,$,q){return p8(YK(J,Q.length-$),Q,$,q)}function rB(Q,J,$){if(J===0&&$===Q.length)return TJ(Q);else return TJ(Q.slice(J,$))}function lJ(Q,J,$){$=Math.min(Q.length,$);let q=[],X=J;while(X<$){let Y=Q[X],W=null,U=Y>239?4:Y>223?3:Y>191?2:1;if(X+U<=$){let G,B,K,j;switch(U){case 1:if(Y<128)W=Y;break;case 2:if(G=Q[X+1],(G&192)===128){if(j=(Y&31)<<6|G&63,j>127)W=j}break;case 3:if(G=Q[X+1],B=Q[X+2],(G&192)===128&&(B&192)===128){if(j=(Y&15)<<12|(G&63)<<6|B&63,j>2047&&(j<55296||j>57343))W=j}break;case 4:if(G=Q[X+1],B=Q[X+2],K=Q[X+3],(G&192)===128&&(B&192)===128&&(K&192)===128){if(j=(Y&15)<<18|(G&63)<<12|(B&63)<<6|K&63,j>65535&&j<1114112)W=j}}}if(W===null)W=65533,U=1;else if(W>65535)W-=65536,q.push(W>>>10&1023|55296),W=56320|W&1023;q.push(W),X+=U}return aB(q)}function aB(Q){let J=Q.length;if(J<=_J)return String.fromCharCode.apply(String,Q);let $="",q=0;while(q<J)$+=String.fromCharCode.apply(String,Q.slice(q,q+=_J));return $}function sB(Q,J,$){let q="";$=Math.min(Q.length,$);for(let X=J;X<$;++X)q+=String.fromCharCode(Q[X]&127);return q}function tB(Q,J,$){let q="";$=Math.min(Q.length,$);for(let X=J;X<$;++X)q+=String.fromCharCode(Q[X]);return q}function eB(Q,J,$){let q=Q.length;if(!J||J<0)J=0;if(!$||$<0||$>q)$=q;let X="";for(let Y=J;Y<$;++Y)X+=WK[Q[Y]];return X}function QK(Q,J,$){let q=Q.slice(J,$),X="";for(let Y=0;Y<q.length-1;Y+=2)X+=String.fromCharCode(q[Y]+q[Y+1]*256);return X}function b0(Q,J,$){if(Q%1!==0||Q<0)throw RangeError("offset is not uint");if(Q+J>$)throw RangeError("Trying to access beyond buffer length")}function t0(Q,J,$,q,X,Y){if(!b.isBuffer(Q))throw TypeError('"buffer" argument must be a Buffer instance');if(J>X||J<Y)throw RangeError('"value" argument is out of bounds');if($+q>Q.length)throw RangeError("Index out of range")}function dJ(Q,J,$,q,X){aJ(J,q,X,Q,$,7);let Y=Number(J&BigInt(4294967295));Q[$++]=Y,Y=Y>>8,Q[$++]=Y,Y=Y>>8,Q[$++]=Y,Y=Y>>8,Q[$++]=Y;let W=Number(J>>BigInt(32)&BigInt(4294967295));return Q[$++]=W,W=W>>8,Q[$++]=W,W=W>>8,Q[$++]=W,W=W>>8,Q[$++]=W,$}function iJ(Q,J,$,q,X){aJ(J,q,X,Q,$,7);let Y=Number(J&BigInt(4294967295));Q[$+7]=Y,Y=Y>>8,Q[$+6]=Y,Y=Y>>8,Q[$+5]=Y,Y=Y>>8,Q[$+4]=Y;let W=Number(J>>BigInt(32)&BigInt(4294967295));return Q[$+3]=W,W=W>>8,Q[$+2]=W,W=W>>8,Q[$+1]=W,W=W>>8,Q[$]=W,$+8}function nJ(Q,J,$,q,X,Y){if($+q>Q.length)throw RangeError("Index out of range");if($<0)throw RangeError("Index out of range")}function oJ(Q,J,$,q,X){if(J=+J,$=$>>>0,!X)nJ(Q,J,$,4,340282346638528860000000000000000000000,-340282346638528860000000000000000000000);return yJ(Q,J,$,q,23,4),$+4}function rJ(Q,J,$,q,X){if(J=+J,$=$>>>0,!X)nJ(Q,J,$,8,179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,-179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000);return yJ(Q,J,$,q,52,8),$+8}function fJ(Q){let J="",$=Q.length,q=Q[0]==="-"?1:0;for(;$>=q+4;$-=3)J=`_${Q.slice($-3,$)}${J}`;return`${Q.slice(0,$)}${J}`}function JK(Q,J,$){if(Y6(J,"offset"),Q[J]===void 0||Q[J+$]===void 0)a6(J,Q.length-($+1))}function aJ(Q,J,$,q,X,Y){if(Q>$||Q<J){let W=typeof J==="bigint"?"n":"",U;if(Y>3)if(J===0||J===BigInt(0))U=`>= 0${W} and < 2${W} ** ${(Y+1)*8}${W}`;else U=`>= -(2${W} ** ${(Y+1)*8-1}${W}) and < 2 ** ${(Y+1)*8-1}${W}`;else U=`>= ${J}${W} and <= ${$}${W}`;throw new A4("value",U,Q)}JK(q,X,Y)}function Y6(Q,J){if(typeof Q!=="number")throw new hB(J,"number",Q)}function a6(Q,J,$){if(Math.floor(Q)!==Q)throw Y6(Q,$),new A4($||"offset","an integer",Q);if(J<0)throw new yB;throw new A4($||"offset",`>= ${$?1:0} and <= ${J}`,Q)}function qK(Q){if(Q=Q.split("=")[0],Q=Q.trim().replace($K,""),Q.length<2)return"";while(Q.length%4!==0)Q=Q+"=";return Q}function I4(Q,J){J=J||1/0;let $,q=Q.length,X=null,Y=[];for(let W=0;W<q;++W){if($=Q.charCodeAt(W),$>55295&&$<57344){if(!X){if($>56319){if((J-=3)>-1)Y.push(239,191,189);continue}else if(W+1===q){if((J-=3)>-1)Y.push(239,191,189);continue}X=$;continue}if($<56320){if((J-=3)>-1)Y.push(239,191,189);X=$;continue}$=(X-55296<<10|$-56320)+65536}else if(X){if((J-=3)>-1)Y.push(239,191,189)}if(X=null,$<128){if((J-=1)<0)break;Y.push($)}else if($<2048){if((J-=2)<0)break;Y.push($>>6|192,$&63|128)}else if($<65536){if((J-=3)<0)break;Y.push($>>12|224,$>>6&63|128,$&63|128)}else if($<1114112){if((J-=4)<0)break;Y.push($>>18|240,$>>12&63|128,$>>6&63|128,$&63|128)}else throw Error("Invalid code point")}return Y}function XK(Q){let J=[];for(let $=0;$<Q.length;++$)J.push(Q.charCodeAt($)&255);return J}function YK(Q,J){let $,q,X,Y=[];for(let W=0;W<Q.length;++W){if((J-=2)<0)break;$=Q.charCodeAt(W),q=$>>8,X=$%256,Y.push(X),Y.push(q)}return Y}function sJ(Q){return vB(qK(Q))}function p8(Q,J,$,q){let X;for(X=0;X<q;++X){if(X+$>=J.length||X>=Q.length)break;J[X+$]=Q[X]}return X}function Z2(Q,J){return Q instanceof J||Q!=null&&Q.constructor!=null&&Q.constructor.name!=null&&Q.constructor.name===J.name}function Y1(Q){return typeof BigInt>"u"?UK:Q}function UK(){throw Error("BigInt not supported")}function E4(Q){return()=>{throw Error(Q+" is not implemented for node:buffer browser polyfill")}}var S2,K2,P4="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",k1,kJ,xJ,hJ=50,r6=2147483647,bJ=536870888,TB,xB,gB,_B,fB,yB,hB,A4,_J=4096,$K,WK,GK,BK,KK=(Q)=>{for(let J of Q)if(J.charCodeAt(0)>127)return!1;return!0},VK,HK;var d2=EJ(()=>{S2=[],K2=[];for(k1=0,kJ=P4.length;k1<kJ;++k1)S2[k1]=P4[k1],K2[P4.charCodeAt(k1)]=k1;K2[45]=62;K2[95]=63;xJ=typeof Symbol==="function"&&typeof Symbol.for==="function"?Symbol.for("nodejs.util.inspect.custom"):null,TB=globalThis.btoa,xB=globalThis.atob,gB=globalThis.File,_B=globalThis.Blob,fB={MAX_LENGTH:r6,MAX_STRING_LENGTH:bJ};yB=S4("ERR_BUFFER_OUT_OF_BOUNDS",function(Q){if(Q)return`${Q} is outside of buffer bounds`;return"Attempt to access memory outside buffer bounds"},RangeError),hB=S4("ERR_INVALID_ARG_TYPE",function(Q,J){return`The "${Q}" argument must be of type number. Received type ${typeof J}`},TypeError),A4=S4("ERR_OUT_OF_RANGE",function(Q,J,$){let q=`The value of "${Q}" is out of range.`,X=$;if(Number.isInteger($)&&Math.abs($)>4294967296)X=fJ(String($));else if(typeof $==="bigint"){if(X=String($),$>BigInt(2)**BigInt(32)||$<-(BigInt(2)**BigInt(32)))X=fJ(X);X+="n"}return q+=` It must be ${J}. Received ${X}`,q},RangeError);Object.defineProperty(b.prototype,"parent",{enumerable:!0,get:function(){if(!b.isBuffer(this))return;return this.buffer}});Object.defineProperty(b.prototype,"offset",{enumerable:!0,get:function(){if(!b.isBuffer(this))return;return this.byteOffset}});b.poolSize=8192;b.from=function(Q,J,$){return mJ(Q,J,$)};Object.setPrototypeOf(b.prototype,Uint8Array.prototype);Object.setPrototypeOf(b,Uint8Array);b.alloc=function(Q,J,$){return bB(Q,J,$)};b.allocUnsafe=function(Q){return Z4(Q)};b.allocUnsafeSlow=function(Q){return Z4(Q)};b.isBuffer=function(Q){return Q!=null&&Q._isBuffer===!0&&Q!==b.prototype};b.compare=function(Q,J){if(Z2(Q,Uint8Array))Q=b.from(Q,Q.offset,Q.byteLength);if(Z2(J,Uint8Array))J=b.from(J,J.offset,J.byteLength);if(!b.isBuffer(Q)||!b.isBuffer(J))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(Q===J)return 0;let $=Q.length,q=J.length;for(let X=0,Y=Math.min($,q);X<Y;++X)if(Q[X]!==J[X]){$=Q[X],q=J[X];break}if($<q)return-1;if(q<$)return 1;return 0};b.isEncoding=function(Q){switch(String(Q).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}};b.concat=function(Q,J){if(!Array.isArray(Q))throw TypeError('"list" argument must be an Array of Buffers');if(Q.length===0)return b.alloc(0);let $;if(J===void 0){J=0;for($=0;$<Q.length;++$)J+=Q[$].length}let q=b.allocUnsafe(J),X=0;for($=0;$<Q.length;++$){let Y=Q[$];if(Z2(Y,Uint8Array))if(X+Y.length>q.length){if(!b.isBuffer(Y))Y=b.from(Y);Y.copy(q,X)}else Uint8Array.prototype.set.call(q,Y,X);else if(!b.isBuffer(Y))throw TypeError('"list" argument must be an Array of Buffers');else Y.copy(q,X);X+=Y.length}return q};b.byteLength=cJ;b.prototype._isBuffer=!0;b.prototype.swap16=function(){let Q=this.length;if(Q%2!==0)throw RangeError("Buffer size must be a multiple of 16-bits");for(let J=0;J<Q;J+=2)T1(this,J,J+1);return this};b.prototype.swap32=function(){let Q=this.length;if(Q%4!==0)throw RangeError("Buffer size must be a multiple of 32-bits");for(let J=0;J<Q;J+=4)T1(this,J,J+3),T1(this,J+1,J+2);return this};b.prototype.swap64=function(){let Q=this.length;if(Q%8!==0)throw RangeError("Buffer size must be a multiple of 64-bits");for(let J=0;J<Q;J+=8)T1(this,J,J+7),T1(this,J+1,J+6),T1(this,J+2,J+5),T1(this,J+3,J+4);return this};b.prototype.toString=function(){let Q=this.length;if(Q===0)return"";if(arguments.length===0)return lJ(this,0,Q);return pB.apply(this,arguments)};b.prototype.toLocaleString=b.prototype.toString;b.prototype.equals=function(Q){if(!b.isBuffer(Q))throw TypeError("Argument must be a Buffer");if(this===Q)return!0;return b.compare(this,Q)===0};b.prototype.inspect=function(){let Q="",J=hJ;if(Q=this.toString("hex",0,J).replace(/(.{2})/g,"$1 ").trim(),this.length>J)Q+=" ... ";return"<Buffer "+Q+">"};if(xJ)b.prototype[xJ]=b.prototype.inspect;b.prototype.compare=function(Q,J,$,q,X){if(Z2(Q,Uint8Array))Q=b.from(Q,Q.offset,Q.byteLength);if(!b.isBuffer(Q))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof Q);if(J===void 0)J=0;if($===void 0)$=Q?Q.length:0;if(q===void 0)q=0;if(X===void 0)X=this.length;if(J<0||$>Q.length||q<0||X>this.length)throw RangeError("out of range index");if(q>=X&&J>=$)return 0;if(q>=X)return-1;if(J>=$)return 1;if(J>>>=0,$>>>=0,q>>>=0,X>>>=0,this===Q)return 0;let Y=X-q,W=$-J,U=Math.min(Y,W),G=this.slice(q,X),B=Q.slice(J,$);for(let K=0;K<U;++K)if(G[K]!==B[K]){Y=G[K],W=B[K];break}if(Y<W)return-1;if(W<Y)return 1;return 0};b.prototype.includes=function(Q,J,$){return this.indexOf(Q,J,$)!==-1};b.prototype.indexOf=function(Q,J,$){return pJ(this,Q,J,$,!0)};b.prototype.lastIndexOf=function(Q,J,$){return pJ(this,Q,J,$,!1)};b.prototype.write=function(Q,J,$,q){if(J===void 0)q="utf8",$=this.length,J=0;else if($===void 0&&typeof J==="string")q=J,$=this.length,J=0;else if(isFinite(J))if(J=J>>>0,isFinite($)){if($=$>>>0,q===void 0)q="utf8"}else q=$,$=void 0;else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let X=this.length-J;if($===void 0||$>X)$=X;if(Q.length>0&&($<0||J<0)||J>this.length)throw RangeError("Attempt to write outside buffer bounds");if(!q)q="utf8";let Y=!1;for(;;)switch(q){case"hex":return lB(this,Q,J,$);case"utf8":case"utf-8":return dB(this,Q,J,$);case"ascii":case"latin1":case"binary":return iB(this,Q,J,$);case"base64":return nB(this,Q,J,$);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return oB(this,Q,J,$);default:if(Y)throw TypeError("Unknown encoding: "+q);q=(""+q).toLowerCase(),Y=!0}};b.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};b.prototype.slice=function(Q,J){let $=this.length;if(Q=~~Q,J=J===void 0?$:~~J,Q<0){if(Q+=$,Q<0)Q=0}else if(Q>$)Q=$;if(J<0){if(J+=$,J<0)J=0}else if(J>$)J=$;if(J<Q)J=Q;let q=this.subarray(Q,J);return Object.setPrototypeOf(q,b.prototype),q};b.prototype.readUintLE=b.prototype.readUIntLE=function(Q,J,$){if(Q=Q>>>0,J=J>>>0,!$)b0(Q,J,this.length);let q=this[Q],X=1,Y=0;while(++Y<J&&(X*=256))q+=this[Q+Y]*X;return q};b.prototype.readUintBE=b.prototype.readUIntBE=function(Q,J,$){if(Q=Q>>>0,J=J>>>0,!$)b0(Q,J,this.length);let q=this[Q+--J],X=1;while(J>0&&(X*=256))q+=this[Q+--J]*X;return q};b.prototype.readUint8=b.prototype.readUInt8=function(Q,J){if(Q=Q>>>0,!J)b0(Q,1,this.length);return this[Q]};b.prototype.readUint16LE=b.prototype.readUInt16LE=function(Q,J){if(Q=Q>>>0,!J)b0(Q,2,this.length);return this[Q]|this[Q+1]<<8};b.prototype.readUint16BE=b.prototype.readUInt16BE=function(Q,J){if(Q=Q>>>0,!J)b0(Q,2,this.length);return this[Q]<<8|this[Q+1]};b.prototype.readUint32LE=b.prototype.readUInt32LE=function(Q,J){if(Q=Q>>>0,!J)b0(Q,4,this.length);return(this[Q]|this[Q+1]<<8|this[Q+2]<<16)+this[Q+3]*16777216};b.prototype.readUint32BE=b.prototype.readUInt32BE=function(Q,J){if(Q=Q>>>0,!J)b0(Q,4,this.length);return this[Q]*16777216+(this[Q+1]<<16|this[Q+2]<<8|this[Q+3])};b.prototype.readBigUInt64LE=Y1(function(Q){Q=Q>>>0,Y6(Q,"offset");let J=this[Q],$=this[Q+7];if(J===void 0||$===void 0)a6(Q,this.length-8);let q=J+this[++Q]*256+this[++Q]*65536+this[++Q]*16777216,X=this[++Q]+this[++Q]*256+this[++Q]*65536+$*16777216;return BigInt(q)+(BigInt(X)<<BigInt(32))});b.prototype.readBigUInt64BE=Y1(function(Q){Q=Q>>>0,Y6(Q,"offset");let J=this[Q],$=this[Q+7];if(J===void 0||$===void 0)a6(Q,this.length-8);let q=J*16777216+this[++Q]*65536+this[++Q]*256+this[++Q],X=this[++Q]*16777216+this[++Q]*65536+this[++Q]*256+$;return(BigInt(q)<<BigInt(32))+BigInt(X)});b.prototype.readIntLE=function(Q,J,$){if(Q=Q>>>0,J=J>>>0,!$)b0(Q,J,this.length);let q=this[Q],X=1,Y=0;while(++Y<J&&(X*=256))q+=this[Q+Y]*X;if(X*=128,q>=X)q-=Math.pow(2,8*J);return q};b.prototype.readIntBE=function(Q,J,$){if(Q=Q>>>0,J=J>>>0,!$)b0(Q,J,this.length);let q=J,X=1,Y=this[Q+--q];while(q>0&&(X*=256))Y+=this[Q+--q]*X;if(X*=128,Y>=X)Y-=Math.pow(2,8*J);return Y};b.prototype.readInt8=function(Q,J){if(Q=Q>>>0,!J)b0(Q,1,this.length);if(!(this[Q]&128))return this[Q];return(255-this[Q]+1)*-1};b.prototype.readInt16LE=function(Q,J){if(Q=Q>>>0,!J)b0(Q,2,this.length);let $=this[Q]|this[Q+1]<<8;return $&32768?$|4294901760:$};b.prototype.readInt16BE=function(Q,J){if(Q=Q>>>0,!J)b0(Q,2,this.length);let $=this[Q+1]|this[Q]<<8;return $&32768?$|4294901760:$};b.prototype.readInt32LE=function(Q,J){if(Q=Q>>>0,!J)b0(Q,4,this.length);return this[Q]|this[Q+1]<<8|this[Q+2]<<16|this[Q+3]<<24};b.prototype.readInt32BE=function(Q,J){if(Q=Q>>>0,!J)b0(Q,4,this.length);return this[Q]<<24|this[Q+1]<<16|this[Q+2]<<8|this[Q+3]};b.prototype.readBigInt64LE=Y1(function(Q){Q=Q>>>0,Y6(Q,"offset");let J=this[Q],$=this[Q+7];if(J===void 0||$===void 0)a6(Q,this.length-8);let q=this[Q+4]+this[Q+5]*256+this[Q+6]*65536+($<<24);return(BigInt(q)<<BigInt(32))+BigInt(J+this[++Q]*256+this[++Q]*65536+this[++Q]*16777216)});b.prototype.readBigInt64BE=Y1(function(Q){Q=Q>>>0,Y6(Q,"offset");let J=this[Q],$=this[Q+7];if(J===void 0||$===void 0)a6(Q,this.length-8);let q=(J<<24)+this[++Q]*65536+this[++Q]*256+this[++Q];return(BigInt(q)<<BigInt(32))+BigInt(this[++Q]*16777216+this[++Q]*65536+this[++Q]*256+$)});b.prototype.readFloatLE=function(Q,J){if(Q=Q>>>0,!J)b0(Q,4,this.length);return c8(this,Q,!0,23,4)};b.prototype.readFloatBE=function(Q,J){if(Q=Q>>>0,!J)b0(Q,4,this.length);return c8(this,Q,!1,23,4)};b.prototype.readDoubleLE=function(Q,J){if(Q=Q>>>0,!J)b0(Q,8,this.length);return c8(this,Q,!0,52,8)};b.prototype.readDoubleBE=function(Q,J){if(Q=Q>>>0,!J)b0(Q,8,this.length);return c8(this,Q,!1,52,8)};b.prototype.writeUintLE=b.prototype.writeUIntLE=function(Q,J,$,q){if(Q=+Q,J=J>>>0,$=$>>>0,!q){let W=Math.pow(2,8*$)-1;t0(this,Q,J,$,W,0)}let X=1,Y=0;this[J]=Q&255;while(++Y<$&&(X*=256))this[J+Y]=Q/X&255;return J+$};b.prototype.writeUintBE=b.prototype.writeUIntBE=function(Q,J,$,q){if(Q=+Q,J=J>>>0,$=$>>>0,!q){let W=Math.pow(2,8*$)-1;t0(this,Q,J,$,W,0)}let X=$-1,Y=1;this[J+X]=Q&255;while(--X>=0&&(Y*=256))this[J+X]=Q/Y&255;return J+$};b.prototype.writeUint8=b.prototype.writeUInt8=function(Q,J,$){if(Q=+Q,J=J>>>0,!$)t0(this,Q,J,1,255,0);return this[J]=Q&255,J+1};b.prototype.writeUint16LE=b.prototype.writeUInt16LE=function(Q,J,$){if(Q=+Q,J=J>>>0,!$)t0(this,Q,J,2,65535,0);return this[J]=Q&255,this[J+1]=Q>>>8,J+2};b.prototype.writeUint16BE=b.prototype.writeUInt16BE=function(Q,J,$){if(Q=+Q,J=J>>>0,!$)t0(this,Q,J,2,65535,0);return this[J]=Q>>>8,this[J+1]=Q&255,J+2};b.prototype.writeUint32LE=b.prototype.writeUInt32LE=function(Q,J,$){if(Q=+Q,J=J>>>0,!$)t0(this,Q,J,4,4294967295,0);return this[J+3]=Q>>>24,this[J+2]=Q>>>16,this[J+1]=Q>>>8,this[J]=Q&255,J+4};b.prototype.writeUint32BE=b.prototype.writeUInt32BE=function(Q,J,$){if(Q=+Q,J=J>>>0,!$)t0(this,Q,J,4,4294967295,0);return this[J]=Q>>>24,this[J+1]=Q>>>16,this[J+2]=Q>>>8,this[J+3]=Q&255,J+4};b.prototype.writeBigUInt64LE=Y1(function(Q,J=0){return dJ(this,Q,J,BigInt(0),BigInt("0xffffffffffffffff"))});b.prototype.writeBigUInt64BE=Y1(function(Q,J=0){return iJ(this,Q,J,BigInt(0),BigInt("0xffffffffffffffff"))});b.prototype.writeIntLE=function(Q,J,$,q){if(Q=+Q,J=J>>>0,!q){let U=Math.pow(2,8*$-1);t0(this,Q,J,$,U-1,-U)}let X=0,Y=1,W=0;this[J]=Q&255;while(++X<$&&(Y*=256)){if(Q<0&&W===0&&this[J+X-1]!==0)W=1;this[J+X]=(Q/Y>>0)-W&255}return J+$};b.prototype.writeIntBE=function(Q,J,$,q){if(Q=+Q,J=J>>>0,!q){let U=Math.pow(2,8*$-1);t0(this,Q,J,$,U-1,-U)}let X=$-1,Y=1,W=0;this[J+X]=Q&255;while(--X>=0&&(Y*=256)){if(Q<0&&W===0&&this[J+X+1]!==0)W=1;this[J+X]=(Q/Y>>0)-W&255}return J+$};b.prototype.writeInt8=function(Q,J,$){if(Q=+Q,J=J>>>0,!$)t0(this,Q,J,1,127,-128);if(Q<0)Q=255+Q+1;return this[J]=Q&255,J+1};b.prototype.writeInt16LE=function(Q,J,$){if(Q=+Q,J=J>>>0,!$)t0(this,Q,J,2,32767,-32768);return this[J]=Q&255,this[J+1]=Q>>>8,J+2};b.prototype.writeInt16BE=function(Q,J,$){if(Q=+Q,J=J>>>0,!$)t0(this,Q,J,2,32767,-32768);return this[J]=Q>>>8,this[J+1]=Q&255,J+2};b.prototype.writeInt32LE=function(Q,J,$){if(Q=+Q,J=J>>>0,!$)t0(this,Q,J,4,2147483647,-2147483648);return this[J]=Q&255,this[J+1]=Q>>>8,this[J+2]=Q>>>16,this[J+3]=Q>>>24,J+4};b.prototype.writeInt32BE=function(Q,J,$){if(Q=+Q,J=J>>>0,!$)t0(this,Q,J,4,2147483647,-2147483648);if(Q<0)Q=4294967295+Q+1;return this[J]=Q>>>24,this[J+1]=Q>>>16,this[J+2]=Q>>>8,this[J+3]=Q&255,J+4};b.prototype.writeBigInt64LE=Y1(function(Q,J=0){return dJ(this,Q,J,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});b.prototype.writeBigInt64BE=Y1(function(Q,J=0){return iJ(this,Q,J,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});b.prototype.writeFloatLE=function(Q,J,$){return oJ(this,Q,J,!0,$)};b.prototype.writeFloatBE=function(Q,J,$){return oJ(this,Q,J,!1,$)};b.prototype.writeDoubleLE=function(Q,J,$){return rJ(this,Q,J,!0,$)};b.prototype.writeDoubleBE=function(Q,J,$){return rJ(this,Q,J,!1,$)};b.prototype.copy=function(Q,J,$,q){if(!b.isBuffer(Q))throw TypeError("argument should be a Buffer");if(!$)$=0;if(!q&&q!==0)q=this.length;if(J>=Q.length)J=Q.length;if(!J)J=0;if(q>0&&q<$)q=$;if(q===$)return 0;if(Q.length===0||this.length===0)return 0;if(J<0)throw RangeError("targetStart out of bounds");if($<0||$>=this.length)throw RangeError("Index out of range");if(q<0)throw RangeError("sourceEnd out of bounds");if(q>this.length)q=this.length;if(Q.length-J<q-$)q=Q.length-J+$;let X=q-$;if(this===Q&&typeof Uint8Array.prototype.copyWithin==="function")this.copyWithin(J,$,q);else Uint8Array.prototype.set.call(Q,this.subarray($,q),J);return X};b.prototype.fill=function(Q,J,$,q){if(typeof Q==="string"){if(typeof J==="string")q=J,J=0,$=this.length;else if(typeof $==="string")q=$,$=this.length;if(q!==void 0&&typeof q!=="string")throw TypeError("encoding must be a string");if(typeof q==="string"&&!b.isEncoding(q))throw TypeError("Unknown encoding: "+q);if(Q.length===1){let Y=Q.charCodeAt(0);if(q==="utf8"&&Y<128||q==="latin1")Q=Y}}else if(typeof Q==="number")Q=Q&255;else if(typeof Q==="boolean")Q=Number(Q);if(J<0||this.length<J||this.length<$)throw RangeError("Out of range index");if($<=J)return this;if(J=J>>>0,$=$===void 0?this.length:$>>>0,!Q)Q=0;let X;if(typeof Q==="number")for(X=J;X<$;++X)this[X]=Q;else{let Y=b.isBuffer(Q)?Q:b.from(Q,q),W=Y.length;if(W===0)throw TypeError('The value "'+Q+'" is invalid for argument "value"');for(X=0;X<$-J;++X)this[X+J]=Y[X%W]}return this};$K=/[^+/0-9A-Za-z-_]/g;WK=function(){let Q=Array(256);for(let J=0;J<16;++J){let $=J*16;for(let q=0;q<16;++q)Q[$+q]="0123456789abcdef"[J]+"0123456789abcdef"[q]}return Q}();GK=E4("resolveObjectURL"),BK=E4("isUtf8"),VK=E4("transcode"),HK=b});var t6={};O4(t6,{setMaxListeners:()=>G$,once:()=>W$,listenerCount:()=>B$,init:()=>W1,getMaxListeners:()=>V$,getEventListeners:()=>U$,default:()=>OK,captureRejectionSymbol:()=>$$,addAbortListener:()=>H$,EventEmitter:()=>W1});function q$(Q,J){var{_events:$}=Q;if(J[0]??=Error("Unhandled error."),!$)throw J[0];var q=$[J$];if(q)for(var X of eJ.call(q))X.apply(Q,J);var Y=$.error;if(!Y)throw J[0];for(var X of eJ.call(Y))X.apply(Q,J);return!0}function FK(Q,J,$,q){J.then(void 0,function(X){queueMicrotask(()=>zK(Q,X,$,q))})}function zK(Q,J,$,q){if(typeof Q[tJ]==="function")Q[tJ](J,$,...q);else try{Q[x1]=!1,Q.emit("error",J)}finally{Q[x1]=!0}}function X$(Q,J,$){$.warned=!0;let q=Error(`Possible EventEmitter memory leak detected. ${$.length} ${String(J)} listeners added to [${Q.constructor.name}]. Use emitter.setMaxListeners() to increase limit`);q.name="MaxListenersExceededWarning",q.emitter=Q,q.type=J,q.count=$.length,console.warn(q)}function Y$(Q,J,...$){this.removeListener(Q,J),J.apply(this,$)}function W$(Q,J,$){var q=$?.signal;if(K$(q,"options.signal"),q?.aborted)throw new k4(void 0,{cause:q?.reason});let{resolve:X,reject:Y,promise:W}=$newPromiseCapability(Promise),U=(K)=>{if(Q.removeListener(J,G),q!=null)l8(q,"abort",B);Y(K)},G=(...K)=>{if(typeof Q.removeListener==="function")Q.removeListener("error",U);if(q!=null)l8(q,"abort",B);X(K)};if(Q$(Q,J,G,{once:!0}),J!=="error"&&typeof Q.once==="function")Q.once("error",U);function B(){l8(Q,J,G),l8(Q,"error",U),Y(new k4(void 0,{cause:q?.reason}))}if(q!=null)Q$(q,"abort",B,{once:!0});return W}function U$(Q,J){return Q.listeners(J)}function G$(Q,...J){x4(Q,"setMaxListeners",0);var $;if(J&&($=J.length))for(let q=0;q<$;q++)J[q].setMaxListeners(Q);else g1=Q}function B$(Q,J){return Q.listenerCount(J)}function l8(Q,J,$,q){if(typeof Q.removeListener==="function")Q.removeListener(J,$);else Q.removeEventListener(J,$,q)}function Q$(Q,J,$,q){if(typeof Q.on==="function")if(q.once)Q.once(J,$);else Q.on(J,$);else Q.addEventListener(J,$,q)}function W6(Q,J,$){let q=TypeError(`The "${Q}" argument must be of type ${J}. Received ${$}`);return q.code="ERR_INVALID_ARG_TYPE",q}function DK(Q,J,$){let q=RangeError(`The "${Q}" argument is out of range. It must be ${J}. Received ${$}`);return q.code="ERR_OUT_OF_RANGE",q}function K$(Q,J){if(Q!==void 0&&(Q===null||typeof Q!=="object"||!("aborted"in Q)))throw W6(J,"AbortSignal",Q)}function x4(Q,J,$,q){if(typeof Q!=="number")throw W6(J,"number",Q);if($!=null&&Q<$||q!=null&&Q>q||($!=null||q!=null)&&Number.isNaN(Q))throw DK(J,`${$!=null?`>= ${$}`:""}${$!=null&&q!=null?" && ":""}${q!=null?`<= ${q}`:""}`,Q)}function s6(Q){if(typeof Q!=="function")throw TypeError("The listener must be a function")}function CK(Q,J){if(typeof Q!=="boolean")throw W6(J,"boolean",Q)}function V$(Q){return Q?._maxListeners??g1}function H$(Q,J){if(Q===void 0)throw W6("signal","AbortSignal",Q);if(K$(Q,"signal"),typeof J!=="function")throw W6("listener","function",J);let $;if(Q.aborted)queueMicrotask(()=>J());else Q.addEventListener("abort",J,{__proto__:null,once:!0}),$=()=>{Q.removeEventListener("abort",J)};return{__proto__:null,[Symbol.dispose](){$?.()}}}var T4,x1,J$,jK,MK,tJ,$$,eJ,g1=10,W1=function(Q){if(this._events===void 0||this._events===this.__proto__._events)this._events={__proto__:null},this._eventsCount=0;if(this._maxListeners??=void 0,this[x1]=Q?.captureRejections?Boolean(Q?.captureRejections):E0[x1])this.emit=NK},E0,LK=function(Q,...J){if(Q==="error")return q$(this,J);var{_events:$}=this;if($===void 0)return!1;var q=$[Q];if(q===void 0)return!1;let X=q.length>1?q.slice():q;for(let Y=0,{length:W}=X;Y<W;Y++){let U=X[Y];switch(J.length){case 0:U.call(this);break;case 1:U.call(this,J[0]);break;case 2:U.call(this,J[0],J[1]);break;case 3:U.call(this,J[0],J[1],J[2]);break;default:U.apply(this,J);break}}return!0},NK=function(Q,...J){if(Q==="error")return q$(this,J);var{_events:$}=this;if($===void 0)return!1;var q=$[Q];if(q===void 0)return!1;let X=q.length>1?q.slice():q;for(let Y=0,{length:W}=X;Y<W;Y++){let U=X[Y],G;switch(J.length){case 0:G=U.call(this);break;case 1:G=U.call(this,J[0]);break;case 2:G=U.call(this,J[0],J[1]);break;case 3:G=U.call(this,J[0],J[1],J[2]);break;default:G=U.apply(this,J);break}if(G!==void 0&&typeof G?.then==="function"&&G.then===Promise.prototype.then)FK(this,G,Q,J)}return!0},k4,OK;var e6=EJ(()=>{T4=Symbol.for,x1=Symbol("kCapture"),J$=T4("events.errorMonitor"),jK=Symbol("events.maxEventTargetListeners"),MK=Symbol("events.maxEventTargetListenersWarned"),tJ=T4("nodejs.rejection"),$$=T4("nodejs.rejection"),eJ=Array.prototype.slice,E0=W1.prototype={};E0._events=void 0;E0._eventsCount=0;E0._maxListeners=void 0;E0.setMaxListeners=function(Q){return x4(Q,"setMaxListeners",0),this._maxListeners=Q,this};E0.constructor=W1;E0.getMaxListeners=function(){return this?._maxListeners??g1};E0.emit=LK;E0.addListener=function(Q,J){s6(J);var $=this._events;if(!$)$=this._events={__proto__:null},this._eventsCount=0;else if($.newListener)this.emit("newListener",Q,J.listener??J);var q=$[Q];if(!q)$[Q]=[J],this._eventsCount++;else{q.push(J);var X=this._maxListeners??g1;if(X>0&&q.length>X&&!q.warned)X$(this,Q,q)}return this};E0.on=E0.addListener;E0.prependListener=function(Q,J){s6(J);var $=this._events;if(!$)$=this._events={__proto__:null},this._eventsCount=0;else if($.newListener)this.emit("newListener",Q,J.listener??J);var q=$[Q];if(!q)$[Q]=[J],this._eventsCount++;else{q.unshift(J);var X=this._maxListeners??g1;if(X>0&&q.length>X&&!q.warned)X$(this,Q,q)}return this};E0.once=function(Q,J){s6(J);let $=Y$.bind(this,Q,J);return $.listener=J,this.addListener(Q,$),this};E0.prependOnceListener=function(Q,J){s6(J);let $=Y$.bind(this,Q,J);return $.listener=J,this.prependListener(Q,$),this};E0.removeListener=function(Q,J){s6(J);var{_events:$}=this;if(!$)return this;var q=$[Q];if(!q)return this;var X=q.length;let Y=-1;for(let W=X-1;W>=0;W--)if(q[W]===J||q[W].listener===J){Y=W;break}if(Y<0)return this;if(Y===0)q.shift();else q.splice(Y,1);if(q.length===0)delete $[Q],this._eventsCount--;return this};E0.off=E0.removeListener;E0.removeAllListeners=function(Q){var{_events:J}=this;if(Q&&J){if(J[Q])delete J[Q],this._eventsCount--}else this._events={__proto__:null};return this};E0.listeners=function(Q){var{_events:J}=this;if(!J)return[];var $=J[Q];if(!$)return[];return $.map((q)=>q.listener??q)};E0.rawListeners=function(Q){var{_events:J}=this;if(!J)return[];var $=J[Q];if(!$)return[];return $.slice()};E0.listenerCount=function(Q){var{_events:J}=this;if(!J)return 0;return J[Q]?.length??0};E0.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};E0[x1]=!1;k4=class k4 extends Error{constructor(Q="The operation was aborted",J=void 0){if(J!==void 0&&typeof J!=="object")throw W6("options","Object",J);super(Q,J);this.code="ABORT_ERR",this.name="AbortError"}};Object.defineProperties(W1,{captureRejections:{get(){return E0[x1]},set(Q){CK(Q,"EventEmitter.captureRejections"),E0[x1]=Q},enumerable:!0},defaultMaxListeners:{enumerable:!0,get:()=>{return g1},set:(Q)=>{x4(Q,"defaultMaxListeners",0),g1=Q}},kMaxEventTargetListeners:{value:jK,enumerable:!1,configurable:!1,writable:!1},kMaxEventTargetListenersWarned:{value:MK,enumerable:!1,configurable:!1,writable:!1}});Object.assign(W1,{once:W$,getEventListeners:U$,getMaxListeners:V$,setMaxListeners:G$,EventEmitter:W1,usingDomains:!1,captureRejectionSymbol:$$,errorMonitor:J$,addAbortListener:H$,init:W1,listenerCount:B$});OK=W1});var o8=f((qP,C$)=>{var S0=(Q,J)=>()=>(J||Q((J={exports:{}}).exports,J),J.exports),T0=S0((Q,J)=>{class $ extends Error{constructor(q){if(!Array.isArray(q))throw TypeError(`Expected input to be an Array, got ${typeof q}`);let X="";for(let Y=0;Y<q.length;Y++)X+=` ${q[Y].stack}
|
|
2
|
+
`;super(X);this.name="AggregateError",this.errors=q}}J.exports={AggregateError:$,ArrayIsArray(q){return Array.isArray(q)},ArrayPrototypeIncludes(q,X){return q.includes(X)},ArrayPrototypeIndexOf(q,X){return q.indexOf(X)},ArrayPrototypeJoin(q,X){return q.join(X)},ArrayPrototypeMap(q,X){return q.map(X)},ArrayPrototypePop(q,X){return q.pop(X)},ArrayPrototypePush(q,X){return q.push(X)},ArrayPrototypeSlice(q,X,Y){return q.slice(X,Y)},Error,FunctionPrototypeCall(q,X,...Y){return q.call(X,...Y)},FunctionPrototypeSymbolHasInstance(q,X){return Function.prototype[Symbol.hasInstance].call(q,X)},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,X){return Object.defineProperties(q,X)},ObjectDefineProperty(q,X,Y){return Object.defineProperty(q,X,Y)},ObjectGetOwnPropertyDescriptor(q,X){return Object.getOwnPropertyDescriptor(q,X)},ObjectKeys(q){return Object.keys(q)},ObjectSetPrototypeOf(q,X){return Object.setPrototypeOf(q,X)},Promise,PromisePrototypeCatch(q,X){return q.catch(X)},PromisePrototypeThen(q,X,Y){return q.then(X,Y)},PromiseReject(q){return Promise.reject(q)},PromiseResolve(q){return Promise.resolve(q)},ReflectApply:Reflect.apply,RegExpPrototypeTest(q,X){return q.test(X)},SafeSet:Set,String,StringPrototypeSlice(q,X,Y){return q.slice(X,Y)},StringPrototypeToLowerCase(q){return q.toLowerCase()},StringPrototypeToUpperCase(q){return q.toUpperCase()},StringPrototypeTrim(q){return q.trim()},Symbol,SymbolFor:Symbol.for,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,SymbolDispose:Symbol.dispose||Symbol("Symbol.dispose"),SymbolAsyncDispose:Symbol.asyncDispose||Symbol("Symbol.asyncDispose"),TypedArrayPrototypeSet(q,X,Y){return q.set(X,Y)},Boolean,Uint8Array}}),j$=S0((Q,J)=>{J.exports={format($,...q){return $.replace(/%([sdifj])/g,function(...[X,Y]){let W=q.shift();if(Y==="f")return W.toFixed(6);else if(Y==="j")return JSON.stringify(W);else if(Y==="s"&&typeof W==="object")return`${W.constructor!==Object?W.constructor.name:""} {}`.trim();else return W.toString()})},inspect($){switch(typeof $){case"string":if($.includes("'")){if(!$.includes('"'))return`"${$}"`;else if(!$.includes("`")&&!$.includes("${"))return`\`${$}\``}return`'${$}'`;case"number":if(isNaN($))return"NaN";else if(Object.is($,-0))return String($);return $;case"bigint":return`${String($)}n`;case"boolean":case"undefined":return String($);case"object":return"{}"}}}}),r0=S0((Q,J)=>{var{format:$,inspect:q}=j$(),{AggregateError:X}=T0(),Y=globalThis.AggregateError||X,W=Symbol("kIsNodeError"),U=["string","function","number","object","Function","Object","boolean","bigint","symbol"],G=/^([A-Z][a-z0-9]*)+$/,B={};function K(D,V){if(!D)throw new B.ERR_INTERNAL_ASSERTION(V)}function j(D){let V="",z=D.length,L=D[0]==="-"?1:0;for(;z>=L+4;z-=3)V=`_${D.slice(z-3,z)}${V}`;return`${D.slice(0,z)}${V}`}function F(D,V,z){if(typeof V==="function")return K(V.length<=z.length,`Code: ${D}; The provided arguments length (${z.length}) does not match the required ones (${V.length}).`),V(...z);let L=(V.match(/%[dfijoOs]/g)||[]).length;if(K(L===z.length,`Code: ${D}; The provided arguments length (${z.length}) does not match the required ones (${L}).`),z.length===0)return V;return $(V,...z)}function H(D,V,z){if(!z)z=Error;class L extends z{constructor(...A){super(F(D,V,A))}toString(){return`${this.name} [${D}]: ${this.message}`}}Object.defineProperties(L.prototype,{name:{value:z.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${D}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),L.prototype.code=D,L.prototype[W]=!0,B[D]=L}function E(D){let V="__node_internal_"+D.name;return Object.defineProperty(D,"name",{value:V}),D}function g(D,V){if(D&&V&&D!==V){if(Array.isArray(V.errors))return V.errors.push(D),V;let z=new Y([V,D],V.message);return z.code=V.code,z}return D||V}class P extends Error{constructor(D="The operation was aborted",V=void 0){if(V!==void 0&&typeof V!=="object")throw new B.ERR_INVALID_ARG_TYPE("options","Object",V);super(D,V);this.code="ABORT_ERR",this.name="AbortError"}}H("ERR_ASSERTION","%s",Error),H("ERR_INVALID_ARG_TYPE",(D,V,z)=>{if(K(typeof D==="string","'name' must be a string"),!Array.isArray(V))V=[V];let L="The ";if(D.endsWith(" argument"))L+=`${D} `;else L+=`"${D}" ${D.includes(".")?"property":"argument"} `;L+="must be ";let A=[],y=[],T=[];for(let S of V)if(K(typeof S==="string","All expected entries have to be of type string"),U.includes(S))A.push(S.toLowerCase());else if(G.test(S))y.push(S);else K(S!=="object",'The value "object" should be written as "Object"'),T.push(S);if(y.length>0){let S=A.indexOf("object");if(S!==-1)A.splice(A,S,1),y.push("Object")}if(A.length>0){switch(A.length){case 1:L+=`of type ${A[0]}`;break;case 2:L+=`one of type ${A[0]} or ${A[1]}`;break;default:{let S=A.pop();L+=`one of type ${A.join(", ")}, or ${S}`}}if(y.length>0||T.length>0)L+=" or "}if(y.length>0){switch(y.length){case 1:L+=`an instance of ${y[0]}`;break;case 2:L+=`an instance of ${y[0]} or ${y[1]}`;break;default:{let S=y.pop();L+=`an instance of ${y.join(", ")}, or ${S}`}}if(T.length>0)L+=" or "}switch(T.length){case 0:break;case 1:if(T[0].toLowerCase()!==T[0])L+="an ";L+=`${T[0]}`;break;case 2:L+=`one of ${T[0]} or ${T[1]}`;break;default:{let S=T.pop();L+=`one of ${T.join(", ")}, or ${S}`}}if(z==null)L+=`. Received ${z}`;else if(typeof z==="function"&&z.name)L+=`. Received function ${z.name}`;else if(typeof z==="object"){var d;if((d=z.constructor)!==null&&d!==void 0&&d.name)L+=`. Received an instance of ${z.constructor.name}`;else{let S=q(z,{depth:-1});L+=`. Received ${S}`}}else{let S=q(z,{colors:!1});if(S.length>25)S=`${S.slice(0,25)}...`;L+=`. Received type ${typeof z} (${S})`}return L},TypeError),H("ERR_INVALID_ARG_VALUE",(D,V,z="is invalid")=>{let L=q(V);if(L.length>128)L=L.slice(0,128)+"...";return`The ${D.includes(".")?"property":"argument"} '${D}' ${z}. Received ${L}`},TypeError),H("ERR_INVALID_RETURN_VALUE",(D,V,z)=>{var L;let A=z!==null&&z!==void 0&&(L=z.constructor)!==null&&L!==void 0&&L.name?`instance of ${z.constructor.name}`:`type ${typeof z}`;return`Expected ${D} to be returned from the "${V}" function but got ${A}.`},TypeError),H("ERR_MISSING_ARGS",(...D)=>{K(D.length>0,"At least one arg needs to be specified");let V,z=D.length;switch(D=(Array.isArray(D)?D:[D]).map((L)=>`"${L}"`).join(" or "),z){case 1:V+=`The ${D[0]} argument`;break;case 2:V+=`The ${D[0]} and ${D[1]} arguments`;break;default:{let L=D.pop();V+=`The ${D.join(", ")}, and ${L} arguments`}break}return`${V} must be specified`},TypeError),H("ERR_OUT_OF_RANGE",(D,V,z)=>{K(V,'Missing "range" argument');let L;if(Number.isInteger(z)&&Math.abs(z)>4294967296)L=j(String(z));else if(typeof z==="bigint"){L=String(z);let A=BigInt(2)**BigInt(32);if(z>A||z<-A)L=j(L);L+="n"}else L=q(z);return`The value of "${D}" is out of range. It must be ${V}. Received ${L}`},RangeError),H("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error),H("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error),H("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error),H("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error),H("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error),H("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),H("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error),H("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error),H("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error),H("ERR_STREAM_WRITE_AFTER_END","write after end",Error),H("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError),J.exports={AbortError:P,aggregateTwoErrors:E(g),hideStackFrames:E,codes:B}}),PK=S0((Q,J)=>{Object.defineProperty(Q,"__esModule",{value:!0});var $=new WeakMap,q=new WeakMap;function X(v){let R=$.get(v);return console.assert(R!=null,"'this' is expected an Event object, but got",v),R}function Y(v){if(v.passiveListener!=null){if(typeof console<"u"&&typeof console.error==="function")console.error("Unable to preventDefault inside passive event listener invocation.",v.passiveListener);return}if(!v.event.cancelable)return;if(v.canceled=!0,typeof v.event.preventDefault==="function")v.event.preventDefault()}function W(v,R){$.set(this,{eventTarget:v,event:R,eventPhase:2,currentTarget:v,canceled:!1,stopped:!1,immediateStopped:!1,passiveListener:null,timeStamp:R.timeStamp||Date.now()}),Object.defineProperty(this,"isTrusted",{value:!1,enumerable:!0});let O=Object.keys(R);for(let _=0;_<O.length;++_){let h=O[_];if(!(h in this))Object.defineProperty(this,h,U(h))}}if(W.prototype={get type(){return X(this).event.type},get target(){return X(this).eventTarget},get currentTarget(){return X(this).currentTarget},composedPath(){let v=X(this).currentTarget;if(v==null)return[];return[v]},get NONE(){return 0},get CAPTURING_PHASE(){return 1},get AT_TARGET(){return 2},get BUBBLING_PHASE(){return 3},get eventPhase(){return X(this).eventPhase},stopPropagation(){let v=X(this);if(v.stopped=!0,typeof v.event.stopPropagation==="function")v.event.stopPropagation()},stopImmediatePropagation(){let v=X(this);if(v.stopped=!0,v.immediateStopped=!0,typeof v.event.stopImmediatePropagation==="function")v.event.stopImmediatePropagation()},get bubbles(){return Boolean(X(this).event.bubbles)},get cancelable(){return Boolean(X(this).event.cancelable)},preventDefault(){Y(X(this))},get defaultPrevented(){return X(this).canceled},get composed(){return Boolean(X(this).event.composed)},get timeStamp(){return X(this).timeStamp},get srcElement(){return X(this).eventTarget},get cancelBubble(){return X(this).stopped},set cancelBubble(v){if(!v)return;let R=X(this);if(R.stopped=!0,typeof R.event.cancelBubble==="boolean")R.event.cancelBubble=!0},get returnValue(){return!X(this).canceled},set returnValue(v){if(!v)Y(X(this))},initEvent(){}},Object.defineProperty(W.prototype,"constructor",{value:W,configurable:!0,writable:!0}),typeof window<"u"&&typeof window.Event<"u")Object.setPrototypeOf(W.prototype,window.Event.prototype),q.set(window.Event.prototype,W);function U(v){return{get(){return X(this).event[v]},set(R){X(this).event[v]=R},configurable:!0,enumerable:!0}}function G(v){return{value(){let R=X(this).event;return R[v].apply(R,arguments)},configurable:!0,enumerable:!0}}function B(v,R){let O=Object.keys(R);if(O.length===0)return v;function _(h,x){v.call(this,h,x)}_.prototype=Object.create(v.prototype,{constructor:{value:_,configurable:!0,writable:!0}});for(let h=0;h<O.length;++h){let x=O[h];if(!(x in v.prototype)){let a=typeof Object.getOwnPropertyDescriptor(R,x).value==="function";Object.defineProperty(_.prototype,x,a?G(x):U(x))}}return _}function K(v){if(v==null||v===Object.prototype)return W;let R=q.get(v);if(R==null)R=B(K(Object.getPrototypeOf(v)),v),q.set(v,R);return R}function j(v,R){return new(K(Object.getPrototypeOf(R)))(v,R)}function F(v){return X(v).immediateStopped}function H(v,R){X(v).eventPhase=R}function E(v,R){X(v).currentTarget=R}function g(v,R){X(v).passiveListener=R}var P=new WeakMap,D=1,V=2,z=3;function L(v){return v!==null&&typeof v==="object"}function A(v){let R=P.get(v);if(R==null)throw TypeError("'this' is expected an EventTarget object, but got another value.");return R}function y(v){return{get(){let R=A(this).get(v);while(R!=null){if(R.listenerType===z)return R.listener;R=R.next}return null},set(R){if(typeof R!=="function"&&!L(R))R=null;let O=A(this),_=null,h=O.get(v);while(h!=null){if(h.listenerType===z)if(_!==null)_.next=h.next;else if(h.next!==null)O.set(v,h.next);else O.delete(v);else _=h;h=h.next}if(R!==null){let x={listener:R,listenerType:z,passive:!1,once:!1,next:null};if(_===null)O.set(v,x);else _.next=x}},configurable:!0,enumerable:!0}}function T(v,R){Object.defineProperty(v,`on${R}`,y(R))}function d(v){function R(){S.call(this)}R.prototype=Object.create(S.prototype,{constructor:{value:R,configurable:!0,writable:!0}});for(let O=0;O<v.length;++O)T(R.prototype,v[O]);return R}function S(){if(this instanceof S){P.set(this,new Map);return}if(arguments.length===1&&Array.isArray(arguments[0]))return d(arguments[0]);if(arguments.length>0){let v=Array(arguments.length);for(let R=0;R<arguments.length;++R)v[R]=arguments[R];return d(v)}throw TypeError("Cannot call a class as a function")}if(S.prototype={addEventListener(v,R,O){if(R==null)return;if(typeof R!=="function"&&!L(R))throw TypeError("'listener' should be a function or an object.");let _=A(this),h=L(O),x=(h?Boolean(O.capture):Boolean(O))?D:V,a={listener:R,listenerType:x,passive:h&&Boolean(O.passive),once:h&&Boolean(O.once),next:null},$0=_.get(v);if($0===void 0){_.set(v,a);return}let G0=null;while($0!=null){if($0.listener===R&&$0.listenerType===x)return;G0=$0,$0=$0.next}G0.next=a},removeEventListener(v,R,O){if(R==null)return;let _=A(this),h=(L(O)?Boolean(O.capture):Boolean(O))?D:V,x=null,a=_.get(v);while(a!=null){if(a.listener===R&&a.listenerType===h){if(x!==null)x.next=a.next;else if(a.next!==null)_.set(v,a.next);else _.delete(v);return}x=a,a=a.next}},dispatchEvent(v){if(v==null||typeof v.type!=="string")throw TypeError('"event.type" should be a string.');let R=A(this),O=v.type,_=R.get(O);if(_==null)return!0;let h=j(this,v),x=null;while(_!=null){if(_.once)if(x!==null)x.next=_.next;else if(_.next!==null)R.set(O,_.next);else R.delete(O);else x=_;if(g(h,_.passive?_.listener:null),typeof _.listener==="function")try{_.listener.call(this,h)}catch(a){if(typeof console<"u"&&typeof console.error==="function")console.error(a)}else if(_.listenerType!==z&&typeof _.listener.handleEvent==="function")_.listener.handleEvent(h);if(F(h))break;_=_.next}return g(h,null),H(h,0),E(h,null),!h.defaultPrevented}},Object.defineProperty(S.prototype,"constructor",{value:S,configurable:!0,writable:!0}),typeof window<"u"&&typeof window.EventTarget<"u")Object.setPrototypeOf(S.prototype,window.EventTarget.prototype);Q.defineEventAttribute=T,Q.EventTarget=S,Q.default=S,J.exports=S,J.exports.EventTarget=J.exports.default=S,J.exports.defineEventAttribute=T}),Q8=S0((Q,J)=>{Object.defineProperty(Q,"__esModule",{value:!0});var $=PK();class q extends $.EventTarget{constructor(){super();throw TypeError("AbortSignal cannot be constructed directly")}get aborted(){let K=W.get(this);if(typeof K!=="boolean")throw TypeError(`Expected 'this' to be an 'AbortSignal' object, but got ${this===null?"null":typeof this}`);return K}}$.defineEventAttribute(q.prototype,"abort");function X(){let K=Object.create(q.prototype);return $.EventTarget.call(K),W.set(K,!1),K}function Y(K){if(W.get(K)!==!1)return;W.set(K,!0),K.dispatchEvent({type:"abort"})}var W=new WeakMap;if(Object.defineProperties(q.prototype,{aborted:{enumerable:!0}}),typeof Symbol==="function"&&typeof Symbol.toStringTag==="symbol")Object.defineProperty(q.prototype,Symbol.toStringTag,{configurable:!0,value:"AbortSignal"});class U{constructor(){G.set(this,X())}get signal(){return B(this)}abort(){Y(B(this))}}var G=new WeakMap;function B(K){let j=G.get(K);if(j==null)throw TypeError(`Expected 'this' to be an 'AbortController' object, but got ${K===null?"null":typeof K}`);return j}if(Object.defineProperties(U.prototype,{signal:{enumerable:!0},abort:{enumerable:!0}}),typeof Symbol==="function"&&typeof Symbol.toStringTag==="symbol")Object.defineProperty(U.prototype,Symbol.toStringTag,{configurable:!0,value:"AbortController"});Q.AbortController=U,Q.AbortSignal=q,Q.default=U,J.exports=U,J.exports.AbortController=J.exports.default=U,J.exports.AbortSignal=q}),e0=S0((Q,J)=>{var $=(d2(),B2(l2)),{format:q,inspect:X}=j$(),{codes:{ERR_INVALID_ARG_TYPE:Y}}=r0(),{kResistStopPropagation:W,AggregateError:U,SymbolDispose:G}=T0(),B=globalThis.AbortSignal||Q8().AbortSignal,K=globalThis.AbortController||Q8().AbortController,j=Object.getPrototypeOf(async function(){}).constructor,F=globalThis.Blob||$.Blob,H=typeof F<"u"?function(P){return P instanceof F}:function(P){return!1},E=(P,D)=>{if(P!==void 0&&(P===null||typeof P!=="object"||!("aborted"in P)))throw new Y(D,"AbortSignal",P)},g=(P,D)=>{if(typeof P!=="function")throw new Y(D,"Function",P)};J.exports={AggregateError:U,kEmptyObject:Object.freeze({}),once(P){let D=!1;return function(...V){if(D)return;D=!0,P.apply(this,V)}},createDeferredPromise:function(){let P,D;return{promise:new Promise((V,z)=>{P=V,D=z}),resolve:P,reject:D}},promisify(P){return new Promise((D,V)=>{P((z,...L)=>{if(z)return V(z);return D(...L)})})},debuglog(){return function(){}},format:q,inspect:X,types:{isAsyncFunction(P){return P instanceof j},isArrayBufferView(P){return ArrayBuffer.isView(P)}},isBlob:H,deprecate(P,D){return P},addAbortListener:(e6(),B2(t6)).addAbortListener||function(P,D){if(P===void 0)throw new Y("signal","AbortSignal",P);E(P,"signal"),g(D,"listener");let V;if(P.aborted)queueMicrotask(()=>D());else P.addEventListener("abort",D,{__proto__:null,once:!0,[W]:!0}),V=()=>{P.removeEventListener("abort",D)};return{__proto__:null,[G](){var z;(z=V)===null||z===void 0||z()}}},AbortSignalAny:B.any||function(P){if(P.length===1)return P[0];let D=new K,V=()=>D.abort();return P.forEach((z)=>{E(z,"signals"),z.addEventListener("abort",V,{once:!0})}),D.signal.addEventListener("abort",()=>{P.forEach((z)=>z.removeEventListener("abort",V))},{once:!0}),D.signal}},J.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")}),J8=S0((Q,J)=>{var{ArrayIsArray:$,ArrayPrototypeIncludes:q,ArrayPrototypeJoin:X,ArrayPrototypeMap:Y,NumberIsInteger:W,NumberIsNaN:U,NumberMAX_SAFE_INTEGER:G,NumberMIN_SAFE_INTEGER:B,NumberParseInt:K,ObjectPrototypeHasOwnProperty:j,RegExpPrototypeExec:F,String:H,StringPrototypeToUpperCase:E,StringPrototypeTrim:g}=T0(),{hideStackFrames:P,codes:{ERR_SOCKET_BAD_PORT:D,ERR_INVALID_ARG_TYPE:V,ERR_INVALID_ARG_VALUE:z,ERR_OUT_OF_RANGE:L,ERR_UNKNOWN_SIGNAL:A}}=r0(),{normalizeEncoding:y}=e0(),{isAsyncFunction:T,isArrayBufferView:d}=e0().types,S={};function v(I){return I===(I|0)}function R(I){return I===I>>>0}var O=/^[0-7]+$/,_="must be a 32-bit unsigned integer or an octal string";function h(I,n,X0){if(typeof I>"u")I=X0;if(typeof I==="string"){if(F(O,I)===null)throw new z(n,I,_);I=K(I,8)}return $0(I,n),I}var x=P((I,n,X0=B,o=G)=>{if(typeof I!=="number")throw new V(n,"number",I);if(!W(I))throw new L(n,"an integer",I);if(I<X0||I>o)throw new L(n,`>= ${X0} && <= ${o}`,I)}),a=P((I,n,X0=-2147483648,o=2147483647)=>{if(typeof I!=="number")throw new V(n,"number",I);if(!W(I))throw new L(n,"an integer",I);if(I<X0||I>o)throw new L(n,`>= ${X0} && <= ${o}`,I)}),$0=P((I,n,X0=!1)=>{if(typeof I!=="number")throw new V(n,"number",I);if(!W(I))throw new L(n,"an integer",I);let o=X0?1:0,j0=4294967295;if(I<o||I>j0)throw new L(n,`>= ${o} && <= ${j0}`,I)});function G0(I,n){if(typeof I!=="string")throw new V(n,"string",I)}function C0(I,n,X0=void 0,o){if(typeof I!=="number")throw new V(n,"number",I);if(X0!=null&&I<X0||o!=null&&I>o||(X0!=null||o!=null)&&U(I))throw new L(n,`${X0!=null?`>= ${X0}`:""}${X0!=null&&o!=null?" && ":""}${o!=null?`<= ${o}`:""}`,I)}var p=P((I,n,X0)=>{if(!q(X0,I)){let o="must be one of: "+X(Y(X0,(j0)=>typeof j0==="string"?`'${j0}'`:H(j0)),", ");throw new z(n,I,o)}});function H0(I,n){if(typeof I!=="boolean")throw new V(n,"boolean",I)}function C(I,n,X0){return I==null||!j(I,n)?X0:I[n]}var i=P((I,n,X0=null)=>{let o=C(X0,"allowArray",!1),j0=C(X0,"allowFunction",!1);if(!C(X0,"nullable",!1)&&I===null||!o&&$(I)||typeof I!=="object"&&(!j0||typeof I!=="function"))throw new V(n,"Object",I)}),W0=P((I,n)=>{if(I!=null&&typeof I!=="object"&&typeof I!=="function")throw new V(n,"a dictionary",I)}),u=P((I,n,X0=0)=>{if(!$(I))throw new V(n,"Array",I);if(I.length<X0){let o=`must be longer than ${X0}`;throw new z(n,I,o)}});function B0(I,n){u(I,n);for(let X0=0;X0<I.length;X0++)G0(I[X0],`${n}[${X0}]`)}function M0(I,n){u(I,n);for(let X0=0;X0<I.length;X0++)H0(I[X0],`${n}[${X0}]`)}function A0(I,n){u(I,n);for(let X0=0;X0<I.length;X0++){let o=I[X0],j0=`${n}[${X0}]`;if(o==null)throw new V(j0,"AbortSignal",o);L0(o,j0)}}function N0(I,n="signal"){if(G0(I,n),S[I]===void 0){if(S[E(I)]!==void 0)throw new A(I+" (signals must use all capital letters)");throw new A(I)}}var c=P((I,n="buffer")=>{if(!d(I))throw new V(n,["Buffer","TypedArray","DataView"],I)});function l(I,n){let X0=y(n),o=I.length;if(X0==="hex"&&o%2!==0)throw new z("encoding",n,`is invalid for data of length ${o}`)}function e(I,n="Port",X0=!0){if(typeof I!=="number"&&typeof I!=="string"||typeof I==="string"&&g(I).length===0||+I!==+I>>>0||I>65535||I===0&&!X0)throw new D(n,I,X0);return I|0}var L0=P((I,n)=>{if(I!==void 0&&(I===null||typeof I!=="object"||!("aborted"in I)))throw new V(n,"AbortSignal",I)}),D0=P((I,n)=>{if(typeof I!=="function")throw new V(n,"Function",I)}),w=P((I,n)=>{if(typeof I!=="function"||T(I))throw new V(n,"Function",I)}),k=P((I,n)=>{if(I!==void 0)throw new V(n,"undefined",I)});function m(I,n,X0){if(!q(X0,I))throw new V(n,`('${X(X0,"|")}')`,I)}var t=/^(?:<[^>]*>)(?:\s*;\s*[^;"\s]+(?:=(")?[^;"\s]*\1)?)*$/;function q0(I,n){if(typeof I>"u"||!F(t,I))throw new z(n,I,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}function Q0(I){if(typeof I==="string")return q0(I,"hints"),I;else if($(I)){let n=I.length,X0="";if(n===0)return X0;for(let o=0;o<n;o++){let j0=I[o];if(q0(j0,"hints"),X0+=j0,o!==n-1)X0+=", "}return X0}throw new z("hints",I,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}J.exports={isInt32:v,isUint32:R,parseFileMode:h,validateArray:u,validateStringArray:B0,validateBooleanArray:M0,validateAbortSignalArray:A0,validateBoolean:H0,validateBuffer:c,validateDictionary:W0,validateEncoding:l,validateFunction:D0,validateInt32:a,validateInteger:x,validateNumber:C0,validateObject:i,validateOneOf:p,validatePlainFunction:w,validatePort:e,validateSignalName:N0,validateString:G0,validateUint32:$0,validateUndefined:k,validateUnion:m,validateAbortSignal:L0,validateLinkHeaderValue:Q0}}),_1=S0((Q,J)=>{J.exports=globalThis.process}),n2=S0((Q,J)=>{var{SymbolAsyncIterator:$,SymbolIterator:q,SymbolFor:X}=T0(),Y=X("nodejs.stream.destroyed"),W=X("nodejs.stream.errored"),U=X("nodejs.stream.readable"),G=X("nodejs.stream.writable"),B=X("nodejs.stream.disturbed"),K=X("nodejs.webstream.isClosedPromise"),j=X("nodejs.webstream.controllerErrorFunction");function F(C,i=!1){var W0;return!!(C&&typeof C.pipe==="function"&&typeof C.on==="function"&&(!i||typeof C.pause==="function"&&typeof C.resume==="function")&&(!C._writableState||((W0=C._readableState)===null||W0===void 0?void 0:W0.readable)!==!1)&&(!C._writableState||C._readableState))}function H(C){var i;return!!(C&&typeof C.write==="function"&&typeof C.on==="function"&&(!C._readableState||((i=C._writableState)===null||i===void 0?void 0:i.writable)!==!1))}function E(C){return!!(C&&typeof C.pipe==="function"&&C._readableState&&typeof C.on==="function"&&typeof C.write==="function")}function g(C){return C&&(C._readableState||C._writableState||typeof C.write==="function"&&typeof C.on==="function"||typeof C.pipe==="function"&&typeof C.on==="function")}function P(C){return!!(C&&!g(C)&&typeof C.pipeThrough==="function"&&typeof C.getReader==="function"&&typeof C.cancel==="function")}function D(C){return!!(C&&!g(C)&&typeof C.getWriter==="function"&&typeof C.abort==="function")}function V(C){return!!(C&&!g(C)&&typeof C.readable==="object"&&typeof C.writable==="object")}function z(C){return P(C)||D(C)||V(C)}function L(C,i){if(C==null)return!1;if(i===!0)return typeof C[$]==="function";if(i===!1)return typeof C[q]==="function";return typeof C[$]==="function"||typeof C[q]==="function"}function A(C){if(!g(C))return null;let{_writableState:i,_readableState:W0}=C,u=i||W0;return!!(C.destroyed||C[Y]||u!==null&&u!==void 0&&u.destroyed)}function y(C){if(!H(C))return null;if(C.writableEnded===!0)return!0;let i=C._writableState;if(i!==null&&i!==void 0&&i.errored)return!1;if(typeof(i===null||i===void 0?void 0:i.ended)!=="boolean")return null;return i.ended}function T(C,i){if(!H(C))return null;if(C.writableFinished===!0)return!0;let W0=C._writableState;if(W0!==null&&W0!==void 0&&W0.errored)return!1;if(typeof(W0===null||W0===void 0?void 0:W0.finished)!=="boolean")return null;return!!(W0.finished||i===!1&&W0.ended===!0&&W0.length===0)}function d(C){if(!F(C))return null;if(C.readableEnded===!0)return!0;let i=C._readableState;if(!i||i.errored)return!1;if(typeof(i===null||i===void 0?void 0:i.ended)!=="boolean")return null;return i.ended}function S(C,i){if(!F(C))return null;let W0=C._readableState;if(W0!==null&&W0!==void 0&&W0.errored)return!1;if(typeof(W0===null||W0===void 0?void 0:W0.endEmitted)!=="boolean")return null;return!!(W0.endEmitted||i===!1&&W0.ended===!0&&W0.length===0)}function v(C){if(C&&C[U]!=null)return C[U];if(typeof(C===null||C===void 0?void 0:C.readable)!=="boolean")return null;if(A(C))return!1;return F(C)&&C.readable&&!S(C)}function R(C){if(C&&C[G]!=null)return C[G];if(typeof(C===null||C===void 0?void 0:C.writable)!=="boolean")return null;if(A(C))return!1;return H(C)&&C.writable&&!y(C)}function O(C,i){if(!g(C))return null;if(A(C))return!0;if((i===null||i===void 0?void 0:i.readable)!==!1&&v(C))return!1;if((i===null||i===void 0?void 0:i.writable)!==!1&&R(C))return!1;return!0}function _(C){var i,W0;if(!g(C))return null;if(C.writableErrored)return C.writableErrored;return(i=(W0=C._writableState)===null||W0===void 0?void 0:W0.errored)!==null&&i!==void 0?i:null}function h(C){var i,W0;if(!g(C))return null;if(C.readableErrored)return C.readableErrored;return(i=(W0=C._readableState)===null||W0===void 0?void 0:W0.errored)!==null&&i!==void 0?i:null}function x(C){if(!g(C))return null;if(typeof C.closed==="boolean")return C.closed;let{_writableState:i,_readableState:W0}=C;if(typeof(i===null||i===void 0?void 0:i.closed)==="boolean"||typeof(W0===null||W0===void 0?void 0:W0.closed)==="boolean")return(i===null||i===void 0?void 0:i.closed)||(W0===null||W0===void 0?void 0:W0.closed);if(typeof C._closed==="boolean"&&a(C))return C._closed;return null}function a(C){return typeof C._closed==="boolean"&&typeof C._defaultKeepAlive==="boolean"&&typeof C._removedConnection==="boolean"&&typeof C._removedContLen==="boolean"}function $0(C){return typeof C._sent100==="boolean"&&a(C)}function G0(C){var i;return typeof C._consuming==="boolean"&&typeof C._dumped==="boolean"&&((i=C.req)===null||i===void 0?void 0:i.upgradeOrConnect)===void 0}function C0(C){if(!g(C))return null;let{_writableState:i,_readableState:W0}=C,u=i||W0;return!u&&$0(C)||!!(u&&u.autoDestroy&&u.emitClose&&u.closed===!1)}function p(C){var i;return!!(C&&((i=C[B])!==null&&i!==void 0?i:C.readableDidRead||C.readableAborted))}function H0(C){var i,W0,u,B0,M0,A0,N0,c,l,e;return!!(C&&((i=(W0=(u=(B0=(M0=(A0=C[W])!==null&&A0!==void 0?A0:C.readableErrored)!==null&&M0!==void 0?M0:C.writableErrored)!==null&&B0!==void 0?B0:(N0=C._readableState)===null||N0===void 0?void 0:N0.errorEmitted)!==null&&u!==void 0?u:(c=C._writableState)===null||c===void 0?void 0:c.errorEmitted)!==null&&W0!==void 0?W0:(l=C._readableState)===null||l===void 0?void 0:l.errored)!==null&&i!==void 0?i:(e=C._writableState)===null||e===void 0?void 0:e.errored))}J.exports={isDestroyed:A,kIsDestroyed:Y,isDisturbed:p,kIsDisturbed:B,isErrored:H0,kIsErrored:W,isReadable:v,kIsReadable:U,kIsClosedPromise:K,kControllerErrorFunction:j,kIsWritable:G,isClosed:x,isDuplexNodeStream:E,isFinished:O,isIterable:L,isReadableNodeStream:F,isReadableStream:P,isReadableEnded:d,isReadableFinished:S,isReadableErrored:h,isNodeStream:g,isWebStream:z,isWritable:R,isWritableNodeStream:H,isWritableStream:D,isWritableEnded:y,isWritableFinished:T,isWritableErrored:_,isServerRequest:G0,isServerResponse:$0,willEmitClose:C0,isTransformStream:V}}),U1=S0((Q,J)=>{var $=_1(),{AbortError:q,codes:X}=r0(),{ERR_INVALID_ARG_TYPE:Y,ERR_STREAM_PREMATURE_CLOSE:W}=X,{kEmptyObject:U,once:G}=e0(),{validateAbortSignal:B,validateFunction:K,validateObject:j,validateBoolean:F}=J8(),{Promise:H,PromisePrototypeThen:E,SymbolDispose:g}=T0(),{isClosed:P,isReadable:D,isReadableNodeStream:V,isReadableStream:z,isReadableFinished:L,isReadableErrored:A,isWritable:y,isWritableNodeStream:T,isWritableStream:d,isWritableFinished:S,isWritableErrored:v,isNodeStream:R,willEmitClose:O,kIsClosedPromise:_}=n2(),h;function x(p){return p.setHeader&&typeof p.abort==="function"}var a=()=>{};function $0(p,H0,C){var i,W0;if(arguments.length===2)C=H0,H0=U;else if(H0==null)H0=U;else j(H0,"options");if(K(C,"callback"),B(H0.signal,"options.signal"),C=G(C),z(p)||d(p))return G0(p,H0,C);if(!R(p))throw new Y("stream",["ReadableStream","WritableStream","Stream"],p);let u=(i=H0.readable)!==null&&i!==void 0?i:V(p),B0=(W0=H0.writable)!==null&&W0!==void 0?W0:T(p),M0=p._writableState,A0=p._readableState,N0=()=>{if(!p.writable)e()},c=O(p)&&V(p)===u&&T(p)===B0,l=S(p,!1),e=()=>{if(l=!0,p.destroyed)c=!1;if(c&&(!p.readable||u))return;if(!u||L0)C.call(p)},L0=L(p,!1),D0=()=>{if(L0=!0,p.destroyed)c=!1;if(c&&(!p.writable||B0))return;if(!B0||l)C.call(p)},w=(I)=>{C.call(p,I)},k=P(p),m=()=>{k=!0;let I=v(p)||A(p);if(I&&typeof I!=="boolean")return C.call(p,I);if(u&&!L0&&V(p,!0)){if(!L(p,!1))return C.call(p,new W)}if(B0&&!l){if(!S(p,!1))return C.call(p,new W)}C.call(p)},t=()=>{k=!0;let I=v(p)||A(p);if(I&&typeof I!=="boolean")return C.call(p,I);C.call(p)},q0=()=>{p.req.on("finish",e)};if(x(p)){if(p.on("complete",e),!c)p.on("abort",m);if(p.req)q0();else p.on("request",q0)}else if(B0&&!M0)p.on("end",N0),p.on("close",N0);if(!c&&typeof p.aborted==="boolean")p.on("aborted",m);if(p.on("end",D0),p.on("finish",e),H0.error!==!1)p.on("error",w);if(p.on("close",m),k)$.nextTick(m);else if(M0!==null&&M0!==void 0&&M0.errorEmitted||A0!==null&&A0!==void 0&&A0.errorEmitted){if(!c)$.nextTick(t)}else if(!u&&(!c||D(p))&&(l||y(p)===!1))$.nextTick(t);else if(!B0&&(!c||y(p))&&(L0||D(p)===!1))$.nextTick(t);else if(A0&&p.req&&p.aborted)$.nextTick(t);let Q0=()=>{if(C=a,p.removeListener("aborted",m),p.removeListener("complete",e),p.removeListener("abort",m),p.removeListener("request",q0),p.req)p.req.removeListener("finish",e);p.removeListener("end",N0),p.removeListener("close",N0),p.removeListener("finish",e),p.removeListener("end",D0),p.removeListener("error",w),p.removeListener("close",m)};if(H0.signal&&!k){let I=()=>{let n=C;Q0(),n.call(p,new q(void 0,{cause:H0.signal.reason}))};if(H0.signal.aborted)$.nextTick(I);else{h=h||e0().addAbortListener;let n=h(H0.signal,I),X0=C;C=G((...o)=>{n[g](),X0.apply(p,o)})}}return Q0}function G0(p,H0,C){let i=!1,W0=a;if(H0.signal)if(W0=()=>{i=!0,C.call(p,new q(void 0,{cause:H0.signal.reason}))},H0.signal.aborted)$.nextTick(W0);else{h=h||e0().addAbortListener;let B0=h(H0.signal,W0),M0=C;C=G((...A0)=>{B0[g](),M0.apply(p,A0)})}let u=(...B0)=>{if(!i)$.nextTick(()=>C.apply(p,B0))};return E(p[_].promise,u,u),a}function C0(p,H0){var C;let i=!1;if(H0===null)H0=U;if((C=H0)!==null&&C!==void 0&&C.cleanup)F(H0.cleanup,"cleanup"),i=H0.cleanup;return new H((W0,u)=>{let B0=$0(p,H0,(M0)=>{if(i)B0();if(M0)u(M0);else W0()})})}J.exports=$0,J.exports.finished=C0}),U6=S0((Q,J)=>{var $=_1(),{aggregateTwoErrors:q,codes:{ERR_MULTIPLE_CALLBACK:X},AbortError:Y}=r0(),{Symbol:W}=T0(),{kIsDestroyed:U,isDestroyed:G,isFinished:B,isServerRequest:K}=n2(),j=W("kDestroy"),F=W("kConstruct");function H(O,_,h){if(O){if(O.stack,_&&!_.errored)_.errored=O;if(h&&!h.errored)h.errored=O}}function E(O,_){let h=this._readableState,x=this._writableState,a=x||h;if(x!==null&&x!==void 0&&x.destroyed||h!==null&&h!==void 0&&h.destroyed){if(typeof _==="function")_();return this}if(H(O,x,h),x)x.destroyed=!0;if(h)h.destroyed=!0;if(!a.constructed)this.once(j,function($0){g(this,q($0,O),_)});else g(this,O,_);return this}function g(O,_,h){let x=!1;function a($0){if(x)return;x=!0;let{_readableState:G0,_writableState:C0}=O;if(H($0,C0,G0),C0)C0.closed=!0;if(G0)G0.closed=!0;if(typeof h==="function")h($0);if($0)$.nextTick(P,O,$0);else $.nextTick(D,O)}try{O._destroy(_||null,a)}catch($0){a($0)}}function P(O,_){V(O,_),D(O)}function D(O){let{_readableState:_,_writableState:h}=O;if(h)h.closeEmitted=!0;if(_)_.closeEmitted=!0;if(h!==null&&h!==void 0&&h.emitClose||_!==null&&_!==void 0&&_.emitClose)O.emit("close")}function V(O,_){let{_readableState:h,_writableState:x}=O;if(x!==null&&x!==void 0&&x.errorEmitted||h!==null&&h!==void 0&&h.errorEmitted)return;if(x)x.errorEmitted=!0;if(h)h.errorEmitted=!0;O.emit("error",_)}function z(){let O=this._readableState,_=this._writableState;if(O)O.constructed=!0,O.closed=!1,O.closeEmitted=!1,O.destroyed=!1,O.errored=null,O.errorEmitted=!1,O.reading=!1,O.ended=O.readable===!1,O.endEmitted=O.readable===!1;if(_)_.constructed=!0,_.destroyed=!1,_.closed=!1,_.closeEmitted=!1,_.errored=null,_.errorEmitted=!1,_.finalCalled=!1,_.prefinished=!1,_.ended=_.writable===!1,_.ending=_.writable===!1,_.finished=_.writable===!1}function L(O,_,h){let{_readableState:x,_writableState:a}=O;if(a!==null&&a!==void 0&&a.destroyed||x!==null&&x!==void 0&&x.destroyed)return this;if(x!==null&&x!==void 0&&x.autoDestroy||a!==null&&a!==void 0&&a.autoDestroy)O.destroy(_);else if(_){if(_.stack,a&&!a.errored)a.errored=_;if(x&&!x.errored)x.errored=_;if(h)$.nextTick(V,O,_);else V(O,_)}}function A(O,_){if(typeof O._construct!=="function")return;let{_readableState:h,_writableState:x}=O;if(h)h.constructed=!1;if(x)x.constructed=!1;if(O.once(F,_),O.listenerCount(F)>1)return;$.nextTick(y,O)}function y(O){let _=!1;function h(x){if(_){L(O,x!==null&&x!==void 0?x:new X);return}_=!0;let{_readableState:a,_writableState:$0}=O,G0=$0||a;if(a)a.constructed=!0;if($0)$0.constructed=!0;if(G0.destroyed)O.emit(j,x);else if(x)L(O,x,!0);else $.nextTick(T,O)}try{O._construct((x)=>{$.nextTick(h,x)})}catch(x){$.nextTick(h,x)}}function T(O){O.emit(F)}function d(O){return(O===null||O===void 0?void 0:O.setHeader)&&typeof O.abort==="function"}function S(O){O.emit("close")}function v(O,_){O.emit("error",_),$.nextTick(S,O)}function R(O,_){if(!O||G(O))return;if(!_&&!B(O))_=new Y;if(K(O))O.socket=null,O.destroy(_);else if(d(O))O.abort();else if(d(O.req))O.req.abort();else if(typeof O.destroy==="function")O.destroy(_);else if(typeof O.close==="function")O.close();else if(_)$.nextTick(v,O,_);else $.nextTick(S,O);if(!O.destroyed)O[U]=!0}J.exports={construct:A,destroyer:R,destroy:E,undestroy:z,errorOrDestroy:L}}),g4=S0((Q,J)=>{var{ArrayIsArray:$,ObjectSetPrototypeOf:q}=T0(),{EventEmitter:X}=(e6(),B2(t6));function Y(U){X.call(this,U)}q(Y.prototype,X.prototype),q(Y,X),Y.prototype.pipe=function(U,G){let B=this;function K(D){if(U.writable&&U.write(D)===!1&&B.pause)B.pause()}B.on("data",K);function j(){if(B.readable&&B.resume)B.resume()}if(U.on("drain",j),!U._isStdio&&(!G||G.end!==!1))B.on("end",H),B.on("close",E);let F=!1;function H(){if(F)return;F=!0,U.end()}function E(){if(F)return;if(F=!0,typeof U.destroy==="function")U.destroy()}function g(D){if(P(),X.listenerCount(this,"error")===0)this.emit("error",D)}W(B,"error",g),W(U,"error",g);function P(){B.removeListener("data",K),U.removeListener("drain",j),B.removeListener("end",H),B.removeListener("close",E),B.removeListener("error",g),U.removeListener("error",g),B.removeListener("end",P),B.removeListener("close",P),U.removeListener("close",P)}return B.on("end",P),B.on("close",P),U.on("close",P),U.emit("pipe",B),U};function W(U,G,B){if(typeof U.prependListener==="function")return U.prependListener(G,B);if(!U._events||!U._events[G])U.on(G,B);else if($(U._events[G]))U._events[G].unshift(B);else U._events[G]=[B,U._events[G]]}J.exports={Stream:Y,prependListener:W}}),d8=S0((Q,J)=>{var{SymbolDispose:$}=T0(),{AbortError:q,codes:X}=r0(),{isNodeStream:Y,isWebStream:W,kControllerErrorFunction:U}=n2(),G=U1(),{ERR_INVALID_ARG_TYPE:B}=X,K,j=(F,H)=>{if(typeof F!=="object"||!("aborted"in F))throw new B(H,"AbortSignal",F)};J.exports.addAbortSignal=function(F,H){if(j(F,"signal"),!Y(H)&&!W(H))throw new B("stream",["ReadableStream","WritableStream","Stream"],H);return J.exports.addAbortSignalNoValidate(F,H)},J.exports.addAbortSignalNoValidate=function(F,H){if(typeof F!=="object"||!("aborted"in F))return H;let E=Y(H)?()=>{H.destroy(new q(void 0,{cause:F.reason}))}:()=>{H[U](new q(void 0,{cause:F.reason}))};if(F.aborted)E();else{K=K||e0().addAbortListener;let g=K(F,E);G(H,g[$])}return H}}),AK=S0((Q,J)=>{var{StringPrototypeSlice:$,SymbolIterator:q,TypedArrayPrototypeSet:X,Uint8Array:Y}=T0(),{Buffer:W}=(d2(),B2(l2)),{inspect:U}=e0();J.exports=class{constructor(){this.head=null,this.tail=null,this.length=0}push(G){let B={data:G,next:null};if(this.length>0)this.tail.next=B;else this.head=B;this.tail=B,++this.length}unshift(G){let B={data:G,next:this.head};if(this.length===0)this.tail=B;this.head=B,++this.length}shift(){if(this.length===0)return;let G=this.head.data;if(this.length===1)this.head=this.tail=null;else this.head=this.head.next;return--this.length,G}clear(){this.head=this.tail=null,this.length=0}join(G){if(this.length===0)return"";let B=this.head,K=""+B.data;while((B=B.next)!==null)K+=G+B.data;return K}concat(G){if(this.length===0)return W.alloc(0);let B=W.allocUnsafe(G>>>0),K=this.head,j=0;while(K)X(B,K.data,j),j+=K.data.length,K=K.next;return B}consume(G,B){let K=this.head.data;if(G<K.length){let j=K.slice(0,G);return this.head.data=K.slice(G),j}if(G===K.length)return this.shift();return B?this._getString(G):this._getBuffer(G)}first(){return this.head.data}*[q](){for(let G=this.head;G;G=G.next)yield G.data}_getString(G){let B="",K=this.head,j=0;do{let F=K.data;if(G>F.length)B+=F,G-=F.length;else{if(G===F.length)if(B+=F,++j,K.next)this.head=K.next;else this.head=this.tail=null;else B+=$(F,0,G),this.head=K,K.data=$(F,G);break}++j}while((K=K.next)!==null);return this.length-=j,B}_getBuffer(G){let B=W.allocUnsafe(G),K=G,j=this.head,F=0;do{let H=j.data;if(G>H.length)X(B,H,K-G),G-=H.length;else{if(G===H.length)if(X(B,H,K-G),++F,j.next)this.head=j.next;else this.head=this.tail=null;else X(B,new Y(H.buffer,H.byteOffset,G),K-G),this.head=j,j.data=H.slice(G);break}++F}while((j=j.next)!==null);return this.length-=F,B}[Symbol.for("nodejs.util.inspect.custom")](G,B){return U(this,{...B,depth:0,customInspect:!1})}}}),i8=S0((Q,J)=>{var{MathFloor:$,NumberIsInteger:q}=T0(),{validateInteger:X}=J8(),{ERR_INVALID_ARG_VALUE:Y}=r0().codes,W=16384,U=16;function G(F,H,E){return F.highWaterMark!=null?F.highWaterMark:H?F[E]:null}function B(F){return F?U:W}function K(F,H){if(X(H,"value",0),F)U=H;else W=H}function j(F,H,E,g){let P=G(H,g,E);if(P!=null){if(!q(P)||P<0){let D=g?`options.${E}`:"options.highWaterMark";throw new Y(D,P)}return $(P)}return B(F.objectMode)}J.exports={getHighWaterMark:j,getDefaultHighWaterMark:B,setDefaultHighWaterMark:K}}),RK=S0((Q,J)=>{/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var $=(d2(),B2(l2)),q=$.Buffer;function X(W,U){for(var G in W)U[G]=W[G]}if(q.from&&q.alloc&&q.allocUnsafe&&q.allocUnsafeSlow)J.exports=$;else X($,Q),Q.Buffer=Y;function Y(W,U,G){return q(W,U,G)}Y.prototype=Object.create(q.prototype),X(q,Y),Y.from=function(W,U,G){if(typeof W==="number")throw TypeError("Argument must not be a number");return q(W,U,G)},Y.alloc=function(W,U,G){if(typeof W!=="number")throw TypeError("Argument must be a number");var B=q(W);if(U!==void 0)if(typeof G==="string")B.fill(U,G);else B.fill(U);else B.fill(0);return B},Y.allocUnsafe=function(W){if(typeof W!=="number")throw TypeError("Argument must be a number");return q(W)},Y.allocUnsafeSlow=function(W){if(typeof W!=="number")throw TypeError("Argument must be a number");return $.SlowBuffer(W)}}),wK=S0((Q)=>{var J=RK().Buffer,$=J.isEncoding||function(V){switch(V=""+V,V&&V.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(V){if(!V)return"utf8";var z;while(!0)switch(V){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 V;default:if(z)return;V=(""+V).toLowerCase(),z=!0}}function X(V){var z=q(V);if(typeof z!=="string"&&(J.isEncoding===$||!$(V)))throw Error("Unknown encoding: "+V);return z||V}Q.StringDecoder=Y;function Y(V){this.encoding=X(V);var z;switch(this.encoding){case"utf16le":this.text=F,this.end=H,z=4;break;case"utf8":this.fillLast=B,z=4;break;case"base64":this.text=E,this.end=g,z=3;break;default:this.write=P,this.end=D;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=J.allocUnsafe(z)}Y.prototype.write=function(V){if(V.length===0)return"";var z,L;if(this.lastNeed){if(z=this.fillLast(V),z===void 0)return"";L=this.lastNeed,this.lastNeed=0}else L=0;if(L<V.length)return z?z+this.text(V,L):this.text(V,L);return z||""},Y.prototype.end=j,Y.prototype.text=K,Y.prototype.fillLast=function(V){if(this.lastNeed<=V.length)return V.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);V.copy(this.lastChar,this.lastTotal-this.lastNeed,0,V.length),this.lastNeed-=V.length};function W(V){if(V<=127)return 0;else if(V>>5===6)return 2;else if(V>>4===14)return 3;else if(V>>3===30)return 4;return V>>6===2?-1:-2}function U(V,z,L){var A=z.length-1;if(A<L)return 0;var y=W(z[A]);if(y>=0){if(y>0)V.lastNeed=y-1;return y}if(--A<L||y===-2)return 0;if(y=W(z[A]),y>=0){if(y>0)V.lastNeed=y-2;return y}if(--A<L||y===-2)return 0;if(y=W(z[A]),y>=0){if(y>0)if(y===2)y=0;else V.lastNeed=y-3;return y}return 0}function G(V,z,L){if((z[0]&192)!==128)return V.lastNeed=0,"�";if(V.lastNeed>1&&z.length>1){if((z[1]&192)!==128)return V.lastNeed=1,"�";if(V.lastNeed>2&&z.length>2){if((z[2]&192)!==128)return V.lastNeed=2,"�"}}}function B(V){var z=this.lastTotal-this.lastNeed,L=G(this,V,z);if(L!==void 0)return L;if(this.lastNeed<=V.length)return V.copy(this.lastChar,z,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);V.copy(this.lastChar,z,0,V.length),this.lastNeed-=V.length}function K(V,z){var L=U(this,V,z);if(!this.lastNeed)return V.toString("utf8",z);this.lastTotal=L;var A=V.length-(L-this.lastNeed);return V.copy(this.lastChar,0,A),V.toString("utf8",z,A)}function j(V){var z=V&&V.length?this.write(V):"";if(this.lastNeed)return z+"�";return z}function F(V,z){if((V.length-z)%2===0){var L=V.toString("utf16le",z);if(L){var A=L.charCodeAt(L.length-1);if(A>=55296&&A<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=V[V.length-2],this.lastChar[1]=V[V.length-1],L.slice(0,-1)}return L}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=V[V.length-1],V.toString("utf16le",z,V.length-1)}function H(V){var z=V&&V.length?this.write(V):"";if(this.lastNeed){var L=this.lastTotal-this.lastNeed;return z+this.lastChar.toString("utf16le",0,L)}return z}function E(V,z){var L=(V.length-z)%3;if(L===0)return V.toString("base64",z);if(this.lastNeed=3-L,this.lastTotal=3,L===1)this.lastChar[0]=V[V.length-1];else this.lastChar[0]=V[V.length-2],this.lastChar[1]=V[V.length-1];return V.toString("base64",z,V.length-L)}function g(V){var z=V&&V.length?this.write(V):"";if(this.lastNeed)return z+this.lastChar.toString("base64",0,3-this.lastNeed);return z}function P(V){return V.toString(this.encoding)}function D(V){return V&&V.length?this.write(V):""}}),M$=S0((Q,J)=>{var $=_1(),{PromisePrototypeThen:q,SymbolAsyncIterator:X,SymbolIterator:Y}=T0(),{Buffer:W}=(d2(),B2(l2)),{ERR_INVALID_ARG_TYPE:U,ERR_STREAM_NULL_VALUES:G}=r0().codes;function B(K,j,F){let H;if(typeof j==="string"||j instanceof W)return new K({objectMode:!0,...F,read(){this.push(j),this.push(null)}});let E;if(j&&j[X])E=!0,H=j[X]();else if(j&&j[Y])E=!1,H=j[Y]();else throw new U("iterable",["Iterable"],j);let g=new K({objectMode:!0,highWaterMark:1,...F}),P=!1;g._read=function(){if(!P)P=!0,V()},g._destroy=function(z,L){q(D(z),()=>$.nextTick(L,z),(A)=>$.nextTick(L,A||z))};async function D(z){let L=z!==void 0&&z!==null,A=typeof H.throw==="function";if(L&&A){let{value:y,done:T}=await H.throw(z);if(await y,T)return}if(typeof H.return==="function"){let{value:y}=await H.return();await y}}async function V(){for(;;){try{let{value:z,done:L}=E?await H.next():H.next();if(L)g.push(null);else{let A=z&&typeof z.then==="function"?await z:z;if(A===null)throw P=!1,new G;else if(g.push(A))continue;else P=!1}}catch(z){g.destroy(z)}break}}return g}J.exports=B}),n8=S0((Q,J)=>{var $=_1(),{ArrayPrototypeIndexOf:q,NumberIsInteger:X,NumberIsNaN:Y,NumberParseInt:W,ObjectDefineProperties:U,ObjectKeys:G,ObjectSetPrototypeOf:B,Promise:K,SafeSet:j,SymbolAsyncDispose:F,SymbolAsyncIterator:H,Symbol:E}=T0();J.exports=o,o.ReadableState=X0;var{EventEmitter:g}=(e6(),B2(t6)),{Stream:P,prependListener:D}=g4(),{Buffer:V}=(d2(),B2(l2)),{addAbortSignal:z}=d8(),L=U1(),A=e0().debuglog("stream",(M)=>{A=M}),y=AK(),T=U6(),{getHighWaterMark:d,getDefaultHighWaterMark:S}=i8(),{aggregateTwoErrors:v,codes:{ERR_INVALID_ARG_TYPE:R,ERR_METHOD_NOT_IMPLEMENTED:O,ERR_OUT_OF_RANGE:_,ERR_STREAM_PUSH_AFTER_EOF:h,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:x},AbortError:a}=r0(),{validateObject:$0}=J8(),G0=E("kPaused"),{StringDecoder:C0}=wK(),p=M$();B(o.prototype,P.prototype),B(o,P);var H0=()=>{},{errorOrDestroy:C}=T,i=1,W0=2,u=4,B0=8,M0=16,A0=32,N0=64,c=128,l=256,e=512,L0=1024,D0=2048,w=4096,k=8192,m=16384,t=32768,q0=65536,Q0=131072,I=262144;function n(M){return{enumerable:!1,get(){return(this.state&M)!==0},set(N){if(N)this.state|=M;else this.state&=~M}}}U(X0.prototype,{objectMode:n(i),ended:n(W0),endEmitted:n(u),reading:n(B0),constructed:n(M0),sync:n(A0),needReadable:n(N0),emittedReadable:n(c),readableListening:n(l),resumeScheduled:n(e),errorEmitted:n(L0),emitClose:n(D0),autoDestroy:n(w),destroyed:n(k),closed:n(m),closeEmitted:n(t),multiAwaitDrain:n(q0),readingMore:n(Q0),dataEmitted:n(I)});function X0(M,N,s){if(typeof s!=="boolean")s=N instanceof i2();if(this.state=D0|w|M0|A0,M&&M.objectMode)this.state|=i;if(s&&M&&M.readableObjectMode)this.state|=i;if(this.highWaterMark=M?d(this,M,"readableHighWaterMark",s):S(!1),this.buffer=new y,this.length=0,this.pipes=[],this.flowing=null,this[G0]=null,M&&M.emitClose===!1)this.state&=~D0;if(M&&M.autoDestroy===!1)this.state&=~w;if(this.errored=null,this.defaultEncoding=M&&M.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.decoder=null,this.encoding=null,M&&M.encoding)this.decoder=new C0(M.encoding),this.encoding=M.encoding}function o(M){if(!(this instanceof o))return new o(M);let N=this instanceof i2();if(this._readableState=new X0(M,this,N),M){if(typeof M.read==="function")this._read=M.read;if(typeof M.destroy==="function")this._destroy=M.destroy;if(typeof M.construct==="function")this._construct=M.construct;if(M.signal&&!N)z(M.signal,this)}P.call(this,M),T.construct(this,()=>{if(this._readableState.needReadable)X6(this,this._readableState)})}o.prototype.destroy=T.destroy,o.prototype._undestroy=T.undestroy,o.prototype._destroy=function(M,N){N(M)},o.prototype[g.captureRejectionSymbol]=function(M){this.destroy(M)},o.prototype[F]=function(){let M;if(!this.destroyed)M=this.readableEnded?null:new a,this.destroy(M);return new K((N,s)=>L(this,(U0)=>U0&&U0!==M?s(U0):N(null)))},o.prototype.push=function(M,N){return j0(this,M,N,!1)},o.prototype.unshift=function(M,N){return j0(this,M,N,!0)};function j0(M,N,s,U0){A("readableAddChunk",N);let K0=M._readableState,d0;if((K0.state&i)===0){if(typeof N==="string"){if(s=s||K0.defaultEncoding,K0.encoding!==s)if(U0&&K0.encoding)N=V.from(N,s).toString(K0.encoding);else N=V.from(N,s),s=""}else if(N instanceof V)s="";else if(P._isUint8Array(N))N=P._uint8ArrayToBuffer(N),s="";else if(N!=null)d0=new R("chunk",["string","Buffer","Uint8Array"],N)}if(d0)C(M,d0);else if(N===null)K0.state&=~B0,l0(M,K0);else if((K0.state&i)!==0||N&&N.length>0)if(U0)if((K0.state&u)!==0)C(M,new x);else if(K0.destroyed||K0.errored)return!1;else Z0(M,K0,N,!0);else if(K0.ended)C(M,new h);else if(K0.destroyed||K0.errored)return!1;else if(K0.state&=~B0,K0.decoder&&!s)if(N=K0.decoder.write(N),K0.objectMode||N.length!==0)Z0(M,K0,N,!1);else X6(M,K0);else Z0(M,K0,N,!1);else if(!U0)K0.state&=~B0,X6(M,K0);return!K0.ended&&(K0.length<K0.highWaterMark||K0.length===0)}function Z0(M,N,s,U0){if(N.flowing&&N.length===0&&!N.sync&&M.listenerCount("data")>0){if((N.state&q0)!==0)N.awaitDrainWriters.clear();else N.awaitDrainWriters=null;N.dataEmitted=!0,M.emit("data",s)}else{if(N.length+=N.objectMode?1:s.length,U0)N.buffer.unshift(s);else N.buffer.push(s);if((N.state&N0)!==0)s0(M)}X6(M,N)}o.prototype.isPaused=function(){let M=this._readableState;return M[G0]===!0||M.flowing===!1},o.prototype.setEncoding=function(M){let N=new C0(M);this._readableState.decoder=N,this._readableState.encoding=this._readableState.decoder.encoding;let s=this._readableState.buffer,U0="";for(let K0 of s)U0+=N.write(K0);if(s.clear(),U0!=="")s.push(U0);return this._readableState.length=U0.length,this};var W2=1073741824;function U2(M){if(M>W2)throw new _("size","<= 1GiB",M);else M--,M|=M>>>1,M|=M>>>2,M|=M>>>4,M|=M>>>8,M|=M>>>16,M++;return M}function Z1(M,N){if(M<=0||N.length===0&&N.ended)return 0;if((N.state&i)!==0)return 1;if(Y(M)){if(N.flowing&&N.length)return N.buffer.first().length;return N.length}if(M<=N.length)return M;return N.ended?N.length:0}o.prototype.read=function(M){if(A("read",M),M===void 0)M=NaN;else if(!X(M))M=W(M,10);let N=this._readableState,s=M;if(M>N.highWaterMark)N.highWaterMark=U2(M);if(M!==0)N.state&=~c;if(M===0&&N.needReadable&&((N.highWaterMark!==0?N.length>=N.highWaterMark:N.length>0)||N.ended)){if(A("read: emitReadable",N.length,N.ended),N.length===0&&N.ended)z4(this);else s0(this);return null}if(M=Z1(M,N),M===0&&N.ended){if(N.length===0)z4(this);return null}let U0=(N.state&N0)!==0;if(A("need readable",U0),N.length===0||N.length-M<N.highWaterMark)U0=!0,A("length less than watermark",U0);if(N.ended||N.reading||N.destroyed||N.errored||!N.constructed)U0=!1,A("reading, ended or constructing",U0);else if(U0){if(A("do read"),N.state|=B0|A0,N.length===0)N.state|=N0;try{this._read(N.highWaterMark)}catch(d0){C(this,d0)}if(N.state&=~A0,!N.reading)M=Z1(s,N)}let K0;if(M>0)K0=OJ(M,N);else K0=null;if(K0===null)N.needReadable=N.length<=N.highWaterMark,M=0;else if(N.length-=M,N.multiAwaitDrain)N.awaitDrainWriters.clear();else N.awaitDrainWriters=null;if(N.length===0){if(!N.ended)N.needReadable=!0;if(s!==M&&N.ended)z4(this)}if(K0!==null&&!N.errorEmitted&&!N.closeEmitted)N.dataEmitted=!0,this.emit("data",K0);return K0};function l0(M,N){if(A("onEofChunk"),N.ended)return;if(N.decoder){let s=N.decoder.end();if(s&&s.length)N.buffer.push(s),N.length+=N.objectMode?1:s.length}if(N.ended=!0,N.sync)s0(M);else N.needReadable=!1,N.emittedReadable=!0,q6(M)}function s0(M){let N=M._readableState;if(A("emitReadable",N.needReadable,N.emittedReadable),N.needReadable=!1,!N.emittedReadable)A("emitReadable",N.flowing),N.emittedReadable=!0,$.nextTick(q6,M)}function q6(M){let N=M._readableState;if(A("emitReadable_",N.destroyed,N.length,N.ended),!N.destroyed&&!N.errored&&(N.length||N.ended))M.emit("readable"),N.emittedReadable=!1;N.needReadable=!N.flowing&&!N.ended&&N.length<=N.highWaterMark,DJ(M)}function X6(M,N){if(!N.readingMore&&N.constructed)N.readingMore=!0,$.nextTick(I2,M,N)}function I2(M,N){while(!N.reading&&!N.ended&&(N.length<N.highWaterMark||N.flowing&&N.length===0)){let s=N.length;if(A("maybeReadMore read 0"),M.read(0),s===N.length)break}N.readingMore=!1}o.prototype._read=function(M){throw new O("_read()")},o.prototype.pipe=function(M,N){let s=this,U0=this._readableState;if(U0.pipes.length===1){if(!U0.multiAwaitDrain)U0.multiAwaitDrain=!0,U0.awaitDrainWriters=new j(U0.awaitDrainWriters?[U0.awaitDrainWriters]:[])}U0.pipes.push(M),A("pipe count=%d opts=%j",U0.pipes.length,N);let K0=(!N||N.end!==!1)&&M!==$.stdout&&M!==$.stderr?G2:n6;if(U0.endEmitted)$.nextTick(K0);else s.once("end",K0);M.on("unpipe",d0);function d0(E1,c2){if(A("onunpipe"),E1===s){if(c2&&c2.hasUnpiped===!1)c2.hasUnpiped=!0,LB()}}function G2(){A("onend"),M.end()}let v1,AJ=!1;function LB(){if(A("cleanup"),M.removeListener("close",D4),M.removeListener("finish",C4),v1)M.removeListener("drain",v1);if(M.removeListener("error",N4),M.removeListener("unpipe",d0),s.removeListener("end",G2),s.removeListener("end",n6),s.removeListener("data",wJ),AJ=!0,v1&&U0.awaitDrainWriters&&(!M._writableState||M._writableState.needDrain))v1()}function RJ(){if(!AJ){if(U0.pipes.length===1&&U0.pipes[0]===M)A("false write response, pause",0),U0.awaitDrainWriters=M,U0.multiAwaitDrain=!1;else if(U0.pipes.length>1&&U0.pipes.includes(M))A("false write response, pause",U0.awaitDrainWriters.size),U0.awaitDrainWriters.add(M);s.pause()}if(!v1)v1=KB(s,M),M.on("drain",v1)}s.on("data",wJ);function wJ(E1){A("ondata");let c2=M.write(E1);if(A("dest.write",c2),c2===!1)RJ()}function N4(E1){if(A("onerror",E1),n6(),M.removeListener("error",N4),M.listenerCount("error")===0){let c2=M._writableState||M._readableState;if(c2&&!c2.errorEmitted)C(M,E1);else M.emit("error",E1)}}D(M,"error",N4);function D4(){M.removeListener("finish",C4),n6()}M.once("close",D4);function C4(){A("onfinish"),M.removeListener("close",D4),n6()}M.once("finish",C4);function n6(){A("unpipe"),s.unpipe(M)}if(M.emit("pipe",s),M.writableNeedDrain===!0)RJ();else if(!U0.flowing)A("pipe resume"),s.resume();return M};function KB(M,N){return function(){let s=M._readableState;if(s.awaitDrainWriters===N)A("pipeOnDrain",1),s.awaitDrainWriters=null;else if(s.multiAwaitDrain)A("pipeOnDrain",s.awaitDrainWriters.size),s.awaitDrainWriters.delete(N);if((!s.awaitDrainWriters||s.awaitDrainWriters.size===0)&&M.listenerCount("data"))M.resume()}}o.prototype.unpipe=function(M){let N=this._readableState,s={hasUnpiped:!1};if(N.pipes.length===0)return this;if(!M){let K0=N.pipes;N.pipes=[],this.pause();for(let d0=0;d0<K0.length;d0++)K0[d0].emit("unpipe",this,{hasUnpiped:!1});return this}let U0=q(N.pipes,M);if(U0===-1)return this;if(N.pipes.splice(U0,1),N.pipes.length===0)this.pause();return M.emit("unpipe",this,s),this},o.prototype.on=function(M,N){let s=P.prototype.on.call(this,M,N),U0=this._readableState;if(M==="data"){if(U0.readableListening=this.listenerCount("readable")>0,U0.flowing!==!1)this.resume()}else if(M==="readable"){if(!U0.endEmitted&&!U0.readableListening){if(U0.readableListening=U0.needReadable=!0,U0.flowing=!1,U0.emittedReadable=!1,A("on readable",U0.length,U0.reading),U0.length)s0(this);else if(!U0.reading)$.nextTick(VB,this)}}return s},o.prototype.addListener=o.prototype.on,o.prototype.removeListener=function(M,N){let s=P.prototype.removeListener.call(this,M,N);if(M==="readable")$.nextTick(NJ,this);return s},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(M){let N=P.prototype.removeAllListeners.apply(this,arguments);if(M==="readable"||M===void 0)$.nextTick(NJ,this);return N};function NJ(M){let N=M._readableState;if(N.readableListening=M.listenerCount("readable")>0,N.resumeScheduled&&N[G0]===!1)N.flowing=!0;else if(M.listenerCount("data")>0)M.resume();else if(!N.readableListening)N.flowing=null}function VB(M){A("readable nexttick read 0"),M.read(0)}o.prototype.resume=function(){let M=this._readableState;if(!M.flowing)A("resume"),M.flowing=!M.readableListening,HB(this,M);return M[G0]=!1,this};function HB(M,N){if(!N.resumeScheduled)N.resumeScheduled=!0,$.nextTick(jB,M,N)}function jB(M,N){if(A("resume",N.reading),!N.reading)M.read(0);if(N.resumeScheduled=!1,M.emit("resume"),DJ(M),N.flowing&&!N.reading)M.read(0)}o.prototype.pause=function(){if(A("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1)A("pause"),this._readableState.flowing=!1,this.emit("pause");return this._readableState[G0]=!0,this};function DJ(M){let N=M._readableState;A("flow",N.flowing);while(N.flowing&&M.read()!==null);}o.prototype.wrap=function(M){let N=!1;M.on("data",(U0)=>{if(!this.push(U0)&&M.pause)N=!0,M.pause()}),M.on("end",()=>{this.push(null)}),M.on("error",(U0)=>{C(this,U0)}),M.on("close",()=>{this.destroy()}),M.on("destroy",()=>{this.destroy()}),this._read=()=>{if(N&&M.resume)N=!1,M.resume()};let s=G(M);for(let U0=1;U0<s.length;U0++){let K0=s[U0];if(this[K0]===void 0&&typeof M[K0]==="function")this[K0]=M[K0].bind(M)}return this},o.prototype[H]=function(){return CJ(this)},o.prototype.iterator=function(M){if(M!==void 0)$0(M,"options");return CJ(this,M)};function CJ(M,N){if(typeof M.read!=="function")M=o.wrap(M,{objectMode:!0});let s=MB(M,N);return s.stream=M,s}async function*MB(M,N){let s=H0;function U0(G2){if(this===M)s(),s=H0;else s=G2}M.on("readable",U0);let K0,d0=L(M,{writable:!1},(G2)=>{K0=G2?v(K0,G2):null,s(),s=H0});try{while(!0){let G2=M.destroyed?null:M.read();if(G2!==null)yield G2;else if(K0)throw K0;else if(K0===null)return;else await new K(U0)}}catch(G2){throw K0=v(K0,G2),K0}finally{if((K0||(N===null||N===void 0?void 0:N.destroyOnReturn)!==!1)&&(K0===void 0||M._readableState.autoDestroy))T.destroyer(M,null);else M.off("readable",U0),d0()}}U(o.prototype,{readable:{__proto__:null,get(){let M=this._readableState;return!!M&&M.readable!==!1&&!M.destroyed&&!M.errorEmitted&&!M.endEmitted},set(M){if(this._readableState)this._readableState.readable=!!M}},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(M){if(this._readableState)this._readableState.flowing=M}},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(M){if(!this._readableState)return;this._readableState.destroyed=M}},readableEnded:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.endEmitted:!1}}}),U(X0.prototype,{pipesCount:{__proto__:null,get(){return this.pipes.length}},paused:{__proto__:null,get(){return this[G0]!==!1},set(M){this[G0]=!!M}}}),o._fromList=OJ;function OJ(M,N){if(N.length===0)return null;let s;if(N.objectMode)s=N.buffer.shift();else if(!M||M>=N.length){if(N.decoder)s=N.buffer.join("");else if(N.buffer.length===1)s=N.buffer.first();else s=N.buffer.concat(N.length);N.buffer.clear()}else s=N.buffer.consume(M,N.decoder);return s}function z4(M){let N=M._readableState;if(A("endReadable",N.endEmitted),!N.endEmitted)N.ended=!0,$.nextTick(FB,N,M)}function FB(M,N){if(A("endReadableNT",M.endEmitted,M.length),!M.errored&&!M.closeEmitted&&!M.endEmitted&&M.length===0){if(M.endEmitted=!0,N.emit("end"),N.writable&&N.allowHalfOpen===!1)$.nextTick(zB,N);else if(M.autoDestroy){let s=N._writableState;if(!s||s.autoDestroy&&(s.finished||s.writable===!1))N.destroy()}}}function zB(M){if(M.writable&&!M.writableEnded&&!M.destroyed)M.end()}o.from=function(M,N){return p(o,M,N)};var L4;function PJ(){if(L4===void 0)L4={};return L4}o.fromWeb=function(M,N){return PJ().newStreamReadableFromReadableStream(M,N)},o.toWeb=function(M,N){return PJ().newReadableStreamFromStreamReadable(M,N)},o.wrap=function(M,N){var s,U0;return new o({objectMode:(s=(U0=M.readableObjectMode)!==null&&U0!==void 0?U0:M.objectMode)!==null&&s!==void 0?s:!0,...N,destroy(K0,d0){T.destroyer(M,K0),d0(K0)}}).wrap(M)}}),_4=S0((Q,J)=>{var $=_1(),{ArrayPrototypeSlice:q,Error:X,FunctionPrototypeSymbolHasInstance:Y,ObjectDefineProperty:W,ObjectDefineProperties:U,ObjectSetPrototypeOf:G,StringPrototypeToLowerCase:B,Symbol:K,SymbolHasInstance:j}=T0();J.exports=$0,$0.WritableState=x;var{EventEmitter:F}=(e6(),B2(t6)),H=g4().Stream,{Buffer:E}=(d2(),B2(l2)),g=U6(),{addAbortSignal:P}=d8(),{getHighWaterMark:D,getDefaultHighWaterMark:V}=i8(),{ERR_INVALID_ARG_TYPE:z,ERR_METHOD_NOT_IMPLEMENTED:L,ERR_MULTIPLE_CALLBACK:A,ERR_STREAM_CANNOT_PIPE:y,ERR_STREAM_DESTROYED:T,ERR_STREAM_ALREADY_FINISHED:d,ERR_STREAM_NULL_VALUES:S,ERR_STREAM_WRITE_AFTER_END:v,ERR_UNKNOWN_ENCODING:R}=r0().codes,{errorOrDestroy:O}=g;G($0.prototype,H.prototype),G($0,H);function _(){}var h=K("kOnFinished");function x(w,k,m){if(typeof m!=="boolean")m=k instanceof i2();if(this.objectMode=!!(w&&w.objectMode),m)this.objectMode=this.objectMode||!!(w&&w.writableObjectMode);this.highWaterMark=w?D(this,w,"writableHighWaterMark",m):V(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;let t=!!(w&&w.decodeStrings===!1);this.decodeStrings=!t,this.defaultEncoding=w&&w.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=C.bind(void 0,k),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,a(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!w||w.emitClose!==!1,this.autoDestroy=!w||w.autoDestroy!==!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[h]=[]}function a(w){w.buffered=[],w.bufferedIndex=0,w.allBuffers=!0,w.allNoop=!0}x.prototype.getBuffer=function(){return q(this.buffered,this.bufferedIndex)},W(x.prototype,"bufferedRequestCount",{__proto__:null,get(){return this.buffered.length-this.bufferedIndex}});function $0(w){let k=this instanceof i2();if(!k&&!Y($0,this))return new $0(w);if(this._writableState=new x(w,this,k),w){if(typeof w.write==="function")this._write=w.write;if(typeof w.writev==="function")this._writev=w.writev;if(typeof w.destroy==="function")this._destroy=w.destroy;if(typeof w.final==="function")this._final=w.final;if(typeof w.construct==="function")this._construct=w.construct;if(w.signal)P(w.signal,this)}H.call(this,w),g.construct(this,()=>{let m=this._writableState;if(!m.writing)B0(this,m);c(this,m)})}W($0,j,{__proto__:null,value:function(w){if(Y(this,w))return!0;if(this!==$0)return!1;return w&&w._writableState instanceof x}}),$0.prototype.pipe=function(){O(this,new y)};function G0(w,k,m,t){let q0=w._writableState;if(typeof m==="function")t=m,m=q0.defaultEncoding;else{if(!m)m=q0.defaultEncoding;else if(m!=="buffer"&&!E.isEncoding(m))throw new R(m);if(typeof t!=="function")t=_}if(k===null)throw new S;else if(!q0.objectMode)if(typeof k==="string"){if(q0.decodeStrings!==!1)k=E.from(k,m),m="buffer"}else if(k instanceof E)m="buffer";else if(H._isUint8Array(k))k=H._uint8ArrayToBuffer(k),m="buffer";else throw new z("chunk",["string","Buffer","Uint8Array"],k);let Q0;if(q0.ending)Q0=new v;else if(q0.destroyed)Q0=new T("write");if(Q0)return $.nextTick(t,Q0),O(w,Q0,!0),Q0;return q0.pendingcb++,C0(w,q0,k,m,t)}$0.prototype.write=function(w,k,m){return G0(this,w,k,m)===!0},$0.prototype.cork=function(){this._writableState.corked++},$0.prototype.uncork=function(){let w=this._writableState;if(w.corked){if(w.corked--,!w.writing)B0(this,w)}},$0.prototype.setDefaultEncoding=function(w){if(typeof w==="string")w=B(w);if(!E.isEncoding(w))throw new R(w);return this._writableState.defaultEncoding=w,this};function C0(w,k,m,t,q0){let Q0=k.objectMode?1:m.length;k.length+=Q0;let I=k.length<k.highWaterMark;if(!I)k.needDrain=!0;if(k.writing||k.corked||k.errored||!k.constructed){if(k.buffered.push({chunk:m,encoding:t,callback:q0}),k.allBuffers&&t!=="buffer")k.allBuffers=!1;if(k.allNoop&&q0!==_)k.allNoop=!1}else k.writelen=Q0,k.writecb=q0,k.writing=!0,k.sync=!0,w._write(m,t,k.onwrite),k.sync=!1;return I&&!k.errored&&!k.destroyed}function p(w,k,m,t,q0,Q0,I){if(k.writelen=t,k.writecb=I,k.writing=!0,k.sync=!0,k.destroyed)k.onwrite(new T("write"));else if(m)w._writev(q0,k.onwrite);else w._write(q0,Q0,k.onwrite);k.sync=!1}function H0(w,k,m,t){--k.pendingcb,t(m),u(k),O(w,m)}function C(w,k){let m=w._writableState,t=m.sync,q0=m.writecb;if(typeof q0!=="function"){O(w,new A);return}if(m.writing=!1,m.writecb=null,m.length-=m.writelen,m.writelen=0,k){if(k.stack,!m.errored)m.errored=k;if(w._readableState&&!w._readableState.errored)w._readableState.errored=k;if(t)$.nextTick(H0,w,m,k,q0);else H0(w,m,k,q0)}else{if(m.buffered.length>m.bufferedIndex)B0(w,m);if(t)if(m.afterWriteTickInfo!==null&&m.afterWriteTickInfo.cb===q0)m.afterWriteTickInfo.count++;else m.afterWriteTickInfo={count:1,cb:q0,stream:w,state:m},$.nextTick(i,m.afterWriteTickInfo);else W0(w,m,1,q0)}}function i({stream:w,state:k,count:m,cb:t}){return k.afterWriteTickInfo=null,W0(w,k,m,t)}function W0(w,k,m,t){if(!k.ending&&!w.destroyed&&k.length===0&&k.needDrain)k.needDrain=!1,w.emit("drain");while(m-- >0)k.pendingcb--,t();if(k.destroyed)u(k);c(w,k)}function u(w){if(w.writing)return;for(let q0=w.bufferedIndex;q0<w.buffered.length;++q0){var k;let{chunk:Q0,callback:I}=w.buffered[q0],n=w.objectMode?1:Q0.length;w.length-=n,I((k=w.errored)!==null&&k!==void 0?k:new T("write"))}let m=w[h].splice(0);for(let q0=0;q0<m.length;q0++){var t;m[q0]((t=w.errored)!==null&&t!==void 0?t:new T("end"))}a(w)}function B0(w,k){if(k.corked||k.bufferProcessing||k.destroyed||!k.constructed)return;let{buffered:m,bufferedIndex:t,objectMode:q0}=k,Q0=m.length-t;if(!Q0)return;let I=t;if(k.bufferProcessing=!0,Q0>1&&w._writev){k.pendingcb-=Q0-1;let n=k.allNoop?_:(o)=>{for(let j0=I;j0<m.length;++j0)m[j0].callback(o)},X0=k.allNoop&&I===0?m:q(m,I);X0.allBuffers=k.allBuffers,p(w,k,!0,k.length,X0,"",n),a(k)}else{do{let{chunk:n,encoding:X0,callback:o}=m[I];m[I++]=null;let j0=q0?1:n.length;p(w,k,!1,j0,n,X0,o)}while(I<m.length&&!k.writing);if(I===m.length)a(k);else if(I>256)m.splice(0,I),k.bufferedIndex=0;else k.bufferedIndex=I}k.bufferProcessing=!1}$0.prototype._write=function(w,k,m){if(this._writev)this._writev([{chunk:w,encoding:k}],m);else throw new L("_write()")},$0.prototype._writev=null,$0.prototype.end=function(w,k,m){let t=this._writableState;if(typeof w==="function")m=w,w=null,k=null;else if(typeof k==="function")m=k,k=null;let q0;if(w!==null&&w!==void 0){let Q0=G0(this,w,k);if(Q0 instanceof X)q0=Q0}if(t.corked)t.corked=1,this.uncork();if(q0);else if(!t.errored&&!t.ending)t.ending=!0,c(this,t,!0),t.ended=!0;else if(t.finished)q0=new d("end");else if(t.destroyed)q0=new T("end");if(typeof m==="function")if(q0||t.finished)$.nextTick(m,q0);else t[h].push(m);return this};function M0(w){return w.ending&&!w.destroyed&&w.constructed&&w.length===0&&!w.errored&&w.buffered.length===0&&!w.finished&&!w.writing&&!w.errorEmitted&&!w.closeEmitted}function A0(w,k){let m=!1;function t(q0){if(m){O(w,q0!==null&&q0!==void 0?q0:A());return}if(m=!0,k.pendingcb--,q0){let Q0=k[h].splice(0);for(let I=0;I<Q0.length;I++)Q0[I](q0);O(w,q0,k.sync)}else if(M0(k))k.prefinished=!0,w.emit("prefinish"),k.pendingcb++,$.nextTick(l,w,k)}k.sync=!0,k.pendingcb++;try{w._final(t)}catch(q0){t(q0)}k.sync=!1}function N0(w,k){if(!k.prefinished&&!k.finalCalled)if(typeof w._final==="function"&&!k.destroyed)k.finalCalled=!0,A0(w,k);else k.prefinished=!0,w.emit("prefinish")}function c(w,k,m){if(M0(k)){if(N0(w,k),k.pendingcb===0){if(m)k.pendingcb++,$.nextTick((t,q0)=>{if(M0(q0))l(t,q0);else q0.pendingcb--},w,k);else if(M0(k))k.pendingcb++,l(w,k)}}}function l(w,k){k.pendingcb--,k.finished=!0;let m=k[h].splice(0);for(let t=0;t<m.length;t++)m[t]();if(w.emit("finish"),k.autoDestroy){let t=w._readableState;if(!t||t.autoDestroy&&(t.endEmitted||t.readable===!1))w.destroy()}}U($0.prototype,{closed:{__proto__:null,get(){return this._writableState?this._writableState.closed:!1}},destroyed:{__proto__:null,get(){return this._writableState?this._writableState.destroyed:!1},set(w){if(this._writableState)this._writableState.destroyed=w}},writable:{__proto__:null,get(){let w=this._writableState;return!!w&&w.writable!==!1&&!w.destroyed&&!w.errored&&!w.ending&&!w.ended},set(w){if(this._writableState)this._writableState.writable=!!w}},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 w=this._writableState;if(!w)return!1;return!w.destroyed&&!w.ending&&w.needDrain}},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 e=g.destroy;$0.prototype.destroy=function(w,k){let m=this._writableState;if(!m.destroyed&&(m.bufferedIndex<m.buffered.length||m[h].length))$.nextTick(u,m);return e.call(this,w,k),this},$0.prototype._undestroy=g.undestroy,$0.prototype._destroy=function(w,k){k(w)},$0.prototype[F.captureRejectionSymbol]=function(w){this.destroy(w)};var L0;function D0(){if(L0===void 0)L0={};return L0}$0.fromWeb=function(w,k){return D0().newStreamWritableFromWritableStream(w,k)},$0.toWeb=function(w){return D0().newWritableStreamFromStreamWritable(w)}}),IK=S0((Q,J)=>{var $=_1(),q=(d2(),B2(l2)),{isReadable:X,isWritable:Y,isIterable:W,isNodeStream:U,isReadableNodeStream:G,isWritableNodeStream:B,isDuplexNodeStream:K,isReadableStream:j,isWritableStream:F}=n2(),H=U1(),{AbortError:E,codes:{ERR_INVALID_ARG_TYPE:g,ERR_INVALID_RETURN_VALUE:P}}=r0(),{destroyer:D}=U6(),V=i2(),z=n8(),L=_4(),{createDeferredPromise:A}=e0(),y=M$(),T=globalThis.Blob||q.Blob,d=typeof T<"u"?function(h){return h instanceof T}:function(h){return!1},S=globalThis.AbortController||Q8().AbortController,{FunctionPrototypeCall:v}=T0();class R extends V{constructor(h){super(h);if((h===null||h===void 0?void 0:h.readable)===!1)this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0;if((h===null||h===void 0?void 0:h.writable)===!1)this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0}}J.exports=function h(x,a){if(K(x))return x;if(G(x))return _({readable:x});if(B(x))return _({writable:x});if(U(x))return _({writable:!1,readable:!1});if(j(x))return _({readable:z.fromWeb(x)});if(F(x))return _({writable:L.fromWeb(x)});if(typeof x==="function"){let{value:G0,write:C0,final:p,destroy:H0}=O(x);if(W(G0))return y(R,G0,{objectMode:!0,write:C0,final:p,destroy:H0});let C=G0===null||G0===void 0?void 0:G0.then;if(typeof C==="function"){let i,W0=v(C,G0,(u)=>{if(u!=null)throw new P("nully","body",u)},(u)=>{D(i,u)});return i=new R({objectMode:!0,readable:!1,write:C0,final(u){p(async()=>{try{await W0,$.nextTick(u,null)}catch(B0){$.nextTick(u,B0)}})},destroy:H0})}throw new P("Iterable, AsyncIterable or AsyncFunction",a,G0)}if(d(x))return h(x.arrayBuffer());if(W(x))return y(R,x,{objectMode:!0,writable:!1});if(j(x===null||x===void 0?void 0:x.readable)&&F(x===null||x===void 0?void 0:x.writable))return R.fromWeb(x);if(typeof(x===null||x===void 0?void 0:x.writable)==="object"||typeof(x===null||x===void 0?void 0:x.readable)==="object"){let G0=x!==null&&x!==void 0&&x.readable?G(x===null||x===void 0?void 0:x.readable)?x===null||x===void 0?void 0:x.readable:h(x.readable):void 0,C0=x!==null&&x!==void 0&&x.writable?B(x===null||x===void 0?void 0:x.writable)?x===null||x===void 0?void 0:x.writable:h(x.writable):void 0;return _({readable:G0,writable:C0})}let $0=x===null||x===void 0?void 0:x.then;if(typeof $0==="function"){let G0;return v($0,x,(C0)=>{if(C0!=null)G0.push(C0);G0.push(null)},(C0)=>{D(G0,C0)}),G0=new R({objectMode:!0,writable:!1,read(){}})}throw new g(a,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],x)};function O(h){let{promise:x,resolve:a}=A(),$0=new S,G0=$0.signal;return{value:h(async function*(){while(!0){let C0=x;x=null;let{chunk:p,done:H0,cb:C}=await C0;if($.nextTick(C),H0)return;if(G0.aborted)throw new E(void 0,{cause:G0.reason});({promise:x,resolve:a}=A()),yield p}}(),{signal:G0}),write(C0,p,H0){let C=a;a=null,C({chunk:C0,done:!1,cb:H0})},final(C0){let p=a;a=null,p({done:!0,cb:C0})},destroy(C0,p){$0.abort(),p(C0)}}}function _(h){let x=h.readable&&typeof h.readable.read!=="function"?z.wrap(h.readable):h.readable,a=h.writable,$0=!!X(x),G0=!!Y(a),C0,p,H0,C,i;function W0(u){let B0=C;if(C=null,B0)B0(u);else if(u)i.destroy(u)}if(i=new R({readableObjectMode:!!(x!==null&&x!==void 0&&x.readableObjectMode),writableObjectMode:!!(a!==null&&a!==void 0&&a.writableObjectMode),readable:$0,writable:G0}),G0)H(a,(u)=>{if(G0=!1,u)D(x,u);W0(u)}),i._write=function(u,B0,M0){if(a.write(u,B0))M0();else C0=M0},i._final=function(u){a.end(),p=u},a.on("drain",function(){if(C0){let u=C0;C0=null,u()}}),a.on("finish",function(){if(p){let u=p;p=null,u()}});if($0)H(x,(u)=>{if($0=!1,u)D(x,u);W0(u)}),x.on("readable",function(){if(H0){let u=H0;H0=null,u()}}),x.on("end",function(){i.push(null)}),i._read=function(){while(!0){let u=x.read();if(u===null){H0=i._read;return}if(!i.push(u))return}};return i._destroy=function(u,B0){if(!u&&C!==null)u=new E;if(H0=null,C0=null,p=null,C===null)B0(u);else C=B0,D(a,u),D(x,u)},i}}),i2=S0((Q,J)=>{var{ObjectDefineProperties:$,ObjectGetOwnPropertyDescriptor:q,ObjectKeys:X,ObjectSetPrototypeOf:Y}=T0();J.exports=G;var W=n8(),U=_4();Y(G.prototype,W.prototype),Y(G,W);{let F=X(U.prototype);for(let H=0;H<F.length;H++){let E=F[H];if(!G.prototype[E])G.prototype[E]=U.prototype[E]}}function G(F){if(!(this instanceof G))return new G(F);if(W.call(this,F),U.call(this,F),F){if(this.allowHalfOpen=F.allowHalfOpen!==!1,F.readable===!1)this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0;if(F.writable===!1)this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0}else this.allowHalfOpen=!0}$(G.prototype,{writable:{__proto__:null,...q(U.prototype,"writable")},writableHighWaterMark:{__proto__:null,...q(U.prototype,"writableHighWaterMark")},writableObjectMode:{__proto__:null,...q(U.prototype,"writableObjectMode")},writableBuffer:{__proto__:null,...q(U.prototype,"writableBuffer")},writableLength:{__proto__:null,...q(U.prototype,"writableLength")},writableFinished:{__proto__:null,...q(U.prototype,"writableFinished")},writableCorked:{__proto__:null,...q(U.prototype,"writableCorked")},writableEnded:{__proto__:null,...q(U.prototype,"writableEnded")},writableNeedDrain:{__proto__:null,...q(U.prototype,"writableNeedDrain")},destroyed:{__proto__:null,get(){if(this._readableState===void 0||this._writableState===void 0)return!1;return this._readableState.destroyed&&this._writableState.destroyed},set(F){if(this._readableState&&this._writableState)this._readableState.destroyed=F,this._writableState.destroyed=F}}});var B;function K(){if(B===void 0)B={};return B}G.fromWeb=function(F,H){return K().newStreamDuplexFromReadableWritablePair(F,H)},G.toWeb=function(F){return K().newReadableWritablePairFromDuplex(F)};var j;G.from=function(F){if(!j)j=IK();return j(F,"body")}}),F$=S0((Q,J)=>{var{ObjectSetPrototypeOf:$,Symbol:q}=T0();J.exports=G;var{ERR_METHOD_NOT_IMPLEMENTED:X}=r0().codes,Y=i2(),{getHighWaterMark:W}=i8();$(G.prototype,Y.prototype),$(G,Y);var U=q("kCallback");function G(j){if(!(this instanceof G))return new G(j);let F=j?W(this,j,"readableHighWaterMark",!0):null;if(F===0)j={...j,highWaterMark:null,readableHighWaterMark:F,writableHighWaterMark:j.writableHighWaterMark||0};if(Y.call(this,j),this._readableState.sync=!1,this[U]=null,j){if(typeof j.transform==="function")this._transform=j.transform;if(typeof j.flush==="function")this._flush=j.flush}this.on("prefinish",K)}function B(j){if(typeof this._flush==="function"&&!this.destroyed)this._flush((F,H)=>{if(F){if(j)j(F);else this.destroy(F);return}if(H!=null)this.push(H);if(this.push(null),j)j()});else if(this.push(null),j)j()}function K(){if(this._final!==B)B.call(this)}G.prototype._final=B,G.prototype._transform=function(j,F,H){throw new X("_transform()")},G.prototype._write=function(j,F,H){let E=this._readableState,g=this._writableState,P=E.length;this._transform(j,F,(D,V)=>{if(D){H(D);return}if(V!=null)this.push(V);if(g.ended||P===E.length||E.length<E.highWaterMark)H();else this[U]=H})},G.prototype._read=function(){if(this[U]){let j=this[U];this[U]=null,j()}}}),z$=S0((Q,J)=>{var{ObjectSetPrototypeOf:$}=T0();J.exports=X;var q=F$();$(X.prototype,q.prototype),$(X,q);function X(Y){if(!(this instanceof X))return new X(Y);q.call(this,Y)}X.prototype._transform=function(Y,W,U){U(null,Y)}}),f4=S0((Q,J)=>{var $=_1(),{ArrayIsArray:q,Promise:X,SymbolAsyncIterator:Y,SymbolDispose:W}=T0(),U=U1(),{once:G}=e0(),B=U6(),K=i2(),{aggregateTwoErrors:j,codes:{ERR_INVALID_ARG_TYPE:F,ERR_INVALID_RETURN_VALUE:H,ERR_MISSING_ARGS:E,ERR_STREAM_DESTROYED:g,ERR_STREAM_PREMATURE_CLOSE:P},AbortError:D}=r0(),{validateFunction:V,validateAbortSignal:z}=J8(),{isIterable:L,isReadable:A,isReadableNodeStream:y,isNodeStream:T,isTransformStream:d,isWebStream:S,isReadableStream:v,isReadableFinished:R}=n2(),O=globalThis.AbortController||Q8().AbortController,_,h,x;function a(u,B0,M0){let A0=!1;u.on("close",()=>{A0=!0});let N0=U(u,{readable:B0,writable:M0},(c)=>{A0=!c});return{destroy:(c)=>{if(A0)return;A0=!0,B.destroyer(u,c||new g("pipe"))},cleanup:N0}}function $0(u){return V(u[u.length-1],"streams[stream.length - 1]"),u.pop()}function G0(u){if(L(u))return u;else if(y(u))return C0(u);throw new F("val",["Readable","Iterable","AsyncIterable"],u)}async function*C0(u){if(!h)h=n8();yield*h.prototype[Y].call(u)}async function p(u,B0,M0,{end:A0}){let N0,c=null,l=(D0)=>{if(D0)N0=D0;if(c){let w=c;c=null,w()}},e=()=>new X((D0,w)=>{if(N0)w(N0);else c=()=>{if(N0)w(N0);else D0()}});B0.on("drain",l);let L0=U(B0,{readable:!1},l);try{if(B0.writableNeedDrain)await e();for await(let D0 of u)if(!B0.write(D0))await e();if(A0)B0.end(),await e();M0()}catch(D0){M0(N0!==D0?j(N0,D0):D0)}finally{L0(),B0.off("drain",l)}}async function H0(u,B0,M0,{end:A0}){if(d(B0))B0=B0.writable;let N0=B0.getWriter();try{for await(let c of u)await N0.ready,N0.write(c).catch(()=>{});if(await N0.ready,A0)await N0.close();M0()}catch(c){try{await N0.abort(c),M0(c)}catch(l){M0(l)}}}function C(...u){return i(u,G($0(u)))}function i(u,B0,M0){if(u.length===1&&q(u[0]))u=u[0];if(u.length<2)throw new E("streams");let A0=new O,N0=A0.signal,c=M0===null||M0===void 0?void 0:M0.signal,l=[];z(c,"options.signal");function e(){q0(new D)}x=x||e0().addAbortListener;let L0;if(c)L0=x(c,e);let D0,w,k=[],m=0;function t(o){q0(o,--m===0)}function q0(o,j0){var Z0;if(o&&(!D0||D0.code==="ERR_STREAM_PREMATURE_CLOSE"))D0=o;if(!D0&&!j0)return;while(k.length)k.shift()(D0);if((Z0=L0)===null||Z0===void 0||Z0[W](),A0.abort(),j0){if(!D0)l.forEach((W2)=>W2());$.nextTick(B0,D0,w)}}let Q0;for(let o=0;o<u.length;o++){let j0=u[o],Z0=o<u.length-1,W2=o>0,U2=Z0||(M0===null||M0===void 0?void 0:M0.end)!==!1,Z1=o===u.length-1;if(T(j0)){let l0=function(s0){if(s0&&s0.name!=="AbortError"&&s0.code!=="ERR_STREAM_PREMATURE_CLOSE")t(s0)};var I=l0;if(U2){let{destroy:s0,cleanup:q6}=a(j0,Z0,W2);if(k.push(s0),A(j0)&&Z1)l.push(q6)}if(j0.on("error",l0),A(j0)&&Z1)l.push(()=>{j0.removeListener("error",l0)})}if(o===0)if(typeof j0==="function"){if(Q0=j0({signal:N0}),!L(Q0))throw new H("Iterable, AsyncIterable or Stream","source",Q0)}else if(L(j0)||y(j0)||d(j0))Q0=j0;else Q0=K.from(j0);else if(typeof j0==="function"){if(d(Q0)){var n;Q0=G0((n=Q0)===null||n===void 0?void 0:n.readable)}else Q0=G0(Q0);if(Q0=j0(Q0,{signal:N0}),Z0){if(!L(Q0,!0))throw new H("AsyncIterable",`transform[${o-1}]`,Q0)}else{var X0;if(!_)_=z$();let l0=new _({objectMode:!0}),s0=(X0=Q0)===null||X0===void 0?void 0:X0.then;if(typeof s0==="function")m++,s0.call(Q0,(I2)=>{if(w=I2,I2!=null)l0.write(I2);if(U2)l0.end();$.nextTick(t)},(I2)=>{l0.destroy(I2),$.nextTick(t,I2)});else if(L(Q0,!0))m++,p(Q0,l0,t,{end:U2});else if(v(Q0)||d(Q0)){let I2=Q0.readable||Q0;m++,p(I2,l0,t,{end:U2})}else throw new H("AsyncIterable or Promise","destination",Q0);Q0=l0;let{destroy:q6,cleanup:X6}=a(Q0,!1,!0);if(k.push(q6),Z1)l.push(X6)}}else if(T(j0)){if(y(Q0)){m+=2;let l0=W0(Q0,j0,t,{end:U2});if(A(j0)&&Z1)l.push(l0)}else if(d(Q0)||v(Q0)){let l0=Q0.readable||Q0;m++,p(l0,j0,t,{end:U2})}else if(L(Q0))m++,p(Q0,j0,t,{end:U2});else throw new F("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],Q0);Q0=j0}else if(S(j0)){if(y(Q0))m++,H0(G0(Q0),j0,t,{end:U2});else if(v(Q0)||L(Q0))m++,H0(Q0,j0,t,{end:U2});else if(d(Q0))m++,H0(Q0.readable,j0,t,{end:U2});else throw new F("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],Q0);Q0=j0}else Q0=K.from(j0)}if(N0!==null&&N0!==void 0&&N0.aborted||c!==null&&c!==void 0&&c.aborted)$.nextTick(e);return Q0}function W0(u,B0,M0,{end:A0}){let N0=!1;if(B0.on("close",()=>{if(!N0)M0(new P)}),u.pipe(B0,{end:!1}),A0){let l=function(){N0=!0,B0.end()};var c=l;if(R(u))$.nextTick(l);else u.once("end",l)}else M0();return U(u,{readable:!0,writable:!1},(l)=>{let e=u._readableState;if(l&&l.code==="ERR_STREAM_PREMATURE_CLOSE"&&e&&e.ended&&!e.errored&&!e.errorEmitted)u.once("end",M0).once("error",M0);else M0(l)}),U(B0,{readable:!1,writable:!0},M0)}J.exports={pipelineImpl:i,pipeline:C}}),L$=S0((Q,J)=>{var{pipeline:$}=f4(),q=i2(),{destroyer:X}=U6(),{isNodeStream:Y,isReadable:W,isWritable:U,isWebStream:G,isTransformStream:B,isWritableStream:K,isReadableStream:j}=n2(),{AbortError:F,codes:{ERR_INVALID_ARG_VALUE:H,ERR_MISSING_ARGS:E}}=r0(),g=U1();J.exports=function(...P){if(P.length===0)throw new E("streams");if(P.length===1)return q.from(P[0]);let D=[...P];if(typeof P[0]==="function")P[0]=q.from(P[0]);if(typeof P[P.length-1]==="function"){let O=P.length-1;P[O]=q.from(P[O])}for(let O=0;O<P.length;++O){if(!Y(P[O])&&!G(P[O]))continue;if(O<P.length-1&&!(W(P[O])||j(P[O])||B(P[O])))throw new H(`streams[${O}]`,D[O],"must be readable");if(O>0&&!(U(P[O])||K(P[O])||B(P[O])))throw new H(`streams[${O}]`,D[O],"must be writable")}let V,z,L,A,y;function T(O){let _=A;if(A=null,_)_(O);else if(O)y.destroy(O);else if(!R&&!v)y.destroy()}let d=P[0],S=$(P,T),v=!!(U(d)||K(d)||B(d)),R=!!(W(S)||j(S)||B(S));if(y=new q({writableObjectMode:!!(d!==null&&d!==void 0&&d.writableObjectMode),readableObjectMode:!!(S!==null&&S!==void 0&&S.readableObjectMode),writable:v,readable:R}),v){if(Y(d))y._write=function(_,h,x){if(d.write(_,h))x();else V=x},y._final=function(_){d.end(),z=_},d.on("drain",function(){if(V){let _=V;V=null,_()}});else if(G(d)){let _=(B(d)?d.writable:d).getWriter();y._write=async function(h,x,a){try{await _.ready,_.write(h).catch(()=>{}),a()}catch($0){a($0)}},y._final=async function(h){try{await _.ready,_.close().catch(()=>{}),z=h}catch(x){h(x)}}}let O=B(S)?S.readable:S;g(O,()=>{if(z){let _=z;z=null,_()}})}if(R){if(Y(S))S.on("readable",function(){if(L){let O=L;L=null,O()}}),S.on("end",function(){y.push(null)}),y._read=function(){while(!0){let O=S.read();if(O===null){L=y._read;return}if(!y.push(O))return}};else if(G(S)){let O=(B(S)?S.readable:S).getReader();y._read=async function(){while(!0)try{let{value:_,done:h}=await O.read();if(!y.push(_))return;if(h){y.push(null);return}}catch{return}}}}return y._destroy=function(O,_){if(!O&&A!==null)O=new F;if(L=null,V=null,z=null,A===null)_(O);else if(A=_,Y(S))X(S,O)},y}}),SK=S0((Q,J)=>{var $=globalThis.AbortController||Q8().AbortController,{codes:{ERR_INVALID_ARG_VALUE:q,ERR_INVALID_ARG_TYPE:X,ERR_MISSING_ARGS:Y,ERR_OUT_OF_RANGE:W},AbortError:U}=r0(),{validateAbortSignal:G,validateInteger:B,validateObject:K}=J8(),j=T0().Symbol("kWeak"),F=T0().Symbol("kResistStopPropagation"),{finished:H}=U1(),E=L$(),{addAbortSignalNoValidate:g}=d8(),{isWritable:P,isNodeStream:D}=n2(),{deprecate:V}=e0(),{ArrayPrototypePush:z,Boolean:L,MathFloor:A,Number:y,NumberIsNaN:T,Promise:d,PromiseReject:S,PromiseResolve:v,PromisePrototypeThen:R,Symbol:O}=T0(),_=O("kEmpty"),h=O("kEof");function x(c,l){if(l!=null)K(l,"options");if((l===null||l===void 0?void 0:l.signal)!=null)G(l.signal,"options.signal");if(D(c)&&!P(c))throw new q("stream",c,"must be writable");let e=E(this,c);if(l!==null&&l!==void 0&&l.signal)g(l.signal,e);return e}function a(c,l){if(typeof c!=="function")throw new X("fn",["Function","AsyncFunction"],c);if(l!=null)K(l,"options");if((l===null||l===void 0?void 0:l.signal)!=null)G(l.signal,"options.signal");let e=1;if((l===null||l===void 0?void 0:l.concurrency)!=null)e=A(l.concurrency);let L0=e-1;if((l===null||l===void 0?void 0:l.highWaterMark)!=null)L0=A(l.highWaterMark);return B(e,"options.concurrency",1),B(L0,"options.highWaterMark",0),L0+=e,async function*(){let D0=e0().AbortSignalAny([l===null||l===void 0?void 0:l.signal].filter(L)),w=this,k=[],m={signal:D0},t,q0,Q0=!1,I=0;function n(){Q0=!0,X0()}function X0(){I-=1,o()}function o(){if(q0&&!Q0&&I<e&&k.length<L0)q0(),q0=null}async function j0(){try{for await(let Z0 of w){if(Q0)return;if(D0.aborted)throw new U;try{if(Z0=c(Z0,m),Z0===_)continue;Z0=v(Z0)}catch(W2){Z0=S(W2)}if(I+=1,R(Z0,X0,n),k.push(Z0),t)t(),t=null;if(!Q0&&(k.length>=L0||I>=e))await new d((W2)=>{q0=W2})}k.push(h)}catch(Z0){let W2=S(Z0);R(W2,X0,n),k.push(W2)}finally{if(Q0=!0,t)t(),t=null}}j0();try{while(!0){while(k.length>0){let Z0=await k[0];if(Z0===h)return;if(D0.aborted)throw new U;if(Z0!==_)yield Z0;k.shift(),o()}await new d((Z0)=>{t=Z0})}}finally{if(Q0=!0,q0)q0(),q0=null}}.call(this)}function $0(c=void 0){if(c!=null)K(c,"options");if((c===null||c===void 0?void 0:c.signal)!=null)G(c.signal,"options.signal");return async function*(){let l=0;for await(let L0 of this){var e;if(c!==null&&c!==void 0&&(e=c.signal)!==null&&e!==void 0&&e.aborted)throw new U({cause:c.signal.reason});yield[l++,L0]}}.call(this)}async function G0(c,l=void 0){for await(let e of C.call(this,c,l))return!0;return!1}async function C0(c,l=void 0){if(typeof c!=="function")throw new X("fn",["Function","AsyncFunction"],c);return!await G0.call(this,async(...e)=>{return!await c(...e)},l)}async function p(c,l){for await(let e of C.call(this,c,l))return e;return}async function H0(c,l){if(typeof c!=="function")throw new X("fn",["Function","AsyncFunction"],c);async function e(L0,D0){return await c(L0,D0),_}for await(let L0 of a.call(this,e,l));}function C(c,l){if(typeof c!=="function")throw new X("fn",["Function","AsyncFunction"],c);async function e(L0,D0){if(await c(L0,D0))return L0;return _}return a.call(this,e,l)}class i extends Y{constructor(){super("reduce");this.message="Reduce of an empty stream requires an initial value"}}async function W0(c,l,e){var L0;if(typeof c!=="function")throw new X("reducer",["Function","AsyncFunction"],c);if(e!=null)K(e,"options");if((e===null||e===void 0?void 0:e.signal)!=null)G(e.signal,"options.signal");let D0=arguments.length>1;if(e!==null&&e!==void 0&&(L0=e.signal)!==null&&L0!==void 0&&L0.aborted){let q0=new U(void 0,{cause:e.signal.reason});throw this.once("error",()=>{}),await H(this.destroy(q0)),q0}let w=new $,k=w.signal;if(e!==null&&e!==void 0&&e.signal){let q0={once:!0,[j]:this,[F]:!0};e.signal.addEventListener("abort",()=>w.abort(),q0)}let m=!1;try{for await(let q0 of this){var t;if(m=!0,e!==null&&e!==void 0&&(t=e.signal)!==null&&t!==void 0&&t.aborted)throw new U;if(!D0)l=q0,D0=!0;else l=await c(l,q0,{signal:k})}if(!m&&!D0)throw new i}finally{w.abort()}return l}async function u(c){if(c!=null)K(c,"options");if((c===null||c===void 0?void 0:c.signal)!=null)G(c.signal,"options.signal");let l=[];for await(let L0 of this){var e;if(c!==null&&c!==void 0&&(e=c.signal)!==null&&e!==void 0&&e.aborted)throw new U(void 0,{cause:c.signal.reason});z(l,L0)}return l}function B0(c,l){let e=a.call(this,c,l);return async function*(){for await(let L0 of e)yield*L0}.call(this)}function M0(c){if(c=y(c),T(c))return 0;if(c<0)throw new W("number",">= 0",c);return c}function A0(c,l=void 0){if(l!=null)K(l,"options");if((l===null||l===void 0?void 0:l.signal)!=null)G(l.signal,"options.signal");return c=M0(c),async function*(){var e;if(l!==null&&l!==void 0&&(e=l.signal)!==null&&e!==void 0&&e.aborted)throw new U;for await(let D0 of this){var L0;if(l!==null&&l!==void 0&&(L0=l.signal)!==null&&L0!==void 0&&L0.aborted)throw new U;if(c--<=0)yield D0}}.call(this)}function N0(c,l=void 0){if(l!=null)K(l,"options");if((l===null||l===void 0?void 0:l.signal)!=null)G(l.signal,"options.signal");return c=M0(c),async function*(){var e;if(l!==null&&l!==void 0&&(e=l.signal)!==null&&e!==void 0&&e.aborted)throw new U;for await(let D0 of this){var L0;if(l!==null&&l!==void 0&&(L0=l.signal)!==null&&L0!==void 0&&L0.aborted)throw new U;if(c-- >0)yield D0;if(c<=0)return}}.call(this)}J.exports.streamReturningOperators={asIndexedPairs:V($0,"readable.asIndexedPairs will be removed in a future version."),drop:A0,filter:C,flatMap:B0,map:a,take:N0,compose:x},J.exports.promiseReturningOperators={every:C0,forEach:H0,reduce:W0,toArray:u,some:G0,find:p}}),N$=S0((Q,J)=>{var{ArrayPrototypePop:$,Promise:q}=T0(),{isIterable:X,isNodeStream:Y,isWebStream:W}=n2(),{pipelineImpl:U}=f4(),{finished:G}=U1();D$();function B(...K){return new q((j,F)=>{let H,E,g=K[K.length-1];if(g&&typeof g==="object"&&!Y(g)&&!X(g)&&!W(g)){let P=$(K);H=P.signal,E=P.end}U(K,(P,D)=>{if(P)F(P);else j(D)},{signal:H,end:E})})}J.exports={finished:G,pipeline:B}}),D$=S0((Q,J)=>{var{Buffer:$}=(d2(),B2(l2)),{ObjectDefineProperty:q,ObjectKeys:X,ReflectApply:Y}=T0(),{promisify:{custom:W}}=e0(),{streamReturningOperators:U,promiseReturningOperators:G}=SK(),{codes:{ERR_ILLEGAL_CONSTRUCTOR:B}}=r0(),K=L$(),{setDefaultHighWaterMark:j,getDefaultHighWaterMark:F}=i8(),{pipeline:H}=f4(),{destroyer:E}=U6(),g=U1(),P=N$(),D=n2(),V=J.exports=g4().Stream;V.isDestroyed=D.isDestroyed,V.isDisturbed=D.isDisturbed,V.isErrored=D.isErrored,V.isReadable=D.isReadable,V.isWritable=D.isWritable,V.Readable=n8();for(let L of X(U)){let A=function(...T){if(new.target)throw B();return V.Readable.from(Y(y,this,T))},y=U[L];q(A,"name",{__proto__:null,value:y.name}),q(A,"length",{__proto__:null,value:y.length}),q(V.Readable.prototype,L,{__proto__:null,value:A,enumerable:!1,configurable:!0,writable:!0})}for(let L of X(G)){let A=function(...T){if(new.target)throw B();return Y(y,this,T)},y=G[L];q(A,"name",{__proto__:null,value:y.name}),q(A,"length",{__proto__:null,value:y.length}),q(V.Readable.prototype,L,{__proto__:null,value:A,enumerable:!1,configurable:!0,writable:!0})}V.Writable=_4(),V.Duplex=i2(),V.Transform=F$(),V.PassThrough=z$(),V.pipeline=H;var{addAbortSignal:z}=d8();V.addAbortSignal=z,V.finished=g,V.destroy=E,V.compose=K,V.setDefaultHighWaterMark=j,V.getDefaultHighWaterMark=F,q(V,"promises",{__proto__:null,configurable:!0,enumerable:!0,get(){return P}}),q(H,W,{__proto__:null,enumerable:!0,get(){return P.pipeline}}),q(g,W,{__proto__:null,enumerable:!0,get(){return P.finished}}),V.Stream=V,V._isUint8Array=function(L){return L instanceof Uint8Array},V._uint8ArrayToBuffer=function(L){return $.from(L.buffer,L.byteOffset,L.byteLength)}}),ZK=S0((Q,J)=>{var $=o8();{let q=D$(),X=N$(),Y=q.Readable.destroy;J.exports=q.Readable,J.exports._uint8ArrayToBuffer=q._uint8ArrayToBuffer,J.exports._isUint8Array=q._isUint8Array,J.exports.isDisturbed=q.isDisturbed,J.exports.isErrored=q.isErrored,J.exports.isReadable=q.isReadable,J.exports.Readable=q.Readable,J.exports.Writable=q.Writable,J.exports.Duplex=q.Duplex,J.exports.Transform=q.Transform,J.exports.PassThrough=q.PassThrough,J.exports.addAbortSignal=q.addAbortSignal,J.exports.finished=q.finished,J.exports.destroy=q.destroy,J.exports.destroy=Y,J.exports.pipeline=q.pipeline,J.exports.compose=q.compose,Object.defineProperty(q,"promises",{configurable:!0,enumerable:!0,get(){return X}}),J.exports.Stream=q.Stream}J.exports.default=J.exports});C$.exports=ZK()});var o2=f((EK)=>{EK.base64=!0;EK.array=!0;EK.string=!0;EK.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u";EK.nodebuffer=typeof Buffer<"u";EK.uint8array=typeof Uint8Array<"u";if(typeof ArrayBuffer>"u")EK.blob=!1;else{r8=new ArrayBuffer(0);try{EK.blob=new Blob([r8],{type:"application/zip"}).size===0}catch(Q){try{h4=self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder,a8=new h4,a8.append(r8),EK.blob=a8.getBlob("application/zip").size===0}catch(J){EK.blob=!1}}}var r8,h4,a8;try{EK.nodestream=!!o8().Readable}catch(Q){EK.nodestream=!1}});var b4=f((bK)=>{var yK=x0(),hK=o2(),v2="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";bK.encode=function(Q){var J=[],$,q,X,Y,W,U,G,B=0,K=Q.length,j=K,F=yK.getTypeOf(Q)!=="string";while(B<Q.length){if(j=K-B,!F)$=Q.charCodeAt(B++),q=B<K?Q.charCodeAt(B++):0,X=B<K?Q.charCodeAt(B++):0;else $=Q[B++],q=B<K?Q[B++]:0,X=B<K?Q[B++]:0;Y=$>>2,W=($&3)<<4|q>>4,U=j>1?(q&15)<<2|X>>6:64,G=j>2?X&63:64,J.push(v2.charAt(Y)+v2.charAt(W)+v2.charAt(U)+v2.charAt(G))}return J.join("")};bK.decode=function(Q){var J,$,q,X,Y,W,U,G=0,B=0,K="data:";if(Q.substr(0,K.length)===K)throw Error("Invalid base64 input, it looks like a data url.");Q=Q.replace(/[^A-Za-z0-9+/=]/g,"");var j=Q.length*3/4;if(Q.charAt(Q.length-1)===v2.charAt(64))j--;if(Q.charAt(Q.length-2)===v2.charAt(64))j--;if(j%1!==0)throw Error("Invalid base64 input, bad content length.");var F;if(hK.uint8array)F=new Uint8Array(j|0);else F=Array(j|0);while(G<Q.length){if(X=v2.indexOf(Q.charAt(G++)),Y=v2.indexOf(Q.charAt(G++)),W=v2.indexOf(Q.charAt(G++)),U=v2.indexOf(Q.charAt(G++)),J=X<<2|Y>>4,$=(Y&15)<<4|W>>2,q=(W&3)<<6|U,F[B++]=J,W!==64)F[B++]=$;if(U!==64)F[B++]=q}return F}});var $8=f((UP,O$)=>{O$.exports={isNode:typeof Buffer<"u",newBufferFrom:function(Q,J){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(Q,J);else{if(typeof Q==="number")throw Error('The "data" argument must not be a number');return new Buffer(Q,J)}},allocBuffer:function(Q){if(Buffer.alloc)return Buffer.alloc(Q);else{var J=new Buffer(Q);return J.fill(0),J}},isBuffer:function(Q){return Buffer.isBuffer(Q)},isStream:function(Q){return Q&&typeof Q.on==="function"&&typeof Q.pause==="function"&&typeof Q.resume==="function"}}});var R$=f((GP,A$)=>{var P$=global.MutationObserver||global.WebKitMutationObserver,q8;if(P$)t8=0,m4=new P$(s8),e8=global.document.createTextNode(""),m4.observe(e8,{characterData:!0}),q8=function(){e8.data=t8=++t8%2};else if(!global.setImmediate&&typeof global.MessageChannel<"u")Q5=new global.MessageChannel,Q5.port1.onmessage=s8,q8=function(){Q5.port2.postMessage(0)};else if("document"in global&&"onreadystatechange"in global.document.createElement("script"))q8=function(){var Q=global.document.createElement("script");Q.onreadystatechange=function(){s8(),Q.onreadystatechange=null,Q.parentNode.removeChild(Q),Q=null},global.document.documentElement.appendChild(Q)};else q8=function(){setTimeout(s8,0)};var t8,m4,e8,Q5,u4,X8=[];function s8(){u4=!0;var Q,J,$=X8.length;while($){J=X8,X8=[],Q=-1;while(++Q<$)J[Q]();$=X8.length}u4=!1}A$.exports=cK;function cK(Q){if(X8.push(Q)===1&&!u4)q8()}});var E$=f((BP,v$)=>{var pK=R$();function G6(){}var i0={},w$=["REJECTED"],c4=["FULFILLED"],I$=["PENDING"];v$.exports=G1;function G1(Q){if(typeof Q!=="function")throw TypeError("resolver must be a function");if(this.state=I$,this.queue=[],this.outcome=void 0,Q!==G6)S$(this,Q)}G1.prototype.finally=function(Q){if(typeof Q!=="function")return this;var J=this.constructor;return this.then($,q);function $(X){function Y(){return X}return J.resolve(Q()).then(Y)}function q(X){function Y(){throw X}return J.resolve(Q()).then(Y)}};G1.prototype.catch=function(Q){return this.then(null,Q)};G1.prototype.then=function(Q,J){if(typeof Q!=="function"&&this.state===c4||typeof J!=="function"&&this.state===w$)return this;var $=new this.constructor(G6);if(this.state!==I$){var q=this.state===c4?Q:J;p4($,q,this.outcome)}else this.queue.push(new Y8($,Q,J));return $};function Y8(Q,J,$){if(this.promise=Q,typeof J==="function")this.onFulfilled=J,this.callFulfilled=this.otherCallFulfilled;if(typeof $==="function")this.onRejected=$,this.callRejected=this.otherCallRejected}Y8.prototype.callFulfilled=function(Q){i0.resolve(this.promise,Q)};Y8.prototype.otherCallFulfilled=function(Q){p4(this.promise,this.onFulfilled,Q)};Y8.prototype.callRejected=function(Q){i0.reject(this.promise,Q)};Y8.prototype.otherCallRejected=function(Q){p4(this.promise,this.onRejected,Q)};function p4(Q,J,$){pK(function(){var q;try{q=J($)}catch(X){return i0.reject(Q,X)}if(q===Q)i0.reject(Q,TypeError("Cannot resolve promise with itself"));else i0.resolve(Q,q)})}i0.resolve=function(Q,J){var $=Z$(lK,J);if($.status==="error")return i0.reject(Q,$.value);var q=$.value;if(q)S$(Q,q);else{Q.state=c4,Q.outcome=J;var X=-1,Y=Q.queue.length;while(++X<Y)Q.queue[X].callFulfilled(J)}return Q};i0.reject=function(Q,J){Q.state=w$,Q.outcome=J;var $=-1,q=Q.queue.length;while(++$<q)Q.queue[$].callRejected(J);return Q};function lK(Q){var J=Q&&Q.then;if(Q&&(typeof Q==="object"||typeof Q==="function")&&typeof J==="function")return function(){J.apply(Q,arguments)}}function S$(Q,J){var $=!1;function q(U){if($)return;$=!0,i0.reject(Q,U)}function X(U){if($)return;$=!0,i0.resolve(Q,U)}function Y(){J(X,q)}var W=Z$(Y);if(W.status==="error")q(W.value)}function Z$(Q,J){var $={};try{$.value=Q(J),$.status="success"}catch(q){$.status="error",$.value=q}return $}G1.resolve=dK;function dK(Q){if(Q instanceof this)return Q;return i0.resolve(new this(G6),Q)}G1.reject=iK;function iK(Q){var J=new this(G6);return i0.reject(J,Q)}G1.all=nK;function nK(Q){var J=this;if(Object.prototype.toString.call(Q)!=="[object Array]")return this.reject(TypeError("must be an array"));var $=Q.length,q=!1;if(!$)return this.resolve([]);var X=Array($),Y=0,W=-1,U=new this(G6);while(++W<$)G(Q[W],W);return U;function G(B,K){J.resolve(B).then(j,function(F){if(!q)q=!0,i0.reject(U,F)});function j(F){if(X[K]=F,++Y===$&&!q)q=!0,i0.resolve(U,X)}}}G1.race=oK;function oK(Q){var J=this;if(Object.prototype.toString.call(Q)!=="[object Array]")return this.reject(TypeError("must be an array"));var $=Q.length,q=!1;if(!$)return this.resolve([]);var X=-1,Y=new this(G6);while(++X<$)W(Q[X]);return Y;function W(U){J.resolve(U).then(function(G){if(!q)q=!0,i0.resolve(Y,G)},function(G){if(!q)q=!0,i0.reject(Y,G)})}}});var B6=f((KP,k$)=>{var l4=null;if(typeof Promise<"u")l4=Promise;else l4=E$();k$.exports={Promise:l4}});var x$=f((T$)=>{(function(Q,J){if(Q.setImmediate)return;var $=1,q={},X=!1,Y=Q.document,W;function U(V){if(typeof V!=="function")V=Function(""+V);var z=Array(arguments.length-1);for(var L=0;L<z.length;L++)z[L]=arguments[L+1];var A={callback:V,args:z};return q[$]=A,W($),$++}function G(V){delete q[V]}function B(V){var{callback:z,args:L}=V;switch(L.length){case 0:z();break;case 1:z(L[0]);break;case 2:z(L[0],L[1]);break;case 3:z(L[0],L[1],L[2]);break;default:z.apply(J,L);break}}function K(V){if(X)setTimeout(K,0,V);else{var z=q[V];if(z){X=!0;try{B(z)}finally{G(V),X=!1}}}}function j(){W=function(V){process.nextTick(function(){K(V)})}}function F(){if(Q.postMessage&&!Q.importScripts){var V=!0,z=Q.onmessage;return Q.onmessage=function(){V=!1},Q.postMessage("","*"),Q.onmessage=z,V}}function H(){var V="setImmediate$"+Math.random()+"$",z=function(L){if(L.source===Q&&typeof L.data==="string"&&L.data.indexOf(V)===0)K(+L.data.slice(V.length))};if(Q.addEventListener)Q.addEventListener("message",z,!1);else Q.attachEvent("onmessage",z);W=function(L){Q.postMessage(V+L,"*")}}function E(){var V=new MessageChannel;V.port1.onmessage=function(z){var L=z.data;K(L)},W=function(z){V.port2.postMessage(z)}}function g(){var V=Y.documentElement;W=function(z){var L=Y.createElement("script");L.onreadystatechange=function(){K(z),L.onreadystatechange=null,V.removeChild(L),L=null},V.appendChild(L)}}function P(){W=function(V){setTimeout(K,0,V)}}var D=Object.getPrototypeOf&&Object.getPrototypeOf(Q);if(D=D&&D.setTimeout?D:Q,{}.toString.call(Q.process)==="[object process]")j();else if(F())H();else if(Q.MessageChannel)E();else if(Y&&"onreadystatechange"in Y.createElement("script"))g();else P();D.setImmediate=U,D.clearImmediate=G})(typeof self>"u"?typeof global>"u"?T$:global:self)});var x0=f((sK)=>{var B1=o2(),rK=b4(),K6=$8(),d4=B6();x$();function aK(Q){var J=null;if(B1.uint8array)J=new Uint8Array(Q.length);else J=Array(Q.length);return $5(Q,J)}sK.newBlob=function(Q,J){sK.checkSupport("blob");try{return new Blob([Q],{type:J})}catch(X){try{var $=self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder,q=new $;return q.append(Q),q.getBlob(J)}catch(Y){throw Error("Bug : can't construct the Blob.")}}};function W8(Q){return Q}function $5(Q,J){for(var $=0;$<Q.length;++$)J[$]=Q.charCodeAt($)&255;return J}var J5={stringifyByChunk:function(Q,J,$){var q=[],X=0,Y=Q.length;if(Y<=$)return String.fromCharCode.apply(null,Q);while(X<Y){if(J==="array"||J==="nodebuffer")q.push(String.fromCharCode.apply(null,Q.slice(X,Math.min(X+$,Y))));else q.push(String.fromCharCode.apply(null,Q.subarray(X,Math.min(X+$,Y))));X+=$}return q.join("")},stringifyByChar:function(Q){var J="";for(var $=0;$<Q.length;$++)J+=String.fromCharCode(Q[$]);return J},applyCanBeUsed:{uint8array:function(){try{return B1.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch(Q){return!1}}(),nodebuffer:function(){try{return B1.nodebuffer&&String.fromCharCode.apply(null,K6.allocBuffer(1)).length===1}catch(Q){return!1}}()}};function U8(Q){var J=65536,$=sK.getTypeOf(Q),q=!0;if($==="uint8array")q=J5.applyCanBeUsed.uint8array;else if($==="nodebuffer")q=J5.applyCanBeUsed.nodebuffer;if(q)while(J>1)try{return J5.stringifyByChunk(Q,$,J)}catch(X){J=Math.floor(J/2)}return J5.stringifyByChar(Q)}sK.applyFromCharCode=U8;function q5(Q,J){for(var $=0;$<Q.length;$++)J[$]=Q[$];return J}var K1={};K1.string={string:W8,array:function(Q){return $5(Q,Array(Q.length))},arraybuffer:function(Q){return K1.string.uint8array(Q).buffer},uint8array:function(Q){return $5(Q,new Uint8Array(Q.length))},nodebuffer:function(Q){return $5(Q,K6.allocBuffer(Q.length))}};K1.array={string:U8,array:W8,arraybuffer:function(Q){return new Uint8Array(Q).buffer},uint8array:function(Q){return new Uint8Array(Q)},nodebuffer:function(Q){return K6.newBufferFrom(Q)}};K1.arraybuffer={string:function(Q){return U8(new Uint8Array(Q))},array:function(Q){return q5(new Uint8Array(Q),Array(Q.byteLength))},arraybuffer:W8,uint8array:function(Q){return new Uint8Array(Q)},nodebuffer:function(Q){return K6.newBufferFrom(new Uint8Array(Q))}};K1.uint8array={string:U8,array:function(Q){return q5(Q,Array(Q.length))},arraybuffer:function(Q){return Q.buffer},uint8array:W8,nodebuffer:function(Q){return K6.newBufferFrom(Q)}};K1.nodebuffer={string:U8,array:function(Q){return q5(Q,Array(Q.length))},arraybuffer:function(Q){return K1.nodebuffer.uint8array(Q).buffer},uint8array:function(Q){return q5(Q,new Uint8Array(Q.length))},nodebuffer:W8};sK.transformTo=function(Q,J){if(!J)J="";if(!Q)return J;sK.checkSupport(Q);var $=sK.getTypeOf(J),q=K1[$][Q](J);return q};sK.resolve=function(Q){var J=Q.split("/"),$=[];for(var q=0;q<J.length;q++){var X=J[q];if(X==="."||X===""&&q!==0&&q!==J.length-1)continue;else if(X==="..")$.pop();else $.push(X)}return $.join("/")};sK.getTypeOf=function(Q){if(typeof Q==="string")return"string";if(Object.prototype.toString.call(Q)==="[object Array]")return"array";if(B1.nodebuffer&&K6.isBuffer(Q))return"nodebuffer";if(B1.uint8array&&Q instanceof Uint8Array)return"uint8array";if(B1.arraybuffer&&Q instanceof ArrayBuffer)return"arraybuffer"};sK.checkSupport=function(Q){var J=B1[Q.toLowerCase()];if(!J)throw Error(Q+" is not supported by this platform")};sK.MAX_VALUE_16BITS=65535;sK.MAX_VALUE_32BITS=-1;sK.pretty=function(Q){var J="",$,q;for(q=0;q<(Q||"").length;q++)$=Q.charCodeAt(q),J+="\\x"+($<16?"0":"")+$.toString(16).toUpperCase();return J};sK.delay=function(Q,J,$){setImmediate(function(){Q.apply($||null,J||[])})};sK.inherits=function(Q,J){var $=function(){};$.prototype=J.prototype,Q.prototype=new $};sK.extend=function(){var Q={},J,$;for(J=0;J<arguments.length;J++)for($ in arguments[J])if(Object.prototype.hasOwnProperty.call(arguments[J],$)&&typeof Q[$]>"u")Q[$]=arguments[J][$];return Q};sK.prepareContent=function(Q,J,$,q,X){var Y=d4.Promise.resolve(J).then(function(W){var U=B1.blob&&(W instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(W))!==-1);if(U&&typeof FileReader<"u")return new d4.Promise(function(G,B){var K=new FileReader;K.onload=function(j){G(j.target.result)},K.onerror=function(j){B(j.target.error)},K.readAsArrayBuffer(W)});else return W});return Y.then(function(W){var U=sK.getTypeOf(W);if(!U)return d4.Promise.reject(Error("Can't read the data of '"+Q+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"));if(U==="arraybuffer")W=sK.transformTo("uint8array",W);else if(U==="string"){if(X)W=rK.decode(W);else if($){if(q!==!0)W=aK(W)}}return W})}});var q2=f((jP,y$)=>{function f$(Q){this.name=Q||"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}f$.prototype={push:function(Q){this.emit("data",Q)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(Q){this.emit("error",Q)}return!0},error:function(Q){if(this.isFinished)return!1;if(this.isPaused)this.generatedError=Q;else{if(this.isFinished=!0,this.emit("error",Q),this.previous)this.previous.error(Q);this.cleanUp()}return!0},on:function(Q,J){return this._listeners[Q].push(J),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(Q,J){if(this._listeners[Q])for(var $=0;$<this._listeners[Q].length;$++)this._listeners[Q][$].call(this,J)},pipe:function(Q){return Q.registerPrevious(this)},registerPrevious:function(Q){if(this.isLocked)throw Error("The stream '"+this+"' has already been used.");this.streamInfo=Q.streamInfo,this.mergeStreamInfo(),this.previous=Q;var J=this;return Q.on("data",function($){J.processChunk($)}),Q.on("end",function(){J.end()}),Q.on("error",function($){J.error($)}),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 Q=!1;if(this.generatedError)this.error(this.generatedError),Q=!0;if(this.previous)this.previous.resume();return!Q},flush:function(){},processChunk:function(Q){this.push(Q)},withStreamInfo:function(Q,J){return this.extraStreamInfo[Q]=J,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var Q in this.extraStreamInfo){if(!Object.prototype.hasOwnProperty.call(this.extraStreamInfo,Q))continue;this.streamInfo[Q]=this.extraStreamInfo[Q]}},lock:function(){if(this.isLocked)throw Error("The stream '"+this+"' has already been used.");if(this.isLocked=!0,this.previous)this.previous.lock()},toString:function(){var Q="Worker "+this.name;if(this.previous)return this.previous+" -> "+Q;else return Q}};y$.exports=f$});var H6=f((HV)=>{var V6=x0(),f1=o2(),GV=$8(),X5=q2(),G8=Array(256);for(E2=0;E2<256;E2++)G8[E2]=E2>=252?6:E2>=248?5:E2>=240?4:E2>=224?3:E2>=192?2:1;var E2;G8[254]=G8[254]=1;var BV=function(Q){var J,$,q,X,Y,W=Q.length,U=0;for(X=0;X<W;X++){if($=Q.charCodeAt(X),($&64512)===55296&&X+1<W){if(q=Q.charCodeAt(X+1),(q&64512)===56320)$=65536+($-55296<<10)+(q-56320),X++}U+=$<128?1:$<2048?2:$<65536?3:4}if(f1.uint8array)J=new Uint8Array(U);else J=Array(U);for(Y=0,X=0;Y<U;X++){if($=Q.charCodeAt(X),($&64512)===55296&&X+1<W){if(q=Q.charCodeAt(X+1),(q&64512)===56320)$=65536+($-55296<<10)+(q-56320),X++}if($<128)J[Y++]=$;else if($<2048)J[Y++]=192|$>>>6,J[Y++]=128|$&63;else if($<65536)J[Y++]=224|$>>>12,J[Y++]=128|$>>>6&63,J[Y++]=128|$&63;else J[Y++]=240|$>>>18,J[Y++]=128|$>>>12&63,J[Y++]=128|$>>>6&63,J[Y++]=128|$&63}return J},KV=function(Q,J){var $;if(J=J||Q.length,J>Q.length)J=Q.length;$=J-1;while($>=0&&(Q[$]&192)===128)$--;if($<0)return J;if($===0)return J;return $+G8[Q[$]]>J?$:J},VV=function(Q){var J,$,q,X,Y=Q.length,W=Array(Y*2);for($=0,J=0;J<Y;){if(q=Q[J++],q<128){W[$++]=q;continue}if(X=G8[q],X>4){W[$++]=65533,J+=X-1;continue}q&=X===2?31:X===3?15:7;while(X>1&&J<Y)q=q<<6|Q[J++]&63,X--;if(X>1){W[$++]=65533;continue}if(q<65536)W[$++]=q;else q-=65536,W[$++]=55296|q>>10&1023,W[$++]=56320|q&1023}if(W.length!==$)if(W.subarray)W=W.subarray(0,$);else W.length=$;return V6.applyFromCharCode(W)};HV.utf8encode=function(J){if(f1.nodebuffer)return GV.newBufferFrom(J,"utf-8");return BV(J)};HV.utf8decode=function(J){if(f1.nodebuffer)return V6.transformTo("nodebuffer",J).toString("utf-8");return J=V6.transformTo(f1.uint8array?"uint8array":"array",J),VV(J)};function Y5(){X5.call(this,"utf-8 decode"),this.leftOver=null}V6.inherits(Y5,X5);Y5.prototype.processChunk=function(Q){var J=V6.transformTo(f1.uint8array?"uint8array":"array",Q.data);if(this.leftOver&&this.leftOver.length){if(f1.uint8array){var $=J;J=new Uint8Array($.length+this.leftOver.length),J.set(this.leftOver,0),J.set($,this.leftOver.length)}else J=this.leftOver.concat(J);this.leftOver=null}var q=KV(J),X=J;if(q!==J.length)if(f1.uint8array)X=J.subarray(0,q),this.leftOver=J.subarray(q,J.length);else X=J.slice(0,q),this.leftOver=J.slice(q,J.length);this.push({data:HV.utf8decode(X),meta:Q.meta})};Y5.prototype.flush=function(){if(this.leftOver&&this.leftOver.length)this.push({data:HV.utf8decode(this.leftOver),meta:{}}),this.leftOver=null};HV.Utf8DecodeWorker=Y5;function n4(){X5.call(this,"utf-8 encode")}V6.inherits(n4,X5);n4.prototype.processChunk=function(Q){this.push({data:HV.utf8encode(Q.data),meta:Q.meta})};HV.Utf8EncodeWorker=n4});var c$=f((FP,u$)=>{var b$=q2(),m$=x0();function r4(Q){b$.call(this,"ConvertWorker to "+Q),this.destType=Q}m$.inherits(r4,b$);r4.prototype.processChunk=function(Q){this.push({data:m$.transformTo(this.destType,Q.data),meta:Q.meta})};u$.exports=r4});var d$=f((zP,l$)=>{var p$=o8().Readable,FV=x0();FV.inherits(a4,p$);function a4(Q,J,$){p$.call(this,J),this._helper=Q;var q=this;Q.on("data",function(X,Y){if(!q.push(X))q._helper.pause();if($)$(Y)}).on("error",function(X){q.emit("error",X)}).on("end",function(){q.push(null)})}a4.prototype._read=function(){this._helper.resume()};l$.exports=a4});var s4=f((LP,o$)=>{var y1=x0(),zV=c$(),LV=q2(),NV=b4(),DV=o2(),CV=B6(),i$=null;if(DV.nodestream)try{i$=d$()}catch(Q){}function OV(Q,J,$){switch(Q){case"blob":return y1.newBlob(y1.transformTo("arraybuffer",J),$);case"base64":return NV.encode(J);default:return y1.transformTo(Q,J)}}function PV(Q,J){var $,q=0,X=null,Y=0;for($=0;$<J.length;$++)Y+=J[$].length;switch(Q){case"string":return J.join("");case"array":return Array.prototype.concat.apply([],J);case"uint8array":X=new Uint8Array(Y);for($=0;$<J.length;$++)X.set(J[$],q),q+=J[$].length;return X;case"nodebuffer":return Buffer.concat(J);default:throw Error("concat : unsupported type '"+Q+"'")}}function AV(Q,J){return new CV.Promise(function($,q){var X=[],Y=Q._internalType,W=Q._outputType,U=Q._mimeType;Q.on("data",function(G,B){if(X.push(G),J)J(B)}).on("error",function(G){X=[],q(G)}).on("end",function(){try{var G=OV(W,PV(Y,X),U);$(G)}catch(B){q(B)}X=[]}).resume()})}function n$(Q,J,$){var q=J;switch(J){case"blob":case"arraybuffer":q="uint8array";break;case"base64":q="string";break}try{this._internalType=q,this._outputType=J,this._mimeType=$,y1.checkSupport(q),this._worker=Q.pipe(new zV(q)),Q.lock()}catch(X){this._worker=new LV("error"),this._worker.error(X)}}n$.prototype={accumulate:function(Q){return AV(this,Q)},on:function(Q,J){var $=this;if(Q==="data")this._worker.on(Q,function(q){J.call($,q.data,q.meta)});else this._worker.on(Q,function(){y1.delay(J,arguments,$)});return this},resume:function(){return y1.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(Q){if(y1.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw Error(this._outputType+" is not supported by this method");return new i$(this,{objectMode:this._outputType!=="nodebuffer"},Q)}};o$.exports=n$});var t4=f((RV)=>{RV.base64=!1;RV.binary=!1;RV.dir=!1;RV.createFolders=!0;RV.date=null;RV.compression=null;RV.compressionOptions=null;RV.comment=null;RV.unixPermissions=null;RV.dosPermissions=null});var e4=f((DP,r$)=>{var W5=x0(),U5=q2(),_V=16384;function j6(Q){U5.call(this,"DataWorker");var J=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,Q.then(function($){if(J.dataIsReady=!0,J.data=$,J.max=$&&$.length||0,J.type=W5.getTypeOf($),!J.isPaused)J._tickAndRepeat()},function($){J.error($)})}W5.inherits(j6,U5);j6.prototype.cleanUp=function(){U5.prototype.cleanUp.call(this),this.data=null};j6.prototype.resume=function(){if(!U5.prototype.resume.call(this))return!1;if(!this._tickScheduled&&this.dataIsReady)this._tickScheduled=!0,W5.delay(this._tickAndRepeat,[],this);return!0};j6.prototype._tickAndRepeat=function(){if(this._tickScheduled=!1,this.isPaused||this.isFinished)return;if(this._tick(),!this.isFinished)W5.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0};j6.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var Q=_V,J=null,$=Math.min(this.max,this.index+Q);if(this.index>=this.max)return this.end();else{switch(this.type){case"string":J=this.data.substring(this.index,$);break;case"uint8array":J=this.data.subarray(this.index,$);break;case"array":case"nodebuffer":J=this.data.slice(this.index,$);break}return this.index=$,this.push({data:J,meta:{percent:this.max?this.index/this.max*100:0}})}};r$.exports=j6});var G5=f((CP,s$)=>{var fV=x0();function yV(){var Q,J=[];for(var $=0;$<256;$++){Q=$;for(var q=0;q<8;q++)Q=Q&1?3988292384^Q>>>1:Q>>>1;J[$]=Q}return J}var a$=yV();function hV(Q,J,$,q){var X=a$,Y=q+$;Q=Q^-1;for(var W=q;W<Y;W++)Q=Q>>>8^X[(Q^J[W])&255];return Q^-1}function bV(Q,J,$,q){var X=a$,Y=q+$;Q=Q^-1;for(var W=q;W<Y;W++)Q=Q>>>8^X[(Q^J.charCodeAt(W))&255];return Q^-1}s$.exports=function(J,$){if(typeof J>"u"||!J.length)return 0;var q=fV.getTypeOf(J)!=="string";if(q)return hV($|0,J,J.length,0);else return bV($|0,J,J.length,0)}});var J7=f((OP,e$)=>{var t$=q2(),mV=G5(),uV=x0();function Q7(){t$.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}uV.inherits(Q7,t$);Q7.prototype.processChunk=function(Q){this.streamInfo.crc32=mV(Q.data,this.streamInfo.crc32||0),this.push(Q)};e$.exports=Q7});var Jq=f((PP,Qq)=>{var cV=x0(),$7=q2();function q7(Q){$7.call(this,"DataLengthProbe for "+Q),this.propName=Q,this.withStreamInfo(Q,0)}cV.inherits(q7,$7);q7.prototype.processChunk=function(Q){if(Q){var J=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=J+Q.data.length}$7.prototype.processChunk.call(this,Q)};Qq.exports=q7});var B5=f((AP,Xq)=>{var $q=B6(),qq=e4(),pV=J7(),X7=Jq();function Y7(Q,J,$,q,X){this.compressedSize=Q,this.uncompressedSize=J,this.crc32=$,this.compression=q,this.compressedContent=X}Y7.prototype={getContentWorker:function(){var Q=new qq($q.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new X7("data_length")),J=this;return Q.on("end",function(){if(this.streamInfo.data_length!==J.uncompressedSize)throw Error("Bug : uncompressed data size mismatch")}),Q},getCompressedWorker:function(){return new qq($q.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}};Y7.createWorkerFrom=function(Q,J,$){return Q.pipe(new pV).pipe(new X7("uncompressedSize")).pipe(J.compressWorker($)).pipe(new X7("compressedSize")).withStreamInfo("compression",J)};Xq.exports=Y7});var Gq=f((RP,Uq)=>{var lV=s4(),dV=e4(),W7=H6(),U7=B5(),Yq=q2(),G7=function(Q,J,$){this.name=Q,this.dir=$.dir,this.date=$.date,this.comment=$.comment,this.unixPermissions=$.unixPermissions,this.dosPermissions=$.dosPermissions,this._data=J,this._dataBinary=$.binary,this.options={compression:$.compression,compressionOptions:$.compressionOptions}};G7.prototype={internalStream:function(Q){var J=null,$="string";try{if(!Q)throw Error("No output type specified.");$=Q.toLowerCase();var q=$==="string"||$==="text";if($==="binarystring"||$==="text")$="string";J=this._decompressWorker();var X=!this._dataBinary;if(X&&!q)J=J.pipe(new W7.Utf8EncodeWorker);if(!X&&q)J=J.pipe(new W7.Utf8DecodeWorker)}catch(Y){J=new Yq("error"),J.error(Y)}return new lV(J,$,"")},async:function(Q,J){return this.internalStream(Q).accumulate(J)},nodeStream:function(Q,J){return this.internalStream(Q||"nodebuffer").toNodejsStream(J)},_compressWorker:function(Q,J){if(this._data instanceof U7&&this._data.compression.magic===Q.magic)return this._data.getCompressedWorker();else{var $=this._decompressWorker();if(!this._dataBinary)$=$.pipe(new W7.Utf8EncodeWorker);return U7.createWorkerFrom($,Q,J)}},_decompressWorker:function(){if(this._data instanceof U7)return this._data.getContentWorker();else if(this._data instanceof Yq)return this._data;else return new dV(this._data)}};var Wq=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],iV=function(){throw Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")};for(B8=0;B8<Wq.length;B8++)G7.prototype[Wq[B8]]=iV;var B8;Uq.exports=G7});var r2=f((B7)=>{var aV=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function sV(Q,J){return Object.prototype.hasOwnProperty.call(Q,J)}B7.assign=function(Q){var J=Array.prototype.slice.call(arguments,1);while(J.length){var $=J.shift();if(!$)continue;if(typeof $!=="object")throw TypeError($+"must be non-object");for(var q in $)if(sV($,q))Q[q]=$[q]}return Q};B7.shrinkBuf=function(Q,J){if(Q.length===J)return Q;if(Q.subarray)return Q.subarray(0,J);return Q.length=J,Q};var tV={arraySet:function(Q,J,$,q,X){if(J.subarray&&Q.subarray){Q.set(J.subarray($,$+q),X);return}for(var Y=0;Y<q;Y++)Q[X+Y]=J[$+Y]},flattenChunks:function(Q){var J,$,q,X,Y,W;q=0;for(J=0,$=Q.length;J<$;J++)q+=Q[J].length;W=new Uint8Array(q),X=0;for(J=0,$=Q.length;J<$;J++)Y=Q[J],W.set(Y,X),X+=Y.length;return W}},eV={arraySet:function(Q,J,$,q,X){for(var Y=0;Y<q;Y++)Q[X+Y]=J[$+Y]},flattenChunks:function(Q){return[].concat.apply([],Q)}};B7.setTyped=function(Q){if(Q)B7.Buf8=Uint8Array,B7.Buf16=Uint16Array,B7.Buf32=Int32Array,B7.assign(B7,tV);else B7.Buf8=Array,B7.Buf16=Array,B7.Buf32=Array,B7.assign(B7,eV)};B7.setTyped(aV)});var Tq=f((PH)=>{var JH=r2(),$H=4,Kq=0,Vq=1,qH=2;function F6(Q){var J=Q.length;while(--J>=0)Q[J]=0}var XH=0,Lq=1,YH=2,WH=3,UH=258,L7=29,F8=256,V8=F8+1+L7,M6=30,N7=19,Nq=2*V8+1,h1=15,V7=16,GH=7,D7=256,Dq=16,Cq=17,Oq=18,F7=[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],K5=[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],BH=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Pq=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],KH=512,a2=Array((V8+2)*2);F6(a2);var K8=Array(M6*2);F6(K8);var H8=Array(KH);F6(H8);var j8=Array(UH-WH+1);F6(j8);var C7=Array(L7);F6(C7);var V5=Array(M6);F6(V5);function H7(Q,J,$,q,X){this.static_tree=Q,this.extra_bits=J,this.extra_base=$,this.elems=q,this.max_length=X,this.has_stree=Q&&Q.length}var Aq,Rq,wq;function j7(Q,J){this.dyn_tree=Q,this.max_code=0,this.stat_desc=J}function Iq(Q){return Q<256?H8[Q]:H8[256+(Q>>>7)]}function M8(Q,J){Q.pending_buf[Q.pending++]=J&255,Q.pending_buf[Q.pending++]=J>>>8&255}function Q2(Q,J,$){if(Q.bi_valid>V7-$)Q.bi_buf|=J<<Q.bi_valid&65535,M8(Q,Q.bi_buf),Q.bi_buf=J>>V7-Q.bi_valid,Q.bi_valid+=$-V7;else Q.bi_buf|=J<<Q.bi_valid&65535,Q.bi_valid+=$}function k2(Q,J,$){Q2(Q,$[J*2],$[J*2+1])}function Sq(Q,J){var $=0;do $|=Q&1,Q>>>=1,$<<=1;while(--J>0);return $>>>1}function VH(Q){if(Q.bi_valid===16)M8(Q,Q.bi_buf),Q.bi_buf=0,Q.bi_valid=0;else if(Q.bi_valid>=8)Q.pending_buf[Q.pending++]=Q.bi_buf&255,Q.bi_buf>>=8,Q.bi_valid-=8}function HH(Q,J){var{dyn_tree:$,max_code:q}=J,X=J.stat_desc.static_tree,Y=J.stat_desc.has_stree,W=J.stat_desc.extra_bits,U=J.stat_desc.extra_base,G=J.stat_desc.max_length,B,K,j,F,H,E,g=0;for(F=0;F<=h1;F++)Q.bl_count[F]=0;$[Q.heap[Q.heap_max]*2+1]=0;for(B=Q.heap_max+1;B<Nq;B++){if(K=Q.heap[B],F=$[$[K*2+1]*2+1]+1,F>G)F=G,g++;if($[K*2+1]=F,K>q)continue;if(Q.bl_count[F]++,H=0,K>=U)H=W[K-U];if(E=$[K*2],Q.opt_len+=E*(F+H),Y)Q.static_len+=E*(X[K*2+1]+H)}if(g===0)return;do{F=G-1;while(Q.bl_count[F]===0)F--;Q.bl_count[F]--,Q.bl_count[F+1]+=2,Q.bl_count[G]--,g-=2}while(g>0);for(F=G;F!==0;F--){K=Q.bl_count[F];while(K!==0){if(j=Q.heap[--B],j>q)continue;if($[j*2+1]!==F)Q.opt_len+=(F-$[j*2+1])*$[j*2],$[j*2+1]=F;K--}}}function Zq(Q,J,$){var q=Array(h1+1),X=0,Y,W;for(Y=1;Y<=h1;Y++)q[Y]=X=X+$[Y-1]<<1;for(W=0;W<=J;W++){var U=Q[W*2+1];if(U===0)continue;Q[W*2]=Sq(q[U]++,U)}}function jH(){var Q,J,$,q,X,Y=Array(h1+1);$=0;for(q=0;q<L7-1;q++){C7[q]=$;for(Q=0;Q<1<<F7[q];Q++)j8[$++]=q}j8[$-1]=q,X=0;for(q=0;q<16;q++){V5[q]=X;for(Q=0;Q<1<<K5[q];Q++)H8[X++]=q}X>>=7;for(;q<M6;q++){V5[q]=X<<7;for(Q=0;Q<1<<K5[q]-7;Q++)H8[256+X++]=q}for(J=0;J<=h1;J++)Y[J]=0;Q=0;while(Q<=143)a2[Q*2+1]=8,Q++,Y[8]++;while(Q<=255)a2[Q*2+1]=9,Q++,Y[9]++;while(Q<=279)a2[Q*2+1]=7,Q++,Y[7]++;while(Q<=287)a2[Q*2+1]=8,Q++,Y[8]++;Zq(a2,V8+1,Y);for(Q=0;Q<M6;Q++)K8[Q*2+1]=5,K8[Q*2]=Sq(Q,5);Aq=new H7(a2,F7,F8+1,V8,h1),Rq=new H7(K8,K5,0,M6,h1),wq=new H7([],BH,0,N7,GH)}function vq(Q){var J;for(J=0;J<V8;J++)Q.dyn_ltree[J*2]=0;for(J=0;J<M6;J++)Q.dyn_dtree[J*2]=0;for(J=0;J<N7;J++)Q.bl_tree[J*2]=0;Q.dyn_ltree[D7*2]=1,Q.opt_len=Q.static_len=0,Q.last_lit=Q.matches=0}function Eq(Q){if(Q.bi_valid>8)M8(Q,Q.bi_buf);else if(Q.bi_valid>0)Q.pending_buf[Q.pending++]=Q.bi_buf;Q.bi_buf=0,Q.bi_valid=0}function MH(Q,J,$,q){if(Eq(Q),q)M8(Q,$),M8(Q,~$);JH.arraySet(Q.pending_buf,Q.window,J,$,Q.pending),Q.pending+=$}function Hq(Q,J,$,q){var X=J*2,Y=$*2;return Q[X]<Q[Y]||Q[X]===Q[Y]&&q[J]<=q[$]}function M7(Q,J,$){var q=Q.heap[$],X=$<<1;while(X<=Q.heap_len){if(X<Q.heap_len&&Hq(J,Q.heap[X+1],Q.heap[X],Q.depth))X++;if(Hq(J,q,Q.heap[X],Q.depth))break;Q.heap[$]=Q.heap[X],$=X,X<<=1}Q.heap[$]=q}function jq(Q,J,$){var q,X,Y=0,W,U;if(Q.last_lit!==0)do if(q=Q.pending_buf[Q.d_buf+Y*2]<<8|Q.pending_buf[Q.d_buf+Y*2+1],X=Q.pending_buf[Q.l_buf+Y],Y++,q===0)k2(Q,X,J);else{if(W=j8[X],k2(Q,W+F8+1,J),U=F7[W],U!==0)X-=C7[W],Q2(Q,X,U);if(q--,W=Iq(q),k2(Q,W,$),U=K5[W],U!==0)q-=V5[W],Q2(Q,q,U)}while(Y<Q.last_lit);k2(Q,D7,J)}function z7(Q,J){var $=J.dyn_tree,q=J.stat_desc.static_tree,X=J.stat_desc.has_stree,Y=J.stat_desc.elems,W,U,G=-1,B;Q.heap_len=0,Q.heap_max=Nq;for(W=0;W<Y;W++)if($[W*2]!==0)Q.heap[++Q.heap_len]=G=W,Q.depth[W]=0;else $[W*2+1]=0;while(Q.heap_len<2)if(B=Q.heap[++Q.heap_len]=G<2?++G:0,$[B*2]=1,Q.depth[B]=0,Q.opt_len--,X)Q.static_len-=q[B*2+1];J.max_code=G;for(W=Q.heap_len>>1;W>=1;W--)M7(Q,$,W);B=Y;do W=Q.heap[1],Q.heap[1]=Q.heap[Q.heap_len--],M7(Q,$,1),U=Q.heap[1],Q.heap[--Q.heap_max]=W,Q.heap[--Q.heap_max]=U,$[B*2]=$[W*2]+$[U*2],Q.depth[B]=(Q.depth[W]>=Q.depth[U]?Q.depth[W]:Q.depth[U])+1,$[W*2+1]=$[U*2+1]=B,Q.heap[1]=B++,M7(Q,$,1);while(Q.heap_len>=2);Q.heap[--Q.heap_max]=Q.heap[1],HH(Q,J),Zq($,G,Q.bl_count)}function Mq(Q,J,$){var q,X=-1,Y,W=J[1],U=0,G=7,B=4;if(W===0)G=138,B=3;J[($+1)*2+1]=65535;for(q=0;q<=$;q++){if(Y=W,W=J[(q+1)*2+1],++U<G&&Y===W)continue;else if(U<B)Q.bl_tree[Y*2]+=U;else if(Y!==0){if(Y!==X)Q.bl_tree[Y*2]++;Q.bl_tree[Dq*2]++}else if(U<=10)Q.bl_tree[Cq*2]++;else Q.bl_tree[Oq*2]++;if(U=0,X=Y,W===0)G=138,B=3;else if(Y===W)G=6,B=3;else G=7,B=4}}function Fq(Q,J,$){var q,X=-1,Y,W=J[1],U=0,G=7,B=4;if(W===0)G=138,B=3;for(q=0;q<=$;q++){if(Y=W,W=J[(q+1)*2+1],++U<G&&Y===W)continue;else if(U<B)do k2(Q,Y,Q.bl_tree);while(--U!==0);else if(Y!==0){if(Y!==X)k2(Q,Y,Q.bl_tree),U--;k2(Q,Dq,Q.bl_tree),Q2(Q,U-3,2)}else if(U<=10)k2(Q,Cq,Q.bl_tree),Q2(Q,U-3,3);else k2(Q,Oq,Q.bl_tree),Q2(Q,U-11,7);if(U=0,X=Y,W===0)G=138,B=3;else if(Y===W)G=6,B=3;else G=7,B=4}}function FH(Q){var J;Mq(Q,Q.dyn_ltree,Q.l_desc.max_code),Mq(Q,Q.dyn_dtree,Q.d_desc.max_code),z7(Q,Q.bl_desc);for(J=N7-1;J>=3;J--)if(Q.bl_tree[Pq[J]*2+1]!==0)break;return Q.opt_len+=3*(J+1)+5+5+4,J}function zH(Q,J,$,q){var X;Q2(Q,J-257,5),Q2(Q,$-1,5),Q2(Q,q-4,4);for(X=0;X<q;X++)Q2(Q,Q.bl_tree[Pq[X]*2+1],3);Fq(Q,Q.dyn_ltree,J-1),Fq(Q,Q.dyn_dtree,$-1)}function LH(Q){var J=4093624447,$;for($=0;$<=31;$++,J>>>=1)if(J&1&&Q.dyn_ltree[$*2]!==0)return Kq;if(Q.dyn_ltree[18]!==0||Q.dyn_ltree[20]!==0||Q.dyn_ltree[26]!==0)return Vq;for($=32;$<F8;$++)if(Q.dyn_ltree[$*2]!==0)return Vq;return Kq}var zq=!1;function NH(Q){if(!zq)jH(),zq=!0;Q.l_desc=new j7(Q.dyn_ltree,Aq),Q.d_desc=new j7(Q.dyn_dtree,Rq),Q.bl_desc=new j7(Q.bl_tree,wq),Q.bi_buf=0,Q.bi_valid=0,vq(Q)}function kq(Q,J,$,q){Q2(Q,(XH<<1)+(q?1:0),3),MH(Q,J,$,!0)}function DH(Q){Q2(Q,Lq<<1,3),k2(Q,D7,a2),VH(Q)}function CH(Q,J,$,q){var X,Y,W=0;if(Q.level>0){if(Q.strm.data_type===qH)Q.strm.data_type=LH(Q);if(z7(Q,Q.l_desc),z7(Q,Q.d_desc),W=FH(Q),X=Q.opt_len+3+7>>>3,Y=Q.static_len+3+7>>>3,Y<=X)X=Y}else X=Y=$+5;if($+4<=X&&J!==-1)kq(Q,J,$,q);else if(Q.strategy===$H||Y===X)Q2(Q,(Lq<<1)+(q?1:0),3),jq(Q,a2,K8);else Q2(Q,(YH<<1)+(q?1:0),3),zH(Q,Q.l_desc.max_code+1,Q.d_desc.max_code+1,W+1),jq(Q,Q.dyn_ltree,Q.dyn_dtree);if(vq(Q),q)Eq(Q)}function OH(Q,J,$){if(Q.pending_buf[Q.d_buf+Q.last_lit*2]=J>>>8&255,Q.pending_buf[Q.d_buf+Q.last_lit*2+1]=J&255,Q.pending_buf[Q.l_buf+Q.last_lit]=$&255,Q.last_lit++,J===0)Q.dyn_ltree[$*2]++;else Q.matches++,J--,Q.dyn_ltree[(j8[$]+F8+1)*2]++,Q.dyn_dtree[Iq(J)*2]++;return Q.last_lit===Q.lit_bufsize-1}PH._tr_init=NH;PH._tr_stored_block=kq;PH._tr_flush_block=CH;PH._tr_tally=OH;PH._tr_align=DH});var O7=f((SP,xq)=>{function ZH(Q,J,$,q){var X=Q&65535|0,Y=Q>>>16&65535|0,W=0;while($!==0){W=$>2000?2000:$,$-=W;do X=X+J[q++]|0,Y=Y+X|0;while(--W);X%=65521,Y%=65521}return X|Y<<16|0}xq.exports=ZH});var P7=f((ZP,gq)=>{function vH(){var Q,J=[];for(var $=0;$<256;$++){Q=$;for(var q=0;q<8;q++)Q=Q&1?3988292384^Q>>>1:Q>>>1;J[$]=Q}return J}var EH=vH();function kH(Q,J,$,q){var X=EH,Y=q+$;Q^=-1;for(var W=q;W<Y;W++)Q=Q>>>8^X[(Q^J[W])&255];return Q^-1}gq.exports=kH});var H5=f((vP,_q)=>{_q.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 lq=f((Kj)=>{var a0=r2(),V2=Tq(),bq=O7(),V1=P7(),TH=H5(),c1=0,xH=1,gH=3,z1=4,fq=5,x2=0,yq=1,H2=-2,_H=-3,A7=-5,fH=-1,yH=1,j5=2,hH=3,bH=4,mH=0,uH=2,L5=8,cH=9,pH=15,lH=8,dH=29,iH=256,w7=iH+1+dH,nH=30,oH=19,rH=2*w7+1,aH=15,w0=3,M1=258,L2=M1+w0+1,sH=32,N5=42,I7=69,M5=73,F5=91,z5=103,b1=113,L8=666,h0=1,N8=2,m1=3,N6=4,tH=3;function F1(Q,J){return Q.msg=TH[J],J}function hq(Q){return(Q<<1)-(Q>4?9:0)}function j1(Q){var J=Q.length;while(--J>=0)Q[J]=0}function H1(Q){var J=Q.state,$=J.pending;if($>Q.avail_out)$=Q.avail_out;if($===0)return;if(a0.arraySet(Q.output,J.pending_buf,J.pending_out,$,Q.next_out),Q.next_out+=$,J.pending_out+=$,Q.total_out+=$,Q.avail_out-=$,J.pending-=$,J.pending===0)J.pending_out=0}function m0(Q,J){V2._tr_flush_block(Q,Q.block_start>=0?Q.block_start:-1,Q.strstart-Q.block_start,J),Q.block_start=Q.strstart,H1(Q.strm)}function I0(Q,J){Q.pending_buf[Q.pending++]=J}function z8(Q,J){Q.pending_buf[Q.pending++]=J>>>8&255,Q.pending_buf[Q.pending++]=J&255}function eH(Q,J,$,q){var X=Q.avail_in;if(X>q)X=q;if(X===0)return 0;if(Q.avail_in-=X,a0.arraySet(J,Q.input,Q.next_in,X,$),Q.state.wrap===1)Q.adler=bq(Q.adler,J,X,$);else if(Q.state.wrap===2)Q.adler=V1(Q.adler,J,X,$);return Q.next_in+=X,Q.total_in+=X,X}function mq(Q,J){var{max_chain_length:$,strstart:q}=Q,X,Y,W=Q.prev_length,U=Q.nice_match,G=Q.strstart>Q.w_size-L2?Q.strstart-(Q.w_size-L2):0,B=Q.window,K=Q.w_mask,j=Q.prev,F=Q.strstart+M1,H=B[q+W-1],E=B[q+W];if(Q.prev_length>=Q.good_match)$>>=2;if(U>Q.lookahead)U=Q.lookahead;do{if(X=J,B[X+W]!==E||B[X+W-1]!==H||B[X]!==B[q]||B[++X]!==B[q+1])continue;q+=2,X++;do;while(B[++q]===B[++X]&&B[++q]===B[++X]&&B[++q]===B[++X]&&B[++q]===B[++X]&&B[++q]===B[++X]&&B[++q]===B[++X]&&B[++q]===B[++X]&&B[++q]===B[++X]&&q<F);if(Y=M1-(F-q),q=F-M1,Y>W){if(Q.match_start=J,W=Y,Y>=U)break;H=B[q+W-1],E=B[q+W]}}while((J=j[J&K])>G&&--$!==0);if(W<=Q.lookahead)return W;return Q.lookahead}function u1(Q){var J=Q.w_size,$,q,X,Y,W;do{if(Y=Q.window_size-Q.lookahead-Q.strstart,Q.strstart>=J+(J-L2)){a0.arraySet(Q.window,Q.window,J,J,0),Q.match_start-=J,Q.strstart-=J,Q.block_start-=J,q=Q.hash_size,$=q;do X=Q.head[--$],Q.head[$]=X>=J?X-J:0;while(--q);q=J,$=q;do X=Q.prev[--$],Q.prev[$]=X>=J?X-J:0;while(--q);Y+=J}if(Q.strm.avail_in===0)break;if(q=eH(Q.strm,Q.window,Q.strstart+Q.lookahead,Y),Q.lookahead+=q,Q.lookahead+Q.insert>=w0){W=Q.strstart-Q.insert,Q.ins_h=Q.window[W],Q.ins_h=(Q.ins_h<<Q.hash_shift^Q.window[W+1])&Q.hash_mask;while(Q.insert)if(Q.ins_h=(Q.ins_h<<Q.hash_shift^Q.window[W+w0-1])&Q.hash_mask,Q.prev[W&Q.w_mask]=Q.head[Q.ins_h],Q.head[Q.ins_h]=W,W++,Q.insert--,Q.lookahead+Q.insert<w0)break}}while(Q.lookahead<L2&&Q.strm.avail_in!==0)}function Qj(Q,J){var $=65535;if($>Q.pending_buf_size-5)$=Q.pending_buf_size-5;for(;;){if(Q.lookahead<=1){if(u1(Q),Q.lookahead===0&&J===c1)return h0;if(Q.lookahead===0)break}Q.strstart+=Q.lookahead,Q.lookahead=0;var q=Q.block_start+$;if(Q.strstart===0||Q.strstart>=q){if(Q.lookahead=Q.strstart-q,Q.strstart=q,m0(Q,!1),Q.strm.avail_out===0)return h0}if(Q.strstart-Q.block_start>=Q.w_size-L2){if(m0(Q,!1),Q.strm.avail_out===0)return h0}}if(Q.insert=0,J===z1){if(m0(Q,!0),Q.strm.avail_out===0)return m1;return N6}if(Q.strstart>Q.block_start){if(m0(Q,!1),Q.strm.avail_out===0)return h0}return h0}function R7(Q,J){var $,q;for(;;){if(Q.lookahead<L2){if(u1(Q),Q.lookahead<L2&&J===c1)return h0;if(Q.lookahead===0)break}if($=0,Q.lookahead>=w0)Q.ins_h=(Q.ins_h<<Q.hash_shift^Q.window[Q.strstart+w0-1])&Q.hash_mask,$=Q.prev[Q.strstart&Q.w_mask]=Q.head[Q.ins_h],Q.head[Q.ins_h]=Q.strstart;if($!==0&&Q.strstart-$<=Q.w_size-L2)Q.match_length=mq(Q,$);if(Q.match_length>=w0)if(q=V2._tr_tally(Q,Q.strstart-Q.match_start,Q.match_length-w0),Q.lookahead-=Q.match_length,Q.match_length<=Q.max_lazy_match&&Q.lookahead>=w0){Q.match_length--;do Q.strstart++,Q.ins_h=(Q.ins_h<<Q.hash_shift^Q.window[Q.strstart+w0-1])&Q.hash_mask,$=Q.prev[Q.strstart&Q.w_mask]=Q.head[Q.ins_h],Q.head[Q.ins_h]=Q.strstart;while(--Q.match_length!==0);Q.strstart++}else Q.strstart+=Q.match_length,Q.match_length=0,Q.ins_h=Q.window[Q.strstart],Q.ins_h=(Q.ins_h<<Q.hash_shift^Q.window[Q.strstart+1])&Q.hash_mask;else q=V2._tr_tally(Q,0,Q.window[Q.strstart]),Q.lookahead--,Q.strstart++;if(q){if(m0(Q,!1),Q.strm.avail_out===0)return h0}}if(Q.insert=Q.strstart<w0-1?Q.strstart:w0-1,J===z1){if(m0(Q,!0),Q.strm.avail_out===0)return m1;return N6}if(Q.last_lit){if(m0(Q,!1),Q.strm.avail_out===0)return h0}return N8}function z6(Q,J){var $,q,X;for(;;){if(Q.lookahead<L2){if(u1(Q),Q.lookahead<L2&&J===c1)return h0;if(Q.lookahead===0)break}if($=0,Q.lookahead>=w0)Q.ins_h=(Q.ins_h<<Q.hash_shift^Q.window[Q.strstart+w0-1])&Q.hash_mask,$=Q.prev[Q.strstart&Q.w_mask]=Q.head[Q.ins_h],Q.head[Q.ins_h]=Q.strstart;if(Q.prev_length=Q.match_length,Q.prev_match=Q.match_start,Q.match_length=w0-1,$!==0&&Q.prev_length<Q.max_lazy_match&&Q.strstart-$<=Q.w_size-L2){if(Q.match_length=mq(Q,$),Q.match_length<=5&&(Q.strategy===yH||Q.match_length===w0&&Q.strstart-Q.match_start>4096))Q.match_length=w0-1}if(Q.prev_length>=w0&&Q.match_length<=Q.prev_length){X=Q.strstart+Q.lookahead-w0,q=V2._tr_tally(Q,Q.strstart-1-Q.prev_match,Q.prev_length-w0),Q.lookahead-=Q.prev_length-1,Q.prev_length-=2;do if(++Q.strstart<=X)Q.ins_h=(Q.ins_h<<Q.hash_shift^Q.window[Q.strstart+w0-1])&Q.hash_mask,$=Q.prev[Q.strstart&Q.w_mask]=Q.head[Q.ins_h],Q.head[Q.ins_h]=Q.strstart;while(--Q.prev_length!==0);if(Q.match_available=0,Q.match_length=w0-1,Q.strstart++,q){if(m0(Q,!1),Q.strm.avail_out===0)return h0}}else if(Q.match_available){if(q=V2._tr_tally(Q,0,Q.window[Q.strstart-1]),q)m0(Q,!1);if(Q.strstart++,Q.lookahead--,Q.strm.avail_out===0)return h0}else Q.match_available=1,Q.strstart++,Q.lookahead--}if(Q.match_available)q=V2._tr_tally(Q,0,Q.window[Q.strstart-1]),Q.match_available=0;if(Q.insert=Q.strstart<w0-1?Q.strstart:w0-1,J===z1){if(m0(Q,!0),Q.strm.avail_out===0)return m1;return N6}if(Q.last_lit){if(m0(Q,!1),Q.strm.avail_out===0)return h0}return N8}function Jj(Q,J){var $,q,X,Y,W=Q.window;for(;;){if(Q.lookahead<=M1){if(u1(Q),Q.lookahead<=M1&&J===c1)return h0;if(Q.lookahead===0)break}if(Q.match_length=0,Q.lookahead>=w0&&Q.strstart>0){if(X=Q.strstart-1,q=W[X],q===W[++X]&&q===W[++X]&&q===W[++X]){Y=Q.strstart+M1;do;while(q===W[++X]&&q===W[++X]&&q===W[++X]&&q===W[++X]&&q===W[++X]&&q===W[++X]&&q===W[++X]&&q===W[++X]&&X<Y);if(Q.match_length=M1-(Y-X),Q.match_length>Q.lookahead)Q.match_length=Q.lookahead}}if(Q.match_length>=w0)$=V2._tr_tally(Q,1,Q.match_length-w0),Q.lookahead-=Q.match_length,Q.strstart+=Q.match_length,Q.match_length=0;else $=V2._tr_tally(Q,0,Q.window[Q.strstart]),Q.lookahead--,Q.strstart++;if($){if(m0(Q,!1),Q.strm.avail_out===0)return h0}}if(Q.insert=0,J===z1){if(m0(Q,!0),Q.strm.avail_out===0)return m1;return N6}if(Q.last_lit){if(m0(Q,!1),Q.strm.avail_out===0)return h0}return N8}function $j(Q,J){var $;for(;;){if(Q.lookahead===0){if(u1(Q),Q.lookahead===0){if(J===c1)return h0;break}}if(Q.match_length=0,$=V2._tr_tally(Q,0,Q.window[Q.strstart]),Q.lookahead--,Q.strstart++,$){if(m0(Q,!1),Q.strm.avail_out===0)return h0}}if(Q.insert=0,J===z1){if(m0(Q,!0),Q.strm.avail_out===0)return m1;return N6}if(Q.last_lit){if(m0(Q,!1),Q.strm.avail_out===0)return h0}return N8}function T2(Q,J,$,q,X){this.good_length=Q,this.max_lazy=J,this.nice_length=$,this.max_chain=q,this.func=X}var L6;L6=[new T2(0,0,0,0,Qj),new T2(4,4,8,4,R7),new T2(4,5,16,8,R7),new T2(4,6,32,32,R7),new T2(4,4,16,16,z6),new T2(8,16,32,32,z6),new T2(8,16,128,128,z6),new T2(8,32,128,256,z6),new T2(32,128,258,1024,z6),new T2(32,258,258,4096,z6)];function qj(Q){Q.window_size=2*Q.w_size,j1(Q.head),Q.max_lazy_match=L6[Q.level].max_lazy,Q.good_match=L6[Q.level].good_length,Q.nice_match=L6[Q.level].nice_length,Q.max_chain_length=L6[Q.level].max_chain,Q.strstart=0,Q.block_start=0,Q.lookahead=0,Q.insert=0,Q.match_length=Q.prev_length=w0-1,Q.match_available=0,Q.ins_h=0}function Xj(){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=L5,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 a0.Buf16(rH*2),this.dyn_dtree=new a0.Buf16((2*nH+1)*2),this.bl_tree=new a0.Buf16((2*oH+1)*2),j1(this.dyn_ltree),j1(this.dyn_dtree),j1(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new a0.Buf16(aH+1),this.heap=new a0.Buf16(2*w7+1),j1(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new a0.Buf16(2*w7+1),j1(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 uq(Q){var J;if(!Q||!Q.state)return F1(Q,H2);if(Q.total_in=Q.total_out=0,Q.data_type=uH,J=Q.state,J.pending=0,J.pending_out=0,J.wrap<0)J.wrap=-J.wrap;return J.status=J.wrap?N5:b1,Q.adler=J.wrap===2?0:1,J.last_flush=c1,V2._tr_init(J),x2}function cq(Q){var J=uq(Q);if(J===x2)qj(Q.state);return J}function Yj(Q,J){if(!Q||!Q.state)return H2;if(Q.state.wrap!==2)return H2;return Q.state.gzhead=J,x2}function pq(Q,J,$,q,X,Y){if(!Q)return H2;var W=1;if(J===fH)J=6;if(q<0)W=0,q=-q;else if(q>15)W=2,q-=16;if(X<1||X>cH||$!==L5||q<8||q>15||J<0||J>9||Y<0||Y>bH)return F1(Q,H2);if(q===8)q=9;var U=new Xj;return Q.state=U,U.strm=Q,U.wrap=W,U.gzhead=null,U.w_bits=q,U.w_size=1<<U.w_bits,U.w_mask=U.w_size-1,U.hash_bits=X+7,U.hash_size=1<<U.hash_bits,U.hash_mask=U.hash_size-1,U.hash_shift=~~((U.hash_bits+w0-1)/w0),U.window=new a0.Buf8(U.w_size*2),U.head=new a0.Buf16(U.hash_size),U.prev=new a0.Buf16(U.w_size),U.lit_bufsize=1<<X+6,U.pending_buf_size=U.lit_bufsize*4,U.pending_buf=new a0.Buf8(U.pending_buf_size),U.d_buf=1*U.lit_bufsize,U.l_buf=3*U.lit_bufsize,U.level=J,U.strategy=Y,U.method=$,cq(Q)}function Wj(Q,J){return pq(Q,J,L5,pH,lH,mH)}function Uj(Q,J){var $,q,X,Y;if(!Q||!Q.state||J>fq||J<0)return Q?F1(Q,H2):H2;if(q=Q.state,!Q.output||!Q.input&&Q.avail_in!==0||q.status===L8&&J!==z1)return F1(Q,Q.avail_out===0?A7:H2);if(q.strm=Q,$=q.last_flush,q.last_flush=J,q.status===N5)if(q.wrap===2)if(Q.adler=0,I0(q,31),I0(q,139),I0(q,8),!q.gzhead)I0(q,0),I0(q,0),I0(q,0),I0(q,0),I0(q,0),I0(q,q.level===9?2:q.strategy>=j5||q.level<2?4:0),I0(q,tH),q.status=b1;else{if(I0(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)),I0(q,q.gzhead.time&255),I0(q,q.gzhead.time>>8&255),I0(q,q.gzhead.time>>16&255),I0(q,q.gzhead.time>>24&255),I0(q,q.level===9?2:q.strategy>=j5||q.level<2?4:0),I0(q,q.gzhead.os&255),q.gzhead.extra&&q.gzhead.extra.length)I0(q,q.gzhead.extra.length&255),I0(q,q.gzhead.extra.length>>8&255);if(q.gzhead.hcrc)Q.adler=V1(Q.adler,q.pending_buf,q.pending,0);q.gzindex=0,q.status=I7}else{var W=L5+(q.w_bits-8<<4)<<8,U=-1;if(q.strategy>=j5||q.level<2)U=0;else if(q.level<6)U=1;else if(q.level===6)U=2;else U=3;if(W|=U<<6,q.strstart!==0)W|=sH;if(W+=31-W%31,q.status=b1,z8(q,W),q.strstart!==0)z8(q,Q.adler>>>16),z8(q,Q.adler&65535);Q.adler=1}if(q.status===I7)if(q.gzhead.extra){X=q.pending;while(q.gzindex<(q.gzhead.extra.length&65535)){if(q.pending===q.pending_buf_size){if(q.gzhead.hcrc&&q.pending>X)Q.adler=V1(Q.adler,q.pending_buf,q.pending-X,X);if(H1(Q),X=q.pending,q.pending===q.pending_buf_size)break}I0(q,q.gzhead.extra[q.gzindex]&255),q.gzindex++}if(q.gzhead.hcrc&&q.pending>X)Q.adler=V1(Q.adler,q.pending_buf,q.pending-X,X);if(q.gzindex===q.gzhead.extra.length)q.gzindex=0,q.status=M5}else q.status=M5;if(q.status===M5)if(q.gzhead.name){X=q.pending;do{if(q.pending===q.pending_buf_size){if(q.gzhead.hcrc&&q.pending>X)Q.adler=V1(Q.adler,q.pending_buf,q.pending-X,X);if(H1(Q),X=q.pending,q.pending===q.pending_buf_size){Y=1;break}}if(q.gzindex<q.gzhead.name.length)Y=q.gzhead.name.charCodeAt(q.gzindex++)&255;else Y=0;I0(q,Y)}while(Y!==0);if(q.gzhead.hcrc&&q.pending>X)Q.adler=V1(Q.adler,q.pending_buf,q.pending-X,X);if(Y===0)q.gzindex=0,q.status=F5}else q.status=F5;if(q.status===F5)if(q.gzhead.comment){X=q.pending;do{if(q.pending===q.pending_buf_size){if(q.gzhead.hcrc&&q.pending>X)Q.adler=V1(Q.adler,q.pending_buf,q.pending-X,X);if(H1(Q),X=q.pending,q.pending===q.pending_buf_size){Y=1;break}}if(q.gzindex<q.gzhead.comment.length)Y=q.gzhead.comment.charCodeAt(q.gzindex++)&255;else Y=0;I0(q,Y)}while(Y!==0);if(q.gzhead.hcrc&&q.pending>X)Q.adler=V1(Q.adler,q.pending_buf,q.pending-X,X);if(Y===0)q.status=z5}else q.status=z5;if(q.status===z5)if(q.gzhead.hcrc){if(q.pending+2>q.pending_buf_size)H1(Q);if(q.pending+2<=q.pending_buf_size)I0(q,Q.adler&255),I0(q,Q.adler>>8&255),Q.adler=0,q.status=b1}else q.status=b1;if(q.pending!==0){if(H1(Q),Q.avail_out===0)return q.last_flush=-1,x2}else if(Q.avail_in===0&&hq(J)<=hq($)&&J!==z1)return F1(Q,A7);if(q.status===L8&&Q.avail_in!==0)return F1(Q,A7);if(Q.avail_in!==0||q.lookahead!==0||J!==c1&&q.status!==L8){var G=q.strategy===j5?$j(q,J):q.strategy===hH?Jj(q,J):L6[q.level].func(q,J);if(G===m1||G===N6)q.status=L8;if(G===h0||G===m1){if(Q.avail_out===0)q.last_flush=-1;return x2}if(G===N8){if(J===xH)V2._tr_align(q);else if(J!==fq){if(V2._tr_stored_block(q,0,0,!1),J===gH){if(j1(q.head),q.lookahead===0)q.strstart=0,q.block_start=0,q.insert=0}}if(H1(Q),Q.avail_out===0)return q.last_flush=-1,x2}}if(J!==z1)return x2;if(q.wrap<=0)return yq;if(q.wrap===2)I0(q,Q.adler&255),I0(q,Q.adler>>8&255),I0(q,Q.adler>>16&255),I0(q,Q.adler>>24&255),I0(q,Q.total_in&255),I0(q,Q.total_in>>8&255),I0(q,Q.total_in>>16&255),I0(q,Q.total_in>>24&255);else z8(q,Q.adler>>>16),z8(q,Q.adler&65535);if(H1(Q),q.wrap>0)q.wrap=-q.wrap;return q.pending!==0?x2:yq}function Gj(Q){var J;if(!Q||!Q.state)return H2;if(J=Q.state.status,J!==N5&&J!==I7&&J!==M5&&J!==F5&&J!==z5&&J!==b1&&J!==L8)return F1(Q,H2);return Q.state=null,J===b1?F1(Q,_H):x2}function Bj(Q,J){var $=J.length,q,X,Y,W,U,G,B,K;if(!Q||!Q.state)return H2;if(q=Q.state,W=q.wrap,W===2||W===1&&q.status!==N5||q.lookahead)return H2;if(W===1)Q.adler=bq(Q.adler,J,$,0);if(q.wrap=0,$>=q.w_size){if(W===0)j1(q.head),q.strstart=0,q.block_start=0,q.insert=0;K=new a0.Buf8(q.w_size),a0.arraySet(K,J,$-q.w_size,q.w_size,0),J=K,$=q.w_size}U=Q.avail_in,G=Q.next_in,B=Q.input,Q.avail_in=$,Q.next_in=0,Q.input=J,u1(q);while(q.lookahead>=w0){X=q.strstart,Y=q.lookahead-(w0-1);do q.ins_h=(q.ins_h<<q.hash_shift^q.window[X+w0-1])&q.hash_mask,q.prev[X&q.w_mask]=q.head[q.ins_h],q.head[q.ins_h]=X,X++;while(--Y);q.strstart=X,q.lookahead=w0-1,u1(q)}return q.strstart+=q.lookahead,q.block_start=q.strstart,q.insert=q.lookahead,q.lookahead=0,q.match_length=q.prev_length=w0-1,q.match_available=0,Q.next_in=G,Q.input=B,Q.avail_in=U,q.wrap=W,x2}Kj.deflateInit=Wj;Kj.deflateInit2=pq;Kj.deflateReset=cq;Kj.deflateResetKeep=uq;Kj.deflateSetHeader=Yj;Kj.deflate=Uj;Kj.deflateEnd=Gj;Kj.deflateSetDictionary=Bj;Kj.deflateInfo="pako deflate (from Nodeca project)"});var S7=f((Cj)=>{var D5=r2(),dq=!0,iq=!0;try{String.fromCharCode.apply(null,[0])}catch(Q){dq=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(Q){iq=!1}var D8=new D5.Buf8(256);for(g2=0;g2<256;g2++)D8[g2]=g2>=252?6:g2>=248?5:g2>=240?4:g2>=224?3:g2>=192?2:1;var g2;D8[254]=D8[254]=1;Cj.string2buf=function(Q){var J,$,q,X,Y,W=Q.length,U=0;for(X=0;X<W;X++){if($=Q.charCodeAt(X),($&64512)===55296&&X+1<W){if(q=Q.charCodeAt(X+1),(q&64512)===56320)$=65536+($-55296<<10)+(q-56320),X++}U+=$<128?1:$<2048?2:$<65536?3:4}J=new D5.Buf8(U);for(Y=0,X=0;Y<U;X++){if($=Q.charCodeAt(X),($&64512)===55296&&X+1<W){if(q=Q.charCodeAt(X+1),(q&64512)===56320)$=65536+($-55296<<10)+(q-56320),X++}if($<128)J[Y++]=$;else if($<2048)J[Y++]=192|$>>>6,J[Y++]=128|$&63;else if($<65536)J[Y++]=224|$>>>12,J[Y++]=128|$>>>6&63,J[Y++]=128|$&63;else J[Y++]=240|$>>>18,J[Y++]=128|$>>>12&63,J[Y++]=128|$>>>6&63,J[Y++]=128|$&63}return J};function nq(Q,J){if(J<65534){if(Q.subarray&&iq||!Q.subarray&&dq)return String.fromCharCode.apply(null,D5.shrinkBuf(Q,J))}var $="";for(var q=0;q<J;q++)$+=String.fromCharCode(Q[q]);return $}Cj.buf2binstring=function(Q){return nq(Q,Q.length)};Cj.binstring2buf=function(Q){var J=new D5.Buf8(Q.length);for(var $=0,q=J.length;$<q;$++)J[$]=Q.charCodeAt($);return J};Cj.buf2string=function(Q,J){var $,q,X,Y,W=J||Q.length,U=Array(W*2);for(q=0,$=0;$<W;){if(X=Q[$++],X<128){U[q++]=X;continue}if(Y=D8[X],Y>4){U[q++]=65533,$+=Y-1;continue}X&=Y===2?31:Y===3?15:7;while(Y>1&&$<W)X=X<<6|Q[$++]&63,Y--;if(Y>1){U[q++]=65533;continue}if(X<65536)U[q++]=X;else X-=65536,U[q++]=55296|X>>10&1023,U[q++]=56320|X&1023}return nq(U,q)};Cj.utf8border=function(Q,J){var $;if(J=J||Q.length,J>Q.length)J=Q.length;$=J-1;while($>=0&&(Q[$]&192)===128)$--;if($<0)return J;if($===0)return J;return $+D8[Q[$]]>J?$:J}});var Z7=f((TP,oq)=>{function Ij(){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}oq.exports=Ij});var tq=f((gj)=>{var C8=lq(),O8=r2(),E7=S7(),k7=H5(),Sj=Z7(),sq=Object.prototype.toString,Zj=0,v7=4,D6=0,rq=1,aq=2,vj=-1,Ej=0,kj=8;function p1(Q){if(!(this instanceof p1))return new p1(Q);this.options=O8.assign({level:vj,method:kj,chunkSize:16384,windowBits:15,memLevel:8,strategy:Ej,to:""},Q||{});var J=this.options;if(J.raw&&J.windowBits>0)J.windowBits=-J.windowBits;else if(J.gzip&&J.windowBits>0&&J.windowBits<16)J.windowBits+=16;this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Sj,this.strm.avail_out=0;var $=C8.deflateInit2(this.strm,J.level,J.method,J.windowBits,J.memLevel,J.strategy);if($!==D6)throw Error(k7[$]);if(J.header)C8.deflateSetHeader(this.strm,J.header);if(J.dictionary){var q;if(typeof J.dictionary==="string")q=E7.string2buf(J.dictionary);else if(sq.call(J.dictionary)==="[object ArrayBuffer]")q=new Uint8Array(J.dictionary);else q=J.dictionary;if($=C8.deflateSetDictionary(this.strm,q),$!==D6)throw Error(k7[$]);this._dict_set=!0}}p1.prototype.push=function(Q,J){var $=this.strm,q=this.options.chunkSize,X,Y;if(this.ended)return!1;if(Y=J===~~J?J:J===!0?v7:Zj,typeof Q==="string")$.input=E7.string2buf(Q);else if(sq.call(Q)==="[object ArrayBuffer]")$.input=new Uint8Array(Q);else $.input=Q;$.next_in=0,$.avail_in=$.input.length;do{if($.avail_out===0)$.output=new O8.Buf8(q),$.next_out=0,$.avail_out=q;if(X=C8.deflate($,Y),X!==rq&&X!==D6)return this.onEnd(X),this.ended=!0,!1;if($.avail_out===0||$.avail_in===0&&(Y===v7||Y===aq))if(this.options.to==="string")this.onData(E7.buf2binstring(O8.shrinkBuf($.output,$.next_out)));else this.onData(O8.shrinkBuf($.output,$.next_out))}while(($.avail_in>0||$.avail_out===0)&&X!==rq);if(Y===v7)return X=C8.deflateEnd(this.strm),this.onEnd(X),this.ended=!0,X===D6;if(Y===aq)return this.onEnd(D6),$.avail_out=0,!0;return!0};p1.prototype.onData=function(Q){this.chunks.push(Q)};p1.prototype.onEnd=function(Q){if(Q===D6)if(this.options.to==="string")this.result=this.chunks.join("");else this.result=O8.flattenChunks(this.chunks);this.chunks=[],this.err=Q,this.msg=this.strm.msg};function T7(Q,J){var $=new p1(J);if($.push(Q,!0),$.err)throw $.msg||k7[$.err];return $.result}function Tj(Q,J){return J=J||{},J.raw=!0,T7(Q,J)}function xj(Q,J){return J=J||{},J.gzip=!0,T7(Q,J)}gj.Deflate=p1;gj.deflate=T7;gj.deflateRaw=Tj;gj.gzip=xj});var Q9=f((gP,eq)=>{var C5=30,bj=12;eq.exports=function(J,$){var q,X,Y,W,U,G,B,K,j,F,H,E,g,P,D,V,z,L,A,y,T,d,S,v,R;q=J.state,X=J.next_in,v=J.input,Y=X+(J.avail_in-5),W=J.next_out,R=J.output,U=W-($-J.avail_out),G=W+(J.avail_out-257),B=q.dmax,K=q.wsize,j=q.whave,F=q.wnext,H=q.window,E=q.hold,g=q.bits,P=q.lencode,D=q.distcode,V=(1<<q.lenbits)-1,z=(1<<q.distbits)-1;Q:do{if(g<15)E+=v[X++]<<g,g+=8,E+=v[X++]<<g,g+=8;L=P[E&V];J:for(;;){if(A=L>>>24,E>>>=A,g-=A,A=L>>>16&255,A===0)R[W++]=L&65535;else if(A&16){if(y=L&65535,A&=15,A){if(g<A)E+=v[X++]<<g,g+=8;y+=E&(1<<A)-1,E>>>=A,g-=A}if(g<15)E+=v[X++]<<g,g+=8,E+=v[X++]<<g,g+=8;L=D[E&z];$:for(;;){if(A=L>>>24,E>>>=A,g-=A,A=L>>>16&255,A&16){if(T=L&65535,A&=15,g<A){if(E+=v[X++]<<g,g+=8,g<A)E+=v[X++]<<g,g+=8}if(T+=E&(1<<A)-1,T>B){J.msg="invalid distance too far back",q.mode=C5;break Q}if(E>>>=A,g-=A,A=W-U,T>A){if(A=T-A,A>j){if(q.sane){J.msg="invalid distance too far back",q.mode=C5;break Q}}if(d=0,S=H,F===0){if(d+=K-A,A<y){y-=A;do R[W++]=H[d++];while(--A);d=W-T,S=R}}else if(F<A){if(d+=K+F-A,A-=F,A<y){y-=A;do R[W++]=H[d++];while(--A);if(d=0,F<y){A=F,y-=A;do R[W++]=H[d++];while(--A);d=W-T,S=R}}}else if(d+=F-A,A<y){y-=A;do R[W++]=H[d++];while(--A);d=W-T,S=R}while(y>2)R[W++]=S[d++],R[W++]=S[d++],R[W++]=S[d++],y-=3;if(y){if(R[W++]=S[d++],y>1)R[W++]=S[d++]}}else{d=W-T;do R[W++]=R[d++],R[W++]=R[d++],R[W++]=R[d++],y-=3;while(y>2);if(y){if(R[W++]=R[d++],y>1)R[W++]=R[d++]}}}else if((A&64)===0){L=D[(L&65535)+(E&(1<<A)-1)];continue $}else{J.msg="invalid distance code",q.mode=C5;break Q}break}}else if((A&64)===0){L=P[(L&65535)+(E&(1<<A)-1)];continue J}else if(A&32){q.mode=bj;break Q}else{J.msg="invalid literal/length code",q.mode=C5;break Q}break}}while(X<Y&&W<G);y=g>>3,X-=y,g-=y<<3,E&=(1<<g)-1,J.next_in=X,J.next_out=W,J.avail_in=X<Y?5+(Y-X):5-(X-Y),J.avail_out=W<G?257+(G-W):257-(W-G),q.hold=E,q.bits=g;return}});var U9=f((_P,W9)=>{var J9=r2(),C6=15,$9=852,q9=592,X9=0,x7=1,Y9=2,mj=[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],uj=[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],cj=[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],pj=[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];W9.exports=function(J,$,q,X,Y,W,U,G){var B=G.bits,K=0,j=0,F=0,H=0,E=0,g=0,P=0,D=0,V=0,z=0,L,A,y,T,d,S=null,v=0,R,O=new J9.Buf16(C6+1),_=new J9.Buf16(C6+1),h=null,x=0,a,$0,G0;for(K=0;K<=C6;K++)O[K]=0;for(j=0;j<X;j++)O[$[q+j]]++;E=B;for(H=C6;H>=1;H--)if(O[H]!==0)break;if(E>H)E=H;if(H===0)return Y[W++]=20971520,Y[W++]=20971520,G.bits=1,0;for(F=1;F<H;F++)if(O[F]!==0)break;if(E<F)E=F;D=1;for(K=1;K<=C6;K++)if(D<<=1,D-=O[K],D<0)return-1;if(D>0&&(J===X9||H!==1))return-1;_[1]=0;for(K=1;K<C6;K++)_[K+1]=_[K]+O[K];for(j=0;j<X;j++)if($[q+j]!==0)U[_[$[q+j]]++]=j;if(J===X9)S=h=U,R=19;else if(J===x7)S=mj,v-=257,h=uj,x-=257,R=256;else S=cj,h=pj,R=-1;if(z=0,j=0,K=F,d=W,g=E,P=0,y=-1,V=1<<E,T=V-1,J===x7&&V>$9||J===Y9&&V>q9)return 1;for(;;){if(a=K-P,U[j]<R)$0=0,G0=U[j];else if(U[j]>R)$0=h[x+U[j]],G0=S[v+U[j]];else $0=96,G0=0;L=1<<K-P,A=1<<g,F=A;do A-=L,Y[d+(z>>P)+A]=a<<24|$0<<16|G0|0;while(A!==0);L=1<<K-1;while(z&L)L>>=1;if(L!==0)z&=L-1,z+=L;else z=0;if(j++,--O[K]===0){if(K===H)break;K=$[q+U[j]]}if(K>E&&(z&T)!==y){if(P===0)P=E;d+=F,g=K-P,D=1<<g;while(g+P<H){if(D-=O[g+P],D<=0)break;g++,D<<=1}if(V+=1<<g,J===x7&&V>$9||J===Y9&&V>q9)return 1;y=z&T,Y[y]=E<<24|g<<16|d-W|0}}if(z!==0)Y[d+z]=K-P<<24|4194304|0;return G.bits=E,0}});var c9=f((GM)=>{var X2=r2(),b7=O7(),_2=P7(),lj=Q9(),P8=U9(),dj=0,x9=1,g9=2,G9=4,ij=5,O5=6,l1=0,nj=1,oj=2,j2=-2,_9=-3,m7=-4,rj=-5,B9=8,f9=1,K9=2,V9=3,H9=4,j9=5,M9=6,F9=7,z9=8,L9=9,N9=10,R5=11,s2=12,g7=13,D9=14,_7=15,C9=16,O9=17,P9=18,A9=19,P5=20,A5=21,R9=22,w9=23,I9=24,S9=25,Z9=26,f7=27,v9=28,E9=29,k0=30,u7=31,aj=32,sj=852,tj=592,ej=15,QM=ej;function k9(Q){return(Q>>>24&255)+(Q>>>8&65280)+((Q&65280)<<8)+((Q&255)<<24)}function JM(){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 X2.Buf16(320),this.work=new X2.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function y9(Q){var J;if(!Q||!Q.state)return j2;if(J=Q.state,Q.total_in=Q.total_out=J.total=0,Q.msg="",J.wrap)Q.adler=J.wrap&1;return J.mode=f9,J.last=0,J.havedict=0,J.dmax=32768,J.head=null,J.hold=0,J.bits=0,J.lencode=J.lendyn=new X2.Buf32(sj),J.distcode=J.distdyn=new X2.Buf32(tj),J.sane=1,J.back=-1,l1}function h9(Q){var J;if(!Q||!Q.state)return j2;return J=Q.state,J.wsize=0,J.whave=0,J.wnext=0,y9(Q)}function b9(Q,J){var $,q;if(!Q||!Q.state)return j2;if(q=Q.state,J<0)$=0,J=-J;else if($=(J>>4)+1,J<48)J&=15;if(J&&(J<8||J>15))return j2;if(q.window!==null&&q.wbits!==J)q.window=null;return q.wrap=$,q.wbits=J,h9(Q)}function m9(Q,J){var $,q;if(!Q)return j2;if(q=new JM,Q.state=q,q.window=null,$=b9(Q,J),$!==l1)Q.state=null;return $}function $M(Q){return m9(Q,QM)}var T9=!0,y7,h7;function qM(Q){if(T9){var J;y7=new X2.Buf32(512),h7=new X2.Buf32(32),J=0;while(J<144)Q.lens[J++]=8;while(J<256)Q.lens[J++]=9;while(J<280)Q.lens[J++]=7;while(J<288)Q.lens[J++]=8;P8(x9,Q.lens,0,288,y7,0,Q.work,{bits:9}),J=0;while(J<32)Q.lens[J++]=5;P8(g9,Q.lens,0,32,h7,0,Q.work,{bits:5}),T9=!1}Q.lencode=y7,Q.lenbits=9,Q.distcode=h7,Q.distbits=5}function u9(Q,J,$,q){var X,Y=Q.state;if(Y.window===null)Y.wsize=1<<Y.wbits,Y.wnext=0,Y.whave=0,Y.window=new X2.Buf8(Y.wsize);if(q>=Y.wsize)X2.arraySet(Y.window,J,$-Y.wsize,Y.wsize,0),Y.wnext=0,Y.whave=Y.wsize;else{if(X=Y.wsize-Y.wnext,X>q)X=q;if(X2.arraySet(Y.window,J,$-q,X,Y.wnext),q-=X,q)X2.arraySet(Y.window,J,$-q,q,0),Y.wnext=q,Y.whave=Y.wsize;else{if(Y.wnext+=X,Y.wnext===Y.wsize)Y.wnext=0;if(Y.whave<Y.wsize)Y.whave+=X}}return 0}function XM(Q,J){var $,q,X,Y,W,U,G,B,K,j,F,H,E,g,P=0,D,V,z,L,A,y,T,d,S=new X2.Buf8(4),v,R,O=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!Q||!Q.state||!Q.output||!Q.input&&Q.avail_in!==0)return j2;if($=Q.state,$.mode===s2)$.mode=g7;W=Q.next_out,X=Q.output,G=Q.avail_out,Y=Q.next_in,q=Q.input,U=Q.avail_in,B=$.hold,K=$.bits,j=U,F=G,d=l1;Q:for(;;)switch($.mode){case f9:if($.wrap===0){$.mode=g7;break}while(K<16){if(U===0)break Q;U--,B+=q[Y++]<<K,K+=8}if($.wrap&2&&B===35615){$.check=0,S[0]=B&255,S[1]=B>>>8&255,$.check=_2($.check,S,2,0),B=0,K=0,$.mode=K9;break}if($.flags=0,$.head)$.head.done=!1;if(!($.wrap&1)||(((B&255)<<8)+(B>>8))%31){Q.msg="incorrect header check",$.mode=k0;break}if((B&15)!==B9){Q.msg="unknown compression method",$.mode=k0;break}if(B>>>=4,K-=4,T=(B&15)+8,$.wbits===0)$.wbits=T;else if(T>$.wbits){Q.msg="invalid window size",$.mode=k0;break}$.dmax=1<<T,Q.adler=$.check=1,$.mode=B&512?N9:s2,B=0,K=0;break;case K9:while(K<16){if(U===0)break Q;U--,B+=q[Y++]<<K,K+=8}if($.flags=B,($.flags&255)!==B9){Q.msg="unknown compression method",$.mode=k0;break}if($.flags&57344){Q.msg="unknown header flags set",$.mode=k0;break}if($.head)$.head.text=B>>8&1;if($.flags&512)S[0]=B&255,S[1]=B>>>8&255,$.check=_2($.check,S,2,0);B=0,K=0,$.mode=V9;case V9:while(K<32){if(U===0)break Q;U--,B+=q[Y++]<<K,K+=8}if($.head)$.head.time=B;if($.flags&512)S[0]=B&255,S[1]=B>>>8&255,S[2]=B>>>16&255,S[3]=B>>>24&255,$.check=_2($.check,S,4,0);B=0,K=0,$.mode=H9;case H9:while(K<16){if(U===0)break Q;U--,B+=q[Y++]<<K,K+=8}if($.head)$.head.xflags=B&255,$.head.os=B>>8;if($.flags&512)S[0]=B&255,S[1]=B>>>8&255,$.check=_2($.check,S,2,0);B=0,K=0,$.mode=j9;case j9:if($.flags&1024){while(K<16){if(U===0)break Q;U--,B+=q[Y++]<<K,K+=8}if($.length=B,$.head)$.head.extra_len=B;if($.flags&512)S[0]=B&255,S[1]=B>>>8&255,$.check=_2($.check,S,2,0);B=0,K=0}else if($.head)$.head.extra=null;$.mode=M9;case M9:if($.flags&1024){if(H=$.length,H>U)H=U;if(H){if($.head){if(T=$.head.extra_len-$.length,!$.head.extra)$.head.extra=Array($.head.extra_len);X2.arraySet($.head.extra,q,Y,H,T)}if($.flags&512)$.check=_2($.check,q,H,Y);U-=H,Y+=H,$.length-=H}if($.length)break Q}$.length=0,$.mode=F9;case F9:if($.flags&2048){if(U===0)break Q;H=0;do if(T=q[Y+H++],$.head&&T&&$.length<65536)$.head.name+=String.fromCharCode(T);while(T&&H<U);if($.flags&512)$.check=_2($.check,q,H,Y);if(U-=H,Y+=H,T)break Q}else if($.head)$.head.name=null;$.length=0,$.mode=z9;case z9:if($.flags&4096){if(U===0)break Q;H=0;do if(T=q[Y+H++],$.head&&T&&$.length<65536)$.head.comment+=String.fromCharCode(T);while(T&&H<U);if($.flags&512)$.check=_2($.check,q,H,Y);if(U-=H,Y+=H,T)break Q}else if($.head)$.head.comment=null;$.mode=L9;case L9:if($.flags&512){while(K<16){if(U===0)break Q;U--,B+=q[Y++]<<K,K+=8}if(B!==($.check&65535)){Q.msg="header crc mismatch",$.mode=k0;break}B=0,K=0}if($.head)$.head.hcrc=$.flags>>9&1,$.head.done=!0;Q.adler=$.check=0,$.mode=s2;break;case N9:while(K<32){if(U===0)break Q;U--,B+=q[Y++]<<K,K+=8}Q.adler=$.check=k9(B),B=0,K=0,$.mode=R5;case R5:if($.havedict===0)return Q.next_out=W,Q.avail_out=G,Q.next_in=Y,Q.avail_in=U,$.hold=B,$.bits=K,oj;Q.adler=$.check=1,$.mode=s2;case s2:if(J===ij||J===O5)break Q;case g7:if($.last){B>>>=K&7,K-=K&7,$.mode=f7;break}while(K<3){if(U===0)break Q;U--,B+=q[Y++]<<K,K+=8}switch($.last=B&1,B>>>=1,K-=1,B&3){case 0:$.mode=D9;break;case 1:if(qM($),$.mode=P5,J===O5){B>>>=2,K-=2;break Q}break;case 2:$.mode=O9;break;case 3:Q.msg="invalid block type",$.mode=k0}B>>>=2,K-=2;break;case D9:B>>>=K&7,K-=K&7;while(K<32){if(U===0)break Q;U--,B+=q[Y++]<<K,K+=8}if((B&65535)!==(B>>>16^65535)){Q.msg="invalid stored block lengths",$.mode=k0;break}if($.length=B&65535,B=0,K=0,$.mode=_7,J===O5)break Q;case _7:$.mode=C9;case C9:if(H=$.length,H){if(H>U)H=U;if(H>G)H=G;if(H===0)break Q;X2.arraySet(X,q,Y,H,W),U-=H,Y+=H,G-=H,W+=H,$.length-=H;break}$.mode=s2;break;case O9:while(K<14){if(U===0)break Q;U--,B+=q[Y++]<<K,K+=8}if($.nlen=(B&31)+257,B>>>=5,K-=5,$.ndist=(B&31)+1,B>>>=5,K-=5,$.ncode=(B&15)+4,B>>>=4,K-=4,$.nlen>286||$.ndist>30){Q.msg="too many length or distance symbols",$.mode=k0;break}$.have=0,$.mode=P9;case P9:while($.have<$.ncode){while(K<3){if(U===0)break Q;U--,B+=q[Y++]<<K,K+=8}$.lens[O[$.have++]]=B&7,B>>>=3,K-=3}while($.have<19)$.lens[O[$.have++]]=0;if($.lencode=$.lendyn,$.lenbits=7,v={bits:$.lenbits},d=P8(dj,$.lens,0,19,$.lencode,0,$.work,v),$.lenbits=v.bits,d){Q.msg="invalid code lengths set",$.mode=k0;break}$.have=0,$.mode=A9;case A9:while($.have<$.nlen+$.ndist){for(;;){if(P=$.lencode[B&(1<<$.lenbits)-1],D=P>>>24,V=P>>>16&255,z=P&65535,D<=K)break;if(U===0)break Q;U--,B+=q[Y++]<<K,K+=8}if(z<16)B>>>=D,K-=D,$.lens[$.have++]=z;else{if(z===16){R=D+2;while(K<R){if(U===0)break Q;U--,B+=q[Y++]<<K,K+=8}if(B>>>=D,K-=D,$.have===0){Q.msg="invalid bit length repeat",$.mode=k0;break}T=$.lens[$.have-1],H=3+(B&3),B>>>=2,K-=2}else if(z===17){R=D+3;while(K<R){if(U===0)break Q;U--,B+=q[Y++]<<K,K+=8}B>>>=D,K-=D,T=0,H=3+(B&7),B>>>=3,K-=3}else{R=D+7;while(K<R){if(U===0)break Q;U--,B+=q[Y++]<<K,K+=8}B>>>=D,K-=D,T=0,H=11+(B&127),B>>>=7,K-=7}if($.have+H>$.nlen+$.ndist){Q.msg="invalid bit length repeat",$.mode=k0;break}while(H--)$.lens[$.have++]=T}}if($.mode===k0)break;if($.lens[256]===0){Q.msg="invalid code -- missing end-of-block",$.mode=k0;break}if($.lenbits=9,v={bits:$.lenbits},d=P8(x9,$.lens,0,$.nlen,$.lencode,0,$.work,v),$.lenbits=v.bits,d){Q.msg="invalid literal/lengths set",$.mode=k0;break}if($.distbits=6,$.distcode=$.distdyn,v={bits:$.distbits},d=P8(g9,$.lens,$.nlen,$.ndist,$.distcode,0,$.work,v),$.distbits=v.bits,d){Q.msg="invalid distances set",$.mode=k0;break}if($.mode=P5,J===O5)break Q;case P5:$.mode=A5;case A5:if(U>=6&&G>=258){if(Q.next_out=W,Q.avail_out=G,Q.next_in=Y,Q.avail_in=U,$.hold=B,$.bits=K,lj(Q,F),W=Q.next_out,X=Q.output,G=Q.avail_out,Y=Q.next_in,q=Q.input,U=Q.avail_in,B=$.hold,K=$.bits,$.mode===s2)$.back=-1;break}$.back=0;for(;;){if(P=$.lencode[B&(1<<$.lenbits)-1],D=P>>>24,V=P>>>16&255,z=P&65535,D<=K)break;if(U===0)break Q;U--,B+=q[Y++]<<K,K+=8}if(V&&(V&240)===0){L=D,A=V,y=z;for(;;){if(P=$.lencode[y+((B&(1<<L+A)-1)>>L)],D=P>>>24,V=P>>>16&255,z=P&65535,L+D<=K)break;if(U===0)break Q;U--,B+=q[Y++]<<K,K+=8}B>>>=L,K-=L,$.back+=L}if(B>>>=D,K-=D,$.back+=D,$.length=z,V===0){$.mode=Z9;break}if(V&32){$.back=-1,$.mode=s2;break}if(V&64){Q.msg="invalid literal/length code",$.mode=k0;break}$.extra=V&15,$.mode=R9;case R9:if($.extra){R=$.extra;while(K<R){if(U===0)break Q;U--,B+=q[Y++]<<K,K+=8}$.length+=B&(1<<$.extra)-1,B>>>=$.extra,K-=$.extra,$.back+=$.extra}$.was=$.length,$.mode=w9;case w9:for(;;){if(P=$.distcode[B&(1<<$.distbits)-1],D=P>>>24,V=P>>>16&255,z=P&65535,D<=K)break;if(U===0)break Q;U--,B+=q[Y++]<<K,K+=8}if((V&240)===0){L=D,A=V,y=z;for(;;){if(P=$.distcode[y+((B&(1<<L+A)-1)>>L)],D=P>>>24,V=P>>>16&255,z=P&65535,L+D<=K)break;if(U===0)break Q;U--,B+=q[Y++]<<K,K+=8}B>>>=L,K-=L,$.back+=L}if(B>>>=D,K-=D,$.back+=D,V&64){Q.msg="invalid distance code",$.mode=k0;break}$.offset=z,$.extra=V&15,$.mode=I9;case I9:if($.extra){R=$.extra;while(K<R){if(U===0)break Q;U--,B+=q[Y++]<<K,K+=8}$.offset+=B&(1<<$.extra)-1,B>>>=$.extra,K-=$.extra,$.back+=$.extra}if($.offset>$.dmax){Q.msg="invalid distance too far back",$.mode=k0;break}$.mode=S9;case S9:if(G===0)break Q;if(H=F-G,$.offset>H){if(H=$.offset-H,H>$.whave){if($.sane){Q.msg="invalid distance too far back",$.mode=k0;break}}if(H>$.wnext)H-=$.wnext,E=$.wsize-H;else E=$.wnext-H;if(H>$.length)H=$.length;g=$.window}else g=X,E=W-$.offset,H=$.length;if(H>G)H=G;G-=H,$.length-=H;do X[W++]=g[E++];while(--H);if($.length===0)$.mode=A5;break;case Z9:if(G===0)break Q;X[W++]=$.length,G--,$.mode=A5;break;case f7:if($.wrap){while(K<32){if(U===0)break Q;U--,B|=q[Y++]<<K,K+=8}if(F-=G,Q.total_out+=F,$.total+=F,F)Q.adler=$.check=$.flags?_2($.check,X,F,W-F):b7($.check,X,F,W-F);if(F=G,($.flags?B:k9(B))!==$.check){Q.msg="incorrect data check",$.mode=k0;break}B=0,K=0}$.mode=v9;case v9:if($.wrap&&$.flags){while(K<32){if(U===0)break Q;U--,B+=q[Y++]<<K,K+=8}if(B!==($.total&4294967295)){Q.msg="incorrect length check",$.mode=k0;break}B=0,K=0}$.mode=E9;case E9:d=nj;break Q;case k0:d=_9;break Q;case u7:return m7;case aj:default:return j2}if(Q.next_out=W,Q.avail_out=G,Q.next_in=Y,Q.avail_in=U,$.hold=B,$.bits=K,$.wsize||F!==Q.avail_out&&$.mode<k0&&($.mode<f7||J!==G9)){if(u9(Q,Q.output,Q.next_out,F-Q.avail_out))return $.mode=u7,m7}if(j-=Q.avail_in,F-=Q.avail_out,Q.total_in+=j,Q.total_out+=F,$.total+=F,$.wrap&&F)Q.adler=$.check=$.flags?_2($.check,X,F,Q.next_out-F):b7($.check,X,F,Q.next_out-F);if(Q.data_type=$.bits+($.last?64:0)+($.mode===s2?128:0)+($.mode===P5||$.mode===_7?256:0),(j===0&&F===0||J===G9)&&d===l1)d=rj;return d}function YM(Q){if(!Q||!Q.state)return j2;var J=Q.state;if(J.window)J.window=null;return Q.state=null,l1}function WM(Q,J){var $;if(!Q||!Q.state)return j2;if($=Q.state,($.wrap&2)===0)return j2;return $.head=J,J.done=!1,l1}function UM(Q,J){var $=J.length,q,X,Y;if(!Q||!Q.state)return j2;if(q=Q.state,q.wrap!==0&&q.mode!==R5)return j2;if(q.mode===R5){if(X=1,X=b7(X,J,$,0),X!==q.check)return _9}if(Y=u9(Q,J,$,$),Y)return q.mode=u7,m7;return q.havedict=1,l1}GM.inflateReset=h9;GM.inflateReset2=b9;GM.inflateResetKeep=y9;GM.inflateInit=$M;GM.inflateInit2=m9;GM.inflate=XM;GM.inflateEnd=YM;GM.inflateGetHeader=WM;GM.inflateSetDictionary=UM;GM.inflateInfo="pako inflate (from Nodeca project)"});var c7=f((yP,p9)=>{p9.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 d9=f((hP,l9)=>{function DM(){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}l9.exports=DM});var n9=f((AM)=>{var O6=c9(),A8=r2(),w5=S7(),y0=c7(),p7=H5(),CM=Z7(),OM=d9(),i9=Object.prototype.toString;function d1(Q){if(!(this instanceof d1))return new d1(Q);this.options=A8.assign({chunkSize:16384,windowBits:0,to:""},Q||{});var J=this.options;if(J.raw&&J.windowBits>=0&&J.windowBits<16){if(J.windowBits=-J.windowBits,J.windowBits===0)J.windowBits=-15}if(J.windowBits>=0&&J.windowBits<16&&!(Q&&Q.windowBits))J.windowBits+=32;if(J.windowBits>15&&J.windowBits<48){if((J.windowBits&15)===0)J.windowBits|=15}this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new CM,this.strm.avail_out=0;var $=O6.inflateInit2(this.strm,J.windowBits);if($!==y0.Z_OK)throw Error(p7[$]);if(this.header=new OM,O6.inflateGetHeader(this.strm,this.header),J.dictionary){if(typeof J.dictionary==="string")J.dictionary=w5.string2buf(J.dictionary);else if(i9.call(J.dictionary)==="[object ArrayBuffer]")J.dictionary=new Uint8Array(J.dictionary);if(J.raw){if($=O6.inflateSetDictionary(this.strm,J.dictionary),$!==y0.Z_OK)throw Error(p7[$])}}}d1.prototype.push=function(Q,J){var $=this.strm,q=this.options.chunkSize,X=this.options.dictionary,Y,W,U,G,B,K=!1;if(this.ended)return!1;if(W=J===~~J?J:J===!0?y0.Z_FINISH:y0.Z_NO_FLUSH,typeof Q==="string")$.input=w5.binstring2buf(Q);else if(i9.call(Q)==="[object ArrayBuffer]")$.input=new Uint8Array(Q);else $.input=Q;$.next_in=0,$.avail_in=$.input.length;do{if($.avail_out===0)$.output=new A8.Buf8(q),$.next_out=0,$.avail_out=q;if(Y=O6.inflate($,y0.Z_NO_FLUSH),Y===y0.Z_NEED_DICT&&X)Y=O6.inflateSetDictionary(this.strm,X);if(Y===y0.Z_BUF_ERROR&&K===!0)Y=y0.Z_OK,K=!1;if(Y!==y0.Z_STREAM_END&&Y!==y0.Z_OK)return this.onEnd(Y),this.ended=!0,!1;if($.next_out){if($.avail_out===0||Y===y0.Z_STREAM_END||$.avail_in===0&&(W===y0.Z_FINISH||W===y0.Z_SYNC_FLUSH))if(this.options.to==="string"){if(U=w5.utf8border($.output,$.next_out),G=$.next_out-U,B=w5.buf2string($.output,U),$.next_out=G,$.avail_out=q-G,G)A8.arraySet($.output,$.output,U,G,0);this.onData(B)}else this.onData(A8.shrinkBuf($.output,$.next_out))}if($.avail_in===0&&$.avail_out===0)K=!0}while(($.avail_in>0||$.avail_out===0)&&Y!==y0.Z_STREAM_END);if(Y===y0.Z_STREAM_END)W=y0.Z_FINISH;if(W===y0.Z_FINISH)return Y=O6.inflateEnd(this.strm),this.onEnd(Y),this.ended=!0,Y===y0.Z_OK;if(W===y0.Z_SYNC_FLUSH)return this.onEnd(y0.Z_OK),$.avail_out=0,!0;return!0};d1.prototype.onData=function(Q){this.chunks.push(Q)};d1.prototype.onEnd=function(Q){if(Q===y0.Z_OK)if(this.options.to==="string")this.result=this.chunks.join("");else this.result=A8.flattenChunks(this.chunks);this.chunks=[],this.err=Q,this.msg=this.strm.msg};function l7(Q,J){var $=new d1(J);if($.push(Q,!0),$.err)throw $.msg||p7[$.err];return $.result}function PM(Q,J){return J=J||{},J.raw=!0,l7(Q,J)}AM.Inflate=d1;AM.inflate=l7;AM.inflateRaw=PM;AM.ungzip=l7});var a9=f((mP,r9)=>{var ZM=r2().assign,vM=tq(),EM=n9(),kM=c7(),o9={};ZM(o9,vM,EM,kM);r9.exports=o9});var t9=f((_M)=>{var TM=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",xM=a9(),s9=x0(),I5=q2(),gM=TM?"uint8array":"array";_M.magic="\b\x00";function i1(Q,J){I5.call(this,"FlateWorker/"+Q),this._pako=null,this._pakoAction=Q,this._pakoOptions=J,this.meta={}}s9.inherits(i1,I5);i1.prototype.processChunk=function(Q){if(this.meta=Q.meta,this._pako===null)this._createPako();this._pako.push(s9.transformTo(gM,Q.data),!1)};i1.prototype.flush=function(){if(I5.prototype.flush.call(this),this._pako===null)this._createPako();this._pako.push([],!0)};i1.prototype.cleanUp=function(){I5.prototype.cleanUp.call(this),this._pako=null};i1.prototype._createPako=function(){this._pako=new xM[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var Q=this;this._pako.onData=function(J){Q.push({data:J,meta:Q.meta})}};_M.compressWorker=function(Q){return new i1("Deflate",Q)};_M.uncompressWorker=function(){return new i1("Inflate",{})}});var d7=f((bM)=>{var e9=q2();bM.STORE={magic:"\x00\x00",compressWorker:function(){return new e9("STORE compression")},uncompressWorker:function(){return new e9("STORE decompression")}};bM.DEFLATE=t9()});var i7=f((cM)=>{cM.LOCAL_FILE_HEADER="PK\x03\x04";cM.CENTRAL_FILE_HEADER="PK\x01\x02";cM.CENTRAL_DIRECTORY_END="PK\x05\x06";cM.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x06\x07";cM.ZIP64_CENTRAL_DIRECTORY_END="PK\x06\x06";cM.DATA_DESCRIPTOR="PK\x07\b"});var qX=f((lP,$X)=>{var P6=x0(),A6=q2(),n7=H6(),QX=G5(),S5=i7(),v0=function(Q,J){var $="",q;for(q=0;q<J;q++)$+=String.fromCharCode(Q&255),Q=Q>>>8;return $},rM=function(Q,J){var $=Q;if(!Q)$=J?16893:33204;return($&65535)<<16},aM=function(Q){return(Q||0)&63},JX=function(Q,J,$,q,X,Y){var{file:W,compression:U}=Q,G=Y!==n7.utf8encode,B=P6.transformTo("string",Y(W.name)),K=P6.transformTo("string",n7.utf8encode(W.name)),j=W.comment,F=P6.transformTo("string",Y(j)),H=P6.transformTo("string",n7.utf8encode(j)),E=K.length!==W.name.length,g=H.length!==j.length,P,D,V="",z="",L="",A=W.dir,y=W.date,T={crc32:0,compressedSize:0,uncompressedSize:0};if(!J||$)T.crc32=Q.crc32,T.compressedSize=Q.compressedSize,T.uncompressedSize=Q.uncompressedSize;var d=0;if(J)d|=8;if(!G&&(E||g))d|=2048;var S=0,v=0;if(A)S|=16;if(X==="UNIX")v=798,S|=rM(W.unixPermissions,A);else v=20,S|=aM(W.dosPermissions,A);if(P=y.getUTCHours(),P=P<<6,P=P|y.getUTCMinutes(),P=P<<5,P=P|y.getUTCSeconds()/2,D=y.getUTCFullYear()-1980,D=D<<4,D=D|y.getUTCMonth()+1,D=D<<5,D=D|y.getUTCDate(),E)z=v0(1,1)+v0(QX(B),4)+K,V+="up"+v0(z.length,2)+z;if(g)L=v0(1,1)+v0(QX(F),4)+H,V+="uc"+v0(L.length,2)+L;var R="";R+=`
|
|
3
|
+
\x00`,R+=v0(d,2),R+=U.magic,R+=v0(P,2),R+=v0(D,2),R+=v0(T.crc32,4),R+=v0(T.compressedSize,4),R+=v0(T.uncompressedSize,4),R+=v0(B.length,2),R+=v0(V.length,2);var O=S5.LOCAL_FILE_HEADER+R+B+V,_=S5.CENTRAL_FILE_HEADER+v0(v,2)+R+v0(F.length,2)+"\x00\x00\x00\x00"+v0(S,4)+v0(q,4)+B+V+F;return{fileRecord:O,dirRecord:_}},sM=function(Q,J,$,q,X){var Y="",W=P6.transformTo("string",X(q));return Y=S5.CENTRAL_DIRECTORY_END+"\x00\x00\x00\x00"+v0(Q,2)+v0(Q,2)+v0(J,4)+v0($,4)+v0(W.length,2)+W,Y},tM=function(Q){var J="";return J=S5.DATA_DESCRIPTOR+v0(Q.crc32,4)+v0(Q.compressedSize,4)+v0(Q.uncompressedSize,4),J};function N2(Q,J,$,q){A6.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=J,this.zipPlatform=$,this.encodeFileName=q,this.streamFiles=Q,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}P6.inherits(N2,A6);N2.prototype.push=function(Q){var J=Q.meta.percent||0,$=this.entriesCount,q=this._sources.length;if(this.accumulate)this.contentBuffer.push(Q);else this.bytesWritten+=Q.data.length,A6.prototype.push.call(this,{data:Q.data,meta:{currentFile:this.currentFile,percent:$?(J+100*($-q-1))/$:100}})};N2.prototype.openedSource=function(Q){this.currentSourceOffset=this.bytesWritten,this.currentFile=Q.file.name;var J=this.streamFiles&&!Q.file.dir;if(J){var $=JX(Q,J,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:$.fileRecord,meta:{percent:0}})}else this.accumulate=!0};N2.prototype.closedSource=function(Q){this.accumulate=!1;var J=this.streamFiles&&!Q.file.dir,$=JX(Q,J,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push($.dirRecord),J)this.push({data:tM(Q),meta:{percent:100}});else{this.push({data:$.fileRecord,meta:{percent:0}});while(this.contentBuffer.length)this.push(this.contentBuffer.shift())}this.currentFile=null};N2.prototype.flush=function(){var Q=this.bytesWritten;for(var J=0;J<this.dirRecords.length;J++)this.push({data:this.dirRecords[J],meta:{percent:100}});var $=this.bytesWritten-Q,q=sM(this.dirRecords.length,$,Q,this.zipComment,this.encodeFileName);this.push({data:q,meta:{percent:100}})};N2.prototype.prepareNextSource=function(){if(this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused)this.previous.pause();else this.previous.resume()};N2.prototype.registerPrevious=function(Q){this._sources.push(Q);var J=this;return Q.on("data",function($){J.processChunk($)}),Q.on("end",function(){if(J.closedSource(J.previous.streamInfo),J._sources.length)J.prepareNextSource();else J.end()}),Q.on("error",function($){J.error($)}),this};N2.prototype.resume=function(){if(!A6.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};N2.prototype.error=function(Q){var J=this._sources;if(!A6.prototype.error.call(this,Q))return!1;for(var $=0;$<J.length;$++)try{J[$].error(Q)}catch(q){}return!0};N2.prototype.lock=function(){A6.prototype.lock.call(this);var Q=this._sources;for(var J=0;J<Q.length;J++)Q[J].lock()};$X.exports=N2});var XX=f(($3)=>{var eM=d7(),Q3=qX(),J3=function(Q,J){var $=Q||J,q=eM[$];if(!q)throw Error($+" is not a valid compression method !");return q};$3.generateWorker=function(Q,J,$){var q=new Q3(J.streamFiles,$,J.platform,J.encodeFileName),X=0;try{Q.forEach(function(Y,W){X++;var U=J3(W.options.compression,J.compression),G=W.options.compressionOptions||J.compressionOptions||{},B=W.dir,K=W.date;W._compressWorker(U,G).withStreamInfo("file",{name:Y,dir:B,date:K,comment:W.comment||"",unixPermissions:W.unixPermissions,dosPermissions:W.dosPermissions}).pipe(q)}),q.entriesCount=X}catch(Y){q.error(Y)}return q}});var WX=f((iP,YX)=>{var X3=x0(),Z5=q2();function R8(Q,J){Z5.call(this,"Nodejs stream input adapter for "+Q),this._upstreamEnded=!1,this._bindStream(J)}X3.inherits(R8,Z5);R8.prototype._bindStream=function(Q){var J=this;this._stream=Q,Q.pause(),Q.on("data",function($){J.push({data:$,meta:{percent:0}})}).on("error",function($){if(J.isPaused)this.generatedError=$;else J.error($)}).on("end",function(){if(J.isPaused)J._upstreamEnded=!0;else J.end()})};R8.prototype.pause=function(){if(!Z5.prototype.pause.call(this))return!1;return this._stream.pause(),!0};R8.prototype.resume=function(){if(!Z5.prototype.resume.call(this))return!1;if(this._upstreamEnded)this.end();else this._stream.resume();return!0};YX.exports=R8});var zX=f((nP,FX)=>{var Y3=H6(),w8=x0(),KX=q2(),W3=s4(),VX=t4(),UX=B5(),U3=Gq(),G3=XX(),GX=$8(),B3=WX(),HX=function(Q,J,$){var q=w8.getTypeOf(J),X,Y=w8.extend($||{},VX);if(Y.date=Y.date||new Date,Y.compression!==null)Y.compression=Y.compression.toUpperCase();if(typeof Y.unixPermissions==="string")Y.unixPermissions=parseInt(Y.unixPermissions,8);if(Y.unixPermissions&&Y.unixPermissions&16384)Y.dir=!0;if(Y.dosPermissions&&Y.dosPermissions&16)Y.dir=!0;if(Y.dir)Q=jX(Q);if(Y.createFolders&&(X=K3(Q)))MX.call(this,X,!0);var W=q==="string"&&Y.binary===!1&&Y.base64===!1;if(!$||typeof $.binary>"u")Y.binary=!W;var U=J instanceof UX&&J.uncompressedSize===0;if(U||Y.dir||!J||J.length===0)Y.base64=!1,Y.binary=!0,J="",Y.compression="STORE",q="string";var G=null;if(J instanceof UX||J instanceof KX)G=J;else if(GX.isNode&&GX.isStream(J))G=new B3(Q,J);else G=w8.prepareContent(Q,J,Y.binary,Y.optimizedBinaryString,Y.base64);var B=new U3(Q,G,Y);this.files[Q]=B},K3=function(Q){if(Q.slice(-1)==="/")Q=Q.substring(0,Q.length-1);var J=Q.lastIndexOf("/");return J>0?Q.substring(0,J):""},jX=function(Q){if(Q.slice(-1)!=="/")Q+="/";return Q},MX=function(Q,J){if(J=typeof J<"u"?J:VX.createFolders,Q=jX(Q),!this.files[Q])HX.call(this,Q,null,{dir:!0,createFolders:J});return this.files[Q]};function BX(Q){return Object.prototype.toString.call(Q)==="[object RegExp]"}var V3={load:function(){throw Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(Q){var J,$,q;for(J in this.files)if(q=this.files[J],$=J.slice(this.root.length,J.length),$&&J.slice(0,this.root.length)===this.root)Q($,q)},filter:function(Q){var J=[];return this.forEach(function($,q){if(Q($,q))J.push(q)}),J},file:function(Q,J,$){if(arguments.length===1)if(BX(Q)){var q=Q;return this.filter(function(Y,W){return!W.dir&&q.test(Y)})}else{var X=this.files[this.root+Q];if(X&&!X.dir)return X;else return null}else Q=this.root+Q,HX.call(this,Q,J,$);return this},folder:function(Q){if(!Q)return this;if(BX(Q))return this.filter(function(X,Y){return Y.dir&&Q.test(X)});var J=this.root+Q,$=MX.call(this,J),q=this.clone();return q.root=$.name,q},remove:function(Q){Q=this.root+Q;var J=this.files[Q];if(!J){if(Q.slice(-1)!=="/")Q+="/";J=this.files[Q]}if(J&&!J.dir)delete this.files[Q];else{var $=this.filter(function(X,Y){return Y.name.slice(0,Q.length)===Q});for(var q=0;q<$.length;q++)delete this.files[$[q].name]}return this},generate:function(){throw Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(Q){var J,$={};try{if($=w8.extend(Q||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:Y3.utf8encode}),$.type=$.type.toLowerCase(),$.compression=$.compression.toUpperCase(),$.type==="binarystring")$.type="string";if(!$.type)throw Error("No output type specified.");if(w8.checkSupport($.type),$.platform==="darwin"||$.platform==="freebsd"||$.platform==="linux"||$.platform==="sunos")$.platform="UNIX";if($.platform==="win32")$.platform="DOS";var q=$.comment||this.comment||"";J=G3.generateWorker(this,$,q)}catch(X){J=new KX("error"),J.error(X)}return new W3(J,$.type||"string",$.mimeType)},generateAsync:function(Q,J){return this.generateInternalStream(Q).accumulate(J)},generateNodeStream:function(Q,J){if(Q=Q||{},!Q.type)Q.type="nodebuffer";return this.generateInternalStream(Q).toNodejsStream(J)}};FX.exports=V3});var o7=f((oP,NX)=>{var H3=x0();function LX(Q){this.data=Q,this.length=Q.length,this.index=0,this.zero=0}LX.prototype={checkOffset:function(Q){this.checkIndex(this.index+Q)},checkIndex:function(Q){if(this.length<this.zero+Q||Q<0)throw Error("End of data reached (data length = "+this.length+", asked index = "+Q+"). Corrupted zip ?")},setIndex:function(Q){this.checkIndex(Q),this.index=Q},skip:function(Q){this.setIndex(this.index+Q)},byteAt:function(){},readInt:function(Q){var J=0,$;this.checkOffset(Q);for($=this.index+Q-1;$>=this.index;$--)J=(J<<8)+this.byteAt($);return this.index+=Q,J},readString:function(Q){return H3.transformTo("string",this.readData(Q))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var Q=this.readInt(4);return new Date(Date.UTC((Q>>25&127)+1980,(Q>>21&15)-1,Q>>16&31,Q>>11&31,Q>>5&63,(Q&31)<<1))}};NX.exports=LX});var r7=f((rP,CX)=>{var DX=o7(),j3=x0();function R6(Q){DX.call(this,Q);for(var J=0;J<this.data.length;J++)Q[J]=Q[J]&255}j3.inherits(R6,DX);R6.prototype.byteAt=function(Q){return this.data[this.zero+Q]};R6.prototype.lastIndexOfSignature=function(Q){var J=Q.charCodeAt(0),$=Q.charCodeAt(1),q=Q.charCodeAt(2),X=Q.charCodeAt(3);for(var Y=this.length-4;Y>=0;--Y)if(this.data[Y]===J&&this.data[Y+1]===$&&this.data[Y+2]===q&&this.data[Y+3]===X)return Y-this.zero;return-1};R6.prototype.readAndCheckSignature=function(Q){var J=Q.charCodeAt(0),$=Q.charCodeAt(1),q=Q.charCodeAt(2),X=Q.charCodeAt(3),Y=this.readData(4);return J===Y[0]&&$===Y[1]&&q===Y[2]&&X===Y[3]};R6.prototype.readData=function(Q){if(this.checkOffset(Q),Q===0)return[];var J=this.data.slice(this.zero+this.index,this.zero+this.index+Q);return this.index+=Q,J};CX.exports=R6});var AX=f((aP,PX)=>{var OX=o7(),M3=x0();function w6(Q){OX.call(this,Q)}M3.inherits(w6,OX);w6.prototype.byteAt=function(Q){return this.data.charCodeAt(this.zero+Q)};w6.prototype.lastIndexOfSignature=function(Q){return this.data.lastIndexOf(Q)-this.zero};w6.prototype.readAndCheckSignature=function(Q){var J=this.readData(4);return Q===J};w6.prototype.readData=function(Q){this.checkOffset(Q);var J=this.data.slice(this.zero+this.index,this.zero+this.index+Q);return this.index+=Q,J};PX.exports=w6});var s7=f((sP,wX)=>{var RX=r7(),F3=x0();function a7(Q){RX.call(this,Q)}F3.inherits(a7,RX);a7.prototype.readData=function(Q){if(this.checkOffset(Q),Q===0)return new Uint8Array(0);var J=this.data.subarray(this.zero+this.index,this.zero+this.index+Q);return this.index+=Q,J};wX.exports=a7});var ZX=f((tP,SX)=>{var IX=s7(),z3=x0();function t7(Q){IX.call(this,Q)}z3.inherits(t7,IX);t7.prototype.readData=function(Q){this.checkOffset(Q);var J=this.data.slice(this.zero+this.index,this.zero+this.index+Q);return this.index+=Q,J};SX.exports=t7});var e7=f((eP,EX)=>{var v5=x0(),vX=o2(),L3=r7(),N3=AX(),D3=ZX(),C3=s7();EX.exports=function(Q){var J=v5.getTypeOf(Q);if(v5.checkSupport(J),J==="string"&&!vX.uint8array)return new N3(Q);if(J==="nodebuffer")return new D3(Q);if(vX.uint8array)return new C3(v5.transformTo("uint8array",Q));return new L3(v5.transformTo("array",Q))}});var gX=f((QA,xX)=>{var QQ=e7(),L1=x0(),O3=B5(),kX=G5(),E5=H6(),k5=d7(),P3=o2(),A3=0,R3=3,w3=function(Q){for(var J in k5){if(!Object.prototype.hasOwnProperty.call(k5,J))continue;if(k5[J].magic===Q)return k5[J]}return null};function TX(Q,J){this.options=Q,this.loadOptions=J}TX.prototype={isEncrypted:function(){return(this.bitFlag&1)===1},useUTF8:function(){return(this.bitFlag&2048)===2048},readLocalPart:function(Q){var J,$;if(Q.skip(22),this.fileNameLength=Q.readInt(2),$=Q.readInt(2),this.fileName=Q.readData(this.fileNameLength),Q.skip($),this.compressedSize===-1||this.uncompressedSize===-1)throw Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(J=w3(this.compressionMethod),J===null)throw Error("Corrupted zip : compression "+L1.pretty(this.compressionMethod)+" unknown (inner file : "+L1.transformTo("string",this.fileName)+")");this.decompressed=new O3(this.compressedSize,this.uncompressedSize,this.crc32,J,Q.readData(this.compressedSize))},readCentralPart:function(Q){this.versionMadeBy=Q.readInt(2),Q.skip(2),this.bitFlag=Q.readInt(2),this.compressionMethod=Q.readString(2),this.date=Q.readDate(),this.crc32=Q.readInt(4),this.compressedSize=Q.readInt(4),this.uncompressedSize=Q.readInt(4);var J=Q.readInt(2);if(this.extraFieldsLength=Q.readInt(2),this.fileCommentLength=Q.readInt(2),this.diskNumberStart=Q.readInt(2),this.internalFileAttributes=Q.readInt(2),this.externalFileAttributes=Q.readInt(4),this.localHeaderOffset=Q.readInt(4),this.isEncrypted())throw Error("Encrypted zip are not supported");Q.skip(J),this.readExtraFields(Q),this.parseZIP64ExtraField(Q),this.fileComment=Q.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var Q=this.versionMadeBy>>8;if(this.dir=this.externalFileAttributes&16?!0:!1,Q===A3)this.dosPermissions=this.externalFileAttributes&63;if(Q===R3)this.unixPermissions=this.externalFileAttributes>>16&65535;if(!this.dir&&this.fileNameStr.slice(-1)==="/")this.dir=!0},parseZIP64ExtraField:function(){if(!this.extraFields[1])return;var Q=QQ(this.extraFields[1].value);if(this.uncompressedSize===L1.MAX_VALUE_32BITS)this.uncompressedSize=Q.readInt(8);if(this.compressedSize===L1.MAX_VALUE_32BITS)this.compressedSize=Q.readInt(8);if(this.localHeaderOffset===L1.MAX_VALUE_32BITS)this.localHeaderOffset=Q.readInt(8);if(this.diskNumberStart===L1.MAX_VALUE_32BITS)this.diskNumberStart=Q.readInt(4)},readExtraFields:function(Q){var J=Q.index+this.extraFieldsLength,$,q,X;if(!this.extraFields)this.extraFields={};while(Q.index+4<J)$=Q.readInt(2),q=Q.readInt(2),X=Q.readData(q),this.extraFields[$]={id:$,length:q,value:X};Q.setIndex(J)},handleUTF8:function(){var Q=P3.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=E5.utf8decode(this.fileName),this.fileCommentStr=E5.utf8decode(this.fileComment);else{var J=this.findExtraFieldUnicodePath();if(J!==null)this.fileNameStr=J;else{var $=L1.transformTo(Q,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName($)}var q=this.findExtraFieldUnicodeComment();if(q!==null)this.fileCommentStr=q;else{var X=L1.transformTo(Q,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(X)}}},findExtraFieldUnicodePath:function(){var Q=this.extraFields[28789];if(Q){var J=QQ(Q.value);if(J.readInt(1)!==1)return null;if(kX(this.fileName)!==J.readInt(4))return null;return E5.utf8decode(J.readData(Q.length-5))}return null},findExtraFieldUnicodeComment:function(){var Q=this.extraFields[25461];if(Q){var J=QQ(Q.value);if(J.readInt(1)!==1)return null;if(kX(this.fileComment)!==J.readInt(4))return null;return E5.utf8decode(J.readData(Q.length-5))}return null}};xX.exports=TX});var yX=f((JA,fX)=>{var I3=e7(),t2=x0(),D2=i7(),S3=gX(),Z3=o2();function _X(Q){this.files=[],this.loadOptions=Q}_X.prototype={checkSignature:function(Q){if(!this.reader.readAndCheckSignature(Q)){this.reader.index-=4;var J=this.reader.readString(4);throw Error("Corrupted zip or bug: unexpected signature ("+t2.pretty(J)+", expected "+t2.pretty(Q)+")")}},isSignature:function(Q,J){var $=this.reader.index;this.reader.setIndex(Q);var q=this.reader.readString(4),X=q===J;return this.reader.setIndex($),X},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 Q=this.reader.readData(this.zipCommentLength),J=Z3.uint8array?"uint8array":"array",$=t2.transformTo(J,Q);this.zipComment=this.loadOptions.decodeFileName($)},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 Q=this.zip64EndOfCentralSize-44,J=0,$,q,X;while(J<Q)$=this.reader.readInt(2),q=this.reader.readInt(4),X=this.reader.readData(q),this.zip64ExtensibleData[$]={id:$,length:q,value:X}},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 Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var Q,J;for(Q=0;Q<this.files.length;Q++)J=this.files[Q],this.reader.setIndex(J.localHeaderOffset),this.checkSignature(D2.LOCAL_FILE_HEADER),J.readLocalPart(this.reader),J.handleUTF8(),J.processAttributes()},readCentralDir:function(){var Q;this.reader.setIndex(this.centralDirOffset);while(this.reader.readAndCheckSignature(D2.CENTRAL_FILE_HEADER))Q=new S3({zip64:this.zip64},this.loadOptions),Q.readCentralPart(this.reader),this.files.push(Q);if(this.centralDirRecords!==this.files.length){if(this.centralDirRecords!==0&&this.files.length===0)throw Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)}},readEndOfCentral:function(){var Q=this.reader.lastIndexOfSignature(D2.CENTRAL_DIRECTORY_END);if(Q<0){var J=!this.isSignature(0,D2.LOCAL_FILE_HEADER);if(J)throw 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 Error("Corrupted zip: can't find end of central directory")}this.reader.setIndex(Q);var $=Q;if(this.checkSignature(D2.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===t2.MAX_VALUE_16BITS||this.diskWithCentralDirStart===t2.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===t2.MAX_VALUE_16BITS||this.centralDirRecords===t2.MAX_VALUE_16BITS||this.centralDirSize===t2.MAX_VALUE_32BITS||this.centralDirOffset===t2.MAX_VALUE_32BITS){if(this.zip64=!0,Q=this.reader.lastIndexOfSignature(D2.ZIP64_CENTRAL_DIRECTORY_LOCATOR),Q<0)throw Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(Q),this.checkSignature(D2.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,D2.ZIP64_CENTRAL_DIRECTORY_END)){if(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(D2.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0)throw Error("Corrupted zip: can't find the ZIP64 end of central directory")}this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(D2.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var q=this.centralDirOffset+this.centralDirSize;if(this.zip64)q+=20,q+=12+this.zip64EndOfCentralSize;var X=$-q;if(X>0)if(this.isSignature($,D2.CENTRAL_FILE_HEADER));else this.reader.zero=X;else if(X<0)throw Error("Corrupted zip: missing "+Math.abs(X)+" bytes.")},prepareReader:function(Q){this.reader=I3(Q)},load:function(Q){this.prepareReader(Q),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}};fX.exports=_X});var mX=f(($A,bX)=>{var JQ=x0(),T5=B6(),v3=H6(),E3=yX(),k3=J7(),hX=$8();function T3(Q){return new T5.Promise(function(J,$){var q=Q.decompressed.getContentWorker().pipe(new k3);q.on("error",function(X){$(X)}).on("end",function(){if(q.streamInfo.crc32!==Q.decompressed.crc32)$(Error("Corrupted zip : CRC32 mismatch"));else J()}).resume()})}bX.exports=function(Q,J){var $=this;if(J=JQ.extend(J||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:v3.utf8decode}),hX.isNode&&hX.isStream(Q))return T5.Promise.reject(Error("JSZip can't accept a stream when loading a zip file."));return JQ.prepareContent("the loaded zip file",Q,!0,J.optimizedBinaryString,J.base64).then(function(q){var X=new E3(J);return X.load(q),X}).then(function(X){var Y=[T5.Promise.resolve(X)],W=X.files;if(J.checkCRC32)for(var U=0;U<W.length;U++)Y.push(T3(W[U]));return T5.Promise.all(Y)}).then(function(X){var Y=X.shift(),W=Y.files;for(var U=0;U<W.length;U++){var G=W[U],B=G.fileNameStr,K=JQ.resolve(G.fileNameStr);if($.file(K,G.decompressed,{binary:!0,optimizedBinaryString:!0,date:G.date,dir:G.dir,comment:G.fileCommentStr.length?G.fileCommentStr:null,unixPermissions:G.unixPermissions,dosPermissions:G.dosPermissions,createFolders:J.createFolders}),!G.dir)$.file(K).unsafeOriginalName=B}if(Y.zipComment.length)$.comment=Y.zipComment;return $})}});var cX=f((qA,uX)=>{function M2(){if(!(this instanceof M2))return new M2;if(arguments.length)throw 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 Q=new M2;for(var J in this)if(typeof this[J]!=="function")Q[J]=this[J];return Q}}M2.prototype=zX();M2.prototype.loadAsync=mX();M2.support=o2();M2.defaults=t4();M2.version="3.10.1";M2.loadAsync=function(Q,J){return new M2().loadAsync(Q,J)};M2.external=B6();uX.exports=M2});var f0=f((UQ,JY)=>{var g8=function(Q){return Q&&Q.Math===Math&&Q};JY.exports=g8(typeof globalThis=="object"&&globalThis)||g8(typeof window=="object"&&window)||g8(typeof self=="object"&&self)||g8(typeof global=="object"&&global)||g8(typeof UQ=="object"&&UQ)||function(){return this}()||Function("return this")()});var $1=f((VR,$Y)=>{$Y.exports=function(Q){try{return!!Q()}catch(J){return!0}}});var q1=f((HR,qY)=>{var iF=$1();qY.exports=!iF(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})});var y5=f((jR,XY)=>{var nF=$1();XY.exports=!nF(function(){var Q=function(){}.bind();return typeof Q!="function"||Q.hasOwnProperty("prototype")})});var _8=f((MR,YY)=>{var oF=y5(),h5=Function.prototype.call;YY.exports=oF?h5.bind(h5):function(){return h5.apply(h5,arguments)}});var GY=f((aF)=>{var WY={}.propertyIsEnumerable,UY=Object.getOwnPropertyDescriptor,rF=UY&&!WY.call({1:2},1);aF.f=rF?function(J){var $=UY(this,J);return!!$&&$.enumerable}:WY});var GQ=f((zR,BY)=>{BY.exports=function(Q,J){return{enumerable:!(Q&1),configurable:!(Q&2),writable:!(Q&4),value:J}}});var p0=f((LR,HY)=>{var KY=y5(),VY=Function.prototype,BQ=VY.call,tF=KY&&VY.bind.bind(BQ,BQ);HY.exports=KY?tF:function(Q){return function(){return BQ.apply(Q,arguments)}}});var f8=f((NR,MY)=>{var jY=p0(),eF=jY({}.toString),Qz=jY("".slice);MY.exports=function(Q){return Qz(eF(Q),8,-1)}});var zY=f((DR,FY)=>{var Jz=p0(),$z=$1(),qz=f8(),KQ=Object,Xz=Jz("".split);FY.exports=$z(function(){return!KQ("z").propertyIsEnumerable(0)})?function(Q){return qz(Q)==="String"?Xz(Q,""):KQ(Q)}:KQ});var b5=f((CR,LY)=>{LY.exports=function(Q){return Q===null||Q===void 0}});var VQ=f((OR,NY)=>{var Yz=b5(),Wz=TypeError;NY.exports=function(Q){if(Yz(Q))throw new Wz("Can't call method on "+Q);return Q}});var m5=f((PR,DY)=>{var Uz=zY(),Gz=VQ();DY.exports=function(Q){return Uz(Gz(Q))}});var F2=f((AR,CY)=>{var HQ=typeof document=="object"&&document.all;CY.exports=typeof HQ>"u"&&HQ!==void 0?function(Q){return typeof Q=="function"||Q===HQ}:function(Q){return typeof Q=="function"}});var e1=f((RR,OY)=>{var Bz=F2();OY.exports=function(Q){return typeof Q=="object"?Q!==null:Bz(Q)}});var y8=f((wR,PY)=>{var jQ=f0(),Kz=F2(),Vz=function(Q){return Kz(Q)?Q:void 0};PY.exports=function(Q,J){return arguments.length<2?Vz(jQ[Q]):jQ[Q]&&jQ[Q][J]}});var MQ=f((IR,AY)=>{var Hz=p0();AY.exports=Hz({}.isPrototypeOf)});var SY=f((SR,IY)=>{var jz=f0(),RY=jz.navigator,wY=RY&&RY.userAgent;IY.exports=wY?String(wY):""});var zQ=f((ZR,xY)=>{var TY=f0(),FQ=SY(),ZY=TY.process,vY=TY.Deno,EY=ZY&&ZY.versions||vY&&vY.version,kY=EY&&EY.v8,w2,u5;if(kY)w2=kY.split("."),u5=w2[0]>0&&w2[0]<4?1:+(w2[0]+w2[1]);if(!u5&&FQ){if(w2=FQ.match(/Edge\/(\d+)/),!w2||w2[1]>=74){if(w2=FQ.match(/Chrome\/(\d+)/),w2)u5=+w2[1]}}xY.exports=u5});var LQ=f((vR,_Y)=>{var gY=zQ(),Mz=$1(),Fz=f0(),zz=Fz.String;_Y.exports=!!Object.getOwnPropertySymbols&&!Mz(function(){var Q=Symbol("symbol detection");return!zz(Q)||!(Object(Q)instanceof Symbol)||!Symbol.sham&&gY&&gY<41})});var NQ=f((ER,fY)=>{var Lz=LQ();fY.exports=Lz&&!Symbol.sham&&typeof Symbol.iterator=="symbol"});var DQ=f((kR,yY)=>{var Nz=y8(),Dz=F2(),Cz=MQ(),Oz=NQ(),Pz=Object;yY.exports=Oz?function(Q){return typeof Q=="symbol"}:function(Q){var J=Nz("Symbol");return Dz(J)&&Cz(J.prototype,Pz(Q))}});var bY=f((TR,hY)=>{var Az=String;hY.exports=function(Q){try{return Az(Q)}catch(J){return"Object"}}});var u6=f((xR,mY)=>{var Rz=F2(),wz=bY(),Iz=TypeError;mY.exports=function(Q){if(Rz(Q))return Q;throw new Iz(wz(Q)+" is not a function")}});var CQ=f((gR,uY)=>{var Sz=u6(),Zz=b5();uY.exports=function(Q,J){var $=Q[J];return Zz($)?void 0:Sz($)}});var pY=f((_R,cY)=>{var OQ=_8(),PQ=F2(),AQ=e1(),vz=TypeError;cY.exports=function(Q,J){var $,q;if(J==="string"&&PQ($=Q.toString)&&!AQ(q=OQ($,Q)))return q;if(PQ($=Q.valueOf)&&!AQ(q=OQ($,Q)))return q;if(J!=="string"&&PQ($=Q.toString)&&!AQ(q=OQ($,Q)))return q;throw new vz("Can't convert object to primitive value")}});var dY=f((fR,lY)=>{lY.exports=!1});var c5=f((yR,nY)=>{var iY=f0(),Ez=Object.defineProperty;nY.exports=function(Q,J){try{Ez(iY,Q,{value:J,configurable:!0,writable:!0})}catch($){iY[Q]=J}return J}});var p5=f((hR,aY)=>{var kz=dY(),Tz=f0(),xz=c5(),oY="__core-js_shared__",rY=aY.exports=Tz[oY]||xz(oY,{});(rY.versions||(rY.versions=[])).push({version:"3.50.0",mode:kz?"pure":"global",copyright:"© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.",license:"https://github.com/zloirock/core-js/blob/v3.50.0/LICENSE",source:"https://github.com/zloirock/core-js"})});var RQ=f((bR,tY)=>{var sY=p5(),gz=Object.create||Object;tY.exports=function(Q,J){return sY[Q]||(sY[Q]=J||gz(null))}});var QW=f((mR,eY)=>{var _z=VQ(),fz=Object;eY.exports=function(Q){return fz(_z(Q))}});var b2=f((uR,JW)=>{var yz=p0(),hz=QW(),bz=yz({}.hasOwnProperty);JW.exports=Object.hasOwn||function(J,$){return bz(hz(J),$)}});var wQ=f((cR,$W)=>{var mz=p0(),uz=0,cz=Math.random(),pz=mz(1.1 .toString);$W.exports=function(Q){return"Symbol("+(Q===void 0?"":Q)+")_"+pz(++uz+cz,36)}});var Q6=f((pR,XW)=>{var lz=f0(),dz=RQ(),qW=b2(),iz=wQ(),nz=LQ(),oz=NQ(),c6=lz.Symbol,IQ=dz("wks"),rz=oz?c6.for||c6:c6&&c6.withoutSetter||iz;XW.exports=function(Q){if(!qW(IQ,Q))IQ[Q]=nz&&qW(c6,Q)?c6[Q]:rz("Symbol."+Q);return IQ[Q]}});var GW=f((lR,UW)=>{var az=_8(),YW=e1(),WW=DQ(),sz=CQ(),tz=pY(),ez=Q6(),QL=TypeError,JL=ez("toPrimitive");UW.exports=function(Q,J){if(!YW(Q)||WW(Q))return Q;var $=sz(Q,JL),q;if($){if(J===void 0)J="default";if(q=az($,Q,J),!YW(q)||WW(q))return q;throw new QL("Can't convert object to primitive value")}if(J===void 0)J="number";return tz(Q,J)}});var SQ=f((dR,BW)=>{var $L=GW(),qL=DQ();BW.exports=function(Q){var J=$L(Q,"string");return qL(J)?J:J+""}});var HW=f((iR,VW)=>{var XL=f0(),KW=e1(),ZQ=XL.document,YL=KW(ZQ)&&KW(ZQ.createElement);VW.exports=function(Q){return YL?ZQ.createElement(Q):{}}});var vQ=f((nR,jW)=>{var WL=q1(),UL=$1(),GL=HW();jW.exports=!WL&&!UL(function(){return Object.defineProperty(GL("div"),"a",{get:function(){return 7}}).a!==7})});var l5=f((LL)=>{var BL=q1(),KL=_8(),VL=GY(),HL=GQ(),jL=m5(),ML=SQ(),FL=b2(),zL=vQ(),MW=Object.getOwnPropertyDescriptor;LL.f=BL?MW:function(J,$){if(J=jL(J),$=ML($),zL)try{return MW(J,$)}catch(q){}if(FL(J,$))return HL(!KL(VL.f,J,$),J[$])}});var zW=f((rR,FW)=>{var DL=q1(),CL=$1();FW.exports=DL&&CL(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})});var d5=f((aR,LW)=>{var OL=e1(),PL=String,AL=TypeError;LW.exports=function(Q){if(OL(Q))return Q;throw new AL(PL(Q)+" is not an object")}});var J6=f((vL)=>{var RL=q1(),wL=vQ(),IL=zW(),i5=d5(),NW=SQ(),SL=TypeError,EQ=Object.defineProperty,ZL=Object.getOwnPropertyDescriptor,kQ="enumerable",TQ="configurable",xQ="writable";vL.f=RL?IL?function(J,$,q){if(i5(J),$=NW($),i5(q),typeof J==="function"&&$==="prototype"&&"value"in q&&xQ in q&&!q[xQ]){var X=ZL(J,$);if(X&&X[xQ])J[$]=q.value,q={configurable:TQ in q?q[TQ]:X[TQ],enumerable:kQ in q?q[kQ]:X[kQ],writable:!1}}return EQ(J,$,q)}:EQ:function(J,$,q){if(i5(J),$=NW($),i5(q),wL)try{return EQ(J,$,q)}catch(X){}if("get"in q||"set"in q)throw new SL("Accessors not supported");if("value"in q)J[$]=q.value;return J}});var gQ=f((tR,DW)=>{var kL=q1(),TL=J6(),xL=GQ();DW.exports=kL?function(Q,J,$){return TL.f(Q,J,xL(1,$))}:function(Q,J,$){return Q[J]=$,Q}});var PW=f((eR,OW)=>{var _Q=q1(),gL=b2(),CW=Function.prototype,_L=_Q&&Object.getOwnPropertyDescriptor,fQ=gL(CW,"name"),fL=fQ&&function(){}.name==="something",yL=fQ&&(!_Q||_Q&&_L(CW,"name").configurable);OW.exports={EXISTS:fQ,PROPER:fL,CONFIGURABLE:yL}});var RW=f((Qw,AW)=>{var hL=p0(),bL=F2(),yQ=p5(),mL=hL(Function.toString);if(!bL(yQ.inspectSource))yQ.inspectSource=function(Q){return mL(Q)};AW.exports=yQ.inspectSource});var SW=f((Jw,IW)=>{var uL=f0(),cL=F2(),wW=uL.WeakMap;IW.exports=cL(wW)&&/native code/.test(String(wW))});var EW=f(($w,vW)=>{var pL=RQ(),lL=wQ(),ZW=pL("keys");vW.exports=function(Q){return ZW[Q]||(ZW[Q]=lL(Q))}});var hQ=f((qw,kW)=>{kW.exports={}});var cQ=f((Xw,gW)=>{var dL=SW(),xW=f0(),iL=e1(),nL=gQ(),bQ=b2(),mQ=p5(),oL=EW(),rL=hQ(),TW="Object already initialized",uQ=xW.TypeError,aL=xW.WeakMap,n5,h8,o5,sL=function(Q){return o5(Q)?h8(Q):n5(Q,{})},tL=function(Q){return function(J){var $;if(!iL(J)||($=h8(J)).type!==Q)throw new uQ("Incompatible receiver, "+Q+" required");return $}};if(dL||mQ.state)z2=mQ.state||(mQ.state=new aL),z2.get=z2.get,z2.has=z2.has,z2.set=z2.set,n5=function(Q,J){if(z2.has(Q))throw new uQ(TW);return J.facade=Q,z2.set(Q,J),J},h8=function(Q){return z2.get(Q)||{}},o5=function(Q){return z2.has(Q)};else A1=oL("state"),rL[A1]=!0,n5=function(Q,J){if(bQ(Q,A1))throw new uQ(TW);return J.facade=Q,nL(Q,A1,J),J},h8=function(Q){return bQ(Q,A1)?Q[A1]:{}},o5=function(Q){return bQ(Q,A1)};var z2,A1;gW.exports={set:n5,get:h8,has:o5,enforce:sL,getterFor:tL}});var dQ=f((Yw,yW)=>{var lQ=p0(),eL=$1(),QN=F2(),r5=b2(),pQ=q1(),JN=PW().CONFIGURABLE,$N=RW(),fW=cQ(),qN=fW.enforce,XN=fW.get,_W=String,a5=Object.defineProperty,YN=lQ("".slice),WN=lQ("".replace),UN=lQ([].join),GN=pQ&&!eL(function(){return a5(function(){},"length",{value:8}).length!==8}),BN=String(String).split("String"),KN=yW.exports=function(Q,J,$){if(YN(_W(J),0,7)==="Symbol(")J="["+WN(_W(J),/^Symbol\(([^)]*)\).*$/,"$1")+"]";if($&&$.getter)J="get "+J;if($&&$.setter)J="set "+J;if(!r5(Q,"name")||JN&&Q.name!==J)if(pQ)a5(Q,"name",{value:J,configurable:!0});else Q.name=J;if(GN&&$&&r5($,"arity")&&Q.length!==$.arity)a5(Q,"length",{value:$.arity});try{if($&&r5($,"constructor")&&$.constructor){if(pQ)a5(Q,"prototype",{writable:!1})}else if(Q.prototype)Q.prototype=void 0}catch(X){}var q=qN(Q);if(!r5(q,"source"))q.source=UN(BN,typeof J=="string"?J:"");return Q};Function.prototype.toString=KN(function(){return QN(this)&&XN(this).source||$N(this)},"toString")});var s5=f((Ww,hW)=>{var VN=F2(),HN=J6(),jN=dQ(),MN=c5();hW.exports=function(Q,J,$,q){if(!q)q={};var X=q.enumerable,Y=q.name!==void 0?q.name:J;if(VN($))jN($,Y,q);if(q.global)if(X)Q[J]=$;else MN(J,$);else{try{if(!q.unsafe)delete Q[J];else if(Q[J])X=!0}catch(W){}if(X)Q[J]=$;else HN.f(Q,J,{value:$,enumerable:!1,configurable:!q.nonConfigurable,writable:!q.nonWritable})}return Q}});var mW=f((Uw,bW)=>{var{ceil:FN,floor:zN}=Math;bW.exports=Math.trunc||function(J){var $=+J;return($>0?zN:FN)($)}});var iQ=f((Gw,uW)=>{var LN=mW();uW.exports=function(Q){var J=+Q;return J!==J||J===0?0:LN(J)}});var pW=f((Bw,cW)=>{var NN=iQ(),DN=Math.max,CN=Math.min;cW.exports=function(Q,J){var $=NN(Q);return $<0?DN($+J,0):CN($,J)}});var dW=f((Kw,lW)=>{var ON=iQ(),PN=Math.min;lW.exports=function(Q){var J=ON(Q);return J>0?PN(J,9007199254740991):0}});var nQ=f((Vw,iW)=>{var AN=dW();iW.exports=function(Q){return AN(Q.length)}});var rW=f((Hw,oW)=>{var RN=m5(),wN=pW(),IN=nQ(),nW=function(Q){return function(J,$,q){var X=RN(J),Y=IN(X);if(Y===0)return!Q&&-1;var W=wN(q,Y),U;if(Q&&$!==$){while(Y>W)if(U=X[W++],U!==U)return!0}else for(;Y>W;W++)if((Q||(W in X))&&X[W]===$)return Q||W||0;return!Q&&-1}};oW.exports={includes:nW(!0),indexOf:nW(!1)}});var tW=f((jw,sW)=>{var SN=p0(),oQ=b2(),ZN=m5(),vN=rW().indexOf,EN=hQ(),aW=SN([].push);sW.exports=function(Q,J){var $=ZN(Q),q=0,X=[],Y;for(Y in $)!oQ(EN,Y)&&oQ($,Y)&&aW(X,Y);while(J.length>q)if(oQ($,Y=J[q++]))~vN(X,Y)||aW(X,Y);return X}});var QU=f((Mw,eW)=>{eW.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]});var JU=f((gN)=>{var kN=tW(),TN=QU(),xN=TN.concat("length","prototype");gN.f=Object.getOwnPropertyNames||function(J){return kN(J,xN)}});var $U=f((fN)=>{fN.f=Object.getOwnPropertySymbols});var XU=f((Lw,qU)=>{var hN=y8(),bN=p0(),mN=JU(),uN=$U(),cN=d5(),pN=bN([].concat);qU.exports=hN("Reflect","ownKeys")||function(J){var $=mN.f(cN(J)),q=uN.f;return q?pN($,q(J)):$}});var UU=f((Nw,WU)=>{var YU=b2(),lN=XU(),dN=l5(),iN=J6();WU.exports=function(Q,J,$){var q=lN(J),X=iN.f,Y=dN.f;for(var W=0;W<q.length;W++){var U=q[W];if(!YU(Q,U)&&!($&&YU($,U)))X(Q,U,Y(J,U))}}});var BU=f((Dw,GU)=>{var nN=$1(),oN=F2(),rN=/#|\.prototype\./,b8=function(Q,J){var $=sN[aN(Q)];return $===eN?!0:$===tN?!1:oN(J)?nN(J):!!J},aN=b8.normalize=function(Q){return String(Q).replace(rN,".").toLowerCase()},sN=b8.data={},tN=b8.NATIVE="N",eN=b8.POLYFILL="P";GU.exports=b8});var p6=f((Cw,KU)=>{var t5=f0(),QD=l5().f,JD=gQ(),$D=s5(),qD=c5(),XD=UU(),YD=BU();KU.exports=function(Q,J){var{target:$,global:q,stat:X}=Q,Y,W,U,G,B,K;if(q)W=t5;else if(X)W=t5[$]||qD($,{});else W=t5[$]&&t5[$].prototype;if(W)for(U in J){if(B=J[U],Q.dontCallGetSet)K=QD(W,U),G=K&&K.value;else G=W[U];if(Y=YD(q?U:$+(X?".":"#")+U,Q.forced),!Y&&G!==void 0){if(typeof B==typeof G)continue;XD(B,G)}if(Q.sham||G&&G.sham)JD(B,"sham",!0);$D(W,U,B,Q)}}});var HU=f((Ow,VU)=>{var WD=MQ(),UD=TypeError;VU.exports=function(Q,J){if(WD(J,Q))return Q;throw new UD("Incorrect invocation")}});var MU=f((Pw,jU)=>{var GD=s5();jU.exports=function(Q,J,$){for(var q in J)GD(Q,q,J[q],$);return Q}});var LU=f((Aw,zU)=>{var FU=dQ(),BD=J6();zU.exports=function(Q,J,$){if($.get)FU($.get,J,{getter:!0});if($.set)FU($.set,J,{setter:!0});return BD.f(Q,J,$)}});var DU=f((Rw,NU)=>{var KD=f8(),VD=p0();NU.exports=function(Q){if(KD(Q)==="Function")return VD(Q)}});var PU=f((ww,OU)=>{var CU=DU(),HD=u6(),jD=y5(),MD=CU(CU.bind);OU.exports=function(Q,J){return HD(Q),J===void 0?Q:jD?MD(Q,J):function(){return Q.apply(J,arguments)}}});var ZU=f((Iw,SU)=>{var FD=y8(),zD=_8(),LD=p0(),ND=PU(),DD=d5(),CD=u6(),wU=b5(),rQ=CQ(),IU=Q6(),OD=IU("asyncDispose"),AU=IU("dispose"),PD=LD([].push),AD=function(Q,J){if(J==="async-dispose"){var $=rQ(Q,OD);if($!==void 0)return $;if($=rQ(Q,AU),$===void 0)return $;return function(){var q=this,X=FD("Promise");return new X(function(Y){zD($,q),Y(void 0)})}}return rQ(Q,AU)},RU=function(Q,J,$){if(arguments.length<3&&!wU(Q))$=CD(AD(DD(Q),J));return $===void 0?function(){return}:ND($,Q)};SU.exports=function(Q,J,$,q){var X;if(arguments.length<4){if(wU(J)&&$==="sync-dispose")return;X=RU(J,$)}else X=RU(void 0,$,q);PD(Q.stack,X)}});var fU=f(()=>{var RD=p6(),Q4=q1(),TU=y8(),vU=u6(),wD=HU(),xU=s5(),ID=MU(),SD=LU(),gU=Q6(),_U=cQ(),aQ=ZU(),EU=zQ(),kU=TU("Promise"),ZD=TU("SuppressedError"),vD=ReferenceError,ED=gU("asyncDispose"),kD=gU("toStringTag"),$4="AsyncDisposableStack",TD=_U.set,J4=_U.getterFor($4),sQ="async-dispose",m8="disposed",xD="pending",e5=function(Q){var J=J4(Q);if(J.state===m8)throw new vD($4+" already disposed");return J},tQ=function(){if(TD(wD(this,l6),{type:$4,state:xD,stack:[]}),!Q4)this.disposed=!1},l6=tQ.prototype;ID(l6,{disposeAsync:function(){var J=this;return new kU(function($,q){var X=J4(J);if(X.state===m8)return $(void 0);if(X.state=m8,!Q4)J.disposed=!0;var Y=X.stack,W=Y.length,U=!1,G,B=function(j){if(U)G=new ZD(j,G);else U=!0,G=j;K()},K=function(){if(W){var j=Y[--W];Y[W]=null;try{kU.resolve(j()).then(K,B)}catch(F){B(F)}}else X.stack=null,U?q(G):$(void 0)};K()})},use:function(J){return aQ(e5(this),J,sQ),J},adopt:function(J,$){var q=e5(this);return vU($),aQ(q,void 0,sQ,function(){return $(J)}),J},defer:function(J){var $=e5(this);vU(J),aQ($,void 0,sQ,J)},move:function(){var J=e5(this),$=new tQ;if(J4($).stack=J.stack,J.stack=[],J.state=m8,!Q4)this.disposed=!0;return $}});if(Q4)SD(l6,"disposed",{configurable:!0,get:function(){return J4(this).state===m8}});xU(l6,ED,l6.disposeAsync,{name:"disposeAsync"});xU(l6,kD,$4,{nonWritable:!0});var gD=EU&&EU<136;RD({global:!0,constructor:!0,forced:gD},{AsyncDisposableStack:tQ})});var hU=f((vw,yU)=>{var _D=f0();yU.exports=_D});var bU=f((yD)=>{var fD=Q6();yD.f=fD});var cU=f((kw,uU)=>{var mU=hU(),bD=b2(),mD=bU(),uD=J6().f;uU.exports=function(Q){var J=mU.Symbol||(mU.Symbol={});if(!bD(J,Q))uD(J,Q,{value:mD.f(Q)})}});var pU=f(()=>{var cD=f0(),pD=cU(),lD=J6().f,dD=l5().f,eQ=cD.Symbol;pD("asyncDispose");if(eQ){if(d6=dD(eQ,"asyncDispose"),d6.enumerable&&d6.configurable&&d6.writable)lD(eQ,"asyncDispose",{value:d6.value,enumerable:!1,configurable:!1,writable:!1})}var d6});var dU=f((gw,lU)=>{var iD=nQ();lU.exports=function(Q,J,$){var q=0,X=arguments.length>2?$:iD(J),Y=new Q(X);while(X>q)Y[q]=J[q++];return Y}});var QJ=f((_w,iU)=>{var nD=e1(),oD=String,rD=TypeError;iU.exports=function(Q){if(Q===void 0||nD(Q))return Q;throw new rD(oD(Q)+" is not an object or undefined")}});var JJ=f((fw,nU)=>{var aD=TypeError;nU.exports=function(Q){if(typeof Q=="string")return Q;throw new aD("Argument is not a string")}});var $J=f((yw,tU)=>{var sU="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",oU=sU+"+/",rU=sU+"-_",aU=function(Q){var J={},$=0;for(;$<64;$++)J[Q.charAt($)]=$;return J};tU.exports={i2c:oU,c2i:aU(oU),i2cUrl:rU,c2iUrl:aU(rU)}});var qJ=f((hw,eU)=>{var sD=TypeError;eU.exports=function(Q){var J=Q&&Q.alphabet;if(J===void 0||J==="base64"||J==="base64url")return J||"base64";throw new sD("Incorrect `alphabet` option")}});var JG=f((bw,QG)=>{QG.exports=typeof ArrayBuffer<"u"&&typeof DataView<"u"});var qG=f((mw,$G)=>{var tD=p0(),eD=u6();$G.exports=function(Q,J,$){try{return tD(eD(Object.getOwnPropertyDescriptor(Q,J)[$]))}catch(q){}}});var UG=f((uw,WG)=>{var YG=f0(),QC=qG(),JC=f8(),XG=YG.ArrayBuffer,$C=YG.TypeError;WG.exports=XG&&QC(XG.prototype,"byteLength","get")||function(Q){if(JC(Q)!=="ArrayBuffer")throw new $C("ArrayBuffer expected");return Q.byteLength}});var BG=f((cw,GG)=>{var qC=f0(),XC=JG(),YC=UG(),WC=qC.DataView;GG.exports=function(Q){if(!XC||YC(Q)!==0)return!1;try{return new WC(Q),!1}catch(J){return!0}}});var q4=f((pw,KG)=>{var UC=BG(),GC=TypeError;KG.exports=function(Q){if(UC(Q))throw new GC("ArrayBuffer is detached");return Q}});var jG=f((lw,HG)=>{var UJ=f0(),BC=p0(),KC=QJ(),VC=JJ(),HC=b2(),VG=$J(),jC=qJ(),MC=q4(),FC=VG.c2i,zC=VG.c2iUrl,R1=UJ.SyntaxError,LC=UJ.TypeError,NC=UJ.Array,$6=BC("".charAt),DC=Math.floor,XJ=function(Q,J){var $=Q.length;for(;J<$;J++){var q=$6(Q,J);if(q!==" "&&q!=="\t"&&q!==`
|
|
4
|
+
`&&q!=="\f"&&q!=="\r")break}return J},YJ=function(Q,J,$){var q=Q.length;if(q<4)Q+=q===2?"AA":"A";var X=(J[$6(Q,0)]<<18)+(J[$6(Q,1)]<<12)+(J[$6(Q,2)]<<6)+J[$6(Q,3)],Y=[X>>16&255,X>>8&255,X&255];if(q===2){if($&&Y[1]!==0)throw new R1("Extra bits");return[Y[0]]}if(q===3){if($&&Y[2]!==0)throw new R1("Extra bits");return[Y[0],Y[1]]}return Y},WJ=function(Q,J,$){var q=J.length;for(var X=0;X<q;X++)Q[$+X]=J[X];return $+q};HG.exports=function(Q,J,$,q){VC(Q),KC(J);var X=jC(J)==="base64"?FC:zC,Y=J?J.lastChunkHandling:void 0;if(Y===void 0)Y="loose";if(Y!=="loose"&&Y!=="strict"&&Y!=="stop-before-partial")throw new LC("Incorrect `lastChunkHandling` option");if($)MC($.buffer);var W=Q.length,U=$||NC(DC(W*3/4)),G=0,B=0,K="",j=0;if(q)while(!0){if(j=XJ(Q,j),j===W){if(K.length>0){if(Y==="stop-before-partial")break;if(Y==="loose"){if(K.length===1)throw new R1("Malformed padding: exactly one additional character");G=WJ(U,YJ(K,X,!1),G)}else throw new R1("Missing padding")}B=W;break}var F=$6(Q,j);if(++j,F==="="){if(K.length<2)throw new R1("Padding is too early");if(j=XJ(Q,j),K.length===2){if(j===W){if(Y==="stop-before-partial")break;throw new R1("Malformed padding: only one =")}if($6(Q,j)==="=")++j,j=XJ(Q,j)}if(j<W)throw new R1("Unexpected character after padding");G=WJ(U,YJ(K,X,Y==="strict"),G),B=W;break}if(!HC(X,F))throw new R1("Unexpected character");var H=q-G;if(H===1&&K.length===2||H===2&&K.length===3)break;if(K+=F,K.length===4){if(G=WJ(U,YJ(K,X,!1),G),K="",B=j,G===q)break}}if(!$)U.length=G;return{bytes:U,read:B,written:G}}});var MG=f(()=>{var CC=p6(),OC=f0(),PC=dU(),AC=jG(),i6=OC.Uint8Array,RC=!i6||!i6.fromBase64||!function(){try{i6.fromBase64("a");return}catch(Q){}try{i6.fromBase64("",null)}catch(Q){return!0}}();if(i6)CC({target:"Uint8Array",stat:!0,forced:RC},{fromBase64:function(J){var $=AC(J,arguments.length>1?arguments[1]:void 0,null,9007199254740991);return PC(i6,$.bytes)}})});var NG=f((nw,LG)=>{var zG=f0(),wC=p0(),IC=zG.Uint8Array,FG=zG.SyntaxError,SC=Math.min,ZC=wC("".match);LG.exports=function(Q,J){var $=Q.length;if($%2!==0)throw new FG("String should be an even number of characters");var q=J?SC(J.length,$/2):$/2,X=J||new IC(q),Y=ZC(Q,/[\S\s]{2}/g),W=0;for(;W<q;W++){var U=+("0x"+Y[W]+"0");if(U!==U)throw new FG("String should only contain hex characters");X[W]=U>>4}return{bytes:X,read:W<<1}}});var DG=f(()=>{var vC=p6(),EC=f0(),kC=JJ(),TC=NG();if(EC.Uint8Array)vC({target:"Uint8Array",stat:!0},{fromHex:function(J){return TC(kC(J)).bytes}})});var PG=f((aw,OG)=>{var xC=Q6(),gC=xC("toStringTag"),CG={};CG[gC]="z";OG.exports=String(CG)==="[object z]"});var RG=f((sw,AG)=>{var _C=PG(),fC=F2(),X4=f8(),yC=Q6(),hC=yC("toStringTag"),bC=Object,mC=X4(function(){return arguments}())==="Arguments",uC=function(Q,J){try{return Q[J]}catch($){}};AG.exports=_C?X4:function(Q){var J,$,q;return Q===void 0?"Undefined":Q===null?"Null":typeof($=uC(J=bC(Q),hC))=="string"?$:mC?X4(J):(q=X4(J))==="Object"&&fC(J.callee)?"Arguments":q}});var GJ=f((tw,wG)=>{var cC=RG(),pC=TypeError;wG.exports=function(Q){if(cC(Q)==="Uint8Array")return Q;throw new pC("Argument is not an Uint8Array")}});var vG=f(()=>{var lC=p6(),IG=f0(),SG=p0(),dC=QJ(),iC=GJ(),nC=q4(),ZG=$J(),oC=qJ(),rC=ZG.i2c,aC=ZG.i2cUrl,sC=Math.floor,tC=Math.ceil,eC=SG("".charAt),Y4=IG.Uint8Array,QO=IG.Array,JO=SG([].join),$O=!Y4||!Y4.prototype.toBase64||!function(){try{var Q=new Y4;Q.toBase64(null)}catch(J){return!0}}();if(Y4)lC({target:"Uint8Array",proto:!0,forced:$O},{toBase64:function(){var J=iC(this),$=arguments.length?dC(arguments[0]):void 0,q=oC($)==="base64"?rC:aC,X=!!$&&!!$.omitPadding;nC(this.buffer);var Y=0,W=J.length,U=QO(X?sC(W/3)*4+(W%3?W%3+1:0):tC(W/3)*4),G=0,B,K=function(j){return eC(q,B>>6*j&63)};for(;Y+2<W;Y+=3)B=(J[Y]<<16)+(J[Y+1]<<8)+J[Y+2],U[G++]=K(3),U[G++]=K(2),U[G++]=K(1),U[G++]=K(0);if(Y+2===W){if(B=(J[Y]<<16)+(J[Y+1]<<8),U[G++]=K(3),U[G++]=K(2),U[G++]=K(1),!X)U[G++]="="}else if(Y+1===W){if(B=J[Y]<<16,U[G++]=K(3),U[G++]=K(2),!X)U[G++]="=",U[G++]="="}return JO(U,"")}})});var kG=f(()=>{var qO=p6(),XO=f0(),EG=p0(),YO=GJ(),WO=q4(),UO=EG(1.1 .toString),GO=EG([].join),BO=Array,W4=XO.Uint8Array,KO=!W4||!W4.prototype.toHex||!function(){try{var Q=new W4([255,255,255,255,255,255,255,255]);return Q.toHex()==="ffffffffffffffff"}catch(J){return!1}}();if(W4)qO({target:"Uint8Array",proto:!0,forced:KO},{toHex:function(){YO(this),WO(this.buffer);var J=BO(this.length);for(var $=0,q=this.length;$<q;$++){var X=UO(this[$],16);J[$]=X.length===1?"0"+X:X}return GO(J,"")}})});var xG=f((BJ)=>{/*! crc32.js (C) 2014-present SheetJS -- http://sheetjs.com */var TG;(function(Q){if(typeof DO_NOT_EXPORT_CRC>"u")if(typeof BJ==="object")Q(BJ);else if(typeof define==="function"&&define.amd)define(function(){var J={};return Q(J),J});else Q(TG={});else Q(TG={})})(function(Q){Q.version="1.2.2";function J(){var T=0,d=Array(256);for(var S=0;S!=256;++S)T=S,T=T&1?-2097792136^T>>>1:T>>>1,T=T&1?-2097792136^T>>>1:T>>>1,T=T&1?-2097792136^T>>>1:T>>>1,T=T&1?-2097792136^T>>>1:T>>>1,T=T&1?-2097792136^T>>>1:T>>>1,T=T&1?-2097792136^T>>>1:T>>>1,T=T&1?-2097792136^T>>>1:T>>>1,T=T&1?-2097792136^T>>>1:T>>>1,d[S]=T;return typeof Int32Array<"u"?new Int32Array(d):d}var $=J();function q(T){var d=0,S=0,v=0,R=typeof Int32Array<"u"?new Int32Array(4096):Array(4096);for(v=0;v!=256;++v)R[v]=T[v];for(v=0;v!=256;++v){S=T[v];for(d=256+v;d<4096;d+=256)S=R[d]=S>>>8^T[S&255]}var O=[];for(v=1;v!=16;++v)O[v-1]=typeof Int32Array<"u"?R.subarray(v*256,v*256+256):R.slice(v*256,v*256+256);return O}var X=q($),Y=X[0],W=X[1],U=X[2],G=X[3],B=X[4],K=X[5],j=X[6],F=X[7],H=X[8],E=X[9],g=X[10],P=X[11],D=X[12],V=X[13],z=X[14];function L(T,d){var S=d^-1;for(var v=0,R=T.length;v<R;)S=S>>>8^$[(S^T.charCodeAt(v++))&255];return~S}function A(T,d){var S=d^-1,v=T.length-15,R=0;for(;R<v;)S=z[T[R++]^S&255]^V[T[R++]^S>>8&255]^D[T[R++]^S>>16&255]^P[T[R++]^S>>>24]^g[T[R++]]^E[T[R++]]^H[T[R++]]^F[T[R++]]^j[T[R++]]^K[T[R++]]^B[T[R++]]^G[T[R++]]^U[T[R++]]^W[T[R++]]^Y[T[R++]]^$[T[R++]];v+=15;while(R<v)S=S>>>8^$[(S^T[R++])&255];return~S}function y(T,d){var S=d^-1;for(var v=0,R=T.length,O=0,_=0;v<R;)if(O=T.charCodeAt(v++),O<128)S=S>>>8^$[(S^O)&255];else if(O<2048)S=S>>>8^$[(S^(192|O>>6&31))&255],S=S>>>8^$[(S^(128|O&63))&255];else if(O>=55296&&O<57344)O=(O&1023)+64,_=T.charCodeAt(v++)&1023,S=S>>>8^$[(S^(240|O>>8&7))&255],S=S>>>8^$[(S^(128|O>>2&63))&255],S=S>>>8^$[(S^(128|_>>6&15|(O&3)<<4))&255],S=S>>>8^$[(S^(128|_&63))&255];else S=S>>>8^$[(S^(224|O>>12&15))&255],S=S>>>8^$[(S^(128|O>>6&63))&255],S=S>>>8^$[(S^(128|O&63))&255];return~S}Q.table=$,Q.bstr=L,Q.buf=A,Q.str=y})});var zJ=X1(cX(),1);var x3=new Uint8Array(16);function $Q(){return crypto.getRandomValues(x3)}var u0=[];for(let Q=0;Q<256;++Q)u0.push((Q+256).toString(16).slice(1));function pX(Q,J=0){return(u0[Q[J+0]]+u0[Q[J+1]]+u0[Q[J+2]]+u0[Q[J+3]]+"-"+u0[Q[J+4]]+u0[Q[J+5]]+"-"+u0[Q[J+6]]+u0[Q[J+7]]+"-"+u0[Q[J+8]]+u0[Q[J+9]]+"-"+u0[Q[J+10]]+u0[Q[J+11]]+u0[Q[J+12]]+u0[Q[J+13]]+u0[Q[J+14]]+u0[Q[J+15]]).toLowerCase()}function g3(Q,J,$){if(!J&&!Q&&crypto.randomUUID)return crypto.randomUUID();return _3(Q,J,$)}function _3(Q,J,$){Q=Q||{};let q=Q.random??Q.rng?.()??$Q();if(q.length<16)throw Error("Random bytes length must be >= 16");if(q[6]=q[6]&15|64,q[8]=q[8]&63|128,J){if($=$||0,$<0||$+16>J.length)throw RangeError(`UUID byte range ${$}:${$+15} is out of buffer bounds`);for(let X=0;X<16;++X)J[$+X]=q[X];return J}return pX(q)}var n1=g3;var Z={};O4(Z,{void:()=>DF,util:()=>R0,unknown:()=>LF,union:()=>AF,undefined:()=>MF,tuple:()=>IF,transformer:()=>fF,symbol:()=>jF,string:()=>tX,strictObject:()=>PF,setErrorMap:()=>h3,set:()=>vF,record:()=>SF,quotelessJson:()=>f3,promise:()=>_F,preprocess:()=>bF,pipeline:()=>mF,ostring:()=>uF,optional:()=>yF,onumber:()=>cF,oboolean:()=>pF,objectUtil:()=>qQ,object:()=>OF,number:()=>eX,nullable:()=>hF,null:()=>FF,never:()=>NF,nativeEnum:()=>gF,nan:()=>KF,map:()=>ZF,makeIssue:()=>I8,literal:()=>TF,lazy:()=>kF,late:()=>GF,isValid:()=>N1,isDirty:()=>g5,isAsync:()=>S6,isAborted:()=>x5,intersection:()=>wF,instanceof:()=>BF,getParsedType:()=>f2,getErrorMap:()=>I6,function:()=>EF,enum:()=>xF,effect:()=>fF,discriminatedUnion:()=>RF,defaultErrorMap:()=>e2,datetimeRegex:()=>rX,date:()=>HF,custom:()=>sX,coerce:()=>lF,boolean:()=>QY,bigint:()=>VF,array:()=>CF,any:()=>zF,addIssueToContext:()=>Y0,ZodVoid:()=>Z8,ZodUnknown:()=>D1,ZodUnion:()=>x6,ZodUndefined:()=>k6,ZodType:()=>P0,ZodTuple:()=>h2,ZodTransformer:()=>R2,ZodSymbol:()=>S8,ZodString:()=>C2,ZodSet:()=>s1,ZodSchema:()=>P0,ZodRecord:()=>v8,ZodReadonly:()=>m6,ZodPromise:()=>t1,ZodPipeline:()=>T8,ZodParsedType:()=>J0,ZodOptional:()=>P2,ZodObject:()=>g0,ZodNumber:()=>C1,ZodNullable:()=>J1,ZodNull:()=>T6,ZodNever:()=>y2,ZodNativeEnum:()=>y6,ZodNaN:()=>k8,ZodMap:()=>E8,ZodLiteral:()=>f6,ZodLazy:()=>_6,ZodIssueCode:()=>r,ZodIntersection:()=>g6,ZodFunction:()=>v6,ZodFirstPartyTypeKind:()=>z0,ZodError:()=>J2,ZodEnum:()=>P1,ZodEffects:()=>R2,ZodDiscriminatedUnion:()=>_5,ZodDefault:()=>h6,ZodDate:()=>r1,ZodCatch:()=>b6,ZodBranded:()=>f5,ZodBoolean:()=>E6,ZodBigInt:()=>O1,ZodArray:()=>O2,ZodAny:()=>a1,Schema:()=>P0,ParseStatus:()=>c0,OK:()=>n0,NEVER:()=>dF,INVALID:()=>F0,EMPTY_PATH:()=>b3,DIRTY:()=>o1,BRAND:()=>UF});var R0;(function(Q){Q.assertEqual=(X)=>{};function J(X){}Q.assertIs=J;function $(X){throw Error()}Q.assertNever=$,Q.arrayToEnum=(X)=>{let Y={};for(let W of X)Y[W]=W;return Y},Q.getValidEnumValues=(X)=>{let Y=Q.objectKeys(X).filter((U)=>typeof X[X[U]]!=="number"),W={};for(let U of Y)W[U]=X[U];return Q.objectValues(W)},Q.objectValues=(X)=>{return Q.objectKeys(X).map(function(Y){return X[Y]})},Q.objectKeys=typeof Object.keys==="function"?(X)=>Object.keys(X):(X)=>{let Y=[];for(let W in X)if(Object.prototype.hasOwnProperty.call(X,W))Y.push(W);return Y},Q.find=(X,Y)=>{for(let W of X)if(Y(W))return W;return},Q.isInteger=typeof Number.isInteger==="function"?(X)=>Number.isInteger(X):(X)=>typeof X==="number"&&Number.isFinite(X)&&Math.floor(X)===X;function q(X,Y=" | "){return X.map((W)=>typeof W==="string"?`'${W}'`:W).join(Y)}Q.joinValues=q,Q.jsonStringifyReplacer=(X,Y)=>{if(typeof Y==="bigint")return Y.toString();return Y}})(R0||(R0={}));var qQ;(function(Q){Q.mergeShapes=(J,$)=>{return{...J,...$}}})(qQ||(qQ={}));var J0=R0.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),f2=(Q)=>{switch(typeof Q){case"undefined":return J0.undefined;case"string":return J0.string;case"number":return Number.isNaN(Q)?J0.nan:J0.number;case"boolean":return J0.boolean;case"function":return J0.function;case"bigint":return J0.bigint;case"symbol":return J0.symbol;case"object":if(Array.isArray(Q))return J0.array;if(Q===null)return J0.null;if(Q.then&&typeof Q.then==="function"&&Q.catch&&typeof Q.catch==="function")return J0.promise;if(typeof Map<"u"&&Q instanceof Map)return J0.map;if(typeof Set<"u"&&Q instanceof Set)return J0.set;if(typeof Date<"u"&&Q instanceof Date)return J0.date;return J0.object;default:return J0.unknown}};var r=R0.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),f3=(Q)=>{return JSON.stringify(Q,null,2).replace(/"([^"]+)":/g,"$1:")};class J2 extends Error{get errors(){return this.issues}constructor(Q){super();this.issues=[],this.addIssue=($)=>{this.issues=[...this.issues,$]},this.addIssues=($=[])=>{this.issues=[...this.issues,...$]};let J=new.target.prototype;if(Object.setPrototypeOf)Object.setPrototypeOf(this,J);else this.__proto__=J;this.name="ZodError",this.issues=Q}format(Q){let J=Q||function(X){return X.message},$={_errors:[]},q=(X)=>{for(let Y of X.issues)if(Y.code==="invalid_union")Y.unionErrors.map(q);else if(Y.code==="invalid_return_type")q(Y.returnTypeError);else if(Y.code==="invalid_arguments")q(Y.argumentsError);else if(Y.path.length===0)$._errors.push(J(Y));else{let W=$,U=0;while(U<Y.path.length){let G=Y.path[U];if(U!==Y.path.length-1)W[G]=W[G]||{_errors:[]};else W[G]=W[G]||{_errors:[]},W[G]._errors.push(J(Y));W=W[G],U++}}};return q(this),$}static assert(Q){if(!(Q instanceof J2))throw Error(`Not a ZodError: ${Q}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,R0.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(Q=(J)=>J.message){let J={},$=[];for(let q of this.issues)if(q.path.length>0){let X=q.path[0];J[X]=J[X]||[],J[X].push(Q(q))}else $.push(Q(q));return{formErrors:$,fieldErrors:J}}get formErrors(){return this.flatten()}}J2.create=(Q)=>{return new J2(Q)};var y3=(Q,J)=>{let $;switch(Q.code){case r.invalid_type:if(Q.received===J0.undefined)$="Required";else $=`Expected ${Q.expected}, received ${Q.received}`;break;case r.invalid_literal:$=`Invalid literal value, expected ${JSON.stringify(Q.expected,R0.jsonStringifyReplacer)}`;break;case r.unrecognized_keys:$=`Unrecognized key(s) in object: ${R0.joinValues(Q.keys,", ")}`;break;case r.invalid_union:$="Invalid input";break;case r.invalid_union_discriminator:$=`Invalid discriminator value. Expected ${R0.joinValues(Q.options)}`;break;case r.invalid_enum_value:$=`Invalid enum value. Expected ${R0.joinValues(Q.options)}, received '${Q.received}'`;break;case r.invalid_arguments:$="Invalid function arguments";break;case r.invalid_return_type:$="Invalid function return type";break;case r.invalid_date:$="Invalid date";break;case r.invalid_string:if(typeof Q.validation==="object")if("includes"in Q.validation){if($=`Invalid input: must include "${Q.validation.includes}"`,typeof Q.validation.position==="number")$=`${$} at one or more positions greater than or equal to ${Q.validation.position}`}else if("startsWith"in Q.validation)$=`Invalid input: must start with "${Q.validation.startsWith}"`;else if("endsWith"in Q.validation)$=`Invalid input: must end with "${Q.validation.endsWith}"`;else R0.assertNever(Q.validation);else if(Q.validation!=="regex")$=`Invalid ${Q.validation}`;else $="Invalid";break;case r.too_small:if(Q.type==="array")$=`Array must contain ${Q.exact?"exactly":Q.inclusive?"at least":"more than"} ${Q.minimum} element(s)`;else if(Q.type==="string")$=`String must contain ${Q.exact?"exactly":Q.inclusive?"at least":"over"} ${Q.minimum} character(s)`;else if(Q.type==="number")$=`Number must be ${Q.exact?"exactly equal to ":Q.inclusive?"greater than or equal to ":"greater than "}${Q.minimum}`;else if(Q.type==="bigint")$=`Number must be ${Q.exact?"exactly equal to ":Q.inclusive?"greater than or equal to ":"greater than "}${Q.minimum}`;else if(Q.type==="date")$=`Date must be ${Q.exact?"exactly equal to ":Q.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(Q.minimum))}`;else $="Invalid input";break;case r.too_big:if(Q.type==="array")$=`Array must contain ${Q.exact?"exactly":Q.inclusive?"at most":"less than"} ${Q.maximum} element(s)`;else if(Q.type==="string")$=`String must contain ${Q.exact?"exactly":Q.inclusive?"at most":"under"} ${Q.maximum} character(s)`;else if(Q.type==="number")$=`Number must be ${Q.exact?"exactly":Q.inclusive?"less than or equal to":"less than"} ${Q.maximum}`;else if(Q.type==="bigint")$=`BigInt must be ${Q.exact?"exactly":Q.inclusive?"less than or equal to":"less than"} ${Q.maximum}`;else if(Q.type==="date")$=`Date must be ${Q.exact?"exactly":Q.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(Q.maximum))}`;else $="Invalid input";break;case r.custom:$="Invalid input";break;case r.invalid_intersection_types:$="Intersection results could not be merged";break;case r.not_multiple_of:$=`Number must be a multiple of ${Q.multipleOf}`;break;case r.not_finite:$="Number must be finite";break;default:$=J.defaultError,R0.assertNever(Q)}return{message:$}},e2=y3;var lX=e2;function h3(Q){lX=Q}function I6(){return lX}var I8=(Q)=>{let{data:J,path:$,errorMaps:q,issueData:X}=Q,Y=[...$,...X.path||[]],W={...X,path:Y};if(X.message!==void 0)return{...X,path:Y,message:X.message};let U="",G=q.filter((B)=>!!B).slice().reverse();for(let B of G)U=B(W,{data:J,defaultError:U}).message;return{...X,path:Y,message:U}},b3=[];function Y0(Q,J){let $=I6(),q=I8({issueData:J,data:Q.data,path:Q.path,errorMaps:[Q.common.contextualErrorMap,Q.schemaErrorMap,$,$===e2?void 0:e2].filter((X)=>!!X)});Q.common.issues.push(q)}class c0{constructor(){this.value="valid"}dirty(){if(this.value==="valid")this.value="dirty"}abort(){if(this.value!=="aborted")this.value="aborted"}static mergeArray(Q,J){let $=[];for(let q of J){if(q.status==="aborted")return F0;if(q.status==="dirty")Q.dirty();$.push(q.value)}return{status:Q.value,value:$}}static async mergeObjectAsync(Q,J){let $=[];for(let q of J){let X=await q.key,Y=await q.value;$.push({key:X,value:Y})}return c0.mergeObjectSync(Q,$)}static mergeObjectSync(Q,J){let $={};for(let q of J){let{key:X,value:Y}=q;if(X.status==="aborted")return F0;if(Y.status==="aborted")return F0;if(X.status==="dirty")Q.dirty();if(Y.status==="dirty")Q.dirty();if(X.value!=="__proto__"&&(typeof Y.value<"u"||q.alwaysSet))$[X.value]=Y.value}return{status:Q.value,value:$}}}var F0=Object.freeze({status:"aborted"}),o1=(Q)=>({status:"dirty",value:Q}),n0=(Q)=>({status:"valid",value:Q}),x5=(Q)=>Q.status==="aborted",g5=(Q)=>Q.status==="dirty",N1=(Q)=>Q.status==="valid",S6=(Q)=>typeof Promise<"u"&&Q instanceof Promise;var V0;(function(Q){Q.errToObj=(J)=>typeof J==="string"?{message:J}:J||{},Q.toString=(J)=>typeof J==="string"?J:J?.message})(V0||(V0={}));class A2{constructor(Q,J,$,q){this._cachedPath=[],this.parent=Q,this.data=J,this._path=$,this._key=q}get path(){if(!this._cachedPath.length)if(Array.isArray(this._key))this._cachedPath.push(...this._path,...this._key);else this._cachedPath.push(...this._path,this._key);return this._cachedPath}}var dX=(Q,J)=>{if(N1(J))return{success:!0,data:J.value};else{if(!Q.common.issues.length)throw Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let $=new J2(Q.common.issues);return this._error=$,this._error}}}};function O0(Q){if(!Q)return{};let{errorMap:J,invalid_type_error:$,required_error:q,description:X}=Q;if(J&&($||q))throw Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);if(J)return{errorMap:J,description:X};return{errorMap:(W,U)=>{let{message:G}=Q;if(W.code==="invalid_enum_value")return{message:G??U.defaultError};if(typeof U.data>"u")return{message:G??q??U.defaultError};if(W.code!=="invalid_type")return{message:U.defaultError};return{message:G??$??U.defaultError}},description:X}}class P0{get description(){return this._def.description}_getType(Q){return f2(Q.data)}_getOrReturnCtx(Q,J){return J||{common:Q.parent.common,data:Q.data,parsedType:f2(Q.data),schemaErrorMap:this._def.errorMap,path:Q.path,parent:Q.parent}}_processInputParams(Q){return{status:new c0,ctx:{common:Q.parent.common,data:Q.data,parsedType:f2(Q.data),schemaErrorMap:this._def.errorMap,path:Q.path,parent:Q.parent}}}_parseSync(Q){let J=this._parse(Q);if(S6(J))throw Error("Synchronous parse encountered promise.");return J}_parseAsync(Q){let J=this._parse(Q);return Promise.resolve(J)}parse(Q,J){let $=this.safeParse(Q,J);if($.success)return $.data;throw $.error}safeParse(Q,J){let $={common:{issues:[],async:J?.async??!1,contextualErrorMap:J?.errorMap},path:J?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:Q,parsedType:f2(Q)},q=this._parseSync({data:Q,path:$.path,parent:$});return dX($,q)}"~validate"(Q){let J={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:Q,parsedType:f2(Q)};if(!this["~standard"].async)try{let $=this._parseSync({data:Q,path:[],parent:J});return N1($)?{value:$.value}:{issues:J.common.issues}}catch($){if($?.message?.toLowerCase()?.includes("encountered"))this["~standard"].async=!0;J.common={issues:[],async:!0}}return this._parseAsync({data:Q,path:[],parent:J}).then(($)=>N1($)?{value:$.value}:{issues:J.common.issues})}async parseAsync(Q,J){let $=await this.safeParseAsync(Q,J);if($.success)return $.data;throw $.error}async safeParseAsync(Q,J){let $={common:{issues:[],contextualErrorMap:J?.errorMap,async:!0},path:J?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:Q,parsedType:f2(Q)},q=this._parse({data:Q,path:$.path,parent:$}),X=await(S6(q)?q:Promise.resolve(q));return dX($,X)}refine(Q,J){let $=(q)=>{if(typeof J==="string"||typeof J>"u")return{message:J};else if(typeof J==="function")return J(q);else return J};return this._refinement((q,X)=>{let Y=Q(q),W=()=>X.addIssue({code:r.custom,...$(q)});if(typeof Promise<"u"&&Y instanceof Promise)return Y.then((U)=>{if(!U)return W(),!1;else return!0});if(!Y)return W(),!1;else return!0})}refinement(Q,J){return this._refinement(($,q)=>{if(!Q($))return q.addIssue(typeof J==="function"?J($,q):J),!1;else return!0})}_refinement(Q){return new R2({schema:this,typeName:z0.ZodEffects,effect:{type:"refinement",refinement:Q}})}superRefine(Q){return this._refinement(Q)}constructor(Q){this.spa=this.safeParseAsync,this._def=Q,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:(J)=>this["~validate"](J)}}optional(){return P2.create(this,this._def)}nullable(){return J1.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return O2.create(this)}promise(){return t1.create(this,this._def)}or(Q){return x6.create([this,Q],this._def)}and(Q){return g6.create(this,Q,this._def)}transform(Q){return new R2({...O0(this._def),schema:this,typeName:z0.ZodEffects,effect:{type:"transform",transform:Q}})}default(Q){let J=typeof Q==="function"?Q:()=>Q;return new h6({...O0(this._def),innerType:this,defaultValue:J,typeName:z0.ZodDefault})}brand(){return new f5({typeName:z0.ZodBranded,type:this,...O0(this._def)})}catch(Q){let J=typeof Q==="function"?Q:()=>Q;return new b6({...O0(this._def),innerType:this,catchValue:J,typeName:z0.ZodCatch})}describe(Q){return new this.constructor({...this._def,description:Q})}pipe(Q){return T8.create(this,Q)}readonly(){return m6.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}var m3=/^c[^\s-]{8,}$/i,u3=/^[0-9a-z]+$/,c3=/^[0-9A-HJKMNP-TV-Z]{26}$/i,p3=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,l3=/^[a-z0-9_-]{21}$/i,d3=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,i3=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,n3=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,o3="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",XQ,r3=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,a3=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,s3=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,t3=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,e3=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,QF=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nX="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",JF=new RegExp(`^${nX}$`);function oX(Q){let J="[0-5]\\d";if(Q.precision)J=`${J}\\.\\d{${Q.precision}}`;else if(Q.precision==null)J=`${J}(\\.\\d+)?`;let $=Q.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${J})${$}`}function $F(Q){return new RegExp(`^${oX(Q)}$`)}function rX(Q){let J=`${nX}T${oX(Q)}`,$=[];if($.push(Q.local?"Z?":"Z"),Q.offset)$.push("([+-]\\d{2}:?\\d{2})");return J=`${J}(${$.join("|")})`,new RegExp(`^${J}$`)}function qF(Q,J){if((J==="v4"||!J)&&r3.test(Q))return!0;if((J==="v6"||!J)&&s3.test(Q))return!0;return!1}function XF(Q,J){if(!d3.test(Q))return!1;try{let[$]=Q.split(".");if(!$)return!1;let q=$.replace(/-/g,"+").replace(/_/g,"/").padEnd($.length+(4-$.length%4)%4,"="),X=JSON.parse(atob(q));if(typeof X!=="object"||X===null)return!1;if("typ"in X&&X?.typ!=="JWT")return!1;if(!X.alg)return!1;if(J&&X.alg!==J)return!1;return!0}catch{return!1}}function YF(Q,J){if((J==="v4"||!J)&&a3.test(Q))return!0;if((J==="v6"||!J)&&t3.test(Q))return!0;return!1}class C2 extends P0{_parse(Q){if(this._def.coerce)Q.data=String(Q.data);if(this._getType(Q)!==J0.string){let X=this._getOrReturnCtx(Q);return Y0(X,{code:r.invalid_type,expected:J0.string,received:X.parsedType}),F0}let $=new c0,q=void 0;for(let X of this._def.checks)if(X.kind==="min"){if(Q.data.length<X.value)q=this._getOrReturnCtx(Q,q),Y0(q,{code:r.too_small,minimum:X.value,type:"string",inclusive:!0,exact:!1,message:X.message}),$.dirty()}else if(X.kind==="max"){if(Q.data.length>X.value)q=this._getOrReturnCtx(Q,q),Y0(q,{code:r.too_big,maximum:X.value,type:"string",inclusive:!0,exact:!1,message:X.message}),$.dirty()}else if(X.kind==="length"){let Y=Q.data.length>X.value,W=Q.data.length<X.value;if(Y||W){if(q=this._getOrReturnCtx(Q,q),Y)Y0(q,{code:r.too_big,maximum:X.value,type:"string",inclusive:!0,exact:!0,message:X.message});else if(W)Y0(q,{code:r.too_small,minimum:X.value,type:"string",inclusive:!0,exact:!0,message:X.message});$.dirty()}}else if(X.kind==="email"){if(!n3.test(Q.data))q=this._getOrReturnCtx(Q,q),Y0(q,{validation:"email",code:r.invalid_string,message:X.message}),$.dirty()}else if(X.kind==="emoji"){if(!XQ)XQ=new RegExp(o3,"u");if(!XQ.test(Q.data))q=this._getOrReturnCtx(Q,q),Y0(q,{validation:"emoji",code:r.invalid_string,message:X.message}),$.dirty()}else if(X.kind==="uuid"){if(!p3.test(Q.data))q=this._getOrReturnCtx(Q,q),Y0(q,{validation:"uuid",code:r.invalid_string,message:X.message}),$.dirty()}else if(X.kind==="nanoid"){if(!l3.test(Q.data))q=this._getOrReturnCtx(Q,q),Y0(q,{validation:"nanoid",code:r.invalid_string,message:X.message}),$.dirty()}else if(X.kind==="cuid"){if(!m3.test(Q.data))q=this._getOrReturnCtx(Q,q),Y0(q,{validation:"cuid",code:r.invalid_string,message:X.message}),$.dirty()}else if(X.kind==="cuid2"){if(!u3.test(Q.data))q=this._getOrReturnCtx(Q,q),Y0(q,{validation:"cuid2",code:r.invalid_string,message:X.message}),$.dirty()}else if(X.kind==="ulid"){if(!c3.test(Q.data))q=this._getOrReturnCtx(Q,q),Y0(q,{validation:"ulid",code:r.invalid_string,message:X.message}),$.dirty()}else if(X.kind==="url")try{new URL(Q.data)}catch{q=this._getOrReturnCtx(Q,q),Y0(q,{validation:"url",code:r.invalid_string,message:X.message}),$.dirty()}else if(X.kind==="regex"){if(X.regex.lastIndex=0,!X.regex.test(Q.data))q=this._getOrReturnCtx(Q,q),Y0(q,{validation:"regex",code:r.invalid_string,message:X.message}),$.dirty()}else if(X.kind==="trim")Q.data=Q.data.trim();else if(X.kind==="includes"){if(!Q.data.includes(X.value,X.position))q=this._getOrReturnCtx(Q,q),Y0(q,{code:r.invalid_string,validation:{includes:X.value,position:X.position},message:X.message}),$.dirty()}else if(X.kind==="toLowerCase")Q.data=Q.data.toLowerCase();else if(X.kind==="toUpperCase")Q.data=Q.data.toUpperCase();else if(X.kind==="startsWith"){if(!Q.data.startsWith(X.value))q=this._getOrReturnCtx(Q,q),Y0(q,{code:r.invalid_string,validation:{startsWith:X.value},message:X.message}),$.dirty()}else if(X.kind==="endsWith"){if(!Q.data.endsWith(X.value))q=this._getOrReturnCtx(Q,q),Y0(q,{code:r.invalid_string,validation:{endsWith:X.value},message:X.message}),$.dirty()}else if(X.kind==="datetime"){if(!rX(X).test(Q.data))q=this._getOrReturnCtx(Q,q),Y0(q,{code:r.invalid_string,validation:"datetime",message:X.message}),$.dirty()}else if(X.kind==="date"){if(!JF.test(Q.data))q=this._getOrReturnCtx(Q,q),Y0(q,{code:r.invalid_string,validation:"date",message:X.message}),$.dirty()}else if(X.kind==="time"){if(!$F(X).test(Q.data))q=this._getOrReturnCtx(Q,q),Y0(q,{code:r.invalid_string,validation:"time",message:X.message}),$.dirty()}else if(X.kind==="duration"){if(!i3.test(Q.data))q=this._getOrReturnCtx(Q,q),Y0(q,{validation:"duration",code:r.invalid_string,message:X.message}),$.dirty()}else if(X.kind==="ip"){if(!qF(Q.data,X.version))q=this._getOrReturnCtx(Q,q),Y0(q,{validation:"ip",code:r.invalid_string,message:X.message}),$.dirty()}else if(X.kind==="jwt"){if(!XF(Q.data,X.alg))q=this._getOrReturnCtx(Q,q),Y0(q,{validation:"jwt",code:r.invalid_string,message:X.message}),$.dirty()}else if(X.kind==="cidr"){if(!YF(Q.data,X.version))q=this._getOrReturnCtx(Q,q),Y0(q,{validation:"cidr",code:r.invalid_string,message:X.message}),$.dirty()}else if(X.kind==="base64"){if(!e3.test(Q.data))q=this._getOrReturnCtx(Q,q),Y0(q,{validation:"base64",code:r.invalid_string,message:X.message}),$.dirty()}else if(X.kind==="base64url"){if(!QF.test(Q.data))q=this._getOrReturnCtx(Q,q),Y0(q,{validation:"base64url",code:r.invalid_string,message:X.message}),$.dirty()}else R0.assertNever(X);return{status:$.value,value:Q.data}}_regex(Q,J,$){return this.refinement((q)=>Q.test(q),{validation:J,code:r.invalid_string,...V0.errToObj($)})}_addCheck(Q){return new C2({...this._def,checks:[...this._def.checks,Q]})}email(Q){return this._addCheck({kind:"email",...V0.errToObj(Q)})}url(Q){return this._addCheck({kind:"url",...V0.errToObj(Q)})}emoji(Q){return this._addCheck({kind:"emoji",...V0.errToObj(Q)})}uuid(Q){return this._addCheck({kind:"uuid",...V0.errToObj(Q)})}nanoid(Q){return this._addCheck({kind:"nanoid",...V0.errToObj(Q)})}cuid(Q){return this._addCheck({kind:"cuid",...V0.errToObj(Q)})}cuid2(Q){return this._addCheck({kind:"cuid2",...V0.errToObj(Q)})}ulid(Q){return this._addCheck({kind:"ulid",...V0.errToObj(Q)})}base64(Q){return this._addCheck({kind:"base64",...V0.errToObj(Q)})}base64url(Q){return this._addCheck({kind:"base64url",...V0.errToObj(Q)})}jwt(Q){return this._addCheck({kind:"jwt",...V0.errToObj(Q)})}ip(Q){return this._addCheck({kind:"ip",...V0.errToObj(Q)})}cidr(Q){return this._addCheck({kind:"cidr",...V0.errToObj(Q)})}datetime(Q){if(typeof Q==="string")return this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:Q});return this._addCheck({kind:"datetime",precision:typeof Q?.precision>"u"?null:Q?.precision,offset:Q?.offset??!1,local:Q?.local??!1,...V0.errToObj(Q?.message)})}date(Q){return this._addCheck({kind:"date",message:Q})}time(Q){if(typeof Q==="string")return this._addCheck({kind:"time",precision:null,message:Q});return this._addCheck({kind:"time",precision:typeof Q?.precision>"u"?null:Q?.precision,...V0.errToObj(Q?.message)})}duration(Q){return this._addCheck({kind:"duration",...V0.errToObj(Q)})}regex(Q,J){return this._addCheck({kind:"regex",regex:Q,...V0.errToObj(J)})}includes(Q,J){return this._addCheck({kind:"includes",value:Q,position:J?.position,...V0.errToObj(J?.message)})}startsWith(Q,J){return this._addCheck({kind:"startsWith",value:Q,...V0.errToObj(J)})}endsWith(Q,J){return this._addCheck({kind:"endsWith",value:Q,...V0.errToObj(J)})}min(Q,J){return this._addCheck({kind:"min",value:Q,...V0.errToObj(J)})}max(Q,J){return this._addCheck({kind:"max",value:Q,...V0.errToObj(J)})}length(Q,J){return this._addCheck({kind:"length",value:Q,...V0.errToObj(J)})}nonempty(Q){return this.min(1,V0.errToObj(Q))}trim(){return new C2({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new C2({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new C2({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find((Q)=>Q.kind==="datetime")}get isDate(){return!!this._def.checks.find((Q)=>Q.kind==="date")}get isTime(){return!!this._def.checks.find((Q)=>Q.kind==="time")}get isDuration(){return!!this._def.checks.find((Q)=>Q.kind==="duration")}get isEmail(){return!!this._def.checks.find((Q)=>Q.kind==="email")}get isURL(){return!!this._def.checks.find((Q)=>Q.kind==="url")}get isEmoji(){return!!this._def.checks.find((Q)=>Q.kind==="emoji")}get isUUID(){return!!this._def.checks.find((Q)=>Q.kind==="uuid")}get isNANOID(){return!!this._def.checks.find((Q)=>Q.kind==="nanoid")}get isCUID(){return!!this._def.checks.find((Q)=>Q.kind==="cuid")}get isCUID2(){return!!this._def.checks.find((Q)=>Q.kind==="cuid2")}get isULID(){return!!this._def.checks.find((Q)=>Q.kind==="ulid")}get isIP(){return!!this._def.checks.find((Q)=>Q.kind==="ip")}get isCIDR(){return!!this._def.checks.find((Q)=>Q.kind==="cidr")}get isBase64(){return!!this._def.checks.find((Q)=>Q.kind==="base64")}get isBase64url(){return!!this._def.checks.find((Q)=>Q.kind==="base64url")}get minLength(){let Q=null;for(let J of this._def.checks)if(J.kind==="min"){if(Q===null||J.value>Q)Q=J.value}return Q}get maxLength(){let Q=null;for(let J of this._def.checks)if(J.kind==="max"){if(Q===null||J.value<Q)Q=J.value}return Q}}C2.create=(Q)=>{return new C2({checks:[],typeName:z0.ZodString,coerce:Q?.coerce??!1,...O0(Q)})};function WF(Q,J){let $=(Q.toString().split(".")[1]||"").length,q=(J.toString().split(".")[1]||"").length,X=$>q?$:q,Y=Number.parseInt(Q.toFixed(X).replace(".","")),W=Number.parseInt(J.toFixed(X).replace(".",""));return Y%W/10**X}class C1 extends P0{constructor(){super(...arguments);this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(Q){if(this._def.coerce)Q.data=Number(Q.data);if(this._getType(Q)!==J0.number){let X=this._getOrReturnCtx(Q);return Y0(X,{code:r.invalid_type,expected:J0.number,received:X.parsedType}),F0}let $=void 0,q=new c0;for(let X of this._def.checks)if(X.kind==="int"){if(!R0.isInteger(Q.data))$=this._getOrReturnCtx(Q,$),Y0($,{code:r.invalid_type,expected:"integer",received:"float",message:X.message}),q.dirty()}else if(X.kind==="min"){if(X.inclusive?Q.data<X.value:Q.data<=X.value)$=this._getOrReturnCtx(Q,$),Y0($,{code:r.too_small,minimum:X.value,type:"number",inclusive:X.inclusive,exact:!1,message:X.message}),q.dirty()}else if(X.kind==="max"){if(X.inclusive?Q.data>X.value:Q.data>=X.value)$=this._getOrReturnCtx(Q,$),Y0($,{code:r.too_big,maximum:X.value,type:"number",inclusive:X.inclusive,exact:!1,message:X.message}),q.dirty()}else if(X.kind==="multipleOf"){if(WF(Q.data,X.value)!==0)$=this._getOrReturnCtx(Q,$),Y0($,{code:r.not_multiple_of,multipleOf:X.value,message:X.message}),q.dirty()}else if(X.kind==="finite"){if(!Number.isFinite(Q.data))$=this._getOrReturnCtx(Q,$),Y0($,{code:r.not_finite,message:X.message}),q.dirty()}else R0.assertNever(X);return{status:q.value,value:Q.data}}gte(Q,J){return this.setLimit("min",Q,!0,V0.toString(J))}gt(Q,J){return this.setLimit("min",Q,!1,V0.toString(J))}lte(Q,J){return this.setLimit("max",Q,!0,V0.toString(J))}lt(Q,J){return this.setLimit("max",Q,!1,V0.toString(J))}setLimit(Q,J,$,q){return new C1({...this._def,checks:[...this._def.checks,{kind:Q,value:J,inclusive:$,message:V0.toString(q)}]})}_addCheck(Q){return new C1({...this._def,checks:[...this._def.checks,Q]})}int(Q){return this._addCheck({kind:"int",message:V0.toString(Q)})}positive(Q){return this._addCheck({kind:"min",value:0,inclusive:!1,message:V0.toString(Q)})}negative(Q){return this._addCheck({kind:"max",value:0,inclusive:!1,message:V0.toString(Q)})}nonpositive(Q){return this._addCheck({kind:"max",value:0,inclusive:!0,message:V0.toString(Q)})}nonnegative(Q){return this._addCheck({kind:"min",value:0,inclusive:!0,message:V0.toString(Q)})}multipleOf(Q,J){return this._addCheck({kind:"multipleOf",value:Q,message:V0.toString(J)})}finite(Q){return this._addCheck({kind:"finite",message:V0.toString(Q)})}safe(Q){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:V0.toString(Q)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:V0.toString(Q)})}get minValue(){let Q=null;for(let J of this._def.checks)if(J.kind==="min"){if(Q===null||J.value>Q)Q=J.value}return Q}get maxValue(){let Q=null;for(let J of this._def.checks)if(J.kind==="max"){if(Q===null||J.value<Q)Q=J.value}return Q}get isInt(){return!!this._def.checks.find((Q)=>Q.kind==="int"||Q.kind==="multipleOf"&&R0.isInteger(Q.value))}get isFinite(){let Q=null,J=null;for(let $ of this._def.checks)if($.kind==="finite"||$.kind==="int"||$.kind==="multipleOf")return!0;else if($.kind==="min"){if(J===null||$.value>J)J=$.value}else if($.kind==="max"){if(Q===null||$.value<Q)Q=$.value}return Number.isFinite(J)&&Number.isFinite(Q)}}C1.create=(Q)=>{return new C1({checks:[],typeName:z0.ZodNumber,coerce:Q?.coerce||!1,...O0(Q)})};class O1 extends P0{constructor(){super(...arguments);this.min=this.gte,this.max=this.lte}_parse(Q){if(this._def.coerce)try{Q.data=BigInt(Q.data)}catch{return this._getInvalidInput(Q)}if(this._getType(Q)!==J0.bigint)return this._getInvalidInput(Q);let $=void 0,q=new c0;for(let X of this._def.checks)if(X.kind==="min"){if(X.inclusive?Q.data<X.value:Q.data<=X.value)$=this._getOrReturnCtx(Q,$),Y0($,{code:r.too_small,type:"bigint",minimum:X.value,inclusive:X.inclusive,message:X.message}),q.dirty()}else if(X.kind==="max"){if(X.inclusive?Q.data>X.value:Q.data>=X.value)$=this._getOrReturnCtx(Q,$),Y0($,{code:r.too_big,type:"bigint",maximum:X.value,inclusive:X.inclusive,message:X.message}),q.dirty()}else if(X.kind==="multipleOf"){if(Q.data%X.value!==BigInt(0))$=this._getOrReturnCtx(Q,$),Y0($,{code:r.not_multiple_of,multipleOf:X.value,message:X.message}),q.dirty()}else R0.assertNever(X);return{status:q.value,value:Q.data}}_getInvalidInput(Q){let J=this._getOrReturnCtx(Q);return Y0(J,{code:r.invalid_type,expected:J0.bigint,received:J.parsedType}),F0}gte(Q,J){return this.setLimit("min",Q,!0,V0.toString(J))}gt(Q,J){return this.setLimit("min",Q,!1,V0.toString(J))}lte(Q,J){return this.setLimit("max",Q,!0,V0.toString(J))}lt(Q,J){return this.setLimit("max",Q,!1,V0.toString(J))}setLimit(Q,J,$,q){return new O1({...this._def,checks:[...this._def.checks,{kind:Q,value:J,inclusive:$,message:V0.toString(q)}]})}_addCheck(Q){return new O1({...this._def,checks:[...this._def.checks,Q]})}positive(Q){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:V0.toString(Q)})}negative(Q){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:V0.toString(Q)})}nonpositive(Q){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:V0.toString(Q)})}nonnegative(Q){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:V0.toString(Q)})}multipleOf(Q,J){return this._addCheck({kind:"multipleOf",value:Q,message:V0.toString(J)})}get minValue(){let Q=null;for(let J of this._def.checks)if(J.kind==="min"){if(Q===null||J.value>Q)Q=J.value}return Q}get maxValue(){let Q=null;for(let J of this._def.checks)if(J.kind==="max"){if(Q===null||J.value<Q)Q=J.value}return Q}}O1.create=(Q)=>{return new O1({checks:[],typeName:z0.ZodBigInt,coerce:Q?.coerce??!1,...O0(Q)})};class E6 extends P0{_parse(Q){if(this._def.coerce)Q.data=Boolean(Q.data);if(this._getType(Q)!==J0.boolean){let $=this._getOrReturnCtx(Q);return Y0($,{code:r.invalid_type,expected:J0.boolean,received:$.parsedType}),F0}return n0(Q.data)}}E6.create=(Q)=>{return new E6({typeName:z0.ZodBoolean,coerce:Q?.coerce||!1,...O0(Q)})};class r1 extends P0{_parse(Q){if(this._def.coerce)Q.data=new Date(Q.data);if(this._getType(Q)!==J0.date){let X=this._getOrReturnCtx(Q);return Y0(X,{code:r.invalid_type,expected:J0.date,received:X.parsedType}),F0}if(Number.isNaN(Q.data.getTime())){let X=this._getOrReturnCtx(Q);return Y0(X,{code:r.invalid_date}),F0}let $=new c0,q=void 0;for(let X of this._def.checks)if(X.kind==="min"){if(Q.data.getTime()<X.value)q=this._getOrReturnCtx(Q,q),Y0(q,{code:r.too_small,message:X.message,inclusive:!0,exact:!1,minimum:X.value,type:"date"}),$.dirty()}else if(X.kind==="max"){if(Q.data.getTime()>X.value)q=this._getOrReturnCtx(Q,q),Y0(q,{code:r.too_big,message:X.message,inclusive:!0,exact:!1,maximum:X.value,type:"date"}),$.dirty()}else R0.assertNever(X);return{status:$.value,value:new Date(Q.data.getTime())}}_addCheck(Q){return new r1({...this._def,checks:[...this._def.checks,Q]})}min(Q,J){return this._addCheck({kind:"min",value:Q.getTime(),message:V0.toString(J)})}max(Q,J){return this._addCheck({kind:"max",value:Q.getTime(),message:V0.toString(J)})}get minDate(){let Q=null;for(let J of this._def.checks)if(J.kind==="min"){if(Q===null||J.value>Q)Q=J.value}return Q!=null?new Date(Q):null}get maxDate(){let Q=null;for(let J of this._def.checks)if(J.kind==="max"){if(Q===null||J.value<Q)Q=J.value}return Q!=null?new Date(Q):null}}r1.create=(Q)=>{return new r1({checks:[],coerce:Q?.coerce||!1,typeName:z0.ZodDate,...O0(Q)})};class S8 extends P0{_parse(Q){if(this._getType(Q)!==J0.symbol){let $=this._getOrReturnCtx(Q);return Y0($,{code:r.invalid_type,expected:J0.symbol,received:$.parsedType}),F0}return n0(Q.data)}}S8.create=(Q)=>{return new S8({typeName:z0.ZodSymbol,...O0(Q)})};class k6 extends P0{_parse(Q){if(this._getType(Q)!==J0.undefined){let $=this._getOrReturnCtx(Q);return Y0($,{code:r.invalid_type,expected:J0.undefined,received:$.parsedType}),F0}return n0(Q.data)}}k6.create=(Q)=>{return new k6({typeName:z0.ZodUndefined,...O0(Q)})};class T6 extends P0{_parse(Q){if(this._getType(Q)!==J0.null){let $=this._getOrReturnCtx(Q);return Y0($,{code:r.invalid_type,expected:J0.null,received:$.parsedType}),F0}return n0(Q.data)}}T6.create=(Q)=>{return new T6({typeName:z0.ZodNull,...O0(Q)})};class a1 extends P0{constructor(){super(...arguments);this._any=!0}_parse(Q){return n0(Q.data)}}a1.create=(Q)=>{return new a1({typeName:z0.ZodAny,...O0(Q)})};class D1 extends P0{constructor(){super(...arguments);this._unknown=!0}_parse(Q){return n0(Q.data)}}D1.create=(Q)=>{return new D1({typeName:z0.ZodUnknown,...O0(Q)})};class y2 extends P0{_parse(Q){let J=this._getOrReturnCtx(Q);return Y0(J,{code:r.invalid_type,expected:J0.never,received:J.parsedType}),F0}}y2.create=(Q)=>{return new y2({typeName:z0.ZodNever,...O0(Q)})};class Z8 extends P0{_parse(Q){if(this._getType(Q)!==J0.undefined){let $=this._getOrReturnCtx(Q);return Y0($,{code:r.invalid_type,expected:J0.void,received:$.parsedType}),F0}return n0(Q.data)}}Z8.create=(Q)=>{return new Z8({typeName:z0.ZodVoid,...O0(Q)})};class O2 extends P0{_parse(Q){let{ctx:J,status:$}=this._processInputParams(Q),q=this._def;if(J.parsedType!==J0.array)return Y0(J,{code:r.invalid_type,expected:J0.array,received:J.parsedType}),F0;if(q.exactLength!==null){let Y=J.data.length>q.exactLength.value,W=J.data.length<q.exactLength.value;if(Y||W)Y0(J,{code:Y?r.too_big:r.too_small,minimum:W?q.exactLength.value:void 0,maximum:Y?q.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:q.exactLength.message}),$.dirty()}if(q.minLength!==null){if(J.data.length<q.minLength.value)Y0(J,{code:r.too_small,minimum:q.minLength.value,type:"array",inclusive:!0,exact:!1,message:q.minLength.message}),$.dirty()}if(q.maxLength!==null){if(J.data.length>q.maxLength.value)Y0(J,{code:r.too_big,maximum:q.maxLength.value,type:"array",inclusive:!0,exact:!1,message:q.maxLength.message}),$.dirty()}if(J.common.async)return Promise.all([...J.data].map((Y,W)=>{return q.type._parseAsync(new A2(J,Y,J.path,W))})).then((Y)=>{return c0.mergeArray($,Y)});let X=[...J.data].map((Y,W)=>{return q.type._parseSync(new A2(J,Y,J.path,W))});return c0.mergeArray($,X)}get element(){return this._def.type}min(Q,J){return new O2({...this._def,minLength:{value:Q,message:V0.toString(J)}})}max(Q,J){return new O2({...this._def,maxLength:{value:Q,message:V0.toString(J)}})}length(Q,J){return new O2({...this._def,exactLength:{value:Q,message:V0.toString(J)}})}nonempty(Q){return this.min(1,Q)}}O2.create=(Q,J)=>{return new O2({type:Q,minLength:null,maxLength:null,exactLength:null,typeName:z0.ZodArray,...O0(J)})};function Z6(Q){if(Q instanceof g0){let J={};for(let $ in Q.shape){let q=Q.shape[$];J[$]=P2.create(Z6(q))}return new g0({...Q._def,shape:()=>J})}else if(Q instanceof O2)return new O2({...Q._def,type:Z6(Q.element)});else if(Q instanceof P2)return P2.create(Z6(Q.unwrap()));else if(Q instanceof J1)return J1.create(Z6(Q.unwrap()));else if(Q instanceof h2)return h2.create(Q.items.map((J)=>Z6(J)));else return Q}class g0 extends P0{constructor(){super(...arguments);this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let Q=this._def.shape(),J=R0.objectKeys(Q);return this._cached={shape:Q,keys:J},this._cached}_parse(Q){if(this._getType(Q)!==J0.object){let G=this._getOrReturnCtx(Q);return Y0(G,{code:r.invalid_type,expected:J0.object,received:G.parsedType}),F0}let{status:$,ctx:q}=this._processInputParams(Q),{shape:X,keys:Y}=this._getCached(),W=[];if(!(this._def.catchall instanceof y2&&this._def.unknownKeys==="strip")){for(let G in q.data)if(!Y.includes(G))W.push(G)}let U=[];for(let G of Y){let B=X[G],K=q.data[G];U.push({key:{status:"valid",value:G},value:B._parse(new A2(q,K,q.path,G)),alwaysSet:G in q.data})}if(this._def.catchall instanceof y2){let G=this._def.unknownKeys;if(G==="passthrough")for(let B of W)U.push({key:{status:"valid",value:B},value:{status:"valid",value:q.data[B]}});else if(G==="strict"){if(W.length>0)Y0(q,{code:r.unrecognized_keys,keys:W}),$.dirty()}else if(G==="strip");else throw Error("Internal ZodObject error: invalid unknownKeys value.")}else{let G=this._def.catchall;for(let B of W){let K=q.data[B];U.push({key:{status:"valid",value:B},value:G._parse(new A2(q,K,q.path,B)),alwaysSet:B in q.data})}}if(q.common.async)return Promise.resolve().then(async()=>{let G=[];for(let B of U){let K=await B.key,j=await B.value;G.push({key:K,value:j,alwaysSet:B.alwaysSet})}return G}).then((G)=>{return c0.mergeObjectSync($,G)});else return c0.mergeObjectSync($,U)}get shape(){return this._def.shape()}strict(Q){return V0.errToObj,new g0({...this._def,unknownKeys:"strict",...Q!==void 0?{errorMap:(J,$)=>{let q=this._def.errorMap?.(J,$).message??$.defaultError;if(J.code==="unrecognized_keys")return{message:V0.errToObj(Q).message??q};return{message:q}}}:{}})}strip(){return new g0({...this._def,unknownKeys:"strip"})}passthrough(){return new g0({...this._def,unknownKeys:"passthrough"})}extend(Q){return new g0({...this._def,shape:()=>({...this._def.shape(),...Q})})}merge(Q){return new g0({unknownKeys:Q._def.unknownKeys,catchall:Q._def.catchall,shape:()=>({...this._def.shape(),...Q._def.shape()}),typeName:z0.ZodObject})}setKey(Q,J){return this.augment({[Q]:J})}catchall(Q){return new g0({...this._def,catchall:Q})}pick(Q){let J={};for(let $ of R0.objectKeys(Q))if(Q[$]&&this.shape[$])J[$]=this.shape[$];return new g0({...this._def,shape:()=>J})}omit(Q){let J={};for(let $ of R0.objectKeys(this.shape))if(!Q[$])J[$]=this.shape[$];return new g0({...this._def,shape:()=>J})}deepPartial(){return Z6(this)}partial(Q){let J={};for(let $ of R0.objectKeys(this.shape)){let q=this.shape[$];if(Q&&!Q[$])J[$]=q;else J[$]=q.optional()}return new g0({...this._def,shape:()=>J})}required(Q){let J={};for(let $ of R0.objectKeys(this.shape))if(Q&&!Q[$])J[$]=this.shape[$];else{let X=this.shape[$];while(X instanceof P2)X=X._def.innerType;J[$]=X}return new g0({...this._def,shape:()=>J})}keyof(){return aX(R0.objectKeys(this.shape))}}g0.create=(Q,J)=>{return new g0({shape:()=>Q,unknownKeys:"strip",catchall:y2.create(),typeName:z0.ZodObject,...O0(J)})};g0.strictCreate=(Q,J)=>{return new g0({shape:()=>Q,unknownKeys:"strict",catchall:y2.create(),typeName:z0.ZodObject,...O0(J)})};g0.lazycreate=(Q,J)=>{return new g0({shape:Q,unknownKeys:"strip",catchall:y2.create(),typeName:z0.ZodObject,...O0(J)})};class x6 extends P0{_parse(Q){let{ctx:J}=this._processInputParams(Q),$=this._def.options;function q(X){for(let W of X)if(W.result.status==="valid")return W.result;for(let W of X)if(W.result.status==="dirty")return J.common.issues.push(...W.ctx.common.issues),W.result;let Y=X.map((W)=>new J2(W.ctx.common.issues));return Y0(J,{code:r.invalid_union,unionErrors:Y}),F0}if(J.common.async)return Promise.all($.map(async(X)=>{let Y={...J,common:{...J.common,issues:[]},parent:null};return{result:await X._parseAsync({data:J.data,path:J.path,parent:Y}),ctx:Y}})).then(q);else{let X=void 0,Y=[];for(let U of $){let G={...J,common:{...J.common,issues:[]},parent:null},B=U._parseSync({data:J.data,path:J.path,parent:G});if(B.status==="valid")return B;else if(B.status==="dirty"&&!X)X={result:B,ctx:G};if(G.common.issues.length)Y.push(G.common.issues)}if(X)return J.common.issues.push(...X.ctx.common.issues),X.result;let W=Y.map((U)=>new J2(U));return Y0(J,{code:r.invalid_union,unionErrors:W}),F0}}get options(){return this._def.options}}x6.create=(Q,J)=>{return new x6({options:Q,typeName:z0.ZodUnion,...O0(J)})};var Q1=(Q)=>{if(Q instanceof _6)return Q1(Q.schema);else if(Q instanceof R2)return Q1(Q.innerType());else if(Q instanceof f6)return[Q.value];else if(Q instanceof P1)return Q.options;else if(Q instanceof y6)return R0.objectValues(Q.enum);else if(Q instanceof h6)return Q1(Q._def.innerType);else if(Q instanceof k6)return[void 0];else if(Q instanceof T6)return[null];else if(Q instanceof P2)return[void 0,...Q1(Q.unwrap())];else if(Q instanceof J1)return[null,...Q1(Q.unwrap())];else if(Q instanceof f5)return Q1(Q.unwrap());else if(Q instanceof m6)return Q1(Q.unwrap());else if(Q instanceof b6)return Q1(Q._def.innerType);else return[]};class _5 extends P0{_parse(Q){let{ctx:J}=this._processInputParams(Q);if(J.parsedType!==J0.object)return Y0(J,{code:r.invalid_type,expected:J0.object,received:J.parsedType}),F0;let $=this.discriminator,q=J.data[$],X=this.optionsMap.get(q);if(!X)return Y0(J,{code:r.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[$]}),F0;if(J.common.async)return X._parseAsync({data:J.data,path:J.path,parent:J});else return X._parseSync({data:J.data,path:J.path,parent:J})}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(Q,J,$){let q=new Map;for(let X of J){let Y=Q1(X.shape[Q]);if(!Y.length)throw Error(`A discriminator value for key \`${Q}\` could not be extracted from all schema options`);for(let W of Y){if(q.has(W))throw Error(`Discriminator property ${String(Q)} has duplicate value ${String(W)}`);q.set(W,X)}}return new _5({typeName:z0.ZodDiscriminatedUnion,discriminator:Q,options:J,optionsMap:q,...O0($)})}}function YQ(Q,J){let $=f2(Q),q=f2(J);if(Q===J)return{valid:!0,data:Q};else if($===J0.object&&q===J0.object){let X=R0.objectKeys(J),Y=R0.objectKeys(Q).filter((U)=>X.indexOf(U)!==-1),W={...Q,...J};for(let U of Y){let G=YQ(Q[U],J[U]);if(!G.valid)return{valid:!1};W[U]=G.data}return{valid:!0,data:W}}else if($===J0.array&&q===J0.array){if(Q.length!==J.length)return{valid:!1};let X=[];for(let Y=0;Y<Q.length;Y++){let W=Q[Y],U=J[Y],G=YQ(W,U);if(!G.valid)return{valid:!1};X.push(G.data)}return{valid:!0,data:X}}else if($===J0.date&&q===J0.date&&+Q===+J)return{valid:!0,data:Q};else return{valid:!1}}class g6 extends P0{_parse(Q){let{status:J,ctx:$}=this._processInputParams(Q),q=(X,Y)=>{if(x5(X)||x5(Y))return F0;let W=YQ(X.value,Y.value);if(!W.valid)return Y0($,{code:r.invalid_intersection_types}),F0;if(g5(X)||g5(Y))J.dirty();return{status:J.value,value:W.data}};if($.common.async)return Promise.all([this._def.left._parseAsync({data:$.data,path:$.path,parent:$}),this._def.right._parseAsync({data:$.data,path:$.path,parent:$})]).then(([X,Y])=>q(X,Y));else return q(this._def.left._parseSync({data:$.data,path:$.path,parent:$}),this._def.right._parseSync({data:$.data,path:$.path,parent:$}))}}g6.create=(Q,J,$)=>{return new g6({left:Q,right:J,typeName:z0.ZodIntersection,...O0($)})};class h2 extends P0{_parse(Q){let{status:J,ctx:$}=this._processInputParams(Q);if($.parsedType!==J0.array)return Y0($,{code:r.invalid_type,expected:J0.array,received:$.parsedType}),F0;if($.data.length<this._def.items.length)return Y0($,{code:r.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),F0;if(!this._def.rest&&$.data.length>this._def.items.length)Y0($,{code:r.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),J.dirty();let X=[...$.data].map((Y,W)=>{let U=this._def.items[W]||this._def.rest;if(!U)return null;return U._parse(new A2($,Y,$.path,W))}).filter((Y)=>!!Y);if($.common.async)return Promise.all(X).then((Y)=>{return c0.mergeArray(J,Y)});else return c0.mergeArray(J,X)}get items(){return this._def.items}rest(Q){return new h2({...this._def,rest:Q})}}h2.create=(Q,J)=>{if(!Array.isArray(Q))throw Error("You must pass an array of schemas to z.tuple([ ... ])");return new h2({items:Q,typeName:z0.ZodTuple,rest:null,...O0(J)})};class v8 extends P0{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(Q){let{status:J,ctx:$}=this._processInputParams(Q);if($.parsedType!==J0.object)return Y0($,{code:r.invalid_type,expected:J0.object,received:$.parsedType}),F0;let q=[],X=this._def.keyType,Y=this._def.valueType;for(let W in $.data)q.push({key:X._parse(new A2($,W,$.path,W)),value:Y._parse(new A2($,$.data[W],$.path,W)),alwaysSet:W in $.data});if($.common.async)return c0.mergeObjectAsync(J,q);else return c0.mergeObjectSync(J,q)}get element(){return this._def.valueType}static create(Q,J,$){if(J instanceof P0)return new v8({keyType:Q,valueType:J,typeName:z0.ZodRecord,...O0($)});return new v8({keyType:C2.create(),valueType:Q,typeName:z0.ZodRecord,...O0(J)})}}class E8 extends P0{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(Q){let{status:J,ctx:$}=this._processInputParams(Q);if($.parsedType!==J0.map)return Y0($,{code:r.invalid_type,expected:J0.map,received:$.parsedType}),F0;let q=this._def.keyType,X=this._def.valueType,Y=[...$.data.entries()].map(([W,U],G)=>{return{key:q._parse(new A2($,W,$.path,[G,"key"])),value:X._parse(new A2($,U,$.path,[G,"value"]))}});if($.common.async){let W=new Map;return Promise.resolve().then(async()=>{for(let U of Y){let G=await U.key,B=await U.value;if(G.status==="aborted"||B.status==="aborted")return F0;if(G.status==="dirty"||B.status==="dirty")J.dirty();W.set(G.value,B.value)}return{status:J.value,value:W}})}else{let W=new Map;for(let U of Y){let{key:G,value:B}=U;if(G.status==="aborted"||B.status==="aborted")return F0;if(G.status==="dirty"||B.status==="dirty")J.dirty();W.set(G.value,B.value)}return{status:J.value,value:W}}}}E8.create=(Q,J,$)=>{return new E8({valueType:J,keyType:Q,typeName:z0.ZodMap,...O0($)})};class s1 extends P0{_parse(Q){let{status:J,ctx:$}=this._processInputParams(Q);if($.parsedType!==J0.set)return Y0($,{code:r.invalid_type,expected:J0.set,received:$.parsedType}),F0;let q=this._def;if(q.minSize!==null){if($.data.size<q.minSize.value)Y0($,{code:r.too_small,minimum:q.minSize.value,type:"set",inclusive:!0,exact:!1,message:q.minSize.message}),J.dirty()}if(q.maxSize!==null){if($.data.size>q.maxSize.value)Y0($,{code:r.too_big,maximum:q.maxSize.value,type:"set",inclusive:!0,exact:!1,message:q.maxSize.message}),J.dirty()}let X=this._def.valueType;function Y(U){let G=new Set;for(let B of U){if(B.status==="aborted")return F0;if(B.status==="dirty")J.dirty();G.add(B.value)}return{status:J.value,value:G}}let W=[...$.data.values()].map((U,G)=>X._parse(new A2($,U,$.path,G)));if($.common.async)return Promise.all(W).then((U)=>Y(U));else return Y(W)}min(Q,J){return new s1({...this._def,minSize:{value:Q,message:V0.toString(J)}})}max(Q,J){return new s1({...this._def,maxSize:{value:Q,message:V0.toString(J)}})}size(Q,J){return this.min(Q,J).max(Q,J)}nonempty(Q){return this.min(1,Q)}}s1.create=(Q,J)=>{return new s1({valueType:Q,minSize:null,maxSize:null,typeName:z0.ZodSet,...O0(J)})};class v6 extends P0{constructor(){super(...arguments);this.validate=this.implement}_parse(Q){let{ctx:J}=this._processInputParams(Q);if(J.parsedType!==J0.function)return Y0(J,{code:r.invalid_type,expected:J0.function,received:J.parsedType}),F0;function $(W,U){return I8({data:W,path:J.path,errorMaps:[J.common.contextualErrorMap,J.schemaErrorMap,I6(),e2].filter((G)=>!!G),issueData:{code:r.invalid_arguments,argumentsError:U}})}function q(W,U){return I8({data:W,path:J.path,errorMaps:[J.common.contextualErrorMap,J.schemaErrorMap,I6(),e2].filter((G)=>!!G),issueData:{code:r.invalid_return_type,returnTypeError:U}})}let X={errorMap:J.common.contextualErrorMap},Y=J.data;if(this._def.returns instanceof t1){let W=this;return n0(async function(...U){let G=new J2([]),B=await W._def.args.parseAsync(U,X).catch((F)=>{throw G.addIssue($(U,F)),G}),K=await Reflect.apply(Y,this,B);return await W._def.returns._def.type.parseAsync(K,X).catch((F)=>{throw G.addIssue(q(K,F)),G})})}else{let W=this;return n0(function(...U){let G=W._def.args.safeParse(U,X);if(!G.success)throw new J2([$(U,G.error)]);let B=Reflect.apply(Y,this,G.data),K=W._def.returns.safeParse(B,X);if(!K.success)throw new J2([q(B,K.error)]);return K.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...Q){return new v6({...this._def,args:h2.create(Q).rest(D1.create())})}returns(Q){return new v6({...this._def,returns:Q})}implement(Q){return this.parse(Q)}strictImplement(Q){return this.parse(Q)}static create(Q,J,$){return new v6({args:Q?Q:h2.create([]).rest(D1.create()),returns:J||D1.create(),typeName:z0.ZodFunction,...O0($)})}}class _6 extends P0{get schema(){return this._def.getter()}_parse(Q){let{ctx:J}=this._processInputParams(Q);return this._def.getter()._parse({data:J.data,path:J.path,parent:J})}}_6.create=(Q,J)=>{return new _6({getter:Q,typeName:z0.ZodLazy,...O0(J)})};class f6 extends P0{_parse(Q){if(Q.data!==this._def.value){let J=this._getOrReturnCtx(Q);return Y0(J,{received:J.data,code:r.invalid_literal,expected:this._def.value}),F0}return{status:"valid",value:Q.data}}get value(){return this._def.value}}f6.create=(Q,J)=>{return new f6({value:Q,typeName:z0.ZodLiteral,...O0(J)})};function aX(Q,J){return new P1({values:Q,typeName:z0.ZodEnum,...O0(J)})}class P1 extends P0{_parse(Q){if(typeof Q.data!=="string"){let J=this._getOrReturnCtx(Q),$=this._def.values;return Y0(J,{expected:R0.joinValues($),received:J.parsedType,code:r.invalid_type}),F0}if(!this._cache)this._cache=new Set(this._def.values);if(!this._cache.has(Q.data)){let J=this._getOrReturnCtx(Q),$=this._def.values;return Y0(J,{received:J.data,code:r.invalid_enum_value,options:$}),F0}return n0(Q.data)}get options(){return this._def.values}get enum(){let Q={};for(let J of this._def.values)Q[J]=J;return Q}get Values(){let Q={};for(let J of this._def.values)Q[J]=J;return Q}get Enum(){let Q={};for(let J of this._def.values)Q[J]=J;return Q}extract(Q,J=this._def){return P1.create(Q,{...this._def,...J})}exclude(Q,J=this._def){return P1.create(this.options.filter(($)=>!Q.includes($)),{...this._def,...J})}}P1.create=aX;class y6 extends P0{_parse(Q){let J=R0.getValidEnumValues(this._def.values),$=this._getOrReturnCtx(Q);if($.parsedType!==J0.string&&$.parsedType!==J0.number){let q=R0.objectValues(J);return Y0($,{expected:R0.joinValues(q),received:$.parsedType,code:r.invalid_type}),F0}if(!this._cache)this._cache=new Set(R0.getValidEnumValues(this._def.values));if(!this._cache.has(Q.data)){let q=R0.objectValues(J);return Y0($,{received:$.data,code:r.invalid_enum_value,options:q}),F0}return n0(Q.data)}get enum(){return this._def.values}}y6.create=(Q,J)=>{return new y6({values:Q,typeName:z0.ZodNativeEnum,...O0(J)})};class t1 extends P0{unwrap(){return this._def.type}_parse(Q){let{ctx:J}=this._processInputParams(Q);if(J.parsedType!==J0.promise&&J.common.async===!1)return Y0(J,{code:r.invalid_type,expected:J0.promise,received:J.parsedType}),F0;let $=J.parsedType===J0.promise?J.data:Promise.resolve(J.data);return n0($.then((q)=>{return this._def.type.parseAsync(q,{path:J.path,errorMap:J.common.contextualErrorMap})}))}}t1.create=(Q,J)=>{return new t1({type:Q,typeName:z0.ZodPromise,...O0(J)})};class R2 extends P0{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===z0.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(Q){let{status:J,ctx:$}=this._processInputParams(Q),q=this._def.effect||null,X={addIssue:(Y)=>{if(Y0($,Y),Y.fatal)J.abort();else J.dirty()},get path(){return $.path}};if(X.addIssue=X.addIssue.bind(X),q.type==="preprocess"){let Y=q.transform($.data,X);if($.common.async)return Promise.resolve(Y).then(async(W)=>{if(J.value==="aborted")return F0;let U=await this._def.schema._parseAsync({data:W,path:$.path,parent:$});if(U.status==="aborted")return F0;if(U.status==="dirty")return o1(U.value);if(J.value==="dirty")return o1(U.value);return U});else{if(J.value==="aborted")return F0;let W=this._def.schema._parseSync({data:Y,path:$.path,parent:$});if(W.status==="aborted")return F0;if(W.status==="dirty")return o1(W.value);if(J.value==="dirty")return o1(W.value);return W}}if(q.type==="refinement"){let Y=(W)=>{let U=q.refinement(W,X);if($.common.async)return Promise.resolve(U);if(U instanceof Promise)throw Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return W};if($.common.async===!1){let W=this._def.schema._parseSync({data:$.data,path:$.path,parent:$});if(W.status==="aborted")return F0;if(W.status==="dirty")J.dirty();return Y(W.value),{status:J.value,value:W.value}}else return this._def.schema._parseAsync({data:$.data,path:$.path,parent:$}).then((W)=>{if(W.status==="aborted")return F0;if(W.status==="dirty")J.dirty();return Y(W.value).then(()=>{return{status:J.value,value:W.value}})})}if(q.type==="transform")if($.common.async===!1){let Y=this._def.schema._parseSync({data:$.data,path:$.path,parent:$});if(!N1(Y))return F0;let W=q.transform(Y.value,X);if(W instanceof Promise)throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:J.value,value:W}}else return this._def.schema._parseAsync({data:$.data,path:$.path,parent:$}).then((Y)=>{if(!N1(Y))return F0;return Promise.resolve(q.transform(Y.value,X)).then((W)=>({status:J.value,value:W}))});R0.assertNever(q)}}R2.create=(Q,J,$)=>{return new R2({schema:Q,typeName:z0.ZodEffects,effect:J,...O0($)})};R2.createWithPreprocess=(Q,J,$)=>{return new R2({schema:J,effect:{type:"preprocess",transform:Q},typeName:z0.ZodEffects,...O0($)})};class P2 extends P0{_parse(Q){if(this._getType(Q)===J0.undefined)return n0(void 0);return this._def.innerType._parse(Q)}unwrap(){return this._def.innerType}}P2.create=(Q,J)=>{return new P2({innerType:Q,typeName:z0.ZodOptional,...O0(J)})};class J1 extends P0{_parse(Q){if(this._getType(Q)===J0.null)return n0(null);return this._def.innerType._parse(Q)}unwrap(){return this._def.innerType}}J1.create=(Q,J)=>{return new J1({innerType:Q,typeName:z0.ZodNullable,...O0(J)})};class h6 extends P0{_parse(Q){let{ctx:J}=this._processInputParams(Q),$=J.data;if(J.parsedType===J0.undefined)$=this._def.defaultValue();return this._def.innerType._parse({data:$,path:J.path,parent:J})}removeDefault(){return this._def.innerType}}h6.create=(Q,J)=>{return new h6({innerType:Q,typeName:z0.ZodDefault,defaultValue:typeof J.default==="function"?J.default:()=>J.default,...O0(J)})};class b6 extends P0{_parse(Q){let{ctx:J}=this._processInputParams(Q),$={...J,common:{...J.common,issues:[]}},q=this._def.innerType._parse({data:$.data,path:$.path,parent:{...$}});if(S6(q))return q.then((X)=>{return{status:"valid",value:X.status==="valid"?X.value:this._def.catchValue({get error(){return new J2($.common.issues)},input:$.data})}});else return{status:"valid",value:q.status==="valid"?q.value:this._def.catchValue({get error(){return new J2($.common.issues)},input:$.data})}}removeCatch(){return this._def.innerType}}b6.create=(Q,J)=>{return new b6({innerType:Q,typeName:z0.ZodCatch,catchValue:typeof J.catch==="function"?J.catch:()=>J.catch,...O0(J)})};class k8 extends P0{_parse(Q){if(this._getType(Q)!==J0.nan){let $=this._getOrReturnCtx(Q);return Y0($,{code:r.invalid_type,expected:J0.nan,received:$.parsedType}),F0}return{status:"valid",value:Q.data}}}k8.create=(Q)=>{return new k8({typeName:z0.ZodNaN,...O0(Q)})};var UF=Symbol("zod_brand");class f5 extends P0{_parse(Q){let{ctx:J}=this._processInputParams(Q),$=J.data;return this._def.type._parse({data:$,path:J.path,parent:J})}unwrap(){return this._def.type}}class T8 extends P0{_parse(Q){let{status:J,ctx:$}=this._processInputParams(Q);if($.common.async)return(async()=>{let X=await this._def.in._parseAsync({data:$.data,path:$.path,parent:$});if(X.status==="aborted")return F0;if(X.status==="dirty")return J.dirty(),o1(X.value);else return this._def.out._parseAsync({data:X.value,path:$.path,parent:$})})();else{let q=this._def.in._parseSync({data:$.data,path:$.path,parent:$});if(q.status==="aborted")return F0;if(q.status==="dirty")return J.dirty(),{status:"dirty",value:q.value};else return this._def.out._parseSync({data:q.value,path:$.path,parent:$})}}static create(Q,J){return new T8({in:Q,out:J,typeName:z0.ZodPipeline})}}class m6 extends P0{_parse(Q){let J=this._def.innerType._parse(Q),$=(q)=>{if(N1(q))q.value=Object.freeze(q.value);return q};return S6(J)?J.then((q)=>$(q)):$(J)}unwrap(){return this._def.innerType}}m6.create=(Q,J)=>{return new m6({innerType:Q,typeName:z0.ZodReadonly,...O0(J)})};function iX(Q,J){let $=typeof Q==="function"?Q(J):typeof Q==="string"?{message:Q}:Q;return typeof $==="string"?{message:$}:$}function sX(Q,J={},$){if(Q)return a1.create().superRefine((q,X)=>{let Y=Q(q);if(Y instanceof Promise)return Y.then((W)=>{if(!W){let U=iX(J,q),G=U.fatal??$??!0;X.addIssue({code:"custom",...U,fatal:G})}});if(!Y){let W=iX(J,q),U=W.fatal??$??!0;X.addIssue({code:"custom",...W,fatal:U})}return});return a1.create()}var GF={object:g0.lazycreate},z0;(function(Q){Q.ZodString="ZodString",Q.ZodNumber="ZodNumber",Q.ZodNaN="ZodNaN",Q.ZodBigInt="ZodBigInt",Q.ZodBoolean="ZodBoolean",Q.ZodDate="ZodDate",Q.ZodSymbol="ZodSymbol",Q.ZodUndefined="ZodUndefined",Q.ZodNull="ZodNull",Q.ZodAny="ZodAny",Q.ZodUnknown="ZodUnknown",Q.ZodNever="ZodNever",Q.ZodVoid="ZodVoid",Q.ZodArray="ZodArray",Q.ZodObject="ZodObject",Q.ZodUnion="ZodUnion",Q.ZodDiscriminatedUnion="ZodDiscriminatedUnion",Q.ZodIntersection="ZodIntersection",Q.ZodTuple="ZodTuple",Q.ZodRecord="ZodRecord",Q.ZodMap="ZodMap",Q.ZodSet="ZodSet",Q.ZodFunction="ZodFunction",Q.ZodLazy="ZodLazy",Q.ZodLiteral="ZodLiteral",Q.ZodEnum="ZodEnum",Q.ZodEffects="ZodEffects",Q.ZodNativeEnum="ZodNativeEnum",Q.ZodOptional="ZodOptional",Q.ZodNullable="ZodNullable",Q.ZodDefault="ZodDefault",Q.ZodCatch="ZodCatch",Q.ZodPromise="ZodPromise",Q.ZodBranded="ZodBranded",Q.ZodPipeline="ZodPipeline",Q.ZodReadonly="ZodReadonly"})(z0||(z0={}));var BF=(Q,J={message:`Input not instance of ${Q.name}`})=>sX(($)=>$ instanceof Q,J),tX=C2.create,eX=C1.create,KF=k8.create,VF=O1.create,QY=E6.create,HF=r1.create,jF=S8.create,MF=k6.create,FF=T6.create,zF=a1.create,LF=D1.create,NF=y2.create,DF=Z8.create,CF=O2.create,OF=g0.create,PF=g0.strictCreate,AF=x6.create,RF=_5.create,wF=g6.create,IF=h2.create,SF=v8.create,ZF=E8.create,vF=s1.create,EF=v6.create,kF=_6.create,TF=f6.create,xF=P1.create,gF=y6.create,_F=t1.create,fF=R2.create,yF=P2.create,hF=J1.create,bF=R2.createWithPreprocess,mF=T8.create,uF=()=>tX().optional(),cF=()=>eX().optional(),pF=()=>QY().optional(),lF={string:(Q)=>C2.create({...Q,coerce:!0}),number:(Q)=>C1.create({...Q,coerce:!0}),boolean:(Q)=>E6.create({...Q,coerce:!0}),bigint:(Q)=>O1.create({...Q,coerce:!0}),date:(Q)=>r1.create({...Q,coerce:!0})};var dF=F0;class Y2 extends Error{field;regex;constructor(Q,J,$){super($);this.field=Q,this.regex=J}}class x8 extends Error{hash;constructor(Q){super(`'${Q}' not found in the root hash`);this.hash=Q}}class WQ extends Map{#J;#Q=0;constructor(Q,J=[]){super();this.#J=Q;for(let[$,q]of J)this.set($,q)}get(Q){let J=super.get(Q);if(J!==void 0)super.delete(Q),super.set(Q,J);return J}set(Q,J){let $=super.get(Q);if($===void 0)this.#Q+=Q.length;else if($!==null)this.#Q-=$.byteLength;if(J!==null)this.#Q+=J.byteLength;super.delete(Q);let q;while(this.#Q>this.#J&&(q=this.entries().next().value)){let[X,Y]=q;if(super.delete(X),this.#Q-=X.length,Y!==null)this.#Q-=Y.byteLength}return super.set(Q,J),this}delete(Q){let J=super.get(Q);if(J===void 0)return!1;if(super.delete(Q),J!==null)this.#Q-=J.byteLength;return this.#Q-=Q.length,!0}clear(){super.clear(),this.#Q=0}}var UI=X1(fU(),1),GI=X1(pU(),1),BI=X1(MG(),1),KI=X1(DG(),1),VI=X1(vG(),1),HI=X1(kG(),1),sG=X1(xG(),1);var VO={0:"brush",12:"brush",1:"pencil",14:"pencil",2:"ballpoint",15:"ballpoint",3:"marker",16:"marker",4:"fineliner",17:"fineliner",5:"highlighter",18:"highlighter",6:"eraser",7:"mechanicalPencil",13:"mechanicalPencil",8:"eraseArea",21:"calligraphy",23:"shader"};function HO(Q){return VO[Q]}var jO={0:"black",1:"gray",2:"white"},w1=43,U4="reMarkable .lines file, version=";function gG(Q,J){let $=new DataView(Q.buffer,Q.byteOffset,Q.byteLength),q=w1,X=()=>{let G=$.getInt32(q,!0);return q+=4,G},Y=()=>{let G=$.getFloat32(q,!0);return q+=4,G},W=X(),U=[];for(let G=0;G<W;G++){let B=X(),K=[];for(let j=0;j<B;j++){let F=X(),H=X(),E=X(),g=Y(),P=J===5?X():void 0,D=X(),V=Array(D);for(let L=0;L<D;L++)V[L]={x:Y(),y:Y(),speed:Y(),direction:Y(),width:Y(),pressure:Y()};let z={brushType:F,color:H,padding:E,brushBaseSize:g,points:V};if(P!==void 0)z.unknown=P;K.push(z)}U.push({lines:K})}return{version:J,layers:U}}function _G(Q){let{version:J}=Q;if(J!==3&&J!==5)throw Error(`rendering version ${J} .lines files is not supported (only 3 and 5)`);let $=J===5?24:20,q=w1+4;for(let K of Q.layers){q+=4;for(let j of K.lines)q+=$+j.points.length*24}let X=new Uint8Array(q),Y=new DataView(X.buffer),W=`${U4}${J}`.padEnd(w1," ");for(let K=0;K<w1;K++)X[K]=W.charCodeAt(K);let U=w1,G=(K)=>{Y.setInt32(U,K,!0),U+=4},B=(K)=>{Y.setFloat32(U,K,!0),U+=4};G(Q.layers.length);for(let K of Q.layers){G(K.lines.length);for(let j of K.lines){if(G(j.brushType),G(j.color),G(j.padding??0),B(j.brushBaseSize),J===5)G(j.unknown??0);G(j.points.length);for(let F of j.points)B(F.x),B(F.y),B(F.speed),B(F.direction),B(F.width),B(F.pressure)}}return X}var fG={authorId:0,counter:1},hG={authorId:0,counter:0};function o0(Q){return`${Q.authorId}:${Q.counter}`}var KJ=43,bG="reMarkable .lines file, version=6",B4=1,m2=4,mG=8,I1=12,K4=15;class uG{#J;#Q;#$;#q=[];constructor(Q,J){this.#J=new DataView(Q.buffer,Q.byteOffset,Q.byteLength),this.#Q=J,this.#$=Q.byteLength}get offset(){return this.#Q}get atFileEnd(){return this.#Q>=this.#$}#Y(){return this.#q.length>0?this.#q[this.#q.length-1]:this.#$}bytesRemaining(){return this.#Y()-this.#Q}u8(){let Q=this.#J.getUint8(this.#Q);return this.#Q+=1,Q}u16(){let Q=this.#J.getUint16(this.#Q,!0);return this.#Q+=2,Q}u32(){let Q=this.#J.getUint32(this.#Q,!0);return this.#Q+=4,Q}f32(){let Q=this.#J.getFloat32(this.#Q,!0);return this.#Q+=4,Q}f64(){let Q=this.#J.getFloat64(this.#Q,!0);return this.#Q+=8,Q}varuint(){let Q=0,J=0,$;do $=this.u8(),Q+=($&127)*2**J,J+=7;while($&128);return Q}crdtId(){return{authorId:this.u8(),counter:this.varuint()}}bytes(Q){let J=this.#J.byteOffset+this.#Q,$=new Uint8Array(this.#J.buffer,J,Q);return this.#Q+=Q,$.slice()}peekTag(){if(this.#Q>=this.#Y())return;let Q=this.#Q,J=this.varuint();return this.#Q=Q,[Math.floor(J/16),J%16]}hasTag(Q,J){let $=this.peekTag();return $!==void 0&&$[0]===Q&&$[1]===J}#W(Q,J){let $=this.varuint();if(Math.floor($/16)!==Q||$%16!==J)throw Error(`unexpected v6 tag ${$} (wanted ${Q}/${J})`)}readInt(Q){return this.#W(Q,m2),this.u32()}readFloat(Q){return this.#W(Q,m2),this.f32()}readDouble(Q){return this.#W(Q,mG),this.f64()}readId(Q){return this.#W(Q,K4),this.crdtId()}readBool(Q){return this.#W(Q,B4),this.u8()!==0}readByte(Q){return this.#W(Q,B4),this.u8()}subblock(Q,J){this.#W(Q,I1);let $=this.u32(),q=this.#Q+$;this.#q.push(q);try{let X=J();if(this.#Q!==q)throw Error(`subblock ${Q} left ${q-this.#Q} bytes unread`);return X}finally{this.#q.pop(),this.#Q=q}}seek(Q){this.#Q=Q}bounded(Q,J){this.#q.push(Q);try{let $=J();if(this.#Q>Q)throw Error("block body overran its declared length");return[$,this.bytes(Q-this.#Q)]}finally{this.#q.pop(),this.#Q=Q}}readLww(Q,J){return this.subblock(Q,()=>{let $=this.readId(1),q=J();return{timestamp:$,value:q}})}readString(Q){return this.subblock(Q,()=>{let J=this.varuint();return this.u8(),new TextDecoder().decode(this.bytes(J))})}readStringWithFormat(Q){return this.subblock(Q,()=>{let J=this.varuint();this.u8();let $=new TextDecoder().decode(this.bytes(J));if(this.hasTag(2,m2))return this.readInt(2);else return $})}}class cG{#J=new Uint8Array(4096);#Q=new DataView(this.#J.buffer);#$=0;#q(Q){if(this.#$+Q<=this.#J.length)return;let J=this.#J.length;while(J<this.#$+Q)J*=2;let $=new Uint8Array(J);$.set(this.#J),this.#J=$,this.#Q=new DataView($.buffer)}get length(){return this.#$}u8(Q){this.#q(1),this.#Q.setUint8(this.#$,Q),this.#$+=1}u16(Q){this.#q(2),this.#Q.setUint16(this.#$,Q,!0),this.#$+=2}u32(Q){this.#q(4),this.#Q.setUint32(this.#$,Q,!0),this.#$+=4}f32(Q){this.#q(4),this.#Q.setFloat32(this.#$,Q,!0),this.#$+=4}f64(Q){this.#q(8),this.#Q.setFloat64(this.#$,Q,!0),this.#$+=8}varuint(Q){let J=Q;do{let $=J%128;if(J=Math.floor(J/128),J>0)$|=128;this.u8($)}while(J>0)}crdtId(Q){this.u8(Q.authorId),this.varuint(Q.counter)}bytes(Q){this.#q(Q.length),this.#J.set(Q,this.#$),this.#$+=Q.length}patchU32(Q,J){this.#Q.setUint32(Q,J,!0)}finish(){return this.#J.slice(0,this.#$)}tag(Q,J){this.varuint(Q*16+J)}writeInt(Q,J){this.tag(Q,m2),this.u32(J)}writeFloat(Q,J){this.tag(Q,m2),this.f32(J)}writeDouble(Q,J){this.tag(Q,mG),this.f64(J)}writeId(Q,J){this.tag(Q,K4),this.crdtId(J)}writeBool(Q,J){this.tag(Q,B4),this.u8(J?1:0)}writeByte(Q,J){this.tag(Q,B4),this.u8(J)}subblock(Q,J){this.tag(Q,I1);let $=this.length;this.u32(0),J(),this.patchU32($,this.length-$-4)}writeLww(Q,J,$){this.subblock(Q,()=>{this.writeId(1,J.timestamp),$(J.value)})}writeString(Q,J){this.subblock(Q,()=>{let $=new TextEncoder().encode(J);this.varuint($.length),this.u8(1),this.bytes($)})}}function u8(Q,J){let $=Q.readId(1),q=Q.readId(2),X=Q.readId(3),Y=Q.readId(4),W=Q.readInt(5),U;if(Q.hasTag(6,I1))U=Q.subblock(6,()=>{let G=Q.u8();return J(G)});return{parentId:$,item:{itemId:q,leftId:X,rightId:Y,deletedLength:W,value:U}}}function MO(Q,J){let $=Q.readInt(1),q=Q.readInt(2),X=Q.readDouble(3),Y=Q.readFloat(4),W=Q.subblock(5,()=>{let G=J===1?24:14,B=Q.bytesRemaining(),K=Math.floor(B/G),j=Array(K);for(let F=0;F<K;F++){let H=Q.f32(),E=Q.f32();if(J===1)j[F]={x:H,y:E,speed:Q.f32()*4,direction:Q.f32()*255/(2*Math.PI),width:Q.f32()*4,pressure:Q.f32()*255};else{let g=Q.u16(),P=Q.u16(),D=Q.u8(),V=Q.u8();j[F]={x:H,y:E,speed:g,width:P,direction:D,pressure:V}}}return j}),U={tool:$,color:q,thicknessScale:X,startingLength:Y,points:W};if(Q.hasTag(6,K4))U.timestampId=Q.readId(6);if(Q.hasTag(7,K4))U.moveId=Q.readId(7);if(Q.hasTag(8,m2))U.colorRgba=Q.readInt(8);return U}function FO(Q){let J=Q.hasTag(2,m2)?Q.readInt(2):void 0,$=Q.hasTag(3,m2)?Q.readInt(3):void 0,q=Q.readInt(4),X=Q.readString(5),Y=Q.subblock(6,()=>{let U=Q.varuint(),G=Array(U);for(let B=0;B<U;B++)G[B]={x:Q.f64(),y:Q.f64(),w:Q.f64(),h:Q.f64()};return G}),W={length:$??X.length,color:q,text:X,rectangles:Y};if(J!==void 0)W.start=J;if(Q.hasTag(10,m2))W.colorRgba=Q.readInt(10);return W}function zO(Q){let J=[],$=new Map;Q.subblock(2,()=>{Q.subblock(1,()=>{Q.subblock(1,()=>{let W=Q.varuint();for(let U=0;U<W;U++)J.push(Q.subblock(0,()=>{let G=Q.readId(2),B=Q.readId(3),K=Q.readId(4),j=Q.readInt(5),F=Q.hasTag(6,I1)?Q.readStringWithFormat(6):"";return{itemId:G,leftId:B,rightId:K,deletedLength:j,value:F}}))})}),Q.subblock(2,()=>{Q.subblock(1,()=>{let W=Q.varuint();for(let U=0;U<W;U++){let G=Q.crdtId(),B=Q.readId(1),K=Q.subblock(2,()=>{return Q.u8(),Q.u8()});$.set(o0(G),{timestamp:B,value:K})}})})});let[q,X]=Q.subblock(3,()=>[Q.f64(),Q.f64()]),Y=Q.readFloat(4);return{items:J,styles:$,posX:q,posY:X,width:Y}}function LO(Q,J,$){switch(J){case 0:return{type:"migrationInfo",migrationId:Q.readId(1),isDevice:Q.readBool(2)};case 1:return{type:"sceneTree",treeId:Q.readId(1),nodeId:Q.readId(2),isUpdate:Q.readBool(3),parentId:Q.subblock(4,()=>Q.readId(1))};case 2:{let q=Q.readId(1),X=Q.readLww(2,()=>Q.readString(2)),Y=Q.readLww(3,()=>Q.readBool(2)),W={type:"treeNode",nodeId:q,label:X,visible:Y};if(Q.bytesRemaining()>0&&Q.hasTag(7,I1))W.anchor={id:Q.readLww(7,()=>Q.readId(2)),type:Q.readLww(8,()=>Q.readByte(2)),threshold:Q.readLww(9,()=>Q.readFloat(2)),originX:Q.readLww(10,()=>Q.readFloat(2))};return W}case 3:return{type:"sceneGlyphItem",...u8(Q,(q)=>q===1?FO(Q):void 0)};case 4:return{type:"sceneGroupItem",...u8(Q,(q)=>q===2?Q.readId(2):void 0)};case 5:return{type:"sceneLineItem",...u8(Q,(q)=>q===3?MO(Q,$):void 0)};case 6:return{type:"sceneTextItem",...u8(Q,()=>{return})};case 7:return{type:"rootText",blockId:Q.readId(1),text:zO(Q)};case 8:return{type:"sceneTombstone",...u8(Q,()=>{return})};case 9:{let q=new Map,X=Q.varuint();for(let Y=0;Y<X;Y++)Q.subblock(0,()=>{let W=Q.varuint(),U=Q.bytes(W),G=Q.u16();q.set(G,DO(U))});return{type:"authorIds",authors:q}}case 10:{let q={type:"pageInfo",loadsCount:Q.readInt(1),mergesCount:Q.readInt(2),textCharsCount:Q.readInt(3),textLinesCount:Q.readInt(4)};if(Q.hasTag(5,m2))q.typeFolioUseCount=Q.readInt(5);return q}case 13:{let q={type:"sceneInfo",currentLayer:Q.readLww(1,()=>Q.readId(2))};if(Q.hasTag(2,I1))q.backgroundVisible=Q.readLww(2,()=>Q.readBool(2));if(Q.hasTag(3,I1))q.rootDocumentVisible=Q.readLww(3,()=>Q.readBool(2));if(Q.hasTag(5,I1))q.paperSize=Q.subblock(5,()=>[Q.u32(),Q.u32()]);return q}default:throw Error(`unknown v6 block type 0x${J.toString(16)}`)}}var NO=[3,2,1,0,5,4,7,6,8,9,10,11,12,13,14,15];function pG(Q){let J=new Uint8Array(16);for(let $=0;$<16;$++)J[$]=Q[NO[$]]??0;return J}function DO(Q){let J=pG(Q).toHex();return`${J.slice(0,8)}-${J.slice(8,12)}-${J.slice(12,16)}-${J.slice(16,20)}-${J.slice(20)}`}function CO(Q){let J=new TextDecoder().decode(Q.subarray(0,KJ));if(!J.startsWith(bG))throw Error(`not a version 6 .lines file: ${JSON.stringify(J)}`);let $=new uG(Q,KJ),q=[];while(!$.atFileEnd){if($.bytesRemaining()<8)break;let X=$.u32(),Y=$.u8(),W=$.u8(),U=$.u8(),G=$.u8(),B=$.offset;if(X>$.bytesRemaining()){q.push({type:"unknown",blockType:G,data:$.bytes($.bytesRemaining()),declaredLength:X,reserved:Y,minVersion:W,currentVersion:U,extraData:new Uint8Array});break}let K=B+X,j;try{let[F,H]=$.bounded(K,()=>LO($,G,U));j={...F,reserved:Y,minVersion:W,currentVersion:U,extraData:H}}catch{$.seek(B),j={type:"unknown",blockType:G,data:$.bytes(X),reserved:Y,minVersion:W,currentVersion:U,extraData:new Uint8Array}}$.seek(K),q.push(j)}return q}function OO(Q,J){let[$,q]=Q,[X,Y]=J;return $-X||q-Y}function yG(Q){if(Q.length<=1)return[...Q];let J="\x00start",$="\x00end",q=new Set(Q.map((H)=>o0(H.itemId))),X=new Map([[J,[]],[$,[]]]),Y=new Map([[J,0],[$,0]]);for(let H of Q)X.set(o0(H.itemId),[]),Y.set(o0(H.itemId),0);let W=(H,E)=>{let g=o0(H);return g===o0(hG)||!q.has(g)?E:g},U=(H,E)=>{X.get(H).push(E),Y.set(E,(Y.get(E)??0)+1)};for(let H of Q)U(W(H.leftId,J),o0(H.itemId)),U(o0(H.itemId),W(H.rightId,$));let G=new Map(Q.map((H)=>[o0(H.itemId),H])),B=(H)=>{if(H===J)return[-1/0,-1/0];if(H===$)return[1/0,1/0];let E=G.get(H);return[-E.itemId.authorId,E.itemId.counter]},K=new Set;for(let[H,E]of Y)if(E===0)K.add(H);let j=[],F=new Set;while(K.size>0){let H;for(let g of K)if(H===void 0||OO(B(g),B(H))<0)H=g;K.delete(H),F.add(H);let E=G.get(H);if(E)j.push(E);for(let g of X.get(H)??[])if(Y.set(g,Y.get(g)-1),Y.get(g)===0)K.add(g)}if(j.length<Q.length){for(let H of Q)if(!F.has(o0(H.itemId)))j.push(H)}return j}class lG{version=6;blocks;authors;paperSize;#J=new Map;#Q;constructor(Q){this.blocks=Q,this.authors=new Map;let J=($)=>{let q=this.#J.get(o0($));if(q===void 0)q={id:$,parentId:hG,children:[]},this.#J.set(o0($),q);return q};J(fG);for(let $ of Q)if($.type==="sceneTree")J($.treeId).parentId=$.parentId;else if($.type==="treeNode"){let q=J($.nodeId);q.label=$.label.value,q.visible=$.visible.value}else if($.type==="sceneGroupItem"&&$.item.value)J($.parentId).children.push({...$.item,value:{kind:"group",id:$.item.value}});else if($.type==="sceneLineItem"&&$.item.value)J($.parentId).children.push({...$.item,value:{kind:"line",line:$.item.value}});else if($.type==="sceneGlyphItem"&&$.item.value)J($.parentId).children.push({...$.item,value:{kind:"glyph",glyph:$.item.value}});else if($.type==="rootText")this.#Q=$.text;else if($.type==="authorIds")for(let[q,X]of $.authors)this.authors.set(q,X);else if($.type==="sceneInfo"&&$.paperSize)this.paperSize=$.paperSize}#$(Q){let J=[];for(let q of yG(Q.children))if(q.value.kind==="group"){let X=this.#J.get(o0(q.value.id));if(X)J.push({kind:"layer",layer:this.#$(X)})}else if(q.value.kind==="line")J.push({kind:"line",line:q.value.line});else J.push({kind:"glyph",glyph:q.value.glyph});let $={id:Q.id,items:J};if(Q.label!==void 0)$.label=Q.label;if(Q.visible!==void 0)$.visible=Q.visible;return $}layers(){let Q=this.#J.get(o0(fG));if(Q===void 0)return[];let J=[];for(let $ of yG(Q.children))if($.value.kind==="group"){let q=this.#J.get(o0($.value.id));if(q)J.push(this.#$(q))}return J}strokes(){let Q=[],J=($)=>{for(let q of $.items)if(q.kind==="line")Q.push(q.line);else if(q.kind==="layer")J(q.layer)};for(let $ of this.layers())J($);return Q}text(){return this.#Q}}function G4(Q,J,$,q,X){Q.writeId(1,J),Q.writeId(2,$.itemId),Q.writeId(3,$.leftId),Q.writeId(4,$.rightId),Q.writeInt(5,$.deletedLength);let{value:Y}=$;if(Y!==void 0)Q.subblock(6,()=>{Q.u8(q),X(Y)})}function PO(Q,J,$){if(Q.writeInt(1,J.tool),Q.writeInt(2,J.color),Q.writeDouble(3,J.thicknessScale),Q.writeFloat(4,J.startingLength),Q.subblock(5,()=>{for(let q of J.points)if(Q.f32(q.x),Q.f32(q.y),$===1)Q.f32(q.speed/4),Q.f32(q.direction*2*Math.PI/255),Q.f32(q.width/4),Q.f32(q.pressure/255);else Q.u16(q.speed),Q.u16(q.width),Q.u8(q.direction),Q.u8(q.pressure)}),J.timestampId!==void 0)Q.writeId(6,J.timestampId);if(J.moveId!==void 0)Q.writeId(7,J.moveId);if(J.colorRgba!==void 0)Q.writeInt(8,J.colorRgba)}function AO(Q,J){if(J.start!==void 0)Q.writeInt(2,J.start);if(Q.writeInt(3,J.length),Q.writeInt(4,J.color),Q.writeString(5,J.text),Q.subblock(6,()=>{Q.varuint(J.rectangles.length);for(let $ of J.rectangles)Q.f64($.x),Q.f64($.y),Q.f64($.w),Q.f64($.h)}),J.colorRgba!==void 0)Q.writeInt(10,J.colorRgba)}function RO(Q,J){Q.subblock(2,()=>{Q.subblock(1,()=>{Q.subblock(1,()=>{Q.varuint(J.items.length);for(let $ of J.items)Q.subblock(0,()=>{Q.writeId(2,$.itemId),Q.writeId(3,$.leftId),Q.writeId(4,$.rightId),Q.writeInt(5,$.deletedLength);let{value:q}=$;if(q!==""&&q!==void 0)Q.subblock(6,()=>{if(typeof q==="number")Q.varuint(0),Q.u8(1),Q.writeInt(2,q);else{let X=new TextEncoder().encode(q);Q.varuint(X.length),Q.u8(1),Q.bytes(X)}})})})}),Q.subblock(2,()=>{Q.subblock(1,()=>{Q.varuint(J.styles.size);for(let[$,q]of J.styles){let[X,Y]=$.split(":");Q.crdtId({authorId:Number(X),counter:Number(Y)}),Q.writeId(1,q.timestamp),Q.subblock(2,()=>{Q.u8(17),Q.u8(q.value)})}})})}),Q.subblock(3,()=>{Q.f64(J.posX),Q.f64(J.posY)}),Q.writeFloat(4,J.width)}function wO(Q){return pG(Uint8Array.fromHex(Q.replaceAll("-","")))}var IO={migrationInfo:0,sceneTree:1,treeNode:2,sceneGlyphItem:3,sceneGroupItem:4,sceneLineItem:5,sceneTextItem:6,rootText:7,sceneTombstone:8,authorIds:9,pageInfo:10,sceneInfo:13};function SO(Q,J){switch(J.type){case"migrationInfo":Q.writeId(1,J.migrationId),Q.writeBool(2,J.isDevice);break;case"sceneTree":Q.writeId(1,J.treeId),Q.writeId(2,J.nodeId),Q.writeBool(3,J.isUpdate),Q.subblock(4,()=>Q.writeId(1,J.parentId));break;case"treeNode":if(Q.writeId(1,J.nodeId),Q.writeLww(2,J.label,($)=>Q.writeString(2,$)),Q.writeLww(3,J.visible,($)=>Q.writeBool(2,$)),J.anchor!==void 0){let{id:$,type:q,threshold:X,originX:Y}=J.anchor;Q.writeLww(7,$,(W)=>Q.writeId(2,W)),Q.writeLww(8,q,(W)=>Q.writeByte(2,W)),Q.writeLww(9,X,(W)=>Q.writeFloat(2,W)),Q.writeLww(10,Y,(W)=>Q.writeFloat(2,W))}break;case"sceneGlyphItem":G4(Q,J.parentId,J.item,1,($)=>AO(Q,$));break;case"sceneGroupItem":G4(Q,J.parentId,J.item,2,($)=>Q.writeId(2,$));break;case"sceneLineItem":G4(Q,J.parentId,J.item,3,($)=>PO(Q,$,J.currentVersion));break;case"sceneTextItem":case"sceneTombstone":G4(Q,J.parentId,J.item,0,()=>{return});break;case"rootText":Q.writeId(1,J.blockId),RO(Q,J.text);break;case"authorIds":Q.varuint(J.authors.size);for(let[$,q]of J.authors)Q.subblock(0,()=>{let X=wO(q);Q.varuint(X.length),Q.bytes(X),Q.u16($)});break;case"pageInfo":if(Q.writeInt(1,J.loadsCount),Q.writeInt(2,J.mergesCount),Q.writeInt(3,J.textCharsCount),Q.writeInt(4,J.textLinesCount),J.typeFolioUseCount!==void 0)Q.writeInt(5,J.typeFolioUseCount);break;case"sceneInfo":if(Q.writeLww(1,J.currentLayer,($)=>Q.writeId(2,$)),J.backgroundVisible!==void 0)Q.writeLww(2,J.backgroundVisible,($)=>Q.writeBool(2,$));if(J.rootDocumentVisible!==void 0)Q.writeLww(3,J.rootDocumentVisible,($)=>Q.writeBool(2,$));if(J.paperSize!==void 0)Q.subblock(5,()=>{Q.u32(J.paperSize[0]),Q.u32(J.paperSize[1])});break;case"unknown":Q.bytes(J.data);break}}function dG(Q){let J=new cG,$=bG.padEnd(KJ," ");J.bytes(new TextEncoder().encode($));for(let q of Q.blocks){let X=J.length;J.u32(0),J.u8(q.reserved),J.u8(q.minVersion),J.u8(q.currentVersion),J.u8(q.type==="unknown"?q.blockType:IO[q.type]);let Y=J.length;if(SO(J,q),q.type!=="unknown")J.bytes(q.extraData);J.patchU32(X,q.type==="unknown"&&q.declaredLength!==void 0?q.declaredLength:J.length-Y)}return J.finish()}function iG(Q){return new lG(CO(Q))}function nG(Q){let J=Q.reduce((X,Y)=>X+Y.length,0),$=new Uint8Array(J),q=0;for(let X of Q)$.set(X,q),q+=X.length;return $}var V4=/^[0-9a-f]{64}$/,H4=2,j4="t",M4="b";function ZO(Q){if(Q.length<w1)throw Error("data is too short to be a reMarkable .lines file");let J=new TextDecoder().decode(Q.subarray(0,w1));if(!J.startsWith(U4))throw Error(`unrecognized .lines header: ${JSON.stringify(J)}`);let $=J.charAt(U4.length);if($==="6")return iG(Q);else if($==="3"||$==="5")return gG(Q,$==="3"?3:5);else throw Error(`unsupported .lines version '${$}'`)}function vO(Q){return Q.version===6?dG(Q):_G(Q)}var tG=Z.object({name:Z.string(),timestamp:Z.number()}).passthrough(),EO=Z.object({name:Z.string(),pageId:Z.string(),timestamp:Z.number()}).passthrough(),kO=Z.object({authors:Z.array(Z.string()).optional(),title:Z.string().optional(),publicationDate:Z.string().optional(),publisher:Z.string().optional()}).passthrough(),TO=Z.object({id:Z.string(),idx:Z.object({timestamp:Z.string(),value:Z.string()}).passthrough(),template:Z.object({timestamp:Z.string(),value:Z.string()}).passthrough().optional(),redir:Z.object({timestamp:Z.string(),value:Z.number().int()}).passthrough().optional(),scrollTime:Z.object({timestamp:Z.string(),value:Z.string().datetime({offset:!0})}).passthrough().optional(),verticalScroll:Z.object({timestamp:Z.string(),value:Z.number()}).passthrough().optional(),deleted:Z.object({timestamp:Z.string(),value:Z.number().int()}).passthrough().optional(),modifed:Z.string().optional()}).passthrough(),xO=Z.object({lastOpened:Z.object({timestamp:Z.string(),value:Z.string()}).passthrough(),original:Z.object({timestamp:Z.string(),value:Z.number().int()}).passthrough(),pages:Z.array(TO),uuids:Z.array(Z.object({first:Z.string(),second:Z.number().int().nonnegative()}).passthrough()).nullable()}).passthrough(),gO=Z.object({tags:Z.array(tG).optional()}).strict(),_O=Z.object({tags:Z.array(Z.string()).optional()}).strict(),fO={coverPageNumber:Z.number().int(),documentMetadata:kO,extraMetadata:Z.record(Z.string(),Z.string()),fileType:Z.enum(["epub","notebook","pdf"]),fontName:Z.string(),lineHeight:Z.number().int(),orientation:Z.enum(["portrait","landscape"]),pageCount:Z.number().int().nonnegative(),textAlignment:Z.enum(["","justify","left"]),textScale:Z.number()},yO={cPages:xO.optional(),customZoomCenterX:Z.number().optional(),customZoomCenterY:Z.number().optional(),customZoomOrientation:Z.enum(["portrait","landscape"]).optional(),customZoomPageHeight:Z.number().optional(),customZoomPageWidth:Z.number().optional(),customZoomScale:Z.number().optional(),dummyDocument:Z.boolean().optional(),formatVersion:Z.number().int().nonnegative().optional(),keyboardMetadata:Z.object({count:Z.number().int().nonnegative(),timestamp:Z.number()}).passthrough().optional(),lastOpenedPage:Z.number().int().optional(),margins:Z.number().int().nonnegative().optional(),originalPageCount:Z.number().int().optional(),pages:Z.array(Z.string()).nullable().optional(),pageTags:Z.array(EO).optional(),redirectionPageMap:Z.array(Z.number().int()).optional(),sizeInBytes:Z.string().optional(),transform:Z.object({m11:Z.number().optional(),m12:Z.number().optional(),m13:Z.number().optional(),m21:Z.number().optional(),m22:Z.number().optional(),m23:Z.number().optional(),m31:Z.number().optional(),m32:Z.number().optional(),m33:Z.number().optional()}).passthrough().optional(),viewBackgroundFilter:Z.enum(["off","fullpage"]).optional(),zoomMode:Z.enum(["bestFit","customFit","fitToHeight","fitToWidth"]).optional()},eG=Z.object({...fO,...yO}).passthrough(),hO=eG.extend({tags:Z.array(tG).optional()}).passthrough(),bO=eG.extend({tags:Z.array(Z.string()).optional()}).passthrough(),QB=Z.object({id:Z.string().optional(),name:Z.string(),author:Z.string(),iconData:Z.string(),categories:Z.array(Z.string()),labels:Z.array(Z.string()).optional(),orientation:Z.enum(["portrait","landscape"]),templateVersion:Z.string(),supportedScreens:Z.array(Z.enum(["rm2","rmPP"])).optional(),constants:Z.array(Z.record(Z.string(),Z.union([Z.number(),Z.string()]))).optional(),items:Z.array(Z.unknown()),formatVersion:Z.number().int().nonnegative().optional()}).passthrough(),mO=Z.union([gO,_O,QB,hO,bO]),oG=/\.highlights\/[^/]+\.json$/,uO=Z.object({highlights:Z.array(Z.array(Z.object({text:Z.string(),color:Z.number().int(),start:Z.number().int(),length:Z.number().int(),rects:Z.array(Z.object({x:Z.number(),y:Z.number(),width:Z.number(),height:Z.number()}).passthrough())}).passthrough()))}).passthrough(),rG=/\/[^/]+-metadata\.json$/,cO=Z.object({layers:Z.array(Z.object({name:Z.string()}).passthrough())}).passthrough(),JB=Z.object({lastModified:Z.string().optional(),parent:Z.string(),pinned:Z.boolean(),type:Z.enum(["DocumentType","CollectionType","TemplateType"]),visibleName:Z.string(),lastOpened:Z.string().optional(),lastOpenedPage:Z.number().int().optional(),createdTime:Z.string().optional(),deleted:Z.boolean().nullish(),metadatamodified:Z.boolean().nullish(),modified:Z.boolean().nullish(),synced:Z.boolean().nullish(),version:Z.number().int().nonnegative().optional(),new:Z.boolean().optional(),source:Z.string().optional()}).passthrough();function $B(Q){let J=JSON.parse(Q);return JB.parse(J)}var pO=Z.object({hash:Z.string(),generation:Z.number()}).passthrough(),lO=Z.object({hash:Z.string(),generation:Z.number(),schemaVersion:Z.number().int().nonnegative()}).passthrough(),dO=Z.object({docID:Z.string(),hash:Z.string()}).passthrough();async function VJ(Q){let J=await crypto.subtle.digest("SHA-256",Q);return new Uint8Array(J).toHex()}function aG(Q){let[J,$,q,X,Y]=Q.split(":");if(J===void 0||$===void 0||q===void 0||X===void 0||Y===void 0)throw Error(`line '${Q}' was not formatted correctly`);else if($==="80000000"||$==="0")return{hash:J,type:$==="0"?0:80000000,id:q,subfiles:parseInt(X,10),size:parseInt(Y,10)};else throw Error(`line '${Q}' was not formatted correctly`)}class HJ{#J;#Q;#$;#q;#Y;constructor(Q,J,$,q,X){this.#J=Q,this.#q=J,this.#Q=$,this.#$=q,this.#Y=X}async getRootHash(){let J=await(await this.#J("GET",`${this.#Q}/sync/v4/root`)).text(),$=JSON.parse(J),{hash:q,generation:X,schemaVersion:Y}=lO.parse($);if(Y!==3&&Y!==4)throw Error(`schema version ${Y} not supported`);else if(!Number.isSafeInteger(X))throw Error(`generation ${X} was not a safe integer; please file a bug report`);else return[q,X,Y]}async#W(Q,J){if(!V4.test(J))throw new Y2(J,V4,"hash was not a valid hash");let q=await(await this.#J("GET",`${this.#Q}/sync/v3/files/${J}`,{headers:{"rm-filename":Q}})).arrayBuffer();return new Uint8Array(q)}async getHash({id:Q,hash:J}){let $=this.#q.get(J);if($!=null)return $.slice();else{let q=await this.#W(Q,J);return this.#q.set(J,q.byteLength<=this.#Y?q.slice():null),q}}async getText(Q){return new TextDecoder().decode(await this.getHash(Q))}async getEntries({id:Q,hash:J}){let $=await this.getText({id:`${Q}.docSchema`,hash:J}),[q,...X]=$.slice(0,-1).split(`
|
|
5
|
+
`);if(q==="3")return{entries:X.map(aG)};else if(q==="4"){let[Y,...W]=X;if(!Y)throw Error("missing info line for schema version 4");let[U,G,B,K]=Y.split(":");if(U!=="0"||G===void 0||B===void 0||K===void 0)throw Error(`schema 4 info line '${Y}' was not formatted correctly`);let j=W.map(aG);if(parseInt(B,10)!==j.length)throw Error(`schema 4 expected ${B} entries, but found ${j.length}`);else return{entries:j,id:G,size:parseInt(K,10)}}else throw Error(`schema version ${q} not supported`)}async getContent(Q){let J=await this.getText(Q),$=JSON.parse(J);return mO.parse($)}async getMetadata(Q){let J=await this.getText(Q),$=JSON.parse(J);return JB.parse($)}async getRm(Q){let J=await this.getHash(Q);return ZO(J)}async getHighlights(Q){let J=await this.getText(Q),$=JSON.parse(J);return uO.parse($).highlights}async getTemplate(Q){let J=await this.getText(Q),$=JSON.parse(J);return QB.parse($)}async getPageMetadata(Q){let J=await this.getText(Q),$=JSON.parse(J);return cO.parse($)}async putRm(Q,J){if(!Q.endsWith(".rm"))throw Error(`fileName ${Q} did not end with '.rm'`);else return await this.putFile(Q,vO(J))}async putRootHash(Q,J,$=!0){if(!Number.isSafeInteger(J))throw Error(`generation ${J} was not a safe integer`);else if(!V4.test(Q))throw new Y2(Q,V4,"rootHash was not a valid hash");let q=JSON.stringify({hash:Q,generation:J,broadcast:$}),Y=await(await this.#J("PUT",`${this.#Q}/sync/v3/root`,{body:q})).text(),W=JSON.parse(Y),{hash:U,generation:G}=pO.parse(W);if(Number.isSafeInteger(G))return[U,G];else throw Error(`new generation ${G} was not a safe integer; please file a bug report`)}async#G(Q,J,$){if(!this.#q.has(J)){let q=sG.default.buf($,0),X=new ArrayBuffer(4);new DataView(X).setInt32(0,q,!1);let Y=new Uint8Array(X).toBase64();await this.#J("PUT",`${this.#Q}/sync/v3/files/${J}`,{body:$,headers:{"rm-filename":Q,"x-goog-hash":`crc32c=${Y}`}}),this.#q.set(J,$.byteLength<=this.#Y?$.slice():null)}}async putFile(Q,J){let $=await VJ(J),q=this.#G(Q,$,J);return q.catch(()=>{}),{id:Q,hash:$,type:0,subfiles:0,size:J.length,async[Symbol.asyncDispose](){await q}}}async#X(Q,J){return await this.putFile(Q,new TextEncoder().encode(J))}async putContent(Q,J){if(!Q.endsWith(".content"))throw Error(`fileName ${Q} did not end with '.content'`);else return await this.#X(Q,JSON.stringify(J))}async putPagedata(Q,J){if(!Q.endsWith(".pagedata"))throw Error(`fileName ${Q} did not end with '.pagedata'`);else return await this.#X(Q,`${J.join(`
|
|
6
|
+
`)}
|
|
7
|
+
`)}async putPageMetadata(Q,J){if(!rG.test(Q))throw new Y2(Q,rG,"fileName was not of the form '<docid>/<pageid>-metadata.json'");else return await this.#X(Q,JSON.stringify(J))}async putTemplate(Q,J){if(!Q.endsWith(".template"))throw Error(`fileName ${Q} did not end with '.template'`);else return await this.#X(Q,JSON.stringify(J))}async putMetadata(Q,J){if(!Q.endsWith(".metadata"))throw Error(`fileName ${Q} did not end with '.metadata'`);else return await this.#X(Q,JSON.stringify(J))}async putHighlights(Q,J){if(!oG.test(Q))throw new Y2(Q,oG,"fileName was not of the form '<docid>.highlights/<pageid>.json'");else return await this.#X(Q,JSON.stringify({highlights:J}))}async putEntries(Q,J,$){if(Q==="root"&&$===3)console.warn('writing a schema 3 root index, which reMarkable rejects with a 400 "Software must be updated" error; write the root index with schema version 4 instead');let q=[...J].sort((K,j)=>K.id.localeCompare(j.id)),X=q.reduce((K,j)=>K+j.size,0),Y=[`${$}
|
|
8
|
+
`];if($===4){let K=Q==="root"?".":Q;Y.push(`0:${K}:${q.length}:${X}
|
|
9
|
+
`)}for(let{hash:K,type:j,id:F,subfiles:H,size:E}of q){let g=$===4?0:j;Y.push(`${K}:${g}:${F}:${H}:${E}
|
|
10
|
+
`)}let U=new TextEncoder().encode(Y.join("")),G;if($===3){let K=[];for(let{hash:j}of q)K.push(Uint8Array.fromHex(j));G=await VJ(nG(K))}else if($===4)G=await VJ(U);else throw Error(`unsupported schema version ${$}`);let B=this.#G(`${Q}.docSchema`,G,U);return B.catch(()=>{}),{id:Q,hash:G,type:$>3?0:80000000,subfiles:q.length,size:X,async[Symbol.asyncDispose](){await B}}}async uploadFile(Q,J,$){let X=new TextEncoder().encode(JSON.stringify({file_name:Q})).toBase64(),W=await(await this.#J("POST",`${this.#$}/doc/v2/files`,{body:J,headers:{"Content-Type":$,"rm-meta":X,"rm-source":"RoR-Browser"}})).json(),{docID:U,hash:G}=dO.parse(W);return{id:U,hash:G}}dumpCache(){let Q={},J=new TextDecoder("utf-8",{fatal:!0,ignoreBOM:!0});for(let[$,q]of this.#q){if(q===null){Q[$]=null;continue}try{Q[$]=`${j4}${J.decode(q)}`}catch{Q[$]=`${M4}${q.toBase64()}`}}return JSON.stringify({version:H4,entries:Q})}clearCache(){this.#q.clear()}}var iO={RM100:{name:"reMarkable 1",width:1404,height:1872,dpi:226},RM110:{name:"reMarkable 2",width:1404,height:1872,dpi:226},RM02A:{name:"reMarkable Paper Pro",width:1620,height:2160,dpi:229},RM03A:{name:"reMarkable Paper Pro Move",width:954,height:1696,dpi:264},RM102:{name:"reMarkable Paper Pure",width:1404,height:1872,dpi:226}};var UB="https://webapp-prod.cloud.remarkable.engineering",nO="https://eu.tectonic.remarkable.com",oO="https://internal.cloud.remarkable.com",qB="",XB="trash",S1="root",YB=200,rO=25;function jJ(Q){return new Promise((J)=>{setTimeout(J,Q).unref?.()})}function MJ(Q,J){let $=Math.min(J*2**Q,30000);return Math.random()*$}class GB{#J=Promise.resolve();async lock(){let Q=this.#J,J;return this.#J=new Promise(($)=>{J=$}),await Q,{async[Symbol.asyncDispose](){J()}}}}function FJ(Q){if("cPages"in Q&&Q.cPages)return Q.cPages.pages.filter((J)=>J.deleted===void 0).map((J)=>J.id);else if("pages"in Q&&Q.pages)return Q.pages;else return[]}var u2=/^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}||trash)$/;class F4 extends Error{constructor(){super("root generation was stale; try put again")}}class LJ extends Error{status;statusText;constructor(Q,J,$){super($);this.status=Q,this.statusText=J}}async function wI(Q,{deviceDesc:J="browser-chrome",uuid:$=n1(),authHost:q=UB}={}){if(Q.length!==8)throw Error(`code should be length 8, but was ${Q.length}`);let X=await fetch(`${q}/token/json/2/device/new`,{method:"POST",headers:{Authorization:"Bearer"},body:JSON.stringify({code:Q,deviceDesc:J,deviceID:$})});if(!X.ok)throw new LJ(X.status,X.statusText,"couldn't register api");else return await X.text()}class BB{#J;#Q;raw;#$;#q;#Y;#W;#G=new GB;constructor(Q,J,$,q,X,Y,W){this.#J=Q,this.#Q=q,this.#$=X,this.#q=Y,this.raw=new HJ((U,G,{body:B,headers:K}={})=>this.#P(G,{method:U,body:B,headers:K}),q,J,$,W)}async#X(Q=!1){if(Q||this.#Y===void 0){let[J,$,q]=await this.raw.getRootHash();if(this.#Y===void 0||$>=this.#Y[1])this.#Y=[J,$],this.#W=q}return[...this.#Y,this.#W]}async#B(Q,J){try{let[$,q]=await this.raw.putRootHash(Q,J);this.#Y=[$,q]}catch($){if($ instanceof F4)this.#Y=void 0;throw $}}async#K(Q){let $=[];try{const J=_0($,await this.#G.lock(),1);for(let U=0;;U++)try{return await Q()}catch(G){if(G instanceof F4&&U<this.#$)await jJ(MJ(U,rO));else throw G}}catch(q){var X=q,Y=1}finally{var W=$2($,X,Y);W&&await W}}async#V(Q){await this.#K(async()=>{let[J,$]=await this.#X(),{entries:q}=await this.raw.getEntries({id:S1,hash:J});q.push(Q);let X;{let Y=[];try{const K=_0(Y,await this.raw.putEntries(S1,q,4),1);X=K.hash}catch(W){var U=W,G=1}finally{var B=$2(Y,U,G);B&&await B}}await this.#B(X,$)})}async#P(Q,{body:J,method:$="POST",headers:q={}}){let X=$==="PUT"&&Q.endsWith("/sync/v3/root")?0:this.#q;for(let Y=0;;Y++){let W;try{W=await fetch(Q,{method:$,headers:{Authorization:`Bearer ${this.#J}`,...q},body:J})}catch(G){if(Y<X){await jJ(MJ(Y,YB));continue}throw G}if(W.ok)return W;let U=await W.text();if(U===`{"message":"precondition failed"}
|
|
11
|
+
`)throw new F4;else if((W.status>=500||W.status===429)&&Y<X)await jJ(MJ(Y,YB));else throw new LJ(W.status,W.statusText,`failed reMarkable request: ${U}`)}}async#A(Q){let{id:J,hash:$}=Q,{entries:q}=await this.raw.getEntries(Q),X=q.find((g)=>g.id.endsWith(".metadata")),Y=q.find((g)=>g.id.endsWith(".content"));if(X===void 0)throw Error(`couldn't find metadata for hash ${$}`);let[{visibleName:W,lastModified:U,pinned:G,parent:B,lastOpened:K,createdTime:j,new:F,source:H},E]=await Promise.all([this.raw.getMetadata(X),Y===void 0?Promise.resolve({fileType:void 0,tags:void 0}):this.raw.getContent(Y)]);if("templateVersion"in E)return{id:J,hash:$,visibleName:W,lastModified:U,new:F,pinned:G,source:H,parent:B,createdTime:j,type:"TemplateType"};else if(E.fileType===void 0)return{id:J,hash:$,visibleName:W,lastModified:U,pinned:G,parent:B,tags:E.tags,type:"CollectionType"};else return{id:J,hash:$,visibleName:W,lastModified:U,pinned:G,parent:B,tags:E.tags,lastOpened:K??"",fileType:E.fileType,type:"DocumentType"}}async listItems(Q=!1){let J=await this.listRefs(Q);return await Promise.all(J.map(($)=>this.#A($)))}async listRefs(Q=!1){let[J]=await this.#X(Q),{entries:$}=await this.raw.getEntries({id:S1,hash:J});return $.map(({id:q,hash:X})=>({id:q,hash:X}))}async getContent(Q){let{hash:J}=Q,{entries:$}=await this.raw.getEntries(Q),q=$.find((X)=>X.id.endsWith(".content"));if(q===void 0)throw Error(`couldn't find contents for hash ${J}`);else return await this.raw.getContent(q)}async getMetadata(Q){let{hash:J}=Q,{entries:$}=await this.raw.getEntries(Q),q=$.find((X)=>X.id.endsWith(".metadata"));if(q===void 0)throw Error(`couldn't find metadata for hash ${J}`);else return await this.raw.getMetadata(q)}async getPdf(Q){let{hash:J}=Q,{entries:$}=await this.raw.getEntries(Q),q=$.find((X)=>X.id.endsWith(".pdf"));if(q===void 0)throw Error(`couldn't find pdf for hash ${J}`);else return await this.raw.getHash(q)}async getEpub(Q){let{hash:J}=Q,{entries:$}=await this.raw.getEntries(Q),q=$.find((X)=>X.id.endsWith(".epub"));if(q===void 0)throw Error(`couldn't find epub for hash ${J}`);else return await this.raw.getHash(q)}#H={name:(Q,J)=>`${Q}/${J}.rm`,read:(Q)=>this.raw.getRm(Q),write:(Q,J)=>this.raw.putRm(Q,J)};#j={name:(Q,J)=>`${Q}.highlights/${J}.json`,read:(Q)=>this.raw.getHighlights(Q),write:(Q,J)=>this.raw.putHighlights(Q,J)};#M={name:(Q,J)=>`${Q}/${J}-metadata.json`,read:(Q)=>this.raw.getPageMetadata(Q),write:(Q,J)=>this.raw.putPageMetadata(Q,J)};async#F(Q,J,$){let{id:q}=Q,{entries:X}=await this.raw.getEntries(Q),Y=await this.getContent(Q);if(!FJ(Y).includes(J))throw Error(`document ${q} has no page ${J}`);let W=X.find((U)=>U.id===$.name(q,J));if(W===void 0)return;else return await $.read(W)}async#z(Q,J){let{id:$}=Q,{entries:q}=await this.raw.getEntries(Q),X=await this.getContent(Q),Y=new Map(q.map((G)=>[G.id,G])),W=FJ(X).map((G)=>[G,Y.get(J.name($,G))]).filter((G)=>G[1]!==void 0),U=await Promise.all(W.map(([,G])=>J.read(G)));return new Map(W.map(([G],B)=>[G,U[B]]))}async#R(Q,J,$,q){let F=[];try{let{id:X,hash:Y}=Q;let{entries:W}=await this.raw.getEntries(Q);let U=W.find((D)=>D.id.endsWith(".content"));if(U===void 0)throw Error(`couldn't find contents for hash ${Y}`);let G=await this.raw.getContent(U);let B=new Set(FJ(G));for(let D of J.keys())if(!B.has(D))throw Error(`document ${X} has no page ${D}`);const K=_0(F,new AsyncDisposableStack,1);let j=await Promise.all([...J].map(([D,V])=>$.write($.name(X,D),V)));for(let D of j){K.use(D);let V=W.findIndex((z)=>z.id===D.id);if(V===-1)W.push(D);else W[V]=D}return await this.raw.putEntries(X,W,q)}catch(H){var E=H,g=1}finally{var P=$2(F,E,g);P&&await P}}async#L(Q,J,$,q){if(J.size===0)return Q;else return await this.#U(Q,q,(X,Y)=>this.#R(X,J,$,Y))}async getRmPage(Q,J){return await this.#F(Q,J,this.#H)}async getRmPages(Q){return await this.#z(Q,this.#H)}async putRmPage(Q,J,$,q=!1){return await this.putRmPages(Q,new Map([[J,$]]),q)}async putRmPages(Q,J,$=!1){return await this.#L(Q,J,this.#H,$)}async getHighlights(Q,J){return await this.#F(Q,J,this.#j)}async getHighlightPages(Q){return await this.#z(Q,this.#j)}async putHighlights(Q,J,$,q=!1){return await this.putHighlightPages(Q,new Map([[J,$]]),q)}async putHighlightPages(Q,J,$=!1){return await this.#L(Q,J,this.#j,$)}async getTemplate(Q){let{id:J}=Q,{entries:$}=await this.raw.getEntries(Q),q=$.find((X)=>X.id===`${J}.template`);if(q===void 0)return;else return await this.raw.getTemplate(q)}async putTemplate(Q,J,$=!1){return await this.#U(Q,$,async(q,X)=>{let B=[];try{let{id:Y}=q;let{entries:W}=await this.raw.getEntries(q);const U=_0(B,await this.raw.putTemplate(`${Y}.template`,J),1);let G=W.findIndex((E)=>E.id===U.id);if(G===-1)W.push(U);else W[G]=U;return await this.raw.putEntries(Y,W,X)}catch(K){var j=K,F=1}finally{var H=$2(B,j,F);H&&await H}})}async getPagedata(Q){let{id:J}=Q,{entries:$}=await this.raw.getEntries(Q),q=$.find((X)=>X.id===`${J}.pagedata`);if(q===void 0)return;else{let X=(await this.raw.getText(q)).split(`
|
|
12
|
+
`);if(X.at(-1)==="")X.pop();return X}}async putPagedata(Q,J,$=!1){return await this.#U(Q,$,async(q,X)=>{let B=[];try{let{id:Y}=q;let{entries:W}=await this.raw.getEntries(q);const U=_0(B,await this.raw.putPagedata(`${Y}.pagedata`,J),1);let G=W.findIndex((E)=>E.id===U.id);if(G===-1)W.push(U);else W[G]=U;return await this.raw.putEntries(Y,W,X)}catch(K){var j=K,F=1}finally{var H=$2(B,j,F);H&&await H}})}async getPageMetadata(Q,J){return await this.#F(Q,J,this.#M)}async getPageMetadataPages(Q){return await this.#z(Q,this.#M)}async putPageMetadata(Q,J,$,q=!1){return await this.putPageMetadataPages(Q,new Map([[J,$]]),q)}async putPageMetadataPages(Q,J,$=!1){return await this.#L(Q,J,this.#M,$)}async getDocumentArchive(Q){let{entries:J}=await this.raw.getEntries(Q),$=new zJ.default;for(let q of J)$.file(q.id,this.raw.getHash(q));return $.generateAsync({type:"uint8array"})}async putDocumentArchive(Q,{refresh:J=!1,parent:$,visibleName:q}={}){if($!==void 0&&$&&!u2.test($))throw new Y2($,u2,"parent must be a valid document id");let X=await zJ.default.loadAsync(Q),Y=Object.keys(X.files).filter((L)=>!X.files[L].dir),W=Y.find((L)=>L.endsWith(".metadata"));if(W===void 0)throw Error("archive did not contain a .metadata file");let U=W.slice(0,-9);if(U.includes("/"))throw Error(`unexpected nested .metadata path '${W}'`);let G=n1(),B=new TextEncoder,K=new TextDecoder,j=Date.now().toFixed(),[,,F]=await this.#X(J),H=await Promise.all(Y.map(async(L)=>{if(!L.startsWith(U))throw Error(`archived file '${L}' did not start with '${U}'`);let A=`${G}${L.slice(U.length)}`,y=await X.files[L].async("uint8array");if(L===W){let T=$B(K.decode(y));if($!==void 0)T.parent=$;if(q!==void 0)T.visibleName=q;T.lastModified=j,y=B.encode(JSON.stringify(T))}return this.raw.putFile(A,y)})),E;{let g=[];try{const L=_0(g,new AsyncDisposableStack,1);for(let y of H)L.use(y);const A=_0(g,await this.raw.putEntries(G,H,F),1);E=A}catch(P){var D=P,V=1}finally{var z=$2(g,D,V);z&&await z}}return await this.#V(E),{id:G,hash:E.hash}}async#C(Q,J,$,{refresh:q,parent:X=qB,pinned:Y=!1,zoomMode:W="bestFit",viewBackgroundFilter:U,textScale:G=1,textAlignment:B="justify",fontName:K="",coverPageNumber:j=-1,authors:F,title:H,publicationDate:E,publisher:g,extraMetadata:P={},lineHeight:D=-1,margins:V=125,orientation:z="portrait",tags:L,customZoomScale:A,customZoomCenterX:y,customZoomCenterY:T,customZoomPageWidth:d,customZoomPageHeight:S,customZoomOrientation:v}){if(X&&!u2.test(X))throw new Y2(X,u2,"parent must be a valid document id");let R=n1(),O=new Date,_={parent:X,pinned:Y,lastModified:(+O).toFixed(),createdTime:(+O).toFixed(),type:"DocumentType",visibleName:Q,lastOpened:"0",lastOpenedPage:0},h={coverPageNumber:j,documentMetadata:{authors:F,title:H,publicationDate:E,publisher:g},extraMetadata:P,lineHeight:D,margins:V,orientation:z,fileType:J,formatVersion:1,tags:L?.map((C)=>({name:C,timestamp:+O}))??[],fontName:K,textAlignment:B,textScale:G,zoomMode:W,customZoomScale:A,customZoomCenterX:y,customZoomCenterY:T,customZoomPageWidth:d,customZoomPageHeight:S,customZoomOrientation:v,viewBackgroundFilter:U,originalPageCount:1,pageCount:1,pageTags:[],pages:[n1()],redirectionPageMap:[0],sizeInBytes:$.length.toFixed()},[,,x]=await this.#X(q),a;{let $0=[];try{let C=this.raw.putContent(`${R}.content`,h);let i=this.raw.putMetadata(`${R}.metadata`,_);let W0=this.raw.putFile(`${R}.pagedata`,new TextEncoder().encode(`
|
|
13
|
+
`));let u=this.raw.putFile(`${R}.${J}`,$);const B0=_0($0,await C,1);const M0=_0($0,await i,1);const A0=_0($0,await W0,1);const N0=_0($0,await u,1);const c=_0($0,await this.raw.putEntries(R,[B0,M0,A0,N0],x),1);a=c}catch(G0){var C0=G0,p=1}finally{var H0=$2($0,C0,p);H0&&await H0}}return await this.#V(a),{id:R,hash:a.hash}}async putPdf(Q,J,$={}){return await this.#C(Q,"pdf",J,$)}async putEpub(Q,J,$={}){return await this.#C(Q,"epub",J,$)}async putFolder(Q,{parent:J=qB}={},$=!1){if(J&&!u2.test(J))throw new Y2(J,u2,"parent must be a valid document id");let q=n1(),X=new Date,Y={tags:[]},W={lastModified:(+X).toFixed(),createdTime:(+X).toFixed(),parent:J,pinned:!1,type:"CollectionType",visibleName:Q},[,,U]=await this.#X($),G;{let B=[];try{let E=this.raw.putContent(`${q}.content`,Y);let g=this.raw.putMetadata(`${q}.metadata`,W);const P=_0(B,await E,1);const D=_0(B,await g,1);const V=_0(B,await this.raw.putEntries(q,[P,D],U),1);G=V}catch(K){var j=K,F=1}finally{var H=$2(B,j,F);H&&await H}}return await this.#V(G),{id:q,hash:G.hash}}async uploadEpub(Q,J){return await this.raw.uploadFile(Q,J,"application/epub+zip")}async uploadPdf(Q,J){return await this.raw.uploadFile(Q,J,"application/pdf")}async uploadFolder(Q){return await this.raw.uploadFile(Q,new Uint8Array(0),"folder")}async#w(Q,J,$){let B=[];try{let{id:q}=Q;let{entries:X}=await this.raw.getEntries(Q);let Y=X.findIndex((E)=>E.id.endsWith(".content"));let W=X[Y];if(W===void 0)throw Error("internal error: couldn't find content in entry hash");let U=await this.raw.getContent(W);Object.assign(U,J);const G=_0(B,await this.raw.putContent(W.id,U),1);X[Y]=G;return await this.raw.putEntries(q,X,$)}catch(K){var j=K,F=1}finally{var H=$2(B,j,F);H&&await H}}async#U(Q,J,$){return await this.#K(async()=>{let[q,X,Y]=await this.#X(J),{entries:W}=await this.raw.getEntries({id:S1,hash:q}),U=W.findIndex((P)=>P.id===Q.id&&P.hash===Q.hash),G=W[U];if(G===void 0)throw new x8(Q.hash);let B,K;{let j=[];try{const P=_0(j,await $({id:G.id,hash:Q.hash},Y),1);W[U]=P;const D=_0(j,await this.raw.putEntries(S1,W,4),1);B=D.hash;K=P.hash}catch(F){var H=F,E=1}finally{var g=$2(j,H,E);g&&await g}}return await this.#B(B,X),{id:G.id,hash:K}})}async#N(Q,J,$,q){return await this.#U(Q,q,async(X,Y)=>{let[W,U]=await Promise.all([this.#w(X,J,Y),this.getMetadata(X)]);if(U.type!==$)throw Error(`expected type ${$} but got ${U.type} for hash ${X.hash}`);return W})}async updateDocument(Q,J,$=!1){return await this.#N(Q,J,"DocumentType",$)}async updateCollection(Q,J,$=!1){return await this.#N(Q,J,"CollectionType",$)}async updateTemplate(Q,J,$=!1){return await this.#N(Q,J,"TemplateType",$)}async#O(Q,J,$){let B=[];try{let{id:q}=Q;let{entries:X}=await this.raw.getEntries(Q);let Y=X.findIndex((E)=>E.id.endsWith(".metadata"));let W=X[Y];if(W===void 0)throw Error("internal error: couldn't find metadata in entry hash");let U=await this.raw.getMetadata(W);Object.assign(U,J);U.version=(U.version??0)+1;U.metadatamodified=!0;const G=_0(B,await this.raw.putMetadata(W.id,U),1);X[Y]=G;return await this.raw.putEntries(q,X,$)}catch(K){var j=K,F=1}finally{var H=$2(B,j,F);H&&await H}}async#D(Q,J,$=!1){return await this.#U(Q,$,(q,X)=>this.#O(q,J,X))}async move(Q,J,$=!1){if(!u2.test(J))throw new Y2(J,u2,"parent must be a valid document id");return await this.#D(Q,{parent:J},$)}async delete(Q,J=!1){return await this.move(Q,XB,J)}async rename(Q,J,$=!1){return await this.#D(Q,{visibleName:J},$)}async star(Q,J,$=!1){return await this.#D(Q,{pinned:J},$)}async bulkMove(Q,J,$=!1){if(!u2.test(J))throw new Y2(J,u2,"parent must be a valid document id");return await this.#K(async()=>{let[q,X,Y]=await this.#X($),{entries:W}=await this.raw.getEntries({id:S1,hash:q}),U=new Set(Q.map((z)=>`${z.id}\x00${z.hash}`)),G=new Set,B=[],K=[];for(let z of W){let L=`${z.id}\x00${z.hash}`;if(U.has(L))B.push(z),G.add(L);else K.push(z)}for(let z of Q)if(!G.has(`${z.id}\x00${z.hash}`))throw new x8(z.hash);let j=await Promise.all(B.map((z)=>this.#O(z,{parent:J},Y))),F=[];for(let[z,L]of j.entries())K.push(L),F.push({id:B[z].id,hash:L.hash});let H;{let E=[];try{const z=_0(E,new AsyncDisposableStack,1);for(let A of j)z.use(A);const L=_0(E,await this.raw.putEntries(S1,K,4),1);H=L.hash}catch(g){var P=g,D=1}finally{var V=$2(E,P,D);V&&await V}}return await this.#B(H,X),F})}async bulkDelete(Q,J=!1){return await this.bulkMove(Q,XB,J)}dumpCache(){return this.raw.dumpCache()}async pruneCache(Q){let[J]=await this.#X(Q),$=new Set(this.#Q.keys());$.delete(J);let X=[(await this.raw.getEntries({id:S1,hash:J})).entries],Y=[];while(X.length){for(let U of X)for(let G of U)if($.delete(G.hash),G.subfiles>0)Y.push(this.raw.getEntries(G));X=(await Promise.all(Y)).map((U)=>U.entries),Y=[]}for(let W of $)this.#Q.delete(W)}clearCache(){this.raw.clearCache()}}var aO=1048576,WB=Z.record(Z.string(),Z.string().nullable()),sO=Z.object({version:Z.literal(H4),entries:WB}).or(WB.transform((Q)=>({version:void 0,entries:Q})));function tO(Q){let J=sO.safeParse(Q);if(!J.success)throw Error(`cache was neither a version ${H4} dump nor the original mapping of hashes to text. Either construct the api without a cache, or fix its format.`);let{version:$,entries:q}=J.data,X=new TextEncoder;return Object.entries(q).map(([Y,W])=>{if(W===null)return[Y,null];else if($===void 0)return[Y,X.encode(W)];else if(W.startsWith(M4))return[Y,Uint8Array.fromBase64(W.slice(1))];else if(W.startsWith(j4))return[Y,X.encode(W.slice(1))];else throw Error(`cache entry ${Y} wasn't tagged '${j4}' or '${M4}'. Either construct the api without a cache, or fix its format.`)})}async function eO(Q,{authHost:J=UB}={}){let $=await fetch(`${J}/token/json/2/user/new`,{method:"POST",headers:{Authorization:`Bearer ${Q}`}});if(!$.ok)throw Error(`couldn't fetch auth token: ${$.statusText}`);return await $.text()}function QP(Q,{rawHost:J=nO,uploadHost:$=oO,cache:q,maxCacheSize:X=1/0,maxCachedBytes:Y=aO,maxGenerationRetries:W=10,maxTransientRetries:U=3}={}){let G=tO(JSON.parse(q??"{}")),B=X===1/0?new Map(G):new WQ(X,G);return new BB(Q,J,$,B,W,U,Y)}async function II(Q,J={}){let{authHost:$,...q}=J??{},X=await eO(Q,{authHost:$});return QP(X,q)}export{QP as session,jO as rmColors,II as remarkable,wI as register,iO as deviceScreens,HO as decodeBrush,o0 as crdtKey,eO as auth,Y2 as ValidationError,LJ as ResponseError,x8 as HashNotFoundError,F4 as GenerationError};
|