@volter/twin-hubspot 0.1.17 → 0.1.19

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.
@@ -243,7 +243,7 @@ You might need to use a local HTTP server (instead of file://): https://react.de
243
243
  `)}}),Cm=E$(($)=>{var _=$;_.der=cN(),_.pem=gm()}),V5=E$(($)=>{var _=$;_.bignum=Mm(),_.define=Em().define,_.base=H5(),_.constants=SN(),_.decoders=qm(),_.encoders=Cm()}),wm=E$(($,_)=>{var I=V5(),J=I.define("Time",function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})}),j=I.define("AttributeTypeValue",function(){this.seq().obj(this.key("type").objid(),this.key("value").any())}),G=I.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())}),X=I.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(G),this.key("subjectPublicKey").bitstr())}),W=I.define("RelativeDistinguishedName",function(){this.setof(j)}),T=I.define("RDNSequence",function(){this.seqof(W)}),F=I.define("Name",function(){this.choice({rdnSequence:this.use(T)})}),E=I.define("Validity",function(){this.seq().obj(this.key("notBefore").use(J),this.key("notAfter").use(J))}),D=I.define("Extension",function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())}),q=I.define("TBSCertificate",function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(G),this.key("issuer").use(F),this.key("validity").use(E),this.key("subject").use(F),this.key("subjectPublicKeyInfo").use(X),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(D).optional())}),S=I.define("X509Certificate",function(){this.seq().obj(this.key("tbsCertificate").use(q),this.key("signatureAlgorithm").use(G),this.key("signatureValue").bitstr())});_.exports=S}),Nm=E$(($)=>{var _=V5();$.certificate=wm();var I=_.define("RSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())});$.RSAPrivateKey=I;var J=_.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});$.RSAPublicKey=J;var j=_.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())}),G=_.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(j),this.key("subjectPublicKey").bitstr())});$.PublicKey=G;var X=_.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(j),this.key("subjectPrivateKey").octstr())});$.PrivateKey=X;var W=_.define("EncryptedPrivateKeyInfo",function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())});$.EncryptedPrivateKey=W;var T=_.define("DSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())});$.DSAPrivateKey=T,$.DSAparam=_.define("DSAparam",function(){this.int()});var F=_.define("ECParameters",function(){this.choice({namedCurve:this.objid()})}),E=_.define("ECPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(F),this.key("publicKey").optional().explicit(1).bitstr())});$.ECPrivateKey=E,$.signature=_.define("signature",function(){this.seq().obj(this.key("r").int(),this.key("s").int())})}),Bm=E$(($,_)=>{_.exports={"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}}),Sm=E$(($,_)=>{var I=v6().Buffer,J=E8().Transform,j=D4();function G(F){J.call(this),this._block=I.allocUnsafe(F),this._blockSize=F,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}j(G,J),G.prototype._transform=function(F,E,D){var q=null;try{this.update(F,E)}catch(S){q=S}D(q)},G.prototype._flush=function(F){var E=null;try{this.push(this.digest())}catch(D){E=D}F(E)};var X=typeof Uint8Array<"u",W=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"&&ArrayBuffer.isView&&(I.prototype instanceof Uint8Array||I.TYPED_ARRAY_SUPPORT);function T(F,E){if(F instanceof I)return F;if(typeof F==="string")return I.from(F,E);if(W&&ArrayBuffer.isView(F)){if(F.byteLength===0)return I.alloc(0);var D=I.from(F.buffer,F.byteOffset,F.byteLength);if(D.byteLength===F.byteLength)return D}if(X&&F instanceof Uint8Array)return I.from(F);if(I.isBuffer(F)&&F.constructor&&typeof F.constructor.isBuffer==="function"&&F.constructor.isBuffer(F))return I.from(F);throw TypeError('The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView.')}G.prototype.update=function(F,E){if(this._finalized)throw Error("Digest already called");F=T(F,E);var D=this._block,q=0;while(this._blockOffset+F.length-q>=this._blockSize){for(var S=this._blockOffset;S<this._blockSize;)D[S++]=F[q++];this._update(),this._blockOffset=0}while(q<F.length)D[this._blockOffset++]=F[q++];for(var k=0,y=F.length*8;y>0;++k)if(this._length[k]+=y,y=this._length[k]/4294967296|0,y>0)this._length[k]-=4294967296*y;return this},G.prototype._update=function(){throw Error("_update is not implemented")},G.prototype.digest=function(F){if(this._finalized)throw Error("Digest already called");this._finalized=!0;var E=this._digest();if(F!==void 0)E=E.toString(F);this._block.fill(0),this._blockOffset=0;for(var D=0;D<4;++D)this._length[D]=0;return E},G.prototype._digest=function(){throw Error("_digest is not implemented")},_.exports=G}),km=E$(($,_)=>{var I=D4(),J=Sm(),j=v6().Buffer,G=Array(16);function X(){J.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}I(X,J),X.prototype._update=function(){var q=G;for(var S=0;S<16;++S)q[S]=this._block.readInt32LE(S*4);var k=this._a,y=this._b,m=this._c,n=this._d;k=T(k,y,m,n,q[0],3614090360,7),n=T(n,k,y,m,q[1],3905402710,12),m=T(m,n,k,y,q[2],606105819,17),y=T(y,m,n,k,q[3],3250441966,22),k=T(k,y,m,n,q[4],4118548399,7),n=T(n,k,y,m,q[5],1200080426,12),m=T(m,n,k,y,q[6],2821735955,17),y=T(y,m,n,k,q[7],4249261313,22),k=T(k,y,m,n,q[8],1770035416,7),n=T(n,k,y,m,q[9],2336552879,12),m=T(m,n,k,y,q[10],4294925233,17),y=T(y,m,n,k,q[11],2304563134,22),k=T(k,y,m,n,q[12],1804603682,7),n=T(n,k,y,m,q[13],4254626195,12),m=T(m,n,k,y,q[14],2792965006,17),y=T(y,m,n,k,q[15],1236535329,22),k=F(k,y,m,n,q[1],4129170786,5),n=F(n,k,y,m,q[6],3225465664,9),m=F(m,n,k,y,q[11],643717713,14),y=F(y,m,n,k,q[0],3921069994,20),k=F(k,y,m,n,q[5],3593408605,5),n=F(n,k,y,m,q[10],38016083,9),m=F(m,n,k,y,q[15],3634488961,14),y=F(y,m,n,k,q[4],3889429448,20),k=F(k,y,m,n,q[9],568446438,5),n=F(n,k,y,m,q[14],3275163606,9),m=F(m,n,k,y,q[3],4107603335,14),y=F(y,m,n,k,q[8],1163531501,20),k=F(k,y,m,n,q[13],2850285829,5),n=F(n,k,y,m,q[2],4243563512,9),m=F(m,n,k,y,q[7],1735328473,14),y=F(y,m,n,k,q[12],2368359562,20),k=E(k,y,m,n,q[5],4294588738,4),n=E(n,k,y,m,q[8],2272392833,11),m=E(m,n,k,y,q[11],1839030562,16),y=E(y,m,n,k,q[14],4259657740,23),k=E(k,y,m,n,q[1],2763975236,4),n=E(n,k,y,m,q[4],1272893353,11),m=E(m,n,k,y,q[7],4139469664,16),y=E(y,m,n,k,q[10],3200236656,23),k=E(k,y,m,n,q[13],681279174,4),n=E(n,k,y,m,q[0],3936430074,11),m=E(m,n,k,y,q[3],3572445317,16),y=E(y,m,n,k,q[6],76029189,23),k=E(k,y,m,n,q[9],3654602809,4),n=E(n,k,y,m,q[12],3873151461,11),m=E(m,n,k,y,q[15],530742520,16),y=E(y,m,n,k,q[2],3299628645,23),k=D(k,y,m,n,q[0],4096336452,6),n=D(n,k,y,m,q[7],1126891415,10),m=D(m,n,k,y,q[14],2878612391,15),y=D(y,m,n,k,q[5],4237533241,21),k=D(k,y,m,n,q[12],1700485571,6),n=D(n,k,y,m,q[3],2399980690,10),m=D(m,n,k,y,q[10],4293915773,15),y=D(y,m,n,k,q[1],2240044497,21),k=D(k,y,m,n,q[8],1873313359,6),n=D(n,k,y,m,q[15],4264355552,10),m=D(m,n,k,y,q[6],2734768916,15),y=D(y,m,n,k,q[13],1309151649,21),k=D(k,y,m,n,q[4],4149444226,6),n=D(n,k,y,m,q[11],3174756917,10),m=D(m,n,k,y,q[2],718787259,15),y=D(y,m,n,k,q[9],3951481745,21),this._a=this._a+k|0,this._b=this._b+y|0,this._c=this._c+m|0,this._d=this._d+n|0},X.prototype._digest=function(){if(this._block[this._blockOffset++]=128,this._blockOffset>56)this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0;this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var q=j.allocUnsafe(16);return q.writeInt32LE(this._a,0),q.writeInt32LE(this._b,4),q.writeInt32LE(this._c,8),q.writeInt32LE(this._d,12),q};function W(q,S){return q<<S|q>>>32-S}function T(q,S,k,y,m,n,h){return W(q+(S&k|~S&y)+m+n|0,h)+S|0}function F(q,S,k,y,m,n,h){return W(q+(S&y|k&~y)+m+n|0,h)+S|0}function E(q,S,k,y,m,n,h){return W(q+(S^k^y)+m+n|0,h)+S|0}function D(q,S,k,y,m,n,h){return W(q+(k^(S|~y))+m+n|0,h)+S|0}_.exports=X}),cm=E$(($,_)=>{var I=v6().Buffer,J=km();function j(G,X,W,T){if(!I.isBuffer(G))G=I.from(G,"binary");if(X){if(!I.isBuffer(X))X=I.from(X,"binary");if(X.length!==8)throw RangeError("salt should be Buffer with 8 byte length")}var F=W/8,E=I.alloc(F),D=I.alloc(T||0),q=I.alloc(0);while(F>0||T>0){var S=new J;if(S.update(q),S.update(G),X)S.update(X);q=S.digest();var k=0;if(F>0){var y=E.length-F;k=Math.min(F,q.length),q.copy(E,y,0,k),F-=k}if(k<q.length&&T>0){var m=D.length-T,n=Math.min(T,q.length-k);q.copy(D,m,k,k+n),T-=n}}return q.fill(0),{key:E,iv:D}}_.exports=j}),xN=E$(($)=>{var _=(Mv(),X1(K4));$.createCipher=$.Cipher=_.createCipher,$.createCipheriv=$.Cipheriv=_.createCipheriv,$.createDecipher=$.Decipher=_.createDecipher,$.createDecipheriv=$.Decipheriv=_.createDecipheriv,$.listCiphers=$.getCiphers=_.getCiphers}),xm=E$(($,_)=>{var I=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m,J=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,j=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,G=cm(),X=xN(),W=v6().Buffer;_.exports=function(T,F){var E=T.toString(),D=E.match(I),q;if(!D){var S=E.match(j);q=W.from(S[2].replace(/[\r\n]/g,""),"base64")}else{var k="aes"+D[1],y=W.from(D[2],"hex"),m=W.from(D[3].replace(/[\r\n]/g,""),"base64"),n=G(F,y.slice(0,8),parseInt(D[1],10)).key,h=[],i=X.createDecipheriv(k,n,y);h.push(i.update(m)),h.push(i.final()),q=W.concat(h)}var s=E.match(J)[1];return{tag:s,data:q}}}),fN=E$(($,_)=>{var I=Nm(),J=Bm(),j=xm(),G=xN(),X=PN().pbkdf2Sync,W=v6().Buffer;function T(E,D){var q=E.algorithm.decrypt.kde.kdeparams.salt,S=parseInt(E.algorithm.decrypt.kde.kdeparams.iters.toString(),10),k=J[E.algorithm.decrypt.cipher.algo.join(".")],y=E.algorithm.decrypt.cipher.iv,m=E.subjectPrivateKey,n=parseInt(k.split("-")[1],10)/8,h=X(D,q,S,n,"sha1"),i=G.createDecipheriv(k,h,y),s=[];return s.push(i.update(m)),s.push(i.final()),W.concat(s)}function F(E){var D;if(typeof E==="object"&&!W.isBuffer(E))D=E.passphrase,E=E.key;if(typeof E==="string")E=W.from(E);var q=j(E,D),S=q.tag,k=q.data,y,m;switch(S){case"CERTIFICATE":m=I.certificate.decode(k,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":if(!m)m=I.PublicKey.decode(k,"der");switch(y=m.algorithm.algorithm.join("."),y){case"1.2.840.113549.1.1.1":return I.RSAPublicKey.decode(m.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return m.subjectPrivateKey=m.subjectPublicKey,{type:"ec",data:m};case"1.2.840.10040.4.1":return m.algorithm.params.pub_key=I.DSAparam.decode(m.subjectPublicKey.data,"der"),{type:"dsa",data:m.algorithm.params};default:throw Error("unknown key id "+y)}case"ENCRYPTED PRIVATE KEY":k=I.EncryptedPrivateKey.decode(k,"der"),k=T(k,D);case"PRIVATE KEY":switch(m=I.PrivateKey.decode(k,"der"),y=m.algorithm.algorithm.join("."),y){case"1.2.840.113549.1.1.1":return I.RSAPrivateKey.decode(m.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:m.algorithm.curve,privateKey:I.ECPrivateKey.decode(m.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return m.algorithm.params.priv_key=I.DSAparam.decode(m.subjectPrivateKey,"der"),{type:"dsa",params:m.algorithm.params};default:throw Error("unknown key id "+y)}case"RSA PUBLIC KEY":return I.RSAPublicKey.decode(k,"der");case"RSA PRIVATE KEY":return I.RSAPrivateKey.decode(k,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:I.DSAPrivateKey.decode(k,"der")};case"EC PRIVATE KEY":return k=I.ECPrivateKey.decode(k,"der"),{curve:k.parameters.value,privateKey:k.privateKey};default:throw Error("unknown key type "+S)}}F.signature=I.signature,_.exports=F}),yN=E$(($,_)=>{var I=H9(),J=v6().Buffer;_.exports=function(G,X){var W=J.alloc(0),T=0,F;while(W.length<X)F=j(T++),W=J.concat([W,I("sha1").update(G).update(F).digest()]);return W.slice(0,X)};function j(G){var X=J.allocUnsafe(4);return X.writeUInt32BE(G,0),X}}),bN=E$(($,_)=>{_.exports=function(I,J){var j=I.length,G=-1;while(++G<j)I[G]^=J[G];return I}}),JA=E$(($,_)=>{(function(I,J){function j(Y,O){if(!Y)throw Error(O||"Assertion failed")}function G(Y,O){Y.super_=O;var H=function(){};H.prototype=O.prototype,Y.prototype=new H,Y.prototype.constructor=Y}function X(Y,O,H){if(X.isBN(Y))return Y;if(this.negative=0,this.words=null,this.length=0,this.red=null,Y!==null){if(O==="le"||O==="be")H=O,O=10;this._init(Y||0,O||10,H||"be")}}if(typeof I==="object")I.exports=X;else J.BN=X;X.BN=X,X.wordSize=26;var W;try{if(typeof window<"u"&&typeof window.Buffer<"u")W=window.Buffer;else W=(j_(),X1(__)).Buffer}catch(Y){}X.isBN=function(Y){if(Y instanceof X)return!0;return Y!==null&&typeof Y==="object"&&Y.constructor.wordSize===X.wordSize&&Array.isArray(Y.words)},X.max=function(Y,O){if(Y.cmp(O)>0)return Y;return O},X.min=function(Y,O){if(Y.cmp(O)<0)return Y;return O},X.prototype._init=function(Y,O,H){if(typeof Y==="number")return this._initNumber(Y,O,H);if(typeof Y==="object")return this._initArray(Y,O,H);if(O==="hex")O=16;j(O===(O|0)&&O>=2&&O<=36),Y=Y.toString().replace(/\s+/g,"");var Z=0;if(Y[0]==="-")Z++,this.negative=1;if(Z<Y.length){if(O===16)this._parseHex(Y,Z,H);else if(this._parseBase(Y,O,Z),H==="le")this._initArray(this.toArray(),O,H)}},X.prototype._initNumber=function(Y,O,H){if(Y<0)this.negative=1,Y=-Y;if(Y<67108864)this.words=[Y&67108863],this.length=1;else if(Y<4503599627370496)this.words=[Y&67108863,Y/67108864&67108863],this.length=2;else j(Y<9007199254740992),this.words=[Y&67108863,Y/67108864&67108863,1],this.length=3;if(H!=="le")return;this._initArray(this.toArray(),O,H)},X.prototype._initArray=function(Y,O,H){if(j(typeof Y.length==="number"),Y.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(Y.length/3),this.words=Array(this.length);for(var Z=0;Z<this.length;Z++)this.words[Z]=0;var K,w,B=0;if(H==="be"){for(Z=Y.length-1,K=0;Z>=0;Z-=3)if(w=Y[Z]|Y[Z-1]<<8|Y[Z-2]<<16,this.words[K]|=w<<B&67108863,this.words[K+1]=w>>>26-B&67108863,B+=24,B>=26)B-=26,K++}else if(H==="le"){for(Z=0,K=0;Z<Y.length;Z+=3)if(w=Y[Z]|Y[Z+1]<<8|Y[Z+2]<<16,this.words[K]|=w<<B&67108863,this.words[K+1]=w>>>26-B&67108863,B+=24,B>=26)B-=26,K++}return this.strip()};function T(Y,O){var H=Y.charCodeAt(O);if(H>=65&&H<=70)return H-55;else if(H>=97&&H<=102)return H-87;else return H-48&15}function F(Y,O,H){var Z=T(Y,H);if(H-1>=O)Z|=T(Y,H-1)<<4;return Z}X.prototype._parseHex=function(Y,O,H){this.length=Math.ceil((Y.length-O)/6),this.words=Array(this.length);for(var Z=0;Z<this.length;Z++)this.words[Z]=0;var K=0,w=0,B;if(H==="be")for(Z=Y.length-1;Z>=O;Z-=2)if(B=F(Y,O,Z)<<K,this.words[w]|=B&67108863,K>=18)K-=18,w+=1,this.words[w]|=B>>>26;else K+=8;else{var P=Y.length-O;for(Z=P%2===0?O+1:O;Z<Y.length;Z+=2)if(B=F(Y,O,Z)<<K,this.words[w]|=B&67108863,K>=18)K-=18,w+=1,this.words[w]|=B>>>26;else K+=8}this.strip()};function E(Y,O,H,Z){var K=0,w=Math.min(Y.length,H);for(var B=O;B<w;B++){var P=Y.charCodeAt(B)-48;if(K*=Z,P>=49)K+=P-49+10;else if(P>=17)K+=P-17+10;else K+=P}return K}X.prototype._parseBase=function(Y,O,H){this.words=[0],this.length=1;for(var Z=0,K=1;K<=67108863;K*=O)Z++;Z--,K=K/O|0;var w=Y.length-H,B=w%Z,P=Math.min(w,w-B)+H,z=0;for(var A=H;A<P;A+=Z)if(z=E(Y,A,A+Z,O),this.imuln(K),this.words[0]+z<67108864)this.words[0]+=z;else this._iaddn(z);if(B!==0){var f=1;z=E(Y,A,Y.length,O);for(A=0;A<B;A++)f*=O;if(this.imuln(f),this.words[0]+z<67108864)this.words[0]+=z;else this._iaddn(z)}this.strip()},X.prototype.copy=function(Y){Y.words=Array(this.length);for(var O=0;O<this.length;O++)Y.words[O]=this.words[O];Y.length=this.length,Y.negative=this.negative,Y.red=this.red},X.prototype.clone=function(){var Y=new X(null);return this.copy(Y),Y},X.prototype._expand=function(Y){while(this.length<Y)this.words[this.length++]=0;return this},X.prototype.strip=function(){while(this.length>1&&this.words[this.length-1]===0)this.length--;return this._normSign()},X.prototype._normSign=function(){if(this.length===1&&this.words[0]===0)this.negative=0;return this},X.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var D=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],q=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],S=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64000000,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,24300000,28629151,33554432,39135393,45435424,52521875,60466176];if(X.prototype.toString=function(Y,O){Y=Y||10,O=O|0||1;var H;if(Y===16||Y==="hex"){H="";var Z=0,K=0;for(var w=0;w<this.length;w++){var B=this.words[w],P=((B<<Z|K)&16777215).toString(16);if(K=B>>>24-Z&16777215,Z+=2,Z>=26)Z-=26,w--;if(K!==0||w!==this.length-1)H=D[6-P.length]+P+H;else H=P+H}if(K!==0)H=K.toString(16)+H;while(H.length%O!==0)H="0"+H;if(this.negative!==0)H="-"+H;return H}if(Y===(Y|0)&&Y>=2&&Y<=36){var z=q[Y],A=S[Y];H="";var f=this.clone();f.negative=0;while(!f.isZero()){var c=f.modn(A).toString(Y);if(f=f.idivn(A),!f.isZero())H=D[z-c.length]+c+H;else H=c+H}if(this.isZero())H="0"+H;while(H.length%O!==0)H="0"+H;if(this.negative!==0)H="-"+H;return H}j(!1,"Base should be between 2 and 36")},X.prototype.toNumber=function(){var Y=this.words[0];if(this.length===2)Y+=this.words[1]*67108864;else if(this.length===3&&this.words[2]===1)Y+=4503599627370496+this.words[1]*67108864;else if(this.length>2)j(!1,"Number can only safely store up to 53 bits");return this.negative!==0?-Y:Y},X.prototype.toJSON=function(){return this.toString(16)},X.prototype.toBuffer=function(Y,O){return j(typeof W<"u"),this.toArrayLike(W,Y,O)},X.prototype.toArray=function(Y,O){return this.toArrayLike(Array,Y,O)},X.prototype.toArrayLike=function(Y,O,H){var Z=this.byteLength(),K=H||Math.max(1,Z);j(Z<=K,"byte array longer than desired length"),j(K>0,"Requested array length <= 0"),this.strip();var w=O==="le",B=new Y(K),P,z,A=this.clone();if(!w){for(z=0;z<K-Z;z++)B[z]=0;for(z=0;!A.isZero();z++)P=A.andln(255),A.iushrn(8),B[K-z-1]=P}else{for(z=0;!A.isZero();z++)P=A.andln(255),A.iushrn(8),B[z]=P;for(;z<K;z++)B[z]=0}return B},Math.clz32)X.prototype._countBits=function(Y){return 32-Math.clz32(Y)};else X.prototype._countBits=function(Y){var O=Y,H=0;if(O>=4096)H+=13,O>>>=13;if(O>=64)H+=7,O>>>=7;if(O>=8)H+=4,O>>>=4;if(O>=2)H+=2,O>>>=2;return H+O};X.prototype._zeroBits=function(Y){if(Y===0)return 26;var O=Y,H=0;if((O&8191)===0)H+=13,O>>>=13;if((O&127)===0)H+=7,O>>>=7;if((O&15)===0)H+=4,O>>>=4;if((O&3)===0)H+=2,O>>>=2;if((O&1)===0)H++;return H},X.prototype.bitLength=function(){var Y=this.words[this.length-1],O=this._countBits(Y);return(this.length-1)*26+O};function k(Y){var O=Array(Y.bitLength());for(var H=0;H<O.length;H++){var Z=H/26|0,K=H%26;O[H]=(Y.words[Z]&1<<K)>>>K}return O}X.prototype.zeroBits=function(){if(this.isZero())return 0;var Y=0;for(var O=0;O<this.length;O++){var H=this._zeroBits(this.words[O]);if(Y+=H,H!==26)break}return Y},X.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},X.prototype.toTwos=function(Y){if(this.negative!==0)return this.abs().inotn(Y).iaddn(1);return this.clone()},X.prototype.fromTwos=function(Y){if(this.testn(Y-1))return this.notn(Y).iaddn(1).ineg();return this.clone()},X.prototype.isNeg=function(){return this.negative!==0},X.prototype.neg=function(){return this.clone().ineg()},X.prototype.ineg=function(){if(!this.isZero())this.negative^=1;return this},X.prototype.iuor=function(Y){while(this.length<Y.length)this.words[this.length++]=0;for(var O=0;O<Y.length;O++)this.words[O]=this.words[O]|Y.words[O];return this.strip()},X.prototype.ior=function(Y){return j((this.negative|Y.negative)===0),this.iuor(Y)},X.prototype.or=function(Y){if(this.length>Y.length)return this.clone().ior(Y);return Y.clone().ior(this)},X.prototype.uor=function(Y){if(this.length>Y.length)return this.clone().iuor(Y);return Y.clone().iuor(this)},X.prototype.iuand=function(Y){var O;if(this.length>Y.length)O=Y;else O=this;for(var H=0;H<O.length;H++)this.words[H]=this.words[H]&Y.words[H];return this.length=O.length,this.strip()},X.prototype.iand=function(Y){return j((this.negative|Y.negative)===0),this.iuand(Y)},X.prototype.and=function(Y){if(this.length>Y.length)return this.clone().iand(Y);return Y.clone().iand(this)},X.prototype.uand=function(Y){if(this.length>Y.length)return this.clone().iuand(Y);return Y.clone().iuand(this)},X.prototype.iuxor=function(Y){var O,H;if(this.length>Y.length)O=this,H=Y;else O=Y,H=this;for(var Z=0;Z<H.length;Z++)this.words[Z]=O.words[Z]^H.words[Z];if(this!==O)for(;Z<O.length;Z++)this.words[Z]=O.words[Z];return this.length=O.length,this.strip()},X.prototype.ixor=function(Y){return j((this.negative|Y.negative)===0),this.iuxor(Y)},X.prototype.xor=function(Y){if(this.length>Y.length)return this.clone().ixor(Y);return Y.clone().ixor(this)},X.prototype.uxor=function(Y){if(this.length>Y.length)return this.clone().iuxor(Y);return Y.clone().iuxor(this)},X.prototype.inotn=function(Y){j(typeof Y==="number"&&Y>=0);var O=Math.ceil(Y/26)|0,H=Y%26;if(this._expand(O),H>0)O--;for(var Z=0;Z<O;Z++)this.words[Z]=~this.words[Z]&67108863;if(H>0)this.words[Z]=~this.words[Z]&67108863>>26-H;return this.strip()},X.prototype.notn=function(Y){return this.clone().inotn(Y)},X.prototype.setn=function(Y,O){j(typeof Y==="number"&&Y>=0);var H=Y/26|0,Z=Y%26;if(this._expand(H+1),O)this.words[H]=this.words[H]|1<<Z;else this.words[H]=this.words[H]&~(1<<Z);return this.strip()},X.prototype.iadd=function(Y){var O;if(this.negative!==0&&Y.negative===0)return this.negative=0,O=this.isub(Y),this.negative^=1,this._normSign();else if(this.negative===0&&Y.negative!==0)return Y.negative=0,O=this.isub(Y),Y.negative=1,O._normSign();var H,Z;if(this.length>Y.length)H=this,Z=Y;else H=Y,Z=this;var K=0;for(var w=0;w<Z.length;w++)O=(H.words[w]|0)+(Z.words[w]|0)+K,this.words[w]=O&67108863,K=O>>>26;for(;K!==0&&w<H.length;w++)O=(H.words[w]|0)+K,this.words[w]=O&67108863,K=O>>>26;if(this.length=H.length,K!==0)this.words[this.length]=K,this.length++;else if(H!==this)for(;w<H.length;w++)this.words[w]=H.words[w];return this},X.prototype.add=function(Y){var O;if(Y.negative!==0&&this.negative===0)return Y.negative=0,O=this.sub(Y),Y.negative^=1,O;else if(Y.negative===0&&this.negative!==0)return this.negative=0,O=Y.sub(this),this.negative=1,O;if(this.length>Y.length)return this.clone().iadd(Y);return Y.clone().iadd(this)},X.prototype.isub=function(Y){if(Y.negative!==0){Y.negative=0;var O=this.iadd(Y);return Y.negative=1,O._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(Y),this.negative=1,this._normSign();var H=this.cmp(Y);if(H===0)return this.negative=0,this.length=1,this.words[0]=0,this;var Z,K;if(H>0)Z=this,K=Y;else Z=Y,K=this;var w=0;for(var B=0;B<K.length;B++)O=(Z.words[B]|0)-(K.words[B]|0)+w,w=O>>26,this.words[B]=O&67108863;for(;w!==0&&B<Z.length;B++)O=(Z.words[B]|0)+w,w=O>>26,this.words[B]=O&67108863;if(w===0&&B<Z.length&&Z!==this)for(;B<Z.length;B++)this.words[B]=Z.words[B];if(this.length=Math.max(this.length,B),Z!==this)this.negative=1;return this.strip()},X.prototype.sub=function(Y){return this.clone().isub(Y)};function y(Y,O,H){H.negative=O.negative^Y.negative;var Z=Y.length+O.length|0;H.length=Z,Z=Z-1|0;var K=Y.words[0]|0,w=O.words[0]|0,B=K*w,P=B&67108863,z=B/67108864|0;H.words[0]=P;for(var A=1;A<Z;A++){var f=z>>>26,c=z&67108863,p=Math.min(A,O.length-1);for(var Q0=Math.max(0,A-Y.length+1);Q0<=p;Q0++){var F0=A-Q0|0;K=Y.words[F0]|0,w=O.words[Q0]|0,B=K*w+c,f+=B/67108864|0,c=B&67108863}H.words[A]=c|0,z=f|0}if(z!==0)H.words[A]=z|0;else H.length--;return H.strip()}var m=function(Y,O,H){var Z=Y.words,K=O.words,w=H.words,B=0,P,z,A,f=Z[0]|0,c=f&8191,p=f>>>13,Q0=Z[1]|0,F0=Q0&8191,P0=Q0>>>13,E0=Z[2]|0,_0=E0&8191,$0=E0>>>13,G0=Z[3]|0,K0=G0&8191,q0=G0>>>13,z0=Z[4]|0,a=z0&8191,J0=z0>>>13,y0=Z[5]|0,N0=y0&8191,A0=y0>>>13,$$=Z[6]|0,w0=$$&8191,h0=$$>>>13,H$=Z[7]|0,p0=H$&8191,j$=H$>>>13,p$=Z[8]|0,C0=p$&8191,x0=p$>>>13,T$=Z[9]|0,U$=T$&8191,G$=T$>>>13,T0=K[0]|0,u0=T0&8191,i0=T0>>>13,R$=K[1]|0,d=R$&8191,O0=R$>>>13,X0=K[2]|0,k0=X0&8191,d0=X0>>>13,r=K[3]|0,S0=r&8191,b0=r>>>13,D0=K[4]|0,g0=D0&8191,m0=D0>>>13,u$=K[5]|0,Y$=u$&8191,Y0=u$>>>13,B0=K[6]|0,s0=B0&8191,a0=B0>>>13,g$=K[7]|0,D$=g$&8191,F$=g$>>>13,A1=K[8]|0,c$=A1&8191,q$=A1>>>13,Y1=K[9]|0,O$=Y1&8191,V$=Y1>>>13;H.negative=Y.negative^O.negative,H.length=19,P=Math.imul(c,u0),z=Math.imul(c,i0),z=z+Math.imul(p,u0)|0,A=Math.imul(p,i0);var w1=(B+P|0)+((z&8191)<<13)|0;B=(A+(z>>>13)|0)+(w1>>>26)|0,w1&=67108863,P=Math.imul(F0,u0),z=Math.imul(F0,i0),z=z+Math.imul(P0,u0)|0,A=Math.imul(P0,i0),P=P+Math.imul(c,d)|0,z=z+Math.imul(c,O0)|0,z=z+Math.imul(p,d)|0,A=A+Math.imul(p,O0)|0;var j1=(B+P|0)+((z&8191)<<13)|0;B=(A+(z>>>13)|0)+(j1>>>26)|0,j1&=67108863,P=Math.imul(_0,u0),z=Math.imul(_0,i0),z=z+Math.imul($0,u0)|0,A=Math.imul($0,i0),P=P+Math.imul(F0,d)|0,z=z+Math.imul(F0,O0)|0,z=z+Math.imul(P0,d)|0,A=A+Math.imul(P0,O0)|0,P=P+Math.imul(c,k0)|0,z=z+Math.imul(c,d0)|0,z=z+Math.imul(p,k0)|0,A=A+Math.imul(p,d0)|0;var v1=(B+P|0)+((z&8191)<<13)|0;B=(A+(z>>>13)|0)+(v1>>>26)|0,v1&=67108863,P=Math.imul(K0,u0),z=Math.imul(K0,i0),z=z+Math.imul(q0,u0)|0,A=Math.imul(q0,i0),P=P+Math.imul(_0,d)|0,z=z+Math.imul(_0,O0)|0,z=z+Math.imul($0,d)|0,A=A+Math.imul($0,O0)|0,P=P+Math.imul(F0,k0)|0,z=z+Math.imul(F0,d0)|0,z=z+Math.imul(P0,k0)|0,A=A+Math.imul(P0,d0)|0,P=P+Math.imul(c,S0)|0,z=z+Math.imul(c,b0)|0,z=z+Math.imul(p,S0)|0,A=A+Math.imul(p,b0)|0;var I2=(B+P|0)+((z&8191)<<13)|0;B=(A+(z>>>13)|0)+(I2>>>26)|0,I2&=67108863,P=Math.imul(a,u0),z=Math.imul(a,i0),z=z+Math.imul(J0,u0)|0,A=Math.imul(J0,i0),P=P+Math.imul(K0,d)|0,z=z+Math.imul(K0,O0)|0,z=z+Math.imul(q0,d)|0,A=A+Math.imul(q0,O0)|0,P=P+Math.imul(_0,k0)|0,z=z+Math.imul(_0,d0)|0,z=z+Math.imul($0,k0)|0,A=A+Math.imul($0,d0)|0,P=P+Math.imul(F0,S0)|0,z=z+Math.imul(F0,b0)|0,z=z+Math.imul(P0,S0)|0,A=A+Math.imul(P0,b0)|0,P=P+Math.imul(c,g0)|0,z=z+Math.imul(c,m0)|0,z=z+Math.imul(p,g0)|0,A=A+Math.imul(p,m0)|0;var W1=(B+P|0)+((z&8191)<<13)|0;B=(A+(z>>>13)|0)+(W1>>>26)|0,W1&=67108863,P=Math.imul(N0,u0),z=Math.imul(N0,i0),z=z+Math.imul(A0,u0)|0,A=Math.imul(A0,i0),P=P+Math.imul(a,d)|0,z=z+Math.imul(a,O0)|0,z=z+Math.imul(J0,d)|0,A=A+Math.imul(J0,O0)|0,P=P+Math.imul(K0,k0)|0,z=z+Math.imul(K0,d0)|0,z=z+Math.imul(q0,k0)|0,A=A+Math.imul(q0,d0)|0,P=P+Math.imul(_0,S0)|0,z=z+Math.imul(_0,b0)|0,z=z+Math.imul($0,S0)|0,A=A+Math.imul($0,b0)|0,P=P+Math.imul(F0,g0)|0,z=z+Math.imul(F0,m0)|0,z=z+Math.imul(P0,g0)|0,A=A+Math.imul(P0,m0)|0,P=P+Math.imul(c,Y$)|0,z=z+Math.imul(c,Y0)|0,z=z+Math.imul(p,Y$)|0,A=A+Math.imul(p,Y0)|0;var A2=(B+P|0)+((z&8191)<<13)|0;B=(A+(z>>>13)|0)+(A2>>>26)|0,A2&=67108863,P=Math.imul(w0,u0),z=Math.imul(w0,i0),z=z+Math.imul(h0,u0)|0,A=Math.imul(h0,i0),P=P+Math.imul(N0,d)|0,z=z+Math.imul(N0,O0)|0,z=z+Math.imul(A0,d)|0,A=A+Math.imul(A0,O0)|0,P=P+Math.imul(a,k0)|0,z=z+Math.imul(a,d0)|0,z=z+Math.imul(J0,k0)|0,A=A+Math.imul(J0,d0)|0,P=P+Math.imul(K0,S0)|0,z=z+Math.imul(K0,b0)|0,z=z+Math.imul(q0,S0)|0,A=A+Math.imul(q0,b0)|0,P=P+Math.imul(_0,g0)|0,z=z+Math.imul(_0,m0)|0,z=z+Math.imul($0,g0)|0,A=A+Math.imul($0,m0)|0,P=P+Math.imul(F0,Y$)|0,z=z+Math.imul(F0,Y0)|0,z=z+Math.imul(P0,Y$)|0,A=A+Math.imul(P0,Y0)|0,P=P+Math.imul(c,s0)|0,z=z+Math.imul(c,a0)|0,z=z+Math.imul(p,s0)|0,A=A+Math.imul(p,a0)|0;var c2=(B+P|0)+((z&8191)<<13)|0;B=(A+(z>>>13)|0)+(c2>>>26)|0,c2&=67108863,P=Math.imul(p0,u0),z=Math.imul(p0,i0),z=z+Math.imul(j$,u0)|0,A=Math.imul(j$,i0),P=P+Math.imul(w0,d)|0,z=z+Math.imul(w0,O0)|0,z=z+Math.imul(h0,d)|0,A=A+Math.imul(h0,O0)|0,P=P+Math.imul(N0,k0)|0,z=z+Math.imul(N0,d0)|0,z=z+Math.imul(A0,k0)|0,A=A+Math.imul(A0,d0)|0,P=P+Math.imul(a,S0)|0,z=z+Math.imul(a,b0)|0,z=z+Math.imul(J0,S0)|0,A=A+Math.imul(J0,b0)|0,P=P+Math.imul(K0,g0)|0,z=z+Math.imul(K0,m0)|0,z=z+Math.imul(q0,g0)|0,A=A+Math.imul(q0,m0)|0,P=P+Math.imul(_0,Y$)|0,z=z+Math.imul(_0,Y0)|0,z=z+Math.imul($0,Y$)|0,A=A+Math.imul($0,Y0)|0,P=P+Math.imul(F0,s0)|0,z=z+Math.imul(F0,a0)|0,z=z+Math.imul(P0,s0)|0,A=A+Math.imul(P0,a0)|0,P=P+Math.imul(c,D$)|0,z=z+Math.imul(c,F$)|0,z=z+Math.imul(p,D$)|0,A=A+Math.imul(p,F$)|0;var M2=(B+P|0)+((z&8191)<<13)|0;B=(A+(z>>>13)|0)+(M2>>>26)|0,M2&=67108863,P=Math.imul(C0,u0),z=Math.imul(C0,i0),z=z+Math.imul(x0,u0)|0,A=Math.imul(x0,i0),P=P+Math.imul(p0,d)|0,z=z+Math.imul(p0,O0)|0,z=z+Math.imul(j$,d)|0,A=A+Math.imul(j$,O0)|0,P=P+Math.imul(w0,k0)|0,z=z+Math.imul(w0,d0)|0,z=z+Math.imul(h0,k0)|0,A=A+Math.imul(h0,d0)|0,P=P+Math.imul(N0,S0)|0,z=z+Math.imul(N0,b0)|0,z=z+Math.imul(A0,S0)|0,A=A+Math.imul(A0,b0)|0,P=P+Math.imul(a,g0)|0,z=z+Math.imul(a,m0)|0,z=z+Math.imul(J0,g0)|0,A=A+Math.imul(J0,m0)|0,P=P+Math.imul(K0,Y$)|0,z=z+Math.imul(K0,Y0)|0,z=z+Math.imul(q0,Y$)|0,A=A+Math.imul(q0,Y0)|0,P=P+Math.imul(_0,s0)|0,z=z+Math.imul(_0,a0)|0,z=z+Math.imul($0,s0)|0,A=A+Math.imul($0,a0)|0,P=P+Math.imul(F0,D$)|0,z=z+Math.imul(F0,F$)|0,z=z+Math.imul(P0,D$)|0,A=A+Math.imul(P0,F$)|0,P=P+Math.imul(c,c$)|0,z=z+Math.imul(c,q$)|0,z=z+Math.imul(p,c$)|0,A=A+Math.imul(p,q$)|0;var Gv=(B+P|0)+((z&8191)<<13)|0;B=(A+(z>>>13)|0)+(Gv>>>26)|0,Gv&=67108863,P=Math.imul(U$,u0),z=Math.imul(U$,i0),z=z+Math.imul(G$,u0)|0,A=Math.imul(G$,i0),P=P+Math.imul(C0,d)|0,z=z+Math.imul(C0,O0)|0,z=z+Math.imul(x0,d)|0,A=A+Math.imul(x0,O0)|0,P=P+Math.imul(p0,k0)|0,z=z+Math.imul(p0,d0)|0,z=z+Math.imul(j$,k0)|0,A=A+Math.imul(j$,d0)|0,P=P+Math.imul(w0,S0)|0,z=z+Math.imul(w0,b0)|0,z=z+Math.imul(h0,S0)|0,A=A+Math.imul(h0,b0)|0,P=P+Math.imul(N0,g0)|0,z=z+Math.imul(N0,m0)|0,z=z+Math.imul(A0,g0)|0,A=A+Math.imul(A0,m0)|0,P=P+Math.imul(a,Y$)|0,z=z+Math.imul(a,Y0)|0,z=z+Math.imul(J0,Y$)|0,A=A+Math.imul(J0,Y0)|0,P=P+Math.imul(K0,s0)|0,z=z+Math.imul(K0,a0)|0,z=z+Math.imul(q0,s0)|0,A=A+Math.imul(q0,a0)|0,P=P+Math.imul(_0,D$)|0,z=z+Math.imul(_0,F$)|0,z=z+Math.imul($0,D$)|0,A=A+Math.imul($0,F$)|0,P=P+Math.imul(F0,c$)|0,z=z+Math.imul(F0,q$)|0,z=z+Math.imul(P0,c$)|0,A=A+Math.imul(P0,q$)|0,P=P+Math.imul(c,O$)|0,z=z+Math.imul(c,V$)|0,z=z+Math.imul(p,O$)|0,A=A+Math.imul(p,V$)|0;var f1=(B+P|0)+((z&8191)<<13)|0;B=(A+(z>>>13)|0)+(f1>>>26)|0,f1&=67108863,P=Math.imul(U$,d),z=Math.imul(U$,O0),z=z+Math.imul(G$,d)|0,A=Math.imul(G$,O0),P=P+Math.imul(C0,k0)|0,z=z+Math.imul(C0,d0)|0,z=z+Math.imul(x0,k0)|0,A=A+Math.imul(x0,d0)|0,P=P+Math.imul(p0,S0)|0,z=z+Math.imul(p0,b0)|0,z=z+Math.imul(j$,S0)|0,A=A+Math.imul(j$,b0)|0,P=P+Math.imul(w0,g0)|0,z=z+Math.imul(w0,m0)|0,z=z+Math.imul(h0,g0)|0,A=A+Math.imul(h0,m0)|0,P=P+Math.imul(N0,Y$)|0,z=z+Math.imul(N0,Y0)|0,z=z+Math.imul(A0,Y$)|0,A=A+Math.imul(A0,Y0)|0,P=P+Math.imul(a,s0)|0,z=z+Math.imul(a,a0)|0,z=z+Math.imul(J0,s0)|0,A=A+Math.imul(J0,a0)|0,P=P+Math.imul(K0,D$)|0,z=z+Math.imul(K0,F$)|0,z=z+Math.imul(q0,D$)|0,A=A+Math.imul(q0,F$)|0,P=P+Math.imul(_0,c$)|0,z=z+Math.imul(_0,q$)|0,z=z+Math.imul($0,c$)|0,A=A+Math.imul($0,q$)|0,P=P+Math.imul(F0,O$)|0,z=z+Math.imul(F0,V$)|0,z=z+Math.imul(P0,O$)|0,A=A+Math.imul(P0,V$)|0;var o1=(B+P|0)+((z&8191)<<13)|0;B=(A+(z>>>13)|0)+(o1>>>26)|0,o1&=67108863,P=Math.imul(U$,k0),z=Math.imul(U$,d0),z=z+Math.imul(G$,k0)|0,A=Math.imul(G$,d0),P=P+Math.imul(C0,S0)|0,z=z+Math.imul(C0,b0)|0,z=z+Math.imul(x0,S0)|0,A=A+Math.imul(x0,b0)|0,P=P+Math.imul(p0,g0)|0,z=z+Math.imul(p0,m0)|0,z=z+Math.imul(j$,g0)|0,A=A+Math.imul(j$,m0)|0,P=P+Math.imul(w0,Y$)|0,z=z+Math.imul(w0,Y0)|0,z=z+Math.imul(h0,Y$)|0,A=A+Math.imul(h0,Y0)|0,P=P+Math.imul(N0,s0)|0,z=z+Math.imul(N0,a0)|0,z=z+Math.imul(A0,s0)|0,A=A+Math.imul(A0,a0)|0,P=P+Math.imul(a,D$)|0,z=z+Math.imul(a,F$)|0,z=z+Math.imul(J0,D$)|0,A=A+Math.imul(J0,F$)|0,P=P+Math.imul(K0,c$)|0,z=z+Math.imul(K0,q$)|0,z=z+Math.imul(q0,c$)|0,A=A+Math.imul(q0,q$)|0,P=P+Math.imul(_0,O$)|0,z=z+Math.imul(_0,V$)|0,z=z+Math.imul($0,O$)|0,A=A+Math.imul($0,V$)|0;var E2=(B+P|0)+((z&8191)<<13)|0;B=(A+(z>>>13)|0)+(E2>>>26)|0,E2&=67108863,P=Math.imul(U$,S0),z=Math.imul(U$,b0),z=z+Math.imul(G$,S0)|0,A=Math.imul(G$,b0),P=P+Math.imul(C0,g0)|0,z=z+Math.imul(C0,m0)|0,z=z+Math.imul(x0,g0)|0,A=A+Math.imul(x0,m0)|0,P=P+Math.imul(p0,Y$)|0,z=z+Math.imul(p0,Y0)|0,z=z+Math.imul(j$,Y$)|0,A=A+Math.imul(j$,Y0)|0,P=P+Math.imul(w0,s0)|0,z=z+Math.imul(w0,a0)|0,z=z+Math.imul(h0,s0)|0,A=A+Math.imul(h0,a0)|0,P=P+Math.imul(N0,D$)|0,z=z+Math.imul(N0,F$)|0,z=z+Math.imul(A0,D$)|0,A=A+Math.imul(A0,F$)|0,P=P+Math.imul(a,c$)|0,z=z+Math.imul(a,q$)|0,z=z+Math.imul(J0,c$)|0,A=A+Math.imul(J0,q$)|0,P=P+Math.imul(K0,O$)|0,z=z+Math.imul(K0,V$)|0,z=z+Math.imul(q0,O$)|0,A=A+Math.imul(q0,V$)|0;var x2=(B+P|0)+((z&8191)<<13)|0;B=(A+(z>>>13)|0)+(x2>>>26)|0,x2&=67108863,P=Math.imul(U$,g0),z=Math.imul(U$,m0),z=z+Math.imul(G$,g0)|0,A=Math.imul(G$,m0),P=P+Math.imul(C0,Y$)|0,z=z+Math.imul(C0,Y0)|0,z=z+Math.imul(x0,Y$)|0,A=A+Math.imul(x0,Y0)|0,P=P+Math.imul(p0,s0)|0,z=z+Math.imul(p0,a0)|0,z=z+Math.imul(j$,s0)|0,A=A+Math.imul(j$,a0)|0,P=P+Math.imul(w0,D$)|0,z=z+Math.imul(w0,F$)|0,z=z+Math.imul(h0,D$)|0,A=A+Math.imul(h0,F$)|0,P=P+Math.imul(N0,c$)|0,z=z+Math.imul(N0,q$)|0,z=z+Math.imul(A0,c$)|0,A=A+Math.imul(A0,q$)|0,P=P+Math.imul(a,O$)|0,z=z+Math.imul(a,V$)|0,z=z+Math.imul(J0,O$)|0,A=A+Math.imul(J0,V$)|0;var W2=(B+P|0)+((z&8191)<<13)|0;B=(A+(z>>>13)|0)+(W2>>>26)|0,W2&=67108863,P=Math.imul(U$,Y$),z=Math.imul(U$,Y0),z=z+Math.imul(G$,Y$)|0,A=Math.imul(G$,Y0),P=P+Math.imul(C0,s0)|0,z=z+Math.imul(C0,a0)|0,z=z+Math.imul(x0,s0)|0,A=A+Math.imul(x0,a0)|0,P=P+Math.imul(p0,D$)|0,z=z+Math.imul(p0,F$)|0,z=z+Math.imul(j$,D$)|0,A=A+Math.imul(j$,F$)|0,P=P+Math.imul(w0,c$)|0,z=z+Math.imul(w0,q$)|0,z=z+Math.imul(h0,c$)|0,A=A+Math.imul(h0,q$)|0,P=P+Math.imul(N0,O$)|0,z=z+Math.imul(N0,V$)|0,z=z+Math.imul(A0,O$)|0,A=A+Math.imul(A0,V$)|0;var i2=(B+P|0)+((z&8191)<<13)|0;B=(A+(z>>>13)|0)+(i2>>>26)|0,i2&=67108863,P=Math.imul(U$,s0),z=Math.imul(U$,a0),z=z+Math.imul(G$,s0)|0,A=Math.imul(G$,a0),P=P+Math.imul(C0,D$)|0,z=z+Math.imul(C0,F$)|0,z=z+Math.imul(x0,D$)|0,A=A+Math.imul(x0,F$)|0,P=P+Math.imul(p0,c$)|0,z=z+Math.imul(p0,q$)|0,z=z+Math.imul(j$,c$)|0,A=A+Math.imul(j$,q$)|0,P=P+Math.imul(w0,O$)|0,z=z+Math.imul(w0,V$)|0,z=z+Math.imul(h0,O$)|0,A=A+Math.imul(h0,V$)|0;var f2=(B+P|0)+((z&8191)<<13)|0;B=(A+(z>>>13)|0)+(f2>>>26)|0,f2&=67108863,P=Math.imul(U$,D$),z=Math.imul(U$,F$),z=z+Math.imul(G$,D$)|0,A=Math.imul(G$,F$),P=P+Math.imul(C0,c$)|0,z=z+Math.imul(C0,q$)|0,z=z+Math.imul(x0,c$)|0,A=A+Math.imul(x0,q$)|0,P=P+Math.imul(p0,O$)|0,z=z+Math.imul(p0,V$)|0,z=z+Math.imul(j$,O$)|0,A=A+Math.imul(j$,V$)|0;var V2=(B+P|0)+((z&8191)<<13)|0;B=(A+(z>>>13)|0)+(V2>>>26)|0,V2&=67108863,P=Math.imul(U$,c$),z=Math.imul(U$,q$),z=z+Math.imul(G$,c$)|0,A=Math.imul(G$,q$),P=P+Math.imul(C0,O$)|0,z=z+Math.imul(C0,V$)|0,z=z+Math.imul(x0,O$)|0,A=A+Math.imul(x0,V$)|0;var T2=(B+P|0)+((z&8191)<<13)|0;B=(A+(z>>>13)|0)+(T2>>>26)|0,T2&=67108863,P=Math.imul(U$,O$),z=Math.imul(U$,V$),z=z+Math.imul(G$,O$)|0,A=Math.imul(G$,V$);var g2=(B+P|0)+((z&8191)<<13)|0;if(B=(A+(z>>>13)|0)+(g2>>>26)|0,g2&=67108863,w[0]=w1,w[1]=j1,w[2]=v1,w[3]=I2,w[4]=W1,w[5]=A2,w[6]=c2,w[7]=M2,w[8]=Gv,w[9]=f1,w[10]=o1,w[11]=E2,w[12]=x2,w[13]=W2,w[14]=i2,w[15]=f2,w[16]=V2,w[17]=T2,w[18]=g2,B!==0)w[19]=B,H.length++;return H};if(!Math.imul)m=y;function n(Y,O,H){H.negative=O.negative^Y.negative,H.length=Y.length+O.length;var Z=0,K=0;for(var w=0;w<H.length-1;w++){var B=K;K=0;var P=Z&67108863,z=Math.min(w,O.length-1);for(var A=Math.max(0,w-Y.length+1);A<=z;A++){var f=w-A,c=Y.words[f]|0,p=O.words[A]|0,Q0=c*p,F0=Q0&67108863;B=B+(Q0/67108864|0)|0,F0=F0+P|0,P=F0&67108863,B=B+(F0>>>26)|0,K+=B>>>26,B&=67108863}H.words[w]=P,Z=B,B=K}if(Z!==0)H.words[w]=Z;else H.length--;return H.strip()}function h(Y,O,H){var Z=new i;return Z.mulp(Y,O,H)}X.prototype.mulTo=function(Y,O){var H,Z=this.length+Y.length;if(this.length===10&&Y.length===10)H=m(this,Y,O);else if(Z<63)H=y(this,Y,O);else if(Z<1024)H=n(this,Y,O);else H=h(this,Y,O);return H};function i(Y,O){this.x=Y,this.y=O}i.prototype.makeRBT=function(Y){var O=Array(Y),H=X.prototype._countBits(Y)-1;for(var Z=0;Z<Y;Z++)O[Z]=this.revBin(Z,H,Y);return O},i.prototype.revBin=function(Y,O,H){if(Y===0||Y===H-1)return Y;var Z=0;for(var K=0;K<O;K++)Z|=(Y&1)<<O-K-1,Y>>=1;return Z},i.prototype.permute=function(Y,O,H,Z,K,w){for(var B=0;B<w;B++)Z[B]=O[Y[B]],K[B]=H[Y[B]]},i.prototype.transform=function(Y,O,H,Z,K,w){this.permute(w,Y,O,H,Z,K);for(var B=1;B<K;B<<=1){var P=B<<1,z=Math.cos(2*Math.PI/P),A=Math.sin(2*Math.PI/P);for(var f=0;f<K;f+=P){var c=z,p=A;for(var Q0=0;Q0<B;Q0++){var F0=H[f+Q0],P0=Z[f+Q0],E0=H[f+Q0+B],_0=Z[f+Q0+B],$0=c*E0-p*_0;if(_0=c*_0+p*E0,E0=$0,H[f+Q0]=F0+E0,Z[f+Q0]=P0+_0,H[f+Q0+B]=F0-E0,Z[f+Q0+B]=P0-_0,Q0!==P)$0=z*c-A*p,p=z*p+A*c,c=$0}}}},i.prototype.guessLen13b=function(Y,O){var H=Math.max(O,Y)|1,Z=H&1,K=0;for(H=H/2|0;H;H=H>>>1)K++;return 1<<K+1+Z},i.prototype.conjugate=function(Y,O,H){if(H<=1)return;for(var Z=0;Z<H/2;Z++){var K=Y[Z];Y[Z]=Y[H-Z-1],Y[H-Z-1]=K,K=O[Z],O[Z]=-O[H-Z-1],O[H-Z-1]=-K}},i.prototype.normalize13b=function(Y,O){var H=0;for(var Z=0;Z<O/2;Z++){var K=Math.round(Y[2*Z+1]/O)*8192+Math.round(Y[2*Z]/O)+H;if(Y[Z]=K&67108863,K<67108864)H=0;else H=K/67108864|0}return Y},i.prototype.convert13b=function(Y,O,H,Z){var K=0;for(var w=0;w<O;w++)K=K+(Y[w]|0),H[2*w]=K&8191,K=K>>>13,H[2*w+1]=K&8191,K=K>>>13;for(w=2*O;w<Z;++w)H[w]=0;j(K===0),j((K&-8192)===0)},i.prototype.stub=function(Y){var O=Array(Y);for(var H=0;H<Y;H++)O[H]=0;return O},i.prototype.mulp=function(Y,O,H){var Z=2*this.guessLen13b(Y.length,O.length),K=this.makeRBT(Z),w=this.stub(Z),B=Array(Z),P=Array(Z),z=Array(Z),A=Array(Z),f=Array(Z),c=Array(Z),p=H.words;p.length=Z,this.convert13b(Y.words,Y.length,B,Z),this.convert13b(O.words,O.length,A,Z),this.transform(B,w,P,z,Z,K),this.transform(A,w,f,c,Z,K);for(var Q0=0;Q0<Z;Q0++){var F0=P[Q0]*f[Q0]-z[Q0]*c[Q0];z[Q0]=P[Q0]*c[Q0]+z[Q0]*f[Q0],P[Q0]=F0}return this.conjugate(P,z,Z),this.transform(P,z,p,w,Z,K),this.conjugate(p,w,Z),this.normalize13b(p,Z),H.negative=Y.negative^O.negative,H.length=Y.length+O.length,H.strip()},X.prototype.mul=function(Y){var O=new X(null);return O.words=Array(this.length+Y.length),this.mulTo(Y,O)},X.prototype.mulf=function(Y){var O=new X(null);return O.words=Array(this.length+Y.length),h(this,Y,O)},X.prototype.imul=function(Y){return this.clone().mulTo(Y,this)},X.prototype.imuln=function(Y){j(typeof Y==="number"),j(Y<67108864);var O=0;for(var H=0;H<this.length;H++){var Z=(this.words[H]|0)*Y,K=(Z&67108863)+(O&67108863);O>>=26,O+=Z/67108864|0,O+=K>>>26,this.words[H]=K&67108863}if(O!==0)this.words[H]=O,this.length++;return this.length=Y===0?1:this.length,this},X.prototype.muln=function(Y){return this.clone().imuln(Y)},X.prototype.sqr=function(){return this.mul(this)},X.prototype.isqr=function(){return this.imul(this.clone())},X.prototype.pow=function(Y){var O=k(Y);if(O.length===0)return new X(1);var H=this;for(var Z=0;Z<O.length;Z++,H=H.sqr())if(O[Z]!==0)break;if(++Z<O.length)for(var K=H.sqr();Z<O.length;Z++,K=K.sqr()){if(O[Z]===0)continue;H=H.mul(K)}return H},X.prototype.iushln=function(Y){j(typeof Y==="number"&&Y>=0);var O=Y%26,H=(Y-O)/26,Z=67108863>>>26-O<<26-O,K;if(O!==0){var w=0;for(K=0;K<this.length;K++){var B=this.words[K]&Z,P=(this.words[K]|0)-B<<O;this.words[K]=P|w,w=B>>>26-O}if(w)this.words[K]=w,this.length++}if(H!==0){for(K=this.length-1;K>=0;K--)this.words[K+H]=this.words[K];for(K=0;K<H;K++)this.words[K]=0;this.length+=H}return this.strip()},X.prototype.ishln=function(Y){return j(this.negative===0),this.iushln(Y)},X.prototype.iushrn=function(Y,O,H){j(typeof Y==="number"&&Y>=0);var Z;if(O)Z=(O-O%26)/26;else Z=0;var K=Y%26,w=Math.min((Y-K)/26,this.length),B=67108863^67108863>>>K<<K,P=H;if(Z-=w,Z=Math.max(0,Z),P){for(var z=0;z<w;z++)P.words[z]=this.words[z];P.length=w}if(w===0);else if(this.length>w){this.length-=w;for(z=0;z<this.length;z++)this.words[z]=this.words[z+w]}else this.words[0]=0,this.length=1;var A=0;for(z=this.length-1;z>=0&&(A!==0||z>=Z);z--){var f=this.words[z]|0;this.words[z]=A<<26-K|f>>>K,A=f&B}if(P&&A!==0)P.words[P.length++]=A;if(this.length===0)this.words[0]=0,this.length=1;return this.strip()},X.prototype.ishrn=function(Y,O,H){return j(this.negative===0),this.iushrn(Y,O,H)},X.prototype.shln=function(Y){return this.clone().ishln(Y)},X.prototype.ushln=function(Y){return this.clone().iushln(Y)},X.prototype.shrn=function(Y){return this.clone().ishrn(Y)},X.prototype.ushrn=function(Y){return this.clone().iushrn(Y)},X.prototype.testn=function(Y){j(typeof Y==="number"&&Y>=0);var O=Y%26,H=(Y-O)/26,Z=1<<O;if(this.length<=H)return!1;var K=this.words[H];return!!(K&Z)},X.prototype.imaskn=function(Y){j(typeof Y==="number"&&Y>=0);var O=Y%26,H=(Y-O)/26;if(j(this.negative===0,"imaskn works only with positive numbers"),this.length<=H)return this;if(O!==0)H++;if(this.length=Math.min(H,this.length),O!==0){var Z=67108863^67108863>>>O<<O;this.words[this.length-1]&=Z}return this.strip()},X.prototype.maskn=function(Y){return this.clone().imaskn(Y)},X.prototype.iaddn=function(Y){if(j(typeof Y==="number"),j(Y<67108864),Y<0)return this.isubn(-Y);if(this.negative!==0){if(this.length===1&&(this.words[0]|0)<Y)return this.words[0]=Y-(this.words[0]|0),this.negative=0,this;return this.negative=0,this.isubn(Y),this.negative=1,this}return this._iaddn(Y)},X.prototype._iaddn=function(Y){this.words[0]+=Y;for(var O=0;O<this.length&&this.words[O]>=67108864;O++)if(this.words[O]-=67108864,O===this.length-1)this.words[O+1]=1;else this.words[O+1]++;return this.length=Math.max(this.length,O+1),this},X.prototype.isubn=function(Y){if(j(typeof Y==="number"),j(Y<67108864),Y<0)return this.iaddn(-Y);if(this.negative!==0)return this.negative=0,this.iaddn(Y),this.negative=1,this;if(this.words[0]-=Y,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var O=0;O<this.length&&this.words[O]<0;O++)this.words[O]+=67108864,this.words[O+1]-=1;return this.strip()},X.prototype.addn=function(Y){return this.clone().iaddn(Y)},X.prototype.subn=function(Y){return this.clone().isubn(Y)},X.prototype.iabs=function(){return this.negative=0,this},X.prototype.abs=function(){return this.clone().iabs()},X.prototype._ishlnsubmul=function(Y,O,H){var Z=Y.length+H,K;this._expand(Z);var w,B=0;for(K=0;K<Y.length;K++){w=(this.words[K+H]|0)+B;var P=(Y.words[K]|0)*O;w-=P&67108863,B=(w>>26)-(P/67108864|0),this.words[K+H]=w&67108863}for(;K<this.length-H;K++)w=(this.words[K+H]|0)+B,B=w>>26,this.words[K+H]=w&67108863;if(B===0)return this.strip();j(B===-1),B=0;for(K=0;K<this.length;K++)w=-(this.words[K]|0)+B,B=w>>26,this.words[K]=w&67108863;return this.negative=1,this.strip()},X.prototype._wordDiv=function(Y,O){var H=this.length-Y.length,Z=this.clone(),K=Y,w=K.words[K.length-1]|0,B=this._countBits(w);if(H=26-B,H!==0)K=K.ushln(H),Z.iushln(H),w=K.words[K.length-1]|0;var P=Z.length-K.length,z;if(O!=="mod"){z=new X(null),z.length=P+1,z.words=Array(z.length);for(var A=0;A<z.length;A++)z.words[A]=0}var f=Z.clone()._ishlnsubmul(K,1,P);if(f.negative===0){if(Z=f,z)z.words[P]=1}for(var c=P-1;c>=0;c--){var p=(Z.words[K.length+c]|0)*67108864+(Z.words[K.length+c-1]|0);p=Math.min(p/w|0,67108863),Z._ishlnsubmul(K,p,c);while(Z.negative!==0)if(p--,Z.negative=0,Z._ishlnsubmul(K,1,c),!Z.isZero())Z.negative^=1;if(z)z.words[c]=p}if(z)z.strip();if(Z.strip(),O!=="div"&&H!==0)Z.iushrn(H);return{div:z||null,mod:Z}},X.prototype.divmod=function(Y,O,H){if(j(!Y.isZero()),this.isZero())return{div:new X(0),mod:new X(0)};var Z,K,w;if(this.negative!==0&&Y.negative===0){if(w=this.neg().divmod(Y,O),O!=="mod")Z=w.div.neg();if(O!=="div"){if(K=w.mod.neg(),H&&K.negative!==0)K.iadd(Y)}return{div:Z,mod:K}}if(this.negative===0&&Y.negative!==0){if(w=this.divmod(Y.neg(),O),O!=="mod")Z=w.div.neg();return{div:Z,mod:w.mod}}if((this.negative&Y.negative)!==0){if(w=this.neg().divmod(Y.neg(),O),O!=="div"){if(K=w.mod.neg(),H&&K.negative!==0)K.isub(Y)}return{div:w.div,mod:K}}if(Y.length>this.length||this.cmp(Y)<0)return{div:new X(0),mod:this};if(Y.length===1){if(O==="div")return{div:this.divn(Y.words[0]),mod:null};if(O==="mod")return{div:null,mod:new X(this.modn(Y.words[0]))};return{div:this.divn(Y.words[0]),mod:new X(this.modn(Y.words[0]))}}return this._wordDiv(Y,O)},X.prototype.div=function(Y){return this.divmod(Y,"div",!1).div},X.prototype.mod=function(Y){return this.divmod(Y,"mod",!1).mod},X.prototype.umod=function(Y){return this.divmod(Y,"mod",!0).mod},X.prototype.divRound=function(Y){var O=this.divmod(Y);if(O.mod.isZero())return O.div;var H=O.div.negative!==0?O.mod.isub(Y):O.mod,Z=Y.ushrn(1),K=Y.andln(1),w=H.cmp(Z);if(w<0||K===1&&w===0)return O.div;return O.div.negative!==0?O.div.isubn(1):O.div.iaddn(1)},X.prototype.modn=function(Y){j(Y<=67108863);var O=67108864%Y,H=0;for(var Z=this.length-1;Z>=0;Z--)H=(O*H+(this.words[Z]|0))%Y;return H},X.prototype.idivn=function(Y){j(Y<=67108863);var O=0;for(var H=this.length-1;H>=0;H--){var Z=(this.words[H]|0)+O*67108864;this.words[H]=Z/Y|0,O=Z%Y}return this.strip()},X.prototype.divn=function(Y){return this.clone().idivn(Y)},X.prototype.egcd=function(Y){j(Y.negative===0),j(!Y.isZero());var O=this,H=Y.clone();if(O.negative!==0)O=O.umod(Y);else O=O.clone();var Z=new X(1),K=new X(0),w=new X(0),B=new X(1),P=0;while(O.isEven()&&H.isEven())O.iushrn(1),H.iushrn(1),++P;var z=H.clone(),A=O.clone();while(!O.isZero()){for(var f=0,c=1;(O.words[0]&c)===0&&f<26;++f,c<<=1);if(f>0){O.iushrn(f);while(f-- >0){if(Z.isOdd()||K.isOdd())Z.iadd(z),K.isub(A);Z.iushrn(1),K.iushrn(1)}}for(var p=0,Q0=1;(H.words[0]&Q0)===0&&p<26;++p,Q0<<=1);if(p>0){H.iushrn(p);while(p-- >0){if(w.isOdd()||B.isOdd())w.iadd(z),B.isub(A);w.iushrn(1),B.iushrn(1)}}if(O.cmp(H)>=0)O.isub(H),Z.isub(w),K.isub(B);else H.isub(O),w.isub(Z),B.isub(K)}return{a:w,b:B,gcd:H.iushln(P)}},X.prototype._invmp=function(Y){j(Y.negative===0),j(!Y.isZero());var O=this,H=Y.clone();if(O.negative!==0)O=O.umod(Y);else O=O.clone();var Z=new X(1),K=new X(0),w=H.clone();while(O.cmpn(1)>0&&H.cmpn(1)>0){for(var B=0,P=1;(O.words[0]&P)===0&&B<26;++B,P<<=1);if(B>0){O.iushrn(B);while(B-- >0){if(Z.isOdd())Z.iadd(w);Z.iushrn(1)}}for(var z=0,A=1;(H.words[0]&A)===0&&z<26;++z,A<<=1);if(z>0){H.iushrn(z);while(z-- >0){if(K.isOdd())K.iadd(w);K.iushrn(1)}}if(O.cmp(H)>=0)O.isub(H),Z.isub(K);else H.isub(O),K.isub(Z)}var f;if(O.cmpn(1)===0)f=Z;else f=K;if(f.cmpn(0)<0)f.iadd(Y);return f},X.prototype.gcd=function(Y){if(this.isZero())return Y.abs();if(Y.isZero())return this.abs();var O=this.clone(),H=Y.clone();O.negative=0,H.negative=0;for(var Z=0;O.isEven()&&H.isEven();Z++)O.iushrn(1),H.iushrn(1);do{while(O.isEven())O.iushrn(1);while(H.isEven())H.iushrn(1);var K=O.cmp(H);if(K<0){var w=O;O=H,H=w}else if(K===0||H.cmpn(1)===0)break;O.isub(H)}while(!0);return H.iushln(Z)},X.prototype.invm=function(Y){return this.egcd(Y).a.umod(Y)},X.prototype.isEven=function(){return(this.words[0]&1)===0},X.prototype.isOdd=function(){return(this.words[0]&1)===1},X.prototype.andln=function(Y){return this.words[0]&Y},X.prototype.bincn=function(Y){j(typeof Y==="number");var O=Y%26,H=(Y-O)/26,Z=1<<O;if(this.length<=H)return this._expand(H+1),this.words[H]|=Z,this;var K=Z;for(var w=H;K!==0&&w<this.length;w++){var B=this.words[w]|0;B+=K,K=B>>>26,B&=67108863,this.words[w]=B}if(K!==0)this.words[w]=K,this.length++;return this},X.prototype.isZero=function(){return this.length===1&&this.words[0]===0},X.prototype.cmpn=function(Y){var O=Y<0;if(this.negative!==0&&!O)return-1;if(this.negative===0&&O)return 1;this.strip();var H;if(this.length>1)H=1;else{if(O)Y=-Y;j(Y<=67108863,"Number is too big");var Z=this.words[0]|0;H=Z===Y?0:Z<Y?-1:1}if(this.negative!==0)return-H|0;return H},X.prototype.cmp=function(Y){if(this.negative!==0&&Y.negative===0)return-1;if(this.negative===0&&Y.negative!==0)return 1;var O=this.ucmp(Y);if(this.negative!==0)return-O|0;return O},X.prototype.ucmp=function(Y){if(this.length>Y.length)return 1;if(this.length<Y.length)return-1;var O=0;for(var H=this.length-1;H>=0;H--){var Z=this.words[H]|0,K=Y.words[H]|0;if(Z===K)continue;if(Z<K)O=-1;else if(Z>K)O=1;break}return O},X.prototype.gtn=function(Y){return this.cmpn(Y)===1},X.prototype.gt=function(Y){return this.cmp(Y)===1},X.prototype.gten=function(Y){return this.cmpn(Y)>=0},X.prototype.gte=function(Y){return this.cmp(Y)>=0},X.prototype.ltn=function(Y){return this.cmpn(Y)===-1},X.prototype.lt=function(Y){return this.cmp(Y)===-1},X.prototype.lten=function(Y){return this.cmpn(Y)<=0},X.prototype.lte=function(Y){return this.cmp(Y)<=0},X.prototype.eqn=function(Y){return this.cmpn(Y)===0},X.prototype.eq=function(Y){return this.cmp(Y)===0},X.red=function(Y){return new U0(Y)},X.prototype.toRed=function(Y){return j(!this.red,"Already a number in reduction context"),j(this.negative===0,"red works only with positives"),Y.convertTo(this)._forceRed(Y)},X.prototype.fromRed=function(){return j(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},X.prototype._forceRed=function(Y){return this.red=Y,this},X.prototype.forceRed=function(Y){return j(!this.red,"Already a number in reduction context"),this._forceRed(Y)},X.prototype.redAdd=function(Y){return j(this.red,"redAdd works only with red numbers"),this.red.add(this,Y)},X.prototype.redIAdd=function(Y){return j(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,Y)},X.prototype.redSub=function(Y){return j(this.red,"redSub works only with red numbers"),this.red.sub(this,Y)},X.prototype.redISub=function(Y){return j(this.red,"redISub works only with red numbers"),this.red.isub(this,Y)},X.prototype.redShl=function(Y){return j(this.red,"redShl works only with red numbers"),this.red.shl(this,Y)},X.prototype.redMul=function(Y){return j(this.red,"redMul works only with red numbers"),this.red._verify2(this,Y),this.red.mul(this,Y)},X.prototype.redIMul=function(Y){return j(this.red,"redMul works only with red numbers"),this.red._verify2(this,Y),this.red.imul(this,Y)},X.prototype.redSqr=function(){return j(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},X.prototype.redISqr=function(){return j(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},X.prototype.redSqrt=function(){return j(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},X.prototype.redInvm=function(){return j(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},X.prototype.redNeg=function(){return j(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},X.prototype.redPow=function(Y){return j(this.red&&!Y.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,Y)};var s={k256:null,p224:null,p192:null,p25519:null};function j0(Y,O){this.name=Y,this.p=new X(O,16),this.n=this.p.bitLength(),this.k=new X(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}j0.prototype._tmp=function(){var Y=new X(null);return Y.words=Array(Math.ceil(this.n/13)),Y},j0.prototype.ireduce=function(Y){var O=Y,H;do this.split(O,this.tmp),O=this.imulK(O),O=O.iadd(this.tmp),H=O.bitLength();while(H>this.n);var Z=H<this.n?-1:O.ucmp(this.p);if(Z===0)O.words[0]=0,O.length=1;else if(Z>0)O.isub(this.p);else if(O.strip!==void 0)O.strip();else O._strip();return O},j0.prototype.split=function(Y,O){Y.iushrn(this.n,0,O)},j0.prototype.imulK=function(Y){return Y.imul(this.k)};function I0(){j0.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}G(I0,j0),I0.prototype.split=function(Y,O){var H=4194303,Z=Math.min(Y.length,9);for(var K=0;K<Z;K++)O.words[K]=Y.words[K];if(O.length=Z,Y.length<=9){Y.words[0]=0,Y.length=1;return}var w=Y.words[9];O.words[O.length++]=w&H;for(K=10;K<Y.length;K++){var B=Y.words[K]|0;Y.words[K-10]=(B&H)<<4|w>>>22,w=B}if(w>>>=22,Y.words[K-10]=w,w===0&&Y.length>10)Y.length-=10;else Y.length-=9},I0.prototype.imulK=function(Y){Y.words[Y.length]=0,Y.words[Y.length+1]=0,Y.length+=2;var O=0;for(var H=0;H<Y.length;H++){var Z=Y.words[H]|0;O+=Z*977,Y.words[H]=O&67108863,O=Z*64+(O/67108864|0)}if(Y.words[Y.length-1]===0){if(Y.length--,Y.words[Y.length-1]===0)Y.length--}return Y};function H0(){j0.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}G(H0,j0);function L0(){j0.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}G(L0,j0);function R0(){j0.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}G(R0,j0),R0.prototype.imulK=function(Y){var O=0;for(var H=0;H<Y.length;H++){var Z=(Y.words[H]|0)*19+O,K=Z&67108863;Z>>>=26,Y.words[H]=K,O=Z}if(O!==0)Y.words[Y.length++]=O;return Y},X._prime=function(Y){if(s[Y])return s[Y];var O;if(Y==="k256")O=new I0;else if(Y==="p224")O=new H0;else if(Y==="p192")O=new L0;else if(Y==="p25519")O=new R0;else throw Error("Unknown prime "+Y);return s[Y]=O,O};function U0(Y){if(typeof Y==="string"){var O=X._prime(Y);this.m=O.p,this.prime=O}else j(Y.gtn(1),"modulus must be greater than 1"),this.m=Y,this.prime=null}U0.prototype._verify1=function(Y){j(Y.negative===0,"red works only with positives"),j(Y.red,"red works only with red numbers")},U0.prototype._verify2=function(Y,O){j((Y.negative|O.negative)===0,"red works only with positives"),j(Y.red&&Y.red===O.red,"red works only with red numbers")},U0.prototype.imod=function(Y){if(this.prime)return this.prime.ireduce(Y)._forceRed(this);return Y.umod(this.m)._forceRed(this)},U0.prototype.neg=function(Y){if(Y.isZero())return Y.clone();return this.m.sub(Y)._forceRed(this)},U0.prototype.add=function(Y,O){this._verify2(Y,O);var H=Y.add(O);if(H.cmp(this.m)>=0)H.isub(this.m);return H._forceRed(this)},U0.prototype.iadd=function(Y,O){this._verify2(Y,O);var H=Y.iadd(O);if(H.cmp(this.m)>=0)H.isub(this.m);return H},U0.prototype.sub=function(Y,O){this._verify2(Y,O);var H=Y.sub(O);if(H.cmpn(0)<0)H.iadd(this.m);return H._forceRed(this)},U0.prototype.isub=function(Y,O){this._verify2(Y,O);var H=Y.isub(O);if(H.cmpn(0)<0)H.iadd(this.m);return H},U0.prototype.shl=function(Y,O){return this._verify1(Y),this.imod(Y.ushln(O))},U0.prototype.imul=function(Y,O){return this._verify2(Y,O),this.imod(Y.imul(O))},U0.prototype.mul=function(Y,O){return this._verify2(Y,O),this.imod(Y.mul(O))},U0.prototype.isqr=function(Y){return this.imul(Y,Y.clone())},U0.prototype.sqr=function(Y){return this.mul(Y,Y)},U0.prototype.sqrt=function(Y){if(Y.isZero())return Y.clone();var O=this.m.andln(3);if(j(O%2===1),O===3){var H=this.m.add(new X(1)).iushrn(2);return this.pow(Y,H)}var Z=this.m.subn(1),K=0;while(!Z.isZero()&&Z.andln(1)===0)K++,Z.iushrn(1);j(!Z.isZero());var w=new X(1).toRed(this),B=w.redNeg(),P=this.m.subn(1).iushrn(1),z=this.m.bitLength();z=new X(2*z*z).toRed(this);while(this.pow(z,P).cmp(B)!==0)z.redIAdd(B);var A=this.pow(z,Z),f=this.pow(Y,Z.addn(1).iushrn(1)),c=this.pow(Y,Z),p=K;while(c.cmp(w)!==0){var Q0=c;for(var F0=0;Q0.cmp(w)!==0;F0++)Q0=Q0.redSqr();j(F0<p);var P0=this.pow(A,new X(1).iushln(p-F0-1));f=f.redMul(P0),A=P0.redSqr(),c=c.redMul(A),p=F0}return f},U0.prototype.invm=function(Y){var O=Y._invmp(this.m);if(O.negative!==0)return O.negative=0,this.imod(O).redNeg();else return this.imod(O)},U0.prototype.pow=function(Y,O){if(O.isZero())return new X(1).toRed(this);if(O.cmpn(1)===0)return Y.clone();var H=4,Z=Array(1<<H);Z[0]=new X(1).toRed(this),Z[1]=Y;for(var K=2;K<Z.length;K++)Z[K]=this.mul(Z[K-1],Y);var w=Z[0],B=0,P=0,z=O.bitLength()%26;if(z===0)z=26;for(K=O.length-1;K>=0;K--){var A=O.words[K];for(var f=z-1;f>=0;f--){var c=A>>f&1;if(w!==Z[0])w=this.sqr(w);if(c===0&&B===0){P=0;continue}if(B<<=1,B|=c,P++,P!==H&&(K!==0||f!==0))continue;w=this.mul(w,Z[B]),P=0,B=0}z=26}return w},U0.prototype.convertTo=function(Y){var O=Y.umod(this.m);return O===Y?O.clone():O},U0.prototype.convertFrom=function(Y){var O=Y.clone();return O.red=null,O},X.mont=function(Y){return new c0(Y)};function c0(Y){if(U0.call(this,Y),this.shift=this.m.bitLength(),this.shift%26!==0)this.shift+=26-this.shift%26;this.r=new X(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}G(c0,U0),c0.prototype.convertTo=function(Y){return this.imod(Y.ushln(this.shift))},c0.prototype.convertFrom=function(Y){var O=this.imod(Y.mul(this.rinv));return O.red=null,O},c0.prototype.imul=function(Y,O){if(Y.isZero()||O.isZero())return Y.words[0]=0,Y.length=1,Y;var H=Y.imul(O),Z=H.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),K=H.isub(Z).iushrn(this.shift),w=K;if(K.cmp(this.m)>=0)w=K.isub(this.m);else if(K.cmpn(0)<0)w=K.iadd(this.m);return w._forceRed(this)},c0.prototype.mul=function(Y,O){if(Y.isZero()||O.isZero())return new X(0)._forceRed(this);var H=Y.mul(O),Z=H.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),K=H.isub(Z).iushrn(this.shift),w=K;if(K.cmp(this.m)>=0)w=K.isub(this.m);else if(K.cmpn(0)<0)w=K.iadd(this.m);return w._forceRed(this)},c0.prototype.invm=function(Y){var O=this.imod(Y._invmp(this.m).mul(this.r2));return O._forceRed(this)}})(typeof _>"u"||_,$)}),hN=E$(($,_)=>{var I=JA(),J=v6().Buffer;function j(G,X){return J.from(G.toRed(I.mont(X.modulus)).redPow(new I(X.publicExponent)).fromRed().toArray())}_.exports=j}),fm=E$(($,_)=>{(function(I,J){function j(Z,K){if(!Z)throw Error(K||"Assertion failed")}function G(Z,K){Z.super_=K;var w=function(){};w.prototype=K.prototype,Z.prototype=new w,Z.prototype.constructor=Z}function X(Z,K,w){if(X.isBN(Z))return Z;if(this.negative=0,this.words=null,this.length=0,this.red=null,Z!==null){if(K==="le"||K==="be")w=K,K=10;this._init(Z||0,K||10,w||"be")}}if(typeof I==="object")I.exports=X;else J.BN=X;X.BN=X,X.wordSize=26;var W;try{if(typeof window<"u"&&typeof window.Buffer<"u")W=window.Buffer;else W=(j_(),X1(__)).Buffer}catch(Z){}X.isBN=function(Z){if(Z instanceof X)return!0;return Z!==null&&typeof Z==="object"&&Z.constructor.wordSize===X.wordSize&&Array.isArray(Z.words)},X.max=function(Z,K){if(Z.cmp(K)>0)return Z;return K},X.min=function(Z,K){if(Z.cmp(K)<0)return Z;return K},X.prototype._init=function(Z,K,w){if(typeof Z==="number")return this._initNumber(Z,K,w);if(typeof Z==="object")return this._initArray(Z,K,w);if(K==="hex")K=16;j(K===(K|0)&&K>=2&&K<=36),Z=Z.toString().replace(/\s+/g,"");var B=0;if(Z[0]==="-")B++,this.negative=1;if(B<Z.length){if(K===16)this._parseHex(Z,B,w);else if(this._parseBase(Z,K,B),w==="le")this._initArray(this.toArray(),K,w)}},X.prototype._initNumber=function(Z,K,w){if(Z<0)this.negative=1,Z=-Z;if(Z<67108864)this.words=[Z&67108863],this.length=1;else if(Z<4503599627370496)this.words=[Z&67108863,Z/67108864&67108863],this.length=2;else j(Z<9007199254740992),this.words=[Z&67108863,Z/67108864&67108863,1],this.length=3;if(w!=="le")return;this._initArray(this.toArray(),K,w)},X.prototype._initArray=function(Z,K,w){if(j(typeof Z.length==="number"),Z.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(Z.length/3),this.words=Array(this.length);for(var B=0;B<this.length;B++)this.words[B]=0;var P,z,A=0;if(w==="be"){for(B=Z.length-1,P=0;B>=0;B-=3)if(z=Z[B]|Z[B-1]<<8|Z[B-2]<<16,this.words[P]|=z<<A&67108863,this.words[P+1]=z>>>26-A&67108863,A+=24,A>=26)A-=26,P++}else if(w==="le"){for(B=0,P=0;B<Z.length;B+=3)if(z=Z[B]|Z[B+1]<<8|Z[B+2]<<16,this.words[P]|=z<<A&67108863,this.words[P+1]=z>>>26-A&67108863,A+=24,A>=26)A-=26,P++}return this._strip()};function T(Z,K){var w=Z.charCodeAt(K);if(w>=48&&w<=57)return w-48;else if(w>=65&&w<=70)return w-55;else if(w>=97&&w<=102)return w-87;else j(!1,"Invalid character in "+Z)}function F(Z,K,w){var B=T(Z,w);if(w-1>=K)B|=T(Z,w-1)<<4;return B}X.prototype._parseHex=function(Z,K,w){this.length=Math.ceil((Z.length-K)/6),this.words=Array(this.length);for(var B=0;B<this.length;B++)this.words[B]=0;var P=0,z=0,A;if(w==="be")for(B=Z.length-1;B>=K;B-=2)if(A=F(Z,K,B)<<P,this.words[z]|=A&67108863,P>=18)P-=18,z+=1,this.words[z]|=A>>>26;else P+=8;else{var f=Z.length-K;for(B=f%2===0?K+1:K;B<Z.length;B+=2)if(A=F(Z,K,B)<<P,this.words[z]|=A&67108863,P>=18)P-=18,z+=1,this.words[z]|=A>>>26;else P+=8}this._strip()};function E(Z,K,w,B){var P=0,z=0,A=Math.min(Z.length,w);for(var f=K;f<A;f++){var c=Z.charCodeAt(f)-48;if(P*=B,c>=49)z=c-49+10;else if(c>=17)z=c-17+10;else z=c;j(c>=0&&z<B,"Invalid character"),P+=z}return P}X.prototype._parseBase=function(Z,K,w){this.words=[0],this.length=1;for(var B=0,P=1;P<=67108863;P*=K)B++;B--,P=P/K|0;var z=Z.length-w,A=z%B,f=Math.min(z,z-A)+w,c=0;for(var p=w;p<f;p+=B)if(c=E(Z,p,p+B,K),this.imuln(P),this.words[0]+c<67108864)this.words[0]+=c;else this._iaddn(c);if(A!==0){var Q0=1;c=E(Z,p,Z.length,K);for(p=0;p<A;p++)Q0*=K;if(this.imuln(Q0),this.words[0]+c<67108864)this.words[0]+=c;else this._iaddn(c)}this._strip()},X.prototype.copy=function(Z){Z.words=Array(this.length);for(var K=0;K<this.length;K++)Z.words[K]=this.words[K];Z.length=this.length,Z.negative=this.negative,Z.red=this.red};function D(Z,K){Z.words=K.words,Z.length=K.length,Z.negative=K.negative,Z.red=K.red}if(X.prototype._move=function(Z){D(Z,this)},X.prototype.clone=function(){var Z=new X(null);return this.copy(Z),Z},X.prototype._expand=function(Z){while(this.length<Z)this.words[this.length++]=0;return this},X.prototype._strip=function(){while(this.length>1&&this.words[this.length-1]===0)this.length--;return this._normSign()},X.prototype._normSign=function(){if(this.length===1&&this.words[0]===0)this.negative=0;return this},typeof Symbol<"u"&&typeof Symbol.for==="function")try{X.prototype[Symbol.for("nodejs.util.inspect.custom")]=q}catch(Z){X.prototype.inspect=q}else X.prototype.inspect=q;function q(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var S=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],k=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],y=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64000000,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,24300000,28629151,33554432,39135393,45435424,52521875,60466176];if(X.prototype.toString=function(Z,K){Z=Z||10,K=K|0||1;var w;if(Z===16||Z==="hex"){w="";var B=0,P=0;for(var z=0;z<this.length;z++){var A=this.words[z],f=((A<<B|P)&16777215).toString(16);if(P=A>>>24-B&16777215,B+=2,B>=26)B-=26,z--;if(P!==0||z!==this.length-1)w=S[6-f.length]+f+w;else w=f+w}if(P!==0)w=P.toString(16)+w;while(w.length%K!==0)w="0"+w;if(this.negative!==0)w="-"+w;return w}if(Z===(Z|0)&&Z>=2&&Z<=36){var c=k[Z],p=y[Z];w="";var Q0=this.clone();Q0.negative=0;while(!Q0.isZero()){var F0=Q0.modrn(p).toString(Z);if(Q0=Q0.idivn(p),!Q0.isZero())w=S[c-F0.length]+F0+w;else w=F0+w}if(this.isZero())w="0"+w;while(w.length%K!==0)w="0"+w;if(this.negative!==0)w="-"+w;return w}j(!1,"Base should be between 2 and 36")},X.prototype.toNumber=function(){var Z=this.words[0];if(this.length===2)Z+=this.words[1]*67108864;else if(this.length===3&&this.words[2]===1)Z+=4503599627370496+this.words[1]*67108864;else if(this.length>2)j(!1,"Number can only safely store up to 53 bits");return this.negative!==0?-Z:Z},X.prototype.toJSON=function(){return this.toString(16,2)},W)X.prototype.toBuffer=function(Z,K){return this.toArrayLike(W,Z,K)};X.prototype.toArray=function(Z,K){return this.toArrayLike(Array,Z,K)};var m=function(Z,K){if(Z.allocUnsafe)return Z.allocUnsafe(K);return new Z(K)};if(X.prototype.toArrayLike=function(Z,K,w){this._strip();var B=this.byteLength(),P=w||Math.max(1,B);j(B<=P,"byte array longer than desired length"),j(P>0,"Requested array length <= 0");var z=m(Z,P),A=K==="le"?"LE":"BE";return this["_toArrayLike"+A](z,B),z},X.prototype._toArrayLikeLE=function(Z,K){var w=0,B=0;for(var P=0,z=0;P<this.length;P++){var A=this.words[P]<<z|B;if(Z[w++]=A&255,w<Z.length)Z[w++]=A>>8&255;if(w<Z.length)Z[w++]=A>>16&255;if(z===6){if(w<Z.length)Z[w++]=A>>24&255;B=0,z=0}else B=A>>>24,z+=2}if(w<Z.length){Z[w++]=B;while(w<Z.length)Z[w++]=0}},X.prototype._toArrayLikeBE=function(Z,K){var w=Z.length-1,B=0;for(var P=0,z=0;P<this.length;P++){var A=this.words[P]<<z|B;if(Z[w--]=A&255,w>=0)Z[w--]=A>>8&255;if(w>=0)Z[w--]=A>>16&255;if(z===6){if(w>=0)Z[w--]=A>>24&255;B=0,z=0}else B=A>>>24,z+=2}if(w>=0){Z[w--]=B;while(w>=0)Z[w--]=0}},Math.clz32)X.prototype._countBits=function(Z){return 32-Math.clz32(Z)};else X.prototype._countBits=function(Z){var K=Z,w=0;if(K>=4096)w+=13,K>>>=13;if(K>=64)w+=7,K>>>=7;if(K>=8)w+=4,K>>>=4;if(K>=2)w+=2,K>>>=2;return w+K};X.prototype._zeroBits=function(Z){if(Z===0)return 26;var K=Z,w=0;if((K&8191)===0)w+=13,K>>>=13;if((K&127)===0)w+=7,K>>>=7;if((K&15)===0)w+=4,K>>>=4;if((K&3)===0)w+=2,K>>>=2;if((K&1)===0)w++;return w},X.prototype.bitLength=function(){var Z=this.words[this.length-1],K=this._countBits(Z);return(this.length-1)*26+K};function n(Z){var K=Array(Z.bitLength());for(var w=0;w<K.length;w++){var B=w/26|0,P=w%26;K[w]=Z.words[B]>>>P&1}return K}X.prototype.zeroBits=function(){if(this.isZero())return 0;var Z=0;for(var K=0;K<this.length;K++){var w=this._zeroBits(this.words[K]);if(Z+=w,w!==26)break}return Z},X.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},X.prototype.toTwos=function(Z){if(this.negative!==0)return this.abs().inotn(Z).iaddn(1);return this.clone()},X.prototype.fromTwos=function(Z){if(this.testn(Z-1))return this.notn(Z).iaddn(1).ineg();return this.clone()},X.prototype.isNeg=function(){return this.negative!==0},X.prototype.neg=function(){return this.clone().ineg()},X.prototype.ineg=function(){if(!this.isZero())this.negative^=1;return this},X.prototype.iuor=function(Z){while(this.length<Z.length)this.words[this.length++]=0;for(var K=0;K<Z.length;K++)this.words[K]=this.words[K]|Z.words[K];return this._strip()},X.prototype.ior=function(Z){return j((this.negative|Z.negative)===0),this.iuor(Z)},X.prototype.or=function(Z){if(this.length>Z.length)return this.clone().ior(Z);return Z.clone().ior(this)},X.prototype.uor=function(Z){if(this.length>Z.length)return this.clone().iuor(Z);return Z.clone().iuor(this)},X.prototype.iuand=function(Z){var K;if(this.length>Z.length)K=Z;else K=this;for(var w=0;w<K.length;w++)this.words[w]=this.words[w]&Z.words[w];return this.length=K.length,this._strip()},X.prototype.iand=function(Z){return j((this.negative|Z.negative)===0),this.iuand(Z)},X.prototype.and=function(Z){if(this.length>Z.length)return this.clone().iand(Z);return Z.clone().iand(this)},X.prototype.uand=function(Z){if(this.length>Z.length)return this.clone().iuand(Z);return Z.clone().iuand(this)},X.prototype.iuxor=function(Z){var K,w;if(this.length>Z.length)K=this,w=Z;else K=Z,w=this;for(var B=0;B<w.length;B++)this.words[B]=K.words[B]^w.words[B];if(this!==K)for(;B<K.length;B++)this.words[B]=K.words[B];return this.length=K.length,this._strip()},X.prototype.ixor=function(Z){return j((this.negative|Z.negative)===0),this.iuxor(Z)},X.prototype.xor=function(Z){if(this.length>Z.length)return this.clone().ixor(Z);return Z.clone().ixor(this)},X.prototype.uxor=function(Z){if(this.length>Z.length)return this.clone().iuxor(Z);return Z.clone().iuxor(this)},X.prototype.inotn=function(Z){j(typeof Z==="number"&&Z>=0);var K=Math.ceil(Z/26)|0,w=Z%26;if(this._expand(K),w>0)K--;for(var B=0;B<K;B++)this.words[B]=~this.words[B]&67108863;if(w>0)this.words[B]=~this.words[B]&67108863>>26-w;return this._strip()},X.prototype.notn=function(Z){return this.clone().inotn(Z)},X.prototype.setn=function(Z,K){j(typeof Z==="number"&&Z>=0);var w=Z/26|0,B=Z%26;if(this._expand(w+1),K)this.words[w]=this.words[w]|1<<B;else this.words[w]=this.words[w]&~(1<<B);return this._strip()},X.prototype.iadd=function(Z){var K;if(this.negative!==0&&Z.negative===0)return this.negative=0,K=this.isub(Z),this.negative^=1,this._normSign();else if(this.negative===0&&Z.negative!==0)return Z.negative=0,K=this.isub(Z),Z.negative=1,K._normSign();var w,B;if(this.length>Z.length)w=this,B=Z;else w=Z,B=this;var P=0;for(var z=0;z<B.length;z++)K=(w.words[z]|0)+(B.words[z]|0)+P,this.words[z]=K&67108863,P=K>>>26;for(;P!==0&&z<w.length;z++)K=(w.words[z]|0)+P,this.words[z]=K&67108863,P=K>>>26;if(this.length=w.length,P!==0)this.words[this.length]=P,this.length++;else if(w!==this)for(;z<w.length;z++)this.words[z]=w.words[z];return this},X.prototype.add=function(Z){var K;if(Z.negative!==0&&this.negative===0)return Z.negative=0,K=this.sub(Z),Z.negative^=1,K;else if(Z.negative===0&&this.negative!==0)return this.negative=0,K=Z.sub(this),this.negative=1,K;if(this.length>Z.length)return this.clone().iadd(Z);return Z.clone().iadd(this)},X.prototype.isub=function(Z){if(Z.negative!==0){Z.negative=0;var K=this.iadd(Z);return Z.negative=1,K._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(Z),this.negative=1,this._normSign();var w=this.cmp(Z);if(w===0)return this.negative=0,this.length=1,this.words[0]=0,this;var B,P;if(w>0)B=this,P=Z;else B=Z,P=this;var z=0;for(var A=0;A<P.length;A++)K=(B.words[A]|0)-(P.words[A]|0)+z,z=K>>26,this.words[A]=K&67108863;for(;z!==0&&A<B.length;A++)K=(B.words[A]|0)+z,z=K>>26,this.words[A]=K&67108863;if(z===0&&A<B.length&&B!==this)for(;A<B.length;A++)this.words[A]=B.words[A];if(this.length=Math.max(this.length,A),B!==this)this.negative=1;return this._strip()},X.prototype.sub=function(Z){return this.clone().isub(Z)};function h(Z,K,w){w.negative=K.negative^Z.negative;var B=Z.length+K.length|0;w.length=B,B=B-1|0;var P=Z.words[0]|0,z=K.words[0]|0,A=P*z,f=A&67108863,c=A/67108864|0;w.words[0]=f;for(var p=1;p<B;p++){var Q0=c>>>26,F0=c&67108863,P0=Math.min(p,K.length-1);for(var E0=Math.max(0,p-Z.length+1);E0<=P0;E0++){var _0=p-E0|0;P=Z.words[_0]|0,z=K.words[E0]|0,A=P*z+F0,Q0+=A/67108864|0,F0=A&67108863}w.words[p]=F0|0,c=Q0|0}if(c!==0)w.words[p]=c|0;else w.length--;return w._strip()}var i=function(Z,K,w){var B=Z.words,P=K.words,z=w.words,A=0,f,c,p,Q0=B[0]|0,F0=Q0&8191,P0=Q0>>>13,E0=B[1]|0,_0=E0&8191,$0=E0>>>13,G0=B[2]|0,K0=G0&8191,q0=G0>>>13,z0=B[3]|0,a=z0&8191,J0=z0>>>13,y0=B[4]|0,N0=y0&8191,A0=y0>>>13,$$=B[5]|0,w0=$$&8191,h0=$$>>>13,H$=B[6]|0,p0=H$&8191,j$=H$>>>13,p$=B[7]|0,C0=p$&8191,x0=p$>>>13,T$=B[8]|0,U$=T$&8191,G$=T$>>>13,T0=B[9]|0,u0=T0&8191,i0=T0>>>13,R$=P[0]|0,d=R$&8191,O0=R$>>>13,X0=P[1]|0,k0=X0&8191,d0=X0>>>13,r=P[2]|0,S0=r&8191,b0=r>>>13,D0=P[3]|0,g0=D0&8191,m0=D0>>>13,u$=P[4]|0,Y$=u$&8191,Y0=u$>>>13,B0=P[5]|0,s0=B0&8191,a0=B0>>>13,g$=P[6]|0,D$=g$&8191,F$=g$>>>13,A1=P[7]|0,c$=A1&8191,q$=A1>>>13,Y1=P[8]|0,O$=Y1&8191,V$=Y1>>>13,w1=P[9]|0,j1=w1&8191,v1=w1>>>13;w.negative=Z.negative^K.negative,w.length=19,f=Math.imul(F0,d),c=Math.imul(F0,O0),c=c+Math.imul(P0,d)|0,p=Math.imul(P0,O0);var I2=(A+f|0)+((c&8191)<<13)|0;A=(p+(c>>>13)|0)+(I2>>>26)|0,I2&=67108863,f=Math.imul(_0,d),c=Math.imul(_0,O0),c=c+Math.imul($0,d)|0,p=Math.imul($0,O0),f=f+Math.imul(F0,k0)|0,c=c+Math.imul(F0,d0)|0,c=c+Math.imul(P0,k0)|0,p=p+Math.imul(P0,d0)|0;var W1=(A+f|0)+((c&8191)<<13)|0;A=(p+(c>>>13)|0)+(W1>>>26)|0,W1&=67108863,f=Math.imul(K0,d),c=Math.imul(K0,O0),c=c+Math.imul(q0,d)|0,p=Math.imul(q0,O0),f=f+Math.imul(_0,k0)|0,c=c+Math.imul(_0,d0)|0,c=c+Math.imul($0,k0)|0,p=p+Math.imul($0,d0)|0,f=f+Math.imul(F0,S0)|0,c=c+Math.imul(F0,b0)|0,c=c+Math.imul(P0,S0)|0,p=p+Math.imul(P0,b0)|0;var A2=(A+f|0)+((c&8191)<<13)|0;A=(p+(c>>>13)|0)+(A2>>>26)|0,A2&=67108863,f=Math.imul(a,d),c=Math.imul(a,O0),c=c+Math.imul(J0,d)|0,p=Math.imul(J0,O0),f=f+Math.imul(K0,k0)|0,c=c+Math.imul(K0,d0)|0,c=c+Math.imul(q0,k0)|0,p=p+Math.imul(q0,d0)|0,f=f+Math.imul(_0,S0)|0,c=c+Math.imul(_0,b0)|0,c=c+Math.imul($0,S0)|0,p=p+Math.imul($0,b0)|0,f=f+Math.imul(F0,g0)|0,c=c+Math.imul(F0,m0)|0,c=c+Math.imul(P0,g0)|0,p=p+Math.imul(P0,m0)|0;var c2=(A+f|0)+((c&8191)<<13)|0;A=(p+(c>>>13)|0)+(c2>>>26)|0,c2&=67108863,f=Math.imul(N0,d),c=Math.imul(N0,O0),c=c+Math.imul(A0,d)|0,p=Math.imul(A0,O0),f=f+Math.imul(a,k0)|0,c=c+Math.imul(a,d0)|0,c=c+Math.imul(J0,k0)|0,p=p+Math.imul(J0,d0)|0,f=f+Math.imul(K0,S0)|0,c=c+Math.imul(K0,b0)|0,c=c+Math.imul(q0,S0)|0,p=p+Math.imul(q0,b0)|0,f=f+Math.imul(_0,g0)|0,c=c+Math.imul(_0,m0)|0,c=c+Math.imul($0,g0)|0,p=p+Math.imul($0,m0)|0,f=f+Math.imul(F0,Y$)|0,c=c+Math.imul(F0,Y0)|0,c=c+Math.imul(P0,Y$)|0,p=p+Math.imul(P0,Y0)|0;var M2=(A+f|0)+((c&8191)<<13)|0;A=(p+(c>>>13)|0)+(M2>>>26)|0,M2&=67108863,f=Math.imul(w0,d),c=Math.imul(w0,O0),c=c+Math.imul(h0,d)|0,p=Math.imul(h0,O0),f=f+Math.imul(N0,k0)|0,c=c+Math.imul(N0,d0)|0,c=c+Math.imul(A0,k0)|0,p=p+Math.imul(A0,d0)|0,f=f+Math.imul(a,S0)|0,c=c+Math.imul(a,b0)|0,c=c+Math.imul(J0,S0)|0,p=p+Math.imul(J0,b0)|0,f=f+Math.imul(K0,g0)|0,c=c+Math.imul(K0,m0)|0,c=c+Math.imul(q0,g0)|0,p=p+Math.imul(q0,m0)|0,f=f+Math.imul(_0,Y$)|0,c=c+Math.imul(_0,Y0)|0,c=c+Math.imul($0,Y$)|0,p=p+Math.imul($0,Y0)|0,f=f+Math.imul(F0,s0)|0,c=c+Math.imul(F0,a0)|0,c=c+Math.imul(P0,s0)|0,p=p+Math.imul(P0,a0)|0;var Gv=(A+f|0)+((c&8191)<<13)|0;A=(p+(c>>>13)|0)+(Gv>>>26)|0,Gv&=67108863,f=Math.imul(p0,d),c=Math.imul(p0,O0),c=c+Math.imul(j$,d)|0,p=Math.imul(j$,O0),f=f+Math.imul(w0,k0)|0,c=c+Math.imul(w0,d0)|0,c=c+Math.imul(h0,k0)|0,p=p+Math.imul(h0,d0)|0,f=f+Math.imul(N0,S0)|0,c=c+Math.imul(N0,b0)|0,c=c+Math.imul(A0,S0)|0,p=p+Math.imul(A0,b0)|0,f=f+Math.imul(a,g0)|0,c=c+Math.imul(a,m0)|0,c=c+Math.imul(J0,g0)|0,p=p+Math.imul(J0,m0)|0,f=f+Math.imul(K0,Y$)|0,c=c+Math.imul(K0,Y0)|0,c=c+Math.imul(q0,Y$)|0,p=p+Math.imul(q0,Y0)|0,f=f+Math.imul(_0,s0)|0,c=c+Math.imul(_0,a0)|0,c=c+Math.imul($0,s0)|0,p=p+Math.imul($0,a0)|0,f=f+Math.imul(F0,D$)|0,c=c+Math.imul(F0,F$)|0,c=c+Math.imul(P0,D$)|0,p=p+Math.imul(P0,F$)|0;var f1=(A+f|0)+((c&8191)<<13)|0;A=(p+(c>>>13)|0)+(f1>>>26)|0,f1&=67108863,f=Math.imul(C0,d),c=Math.imul(C0,O0),c=c+Math.imul(x0,d)|0,p=Math.imul(x0,O0),f=f+Math.imul(p0,k0)|0,c=c+Math.imul(p0,d0)|0,c=c+Math.imul(j$,k0)|0,p=p+Math.imul(j$,d0)|0,f=f+Math.imul(w0,S0)|0,c=c+Math.imul(w0,b0)|0,c=c+Math.imul(h0,S0)|0,p=p+Math.imul(h0,b0)|0,f=f+Math.imul(N0,g0)|0,c=c+Math.imul(N0,m0)|0,c=c+Math.imul(A0,g0)|0,p=p+Math.imul(A0,m0)|0,f=f+Math.imul(a,Y$)|0,c=c+Math.imul(a,Y0)|0,c=c+Math.imul(J0,Y$)|0,p=p+Math.imul(J0,Y0)|0,f=f+Math.imul(K0,s0)|0,c=c+Math.imul(K0,a0)|0,c=c+Math.imul(q0,s0)|0,p=p+Math.imul(q0,a0)|0,f=f+Math.imul(_0,D$)|0,c=c+Math.imul(_0,F$)|0,c=c+Math.imul($0,D$)|0,p=p+Math.imul($0,F$)|0,f=f+Math.imul(F0,c$)|0,c=c+Math.imul(F0,q$)|0,c=c+Math.imul(P0,c$)|0,p=p+Math.imul(P0,q$)|0;var o1=(A+f|0)+((c&8191)<<13)|0;A=(p+(c>>>13)|0)+(o1>>>26)|0,o1&=67108863,f=Math.imul(U$,d),c=Math.imul(U$,O0),c=c+Math.imul(G$,d)|0,p=Math.imul(G$,O0),f=f+Math.imul(C0,k0)|0,c=c+Math.imul(C0,d0)|0,c=c+Math.imul(x0,k0)|0,p=p+Math.imul(x0,d0)|0,f=f+Math.imul(p0,S0)|0,c=c+Math.imul(p0,b0)|0,c=c+Math.imul(j$,S0)|0,p=p+Math.imul(j$,b0)|0,f=f+Math.imul(w0,g0)|0,c=c+Math.imul(w0,m0)|0,c=c+Math.imul(h0,g0)|0,p=p+Math.imul(h0,m0)|0,f=f+Math.imul(N0,Y$)|0,c=c+Math.imul(N0,Y0)|0,c=c+Math.imul(A0,Y$)|0,p=p+Math.imul(A0,Y0)|0,f=f+Math.imul(a,s0)|0,c=c+Math.imul(a,a0)|0,c=c+Math.imul(J0,s0)|0,p=p+Math.imul(J0,a0)|0,f=f+Math.imul(K0,D$)|0,c=c+Math.imul(K0,F$)|0,c=c+Math.imul(q0,D$)|0,p=p+Math.imul(q0,F$)|0,f=f+Math.imul(_0,c$)|0,c=c+Math.imul(_0,q$)|0,c=c+Math.imul($0,c$)|0,p=p+Math.imul($0,q$)|0,f=f+Math.imul(F0,O$)|0,c=c+Math.imul(F0,V$)|0,c=c+Math.imul(P0,O$)|0,p=p+Math.imul(P0,V$)|0;var E2=(A+f|0)+((c&8191)<<13)|0;A=(p+(c>>>13)|0)+(E2>>>26)|0,E2&=67108863,f=Math.imul(u0,d),c=Math.imul(u0,O0),c=c+Math.imul(i0,d)|0,p=Math.imul(i0,O0),f=f+Math.imul(U$,k0)|0,c=c+Math.imul(U$,d0)|0,c=c+Math.imul(G$,k0)|0,p=p+Math.imul(G$,d0)|0,f=f+Math.imul(C0,S0)|0,c=c+Math.imul(C0,b0)|0,c=c+Math.imul(x0,S0)|0,p=p+Math.imul(x0,b0)|0,f=f+Math.imul(p0,g0)|0,c=c+Math.imul(p0,m0)|0,c=c+Math.imul(j$,g0)|0,p=p+Math.imul(j$,m0)|0,f=f+Math.imul(w0,Y$)|0,c=c+Math.imul(w0,Y0)|0,c=c+Math.imul(h0,Y$)|0,p=p+Math.imul(h0,Y0)|0,f=f+Math.imul(N0,s0)|0,c=c+Math.imul(N0,a0)|0,c=c+Math.imul(A0,s0)|0,p=p+Math.imul(A0,a0)|0,f=f+Math.imul(a,D$)|0,c=c+Math.imul(a,F$)|0,c=c+Math.imul(J0,D$)|0,p=p+Math.imul(J0,F$)|0,f=f+Math.imul(K0,c$)|0,c=c+Math.imul(K0,q$)|0,c=c+Math.imul(q0,c$)|0,p=p+Math.imul(q0,q$)|0,f=f+Math.imul(_0,O$)|0,c=c+Math.imul(_0,V$)|0,c=c+Math.imul($0,O$)|0,p=p+Math.imul($0,V$)|0,f=f+Math.imul(F0,j1)|0,c=c+Math.imul(F0,v1)|0,c=c+Math.imul(P0,j1)|0,p=p+Math.imul(P0,v1)|0;var x2=(A+f|0)+((c&8191)<<13)|0;A=(p+(c>>>13)|0)+(x2>>>26)|0,x2&=67108863,f=Math.imul(u0,k0),c=Math.imul(u0,d0),c=c+Math.imul(i0,k0)|0,p=Math.imul(i0,d0),f=f+Math.imul(U$,S0)|0,c=c+Math.imul(U$,b0)|0,c=c+Math.imul(G$,S0)|0,p=p+Math.imul(G$,b0)|0,f=f+Math.imul(C0,g0)|0,c=c+Math.imul(C0,m0)|0,c=c+Math.imul(x0,g0)|0,p=p+Math.imul(x0,m0)|0,f=f+Math.imul(p0,Y$)|0,c=c+Math.imul(p0,Y0)|0,c=c+Math.imul(j$,Y$)|0,p=p+Math.imul(j$,Y0)|0,f=f+Math.imul(w0,s0)|0,c=c+Math.imul(w0,a0)|0,c=c+Math.imul(h0,s0)|0,p=p+Math.imul(h0,a0)|0,f=f+Math.imul(N0,D$)|0,c=c+Math.imul(N0,F$)|0,c=c+Math.imul(A0,D$)|0,p=p+Math.imul(A0,F$)|0,f=f+Math.imul(a,c$)|0,c=c+Math.imul(a,q$)|0,c=c+Math.imul(J0,c$)|0,p=p+Math.imul(J0,q$)|0,f=f+Math.imul(K0,O$)|0,c=c+Math.imul(K0,V$)|0,c=c+Math.imul(q0,O$)|0,p=p+Math.imul(q0,V$)|0,f=f+Math.imul(_0,j1)|0,c=c+Math.imul(_0,v1)|0,c=c+Math.imul($0,j1)|0,p=p+Math.imul($0,v1)|0;var W2=(A+f|0)+((c&8191)<<13)|0;A=(p+(c>>>13)|0)+(W2>>>26)|0,W2&=67108863,f=Math.imul(u0,S0),c=Math.imul(u0,b0),c=c+Math.imul(i0,S0)|0,p=Math.imul(i0,b0),f=f+Math.imul(U$,g0)|0,c=c+Math.imul(U$,m0)|0,c=c+Math.imul(G$,g0)|0,p=p+Math.imul(G$,m0)|0,f=f+Math.imul(C0,Y$)|0,c=c+Math.imul(C0,Y0)|0,c=c+Math.imul(x0,Y$)|0,p=p+Math.imul(x0,Y0)|0,f=f+Math.imul(p0,s0)|0,c=c+Math.imul(p0,a0)|0,c=c+Math.imul(j$,s0)|0,p=p+Math.imul(j$,a0)|0,f=f+Math.imul(w0,D$)|0,c=c+Math.imul(w0,F$)|0,c=c+Math.imul(h0,D$)|0,p=p+Math.imul(h0,F$)|0,f=f+Math.imul(N0,c$)|0,c=c+Math.imul(N0,q$)|0,c=c+Math.imul(A0,c$)|0,p=p+Math.imul(A0,q$)|0,f=f+Math.imul(a,O$)|0,c=c+Math.imul(a,V$)|0,c=c+Math.imul(J0,O$)|0,p=p+Math.imul(J0,V$)|0,f=f+Math.imul(K0,j1)|0,c=c+Math.imul(K0,v1)|0,c=c+Math.imul(q0,j1)|0,p=p+Math.imul(q0,v1)|0;var i2=(A+f|0)+((c&8191)<<13)|0;A=(p+(c>>>13)|0)+(i2>>>26)|0,i2&=67108863,f=Math.imul(u0,g0),c=Math.imul(u0,m0),c=c+Math.imul(i0,g0)|0,p=Math.imul(i0,m0),f=f+Math.imul(U$,Y$)|0,c=c+Math.imul(U$,Y0)|0,c=c+Math.imul(G$,Y$)|0,p=p+Math.imul(G$,Y0)|0,f=f+Math.imul(C0,s0)|0,c=c+Math.imul(C0,a0)|0,c=c+Math.imul(x0,s0)|0,p=p+Math.imul(x0,a0)|0,f=f+Math.imul(p0,D$)|0,c=c+Math.imul(p0,F$)|0,c=c+Math.imul(j$,D$)|0,p=p+Math.imul(j$,F$)|0,f=f+Math.imul(w0,c$)|0,c=c+Math.imul(w0,q$)|0,c=c+Math.imul(h0,c$)|0,p=p+Math.imul(h0,q$)|0,f=f+Math.imul(N0,O$)|0,c=c+Math.imul(N0,V$)|0,c=c+Math.imul(A0,O$)|0,p=p+Math.imul(A0,V$)|0,f=f+Math.imul(a,j1)|0,c=c+Math.imul(a,v1)|0,c=c+Math.imul(J0,j1)|0,p=p+Math.imul(J0,v1)|0;var f2=(A+f|0)+((c&8191)<<13)|0;A=(p+(c>>>13)|0)+(f2>>>26)|0,f2&=67108863,f=Math.imul(u0,Y$),c=Math.imul(u0,Y0),c=c+Math.imul(i0,Y$)|0,p=Math.imul(i0,Y0),f=f+Math.imul(U$,s0)|0,c=c+Math.imul(U$,a0)|0,c=c+Math.imul(G$,s0)|0,p=p+Math.imul(G$,a0)|0,f=f+Math.imul(C0,D$)|0,c=c+Math.imul(C0,F$)|0,c=c+Math.imul(x0,D$)|0,p=p+Math.imul(x0,F$)|0,f=f+Math.imul(p0,c$)|0,c=c+Math.imul(p0,q$)|0,c=c+Math.imul(j$,c$)|0,p=p+Math.imul(j$,q$)|0,f=f+Math.imul(w0,O$)|0,c=c+Math.imul(w0,V$)|0,c=c+Math.imul(h0,O$)|0,p=p+Math.imul(h0,V$)|0,f=f+Math.imul(N0,j1)|0,c=c+Math.imul(N0,v1)|0,c=c+Math.imul(A0,j1)|0,p=p+Math.imul(A0,v1)|0;var V2=(A+f|0)+((c&8191)<<13)|0;A=(p+(c>>>13)|0)+(V2>>>26)|0,V2&=67108863,f=Math.imul(u0,s0),c=Math.imul(u0,a0),c=c+Math.imul(i0,s0)|0,p=Math.imul(i0,a0),f=f+Math.imul(U$,D$)|0,c=c+Math.imul(U$,F$)|0,c=c+Math.imul(G$,D$)|0,p=p+Math.imul(G$,F$)|0,f=f+Math.imul(C0,c$)|0,c=c+Math.imul(C0,q$)|0,c=c+Math.imul(x0,c$)|0,p=p+Math.imul(x0,q$)|0,f=f+Math.imul(p0,O$)|0,c=c+Math.imul(p0,V$)|0,c=c+Math.imul(j$,O$)|0,p=p+Math.imul(j$,V$)|0,f=f+Math.imul(w0,j1)|0,c=c+Math.imul(w0,v1)|0,c=c+Math.imul(h0,j1)|0,p=p+Math.imul(h0,v1)|0;var T2=(A+f|0)+((c&8191)<<13)|0;A=(p+(c>>>13)|0)+(T2>>>26)|0,T2&=67108863,f=Math.imul(u0,D$),c=Math.imul(u0,F$),c=c+Math.imul(i0,D$)|0,p=Math.imul(i0,F$),f=f+Math.imul(U$,c$)|0,c=c+Math.imul(U$,q$)|0,c=c+Math.imul(G$,c$)|0,p=p+Math.imul(G$,q$)|0,f=f+Math.imul(C0,O$)|0,c=c+Math.imul(C0,V$)|0,c=c+Math.imul(x0,O$)|0,p=p+Math.imul(x0,V$)|0,f=f+Math.imul(p0,j1)|0,c=c+Math.imul(p0,v1)|0,c=c+Math.imul(j$,j1)|0,p=p+Math.imul(j$,v1)|0;var g2=(A+f|0)+((c&8191)<<13)|0;A=(p+(c>>>13)|0)+(g2>>>26)|0,g2&=67108863,f=Math.imul(u0,c$),c=Math.imul(u0,q$),c=c+Math.imul(i0,c$)|0,p=Math.imul(i0,q$),f=f+Math.imul(U$,O$)|0,c=c+Math.imul(U$,V$)|0,c=c+Math.imul(G$,O$)|0,p=p+Math.imul(G$,V$)|0,f=f+Math.imul(C0,j1)|0,c=c+Math.imul(C0,v1)|0,c=c+Math.imul(x0,j1)|0,p=p+Math.imul(x0,v1)|0;var y6=(A+f|0)+((c&8191)<<13)|0;A=(p+(c>>>13)|0)+(y6>>>26)|0,y6&=67108863,f=Math.imul(u0,O$),c=Math.imul(u0,V$),c=c+Math.imul(i0,O$)|0,p=Math.imul(i0,V$),f=f+Math.imul(U$,j1)|0,c=c+Math.imul(U$,v1)|0,c=c+Math.imul(G$,j1)|0,p=p+Math.imul(G$,v1)|0;var QX=(A+f|0)+((c&8191)<<13)|0;A=(p+(c>>>13)|0)+(QX>>>26)|0,QX&=67108863,f=Math.imul(u0,j1),c=Math.imul(u0,v1),c=c+Math.imul(i0,j1)|0,p=Math.imul(i0,v1);var T4=(A+f|0)+((c&8191)<<13)|0;if(A=(p+(c>>>13)|0)+(T4>>>26)|0,T4&=67108863,z[0]=I2,z[1]=W1,z[2]=A2,z[3]=c2,z[4]=M2,z[5]=Gv,z[6]=f1,z[7]=o1,z[8]=E2,z[9]=x2,z[10]=W2,z[11]=i2,z[12]=f2,z[13]=V2,z[14]=T2,z[15]=g2,z[16]=y6,z[17]=QX,z[18]=T4,A!==0)z[19]=A,w.length++;return w};if(!Math.imul)i=h;function s(Z,K,w){w.negative=K.negative^Z.negative,w.length=Z.length+K.length;var B=0,P=0;for(var z=0;z<w.length-1;z++){var A=P;P=0;var f=B&67108863,c=Math.min(z,K.length-1);for(var p=Math.max(0,z-Z.length+1);p<=c;p++){var Q0=z-p,F0=Z.words[Q0]|0,P0=K.words[p]|0,E0=F0*P0,_0=E0&67108863;A=A+(E0/67108864|0)|0,_0=_0+f|0,f=_0&67108863,A=A+(_0>>>26)|0,P+=A>>>26,A&=67108863}w.words[z]=f,B=A,A=P}if(B!==0)w.words[z]=B;else w.length--;return w._strip()}function j0(Z,K,w){return s(Z,K,w)}X.prototype.mulTo=function(Z,K){var w,B=this.length+Z.length;if(this.length===10&&Z.length===10)w=i(this,Z,K);else if(B<63)w=h(this,Z,K);else if(B<1024)w=s(this,Z,K);else w=j0(this,Z,K);return w};function I0(Z,K){this.x=Z,this.y=K}I0.prototype.makeRBT=function(Z){var K=Array(Z),w=X.prototype._countBits(Z)-1;for(var B=0;B<Z;B++)K[B]=this.revBin(B,w,Z);return K},I0.prototype.revBin=function(Z,K,w){if(Z===0||Z===w-1)return Z;var B=0;for(var P=0;P<K;P++)B|=(Z&1)<<K-P-1,Z>>=1;return B},I0.prototype.permute=function(Z,K,w,B,P,z){for(var A=0;A<z;A++)B[A]=K[Z[A]],P[A]=w[Z[A]]},I0.prototype.transform=function(Z,K,w,B,P,z){this.permute(z,Z,K,w,B,P);for(var A=1;A<P;A<<=1){var f=A<<1,c=Math.cos(2*Math.PI/f),p=Math.sin(2*Math.PI/f);for(var Q0=0;Q0<P;Q0+=f){var F0=c,P0=p;for(var E0=0;E0<A;E0++){var _0=w[Q0+E0],$0=B[Q0+E0],G0=w[Q0+E0+A],K0=B[Q0+E0+A],q0=F0*G0-P0*K0;if(K0=F0*K0+P0*G0,G0=q0,w[Q0+E0]=_0+G0,B[Q0+E0]=$0+K0,w[Q0+E0+A]=_0-G0,B[Q0+E0+A]=$0-K0,E0!==f)q0=c*F0-p*P0,P0=c*P0+p*F0,F0=q0}}}},I0.prototype.guessLen13b=function(Z,K){var w=Math.max(K,Z)|1,B=w&1,P=0;for(w=w/2|0;w;w=w>>>1)P++;return 1<<P+1+B},I0.prototype.conjugate=function(Z,K,w){if(w<=1)return;for(var B=0;B<w/2;B++){var P=Z[B];Z[B]=Z[w-B-1],Z[w-B-1]=P,P=K[B],K[B]=-K[w-B-1],K[w-B-1]=-P}},I0.prototype.normalize13b=function(Z,K){var w=0;for(var B=0;B<K/2;B++){var P=Math.round(Z[2*B+1]/K)*8192+Math.round(Z[2*B]/K)+w;if(Z[B]=P&67108863,P<67108864)w=0;else w=P/67108864|0}return Z},I0.prototype.convert13b=function(Z,K,w,B){var P=0;for(var z=0;z<K;z++)P=P+(Z[z]|0),w[2*z]=P&8191,P=P>>>13,w[2*z+1]=P&8191,P=P>>>13;for(z=2*K;z<B;++z)w[z]=0;j(P===0),j((P&-8192)===0)},I0.prototype.stub=function(Z){var K=Array(Z);for(var w=0;w<Z;w++)K[w]=0;return K},I0.prototype.mulp=function(Z,K,w){var B=2*this.guessLen13b(Z.length,K.length),P=this.makeRBT(B),z=this.stub(B),A=Array(B),f=Array(B),c=Array(B),p=Array(B),Q0=Array(B),F0=Array(B),P0=w.words;P0.length=B,this.convert13b(Z.words,Z.length,A,B),this.convert13b(K.words,K.length,p,B),this.transform(A,z,f,c,B,P),this.transform(p,z,Q0,F0,B,P);for(var E0=0;E0<B;E0++){var _0=f[E0]*Q0[E0]-c[E0]*F0[E0];c[E0]=f[E0]*F0[E0]+c[E0]*Q0[E0],f[E0]=_0}return this.conjugate(f,c,B),this.transform(f,c,P0,z,B,P),this.conjugate(P0,z,B),this.normalize13b(P0,B),w.negative=Z.negative^K.negative,w.length=Z.length+K.length,w._strip()},X.prototype.mul=function(Z){var K=new X(null);return K.words=Array(this.length+Z.length),this.mulTo(Z,K)},X.prototype.mulf=function(Z){var K=new X(null);return K.words=Array(this.length+Z.length),j0(this,Z,K)},X.prototype.imul=function(Z){return this.clone().mulTo(Z,this)},X.prototype.imuln=function(Z){var K=Z<0;if(K)Z=-Z;j(typeof Z==="number"),j(Z<67108864);var w=0;for(var B=0;B<this.length;B++){var P=(this.words[B]|0)*Z,z=(P&67108863)+(w&67108863);w>>=26,w+=P/67108864|0,w+=z>>>26,this.words[B]=z&67108863}if(w!==0)this.words[B]=w,this.length++;return this.length=Z===0?1:this.length,K?this.ineg():this},X.prototype.muln=function(Z){return this.clone().imuln(Z)},X.prototype.sqr=function(){return this.mul(this)},X.prototype.isqr=function(){return this.imul(this.clone())},X.prototype.pow=function(Z){var K=n(Z);if(K.length===0)return new X(1);var w=this;for(var B=0;B<K.length;B++,w=w.sqr())if(K[B]!==0)break;if(++B<K.length)for(var P=w.sqr();B<K.length;B++,P=P.sqr()){if(K[B]===0)continue;w=w.mul(P)}return w},X.prototype.iushln=function(Z){j(typeof Z==="number"&&Z>=0);var K=Z%26,w=(Z-K)/26,B=67108863>>>26-K<<26-K,P;if(K!==0){var z=0;for(P=0;P<this.length;P++){var A=this.words[P]&B,f=(this.words[P]|0)-A<<K;this.words[P]=f|z,z=A>>>26-K}if(z)this.words[P]=z,this.length++}if(w!==0){for(P=this.length-1;P>=0;P--)this.words[P+w]=this.words[P];for(P=0;P<w;P++)this.words[P]=0;this.length+=w}return this._strip()},X.prototype.ishln=function(Z){return j(this.negative===0),this.iushln(Z)},X.prototype.iushrn=function(Z,K,w){j(typeof Z==="number"&&Z>=0);var B;if(K)B=(K-K%26)/26;else B=0;var P=Z%26,z=Math.min((Z-P)/26,this.length),A=67108863^67108863>>>P<<P,f=w;if(B-=z,B=Math.max(0,B),f){for(var c=0;c<z;c++)f.words[c]=this.words[c];f.length=z}if(z===0);else if(this.length>z){this.length-=z;for(c=0;c<this.length;c++)this.words[c]=this.words[c+z]}else this.words[0]=0,this.length=1;var p=0;for(c=this.length-1;c>=0&&(p!==0||c>=B);c--){var Q0=this.words[c]|0;this.words[c]=p<<26-P|Q0>>>P,p=Q0&A}if(f&&p!==0)f.words[f.length++]=p;if(this.length===0)this.words[0]=0,this.length=1;return this._strip()},X.prototype.ishrn=function(Z,K,w){return j(this.negative===0),this.iushrn(Z,K,w)},X.prototype.shln=function(Z){return this.clone().ishln(Z)},X.prototype.ushln=function(Z){return this.clone().iushln(Z)},X.prototype.shrn=function(Z){return this.clone().ishrn(Z)},X.prototype.ushrn=function(Z){return this.clone().iushrn(Z)},X.prototype.testn=function(Z){j(typeof Z==="number"&&Z>=0);var K=Z%26,w=(Z-K)/26,B=1<<K;if(this.length<=w)return!1;var P=this.words[w];return!!(P&B)},X.prototype.imaskn=function(Z){j(typeof Z==="number"&&Z>=0);var K=Z%26,w=(Z-K)/26;if(j(this.negative===0,"imaskn works only with positive numbers"),this.length<=w)return this;if(K!==0)w++;if(this.length=Math.min(w,this.length),K!==0){var B=67108863^67108863>>>K<<K;this.words[this.length-1]&=B}return this._strip()},X.prototype.maskn=function(Z){return this.clone().imaskn(Z)},X.prototype.iaddn=function(Z){if(j(typeof Z==="number"),j(Z<67108864),Z<0)return this.isubn(-Z);if(this.negative!==0){if(this.length===1&&(this.words[0]|0)<=Z)return this.words[0]=Z-(this.words[0]|0),this.negative=0,this;return this.negative=0,this.isubn(Z),this.negative=1,this}return this._iaddn(Z)},X.prototype._iaddn=function(Z){this.words[0]+=Z;for(var K=0;K<this.length&&this.words[K]>=67108864;K++)if(this.words[K]-=67108864,K===this.length-1)this.words[K+1]=1;else this.words[K+1]++;return this.length=Math.max(this.length,K+1),this},X.prototype.isubn=function(Z){if(j(typeof Z==="number"),j(Z<67108864),Z<0)return this.iaddn(-Z);if(this.negative!==0)return this.negative=0,this.iaddn(Z),this.negative=1,this;if(this.words[0]-=Z,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var K=0;K<this.length&&this.words[K]<0;K++)this.words[K]+=67108864,this.words[K+1]-=1;return this._strip()},X.prototype.addn=function(Z){return this.clone().iaddn(Z)},X.prototype.subn=function(Z){return this.clone().isubn(Z)},X.prototype.iabs=function(){return this.negative=0,this},X.prototype.abs=function(){return this.clone().iabs()},X.prototype._ishlnsubmul=function(Z,K,w){var B=Z.length+w,P;this._expand(B);var z,A=0;for(P=0;P<Z.length;P++){z=(this.words[P+w]|0)+A;var f=(Z.words[P]|0)*K;z-=f&67108863,A=(z>>26)-(f/67108864|0),this.words[P+w]=z&67108863}for(;P<this.length-w;P++)z=(this.words[P+w]|0)+A,A=z>>26,this.words[P+w]=z&67108863;if(A===0)return this._strip();j(A===-1),A=0;for(P=0;P<this.length;P++)z=-(this.words[P]|0)+A,A=z>>26,this.words[P]=z&67108863;return this.negative=1,this._strip()},X.prototype._wordDiv=function(Z,K){var w=this.length-Z.length,B=this.clone(),P=Z,z=P.words[P.length-1]|0,A=this._countBits(z);if(w=26-A,w!==0)P=P.ushln(w),B.iushln(w),z=P.words[P.length-1]|0;var f=B.length-P.length,c;if(K!=="mod"){c=new X(null),c.length=f+1,c.words=Array(c.length);for(var p=0;p<c.length;p++)c.words[p]=0}var Q0=B.clone()._ishlnsubmul(P,1,f);if(Q0.negative===0){if(B=Q0,c)c.words[f]=1}for(var F0=f-1;F0>=0;F0--){var P0=(B.words[P.length+F0]|0)*67108864+(B.words[P.length+F0-1]|0);P0=Math.min(P0/z|0,67108863),B._ishlnsubmul(P,P0,F0);while(B.negative!==0)if(P0--,B.negative=0,B._ishlnsubmul(P,1,F0),!B.isZero())B.negative^=1;if(c)c.words[F0]=P0}if(c)c._strip();if(B._strip(),K!=="div"&&w!==0)B.iushrn(w);return{div:c||null,mod:B}},X.prototype.divmod=function(Z,K,w){if(j(!Z.isZero()),this.isZero())return{div:new X(0),mod:new X(0)};var B,P,z;if(this.negative!==0&&Z.negative===0){if(z=this.neg().divmod(Z,K),K!=="mod")B=z.div.neg();if(K!=="div"){if(P=z.mod.neg(),w&&P.negative!==0)P.iadd(Z)}return{div:B,mod:P}}if(this.negative===0&&Z.negative!==0){if(z=this.divmod(Z.neg(),K),K!=="mod")B=z.div.neg();return{div:B,mod:z.mod}}if((this.negative&Z.negative)!==0){if(z=this.neg().divmod(Z.neg(),K),K!=="div"){if(P=z.mod.neg(),w&&P.negative!==0)P.isub(Z)}return{div:z.div,mod:P}}if(Z.length>this.length||this.cmp(Z)<0)return{div:new X(0),mod:this};if(Z.length===1){if(K==="div")return{div:this.divn(Z.words[0]),mod:null};if(K==="mod")return{div:null,mod:new X(this.modrn(Z.words[0]))};return{div:this.divn(Z.words[0]),mod:new X(this.modrn(Z.words[0]))}}return this._wordDiv(Z,K)},X.prototype.div=function(Z){return this.divmod(Z,"div",!1).div},X.prototype.mod=function(Z){return this.divmod(Z,"mod",!1).mod},X.prototype.umod=function(Z){return this.divmod(Z,"mod",!0).mod},X.prototype.divRound=function(Z){var K=this.divmod(Z);if(K.mod.isZero())return K.div;var w=K.div.negative!==0?K.mod.isub(Z):K.mod,B=Z.ushrn(1),P=Z.andln(1),z=w.cmp(B);if(z<0||P===1&&z===0)return K.div;return K.div.negative!==0?K.div.isubn(1):K.div.iaddn(1)},X.prototype.modrn=function(Z){var K=Z<0;if(K)Z=-Z;j(Z<=67108863);var w=67108864%Z,B=0;for(var P=this.length-1;P>=0;P--)B=(w*B+(this.words[P]|0))%Z;return K?-B:B},X.prototype.modn=function(Z){return this.modrn(Z)},X.prototype.idivn=function(Z){var K=Z<0;if(K)Z=-Z;j(Z<=67108863);var w=0;for(var B=this.length-1;B>=0;B--){var P=(this.words[B]|0)+w*67108864;this.words[B]=P/Z|0,w=P%Z}return this._strip(),K?this.ineg():this},X.prototype.divn=function(Z){return this.clone().idivn(Z)},X.prototype.egcd=function(Z){j(Z.negative===0),j(!Z.isZero());var K=this,w=Z.clone();if(K.negative!==0)K=K.umod(Z);else K=K.clone();var B=new X(1),P=new X(0),z=new X(0),A=new X(1),f=0;while(K.isEven()&&w.isEven())K.iushrn(1),w.iushrn(1),++f;var c=w.clone(),p=K.clone();while(!K.isZero()){for(var Q0=0,F0=1;(K.words[0]&F0)===0&&Q0<26;++Q0,F0<<=1);if(Q0>0){K.iushrn(Q0);while(Q0-- >0){if(B.isOdd()||P.isOdd())B.iadd(c),P.isub(p);B.iushrn(1),P.iushrn(1)}}for(var P0=0,E0=1;(w.words[0]&E0)===0&&P0<26;++P0,E0<<=1);if(P0>0){w.iushrn(P0);while(P0-- >0){if(z.isOdd()||A.isOdd())z.iadd(c),A.isub(p);z.iushrn(1),A.iushrn(1)}}if(K.cmp(w)>=0)K.isub(w),B.isub(z),P.isub(A);else w.isub(K),z.isub(B),A.isub(P)}return{a:z,b:A,gcd:w.iushln(f)}},X.prototype._invmp=function(Z){j(Z.negative===0),j(!Z.isZero());var K=this,w=Z.clone();if(K.negative!==0)K=K.umod(Z);else K=K.clone();var B=new X(1),P=new X(0),z=w.clone();while(K.cmpn(1)>0&&w.cmpn(1)>0){for(var A=0,f=1;(K.words[0]&f)===0&&A<26;++A,f<<=1);if(A>0){K.iushrn(A);while(A-- >0){if(B.isOdd())B.iadd(z);B.iushrn(1)}}for(var c=0,p=1;(w.words[0]&p)===0&&c<26;++c,p<<=1);if(c>0){w.iushrn(c);while(c-- >0){if(P.isOdd())P.iadd(z);P.iushrn(1)}}if(K.cmp(w)>=0)K.isub(w),B.isub(P);else w.isub(K),P.isub(B)}var Q0;if(K.cmpn(1)===0)Q0=B;else Q0=P;if(Q0.cmpn(0)<0)Q0.iadd(Z);return Q0},X.prototype.gcd=function(Z){if(this.isZero())return Z.abs();if(Z.isZero())return this.abs();var K=this.clone(),w=Z.clone();K.negative=0,w.negative=0;for(var B=0;K.isEven()&&w.isEven();B++)K.iushrn(1),w.iushrn(1);do{while(K.isEven())K.iushrn(1);while(w.isEven())w.iushrn(1);var P=K.cmp(w);if(P<0){var z=K;K=w,w=z}else if(P===0||w.cmpn(1)===0)break;K.isub(w)}while(!0);return w.iushln(B)},X.prototype.invm=function(Z){return this.egcd(Z).a.umod(Z)},X.prototype.isEven=function(){return(this.words[0]&1)===0},X.prototype.isOdd=function(){return(this.words[0]&1)===1},X.prototype.andln=function(Z){return this.words[0]&Z},X.prototype.bincn=function(Z){j(typeof Z==="number");var K=Z%26,w=(Z-K)/26,B=1<<K;if(this.length<=w)return this._expand(w+1),this.words[w]|=B,this;var P=B;for(var z=w;P!==0&&z<this.length;z++){var A=this.words[z]|0;A+=P,P=A>>>26,A&=67108863,this.words[z]=A}if(P!==0)this.words[z]=P,this.length++;return this},X.prototype.isZero=function(){return this.length===1&&this.words[0]===0},X.prototype.cmpn=function(Z){var K=Z<0;if(this.negative!==0&&!K)return-1;if(this.negative===0&&K)return 1;this._strip();var w;if(this.length>1)w=1;else{if(K)Z=-Z;j(Z<=67108863,"Number is too big");var B=this.words[0]|0;w=B===Z?0:B<Z?-1:1}if(this.negative!==0)return-w|0;return w},X.prototype.cmp=function(Z){if(this.negative!==0&&Z.negative===0)return-1;if(this.negative===0&&Z.negative!==0)return 1;var K=this.ucmp(Z);if(this.negative!==0)return-K|0;return K},X.prototype.ucmp=function(Z){if(this.length>Z.length)return 1;if(this.length<Z.length)return-1;var K=0;for(var w=this.length-1;w>=0;w--){var B=this.words[w]|0,P=Z.words[w]|0;if(B===P)continue;if(B<P)K=-1;else if(B>P)K=1;break}return K},X.prototype.gtn=function(Z){return this.cmpn(Z)===1},X.prototype.gt=function(Z){return this.cmp(Z)===1},X.prototype.gten=function(Z){return this.cmpn(Z)>=0},X.prototype.gte=function(Z){return this.cmp(Z)>=0},X.prototype.ltn=function(Z){return this.cmpn(Z)===-1},X.prototype.lt=function(Z){return this.cmp(Z)===-1},X.prototype.lten=function(Z){return this.cmpn(Z)<=0},X.prototype.lte=function(Z){return this.cmp(Z)<=0},X.prototype.eqn=function(Z){return this.cmpn(Z)===0},X.prototype.eq=function(Z){return this.cmp(Z)===0},X.red=function(Z){return new O(Z)},X.prototype.toRed=function(Z){return j(!this.red,"Already a number in reduction context"),j(this.negative===0,"red works only with positives"),Z.convertTo(this)._forceRed(Z)},X.prototype.fromRed=function(){return j(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},X.prototype._forceRed=function(Z){return this.red=Z,this},X.prototype.forceRed=function(Z){return j(!this.red,"Already a number in reduction context"),this._forceRed(Z)},X.prototype.redAdd=function(Z){return j(this.red,"redAdd works only with red numbers"),this.red.add(this,Z)},X.prototype.redIAdd=function(Z){return j(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,Z)},X.prototype.redSub=function(Z){return j(this.red,"redSub works only with red numbers"),this.red.sub(this,Z)},X.prototype.redISub=function(Z){return j(this.red,"redISub works only with red numbers"),this.red.isub(this,Z)},X.prototype.redShl=function(Z){return j(this.red,"redShl works only with red numbers"),this.red.shl(this,Z)},X.prototype.redMul=function(Z){return j(this.red,"redMul works only with red numbers"),this.red._verify2(this,Z),this.red.mul(this,Z)},X.prototype.redIMul=function(Z){return j(this.red,"redMul works only with red numbers"),this.red._verify2(this,Z),this.red.imul(this,Z)},X.prototype.redSqr=function(){return j(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},X.prototype.redISqr=function(){return j(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},X.prototype.redSqrt=function(){return j(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},X.prototype.redInvm=function(){return j(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},X.prototype.redNeg=function(){return j(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},X.prototype.redPow=function(Z){return j(this.red&&!Z.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,Z)};var H0={k256:null,p224:null,p192:null,p25519:null};function L0(Z,K){this.name=Z,this.p=new X(K,16),this.n=this.p.bitLength(),this.k=new X(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}L0.prototype._tmp=function(){var Z=new X(null);return Z.words=Array(Math.ceil(this.n/13)),Z},L0.prototype.ireduce=function(Z){var K=Z,w;do this.split(K,this.tmp),K=this.imulK(K),K=K.iadd(this.tmp),w=K.bitLength();while(w>this.n);var B=w<this.n?-1:K.ucmp(this.p);if(B===0)K.words[0]=0,K.length=1;else if(B>0)K.isub(this.p);else if(K.strip!==void 0)K.strip();else K._strip();return K},L0.prototype.split=function(Z,K){Z.iushrn(this.n,0,K)},L0.prototype.imulK=function(Z){return Z.imul(this.k)};function R0(){L0.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}G(R0,L0),R0.prototype.split=function(Z,K){var w=4194303,B=Math.min(Z.length,9);for(var P=0;P<B;P++)K.words[P]=Z.words[P];if(K.length=B,Z.length<=9){Z.words[0]=0,Z.length=1;return}var z=Z.words[9];K.words[K.length++]=z&w;for(P=10;P<Z.length;P++){var A=Z.words[P]|0;Z.words[P-10]=(A&w)<<4|z>>>22,z=A}if(z>>>=22,Z.words[P-10]=z,z===0&&Z.length>10)Z.length-=10;else Z.length-=9},R0.prototype.imulK=function(Z){Z.words[Z.length]=0,Z.words[Z.length+1]=0,Z.length+=2;var K=0;for(var w=0;w<Z.length;w++){var B=Z.words[w]|0;K+=B*977,Z.words[w]=K&67108863,K=B*64+(K/67108864|0)}if(Z.words[Z.length-1]===0){if(Z.length--,Z.words[Z.length-1]===0)Z.length--}return Z};function U0(){L0.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}G(U0,L0);function c0(){L0.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}G(c0,L0);function Y(){L0.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}G(Y,L0),Y.prototype.imulK=function(Z){var K=0;for(var w=0;w<Z.length;w++){var B=(Z.words[w]|0)*19+K,P=B&67108863;B>>>=26,Z.words[w]=P,K=B}if(K!==0)Z.words[Z.length++]=K;return Z},X._prime=function(Z){if(H0[Z])return H0[Z];var K;if(Z==="k256")K=new R0;else if(Z==="p224")K=new U0;else if(Z==="p192")K=new c0;else if(Z==="p25519")K=new Y;else throw Error("Unknown prime "+Z);return H0[Z]=K,K};function O(Z){if(typeof Z==="string"){var K=X._prime(Z);this.m=K.p,this.prime=K}else j(Z.gtn(1),"modulus must be greater than 1"),this.m=Z,this.prime=null}O.prototype._verify1=function(Z){j(Z.negative===0,"red works only with positives"),j(Z.red,"red works only with red numbers")},O.prototype._verify2=function(Z,K){j((Z.negative|K.negative)===0,"red works only with positives"),j(Z.red&&Z.red===K.red,"red works only with red numbers")},O.prototype.imod=function(Z){if(this.prime)return this.prime.ireduce(Z)._forceRed(this);return D(Z,Z.umod(this.m)._forceRed(this)),Z},O.prototype.neg=function(Z){if(Z.isZero())return Z.clone();return this.m.sub(Z)._forceRed(this)},O.prototype.add=function(Z,K){this._verify2(Z,K);var w=Z.add(K);if(w.cmp(this.m)>=0)w.isub(this.m);return w._forceRed(this)},O.prototype.iadd=function(Z,K){this._verify2(Z,K);var w=Z.iadd(K);if(w.cmp(this.m)>=0)w.isub(this.m);return w},O.prototype.sub=function(Z,K){this._verify2(Z,K);var w=Z.sub(K);if(w.cmpn(0)<0)w.iadd(this.m);return w._forceRed(this)},O.prototype.isub=function(Z,K){this._verify2(Z,K);var w=Z.isub(K);if(w.cmpn(0)<0)w.iadd(this.m);return w},O.prototype.shl=function(Z,K){return this._verify1(Z),this.imod(Z.ushln(K))},O.prototype.imul=function(Z,K){return this._verify2(Z,K),this.imod(Z.imul(K))},O.prototype.mul=function(Z,K){return this._verify2(Z,K),this.imod(Z.mul(K))},O.prototype.isqr=function(Z){return this.imul(Z,Z.clone())},O.prototype.sqr=function(Z){return this.mul(Z,Z)},O.prototype.sqrt=function(Z){if(Z.isZero())return Z.clone();var K=this.m.andln(3);if(j(K%2===1),K===3){var w=this.m.add(new X(1)).iushrn(2);return this.pow(Z,w)}var B=this.m.subn(1),P=0;while(!B.isZero()&&B.andln(1)===0)P++,B.iushrn(1);j(!B.isZero());var z=new X(1).toRed(this),A=z.redNeg(),f=this.m.subn(1).iushrn(1),c=this.m.bitLength();c=new X(2*c*c).toRed(this);while(this.pow(c,f).cmp(A)!==0)c.redIAdd(A);var p=this.pow(c,B),Q0=this.pow(Z,B.addn(1).iushrn(1)),F0=this.pow(Z,B),P0=P;while(F0.cmp(z)!==0){var E0=F0;for(var _0=0;E0.cmp(z)!==0;_0++)E0=E0.redSqr();j(_0<P0);var $0=this.pow(p,new X(1).iushln(P0-_0-1));Q0=Q0.redMul($0),p=$0.redSqr(),F0=F0.redMul(p),P0=_0}return Q0},O.prototype.invm=function(Z){var K=Z._invmp(this.m);if(K.negative!==0)return K.negative=0,this.imod(K).redNeg();else return this.imod(K)},O.prototype.pow=function(Z,K){if(K.isZero())return new X(1).toRed(this);if(K.cmpn(1)===0)return Z.clone();var w=4,B=Array(1<<w);B[0]=new X(1).toRed(this),B[1]=Z;for(var P=2;P<B.length;P++)B[P]=this.mul(B[P-1],Z);var z=B[0],A=0,f=0,c=K.bitLength()%26;if(c===0)c=26;for(P=K.length-1;P>=0;P--){var p=K.words[P];for(var Q0=c-1;Q0>=0;Q0--){var F0=p>>Q0&1;if(z!==B[0])z=this.sqr(z);if(F0===0&&A===0){f=0;continue}if(A<<=1,A|=F0,f++,f!==w&&(P!==0||Q0!==0))continue;z=this.mul(z,B[A]),f=0,A=0}c=26}return z},O.prototype.convertTo=function(Z){var K=Z.umod(this.m);return K===Z?K.clone():K},O.prototype.convertFrom=function(Z){var K=Z.clone();return K.red=null,K},X.mont=function(Z){return new H(Z)};function H(Z){if(O.call(this,Z),this.shift=this.m.bitLength(),this.shift%26!==0)this.shift+=26-this.shift%26;this.r=new X(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}G(H,O),H.prototype.convertTo=function(Z){return this.imod(Z.ushln(this.shift))},H.prototype.convertFrom=function(Z){var K=this.imod(Z.mul(this.rinv));return K.red=null,K},H.prototype.imul=function(Z,K){if(Z.isZero()||K.isZero())return Z.words[0]=0,Z.length=1,Z;var w=Z.imul(K),B=w.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),P=w.isub(B).iushrn(this.shift),z=P;if(P.cmp(this.m)>=0)z=P.isub(this.m);else if(P.cmpn(0)<0)z=P.iadd(this.m);return z._forceRed(this)},H.prototype.mul=function(Z,K){if(Z.isZero()||K.isZero())return new X(0)._forceRed(this);var w=Z.mul(K),B=w.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),P=w.isub(B).iushrn(this.shift),z=P;if(P.cmp(this.m)>=0)z=P.isub(this.m);else if(P.cmpn(0)<0)z=P.iadd(this.m);return z._forceRed(this)},H.prototype.invm=function(Z){var K=this.imod(Z._invmp(this.m).mul(this.r2));return K._forceRed(this)}})(typeof _>"u"||_,$)}),mN=E$(($,_)=>{var I=fm(),J=K9(),j=v6().Buffer;function G(T){var F=T.modulus.byteLength(),E;do E=new I(J(F));while(E.cmp(T.modulus)>=0||!E.umod(T.prime1)||!E.umod(T.prime2));return E}function X(T){var F=G(T),E=F.toRed(I.mont(T.modulus)).redPow(new I(T.publicExponent)).fromRed();return{blinder:E,unblinder:F.invm(T.modulus)}}function W(T,F){var E=X(F),D=F.modulus.byteLength(),q=new I(T).mul(E.blinder).umod(F.modulus),S=q.toRed(I.mont(F.prime1)),k=q.toRed(I.mont(F.prime2)),y=F.coefficient,m=F.prime1,n=F.prime2,h=S.redPow(F.exponent1).fromRed(),i=k.redPow(F.exponent2).fromRed(),s=h.isub(i).imul(y).umod(m).imul(n);return i.iadd(s).imul(E.unblinder).umod(F.modulus).toArrayLike(j,"be",D)}W.getr=G,_.exports=W}),ym=E$(($,_)=>{var I=fN(),J=K9(),j=H9(),G=yN(),X=bN(),W=JA(),T=hN(),F=mN(),E=v6().Buffer;_.exports=function(k,y,m){var n;if(k.padding)n=k.padding;else if(m)n=1;else n=4;var h=I(k),i;if(n===4)i=D(h,y);else if(n===1)i=q(h,y,m);else if(n===3){if(i=new W(y),i.cmp(h.modulus)>=0)throw Error("data too long for modulus")}else throw Error("unknown padding");if(m)return F(i,h);else return T(i,h)};function D(k,y){var m=k.modulus.byteLength(),n=y.length,h=j("sha1").update(E.alloc(0)).digest(),i=h.length,s=2*i;if(n>m-s-2)throw Error("message too long");var j0=E.alloc(m-n-s-2),I0=m-i-1,H0=J(i),L0=X(E.concat([h,j0,E.alloc(1,1),y],I0),G(H0,I0)),R0=X(H0,G(L0,i));return new W(E.concat([E.alloc(1),R0,L0],m))}function q(k,y,m){var n=y.length,h=k.modulus.byteLength();if(n>h-11)throw Error("message too long");var i;if(m)i=E.alloc(h-n-3,255);else i=S(h-n-3);return new W(E.concat([E.from([0,m?1:2]),i,E.alloc(1),y],h))}function S(k){var y=E.allocUnsafe(k),m=0,n=J(k*2),h=0,i;while(m<k){if(h===n.length)n=J(k*2),h=0;if(i=n[h++],i)y[m++]=i}return y}}),bm=E$(($,_)=>{var I=fN(),J=yN(),j=bN(),G=JA(),X=mN(),W=H9(),T=hN(),F=v6().Buffer;_.exports=function(S,k,y){var m;if(S.padding)m=S.padding;else if(y)m=1;else m=4;var n=I(S),h=n.modulus.byteLength();if(k.length>h||new G(k).cmp(n.modulus)>=0)throw Error("decryption error");var i;if(y)i=T(new G(k),n);else i=X(k,n);var s=F.alloc(h-i.length);if(i=F.concat([s,i],h),m===4)return E(n,i);else if(m===1)return D(n,i,y);else if(m===3)return i;else throw Error("unknown padding")};function E(S,k){var y=S.modulus.byteLength(),m=W("sha1").update(F.alloc(0)).digest(),n=m.length;if(k[0]!==0)throw Error("decryption error");var h=k.slice(1,n+1),i=k.slice(n+1),s=j(h,J(i,n)),j0=j(i,J(s,y-n-1));if(q(m,j0.slice(0,n)))throw Error("decryption error");var I0=n;while(j0[I0]===0)I0++;if(j0[I0++]!==1)throw Error("decryption error");return j0.slice(I0)}function D(S,k,y){var m=k.slice(0,2),n=2,h=0;while(k[n++]!==0)if(n>=k.length){h++;break}var i=k.slice(2,n-1);if(m.toString("hex")!=="0002"&&!y||m.toString("hex")!=="0001"&&y)h++;if(i.length<8)h++;if(h)throw Error("decryption error");return k.slice(n)}function q(S,k){S=F.from(S),k=F.from(k);var y=0,m=S.length;if(S.length!==k.length)y++,m=Math.min(S.length,k.length);var n=-1;while(++n<m)y+=S[n]^k[n];return y}}),$A=E$(($)=>{$.publicEncrypt=ym(),$.privateDecrypt=bm(),$.privateEncrypt=function(_,I){return $.publicEncrypt(_,I,!0)},$.publicDecrypt=function(_,I){return $.privateDecrypt(_,I,!0)}}),hm=E$(($)=>{var _=(Mv(),X1(K4));if(typeof _.publicEncrypt!=="function")_=$A();if($.publicEncrypt=_.publicEncrypt,$.privateDecrypt=_.privateDecrypt,typeof _.privateEncrypt!=="function")$.privateEncrypt=$A().privateEncrypt;else $.privateEncrypt=_.privateEncrypt;if(typeof _.publicDecrypt!=="function")$.publicDecrypt=$A().publicDecrypt;else $.publicDecrypt=_.publicDecrypt}),mm=E$(($)=>{var _=v6(),I=K9(),J=_.Buffer,j=_.kMaxLength,G=globalThis.crypto||globalThis.msCrypto,X=Math.pow(2,32)-1;function W(q,S){if(typeof q!=="number"||q!==q)throw TypeError("offset must be a number");if(q>X||q<0)throw TypeError("offset must be a uint32");if(q>j||q>S)throw RangeError("offset out of range")}function T(q,S,k){if(typeof q!=="number"||q!==q)throw TypeError("size must be a number");if(q>X||q<0)throw TypeError("size must be a uint32");if(q+S>k||q>j)throw RangeError("buffer too small")}G&&G.getRandomValues,$.randomFill=F,$.randomFillSync=D;function F(q,S,k,y){if(!J.isBuffer(q)&&!(q instanceof globalThis.Uint8Array))throw TypeError('"buf" argument must be a Buffer or Uint8Array');if(typeof S==="function")y=S,S=0,k=q.length;else if(typeof k==="function")y=k,k=q.length-S;else if(typeof y!=="function")throw TypeError('"cb" argument must be a function');return W(S,q.length),T(k,S,q.length),E(q,S,k,y)}function E(q,S,k,y){if(!1)var m,n;if(y){I(k,function(i,s){if(i)return y(i);s.copy(q,S),y(null,q)});return}var h=I(k);return h.copy(q,S),q}function D(q,S,k){if(typeof S>"u")S=0;if(!J.isBuffer(q)&&!(q instanceof globalThis.Uint8Array))throw TypeError('"buf" argument must be a Buffer or Uint8Array');if(W(S,q.length),k===void 0)k=q.length-S;return T(k,S,q.length),E(q,S,k)}}),um=E$(($,_)=>{var I=(Mv(),X1(K4));if(typeof I.randomFill==="function"&&typeof I.randomFillSync==="function")$.randomFill=I.randomFill,$.randomFillSync=I.randomFillSync;else _.exports=mm()}),nm=E$(($)=>{$.randomBytes=$.rng=$.pseudoRandomBytes=$.prng=K9(),$.createHash=$.Hash=H9(),$.createHmac=$.Hmac=WN();var _=Oh(),I=Object.keys(_),J=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(I);$.getHashes=function(){return J};var j=PN();$.pbkdf2=j.pbkdf2,$.pbkdf2Sync=j.pbkdf2Sync;var G=th();$.Cipher=G.Cipher,$.createCipher=G.createCipher,$.Cipheriv=G.Cipheriv,$.createCipheriv=G.createCipheriv,$.Decipher=G.Decipher,$.createDecipher=G.createDecipher,$.Decipheriv=G.Decipheriv,$.createDecipheriv=G.createDecipheriv,$.getCiphers=G.getCiphers,$.listCiphers=G.listCiphers;var X=oh();$.DiffieHellmanGroup=X.DiffieHellmanGroup,$.createDiffieHellmanGroup=X.createDiffieHellmanGroup,$.getDiffieHellman=X.getDiffieHellman,$.createDiffieHellman=X.createDiffieHellman,$.DiffieHellman=X.DiffieHellman;var W=ah();$.createSign=W.createSign,$.Sign=W.Sign,$.createVerify=W.createVerify,$.Verify=W.Verify,$.createECDH=Am();var T=hm();$.publicEncrypt=T.publicEncrypt,$.privateEncrypt=T.privateEncrypt,$.publicDecrypt=T.publicDecrypt,$.privateDecrypt=T.privateDecrypt;var F=um();$.randomFill=F.randomFill,$.randomFillSync=F.randomFillSync,$.createCredentials=function(){throw Error(`sorry, createCredentials is not implemented yet
244
244
  we accept pull requests
245
245
  https://github.com/browserify/crypto-browserify`)},$.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}}),t1=Zh(nm(),1),im=t1.prng,pm=t1.pseudoRandomBytes,lm=t1.rng,dm=t1.randomBytes,rm=t1.Hash,JU=t1.createHash,tm=t1.Hmac,uN=t1.createHmac,om=t1.getHashes,am=t1.pbkdf2,sm=t1.pbkdf2Sync,em=t1.Cipher,$u=t1.createCipher,vu=t1.Cipheriv,_u=t1.createCipheriv,ju=t1.Decipher,Uu=t1.createDecipher,Iu=t1.Decipheriv,Xu=t1.createDecipheriv,Gu=t1.getCiphers,Yu=t1.listCiphers,Ju=t1.DiffieHellmanGroup,Qu=t1.createDiffieHellmanGroup,zu=t1.getDiffieHellman,Zu=t1.createDiffieHellman,Ou=t1.DiffieHellman,Lu=t1.createSign,Wu=t1.Sign,Du=t1.createVerify,Ku=t1.Verify,Hu=t1.createECDH,Fu=t1.publicEncrypt,Au=t1.privateEncrypt,Mu=t1.publicDecrypt,Eu=t1.privateDecrypt,Vu=t1.randomFill,Tu=t1.randomFillSync,Ru=t1.createCredentials,Pu=t1.constants,Cu=["p192","p224","p256","p384","p521","curve25519","ed25519","secp256k1","secp224r1","prime256v1","prime192v1","ed25519","secp384r1","secp521r1"];Nu=crypto,Bu=crypto});var oN={};_j(oN,{sep:()=>OA,resolve:()=>ZI,relative:()=>ZA,posix:()=>tN,parse:()=>dN,normalize:()=>zA,join:()=>F2,isAbsolute:()=>tJ,format:()=>lN,extname:()=>pN,dirname:()=>W_,delimiter:()=>rN,default:()=>ku,basename:()=>QZ,_makeLong:()=>iN});function OG($){if(typeof $!=="string")throw TypeError("Path must be a string. Received "+JSON.stringify($))}function nN($,_){var I="",J=0,j=-1,G=0,X;for(var W=0;W<=$.length;++W){if(W<$.length)X=$.charCodeAt(W);else if(X===47)break;else X=47;if(X===47){if(j===W-1||G===1);else if(j!==W-1&&G===2){if(I.length<2||J!==2||I.charCodeAt(I.length-1)!==46||I.charCodeAt(I.length-2)!==46){if(I.length>2){var T=I.lastIndexOf("/");if(T!==I.length-1){if(T===-1)I="",J=0;else I=I.slice(0,T),J=I.length-1-I.lastIndexOf("/");j=W,G=0;continue}}else if(I.length===2||I.length===1){I="",J=0,j=W,G=0;continue}}if(_){if(I.length>0)I+="/..";else I="..";J=2}}else{if(I.length>0)I+="/"+$.slice(j+1,W);else I=$.slice(j+1,W);J=W-j-1}j=W,G=0}else if(X===46&&G!==-1)++G;else G=-1}return I}function Su($,_){var I=_.dir||_.root,J=_.base||(_.name||"")+(_.ext||"");if(!I)return J;if(I===_.root)return I+J;return I+$+J}function ZI(){var $="",_=!1,I;for(var J=arguments.length-1;J>=-1&&!_;J--){var j;if(J>=0)j=arguments[J];else{if(I===void 0)I=process.cwd();j=I}if(OG(j),j.length===0)continue;$=j+"/"+$,_=j.charCodeAt(0)===47}if($=nN($,!_),_)if($.length>0)return"/"+$;else return"/";else if($.length>0)return $;else return"."}function zA($){if(OG($),$.length===0)return".";var _=$.charCodeAt(0)===47,I=$.charCodeAt($.length-1)===47;if($=nN($,!_),$.length===0&&!_)$=".";if($.length>0&&I)$+="/";if(_)return"/"+$;return $}function tJ($){return OG($),$.length>0&&$.charCodeAt(0)===47}function F2(){if(arguments.length===0)return".";var $;for(var _=0;_<arguments.length;++_){var I=arguments[_];if(OG(I),I.length>0)if($===void 0)$=I;else $+="/"+I}if($===void 0)return".";return zA($)}function ZA($,_){if(OG($),OG(_),$===_)return"";if($=ZI($),_=ZI(_),$===_)return"";var I=1;for(;I<$.length;++I)if($.charCodeAt(I)!==47)break;var J=$.length,j=J-I,G=1;for(;G<_.length;++G)if(_.charCodeAt(G)!==47)break;var X=_.length,W=X-G,T=j<W?j:W,F=-1,E=0;for(;E<=T;++E){if(E===T){if(W>T){if(_.charCodeAt(G+E)===47)return _.slice(G+E+1);else if(E===0)return _.slice(G+E)}else if(j>T){if($.charCodeAt(I+E)===47)F=E;else if(E===0)F=0}break}var D=$.charCodeAt(I+E),q=_.charCodeAt(G+E);if(D!==q)break;else if(D===47)F=E}var S="";for(E=I+F+1;E<=J;++E)if(E===J||$.charCodeAt(E)===47)if(S.length===0)S+="..";else S+="/..";if(S.length>0)return S+_.slice(G+F);else{if(G+=F,_.charCodeAt(G)===47)++G;return _.slice(G)}}function iN($){return $}function W_($){if(OG($),$.length===0)return".";var _=$.charCodeAt(0),I=_===47,J=-1,j=!0;for(var G=$.length-1;G>=1;--G)if(_=$.charCodeAt(G),_===47){if(!j){J=G;break}}else j=!1;if(J===-1)return I?"/":".";if(I&&J===1)return"//";return $.slice(0,J)}function QZ($,_){if(_!==void 0&&typeof _!=="string")throw TypeError('"ext" argument must be a string');OG($);var I=0,J=-1,j=!0,G;if(_!==void 0&&_.length>0&&_.length<=$.length){if(_.length===$.length&&_===$)return"";var X=_.length-1,W=-1;for(G=$.length-1;G>=0;--G){var T=$.charCodeAt(G);if(T===47){if(!j){I=G+1;break}}else{if(W===-1)j=!1,W=G+1;if(X>=0)if(T===_.charCodeAt(X)){if(--X===-1)J=G}else X=-1,J=W}}if(I===J)J=W;else if(J===-1)J=$.length;return $.slice(I,J)}else{for(G=$.length-1;G>=0;--G)if($.charCodeAt(G)===47){if(!j){I=G+1;break}}else if(J===-1)j=!1,J=G+1;if(J===-1)return"";return $.slice(I,J)}}function pN($){OG($);var _=-1,I=0,J=-1,j=!0,G=0;for(var X=$.length-1;X>=0;--X){var W=$.charCodeAt(X);if(W===47){if(!j){I=X+1;break}continue}if(J===-1)j=!1,J=X+1;if(W===46){if(_===-1)_=X;else if(G!==1)G=1}else if(_!==-1)G=-1}if(_===-1||J===-1||G===0||G===1&&_===J-1&&_===I+1)return"";return $.slice(_,J)}function lN($){if($===null||typeof $!=="object")throw TypeError('The "pathObject" argument must be of type Object. Received type '+typeof $);return Su("/",$)}function dN($){OG($);var _={root:"",dir:"",base:"",ext:"",name:""};if($.length===0)return _;var I=$.charCodeAt(0),J=I===47,j;if(J)_.root="/",j=1;else j=0;var G=-1,X=0,W=-1,T=!0,F=$.length-1,E=0;for(;F>=j;--F){if(I=$.charCodeAt(F),I===47){if(!T){X=F+1;break}continue}if(W===-1)T=!1,W=F+1;if(I===46){if(G===-1)G=F;else if(E!==1)E=1}else if(G!==-1)E=-1}if(G===-1||W===-1||E===0||E===1&&G===W-1&&G===X+1){if(W!==-1)if(X===0&&J)_.base=_.name=$.slice(1,W);else _.base=_.name=$.slice(X,W)}else{if(X===0&&J)_.name=$.slice(1,G),_.base=$.slice(1,W);else _.name=$.slice(X,G),_.base=$.slice(X,W);_.ext=$.slice(G,W)}if(X>0)_.dir=$.slice(0,X-1);else if(J)_.dir="/";return _}var OA="/",rN=":",tN,ku;var jj=GX(()=>{tN=(($)=>($.posix=$,$))({resolve:ZI,normalize:zA,isAbsolute:tJ,join:F2,relative:ZA,_makeLong:iN,dirname:W_,basename:QZ,extname:pN,format:lN,parse:dN,sep:OA,delimiter:rN,win32:null,posix:null}),ku=tN});var Lk=eU((Uj0,Ok)=>{function ad($){let _=String($??"").trim(),I=/^(\S+)\s+from\s+(\S+)$/.exec(_);if(I){let J=Date.parse(I[1]),j=Date.parse(I[2]);if(!Number.isNaN(J)&&!Number.isNaN(j))return{kind:"running",at:J,since:j}}else{let J=Date.parse(_);if(!Number.isNaN(J))return{kind:"frozen",at:J}}throw Error(`world clock: expected an ISO-8601 instant, or "<instant> from <instant>", got ${JSON.stringify(_.slice(0,60))}`)}function sd($,_){return $.kind==="running"?$.at+(_-$.since):$.at}function ed($){return $.kind==="running"?`${new Date($.at).toISOString()} from ${new Date($.since).toISOString()}`:new Date($.at).toISOString()}Ok.exports={parseClock:ad,clockNowMs:sd,formatClock:ed}});var AP={};_j(AP,{resolveObject:()=>ok,resolve:()=>tk,parse:()=>eZ,format:()=>rk,default:()=>Kt,Url:()=>E4,URLSearchParams:()=>lk,URL:()=>HP});function FP($){return typeof $==="string"}function dk($){return typeof $==="object"&&$!==null}function CK($){return $===null}function Yt($){return $==null}function E4(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function eZ($,_,I){if($&&dk($)&&$ instanceof E4)return $;var J=new E4;return J.parse($,_,I),J}function rk($){if(FP($))$=eZ($);if(!($ instanceof E4))return E4.prototype.format.call($);return $.format()}function tk($,_){return eZ($,!1,!0).resolve(_)}function ok($,_){if(!$)return _;return eZ($,!1,!0).resolveObject(_)}var HP,lk,Jt,Qt,zt,Zt,Ot,WP,nk,ik,Lt=255,pk,Wt,Dt,DP,sZ,KP,Kt;var MP=GX(()=>{({URL:HP,URLSearchParams:lk}=globalThis);Jt=/^([a-z0-9.+-]+:)/i,Qt=/:[0-9]*$/,zt=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,Zt=["<",">",'"',"`"," ","\r",`
246
- `,"\t"],Ot=["{","}","|","\\","^","`"].concat(Zt),WP=["'"].concat(Ot),nk=["%","/","?",";","#"].concat(WP),ik=["/","?","#"],pk=/^[+a-z0-9A-Z_-]{0,63}$/,Wt=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Dt={javascript:!0,"javascript:":!0},DP={javascript:!0,"javascript:":!0},sZ={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},KP={parse($){var _=decodeURIComponent;return($+"").replace(/\+/g," ").split("&").filter(Boolean).reduce(function(I,J,j){var G=J.split("="),X=_(G[0]||""),W=_(G[1]||""),T=I[X];return I[X]=T===void 0?W:[].concat(T,W),I},{})},stringify($){var _=encodeURIComponent;return Object.keys($||{}).reduce(function(I,J){return[].concat($[J]).forEach(function(j){I.push(_(J)+"="+_(j))}),I},[]).join("&").replace(/\s/g,"+")}};E4.prototype.parse=function($,_,I){if(!FP($))throw TypeError("Parameter 'url' must be a string, not "+typeof $);var J=$.indexOf("?"),j=J!==-1&&J<$.indexOf("#")?"?":"#",G=$.split(j),X=/\\/g;G[0]=G[0].replace(X,"/"),$=G.join(j);var W=$;if(W=W.trim(),!I&&$.split("#").length===1){var T=zt.exec(W);if(T){if(this.path=W,this.href=W,this.pathname=T[1],T[2])if(this.search=T[2],_)this.query=KP.parse(this.search.substr(1));else this.query=this.search.substr(1);else if(_)this.search="",this.query={};return this}}var F=Jt.exec(W);if(F){F=F[0];var E=F.toLowerCase();this.protocol=E,W=W.substr(F.length)}if(I||F||W.match(/^\/\/[^@\/]+@[^@\/]+/)){var D=W.substr(0,2)==="//";if(D&&!(F&&DP[F]))W=W.substr(2),this.slashes=!0}if(!DP[F]&&(D||F&&!sZ[F])){var q=-1;for(var S=0;S<ik.length;S++){var k=W.indexOf(ik[S]);if(k!==-1&&(q===-1||k<q))q=k}var y,m;if(q===-1)m=W.lastIndexOf("@");else m=W.lastIndexOf("@",q);if(m!==-1)y=W.slice(0,m),W=W.slice(m+1),this.auth=decodeURIComponent(y);q=-1;for(var S=0;S<nk.length;S++){var k=W.indexOf(nk[S]);if(k!==-1&&(q===-1||k<q))q=k}if(q===-1)q=W.length;this.host=W.slice(0,q),W=W.slice(q),this.parseHost(),this.hostname=this.hostname||"";var n=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!n){var h=this.hostname.split(/\./);for(var S=0,i=h.length;S<i;S++){var s=h[S];if(!s)continue;if(!s.match(pk)){var j0="";for(var I0=0,H0=s.length;I0<H0;I0++)if(s.charCodeAt(I0)>127)j0+="x";else j0+=s[I0];if(!j0.match(pk)){var L0=h.slice(0,S),R0=h.slice(S+1),U0=s.match(Wt);if(U0)L0.push(U0[1]),R0.unshift(U0[2]);if(R0.length)W="/"+R0.join(".")+W;this.hostname=L0.join(".");break}}}}if(this.hostname.length>Lt)this.hostname="";else this.hostname=this.hostname.toLowerCase();if(!n)this.hostname=new HP(`https://${this.hostname}`).hostname;var c0=this.port?":"+this.port:"",Y=this.hostname||"";if(this.host=Y+c0,this.href+=this.host,n){if(this.hostname=this.hostname.substr(1,this.hostname.length-2),W[0]!=="/")W="/"+W}}if(!Dt[E])for(var S=0,i=WP.length;S<i;S++){var O=WP[S];if(W.indexOf(O)===-1)continue;var H=encodeURIComponent(O);if(H===O)H=escape(O);W=W.split(O).join(H)}var Z=W.indexOf("#");if(Z!==-1)this.hash=W.substr(Z),W=W.slice(0,Z);var K=W.indexOf("?");if(K!==-1){if(this.search=W.substr(K),this.query=W.substr(K+1),_)this.query=KP.parse(this.query);W=W.slice(0,K)}else if(_)this.search="",this.query={};if(W)this.pathname=W;if(sZ[E]&&this.hostname&&!this.pathname)this.pathname="/";if(this.pathname||this.search){var c0=this.pathname||"",w=this.search||"";this.path=c0+w}return this.href=this.format(),this};E4.prototype.format=function(){var $=this.auth||"";if($)$=encodeURIComponent($),$=$.replace(/%3A/i,":"),$+="@";var _=this.protocol||"",I=this.pathname||"",J=this.hash||"",j=!1,G="";if(this.host)j=$+this.host;else if(this.hostname){if(j=$+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port)j+=":"+this.port}if(this.query&&dk(this.query)&&Object.keys(this.query).length)G=KP.stringify(this.query);var X=this.search||G&&"?"+G||"";if(_&&_.substr(-1)!==":")_+=":";if(this.slashes||(!_||sZ[_])&&j!==!1){if(j="//"+(j||""),I&&I.charAt(0)!=="/")I="/"+I}else if(!j)j="";if(J&&J.charAt(0)!=="#")J="#"+J;if(X&&X.charAt(0)!=="?")X="?"+X;return I=I.replace(/[?#]/g,function(W){return encodeURIComponent(W)}),X=X.replace("#","%23"),_+j+I+X+J};E4.prototype.resolve=function($){return this.resolveObject(eZ($,!1,!0)).format()};E4.prototype.resolveObject=function($){if(FP($)){var _=new E4;_.parse($,!1,!0),$=_}var I=new E4,J=Object.keys(this);for(var j=0;j<J.length;j++){var G=J[j];I[G]=this[G]}if(I.hash=$.hash,$.href==="")return I.href=I.format(),I;if($.slashes&&!$.protocol){var X=Object.keys($);for(var W=0;W<X.length;W++){var T=X[W];if(T!=="protocol")I[T]=$[T]}if(sZ[I.protocol]&&I.hostname&&!I.pathname)I.path=I.pathname="/";return I.href=I.format(),I}if($.protocol&&$.protocol!==I.protocol){if(!sZ[$.protocol]){var F=Object.keys($);for(var E=0;E<F.length;E++){var D=F[E];I[D]=$[D]}return I.href=I.format(),I}if(I.protocol=$.protocol,!$.host&&!DP[$.protocol]){var i=($.pathname||"").split("/");while(i.length&&!($.host=i.shift()));if(!$.host)$.host="";if(!$.hostname)$.hostname="";if(i[0]!=="")i.unshift("");if(i.length<2)i.unshift("");I.pathname=i.join("/")}else I.pathname=$.pathname;if(I.search=$.search,I.query=$.query,I.host=$.host||"",I.auth=$.auth,I.hostname=$.hostname||$.host,I.port=$.port,I.pathname||I.search){var q=I.pathname||"",S=I.search||"";I.path=q+S}return I.slashes=I.slashes||$.slashes,I.href=I.format(),I}var k=I.pathname&&I.pathname.charAt(0)==="/",y=$.host||$.pathname&&$.pathname.charAt(0)==="/",m=y||k||I.host&&$.pathname,n=m,h=I.pathname&&I.pathname.split("/")||[],i=$.pathname&&$.pathname.split("/")||[],s=I.protocol&&!sZ[I.protocol];if(s){if(I.hostname="",I.port=null,I.host)if(h[0]==="")h[0]=I.host;else h.unshift(I.host);if(I.host="",$.protocol){if($.hostname=null,$.port=null,$.host)if(i[0]==="")i[0]=$.host;else i.unshift($.host);$.host=null}m=m&&(i[0]===""||h[0]==="")}if(y)I.host=$.host||$.host===""?$.host:I.host,I.hostname=$.hostname||$.hostname===""?$.hostname:I.hostname,I.search=$.search,I.query=$.query,h=i;else if(i.length){if(!h)h=[];h.pop(),h=h.concat(i),I.search=$.search,I.query=$.query}else if(!Yt($.search)){if(s){I.hostname=I.host=h.shift();var j0=I.host&&I.host.indexOf("@")>0?I.host.split("@"):!1;if(j0)I.auth=j0.shift(),I.host=I.hostname=j0.shift()}if(I.search=$.search,I.query=$.query,!CK(I.pathname)||!CK(I.search))I.path=(I.pathname?I.pathname:"")+(I.search?I.search:"");return I.href=I.format(),I}if(!h.length){if(I.pathname=null,I.search)I.path="/"+I.search;else I.path=null;return I.href=I.format(),I}var I0=h.slice(-1)[0],H0=(I.host||$.host||h.length>1)&&(I0==="."||I0==="..")||I0==="",L0=0;for(var R0=h.length;R0>=0;R0--)if(I0=h[R0],I0===".")h.splice(R0,1);else if(I0==="..")h.splice(R0,1),L0++;else if(L0)h.splice(R0,1),L0--;if(!m&&!n)for(;L0--;L0)h.unshift("..");if(m&&h[0]!==""&&(!h[0]||h[0].charAt(0)!=="/"))h.unshift("");if(H0&&h.join("/").substr(-1)!=="/")h.push("");var U0=h[0]===""||h[0]&&h[0].charAt(0)==="/";if(s){I.hostname=I.host=U0?"":h.length?h.shift():"";var j0=I.host&&I.host.indexOf("@")>0?I.host.split("@"):!1;if(j0)I.auth=j0.shift(),I.host=I.hostname=j0.shift()}if(m=m||I.host&&h.length,m&&!U0)h.unshift("");if(!h.length)I.pathname=null,I.path=null;else I.pathname=h.join("/");if(!CK(I.pathname)||!CK(I.search))I.path=(I.pathname?I.pathname:"")+(I.search?I.search:"");return I.auth=$.auth||I.auth,I.slashes=I.slashes||$.slashes,I.href=I.format(),I};E4.prototype.parseHost=function(){var $=this.host,_=Qt.exec($);if(_){if(_=_[0],_!==":")this.port=_.substr(1);$=$.substr(0,$.length-_.length)}if($)this.hostname=$};Kt={parse:eZ,resolve:tk,resolveObject:ok,format:rk,Url:E4,URL:HP,URLSearchParams:lk}});var wK={};_j(wK,{request:()=>ct,globalAgent:()=>ht,get:()=>xt,default:()=>Yc,STATUS_CODES:()=>mt,METHODS:()=>ut,IncomingMessage:()=>yt,ClientRequest:()=>ft,Agent:()=>bt});var Ht,Ft,ak,At,Mt,Et=($,_,I)=>{I=$!=null?Ht(Ft($)):{};let J=_||!$||!$.__esModule?ak(I,"default",{value:$,enumerable:!0}):I;for(let j of At($))if(!Mt.call(J,j))ak(J,j,{get:()=>$[j],enumerable:!0});return J},iv=($,_)=>()=>(_||$((_={exports:{}}).exports,_),_.exports),ek,Vt,i8,Tt,$c,p8,vc,Rt,_c,$O,Pt,sk,EP,qt,gt,jc,Uc,Ct,wt,Ic,Xc,Nt,Bt,St,kt,Gc,ct,xt,ft,yt,bt,ht,mt,ut,Yc;var SL=GX(()=>{Ht=Object.create,{getPrototypeOf:Ft,defineProperty:ak,getOwnPropertyNames:At}=Object,Mt=Object.prototype.hasOwnProperty,ek=iv(($)=>{$.fetch=j(globalThis.fetch)&&j(globalThis.ReadableStream),$.writableStream=j(globalThis.WritableStream),$.abortController=j(globalThis.AbortController);var _;function I(){if(_!==void 0)return _;if(globalThis.XMLHttpRequest){_=new globalThis.XMLHttpRequest;try{_.open("GET",globalThis.XDomainRequest?"/":"https://example.com")}catch(G){_=null}}else _=null;return _}function J(G){var X=I();if(!X)return!1;try{return X.responseType=G,X.responseType===G}catch(W){}return!1}$.arraybuffer=$.fetch||J("arraybuffer"),$.msstream=!$.fetch&&J("ms-stream"),$.mozchunkedarraybuffer=!$.fetch&&J("moz-chunked-arraybuffer"),$.overrideMimeType=$.fetch||(I()?j(I().overrideMimeType):!1);function j(G){return typeof G==="function"}_=null}),Vt=iv(($,_)=>{if(typeof Object.create==="function")_.exports=function(I,J){if(J)I.super_=J,I.prototype=Object.create(J.prototype,{constructor:{value:I,enumerable:!1,writable:!0,configurable:!0}})};else _.exports=function(I,J){if(J){I.super_=J;var j=function(){};j.prototype=J.prototype,I.prototype=new j,I.prototype.constructor=I}}}),i8=iv(($,_)=>{try{if(I=(pJ(),X1(iJ)),typeof I.inherits!=="function")throw"";_.exports=I.inherits}catch(J){_.exports=Vt()}var I}),Tt=iv(($,_)=>{function I(m,n){var h=Object.keys(m);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(m);n&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(m,s).enumerable})),h.push.apply(h,i)}return h}function J(m){for(var n=1;n<arguments.length;n++){var h=arguments[n]!=null?arguments[n]:{};n%2?I(Object(h),!0).forEach(function(i){j(m,i,h[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(m,Object.getOwnPropertyDescriptors(h)):I(Object(h)).forEach(function(i){Object.defineProperty(m,i,Object.getOwnPropertyDescriptor(h,i))})}return m}function j(m,n,h){if(n=T(n),n in m)Object.defineProperty(m,n,{value:h,enumerable:!0,configurable:!0,writable:!0});else m[n]=h;return m}function G(m,n){if(!(m instanceof n))throw TypeError("Cannot call a class as a function")}function X(m,n){for(var h=0;h<n.length;h++){var i=n[h];if(i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i)i.writable=!0;Object.defineProperty(m,T(i.key),i)}}function W(m,n,h){if(n)X(m.prototype,n);if(h)X(m,h);return Object.defineProperty(m,"prototype",{writable:!1}),m}function T(m){var n=F(m,"string");return typeof n==="symbol"?n:String(n)}function F(m,n){if(typeof m!=="object"||m===null)return m;var h=m[Symbol.toPrimitive];if(h!==void 0){var i=h.call(m,n||"default");if(typeof i!=="object")return i;throw TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(m)}var E=(j_(),X1(__)),D=E.Buffer,q=(pJ(),X1(iJ)),S=q.inspect,k=S&&S.custom||"inspect";function y(m,n,h){D.prototype.copy.call(m,n,h)}_.exports=function(){function m(){G(this,m),this.head=null,this.tail=null,this.length=0}return W(m,[{key:"push",value:function(n){var h={data:n,next:null};if(this.length>0)this.tail.next=h;else this.head=h;this.tail=h,++this.length}},{key:"unshift",value:function(n){var h={data:n,next:this.head};if(this.length===0)this.tail=h;this.head=h,++this.length}},{key:"shift",value:function(){if(this.length===0)return;var n=this.head.data;if(this.length===1)this.head=this.tail=null;else this.head=this.head.next;return--this.length,n}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(n){if(this.length===0)return"";var h=this.head,i=""+h.data;while(h=h.next)i+=n+h.data;return i}},{key:"concat",value:function(n){if(this.length===0)return D.alloc(0);var h=D.allocUnsafe(n>>>0),i=this.head,s=0;while(i)y(i.data,h,s),s+=i.data.length,i=i.next;return h}},{key:"consume",value:function(n,h){var i;if(n<this.head.data.length)i=this.head.data.slice(0,n),this.head.data=this.head.data.slice(n);else if(n===this.head.data.length)i=this.shift();else i=h?this._getString(n):this._getBuffer(n);return i}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(n){var h=this.head,i=1,s=h.data;n-=s.length;while(h=h.next){var j0=h.data,I0=n>j0.length?j0.length:n;if(I0===j0.length)s+=j0;else s+=j0.slice(0,n);if(n-=I0,n===0){if(I0===j0.length)if(++i,h.next)this.head=h.next;else this.head=this.tail=null;else this.head=h,h.data=j0.slice(I0);break}++i}return this.length-=i,s}},{key:"_getBuffer",value:function(n){var h=D.allocUnsafe(n),i=this.head,s=1;i.data.copy(h),n-=i.data.length;while(i=i.next){var j0=i.data,I0=n>j0.length?j0.length:n;if(j0.copy(h,h.length-n,0,I0),n-=I0,n===0){if(I0===j0.length)if(++s,i.next)this.head=i.next;else this.head=this.tail=null;else this.head=i,i.data=j0.slice(I0);break}++s}return this.length-=s,h}},{key:k,value:function(n,h){return S(this,J(J({},h),{},{depth:0,customInspect:!1}))}}]),m}()}),$c=iv(($,_)=>{function I(T,F){var E=this,D=this._readableState&&this._readableState.destroyed,q=this._writableState&&this._writableState.destroyed;if(D||q){if(F)F(T);else if(T){if(!this._writableState)process.nextTick(X,this,T);else if(!this._writableState.errorEmitted)this._writableState.errorEmitted=!0,process.nextTick(X,this,T)}return this}if(this._readableState)this._readableState.destroyed=!0;if(this._writableState)this._writableState.destroyed=!0;return this._destroy(T||null,function(S){if(!F&&S)if(!E._writableState)process.nextTick(J,E,S);else if(!E._writableState.errorEmitted)E._writableState.errorEmitted=!0,process.nextTick(J,E,S);else process.nextTick(j,E);else if(F)process.nextTick(j,E),F(S);else process.nextTick(j,E)}),this}function J(T,F){X(T,F),j(T)}function j(T){if(T._writableState&&!T._writableState.emitClose)return;if(T._readableState&&!T._readableState.emitClose)return;T.emit("close")}function G(){if(this._readableState)this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1;if(this._writableState)this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1}function X(T,F){T.emit("error",F)}function W(T,F){var{_readableState:E,_writableState:D}=T;if(E&&E.autoDestroy||D&&D.autoDestroy)T.destroy(F);else T.emit("error",F)}_.exports={destroy:I,undestroy:G,errorOrDestroy:W}}),p8=iv(($,_)=>{var I={};function J(T,F,E){if(!E)E=Error;function D(S,k,y){if(typeof F==="string")return F;else return F(S,k,y)}class q extends E{constructor(S,k,y){super(D(S,k,y))}}q.prototype.name=E.name,q.prototype.code=T,I[T]=q}function j(T,F){if(Array.isArray(T)){let E=T.length;if(T=T.map((D)=>String(D)),E>2)return`one of ${F} ${T.slice(0,E-1).join(", ")}, or `+T[E-1];else if(E===2)return`one of ${F} ${T[0]} or ${T[1]}`;else return`of ${F} ${T[0]}`}else return`of ${F} ${String(T)}`}function G(T,F,E){return T.substr(!E||E<0?0:+E,F.length)===F}function X(T,F,E){if(E===void 0||E>T.length)E=T.length;return T.substring(E-F.length,E)===F}function W(T,F,E){if(typeof E!=="number")E=0;if(E+F.length>T.length)return!1;else return T.indexOf(F,E)!==-1}J("ERR_INVALID_OPT_VALUE",function(T,F){return'The value "'+F+'" is invalid for option "'+T+'"'},TypeError),J("ERR_INVALID_ARG_TYPE",function(T,F,E){let D;if(typeof F==="string"&&G(F,"not "))D="must not be",F=F.replace(/^not /,"");else D="must be";let q;if(X(T," argument"))q=`The ${T} ${D} ${j(F,"type")}`;else{let S=W(T,".")?"property":"argument";q=`The "${T}" ${S} ${D} ${j(F,"type")}`}return q+=`. Received type ${typeof E}`,q},TypeError),J("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),J("ERR_METHOD_NOT_IMPLEMENTED",function(T){return"The "+T+" method is not implemented"}),J("ERR_STREAM_PREMATURE_CLOSE","Premature close"),J("ERR_STREAM_DESTROYED",function(T){return"Cannot call "+T+" after a stream was destroyed"}),J("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),J("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),J("ERR_STREAM_WRITE_AFTER_END","write after end"),J("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),J("ERR_UNKNOWN_ENCODING",function(T){return"Unknown encoding: "+T},TypeError),J("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),$.codes=I}),vc=iv(($,_)=>{var I=p8().codes.ERR_INVALID_OPT_VALUE;function J(G,X,W){return G.highWaterMark!=null?G.highWaterMark:X?G[W]:null}function j(G,X,W,T){var F=J(X,T,W);if(F!=null){if(!(isFinite(F)&&Math.floor(F)===F)||F<0){var E=T?W:"highWaterMark";throw new I(E,F)}return Math.floor(F)}return G.objectMode?16:16384}_.exports={getHighWaterMark:j}}),Rt=iv(($,_)=>{_.exports=(pJ(),X1(iJ)).deprecate}),_c=iv(($,_)=>{_.exports=U0;function I(E0){var _0=this;this.next=null,this.entry=null,this.finish=function(){P0(_0,E0)}}var J;U0.WritableState=L0;var j={deprecate:Rt()},G=E8(),X=(j_(),X1(__)).Buffer,W=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function T(E0){return X.from(E0)}function F(E0){return X.isBuffer(E0)||E0 instanceof W}var E=$c(),D=vc(),q=D.getHighWaterMark,S=p8().codes,k=S.ERR_INVALID_ARG_TYPE,y=S.ERR_METHOD_NOT_IMPLEMENTED,m=S.ERR_MULTIPLE_CALLBACK,n=S.ERR_STREAM_CANNOT_PIPE,h=S.ERR_STREAM_DESTROYED,i=S.ERR_STREAM_NULL_VALUES,s=S.ERR_STREAM_WRITE_AFTER_END,j0=S.ERR_UNKNOWN_ENCODING,I0=E.errorOrDestroy;i8()(U0,G);function H0(){}function L0(E0,_0,$0){if(J=J||$O(),E0=E0||{},typeof $0!=="boolean")$0=_0 instanceof J;if(this.objectMode=!!E0.objectMode,$0)this.objectMode=this.objectMode||!!E0.writableObjectMode;this.highWaterMark=q(this,E0,"writableHighWaterMark",$0),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var G0=E0.decodeStrings===!1;this.decodeStrings=!G0,this.defaultEncoding=E0.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(K0){B(_0,K0)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=E0.emitClose!==!1,this.autoDestroy=!!E0.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new I(this)}L0.prototype.getBuffer=function(){var E0=this.bufferedRequest,_0=[];while(E0)_0.push(E0),E0=E0.next;return _0},function(){try{Object.defineProperty(L0.prototype,"buffer",{get:j.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(E0){}}();var R0;if(typeof Symbol==="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]==="function")R0=Function.prototype[Symbol.hasInstance],Object.defineProperty(U0,Symbol.hasInstance,{value:function(E0){if(R0.call(this,E0))return!0;if(this!==U0)return!1;return E0&&E0._writableState instanceof L0}});else R0=function(E0){return E0 instanceof this};function U0(E0){J=J||$O();var _0=this instanceof J;if(!_0&&!R0.call(U0,this))return new U0(E0);if(this._writableState=new L0(E0,this,_0),this.writable=!0,E0){if(typeof E0.write==="function")this._write=E0.write;if(typeof E0.writev==="function")this._writev=E0.writev;if(typeof E0.destroy==="function")this._destroy=E0.destroy;if(typeof E0.final==="function")this._final=E0.final}G.call(this)}U0.prototype.pipe=function(){I0(this,new n)};function c0(E0,_0){var $0=new s;I0(E0,$0),process.nextTick(_0,$0)}function Y(E0,_0,$0,G0){var K0;if($0===null)K0=new i;else if(typeof $0!=="string"&&!_0.objectMode)K0=new k("chunk",["string","Buffer"],$0);if(K0)return I0(E0,K0),process.nextTick(G0,K0),!1;return!0}U0.prototype.write=function(E0,_0,$0){var G0=this._writableState,K0=!1,q0=!G0.objectMode&&F(E0);if(q0&&!X.isBuffer(E0))E0=T(E0);if(typeof _0==="function")$0=_0,_0=null;if(q0)_0="buffer";else if(!_0)_0=G0.defaultEncoding;if(typeof $0!=="function")$0=H0;if(G0.ending)c0(this,$0);else if(q0||Y(this,G0,E0,$0))G0.pendingcb++,K0=H(this,G0,q0,E0,_0,$0);return K0},U0.prototype.cork=function(){this._writableState.corked++},U0.prototype.uncork=function(){var E0=this._writableState;if(E0.corked){if(E0.corked--,!E0.writing&&!E0.corked&&!E0.bufferProcessing&&E0.bufferedRequest)A(this,E0)}},U0.prototype.setDefaultEncoding=function(E0){if(typeof E0==="string")E0=E0.toLowerCase();if(!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((E0+"").toLowerCase())>-1))throw new j0(E0);return this._writableState.defaultEncoding=E0,this},Object.defineProperty(U0.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function O(E0,_0,$0){if(!E0.objectMode&&E0.decodeStrings!==!1&&typeof _0==="string")_0=X.from(_0,$0);return _0}Object.defineProperty(U0.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function H(E0,_0,$0,G0,K0,q0){if(!$0){var z0=O(_0,G0,K0);if(G0!==z0)$0=!0,K0="buffer",G0=z0}var a=_0.objectMode?1:G0.length;_0.length+=a;var J0=_0.length<_0.highWaterMark;if(!J0)_0.needDrain=!0;if(_0.writing||_0.corked){var y0=_0.lastBufferedRequest;if(_0.lastBufferedRequest={chunk:G0,encoding:K0,isBuf:$0,callback:q0,next:null},y0)y0.next=_0.lastBufferedRequest;else _0.bufferedRequest=_0.lastBufferedRequest;_0.bufferedRequestCount+=1}else Z(E0,_0,!1,a,G0,K0,q0);return J0}function Z(E0,_0,$0,G0,K0,q0,z0){if(_0.writelen=G0,_0.writecb=z0,_0.writing=!0,_0.sync=!0,_0.destroyed)_0.onwrite(new h("write"));else if($0)E0._writev(K0,_0.onwrite);else E0._write(K0,q0,_0.onwrite);_0.sync=!1}function K(E0,_0,$0,G0,K0){if(--_0.pendingcb,$0)process.nextTick(K0,G0),process.nextTick(Q0,E0,_0),E0._writableState.errorEmitted=!0,I0(E0,G0);else K0(G0),E0._writableState.errorEmitted=!0,I0(E0,G0),Q0(E0,_0)}function w(E0){E0.writing=!1,E0.writecb=null,E0.length-=E0.writelen,E0.writelen=0}function B(E0,_0){var $0=E0._writableState,G0=$0.sync,K0=$0.writecb;if(typeof K0!=="function")throw new m;if(w($0),_0)K(E0,$0,G0,_0,K0);else{var q0=f($0)||E0.destroyed;if(!q0&&!$0.corked&&!$0.bufferProcessing&&$0.bufferedRequest)A(E0,$0);if(G0)process.nextTick(P,E0,$0,q0,K0);else P(E0,$0,q0,K0)}}function P(E0,_0,$0,G0){if(!$0)z(E0,_0);_0.pendingcb--,G0(),Q0(E0,_0)}function z(E0,_0){if(_0.length===0&&_0.needDrain)_0.needDrain=!1,E0.emit("drain")}function A(E0,_0){_0.bufferProcessing=!0;var $0=_0.bufferedRequest;if(E0._writev&&$0&&$0.next){var G0=_0.bufferedRequestCount,K0=Array(G0),q0=_0.corkedRequestsFree;q0.entry=$0;var z0=0,a=!0;while($0){if(K0[z0]=$0,!$0.isBuf)a=!1;$0=$0.next,z0+=1}if(K0.allBuffers=a,Z(E0,_0,!0,_0.length,K0,"",q0.finish),_0.pendingcb++,_0.lastBufferedRequest=null,q0.next)_0.corkedRequestsFree=q0.next,q0.next=null;else _0.corkedRequestsFree=new I(_0);_0.bufferedRequestCount=0}else{while($0){var{chunk:J0,encoding:y0,callback:N0}=$0,A0=_0.objectMode?1:J0.length;if(Z(E0,_0,!1,A0,J0,y0,N0),$0=$0.next,_0.bufferedRequestCount--,_0.writing)break}if($0===null)_0.lastBufferedRequest=null}_0.bufferedRequest=$0,_0.bufferProcessing=!1}U0.prototype._write=function(E0,_0,$0){$0(new y("_write()"))},U0.prototype._writev=null,U0.prototype.end=function(E0,_0,$0){var G0=this._writableState;if(typeof E0==="function")$0=E0,E0=null,_0=null;else if(typeof _0==="function")$0=_0,_0=null;if(E0!==null&&E0!==void 0)this.write(E0,_0);if(G0.corked)G0.corked=1,this.uncork();if(!G0.ending)F0(this,G0,$0);return this},Object.defineProperty(U0.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function f(E0){return E0.ending&&E0.length===0&&E0.bufferedRequest===null&&!E0.finished&&!E0.writing}function c(E0,_0){E0._final(function($0){if(_0.pendingcb--,$0)I0(E0,$0);_0.prefinished=!0,E0.emit("prefinish"),Q0(E0,_0)})}function p(E0,_0){if(!_0.prefinished&&!_0.finalCalled)if(typeof E0._final==="function"&&!_0.destroyed)_0.pendingcb++,_0.finalCalled=!0,process.nextTick(c,E0,_0);else _0.prefinished=!0,E0.emit("prefinish")}function Q0(E0,_0){var $0=f(_0);if($0){if(p(E0,_0),_0.pendingcb===0){if(_0.finished=!0,E0.emit("finish"),_0.autoDestroy){var G0=E0._readableState;if(!G0||G0.autoDestroy&&G0.endEmitted)E0.destroy()}}}return $0}function F0(E0,_0,$0){if(_0.ending=!0,Q0(E0,_0),$0)if(_0.finished)process.nextTick($0);else E0.once("finish",$0);_0.ended=!0,E0.writable=!1}function P0(E0,_0,$0){var G0=E0.entry;E0.entry=null;while(G0){var K0=G0.callback;_0.pendingcb--,K0($0),G0=G0.next}_0.corkedRequestsFree.next=E0}Object.defineProperty(U0.prototype,"destroyed",{enumerable:!1,get:function(){if(this._writableState===void 0)return!1;return this._writableState.destroyed},set:function(E0){if(!this._writableState)return;this._writableState.destroyed=E0}}),U0.prototype.destroy=E.destroy,U0.prototype._undestroy=E.undestroy,U0.prototype._destroy=function(E0,_0){_0(E0)}}),$O=iv(($,_)=>{var I=Object.keys||function(D){var q=[];for(var S in D)q.push(S);return q};_.exports=T;var J=jc(),j=_c();i8()(T,J);{G=I(j.prototype);for(W=0;W<G.length;W++)if(X=G[W],!T.prototype[X])T.prototype[X]=j.prototype[X]}var G,X,W;function T(D){if(!(this instanceof T))return new T(D);if(J.call(this,D),j.call(this,D),this.allowHalfOpen=!0,D){if(D.readable===!1)this.readable=!1;if(D.writable===!1)this.writable=!1;if(D.allowHalfOpen===!1)this.allowHalfOpen=!1,this.once("end",F)}}Object.defineProperty(T.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(T.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(T.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function F(){if(this._writableState.ended)return;process.nextTick(E,this)}function E(D){D.end()}Object.defineProperty(T.prototype,"destroyed",{enumerable:!1,get:function(){if(this._readableState===void 0||this._writableState===void 0)return!1;return this._readableState.destroyed&&this._writableState.destroyed},set:function(D){if(this._readableState===void 0||this._writableState===void 0)return;this._readableState.destroyed=D,this._writableState.destroyed=D}})}),Pt=iv(($,_)=>{/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var I=(j_(),X1(__)),J=I.Buffer;function j(X,W){for(var T in X)W[T]=X[T]}if(J.from&&J.alloc&&J.allocUnsafe&&J.allocUnsafeSlow)_.exports=I;else j(I,$),$.Buffer=G;function G(X,W,T){return J(X,W,T)}G.prototype=Object.create(J.prototype),j(J,G),G.from=function(X,W,T){if(typeof X==="number")throw TypeError("Argument must not be a number");return J(X,W,T)},G.alloc=function(X,W,T){if(typeof X!=="number")throw TypeError("Argument must be a number");var F=J(X);if(W!==void 0)if(typeof T==="string")F.fill(W,T);else F.fill(W);else F.fill(0);return F},G.allocUnsafe=function(X){if(typeof X!=="number")throw TypeError("Argument must be a number");return J(X)},G.allocUnsafeSlow=function(X){if(typeof X!=="number")throw TypeError("Argument must be a number");return I.SlowBuffer(X)}}),sk=iv(($)=>{var _=Pt().Buffer,I=_.isEncoding||function(h){switch(h=""+h,h&&h.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 J(h){if(!h)return"utf8";var i;while(!0)switch(h){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 h;default:if(i)return;h=(""+h).toLowerCase(),i=!0}}function j(h){var i=J(h);if(typeof i!=="string"&&(_.isEncoding===I||!I(h)))throw Error("Unknown encoding: "+h);return i||h}$.StringDecoder=G;function G(h){this.encoding=j(h);var i;switch(this.encoding){case"utf16le":this.text=q,this.end=S,i=4;break;case"utf8":this.fillLast=F,i=4;break;case"base64":this.text=k,this.end=y,i=3;break;default:this.write=m,this.end=n;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=_.allocUnsafe(i)}G.prototype.write=function(h){if(h.length===0)return"";var i,s;if(this.lastNeed){if(i=this.fillLast(h),i===void 0)return"";s=this.lastNeed,this.lastNeed=0}else s=0;if(s<h.length)return i?i+this.text(h,s):this.text(h,s);return i||""},G.prototype.end=D,G.prototype.text=E,G.prototype.fillLast=function(h){if(this.lastNeed<=h.length)return h.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);h.copy(this.lastChar,this.lastTotal-this.lastNeed,0,h.length),this.lastNeed-=h.length};function X(h){if(h<=127)return 0;else if(h>>5===6)return 2;else if(h>>4===14)return 3;else if(h>>3===30)return 4;return h>>6===2?-1:-2}function W(h,i,s){var j0=i.length-1;if(j0<s)return 0;var I0=X(i[j0]);if(I0>=0){if(I0>0)h.lastNeed=I0-1;return I0}if(--j0<s||I0===-2)return 0;if(I0=X(i[j0]),I0>=0){if(I0>0)h.lastNeed=I0-2;return I0}if(--j0<s||I0===-2)return 0;if(I0=X(i[j0]),I0>=0){if(I0>0)if(I0===2)I0=0;else h.lastNeed=I0-3;return I0}return 0}function T(h,i,s){if((i[0]&192)!==128)return h.lastNeed=0,"�";if(h.lastNeed>1&&i.length>1){if((i[1]&192)!==128)return h.lastNeed=1,"�";if(h.lastNeed>2&&i.length>2){if((i[2]&192)!==128)return h.lastNeed=2,"�"}}}function F(h){var i=this.lastTotal-this.lastNeed,s=T(this,h,i);if(s!==void 0)return s;if(this.lastNeed<=h.length)return h.copy(this.lastChar,i,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);h.copy(this.lastChar,i,0,h.length),this.lastNeed-=h.length}function E(h,i){var s=W(this,h,i);if(!this.lastNeed)return h.toString("utf8",i);this.lastTotal=s;var j0=h.length-(s-this.lastNeed);return h.copy(this.lastChar,0,j0),h.toString("utf8",i,j0)}function D(h){var i=h&&h.length?this.write(h):"";if(this.lastNeed)return i+"�";return i}function q(h,i){if((h.length-i)%2===0){var s=h.toString("utf16le",i);if(s){var j0=s.charCodeAt(s.length-1);if(j0>=55296&&j0<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=h[h.length-2],this.lastChar[1]=h[h.length-1],s.slice(0,-1)}return s}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=h[h.length-1],h.toString("utf16le",i,h.length-1)}function S(h){var i=h&&h.length?this.write(h):"";if(this.lastNeed){var s=this.lastTotal-this.lastNeed;return i+this.lastChar.toString("utf16le",0,s)}return i}function k(h,i){var s=(h.length-i)%3;if(s===0)return h.toString("base64",i);if(this.lastNeed=3-s,this.lastTotal=3,s===1)this.lastChar[0]=h[h.length-1];else this.lastChar[0]=h[h.length-2],this.lastChar[1]=h[h.length-1];return h.toString("base64",i,h.length-s)}function y(h){var i=h&&h.length?this.write(h):"";if(this.lastNeed)return i+this.lastChar.toString("base64",0,3-this.lastNeed);return i}function m(h){return h.toString(this.encoding)}function n(h){return h&&h.length?this.write(h):""}}),EP=iv(($,_)=>{var I=p8().codes.ERR_STREAM_PREMATURE_CLOSE;function J(W){var T=!1;return function(){if(T)return;T=!0;for(var F=arguments.length,E=Array(F),D=0;D<F;D++)E[D]=arguments[D];W.apply(this,E)}}function j(){}function G(W){return W.setHeader&&typeof W.abort==="function"}function X(W,T,F){if(typeof T==="function")return X(W,null,T);if(!T)T={};F=J(F||j);var E=T.readable||T.readable!==!1&&W.readable,D=T.writable||T.writable!==!1&&W.writable,q=function(){if(!W.writable)k()},S=W._writableState&&W._writableState.finished,k=function(){if(D=!1,S=!0,!E)F.call(W)},y=W._readableState&&W._readableState.endEmitted,m=function(){if(E=!1,y=!0,!D)F.call(W)},n=function(s){F.call(W,s)},h=function(){var s;if(E&&!y){if(!W._readableState||!W._readableState.ended)s=new I;return F.call(W,s)}if(D&&!S){if(!W._writableState||!W._writableState.ended)s=new I;return F.call(W,s)}},i=function(){W.req.on("finish",k)};if(G(W))if(W.on("complete",k),W.on("abort",h),W.req)i();else W.on("request",i);else if(D&&!W._writableState)W.on("end",q),W.on("close",q);if(W.on("end",m),W.on("finish",k),T.error!==!1)W.on("error",n);return W.on("close",h),function(){if(W.removeListener("complete",k),W.removeListener("abort",h),W.removeListener("request",i),W.req)W.req.removeListener("finish",k);W.removeListener("end",q),W.removeListener("close",q),W.removeListener("finish",k),W.removeListener("end",m),W.removeListener("error",n),W.removeListener("close",h)}}_.exports=X}),qt=iv(($,_)=>{var I;function J(j0,I0,H0){if(I0=j(I0),I0 in j0)Object.defineProperty(j0,I0,{value:H0,enumerable:!0,configurable:!0,writable:!0});else j0[I0]=H0;return j0}function j(j0){var I0=G(j0,"string");return typeof I0==="symbol"?I0:String(I0)}function G(j0,I0){if(typeof j0!=="object"||j0===null)return j0;var H0=j0[Symbol.toPrimitive];if(H0!==void 0){var L0=H0.call(j0,I0||"default");if(typeof L0!=="object")return L0;throw TypeError("@@toPrimitive must return a primitive value.")}return(I0==="string"?String:Number)(j0)}var X=EP(),W=Symbol("lastResolve"),T=Symbol("lastReject"),F=Symbol("error"),E=Symbol("ended"),D=Symbol("lastPromise"),q=Symbol("handlePromise"),S=Symbol("stream");function k(j0,I0){return{value:j0,done:I0}}function y(j0){var I0=j0[W];if(I0!==null){var H0=j0[S].read();if(H0!==null)j0[D]=null,j0[W]=null,j0[T]=null,I0(k(H0,!1))}}function m(j0){process.nextTick(y,j0)}function n(j0,I0){return function(H0,L0){j0.then(function(){if(I0[E]){H0(k(void 0,!0));return}I0[q](H0,L0)},L0)}}var h=Object.getPrototypeOf(function(){}),i=Object.setPrototypeOf((I={get stream(){return this[S]},next:function(){var j0=this,I0=this[F];if(I0!==null)return Promise.reject(I0);if(this[E])return Promise.resolve(k(void 0,!0));if(this[S].destroyed)return new Promise(function(U0,c0){process.nextTick(function(){if(j0[F])c0(j0[F]);else U0(k(void 0,!0))})});var H0=this[D],L0;if(H0)L0=new Promise(n(H0,this));else{var R0=this[S].read();if(R0!==null)return Promise.resolve(k(R0,!1));L0=new Promise(this[q])}return this[D]=L0,L0}},J(I,Symbol.asyncIterator,function(){return this}),J(I,"return",function(){var j0=this;return new Promise(function(I0,H0){j0[S].destroy(null,function(L0){if(L0){H0(L0);return}I0(k(void 0,!0))})})}),I),h),s=function(j0){var I0,H0=Object.create(i,(I0={},J(I0,S,{value:j0,writable:!0}),J(I0,W,{value:null,writable:!0}),J(I0,T,{value:null,writable:!0}),J(I0,F,{value:null,writable:!0}),J(I0,E,{value:j0._readableState.endEmitted,writable:!0}),J(I0,q,{value:function(L0,R0){var U0=H0[S].read();if(U0)H0[D]=null,H0[W]=null,H0[T]=null,L0(k(U0,!1));else H0[W]=L0,H0[T]=R0},writable:!0}),I0));return H0[D]=null,X(j0,function(L0){if(L0&&L0.code!=="ERR_STREAM_PREMATURE_CLOSE"){var R0=H0[T];if(R0!==null)H0[D]=null,H0[W]=null,H0[T]=null,R0(L0);H0[F]=L0;return}var U0=H0[W];if(U0!==null)H0[D]=null,H0[W]=null,H0[T]=null,U0(k(void 0,!0));H0[E]=!0}),j0.on("readable",m.bind(null,H0)),H0};_.exports=s}),gt=iv(($,_)=>{function I(D,q,S,k,y,m,n){try{var h=D[m](n),i=h.value}catch(s){S(s);return}if(h.done)q(i);else Promise.resolve(i).then(k,y)}function J(D){return function(){var q=this,S=arguments;return new Promise(function(k,y){var m=D.apply(q,S);function n(i){I(m,k,y,n,h,"next",i)}function h(i){I(m,k,y,n,h,"throw",i)}n(void 0)})}}function j(D,q){var S=Object.keys(D);if(Object.getOwnPropertySymbols){var k=Object.getOwnPropertySymbols(D);q&&(k=k.filter(function(y){return Object.getOwnPropertyDescriptor(D,y).enumerable})),S.push.apply(S,k)}return S}function G(D){for(var q=1;q<arguments.length;q++){var S=arguments[q]!=null?arguments[q]:{};q%2?j(Object(S),!0).forEach(function(k){X(D,k,S[k])}):Object.getOwnPropertyDescriptors?Object.defineProperties(D,Object.getOwnPropertyDescriptors(S)):j(Object(S)).forEach(function(k){Object.defineProperty(D,k,Object.getOwnPropertyDescriptor(S,k))})}return D}function X(D,q,S){if(q=W(q),q in D)Object.defineProperty(D,q,{value:S,enumerable:!0,configurable:!0,writable:!0});else D[q]=S;return D}function W(D){var q=T(D,"string");return typeof q==="symbol"?q:String(q)}function T(D,q){if(typeof D!=="object"||D===null)return D;var S=D[Symbol.toPrimitive];if(S!==void 0){var k=S.call(D,q||"default");if(typeof k!=="object")return k;throw TypeError("@@toPrimitive must return a primitive value.")}return(q==="string"?String:Number)(D)}var F=p8().codes.ERR_INVALID_ARG_TYPE;function E(D,q,S){var k;if(q&&typeof q.next==="function")k=q;else if(q&&q[Symbol.asyncIterator])k=q[Symbol.asyncIterator]();else if(q&&q[Symbol.iterator])k=q[Symbol.iterator]();else throw new F("iterable",["Iterable"],q);var y=new D(G({objectMode:!0},S)),m=!1;y._read=function(){if(!m)m=!0,n()};function n(){return h.apply(this,arguments)}function h(){return h=J(function*(){try{var i=yield k.next(),s=i.value,j0=i.done;if(j0)y.push(null);else if(y.push(yield s))n();else m=!1}catch(I0){y.destroy(I0)}}),h.apply(this,arguments)}return y}_.exports=E}),jc=iv(($,_)=>{_.exports=Y;var I;Y.ReadableState=c0;var J=(GZ(),X1(XZ)).EventEmitter,j=function(z0,a){return z0.listeners(a).length},G=E8(),X=(j_(),X1(__)).Buffer,W=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function T(z0){return X.from(z0)}function F(z0){return X.isBuffer(z0)||z0 instanceof W}var E=(pJ(),X1(iJ)),D;if(E&&E.debuglog)D=E.debuglog("stream");else D=function(){};var q=Tt(),S=$c(),k=vc(),y=k.getHighWaterMark,m=p8().codes,n=m.ERR_INVALID_ARG_TYPE,h=m.ERR_STREAM_PUSH_AFTER_EOF,i=m.ERR_METHOD_NOT_IMPLEMENTED,s=m.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,j0,I0,H0;i8()(Y,G);var L0=S.errorOrDestroy,R0=["error","close","destroy","pause","resume"];function U0(z0,a,J0){if(typeof z0.prependListener==="function")return z0.prependListener(a,J0);if(!z0._events||!z0._events[a])z0.on(a,J0);else if(Array.isArray(z0._events[a]))z0._events[a].unshift(J0);else z0._events[a]=[J0,z0._events[a]]}function c0(z0,a,J0){if(I=I||$O(),z0=z0||{},typeof J0!=="boolean")J0=a instanceof I;if(this.objectMode=!!z0.objectMode,J0)this.objectMode=this.objectMode||!!z0.readableObjectMode;if(this.highWaterMark=y(this,z0,"readableHighWaterMark",J0),this.buffer=new q,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=z0.emitClose!==!1,this.autoDestroy=!!z0.autoDestroy,this.destroyed=!1,this.defaultEncoding=z0.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,z0.encoding){if(!j0)j0=sk().StringDecoder;this.decoder=new j0(z0.encoding),this.encoding=z0.encoding}}function Y(z0){if(I=I||$O(),!(this instanceof Y))return new Y(z0);var a=this instanceof I;if(this._readableState=new c0(z0,this,a),this.readable=!0,z0){if(typeof z0.read==="function")this._read=z0.read;if(typeof z0.destroy==="function")this._destroy=z0.destroy}G.call(this)}Object.defineProperty(Y.prototype,"destroyed",{enumerable:!1,get:function(){if(this._readableState===void 0)return!1;return this._readableState.destroyed},set:function(z0){if(!this._readableState)return;this._readableState.destroyed=z0}}),Y.prototype.destroy=S.destroy,Y.prototype._undestroy=S.undestroy,Y.prototype._destroy=function(z0,a){a(z0)},Y.prototype.push=function(z0,a){var J0=this._readableState,y0;if(!J0.objectMode){if(typeof z0==="string"){if(a=a||J0.defaultEncoding,a!==J0.encoding)z0=X.from(z0,a),a="";y0=!0}}else y0=!0;return O(this,z0,a,!1,y0)},Y.prototype.unshift=function(z0){return O(this,z0,null,!0,!1)};function O(z0,a,J0,y0,N0){D("readableAddChunk",a);var A0=z0._readableState;if(a===null)A0.reading=!1,P(z0,A0);else{var $$;if(!N0)$$=Z(A0,a);if($$)L0(z0,$$);else if(A0.objectMode||a&&a.length>0){if(typeof a!=="string"&&!A0.objectMode&&Object.getPrototypeOf(a)!==X.prototype)a=T(a);if(y0)if(A0.endEmitted)L0(z0,new s);else H(z0,A0,a,!0);else if(A0.ended)L0(z0,new h);else if(A0.destroyed)return!1;else if(A0.reading=!1,A0.decoder&&!J0)if(a=A0.decoder.write(a),A0.objectMode||a.length!==0)H(z0,A0,a,!1);else f(z0,A0);else H(z0,A0,a,!1)}else if(!y0)A0.reading=!1,f(z0,A0)}return!A0.ended&&(A0.length<A0.highWaterMark||A0.length===0)}function H(z0,a,J0,y0){if(a.flowing&&a.length===0&&!a.sync)a.awaitDrain=0,z0.emit("data",J0);else{if(a.length+=a.objectMode?1:J0.length,y0)a.buffer.unshift(J0);else a.buffer.push(J0);if(a.needReadable)z(z0)}f(z0,a)}function Z(z0,a){var J0;if(!F(a)&&typeof a!=="string"&&a!==void 0&&!z0.objectMode)J0=new n("chunk",["string","Buffer","Uint8Array"],a);return J0}Y.prototype.isPaused=function(){return this._readableState.flowing===!1},Y.prototype.setEncoding=function(z0){if(!j0)j0=sk().StringDecoder;var a=new j0(z0);this._readableState.decoder=a,this._readableState.encoding=this._readableState.decoder.encoding;var J0=this._readableState.buffer.head,y0="";while(J0!==null)y0+=a.write(J0.data),J0=J0.next;if(this._readableState.buffer.clear(),y0!=="")this._readableState.buffer.push(y0);return this._readableState.length=y0.length,this};var K=1073741824;function w(z0){if(z0>=K)z0=K;else z0--,z0|=z0>>>1,z0|=z0>>>2,z0|=z0>>>4,z0|=z0>>>8,z0|=z0>>>16,z0++;return z0}function B(z0,a){if(z0<=0||a.length===0&&a.ended)return 0;if(a.objectMode)return 1;if(z0!==z0)if(a.flowing&&a.length)return a.buffer.head.data.length;else return a.length;if(z0>a.highWaterMark)a.highWaterMark=w(z0);if(z0<=a.length)return z0;if(!a.ended)return a.needReadable=!0,0;return a.length}Y.prototype.read=function(z0){D("read",z0),z0=parseInt(z0,10);var a=this._readableState,J0=z0;if(z0!==0)a.emittedReadable=!1;if(z0===0&&a.needReadable&&((a.highWaterMark!==0?a.length>=a.highWaterMark:a.length>0)||a.ended)){if(D("read: emitReadable",a.length,a.ended),a.length===0&&a.ended)G0(this);else z(this);return null}if(z0=B(z0,a),z0===0&&a.ended){if(a.length===0)G0(this);return null}var y0=a.needReadable;if(D("need readable",y0),a.length===0||a.length-z0<a.highWaterMark)y0=!0,D("length less than watermark",y0);if(a.ended||a.reading)y0=!1,D("reading or ended",y0);else if(y0){if(D("do read"),a.reading=!0,a.sync=!0,a.length===0)a.needReadable=!0;if(this._read(a.highWaterMark),a.sync=!1,!a.reading)z0=B(J0,a)}var N0;if(z0>0)N0=$0(z0,a);else N0=null;if(N0===null)a.needReadable=a.length<=a.highWaterMark,z0=0;else a.length-=z0,a.awaitDrain=0;if(a.length===0){if(!a.ended)a.needReadable=!0;if(J0!==z0&&a.ended)G0(this)}if(N0!==null)this.emit("data",N0);return N0};function P(z0,a){if(D("onEofChunk"),a.ended)return;if(a.decoder){var J0=a.decoder.end();if(J0&&J0.length)a.buffer.push(J0),a.length+=a.objectMode?1:J0.length}if(a.ended=!0,a.sync)z(z0);else if(a.needReadable=!1,!a.emittedReadable)a.emittedReadable=!0,A(z0)}function z(z0){var a=z0._readableState;if(D("emitReadable",a.needReadable,a.emittedReadable),a.needReadable=!1,!a.emittedReadable)D("emitReadable",a.flowing),a.emittedReadable=!0,process.nextTick(A,z0)}function A(z0){var a=z0._readableState;if(D("emitReadable_",a.destroyed,a.length,a.ended),!a.destroyed&&(a.length||a.ended))z0.emit("readable"),a.emittedReadable=!1;a.needReadable=!a.flowing&&!a.ended&&a.length<=a.highWaterMark,_0(z0)}function f(z0,a){if(!a.readingMore)a.readingMore=!0,process.nextTick(c,z0,a)}function c(z0,a){while(!a.reading&&!a.ended&&(a.length<a.highWaterMark||a.flowing&&a.length===0)){var J0=a.length;if(D("maybeReadMore read 0"),z0.read(0),J0===a.length)break}a.readingMore=!1}Y.prototype._read=function(z0){L0(this,new i("_read()"))},Y.prototype.pipe=function(z0,a){var J0=this,y0=this._readableState;switch(y0.pipesCount){case 0:y0.pipes=z0;break;case 1:y0.pipes=[y0.pipes,z0];break;default:y0.pipes.push(z0);break}y0.pipesCount+=1,D("pipe count=%d opts=%j",y0.pipesCount,a);var N0=(!a||a.end!==!1)&&z0!==process.stdout&&z0!==process.stderr,A0=N0?w0:T$;if(y0.endEmitted)process.nextTick(A0);else J0.once("end",A0);z0.on("unpipe",$$);function $$(U$,G$){if(D("onunpipe"),U$===J0){if(G$&&G$.hasUnpiped===!1)G$.hasUnpiped=!0,p0()}}function w0(){D("onend"),z0.end()}var h0=p(J0);z0.on("drain",h0);var H$=!1;function p0(){if(D("cleanup"),z0.removeListener("close",C0),z0.removeListener("finish",x0),z0.removeListener("drain",h0),z0.removeListener("error",p$),z0.removeListener("unpipe",$$),J0.removeListener("end",w0),J0.removeListener("end",T$),J0.removeListener("data",j$),H$=!0,y0.awaitDrain&&(!z0._writableState||z0._writableState.needDrain))h0()}J0.on("data",j$);function j$(U$){D("ondata");var G$=z0.write(U$);if(D("dest.write",G$),G$===!1){if((y0.pipesCount===1&&y0.pipes===z0||y0.pipesCount>1&&q0(y0.pipes,z0)!==-1)&&!H$)D("false write response, pause",y0.awaitDrain),y0.awaitDrain++;J0.pause()}}function p$(U$){if(D("onerror",U$),T$(),z0.removeListener("error",p$),j(z0,"error")===0)L0(z0,U$)}U0(z0,"error",p$);function C0(){z0.removeListener("finish",x0),T$()}z0.once("close",C0);function x0(){D("onfinish"),z0.removeListener("close",C0),T$()}z0.once("finish",x0);function T$(){D("unpipe"),J0.unpipe(z0)}if(z0.emit("pipe",J0),!y0.flowing)D("pipe resume"),J0.resume();return z0};function p(z0){return function(){var a=z0._readableState;if(D("pipeOnDrain",a.awaitDrain),a.awaitDrain)a.awaitDrain--;if(a.awaitDrain===0&&j(z0,"data"))a.flowing=!0,_0(z0)}}Y.prototype.unpipe=function(z0){var a=this._readableState,J0={hasUnpiped:!1};if(a.pipesCount===0)return this;if(a.pipesCount===1){if(z0&&z0!==a.pipes)return this;if(!z0)z0=a.pipes;if(a.pipes=null,a.pipesCount=0,a.flowing=!1,z0)z0.emit("unpipe",this,J0);return this}if(!z0){var{pipes:y0,pipesCount:N0}=a;a.pipes=null,a.pipesCount=0,a.flowing=!1;for(var A0=0;A0<N0;A0++)y0[A0].emit("unpipe",this,{hasUnpiped:!1});return this}var $$=q0(a.pipes,z0);if($$===-1)return this;if(a.pipes.splice($$,1),a.pipesCount-=1,a.pipesCount===1)a.pipes=a.pipes[0];return z0.emit("unpipe",this,J0),this},Y.prototype.on=function(z0,a){var J0=G.prototype.on.call(this,z0,a),y0=this._readableState;if(z0==="data"){if(y0.readableListening=this.listenerCount("readable")>0,y0.flowing!==!1)this.resume()}else if(z0==="readable"){if(!y0.endEmitted&&!y0.readableListening){if(y0.readableListening=y0.needReadable=!0,y0.flowing=!1,y0.emittedReadable=!1,D("on readable",y0.length,y0.reading),y0.length)z(this);else if(!y0.reading)process.nextTick(F0,this)}}return J0},Y.prototype.addListener=Y.prototype.on,Y.prototype.removeListener=function(z0,a){var J0=G.prototype.removeListener.call(this,z0,a);if(z0==="readable")process.nextTick(Q0,this);return J0},Y.prototype.removeAllListeners=function(z0){var a=G.prototype.removeAllListeners.apply(this,arguments);if(z0==="readable"||z0===void 0)process.nextTick(Q0,this);return a};function Q0(z0){var a=z0._readableState;if(a.readableListening=z0.listenerCount("readable")>0,a.resumeScheduled&&!a.paused)a.flowing=!0;else if(z0.listenerCount("data")>0)z0.resume()}function F0(z0){D("readable nexttick read 0"),z0.read(0)}Y.prototype.resume=function(){var z0=this._readableState;if(!z0.flowing)D("resume"),z0.flowing=!z0.readableListening,P0(this,z0);return z0.paused=!1,this};function P0(z0,a){if(!a.resumeScheduled)a.resumeScheduled=!0,process.nextTick(E0,z0,a)}function E0(z0,a){if(D("resume",a.reading),!a.reading)z0.read(0);if(a.resumeScheduled=!1,z0.emit("resume"),_0(z0),a.flowing&&!a.reading)z0.read(0)}Y.prototype.pause=function(){if(D("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1)D("pause"),this._readableState.flowing=!1,this.emit("pause");return this._readableState.paused=!0,this};function _0(z0){var a=z0._readableState;D("flow",a.flowing);while(a.flowing&&z0.read()!==null);}if(Y.prototype.wrap=function(z0){var a=this,J0=this._readableState,y0=!1;z0.on("end",function(){if(D("wrapped end"),J0.decoder&&!J0.ended){var $$=J0.decoder.end();if($$&&$$.length)a.push($$)}a.push(null)}),z0.on("data",function($$){if(D("wrapped data"),J0.decoder)$$=J0.decoder.write($$);if(J0.objectMode&&($$===null||$$===void 0))return;else if(!J0.objectMode&&(!$$||!$$.length))return;var w0=a.push($$);if(!w0)y0=!0,z0.pause()});for(var N0 in z0)if(this[N0]===void 0&&typeof z0[N0]==="function")this[N0]=function($$){return function(){return z0[$$].apply(z0,arguments)}}(N0);for(var A0=0;A0<R0.length;A0++)z0.on(R0[A0],this.emit.bind(this,R0[A0]));return this._read=function($$){if(D("wrapped _read",$$),y0)y0=!1,z0.resume()},this},typeof Symbol==="function")Y.prototype[Symbol.asyncIterator]=function(){if(I0===void 0)I0=qt();return I0(this)};Object.defineProperty(Y.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(Y.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(Y.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(z0){if(this._readableState)this._readableState.flowing=z0}}),Y._fromList=$0,Object.defineProperty(Y.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function $0(z0,a){if(a.length===0)return null;var J0;if(a.objectMode)J0=a.buffer.shift();else if(!z0||z0>=a.length){if(a.decoder)J0=a.buffer.join("");else if(a.buffer.length===1)J0=a.buffer.first();else J0=a.buffer.concat(a.length);a.buffer.clear()}else J0=a.buffer.consume(z0,a.decoder);return J0}function G0(z0){var a=z0._readableState;if(D("endReadable",a.endEmitted),!a.endEmitted)a.ended=!0,process.nextTick(K0,a,z0)}function K0(z0,a){if(D("endReadableNT",z0.endEmitted,z0.length),!z0.endEmitted&&z0.length===0){if(z0.endEmitted=!0,a.readable=!1,a.emit("end"),z0.autoDestroy){var J0=a._writableState;if(!J0||J0.autoDestroy&&J0.finished)a.destroy()}}}if(typeof Symbol==="function")Y.from=function(z0,a){if(H0===void 0)H0=gt();return H0(Y,z0,a)};function q0(z0,a){for(var J0=0,y0=z0.length;J0<y0;J0++)if(z0[J0]===a)return J0;return-1}}),Uc=iv(($,_)=>{_.exports=F;var I=p8().codes,J=I.ERR_METHOD_NOT_IMPLEMENTED,j=I.ERR_MULTIPLE_CALLBACK,G=I.ERR_TRANSFORM_ALREADY_TRANSFORMING,X=I.ERR_TRANSFORM_WITH_LENGTH_0,W=$O();i8()(F,W);function T(q,S){var k=this._transformState;k.transforming=!1;var y=k.writecb;if(y===null)return this.emit("error",new j);if(k.writechunk=null,k.writecb=null,S!=null)this.push(S);y(q);var m=this._readableState;if(m.reading=!1,m.needReadable||m.length<m.highWaterMark)this._read(m.highWaterMark)}function F(q){if(!(this instanceof F))return new F(q);if(W.call(this,q),this._transformState={afterTransform:T.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,q){if(typeof q.transform==="function")this._transform=q.transform;if(typeof q.flush==="function")this._flush=q.flush}this.on("prefinish",E)}function E(){var q=this;if(typeof this._flush==="function"&&!this._readableState.destroyed)this._flush(function(S,k){D(q,S,k)});else D(this,null,null)}F.prototype.push=function(q,S){return this._transformState.needTransform=!1,W.prototype.push.call(this,q,S)},F.prototype._transform=function(q,S,k){k(new J("_transform()"))},F.prototype._write=function(q,S,k){var y=this._transformState;if(y.writecb=k,y.writechunk=q,y.writeencoding=S,!y.transforming){var m=this._readableState;if(y.needTransform||m.needReadable||m.length<m.highWaterMark)this._read(m.highWaterMark)}},F.prototype._read=function(q){var S=this._transformState;if(S.writechunk!==null&&!S.transforming)S.transforming=!0,this._transform(S.writechunk,S.writeencoding,S.afterTransform);else S.needTransform=!0},F.prototype._destroy=function(q,S){W.prototype._destroy.call(this,q,function(k){S(k)})};function D(q,S,k){if(S)return q.emit("error",S);if(k!=null)q.push(k);if(q._writableState.length)throw new X;if(q._transformState.transforming)throw new G;return q.push(null)}}),Ct=iv(($,_)=>{_.exports=J;var I=Uc();i8()(J,I);function J(j){if(!(this instanceof J))return new J(j);I.call(this,j)}J.prototype._transform=function(j,G,X){X(null,j)}}),wt=iv(($,_)=>{var I;function J(k){var y=!1;return function(){if(y)return;y=!0,k.apply(void 0,arguments)}}var j=p8().codes,G=j.ERR_MISSING_ARGS,X=j.ERR_STREAM_DESTROYED;function W(k){if(k)throw k}function T(k){return k.setHeader&&typeof k.abort==="function"}function F(k,y,m,n){n=J(n);var h=!1;if(k.on("close",function(){h=!0}),I===void 0)I=EP();I(k,{readable:y,writable:m},function(s){if(s)return n(s);h=!0,n()});var i=!1;return function(s){if(h)return;if(i)return;if(i=!0,T(k))return k.abort();if(typeof k.destroy==="function")return k.destroy();n(s||new X("pipe"))}}function E(k){k()}function D(k,y){return k.pipe(y)}function q(k){if(!k.length)return W;if(typeof k[k.length-1]!=="function")return W;return k.pop()}function S(){for(var k=arguments.length,y=Array(k),m=0;m<k;m++)y[m]=arguments[m];var n=q(y);if(Array.isArray(y[0]))y=y[0];if(y.length<2)throw new G("streams");var h,i=y.map(function(s,j0){var I0=j0<y.length-1,H0=j0>0;return F(s,I0,H0,function(L0){if(!h)h=L0;if(L0)i.forEach(E);if(I0)return;i.forEach(E),n(h)})});return y.reduce(D)}_.exports=S}),Ic=iv(($,_)=>{var I=E8();$=_.exports=jc(),$.Stream=I||$,$.Readable=$,$.Writable=_c(),$.Duplex=$O(),$.Transform=Uc(),$.PassThrough=Ct(),$.finished=EP(),$.pipeline=wt()}),Xc=iv(($)=>{var _=ek(),I=i8(),J=Ic(),j=$.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},G=$.IncomingMessage=function(X,W,T,F){var E=this;if(J.Readable.call(E),E._mode=T,E.headers={},E.rawHeaders=[],E.trailers={},E.rawTrailers=[],E.on("end",function(){process.nextTick(function(){E.emit("close")})}),T==="fetch"){let n=function(){S.read().then(function(h){if(E._destroyed)return;if(F(h.done),h.done){E.push(null);return}E.push(Buffer.from(h.value)),n()}).catch(function(h){if(F(!0),!E._destroyed)E.emit("error",h)})};var D=n;if(E._fetchResponse=W,E.url=W.url,E.statusCode=W.status,E.statusMessage=W.statusText,W.headers.forEach(function(h,i){E.headers[i.toLowerCase()]=h,E.rawHeaders.push(i,h)}),_.writableStream){var q=new WritableStream({write:function(h){return F(!1),new Promise(function(i,s){if(E._destroyed)s();else if(E.push(Buffer.from(h)))i();else E._resumeFetch=i})},close:function(){if(F(!0),!E._destroyed)E.push(null)},abort:function(h){if(F(!0),!E._destroyed)E.emit("error",h)}});try{W.body.pipeTo(q).catch(function(h){if(F(!0),!E._destroyed)E.emit("error",h)});return}catch(h){}}var S=W.body.getReader();n()}else{E._xhr=X,E._pos=0,E.url=X.responseURL,E.statusCode=X.status,E.statusMessage=X.statusText;var k=X.getAllResponseHeaders().split(/\r?\n/);if(k.forEach(function(n){var h=n.match(/^([^:]+):\s*(.*)/);if(h){var i=h[1].toLowerCase();if(i==="set-cookie"){if(E.headers[i]===void 0)E.headers[i]=[];E.headers[i].push(h[2])}else if(E.headers[i]!==void 0)E.headers[i]+=", "+h[2];else E.headers[i]=h[2];E.rawHeaders.push(h[1],h[2])}}),E._charset="x-user-defined",!_.overrideMimeType){var y=E.rawHeaders["mime-type"];if(y){var m=y.match(/;\s*charset=([^;])(;|$)/);if(m)E._charset=m[1].toLowerCase()}if(!E._charset)E._charset="utf-8"}}};I(G,J.Readable),G.prototype._read=function(){var X=this,W=X._resumeFetch;if(W)X._resumeFetch=null,W()},G.prototype._onXHRProgress=function(X){var W=this,T=W._xhr,F=null;switch(W._mode){case"text":if(F=T.responseText,F.length>W._pos){var E=F.substr(W._pos);if(W._charset==="x-user-defined"){var D=Buffer.alloc(E.length);for(var q=0;q<E.length;q++)D[q]=E.charCodeAt(q)&255;W.push(D)}else W.push(E,W._charset);W._pos=F.length}break;case"arraybuffer":if(T.readyState!==j.DONE||!T.response)break;F=T.response,W.push(Buffer.from(new Uint8Array(F)));break;case"moz-chunked-arraybuffer":if(F=T.response,T.readyState!==j.LOADING||!F)break;W.push(Buffer.from(new Uint8Array(F)));break;case"ms-stream":if(F=T.response,T.readyState!==j.LOADING)break;var S=new globalThis.MSStreamReader;S.onprogress=function(){if(S.result.byteLength>W._pos)W.push(Buffer.from(new Uint8Array(S.result.slice(W._pos)))),W._pos=S.result.byteLength},S.onload=function(){X(!0),W.push(null)},S.readAsArrayBuffer(F);break}if(W._xhr.readyState===j.DONE&&W._mode!=="ms-stream")X(!0),W.push(null)}}),Nt=iv(($,_)=>{var I=ek(),J=i8(),j=Xc(),G=Ic(),X=j.IncomingMessage,W=j.readyStates;function T(q,S){if(I.fetch&&S)return"fetch";else if(I.mozchunkedarraybuffer)return"moz-chunked-arraybuffer";else if(I.msstream)return"ms-stream";else if(I.arraybuffer&&q)return"arraybuffer";else return"text"}var F=_.exports=function(q){var S=this;if(G.Writable.call(S),S._opts=q,S._body=[],S._headers={},q.auth)S.setHeader("Authorization","Basic "+Buffer.from(q.auth).toString("base64"));Object.keys(q.headers).forEach(function(m){S.setHeader(m,q.headers[m])});var k,y=!0;if(q.mode==="disable-fetch"||"requestTimeout"in q&&!I.abortController)y=!1,k=!0;else if(q.mode==="prefer-streaming")k=!1;else if(q.mode==="allow-wrong-content-type")k=!I.overrideMimeType;else if(!q.mode||q.mode==="default"||q.mode==="prefer-fast")k=!0;else throw Error("Invalid value for opts.mode");S._mode=T(k,y),S._fetchTimer=null,S._socketTimeout=null,S._socketTimer=null,S.on("finish",function(){S._onFinish()})};J(F,G.Writable),F.prototype.setHeader=function(q,S){var k=this,y=q.toLowerCase();if(D.indexOf(y)!==-1)return;k._headers[y]={name:q,value:S}},F.prototype.getHeader=function(q){var S=this._headers[q.toLowerCase()];if(S)return S.value;return null},F.prototype.removeHeader=function(q){var S=this;delete S._headers[q.toLowerCase()]},F.prototype._onFinish=function(){var q=this;if(q._destroyed)return;var S=q._opts;if("timeout"in S&&S.timeout!==0)q.setTimeout(S.timeout);var k=q._headers,y=null;if(S.method!=="GET"&&S.method!=="HEAD")y=new Blob(q._body,{type:(k["content-type"]||{}).value||""});var m=[];if(Object.keys(k).forEach(function(s){var j0=k[s].name,I0=k[s].value;if(Array.isArray(I0))I0.forEach(function(H0){m.push([j0,H0])});else m.push([j0,I0])}),q._mode==="fetch"){var n=null;if(I.abortController){var h=new AbortController;if(n=h.signal,q._fetchAbortController=h,"requestTimeout"in S&&S.requestTimeout!==0)q._fetchTimer=globalThis.setTimeout(function(){if(q.emit("requestTimeout"),q._fetchAbortController)q._fetchAbortController.abort()},S.requestTimeout)}globalThis.fetch(q._opts.url,{method:q._opts.method,headers:m,body:y||void 0,mode:"cors",credentials:S.withCredentials?"include":"same-origin",signal:n}).then(function(s){q._fetchResponse=s,q._resetTimers(!1),q._connect()},function(s){if(q._resetTimers(!0),!q._destroyed)q.emit("error",s)})}else{var i=q._xhr=new globalThis.XMLHttpRequest;try{i.open(q._opts.method,q._opts.url,!0)}catch(s){process.nextTick(function(){q.emit("error",s)});return}if("responseType"in i)i.responseType=q._mode;if("withCredentials"in i)i.withCredentials=!!S.withCredentials;if(q._mode==="text"&&"overrideMimeType"in i)i.overrideMimeType("text/plain; charset=x-user-defined");if("requestTimeout"in S)i.timeout=S.requestTimeout,i.ontimeout=function(){q.emit("requestTimeout")};if(m.forEach(function(s){i.setRequestHeader(s[0],s[1])}),q._response=null,i.onreadystatechange=function(){switch(i.readyState){case W.LOADING:case W.DONE:q._onXHRProgress();break}},q._mode==="moz-chunked-arraybuffer")i.onprogress=function(){q._onXHRProgress()};i.onerror=function(){if(q._destroyed)return;q._resetTimers(!0),q.emit("error",Error("XHR error"))};try{i.send(y)}catch(s){process.nextTick(function(){q.emit("error",s)});return}}};function E(q){try{var S=q.status;return S!==null&&S!==0}catch(k){return!1}}F.prototype._onXHRProgress=function(){var q=this;if(q._resetTimers(!1),!E(q._xhr)||q._destroyed)return;if(!q._response)q._connect();q._response._onXHRProgress(q._resetTimers.bind(q))},F.prototype._connect=function(){var q=this;if(q._destroyed)return;q._response=new X(q._xhr,q._fetchResponse,q._mode,q._resetTimers.bind(q)),q._response.on("error",function(S){q.emit("error",S)}),q.emit("response",q._response)},F.prototype._write=function(q,S,k){var y=this;y._body.push(q),k()},F.prototype._resetTimers=function(q){var S=this;if(globalThis.clearTimeout(S._socketTimer),S._socketTimer=null,q)globalThis.clearTimeout(S._fetchTimer),S._fetchTimer=null;else if(S._socketTimeout)S._socketTimer=globalThis.setTimeout(function(){S.emit("timeout")},S._socketTimeout)},F.prototype.abort=F.prototype.destroy=function(q){var S=this;if(S._destroyed=!0,S._resetTimers(!0),S._response)S._response._destroyed=!0;if(S._xhr)S._xhr.abort();else if(S._fetchAbortController)S._fetchAbortController.abort();if(q)S.emit("error",q)},F.prototype.end=function(q,S,k){var y=this;if(typeof q==="function")k=q,q=void 0;G.Writable.prototype.end.call(y,q,S,k)},F.prototype.setTimeout=function(q,S){var k=this;if(S)k.once("timeout",S);k._socketTimeout=q,k._resetTimers(!1)},F.prototype.flushHeaders=function(){},F.prototype.setNoDelay=function(){},F.prototype.setSocketKeepAlive=function(){};var D=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"]}),Bt=iv(($,_)=>{_.exports=J;var I=Object.prototype.hasOwnProperty;function J(){var j={};for(var G=0;G<arguments.length;G++){var X=arguments[G];for(var W in X)if(I.call(X,W))j[W]=X[W]}return j}}),St=iv(($,_)=>{_.exports=(SL(),X1(wK)).STATUS_CODES}),kt=iv(($)=>{var _=Nt(),I=Xc(),J=Bt(),j=St(),G=(MP(),X1(AP)),X=$;X.request=function(W,T){if(typeof W==="string")W=G.parse(W);else W=J(W);var F=globalThis.location.protocol.search(/^https?:$/)===-1?"http:":"",E=W.protocol||F,D=W.hostname||W.host,q=W.port,S=W.path||"/";if(D&&D.indexOf(":")!==-1)D="["+D+"]";W.url=(D?E+"//"+D:"")+(q?":"+q:"")+S,W.method=(W.method||"GET").toUpperCase(),W.headers=W.headers||{};var k=new _(W);if(T)k.on("response",T);return k},X.get=function(W,T){var F=X.request(W,T);return F.end(),F},X.ClientRequest=_,X.IncomingMessage=I.IncomingMessage,X.Agent=function(){},X.Agent.defaultMaxSockets=4,X.globalAgent=new X.Agent,X.STATUS_CODES=j,X.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}),Gc=Et(kt(),1),{request:ct,get:xt,ClientRequest:ft,IncomingMessage:yt,Agent:bt,globalAgent:ht,STATUS_CODES:mt,METHODS:ut}=Gc.default,Yc=Gc.default});var zc={};_j(zc,{isIPv6:()=>TP,isIPv4:()=>VP,isIP:()=>Jc,default:()=>Qc});function VP($){return nt.test($)}function TP($){return it.test($)}function Jc($){if(VP($))return 4;if(TP($))return 6;return 0}var nt,it,Qc;var RP=GX(()=>{nt=new RegExp("^(?:(?: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])$"),it=new RegExp("^(?:(?:(?:[0-9a-fA-F]{1,4}):){7}(?:(?:[0-9a-fA-F]{1,4})|:)|(?:(?:[0-9a-fA-F]{1,4}):){6}(?:(?:(?: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])|:(?:[0-9a-fA-F]{1,4})|:)|(?:(?:[0-9a-fA-F]{1,4}):){5}(?::(?:(?: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])|(?::(?:[0-9a-fA-F]{1,4})){1,2}|:)|(?:(?:[0-9a-fA-F]{1,4}):){4}(?:(?::(?:[0-9a-fA-F]{1,4})){0,1}:(?:(?: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])|(?::(?:[0-9a-fA-F]{1,4})){1,3}|:)|(?:(?:[0-9a-fA-F]{1,4}):){3}(?:(?::(?:[0-9a-fA-F]{1,4})){0,2}:(?:(?: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])|(?::(?:[0-9a-fA-F]{1,4})){1,4}|:)|(?:(?:[0-9a-fA-F]{1,4}):){2}(?:(?::(?:[0-9a-fA-F]{1,4})){0,3}:(?:(?: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])|(?::(?:[0-9a-fA-F]{1,4})){1,5}|:)|(?:(?:[0-9a-fA-F]{1,4}):){1}(?:(?::(?:[0-9a-fA-F]{1,4})){0,4}:(?:(?: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])|(?::(?:[0-9a-fA-F]{1,4})){1,6}|:)|(?::(?:(?::(?:[0-9a-fA-F]{1,4})){0,5}:(?:(?: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])|(?::(?:[0-9a-fA-F]{1,4})){1,7}|:)))(?:%[0-9a-zA-Z-.:]{1,})?$");Qc={isIPv4:VP,isIPv6:TP,isIP:Jc}});var Lc=eU((hJ0,Jo)=>{Jo.exports={"//":"GENERATED by scripts/pack-facts.ts — do not hand-edit. Compiled from each pack's `pack: TwinPack` descriptor; pack-facts.test.ts fails on drift.",packs:{ahrefs:{adoption:{pypi:[],sdks:["@ahrefs/mcp"],scopes:["@ahrefs/"],envStems:["AHREFS"]},hosts:[{host:"api.ahrefs.com"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["target","usage","cache","audit"],serveExport:"createAhrefsTwinServer"},"ai-gateway":{adoption:{pypi:[],sdks:["@ai-sdk/gateway"],envStems:["AIGATEWAY"]},hostsNone:"SDK is base-URL-configured (@ai-sdk/gateway baseURL / AI_GATEWAY_BASE_URL) — worlds wire the twin through explicit endpoint config; no injector entry grounded yet",archetype:"generative",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["generation"],serveExport:"createAiGatewayTwinServer"},airtable:{adoption:{pypi:["pyairtable","airtable-python-wrapper"],sdks:["airtable"],envStems:["AIRTABLE"]},hosts:[{host:"api.airtable.com"}],archetype:"crud",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["base","table","record","comment"],endpointEnvNone:"the injector intercepts api.airtable.com (see `hosts`), which covers every client with no env at all; AIRTABLE_ENDPOINT_URL is real (Airtable.default_config(), airtable@0.12.2) but injecting it alongside interception is the strictly narrower answer — one wiring, not two.",serveExport:"createAirtableTwinServer"},algolia:{adoption:{pypi:["algoliasearch"],sdks:["algoliasearch"],envStems:["ALGOLIA","ALGOLIAWRITE"]},hostsNone:"per-app-ID host scheme ({appId}.algolia.net / {appId}-dsn.algolia.net / {appId}-N.algolianet.com, see the pack README §Host tolerance) — no fixed host list to match; the host-tolerant twin is wired by explicit client host config",archetype:"crud",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["index","record","synonym","settings"],serveExport:"createAlgoliaTwinServer"},anthropic:{adoption:{pypi:["anthropic","claude-agent-sdk","claude-code-sdk"],sdks:["@anthropic-ai/sdk","@ai-sdk/anthropic","@anthropic-ai/vertex-sdk","@anthropic-ai/bedrock-sdk","@anthropic-ai/claude-agent-sdk"],scopes:["@anthropic-ai/"],envStems:["ANTHROPIC","CLAUDE"]},hosts:[{host:"api.anthropic.com"}],archetype:"generative",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["message_batch","file","agent","environment","session","vault","vault_credential","memory_store","memory","memory_version","deployment","deployment_run","skill","webhook_secret"],serveExport:"createAnthropicTwinServer"},assemblyai:{adoption:{pypi:["assemblyai"],sdks:["assemblyai"],envStems:["ASSEMBLYAI"]},hosts:[{host:"api.assemblyai.com"}],archetype:"generative",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["transcript","upload"],serveExport:"createAssemblyAITwinServer"},aws:{adoption:{pypi:["boto3","botocore","aioboto3","aiobotocore"],sdks:["@aws-sdk/client-s3","@aws-sdk/s3-request-presigner","@aws-sdk/lib-storage","@aws-sdk/client-dynamodb","@aws-sdk/lib-dynamodb","@aws-sdk/client-timestream-write","@aws-sdk/client-timestream-query","aws-sdk","@aws-sdk/client-sesv2","@aws-sdk/client-secrets-manager","@aws-sdk/client-bedrock-runtime","@aws-sdk/client-bedrock","@ai-sdk/amazon-bedrock"],envStems:["AWS","S3","LANGFUSELLMCONNECTIONBEDROCK"],worldIds:["s3","dynamodb","timestream","timestreamwrite","timestreamquery","sesv2","secretsmanager","bedrock"]},hosts:[{key:"s3",host:"s3.amazonaws.com"},{key:"s3",suffix:".s3.amazonaws.com"},{key:"s3",hostPattern:"^s3[.-][a-z0-9-]+\\.amazonaws\\.com$"},{key:"s3",hostPattern:"\\.s3[.-][a-z0-9-]+\\.amazonaws\\.com$"},{key:"s3",hostPattern:"^s3\\.dualstack\\.[a-z0-9-]+\\.amazonaws\\.com$"},{key:"s3",hostPattern:"\\.s3\\.dualstack\\.[a-z0-9-]+\\.amazonaws\\.com$"},{key:"s3",suffix:".s3-accelerate.amazonaws.com"},{key:"s3",suffix:".s3-accelerate.dualstack.amazonaws.com"},{key:"dynamodb",hostPattern:"^dynamodb\\.[a-z0-9-]+\\.amazonaws\\.com$"},{key:"timestream",hostPattern:"(^|\\.)(ingest|query)\\.timestream\\.[a-z0-9-]+\\.amazonaws\\.com$"},{key:"sesv2",hostPattern:"^email\\.[a-z0-9-]+\\.amazonaws\\.com$"},{key:"secretsmanager",hostPattern:"^secretsmanager(-fips)?\\.[a-z0-9-]+\\.amazonaws\\.com$"},{key:"bedrock",hostPattern:"^bedrock(-runtime)?(-fips)?\\.[a-z0-9-]+\\.(amazonaws\\.com|api\\.aws)$"}],archetype:"signed-protocol",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resourcesUnreachable:{foundation_model:"the account catalog: pulled from ListFoundationModels, never created by a caller"},resources:["bucket","object","multipart_upload","table","item","database","record","message","secret","invocation","foundation_model","identity"],serveExport:"createAwsTwinServer"},axiom:{adoption:{sdks:["@axiomhq/js","@axiomhq/logging","@axiomhq/nextjs"],pypi:["axiom-py"],envStems:["AXIOM"]},hosts:[{host:"api.axiom.co"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["dataset","event"],endpointEnvNone:"no env var: @axiomhq/js reads its base URL only from the `url` constructor option (httpClient.ts:33,45) and Dub constructs `new Axiom({ token })` with none, so interception is the hosts entry above; an AXIOM_URL no client reads would be invented surface.",serveExport:"createAxiomTwinServer"},azure:{adoption:{pypi:["azure-storage-blob","azure-ai-inference"],sdks:["@azure/storage-blob","@azure/openai","@azure-rest/ai-inference","@ai-sdk/azure"],envStems:["AZURE","AZUREOPENAI","AZUREGPT4OMINI","AZUREGPT5","AZUREGPT5MINI","AZUREGPT5NANO"]},hosts:[{suffix:".blob.core.windows.net"},{suffix:".openai.azure.com"},{suffix:".cognitiveservices.azure.com",pathPattern:"^/openai/"}],archetype:"crud",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["container","blob","block","deployment"],endpointEnvNone:"Host-based interception only. @azure/storage-blob is configured with a blob endpoint URL or a connection string (both resolving to <account>.blob.core.windows.net, which the injector rewrites), and reads no base-URL environment variable of its own — the same reason the aws pack declares none.",serveExport:"createAzureTwinServer"},azureformrecognizer:{adoption:{pypi:["azure-ai-documentintelligence","azure-ai-formrecognizer"],sdks:["@azure-rest/ai-document-intelligence","@azure/ai-form-recognizer"],envStems:["AZUREFORMRECOGNIZER","AZUREDOCUMENTINTELLIGENCE"]},hosts:[{suffix:".cognitiveservices.azure.com",pathPattern:"^/(documentintelligence|formrecognizer)/"}],archetype:"generative",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resourcesUnreachable:{model:"prebuilt models are the vendor's catalog; a custom model is born of a training job this twin does not run"},resources:["analysis","model"],serveExport:"createAzureFormRecognizerTwinServer"},bitly:{adoption:{pypi:[],envStems:["BITLY"]},hosts:[{host:"api-ssl.bitly.com"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["bitlink","group","organization","user","qr_code","campaign","channel","webhook","custom_bitlink","click"],endpointEnvNone:"no injector-free path: Bitly integrations hardcode https://api-ssl.bitly.com and the vendor documents no base-URL override, so interception is the hosts entry above; a BITLY_BASE_URL would be invented surface no app reads.",serveExport:"createBitlyTwinServer"},bluesky:{adoption:{sdks:["@atproto/api"],pypi:[],envStems:["BLUESKY","BSKY"]},hosts:[{host:"bsky.social",pathPattern:"^/xrpc/(com\\.atproto|app\\.bsky)\\."},{hostPattern:"^[a-z0-9-]+\\.[a-z0-9-]+\\.host\\.bsky\\.network$",pathPattern:"^/xrpc/(com\\.atproto|app\\.bsky)\\."},{host:"api.bsky.app",pathPattern:"^/xrpc/app\\.bsky\\.(actor|feed)\\."},{host:"public.api.bsky.app",pathPattern:"^/xrpc/app\\.bsky\\.(actor|feed)\\."},{host:"video.bsky.app",pathPattern:"^/(xrpc/app\\.bsky\\.video\\.|watch/)"},{host:"cdn.bsky.app",pathPattern:"^/img/"},{host:"bsky.app",pathPattern:"^/profile/[^/]+/?$|^/profile/[^/]+/post/[A-Za-z0-9._:~-]{1,512}/?$"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["account","post","follow","profile"],endpointEnvNone:"@atproto/api reads no base-URL environment variable (an AtpAgent takes its `service` URL in code, and the video service's is the social-app's constant), so a World reaches it through the hosts above; inventing a BLUESKY_BASE_URL the app never reads would report coverage the app does not have.",serveExport:"createBlueskyTwinServer"},calcom:{adoption:{pypi:[],envStems:["CALCOM","CAL"]},hosts:[{host:"api.cal.com"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["booking","event_type","schedule","team","membership","webhook","slot"],serveExport:"createCalcomTwinServer"},cerebras:{adoption:{sdks:["@cerebras/cerebras_cloud_sdk","@ai-sdk/cerebras"],envStems:["CEREBRAS"]},hosts:[{host:"api.cerebras.ai"}],archetype:"generative",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:[],endpointEnvNone:"The injector intercepts api.cerebras.ai (see `hosts`), so a world wires this pack through CEREBRAS_TWIN_URL rather than an app-read base-URL var. The SDK would honour CEREBRAS_BASE_URL, but the injector covers all of that traffic with zero app edits while an app-read env covers only clients constructed after the env lands — emitting both would quietly forgo interception.",serveExport:"createCerebrasTwinServer"},clerk:{adoption:{pypi:["clerk-backend-api"],sdks:["@clerk/backend","@clerk/clerk-sdk-node","@clerk/nextjs","@clerk/fastify","@clerk/express"],scopes:["@clerk/"],envStems:["CLERK"]},hosts:[{host:"api.clerk.com"},{suffix:".clerk.accounts.dev"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",assets:["client/clerk-js-dist","client/clerk.browser.js"],resources:["user","session","organization","organization_membership","organization_invitation","invitation","allowlist_identifier","blocklist_identifier","jwt_template","sign_in_token"],serveExport:"createClerkTwinServer"},cloudflare:{adoption:{pypi:["cloudflare"],tools:[{package:"wrangler",usage:"deployment"}],sdks:["cloudflare","aws4fetch"],envStems:["CLOUDFLARE"]},hosts:[{host:"api.cloudflare.com"},{host:"dash.cloudflare.com",pathPattern:"^/(login|_twin/users/|[0-9a-f]{32}/r2/|$)"},{suffix:".r2.cloudflarestorage.com"}],hostsClaimed:{door:"/twin/hosts",note:"the custom domains connected to R2 buckets"},archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["account","zone","cloudflare_tunnel","tunnel_configuration","dns_record","worker_script","worker_route","worker_domain","workers_subdomain","durable_object_namespace","r2_bucket","r2_custom_domain","hyperdrive_config","queue","queue_consumer","worker_version","worker_asset","worker_asset_upload_session"],serveExport:"createCloudflareTwinServer"},cohere:{adoption:{pypi:["cohere"],sdks:["cohere-ai","@ai-sdk/cohere"],envStems:["COHERE","CO"]},hosts:[{host:"api.cohere.com"},{host:"api.cohere.ai"}],archetype:"generative",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["dataset","connector","embed_job","token"],endpointEnvNone:"neither official SDK reads a base-URL env var: cohere-ai@8.1.0 takes the override as the `baseUrl`/`environment` CONSTRUCTOR option and reads only CO_API_KEY from the environment (auth/BearerAuthProvider.js), and @ai-sdk/cohere@4.0.35 takes `options.baseURL` and reads only COHERE_API_KEY. Interception is host-based on api.cohere.com and api.cohere.ai; inventing a COHERE_BASE_URL nothing reads would make `covers` claim a world it does not cover.",serveExport:"createCohereTwinServer"},currencyapi:{adoption:{sdks:["@everapi/currencyapi-js"],pypi:["currencyapicom"],envStems:["CURRENCYAPI"]},hosts:[{host:"api.currencyapi.com"},{host:"app.currencyapi.com",pathPattern:"^/(register|login|dashboard|subscription)(/|$)"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["_account","_api_key","_usage","_web_session"],endpointEnvNone:"currencyapi's clients hardcode https://api.currencyapi.com/v3 (@everapi/currencyapi-js index.js `baseUrl`, dubinc/dub apps/web/lib/currencyapi/client.ts `baseUrl`) and read no base-URL env; interception is the hosts above.",serveExport:"createCurrencyapiTwinServer"},daily:{adoption:{envStems:["DAILY"]},hosts:[{host:"api.daily.co"},{hostPattern:"^[a-z0-9][a-z0-9-]*\\.daily\\.co$"},{host:"c.daily.co",exclude:!0},{host:"gs.daily.co",exclude:!0},{host:"www.daily.co",exclude:!0},{host:"dashboard.daily.co",exclude:!0},{host:"docs.daily.co",exclude:!0},{host:"help.daily.co",exclude:!0},{host:"status.daily.co",exclude:!0},{host:"blog.daily.co",exclude:!0},{host:"pipecat.daily.co",exclude:!0},{host:"reference-python.daily.co",exclude:!0},{host:"reference-ios.daily.co",exclude:!0},{host:"reference-android.daily.co",exclude:!0}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["Room","Meeting","Recording","Transcript","BatchJob","Webhook","_domain","_delivery","_receiver"],endpointEnvNone:"Daily's REST clients hardcode https://api.daily.co/v1 (Cal.com packages/app-store/dailyvideo/lib/dailyApiFetcher.ts) and read no base-URL env; interception is the hosts above.",serveExport:"createDailyTwinServer"},datadog:{adoption:{pypi:["datadog","datadog-api-client","ddtrace"],sdks:["@datadog/datadog-api-client","@datadog/browser-rum","@datadog/browser-logs","dd-trace"],scopes:["@datadog/"],envStems:["DATADOG","DD"]},hosts:[{host:"datadoghq.com"},{suffix:".datadoghq.com"},{host:"datadoghq.eu"},{suffix:".datadoghq.eu"},{host:"ddog-gov.com"},{suffix:".ddog-gov.com"},{hostPattern:"^([a-z0-9-]+\\.)?browser-intake-(?:[a-z0-9]+-)?(?:datadoghq\\.(?:com|eu)|ddog-gov\\.com)$"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["org","rum_application","rum_event","log","metric_series","metric_def","service_check","event","monitor","dashboard","host","slo","downtime","api_key","user"],serveExport:"createDatadogTwinServer"},deepgram:{adoption:{pypi:["deepgram-sdk"],sdks:["@deepgram/sdk"],envStems:["DEEPGRAM"]},hosts:[{host:"api.deepgram.com"}],archetype:"generative",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resourcesUnreachable:{project:"the tenant itself: born with the account, never created through the API"},resources:["project","key","request"],serveExport:"createDeepgramTwinServer"},deepinfra:{adoption:{sdks:["deepinfra","@ai-sdk/deepinfra"],envStems:["DEEPINFRA"]},hosts:[{host:"api.deepinfra.com"}],archetype:"generative",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resourcesUnreachable:{model:"the vendor catalog",rate_limit:"the account ledger the vendor keeps; read-only"},resources:["model","file","batch","rate_limit"],endpointEnvNone:"the deepinfra SDK exposes no base-URL env: DeepInfraClient takes the endpoint URL as a constructor argument (the modelName IS the full URL) and reads only DEEPINFRA_API_KEY; interception is the hosts above.",serveExport:"createDeepinfraTwinServer"},deepseek:{adoption:{pypi:[],sdks:["@ai-sdk/deepseek"],envStems:["DEEPSEEK"]},hosts:[{host:"api.deepseek.com"}],archetype:"generative",protocol:{major:1,standing:"deprecated"},transport:"rest",resourcesUnreachable:{model:"the vendor catalog",balance:"the account ledger the vendor keeps; read-only"},resources:["model","file","balance","cache_prefix"],endpointEnvNone:"no app-read endpoint env: @ai-sdk/deepseek — the only first-party npm client of this surface — reads exactly one environment variable (DEEPSEEK_API_KEY, via loadApiKey in src/deepseek-provider.ts) and takes baseURL as a constructor option, so there is no vendor-documented base-URL var to inject. The injector covers api.deepseek.com instead (see `hosts`). NextChat's DEEPSEEK_URL is one application's own convention, not vendor surface, and claiming it would report a world covered while the SDK-based majority still reached the real vendor.",serveExport:"createDeepSeekTwinServer"},discord:{adoption:{sdks:["discord.js","@discordjs/rest","@discordjs/core","@discordjs/builders","discord-api-types"],pypi:["discord.py","discord"],envStems:["DISCORD"]},hosts:[{host:"discord.com",pathPattern:"^/api/"},{host:"discord.com",pathPattern:"^/(oauth2/authorize|login)/?$"},{host:"gateway.discord.gg"},{host:"discordapp.com",pathPattern:"^/api/"}],archetype:"crud",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["application","application_command","ban","channel","guild","interaction_response","invite","member","message","oauth_grant","role","user","webhook"],endpointEnvNone:"no Discord client reads a base-URL env var — discord.js takes `api` as a REST constructor option and discord.py hardcodes its Route base, so interception is the `hosts` entries above. Inventing a DISCORD_BASE_URL would report coverage the app could not use.",serveExport:"createDiscordTwinServer"},dynadot:{adoption:{pypi:[],envStems:["DYNADOT"]},hosts:[{host:"api.dynadot.com"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["domain","account"],serveExport:"createDynadotTwinServer"},elevenlabs:{adoption:{pypi:["elevenlabs"],sdks:["elevenlabs","@elevenlabs/elevenlabs-js"],scopes:["@elevenlabs/"],envStems:["ELEVENLABS"]},hosts:[{host:"api.elevenlabs.io"}],archetype:"generative",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["voice","generated_voice","pronunciation_dictionary","dubbing","history_item"],serveExport:"createElevenLabsTwinServer"},expo:{adoption:{sdks:["expo-server-sdk"],pypi:["exponent-server-sdk"],envStems:["EXPO"]},hosts:[{host:"exp.host"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["push_device","push_ticket"],endpointEnvNone:"expo-server-sdk-node DOES read EXPO_BASE_URL (src/ExpoClientValues.ts builds both push URLs from process.env['EXPO_BASE_URL'] || 'https://exp.host'), but this pack claims exp.host in `hosts`, so interception is host-based and zero-edit; emitting the var would forgo that. Point EXPO_BASE_URL at the twin by hand only when running outside an injected world.",serveExport:"createExpoTwinServer"},fal:{adoption:{pypi:["fal-client","fal"],sdks:["@fal-ai/client","@fal-ai/serverless-client"],scopes:["@fal-ai/"],envStems:["FAL"]},hostsNone:"host-split surface (fal.run / queue.fal.run) with no injector entry grounded yet — worlds wire the twin via the client's explicit endpoint config; a visible gap until its hosts are grounded here",archetype:"generative",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["request","signing_key"],serveExport:"createFalTwinServer"},figma:{adoption:{pypi:[],sdks:["figma-api","@figma/rest-api-spec"],scopes:["@figma/"],envStems:["FIGMA"]},hostsNone:'no injector entry grounded yet — the pack README wires clients at the twin by base URL ("nothing changed but the base URL"); zero-edit interception of api.figma.com is a visible gap until grounded here',archetype:"crud",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["file","comment","version","project","team","user","credential"],serveExport:"createFigmaTwinServer"},firecrawl:{adoption:{pypi:["firecrawl-py","firecrawl"],sdks:["@mendable/firecrawl-js","firecrawl"],scopes:["@mendable/"],envStems:["FIRECRAWL","S2SFIRECRAWLINTEGRATIONSTOFIRECRAWL"]},hosts:[{host:"api.firecrawl.dev"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["document","crawl","audit"],serveExport:"createFirecrawlTwinServer"},fireworks:{adoption:{pypi:["fireworks-ai"],sdks:["@ai-sdk/fireworks"],envStems:["FIREWORKS"]},hosts:[{host:"api.fireworks.ai"}],archetype:"generative",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resourcesUnreachable:{account:"the vendor’s own account row (one per credential, not creatable through the API)",quota:"vendor-assigned limits (read-only in the API; the twin derives them from the account)",serverlessModel:"the vendor catalog (serverless models are curated by Fireworks, not created by callers)"},resources:["deployment","dataset","batchInferenceJob","supervisedFineTuningJob","user","apiKey","secret","model"],endpointEnvNone:"The injector intercepts api.fireworks.ai (see `hosts`), so a world wires this pack through FIREWORKS_TWIN_URL rather than an app-read base-URL var. The `fireworks` Python client would honour FIREWORKS_BASE_URL, but @ai-sdk/fireworks — the dominant client in this repo’s demand census — takes its baseURL as a constructor option and reads no such env, so an app-read var would cover only half the traffic while disabling the interception that covers all of it.",serveExport:"createFireworksTwinServer"},fly:{adoption:{pypi:[],sdks:["fly-admin"],envStems:["FLY"]},hosts:[{host:"api.machines.dev"},{host:"_api.internal"}],archetype:"engine-control",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["app","machine","volume","secret"],serveExport:"createFlyTwinServer"},gcs:{adoption:{pypi:["google-cloud-storage"],sdks:["@google-cloud/storage"],envStems:["GCS","GOOGLECLOUDSTORAGE"]},hosts:[{host:"storage.googleapis.com"},{suffix:".storage.googleapis.com"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["bucket","object","upload"],serveExport:"createGcsTwinServer"},gemini:{adoption:{pypi:["google-genai","google-generativeai"],sdks:["@ai-sdk/google","@ai-sdk/google-vertex","@google/genai","@google/generative-ai","@google-cloud/vertexai"],envStems:["GEMINI","GOOGLEGENAI","GOOGLEGENERATIVEAI","GOOGLEGEMINI","GOOGLEVERTEX"],worldIds:["googlegenai","googleauth"]},hosts:[{host:"generativelanguage.googleapis.com"},{host:"aiplatform.googleapis.com"},{suffix:"-aiplatform.googleapis.com"},{key:"googleauth",host:"oauth2.googleapis.com"},{key:"googleauth",host:"www.googleapis.com",pathPattern:"^/(token|oauth2/v4/token)/?$"}],archetype:"generative",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["file","cached_content"],serveExport:"createGeminiTwinServer"},github:{adoption:{pypi:["pygithub"],sdks:["@octokit/rest","@octokit/core","octokit","@octokit/auth-app","@octokit/auth-oauth-app","@octokit/auth-oauth-device","@octokit/graphql","@octokit/webhooks"],scopes:["@octokit/"],envStems:["GITHUB","GH","BACKENDGITHUB","INFAPPCONNECTIONGITHUBAPP","INFAPPCONNECTIONGITHUBOAUTH","INFAPPCONNECTIONGITHUBRADARAPP","APPSMITHOAUTH2GITHUB"]},hosts:[{host:"api.github.com"},{host:"uploads.github.com",pathPattern:"^/repos/[^/]+/[^/]+/releases/\\d+/assets$"},{host:"github.com",pathPattern:"^/[^/]+/[^/]+/(info/refs|git-upload-pack|git-receive-pack)$"},{host:"github.com",pathPattern:"^/login/oauth/(authorize|access_token)$"},{host:"github.com",pathPattern:"^/(login|session|sessions/two-factor(/app)?)$"},{host:"github.com",pathPattern:"^/apps/[^/]+/installations/new$"},{host:"github.com",pathPattern:"^/(organizations/[^/]+/)?settings/apps/new$"},{host:"npm.pkg.github.com",pathPattern:"^/@"}],archetype:"engine-control",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["pull_request","pull_request_review","pull_request_review_comment","issue","issue_comment","repository","branch","git_ref"],serveExport:"createGithubTwinServer"},googleads:{adoption:{sdks:["google-ads-api","google-ads-node"],pypi:["google-ads"],envStems:["GOOGLEADS","GOOGLEADSDEVELOPER"]},hosts:[{host:"googleads.googleapis.com"},{host:"datamanager.googleapis.com"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["customer","customer_client_link","conversion_action","click_conversion","ingest_request"],endpointEnvNone:"no Google Ads client exposes an HTTP base-URL override: google-ads-api builds the host into the request literally, google-ads-python's `endpoint` is a gRPC host:port for its transport channel, and Dub hardcodes the host in a raw fetch. Interception is host-based.",serveExport:"createGoogleAdsTwinServer"},googlecalendar:{adoption:{sdks:["@googleapis/calendar"],pypi:[],envStems:["GOOGLECALENDAR"]},hosts:[{host:"www.googleapis.com",pathPattern:"^/(batch/)?calendar/v3(/|$)"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["Calendar","CalendarListEntry","Event"],endpointEnvNone:"@googleapis/calendar and googleapis read no base-URL variable: the root URL is the Discovery document's `https://www.googleapis.com/` unless the caller passes `rootUrl` (Inbox Zero reads its own GOOGLE_BASE_URL for that); interception is the host rule above.",serveExport:"createGooglecalendarTwinServer"},googlemaps:{adoption:{pypi:["googlemaps"],sdks:["@googlemaps/google-maps-services-js"],scopes:["@googlemaps/"],envStems:["GOOGLEMAPS"]},hosts:[{host:"maps.googleapis.com"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["geocode","audit"],serveExport:"createGoogleMapsTwinServer"},googleoauth:{adoption:{pypi:["google-auth","google-auth-oauthlib"],sdks:["google-auth-library","@googleapis/oauth2"],envStems:["GOOGLE","GOOGLEOAUTH","GOOGLEOIDC","AUTHGOOGLE","AUTHGOOGLEOAUTH2","BACKENDGOOGLE","GOOGLEIOS","GOOGLELOGIN","GOOGLEWEB","NEXTPRIVATEGOOGLE","SSOGOOGLEOAUTH2","APPSMITHOAUTH2GOOGLE"]},archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["oauth_client","account","auth_request","authorization_code","access_token","refresh_token","grant"],serveExport:"createGoogleOAuthTwinServer"},groq:{adoption:{pypi:["groq"],sdks:["groq-sdk","@ai-sdk/groq"],envStems:["GROQ"]},hosts:[{host:"api.groq.com"}],archetype:"generative",protocol:{major:1,standing:"deprecated"},transport:"rest",resourcesUnreachable:{model:"the vendor catalog"},resources:["file","batch","model"],endpointEnvNone:"The injector intercepts api.groq.com (see `hosts`), so a world wires this pack through GROQ_TWIN_URL rather than an app-read base-URL var. groq-sdk would honour GROQ_BASE_URL, but @ai-sdk/groq — the dominant client in this repo's demand census — takes its baseURL as a constructor option and reads no such env, so an app-read var would cover only half the traffic while disabling the interception that covers all of it.",serveExport:"createGroqTwinServer"},hubspot:{adoption:{pypi:["hubspot-api-client"],sdks:["@hubspot/api-client"],envStems:["HUBSPOT","HUBSPOTPRIVATEAPP"]},hosts:[{host:"api.hubapi.com"},{host:"app.hubspot.com"},{host:"api.hsforms.com"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resourcesUnreachable:{owner:"a portal user provisioned in HubSpot's admin, never through the CRM API"},resources:["crm_object","property","property_group","pipeline","association","owner"],endpointEnvNone:"the @hubspot/api-client SDK takes its base URL from the `basePath` CONSTRUCTOR option (IConfiguration.basePath → ApiClientConfigurator.getBaseServer), not from any environment variable — it reads no process.env at all, and HubSpot documents no base-URL env var. Interception is the api.hubapi.com host entry; inventing a HUBSPOT_BASE_URL the app does not read would report a world covered while its traffic still left the machine.",serveExport:"createHubspotTwinServer"},inngest:{adoption:{pypi:["inngest"],sdks:["inngest"],envStems:["INNGEST"]},hostsNone:"SDK is base-URL-configured by design (options.baseUrl / INNGEST_BASE_URL / INNGEST_EVENT_API_BASE_URL, verified in the pack README) — worlds wire the twin through those vars",archetype:"crud",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["event","function","run","step","signing_key"],endpointEnv:{name:"INNGEST_BASE_URL",templates:{INNGEST_EVENT_API_BASE_URL:"${url}"},note:"no injector entry: the inngest SDK is base-URL-configured through INNGEST_BASE_URL / INNGEST_EVENT_API_BASE_URL."},serveExport:"createInngestTwinServer"},instagram:{adoption:{envStems:["INSTAGRAM"]},hosts:[{host:"graph.facebook.com",pathPattern:"^(?:/v\\d+\\.\\d+)?/(?:me|\\d{1,25})(?:/(?:media|media_publish|content_publishing_limit))?/?$|^/_twin/"},{host:"graph.instagram.com",pathPattern:"^(?:/v\\d+\\.\\d+)?/(?:me|\\d{1,25})(?:/(?:media|media_publish|content_publishing_limit))?/?$|^/_twin/"},{host:"rupload.facebook.com",pathPattern:"^/ig-api-upload/"},{host:"scontent.cdninstagram.com",pathPattern:"^/(?:o1/v/t16/f2/m86/|v/t51\\.(?:71878-15|2885-19)/)"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["ig_user","media"],endpointEnvNone:"Meta ships no Instagram Platform client that reads a base-URL environment variable: apps call https://graph.facebook.com/<version>/… and the rupload host by constant, so a World reaches them through the hosts above; inventing an INSTAGRAM_BASE_URL the app never reads would report coverage the app does not have.",serveExport:"createInstagramTwinServer"},intercom:{adoption:{pypi:["python-intercom"],sdks:["intercom-client"],envStems:["INTERCOM"]},hosts:[{host:"api.intercom.io"},{host:"api.eu.intercom.io"},{host:"api.au.intercom.io"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["contact","conversation","message","event","data_attribute","admin","tag","note","company","segment"],serveExport:"createIntercomTwinServer"},jira:{adoption:{pypi:["jira"],sdks:["jira.js"],envStems:["JIRA","ATLASSIAN"]},hosts:[{host:"atlassian.net"},{suffix:".atlassian.net"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resourcesUnreachable:{oauthtoken:"issued by Atlassian's OAuth authorization server, outside the REST API"},resources:["person","issue","comment","issuelink","attachment","worklog","watcher","vote","project","component","version","sprint","filter","dashboard","gadget","webhook","oauthtoken"],serveExport:"createJiraTwinServer"},langfuse:{adoption:{pypi:["langfuse"],sdks:["langfuse","langfuse-node"],envStems:["LANGFUSE"]},hosts:[{host:"cloud.langfuse.com"},{host:"us.cloud.langfuse.com"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["project","api_key","trace","observation","session","score","score_config","prompt","dataset","dataset_item","dataset_run","dataset_run_item","model","comment","annotation_queue","annotation_queue_item","media","llm_connection","ingestion_event"],serveExport:"createLangfuseTwinServer"},linear:{adoption:{pypi:[],sdks:["@linear/sdk"],scopes:["@linear/"],envStems:["LINEAR"]},hosts:[{host:"api.linear.app"}],archetype:"crud",protocol:{major:1,standing:"deprecated"},transport:"graphql",resourcesUnreachable:{project:"born of the vendor's projectCreate mutation, which this twin does not model yet — pulled only",cycle:"born of the vendor's cycleCreate mutation, which this twin does not model yet — pulled only",user:"a workspace member, born of an invite flow outside the API",workflowState:"born with the team's workflow; the API reads them"},resources:["issue","team","project","cycle","user","label","workflowState","comment","notification"],serveExport:"createDerivedLinearTwinServer"},linkedin:{adoption:{sdks:["linkedin-api-client"],pypi:["linkedin-api-client"],envStems:["LINKEDIN"]},hosts:[{host:"api.linkedin.com",pathPattern:"^(?:/rest/(?:posts|images|videos|organizationAcls|organizations|organizationsLookup|networkSizes)(?:/[^/]+)?/?|/v2/userinfo/?)$|^/_twin/"},{host:"www.linkedin.com",pathPattern:"^/dms-uploads/"},{host:"media.licdn.com",pathPattern:"^/dms/image/"},{host:"dms.licdn.com",pathPattern:"^/playlist/"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["organization","member","organization_acl","token","post"],endpointEnvNone:"linkedin-api-client takes no base-URL environment variable (its RestliClient builds https://api.linkedin.com/rest URLs from a constant), so a World reaches it through the hosts above; inventing a LINKEDIN_BASE_URL the app never reads would report coverage the app does not have.",serveExport:"createLinkedinTwinServer"},livekit:{adoption:{pypi:["livekit-api","livekit","livekit-agents"],sdks:["livekit-server-sdk","@livekit/rtc-node"],scopes:["@livekit/"],envStems:["LIVEKIT"]},hostsNone:"real local media plane (livekit-server) exposed via app-read env (LIVEKIT_URL is ws:// — WebSocket media is outside the HTTP injector's reach)",archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["room","participant","egress","ingress","sip_inbound_trunk","sip_outbound_trunk","sip_dispatch_rule","sip_participant","agent_dispatch"],serveExport:"createLiveKitTwinServer"},mailgun:{adoption:{pypi:["mailgun"],sdks:["mailgun.js"],envStems:["MAILGUN"]},hosts:[{host:"api.mailgun.net"},{host:"api.eu.mailgun.net"}],archetype:"crud",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["domain","message","event","bounce","complaint","unsubscribe","whitelist","webhook","route","mailing_list","list_member","template","template_version","api_key","tag","account"],endpointEnvNone:"the mailgun.js SDK reads no environment variable of its own — verified in the shipped v14.0.0 bundle: `MAILGUN` occurs zero times, and every `process.env` hit belongs to bundled axios (proxy vars) or `debug` (DEBUG). The base URL is the constructor `url` option, so no app-read endpoint env exists to inject; redirection is via the `hosts` injector entries.",serveExport:"createMailgunTwinServer"},mapbox:{adoption:{pypi:["mapbox"],sdks:["@mapbox/mapbox-sdk"],scopes:["@mapbox/"],envStems:["MAPBOX"]},hosts:[{host:"api.mapbox.com"}],archetype:"crud",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["geocode","dataset","dsfeature","style","token","tileset","upload"],serveExport:"createMapboxTwinServer"},mistral:{adoption:{pypi:["mistralai"],sdks:["@mistralai/mistralai","@ai-sdk/mistral"],envStems:["MISTRAL"]},hosts:[{host:"api.mistral.ai"},{host:"api.eu.mistral.ai"},{host:"api.us.mistral.ai"}],archetype:"generative",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["file","batch_job","agent","conversation","conversation_entry"],serveExport:"createMistralTwinServer"},mixpanel:{adoption:{pypi:["mixpanel"],sdks:["mixpanel","mixpanel-browser"]},hosts:[{host:"api.mixpanel.com"},{host:"api-eu.mixpanel.com"},{host:"api-in.mixpanel.com"},{host:"api-js.mixpanel.com"},{host:"data.mixpanel.com"},{host:"data-eu.mixpanel.com"},{host:"data-in.mixpanel.com"},{host:"mixpanel.com"}],archetype:"crud",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["event","profile","identity","alias"],serveExport:"createMixpanelTwinServer"},mongodb:{adoption:{pypi:[],sdks:[]},hostsNone:"RAW-PROTOCOL pack — there is no host to map. MongoDB clients speak the wire protocol over a raw TCP socket to whatever host the connection string names, which the injector (http/fetch patching) cannot see; a World reaches this twin through the connection string itself (MONGO_URI and its kin), which World-managed infrastructure injects.",archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"raw-tcp",resources:["collection","index","document"],endpointEnvNone:"no vendor base-URL variable: the application reads its own connection-string variable (MONGO_URI, MONGODB_URL, DATABASE_URL, …), and World-managed infrastructure (`volter-world init` → `volter-world-infra`) injects that variable pointing at this twin's listener.",serveExport:"createMongodbTwinServer"},moonshot:{adoption:{pypi:[],sdks:[],envStems:["MOONSHOT"]},hosts:[{host:"api.moonshot.ai"}],archetype:"generative",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resourcesUnreachable:{model:"the vendor catalog",balance:"the account ledger the vendor keeps; read-only"},resources:["file","batch","balance","model"],endpointEnvNone:"Moonshot ships no SDK of its own; its documented clients (the standard openai/anthropic SDKs) take their base URL as a constructor option and read no MOONSHOT_BASE_URL env, so an app-read var would cover only env-configured callers while disabling the api.moonshot.ai interception that covers all traffic.",serveExport:"createMoonshotTwinServer"},notion:{adoption:{pypi:["notion-client"],sdks:["@notionhq/client"],scopes:["@notionhq/"],envStems:["NOTION"]},hostsNone:"no injector entry grounded yet — worlds point @notionhq/client at the twin via its baseUrl option; zero-edit interception of api.notion.com is a visible gap until grounded here",archetype:"crud",protocol:{major:1,standing:"deprecated"},transport:"rest",resourcesUnreachable:{user:"a workspace member, born of the workspace admin, read-only through the API"},resources:["page","block","database","comment","user","webhook"],serveExport:"createNotionTwinServer"},"npm-registry":{adoption:{pypi:[],envStems:["NPM"]},hosts:[{host:"registry.npmjs.org"},{host:"npm.pkg.github.com"}],archetype:"crud",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["package","tarball","advisory"],serveExport:"createNpmRegistryTwinServer"},"oa-treasury":{adoption:{pypi:[],envStems:["MODELPROXY","MODELPROXYADMIN","AGENTPROXY","AGENTPROXYADMIN","AGENTPROXYHMAC"]},hosts:[{hostPattern:"^volter-agent-model-proxy\\.[a-z0-9.-]+\\.workers\\.dev$"},{host:"open-autonomy.org"},{host:"www.open-autonomy.org"}],archetype:"crud",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["account","supplier","coupon","reserve","run","rail"],serveExport:"createOaTreasuryTwinServer"},openai:{adoption:{pypi:["openai","openai-agents"],sdks:["openai","@ai-sdk/openai"],envStems:["OPENAI","APOPENAI","OPENAIMODERATION","REWORKDPLATFORMOPENAI"]},hosts:[{host:"api.openai.com"},{host:"platform.openai.com",pathPattern:"^/(settings/proj[-_][^/]+/api-keys|login$)"}],archetype:"generative",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["file","batch","fine_tuning_job","vector_store","vector_store_file","response","chat_completion"],serveExport:"createOpenAITwinServer"},openrouter:{adoption:{pypi:["openrouter"],sdks:["@openrouter/ai-sdk-provider"],scopes:["@openrouter/"],envStems:["OPENROUTER","OR"]},hosts:[{host:"openrouter.ai"}],archetype:"generative",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["generation","api_key","byok","preset"],serveExport:"createOpenRouterTwinServer"},openweather:{adoption:{pypi:["pyowm"],sdks:["openweather-api-node"],envStems:["OPENWEATHER","OPENWEATHERMAP"]},hosts:[{host:"api.openweathermap.org"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["observation","audit"],serveExport:"createOpenWeatherTwinServer"},paypal:{adoption:{sdks:["paypal-rest-sdk"],pypi:["paypalrestsdk"],envStems:["PAYPAL"]},hosts:[{host:"api.paypal.com",pathPattern:"^/v1/(?:oauth2/token/?$|identity/openidconnect/|payments/payouts(?:-item)?(?:/|$)|notifications/)|^/_twin/"},{host:"api-m.paypal.com",pathPattern:"^/v1/(?:oauth2/token/?$|identity/openidconnect/|payments/payouts(?:-item)?(?:/|$)|notifications/)|^/_twin/"},{host:"api.sandbox.paypal.com",pathPattern:"^/v1/(?:oauth2/token/?$|identity/openidconnect/|payments/payouts(?:-item)?(?:/|$)|notifications/)|^/_twin/"},{host:"api-m.sandbox.paypal.com",pathPattern:"^/v1/(?:oauth2/token/?$|identity/openidconnect/|payments/payouts(?:-item)?(?:/|$)|notifications/)|^/_twin/"},{host:"www.paypal.com",pathPattern:"^/signin/authorize/?$|^/connect/?$|^/webapps/auth/protocol/openidconnect/|^/_twin/"},{host:"www.sandbox.paypal.com",pathPattern:"^/signin/authorize/?$|^/connect/?$|^/webapps/auth/protocol/openidconnect/|^/_twin/"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["oauth_client","account","session","auth_request","authorization_code","access_token","refresh_token","payout_batch","payout_item","webhook","webhook_event"],endpointEnvNone:"no PayPal client reads a base-URL env var — paypal-rest-sdk takes mode: sandbox|live, the current @paypal server SDK takes an Environment enum, and the motivating app computes its host from NODE_ENV — so interception is the host entries above.",serveExport:"createPaypalTwinServer"},perplexity:{adoption:{pypi:["perplexityai"],sdks:["@ai-sdk/perplexity"],envStems:["PERPLEXITY"]},hosts:[{host:"api.perplexity.ai"}],archetype:"generative",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["async_request"],endpointEnvNone:"@ai-sdk/perplexity — the dominant client in the 2026-08-31-b demand census — takes its baseURL as a constructor option and reads NO base-URL environment variable (perplexity-provider.ts: `withoutTrailingSlash(options.baseURL ?? 'https://api.perplexity.ai')`, and `loadApiKey` reads only PERPLEXITY_API_KEY). Perplexity documents no base-URL env var for any client, so there is nothing to inject; a fabricated PERPLEXITY_BASE_URL would let `covers` call a world covered while the app kept calling api.perplexity.ai. The injector intercepts that host (see `hosts`) instead.",serveExport:"createPerplexityTwinServer"},pinecone:{adoption:{pypi:["pinecone","pinecone-client"],sdks:["@pinecone-database/pinecone"],scopes:["@pinecone-database/"],envStems:["PINECONE"]},hostsNone:"control/data host split with per-index data-plane hostnames ({index}-{project}.svc.{env}.pinecone.io, see the pack README) — SDK is pointed at the twin by explicit host config",archetype:"crud",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["index","collection","vector"],serveExport:"createPineconeTwinServer"},plain:{adoption:{pypi:[],sdks:["@team-plain/typescript-sdk"],scopes:["@team-plain/"],envStems:["PLAIN","NEXTPRIVATEPLAIN"]},hosts:[{host:"core-api.uk.plain.com"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"graphql",resourcesUnreachable:{company:"born of the vendor's createCompany mutation, which this twin does not model (no manifest entry) — pulled only",customerGroup:"born of createCustomerGroup, filed as todo plain.customergroups.op_create — pulled only",customerGroupMembership:"born of addCustomerToCustomerGroups over a group the twin cannot create yet — pulled only",workspace:"the tenant itself",user:"a workspace member, born of an invite",machineUser:"born in the workspace settings UI"},resources:["workspace","user","machineUser","customer","company","tenant","customerGroup","customerGroupMembership","thread","label","labelType","threadField","timelineEntry","note","customerEvent","webhookTarget","attachment"],serveExport:"createPlainTwinServer"},planetscale:{adoption:{pypi:[],sdks:["@planetscale/database"],envStems:["PLANETSCALE"]},hosts:[{suffix:".psdb.cloud"},{host:"api.planetscale.com",pathPattern:"^/v1/organizations(/|$)"},{host:"app.planetscale.com",pathPattern:"^/(sign-in|[^/]+/settings/service-tokens)(/|$)"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",nativeTransport:{protocol:"mysql",flag:"--mysql",upstreamEnv:"PLANETSCALE_TWIN_URL"},resources:["table","row","_session","_backup"],endpointEnv:{name:"PLANETSCALE_TWIN_URL",templates:{PLANETSCALE_DATABASE_URL:"http://twin:twin@${host}:${port}"},note:"the @planetscale/database client reads PLANETSCALE_DATABASE_URL and honours http:; the injector also redirects *.psdb.cloud."},prismaAdapter:{adapter:"@prisma/adapter-planetscale",export:"PrismaPlanetScale",urlEnv:"PLANETSCALE_DATABASE_URL"},serveExport:"createPlanetscaleTwinServer"},polar:{adoption:{pypi:["polar-sdk"],sdks:["@polar-sh/sdk"],scopes:["@polar-sh/"],envStems:["POLAR"]},hosts:[{host:"api.polar.sh"},{host:"sandbox-api.polar.sh"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["customer","product","subscription","order","checkout","benefit","discount","meter","event","customer_session","webhook_endpoint"],serveExport:"createPolarTwinServer"},posthog:{adoption:{pypi:["posthog"],sdks:["posthog-node","posthog-js","@posthog/api-client","@posthog/react"],envStems:["POSTHOG","POSTHOGANALYTICS","POSTHOGPERSONAL","POSTHOGPROJECT","POSTHOGPUBLIC"]},hosts:[{host:"app.posthog.com"},{host:"us.posthog.com"},{host:"eu.posthog.com"},{suffix:".i.posthog.com"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["project","event","person","feature_flag","insight","cohort","experiment","annotation","dashboard","action","group","org_member","early_access_feature","event_definition","property_definition"],serveExport:"createPosthogTwinServer"},postmark:{adoption:{pypi:["postmarker"],sdks:["postmark"],envStems:["POSTMARK"]},hosts:[{host:"api.postmarkapp.com"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["message","bounce","template","message_stream","webhook","suppression","server","domain","sender_signature","inbound_rule"],serveExport:"createPostmarkTwinServer"},reddit:{adoption:{sdks:["snoowrap"],pypi:[],envStems:["REDDIT"]},hosts:[{host:"oauth.reddit.com",pathPattern:"^/(?:api/v1/me|api/submit|api/del|api/comment|api/info|api/media/asset|by_id/[^/]+|r/[^/]+/(?:about|new|api/info)|user/[^/]+/(?:about|submitted)|subreddits/mine/(?:moderator|contributor)|(?:r/[^/]+/)?comments/[a-z0-9]+(?:/[^/]*)?)(?:\\.json)?/?$|^/_twin/"},{host:"www.reddit.com",pathPattern:"^/api/v1/access_token$"},{host:"reddit-uploaded-media.s3-accelerate.amazonaws.com"},{host:"v.redd.it",pathPattern:"^/[a-z0-9]{13}/DASH_\\d{2,4}\\.mp4$"},{host:"preview.redd.it",pathPattern:"^/[a-z0-9]{13}\\.(?:png|jpg|gif)$"},{host:"i.redd.it",pathPattern:"^/[a-z0-9]{13}\\.(?:png|jpg|gif)$"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["user","subreddit","link","comment"],endpointEnvNone:"reddit clients take no base-URL environment variable (snoowrap and PRAW build https://oauth.reddit.com and https://www.reddit.com URLs from constants or explicit constructor options), so a World reaches them through the hosts above; inventing a REDDIT_BASE_URL the app never reads would report coverage the app does not have.",serveExport:"createRedditTwinServer"},redis:{adoption:{},hostsNone:"RAW-PROTOCOL pack — there is no host to map. Redis's protocol runs over a TCP socket the injector (which patches http/fetch) never sees, and a Redis has no vendor hostname: it is wherever the app's REDIS_URL points. The World points it here: init classifies REDIS_URL as managed infrastructure and the managed redis service is this twin.",archetype:"crud",protocol:{major:1,standing:"deprecated"},transport:"raw-tcp",resources:["key","field","member","scored","entry","script"],endpointEnvNone:"Redis clients read no base-URL env of their own: the app passes its REDIS_URL (or host/port) to ioredis or node-redis itself, and init emits that REDIS_URL for the managed redis service (world-runtime/src/init.ts), not as a twin endpoint env.",serveExport:"createRedisTwinServer"},replicate:{adoption:{pypi:["replicate"],sdks:["replicate","@ai-sdk/replicate"],envStems:["REPLICATE","REWORKDPLATFORMREPLICATE"]},hostsNone:"no injector entry grounded yet — worlds wire the twin via the SDK's explicit baseUrl config; zero-edit interception of api.replicate.com is a visible gap until its hosts are grounded here",archetype:"generative",protocol:{major:1,standing:"deprecated"},transport:"rest",resourcesUnreachable:{model_version:"born of `cog push`, never of the HTTP API; pulled"},resources:["prediction","model","model_version","webhook_secret"],serveExport:"createReplicateTwinServer"},resend:{adoption:{pypi:["resend"],sdks:["resend"],envStems:["RESEND","NEXTPRIVATERESEND"]},hosts:[{host:"api.resend.com"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["email","audience","contact","domain","api_key"],serveExport:"createResendTwinServer"},runhuman:{adoption:{sdks:["runhuman"]},hosts:[{host:"runhuman.com",pathPattern:"^/api/"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["organization","project","api_key","user","tester_profile","job","pipeline_run"],endpointEnv:{name:"RUNHUMAN_API_URL",note:"grounded in volter-ai/runhuman packages/cli/src/lib/config.ts, which overrides the CLI apiUrl from RUNHUMAN_API_URL; RH2 reads its human-marketplace base URL from the provider row spec.url instead, which a rehearsal World sets to this same twin URL."},serveExport:"createRunhumanTwinServer"},scrapecreators:{adoption:{pypi:[],sdks:["@scrapecreators/cli"],envStems:["SCRAPECREATORS"]},hosts:[{host:"api.scrapecreators.com"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["profile","content","cache","account","usage"],serveExport:"createScrapeCreatorsTwinServer"},segment:{adoption:{pypi:["segment-analytics-python","analytics-python"],sdks:["@segment/analytics-node"],envStems:["SEGMENT"]},hosts:[{host:"api.segment.io"},{host:"events.eu1.segmentapis.com"},{host:"oauth2.segment.io"},{host:"oauth2.eu1.segmentapis.com"}],archetype:"crud",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["event","identity","group","dropped"],serveExport:"createSegmentTwinServer"},sendblue:{adoption:{pypi:["sendblue"],sdks:["sendblue"],envStems:["SENDBLUE"]},hostsNone:"no injector entry grounded yet — worlds wire the twin via explicit client endpoint config; a visible gap until its host is grounded here",archetype:"crud",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["message","credential"],serveExport:"createSendblueTwinServer"},sendgrid:{adoption:{pypi:["sendgrid"],sdks:["@sendgrid/mail","@sendgrid/client"],envStems:["SENDGRID","SENDGRIDSYNC"]},hosts:[{host:"api.sendgrid.com"},{host:"api.eu.sendgrid.com"},{host:"email.twilio.com"}],archetype:"crud",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["message"],serveExport:"createSendgridTwinServer"},sentry:{adoption:{pypi:["sentry-sdk"],sdks:["@sentry/node","@sentry/browser","@sentry/react","@sentry/nextjs","@sentry/vue","@sentry/sveltekit","@sentry/astro","@sentry/remix","@sentry/electron","@sentry/react-native"],scopes:["@sentry/"],envStems:["SENTRY","APPSMITHSENTRY"]},hosts:[{host:"sentry.io"},{suffix:".ingest.sentry.io"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["organization","team","project","project_key","issue","event","event_attachment","session","project_ownership","codeowners","project_filter","release","release_file","deploy","alert_rule","metric_alert","org_integration"],serveExport:"createSentryTwinServer"},slack:{adoption:{worldIds:["slackapp"],pypi:["slack-sdk","slack-bolt","slackclient"],sdks:["@slack/web-api","@slack/bolt","@slack/webhook","@slack/oauth"],scopes:["@slack/"],envStems:["SLACK","SLACKBOTUSER"]},hosts:[{key:"slackapp",host:"slack.com",pathPattern:"^/api/apps\\.connections\\.open/?$"},{host:"slack.com"},{host:"www.slack.com"},{host:"api.slack.com"},{host:"hooks.slack.com",pathPattern:"^/services/"},{host:"avatars.slack-edge.com",pathPattern:"^/T[A-Za-z0-9-]+/(([UWA][A-Za-z0-9-]+|icon)_[0-9]{1,4}\\.png|[UW][A-Za-z0-9-]+-[0-9a-f]{12}_([0-9]{1,4}|original)\\.(png|gif))$"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"web-api",resources:["channel","user","message","file","audit"],serveExport:"createSlackTwinServer"},smtp:{adoption:{pypi:["aiosmtplib"],sdks:["nodemailer","nodemailer-smtp-transport","emailjs"],envStems:["NEXTPRIVATESMTP"]},hostsNone:"RAW-PROTOCOL pack — there is no host to map. SMTP is a line protocol over a raw TCP socket, so the injector (which patches http/fetch) cannot see the traffic at all, and there is no vendor hostname either: the relay is whatever the operator names (smtp.gmail.com, email-smtp.us-east-1.amazonaws.com, localhost:1025 …). Interception is app-read env instead — the world injects SMTP_HOST/SMTP_PORT + EMAIL_SERVER/EMAIL_SERVER_HOST/EMAIL_SERVER_PORT at the twin's listener (APP_READ_ENDPOINT_ENV in world-runtime/src/init.ts), which is the ONLY thing every SMTP client is configured with. Same class as livekit's ws:// media plane, one layer further down.",archetype:"crud",protocol:{major:1,standing:"deprecated"},transport:"raw-tcp",resources:["message","relay"],serveExport:"createSmtpTwinServer"},snowflake:{adoption:{pypi:["snowflake-connector-python","snowflake","snowflake-snowpark-python","snowflake-sqlalchemy"],sdks:["snowflake-sdk"],envStems:["SNOWFLAKE"]},hosts:[{suffix:".snowflakecomputing.com"},{suffix:".snowflakecomputing.cn"}],archetype:"crud",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["database","schema","table","view","warehouse","session","query"],endpointEnvNone:"the snowflake-sdk takes its endpoint through createConnection()'s own account/host/accessUrl/protocol/port options or a connections.toml under SNOWFLAKE_HOME; it reads NO base-URL environment variable (verified against the packed snowflake-sdk@3.2.0 tarball, whose lib/ reads SNOWFLAKE_HOME, SNOWFLAKE_DEFAULT_CONNECTION_NAME, the SNOWFLAKE_DISABLE_*/SNOWFLAKE_CRL_*/SNOWFLAKE_RUNNING_INSIDE_SPCS switches, the SF_OCSP_*/SF_TELEMETRY_*/SF_CLIENT_CONFIG_FILE/SF_TEMPORARY_CREDENTIAL_CACHE_DIR debug and cache switches, the standard http_proxy family, and some non-Snowflake names like AWS_REGION/HOME - no base-URL variable of any kind). Interception is host-based via the .snowflakecomputing.com and .snowflakecomputing.cn suffix entries; a SNOWFLAKE_BASE_URL would be a var no app reads.",serveExport:"createSnowflakeTwinServer"},stigg:{adoption:{sdks:["@stigg/node-server-sdk","@stigg/react-sdk","@stigg/js-client-sdk","@stigg/api-client-js"],pypi:["stigg-api-client","stigg"],scopes:["@stigg/"],envStems:["STIGG","STIGGCLIENT"]},hosts:[{host:"api.stigg.io"},{host:"edge.api.stigg.io"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"graphql",resources:["product","plan","feature","packageEntitlement","price","customer","subscription","usageMeasurement","promotionalEntitlement","coupon","integration","hook"],endpointEnvNone:"the Stigg SDKs take their base URL as a constructor option (Stigg.initialize({ baseUri, baseEdgeUri })) and read NO env var for it. Verified by grep for process.env across the SDK dists: @stigg/node-server-sdk 4.55.0 (the version this pack pins and installs) and, in the consumer tree that motivated the pack, @stigg/node-server-sdk 4.2.0 and @stigg/js-client-sdk 3.67.0 — every one of them references only process.env.NODE_ENV. (The browser SDKs are NOT installed in this repo; that half of the evidence comes from ~/Code/Ponder and is therefore not re-checkable here, which is why both trees are named rather than one. §9 round 1 flagged the original citation for naming versions this repo does not carry.) Interception is by the api.stigg.io / edge.api.stigg.io host entries above.",serveExport:"createStiggTwinServer"},stream:{adoption:{pypi:["stream-chat"],sdks:["stream-chat"],envStems:["STREAM","GETSTREAM"]},hosts:[{host:"chat.stream-io-api.com"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["user","channel","message","channeltype","device","ban","mute","flag"],serveExport:"createStreamTwinServer"},stripe:{adoption:{pypi:["stripe"],sdks:["stripe"],envStems:["STRIPE","NEXTPRIVATESTRIPE"]},hosts:[{host:"api.stripe.com"},{host:"checkout.stripe.com",pathPattern:"^/c/pay/"},{host:"billing.stripe.com",pathPattern:"^/p/session/"},{host:"connect.stripe.com",pathPattern:"^/setup/|^/oauth/(authorize|token|deauthorize)/?$"},{host:"dashboard.stripe.com",pathPattern:"^/settings/public/?$|^/(test/)?settings/connect(/onboarding-options/oauth)?/?$"},{host:"verify.stripe.com",pathPattern:"^/start/"},{host:"js.stripe.com",pathPattern:"^/v3/financial-connections/|^/v3/?$|^/(v3|[a-z]+)/stripe\\.js$"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["charge","customer","payment_intent","setup_intent","payment_method","subscription","price","product","invoice","invoiceitem","refund","event"],serveExport:"createStripeTwinServer"},supabase:{adoption:{pypi:["supabase","gotrue","supabase-auth","postgrest","storage3","supafunc","realtime"],sdks:["@supabase/supabase-js"],scopes:["@supabase/"],envStems:["SUPABASE"],worldIds:["supabasemgmt"]},hosts:[{host:"api.supabase.com"},{suffix:".supabase.co",pathPattern:"^/(rest|storage|auth)/v1(/|$)"}],archetype:"engine-control",protocol:{major:1,standing:"deprecated"},transport:"rest",resourcesUnreachable:{access_token:"a personal access token minted in the dashboard; the twin only reads it as seeded state",network_ban:"born of the vendor's abuse detector",backup:"born of the vendor's scheduler"},resources:["organization","org_member","access_token","project","branch","config","secret","function","network_restrictions","network_ban","custom_hostname","read_replica","backup"],managedDatabase:{kind:"postgres",arg:"--database",note:"PostgREST, Storage and Auth are served over the application's own database: the World's managed postgres, the database its migrations and direct queries use"},serveExport:"createSupabaseTwinServer"},supermemory:{adoption:{pypi:["supermemory"],sdks:["supermemory"],envStems:["SUPERMEMORY"]},hosts:[{host:"api.supermemory.ai"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["document","setting"],serveExport:"createSupermemoryTwinServer"},svix:{adoption:{pypi:["svix"],sdks:["svix"],envStems:["SVIX"]},hosts:[{host:"api.svix.com"},{host:"api.us.svix.com"},{host:"api.eu.svix.com"},{host:"api.in.svix.com"},{host:"api.ca.svix.com"},{host:"api.au.svix.com"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["application","endpoint","message","message_attempt","event_type"],serveExport:"createSvixTwinServer"},tavily:{adoption:{sdks:["@tavily/core"],pypi:["tavily-python"],envStems:["TAVILY"]},hosts:[{host:"api.tavily.com"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["page","usage","log","research","keyless"],endpointEnvNone:"the @tavily/core SDK exposes no base-URL env var — it reads only TAVILY_API_KEY/TAVILY_HTTP(S)_PROXY/TAVILY_ORG_ID/TAVILY_PROJECT from process.env; base-URL override is the constructor option apiBaseURL (dist/index.mjs post()/get(): `apiBaseURL || BASE_URL`), so interception is the hosts entry above.",serveExport:"createTavilyTwinServer"},temporal:{adoption:{sdks:["@temporalio/client","@temporalio/worker","@temporalio/workflow","@temporalio/activity"],scopes:["@temporalio/"],pypi:["temporalio"],envStems:["TEMPORAL"]},hostsNone:"RAW-PROTOCOL pack — there is no host to map. The Temporal SDKs dial the frontend address they are configured with (Connection.connect / NativeConnection.connect `address`, conventionally TEMPORAL_ADDRESS) over gRPC, which the http/fetch injector never sees. Interception is the app-read address: the World injects TEMPORAL_ADDRESS=<host>:<port> at this twin (APP_READ_ENDPOINT_ENV in world-runtime/src/init.ts).",archetype:"engine-control",protocol:{declared:"2",major:2,standing:"current"},transport:"raw-tcp",resources:["workflow-execution","namespace"],serveExport:"createTemporalTwinServer"},tiktok:{adoption:{sdks:[],pypi:[],envStems:["TIKTOK"]},hosts:[{host:"www.tiktok.com",pathPattern:"^/v2/auth/authorize/?$|^/_twin/"},{host:"open.tiktokapis.com",pathPattern:"^/v2/(?:oauth/(?:token|revoke)|user/info|video/(?:list|query)|post/publish/(?:creator_info/query|video/init|inbox/video/init|status/fetch))/?$|^/_twin/"},{host:"open-upload.tiktokapis.com",pathPattern:"^/video/?$"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["oauth_client","account","session","auth_request","grant","video","publish"],endpointEnvNone:"no app-read base-URL env exists: TikTok publishes no official SDK with a base-URL option and integrations (Dub included) hardcode www.tiktok.com and open.tiktokapis.com, so interception is the path-scoped hosts entries above.",serveExport:"createTikTokTwinServer"},tinybird:{adoption:{pypi:["tinybird-python-sdk","tinybird-cli"],sdks:["@chronark/zod-bird"],scopes:["@chronark/zod-bird"],envStems:["TINYBIRD"]},hosts:[{host:"api.tinybird.co"},{hostPattern:"^api\\.[a-z0-9.-]+\\.tinybird\\.co$"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["datasource","pipe","event","token","job","tag"],serveExport:"createTinybirdTwinServer"},togetherai:{adoption:{sdks:["together-ai"],envStems:["TOGETHER"]},hosts:[{host:"api.together.ai"}],archetype:"generative",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resourcesUnreachable:{model:"the vendor catalog"},resources:["file","batch","finetune","model"],endpointEnv:{name:"TOGETHER_TWIN_URL",templates:{TOGETHER_API_BASE_URL:"${url}/v1"},note:"the injector covers api.together.ai, but together-ai's files.upload() reads TOGETHER_API_BASE_URL at module load and ignores client.baseURL (lib/upload.js:12) — the template points it at the twin's /v1 so the SDK upload flow does not egress to the real vendor."},serveExport:"createTogetheraiTwinServer"},tremendous:{adoption:{pypi:[],sdks:["tremendous"],envStems:["TREMENDOUS"]},hosts:[{host:"api.tremendous.com"},{host:"testflight.tremendous.com"}],archetype:"crud",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["order","reward","campaign","product","funding_source","invoice","topup","balance_txn","member","field","webhook","organization","settings"],serveExport:"createTremendousTwinServer"},tunnel:{adoption:{pypi:[],sdks:["@volter/tunnel"],envStems:["TUNNEL","VOLTERTUNNEL"]},hostsNone:"no injector entry by design: native cloudflared is an external binary, while @volter/tunnel opens a configurable WebSocket control channel and the CLI reads TUNNEL_SERVER_URL. Worlds wire that app-read endpoint directly; claiming api.trycloudflare.com in the Node injector would not redirect cloudflared and would falsely imply the Cloudflare edge data plane was twinned",archetype:"proxy",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["quick_tunnel","relay_tunnel","relay"],serveExport:"createTunnelTwinServer"},turbopuffer:{adoption:{sdks:["@turbopuffer/turbopuffer"],pypi:["turbopuffer"],scopes:["@turbopuffer/"],envStems:["TURBOPUFFER"]},hosts:[{hostPattern:"^(?:aws|gcp|azure)-[a-z0-9-]+\\.turbopuffer\\.com$"},{host:"turbopuffer.com",pathPattern:"^/(login|dashboard|_twin/users)(/|$)"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["namespace","document"],endpointEnv:{name:"TURBOPUFFER_TWIN_URL",templates:{TURBOPUFFER_BASE_URL:"${url}/{region}"},note:"grounded in @turbopuffer/turbopuffer@2.8.0 src/client.ts:253-288 (TURBOPUFFER_BASE_URL, {region} placeholder substitution) and internal/custom/fetch-node.ts (undici Agent.request under node, outside the injector); the injector also claims the regional *.turbopuffer.com hosts for fetch-based runtimes."},serveExport:"createTurbopufferTwinServer"},twelvelabs:{adoption:{pypi:["twelvelabs"],sdks:["twelvelabs-js"],envStems:["TWELVELABS"]},hosts:[{host:"api.twelvelabs.io"}],archetype:"generative",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["index","task","video"],serveExport:"createTwelvelabsTwinServer"},twilio:{adoption:{pypi:["twilio"],sdks:["twilio"],envStems:["TWILIO"]},hostsNone:"no injector entry grounded yet — worlds point the twilio SDK at the twin via explicit client config; zero-edit interception of the three real Twilio hosts (pack README §Coverage) is a visible gap until grounded here",archetype:"crud",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["message","verification","phone_number","signing_key"],serveExport:"createTwilioTwinServer"},upstash:{adoption:{pypi:["upstash-redis","upstash-ratelimit","qstash","upstash-workflow"],sdks:["@upstash/redis","@upstash/ratelimit","@upstash/qstash","@upstash/workflow"],scopes:["@upstash/redis","@upstash/ratelimit","@upstash/qstash","@upstash/workflow"],envStems:["UPSTASHREDIS","KVREST","QSTASH"]},hosts:[{suffix:".upstash.io"},{suffix:"-vector.upstash.io",exclude:!0},{host:"api.upstash.com",pathPattern:"^/v2/(redis|team|teams)(/|$)"},{host:"console.upstash.com",pathPattern:"^/(login|account/(api|teams)|qstash|invite)(/|$)"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["key"],endpointEnv:{name:"UPSTASH_TWIN_URL",templates:{QSTASH_URL:"${url}"},note:"@upstash/qstash and @upstash/workflow read QSTASH_URL; the injector also redirects *.upstash.io (Redis databases, QStash) to this twin."},serveExport:"createUpstashRedisTwinServer"},upstashvector:{adoption:{pypi:["upstash-vector"],sdks:["@upstash/vector"],scopes:["@upstash/vector"],envStems:["UPSTASHVECTOR"]},hosts:[{suffix:"-vector.upstash.io"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["vector","namespace","config"],serveExport:"createUpstashVectorTwinServer"},vercel:{adoption:{pypi:["vercel"],sdks:["@vercel/sdk","@vercel/edge-config"],envStems:["VERCEL"]},hosts:[{host:"api.vercel.com"},{host:"edge-config.vercel.com"},{host:"avatar.vercel.sh"},{host:"vercel.com",pathPattern:"^/(login|account/tokens)(/|$)"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["team","project","project_domain","domain","dns_record","env_var","edge_config","deployment","alias","auth_token"],serveExport:"createVercelTwinServer"},veriff:{adoption:{pypi:[],sdks:["@veriff/js-sdk"],scopes:["@veriff/"],envStems:["VERIFF"]},hosts:[{host:"stationapi.veriff.com"},{host:"api.veriff.me"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["session","attempt","media","delivery"],serveExport:"createVeriffTwinServer"},vital:{adoption:{pypi:["vital"],sdks:["@tryvital/vital-node"],scopes:["@tryvital/"],envStems:["VITAL"]},hosts:[{host:"api.tryvital.io"},{host:"api.sandbox.tryvital.io"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["user","order","appointment","webhook"],serveExport:"createVitalTwinServer"},volteridentity:{adoption:{sdks:["@volter/identity"],pypi:[],envStems:[]},hosts:[{host:"id.volter.ai"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["person","session","oauth_client","oauth_resource","client_resource","consent","authorization_code","access_token","refresh_token","device_code","organization","member","invitation"],endpointEnv:{name:"VOLTER_ISSUER",note:'grounded in the consumers: browser-substrate services/gateway/cloudflare/volter.ts (`VOLTER_ISSUER`, "the identity service, https://id.volter.ai") discovers the issuer from it, and Volter Teams is configured with `VOLTER_ISSUER` (volter-ai/identity ROADMAP I4); the twin is its own issuer, so discovery, tokens and redirects all name the injected URL.'},serveExport:"createVolterIdentityTwinServer"},webrisk:{adoption:{pypi:["google-cloud-webrisk"],sdks:["@google-cloud/web-risk"],envStems:["WEBRISK"]},hosts:[{host:"webrisk.googleapis.com"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["verdict","submission","operation","audit","iam_policy"],serveExport:"createWebRiskTwinServer"},x:{adoption:{pypi:["tweepy"],sdks:["twitter-api-v2"]},hosts:[{host:"api.x.com",pathPattern:"^/2/(?!(?:oauth2/(?:token|revoke)|users/me)/?$)|^/_twin/(?!assets/consent\\.(?:js|css)$)"},{host:"api.twitter.com",pathPattern:"^/2/(?!(?:oauth2/(?:token|revoke)|users/me)/?$)|^/_twin/(?!assets/consent\\.(?:js|css)$)"},{host:"x.com",pathPattern:"^/(?!_twin/)[A-Za-z0-9_]{1,15}/status/[0-9]{1,19}/?$|^/(?!(?:i|en|home|explore|notifications|messages|settings|search|compose|login|logout|signup|tos|privacy|about|account|intent|share|hashtag|lists|bookmarks|jobs|download|grok|premium|communities|creators|twin|_twin)/?$)[A-Za-z0-9_]{1,15}/?$"},{host:"twitter.com",pathPattern:"^/(?!_twin/)[A-Za-z0-9_]{1,15}/status/[0-9]{1,19}/?$|^/(?!(?:i|en|home|explore|notifications|messages|settings|search|compose|login|logout|signup|tos|privacy|about|account|intent|share|hashtag|lists|bookmarks|jobs|download|grok|premium|communities|creators|twin|_twin)/?$)[A-Za-z0-9_]{1,15}/?$"},{host:"www.x.com",pathPattern:"^/(?!_twin/)[A-Za-z0-9_]{1,15}/status/[0-9]{1,19}/?$|^/(?!(?:i|en|home|explore|notifications|messages|settings|search|compose|login|logout|signup|tos|privacy|about|account|intent|share|hashtag|lists|bookmarks|jobs|download|grok|premium|communities|creators|twin|_twin)/?$)[A-Za-z0-9_]{1,15}/?$"},{host:"www.twitter.com",pathPattern:"^/(?!_twin/)[A-Za-z0-9_]{1,15}/status/[0-9]{1,19}/?$|^/(?!(?:i|en|home|explore|notifications|messages|settings|search|compose|login|logout|signup|tos|privacy|about|account|intent|share|hashtag|lists|bookmarks|jobs|download|grok|premium|communities|creators|twin|_twin)/?$)[A-Za-z0-9_]{1,15}/?$"},{host:"mobile.twitter.com",pathPattern:"^/(?!_twin/)[A-Za-z0-9_]{1,15}/status/[0-9]{1,19}/?$|^/(?!(?:i|en|home|explore|notifications|messages|settings|search|compose|login|logout|signup|tos|privacy|about|account|intent|share|hashtag|lists|bookmarks|jobs|download|grok|premium|communities|creators|twin|_twin)/?$)[A-Za-z0-9_]{1,15}/?$"},{host:"mobile.x.com",pathPattern:"^/(?!_twin/)[A-Za-z0-9_]{1,15}/status/[0-9]{1,19}/?$|^/(?!(?:i|en|home|explore|notifications|messages|settings|search|compose|login|logout|signup|tos|privacy|about|account|intent|share|hashtag|lists|bookmarks|jobs|download|grok|premium|communities|creators|twin|_twin)/?$)[A-Za-z0-9_]{1,15}/?$"},{host:"pbs.twimg.com",pathPattern:"^/media/[0-9a-f]{64}\\.(?:jpg|png|gif|webp)$|^/ext_tw_video_thumb/[0-9]{1,19}/pu/img/[0-9a-f]{64}\\.svg$"},{host:"video.twimg.com",pathPattern:"^/ext_tw_video/[0-9]{1,19}/pu/vid/avc1/[0-9]+x[0-9]+/[0-9a-f]{64}\\.mp4$"},{host:"abs.twimg.com",pathPattern:"^/sticky/default_profile_images/default_profile_(?:normal|bigger|200x200|400x400)\\.png$"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["account","post","follow","rate_limit","_token"],serveExport:"createXTwinServer"},xai:{adoption:{pypi:["xai-sdk"],sdks:["@ai-sdk/xai"],envStems:["XAI","GROK"]},hosts:[{host:"api.x.ai"}],archetype:"generative",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resourcesUnreachable:{language_model:"the vendor catalog",model:"the vendor catalog"},resources:["deferred_completion","language_model","model","oauth_account","oauth_device_authorization","oauth_usage"],serveExport:"createXaiTwinServer"},xidentity:{adoption:{pypi:[],sdks:["@xdevplatform/xdk","twitter-api-sdk"],scopes:["@xdevplatform/"],envStems:["X","TWITTER"]},hosts:[{host:"x.com",pathPattern:"^/i/oauth2/authorize/?$|^/_twin/"},{host:"twitter.com",pathPattern:"^/i/oauth2/authorize/?$|^/_twin/"},{host:"api.x.com",pathPattern:"^/2/(?:oauth2/(?:token|revoke)|users/me)/?$|^/oauth/(?:request_token|authorize|authenticate|access_token)/?$|^/1\\.1/oauth/invalidate_token(?:\\.json)?/?$|^/_twin/assets/consent\\.(?:js|css)$"},{host:"api.twitter.com",pathPattern:"^/2/(?:oauth2/(?:token|revoke)|users/me)/?$|^/oauth/(?:request_token|authorize|authenticate|access_token)/?$|^/1\\.1/oauth/invalidate_token(?:\\.json)?/?$|^/_twin/assets/consent\\.(?:js|css)$"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["oauth_client","account","session","auth_request","grant","rate_window","oauth1_app","oauth1_token","oauth1_grant","_authorization_code","_access_token","_refresh_token","_oauth1_request_token","_client_secret","_code_challenge"],serveExport:"createXIdentityTwinServer"},youtube:{adoption:{pypi:[],sdks:["@googleapis/youtube"],envStems:["YOUTUBE"]},hosts:[{host:"youtube.googleapis.com"},{host:"www.googleapis.com",pathPattern:"^/(upload/)?youtube/v3(/|$)"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["channel","video","playlist","playlistItem"],serveExport:"createYouTubeTwinServer"}},undeclared:[]}});var NK=eU((mJ0,Dc)=>{var Qo=($)=>typeof $==="string"&&(/^\/(o\/oauth2\/v2\/auth(\/oauthchooseaccount)?|o\/oauth2\/auth|o\/oauth2\/token|signin\/oauth\/error|\.well-known\/openid-configuration)\/?$/.test($)||/^\/_twin\//.test($)),zo=($)=>typeof $==="string"&&/^\/(token|oauth2\/v4\/token|revoke|tokeninfo|device\/code)\/?$/.test($),Zo=($)=>typeof $==="string"&&/^\/(oauth2\/(v1\/certs|v3\/(certs|userinfo)|v2\/userinfo)|userinfo\/v2\/me)\/?$/.test($),AG={googleoauth:($,_)=>$==="accounts.google.com"&&(_===void 0||Qo(_))||$==="oauth2.googleapis.com"&&(_===void 0||zo(_))||$==="www.googleapis.com"&&(_===void 0||Zo(_))||$==="openidconnect.googleapis.com",googlefavicon:($)=>$==="www.google.com"||$==="google.com"||$==="t2.gstatic.com",browserassets:($)=>$==="cdnjs.cloudflare.com"||$==="www.googletagmanager.com"||$==="www.google-analytics.com"||$==="connect.facebook.net"||$==="snap.licdn.com"||$==="px.ads.linkedin.com"||$==="static.hotjar.com"||$==="fonts.googleapis.com"||$==="fonts.gstatic.com"||$==="api.fontshare.com"||$==="images.subscribe.dev"||$==="www.youtube.com"||$==="www.youtube-nocookie.com"||$==="i.ytimg.com"};{let{packs:$}=Lc();for(let _ of Object.keys($)){let I=$[_].hosts;if(!I||I.length===0)continue;if(AG[_])throw Error(`inject: vendor "${_}" declares hosts on its pack descriptor AND in the hand VENDOR_HOSTS table — one home per fact; delete the hand entry.`);let J=new Map;for(let j of I){let G=j.key===void 0?_:j.key;if(!J.has(G))J.set(G,[]);J.get(G).push(j)}for(let[j,G]of J){if(AG[j])throw Error(`inject: key "${j}" (pack ${_}) is declared twice — on this descriptor and in the hand VENDOR_HOSTS table or another pack's descriptor; a key has one home.`);let X=(F)=>{if(["host","suffix","hostPattern"].filter((S)=>F[S]!==void 0).length!==1)throw Error(`inject: key "${j}" (pack ${_}) rule ${JSON.stringify(F)} — exactly one of host | suffix | hostPattern (pack-facts.json is hand-edited or stale)`);let D=F.hostPattern===void 0?null:new RegExp(F.hostPattern),q=F.pathPattern===void 0?null:new RegExp(F.pathPattern);return(S,k)=>(F.host!==void 0?S===F.host:F.suffix!==void 0?S.endsWith(F.suffix):D.test(S))&&(q===null||k===void 0||q.test(k))},W=G.filter((F)=>F.exclude!==!0).map(X),T=G.filter((F)=>F.exclude===!0).map(X);AG[j]=(F,E)=>W.some((D)=>D(F,E))&&!T.some((D)=>D(F,E))}}}function Oo($){let _=String($||"").toLowerCase().replace(/\.$/,"");return Object.keys(AG).some((I)=>AG[I](_))}function Lo($){let _=String($||"").toLowerCase().replace(/\.$/,"");return Object.keys(AG).filter((I)=>AG[I](_))}function Wc($){return String($).toUpperCase().replace(/[^A-Z0-9]/g,"_")}function Wo($){let _={};for(let I of Object.keys(AG)){let J=$[`${Wc(I)}_TWIN_URL`];if(J)_[I]=J.replace(/\/$/,"")}if($.TWIN_INJECT)for(let I of String($.TWIN_INJECT).split(",")){let J=I.indexOf("=");if(J<=0)continue;let j=I.slice(0,J).trim(),G=I.slice(J+1).trim();if(j&&G&&Object.hasOwn(AG,j))_[j]=G.replace(/\/$/,"")}return _}Dc.exports={VENDOR_HOSTS:AG,isVendorHost:Oo,vendorsOfHost:Lo,twinEnvStem:Wc,twinOrigins:Wo}});var Fc={};_j(Fc,{validateHeaderValue:()=>yo,validateHeaderName:()=>fo,setMaxIdleHTTPParsers:()=>xo,request:()=>co,maxHeaderSize:()=>ko,globalAgent:()=>So,get:()=>Bo,default:()=>bo,createServer:()=>No,ServerResponse:()=>wo,Server:()=>Co,STATUS_CODES:()=>go,OutgoingMessage:()=>qo,METHODS:()=>Po,IncomingMessage:()=>Ro,ClientRequest:()=>To,Agent:()=>Vo});var Do,Ko,Kc,Ho,Fo,Ao=($,_,I)=>{I=$!=null?Do(Ko($)):{};let J=_||!$||!$.__esModule?Kc(I,"default",{value:$,enumerable:!0}):I;for(let j of Ho($))if(!Fo.call(J,j))Kc(J,j,{get:()=>$[j],enumerable:!0});return J},Mo=($,_)=>()=>(_||$((_={exports:{}}).exports,_),_.exports),Eo,Hc,Vo,To,Ro,Po,qo,go,Co,wo,No,Bo,So,ko,co,xo,fo,yo,bo;var Ac=GX(()=>{Do=Object.create,{getPrototypeOf:Ko,defineProperty:Kc,getOwnPropertyNames:Ho}=Object,Fo=Object.prototype.hasOwnProperty,Eo=Mo(($,_)=>{var I=(SL(),X1(wK)),J=(MP(),X1(AP)),j=$;for(G in I)if(I.hasOwnProperty(G))j[G]=I[G];var G;j.request=function(W,T){return W=X(W),I.request.call(this,W,T)},j.get=function(W,T){return W=X(W),I.get.call(this,W,T)};function X(W){if(typeof W==="string")W=J.parse(W);if(!W.protocol)W.protocol="https:";if(W.protocol!=="https:")throw Error('Protocol "'+W.protocol+'" not supported. Expected "https:"');return W}}),Hc=Ao(Eo(),1),{Agent:Vo,ClientRequest:To,IncomingMessage:Ro,METHODS:Po,OutgoingMessage:qo,STATUS_CODES:go,Server:Co,ServerResponse:wo,createServer:No,get:Bo,globalAgent:So,maxHeaderSize:ko,request:co,setMaxIdleHTTPParsers:xo,validateHeaderName:fo,validateHeaderValue:yo}=Hc,bo=Hc});var xP={};_j(xP,{throws:()=>vs,strictEqual:()=>$s,strict:()=>ea,rejects:()=>sa,ok:()=>aa,notStrictEqual:()=>oa,notEqual:()=>ta,notDeepStrictEqual:()=>ra,notDeepEqual:()=>da,match:()=>la,ifError:()=>pa,fail:()=>ia,equal:()=>na,doesNotThrow:()=>ua,doesNotReject:()=>ma,doesNotMatch:()=>ha,default:()=>_s,deepStrictEqual:()=>ba,deepEqual:()=>ya,CallTracker:()=>fa,AssertionError:()=>xa});var ho,mo,Mc,uo,no,io=($,_,I)=>{I=$!=null?ho(mo($)):{};let J=_||!$||!$.__esModule?Mc(I,"default",{value:$,enumerable:!0}):I;for(let j of uo($))if(!no.call(J,j))Mc(J,j,{get:()=>$[j],enumerable:!0});return J},t$=($,_)=>()=>(_||$((_={exports:{}}).exports,_),_.exports),gP,BK,CP,po,lo,ro,to,Ec,cL,oo,ao,so,eo,$a,va,_a,ja,Ua,Ia,vO,SK,Xa,Vc,Tc,Ga,xL,wP,NP,Ya,Rc,BP,Ja,SP,Pc,kP,_O,Qa,za,Za,Oa,La,Wa,Da,Ka,Ha,qc,gc,Fa,Aa,kK,Cc,Ma,Ea,Va,Ta,Ra,kL,wc,Pa,Nc,qa,Bc,ga,Ca,Sc,cP,wa,cK,Na,Ba,kc,cc,Sa,ka,ca,qP,xc,xa,fa,ya,ba,ha,ma,ua,na,ia,pa,la,da,ra,ta,oa,aa,sa,ea,$s,vs,_s;var fP=GX(()=>{ho=Object.create,{getPrototypeOf:mo,defineProperty:Mc,getOwnPropertyNames:uo}=Object,no=Object.prototype.hasOwnProperty,gP=t$(($,_)=>{_.exports=function(){if(typeof Symbol!=="function"||typeof Object.getOwnPropertySymbols!=="function")return!1;if(typeof Symbol.iterator==="symbol")return!0;var I={},J=Symbol("test"),j=Object(J);if(typeof J==="string")return!1;if(Object.prototype.toString.call(J)!=="[object Symbol]")return!1;if(Object.prototype.toString.call(j)!=="[object Symbol]")return!1;var G=42;I[J]=G;for(var X in I)return!1;if(typeof Object.keys==="function"&&Object.keys(I).length!==0)return!1;if(typeof Object.getOwnPropertyNames==="function"&&Object.getOwnPropertyNames(I).length!==0)return!1;var W=Object.getOwnPropertySymbols(I);if(W.length!==1||W[0]!==J)return!1;if(!Object.prototype.propertyIsEnumerable.call(I,J))return!1;if(typeof Object.getOwnPropertyDescriptor==="function"){var T=Object.getOwnPropertyDescriptor(I,J);if(T.value!==G||T.enumerable!==!0)return!1}return!0}}),BK=t$(($,_)=>{var I=gP();_.exports=function(){return I()&&!!Symbol.toStringTag}}),CP=t$(($,_)=>{_.exports=Object}),po=t$(($,_)=>{_.exports=Error}),lo=t$(($,_)=>{_.exports=EvalError}),ro=t$(($,_)=>{_.exports=RangeError}),to=t$(($,_)=>{_.exports=ReferenceError}),Ec=t$(($,_)=>{_.exports=SyntaxError}),cL=t$(($,_)=>{_.exports=TypeError}),oo=t$(($,_)=>{_.exports=URIError}),ao=t$(($,_)=>{_.exports=Math.abs}),so=t$(($,_)=>{_.exports=Math.floor}),eo=t$(($,_)=>{_.exports=Math.max}),$a=t$(($,_)=>{_.exports=Math.min}),va=t$(($,_)=>{_.exports=Math.pow}),_a=t$(($,_)=>{_.exports=Math.round}),ja=t$(($,_)=>{_.exports=Number.isNaN||function(I){return I!==I}}),Ua=t$(($,_)=>{var I=ja();_.exports=function(J){if(I(J)||J===0)return J;return J<0?-1:1}}),Ia=t$(($,_)=>{_.exports=Object.getOwnPropertyDescriptor}),vO=t$(($,_)=>{var I=Ia();if(I)try{I([],"length")}catch(J){I=null}_.exports=I}),SK=t$(($,_)=>{var I=Object.defineProperty||!1;if(I)try{I({},"a",{value:1})}catch(J){I=!1}_.exports=I}),Xa=t$(($,_)=>{var I=typeof Symbol<"u"&&Symbol,J=gP();_.exports=function(){if(typeof I!=="function")return!1;if(typeof Symbol!=="function")return!1;if(typeof I("foo")!=="symbol")return!1;if(typeof Symbol("bar")!=="symbol")return!1;return J()}}),Vc=t$(($,_)=>{_.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null}),Tc=t$(($,_)=>{var I=CP();_.exports=I.getPrototypeOf||null}),Ga=t$(($,_)=>{var I="Function.prototype.bind called on incompatible ",J=Object.prototype.toString,j=Math.max,G="[object Function]",X=function(F,E){var D=[];for(var q=0;q<F.length;q+=1)D[q]=F[q];for(var S=0;S<E.length;S+=1)D[S+F.length]=E[S];return D},W=function(F,E){var D=[];for(var q=E||0,S=0;q<F.length;q+=1,S+=1)D[S]=F[q];return D},T=function(F,E){var D="";for(var q=0;q<F.length;q+=1)if(D+=F[q],q+1<F.length)D+=E;return D};_.exports=function(F){var E=this;if(typeof E!=="function"||J.apply(E)!==G)throw TypeError(I+E);var D=W(arguments,1),q,S=function(){if(this instanceof q){var h=E.apply(this,X(D,arguments));if(Object(h)===h)return h;return this}return E.apply(F,X(D,arguments))},k=j(0,E.length-D.length),y=[];for(var m=0;m<k;m++)y[m]="$"+m;if(q=Function("binder","return function ("+T(y,",")+"){ return binder.apply(this,arguments); }")(S),E.prototype){var n=function(){};n.prototype=E.prototype,q.prototype=new n,n.prototype=null}return q}}),xL=t$(($,_)=>{var I=Ga();_.exports=Function.prototype.bind||I}),wP=t$(($,_)=>{_.exports=Function.prototype.call}),NP=t$(($,_)=>{_.exports=Function.prototype.apply}),Ya=t$(($,_)=>{_.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply}),Rc=t$(($,_)=>{var I=xL(),J=NP(),j=wP(),G=Ya();_.exports=G||I.call(j,J)}),BP=t$(($,_)=>{var I=xL(),J=cL(),j=wP(),G=Rc();_.exports=function(X){if(X.length<1||typeof X[0]!=="function")throw new J("a function is required");return G(I,j,X)}}),Ja=t$(($,_)=>{var I=BP(),J=vO(),j;try{j=[].__proto__===Array.prototype}catch(T){if(!T||typeof T!=="object"||!("code"in T)||T.code!=="ERR_PROTO_ACCESS")throw T}var G=!!j&&J&&J(Object.prototype,"__proto__"),X=Object,W=X.getPrototypeOf;_.exports=G&&typeof G.get==="function"?I([G.get]):typeof W==="function"?function(T){return W(T==null?T:X(T))}:!1}),SP=t$(($,_)=>{var I=Vc(),J=Tc(),j=Ja();_.exports=I?function(G){return I(G)}:J?function(G){if(!G||typeof G!=="object"&&typeof G!=="function")throw TypeError("getProto: not an object");return J(G)}:j?function(G){return j(G)}:null}),Pc=t$(($,_)=>{var I=Function.prototype.call,J=Object.prototype.hasOwnProperty,j=xL();_.exports=j.call(I,J)}),kP=t$(($,_)=>{var I,J=CP(),j=po(),G=lo(),X=ro(),W=to(),T=Ec(),F=cL(),E=oo(),D=ao(),q=so(),S=eo(),k=$a(),y=va(),m=_a(),n=Ua(),h=Function,i=function(G0){try{return h('"use strict"; return ('+G0+").constructor;")()}catch(K0){}},s=vO(),j0=SK(),I0=function(){throw new F},H0=s?function(){try{return arguments.callee,I0}catch(G0){try{return s(arguments,"callee").get}catch(K0){return I0}}}():I0,L0=Xa()(),R0=SP(),U0=Tc(),c0=Vc(),Y=NP(),O=wP(),H={},Z=typeof Uint8Array>"u"||!R0?I:R0(Uint8Array),K={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?I:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?I:ArrayBuffer,"%ArrayIteratorPrototype%":L0&&R0?R0([][Symbol.iterator]()):I,"%AsyncFromSyncIteratorPrototype%":I,"%AsyncFunction%":H,"%AsyncGenerator%":H,"%AsyncGeneratorFunction%":H,"%AsyncIteratorPrototype%":H,"%Atomics%":typeof Atomics>"u"?I:Atomics,"%BigInt%":typeof BigInt>"u"?I:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?I:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?I:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?I:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":j,"%eval%":eval,"%EvalError%":G,"%Float16Array%":typeof Float16Array>"u"?I:Float16Array,"%Float32Array%":typeof Float32Array>"u"?I:Float32Array,"%Float64Array%":typeof Float64Array>"u"?I:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?I:FinalizationRegistry,"%Function%":h,"%GeneratorFunction%":H,"%Int8Array%":typeof Int8Array>"u"?I:Int8Array,"%Int16Array%":typeof Int16Array>"u"?I:Int16Array,"%Int32Array%":typeof Int32Array>"u"?I:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":L0&&R0?R0(R0([][Symbol.iterator]())):I,"%JSON%":typeof JSON==="object"?JSON:I,"%Map%":typeof Map>"u"?I:Map,"%MapIteratorPrototype%":typeof Map>"u"||!L0||!R0?I:R0(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":J,"%Object.getOwnPropertyDescriptor%":s,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?I:Promise,"%Proxy%":typeof Proxy>"u"?I:Proxy,"%RangeError%":X,"%ReferenceError%":W,"%Reflect%":typeof Reflect>"u"?I:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?I:Set,"%SetIteratorPrototype%":typeof Set>"u"||!L0||!R0?I:R0(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?I:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":L0&&R0?R0(""[Symbol.iterator]()):I,"%Symbol%":L0?Symbol:I,"%SyntaxError%":T,"%ThrowTypeError%":H0,"%TypedArray%":Z,"%TypeError%":F,"%Uint8Array%":typeof Uint8Array>"u"?I:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?I:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?I:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?I:Uint32Array,"%URIError%":E,"%WeakMap%":typeof WeakMap>"u"?I:WeakMap,"%WeakRef%":typeof WeakRef>"u"?I:WeakRef,"%WeakSet%":typeof WeakSet>"u"?I:WeakSet,"%Function.prototype.call%":O,"%Function.prototype.apply%":Y,"%Object.defineProperty%":j0,"%Object.getPrototypeOf%":U0,"%Math.abs%":D,"%Math.floor%":q,"%Math.max%":S,"%Math.min%":k,"%Math.pow%":y,"%Math.round%":m,"%Math.sign%":n,"%Reflect.getPrototypeOf%":c0};if(R0)try{null.error}catch(G0){w=R0(R0(G0)),K["%Error.prototype%"]=w}var w,B=function G0(K0){var q0;if(K0==="%AsyncFunction%")q0=i("async function () {}");else if(K0==="%GeneratorFunction%")q0=i("function* () {}");else if(K0==="%AsyncGeneratorFunction%")q0=i("async function* () {}");else if(K0==="%AsyncGenerator%"){var z0=G0("%AsyncGeneratorFunction%");if(z0)q0=z0.prototype}else if(K0==="%AsyncIteratorPrototype%"){var a=G0("%AsyncGenerator%");if(a&&R0)q0=R0(a.prototype)}return K[K0]=q0,q0},P={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},z=xL(),A=Pc(),f=z.call(O,Array.prototype.concat),c=z.call(Y,Array.prototype.splice),p=z.call(O,String.prototype.replace),Q0=z.call(O,String.prototype.slice),F0=z.call(O,RegExp.prototype.exec),P0=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,E0=/\\(\\)?/g,_0=function(G0){var K0=Q0(G0,0,1),q0=Q0(G0,-1);if(K0==="%"&&q0!=="%")throw new T("invalid intrinsic syntax, expected closing `%`");else if(q0==="%"&&K0!=="%")throw new T("invalid intrinsic syntax, expected opening `%`");var z0=[];return p(G0,P0,function(a,J0,y0,N0){z0[z0.length]=y0?p(N0,E0,"$1"):J0||a}),z0},$0=function(G0,K0){var q0=G0,z0;if(A(P,q0))z0=P[q0],q0="%"+z0[0]+"%";if(A(K,q0)){var a=K[q0];if(a===H)a=B(q0);if(typeof a>"u"&&!K0)throw new F("intrinsic "+G0+" exists, but is not available. Please file an issue!");return{alias:z0,name:q0,value:a}}throw new T("intrinsic "+G0+" does not exist!")};_.exports=function(G0,K0){if(typeof G0!=="string"||G0.length===0)throw new F("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof K0!=="boolean")throw new F('"allowMissing" argument must be a boolean');if(F0(/^%?[^%]*%?$/,G0)===null)throw new T("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var q0=_0(G0),z0=q0.length>0?q0[0]:"",a=$0("%"+z0+"%",K0),J0=a.name,y0=a.value,N0=!1,A0=a.alias;if(A0)z0=A0[0],c(q0,f([0,1],A0));for(var $$=1,w0=!0;$$<q0.length;$$+=1){var h0=q0[$$],H$=Q0(h0,0,1),p0=Q0(h0,-1);if((H$==='"'||H$==="'"||H$==="`"||(p0==='"'||p0==="'"||p0==="`"))&&H$!==p0)throw new T("property names with quotes must have matching quotes");if(h0==="constructor"||!w0)N0=!0;if(z0+="."+h0,J0="%"+z0+"%",A(K,J0))y0=K[J0];else if(y0!=null){if(!(h0 in y0)){if(!K0)throw new F("base intrinsic for "+G0+" exists, but the property is not available.");return}if(s&&$$+1>=q0.length){var j$=s(y0,h0);if(w0=!!j$,w0&&"get"in j$&&!("originalValue"in j$.get))y0=j$.get;else y0=y0[h0]}else w0=A(y0,h0),y0=y0[h0];if(w0&&!N0)K[J0]=y0}}return y0}}),_O=t$(($,_)=>{var I=kP(),J=BP(),j=J([I("%String.prototype.indexOf%")]);_.exports=function(G,X){var W=I(G,!!X);if(typeof W==="function"&&j(G,".prototype.")>-1)return J([W]);return W}}),Qa=t$(($,_)=>{var I=BK()(),J=_O(),j=J("Object.prototype.toString"),G=function(T){if(I&&T&&typeof T==="object"&&Symbol.toStringTag in T)return!1;return j(T)==="[object Arguments]"},X=function(T){if(G(T))return!0;return T!==null&&typeof T==="object"&&"length"in T&&typeof T.length==="number"&&T.length>=0&&j(T)!=="[object Array]"&&"callee"in T&&j(T.callee)==="[object Function]"},W=function(){return G(arguments)}();G.isLegacyArguments=X,_.exports=W?G:X}),za=t$(($,_)=>{var I=_O(),J=BK()(),j=Pc(),G=vO(),X;if(J){if(W=I("RegExp.prototype.exec"),T={},F=function(){throw T},E={toString:F,valueOf:F},typeof Symbol.toPrimitive==="symbol")E[Symbol.toPrimitive]=F;X=function(S){if(!S||typeof S!=="object")return!1;var k=G(S,"lastIndex"),y=k&&j(k,"value");if(!y)return!1;try{W(S,E)}catch(m){return m===T}}}else D=I("Object.prototype.toString"),q="[object RegExp]",X=function(S){if(!S||typeof S!=="object"&&typeof S!=="function")return!1;return D(S)===q};var W,T,F,E,D,q;_.exports=X}),Za=t$(($,_)=>{var I=_O(),J=za(),j=I("RegExp.prototype.exec"),G=cL();_.exports=function(X){if(!J(X))throw new G("`regex` must be a RegExp");return function(W){return j(X,W)!==null}}}),Oa=t$(($,_)=>{var I=function*(){}.constructor;_.exports=()=>I}),La=t$(($,_)=>{var I=_O(),J=Za(),j=J(/^\s*(?:function)?\*/),G=BK()(),X=SP(),W=I("Object.prototype.toString"),T=I("Function.prototype.toString"),F=Oa();_.exports=function(E){if(typeof E!=="function")return!1;if(j(T(E)))return!0;if(!G){var D=W(E);return D==="[object GeneratorFunction]"}if(!X)return!1;var q=F();return q&&X(E)===q.prototype}}),Wa=t$(($,_)=>{var I=Function.prototype.toString,J=typeof Reflect==="object"&&Reflect!==null&&Reflect.apply,j,G;if(typeof J==="function"&&typeof Object.defineProperty==="function")try{j=Object.defineProperty({},"length",{get:function(){throw G}}),G={},J(function(){throw 42},null,j)}catch(s){if(s!==G)J=null}else J=null;var X=/^\s*class\b/,W=function(s){try{var j0=I.call(s);return X.test(j0)}catch(I0){return!1}},T=function(s){try{if(W(s))return!1;return I.call(s),!0}catch(j0){return!1}},F=Object.prototype.toString,E="[object Object]",D="[object Function]",q="[object GeneratorFunction]",S="[object HTMLAllCollection]",k="[object HTML document.all class]",y="[object HTMLCollection]",m=typeof Symbol==="function"&&!!Symbol.toStringTag,n=!(0 in[,]),h=function(){return!1};if(typeof document==="object"){if(i=document.all,F.call(i)===F.call(document.all))h=function(s){if((n||!s)&&(typeof s>"u"||typeof s==="object"))try{var j0=F.call(s);return(j0===S||j0===k||j0===y||j0===E)&&s("")==null}catch(I0){}return!1}}var i;_.exports=J?function(s){if(h(s))return!0;if(!s)return!1;if(typeof s!=="function"&&typeof s!=="object")return!1;try{J(s,null,j)}catch(j0){if(j0!==G)return!1}return!W(s)&&T(s)}:function(s){if(h(s))return!0;if(!s)return!1;if(typeof s!=="function"&&typeof s!=="object")return!1;if(m)return T(s);if(W(s))return!1;var j0=F.call(s);if(j0!==D&&j0!==q&&!/^\[object HTML/.test(j0))return!1;return T(s)}}),Da=t$(($,_)=>{var I=Wa(),J=Object.prototype.toString,j=Object.prototype.hasOwnProperty,G=function(F,E,D){for(var q=0,S=F.length;q<S;q++)if(j.call(F,q))if(D==null)E(F[q],q,F);else E.call(D,F[q],q,F)},X=function(F,E,D){for(var q=0,S=F.length;q<S;q++)if(D==null)E(F.charAt(q),q,F);else E.call(D,F.charAt(q),q,F)},W=function(F,E,D){for(var q in F)if(j.call(F,q))if(D==null)E(F[q],q,F);else E.call(D,F[q],q,F)};function T(F){return J.call(F)==="[object Array]"}_.exports=function(F,E,D){if(!I(E))throw TypeError("iterator must be a function");var q;if(arguments.length>=3)q=D;if(T(F))G(F,E,q);else if(typeof F==="string")X(F,E,q);else W(F,E,q)}}),Ka=t$(($,_)=>{_.exports=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]}),Ha=t$(($,_)=>{var I=Ka(),J=typeof globalThis>"u"?globalThis:globalThis;_.exports=function(){var j=[];for(var G=0;G<I.length;G++)if(typeof J[I[G]]==="function")j[j.length]=I[G];return j}}),qc=t$(($,_)=>{var I=SK(),J=Ec(),j=cL(),G=vO();_.exports=function(X,W,T){if(!X||typeof X!=="object"&&typeof X!=="function")throw new j("`obj` must be an object or a function`");if(typeof W!=="string"&&typeof W!=="symbol")throw new j("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!=="boolean"&&arguments[3]!==null)throw new j("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!=="boolean"&&arguments[4]!==null)throw new j("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!=="boolean"&&arguments[5]!==null)throw new j("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!=="boolean")throw new j("`loose`, if provided, must be a boolean");var F=arguments.length>3?arguments[3]:null,E=arguments.length>4?arguments[4]:null,D=arguments.length>5?arguments[5]:null,q=arguments.length>6?arguments[6]:!1,S=!!G&&G(X,W);if(I)I(X,W,{configurable:D===null&&S?S.configurable:!D,enumerable:F===null&&S?S.enumerable:!F,value:T,writable:E===null&&S?S.writable:!E});else if(q||!F&&!E&&!D)X[W]=T;else throw new J("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}}),gc=t$(($,_)=>{var I=SK(),J=function(){return!!I};J.hasArrayLengthDefineBug=function(){if(!I)return null;try{return I([],"length",{value:1}).length!==1}catch(j){return!0}},_.exports=J}),Fa=t$(($,_)=>{var I=kP(),J=qc(),j=gc()(),G=vO(),X=cL(),W=I("%Math.floor%");_.exports=function(T,F){if(typeof T!=="function")throw new X("`fn` is not a function");if(typeof F!=="number"||F<0||F>4294967295||W(F)!==F)throw new X("`length` must be a positive 32-bit integer");var E=arguments.length>2&&!!arguments[2],D=!0,q=!0;if("length"in T&&G){var S=G(T,"length");if(S&&!S.configurable)D=!1;if(S&&!S.writable)q=!1}if(D||q||!E)if(j)J(T,"length",F,!0,!0);else J(T,"length",F);return T}}),Aa=t$(($,_)=>{var I=xL(),J=NP(),j=Rc();_.exports=function(){return j(I,J,arguments)}}),kK=t$(($,_)=>{var I=Fa(),J=SK(),j=BP(),G=Aa();if(_.exports=function(X){var W=j(arguments),T=X.length-(arguments.length-1);return I(W,1+(T>0?T:0),!0)},J)J(_.exports,"apply",{value:G});else _.exports.apply=G}),Cc=t$(($,_)=>{var I=Da(),J=Ha(),j=kK(),G=_O(),X=vO(),W=SP(),T=G("Object.prototype.toString"),F=BK()(),E=typeof globalThis>"u"?globalThis:globalThis,D=J(),q=G("String.prototype.slice"),S=G("Array.prototype.indexOf",!0)||function(n,h){for(var i=0;i<n.length;i+=1)if(n[i]===h)return i;return-1},k={__proto__:null};if(F&&X&&W)I(D,function(n){var h=new E[n];if(Symbol.toStringTag in h&&W){var i=W(h),s=X(i,Symbol.toStringTag);if(!s&&i){var j0=W(i);s=X(j0,Symbol.toStringTag)}k["$"+n]=j(s.get)}});else I(D,function(n){var h=new E[n],i=h.slice||h.set;if(i)k["$"+n]=j(i)});var y=function(n){var h=!1;return I(k,function(i,s){if(!h)try{if("$"+i(n)===s)h=q(s,1)}catch(j0){}}),h},m=function(n){var h=!1;return I(k,function(i,s){if(!h)try{i(n),h=q(s,1)}catch(j0){}}),h};_.exports=function(n){if(!n||typeof n!=="object")return!1;if(!F){var h=q(T(n),8,-1);if(S(D,h)>-1)return h;if(h!=="Object")return!1;return m(n)}if(!X)return null;return y(n)}}),Ma=t$(($,_)=>{var I=Cc();_.exports=function(J){return!!I(J)}}),Ea=t$(($)=>{var _=Qa(),I=La(),J=Cc(),j=Ma();function G(A0){return A0.call.bind(A0)}var X=typeof BigInt<"u",W=typeof Symbol<"u",T=G(Object.prototype.toString),F=G(Number.prototype.valueOf),E=G(String.prototype.valueOf),D=G(Boolean.prototype.valueOf);if(X)q=G(BigInt.prototype.valueOf);var q;if(W)S=G(Symbol.prototype.valueOf);var S;function k(A0,$$){if(typeof A0!=="object")return!1;try{return $$(A0),!0}catch(w0){return!1}}$.isArgumentsObject=_,$.isGeneratorFunction=I,$.isTypedArray=j;function y(A0){return typeof Promise<"u"&&A0 instanceof Promise||A0!==null&&typeof A0==="object"&&typeof A0.then==="function"&&typeof A0.catch==="function"}$.isPromise=y;function m(A0){if(typeof ArrayBuffer<"u"&&ArrayBuffer.isView)return ArrayBuffer.isView(A0);return j(A0)||c(A0)}$.isArrayBufferView=m;function n(A0){return J(A0)==="Uint8Array"}$.isUint8Array=n;function h(A0){return J(A0)==="Uint8ClampedArray"}$.isUint8ClampedArray=h;function i(A0){return J(A0)==="Uint16Array"}$.isUint16Array=i;function s(A0){return J(A0)==="Uint32Array"}$.isUint32Array=s;function j0(A0){return J(A0)==="Int8Array"}$.isInt8Array=j0;function I0(A0){return J(A0)==="Int16Array"}$.isInt16Array=I0;function H0(A0){return J(A0)==="Int32Array"}$.isInt32Array=H0;function L0(A0){return J(A0)==="Float32Array"}$.isFloat32Array=L0;function R0(A0){return J(A0)==="Float64Array"}$.isFloat64Array=R0;function U0(A0){return J(A0)==="BigInt64Array"}$.isBigInt64Array=U0;function c0(A0){return J(A0)==="BigUint64Array"}$.isBigUint64Array=c0;function Y(A0){return T(A0)==="[object Map]"}Y.working=typeof Map<"u"&&Y(new Map);function O(A0){if(typeof Map>"u")return!1;return Y.working?Y(A0):A0 instanceof Map}$.isMap=O;function H(A0){return T(A0)==="[object Set]"}H.working=typeof Set<"u"&&H(new Set);function Z(A0){if(typeof Set>"u")return!1;return H.working?H(A0):A0 instanceof Set}$.isSet=Z;function K(A0){return T(A0)==="[object WeakMap]"}K.working=typeof WeakMap<"u"&&K(new WeakMap);function w(A0){if(typeof WeakMap>"u")return!1;return K.working?K(A0):A0 instanceof WeakMap}$.isWeakMap=w;function B(A0){return T(A0)==="[object WeakSet]"}B.working=typeof WeakSet<"u"&&B(new WeakSet);function P(A0){return B(A0)}$.isWeakSet=P;function z(A0){return T(A0)==="[object ArrayBuffer]"}z.working=typeof ArrayBuffer<"u"&&z(new ArrayBuffer);function A(A0){if(typeof ArrayBuffer>"u")return!1;return z.working?z(A0):A0 instanceof ArrayBuffer}$.isArrayBuffer=A;function f(A0){return T(A0)==="[object DataView]"}f.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&f(new DataView(new ArrayBuffer(1),0,1));function c(A0){if(typeof DataView>"u")return!1;return f.working?f(A0):A0 instanceof DataView}$.isDataView=c;var p=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function Q0(A0){return T(A0)==="[object SharedArrayBuffer]"}function F0(A0){if(typeof p>"u")return!1;if(typeof Q0.working>"u")Q0.working=Q0(new p);return Q0.working?Q0(A0):A0 instanceof p}$.isSharedArrayBuffer=F0;function P0(A0){return T(A0)==="[object AsyncFunction]"}$.isAsyncFunction=P0;function E0(A0){return T(A0)==="[object Map Iterator]"}$.isMapIterator=E0;function _0(A0){return T(A0)==="[object Set Iterator]"}$.isSetIterator=_0;function $0(A0){return T(A0)==="[object Generator]"}$.isGeneratorObject=$0;function G0(A0){return T(A0)==="[object WebAssembly.Module]"}$.isWebAssemblyCompiledModule=G0;function K0(A0){return k(A0,F)}$.isNumberObject=K0;function q0(A0){return k(A0,E)}$.isStringObject=q0;function z0(A0){return k(A0,D)}$.isBooleanObject=z0;function a(A0){return X&&k(A0,q)}$.isBigIntObject=a;function J0(A0){return W&&k(A0,S)}$.isSymbolObject=J0;function y0(A0){return K0(A0)||q0(A0)||z0(A0)||a(A0)||J0(A0)}$.isBoxedPrimitive=y0;function N0(A0){return typeof Uint8Array<"u"&&(A(A0)||F0(A0))}$.isAnyArrayBuffer=N0,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(A0){Object.defineProperty($,A0,{enumerable:!1,value:function(){throw Error(A0+" is not supported in userland")}})})}),Va=t$(($,_)=>{_.exports=function(I){return I instanceof Buffer}}),Ta=t$(($,_)=>{if(typeof Object.create==="function")_.exports=function(I,J){if(J)I.super_=J,I.prototype=Object.create(J.prototype,{constructor:{value:I,enumerable:!1,writable:!0,configurable:!0}})};else _.exports=function(I,J){if(J){I.super_=J;var j=function(){};j.prototype=J.prototype,I.prototype=new j,I.prototype.constructor=I}}}),Ra=t$(($,_)=>{try{if(I=(pJ(),X1(iJ)),typeof I.inherits!=="function")throw"";_.exports=I.inherits}catch(J){_.exports=Ta()}var I}),kL=t$(($)=>{var _=Object.getOwnPropertyDescriptors||function(A){var f=Object.keys(A),c={};for(var p=0;p<f.length;p++)c[f[p]]=Object.getOwnPropertyDescriptor(A,f[p]);return c},I=/%[sdj%]/g;$.format=function(A){if(!s(A)){var f=[];for(var c=0;c<arguments.length;c++)f.push(G(arguments[c]));return f.join(" ")}var c=1,p=arguments,Q0=p.length,F0=String(A).replace(I,function(E0){if(E0==="%%")return"%";if(c>=Q0)return E0;switch(E0){case"%s":return String(p[c++]);case"%d":return Number(p[c++]);case"%j":try{return JSON.stringify(p[c++])}catch(_0){return"[Circular]"}default:return E0}});for(var P0=p[c];c<Q0;P0=p[++c])if(n(P0)||!L0(P0))F0+=" "+P0;else F0+=" "+G(P0);return F0},$.deprecate=function(A,f){if(typeof process<"u"&&process.noDeprecation===!0)return A;if(typeof process>"u")return function(){return $.deprecate(A,f).apply(this,arguments)};var c=!1;function p(){if(!c){if(process.throwDeprecation)throw Error(f);else if(process.traceDeprecation)console.trace(f);else console.error(f);c=!0}return A.apply(this,arguments)}return p};var J={},j=/^$/;$.debuglog=function(A){if(A=A.toUpperCase(),!J[A])if(j.test(A)){var f=process.pid;J[A]=function(){var c=$.format.apply($,arguments);console.error("%s %d: %s",A,f,c)}}else J[A]=function(){};return J[A]};function G(A,f){var c={seen:[],stylize:W};if(arguments.length>=3)c.depth=arguments[2];if(arguments.length>=4)c.colors=arguments[3];if(m(f))c.showHidden=f;else if(f)$._extend(c,f);if(I0(c.showHidden))c.showHidden=!1;if(I0(c.depth))c.depth=2;if(I0(c.colors))c.colors=!1;if(I0(c.customInspect))c.customInspect=!0;if(c.colors)c.stylize=X;return F(c,A,c.depth)}$.inspect=G,G.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},G.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function X(A,f){var c=G.styles[f];if(c)return"\x1B["+G.colors[c][0]+"m"+A+"\x1B["+G.colors[c][1]+"m";else return A}function W(A,f){return A}function T(A){var f={};return A.forEach(function(c,p){f[c]=!0}),f}function F(A,f,c){if(A.customInspect&&f&&c0(f.inspect)&&f.inspect!==$.inspect&&!(f.constructor&&f.constructor.prototype===f)){var p=f.inspect(c,A);if(!s(p))p=F(A,p,c);return p}var Q0=E(A,f);if(Q0)return Q0;var F0=Object.keys(f),P0=T(F0);if(A.showHidden)F0=Object.getOwnPropertyNames(f);if(U0(f)&&(F0.indexOf("message")>=0||F0.indexOf("description")>=0))return D(f);if(F0.length===0){if(c0(f)){var E0=f.name?": "+f.name:"";return A.stylize("[Function"+E0+"]","special")}if(H0(f))return A.stylize(RegExp.prototype.toString.call(f),"regexp");if(R0(f))return A.stylize(Date.prototype.toString.call(f),"date");if(U0(f))return D(f)}var _0="",$0=!1,G0=["{","}"];if(y(f))$0=!0,G0=["[","]"];if(c0(f)){var K0=f.name?": "+f.name:"";_0=" [Function"+K0+"]"}if(H0(f))_0=" "+RegExp.prototype.toString.call(f);if(R0(f))_0=" "+Date.prototype.toUTCString.call(f);if(U0(f))_0=" "+D(f);if(F0.length===0&&(!$0||f.length==0))return G0[0]+_0+G0[1];if(c<0)if(H0(f))return A.stylize(RegExp.prototype.toString.call(f),"regexp");else return A.stylize("[Object]","special");A.seen.push(f);var q0;if($0)q0=q(A,f,c,P0,F0);else q0=F0.map(function(z0){return S(A,f,c,P0,z0,$0)});return A.seen.pop(),k(q0,_0,G0)}function E(A,f){if(I0(f))return A.stylize("undefined","undefined");if(s(f)){var c="'"+JSON.stringify(f).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return A.stylize(c,"string")}if(i(f))return A.stylize(""+f,"number");if(m(f))return A.stylize(""+f,"boolean");if(n(f))return A.stylize("null","null")}function D(A){return"["+Error.prototype.toString.call(A)+"]"}function q(A,f,c,p,Q0){var F0=[];for(var P0=0,E0=f.length;P0<E0;++P0)if(w(f,String(P0)))F0.push(S(A,f,c,p,String(P0),!0));else F0.push("");return Q0.forEach(function(_0){if(!_0.match(/^\d+$/))F0.push(S(A,f,c,p,_0,!0))}),F0}function S(A,f,c,p,Q0,F0){var P0,E0,_0;if(_0=Object.getOwnPropertyDescriptor(f,Q0)||{value:f[Q0]},_0.get)if(_0.set)E0=A.stylize("[Getter/Setter]","special");else E0=A.stylize("[Getter]","special");else if(_0.set)E0=A.stylize("[Setter]","special");if(!w(p,Q0))P0="["+Q0+"]";if(!E0)if(A.seen.indexOf(_0.value)<0){if(n(c))E0=F(A,_0.value,null);else E0=F(A,_0.value,c-1);if(E0.indexOf(`
246
+ `,"\t"],Ot=["{","}","|","\\","^","`"].concat(Zt),WP=["'"].concat(Ot),nk=["%","/","?",";","#"].concat(WP),ik=["/","?","#"],pk=/^[+a-z0-9A-Z_-]{0,63}$/,Wt=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Dt={javascript:!0,"javascript:":!0},DP={javascript:!0,"javascript:":!0},sZ={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},KP={parse($){var _=decodeURIComponent;return($+"").replace(/\+/g," ").split("&").filter(Boolean).reduce(function(I,J,j){var G=J.split("="),X=_(G[0]||""),W=_(G[1]||""),T=I[X];return I[X]=T===void 0?W:[].concat(T,W),I},{})},stringify($){var _=encodeURIComponent;return Object.keys($||{}).reduce(function(I,J){return[].concat($[J]).forEach(function(j){I.push(_(J)+"="+_(j))}),I},[]).join("&").replace(/\s/g,"+")}};E4.prototype.parse=function($,_,I){if(!FP($))throw TypeError("Parameter 'url' must be a string, not "+typeof $);var J=$.indexOf("?"),j=J!==-1&&J<$.indexOf("#")?"?":"#",G=$.split(j),X=/\\/g;G[0]=G[0].replace(X,"/"),$=G.join(j);var W=$;if(W=W.trim(),!I&&$.split("#").length===1){var T=zt.exec(W);if(T){if(this.path=W,this.href=W,this.pathname=T[1],T[2])if(this.search=T[2],_)this.query=KP.parse(this.search.substr(1));else this.query=this.search.substr(1);else if(_)this.search="",this.query={};return this}}var F=Jt.exec(W);if(F){F=F[0];var E=F.toLowerCase();this.protocol=E,W=W.substr(F.length)}if(I||F||W.match(/^\/\/[^@\/]+@[^@\/]+/)){var D=W.substr(0,2)==="//";if(D&&!(F&&DP[F]))W=W.substr(2),this.slashes=!0}if(!DP[F]&&(D||F&&!sZ[F])){var q=-1;for(var S=0;S<ik.length;S++){var k=W.indexOf(ik[S]);if(k!==-1&&(q===-1||k<q))q=k}var y,m;if(q===-1)m=W.lastIndexOf("@");else m=W.lastIndexOf("@",q);if(m!==-1)y=W.slice(0,m),W=W.slice(m+1),this.auth=decodeURIComponent(y);q=-1;for(var S=0;S<nk.length;S++){var k=W.indexOf(nk[S]);if(k!==-1&&(q===-1||k<q))q=k}if(q===-1)q=W.length;this.host=W.slice(0,q),W=W.slice(q),this.parseHost(),this.hostname=this.hostname||"";var n=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!n){var h=this.hostname.split(/\./);for(var S=0,i=h.length;S<i;S++){var s=h[S];if(!s)continue;if(!s.match(pk)){var j0="";for(var I0=0,H0=s.length;I0<H0;I0++)if(s.charCodeAt(I0)>127)j0+="x";else j0+=s[I0];if(!j0.match(pk)){var L0=h.slice(0,S),R0=h.slice(S+1),U0=s.match(Wt);if(U0)L0.push(U0[1]),R0.unshift(U0[2]);if(R0.length)W="/"+R0.join(".")+W;this.hostname=L0.join(".");break}}}}if(this.hostname.length>Lt)this.hostname="";else this.hostname=this.hostname.toLowerCase();if(!n)this.hostname=new HP(`https://${this.hostname}`).hostname;var c0=this.port?":"+this.port:"",Y=this.hostname||"";if(this.host=Y+c0,this.href+=this.host,n){if(this.hostname=this.hostname.substr(1,this.hostname.length-2),W[0]!=="/")W="/"+W}}if(!Dt[E])for(var S=0,i=WP.length;S<i;S++){var O=WP[S];if(W.indexOf(O)===-1)continue;var H=encodeURIComponent(O);if(H===O)H=escape(O);W=W.split(O).join(H)}var Z=W.indexOf("#");if(Z!==-1)this.hash=W.substr(Z),W=W.slice(0,Z);var K=W.indexOf("?");if(K!==-1){if(this.search=W.substr(K),this.query=W.substr(K+1),_)this.query=KP.parse(this.query);W=W.slice(0,K)}else if(_)this.search="",this.query={};if(W)this.pathname=W;if(sZ[E]&&this.hostname&&!this.pathname)this.pathname="/";if(this.pathname||this.search){var c0=this.pathname||"",w=this.search||"";this.path=c0+w}return this.href=this.format(),this};E4.prototype.format=function(){var $=this.auth||"";if($)$=encodeURIComponent($),$=$.replace(/%3A/i,":"),$+="@";var _=this.protocol||"",I=this.pathname||"",J=this.hash||"",j=!1,G="";if(this.host)j=$+this.host;else if(this.hostname){if(j=$+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port)j+=":"+this.port}if(this.query&&dk(this.query)&&Object.keys(this.query).length)G=KP.stringify(this.query);var X=this.search||G&&"?"+G||"";if(_&&_.substr(-1)!==":")_+=":";if(this.slashes||(!_||sZ[_])&&j!==!1){if(j="//"+(j||""),I&&I.charAt(0)!=="/")I="/"+I}else if(!j)j="";if(J&&J.charAt(0)!=="#")J="#"+J;if(X&&X.charAt(0)!=="?")X="?"+X;return I=I.replace(/[?#]/g,function(W){return encodeURIComponent(W)}),X=X.replace("#","%23"),_+j+I+X+J};E4.prototype.resolve=function($){return this.resolveObject(eZ($,!1,!0)).format()};E4.prototype.resolveObject=function($){if(FP($)){var _=new E4;_.parse($,!1,!0),$=_}var I=new E4,J=Object.keys(this);for(var j=0;j<J.length;j++){var G=J[j];I[G]=this[G]}if(I.hash=$.hash,$.href==="")return I.href=I.format(),I;if($.slashes&&!$.protocol){var X=Object.keys($);for(var W=0;W<X.length;W++){var T=X[W];if(T!=="protocol")I[T]=$[T]}if(sZ[I.protocol]&&I.hostname&&!I.pathname)I.path=I.pathname="/";return I.href=I.format(),I}if($.protocol&&$.protocol!==I.protocol){if(!sZ[$.protocol]){var F=Object.keys($);for(var E=0;E<F.length;E++){var D=F[E];I[D]=$[D]}return I.href=I.format(),I}if(I.protocol=$.protocol,!$.host&&!DP[$.protocol]){var i=($.pathname||"").split("/");while(i.length&&!($.host=i.shift()));if(!$.host)$.host="";if(!$.hostname)$.hostname="";if(i[0]!=="")i.unshift("");if(i.length<2)i.unshift("");I.pathname=i.join("/")}else I.pathname=$.pathname;if(I.search=$.search,I.query=$.query,I.host=$.host||"",I.auth=$.auth,I.hostname=$.hostname||$.host,I.port=$.port,I.pathname||I.search){var q=I.pathname||"",S=I.search||"";I.path=q+S}return I.slashes=I.slashes||$.slashes,I.href=I.format(),I}var k=I.pathname&&I.pathname.charAt(0)==="/",y=$.host||$.pathname&&$.pathname.charAt(0)==="/",m=y||k||I.host&&$.pathname,n=m,h=I.pathname&&I.pathname.split("/")||[],i=$.pathname&&$.pathname.split("/")||[],s=I.protocol&&!sZ[I.protocol];if(s){if(I.hostname="",I.port=null,I.host)if(h[0]==="")h[0]=I.host;else h.unshift(I.host);if(I.host="",$.protocol){if($.hostname=null,$.port=null,$.host)if(i[0]==="")i[0]=$.host;else i.unshift($.host);$.host=null}m=m&&(i[0]===""||h[0]==="")}if(y)I.host=$.host||$.host===""?$.host:I.host,I.hostname=$.hostname||$.hostname===""?$.hostname:I.hostname,I.search=$.search,I.query=$.query,h=i;else if(i.length){if(!h)h=[];h.pop(),h=h.concat(i),I.search=$.search,I.query=$.query}else if(!Yt($.search)){if(s){I.hostname=I.host=h.shift();var j0=I.host&&I.host.indexOf("@")>0?I.host.split("@"):!1;if(j0)I.auth=j0.shift(),I.host=I.hostname=j0.shift()}if(I.search=$.search,I.query=$.query,!CK(I.pathname)||!CK(I.search))I.path=(I.pathname?I.pathname:"")+(I.search?I.search:"");return I.href=I.format(),I}if(!h.length){if(I.pathname=null,I.search)I.path="/"+I.search;else I.path=null;return I.href=I.format(),I}var I0=h.slice(-1)[0],H0=(I.host||$.host||h.length>1)&&(I0==="."||I0==="..")||I0==="",L0=0;for(var R0=h.length;R0>=0;R0--)if(I0=h[R0],I0===".")h.splice(R0,1);else if(I0==="..")h.splice(R0,1),L0++;else if(L0)h.splice(R0,1),L0--;if(!m&&!n)for(;L0--;L0)h.unshift("..");if(m&&h[0]!==""&&(!h[0]||h[0].charAt(0)!=="/"))h.unshift("");if(H0&&h.join("/").substr(-1)!=="/")h.push("");var U0=h[0]===""||h[0]&&h[0].charAt(0)==="/";if(s){I.hostname=I.host=U0?"":h.length?h.shift():"";var j0=I.host&&I.host.indexOf("@")>0?I.host.split("@"):!1;if(j0)I.auth=j0.shift(),I.host=I.hostname=j0.shift()}if(m=m||I.host&&h.length,m&&!U0)h.unshift("");if(!h.length)I.pathname=null,I.path=null;else I.pathname=h.join("/");if(!CK(I.pathname)||!CK(I.search))I.path=(I.pathname?I.pathname:"")+(I.search?I.search:"");return I.auth=$.auth||I.auth,I.slashes=I.slashes||$.slashes,I.href=I.format(),I};E4.prototype.parseHost=function(){var $=this.host,_=Qt.exec($);if(_){if(_=_[0],_!==":")this.port=_.substr(1);$=$.substr(0,$.length-_.length)}if($)this.hostname=$};Kt={parse:eZ,resolve:tk,resolveObject:ok,format:rk,Url:E4,URL:HP,URLSearchParams:lk}});var wK={};_j(wK,{request:()=>ct,globalAgent:()=>ht,get:()=>xt,default:()=>Yc,STATUS_CODES:()=>mt,METHODS:()=>ut,IncomingMessage:()=>yt,ClientRequest:()=>ft,Agent:()=>bt});var Ht,Ft,ak,At,Mt,Et=($,_,I)=>{I=$!=null?Ht(Ft($)):{};let J=_||!$||!$.__esModule?ak(I,"default",{value:$,enumerable:!0}):I;for(let j of At($))if(!Mt.call(J,j))ak(J,j,{get:()=>$[j],enumerable:!0});return J},iv=($,_)=>()=>(_||$((_={exports:{}}).exports,_),_.exports),ek,Vt,i8,Tt,$c,p8,vc,Rt,_c,$O,Pt,sk,EP,qt,gt,jc,Uc,Ct,wt,Ic,Xc,Nt,Bt,St,kt,Gc,ct,xt,ft,yt,bt,ht,mt,ut,Yc;var SL=GX(()=>{Ht=Object.create,{getPrototypeOf:Ft,defineProperty:ak,getOwnPropertyNames:At}=Object,Mt=Object.prototype.hasOwnProperty,ek=iv(($)=>{$.fetch=j(globalThis.fetch)&&j(globalThis.ReadableStream),$.writableStream=j(globalThis.WritableStream),$.abortController=j(globalThis.AbortController);var _;function I(){if(_!==void 0)return _;if(globalThis.XMLHttpRequest){_=new globalThis.XMLHttpRequest;try{_.open("GET",globalThis.XDomainRequest?"/":"https://example.com")}catch(G){_=null}}else _=null;return _}function J(G){var X=I();if(!X)return!1;try{return X.responseType=G,X.responseType===G}catch(W){}return!1}$.arraybuffer=$.fetch||J("arraybuffer"),$.msstream=!$.fetch&&J("ms-stream"),$.mozchunkedarraybuffer=!$.fetch&&J("moz-chunked-arraybuffer"),$.overrideMimeType=$.fetch||(I()?j(I().overrideMimeType):!1);function j(G){return typeof G==="function"}_=null}),Vt=iv(($,_)=>{if(typeof Object.create==="function")_.exports=function(I,J){if(J)I.super_=J,I.prototype=Object.create(J.prototype,{constructor:{value:I,enumerable:!1,writable:!0,configurable:!0}})};else _.exports=function(I,J){if(J){I.super_=J;var j=function(){};j.prototype=J.prototype,I.prototype=new j,I.prototype.constructor=I}}}),i8=iv(($,_)=>{try{if(I=(pJ(),X1(iJ)),typeof I.inherits!=="function")throw"";_.exports=I.inherits}catch(J){_.exports=Vt()}var I}),Tt=iv(($,_)=>{function I(m,n){var h=Object.keys(m);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(m);n&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(m,s).enumerable})),h.push.apply(h,i)}return h}function J(m){for(var n=1;n<arguments.length;n++){var h=arguments[n]!=null?arguments[n]:{};n%2?I(Object(h),!0).forEach(function(i){j(m,i,h[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(m,Object.getOwnPropertyDescriptors(h)):I(Object(h)).forEach(function(i){Object.defineProperty(m,i,Object.getOwnPropertyDescriptor(h,i))})}return m}function j(m,n,h){if(n=T(n),n in m)Object.defineProperty(m,n,{value:h,enumerable:!0,configurable:!0,writable:!0});else m[n]=h;return m}function G(m,n){if(!(m instanceof n))throw TypeError("Cannot call a class as a function")}function X(m,n){for(var h=0;h<n.length;h++){var i=n[h];if(i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i)i.writable=!0;Object.defineProperty(m,T(i.key),i)}}function W(m,n,h){if(n)X(m.prototype,n);if(h)X(m,h);return Object.defineProperty(m,"prototype",{writable:!1}),m}function T(m){var n=F(m,"string");return typeof n==="symbol"?n:String(n)}function F(m,n){if(typeof m!=="object"||m===null)return m;var h=m[Symbol.toPrimitive];if(h!==void 0){var i=h.call(m,n||"default");if(typeof i!=="object")return i;throw TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(m)}var E=(j_(),X1(__)),D=E.Buffer,q=(pJ(),X1(iJ)),S=q.inspect,k=S&&S.custom||"inspect";function y(m,n,h){D.prototype.copy.call(m,n,h)}_.exports=function(){function m(){G(this,m),this.head=null,this.tail=null,this.length=0}return W(m,[{key:"push",value:function(n){var h={data:n,next:null};if(this.length>0)this.tail.next=h;else this.head=h;this.tail=h,++this.length}},{key:"unshift",value:function(n){var h={data:n,next:this.head};if(this.length===0)this.tail=h;this.head=h,++this.length}},{key:"shift",value:function(){if(this.length===0)return;var n=this.head.data;if(this.length===1)this.head=this.tail=null;else this.head=this.head.next;return--this.length,n}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(n){if(this.length===0)return"";var h=this.head,i=""+h.data;while(h=h.next)i+=n+h.data;return i}},{key:"concat",value:function(n){if(this.length===0)return D.alloc(0);var h=D.allocUnsafe(n>>>0),i=this.head,s=0;while(i)y(i.data,h,s),s+=i.data.length,i=i.next;return h}},{key:"consume",value:function(n,h){var i;if(n<this.head.data.length)i=this.head.data.slice(0,n),this.head.data=this.head.data.slice(n);else if(n===this.head.data.length)i=this.shift();else i=h?this._getString(n):this._getBuffer(n);return i}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(n){var h=this.head,i=1,s=h.data;n-=s.length;while(h=h.next){var j0=h.data,I0=n>j0.length?j0.length:n;if(I0===j0.length)s+=j0;else s+=j0.slice(0,n);if(n-=I0,n===0){if(I0===j0.length)if(++i,h.next)this.head=h.next;else this.head=this.tail=null;else this.head=h,h.data=j0.slice(I0);break}++i}return this.length-=i,s}},{key:"_getBuffer",value:function(n){var h=D.allocUnsafe(n),i=this.head,s=1;i.data.copy(h),n-=i.data.length;while(i=i.next){var j0=i.data,I0=n>j0.length?j0.length:n;if(j0.copy(h,h.length-n,0,I0),n-=I0,n===0){if(I0===j0.length)if(++s,i.next)this.head=i.next;else this.head=this.tail=null;else this.head=i,i.data=j0.slice(I0);break}++s}return this.length-=s,h}},{key:k,value:function(n,h){return S(this,J(J({},h),{},{depth:0,customInspect:!1}))}}]),m}()}),$c=iv(($,_)=>{function I(T,F){var E=this,D=this._readableState&&this._readableState.destroyed,q=this._writableState&&this._writableState.destroyed;if(D||q){if(F)F(T);else if(T){if(!this._writableState)process.nextTick(X,this,T);else if(!this._writableState.errorEmitted)this._writableState.errorEmitted=!0,process.nextTick(X,this,T)}return this}if(this._readableState)this._readableState.destroyed=!0;if(this._writableState)this._writableState.destroyed=!0;return this._destroy(T||null,function(S){if(!F&&S)if(!E._writableState)process.nextTick(J,E,S);else if(!E._writableState.errorEmitted)E._writableState.errorEmitted=!0,process.nextTick(J,E,S);else process.nextTick(j,E);else if(F)process.nextTick(j,E),F(S);else process.nextTick(j,E)}),this}function J(T,F){X(T,F),j(T)}function j(T){if(T._writableState&&!T._writableState.emitClose)return;if(T._readableState&&!T._readableState.emitClose)return;T.emit("close")}function G(){if(this._readableState)this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1;if(this._writableState)this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1}function X(T,F){T.emit("error",F)}function W(T,F){var{_readableState:E,_writableState:D}=T;if(E&&E.autoDestroy||D&&D.autoDestroy)T.destroy(F);else T.emit("error",F)}_.exports={destroy:I,undestroy:G,errorOrDestroy:W}}),p8=iv(($,_)=>{var I={};function J(T,F,E){if(!E)E=Error;function D(S,k,y){if(typeof F==="string")return F;else return F(S,k,y)}class q extends E{constructor(S,k,y){super(D(S,k,y))}}q.prototype.name=E.name,q.prototype.code=T,I[T]=q}function j(T,F){if(Array.isArray(T)){let E=T.length;if(T=T.map((D)=>String(D)),E>2)return`one of ${F} ${T.slice(0,E-1).join(", ")}, or `+T[E-1];else if(E===2)return`one of ${F} ${T[0]} or ${T[1]}`;else return`of ${F} ${T[0]}`}else return`of ${F} ${String(T)}`}function G(T,F,E){return T.substr(!E||E<0?0:+E,F.length)===F}function X(T,F,E){if(E===void 0||E>T.length)E=T.length;return T.substring(E-F.length,E)===F}function W(T,F,E){if(typeof E!=="number")E=0;if(E+F.length>T.length)return!1;else return T.indexOf(F,E)!==-1}J("ERR_INVALID_OPT_VALUE",function(T,F){return'The value "'+F+'" is invalid for option "'+T+'"'},TypeError),J("ERR_INVALID_ARG_TYPE",function(T,F,E){let D;if(typeof F==="string"&&G(F,"not "))D="must not be",F=F.replace(/^not /,"");else D="must be";let q;if(X(T," argument"))q=`The ${T} ${D} ${j(F,"type")}`;else{let S=W(T,".")?"property":"argument";q=`The "${T}" ${S} ${D} ${j(F,"type")}`}return q+=`. Received type ${typeof E}`,q},TypeError),J("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),J("ERR_METHOD_NOT_IMPLEMENTED",function(T){return"The "+T+" method is not implemented"}),J("ERR_STREAM_PREMATURE_CLOSE","Premature close"),J("ERR_STREAM_DESTROYED",function(T){return"Cannot call "+T+" after a stream was destroyed"}),J("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),J("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),J("ERR_STREAM_WRITE_AFTER_END","write after end"),J("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),J("ERR_UNKNOWN_ENCODING",function(T){return"Unknown encoding: "+T},TypeError),J("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),$.codes=I}),vc=iv(($,_)=>{var I=p8().codes.ERR_INVALID_OPT_VALUE;function J(G,X,W){return G.highWaterMark!=null?G.highWaterMark:X?G[W]:null}function j(G,X,W,T){var F=J(X,T,W);if(F!=null){if(!(isFinite(F)&&Math.floor(F)===F)||F<0){var E=T?W:"highWaterMark";throw new I(E,F)}return Math.floor(F)}return G.objectMode?16:16384}_.exports={getHighWaterMark:j}}),Rt=iv(($,_)=>{_.exports=(pJ(),X1(iJ)).deprecate}),_c=iv(($,_)=>{_.exports=U0;function I(E0){var _0=this;this.next=null,this.entry=null,this.finish=function(){P0(_0,E0)}}var J;U0.WritableState=L0;var j={deprecate:Rt()},G=E8(),X=(j_(),X1(__)).Buffer,W=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function T(E0){return X.from(E0)}function F(E0){return X.isBuffer(E0)||E0 instanceof W}var E=$c(),D=vc(),q=D.getHighWaterMark,S=p8().codes,k=S.ERR_INVALID_ARG_TYPE,y=S.ERR_METHOD_NOT_IMPLEMENTED,m=S.ERR_MULTIPLE_CALLBACK,n=S.ERR_STREAM_CANNOT_PIPE,h=S.ERR_STREAM_DESTROYED,i=S.ERR_STREAM_NULL_VALUES,s=S.ERR_STREAM_WRITE_AFTER_END,j0=S.ERR_UNKNOWN_ENCODING,I0=E.errorOrDestroy;i8()(U0,G);function H0(){}function L0(E0,_0,$0){if(J=J||$O(),E0=E0||{},typeof $0!=="boolean")$0=_0 instanceof J;if(this.objectMode=!!E0.objectMode,$0)this.objectMode=this.objectMode||!!E0.writableObjectMode;this.highWaterMark=q(this,E0,"writableHighWaterMark",$0),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var G0=E0.decodeStrings===!1;this.decodeStrings=!G0,this.defaultEncoding=E0.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(K0){B(_0,K0)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=E0.emitClose!==!1,this.autoDestroy=!!E0.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new I(this)}L0.prototype.getBuffer=function(){var E0=this.bufferedRequest,_0=[];while(E0)_0.push(E0),E0=E0.next;return _0},function(){try{Object.defineProperty(L0.prototype,"buffer",{get:j.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(E0){}}();var R0;if(typeof Symbol==="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]==="function")R0=Function.prototype[Symbol.hasInstance],Object.defineProperty(U0,Symbol.hasInstance,{value:function(E0){if(R0.call(this,E0))return!0;if(this!==U0)return!1;return E0&&E0._writableState instanceof L0}});else R0=function(E0){return E0 instanceof this};function U0(E0){J=J||$O();var _0=this instanceof J;if(!_0&&!R0.call(U0,this))return new U0(E0);if(this._writableState=new L0(E0,this,_0),this.writable=!0,E0){if(typeof E0.write==="function")this._write=E0.write;if(typeof E0.writev==="function")this._writev=E0.writev;if(typeof E0.destroy==="function")this._destroy=E0.destroy;if(typeof E0.final==="function")this._final=E0.final}G.call(this)}U0.prototype.pipe=function(){I0(this,new n)};function c0(E0,_0){var $0=new s;I0(E0,$0),process.nextTick(_0,$0)}function Y(E0,_0,$0,G0){var K0;if($0===null)K0=new i;else if(typeof $0!=="string"&&!_0.objectMode)K0=new k("chunk",["string","Buffer"],$0);if(K0)return I0(E0,K0),process.nextTick(G0,K0),!1;return!0}U0.prototype.write=function(E0,_0,$0){var G0=this._writableState,K0=!1,q0=!G0.objectMode&&F(E0);if(q0&&!X.isBuffer(E0))E0=T(E0);if(typeof _0==="function")$0=_0,_0=null;if(q0)_0="buffer";else if(!_0)_0=G0.defaultEncoding;if(typeof $0!=="function")$0=H0;if(G0.ending)c0(this,$0);else if(q0||Y(this,G0,E0,$0))G0.pendingcb++,K0=H(this,G0,q0,E0,_0,$0);return K0},U0.prototype.cork=function(){this._writableState.corked++},U0.prototype.uncork=function(){var E0=this._writableState;if(E0.corked){if(E0.corked--,!E0.writing&&!E0.corked&&!E0.bufferProcessing&&E0.bufferedRequest)A(this,E0)}},U0.prototype.setDefaultEncoding=function(E0){if(typeof E0==="string")E0=E0.toLowerCase();if(!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((E0+"").toLowerCase())>-1))throw new j0(E0);return this._writableState.defaultEncoding=E0,this},Object.defineProperty(U0.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function O(E0,_0,$0){if(!E0.objectMode&&E0.decodeStrings!==!1&&typeof _0==="string")_0=X.from(_0,$0);return _0}Object.defineProperty(U0.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function H(E0,_0,$0,G0,K0,q0){if(!$0){var z0=O(_0,G0,K0);if(G0!==z0)$0=!0,K0="buffer",G0=z0}var a=_0.objectMode?1:G0.length;_0.length+=a;var J0=_0.length<_0.highWaterMark;if(!J0)_0.needDrain=!0;if(_0.writing||_0.corked){var y0=_0.lastBufferedRequest;if(_0.lastBufferedRequest={chunk:G0,encoding:K0,isBuf:$0,callback:q0,next:null},y0)y0.next=_0.lastBufferedRequest;else _0.bufferedRequest=_0.lastBufferedRequest;_0.bufferedRequestCount+=1}else Z(E0,_0,!1,a,G0,K0,q0);return J0}function Z(E0,_0,$0,G0,K0,q0,z0){if(_0.writelen=G0,_0.writecb=z0,_0.writing=!0,_0.sync=!0,_0.destroyed)_0.onwrite(new h("write"));else if($0)E0._writev(K0,_0.onwrite);else E0._write(K0,q0,_0.onwrite);_0.sync=!1}function K(E0,_0,$0,G0,K0){if(--_0.pendingcb,$0)process.nextTick(K0,G0),process.nextTick(Q0,E0,_0),E0._writableState.errorEmitted=!0,I0(E0,G0);else K0(G0),E0._writableState.errorEmitted=!0,I0(E0,G0),Q0(E0,_0)}function w(E0){E0.writing=!1,E0.writecb=null,E0.length-=E0.writelen,E0.writelen=0}function B(E0,_0){var $0=E0._writableState,G0=$0.sync,K0=$0.writecb;if(typeof K0!=="function")throw new m;if(w($0),_0)K(E0,$0,G0,_0,K0);else{var q0=f($0)||E0.destroyed;if(!q0&&!$0.corked&&!$0.bufferProcessing&&$0.bufferedRequest)A(E0,$0);if(G0)process.nextTick(P,E0,$0,q0,K0);else P(E0,$0,q0,K0)}}function P(E0,_0,$0,G0){if(!$0)z(E0,_0);_0.pendingcb--,G0(),Q0(E0,_0)}function z(E0,_0){if(_0.length===0&&_0.needDrain)_0.needDrain=!1,E0.emit("drain")}function A(E0,_0){_0.bufferProcessing=!0;var $0=_0.bufferedRequest;if(E0._writev&&$0&&$0.next){var G0=_0.bufferedRequestCount,K0=Array(G0),q0=_0.corkedRequestsFree;q0.entry=$0;var z0=0,a=!0;while($0){if(K0[z0]=$0,!$0.isBuf)a=!1;$0=$0.next,z0+=1}if(K0.allBuffers=a,Z(E0,_0,!0,_0.length,K0,"",q0.finish),_0.pendingcb++,_0.lastBufferedRequest=null,q0.next)_0.corkedRequestsFree=q0.next,q0.next=null;else _0.corkedRequestsFree=new I(_0);_0.bufferedRequestCount=0}else{while($0){var{chunk:J0,encoding:y0,callback:N0}=$0,A0=_0.objectMode?1:J0.length;if(Z(E0,_0,!1,A0,J0,y0,N0),$0=$0.next,_0.bufferedRequestCount--,_0.writing)break}if($0===null)_0.lastBufferedRequest=null}_0.bufferedRequest=$0,_0.bufferProcessing=!1}U0.prototype._write=function(E0,_0,$0){$0(new y("_write()"))},U0.prototype._writev=null,U0.prototype.end=function(E0,_0,$0){var G0=this._writableState;if(typeof E0==="function")$0=E0,E0=null,_0=null;else if(typeof _0==="function")$0=_0,_0=null;if(E0!==null&&E0!==void 0)this.write(E0,_0);if(G0.corked)G0.corked=1,this.uncork();if(!G0.ending)F0(this,G0,$0);return this},Object.defineProperty(U0.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function f(E0){return E0.ending&&E0.length===0&&E0.bufferedRequest===null&&!E0.finished&&!E0.writing}function c(E0,_0){E0._final(function($0){if(_0.pendingcb--,$0)I0(E0,$0);_0.prefinished=!0,E0.emit("prefinish"),Q0(E0,_0)})}function p(E0,_0){if(!_0.prefinished&&!_0.finalCalled)if(typeof E0._final==="function"&&!_0.destroyed)_0.pendingcb++,_0.finalCalled=!0,process.nextTick(c,E0,_0);else _0.prefinished=!0,E0.emit("prefinish")}function Q0(E0,_0){var $0=f(_0);if($0){if(p(E0,_0),_0.pendingcb===0){if(_0.finished=!0,E0.emit("finish"),_0.autoDestroy){var G0=E0._readableState;if(!G0||G0.autoDestroy&&G0.endEmitted)E0.destroy()}}}return $0}function F0(E0,_0,$0){if(_0.ending=!0,Q0(E0,_0),$0)if(_0.finished)process.nextTick($0);else E0.once("finish",$0);_0.ended=!0,E0.writable=!1}function P0(E0,_0,$0){var G0=E0.entry;E0.entry=null;while(G0){var K0=G0.callback;_0.pendingcb--,K0($0),G0=G0.next}_0.corkedRequestsFree.next=E0}Object.defineProperty(U0.prototype,"destroyed",{enumerable:!1,get:function(){if(this._writableState===void 0)return!1;return this._writableState.destroyed},set:function(E0){if(!this._writableState)return;this._writableState.destroyed=E0}}),U0.prototype.destroy=E.destroy,U0.prototype._undestroy=E.undestroy,U0.prototype._destroy=function(E0,_0){_0(E0)}}),$O=iv(($,_)=>{var I=Object.keys||function(D){var q=[];for(var S in D)q.push(S);return q};_.exports=T;var J=jc(),j=_c();i8()(T,J);{G=I(j.prototype);for(W=0;W<G.length;W++)if(X=G[W],!T.prototype[X])T.prototype[X]=j.prototype[X]}var G,X,W;function T(D){if(!(this instanceof T))return new T(D);if(J.call(this,D),j.call(this,D),this.allowHalfOpen=!0,D){if(D.readable===!1)this.readable=!1;if(D.writable===!1)this.writable=!1;if(D.allowHalfOpen===!1)this.allowHalfOpen=!1,this.once("end",F)}}Object.defineProperty(T.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(T.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(T.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function F(){if(this._writableState.ended)return;process.nextTick(E,this)}function E(D){D.end()}Object.defineProperty(T.prototype,"destroyed",{enumerable:!1,get:function(){if(this._readableState===void 0||this._writableState===void 0)return!1;return this._readableState.destroyed&&this._writableState.destroyed},set:function(D){if(this._readableState===void 0||this._writableState===void 0)return;this._readableState.destroyed=D,this._writableState.destroyed=D}})}),Pt=iv(($,_)=>{/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var I=(j_(),X1(__)),J=I.Buffer;function j(X,W){for(var T in X)W[T]=X[T]}if(J.from&&J.alloc&&J.allocUnsafe&&J.allocUnsafeSlow)_.exports=I;else j(I,$),$.Buffer=G;function G(X,W,T){return J(X,W,T)}G.prototype=Object.create(J.prototype),j(J,G),G.from=function(X,W,T){if(typeof X==="number")throw TypeError("Argument must not be a number");return J(X,W,T)},G.alloc=function(X,W,T){if(typeof X!=="number")throw TypeError("Argument must be a number");var F=J(X);if(W!==void 0)if(typeof T==="string")F.fill(W,T);else F.fill(W);else F.fill(0);return F},G.allocUnsafe=function(X){if(typeof X!=="number")throw TypeError("Argument must be a number");return J(X)},G.allocUnsafeSlow=function(X){if(typeof X!=="number")throw TypeError("Argument must be a number");return I.SlowBuffer(X)}}),sk=iv(($)=>{var _=Pt().Buffer,I=_.isEncoding||function(h){switch(h=""+h,h&&h.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 J(h){if(!h)return"utf8";var i;while(!0)switch(h){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 h;default:if(i)return;h=(""+h).toLowerCase(),i=!0}}function j(h){var i=J(h);if(typeof i!=="string"&&(_.isEncoding===I||!I(h)))throw Error("Unknown encoding: "+h);return i||h}$.StringDecoder=G;function G(h){this.encoding=j(h);var i;switch(this.encoding){case"utf16le":this.text=q,this.end=S,i=4;break;case"utf8":this.fillLast=F,i=4;break;case"base64":this.text=k,this.end=y,i=3;break;default:this.write=m,this.end=n;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=_.allocUnsafe(i)}G.prototype.write=function(h){if(h.length===0)return"";var i,s;if(this.lastNeed){if(i=this.fillLast(h),i===void 0)return"";s=this.lastNeed,this.lastNeed=0}else s=0;if(s<h.length)return i?i+this.text(h,s):this.text(h,s);return i||""},G.prototype.end=D,G.prototype.text=E,G.prototype.fillLast=function(h){if(this.lastNeed<=h.length)return h.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);h.copy(this.lastChar,this.lastTotal-this.lastNeed,0,h.length),this.lastNeed-=h.length};function X(h){if(h<=127)return 0;else if(h>>5===6)return 2;else if(h>>4===14)return 3;else if(h>>3===30)return 4;return h>>6===2?-1:-2}function W(h,i,s){var j0=i.length-1;if(j0<s)return 0;var I0=X(i[j0]);if(I0>=0){if(I0>0)h.lastNeed=I0-1;return I0}if(--j0<s||I0===-2)return 0;if(I0=X(i[j0]),I0>=0){if(I0>0)h.lastNeed=I0-2;return I0}if(--j0<s||I0===-2)return 0;if(I0=X(i[j0]),I0>=0){if(I0>0)if(I0===2)I0=0;else h.lastNeed=I0-3;return I0}return 0}function T(h,i,s){if((i[0]&192)!==128)return h.lastNeed=0,"�";if(h.lastNeed>1&&i.length>1){if((i[1]&192)!==128)return h.lastNeed=1,"�";if(h.lastNeed>2&&i.length>2){if((i[2]&192)!==128)return h.lastNeed=2,"�"}}}function F(h){var i=this.lastTotal-this.lastNeed,s=T(this,h,i);if(s!==void 0)return s;if(this.lastNeed<=h.length)return h.copy(this.lastChar,i,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);h.copy(this.lastChar,i,0,h.length),this.lastNeed-=h.length}function E(h,i){var s=W(this,h,i);if(!this.lastNeed)return h.toString("utf8",i);this.lastTotal=s;var j0=h.length-(s-this.lastNeed);return h.copy(this.lastChar,0,j0),h.toString("utf8",i,j0)}function D(h){var i=h&&h.length?this.write(h):"";if(this.lastNeed)return i+"�";return i}function q(h,i){if((h.length-i)%2===0){var s=h.toString("utf16le",i);if(s){var j0=s.charCodeAt(s.length-1);if(j0>=55296&&j0<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=h[h.length-2],this.lastChar[1]=h[h.length-1],s.slice(0,-1)}return s}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=h[h.length-1],h.toString("utf16le",i,h.length-1)}function S(h){var i=h&&h.length?this.write(h):"";if(this.lastNeed){var s=this.lastTotal-this.lastNeed;return i+this.lastChar.toString("utf16le",0,s)}return i}function k(h,i){var s=(h.length-i)%3;if(s===0)return h.toString("base64",i);if(this.lastNeed=3-s,this.lastTotal=3,s===1)this.lastChar[0]=h[h.length-1];else this.lastChar[0]=h[h.length-2],this.lastChar[1]=h[h.length-1];return h.toString("base64",i,h.length-s)}function y(h){var i=h&&h.length?this.write(h):"";if(this.lastNeed)return i+this.lastChar.toString("base64",0,3-this.lastNeed);return i}function m(h){return h.toString(this.encoding)}function n(h){return h&&h.length?this.write(h):""}}),EP=iv(($,_)=>{var I=p8().codes.ERR_STREAM_PREMATURE_CLOSE;function J(W){var T=!1;return function(){if(T)return;T=!0;for(var F=arguments.length,E=Array(F),D=0;D<F;D++)E[D]=arguments[D];W.apply(this,E)}}function j(){}function G(W){return W.setHeader&&typeof W.abort==="function"}function X(W,T,F){if(typeof T==="function")return X(W,null,T);if(!T)T={};F=J(F||j);var E=T.readable||T.readable!==!1&&W.readable,D=T.writable||T.writable!==!1&&W.writable,q=function(){if(!W.writable)k()},S=W._writableState&&W._writableState.finished,k=function(){if(D=!1,S=!0,!E)F.call(W)},y=W._readableState&&W._readableState.endEmitted,m=function(){if(E=!1,y=!0,!D)F.call(W)},n=function(s){F.call(W,s)},h=function(){var s;if(E&&!y){if(!W._readableState||!W._readableState.ended)s=new I;return F.call(W,s)}if(D&&!S){if(!W._writableState||!W._writableState.ended)s=new I;return F.call(W,s)}},i=function(){W.req.on("finish",k)};if(G(W))if(W.on("complete",k),W.on("abort",h),W.req)i();else W.on("request",i);else if(D&&!W._writableState)W.on("end",q),W.on("close",q);if(W.on("end",m),W.on("finish",k),T.error!==!1)W.on("error",n);return W.on("close",h),function(){if(W.removeListener("complete",k),W.removeListener("abort",h),W.removeListener("request",i),W.req)W.req.removeListener("finish",k);W.removeListener("end",q),W.removeListener("close",q),W.removeListener("finish",k),W.removeListener("end",m),W.removeListener("error",n),W.removeListener("close",h)}}_.exports=X}),qt=iv(($,_)=>{var I;function J(j0,I0,H0){if(I0=j(I0),I0 in j0)Object.defineProperty(j0,I0,{value:H0,enumerable:!0,configurable:!0,writable:!0});else j0[I0]=H0;return j0}function j(j0){var I0=G(j0,"string");return typeof I0==="symbol"?I0:String(I0)}function G(j0,I0){if(typeof j0!=="object"||j0===null)return j0;var H0=j0[Symbol.toPrimitive];if(H0!==void 0){var L0=H0.call(j0,I0||"default");if(typeof L0!=="object")return L0;throw TypeError("@@toPrimitive must return a primitive value.")}return(I0==="string"?String:Number)(j0)}var X=EP(),W=Symbol("lastResolve"),T=Symbol("lastReject"),F=Symbol("error"),E=Symbol("ended"),D=Symbol("lastPromise"),q=Symbol("handlePromise"),S=Symbol("stream");function k(j0,I0){return{value:j0,done:I0}}function y(j0){var I0=j0[W];if(I0!==null){var H0=j0[S].read();if(H0!==null)j0[D]=null,j0[W]=null,j0[T]=null,I0(k(H0,!1))}}function m(j0){process.nextTick(y,j0)}function n(j0,I0){return function(H0,L0){j0.then(function(){if(I0[E]){H0(k(void 0,!0));return}I0[q](H0,L0)},L0)}}var h=Object.getPrototypeOf(function(){}),i=Object.setPrototypeOf((I={get stream(){return this[S]},next:function(){var j0=this,I0=this[F];if(I0!==null)return Promise.reject(I0);if(this[E])return Promise.resolve(k(void 0,!0));if(this[S].destroyed)return new Promise(function(U0,c0){process.nextTick(function(){if(j0[F])c0(j0[F]);else U0(k(void 0,!0))})});var H0=this[D],L0;if(H0)L0=new Promise(n(H0,this));else{var R0=this[S].read();if(R0!==null)return Promise.resolve(k(R0,!1));L0=new Promise(this[q])}return this[D]=L0,L0}},J(I,Symbol.asyncIterator,function(){return this}),J(I,"return",function(){var j0=this;return new Promise(function(I0,H0){j0[S].destroy(null,function(L0){if(L0){H0(L0);return}I0(k(void 0,!0))})})}),I),h),s=function(j0){var I0,H0=Object.create(i,(I0={},J(I0,S,{value:j0,writable:!0}),J(I0,W,{value:null,writable:!0}),J(I0,T,{value:null,writable:!0}),J(I0,F,{value:null,writable:!0}),J(I0,E,{value:j0._readableState.endEmitted,writable:!0}),J(I0,q,{value:function(L0,R0){var U0=H0[S].read();if(U0)H0[D]=null,H0[W]=null,H0[T]=null,L0(k(U0,!1));else H0[W]=L0,H0[T]=R0},writable:!0}),I0));return H0[D]=null,X(j0,function(L0){if(L0&&L0.code!=="ERR_STREAM_PREMATURE_CLOSE"){var R0=H0[T];if(R0!==null)H0[D]=null,H0[W]=null,H0[T]=null,R0(L0);H0[F]=L0;return}var U0=H0[W];if(U0!==null)H0[D]=null,H0[W]=null,H0[T]=null,U0(k(void 0,!0));H0[E]=!0}),j0.on("readable",m.bind(null,H0)),H0};_.exports=s}),gt=iv(($,_)=>{function I(D,q,S,k,y,m,n){try{var h=D[m](n),i=h.value}catch(s){S(s);return}if(h.done)q(i);else Promise.resolve(i).then(k,y)}function J(D){return function(){var q=this,S=arguments;return new Promise(function(k,y){var m=D.apply(q,S);function n(i){I(m,k,y,n,h,"next",i)}function h(i){I(m,k,y,n,h,"throw",i)}n(void 0)})}}function j(D,q){var S=Object.keys(D);if(Object.getOwnPropertySymbols){var k=Object.getOwnPropertySymbols(D);q&&(k=k.filter(function(y){return Object.getOwnPropertyDescriptor(D,y).enumerable})),S.push.apply(S,k)}return S}function G(D){for(var q=1;q<arguments.length;q++){var S=arguments[q]!=null?arguments[q]:{};q%2?j(Object(S),!0).forEach(function(k){X(D,k,S[k])}):Object.getOwnPropertyDescriptors?Object.defineProperties(D,Object.getOwnPropertyDescriptors(S)):j(Object(S)).forEach(function(k){Object.defineProperty(D,k,Object.getOwnPropertyDescriptor(S,k))})}return D}function X(D,q,S){if(q=W(q),q in D)Object.defineProperty(D,q,{value:S,enumerable:!0,configurable:!0,writable:!0});else D[q]=S;return D}function W(D){var q=T(D,"string");return typeof q==="symbol"?q:String(q)}function T(D,q){if(typeof D!=="object"||D===null)return D;var S=D[Symbol.toPrimitive];if(S!==void 0){var k=S.call(D,q||"default");if(typeof k!=="object")return k;throw TypeError("@@toPrimitive must return a primitive value.")}return(q==="string"?String:Number)(D)}var F=p8().codes.ERR_INVALID_ARG_TYPE;function E(D,q,S){var k;if(q&&typeof q.next==="function")k=q;else if(q&&q[Symbol.asyncIterator])k=q[Symbol.asyncIterator]();else if(q&&q[Symbol.iterator])k=q[Symbol.iterator]();else throw new F("iterable",["Iterable"],q);var y=new D(G({objectMode:!0},S)),m=!1;y._read=function(){if(!m)m=!0,n()};function n(){return h.apply(this,arguments)}function h(){return h=J(function*(){try{var i=yield k.next(),s=i.value,j0=i.done;if(j0)y.push(null);else if(y.push(yield s))n();else m=!1}catch(I0){y.destroy(I0)}}),h.apply(this,arguments)}return y}_.exports=E}),jc=iv(($,_)=>{_.exports=Y;var I;Y.ReadableState=c0;var J=(GZ(),X1(XZ)).EventEmitter,j=function(z0,a){return z0.listeners(a).length},G=E8(),X=(j_(),X1(__)).Buffer,W=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function T(z0){return X.from(z0)}function F(z0){return X.isBuffer(z0)||z0 instanceof W}var E=(pJ(),X1(iJ)),D;if(E&&E.debuglog)D=E.debuglog("stream");else D=function(){};var q=Tt(),S=$c(),k=vc(),y=k.getHighWaterMark,m=p8().codes,n=m.ERR_INVALID_ARG_TYPE,h=m.ERR_STREAM_PUSH_AFTER_EOF,i=m.ERR_METHOD_NOT_IMPLEMENTED,s=m.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,j0,I0,H0;i8()(Y,G);var L0=S.errorOrDestroy,R0=["error","close","destroy","pause","resume"];function U0(z0,a,J0){if(typeof z0.prependListener==="function")return z0.prependListener(a,J0);if(!z0._events||!z0._events[a])z0.on(a,J0);else if(Array.isArray(z0._events[a]))z0._events[a].unshift(J0);else z0._events[a]=[J0,z0._events[a]]}function c0(z0,a,J0){if(I=I||$O(),z0=z0||{},typeof J0!=="boolean")J0=a instanceof I;if(this.objectMode=!!z0.objectMode,J0)this.objectMode=this.objectMode||!!z0.readableObjectMode;if(this.highWaterMark=y(this,z0,"readableHighWaterMark",J0),this.buffer=new q,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=z0.emitClose!==!1,this.autoDestroy=!!z0.autoDestroy,this.destroyed=!1,this.defaultEncoding=z0.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,z0.encoding){if(!j0)j0=sk().StringDecoder;this.decoder=new j0(z0.encoding),this.encoding=z0.encoding}}function Y(z0){if(I=I||$O(),!(this instanceof Y))return new Y(z0);var a=this instanceof I;if(this._readableState=new c0(z0,this,a),this.readable=!0,z0){if(typeof z0.read==="function")this._read=z0.read;if(typeof z0.destroy==="function")this._destroy=z0.destroy}G.call(this)}Object.defineProperty(Y.prototype,"destroyed",{enumerable:!1,get:function(){if(this._readableState===void 0)return!1;return this._readableState.destroyed},set:function(z0){if(!this._readableState)return;this._readableState.destroyed=z0}}),Y.prototype.destroy=S.destroy,Y.prototype._undestroy=S.undestroy,Y.prototype._destroy=function(z0,a){a(z0)},Y.prototype.push=function(z0,a){var J0=this._readableState,y0;if(!J0.objectMode){if(typeof z0==="string"){if(a=a||J0.defaultEncoding,a!==J0.encoding)z0=X.from(z0,a),a="";y0=!0}}else y0=!0;return O(this,z0,a,!1,y0)},Y.prototype.unshift=function(z0){return O(this,z0,null,!0,!1)};function O(z0,a,J0,y0,N0){D("readableAddChunk",a);var A0=z0._readableState;if(a===null)A0.reading=!1,P(z0,A0);else{var $$;if(!N0)$$=Z(A0,a);if($$)L0(z0,$$);else if(A0.objectMode||a&&a.length>0){if(typeof a!=="string"&&!A0.objectMode&&Object.getPrototypeOf(a)!==X.prototype)a=T(a);if(y0)if(A0.endEmitted)L0(z0,new s);else H(z0,A0,a,!0);else if(A0.ended)L0(z0,new h);else if(A0.destroyed)return!1;else if(A0.reading=!1,A0.decoder&&!J0)if(a=A0.decoder.write(a),A0.objectMode||a.length!==0)H(z0,A0,a,!1);else f(z0,A0);else H(z0,A0,a,!1)}else if(!y0)A0.reading=!1,f(z0,A0)}return!A0.ended&&(A0.length<A0.highWaterMark||A0.length===0)}function H(z0,a,J0,y0){if(a.flowing&&a.length===0&&!a.sync)a.awaitDrain=0,z0.emit("data",J0);else{if(a.length+=a.objectMode?1:J0.length,y0)a.buffer.unshift(J0);else a.buffer.push(J0);if(a.needReadable)z(z0)}f(z0,a)}function Z(z0,a){var J0;if(!F(a)&&typeof a!=="string"&&a!==void 0&&!z0.objectMode)J0=new n("chunk",["string","Buffer","Uint8Array"],a);return J0}Y.prototype.isPaused=function(){return this._readableState.flowing===!1},Y.prototype.setEncoding=function(z0){if(!j0)j0=sk().StringDecoder;var a=new j0(z0);this._readableState.decoder=a,this._readableState.encoding=this._readableState.decoder.encoding;var J0=this._readableState.buffer.head,y0="";while(J0!==null)y0+=a.write(J0.data),J0=J0.next;if(this._readableState.buffer.clear(),y0!=="")this._readableState.buffer.push(y0);return this._readableState.length=y0.length,this};var K=1073741824;function w(z0){if(z0>=K)z0=K;else z0--,z0|=z0>>>1,z0|=z0>>>2,z0|=z0>>>4,z0|=z0>>>8,z0|=z0>>>16,z0++;return z0}function B(z0,a){if(z0<=0||a.length===0&&a.ended)return 0;if(a.objectMode)return 1;if(z0!==z0)if(a.flowing&&a.length)return a.buffer.head.data.length;else return a.length;if(z0>a.highWaterMark)a.highWaterMark=w(z0);if(z0<=a.length)return z0;if(!a.ended)return a.needReadable=!0,0;return a.length}Y.prototype.read=function(z0){D("read",z0),z0=parseInt(z0,10);var a=this._readableState,J0=z0;if(z0!==0)a.emittedReadable=!1;if(z0===0&&a.needReadable&&((a.highWaterMark!==0?a.length>=a.highWaterMark:a.length>0)||a.ended)){if(D("read: emitReadable",a.length,a.ended),a.length===0&&a.ended)G0(this);else z(this);return null}if(z0=B(z0,a),z0===0&&a.ended){if(a.length===0)G0(this);return null}var y0=a.needReadable;if(D("need readable",y0),a.length===0||a.length-z0<a.highWaterMark)y0=!0,D("length less than watermark",y0);if(a.ended||a.reading)y0=!1,D("reading or ended",y0);else if(y0){if(D("do read"),a.reading=!0,a.sync=!0,a.length===0)a.needReadable=!0;if(this._read(a.highWaterMark),a.sync=!1,!a.reading)z0=B(J0,a)}var N0;if(z0>0)N0=$0(z0,a);else N0=null;if(N0===null)a.needReadable=a.length<=a.highWaterMark,z0=0;else a.length-=z0,a.awaitDrain=0;if(a.length===0){if(!a.ended)a.needReadable=!0;if(J0!==z0&&a.ended)G0(this)}if(N0!==null)this.emit("data",N0);return N0};function P(z0,a){if(D("onEofChunk"),a.ended)return;if(a.decoder){var J0=a.decoder.end();if(J0&&J0.length)a.buffer.push(J0),a.length+=a.objectMode?1:J0.length}if(a.ended=!0,a.sync)z(z0);else if(a.needReadable=!1,!a.emittedReadable)a.emittedReadable=!0,A(z0)}function z(z0){var a=z0._readableState;if(D("emitReadable",a.needReadable,a.emittedReadable),a.needReadable=!1,!a.emittedReadable)D("emitReadable",a.flowing),a.emittedReadable=!0,process.nextTick(A,z0)}function A(z0){var a=z0._readableState;if(D("emitReadable_",a.destroyed,a.length,a.ended),!a.destroyed&&(a.length||a.ended))z0.emit("readable"),a.emittedReadable=!1;a.needReadable=!a.flowing&&!a.ended&&a.length<=a.highWaterMark,_0(z0)}function f(z0,a){if(!a.readingMore)a.readingMore=!0,process.nextTick(c,z0,a)}function c(z0,a){while(!a.reading&&!a.ended&&(a.length<a.highWaterMark||a.flowing&&a.length===0)){var J0=a.length;if(D("maybeReadMore read 0"),z0.read(0),J0===a.length)break}a.readingMore=!1}Y.prototype._read=function(z0){L0(this,new i("_read()"))},Y.prototype.pipe=function(z0,a){var J0=this,y0=this._readableState;switch(y0.pipesCount){case 0:y0.pipes=z0;break;case 1:y0.pipes=[y0.pipes,z0];break;default:y0.pipes.push(z0);break}y0.pipesCount+=1,D("pipe count=%d opts=%j",y0.pipesCount,a);var N0=(!a||a.end!==!1)&&z0!==process.stdout&&z0!==process.stderr,A0=N0?w0:T$;if(y0.endEmitted)process.nextTick(A0);else J0.once("end",A0);z0.on("unpipe",$$);function $$(U$,G$){if(D("onunpipe"),U$===J0){if(G$&&G$.hasUnpiped===!1)G$.hasUnpiped=!0,p0()}}function w0(){D("onend"),z0.end()}var h0=p(J0);z0.on("drain",h0);var H$=!1;function p0(){if(D("cleanup"),z0.removeListener("close",C0),z0.removeListener("finish",x0),z0.removeListener("drain",h0),z0.removeListener("error",p$),z0.removeListener("unpipe",$$),J0.removeListener("end",w0),J0.removeListener("end",T$),J0.removeListener("data",j$),H$=!0,y0.awaitDrain&&(!z0._writableState||z0._writableState.needDrain))h0()}J0.on("data",j$);function j$(U$){D("ondata");var G$=z0.write(U$);if(D("dest.write",G$),G$===!1){if((y0.pipesCount===1&&y0.pipes===z0||y0.pipesCount>1&&q0(y0.pipes,z0)!==-1)&&!H$)D("false write response, pause",y0.awaitDrain),y0.awaitDrain++;J0.pause()}}function p$(U$){if(D("onerror",U$),T$(),z0.removeListener("error",p$),j(z0,"error")===0)L0(z0,U$)}U0(z0,"error",p$);function C0(){z0.removeListener("finish",x0),T$()}z0.once("close",C0);function x0(){D("onfinish"),z0.removeListener("close",C0),T$()}z0.once("finish",x0);function T$(){D("unpipe"),J0.unpipe(z0)}if(z0.emit("pipe",J0),!y0.flowing)D("pipe resume"),J0.resume();return z0};function p(z0){return function(){var a=z0._readableState;if(D("pipeOnDrain",a.awaitDrain),a.awaitDrain)a.awaitDrain--;if(a.awaitDrain===0&&j(z0,"data"))a.flowing=!0,_0(z0)}}Y.prototype.unpipe=function(z0){var a=this._readableState,J0={hasUnpiped:!1};if(a.pipesCount===0)return this;if(a.pipesCount===1){if(z0&&z0!==a.pipes)return this;if(!z0)z0=a.pipes;if(a.pipes=null,a.pipesCount=0,a.flowing=!1,z0)z0.emit("unpipe",this,J0);return this}if(!z0){var{pipes:y0,pipesCount:N0}=a;a.pipes=null,a.pipesCount=0,a.flowing=!1;for(var A0=0;A0<N0;A0++)y0[A0].emit("unpipe",this,{hasUnpiped:!1});return this}var $$=q0(a.pipes,z0);if($$===-1)return this;if(a.pipes.splice($$,1),a.pipesCount-=1,a.pipesCount===1)a.pipes=a.pipes[0];return z0.emit("unpipe",this,J0),this},Y.prototype.on=function(z0,a){var J0=G.prototype.on.call(this,z0,a),y0=this._readableState;if(z0==="data"){if(y0.readableListening=this.listenerCount("readable")>0,y0.flowing!==!1)this.resume()}else if(z0==="readable"){if(!y0.endEmitted&&!y0.readableListening){if(y0.readableListening=y0.needReadable=!0,y0.flowing=!1,y0.emittedReadable=!1,D("on readable",y0.length,y0.reading),y0.length)z(this);else if(!y0.reading)process.nextTick(F0,this)}}return J0},Y.prototype.addListener=Y.prototype.on,Y.prototype.removeListener=function(z0,a){var J0=G.prototype.removeListener.call(this,z0,a);if(z0==="readable")process.nextTick(Q0,this);return J0},Y.prototype.removeAllListeners=function(z0){var a=G.prototype.removeAllListeners.apply(this,arguments);if(z0==="readable"||z0===void 0)process.nextTick(Q0,this);return a};function Q0(z0){var a=z0._readableState;if(a.readableListening=z0.listenerCount("readable")>0,a.resumeScheduled&&!a.paused)a.flowing=!0;else if(z0.listenerCount("data")>0)z0.resume()}function F0(z0){D("readable nexttick read 0"),z0.read(0)}Y.prototype.resume=function(){var z0=this._readableState;if(!z0.flowing)D("resume"),z0.flowing=!z0.readableListening,P0(this,z0);return z0.paused=!1,this};function P0(z0,a){if(!a.resumeScheduled)a.resumeScheduled=!0,process.nextTick(E0,z0,a)}function E0(z0,a){if(D("resume",a.reading),!a.reading)z0.read(0);if(a.resumeScheduled=!1,z0.emit("resume"),_0(z0),a.flowing&&!a.reading)z0.read(0)}Y.prototype.pause=function(){if(D("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1)D("pause"),this._readableState.flowing=!1,this.emit("pause");return this._readableState.paused=!0,this};function _0(z0){var a=z0._readableState;D("flow",a.flowing);while(a.flowing&&z0.read()!==null);}if(Y.prototype.wrap=function(z0){var a=this,J0=this._readableState,y0=!1;z0.on("end",function(){if(D("wrapped end"),J0.decoder&&!J0.ended){var $$=J0.decoder.end();if($$&&$$.length)a.push($$)}a.push(null)}),z0.on("data",function($$){if(D("wrapped data"),J0.decoder)$$=J0.decoder.write($$);if(J0.objectMode&&($$===null||$$===void 0))return;else if(!J0.objectMode&&(!$$||!$$.length))return;var w0=a.push($$);if(!w0)y0=!0,z0.pause()});for(var N0 in z0)if(this[N0]===void 0&&typeof z0[N0]==="function")this[N0]=function($$){return function(){return z0[$$].apply(z0,arguments)}}(N0);for(var A0=0;A0<R0.length;A0++)z0.on(R0[A0],this.emit.bind(this,R0[A0]));return this._read=function($$){if(D("wrapped _read",$$),y0)y0=!1,z0.resume()},this},typeof Symbol==="function")Y.prototype[Symbol.asyncIterator]=function(){if(I0===void 0)I0=qt();return I0(this)};Object.defineProperty(Y.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(Y.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(Y.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(z0){if(this._readableState)this._readableState.flowing=z0}}),Y._fromList=$0,Object.defineProperty(Y.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function $0(z0,a){if(a.length===0)return null;var J0;if(a.objectMode)J0=a.buffer.shift();else if(!z0||z0>=a.length){if(a.decoder)J0=a.buffer.join("");else if(a.buffer.length===1)J0=a.buffer.first();else J0=a.buffer.concat(a.length);a.buffer.clear()}else J0=a.buffer.consume(z0,a.decoder);return J0}function G0(z0){var a=z0._readableState;if(D("endReadable",a.endEmitted),!a.endEmitted)a.ended=!0,process.nextTick(K0,a,z0)}function K0(z0,a){if(D("endReadableNT",z0.endEmitted,z0.length),!z0.endEmitted&&z0.length===0){if(z0.endEmitted=!0,a.readable=!1,a.emit("end"),z0.autoDestroy){var J0=a._writableState;if(!J0||J0.autoDestroy&&J0.finished)a.destroy()}}}if(typeof Symbol==="function")Y.from=function(z0,a){if(H0===void 0)H0=gt();return H0(Y,z0,a)};function q0(z0,a){for(var J0=0,y0=z0.length;J0<y0;J0++)if(z0[J0]===a)return J0;return-1}}),Uc=iv(($,_)=>{_.exports=F;var I=p8().codes,J=I.ERR_METHOD_NOT_IMPLEMENTED,j=I.ERR_MULTIPLE_CALLBACK,G=I.ERR_TRANSFORM_ALREADY_TRANSFORMING,X=I.ERR_TRANSFORM_WITH_LENGTH_0,W=$O();i8()(F,W);function T(q,S){var k=this._transformState;k.transforming=!1;var y=k.writecb;if(y===null)return this.emit("error",new j);if(k.writechunk=null,k.writecb=null,S!=null)this.push(S);y(q);var m=this._readableState;if(m.reading=!1,m.needReadable||m.length<m.highWaterMark)this._read(m.highWaterMark)}function F(q){if(!(this instanceof F))return new F(q);if(W.call(this,q),this._transformState={afterTransform:T.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,q){if(typeof q.transform==="function")this._transform=q.transform;if(typeof q.flush==="function")this._flush=q.flush}this.on("prefinish",E)}function E(){var q=this;if(typeof this._flush==="function"&&!this._readableState.destroyed)this._flush(function(S,k){D(q,S,k)});else D(this,null,null)}F.prototype.push=function(q,S){return this._transformState.needTransform=!1,W.prototype.push.call(this,q,S)},F.prototype._transform=function(q,S,k){k(new J("_transform()"))},F.prototype._write=function(q,S,k){var y=this._transformState;if(y.writecb=k,y.writechunk=q,y.writeencoding=S,!y.transforming){var m=this._readableState;if(y.needTransform||m.needReadable||m.length<m.highWaterMark)this._read(m.highWaterMark)}},F.prototype._read=function(q){var S=this._transformState;if(S.writechunk!==null&&!S.transforming)S.transforming=!0,this._transform(S.writechunk,S.writeencoding,S.afterTransform);else S.needTransform=!0},F.prototype._destroy=function(q,S){W.prototype._destroy.call(this,q,function(k){S(k)})};function D(q,S,k){if(S)return q.emit("error",S);if(k!=null)q.push(k);if(q._writableState.length)throw new X;if(q._transformState.transforming)throw new G;return q.push(null)}}),Ct=iv(($,_)=>{_.exports=J;var I=Uc();i8()(J,I);function J(j){if(!(this instanceof J))return new J(j);I.call(this,j)}J.prototype._transform=function(j,G,X){X(null,j)}}),wt=iv(($,_)=>{var I;function J(k){var y=!1;return function(){if(y)return;y=!0,k.apply(void 0,arguments)}}var j=p8().codes,G=j.ERR_MISSING_ARGS,X=j.ERR_STREAM_DESTROYED;function W(k){if(k)throw k}function T(k){return k.setHeader&&typeof k.abort==="function"}function F(k,y,m,n){n=J(n);var h=!1;if(k.on("close",function(){h=!0}),I===void 0)I=EP();I(k,{readable:y,writable:m},function(s){if(s)return n(s);h=!0,n()});var i=!1;return function(s){if(h)return;if(i)return;if(i=!0,T(k))return k.abort();if(typeof k.destroy==="function")return k.destroy();n(s||new X("pipe"))}}function E(k){k()}function D(k,y){return k.pipe(y)}function q(k){if(!k.length)return W;if(typeof k[k.length-1]!=="function")return W;return k.pop()}function S(){for(var k=arguments.length,y=Array(k),m=0;m<k;m++)y[m]=arguments[m];var n=q(y);if(Array.isArray(y[0]))y=y[0];if(y.length<2)throw new G("streams");var h,i=y.map(function(s,j0){var I0=j0<y.length-1,H0=j0>0;return F(s,I0,H0,function(L0){if(!h)h=L0;if(L0)i.forEach(E);if(I0)return;i.forEach(E),n(h)})});return y.reduce(D)}_.exports=S}),Ic=iv(($,_)=>{var I=E8();$=_.exports=jc(),$.Stream=I||$,$.Readable=$,$.Writable=_c(),$.Duplex=$O(),$.Transform=Uc(),$.PassThrough=Ct(),$.finished=EP(),$.pipeline=wt()}),Xc=iv(($)=>{var _=ek(),I=i8(),J=Ic(),j=$.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},G=$.IncomingMessage=function(X,W,T,F){var E=this;if(J.Readable.call(E),E._mode=T,E.headers={},E.rawHeaders=[],E.trailers={},E.rawTrailers=[],E.on("end",function(){process.nextTick(function(){E.emit("close")})}),T==="fetch"){let n=function(){S.read().then(function(h){if(E._destroyed)return;if(F(h.done),h.done){E.push(null);return}E.push(Buffer.from(h.value)),n()}).catch(function(h){if(F(!0),!E._destroyed)E.emit("error",h)})};var D=n;if(E._fetchResponse=W,E.url=W.url,E.statusCode=W.status,E.statusMessage=W.statusText,W.headers.forEach(function(h,i){E.headers[i.toLowerCase()]=h,E.rawHeaders.push(i,h)}),_.writableStream){var q=new WritableStream({write:function(h){return F(!1),new Promise(function(i,s){if(E._destroyed)s();else if(E.push(Buffer.from(h)))i();else E._resumeFetch=i})},close:function(){if(F(!0),!E._destroyed)E.push(null)},abort:function(h){if(F(!0),!E._destroyed)E.emit("error",h)}});try{W.body.pipeTo(q).catch(function(h){if(F(!0),!E._destroyed)E.emit("error",h)});return}catch(h){}}var S=W.body.getReader();n()}else{E._xhr=X,E._pos=0,E.url=X.responseURL,E.statusCode=X.status,E.statusMessage=X.statusText;var k=X.getAllResponseHeaders().split(/\r?\n/);if(k.forEach(function(n){var h=n.match(/^([^:]+):\s*(.*)/);if(h){var i=h[1].toLowerCase();if(i==="set-cookie"){if(E.headers[i]===void 0)E.headers[i]=[];E.headers[i].push(h[2])}else if(E.headers[i]!==void 0)E.headers[i]+=", "+h[2];else E.headers[i]=h[2];E.rawHeaders.push(h[1],h[2])}}),E._charset="x-user-defined",!_.overrideMimeType){var y=E.rawHeaders["mime-type"];if(y){var m=y.match(/;\s*charset=([^;])(;|$)/);if(m)E._charset=m[1].toLowerCase()}if(!E._charset)E._charset="utf-8"}}};I(G,J.Readable),G.prototype._read=function(){var X=this,W=X._resumeFetch;if(W)X._resumeFetch=null,W()},G.prototype._onXHRProgress=function(X){var W=this,T=W._xhr,F=null;switch(W._mode){case"text":if(F=T.responseText,F.length>W._pos){var E=F.substr(W._pos);if(W._charset==="x-user-defined"){var D=Buffer.alloc(E.length);for(var q=0;q<E.length;q++)D[q]=E.charCodeAt(q)&255;W.push(D)}else W.push(E,W._charset);W._pos=F.length}break;case"arraybuffer":if(T.readyState!==j.DONE||!T.response)break;F=T.response,W.push(Buffer.from(new Uint8Array(F)));break;case"moz-chunked-arraybuffer":if(F=T.response,T.readyState!==j.LOADING||!F)break;W.push(Buffer.from(new Uint8Array(F)));break;case"ms-stream":if(F=T.response,T.readyState!==j.LOADING)break;var S=new globalThis.MSStreamReader;S.onprogress=function(){if(S.result.byteLength>W._pos)W.push(Buffer.from(new Uint8Array(S.result.slice(W._pos)))),W._pos=S.result.byteLength},S.onload=function(){X(!0),W.push(null)},S.readAsArrayBuffer(F);break}if(W._xhr.readyState===j.DONE&&W._mode!=="ms-stream")X(!0),W.push(null)}}),Nt=iv(($,_)=>{var I=ek(),J=i8(),j=Xc(),G=Ic(),X=j.IncomingMessage,W=j.readyStates;function T(q,S){if(I.fetch&&S)return"fetch";else if(I.mozchunkedarraybuffer)return"moz-chunked-arraybuffer";else if(I.msstream)return"ms-stream";else if(I.arraybuffer&&q)return"arraybuffer";else return"text"}var F=_.exports=function(q){var S=this;if(G.Writable.call(S),S._opts=q,S._body=[],S._headers={},q.auth)S.setHeader("Authorization","Basic "+Buffer.from(q.auth).toString("base64"));Object.keys(q.headers).forEach(function(m){S.setHeader(m,q.headers[m])});var k,y=!0;if(q.mode==="disable-fetch"||"requestTimeout"in q&&!I.abortController)y=!1,k=!0;else if(q.mode==="prefer-streaming")k=!1;else if(q.mode==="allow-wrong-content-type")k=!I.overrideMimeType;else if(!q.mode||q.mode==="default"||q.mode==="prefer-fast")k=!0;else throw Error("Invalid value for opts.mode");S._mode=T(k,y),S._fetchTimer=null,S._socketTimeout=null,S._socketTimer=null,S.on("finish",function(){S._onFinish()})};J(F,G.Writable),F.prototype.setHeader=function(q,S){var k=this,y=q.toLowerCase();if(D.indexOf(y)!==-1)return;k._headers[y]={name:q,value:S}},F.prototype.getHeader=function(q){var S=this._headers[q.toLowerCase()];if(S)return S.value;return null},F.prototype.removeHeader=function(q){var S=this;delete S._headers[q.toLowerCase()]},F.prototype._onFinish=function(){var q=this;if(q._destroyed)return;var S=q._opts;if("timeout"in S&&S.timeout!==0)q.setTimeout(S.timeout);var k=q._headers,y=null;if(S.method!=="GET"&&S.method!=="HEAD")y=new Blob(q._body,{type:(k["content-type"]||{}).value||""});var m=[];if(Object.keys(k).forEach(function(s){var j0=k[s].name,I0=k[s].value;if(Array.isArray(I0))I0.forEach(function(H0){m.push([j0,H0])});else m.push([j0,I0])}),q._mode==="fetch"){var n=null;if(I.abortController){var h=new AbortController;if(n=h.signal,q._fetchAbortController=h,"requestTimeout"in S&&S.requestTimeout!==0)q._fetchTimer=globalThis.setTimeout(function(){if(q.emit("requestTimeout"),q._fetchAbortController)q._fetchAbortController.abort()},S.requestTimeout)}globalThis.fetch(q._opts.url,{method:q._opts.method,headers:m,body:y||void 0,mode:"cors",credentials:S.withCredentials?"include":"same-origin",signal:n}).then(function(s){q._fetchResponse=s,q._resetTimers(!1),q._connect()},function(s){if(q._resetTimers(!0),!q._destroyed)q.emit("error",s)})}else{var i=q._xhr=new globalThis.XMLHttpRequest;try{i.open(q._opts.method,q._opts.url,!0)}catch(s){process.nextTick(function(){q.emit("error",s)});return}if("responseType"in i)i.responseType=q._mode;if("withCredentials"in i)i.withCredentials=!!S.withCredentials;if(q._mode==="text"&&"overrideMimeType"in i)i.overrideMimeType("text/plain; charset=x-user-defined");if("requestTimeout"in S)i.timeout=S.requestTimeout,i.ontimeout=function(){q.emit("requestTimeout")};if(m.forEach(function(s){i.setRequestHeader(s[0],s[1])}),q._response=null,i.onreadystatechange=function(){switch(i.readyState){case W.LOADING:case W.DONE:q._onXHRProgress();break}},q._mode==="moz-chunked-arraybuffer")i.onprogress=function(){q._onXHRProgress()};i.onerror=function(){if(q._destroyed)return;q._resetTimers(!0),q.emit("error",Error("XHR error"))};try{i.send(y)}catch(s){process.nextTick(function(){q.emit("error",s)});return}}};function E(q){try{var S=q.status;return S!==null&&S!==0}catch(k){return!1}}F.prototype._onXHRProgress=function(){var q=this;if(q._resetTimers(!1),!E(q._xhr)||q._destroyed)return;if(!q._response)q._connect();q._response._onXHRProgress(q._resetTimers.bind(q))},F.prototype._connect=function(){var q=this;if(q._destroyed)return;q._response=new X(q._xhr,q._fetchResponse,q._mode,q._resetTimers.bind(q)),q._response.on("error",function(S){q.emit("error",S)}),q.emit("response",q._response)},F.prototype._write=function(q,S,k){var y=this;y._body.push(q),k()},F.prototype._resetTimers=function(q){var S=this;if(globalThis.clearTimeout(S._socketTimer),S._socketTimer=null,q)globalThis.clearTimeout(S._fetchTimer),S._fetchTimer=null;else if(S._socketTimeout)S._socketTimer=globalThis.setTimeout(function(){S.emit("timeout")},S._socketTimeout)},F.prototype.abort=F.prototype.destroy=function(q){var S=this;if(S._destroyed=!0,S._resetTimers(!0),S._response)S._response._destroyed=!0;if(S._xhr)S._xhr.abort();else if(S._fetchAbortController)S._fetchAbortController.abort();if(q)S.emit("error",q)},F.prototype.end=function(q,S,k){var y=this;if(typeof q==="function")k=q,q=void 0;G.Writable.prototype.end.call(y,q,S,k)},F.prototype.setTimeout=function(q,S){var k=this;if(S)k.once("timeout",S);k._socketTimeout=q,k._resetTimers(!1)},F.prototype.flushHeaders=function(){},F.prototype.setNoDelay=function(){},F.prototype.setSocketKeepAlive=function(){};var D=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"]}),Bt=iv(($,_)=>{_.exports=J;var I=Object.prototype.hasOwnProperty;function J(){var j={};for(var G=0;G<arguments.length;G++){var X=arguments[G];for(var W in X)if(I.call(X,W))j[W]=X[W]}return j}}),St=iv(($,_)=>{_.exports=(SL(),X1(wK)).STATUS_CODES}),kt=iv(($)=>{var _=Nt(),I=Xc(),J=Bt(),j=St(),G=(MP(),X1(AP)),X=$;X.request=function(W,T){if(typeof W==="string")W=G.parse(W);else W=J(W);var F=globalThis.location.protocol.search(/^https?:$/)===-1?"http:":"",E=W.protocol||F,D=W.hostname||W.host,q=W.port,S=W.path||"/";if(D&&D.indexOf(":")!==-1)D="["+D+"]";W.url=(D?E+"//"+D:"")+(q?":"+q:"")+S,W.method=(W.method||"GET").toUpperCase(),W.headers=W.headers||{};var k=new _(W);if(T)k.on("response",T);return k},X.get=function(W,T){var F=X.request(W,T);return F.end(),F},X.ClientRequest=_,X.IncomingMessage=I.IncomingMessage,X.Agent=function(){},X.Agent.defaultMaxSockets=4,X.globalAgent=new X.Agent,X.STATUS_CODES=j,X.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}),Gc=Et(kt(),1),{request:ct,get:xt,ClientRequest:ft,IncomingMessage:yt,Agent:bt,globalAgent:ht,STATUS_CODES:mt,METHODS:ut}=Gc.default,Yc=Gc.default});var zc={};_j(zc,{isIPv6:()=>TP,isIPv4:()=>VP,isIP:()=>Jc,default:()=>Qc});function VP($){return nt.test($)}function TP($){return it.test($)}function Jc($){if(VP($))return 4;if(TP($))return 6;return 0}var nt,it,Qc;var RP=GX(()=>{nt=new RegExp("^(?:(?: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])$"),it=new RegExp("^(?:(?:(?:[0-9a-fA-F]{1,4}):){7}(?:(?:[0-9a-fA-F]{1,4})|:)|(?:(?:[0-9a-fA-F]{1,4}):){6}(?:(?:(?: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])|:(?:[0-9a-fA-F]{1,4})|:)|(?:(?:[0-9a-fA-F]{1,4}):){5}(?::(?:(?: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])|(?::(?:[0-9a-fA-F]{1,4})){1,2}|:)|(?:(?:[0-9a-fA-F]{1,4}):){4}(?:(?::(?:[0-9a-fA-F]{1,4})){0,1}:(?:(?: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])|(?::(?:[0-9a-fA-F]{1,4})){1,3}|:)|(?:(?:[0-9a-fA-F]{1,4}):){3}(?:(?::(?:[0-9a-fA-F]{1,4})){0,2}:(?:(?: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])|(?::(?:[0-9a-fA-F]{1,4})){1,4}|:)|(?:(?:[0-9a-fA-F]{1,4}):){2}(?:(?::(?:[0-9a-fA-F]{1,4})){0,3}:(?:(?: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])|(?::(?:[0-9a-fA-F]{1,4})){1,5}|:)|(?:(?:[0-9a-fA-F]{1,4}):){1}(?:(?::(?:[0-9a-fA-F]{1,4})){0,4}:(?:(?: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])|(?::(?:[0-9a-fA-F]{1,4})){1,6}|:)|(?::(?:(?::(?:[0-9a-fA-F]{1,4})){0,5}:(?:(?: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])|(?::(?:[0-9a-fA-F]{1,4})){1,7}|:)))(?:%[0-9a-zA-Z-.:]{1,})?$");Qc={isIPv4:VP,isIPv6:TP,isIP:Jc}});var Lc=eU((nJ0,Jo)=>{Jo.exports={"//":"GENERATED by scripts/pack-facts.ts — do not hand-edit. Compiled from each pack's `pack: TwinPack` descriptor; pack-facts.test.ts fails on drift.",packs:{ahrefs:{adoption:{pypi:[],sdks:["@ahrefs/mcp"],scopes:["@ahrefs/"],envStems:["AHREFS"]},hosts:[{host:"api.ahrefs.com"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["target","usage","cache","audit"],serveExport:"createAhrefsTwinServer"},"ai-gateway":{adoption:{pypi:[],sdks:["@ai-sdk/gateway"],envStems:["AIGATEWAY"]},hostsNone:"SDK is base-URL-configured (@ai-sdk/gateway baseURL / AI_GATEWAY_BASE_URL) — worlds wire the twin through explicit endpoint config; no injector entry grounded yet",archetype:"generative",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["generation"],serveExport:"createAiGatewayTwinServer"},airtable:{adoption:{pypi:["pyairtable","airtable-python-wrapper"],sdks:["airtable"],envStems:["AIRTABLE"]},hosts:[{host:"api.airtable.com"}],archetype:"crud",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["base","table","record","comment"],endpointEnvNone:"the injector intercepts api.airtable.com (see `hosts`), which covers every client with no env at all; AIRTABLE_ENDPOINT_URL is real (Airtable.default_config(), airtable@0.12.2) but injecting it alongside interception is the strictly narrower answer — one wiring, not two.",serveExport:"createAirtableTwinServer"},algolia:{adoption:{pypi:["algoliasearch"],sdks:["algoliasearch"],envStems:["ALGOLIA","ALGOLIAWRITE"]},hostsNone:"per-app-ID host scheme ({appId}.algolia.net / {appId}-dsn.algolia.net / {appId}-N.algolianet.com, see the pack README §Host tolerance) — no fixed host list to match; the host-tolerant twin is wired by explicit client host config",archetype:"crud",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["index","record","synonym","settings"],serveExport:"createAlgoliaTwinServer"},anthropic:{adoption:{pypi:["anthropic","claude-agent-sdk","claude-code-sdk"],sdks:["@anthropic-ai/sdk","@ai-sdk/anthropic","@anthropic-ai/vertex-sdk","@anthropic-ai/bedrock-sdk","@anthropic-ai/claude-agent-sdk"],scopes:["@anthropic-ai/"],envStems:["ANTHROPIC","CLAUDE"]},hosts:[{host:"api.anthropic.com"}],archetype:"generative",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["message_batch","file","agent","environment","session","vault","vault_credential","memory_store","memory","memory_version","deployment","deployment_run","skill","webhook_secret"],serveExport:"createAnthropicTwinServer"},assemblyai:{adoption:{pypi:["assemblyai"],sdks:["assemblyai"],envStems:["ASSEMBLYAI"]},hosts:[{host:"api.assemblyai.com"}],archetype:"generative",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["transcript","upload"],serveExport:"createAssemblyAITwinServer"},aws:{adoption:{pypi:["boto3","botocore","aioboto3","aiobotocore"],sdks:["@aws-sdk/client-s3","@aws-sdk/s3-request-presigner","@aws-sdk/lib-storage","@aws-sdk/client-dynamodb","@aws-sdk/lib-dynamodb","@aws-sdk/client-timestream-write","@aws-sdk/client-timestream-query","aws-sdk","@aws-sdk/client-sesv2","@aws-sdk/client-secrets-manager","@aws-sdk/client-bedrock-runtime","@aws-sdk/client-bedrock","@ai-sdk/amazon-bedrock"],envStems:["AWS","S3","LANGFUSELLMCONNECTIONBEDROCK"],worldIds:["s3","dynamodb","timestream","timestreamwrite","timestreamquery","sesv2","secretsmanager","bedrock"]},hosts:[{key:"s3",host:"s3.amazonaws.com"},{key:"s3",suffix:".s3.amazonaws.com"},{key:"s3",hostPattern:"^s3[.-][a-z0-9-]+\\.amazonaws\\.com$"},{key:"s3",hostPattern:"\\.s3[.-][a-z0-9-]+\\.amazonaws\\.com$"},{key:"s3",hostPattern:"^s3\\.dualstack\\.[a-z0-9-]+\\.amazonaws\\.com$"},{key:"s3",hostPattern:"\\.s3\\.dualstack\\.[a-z0-9-]+\\.amazonaws\\.com$"},{key:"s3",suffix:".s3-accelerate.amazonaws.com"},{key:"s3",suffix:".s3-accelerate.dualstack.amazonaws.com"},{key:"dynamodb",hostPattern:"^dynamodb\\.[a-z0-9-]+\\.amazonaws\\.com$"},{key:"timestream",hostPattern:"(^|\\.)(ingest|query)\\.timestream\\.[a-z0-9-]+\\.amazonaws\\.com$"},{key:"sesv2",hostPattern:"^email\\.[a-z0-9-]+\\.amazonaws\\.com$"},{key:"secretsmanager",hostPattern:"^secretsmanager(-fips)?\\.[a-z0-9-]+\\.amazonaws\\.com$"},{key:"bedrock",hostPattern:"^bedrock(-runtime)?(-fips)?\\.[a-z0-9-]+\\.(amazonaws\\.com|api\\.aws)$"}],archetype:"signed-protocol",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resourcesUnreachable:{foundation_model:"the account catalog: pulled from ListFoundationModels, never created by a caller"},resources:["bucket","object","multipart_upload","table","item","database","record","message","secret","invocation","foundation_model","identity"],serveExport:"createAwsTwinServer"},axiom:{adoption:{sdks:["@axiomhq/js","@axiomhq/logging","@axiomhq/nextjs"],pypi:["axiom-py"],envStems:["AXIOM"]},hosts:[{host:"api.axiom.co"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["dataset","event"],endpointEnvNone:"no env var: @axiomhq/js reads its base URL only from the `url` constructor option (httpClient.ts:33,45) and Dub constructs `new Axiom({ token })` with none, so interception is the hosts entry above; an AXIOM_URL no client reads would be invented surface.",serveExport:"createAxiomTwinServer"},azure:{adoption:{pypi:["azure-storage-blob","azure-ai-inference"],sdks:["@azure/storage-blob","@azure/openai","@azure-rest/ai-inference","@ai-sdk/azure"],envStems:["AZURE","AZUREOPENAI","AZUREGPT4OMINI","AZUREGPT5","AZUREGPT5MINI","AZUREGPT5NANO"]},hosts:[{suffix:".blob.core.windows.net"},{suffix:".openai.azure.com"},{suffix:".cognitiveservices.azure.com",pathPattern:"^/openai/"}],archetype:"crud",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["container","blob","block","deployment"],endpointEnvNone:"Host-based interception only. @azure/storage-blob is configured with a blob endpoint URL or a connection string (both resolving to <account>.blob.core.windows.net, which the injector rewrites), and reads no base-URL environment variable of its own — the same reason the aws pack declares none.",serveExport:"createAzureTwinServer"},azureformrecognizer:{adoption:{pypi:["azure-ai-documentintelligence","azure-ai-formrecognizer"],sdks:["@azure-rest/ai-document-intelligence","@azure/ai-form-recognizer"],envStems:["AZUREFORMRECOGNIZER","AZUREDOCUMENTINTELLIGENCE"]},hosts:[{suffix:".cognitiveservices.azure.com",pathPattern:"^/(documentintelligence|formrecognizer)/"}],archetype:"generative",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resourcesUnreachable:{model:"prebuilt models are the vendor's catalog; a custom model is born of a training job this twin does not run"},resources:["analysis","model"],serveExport:"createAzureFormRecognizerTwinServer"},bitly:{adoption:{pypi:[],envStems:["BITLY"]},hosts:[{host:"api-ssl.bitly.com"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["bitlink","group","organization","user","qr_code","campaign","channel","webhook","custom_bitlink","click"],endpointEnvNone:"no injector-free path: Bitly integrations hardcode https://api-ssl.bitly.com and the vendor documents no base-URL override, so interception is the hosts entry above; a BITLY_BASE_URL would be invented surface no app reads.",serveExport:"createBitlyTwinServer"},bluesky:{adoption:{sdks:["@atproto/api"],pypi:[],envStems:["BLUESKY","BSKY"]},hosts:[{host:"bsky.social",pathPattern:"^/xrpc/(com\\.atproto|app\\.bsky)\\."},{hostPattern:"^[a-z0-9-]+\\.[a-z0-9-]+\\.host\\.bsky\\.network$",pathPattern:"^/xrpc/(com\\.atproto|app\\.bsky)\\."},{host:"api.bsky.app",pathPattern:"^/xrpc/app\\.bsky\\.(actor|feed)\\."},{host:"public.api.bsky.app",pathPattern:"^/xrpc/app\\.bsky\\.(actor|feed)\\."},{host:"video.bsky.app",pathPattern:"^/(xrpc/app\\.bsky\\.video\\.|watch/)"},{host:"cdn.bsky.app",pathPattern:"^/img/"},{host:"bsky.app",pathPattern:"^/profile/[^/]+/?$|^/profile/[^/]+/post/[A-Za-z0-9._:~-]{1,512}/?$"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["account","post","follow","profile"],endpointEnvNone:"@atproto/api reads no base-URL environment variable (an AtpAgent takes its `service` URL in code, and the video service's is the social-app's constant), so a World reaches it through the hosts above; inventing a BLUESKY_BASE_URL the app never reads would report coverage the app does not have.",serveExport:"createBlueskyTwinServer"},calcom:{adoption:{pypi:[],envStems:["CALCOM","CAL"]},hosts:[{host:"api.cal.com"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["booking","event_type","schedule","team","membership","webhook","slot"],serveExport:"createCalcomTwinServer"},cerebras:{adoption:{sdks:["@cerebras/cerebras_cloud_sdk","@ai-sdk/cerebras"],envStems:["CEREBRAS"]},hosts:[{host:"api.cerebras.ai"}],archetype:"generative",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:[],endpointEnvNone:"The injector intercepts api.cerebras.ai (see `hosts`), so a world wires this pack through CEREBRAS_TWIN_URL rather than an app-read base-URL var. The SDK would honour CEREBRAS_BASE_URL, but the injector covers all of that traffic with zero app edits while an app-read env covers only clients constructed after the env lands — emitting both would quietly forgo interception.",serveExport:"createCerebrasTwinServer"},clerk:{adoption:{pypi:["clerk-backend-api"],sdks:["@clerk/backend","@clerk/clerk-sdk-node","@clerk/nextjs","@clerk/fastify","@clerk/express"],scopes:["@clerk/"],envStems:["CLERK"]},hosts:[{host:"api.clerk.com"},{suffix:".clerk.accounts.dev"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",assets:["client/clerk-js-dist","client/clerk.browser.js"],resources:["user","session","organization","organization_membership","organization_invitation","invitation","allowlist_identifier","blocklist_identifier","jwt_template","sign_in_token"],serveExport:"createClerkTwinServer"},cloudflare:{adoption:{pypi:["cloudflare"],tools:[{package:"wrangler",usage:"deployment"}],sdks:["cloudflare","aws4fetch"],envStems:["CLOUDFLARE"]},hosts:[{host:"api.cloudflare.com"},{host:"dash.cloudflare.com",pathPattern:"^/(login|_twin/users/|[0-9a-f]{32}/r2/|$)"},{suffix:".r2.cloudflarestorage.com"}],hostsClaimed:{door:"/twin/hosts",note:"the custom domains connected to R2 buckets"},archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["account","zone","cloudflare_tunnel","tunnel_configuration","dns_record","worker_script","worker_route","worker_domain","workers_subdomain","durable_object_namespace","r2_bucket","r2_custom_domain","hyperdrive_config","queue","queue_consumer","worker_version","worker_asset","worker_asset_upload_session"],serveExport:"createCloudflareTwinServer"},cohere:{adoption:{pypi:["cohere"],sdks:["cohere-ai","@ai-sdk/cohere"],envStems:["COHERE","CO"]},hosts:[{host:"api.cohere.com"},{host:"api.cohere.ai"}],archetype:"generative",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["dataset","connector","embed_job","token"],endpointEnvNone:"neither official SDK reads a base-URL env var: cohere-ai@8.1.0 takes the override as the `baseUrl`/`environment` CONSTRUCTOR option and reads only CO_API_KEY from the environment (auth/BearerAuthProvider.js), and @ai-sdk/cohere@4.0.35 takes `options.baseURL` and reads only COHERE_API_KEY. Interception is host-based on api.cohere.com and api.cohere.ai; inventing a COHERE_BASE_URL nothing reads would make `covers` claim a world it does not cover.",serveExport:"createCohereTwinServer"},currencyapi:{adoption:{sdks:["@everapi/currencyapi-js"],pypi:["currencyapicom"],envStems:["CURRENCYAPI"]},hosts:[{host:"api.currencyapi.com"},{host:"app.currencyapi.com",pathPattern:"^/(register|login|dashboard|subscription)(/|$)"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["_account","_api_key","_usage","_web_session"],endpointEnvNone:"currencyapi's clients hardcode https://api.currencyapi.com/v3 (@everapi/currencyapi-js index.js `baseUrl`, dubinc/dub apps/web/lib/currencyapi/client.ts `baseUrl`) and read no base-URL env; interception is the hosts above.",serveExport:"createCurrencyapiTwinServer"},daily:{adoption:{envStems:["DAILY"]},hosts:[{host:"api.daily.co"},{hostPattern:"^[a-z0-9][a-z0-9-]*\\.daily\\.co$"},{host:"c.daily.co",exclude:!0},{host:"gs.daily.co",exclude:!0},{host:"www.daily.co",exclude:!0},{host:"dashboard.daily.co",exclude:!0},{host:"docs.daily.co",exclude:!0},{host:"help.daily.co",exclude:!0},{host:"status.daily.co",exclude:!0},{host:"blog.daily.co",exclude:!0},{host:"pipecat.daily.co",exclude:!0},{host:"reference-python.daily.co",exclude:!0},{host:"reference-ios.daily.co",exclude:!0},{host:"reference-android.daily.co",exclude:!0}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["Room","Meeting","Recording","Transcript","BatchJob","Webhook","_domain","_delivery","_receiver"],endpointEnvNone:"Daily's REST clients hardcode https://api.daily.co/v1 (Cal.com packages/app-store/dailyvideo/lib/dailyApiFetcher.ts) and read no base-URL env; interception is the hosts above.",serveExport:"createDailyTwinServer"},datadog:{adoption:{pypi:["datadog","datadog-api-client","ddtrace"],sdks:["@datadog/datadog-api-client","@datadog/browser-rum","@datadog/browser-logs","dd-trace"],scopes:["@datadog/"],envStems:["DATADOG","DD"]},hosts:[{host:"datadoghq.com"},{suffix:".datadoghq.com"},{host:"datadoghq.eu"},{suffix:".datadoghq.eu"},{host:"ddog-gov.com"},{suffix:".ddog-gov.com"},{hostPattern:"^([a-z0-9-]+\\.)?browser-intake-(?:[a-z0-9]+-)?(?:datadoghq\\.(?:com|eu)|ddog-gov\\.com)$"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["org","rum_application","rum_event","log","metric_series","metric_def","service_check","event","monitor","dashboard","host","slo","downtime","api_key","user"],serveExport:"createDatadogTwinServer"},deepgram:{adoption:{pypi:["deepgram-sdk"],sdks:["@deepgram/sdk"],envStems:["DEEPGRAM"]},hosts:[{host:"api.deepgram.com"}],archetype:"generative",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resourcesUnreachable:{project:"the tenant itself: born with the account, never created through the API"},resources:["project","key","request"],serveExport:"createDeepgramTwinServer"},deepinfra:{adoption:{sdks:["deepinfra","@ai-sdk/deepinfra"],envStems:["DEEPINFRA"]},hosts:[{host:"api.deepinfra.com"}],archetype:"generative",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resourcesUnreachable:{model:"the vendor catalog",rate_limit:"the account ledger the vendor keeps; read-only"},resources:["model","file","batch","rate_limit"],endpointEnvNone:"the deepinfra SDK exposes no base-URL env: DeepInfraClient takes the endpoint URL as a constructor argument (the modelName IS the full URL) and reads only DEEPINFRA_API_KEY; interception is the hosts above.",serveExport:"createDeepinfraTwinServer"},deepseek:{adoption:{pypi:[],sdks:["@ai-sdk/deepseek"],envStems:["DEEPSEEK"]},hosts:[{host:"api.deepseek.com"}],archetype:"generative",protocol:{major:1,standing:"deprecated"},transport:"rest",resourcesUnreachable:{model:"the vendor catalog",balance:"the account ledger the vendor keeps; read-only"},resources:["model","file","balance","cache_prefix"],endpointEnvNone:"no app-read endpoint env: @ai-sdk/deepseek — the only first-party npm client of this surface — reads exactly one environment variable (DEEPSEEK_API_KEY, via loadApiKey in src/deepseek-provider.ts) and takes baseURL as a constructor option, so there is no vendor-documented base-URL var to inject. The injector covers api.deepseek.com instead (see `hosts`). NextChat's DEEPSEEK_URL is one application's own convention, not vendor surface, and claiming it would report a world covered while the SDK-based majority still reached the real vendor.",serveExport:"createDeepSeekTwinServer"},discord:{adoption:{sdks:["discord.js","@discordjs/rest","@discordjs/core","@discordjs/builders","discord-api-types"],pypi:["discord.py","discord"],envStems:["DISCORD"]},hosts:[{host:"discord.com",pathPattern:"^/api/"},{host:"discord.com",pathPattern:"^/(oauth2/authorize|login)/?$"},{host:"gateway.discord.gg"},{host:"discordapp.com",pathPattern:"^/api/"}],archetype:"crud",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["application","application_command","ban","channel","guild","interaction_response","invite","member","message","oauth_grant","role","user","webhook"],endpointEnvNone:"no Discord client reads a base-URL env var — discord.js takes `api` as a REST constructor option and discord.py hardcodes its Route base, so interception is the `hosts` entries above. Inventing a DISCORD_BASE_URL would report coverage the app could not use.",serveExport:"createDiscordTwinServer"},dynadot:{adoption:{pypi:[],envStems:["DYNADOT"]},hosts:[{host:"api.dynadot.com"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["domain","account"],serveExport:"createDynadotTwinServer"},elevenlabs:{adoption:{pypi:["elevenlabs"],sdks:["elevenlabs","@elevenlabs/elevenlabs-js"],scopes:["@elevenlabs/"],envStems:["ELEVENLABS"]},hosts:[{host:"api.elevenlabs.io"}],archetype:"generative",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["voice","generated_voice","pronunciation_dictionary","dubbing","history_item"],serveExport:"createElevenLabsTwinServer"},expo:{adoption:{sdks:["expo-server-sdk"],pypi:["exponent-server-sdk"],envStems:["EXPO"]},hosts:[{host:"exp.host"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["push_device","push_ticket"],endpointEnvNone:"expo-server-sdk-node DOES read EXPO_BASE_URL (src/ExpoClientValues.ts builds both push URLs from process.env['EXPO_BASE_URL'] || 'https://exp.host'), but this pack claims exp.host in `hosts`, so interception is host-based and zero-edit; emitting the var would forgo that. Point EXPO_BASE_URL at the twin by hand only when running outside an injected world.",serveExport:"createExpoTwinServer"},fal:{adoption:{pypi:["fal-client","fal"],sdks:["@fal-ai/client","@fal-ai/serverless-client"],scopes:["@fal-ai/"],envStems:["FAL"]},hostsNone:"host-split surface (fal.run / queue.fal.run) with no injector entry grounded yet — worlds wire the twin via the client's explicit endpoint config; a visible gap until its hosts are grounded here",archetype:"generative",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["request","signing_key"],serveExport:"createFalTwinServer"},figma:{adoption:{pypi:[],sdks:["figma-api","@figma/rest-api-spec"],scopes:["@figma/"],envStems:["FIGMA"]},hostsNone:'no injector entry grounded yet — the pack README wires clients at the twin by base URL ("nothing changed but the base URL"); zero-edit interception of api.figma.com is a visible gap until grounded here',archetype:"crud",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["file","comment","version","project","team","user","credential"],serveExport:"createFigmaTwinServer"},firecrawl:{adoption:{pypi:["firecrawl-py","firecrawl"],sdks:["@mendable/firecrawl-js","firecrawl"],scopes:["@mendable/"],envStems:["FIRECRAWL","S2SFIRECRAWLINTEGRATIONSTOFIRECRAWL"]},hosts:[{host:"api.firecrawl.dev"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["document","crawl","audit"],serveExport:"createFirecrawlTwinServer"},fireworks:{adoption:{pypi:["fireworks-ai"],sdks:["@ai-sdk/fireworks"],envStems:["FIREWORKS"]},hosts:[{host:"api.fireworks.ai"}],archetype:"generative",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resourcesUnreachable:{account:"the vendor’s own account row (one per credential, not creatable through the API)",quota:"vendor-assigned limits (read-only in the API; the twin derives them from the account)",serverlessModel:"the vendor catalog (serverless models are curated by Fireworks, not created by callers)"},resources:["deployment","dataset","batchInferenceJob","supervisedFineTuningJob","user","apiKey","secret","model"],endpointEnvNone:"The injector intercepts api.fireworks.ai (see `hosts`), so a world wires this pack through FIREWORKS_TWIN_URL rather than an app-read base-URL var. The `fireworks` Python client would honour FIREWORKS_BASE_URL, but @ai-sdk/fireworks — the dominant client in this repo’s demand census — takes its baseURL as a constructor option and reads no such env, so an app-read var would cover only half the traffic while disabling the interception that covers all of it.",serveExport:"createFireworksTwinServer"},fly:{adoption:{pypi:[],sdks:["fly-admin"],envStems:["FLY"]},hosts:[{host:"api.machines.dev"},{host:"_api.internal"}],archetype:"engine-control",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["app","machine","volume","secret"],serveExport:"createFlyTwinServer"},gcs:{adoption:{pypi:["google-cloud-storage"],sdks:["@google-cloud/storage"],envStems:["GCS","GOOGLECLOUDSTORAGE"]},hosts:[{host:"storage.googleapis.com"},{suffix:".storage.googleapis.com"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["bucket","object","upload"],serveExport:"createGcsTwinServer"},gemini:{adoption:{pypi:["google-genai","google-generativeai"],sdks:["@ai-sdk/google","@ai-sdk/google-vertex","@google/genai","@google/generative-ai","@google-cloud/vertexai"],envStems:["GEMINI","GOOGLEGENAI","GOOGLEGENERATIVEAI","GOOGLEGEMINI","GOOGLEVERTEX"],worldIds:["googlegenai","googleauth"]},hosts:[{host:"generativelanguage.googleapis.com"},{host:"aiplatform.googleapis.com"},{suffix:"-aiplatform.googleapis.com"},{key:"googleauth",host:"oauth2.googleapis.com"},{key:"googleauth",host:"www.googleapis.com",pathPattern:"^/(token|oauth2/v4/token)/?$"}],archetype:"generative",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["file","cached_content"],serveExport:"createGeminiTwinServer"},github:{adoption:{pypi:["pygithub"],sdks:["@octokit/rest","@octokit/core","octokit","@octokit/auth-app","@octokit/auth-oauth-app","@octokit/auth-oauth-device","@octokit/graphql","@octokit/webhooks"],scopes:["@octokit/"],envStems:["GITHUB","GH","BACKENDGITHUB","INFAPPCONNECTIONGITHUBAPP","INFAPPCONNECTIONGITHUBOAUTH","INFAPPCONNECTIONGITHUBRADARAPP","APPSMITHOAUTH2GITHUB"]},hosts:[{host:"api.github.com"},{host:"uploads.github.com",pathPattern:"^/repos/[^/]+/[^/]+/releases/\\d+/assets$"},{host:"github.com",pathPattern:"^/[^/]+/[^/]+/(info/refs|git-upload-pack|git-receive-pack)$"},{host:"github.com",pathPattern:"^/login/oauth/(authorize|access_token)$"},{host:"github.com",pathPattern:"^/(login|session|sessions/two-factor(/app)?)$"},{host:"github.com",pathPattern:"^/apps/[^/]+/installations/new$"},{host:"github.com",pathPattern:"^/(organizations/[^/]+/)?settings/apps/new$"},{host:"npm.pkg.github.com",pathPattern:"^/@"}],archetype:"engine-control",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["pull_request","pull_request_review","pull_request_review_comment","issue","issue_comment","repository","branch","git_ref"],serveExport:"createGithubTwinServer"},googleads:{adoption:{sdks:["google-ads-api","google-ads-node"],pypi:["google-ads"],envStems:["GOOGLEADS","GOOGLEADSDEVELOPER"]},hosts:[{host:"googleads.googleapis.com"},{host:"datamanager.googleapis.com"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["customer","customer_client_link","conversion_action","click_conversion","ingest_request"],endpointEnvNone:"no Google Ads client exposes an HTTP base-URL override: google-ads-api builds the host into the request literally, google-ads-python's `endpoint` is a gRPC host:port for its transport channel, and Dub hardcodes the host in a raw fetch. Interception is host-based.",serveExport:"createGoogleAdsTwinServer"},googlecalendar:{adoption:{sdks:["@googleapis/calendar"],pypi:[],envStems:["GOOGLECALENDAR"]},hosts:[{host:"www.googleapis.com",pathPattern:"^/(batch/)?calendar/v3(/|$)"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["Calendar","CalendarListEntry","Event"],endpointEnvNone:"@googleapis/calendar and googleapis read no base-URL variable: the root URL is the Discovery document's `https://www.googleapis.com/` unless the caller passes `rootUrl` (Inbox Zero reads its own GOOGLE_BASE_URL for that); interception is the host rule above.",serveExport:"createGooglecalendarTwinServer"},googlemaps:{adoption:{pypi:["googlemaps"],sdks:["@googlemaps/google-maps-services-js"],scopes:["@googlemaps/"],envStems:["GOOGLEMAPS"]},hosts:[{host:"maps.googleapis.com"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["geocode","audit"],serveExport:"createGoogleMapsTwinServer"},googleoauth:{adoption:{pypi:["google-auth","google-auth-oauthlib"],sdks:["google-auth-library","@googleapis/oauth2"],envStems:["GOOGLE","GOOGLEOAUTH","GOOGLEOIDC","AUTHGOOGLE","AUTHGOOGLEOAUTH2","BACKENDGOOGLE","GOOGLEIOS","GOOGLELOGIN","GOOGLEWEB","NEXTPRIVATEGOOGLE","SSOGOOGLEOAUTH2","APPSMITHOAUTH2GOOGLE"]},archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["oauth_client","account","auth_request","authorization_code","access_token","refresh_token","grant"],serveExport:"createGoogleOAuthTwinServer"},groq:{adoption:{pypi:["groq"],sdks:["groq-sdk","@ai-sdk/groq"],envStems:["GROQ"]},hosts:[{host:"api.groq.com"}],archetype:"generative",protocol:{major:1,standing:"deprecated"},transport:"rest",resourcesUnreachable:{model:"the vendor catalog"},resources:["file","batch","model"],endpointEnvNone:"The injector intercepts api.groq.com (see `hosts`), so a world wires this pack through GROQ_TWIN_URL rather than an app-read base-URL var. groq-sdk would honour GROQ_BASE_URL, but @ai-sdk/groq — the dominant client in this repo's demand census — takes its baseURL as a constructor option and reads no such env, so an app-read var would cover only half the traffic while disabling the interception that covers all of it.",serveExport:"createGroqTwinServer"},hubspot:{adoption:{pypi:["hubspot-api-client"],sdks:["@hubspot/api-client"],envStems:["HUBSPOT","HUBSPOTPRIVATEAPP"]},hosts:[{host:"api.hubapi.com"},{host:"app.hubspot.com"},{host:"api.hsforms.com"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resourcesUnreachable:{owner:"a portal user provisioned in HubSpot's admin, never through the CRM API"},resources:["crm_object","property","property_group","pipeline","association","owner"],endpointEnvNone:"the @hubspot/api-client SDK takes its base URL from the `basePath` CONSTRUCTOR option (IConfiguration.basePath → ApiClientConfigurator.getBaseServer), not from any environment variable — it reads no process.env at all, and HubSpot documents no base-URL env var. Interception is the api.hubapi.com host entry; inventing a HUBSPOT_BASE_URL the app does not read would report a world covered while its traffic still left the machine.",serveExport:"createHubspotTwinServer"},inngest:{adoption:{pypi:["inngest"],sdks:["inngest"],envStems:["INNGEST"]},hostsNone:"SDK is base-URL-configured by design (options.baseUrl / INNGEST_BASE_URL / INNGEST_EVENT_API_BASE_URL, verified in the pack README) — worlds wire the twin through those vars",archetype:"crud",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["event","function","run","step","signing_key"],endpointEnv:{name:"INNGEST_BASE_URL",templates:{INNGEST_EVENT_API_BASE_URL:"${url}"},note:"no injector entry: the inngest SDK is base-URL-configured through INNGEST_BASE_URL / INNGEST_EVENT_API_BASE_URL."},serveExport:"createInngestTwinServer"},instagram:{adoption:{envStems:["INSTAGRAM"]},hosts:[{host:"graph.facebook.com",pathPattern:"^(?:/v\\d+\\.\\d+)?/(?:me|\\d{1,25})(?:/(?:media|media_publish|content_publishing_limit))?/?$|^/_twin/"},{host:"graph.instagram.com",pathPattern:"^(?:/v\\d+\\.\\d+)?/(?:me|\\d{1,25})(?:/(?:media|media_publish|content_publishing_limit))?/?$|^/_twin/"},{host:"rupload.facebook.com",pathPattern:"^/ig-api-upload/"},{host:"scontent.cdninstagram.com",pathPattern:"^/(?:o1/v/t16/f2/m86/|v/t51\\.(?:71878-15|2885-19)/)"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["ig_user","media"],endpointEnvNone:"Meta ships no Instagram Platform client that reads a base-URL environment variable: apps call https://graph.facebook.com/<version>/… and the rupload host by constant, so a World reaches them through the hosts above; inventing an INSTAGRAM_BASE_URL the app never reads would report coverage the app does not have.",serveExport:"createInstagramTwinServer"},intercom:{adoption:{pypi:["python-intercom"],sdks:["intercom-client"],envStems:["INTERCOM"]},hosts:[{host:"api.intercom.io"},{host:"api.eu.intercom.io"},{host:"api.au.intercom.io"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["contact","conversation","message","event","data_attribute","admin","tag","note","company","segment"],serveExport:"createIntercomTwinServer"},jira:{adoption:{pypi:["jira"],sdks:["jira.js"],envStems:["JIRA","ATLASSIAN"]},hosts:[{host:"atlassian.net"},{suffix:".atlassian.net"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resourcesUnreachable:{oauthtoken:"issued by Atlassian's OAuth authorization server, outside the REST API"},resources:["person","issue","comment","issuelink","attachment","worklog","watcher","vote","project","component","version","sprint","filter","dashboard","gadget","webhook","oauthtoken"],serveExport:"createJiraTwinServer"},langfuse:{adoption:{pypi:["langfuse"],sdks:["langfuse","langfuse-node"],envStems:["LANGFUSE"]},hosts:[{host:"cloud.langfuse.com"},{host:"us.cloud.langfuse.com"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["project","api_key","trace","observation","session","score","score_config","prompt","dataset","dataset_item","dataset_run","dataset_run_item","model","comment","annotation_queue","annotation_queue_item","media","llm_connection","ingestion_event"],serveExport:"createLangfuseTwinServer"},linear:{adoption:{pypi:[],sdks:["@linear/sdk"],scopes:["@linear/"],envStems:["LINEAR"]},hosts:[{host:"api.linear.app"}],archetype:"crud",protocol:{major:1,standing:"deprecated"},transport:"graphql",resourcesUnreachable:{project:"born of the vendor's projectCreate mutation, which this twin does not model yet — pulled only",cycle:"born of the vendor's cycleCreate mutation, which this twin does not model yet — pulled only",user:"a workspace member, born of an invite flow outside the API",workflowState:"born with the team's workflow; the API reads them"},resources:["issue","team","project","cycle","user","label","workflowState","comment","notification"],serveExport:"createDerivedLinearTwinServer"},linkedin:{adoption:{sdks:["linkedin-api-client"],pypi:["linkedin-api-client"],envStems:["LINKEDIN"]},hosts:[{host:"api.linkedin.com",pathPattern:"^(?:/rest/(?:posts|images|videos|organizationAcls|organizations|organizationsLookup|networkSizes)(?:/[^/]+)?/?|/v2/userinfo/?)$|^/_twin/"},{host:"www.linkedin.com",pathPattern:"^/dms-uploads/"},{host:"media.licdn.com",pathPattern:"^/dms/image/"},{host:"dms.licdn.com",pathPattern:"^/playlist/"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["organization","member","organization_acl","token","post"],endpointEnvNone:"linkedin-api-client takes no base-URL environment variable (its RestliClient builds https://api.linkedin.com/rest URLs from a constant), so a World reaches it through the hosts above; inventing a LINKEDIN_BASE_URL the app never reads would report coverage the app does not have.",serveExport:"createLinkedinTwinServer"},livekit:{adoption:{pypi:["livekit-api","livekit","livekit-agents"],sdks:["livekit-server-sdk","@livekit/rtc-node"],scopes:["@livekit/"],envStems:["LIVEKIT"]},hostsNone:"real local media plane (livekit-server) exposed via app-read env (LIVEKIT_URL is ws:// — WebSocket media is outside the HTTP injector's reach)",archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["room","participant","egress","ingress","sip_inbound_trunk","sip_outbound_trunk","sip_dispatch_rule","sip_participant","agent_dispatch"],serveExport:"createLiveKitTwinServer"},mailgun:{adoption:{pypi:["mailgun"],sdks:["mailgun.js"],envStems:["MAILGUN"]},hosts:[{host:"api.mailgun.net"},{host:"api.eu.mailgun.net"}],archetype:"crud",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["domain","message","event","bounce","complaint","unsubscribe","whitelist","webhook","route","mailing_list","list_member","template","template_version","api_key","tag","account"],endpointEnvNone:"the mailgun.js SDK reads no environment variable of its own — verified in the shipped v14.0.0 bundle: `MAILGUN` occurs zero times, and every `process.env` hit belongs to bundled axios (proxy vars) or `debug` (DEBUG). The base URL is the constructor `url` option, so no app-read endpoint env exists to inject; redirection is via the `hosts` injector entries.",serveExport:"createMailgunTwinServer"},mapbox:{adoption:{pypi:["mapbox"],sdks:["@mapbox/mapbox-sdk"],scopes:["@mapbox/"],envStems:["MAPBOX"]},hosts:[{host:"api.mapbox.com"}],archetype:"crud",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["geocode","dataset","dsfeature","style","token","tileset","upload"],serveExport:"createMapboxTwinServer"},mistral:{adoption:{pypi:["mistralai"],sdks:["@mistralai/mistralai","@ai-sdk/mistral"],envStems:["MISTRAL"]},hosts:[{host:"api.mistral.ai"},{host:"api.eu.mistral.ai"},{host:"api.us.mistral.ai"}],archetype:"generative",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["file","batch_job","agent","conversation","conversation_entry"],serveExport:"createMistralTwinServer"},mixpanel:{adoption:{pypi:["mixpanel"],sdks:["mixpanel","mixpanel-browser"]},hosts:[{host:"api.mixpanel.com"},{host:"api-eu.mixpanel.com"},{host:"api-in.mixpanel.com"},{host:"api-js.mixpanel.com"},{host:"data.mixpanel.com"},{host:"data-eu.mixpanel.com"},{host:"data-in.mixpanel.com"},{host:"mixpanel.com"}],archetype:"crud",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["event","profile","identity","alias"],serveExport:"createMixpanelTwinServer"},mongodb:{adoption:{pypi:[],sdks:[]},hostsNone:"RAW-PROTOCOL pack — there is no host to map. MongoDB clients speak the wire protocol over a raw TCP socket to whatever host the connection string names, which the injector (http/fetch patching) cannot see; a World reaches this twin through the connection string itself (MONGO_URI and its kin), which World-managed infrastructure injects.",archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"raw-tcp",resources:["collection","index","document"],endpointEnvNone:"no vendor base-URL variable: the application reads its own connection-string variable (MONGO_URI, MONGODB_URL, DATABASE_URL, …), and World-managed infrastructure (`volter-world init` → `volter-world-infra`) injects that variable pointing at this twin's listener.",serveExport:"createMongodbTwinServer"},moonshot:{adoption:{pypi:[],sdks:[],envStems:["MOONSHOT"]},hosts:[{host:"api.moonshot.ai"}],archetype:"generative",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resourcesUnreachable:{model:"the vendor catalog",balance:"the account ledger the vendor keeps; read-only"},resources:["file","batch","balance","model"],endpointEnvNone:"Moonshot ships no SDK of its own; its documented clients (the standard openai/anthropic SDKs) take their base URL as a constructor option and read no MOONSHOT_BASE_URL env, so an app-read var would cover only env-configured callers while disabling the api.moonshot.ai interception that covers all traffic.",serveExport:"createMoonshotTwinServer"},notion:{adoption:{pypi:["notion-client"],sdks:["@notionhq/client"],scopes:["@notionhq/"],envStems:["NOTION"]},hostsNone:"no injector entry grounded yet — worlds point @notionhq/client at the twin via its baseUrl option; zero-edit interception of api.notion.com is a visible gap until grounded here",archetype:"crud",protocol:{major:1,standing:"deprecated"},transport:"rest",resourcesUnreachable:{user:"a workspace member, born of the workspace admin, read-only through the API"},resources:["page","block","database","comment","user","webhook"],serveExport:"createNotionTwinServer"},"npm-registry":{adoption:{pypi:[],envStems:["NPM"]},hosts:[{host:"registry.npmjs.org"},{host:"npm.pkg.github.com"}],archetype:"crud",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["package","tarball","advisory"],serveExport:"createNpmRegistryTwinServer"},"oa-treasury":{adoption:{pypi:[],envStems:["MODELPROXY","MODELPROXYADMIN","AGENTPROXY","AGENTPROXYADMIN","AGENTPROXYHMAC"]},hosts:[{hostPattern:"^volter-agent-model-proxy\\.[a-z0-9.-]+\\.workers\\.dev$"},{host:"open-autonomy.org"},{host:"www.open-autonomy.org"}],archetype:"crud",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["account","supplier","coupon","reserve","run","rail"],serveExport:"createOaTreasuryTwinServer"},openai:{adoption:{pypi:["openai","openai-agents"],sdks:["openai","@ai-sdk/openai"],envStems:["OPENAI","APOPENAI","OPENAIMODERATION","REWORKDPLATFORMOPENAI"]},hosts:[{host:"api.openai.com"},{host:"platform.openai.com",pathPattern:"^/(settings/proj[-_][^/]+/api-keys|login$)"}],archetype:"generative",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["file","batch","fine_tuning_job","vector_store","vector_store_file","response","chat_completion"],serveExport:"createOpenAITwinServer"},openrouter:{adoption:{pypi:["openrouter"],sdks:["@openrouter/ai-sdk-provider"],scopes:["@openrouter/"],envStems:["OPENROUTER","OR"]},hosts:[{host:"openrouter.ai"}],archetype:"generative",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["generation","api_key","byok","preset"],serveExport:"createOpenRouterTwinServer"},openweather:{adoption:{pypi:["pyowm"],sdks:["openweather-api-node"],envStems:["OPENWEATHER","OPENWEATHERMAP"]},hosts:[{host:"api.openweathermap.org"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["observation","audit"],serveExport:"createOpenWeatherTwinServer"},paypal:{adoption:{sdks:["paypal-rest-sdk"],pypi:["paypalrestsdk"],envStems:["PAYPAL"]},hosts:[{host:"api.paypal.com",pathPattern:"^/v1/(?:oauth2/token/?$|identity/openidconnect/|payments/payouts(?:-item)?(?:/|$)|notifications/)|^/_twin/"},{host:"api-m.paypal.com",pathPattern:"^/v1/(?:oauth2/token/?$|identity/openidconnect/|payments/payouts(?:-item)?(?:/|$)|notifications/)|^/_twin/"},{host:"api.sandbox.paypal.com",pathPattern:"^/v1/(?:oauth2/token/?$|identity/openidconnect/|payments/payouts(?:-item)?(?:/|$)|notifications/)|^/_twin/"},{host:"api-m.sandbox.paypal.com",pathPattern:"^/v1/(?:oauth2/token/?$|identity/openidconnect/|payments/payouts(?:-item)?(?:/|$)|notifications/)|^/_twin/"},{host:"www.paypal.com",pathPattern:"^/signin/authorize/?$|^/connect/?$|^/webapps/auth/protocol/openidconnect/|^/_twin/"},{host:"www.sandbox.paypal.com",pathPattern:"^/signin/authorize/?$|^/connect/?$|^/webapps/auth/protocol/openidconnect/|^/_twin/"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["oauth_client","account","session","auth_request","authorization_code","access_token","refresh_token","payout_batch","payout_item","webhook","webhook_event"],endpointEnvNone:"no PayPal client reads a base-URL env var — paypal-rest-sdk takes mode: sandbox|live, the current @paypal server SDK takes an Environment enum, and the motivating app computes its host from NODE_ENV — so interception is the host entries above.",serveExport:"createPaypalTwinServer"},perplexity:{adoption:{pypi:["perplexityai"],sdks:["@ai-sdk/perplexity"],envStems:["PERPLEXITY"]},hosts:[{host:"api.perplexity.ai"}],archetype:"generative",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["async_request"],endpointEnvNone:"@ai-sdk/perplexity — the dominant client in the 2026-08-31-b demand census — takes its baseURL as a constructor option and reads NO base-URL environment variable (perplexity-provider.ts: `withoutTrailingSlash(options.baseURL ?? 'https://api.perplexity.ai')`, and `loadApiKey` reads only PERPLEXITY_API_KEY). Perplexity documents no base-URL env var for any client, so there is nothing to inject; a fabricated PERPLEXITY_BASE_URL would let `covers` call a world covered while the app kept calling api.perplexity.ai. The injector intercepts that host (see `hosts`) instead.",serveExport:"createPerplexityTwinServer"},pinecone:{adoption:{pypi:["pinecone","pinecone-client"],sdks:["@pinecone-database/pinecone"],scopes:["@pinecone-database/"],envStems:["PINECONE"]},hostsNone:"control/data host split with per-index data-plane hostnames ({index}-{project}.svc.{env}.pinecone.io, see the pack README) — SDK is pointed at the twin by explicit host config",archetype:"crud",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["index","collection","vector"],serveExport:"createPineconeTwinServer"},plain:{adoption:{pypi:[],sdks:["@team-plain/typescript-sdk"],scopes:["@team-plain/"],envStems:["PLAIN","NEXTPRIVATEPLAIN"]},hosts:[{host:"core-api.uk.plain.com"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"graphql",resourcesUnreachable:{company:"born of the vendor's createCompany mutation, which this twin does not model (no manifest entry) — pulled only",customerGroup:"born of createCustomerGroup, filed as todo plain.customergroups.op_create — pulled only",customerGroupMembership:"born of addCustomerToCustomerGroups over a group the twin cannot create yet — pulled only",workspace:"the tenant itself",user:"a workspace member, born of an invite",machineUser:"born in the workspace settings UI"},resources:["workspace","user","machineUser","customer","company","tenant","customerGroup","customerGroupMembership","thread","label","labelType","threadField","timelineEntry","note","customerEvent","webhookTarget","attachment"],serveExport:"createPlainTwinServer"},planetscale:{adoption:{pypi:[],sdks:["@planetscale/database"],envStems:["PLANETSCALE"]},hosts:[{suffix:".psdb.cloud"},{host:"api.planetscale.com",pathPattern:"^/v1/organizations(/|$)"},{host:"app.planetscale.com",pathPattern:"^/(sign-in|[^/]+/settings/service-tokens)(/|$)"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",nativeTransport:{protocol:"mysql",flag:"--mysql",upstreamEnv:"PLANETSCALE_TWIN_URL"},resources:["table","row","_session","_backup"],endpointEnv:{name:"PLANETSCALE_TWIN_URL",templates:{PLANETSCALE_DATABASE_URL:"http://twin:twin@${host}:${port}"},note:"the @planetscale/database client reads PLANETSCALE_DATABASE_URL and honours http:; the injector also redirects *.psdb.cloud."},prismaAdapter:{adapter:"@prisma/adapter-planetscale",export:"PrismaPlanetScale",urlEnv:"PLANETSCALE_DATABASE_URL"},serveExport:"createPlanetscaleTwinServer"},polar:{adoption:{pypi:["polar-sdk"],sdks:["@polar-sh/sdk"],scopes:["@polar-sh/"],envStems:["POLAR"]},hosts:[{host:"api.polar.sh"},{host:"sandbox-api.polar.sh"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["customer","product","subscription","order","checkout","benefit","discount","meter","event","customer_session","webhook_endpoint"],serveExport:"createPolarTwinServer"},posthog:{adoption:{pypi:["posthog"],sdks:["posthog-node","posthog-js","@posthog/api-client","@posthog/react"],envStems:["POSTHOG","POSTHOGANALYTICS","POSTHOGPERSONAL","POSTHOGPROJECT","POSTHOGPUBLIC"]},hosts:[{host:"app.posthog.com"},{host:"us.posthog.com"},{host:"eu.posthog.com"},{suffix:".i.posthog.com"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["project","event","person","feature_flag","insight","cohort","experiment","annotation","dashboard","action","group","org_member","early_access_feature","event_definition","property_definition"],serveExport:"createPosthogTwinServer"},postmark:{adoption:{pypi:["postmarker"],sdks:["postmark"],envStems:["POSTMARK"]},hosts:[{host:"api.postmarkapp.com"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["message","bounce","template","message_stream","webhook","suppression","server","domain","sender_signature","inbound_rule"],serveExport:"createPostmarkTwinServer"},reddit:{adoption:{sdks:["snoowrap"],pypi:[],envStems:["REDDIT"]},hosts:[{host:"oauth.reddit.com",pathPattern:"^/(?:api/v1/me|api/submit|api/del|api/comment|api/info|api/media/asset|by_id/[^/]+|r/[^/]+/(?:about|new|api/info)|user/[^/]+/(?:about|submitted)|subreddits/mine/(?:moderator|contributor)|(?:r/[^/]+/)?comments/[a-z0-9]+(?:/[^/]*)?)(?:\\.json)?/?$|^/_twin/"},{host:"www.reddit.com",pathPattern:"^/api/v1/access_token$"},{host:"reddit-uploaded-media.s3-accelerate.amazonaws.com"},{host:"v.redd.it",pathPattern:"^/[a-z0-9]{13}/DASH_\\d{2,4}\\.mp4$"},{host:"preview.redd.it",pathPattern:"^/[a-z0-9]{13}\\.(?:png|jpg|gif)$"},{host:"i.redd.it",pathPattern:"^/[a-z0-9]{13}\\.(?:png|jpg|gif)$"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["user","subreddit","link","comment"],endpointEnvNone:"reddit clients take no base-URL environment variable (snoowrap and PRAW build https://oauth.reddit.com and https://www.reddit.com URLs from constants or explicit constructor options), so a World reaches them through the hosts above; inventing a REDDIT_BASE_URL the app never reads would report coverage the app does not have.",serveExport:"createRedditTwinServer"},redis:{adoption:{},hostsNone:"RAW-PROTOCOL pack — there is no host to map. Redis's protocol runs over a TCP socket the injector (which patches http/fetch) never sees, and a Redis has no vendor hostname: it is wherever the app's REDIS_URL points. The World points it here: init classifies REDIS_URL as managed infrastructure and the managed redis service is this twin.",archetype:"crud",protocol:{major:1,standing:"deprecated"},transport:"raw-tcp",resources:["key","field","member","scored","entry","script"],endpointEnvNone:"Redis clients read no base-URL env of their own: the app passes its REDIS_URL (or host/port) to ioredis or node-redis itself, and init emits that REDIS_URL for the managed redis service (world-runtime/src/init.ts), not as a twin endpoint env.",serveExport:"createRedisTwinServer"},replicate:{adoption:{pypi:["replicate"],sdks:["replicate","@ai-sdk/replicate"],envStems:["REPLICATE","REWORKDPLATFORMREPLICATE"]},hostsNone:"no injector entry grounded yet — worlds wire the twin via the SDK's explicit baseUrl config; zero-edit interception of api.replicate.com is a visible gap until its hosts are grounded here",archetype:"generative",protocol:{major:1,standing:"deprecated"},transport:"rest",resourcesUnreachable:{model_version:"born of `cog push`, never of the HTTP API; pulled"},resources:["prediction","model","model_version","webhook_secret"],serveExport:"createReplicateTwinServer"},resend:{adoption:{pypi:["resend"],sdks:["resend"],envStems:["RESEND","NEXTPRIVATERESEND"]},hosts:[{host:"api.resend.com"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["email","audience","contact","domain","api_key"],serveExport:"createResendTwinServer"},runhuman:{adoption:{sdks:["runhuman"]},hosts:[{host:"runhuman.com",pathPattern:"^/api/"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["organization","project","api_key","user","tester_profile","job","pipeline_run"],endpointEnv:{name:"RUNHUMAN_API_URL",note:"grounded in volter-ai/runhuman packages/cli/src/lib/config.ts, which overrides the CLI apiUrl from RUNHUMAN_API_URL; RH2 reads its human-marketplace base URL from the provider row spec.url instead, which a rehearsal World sets to this same twin URL."},serveExport:"createRunhumanTwinServer"},scrapecreators:{adoption:{pypi:[],sdks:["@scrapecreators/cli"],envStems:["SCRAPECREATORS"]},hosts:[{host:"api.scrapecreators.com"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["profile","content","cache","account","usage"],serveExport:"createScrapeCreatorsTwinServer"},segment:{adoption:{pypi:["segment-analytics-python","analytics-python"],sdks:["@segment/analytics-node"],envStems:["SEGMENT"]},hosts:[{host:"api.segment.io"},{host:"events.eu1.segmentapis.com"},{host:"oauth2.segment.io"},{host:"oauth2.eu1.segmentapis.com"}],archetype:"crud",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["event","identity","group","dropped"],serveExport:"createSegmentTwinServer"},sendblue:{adoption:{pypi:["sendblue"],sdks:["sendblue"],envStems:["SENDBLUE"]},hostsNone:"no injector entry grounded yet — worlds wire the twin via explicit client endpoint config; a visible gap until its host is grounded here",archetype:"crud",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["message","credential"],serveExport:"createSendblueTwinServer"},sendgrid:{adoption:{pypi:["sendgrid"],sdks:["@sendgrid/mail","@sendgrid/client"],envStems:["SENDGRID","SENDGRIDSYNC"]},hosts:[{host:"api.sendgrid.com"},{host:"api.eu.sendgrid.com"},{host:"email.twilio.com"}],archetype:"crud",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["message"],serveExport:"createSendgridTwinServer"},sentry:{adoption:{pypi:["sentry-sdk"],sdks:["@sentry/node","@sentry/browser","@sentry/react","@sentry/nextjs","@sentry/vue","@sentry/sveltekit","@sentry/astro","@sentry/remix","@sentry/electron","@sentry/react-native"],scopes:["@sentry/"],envStems:["SENTRY","APPSMITHSENTRY"]},hosts:[{host:"sentry.io"},{suffix:".ingest.sentry.io"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["organization","team","project","project_key","issue","event","event_attachment","session","project_ownership","codeowners","project_filter","release","release_file","deploy","alert_rule","metric_alert","org_integration"],serveExport:"createSentryTwinServer"},slack:{adoption:{worldIds:["slackapp"],pypi:["slack-sdk","slack-bolt","slackclient"],sdks:["@slack/web-api","@slack/bolt","@slack/webhook","@slack/oauth"],scopes:["@slack/"],envStems:["SLACK","SLACKBOTUSER"]},hosts:[{key:"slackapp",host:"slack.com",pathPattern:"^/api/apps\\.connections\\.open/?$"},{host:"slack.com"},{host:"www.slack.com"},{host:"api.slack.com"},{host:"hooks.slack.com",pathPattern:"^/services/"},{host:"avatars.slack-edge.com",pathPattern:"^/T[A-Za-z0-9-]+/(([UWA][A-Za-z0-9-]+|icon)_[0-9]{1,4}\\.png|[UW][A-Za-z0-9-]+-[0-9a-f]{12}_([0-9]{1,4}|original)\\.(png|gif))$"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"web-api",resources:["channel","user","message","file","audit"],serveExport:"createSlackTwinServer"},smtp:{adoption:{pypi:["aiosmtplib"],sdks:["nodemailer","nodemailer-smtp-transport","emailjs"],envStems:["NEXTPRIVATESMTP"]},hostsNone:"RAW-PROTOCOL pack — there is no host to map. SMTP is a line protocol over a raw TCP socket, so the injector (which patches http/fetch) cannot see the traffic at all, and there is no vendor hostname either: the relay is whatever the operator names (smtp.gmail.com, email-smtp.us-east-1.amazonaws.com, localhost:1025 …). Interception is app-read env instead — the world injects SMTP_HOST/SMTP_PORT + EMAIL_SERVER/EMAIL_SERVER_HOST/EMAIL_SERVER_PORT at the twin's listener (APP_READ_ENDPOINT_ENV in world-runtime/src/init.ts), which is the ONLY thing every SMTP client is configured with. Same class as livekit's ws:// media plane, one layer further down.",archetype:"crud",protocol:{major:1,standing:"deprecated"},transport:"raw-tcp",resources:["message","relay"],serveExport:"createSmtpTwinServer"},snowflake:{adoption:{pypi:["snowflake-connector-python","snowflake","snowflake-snowpark-python","snowflake-sqlalchemy"],sdks:["snowflake-sdk"],envStems:["SNOWFLAKE"]},hosts:[{suffix:".snowflakecomputing.com"},{suffix:".snowflakecomputing.cn"}],archetype:"crud",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["database","schema","table","view","warehouse","session","query"],endpointEnvNone:"the snowflake-sdk takes its endpoint through createConnection()'s own account/host/accessUrl/protocol/port options or a connections.toml under SNOWFLAKE_HOME; it reads NO base-URL environment variable (verified against the packed snowflake-sdk@3.2.0 tarball, whose lib/ reads SNOWFLAKE_HOME, SNOWFLAKE_DEFAULT_CONNECTION_NAME, the SNOWFLAKE_DISABLE_*/SNOWFLAKE_CRL_*/SNOWFLAKE_RUNNING_INSIDE_SPCS switches, the SF_OCSP_*/SF_TELEMETRY_*/SF_CLIENT_CONFIG_FILE/SF_TEMPORARY_CREDENTIAL_CACHE_DIR debug and cache switches, the standard http_proxy family, and some non-Snowflake names like AWS_REGION/HOME - no base-URL variable of any kind). Interception is host-based via the .snowflakecomputing.com and .snowflakecomputing.cn suffix entries; a SNOWFLAKE_BASE_URL would be a var no app reads.",serveExport:"createSnowflakeTwinServer"},stigg:{adoption:{sdks:["@stigg/node-server-sdk","@stigg/react-sdk","@stigg/js-client-sdk","@stigg/api-client-js"],pypi:["stigg-api-client","stigg"],scopes:["@stigg/"],envStems:["STIGG","STIGGCLIENT"]},hosts:[{host:"api.stigg.io"},{host:"edge.api.stigg.io"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"graphql",resources:["product","plan","feature","packageEntitlement","price","customer","subscription","usageMeasurement","promotionalEntitlement","coupon","integration","hook"],endpointEnvNone:"the Stigg SDKs take their base URL as a constructor option (Stigg.initialize({ baseUri, baseEdgeUri })) and read NO env var for it. Verified by grep for process.env across the SDK dists: @stigg/node-server-sdk 4.55.0 (the version this pack pins and installs) and, in the consumer tree that motivated the pack, @stigg/node-server-sdk 4.2.0 and @stigg/js-client-sdk 3.67.0 — every one of them references only process.env.NODE_ENV. (The browser SDKs are NOT installed in this repo; that half of the evidence comes from ~/Code/Ponder and is therefore not re-checkable here, which is why both trees are named rather than one. §9 round 1 flagged the original citation for naming versions this repo does not carry.) Interception is by the api.stigg.io / edge.api.stigg.io host entries above.",serveExport:"createStiggTwinServer"},stream:{adoption:{pypi:["stream-chat"],sdks:["stream-chat"],envStems:["STREAM","GETSTREAM"]},hosts:[{host:"chat.stream-io-api.com"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["user","channel","message","channeltype","device","ban","mute","flag"],serveExport:"createStreamTwinServer"},stripe:{adoption:{pypi:["stripe"],sdks:["stripe"],envStems:["STRIPE","NEXTPRIVATESTRIPE"]},hosts:[{host:"api.stripe.com"},{host:"checkout.stripe.com",pathPattern:"^/c/pay/"},{host:"billing.stripe.com",pathPattern:"^/p/session/"},{host:"connect.stripe.com",pathPattern:"^/setup/|^/oauth/(authorize|token|deauthorize)/?$"},{host:"dashboard.stripe.com",pathPattern:"^/settings/public/?$|^/(test/)?settings/connect(/onboarding-options/oauth)?/?$"},{host:"verify.stripe.com",pathPattern:"^/start/"},{host:"js.stripe.com",pathPattern:"^/v3/financial-connections/|^/v3/?$|^/(v3|[a-z]+)/stripe\\.js$"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["charge","customer","payment_intent","setup_intent","payment_method","subscription","price","product","invoice","invoiceitem","refund","event"],serveExport:"createStripeTwinServer"},supabase:{adoption:{pypi:["supabase","gotrue","supabase-auth","postgrest","storage3","supafunc","realtime"],sdks:["@supabase/supabase-js"],scopes:["@supabase/"],envStems:["SUPABASE"],worldIds:["supabasemgmt"]},hosts:[{host:"api.supabase.com"},{suffix:".supabase.co",pathPattern:"^/(rest|storage|auth)/v1(/|$)"}],archetype:"engine-control",protocol:{major:1,standing:"deprecated"},transport:"rest",resourcesUnreachable:{access_token:"a personal access token minted in the dashboard; the twin only reads it as seeded state",network_ban:"born of the vendor's abuse detector",backup:"born of the vendor's scheduler"},resources:["organization","org_member","access_token","project","branch","config","secret","function","network_restrictions","network_ban","custom_hostname","read_replica","backup"],managedDatabase:{kind:"postgres",arg:"--database",note:"PostgREST, Storage and Auth are served over the application's own database: the World's managed postgres, the database its migrations and direct queries use"},serveExport:"createSupabaseTwinServer"},supermemory:{adoption:{pypi:["supermemory"],sdks:["supermemory"],envStems:["SUPERMEMORY"]},hosts:[{host:"api.supermemory.ai"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["document","setting"],serveExport:"createSupermemoryTwinServer"},svix:{adoption:{pypi:["svix"],sdks:["svix"],envStems:["SVIX"]},hosts:[{host:"api.svix.com"},{host:"api.us.svix.com"},{host:"api.eu.svix.com"},{host:"api.in.svix.com"},{host:"api.ca.svix.com"},{host:"api.au.svix.com"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["application","endpoint","message","message_attempt","event_type"],serveExport:"createSvixTwinServer"},tavily:{adoption:{sdks:["@tavily/core"],pypi:["tavily-python"],envStems:["TAVILY"]},hosts:[{host:"api.tavily.com"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["page","usage","log","research","keyless"],endpointEnvNone:"the @tavily/core SDK exposes no base-URL env var — it reads only TAVILY_API_KEY/TAVILY_HTTP(S)_PROXY/TAVILY_ORG_ID/TAVILY_PROJECT from process.env; base-URL override is the constructor option apiBaseURL (dist/index.mjs post()/get(): `apiBaseURL || BASE_URL`), so interception is the hosts entry above.",serveExport:"createTavilyTwinServer"},temporal:{adoption:{sdks:["@temporalio/client","@temporalio/worker","@temporalio/workflow","@temporalio/activity"],scopes:["@temporalio/"],pypi:["temporalio"],envStems:["TEMPORAL"]},hostsNone:"RAW-PROTOCOL pack — there is no host to map. The Temporal SDKs dial the frontend address they are configured with (Connection.connect / NativeConnection.connect `address`, conventionally TEMPORAL_ADDRESS) over gRPC, which the http/fetch injector never sees. Interception is the app-read address: the World injects TEMPORAL_ADDRESS=<host>:<port> at this twin (APP_READ_ENDPOINT_ENV in world-runtime/src/init.ts).",archetype:"engine-control",protocol:{declared:"2",major:2,standing:"current"},transport:"raw-tcp",resources:["workflow-execution","namespace"],serveExport:"createTemporalTwinServer"},tiktok:{adoption:{sdks:[],pypi:[],envStems:["TIKTOK"]},hosts:[{host:"www.tiktok.com",pathPattern:"^/v2/auth/authorize/?$|^/_twin/"},{host:"open.tiktokapis.com",pathPattern:"^/v2/(?:oauth/(?:token|revoke)|user/info|video/(?:list|query)|post/publish/(?:creator_info/query|video/init|inbox/video/init|status/fetch))/?$|^/_twin/"},{host:"open-upload.tiktokapis.com",pathPattern:"^/video/?$"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["oauth_client","account","session","auth_request","grant","video","publish"],endpointEnvNone:"no app-read base-URL env exists: TikTok publishes no official SDK with a base-URL option and integrations (Dub included) hardcode www.tiktok.com and open.tiktokapis.com, so interception is the path-scoped hosts entries above.",serveExport:"createTikTokTwinServer"},tinybird:{adoption:{pypi:["tinybird-python-sdk","tinybird-cli"],sdks:["@chronark/zod-bird"],scopes:["@chronark/zod-bird"],envStems:["TINYBIRD"]},hosts:[{host:"api.tinybird.co"},{hostPattern:"^api\\.[a-z0-9.-]+\\.tinybird\\.co$"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["datasource","pipe","event","token","job","tag"],serveExport:"createTinybirdTwinServer"},togetherai:{adoption:{sdks:["together-ai"],envStems:["TOGETHER"]},hosts:[{host:"api.together.ai"}],archetype:"generative",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resourcesUnreachable:{model:"the vendor catalog"},resources:["file","batch","finetune","model"],endpointEnv:{name:"TOGETHER_TWIN_URL",templates:{TOGETHER_API_BASE_URL:"${url}/v1"},note:"the injector covers api.together.ai, but together-ai's files.upload() reads TOGETHER_API_BASE_URL at module load and ignores client.baseURL (lib/upload.js:12) — the template points it at the twin's /v1 so the SDK upload flow does not egress to the real vendor."},serveExport:"createTogetheraiTwinServer"},tremendous:{adoption:{pypi:[],sdks:["tremendous"],envStems:["TREMENDOUS"]},hosts:[{host:"api.tremendous.com"},{host:"testflight.tremendous.com"}],archetype:"crud",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["order","reward","campaign","product","funding_source","invoice","topup","balance_txn","member","field","webhook","organization","settings"],serveExport:"createTremendousTwinServer"},tunnel:{adoption:{pypi:[],sdks:["@volter/tunnel"],envStems:["TUNNEL","VOLTERTUNNEL"]},hostsNone:"no injector entry by design: native cloudflared is an external binary, while @volter/tunnel opens a configurable WebSocket control channel and the CLI reads TUNNEL_SERVER_URL. Worlds wire that app-read endpoint directly; claiming api.trycloudflare.com in the Node injector would not redirect cloudflared and would falsely imply the Cloudflare edge data plane was twinned",archetype:"proxy",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["quick_tunnel","relay_tunnel","relay"],serveExport:"createTunnelTwinServer"},turbopuffer:{adoption:{sdks:["@turbopuffer/turbopuffer"],pypi:["turbopuffer"],scopes:["@turbopuffer/"],envStems:["TURBOPUFFER"]},hosts:[{hostPattern:"^(?:aws|gcp|azure)-[a-z0-9-]+\\.turbopuffer\\.com$"},{host:"turbopuffer.com",pathPattern:"^/(login|dashboard|_twin/users)(/|$)"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["namespace","document"],endpointEnv:{name:"TURBOPUFFER_TWIN_URL",templates:{TURBOPUFFER_BASE_URL:"${url}/{region}"},note:"grounded in @turbopuffer/turbopuffer@2.8.0 src/client.ts:253-288 (TURBOPUFFER_BASE_URL, {region} placeholder substitution) and internal/custom/fetch-node.ts (undici Agent.request under node, outside the injector); the injector also claims the regional *.turbopuffer.com hosts for fetch-based runtimes."},serveExport:"createTurbopufferTwinServer"},twelvelabs:{adoption:{pypi:["twelvelabs"],sdks:["twelvelabs-js"],envStems:["TWELVELABS"]},hosts:[{host:"api.twelvelabs.io"}],archetype:"generative",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["index","task","video"],serveExport:"createTwelvelabsTwinServer"},twilio:{adoption:{pypi:["twilio"],sdks:["twilio"],envStems:["TWILIO"]},hostsNone:"no injector entry grounded yet — worlds point the twilio SDK at the twin via explicit client config; zero-edit interception of the three real Twilio hosts (pack README §Coverage) is a visible gap until grounded here",archetype:"crud",protocol:{major:1,standing:"deprecated"},transport:"rest",resources:["message","verification","phone_number","signing_key"],serveExport:"createTwilioTwinServer"},upstash:{adoption:{pypi:["upstash-redis","upstash-ratelimit","qstash","upstash-workflow"],sdks:["@upstash/redis","@upstash/ratelimit","@upstash/qstash","@upstash/workflow"],scopes:["@upstash/redis","@upstash/ratelimit","@upstash/qstash","@upstash/workflow"],envStems:["UPSTASHREDIS","KVREST","QSTASH"]},hosts:[{suffix:".upstash.io"},{suffix:"-vector.upstash.io",exclude:!0},{host:"api.upstash.com",pathPattern:"^/v2/(redis|team|teams)(/|$)"},{host:"console.upstash.com",pathPattern:"^/(login|account/(api|teams)|qstash|invite)(/|$)"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["key"],endpointEnv:{name:"UPSTASH_TWIN_URL",templates:{QSTASH_URL:"${url}"},note:"@upstash/qstash and @upstash/workflow read QSTASH_URL; the injector also redirects *.upstash.io (Redis databases, QStash) to this twin."},serveExport:"createUpstashRedisTwinServer"},upstashvector:{adoption:{pypi:["upstash-vector"],sdks:["@upstash/vector"],scopes:["@upstash/vector"],envStems:["UPSTASHVECTOR"]},hosts:[{suffix:"-vector.upstash.io"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["vector","namespace","config"],serveExport:"createUpstashVectorTwinServer"},vercel:{adoption:{pypi:["vercel"],sdks:["@vercel/sdk","@vercel/edge-config"],envStems:["VERCEL"]},hosts:[{host:"api.vercel.com"},{host:"edge-config.vercel.com"},{host:"avatar.vercel.sh"},{host:"vercel.com",pathPattern:"^/(login|account/tokens)(/|$)"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["team","project","project_domain","domain","dns_record","env_var","edge_config","deployment","alias","auth_token"],serveExport:"createVercelTwinServer"},veriff:{adoption:{pypi:[],sdks:["@veriff/js-sdk"],scopes:["@veriff/"],envStems:["VERIFF"]},hosts:[{host:"stationapi.veriff.com"},{host:"api.veriff.me"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["session","attempt","media","delivery"],serveExport:"createVeriffTwinServer"},vital:{adoption:{pypi:["vital"],sdks:["@tryvital/vital-node"],scopes:["@tryvital/"],envStems:["VITAL"]},hosts:[{host:"api.tryvital.io"},{host:"api.sandbox.tryvital.io"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["user","order","appointment","webhook"],serveExport:"createVitalTwinServer"},volteridentity:{adoption:{sdks:["@volter/identity"],pypi:[],envStems:[]},hosts:[{host:"id.volter.ai"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["person","session","oauth_client","oauth_resource","client_resource","consent","authorization_code","access_token","refresh_token","device_code","organization","member","invitation"],endpointEnv:{name:"VOLTER_ISSUER",note:'grounded in the consumers: browser-substrate services/gateway/cloudflare/volter.ts (`VOLTER_ISSUER`, "the identity service, https://id.volter.ai") discovers the issuer from it, and Volter Teams is configured with `VOLTER_ISSUER` (volter-ai/identity ROADMAP I4); the twin is its own issuer, so discovery, tokens and redirects all name the injected URL.'},serveExport:"createVolterIdentityTwinServer"},webrisk:{adoption:{pypi:["google-cloud-webrisk"],sdks:["@google-cloud/web-risk"],envStems:["WEBRISK"]},hosts:[{host:"webrisk.googleapis.com"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["verdict","submission","operation","audit","iam_policy"],serveExport:"createWebRiskTwinServer"},x:{adoption:{pypi:["tweepy"],sdks:["twitter-api-v2"]},hosts:[{host:"api.x.com",pathPattern:"^/2/(?!(?:oauth2/(?:token|revoke)|users/me)/?$)|^/_twin/(?!assets/consent\\.(?:js|css)$)"},{host:"api.twitter.com",pathPattern:"^/2/(?!(?:oauth2/(?:token|revoke)|users/me)/?$)|^/_twin/(?!assets/consent\\.(?:js|css)$)"},{host:"x.com",pathPattern:"^/(?!_twin/)[A-Za-z0-9_]{1,15}/status/[0-9]{1,19}/?$|^/(?!(?:i|en|home|explore|notifications|messages|settings|search|compose|login|logout|signup|tos|privacy|about|account|intent|share|hashtag|lists|bookmarks|jobs|download|grok|premium|communities|creators|twin|_twin)/?$)[A-Za-z0-9_]{1,15}/?$"},{host:"twitter.com",pathPattern:"^/(?!_twin/)[A-Za-z0-9_]{1,15}/status/[0-9]{1,19}/?$|^/(?!(?:i|en|home|explore|notifications|messages|settings|search|compose|login|logout|signup|tos|privacy|about|account|intent|share|hashtag|lists|bookmarks|jobs|download|grok|premium|communities|creators|twin|_twin)/?$)[A-Za-z0-9_]{1,15}/?$"},{host:"www.x.com",pathPattern:"^/(?!_twin/)[A-Za-z0-9_]{1,15}/status/[0-9]{1,19}/?$|^/(?!(?:i|en|home|explore|notifications|messages|settings|search|compose|login|logout|signup|tos|privacy|about|account|intent|share|hashtag|lists|bookmarks|jobs|download|grok|premium|communities|creators|twin|_twin)/?$)[A-Za-z0-9_]{1,15}/?$"},{host:"www.twitter.com",pathPattern:"^/(?!_twin/)[A-Za-z0-9_]{1,15}/status/[0-9]{1,19}/?$|^/(?!(?:i|en|home|explore|notifications|messages|settings|search|compose|login|logout|signup|tos|privacy|about|account|intent|share|hashtag|lists|bookmarks|jobs|download|grok|premium|communities|creators|twin|_twin)/?$)[A-Za-z0-9_]{1,15}/?$"},{host:"mobile.twitter.com",pathPattern:"^/(?!_twin/)[A-Za-z0-9_]{1,15}/status/[0-9]{1,19}/?$|^/(?!(?:i|en|home|explore|notifications|messages|settings|search|compose|login|logout|signup|tos|privacy|about|account|intent|share|hashtag|lists|bookmarks|jobs|download|grok|premium|communities|creators|twin|_twin)/?$)[A-Za-z0-9_]{1,15}/?$"},{host:"mobile.x.com",pathPattern:"^/(?!_twin/)[A-Za-z0-9_]{1,15}/status/[0-9]{1,19}/?$|^/(?!(?:i|en|home|explore|notifications|messages|settings|search|compose|login|logout|signup|tos|privacy|about|account|intent|share|hashtag|lists|bookmarks|jobs|download|grok|premium|communities|creators|twin|_twin)/?$)[A-Za-z0-9_]{1,15}/?$"},{host:"pbs.twimg.com",pathPattern:"^/media/[0-9a-f]{64}\\.(?:jpg|png|gif|webp)$|^/ext_tw_video_thumb/[0-9]{1,19}/pu/img/[0-9a-f]{64}\\.svg$"},{host:"video.twimg.com",pathPattern:"^/ext_tw_video/[0-9]{1,19}/pu/vid/avc1/[0-9]+x[0-9]+/[0-9a-f]{64}\\.mp4$"},{host:"abs.twimg.com",pathPattern:"^/sticky/default_profile_images/default_profile_(?:normal|bigger|200x200|400x400)\\.png$"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["account","post","follow","rate_limit","_token"],serveExport:"createXTwinServer"},xai:{adoption:{pypi:["xai-sdk"],sdks:["@ai-sdk/xai"],envStems:["XAI","GROK"]},hosts:[{host:"api.x.ai"}],archetype:"generative",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resourcesUnreachable:{language_model:"the vendor catalog",model:"the vendor catalog"},resources:["deferred_completion","language_model","model","oauth_account","oauth_device_authorization","oauth_usage"],serveExport:"createXaiTwinServer"},xidentity:{adoption:{pypi:[],sdks:["@xdevplatform/xdk","twitter-api-sdk"],scopes:["@xdevplatform/"],envStems:["X","TWITTER"]},hosts:[{host:"x.com",pathPattern:"^/i/oauth2/authorize/?$|^/_twin/"},{host:"twitter.com",pathPattern:"^/i/oauth2/authorize/?$|^/_twin/"},{host:"api.x.com",pathPattern:"^/2/(?:oauth2/(?:token|revoke)|users/me)/?$|^/oauth/(?:request_token|authorize|authenticate|access_token)/?$|^/1\\.1/oauth/invalidate_token(?:\\.json)?/?$|^/_twin/assets/consent\\.(?:js|css)$"},{host:"api.twitter.com",pathPattern:"^/2/(?:oauth2/(?:token|revoke)|users/me)/?$|^/oauth/(?:request_token|authorize|authenticate|access_token)/?$|^/1\\.1/oauth/invalidate_token(?:\\.json)?/?$|^/_twin/assets/consent\\.(?:js|css)$"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["oauth_client","account","session","auth_request","grant","rate_window","oauth1_app","oauth1_token","oauth1_grant","_authorization_code","_access_token","_refresh_token","_oauth1_request_token","_client_secret","_code_challenge"],serveExport:"createXIdentityTwinServer"},youtube:{adoption:{pypi:[],sdks:["@googleapis/youtube"],envStems:["YOUTUBE"]},hosts:[{host:"youtube.googleapis.com"},{host:"www.googleapis.com",pathPattern:"^/(upload/)?youtube/v3(/|$)"}],archetype:"crud",protocol:{declared:"2",major:2,standing:"current"},transport:"rest",resources:["channel","video","playlist","playlistItem"],serveExport:"createYouTubeTwinServer"}},undeclared:[]}});var NK=eU((iJ0,Dc)=>{var Qo=($)=>typeof $==="string"&&(/^\/(o\/oauth2\/v2\/auth(\/oauthchooseaccount)?|o\/oauth2\/auth|o\/oauth2\/token|signin\/oauth\/error|\.well-known\/openid-configuration)\/?$/.test($)||/^\/_twin\//.test($)),zo=($)=>typeof $==="string"&&/^\/(token|oauth2\/v4\/token|revoke|tokeninfo|device\/code)\/?$/.test($),Zo=($)=>typeof $==="string"&&/^\/(oauth2\/(v1\/certs|v3\/(certs|userinfo)|v2\/userinfo)|userinfo\/v2\/me)\/?$/.test($),AG={googleoauth:($,_)=>$==="accounts.google.com"&&(_===void 0||Qo(_))||$==="oauth2.googleapis.com"&&(_===void 0||zo(_))||$==="www.googleapis.com"&&(_===void 0||Zo(_))||$==="openidconnect.googleapis.com",googlefavicon:($)=>$==="www.google.com"||$==="google.com"||$==="t2.gstatic.com",browserassets:($)=>$==="cdnjs.cloudflare.com"||$==="www.googletagmanager.com"||$==="www.google-analytics.com"||$==="connect.facebook.net"||$==="snap.licdn.com"||$==="px.ads.linkedin.com"||$==="static.hotjar.com"||$==="fonts.googleapis.com"||$==="fonts.gstatic.com"||$==="api.fontshare.com"||$==="images.subscribe.dev"||$==="www.youtube.com"||$==="www.youtube-nocookie.com"||$==="i.ytimg.com"};{let{packs:$}=Lc();for(let _ of Object.keys($)){let I=$[_].hosts;if(!I||I.length===0)continue;if(AG[_])throw Error(`inject: vendor "${_}" declares hosts on its pack descriptor AND in the hand VENDOR_HOSTS table — one home per fact; delete the hand entry.`);let J=new Map;for(let j of I){let G=j.key===void 0?_:j.key;if(!J.has(G))J.set(G,[]);J.get(G).push(j)}for(let[j,G]of J){if(AG[j])throw Error(`inject: key "${j}" (pack ${_}) is declared twice — on this descriptor and in the hand VENDOR_HOSTS table or another pack's descriptor; a key has one home.`);let X=(F)=>{if(["host","suffix","hostPattern"].filter((S)=>F[S]!==void 0).length!==1)throw Error(`inject: key "${j}" (pack ${_}) rule ${JSON.stringify(F)} — exactly one of host | suffix | hostPattern (pack-facts.json is hand-edited or stale)`);let D=F.hostPattern===void 0?null:new RegExp(F.hostPattern),q=F.pathPattern===void 0?null:new RegExp(F.pathPattern);return(S,k)=>(F.host!==void 0?S===F.host:F.suffix!==void 0?S.endsWith(F.suffix):D.test(S))&&(q===null||k===void 0||q.test(k))},W=G.filter((F)=>F.exclude!==!0).map(X),T=G.filter((F)=>F.exclude===!0).map(X);AG[j]=(F,E)=>W.some((D)=>D(F,E))&&!T.some((D)=>D(F,E))}}}function Oo($){let _=String($||"").toLowerCase().replace(/\.$/,"");return Object.keys(AG).some((I)=>AG[I](_))}function Lo($){let _=String($||"").toLowerCase().replace(/\.$/,"");return Object.keys(AG).filter((I)=>AG[I](_))}function Wc($){return String($).toUpperCase().replace(/[^A-Z0-9]/g,"_")}function Wo($){let _={};for(let I of Object.keys(AG)){let J=$[`${Wc(I)}_TWIN_URL`];if(J)_[I]=J.replace(/\/$/,"")}if($.TWIN_INJECT)for(let I of String($.TWIN_INJECT).split(",")){let J=I.indexOf("=");if(J<=0)continue;let j=I.slice(0,J).trim(),G=I.slice(J+1).trim();if(j&&G&&Object.hasOwn(AG,j))_[j]=G.replace(/\/$/,"")}return _}Dc.exports={VENDOR_HOSTS:AG,isVendorHost:Oo,vendorsOfHost:Lo,twinEnvStem:Wc,twinOrigins:Wo}});var Fc={};_j(Fc,{validateHeaderValue:()=>yo,validateHeaderName:()=>fo,setMaxIdleHTTPParsers:()=>xo,request:()=>co,maxHeaderSize:()=>ko,globalAgent:()=>So,get:()=>Bo,default:()=>bo,createServer:()=>No,ServerResponse:()=>wo,Server:()=>Co,STATUS_CODES:()=>go,OutgoingMessage:()=>qo,METHODS:()=>Po,IncomingMessage:()=>Ro,ClientRequest:()=>To,Agent:()=>Vo});var Do,Ko,Kc,Ho,Fo,Ao=($,_,I)=>{I=$!=null?Do(Ko($)):{};let J=_||!$||!$.__esModule?Kc(I,"default",{value:$,enumerable:!0}):I;for(let j of Ho($))if(!Fo.call(J,j))Kc(J,j,{get:()=>$[j],enumerable:!0});return J},Mo=($,_)=>()=>(_||$((_={exports:{}}).exports,_),_.exports),Eo,Hc,Vo,To,Ro,Po,qo,go,Co,wo,No,Bo,So,ko,co,xo,fo,yo,bo;var Ac=GX(()=>{Do=Object.create,{getPrototypeOf:Ko,defineProperty:Kc,getOwnPropertyNames:Ho}=Object,Fo=Object.prototype.hasOwnProperty,Eo=Mo(($,_)=>{var I=(SL(),X1(wK)),J=(MP(),X1(AP)),j=$;for(G in I)if(I.hasOwnProperty(G))j[G]=I[G];var G;j.request=function(W,T){return W=X(W),I.request.call(this,W,T)},j.get=function(W,T){return W=X(W),I.get.call(this,W,T)};function X(W){if(typeof W==="string")W=J.parse(W);if(!W.protocol)W.protocol="https:";if(W.protocol!=="https:")throw Error('Protocol "'+W.protocol+'" not supported. Expected "https:"');return W}}),Hc=Ao(Eo(),1),{Agent:Vo,ClientRequest:To,IncomingMessage:Ro,METHODS:Po,OutgoingMessage:qo,STATUS_CODES:go,Server:Co,ServerResponse:wo,createServer:No,get:Bo,globalAgent:So,maxHeaderSize:ko,request:co,setMaxIdleHTTPParsers:xo,validateHeaderName:fo,validateHeaderValue:yo}=Hc,bo=Hc});var xP={};_j(xP,{throws:()=>vs,strictEqual:()=>$s,strict:()=>ea,rejects:()=>sa,ok:()=>aa,notStrictEqual:()=>oa,notEqual:()=>ta,notDeepStrictEqual:()=>ra,notDeepEqual:()=>da,match:()=>la,ifError:()=>pa,fail:()=>ia,equal:()=>na,doesNotThrow:()=>ua,doesNotReject:()=>ma,doesNotMatch:()=>ha,default:()=>_s,deepStrictEqual:()=>ba,deepEqual:()=>ya,CallTracker:()=>fa,AssertionError:()=>xa});var ho,mo,Mc,uo,no,io=($,_,I)=>{I=$!=null?ho(mo($)):{};let J=_||!$||!$.__esModule?Mc(I,"default",{value:$,enumerable:!0}):I;for(let j of uo($))if(!no.call(J,j))Mc(J,j,{get:()=>$[j],enumerable:!0});return J},t$=($,_)=>()=>(_||$((_={exports:{}}).exports,_),_.exports),gP,BK,CP,po,lo,ro,to,Ec,cL,oo,ao,so,eo,$a,va,_a,ja,Ua,Ia,vO,SK,Xa,Vc,Tc,Ga,xL,wP,NP,Ya,Rc,BP,Ja,SP,Pc,kP,_O,Qa,za,Za,Oa,La,Wa,Da,Ka,Ha,qc,gc,Fa,Aa,kK,Cc,Ma,Ea,Va,Ta,Ra,kL,wc,Pa,Nc,qa,Bc,ga,Ca,Sc,cP,wa,cK,Na,Ba,kc,cc,Sa,ka,ca,qP,xc,xa,fa,ya,ba,ha,ma,ua,na,ia,pa,la,da,ra,ta,oa,aa,sa,ea,$s,vs,_s;var fP=GX(()=>{ho=Object.create,{getPrototypeOf:mo,defineProperty:Mc,getOwnPropertyNames:uo}=Object,no=Object.prototype.hasOwnProperty,gP=t$(($,_)=>{_.exports=function(){if(typeof Symbol!=="function"||typeof Object.getOwnPropertySymbols!=="function")return!1;if(typeof Symbol.iterator==="symbol")return!0;var I={},J=Symbol("test"),j=Object(J);if(typeof J==="string")return!1;if(Object.prototype.toString.call(J)!=="[object Symbol]")return!1;if(Object.prototype.toString.call(j)!=="[object Symbol]")return!1;var G=42;I[J]=G;for(var X in I)return!1;if(typeof Object.keys==="function"&&Object.keys(I).length!==0)return!1;if(typeof Object.getOwnPropertyNames==="function"&&Object.getOwnPropertyNames(I).length!==0)return!1;var W=Object.getOwnPropertySymbols(I);if(W.length!==1||W[0]!==J)return!1;if(!Object.prototype.propertyIsEnumerable.call(I,J))return!1;if(typeof Object.getOwnPropertyDescriptor==="function"){var T=Object.getOwnPropertyDescriptor(I,J);if(T.value!==G||T.enumerable!==!0)return!1}return!0}}),BK=t$(($,_)=>{var I=gP();_.exports=function(){return I()&&!!Symbol.toStringTag}}),CP=t$(($,_)=>{_.exports=Object}),po=t$(($,_)=>{_.exports=Error}),lo=t$(($,_)=>{_.exports=EvalError}),ro=t$(($,_)=>{_.exports=RangeError}),to=t$(($,_)=>{_.exports=ReferenceError}),Ec=t$(($,_)=>{_.exports=SyntaxError}),cL=t$(($,_)=>{_.exports=TypeError}),oo=t$(($,_)=>{_.exports=URIError}),ao=t$(($,_)=>{_.exports=Math.abs}),so=t$(($,_)=>{_.exports=Math.floor}),eo=t$(($,_)=>{_.exports=Math.max}),$a=t$(($,_)=>{_.exports=Math.min}),va=t$(($,_)=>{_.exports=Math.pow}),_a=t$(($,_)=>{_.exports=Math.round}),ja=t$(($,_)=>{_.exports=Number.isNaN||function(I){return I!==I}}),Ua=t$(($,_)=>{var I=ja();_.exports=function(J){if(I(J)||J===0)return J;return J<0?-1:1}}),Ia=t$(($,_)=>{_.exports=Object.getOwnPropertyDescriptor}),vO=t$(($,_)=>{var I=Ia();if(I)try{I([],"length")}catch(J){I=null}_.exports=I}),SK=t$(($,_)=>{var I=Object.defineProperty||!1;if(I)try{I({},"a",{value:1})}catch(J){I=!1}_.exports=I}),Xa=t$(($,_)=>{var I=typeof Symbol<"u"&&Symbol,J=gP();_.exports=function(){if(typeof I!=="function")return!1;if(typeof Symbol!=="function")return!1;if(typeof I("foo")!=="symbol")return!1;if(typeof Symbol("bar")!=="symbol")return!1;return J()}}),Vc=t$(($,_)=>{_.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null}),Tc=t$(($,_)=>{var I=CP();_.exports=I.getPrototypeOf||null}),Ga=t$(($,_)=>{var I="Function.prototype.bind called on incompatible ",J=Object.prototype.toString,j=Math.max,G="[object Function]",X=function(F,E){var D=[];for(var q=0;q<F.length;q+=1)D[q]=F[q];for(var S=0;S<E.length;S+=1)D[S+F.length]=E[S];return D},W=function(F,E){var D=[];for(var q=E||0,S=0;q<F.length;q+=1,S+=1)D[S]=F[q];return D},T=function(F,E){var D="";for(var q=0;q<F.length;q+=1)if(D+=F[q],q+1<F.length)D+=E;return D};_.exports=function(F){var E=this;if(typeof E!=="function"||J.apply(E)!==G)throw TypeError(I+E);var D=W(arguments,1),q,S=function(){if(this instanceof q){var h=E.apply(this,X(D,arguments));if(Object(h)===h)return h;return this}return E.apply(F,X(D,arguments))},k=j(0,E.length-D.length),y=[];for(var m=0;m<k;m++)y[m]="$"+m;if(q=Function("binder","return function ("+T(y,",")+"){ return binder.apply(this,arguments); }")(S),E.prototype){var n=function(){};n.prototype=E.prototype,q.prototype=new n,n.prototype=null}return q}}),xL=t$(($,_)=>{var I=Ga();_.exports=Function.prototype.bind||I}),wP=t$(($,_)=>{_.exports=Function.prototype.call}),NP=t$(($,_)=>{_.exports=Function.prototype.apply}),Ya=t$(($,_)=>{_.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply}),Rc=t$(($,_)=>{var I=xL(),J=NP(),j=wP(),G=Ya();_.exports=G||I.call(j,J)}),BP=t$(($,_)=>{var I=xL(),J=cL(),j=wP(),G=Rc();_.exports=function(X){if(X.length<1||typeof X[0]!=="function")throw new J("a function is required");return G(I,j,X)}}),Ja=t$(($,_)=>{var I=BP(),J=vO(),j;try{j=[].__proto__===Array.prototype}catch(T){if(!T||typeof T!=="object"||!("code"in T)||T.code!=="ERR_PROTO_ACCESS")throw T}var G=!!j&&J&&J(Object.prototype,"__proto__"),X=Object,W=X.getPrototypeOf;_.exports=G&&typeof G.get==="function"?I([G.get]):typeof W==="function"?function(T){return W(T==null?T:X(T))}:!1}),SP=t$(($,_)=>{var I=Vc(),J=Tc(),j=Ja();_.exports=I?function(G){return I(G)}:J?function(G){if(!G||typeof G!=="object"&&typeof G!=="function")throw TypeError("getProto: not an object");return J(G)}:j?function(G){return j(G)}:null}),Pc=t$(($,_)=>{var I=Function.prototype.call,J=Object.prototype.hasOwnProperty,j=xL();_.exports=j.call(I,J)}),kP=t$(($,_)=>{var I,J=CP(),j=po(),G=lo(),X=ro(),W=to(),T=Ec(),F=cL(),E=oo(),D=ao(),q=so(),S=eo(),k=$a(),y=va(),m=_a(),n=Ua(),h=Function,i=function(G0){try{return h('"use strict"; return ('+G0+").constructor;")()}catch(K0){}},s=vO(),j0=SK(),I0=function(){throw new F},H0=s?function(){try{return arguments.callee,I0}catch(G0){try{return s(arguments,"callee").get}catch(K0){return I0}}}():I0,L0=Xa()(),R0=SP(),U0=Tc(),c0=Vc(),Y=NP(),O=wP(),H={},Z=typeof Uint8Array>"u"||!R0?I:R0(Uint8Array),K={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?I:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?I:ArrayBuffer,"%ArrayIteratorPrototype%":L0&&R0?R0([][Symbol.iterator]()):I,"%AsyncFromSyncIteratorPrototype%":I,"%AsyncFunction%":H,"%AsyncGenerator%":H,"%AsyncGeneratorFunction%":H,"%AsyncIteratorPrototype%":H,"%Atomics%":typeof Atomics>"u"?I:Atomics,"%BigInt%":typeof BigInt>"u"?I:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?I:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?I:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?I:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":j,"%eval%":eval,"%EvalError%":G,"%Float16Array%":typeof Float16Array>"u"?I:Float16Array,"%Float32Array%":typeof Float32Array>"u"?I:Float32Array,"%Float64Array%":typeof Float64Array>"u"?I:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?I:FinalizationRegistry,"%Function%":h,"%GeneratorFunction%":H,"%Int8Array%":typeof Int8Array>"u"?I:Int8Array,"%Int16Array%":typeof Int16Array>"u"?I:Int16Array,"%Int32Array%":typeof Int32Array>"u"?I:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":L0&&R0?R0(R0([][Symbol.iterator]())):I,"%JSON%":typeof JSON==="object"?JSON:I,"%Map%":typeof Map>"u"?I:Map,"%MapIteratorPrototype%":typeof Map>"u"||!L0||!R0?I:R0(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":J,"%Object.getOwnPropertyDescriptor%":s,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?I:Promise,"%Proxy%":typeof Proxy>"u"?I:Proxy,"%RangeError%":X,"%ReferenceError%":W,"%Reflect%":typeof Reflect>"u"?I:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?I:Set,"%SetIteratorPrototype%":typeof Set>"u"||!L0||!R0?I:R0(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?I:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":L0&&R0?R0(""[Symbol.iterator]()):I,"%Symbol%":L0?Symbol:I,"%SyntaxError%":T,"%ThrowTypeError%":H0,"%TypedArray%":Z,"%TypeError%":F,"%Uint8Array%":typeof Uint8Array>"u"?I:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?I:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?I:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?I:Uint32Array,"%URIError%":E,"%WeakMap%":typeof WeakMap>"u"?I:WeakMap,"%WeakRef%":typeof WeakRef>"u"?I:WeakRef,"%WeakSet%":typeof WeakSet>"u"?I:WeakSet,"%Function.prototype.call%":O,"%Function.prototype.apply%":Y,"%Object.defineProperty%":j0,"%Object.getPrototypeOf%":U0,"%Math.abs%":D,"%Math.floor%":q,"%Math.max%":S,"%Math.min%":k,"%Math.pow%":y,"%Math.round%":m,"%Math.sign%":n,"%Reflect.getPrototypeOf%":c0};if(R0)try{null.error}catch(G0){w=R0(R0(G0)),K["%Error.prototype%"]=w}var w,B=function G0(K0){var q0;if(K0==="%AsyncFunction%")q0=i("async function () {}");else if(K0==="%GeneratorFunction%")q0=i("function* () {}");else if(K0==="%AsyncGeneratorFunction%")q0=i("async function* () {}");else if(K0==="%AsyncGenerator%"){var z0=G0("%AsyncGeneratorFunction%");if(z0)q0=z0.prototype}else if(K0==="%AsyncIteratorPrototype%"){var a=G0("%AsyncGenerator%");if(a&&R0)q0=R0(a.prototype)}return K[K0]=q0,q0},P={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},z=xL(),A=Pc(),f=z.call(O,Array.prototype.concat),c=z.call(Y,Array.prototype.splice),p=z.call(O,String.prototype.replace),Q0=z.call(O,String.prototype.slice),F0=z.call(O,RegExp.prototype.exec),P0=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,E0=/\\(\\)?/g,_0=function(G0){var K0=Q0(G0,0,1),q0=Q0(G0,-1);if(K0==="%"&&q0!=="%")throw new T("invalid intrinsic syntax, expected closing `%`");else if(q0==="%"&&K0!=="%")throw new T("invalid intrinsic syntax, expected opening `%`");var z0=[];return p(G0,P0,function(a,J0,y0,N0){z0[z0.length]=y0?p(N0,E0,"$1"):J0||a}),z0},$0=function(G0,K0){var q0=G0,z0;if(A(P,q0))z0=P[q0],q0="%"+z0[0]+"%";if(A(K,q0)){var a=K[q0];if(a===H)a=B(q0);if(typeof a>"u"&&!K0)throw new F("intrinsic "+G0+" exists, but is not available. Please file an issue!");return{alias:z0,name:q0,value:a}}throw new T("intrinsic "+G0+" does not exist!")};_.exports=function(G0,K0){if(typeof G0!=="string"||G0.length===0)throw new F("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof K0!=="boolean")throw new F('"allowMissing" argument must be a boolean');if(F0(/^%?[^%]*%?$/,G0)===null)throw new T("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var q0=_0(G0),z0=q0.length>0?q0[0]:"",a=$0("%"+z0+"%",K0),J0=a.name,y0=a.value,N0=!1,A0=a.alias;if(A0)z0=A0[0],c(q0,f([0,1],A0));for(var $$=1,w0=!0;$$<q0.length;$$+=1){var h0=q0[$$],H$=Q0(h0,0,1),p0=Q0(h0,-1);if((H$==='"'||H$==="'"||H$==="`"||(p0==='"'||p0==="'"||p0==="`"))&&H$!==p0)throw new T("property names with quotes must have matching quotes");if(h0==="constructor"||!w0)N0=!0;if(z0+="."+h0,J0="%"+z0+"%",A(K,J0))y0=K[J0];else if(y0!=null){if(!(h0 in y0)){if(!K0)throw new F("base intrinsic for "+G0+" exists, but the property is not available.");return}if(s&&$$+1>=q0.length){var j$=s(y0,h0);if(w0=!!j$,w0&&"get"in j$&&!("originalValue"in j$.get))y0=j$.get;else y0=y0[h0]}else w0=A(y0,h0),y0=y0[h0];if(w0&&!N0)K[J0]=y0}}return y0}}),_O=t$(($,_)=>{var I=kP(),J=BP(),j=J([I("%String.prototype.indexOf%")]);_.exports=function(G,X){var W=I(G,!!X);if(typeof W==="function"&&j(G,".prototype.")>-1)return J([W]);return W}}),Qa=t$(($,_)=>{var I=BK()(),J=_O(),j=J("Object.prototype.toString"),G=function(T){if(I&&T&&typeof T==="object"&&Symbol.toStringTag in T)return!1;return j(T)==="[object Arguments]"},X=function(T){if(G(T))return!0;return T!==null&&typeof T==="object"&&"length"in T&&typeof T.length==="number"&&T.length>=0&&j(T)!=="[object Array]"&&"callee"in T&&j(T.callee)==="[object Function]"},W=function(){return G(arguments)}();G.isLegacyArguments=X,_.exports=W?G:X}),za=t$(($,_)=>{var I=_O(),J=BK()(),j=Pc(),G=vO(),X;if(J){if(W=I("RegExp.prototype.exec"),T={},F=function(){throw T},E={toString:F,valueOf:F},typeof Symbol.toPrimitive==="symbol")E[Symbol.toPrimitive]=F;X=function(S){if(!S||typeof S!=="object")return!1;var k=G(S,"lastIndex"),y=k&&j(k,"value");if(!y)return!1;try{W(S,E)}catch(m){return m===T}}}else D=I("Object.prototype.toString"),q="[object RegExp]",X=function(S){if(!S||typeof S!=="object"&&typeof S!=="function")return!1;return D(S)===q};var W,T,F,E,D,q;_.exports=X}),Za=t$(($,_)=>{var I=_O(),J=za(),j=I("RegExp.prototype.exec"),G=cL();_.exports=function(X){if(!J(X))throw new G("`regex` must be a RegExp");return function(W){return j(X,W)!==null}}}),Oa=t$(($,_)=>{var I=function*(){}.constructor;_.exports=()=>I}),La=t$(($,_)=>{var I=_O(),J=Za(),j=J(/^\s*(?:function)?\*/),G=BK()(),X=SP(),W=I("Object.prototype.toString"),T=I("Function.prototype.toString"),F=Oa();_.exports=function(E){if(typeof E!=="function")return!1;if(j(T(E)))return!0;if(!G){var D=W(E);return D==="[object GeneratorFunction]"}if(!X)return!1;var q=F();return q&&X(E)===q.prototype}}),Wa=t$(($,_)=>{var I=Function.prototype.toString,J=typeof Reflect==="object"&&Reflect!==null&&Reflect.apply,j,G;if(typeof J==="function"&&typeof Object.defineProperty==="function")try{j=Object.defineProperty({},"length",{get:function(){throw G}}),G={},J(function(){throw 42},null,j)}catch(s){if(s!==G)J=null}else J=null;var X=/^\s*class\b/,W=function(s){try{var j0=I.call(s);return X.test(j0)}catch(I0){return!1}},T=function(s){try{if(W(s))return!1;return I.call(s),!0}catch(j0){return!1}},F=Object.prototype.toString,E="[object Object]",D="[object Function]",q="[object GeneratorFunction]",S="[object HTMLAllCollection]",k="[object HTML document.all class]",y="[object HTMLCollection]",m=typeof Symbol==="function"&&!!Symbol.toStringTag,n=!(0 in[,]),h=function(){return!1};if(typeof document==="object"){if(i=document.all,F.call(i)===F.call(document.all))h=function(s){if((n||!s)&&(typeof s>"u"||typeof s==="object"))try{var j0=F.call(s);return(j0===S||j0===k||j0===y||j0===E)&&s("")==null}catch(I0){}return!1}}var i;_.exports=J?function(s){if(h(s))return!0;if(!s)return!1;if(typeof s!=="function"&&typeof s!=="object")return!1;try{J(s,null,j)}catch(j0){if(j0!==G)return!1}return!W(s)&&T(s)}:function(s){if(h(s))return!0;if(!s)return!1;if(typeof s!=="function"&&typeof s!=="object")return!1;if(m)return T(s);if(W(s))return!1;var j0=F.call(s);if(j0!==D&&j0!==q&&!/^\[object HTML/.test(j0))return!1;return T(s)}}),Da=t$(($,_)=>{var I=Wa(),J=Object.prototype.toString,j=Object.prototype.hasOwnProperty,G=function(F,E,D){for(var q=0,S=F.length;q<S;q++)if(j.call(F,q))if(D==null)E(F[q],q,F);else E.call(D,F[q],q,F)},X=function(F,E,D){for(var q=0,S=F.length;q<S;q++)if(D==null)E(F.charAt(q),q,F);else E.call(D,F.charAt(q),q,F)},W=function(F,E,D){for(var q in F)if(j.call(F,q))if(D==null)E(F[q],q,F);else E.call(D,F[q],q,F)};function T(F){return J.call(F)==="[object Array]"}_.exports=function(F,E,D){if(!I(E))throw TypeError("iterator must be a function");var q;if(arguments.length>=3)q=D;if(T(F))G(F,E,q);else if(typeof F==="string")X(F,E,q);else W(F,E,q)}}),Ka=t$(($,_)=>{_.exports=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]}),Ha=t$(($,_)=>{var I=Ka(),J=typeof globalThis>"u"?globalThis:globalThis;_.exports=function(){var j=[];for(var G=0;G<I.length;G++)if(typeof J[I[G]]==="function")j[j.length]=I[G];return j}}),qc=t$(($,_)=>{var I=SK(),J=Ec(),j=cL(),G=vO();_.exports=function(X,W,T){if(!X||typeof X!=="object"&&typeof X!=="function")throw new j("`obj` must be an object or a function`");if(typeof W!=="string"&&typeof W!=="symbol")throw new j("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!=="boolean"&&arguments[3]!==null)throw new j("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!=="boolean"&&arguments[4]!==null)throw new j("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!=="boolean"&&arguments[5]!==null)throw new j("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!=="boolean")throw new j("`loose`, if provided, must be a boolean");var F=arguments.length>3?arguments[3]:null,E=arguments.length>4?arguments[4]:null,D=arguments.length>5?arguments[5]:null,q=arguments.length>6?arguments[6]:!1,S=!!G&&G(X,W);if(I)I(X,W,{configurable:D===null&&S?S.configurable:!D,enumerable:F===null&&S?S.enumerable:!F,value:T,writable:E===null&&S?S.writable:!E});else if(q||!F&&!E&&!D)X[W]=T;else throw new J("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}}),gc=t$(($,_)=>{var I=SK(),J=function(){return!!I};J.hasArrayLengthDefineBug=function(){if(!I)return null;try{return I([],"length",{value:1}).length!==1}catch(j){return!0}},_.exports=J}),Fa=t$(($,_)=>{var I=kP(),J=qc(),j=gc()(),G=vO(),X=cL(),W=I("%Math.floor%");_.exports=function(T,F){if(typeof T!=="function")throw new X("`fn` is not a function");if(typeof F!=="number"||F<0||F>4294967295||W(F)!==F)throw new X("`length` must be a positive 32-bit integer");var E=arguments.length>2&&!!arguments[2],D=!0,q=!0;if("length"in T&&G){var S=G(T,"length");if(S&&!S.configurable)D=!1;if(S&&!S.writable)q=!1}if(D||q||!E)if(j)J(T,"length",F,!0,!0);else J(T,"length",F);return T}}),Aa=t$(($,_)=>{var I=xL(),J=NP(),j=Rc();_.exports=function(){return j(I,J,arguments)}}),kK=t$(($,_)=>{var I=Fa(),J=SK(),j=BP(),G=Aa();if(_.exports=function(X){var W=j(arguments),T=X.length-(arguments.length-1);return I(W,1+(T>0?T:0),!0)},J)J(_.exports,"apply",{value:G});else _.exports.apply=G}),Cc=t$(($,_)=>{var I=Da(),J=Ha(),j=kK(),G=_O(),X=vO(),W=SP(),T=G("Object.prototype.toString"),F=BK()(),E=typeof globalThis>"u"?globalThis:globalThis,D=J(),q=G("String.prototype.slice"),S=G("Array.prototype.indexOf",!0)||function(n,h){for(var i=0;i<n.length;i+=1)if(n[i]===h)return i;return-1},k={__proto__:null};if(F&&X&&W)I(D,function(n){var h=new E[n];if(Symbol.toStringTag in h&&W){var i=W(h),s=X(i,Symbol.toStringTag);if(!s&&i){var j0=W(i);s=X(j0,Symbol.toStringTag)}k["$"+n]=j(s.get)}});else I(D,function(n){var h=new E[n],i=h.slice||h.set;if(i)k["$"+n]=j(i)});var y=function(n){var h=!1;return I(k,function(i,s){if(!h)try{if("$"+i(n)===s)h=q(s,1)}catch(j0){}}),h},m=function(n){var h=!1;return I(k,function(i,s){if(!h)try{i(n),h=q(s,1)}catch(j0){}}),h};_.exports=function(n){if(!n||typeof n!=="object")return!1;if(!F){var h=q(T(n),8,-1);if(S(D,h)>-1)return h;if(h!=="Object")return!1;return m(n)}if(!X)return null;return y(n)}}),Ma=t$(($,_)=>{var I=Cc();_.exports=function(J){return!!I(J)}}),Ea=t$(($)=>{var _=Qa(),I=La(),J=Cc(),j=Ma();function G(A0){return A0.call.bind(A0)}var X=typeof BigInt<"u",W=typeof Symbol<"u",T=G(Object.prototype.toString),F=G(Number.prototype.valueOf),E=G(String.prototype.valueOf),D=G(Boolean.prototype.valueOf);if(X)q=G(BigInt.prototype.valueOf);var q;if(W)S=G(Symbol.prototype.valueOf);var S;function k(A0,$$){if(typeof A0!=="object")return!1;try{return $$(A0),!0}catch(w0){return!1}}$.isArgumentsObject=_,$.isGeneratorFunction=I,$.isTypedArray=j;function y(A0){return typeof Promise<"u"&&A0 instanceof Promise||A0!==null&&typeof A0==="object"&&typeof A0.then==="function"&&typeof A0.catch==="function"}$.isPromise=y;function m(A0){if(typeof ArrayBuffer<"u"&&ArrayBuffer.isView)return ArrayBuffer.isView(A0);return j(A0)||c(A0)}$.isArrayBufferView=m;function n(A0){return J(A0)==="Uint8Array"}$.isUint8Array=n;function h(A0){return J(A0)==="Uint8ClampedArray"}$.isUint8ClampedArray=h;function i(A0){return J(A0)==="Uint16Array"}$.isUint16Array=i;function s(A0){return J(A0)==="Uint32Array"}$.isUint32Array=s;function j0(A0){return J(A0)==="Int8Array"}$.isInt8Array=j0;function I0(A0){return J(A0)==="Int16Array"}$.isInt16Array=I0;function H0(A0){return J(A0)==="Int32Array"}$.isInt32Array=H0;function L0(A0){return J(A0)==="Float32Array"}$.isFloat32Array=L0;function R0(A0){return J(A0)==="Float64Array"}$.isFloat64Array=R0;function U0(A0){return J(A0)==="BigInt64Array"}$.isBigInt64Array=U0;function c0(A0){return J(A0)==="BigUint64Array"}$.isBigUint64Array=c0;function Y(A0){return T(A0)==="[object Map]"}Y.working=typeof Map<"u"&&Y(new Map);function O(A0){if(typeof Map>"u")return!1;return Y.working?Y(A0):A0 instanceof Map}$.isMap=O;function H(A0){return T(A0)==="[object Set]"}H.working=typeof Set<"u"&&H(new Set);function Z(A0){if(typeof Set>"u")return!1;return H.working?H(A0):A0 instanceof Set}$.isSet=Z;function K(A0){return T(A0)==="[object WeakMap]"}K.working=typeof WeakMap<"u"&&K(new WeakMap);function w(A0){if(typeof WeakMap>"u")return!1;return K.working?K(A0):A0 instanceof WeakMap}$.isWeakMap=w;function B(A0){return T(A0)==="[object WeakSet]"}B.working=typeof WeakSet<"u"&&B(new WeakSet);function P(A0){return B(A0)}$.isWeakSet=P;function z(A0){return T(A0)==="[object ArrayBuffer]"}z.working=typeof ArrayBuffer<"u"&&z(new ArrayBuffer);function A(A0){if(typeof ArrayBuffer>"u")return!1;return z.working?z(A0):A0 instanceof ArrayBuffer}$.isArrayBuffer=A;function f(A0){return T(A0)==="[object DataView]"}f.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&f(new DataView(new ArrayBuffer(1),0,1));function c(A0){if(typeof DataView>"u")return!1;return f.working?f(A0):A0 instanceof DataView}$.isDataView=c;var p=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function Q0(A0){return T(A0)==="[object SharedArrayBuffer]"}function F0(A0){if(typeof p>"u")return!1;if(typeof Q0.working>"u")Q0.working=Q0(new p);return Q0.working?Q0(A0):A0 instanceof p}$.isSharedArrayBuffer=F0;function P0(A0){return T(A0)==="[object AsyncFunction]"}$.isAsyncFunction=P0;function E0(A0){return T(A0)==="[object Map Iterator]"}$.isMapIterator=E0;function _0(A0){return T(A0)==="[object Set Iterator]"}$.isSetIterator=_0;function $0(A0){return T(A0)==="[object Generator]"}$.isGeneratorObject=$0;function G0(A0){return T(A0)==="[object WebAssembly.Module]"}$.isWebAssemblyCompiledModule=G0;function K0(A0){return k(A0,F)}$.isNumberObject=K0;function q0(A0){return k(A0,E)}$.isStringObject=q0;function z0(A0){return k(A0,D)}$.isBooleanObject=z0;function a(A0){return X&&k(A0,q)}$.isBigIntObject=a;function J0(A0){return W&&k(A0,S)}$.isSymbolObject=J0;function y0(A0){return K0(A0)||q0(A0)||z0(A0)||a(A0)||J0(A0)}$.isBoxedPrimitive=y0;function N0(A0){return typeof Uint8Array<"u"&&(A(A0)||F0(A0))}$.isAnyArrayBuffer=N0,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(A0){Object.defineProperty($,A0,{enumerable:!1,value:function(){throw Error(A0+" is not supported in userland")}})})}),Va=t$(($,_)=>{_.exports=function(I){return I instanceof Buffer}}),Ta=t$(($,_)=>{if(typeof Object.create==="function")_.exports=function(I,J){if(J)I.super_=J,I.prototype=Object.create(J.prototype,{constructor:{value:I,enumerable:!1,writable:!0,configurable:!0}})};else _.exports=function(I,J){if(J){I.super_=J;var j=function(){};j.prototype=J.prototype,I.prototype=new j,I.prototype.constructor=I}}}),Ra=t$(($,_)=>{try{if(I=(pJ(),X1(iJ)),typeof I.inherits!=="function")throw"";_.exports=I.inherits}catch(J){_.exports=Ta()}var I}),kL=t$(($)=>{var _=Object.getOwnPropertyDescriptors||function(A){var f=Object.keys(A),c={};for(var p=0;p<f.length;p++)c[f[p]]=Object.getOwnPropertyDescriptor(A,f[p]);return c},I=/%[sdj%]/g;$.format=function(A){if(!s(A)){var f=[];for(var c=0;c<arguments.length;c++)f.push(G(arguments[c]));return f.join(" ")}var c=1,p=arguments,Q0=p.length,F0=String(A).replace(I,function(E0){if(E0==="%%")return"%";if(c>=Q0)return E0;switch(E0){case"%s":return String(p[c++]);case"%d":return Number(p[c++]);case"%j":try{return JSON.stringify(p[c++])}catch(_0){return"[Circular]"}default:return E0}});for(var P0=p[c];c<Q0;P0=p[++c])if(n(P0)||!L0(P0))F0+=" "+P0;else F0+=" "+G(P0);return F0},$.deprecate=function(A,f){if(typeof process<"u"&&process.noDeprecation===!0)return A;if(typeof process>"u")return function(){return $.deprecate(A,f).apply(this,arguments)};var c=!1;function p(){if(!c){if(process.throwDeprecation)throw Error(f);else if(process.traceDeprecation)console.trace(f);else console.error(f);c=!0}return A.apply(this,arguments)}return p};var J={},j=/^$/;$.debuglog=function(A){if(A=A.toUpperCase(),!J[A])if(j.test(A)){var f=process.pid;J[A]=function(){var c=$.format.apply($,arguments);console.error("%s %d: %s",A,f,c)}}else J[A]=function(){};return J[A]};function G(A,f){var c={seen:[],stylize:W};if(arguments.length>=3)c.depth=arguments[2];if(arguments.length>=4)c.colors=arguments[3];if(m(f))c.showHidden=f;else if(f)$._extend(c,f);if(I0(c.showHidden))c.showHidden=!1;if(I0(c.depth))c.depth=2;if(I0(c.colors))c.colors=!1;if(I0(c.customInspect))c.customInspect=!0;if(c.colors)c.stylize=X;return F(c,A,c.depth)}$.inspect=G,G.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},G.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function X(A,f){var c=G.styles[f];if(c)return"\x1B["+G.colors[c][0]+"m"+A+"\x1B["+G.colors[c][1]+"m";else return A}function W(A,f){return A}function T(A){var f={};return A.forEach(function(c,p){f[c]=!0}),f}function F(A,f,c){if(A.customInspect&&f&&c0(f.inspect)&&f.inspect!==$.inspect&&!(f.constructor&&f.constructor.prototype===f)){var p=f.inspect(c,A);if(!s(p))p=F(A,p,c);return p}var Q0=E(A,f);if(Q0)return Q0;var F0=Object.keys(f),P0=T(F0);if(A.showHidden)F0=Object.getOwnPropertyNames(f);if(U0(f)&&(F0.indexOf("message")>=0||F0.indexOf("description")>=0))return D(f);if(F0.length===0){if(c0(f)){var E0=f.name?": "+f.name:"";return A.stylize("[Function"+E0+"]","special")}if(H0(f))return A.stylize(RegExp.prototype.toString.call(f),"regexp");if(R0(f))return A.stylize(Date.prototype.toString.call(f),"date");if(U0(f))return D(f)}var _0="",$0=!1,G0=["{","}"];if(y(f))$0=!0,G0=["[","]"];if(c0(f)){var K0=f.name?": "+f.name:"";_0=" [Function"+K0+"]"}if(H0(f))_0=" "+RegExp.prototype.toString.call(f);if(R0(f))_0=" "+Date.prototype.toUTCString.call(f);if(U0(f))_0=" "+D(f);if(F0.length===0&&(!$0||f.length==0))return G0[0]+_0+G0[1];if(c<0)if(H0(f))return A.stylize(RegExp.prototype.toString.call(f),"regexp");else return A.stylize("[Object]","special");A.seen.push(f);var q0;if($0)q0=q(A,f,c,P0,F0);else q0=F0.map(function(z0){return S(A,f,c,P0,z0,$0)});return A.seen.pop(),k(q0,_0,G0)}function E(A,f){if(I0(f))return A.stylize("undefined","undefined");if(s(f)){var c="'"+JSON.stringify(f).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return A.stylize(c,"string")}if(i(f))return A.stylize(""+f,"number");if(m(f))return A.stylize(""+f,"boolean");if(n(f))return A.stylize("null","null")}function D(A){return"["+Error.prototype.toString.call(A)+"]"}function q(A,f,c,p,Q0){var F0=[];for(var P0=0,E0=f.length;P0<E0;++P0)if(w(f,String(P0)))F0.push(S(A,f,c,p,String(P0),!0));else F0.push("");return Q0.forEach(function(_0){if(!_0.match(/^\d+$/))F0.push(S(A,f,c,p,_0,!0))}),F0}function S(A,f,c,p,Q0,F0){var P0,E0,_0;if(_0=Object.getOwnPropertyDescriptor(f,Q0)||{value:f[Q0]},_0.get)if(_0.set)E0=A.stylize("[Getter/Setter]","special");else E0=A.stylize("[Getter]","special");else if(_0.set)E0=A.stylize("[Setter]","special");if(!w(p,Q0))P0="["+Q0+"]";if(!E0)if(A.seen.indexOf(_0.value)<0){if(n(c))E0=F(A,_0.value,null);else E0=F(A,_0.value,c-1);if(E0.indexOf(`
247
247
  `)>-1)if(F0)E0=E0.split(`
248
248
  `).map(function($0){return" "+$0}).join(`
249
249
  `).slice(2);else E0=`
@@ -313,7 +313,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
313
313
  `))}throw K0}};function P0(_0,$0,G0,K0,q0){if(!s($0))throw new D("regexp","RegExp",$0);var z0=q0==="match";if(typeof _0!=="string"||H0($0,_0)!==z0){if(G0 instanceof Error)throw G0;var a=!G0;G0=G0||(typeof _0!=="string"?'The "string" argument must be of type string. Received type '+"".concat(I(_0)," (").concat(n(_0),")"):(z0?"The input did not match the regular expression ":"The input was expected to not match the regular expression ")+"".concat(n($0),`. Input:
314
314
 
315
315
  `).concat(n(_0),`
316
- `));var J0=new y({actual:_0,expected:$0,message:G0,operator:q0,stackStartFn:K0});throw J0.generatedMessage=a,J0}}Y.match=function _0($0,G0,K0){P0($0,G0,K0,_0,"match")},Y.doesNotMatch=function _0($0,G0,K0){P0($0,G0,K0,_0,"doesNotMatch")};function E0(){for(var _0=arguments.length,$0=Array(_0),G0=0;G0<_0;G0++)$0[G0]=arguments[G0];K.apply(void 0,[E0,$0.length].concat($0))}Y.strict=j0(E0,Y,{equal:Y.strictEqual,deepEqual:Y.deepStrictEqual,notEqual:Y.notStrictEqual,notDeepEqual:Y.notDeepStrictEqual}),Y.strict.strict=Y.strict}),xc=io(qP(),1),{AssertionError:xa,CallTracker:fa,deepEqual:ya,deepStrictEqual:ba,doesNotMatch:ha,doesNotReject:ma,doesNotThrow:ua,equal:na,fail:ia,ifError:pa,match:la,notDeepEqual:da,notDeepStrictEqual:ra,notEqual:ta,notStrictEqual:oa,ok:aa,rejects:sa,strict:ea,strictEqual:$s,throws:vs}=xc,_s=xc});var nc={};_j(nc,{default:()=>Ds});var js,Us,fL,yP,bP,Is=($,_,I)=>{for(let J of yP(_))if(!bP.call($,J)&&J!=="default")fL($,J,{get:()=>_[J],enumerable:!0});if(I){for(let J of yP(_))if(!bP.call(I,J)&&J!=="default")fL(I,J,{get:()=>_[J],enumerable:!0});return I}},fc=($,_,I)=>{I=$!=null?js(Us($)):{};let J=_||!$||!$.__esModule?fL(I,"default",{value:$,enumerable:!0}):I;for(let j of yP($))if(!bP.call(J,j))fL(J,j,{get:()=>$[j],enumerable:!0});return J},V4=($,_)=>()=>(_||$((_={exports:{}}).exports,_),_.exports),Xs=($,_)=>{for(var I in _)fL($,I,{get:_[I],enumerable:!0,configurable:!0,set:(J)=>_[I]=()=>J})},Gs,xK,Ys,yc,bc,Js,Qs,zs,Zs,Os,Ls,Ws,hc,mc,uc,Ds;var ic=GX(()=>{js=Object.create,{getPrototypeOf:Us,defineProperty:fL,getOwnPropertyNames:yP}=Object,bP=Object.prototype.hasOwnProperty,Gs=V4(($,_)=>{function I(){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}_.exports=I}),xK=V4(($)=>{var _=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function I(G,X){return Object.prototype.hasOwnProperty.call(G,X)}$.assign=function(G){var X=Array.prototype.slice.call(arguments,1);while(X.length){var W=X.shift();if(!W)continue;if(typeof W!=="object")throw TypeError(W+"must be non-object");for(var T in W)if(I(W,T))G[T]=W[T]}return G},$.shrinkBuf=function(G,X){if(G.length===X)return G;if(G.subarray)return G.subarray(0,X);return G.length=X,G};var J={arraySet:function(G,X,W,T,F){if(X.subarray&&G.subarray){G.set(X.subarray(W,W+T),F);return}for(var E=0;E<T;E++)G[F+E]=X[W+E]},flattenChunks:function(G){var X,W,T,F,E,D;T=0;for(X=0,W=G.length;X<W;X++)T+=G[X].length;D=new Uint8Array(T),F=0;for(X=0,W=G.length;X<W;X++)E=G[X],D.set(E,F),F+=E.length;return D}},j={arraySet:function(G,X,W,T,F){for(var E=0;E<T;E++)G[F+E]=X[W+E]},flattenChunks:function(G){return[].concat.apply([],G)}};$.setTyped=function(G){if(G)$.Buf8=Uint8Array,$.Buf16=Uint16Array,$.Buf32=Int32Array,$.assign($,J);else $.Buf8=Array,$.Buf16=Array,$.Buf32=Array,$.assign($,j)},$.setTyped(_)}),Ys=V4(($)=>{var _=xK(),I=4,J=0,j=1,G=2;function X(T0){var u0=T0.length;while(--u0>=0)T0[u0]=0}var W=0,T=1,F=2,E=3,D=258,q=29,S=256,k=S+1+q,y=30,m=19,n=2*k+1,h=15,i=16,s=7,j0=256,I0=16,H0=17,L0=18,R0=[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],U0=[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],c0=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Y=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],O=512,H=Array((k+2)*2);X(H);var Z=Array(y*2);X(Z);var K=Array(O);X(K);var w=Array(D-E+1);X(w);var B=Array(q);X(B);var P=Array(y);X(P);function z(T0,u0,i0,R$,d){this.static_tree=T0,this.extra_bits=u0,this.extra_base=i0,this.elems=R$,this.max_length=d,this.has_stree=T0&&T0.length}var A,f,c;function p(T0,u0){this.dyn_tree=T0,this.max_code=0,this.stat_desc=u0}function Q0(T0){return T0<256?K[T0]:K[256+(T0>>>7)]}function F0(T0,u0){T0.pending_buf[T0.pending++]=u0&255,T0.pending_buf[T0.pending++]=u0>>>8&255}function P0(T0,u0,i0){if(T0.bi_valid>i-i0)T0.bi_buf|=u0<<T0.bi_valid&65535,F0(T0,T0.bi_buf),T0.bi_buf=u0>>i-T0.bi_valid,T0.bi_valid+=i0-i;else T0.bi_buf|=u0<<T0.bi_valid&65535,T0.bi_valid+=i0}function E0(T0,u0,i0){P0(T0,i0[u0*2],i0[u0*2+1])}function _0(T0,u0){var i0=0;do i0|=T0&1,T0>>>=1,i0<<=1;while(--u0>0);return i0>>>1}function $0(T0){if(T0.bi_valid===16)F0(T0,T0.bi_buf),T0.bi_buf=0,T0.bi_valid=0;else if(T0.bi_valid>=8)T0.pending_buf[T0.pending++]=T0.bi_buf&255,T0.bi_buf>>=8,T0.bi_valid-=8}function G0(T0,u0){var{dyn_tree:i0,max_code:R$}=u0,d=u0.stat_desc.static_tree,O0=u0.stat_desc.has_stree,X0=u0.stat_desc.extra_bits,k0=u0.stat_desc.extra_base,d0=u0.stat_desc.max_length,r,S0,b0,D0,g0,m0,u$=0;for(D0=0;D0<=h;D0++)T0.bl_count[D0]=0;i0[T0.heap[T0.heap_max]*2+1]=0;for(r=T0.heap_max+1;r<n;r++){if(S0=T0.heap[r],D0=i0[i0[S0*2+1]*2+1]+1,D0>d0)D0=d0,u$++;if(i0[S0*2+1]=D0,S0>R$)continue;if(T0.bl_count[D0]++,g0=0,S0>=k0)g0=X0[S0-k0];if(m0=i0[S0*2],T0.opt_len+=m0*(D0+g0),O0)T0.static_len+=m0*(d[S0*2+1]+g0)}if(u$===0)return;do{D0=d0-1;while(T0.bl_count[D0]===0)D0--;T0.bl_count[D0]--,T0.bl_count[D0+1]+=2,T0.bl_count[d0]--,u$-=2}while(u$>0);for(D0=d0;D0!==0;D0--){S0=T0.bl_count[D0];while(S0!==0){if(b0=T0.heap[--r],b0>R$)continue;if(i0[b0*2+1]!==D0)T0.opt_len+=(D0-i0[b0*2+1])*i0[b0*2],i0[b0*2+1]=D0;S0--}}}function K0(T0,u0,i0){var R$=Array(h+1),d=0,O0,X0;for(O0=1;O0<=h;O0++)R$[O0]=d=d+i0[O0-1]<<1;for(X0=0;X0<=u0;X0++){var k0=T0[X0*2+1];if(k0===0)continue;T0[X0*2]=_0(R$[k0]++,k0)}}function q0(){var T0,u0,i0,R$,d,O0=Array(h+1);i0=0;for(R$=0;R$<q-1;R$++){B[R$]=i0;for(T0=0;T0<1<<R0[R$];T0++)w[i0++]=R$}w[i0-1]=R$,d=0;for(R$=0;R$<16;R$++){P[R$]=d;for(T0=0;T0<1<<U0[R$];T0++)K[d++]=R$}d>>=7;for(;R$<y;R$++){P[R$]=d<<7;for(T0=0;T0<1<<U0[R$]-7;T0++)K[256+d++]=R$}for(u0=0;u0<=h;u0++)O0[u0]=0;T0=0;while(T0<=143)H[T0*2+1]=8,T0++,O0[8]++;while(T0<=255)H[T0*2+1]=9,T0++,O0[9]++;while(T0<=279)H[T0*2+1]=7,T0++,O0[7]++;while(T0<=287)H[T0*2+1]=8,T0++,O0[8]++;K0(H,k+1,O0);for(T0=0;T0<y;T0++)Z[T0*2+1]=5,Z[T0*2]=_0(T0,5);A=new z(H,R0,S+1,k,h),f=new z(Z,U0,0,y,h),c=new z([],c0,0,m,s)}function z0(T0){var u0;for(u0=0;u0<k;u0++)T0.dyn_ltree[u0*2]=0;for(u0=0;u0<y;u0++)T0.dyn_dtree[u0*2]=0;for(u0=0;u0<m;u0++)T0.bl_tree[u0*2]=0;T0.dyn_ltree[j0*2]=1,T0.opt_len=T0.static_len=0,T0.last_lit=T0.matches=0}function a(T0){if(T0.bi_valid>8)F0(T0,T0.bi_buf);else if(T0.bi_valid>0)T0.pending_buf[T0.pending++]=T0.bi_buf;T0.bi_buf=0,T0.bi_valid=0}function J0(T0,u0,i0,R$){if(a(T0),R$)F0(T0,i0),F0(T0,~i0);_.arraySet(T0.pending_buf,T0.window,u0,i0,T0.pending),T0.pending+=i0}function y0(T0,u0,i0,R$){var d=u0*2,O0=i0*2;return T0[d]<T0[O0]||T0[d]===T0[O0]&&R$[u0]<=R$[i0]}function N0(T0,u0,i0){var R$=T0.heap[i0],d=i0<<1;while(d<=T0.heap_len){if(d<T0.heap_len&&y0(u0,T0.heap[d+1],T0.heap[d],T0.depth))d++;if(y0(u0,R$,T0.heap[d],T0.depth))break;T0.heap[i0]=T0.heap[d],i0=d,d<<=1}T0.heap[i0]=R$}function A0(T0,u0,i0){var R$,d,O0=0,X0,k0;if(T0.last_lit!==0)do if(R$=T0.pending_buf[T0.d_buf+O0*2]<<8|T0.pending_buf[T0.d_buf+O0*2+1],d=T0.pending_buf[T0.l_buf+O0],O0++,R$===0)E0(T0,d,u0);else{if(X0=w[d],E0(T0,X0+S+1,u0),k0=R0[X0],k0!==0)d-=B[X0],P0(T0,d,k0);if(R$--,X0=Q0(R$),E0(T0,X0,i0),k0=U0[X0],k0!==0)R$-=P[X0],P0(T0,R$,k0)}while(O0<T0.last_lit);E0(T0,j0,u0)}function $$(T0,u0){var i0=u0.dyn_tree,R$=u0.stat_desc.static_tree,d=u0.stat_desc.has_stree,O0=u0.stat_desc.elems,X0,k0,d0=-1,r;T0.heap_len=0,T0.heap_max=n;for(X0=0;X0<O0;X0++)if(i0[X0*2]!==0)T0.heap[++T0.heap_len]=d0=X0,T0.depth[X0]=0;else i0[X0*2+1]=0;while(T0.heap_len<2)if(r=T0.heap[++T0.heap_len]=d0<2?++d0:0,i0[r*2]=1,T0.depth[r]=0,T0.opt_len--,d)T0.static_len-=R$[r*2+1];u0.max_code=d0;for(X0=T0.heap_len>>1;X0>=1;X0--)N0(T0,i0,X0);r=O0;do X0=T0.heap[1],T0.heap[1]=T0.heap[T0.heap_len--],N0(T0,i0,1),k0=T0.heap[1],T0.heap[--T0.heap_max]=X0,T0.heap[--T0.heap_max]=k0,i0[r*2]=i0[X0*2]+i0[k0*2],T0.depth[r]=(T0.depth[X0]>=T0.depth[k0]?T0.depth[X0]:T0.depth[k0])+1,i0[X0*2+1]=i0[k0*2+1]=r,T0.heap[1]=r++,N0(T0,i0,1);while(T0.heap_len>=2);T0.heap[--T0.heap_max]=T0.heap[1],G0(T0,u0),K0(i0,d0,T0.bl_count)}function w0(T0,u0,i0){var R$,d=-1,O0,X0=u0[1],k0=0,d0=7,r=4;if(X0===0)d0=138,r=3;u0[(i0+1)*2+1]=65535;for(R$=0;R$<=i0;R$++){if(O0=X0,X0=u0[(R$+1)*2+1],++k0<d0&&O0===X0)continue;else if(k0<r)T0.bl_tree[O0*2]+=k0;else if(O0!==0){if(O0!==d)T0.bl_tree[O0*2]++;T0.bl_tree[I0*2]++}else if(k0<=10)T0.bl_tree[H0*2]++;else T0.bl_tree[L0*2]++;if(k0=0,d=O0,X0===0)d0=138,r=3;else if(O0===X0)d0=6,r=3;else d0=7,r=4}}function h0(T0,u0,i0){var R$,d=-1,O0,X0=u0[1],k0=0,d0=7,r=4;if(X0===0)d0=138,r=3;for(R$=0;R$<=i0;R$++){if(O0=X0,X0=u0[(R$+1)*2+1],++k0<d0&&O0===X0)continue;else if(k0<r)do E0(T0,O0,T0.bl_tree);while(--k0!==0);else if(O0!==0){if(O0!==d)E0(T0,O0,T0.bl_tree),k0--;E0(T0,I0,T0.bl_tree),P0(T0,k0-3,2)}else if(k0<=10)E0(T0,H0,T0.bl_tree),P0(T0,k0-3,3);else E0(T0,L0,T0.bl_tree),P0(T0,k0-11,7);if(k0=0,d=O0,X0===0)d0=138,r=3;else if(O0===X0)d0=6,r=3;else d0=7,r=4}}function H$(T0){var u0;w0(T0,T0.dyn_ltree,T0.l_desc.max_code),w0(T0,T0.dyn_dtree,T0.d_desc.max_code),$$(T0,T0.bl_desc);for(u0=m-1;u0>=3;u0--)if(T0.bl_tree[Y[u0]*2+1]!==0)break;return T0.opt_len+=3*(u0+1)+5+5+4,u0}function p0(T0,u0,i0,R$){var d;P0(T0,u0-257,5),P0(T0,i0-1,5),P0(T0,R$-4,4);for(d=0;d<R$;d++)P0(T0,T0.bl_tree[Y[d]*2+1],3);h0(T0,T0.dyn_ltree,u0-1),h0(T0,T0.dyn_dtree,i0-1)}function j$(T0){var u0=4093624447,i0;for(i0=0;i0<=31;i0++,u0>>>=1)if(u0&1&&T0.dyn_ltree[i0*2]!==0)return J;if(T0.dyn_ltree[18]!==0||T0.dyn_ltree[20]!==0||T0.dyn_ltree[26]!==0)return j;for(i0=32;i0<S;i0++)if(T0.dyn_ltree[i0*2]!==0)return j;return J}var p$=!1;function C0(T0){if(!p$)q0(),p$=!0;T0.l_desc=new p(T0.dyn_ltree,A),T0.d_desc=new p(T0.dyn_dtree,f),T0.bl_desc=new p(T0.bl_tree,c),T0.bi_buf=0,T0.bi_valid=0,z0(T0)}function x0(T0,u0,i0,R$){P0(T0,(W<<1)+(R$?1:0),3),J0(T0,u0,i0,!0)}function T$(T0){P0(T0,T<<1,3),E0(T0,j0,H),$0(T0)}function U$(T0,u0,i0,R$){var d,O0,X0=0;if(T0.level>0){if(T0.strm.data_type===G)T0.strm.data_type=j$(T0);if($$(T0,T0.l_desc),$$(T0,T0.d_desc),X0=H$(T0),d=T0.opt_len+3+7>>>3,O0=T0.static_len+3+7>>>3,O0<=d)d=O0}else d=O0=i0+5;if(i0+4<=d&&u0!==-1)x0(T0,u0,i0,R$);else if(T0.strategy===I||O0===d)P0(T0,(T<<1)+(R$?1:0),3),A0(T0,H,Z);else P0(T0,(F<<1)+(R$?1:0),3),p0(T0,T0.l_desc.max_code+1,T0.d_desc.max_code+1,X0+1),A0(T0,T0.dyn_ltree,T0.dyn_dtree);if(z0(T0),R$)a(T0)}function G$(T0,u0,i0){if(T0.pending_buf[T0.d_buf+T0.last_lit*2]=u0>>>8&255,T0.pending_buf[T0.d_buf+T0.last_lit*2+1]=u0&255,T0.pending_buf[T0.l_buf+T0.last_lit]=i0&255,T0.last_lit++,u0===0)T0.dyn_ltree[i0*2]++;else T0.matches++,u0--,T0.dyn_ltree[(w[i0]+S+1)*2]++,T0.dyn_dtree[Q0(u0)*2]++;return T0.last_lit===T0.lit_bufsize-1}$._tr_init=C0,$._tr_stored_block=x0,$._tr_flush_block=U$,$._tr_tally=G$,$._tr_align=T$}),yc=V4(($,_)=>{function I(J,j,G,X){var W=J&65535|0,T=J>>>16&65535|0,F=0;while(G!==0){F=G>2000?2000:G,G-=F;do W=W+j[X++]|0,T=T+W|0;while(--F);W%=65521,T%=65521}return W|T<<16|0}_.exports=I}),bc=V4(($,_)=>{function I(){var G,X=[];for(var W=0;W<256;W++){G=W;for(var T=0;T<8;T++)G=G&1?3988292384^G>>>1:G>>>1;X[W]=G}return X}var J=I();function j(G,X,W,T){var F=J,E=T+W;G^=-1;for(var D=T;D<E;D++)G=G>>>8^F[(G^X[D])&255];return G^-1}_.exports=j}),Js=V4(($,_)=>{_.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"}}),Qs=V4(($)=>{var _=xK(),I=Ys(),J=yc(),j=bc(),G=Js(),X=0,W=1,T=3,F=4,E=5,D=0,q=1,S=-2,k=-3,y=-5,m=-1,n=1,h=2,i=3,s=4,j0=0,I0=2,H0=8,L0=9,R0=15,U0=8,c0=29,Y=256,O=Y+1+c0,H=30,Z=19,K=2*O+1,w=15,B=3,P=258,z=P+B+1,A=32,f=42,c=69,p=73,Q0=91,F0=103,P0=113,E0=666,_0=1,$0=2,G0=3,K0=4,q0=3;function z0(r,S0){return r.msg=G[S0],S0}function a(r){return(r<<1)-(r>4?9:0)}function J0(r){var S0=r.length;while(--S0>=0)r[S0]=0}function y0(r){var S0=r.state,b0=S0.pending;if(b0>r.avail_out)b0=r.avail_out;if(b0===0)return;if(_.arraySet(r.output,S0.pending_buf,S0.pending_out,b0,r.next_out),r.next_out+=b0,S0.pending_out+=b0,r.total_out+=b0,r.avail_out-=b0,S0.pending-=b0,S0.pending===0)S0.pending_out=0}function N0(r,S0){I._tr_flush_block(r,r.block_start>=0?r.block_start:-1,r.strstart-r.block_start,S0),r.block_start=r.strstart,y0(r.strm)}function A0(r,S0){r.pending_buf[r.pending++]=S0}function $$(r,S0){r.pending_buf[r.pending++]=S0>>>8&255,r.pending_buf[r.pending++]=S0&255}function w0(r,S0,b0,D0){var g0=r.avail_in;if(g0>D0)g0=D0;if(g0===0)return 0;if(r.avail_in-=g0,_.arraySet(S0,r.input,r.next_in,g0,b0),r.state.wrap===1)r.adler=J(r.adler,S0,g0,b0);else if(r.state.wrap===2)r.adler=j(r.adler,S0,g0,b0);return r.next_in+=g0,r.total_in+=g0,g0}function h0(r,S0){var{max_chain_length:b0,strstart:D0}=r,g0,m0,u$=r.prev_length,Y$=r.nice_match,Y0=r.strstart>r.w_size-z?r.strstart-(r.w_size-z):0,B0=r.window,s0=r.w_mask,a0=r.prev,g$=r.strstart+P,D$=B0[D0+u$-1],F$=B0[D0+u$];if(r.prev_length>=r.good_match)b0>>=2;if(Y$>r.lookahead)Y$=r.lookahead;do{if(g0=S0,B0[g0+u$]!==F$||B0[g0+u$-1]!==D$||B0[g0]!==B0[D0]||B0[++g0]!==B0[D0+1])continue;D0+=2,g0++;do;while(B0[++D0]===B0[++g0]&&B0[++D0]===B0[++g0]&&B0[++D0]===B0[++g0]&&B0[++D0]===B0[++g0]&&B0[++D0]===B0[++g0]&&B0[++D0]===B0[++g0]&&B0[++D0]===B0[++g0]&&B0[++D0]===B0[++g0]&&D0<g$);if(m0=P-(g$-D0),D0=g$-P,m0>u$){if(r.match_start=S0,u$=m0,m0>=Y$)break;D$=B0[D0+u$-1],F$=B0[D0+u$]}}while((S0=a0[S0&s0])>Y0&&--b0!==0);if(u$<=r.lookahead)return u$;return r.lookahead}function H$(r){var S0=r.w_size,b0,D0,g0,m0,u$;do{if(m0=r.window_size-r.lookahead-r.strstart,r.strstart>=S0+(S0-z)){_.arraySet(r.window,r.window,S0,S0,0),r.match_start-=S0,r.strstart-=S0,r.block_start-=S0,D0=r.hash_size,b0=D0;do g0=r.head[--b0],r.head[b0]=g0>=S0?g0-S0:0;while(--D0);D0=S0,b0=D0;do g0=r.prev[--b0],r.prev[b0]=g0>=S0?g0-S0:0;while(--D0);m0+=S0}if(r.strm.avail_in===0)break;if(D0=w0(r.strm,r.window,r.strstart+r.lookahead,m0),r.lookahead+=D0,r.lookahead+r.insert>=B){u$=r.strstart-r.insert,r.ins_h=r.window[u$],r.ins_h=(r.ins_h<<r.hash_shift^r.window[u$+1])&r.hash_mask;while(r.insert)if(r.ins_h=(r.ins_h<<r.hash_shift^r.window[u$+B-1])&r.hash_mask,r.prev[u$&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=u$,u$++,r.insert--,r.lookahead+r.insert<B)break}}while(r.lookahead<z&&r.strm.avail_in!==0)}function p0(r,S0){var b0=65535;if(b0>r.pending_buf_size-5)b0=r.pending_buf_size-5;for(;;){if(r.lookahead<=1){if(H$(r),r.lookahead===0&&S0===X)return _0;if(r.lookahead===0)break}r.strstart+=r.lookahead,r.lookahead=0;var D0=r.block_start+b0;if(r.strstart===0||r.strstart>=D0){if(r.lookahead=r.strstart-D0,r.strstart=D0,N0(r,!1),r.strm.avail_out===0)return _0}if(r.strstart-r.block_start>=r.w_size-z){if(N0(r,!1),r.strm.avail_out===0)return _0}}if(r.insert=0,S0===F){if(N0(r,!0),r.strm.avail_out===0)return G0;return K0}if(r.strstart>r.block_start){if(N0(r,!1),r.strm.avail_out===0)return _0}return _0}function j$(r,S0){var b0,D0;for(;;){if(r.lookahead<z){if(H$(r),r.lookahead<z&&S0===X)return _0;if(r.lookahead===0)break}if(b0=0,r.lookahead>=B)r.ins_h=(r.ins_h<<r.hash_shift^r.window[r.strstart+B-1])&r.hash_mask,b0=r.prev[r.strstart&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=r.strstart;if(b0!==0&&r.strstart-b0<=r.w_size-z)r.match_length=h0(r,b0);if(r.match_length>=B)if(D0=I._tr_tally(r,r.strstart-r.match_start,r.match_length-B),r.lookahead-=r.match_length,r.match_length<=r.max_lazy_match&&r.lookahead>=B){r.match_length--;do r.strstart++,r.ins_h=(r.ins_h<<r.hash_shift^r.window[r.strstart+B-1])&r.hash_mask,b0=r.prev[r.strstart&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=r.strstart;while(--r.match_length!==0);r.strstart++}else r.strstart+=r.match_length,r.match_length=0,r.ins_h=r.window[r.strstart],r.ins_h=(r.ins_h<<r.hash_shift^r.window[r.strstart+1])&r.hash_mask;else D0=I._tr_tally(r,0,r.window[r.strstart]),r.lookahead--,r.strstart++;if(D0){if(N0(r,!1),r.strm.avail_out===0)return _0}}if(r.insert=r.strstart<B-1?r.strstart:B-1,S0===F){if(N0(r,!0),r.strm.avail_out===0)return G0;return K0}if(r.last_lit){if(N0(r,!1),r.strm.avail_out===0)return _0}return $0}function p$(r,S0){var b0,D0,g0;for(;;){if(r.lookahead<z){if(H$(r),r.lookahead<z&&S0===X)return _0;if(r.lookahead===0)break}if(b0=0,r.lookahead>=B)r.ins_h=(r.ins_h<<r.hash_shift^r.window[r.strstart+B-1])&r.hash_mask,b0=r.prev[r.strstart&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=r.strstart;if(r.prev_length=r.match_length,r.prev_match=r.match_start,r.match_length=B-1,b0!==0&&r.prev_length<r.max_lazy_match&&r.strstart-b0<=r.w_size-z){if(r.match_length=h0(r,b0),r.match_length<=5&&(r.strategy===n||r.match_length===B&&r.strstart-r.match_start>4096))r.match_length=B-1}if(r.prev_length>=B&&r.match_length<=r.prev_length){g0=r.strstart+r.lookahead-B,D0=I._tr_tally(r,r.strstart-1-r.prev_match,r.prev_length-B),r.lookahead-=r.prev_length-1,r.prev_length-=2;do if(++r.strstart<=g0)r.ins_h=(r.ins_h<<r.hash_shift^r.window[r.strstart+B-1])&r.hash_mask,b0=r.prev[r.strstart&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=r.strstart;while(--r.prev_length!==0);if(r.match_available=0,r.match_length=B-1,r.strstart++,D0){if(N0(r,!1),r.strm.avail_out===0)return _0}}else if(r.match_available){if(D0=I._tr_tally(r,0,r.window[r.strstart-1]),D0)N0(r,!1);if(r.strstart++,r.lookahead--,r.strm.avail_out===0)return _0}else r.match_available=1,r.strstart++,r.lookahead--}if(r.match_available)D0=I._tr_tally(r,0,r.window[r.strstart-1]),r.match_available=0;if(r.insert=r.strstart<B-1?r.strstart:B-1,S0===F){if(N0(r,!0),r.strm.avail_out===0)return G0;return K0}if(r.last_lit){if(N0(r,!1),r.strm.avail_out===0)return _0}return $0}function C0(r,S0){var b0,D0,g0,m0,u$=r.window;for(;;){if(r.lookahead<=P){if(H$(r),r.lookahead<=P&&S0===X)return _0;if(r.lookahead===0)break}if(r.match_length=0,r.lookahead>=B&&r.strstart>0){if(g0=r.strstart-1,D0=u$[g0],D0===u$[++g0]&&D0===u$[++g0]&&D0===u$[++g0]){m0=r.strstart+P;do;while(D0===u$[++g0]&&D0===u$[++g0]&&D0===u$[++g0]&&D0===u$[++g0]&&D0===u$[++g0]&&D0===u$[++g0]&&D0===u$[++g0]&&D0===u$[++g0]&&g0<m0);if(r.match_length=P-(m0-g0),r.match_length>r.lookahead)r.match_length=r.lookahead}}if(r.match_length>=B)b0=I._tr_tally(r,1,r.match_length-B),r.lookahead-=r.match_length,r.strstart+=r.match_length,r.match_length=0;else b0=I._tr_tally(r,0,r.window[r.strstart]),r.lookahead--,r.strstart++;if(b0){if(N0(r,!1),r.strm.avail_out===0)return _0}}if(r.insert=0,S0===F){if(N0(r,!0),r.strm.avail_out===0)return G0;return K0}if(r.last_lit){if(N0(r,!1),r.strm.avail_out===0)return _0}return $0}function x0(r,S0){var b0;for(;;){if(r.lookahead===0){if(H$(r),r.lookahead===0){if(S0===X)return _0;break}}if(r.match_length=0,b0=I._tr_tally(r,0,r.window[r.strstart]),r.lookahead--,r.strstart++,b0){if(N0(r,!1),r.strm.avail_out===0)return _0}}if(r.insert=0,S0===F){if(N0(r,!0),r.strm.avail_out===0)return G0;return K0}if(r.last_lit){if(N0(r,!1),r.strm.avail_out===0)return _0}return $0}function T$(r,S0,b0,D0,g0){this.good_length=r,this.max_lazy=S0,this.nice_length=b0,this.max_chain=D0,this.func=g0}var U$=[new T$(0,0,0,0,p0),new T$(4,4,8,4,j$),new T$(4,5,16,8,j$),new T$(4,6,32,32,j$),new T$(4,4,16,16,p$),new T$(8,16,32,32,p$),new T$(8,16,128,128,p$),new T$(8,32,128,256,p$),new T$(32,128,258,1024,p$),new T$(32,258,258,4096,p$)];function G$(r){r.window_size=2*r.w_size,J0(r.head),r.max_lazy_match=U$[r.level].max_lazy,r.good_match=U$[r.level].good_length,r.nice_match=U$[r.level].nice_length,r.max_chain_length=U$[r.level].max_chain,r.strstart=0,r.block_start=0,r.lookahead=0,r.insert=0,r.match_length=r.prev_length=B-1,r.match_available=0,r.ins_h=0}function T0(){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=H0,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 _.Buf16(K*2),this.dyn_dtree=new _.Buf16((2*H+1)*2),this.bl_tree=new _.Buf16((2*Z+1)*2),J0(this.dyn_ltree),J0(this.dyn_dtree),J0(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new _.Buf16(w+1),this.heap=new _.Buf16(2*O+1),J0(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new _.Buf16(2*O+1),J0(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 u0(r){var S0;if(!r||!r.state)return z0(r,S);if(r.total_in=r.total_out=0,r.data_type=I0,S0=r.state,S0.pending=0,S0.pending_out=0,S0.wrap<0)S0.wrap=-S0.wrap;return S0.status=S0.wrap?f:P0,r.adler=S0.wrap===2?0:1,S0.last_flush=X,I._tr_init(S0),D}function i0(r){var S0=u0(r);if(S0===D)G$(r.state);return S0}function R$(r,S0){if(!r||!r.state)return S;if(r.state.wrap!==2)return S;return r.state.gzhead=S0,D}function d(r,S0,b0,D0,g0,m0){if(!r)return S;var u$=1;if(S0===m)S0=6;if(D0<0)u$=0,D0=-D0;else if(D0>15)u$=2,D0-=16;if(g0<1||g0>L0||b0!==H0||D0<8||D0>15||S0<0||S0>9||m0<0||m0>s)return z0(r,S);if(D0===8)D0=9;var Y$=new T0;return r.state=Y$,Y$.strm=r,Y$.wrap=u$,Y$.gzhead=null,Y$.w_bits=D0,Y$.w_size=1<<Y$.w_bits,Y$.w_mask=Y$.w_size-1,Y$.hash_bits=g0+7,Y$.hash_size=1<<Y$.hash_bits,Y$.hash_mask=Y$.hash_size-1,Y$.hash_shift=~~((Y$.hash_bits+B-1)/B),Y$.window=new _.Buf8(Y$.w_size*2),Y$.head=new _.Buf16(Y$.hash_size),Y$.prev=new _.Buf16(Y$.w_size),Y$.lit_bufsize=1<<g0+6,Y$.pending_buf_size=Y$.lit_bufsize*4,Y$.pending_buf=new _.Buf8(Y$.pending_buf_size),Y$.d_buf=1*Y$.lit_bufsize,Y$.l_buf=3*Y$.lit_bufsize,Y$.level=S0,Y$.strategy=m0,Y$.method=b0,i0(r)}function O0(r,S0){return d(r,S0,H0,R0,U0,j0)}function X0(r,S0){var b0,D0,g0,m0;if(!r||!r.state||S0>E||S0<0)return r?z0(r,S):S;if(D0=r.state,!r.output||!r.input&&r.avail_in!==0||D0.status===E0&&S0!==F)return z0(r,r.avail_out===0?y:S);if(D0.strm=r,b0=D0.last_flush,D0.last_flush=S0,D0.status===f)if(D0.wrap===2)if(r.adler=0,A0(D0,31),A0(D0,139),A0(D0,8),!D0.gzhead)A0(D0,0),A0(D0,0),A0(D0,0),A0(D0,0),A0(D0,0),A0(D0,D0.level===9?2:D0.strategy>=h||D0.level<2?4:0),A0(D0,q0),D0.status=P0;else{if(A0(D0,(D0.gzhead.text?1:0)+(D0.gzhead.hcrc?2:0)+(!D0.gzhead.extra?0:4)+(!D0.gzhead.name?0:8)+(!D0.gzhead.comment?0:16)),A0(D0,D0.gzhead.time&255),A0(D0,D0.gzhead.time>>8&255),A0(D0,D0.gzhead.time>>16&255),A0(D0,D0.gzhead.time>>24&255),A0(D0,D0.level===9?2:D0.strategy>=h||D0.level<2?4:0),A0(D0,D0.gzhead.os&255),D0.gzhead.extra&&D0.gzhead.extra.length)A0(D0,D0.gzhead.extra.length&255),A0(D0,D0.gzhead.extra.length>>8&255);if(D0.gzhead.hcrc)r.adler=j(r.adler,D0.pending_buf,D0.pending,0);D0.gzindex=0,D0.status=c}else{var u$=H0+(D0.w_bits-8<<4)<<8,Y$=-1;if(D0.strategy>=h||D0.level<2)Y$=0;else if(D0.level<6)Y$=1;else if(D0.level===6)Y$=2;else Y$=3;if(u$|=Y$<<6,D0.strstart!==0)u$|=A;if(u$+=31-u$%31,D0.status=P0,$$(D0,u$),D0.strstart!==0)$$(D0,r.adler>>>16),$$(D0,r.adler&65535);r.adler=1}if(D0.status===c)if(D0.gzhead.extra){g0=D0.pending;while(D0.gzindex<(D0.gzhead.extra.length&65535)){if(D0.pending===D0.pending_buf_size){if(D0.gzhead.hcrc&&D0.pending>g0)r.adler=j(r.adler,D0.pending_buf,D0.pending-g0,g0);if(y0(r),g0=D0.pending,D0.pending===D0.pending_buf_size)break}A0(D0,D0.gzhead.extra[D0.gzindex]&255),D0.gzindex++}if(D0.gzhead.hcrc&&D0.pending>g0)r.adler=j(r.adler,D0.pending_buf,D0.pending-g0,g0);if(D0.gzindex===D0.gzhead.extra.length)D0.gzindex=0,D0.status=p}else D0.status=p;if(D0.status===p)if(D0.gzhead.name){g0=D0.pending;do{if(D0.pending===D0.pending_buf_size){if(D0.gzhead.hcrc&&D0.pending>g0)r.adler=j(r.adler,D0.pending_buf,D0.pending-g0,g0);if(y0(r),g0=D0.pending,D0.pending===D0.pending_buf_size){m0=1;break}}if(D0.gzindex<D0.gzhead.name.length)m0=D0.gzhead.name.charCodeAt(D0.gzindex++)&255;else m0=0;A0(D0,m0)}while(m0!==0);if(D0.gzhead.hcrc&&D0.pending>g0)r.adler=j(r.adler,D0.pending_buf,D0.pending-g0,g0);if(m0===0)D0.gzindex=0,D0.status=Q0}else D0.status=Q0;if(D0.status===Q0)if(D0.gzhead.comment){g0=D0.pending;do{if(D0.pending===D0.pending_buf_size){if(D0.gzhead.hcrc&&D0.pending>g0)r.adler=j(r.adler,D0.pending_buf,D0.pending-g0,g0);if(y0(r),g0=D0.pending,D0.pending===D0.pending_buf_size){m0=1;break}}if(D0.gzindex<D0.gzhead.comment.length)m0=D0.gzhead.comment.charCodeAt(D0.gzindex++)&255;else m0=0;A0(D0,m0)}while(m0!==0);if(D0.gzhead.hcrc&&D0.pending>g0)r.adler=j(r.adler,D0.pending_buf,D0.pending-g0,g0);if(m0===0)D0.status=F0}else D0.status=F0;if(D0.status===F0)if(D0.gzhead.hcrc){if(D0.pending+2>D0.pending_buf_size)y0(r);if(D0.pending+2<=D0.pending_buf_size)A0(D0,r.adler&255),A0(D0,r.adler>>8&255),r.adler=0,D0.status=P0}else D0.status=P0;if(D0.pending!==0){if(y0(r),r.avail_out===0)return D0.last_flush=-1,D}else if(r.avail_in===0&&a(S0)<=a(b0)&&S0!==F)return z0(r,y);if(D0.status===E0&&r.avail_in!==0)return z0(r,y);if(r.avail_in!==0||D0.lookahead!==0||S0!==X&&D0.status!==E0){var Y0=D0.strategy===h?x0(D0,S0):D0.strategy===i?C0(D0,S0):U$[D0.level].func(D0,S0);if(Y0===G0||Y0===K0)D0.status=E0;if(Y0===_0||Y0===G0){if(r.avail_out===0)D0.last_flush=-1;return D}if(Y0===$0){if(S0===W)I._tr_align(D0);else if(S0!==E){if(I._tr_stored_block(D0,0,0,!1),S0===T){if(J0(D0.head),D0.lookahead===0)D0.strstart=0,D0.block_start=0,D0.insert=0}}if(y0(r),r.avail_out===0)return D0.last_flush=-1,D}}if(S0!==F)return D;if(D0.wrap<=0)return q;if(D0.wrap===2)A0(D0,r.adler&255),A0(D0,r.adler>>8&255),A0(D0,r.adler>>16&255),A0(D0,r.adler>>24&255),A0(D0,r.total_in&255),A0(D0,r.total_in>>8&255),A0(D0,r.total_in>>16&255),A0(D0,r.total_in>>24&255);else $$(D0,r.adler>>>16),$$(D0,r.adler&65535);if(y0(r),D0.wrap>0)D0.wrap=-D0.wrap;return D0.pending!==0?D:q}function k0(r){var S0;if(!r||!r.state)return S;if(S0=r.state.status,S0!==f&&S0!==c&&S0!==p&&S0!==Q0&&S0!==F0&&S0!==P0&&S0!==E0)return z0(r,S);return r.state=null,S0===P0?z0(r,k):D}function d0(r,S0){var b0=S0.length,D0,g0,m0,u$,Y$,Y0,B0,s0;if(!r||!r.state)return S;if(D0=r.state,u$=D0.wrap,u$===2||u$===1&&D0.status!==f||D0.lookahead)return S;if(u$===1)r.adler=J(r.adler,S0,b0,0);if(D0.wrap=0,b0>=D0.w_size){if(u$===0)J0(D0.head),D0.strstart=0,D0.block_start=0,D0.insert=0;s0=new _.Buf8(D0.w_size),_.arraySet(s0,S0,b0-D0.w_size,D0.w_size,0),S0=s0,b0=D0.w_size}Y$=r.avail_in,Y0=r.next_in,B0=r.input,r.avail_in=b0,r.next_in=0,r.input=S0,H$(D0);while(D0.lookahead>=B){g0=D0.strstart,m0=D0.lookahead-(B-1);do D0.ins_h=(D0.ins_h<<D0.hash_shift^D0.window[g0+B-1])&D0.hash_mask,D0.prev[g0&D0.w_mask]=D0.head[D0.ins_h],D0.head[D0.ins_h]=g0,g0++;while(--m0);D0.strstart=g0,D0.lookahead=B-1,H$(D0)}return D0.strstart+=D0.lookahead,D0.block_start=D0.strstart,D0.insert=D0.lookahead,D0.lookahead=0,D0.match_length=D0.prev_length=B-1,D0.match_available=0,r.next_in=Y0,r.input=B0,r.avail_in=Y$,D0.wrap=u$,D}$.deflateInit=O0,$.deflateInit2=d,$.deflateReset=i0,$.deflateResetKeep=u0,$.deflateSetHeader=R$,$.deflate=X0,$.deflateEnd=k0,$.deflateSetDictionary=d0,$.deflateInfo="pako deflate (from Nodeca project)"}),zs=V4(($,_)=>{var I=30,J=12;_.exports=function(j,G){var X,W,T,F,E,D,q,S,k,y,m,n,h,i,s,j0,I0,H0,L0,R0,U0,c0,Y,O,H;X=j.state,W=j.next_in,O=j.input,T=W+(j.avail_in-5),F=j.next_out,H=j.output,E=F-(G-j.avail_out),D=F+(j.avail_out-257),q=X.dmax,S=X.wsize,k=X.whave,y=X.wnext,m=X.window,n=X.hold,h=X.bits,i=X.lencode,s=X.distcode,j0=(1<<X.lenbits)-1,I0=(1<<X.distbits)-1;$:do{if(h<15)n+=O[W++]<<h,h+=8,n+=O[W++]<<h,h+=8;H0=i[n&j0];v:for(;;){if(L0=H0>>>24,n>>>=L0,h-=L0,L0=H0>>>16&255,L0===0)H[F++]=H0&65535;else if(L0&16){if(R0=H0&65535,L0&=15,L0){if(h<L0)n+=O[W++]<<h,h+=8;R0+=n&(1<<L0)-1,n>>>=L0,h-=L0}if(h<15)n+=O[W++]<<h,h+=8,n+=O[W++]<<h,h+=8;H0=s[n&I0];_:for(;;){if(L0=H0>>>24,n>>>=L0,h-=L0,L0=H0>>>16&255,L0&16){if(U0=H0&65535,L0&=15,h<L0){if(n+=O[W++]<<h,h+=8,h<L0)n+=O[W++]<<h,h+=8}if(U0+=n&(1<<L0)-1,U0>q){j.msg="invalid distance too far back",X.mode=I;break $}if(n>>>=L0,h-=L0,L0=F-E,U0>L0){if(L0=U0-L0,L0>k){if(X.sane){j.msg="invalid distance too far back",X.mode=I;break $}}if(c0=0,Y=m,y===0){if(c0+=S-L0,L0<R0){R0-=L0;do H[F++]=m[c0++];while(--L0);c0=F-U0,Y=H}}else if(y<L0){if(c0+=S+y-L0,L0-=y,L0<R0){R0-=L0;do H[F++]=m[c0++];while(--L0);if(c0=0,y<R0){L0=y,R0-=L0;do H[F++]=m[c0++];while(--L0);c0=F-U0,Y=H}}}else if(c0+=y-L0,L0<R0){R0-=L0;do H[F++]=m[c0++];while(--L0);c0=F-U0,Y=H}while(R0>2)H[F++]=Y[c0++],H[F++]=Y[c0++],H[F++]=Y[c0++],R0-=3;if(R0){if(H[F++]=Y[c0++],R0>1)H[F++]=Y[c0++]}}else{c0=F-U0;do H[F++]=H[c0++],H[F++]=H[c0++],H[F++]=H[c0++],R0-=3;while(R0>2);if(R0){if(H[F++]=H[c0++],R0>1)H[F++]=H[c0++]}}}else if((L0&64)===0){H0=s[(H0&65535)+(n&(1<<L0)-1)];continue _}else{j.msg="invalid distance code",X.mode=I;break $}break}}else if((L0&64)===0){H0=i[(H0&65535)+(n&(1<<L0)-1)];continue v}else if(L0&32){X.mode=J;break $}else{j.msg="invalid literal/length code",X.mode=I;break $}break}}while(W<T&&F<D);R0=h>>3,W-=R0,h-=R0<<3,n&=(1<<h)-1,j.next_in=W,j.next_out=F,j.avail_in=W<T?5+(T-W):5-(W-T),j.avail_out=F<D?257+(D-F):257-(F-D),X.hold=n,X.bits=h;return}}),Zs=V4(($,_)=>{var I=xK(),J=15,j=852,G=592,X=0,W=1,T=2,F=[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],E=[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],D=[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],q=[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];_.exports=function(S,k,y,m,n,h,i,s){var j0=s.bits,I0=0,H0=0,L0=0,R0=0,U0=0,c0=0,Y=0,O=0,H=0,Z=0,K,w,B,P,z,A=null,f=0,c,p=new I.Buf16(J+1),Q0=new I.Buf16(J+1),F0=null,P0=0,E0,_0,$0;for(I0=0;I0<=J;I0++)p[I0]=0;for(H0=0;H0<m;H0++)p[k[y+H0]]++;U0=j0;for(R0=J;R0>=1;R0--)if(p[R0]!==0)break;if(U0>R0)U0=R0;if(R0===0)return n[h++]=20971520,n[h++]=20971520,s.bits=1,0;for(L0=1;L0<R0;L0++)if(p[L0]!==0)break;if(U0<L0)U0=L0;O=1;for(I0=1;I0<=J;I0++)if(O<<=1,O-=p[I0],O<0)return-1;if(O>0&&(S===X||R0!==1))return-1;Q0[1]=0;for(I0=1;I0<J;I0++)Q0[I0+1]=Q0[I0]+p[I0];for(H0=0;H0<m;H0++)if(k[y+H0]!==0)i[Q0[k[y+H0]]++]=H0;if(S===X)A=F0=i,c=19;else if(S===W)A=F,f-=257,F0=E,P0-=257,c=256;else A=D,F0=q,c=-1;if(Z=0,H0=0,I0=L0,z=h,c0=U0,Y=0,B=-1,H=1<<U0,P=H-1,S===W&&H>j||S===T&&H>G)return 1;for(;;){if(E0=I0-Y,i[H0]<c)_0=0,$0=i[H0];else if(i[H0]>c)_0=F0[P0+i[H0]],$0=A[f+i[H0]];else _0=96,$0=0;K=1<<I0-Y,w=1<<c0,L0=w;do w-=K,n[z+(Z>>Y)+w]=E0<<24|_0<<16|$0|0;while(w!==0);K=1<<I0-1;while(Z&K)K>>=1;if(K!==0)Z&=K-1,Z+=K;else Z=0;if(H0++,--p[I0]===0){if(I0===R0)break;I0=k[y+i[H0]]}if(I0>U0&&(Z&P)!==B){if(Y===0)Y=U0;z+=L0,c0=I0-Y,O=1<<c0;while(c0+Y<R0){if(O-=p[c0+Y],O<=0)break;c0++,O<<=1}if(H+=1<<c0,S===W&&H>j||S===T&&H>G)return 1;B=Z&P,n[B]=U0<<24|c0<<16|z-h|0}}if(Z!==0)n[z+Z]=I0-Y<<24|4194304|0;return s.bits=U0,0}}),Os=V4(($)=>{var _=xK(),I=yc(),J=bc(),j=zs(),G=Zs(),X=0,W=1,T=2,F=4,E=5,D=6,q=0,S=1,k=2,y=-2,m=-3,n=-4,h=-5,i=8,s=1,j0=2,I0=3,H0=4,L0=5,R0=6,U0=7,c0=8,Y=9,O=10,H=11,Z=12,K=13,w=14,B=15,P=16,z=17,A=18,f=19,c=20,p=21,Q0=22,F0=23,P0=24,E0=25,_0=26,$0=27,G0=28,K0=29,q0=30,z0=31,a=32,J0=852,y0=592,N0=15,A0=N0;function $$(d){return(d>>>24&255)+(d>>>8&65280)+((d&65280)<<8)+((d&255)<<24)}function w0(){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 _.Buf16(320),this.work=new _.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function h0(d){var O0;if(!d||!d.state)return y;if(O0=d.state,d.total_in=d.total_out=O0.total=0,d.msg="",O0.wrap)d.adler=O0.wrap&1;return O0.mode=s,O0.last=0,O0.havedict=0,O0.dmax=32768,O0.head=null,O0.hold=0,O0.bits=0,O0.lencode=O0.lendyn=new _.Buf32(J0),O0.distcode=O0.distdyn=new _.Buf32(y0),O0.sane=1,O0.back=-1,q}function H$(d){var O0;if(!d||!d.state)return y;return O0=d.state,O0.wsize=0,O0.whave=0,O0.wnext=0,h0(d)}function p0(d,O0){var X0,k0;if(!d||!d.state)return y;if(k0=d.state,O0<0)X0=0,O0=-O0;else if(X0=(O0>>4)+1,O0<48)O0&=15;if(O0&&(O0<8||O0>15))return y;if(k0.window!==null&&k0.wbits!==O0)k0.window=null;return k0.wrap=X0,k0.wbits=O0,H$(d)}function j$(d,O0){var X0,k0;if(!d)return y;if(k0=new w0,d.state=k0,k0.window=null,X0=p0(d,O0),X0!==q)d.state=null;return X0}function p$(d){return j$(d,A0)}var C0=!0,x0,T$;function U$(d){if(C0){var O0;x0=new _.Buf32(512),T$=new _.Buf32(32),O0=0;while(O0<144)d.lens[O0++]=8;while(O0<256)d.lens[O0++]=9;while(O0<280)d.lens[O0++]=7;while(O0<288)d.lens[O0++]=8;G(W,d.lens,0,288,x0,0,d.work,{bits:9}),O0=0;while(O0<32)d.lens[O0++]=5;G(T,d.lens,0,32,T$,0,d.work,{bits:5}),C0=!1}d.lencode=x0,d.lenbits=9,d.distcode=T$,d.distbits=5}function G$(d,O0,X0,k0){var d0,r=d.state;if(r.window===null)r.wsize=1<<r.wbits,r.wnext=0,r.whave=0,r.window=new _.Buf8(r.wsize);if(k0>=r.wsize)_.arraySet(r.window,O0,X0-r.wsize,r.wsize,0),r.wnext=0,r.whave=r.wsize;else{if(d0=r.wsize-r.wnext,d0>k0)d0=k0;if(_.arraySet(r.window,O0,X0-k0,d0,r.wnext),k0-=d0,k0)_.arraySet(r.window,O0,X0-k0,k0,0),r.wnext=k0,r.whave=r.wsize;else{if(r.wnext+=d0,r.wnext===r.wsize)r.wnext=0;if(r.whave<r.wsize)r.whave+=d0}}return 0}function T0(d,O0){var X0,k0,d0,r,S0,b0,D0,g0,m0,u$,Y$,Y0,B0,s0,a0=0,g$,D$,F$,A1,c$,q$,Y1,O$,V$=new _.Buf8(4),w1,j1,v1=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!d||!d.state||!d.output||!d.input&&d.avail_in!==0)return y;if(X0=d.state,X0.mode===Z)X0.mode=K;S0=d.next_out,d0=d.output,D0=d.avail_out,r=d.next_in,k0=d.input,b0=d.avail_in,g0=X0.hold,m0=X0.bits,u$=b0,Y$=D0,O$=q;$:for(;;)switch(X0.mode){case s:if(X0.wrap===0){X0.mode=K;break}while(m0<16){if(b0===0)break $;b0--,g0+=k0[r++]<<m0,m0+=8}if(X0.wrap&2&&g0===35615){X0.check=0,V$[0]=g0&255,V$[1]=g0>>>8&255,X0.check=J(X0.check,V$,2,0),g0=0,m0=0,X0.mode=j0;break}if(X0.flags=0,X0.head)X0.head.done=!1;if(!(X0.wrap&1)||(((g0&255)<<8)+(g0>>8))%31){d.msg="incorrect header check",X0.mode=q0;break}if((g0&15)!==i){d.msg="unknown compression method",X0.mode=q0;break}if(g0>>>=4,m0-=4,Y1=(g0&15)+8,X0.wbits===0)X0.wbits=Y1;else if(Y1>X0.wbits){d.msg="invalid window size",X0.mode=q0;break}X0.dmax=1<<Y1,d.adler=X0.check=1,X0.mode=g0&512?O:Z,g0=0,m0=0;break;case j0:while(m0<16){if(b0===0)break $;b0--,g0+=k0[r++]<<m0,m0+=8}if(X0.flags=g0,(X0.flags&255)!==i){d.msg="unknown compression method",X0.mode=q0;break}if(X0.flags&57344){d.msg="unknown header flags set",X0.mode=q0;break}if(X0.head)X0.head.text=g0>>8&1;if(X0.flags&512)V$[0]=g0&255,V$[1]=g0>>>8&255,X0.check=J(X0.check,V$,2,0);g0=0,m0=0,X0.mode=I0;case I0:while(m0<32){if(b0===0)break $;b0--,g0+=k0[r++]<<m0,m0+=8}if(X0.head)X0.head.time=g0;if(X0.flags&512)V$[0]=g0&255,V$[1]=g0>>>8&255,V$[2]=g0>>>16&255,V$[3]=g0>>>24&255,X0.check=J(X0.check,V$,4,0);g0=0,m0=0,X0.mode=H0;case H0:while(m0<16){if(b0===0)break $;b0--,g0+=k0[r++]<<m0,m0+=8}if(X0.head)X0.head.xflags=g0&255,X0.head.os=g0>>8;if(X0.flags&512)V$[0]=g0&255,V$[1]=g0>>>8&255,X0.check=J(X0.check,V$,2,0);g0=0,m0=0,X0.mode=L0;case L0:if(X0.flags&1024){while(m0<16){if(b0===0)break $;b0--,g0+=k0[r++]<<m0,m0+=8}if(X0.length=g0,X0.head)X0.head.extra_len=g0;if(X0.flags&512)V$[0]=g0&255,V$[1]=g0>>>8&255,X0.check=J(X0.check,V$,2,0);g0=0,m0=0}else if(X0.head)X0.head.extra=null;X0.mode=R0;case R0:if(X0.flags&1024){if(Y0=X0.length,Y0>b0)Y0=b0;if(Y0){if(X0.head){if(Y1=X0.head.extra_len-X0.length,!X0.head.extra)X0.head.extra=Array(X0.head.extra_len);_.arraySet(X0.head.extra,k0,r,Y0,Y1)}if(X0.flags&512)X0.check=J(X0.check,k0,Y0,r);b0-=Y0,r+=Y0,X0.length-=Y0}if(X0.length)break $}X0.length=0,X0.mode=U0;case U0:if(X0.flags&2048){if(b0===0)break $;Y0=0;do if(Y1=k0[r+Y0++],X0.head&&Y1&&X0.length<65536)X0.head.name+=String.fromCharCode(Y1);while(Y1&&Y0<b0);if(X0.flags&512)X0.check=J(X0.check,k0,Y0,r);if(b0-=Y0,r+=Y0,Y1)break $}else if(X0.head)X0.head.name=null;X0.length=0,X0.mode=c0;case c0:if(X0.flags&4096){if(b0===0)break $;Y0=0;do if(Y1=k0[r+Y0++],X0.head&&Y1&&X0.length<65536)X0.head.comment+=String.fromCharCode(Y1);while(Y1&&Y0<b0);if(X0.flags&512)X0.check=J(X0.check,k0,Y0,r);if(b0-=Y0,r+=Y0,Y1)break $}else if(X0.head)X0.head.comment=null;X0.mode=Y;case Y:if(X0.flags&512){while(m0<16){if(b0===0)break $;b0--,g0+=k0[r++]<<m0,m0+=8}if(g0!==(X0.check&65535)){d.msg="header crc mismatch",X0.mode=q0;break}g0=0,m0=0}if(X0.head)X0.head.hcrc=X0.flags>>9&1,X0.head.done=!0;d.adler=X0.check=0,X0.mode=Z;break;case O:while(m0<32){if(b0===0)break $;b0--,g0+=k0[r++]<<m0,m0+=8}d.adler=X0.check=$$(g0),g0=0,m0=0,X0.mode=H;case H:if(X0.havedict===0)return d.next_out=S0,d.avail_out=D0,d.next_in=r,d.avail_in=b0,X0.hold=g0,X0.bits=m0,k;d.adler=X0.check=1,X0.mode=Z;case Z:if(O0===E||O0===D)break $;case K:if(X0.last){g0>>>=m0&7,m0-=m0&7,X0.mode=$0;break}while(m0<3){if(b0===0)break $;b0--,g0+=k0[r++]<<m0,m0+=8}switch(X0.last=g0&1,g0>>>=1,m0-=1,g0&3){case 0:X0.mode=w;break;case 1:if(U$(X0),X0.mode=c,O0===D){g0>>>=2,m0-=2;break $}break;case 2:X0.mode=z;break;case 3:d.msg="invalid block type",X0.mode=q0}g0>>>=2,m0-=2;break;case w:g0>>>=m0&7,m0-=m0&7;while(m0<32){if(b0===0)break $;b0--,g0+=k0[r++]<<m0,m0+=8}if((g0&65535)!==(g0>>>16^65535)){d.msg="invalid stored block lengths",X0.mode=q0;break}if(X0.length=g0&65535,g0=0,m0=0,X0.mode=B,O0===D)break $;case B:X0.mode=P;case P:if(Y0=X0.length,Y0){if(Y0>b0)Y0=b0;if(Y0>D0)Y0=D0;if(Y0===0)break $;_.arraySet(d0,k0,r,Y0,S0),b0-=Y0,r+=Y0,D0-=Y0,S0+=Y0,X0.length-=Y0;break}X0.mode=Z;break;case z:while(m0<14){if(b0===0)break $;b0--,g0+=k0[r++]<<m0,m0+=8}if(X0.nlen=(g0&31)+257,g0>>>=5,m0-=5,X0.ndist=(g0&31)+1,g0>>>=5,m0-=5,X0.ncode=(g0&15)+4,g0>>>=4,m0-=4,X0.nlen>286||X0.ndist>30){d.msg="too many length or distance symbols",X0.mode=q0;break}X0.have=0,X0.mode=A;case A:while(X0.have<X0.ncode){while(m0<3){if(b0===0)break $;b0--,g0+=k0[r++]<<m0,m0+=8}X0.lens[v1[X0.have++]]=g0&7,g0>>>=3,m0-=3}while(X0.have<19)X0.lens[v1[X0.have++]]=0;if(X0.lencode=X0.lendyn,X0.lenbits=7,w1={bits:X0.lenbits},O$=G(X,X0.lens,0,19,X0.lencode,0,X0.work,w1),X0.lenbits=w1.bits,O$){d.msg="invalid code lengths set",X0.mode=q0;break}X0.have=0,X0.mode=f;case f:while(X0.have<X0.nlen+X0.ndist){for(;;){if(a0=X0.lencode[g0&(1<<X0.lenbits)-1],g$=a0>>>24,D$=a0>>>16&255,F$=a0&65535,g$<=m0)break;if(b0===0)break $;b0--,g0+=k0[r++]<<m0,m0+=8}if(F$<16)g0>>>=g$,m0-=g$,X0.lens[X0.have++]=F$;else{if(F$===16){j1=g$+2;while(m0<j1){if(b0===0)break $;b0--,g0+=k0[r++]<<m0,m0+=8}if(g0>>>=g$,m0-=g$,X0.have===0){d.msg="invalid bit length repeat",X0.mode=q0;break}Y1=X0.lens[X0.have-1],Y0=3+(g0&3),g0>>>=2,m0-=2}else if(F$===17){j1=g$+3;while(m0<j1){if(b0===0)break $;b0--,g0+=k0[r++]<<m0,m0+=8}g0>>>=g$,m0-=g$,Y1=0,Y0=3+(g0&7),g0>>>=3,m0-=3}else{j1=g$+7;while(m0<j1){if(b0===0)break $;b0--,g0+=k0[r++]<<m0,m0+=8}g0>>>=g$,m0-=g$,Y1=0,Y0=11+(g0&127),g0>>>=7,m0-=7}if(X0.have+Y0>X0.nlen+X0.ndist){d.msg="invalid bit length repeat",X0.mode=q0;break}while(Y0--)X0.lens[X0.have++]=Y1}}if(X0.mode===q0)break;if(X0.lens[256]===0){d.msg="invalid code -- missing end-of-block",X0.mode=q0;break}if(X0.lenbits=9,w1={bits:X0.lenbits},O$=G(W,X0.lens,0,X0.nlen,X0.lencode,0,X0.work,w1),X0.lenbits=w1.bits,O$){d.msg="invalid literal/lengths set",X0.mode=q0;break}if(X0.distbits=6,X0.distcode=X0.distdyn,w1={bits:X0.distbits},O$=G(T,X0.lens,X0.nlen,X0.ndist,X0.distcode,0,X0.work,w1),X0.distbits=w1.bits,O$){d.msg="invalid distances set",X0.mode=q0;break}if(X0.mode=c,O0===D)break $;case c:X0.mode=p;case p:if(b0>=6&&D0>=258){if(d.next_out=S0,d.avail_out=D0,d.next_in=r,d.avail_in=b0,X0.hold=g0,X0.bits=m0,j(d,Y$),S0=d.next_out,d0=d.output,D0=d.avail_out,r=d.next_in,k0=d.input,b0=d.avail_in,g0=X0.hold,m0=X0.bits,X0.mode===Z)X0.back=-1;break}X0.back=0;for(;;){if(a0=X0.lencode[g0&(1<<X0.lenbits)-1],g$=a0>>>24,D$=a0>>>16&255,F$=a0&65535,g$<=m0)break;if(b0===0)break $;b0--,g0+=k0[r++]<<m0,m0+=8}if(D$&&(D$&240)===0){A1=g$,c$=D$,q$=F$;for(;;){if(a0=X0.lencode[q$+((g0&(1<<A1+c$)-1)>>A1)],g$=a0>>>24,D$=a0>>>16&255,F$=a0&65535,A1+g$<=m0)break;if(b0===0)break $;b0--,g0+=k0[r++]<<m0,m0+=8}g0>>>=A1,m0-=A1,X0.back+=A1}if(g0>>>=g$,m0-=g$,X0.back+=g$,X0.length=F$,D$===0){X0.mode=_0;break}if(D$&32){X0.back=-1,X0.mode=Z;break}if(D$&64){d.msg="invalid literal/length code",X0.mode=q0;break}X0.extra=D$&15,X0.mode=Q0;case Q0:if(X0.extra){j1=X0.extra;while(m0<j1){if(b0===0)break $;b0--,g0+=k0[r++]<<m0,m0+=8}X0.length+=g0&(1<<X0.extra)-1,g0>>>=X0.extra,m0-=X0.extra,X0.back+=X0.extra}X0.was=X0.length,X0.mode=F0;case F0:for(;;){if(a0=X0.distcode[g0&(1<<X0.distbits)-1],g$=a0>>>24,D$=a0>>>16&255,F$=a0&65535,g$<=m0)break;if(b0===0)break $;b0--,g0+=k0[r++]<<m0,m0+=8}if((D$&240)===0){A1=g$,c$=D$,q$=F$;for(;;){if(a0=X0.distcode[q$+((g0&(1<<A1+c$)-1)>>A1)],g$=a0>>>24,D$=a0>>>16&255,F$=a0&65535,A1+g$<=m0)break;if(b0===0)break $;b0--,g0+=k0[r++]<<m0,m0+=8}g0>>>=A1,m0-=A1,X0.back+=A1}if(g0>>>=g$,m0-=g$,X0.back+=g$,D$&64){d.msg="invalid distance code",X0.mode=q0;break}X0.offset=F$,X0.extra=D$&15,X0.mode=P0;case P0:if(X0.extra){j1=X0.extra;while(m0<j1){if(b0===0)break $;b0--,g0+=k0[r++]<<m0,m0+=8}X0.offset+=g0&(1<<X0.extra)-1,g0>>>=X0.extra,m0-=X0.extra,X0.back+=X0.extra}if(X0.offset>X0.dmax){d.msg="invalid distance too far back",X0.mode=q0;break}X0.mode=E0;case E0:if(D0===0)break $;if(Y0=Y$-D0,X0.offset>Y0){if(Y0=X0.offset-Y0,Y0>X0.whave){if(X0.sane){d.msg="invalid distance too far back",X0.mode=q0;break}}if(Y0>X0.wnext)Y0-=X0.wnext,B0=X0.wsize-Y0;else B0=X0.wnext-Y0;if(Y0>X0.length)Y0=X0.length;s0=X0.window}else s0=d0,B0=S0-X0.offset,Y0=X0.length;if(Y0>D0)Y0=D0;D0-=Y0,X0.length-=Y0;do d0[S0++]=s0[B0++];while(--Y0);if(X0.length===0)X0.mode=p;break;case _0:if(D0===0)break $;d0[S0++]=X0.length,D0--,X0.mode=p;break;case $0:if(X0.wrap){while(m0<32){if(b0===0)break $;b0--,g0|=k0[r++]<<m0,m0+=8}if(Y$-=D0,d.total_out+=Y$,X0.total+=Y$,Y$)d.adler=X0.check=X0.flags?J(X0.check,d0,Y$,S0-Y$):I(X0.check,d0,Y$,S0-Y$);if(Y$=D0,(X0.flags?g0:$$(g0))!==X0.check){d.msg="incorrect data check",X0.mode=q0;break}g0=0,m0=0}X0.mode=G0;case G0:if(X0.wrap&&X0.flags){while(m0<32){if(b0===0)break $;b0--,g0+=k0[r++]<<m0,m0+=8}if(g0!==(X0.total&4294967295)){d.msg="incorrect length check",X0.mode=q0;break}g0=0,m0=0}X0.mode=K0;case K0:O$=S;break $;case q0:O$=m;break $;case z0:return n;case a:default:return y}if(d.next_out=S0,d.avail_out=D0,d.next_in=r,d.avail_in=b0,X0.hold=g0,X0.bits=m0,X0.wsize||Y$!==d.avail_out&&X0.mode<q0&&(X0.mode<$0||O0!==F)){if(G$(d,d.output,d.next_out,Y$-d.avail_out))return X0.mode=z0,n}if(u$-=d.avail_in,Y$-=d.avail_out,d.total_in+=u$,d.total_out+=Y$,X0.total+=Y$,X0.wrap&&Y$)d.adler=X0.check=X0.flags?J(X0.check,d0,Y$,d.next_out-Y$):I(X0.check,d0,Y$,d.next_out-Y$);if(d.data_type=X0.bits+(X0.last?64:0)+(X0.mode===Z?128:0)+(X0.mode===c||X0.mode===B?256:0),(u$===0&&Y$===0||O0===F)&&O$===q)O$=h;return O$}function u0(d){if(!d||!d.state)return y;var O0=d.state;if(O0.window)O0.window=null;return d.state=null,q}function i0(d,O0){var X0;if(!d||!d.state)return y;if(X0=d.state,(X0.wrap&2)===0)return y;return X0.head=O0,O0.done=!1,q}function R$(d,O0){var X0=O0.length,k0,d0,r;if(!d||!d.state)return y;if(k0=d.state,k0.wrap!==0&&k0.mode!==H)return y;if(k0.mode===H){if(d0=1,d0=I(d0,O0,X0,0),d0!==k0.check)return m}if(r=G$(d,O0,X0,X0),r)return k0.mode=z0,n;return k0.havedict=1,q}$.inflateReset=H$,$.inflateReset2=p0,$.inflateResetKeep=h0,$.inflateInit=p$,$.inflateInit2=j$,$.inflate=T0,$.inflateEnd=u0,$.inflateGetHeader=i0,$.inflateSetDictionary=R$,$.inflateInfo="pako inflate (from Nodeca project)"}),Ls=V4(($,_)=>{_.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}}),Ws=V4(($)=>{var _=(fP(),X1(xP)),I=Gs(),J=Qs(),j=Os(),G=Ls();for(X in G)$[X]=G[X];var X;$.NONE=0,$.DEFLATE=1,$.INFLATE=2,$.GZIP=3,$.GUNZIP=4,$.DEFLATERAW=5,$.INFLATERAW=6,$.UNZIP=7;var W=31,T=139;function F(E){if(typeof E!=="number"||E<$.DEFLATE||E>$.UNZIP)throw TypeError("Bad argument");this.dictionary=null,this.err=0,this.flush=0,this.init_done=!1,this.level=0,this.memLevel=0,this.mode=E,this.strategy=0,this.windowBits=0,this.write_in_progress=!1,this.pending_close=!1,this.gzip_id_bytes_read=0}F.prototype.close=function(){if(this.write_in_progress){this.pending_close=!0;return}if(this.pending_close=!1,_(this.init_done,"close before init"),_(this.mode<=$.UNZIP),this.mode===$.DEFLATE||this.mode===$.GZIP||this.mode===$.DEFLATERAW)J.deflateEnd(this.strm);else if(this.mode===$.INFLATE||this.mode===$.GUNZIP||this.mode===$.INFLATERAW||this.mode===$.UNZIP)j.inflateEnd(this.strm);this.mode=$.NONE,this.dictionary=null},F.prototype.write=function(E,D,q,S,k,y,m){return this._write(!0,E,D,q,S,k,y,m)},F.prototype.writeSync=function(E,D,q,S,k,y,m){return this._write(!1,E,D,q,S,k,y,m)},F.prototype._write=function(E,D,q,S,k,y,m,n){if(_.equal(arguments.length,8),_(this.init_done,"write before init"),_(this.mode!==$.NONE,"already finalized"),_.equal(!1,this.write_in_progress,"write already in progress"),_.equal(!1,this.pending_close,"close is pending"),this.write_in_progress=!0,_.equal(!1,D===void 0,"must provide flush value"),this.write_in_progress=!0,D!==$.Z_NO_FLUSH&&D!==$.Z_PARTIAL_FLUSH&&D!==$.Z_SYNC_FLUSH&&D!==$.Z_FULL_FLUSH&&D!==$.Z_FINISH&&D!==$.Z_BLOCK)throw Error("Invalid flush value");if(q==null)q=Buffer.alloc(0),k=0,S=0;if(this.strm.avail_in=k,this.strm.input=q,this.strm.next_in=S,this.strm.avail_out=n,this.strm.output=y,this.strm.next_out=m,this.flush=D,!E){if(this._process(),this._checkError())return this._afterSync();return}var h=this;return process.nextTick(function(){h._process(),h._after()}),this},F.prototype._afterSync=function(){var E=this.strm.avail_out,D=this.strm.avail_in;return this.write_in_progress=!1,[D,E]},F.prototype._process=function(){var E=null;switch(this.mode){case $.DEFLATE:case $.GZIP:case $.DEFLATERAW:this.err=J.deflate(this.strm,this.flush);break;case $.UNZIP:if(this.strm.avail_in>0)E=this.strm.next_in;switch(this.gzip_id_bytes_read){case 0:if(E===null)break;if(this.strm.input[E]===W){if(this.gzip_id_bytes_read=1,E++,this.strm.avail_in===1)break}else{this.mode=$.INFLATE;break}case 1:if(E===null)break;if(this.strm.input[E]===T)this.gzip_id_bytes_read=2,this.mode=$.GUNZIP;else this.mode=$.INFLATE;break;default:throw Error("invalid number of gzip magic number bytes read")}case $.INFLATE:case $.GUNZIP:case $.INFLATERAW:if(this.err=j.inflate(this.strm,this.flush),this.err===$.Z_NEED_DICT&&this.dictionary){if(this.err=j.inflateSetDictionary(this.strm,this.dictionary),this.err===$.Z_OK)this.err=j.inflate(this.strm,this.flush);else if(this.err===$.Z_DATA_ERROR)this.err=$.Z_NEED_DICT}while(this.strm.avail_in>0&&this.mode===$.GUNZIP&&this.err===$.Z_STREAM_END&&this.strm.next_in[0]!==0)this.reset(),this.err=j.inflate(this.strm,this.flush);break;default:throw Error("Unknown mode "+this.mode)}},F.prototype._checkError=function(){switch(this.err){case $.Z_OK:case $.Z_BUF_ERROR:if(this.strm.avail_out!==0&&this.flush===$.Z_FINISH)return this._error("unexpected end of file"),!1;break;case $.Z_STREAM_END:break;case $.Z_NEED_DICT:if(this.dictionary==null)this._error("Missing dictionary");else this._error("Bad dictionary");return!1;default:return this._error("Zlib error"),!1}return!0},F.prototype._after=function(){if(!this._checkError())return;var E=this.strm.avail_out,D=this.strm.avail_in;if(this.write_in_progress=!1,this.callback(D,E),this.pending_close)this.close()},F.prototype._error=function(E){if(this.strm.msg)E=this.strm.msg;if(this.onerror(E,this.err),this.write_in_progress=!1,this.pending_close)this.close()},F.prototype.init=function(E,D,q,S,k){_(arguments.length===4||arguments.length===5,"init(windowBits, level, memLevel, strategy, [dictionary])"),_(E>=8&&E<=15,"invalid windowBits"),_(D>=-1&&D<=9,"invalid compression level"),_(q>=1&&q<=9,"invalid memlevel"),_(S===$.Z_FILTERED||S===$.Z_HUFFMAN_ONLY||S===$.Z_RLE||S===$.Z_FIXED||S===$.Z_DEFAULT_STRATEGY,"invalid strategy"),this._init(D,E,q,S,k),this._setDictionary()},F.prototype.params=function(){throw Error("deflateParams Not supported")},F.prototype.reset=function(){this._reset(),this._setDictionary()},F.prototype._init=function(E,D,q,S,k){if(this.level=E,this.windowBits=D,this.memLevel=q,this.strategy=S,this.flush=$.Z_NO_FLUSH,this.err=$.Z_OK,this.mode===$.GZIP||this.mode===$.GUNZIP)this.windowBits+=16;if(this.mode===$.UNZIP)this.windowBits+=32;if(this.mode===$.DEFLATERAW||this.mode===$.INFLATERAW)this.windowBits=-1*this.windowBits;switch(this.strm=new I,this.mode){case $.DEFLATE:case $.GZIP:case $.DEFLATERAW:this.err=J.deflateInit2(this.strm,this.level,$.Z_DEFLATED,this.windowBits,this.memLevel,this.strategy);break;case $.INFLATE:case $.GUNZIP:case $.INFLATERAW:case $.UNZIP:this.err=j.inflateInit2(this.strm,this.windowBits);break;default:throw Error("Unknown mode "+this.mode)}if(this.err!==$.Z_OK)this._error("Init error");this.dictionary=k,this.write_in_progress=!1,this.init_done=!0},F.prototype._setDictionary=function(){if(this.dictionary==null)return;switch(this.err=$.Z_OK,this.mode){case $.DEFLATE:case $.DEFLATERAW:this.err=J.deflateSetDictionary(this.strm,this.dictionary);break;default:break}if(this.err!==$.Z_OK)this._error("Failed to set dictionary")},F.prototype._reset=function(){switch(this.err=$.Z_OK,this.mode){case $.DEFLATE:case $.DEFLATERAW:case $.GZIP:this.err=J.deflateReset(this.strm);break;case $.INFLATE:case $.INFLATERAW:case $.GUNZIP:this.err=j.inflateReset(this.strm);break;default:break}if(this.err!==$.Z_OK)this._error("Failed to reset stream")},$.Zlib=F}),hc=V4(($)=>{var _=(j_(),X1(__)).Buffer,I=E8().Transform,J=Ws(),j=(pJ(),X1(iJ)),G=(fP(),X1(xP)).ok,X=(j_(),X1(__)).kMaxLength,W="Cannot create final Buffer. It would be larger than 0x"+X.toString(16)+" bytes";J.Z_MIN_WINDOWBITS=8,J.Z_MAX_WINDOWBITS=15,J.Z_DEFAULT_WINDOWBITS=15,J.Z_MIN_CHUNK=64,J.Z_MAX_CHUNK=1/0,J.Z_DEFAULT_CHUNK=16384,J.Z_MIN_MEMLEVEL=1,J.Z_MAX_MEMLEVEL=9,J.Z_DEFAULT_MEMLEVEL=8,J.Z_MIN_LEVEL=-1,J.Z_MAX_LEVEL=9,J.Z_DEFAULT_LEVEL=J.Z_DEFAULT_COMPRESSION;var T=Object.keys(J);for(E=0;E<T.length;E++)if(F=T[E],F.match(/^Z/))Object.defineProperty($,F,{enumerable:!0,value:J[F],writable:!1});var F,E,D={Z_OK:J.Z_OK,Z_STREAM_END:J.Z_STREAM_END,Z_NEED_DICT:J.Z_NEED_DICT,Z_ERRNO:J.Z_ERRNO,Z_STREAM_ERROR:J.Z_STREAM_ERROR,Z_DATA_ERROR:J.Z_DATA_ERROR,Z_MEM_ERROR:J.Z_MEM_ERROR,Z_BUF_ERROR:J.Z_BUF_ERROR,Z_VERSION_ERROR:J.Z_VERSION_ERROR},q=Object.keys(D);for(k=0;k<q.length;k++)S=q[k],D[D[S]]=S;var S,k;Object.defineProperty($,"codes",{enumerable:!0,value:Object.freeze(D),writable:!1}),$.Deflate=n,$.Inflate=h,$.Gzip=i,$.Gunzip=s,$.DeflateRaw=j0,$.InflateRaw=I0,$.Unzip=H0,$.createDeflate=function(Y){return new n(Y)},$.createInflate=function(Y){return new h(Y)},$.createDeflateRaw=function(Y){return new j0(Y)},$.createInflateRaw=function(Y){return new I0(Y)},$.createGzip=function(Y){return new i(Y)},$.createGunzip=function(Y){return new s(Y)},$.createUnzip=function(Y){return new H0(Y)},$.deflate=function(Y,O,H){if(typeof O==="function")H=O,O={};return y(new n(O),Y,H)},$.deflateSync=function(Y,O){return m(new n(O),Y)},$.gzip=function(Y,O,H){if(typeof O==="function")H=O,O={};return y(new i(O),Y,H)},$.gzipSync=function(Y,O){return m(new i(O),Y)},$.deflateRaw=function(Y,O,H){if(typeof O==="function")H=O,O={};return y(new j0(O),Y,H)},$.deflateRawSync=function(Y,O){return m(new j0(O),Y)},$.unzip=function(Y,O,H){if(typeof O==="function")H=O,O={};return y(new H0(O),Y,H)},$.unzipSync=function(Y,O){return m(new H0(O),Y)},$.inflate=function(Y,O,H){if(typeof O==="function")H=O,O={};return y(new h(O),Y,H)},$.inflateSync=function(Y,O){return m(new h(O),Y)},$.gunzip=function(Y,O,H){if(typeof O==="function")H=O,O={};return y(new s(O),Y,H)},$.gunzipSync=function(Y,O){return m(new s(O),Y)},$.inflateRaw=function(Y,O,H){if(typeof O==="function")H=O,O={};return y(new I0(O),Y,H)},$.inflateRawSync=function(Y,O){return m(new I0(O),Y)};function y(Y,O,H){var Z=[],K=0;Y.on("error",B),Y.on("end",P),Y.end(O),w();function w(){var z;while((z=Y.read())!==null)Z.push(z),K+=z.length;Y.once("readable",w)}function B(z){Y.removeListener("end",P),Y.removeListener("readable",w),H(z)}function P(){var z,A=null;if(K>=X)A=RangeError(W);else z=_.concat(Z,K);Z=[],Y.close(),H(A,z)}}function m(Y,O){if(typeof O==="string")O=_.from(O);if(!_.isBuffer(O))throw TypeError("Not a string or buffer");var H=Y._finishFlushFlag;return Y._processChunk(O,H)}function n(Y){if(!(this instanceof n))return new n(Y);R0.call(this,Y,J.DEFLATE)}function h(Y){if(!(this instanceof h))return new h(Y);R0.call(this,Y,J.INFLATE)}function i(Y){if(!(this instanceof i))return new i(Y);R0.call(this,Y,J.GZIP)}function s(Y){if(!(this instanceof s))return new s(Y);R0.call(this,Y,J.GUNZIP)}function j0(Y){if(!(this instanceof j0))return new j0(Y);R0.call(this,Y,J.DEFLATERAW)}function I0(Y){if(!(this instanceof I0))return new I0(Y);R0.call(this,Y,J.INFLATERAW)}function H0(Y){if(!(this instanceof H0))return new H0(Y);R0.call(this,Y,J.UNZIP)}function L0(Y){return Y===J.Z_NO_FLUSH||Y===J.Z_PARTIAL_FLUSH||Y===J.Z_SYNC_FLUSH||Y===J.Z_FULL_FLUSH||Y===J.Z_FINISH||Y===J.Z_BLOCK}function R0(Y,O){var H=this;if(this._opts=Y=Y||{},this._chunkSize=Y.chunkSize||$.Z_DEFAULT_CHUNK,I.call(this,Y),Y.flush&&!L0(Y.flush))throw Error("Invalid flush flag: "+Y.flush);if(Y.finishFlush&&!L0(Y.finishFlush))throw Error("Invalid flush flag: "+Y.finishFlush);if(this._flushFlag=Y.flush||J.Z_NO_FLUSH,this._finishFlushFlag=typeof Y.finishFlush<"u"?Y.finishFlush:J.Z_FINISH,Y.chunkSize){if(Y.chunkSize<$.Z_MIN_CHUNK||Y.chunkSize>$.Z_MAX_CHUNK)throw Error("Invalid chunk size: "+Y.chunkSize)}if(Y.windowBits){if(Y.windowBits<$.Z_MIN_WINDOWBITS||Y.windowBits>$.Z_MAX_WINDOWBITS)throw Error("Invalid windowBits: "+Y.windowBits)}if(Y.level){if(Y.level<$.Z_MIN_LEVEL||Y.level>$.Z_MAX_LEVEL)throw Error("Invalid compression level: "+Y.level)}if(Y.memLevel){if(Y.memLevel<$.Z_MIN_MEMLEVEL||Y.memLevel>$.Z_MAX_MEMLEVEL)throw Error("Invalid memLevel: "+Y.memLevel)}if(Y.strategy){if(Y.strategy!=$.Z_FILTERED&&Y.strategy!=$.Z_HUFFMAN_ONLY&&Y.strategy!=$.Z_RLE&&Y.strategy!=$.Z_FIXED&&Y.strategy!=$.Z_DEFAULT_STRATEGY)throw Error("Invalid strategy: "+Y.strategy)}if(Y.dictionary){if(!_.isBuffer(Y.dictionary))throw Error("Invalid dictionary: it should be a Buffer instance")}this._handle=new J.Zlib(O);var Z=this;this._hadError=!1,this._handle.onerror=function(B,P){U0(Z),Z._hadError=!0;var z=Error(B);z.errno=P,z.code=$.codes[P],Z.emit("error",z)};var K=$.Z_DEFAULT_COMPRESSION;if(typeof Y.level==="number")K=Y.level;var w=$.Z_DEFAULT_STRATEGY;if(typeof Y.strategy==="number")w=Y.strategy;this._handle.init(Y.windowBits||$.Z_DEFAULT_WINDOWBITS,K,Y.memLevel||$.Z_DEFAULT_MEMLEVEL,w,Y.dictionary),this._buffer=_.allocUnsafe(this._chunkSize),this._offset=0,this._level=K,this._strategy=w,this.once("end",this.close),Object.defineProperty(this,"_closed",{get:function(){return!H._handle},configurable:!0,enumerable:!0})}j.inherits(R0,I),R0.prototype.params=function(Y,O,H){if(Y<$.Z_MIN_LEVEL||Y>$.Z_MAX_LEVEL)throw RangeError("Invalid compression level: "+Y);if(O!=$.Z_FILTERED&&O!=$.Z_HUFFMAN_ONLY&&O!=$.Z_RLE&&O!=$.Z_FIXED&&O!=$.Z_DEFAULT_STRATEGY)throw TypeError("Invalid strategy: "+O);if(this._level!==Y||this._strategy!==O){var Z=this;this.flush(J.Z_SYNC_FLUSH,function(){if(G(Z._handle,"zlib binding closed"),Z._handle.params(Y,O),!Z._hadError){if(Z._level=Y,Z._strategy=O,H)H()}})}else process.nextTick(H)},R0.prototype.reset=function(){return G(this._handle,"zlib binding closed"),this._handle.reset()},R0.prototype._flush=function(Y){this._transform(_.alloc(0),"",Y)},R0.prototype.flush=function(Y,O){var H=this,Z=this._writableState;if(typeof Y==="function"||Y===void 0&&!O)O=Y,Y=J.Z_FULL_FLUSH;if(Z.ended){if(O)process.nextTick(O)}else if(Z.ending){if(O)this.once("end",O)}else if(Z.needDrain){if(O)this.once("drain",function(){return H.flush(Y,O)})}else this._flushFlag=Y,this.write(_.alloc(0),"",O)},R0.prototype.close=function(Y){U0(this,Y),process.nextTick(c0,this)};function U0(Y,O){if(O)process.nextTick(O);if(!Y._handle)return;Y._handle.close(),Y._handle=null}function c0(Y){Y.emit("close")}R0.prototype._transform=function(Y,O,H){var Z,K=this._writableState,w=K.ending||K.ended,B=w&&(!Y||K.length===Y.length);if(Y!==null&&!_.isBuffer(Y))return H(Error("invalid input"));if(!this._handle)return H(Error("zlib binding closed"));if(B)Z=this._finishFlushFlag;else if(Z=this._flushFlag,Y.length>=K.length)this._flushFlag=this._opts.flush||J.Z_NO_FLUSH;this._processChunk(Y,Z,H)},R0.prototype._processChunk=function(Y,O,H){var Z=Y&&Y.length,K=this._chunkSize-this._offset,w=0,B=this,P=typeof H==="function";if(!P){var z=[],A=0,f;this.on("error",function(P0){f=P0}),G(this._handle,"zlib binding closed");do var c=this._handle.writeSync(O,Y,w,Z,this._buffer,this._offset,K);while(!this._hadError&&F0(c[0],c[1]));if(this._hadError)throw f;if(A>=X)throw U0(this),RangeError(W);var p=_.concat(z,A);return U0(this),p}G(this._handle,"zlib binding closed");var Q0=this._handle.write(O,Y,w,Z,this._buffer,this._offset,K);Q0.buffer=Y,Q0.callback=F0;function F0(P0,E0){if(this)this.buffer=null,this.callback=null;if(B._hadError)return;var _0=K-E0;if(G(_0>=0,"have should not go down"),_0>0){var $0=B._buffer.slice(B._offset,B._offset+_0);if(B._offset+=_0,P)B.push($0);else z.push($0),A+=$0.length}if(E0===0||B._offset>=B._chunkSize)K=B._chunkSize,B._offset=0,B._buffer=_.allocUnsafe(B._chunkSize);if(E0===0){if(w+=Z-P0,Z=P0,!P)return!0;var G0=B._handle.write(O,Y,w,Z,B._buffer,B._offset,B._chunkSize);G0.callback=F0,G0.buffer=Y;return}if(!P)return!1;H()}},j.inherits(n,R0),j.inherits(h,R0),j.inherits(i,R0),j.inherits(s,R0),j.inherits(j0,R0),j.inherits(I0,R0),j.inherits(H0,R0)}),mc={};Xs(mc,{default:()=>uc.default});Is(mc,fc(hc(),1));uc=fc(hc(),1),Ds=uc.default});var yL=eU((uJ0,sc)=>{function pc($,_,I){if(!$||typeof $!=="object"||Array.isArray($)||Object.keys($).some((J)=>!_.includes(J)))throw Error(`${I} has an invalid shape`);return $}function Ks($){if(!Array.isArray($)||$.length>256)throw Error("World network egress must be an array of at most 256 exact HTTPS origins");let _=$.map((I)=>{if(typeof I!=="string"||I.length>2048)throw Error("World network egress origins must be strings");let J;try{J=new URL(I)}catch{throw Error(`Invalid World network origin: ${I}`)}if(J.protocol!=="https:"||J.origin!==I||J.username||J.password||!/^[a-z0-9](?:[a-z0-9.-]*[a-z0-9])?$/.test(J.hostname)||J.hostname.split(".").some((j)=>!j||j.length>63||j.startsWith("-")||j.endsWith("-"))||/^[\d.]+$/.test(J.hostname)||J.hostname==="localhost"||J.hostname.endsWith(".localhost"))throw Error(`World network requires an exact canonical HTTPS origin: ${I}`);return I});return Object.freeze([...new Set(_)].sort())}function lc($){let _=pc($,["egress"],"World network");return Object.freeze({egress:Ks(_.egress)})}function dc($,_){if(typeof $!=="string"||!$||$.length>256)throw Error("World network policy requires its World identity");return Object.freeze({version:1,world:$,egress:lc(_).egress})}function rc($){let _=pc($,["version","world","egress"],"World network policy");if(_.version!==1)throw Error("Unsupported World network policy version");return dc(_.world,{egress:_.egress})}function tc($){let _=$.VOLTER_WORLD_NETWORK_POLICY;if(_===void 0)return;if(typeof _!=="string"||_.length>65536)throw Error("Invalid published World network policy");let I=rc(JSON.parse(_));if(!$.VOLTER_WORLD||I.world!==$.VOLTER_WORLD)throw Error("World network policy does not belong to the attached World");return I}function oc($,_){let I;try{I=new URL(String(_))}catch{return!1}return I.protocol==="https:"&&!I.username&&!I.password&&$.egress.includes(I.origin)}function ac($){let _=String($||"").toLowerCase().replace(/^\[|\]$/g,"");if(!_)return!0;if(_==="localhost"||_.endsWith(".localhost")||_.endsWith(".test")||_==="0.0.0.0"||_==="::1")return!0;let I=/^(\d+)\.(\d+)\.(\d+)\.(\d+)$/.exec(_);if(I){let J=Number(I[1]),j=Number(I[2]);return J===127||J===10||J===172&&j>=16&&j<=31||J===192&&j===168||J===169&&j===254}return _.includes(":")&&(_.startsWith("fc")||_.startsWith("fd")||_.startsWith("fe80:"))}function Hs($,_=process.env){let I;try{I=new URL(String($))}catch{return`unparseable destination ${String($)}`}if(ac(I.hostname))return null;if(_.VOLTER_TWIN_STRICT_EGRESS==="1"||_.VOLTER_TWIN_STRICT_EGRESS==="true")return`sealed World refuses untwinned host ${I.hostname}`;let J;try{J=tc(_)}catch(j){return`World network policy unreadable (${j.message}); refusing ${I.hostname}`}if(J!==void 0&&!oc(J,I))return`World network policy does not allow ${I.origin}`;return null}sc.exports={isWorldInternalHost:ac,worldEgressRefusal:Hs,WORLD_NETWORK_POLICY_ENV:"VOLTER_WORLD_NETWORK_POLICY",normalizeWorldNetwork:lc,createWorldNetworkPolicy:dc,parseWorldNetworkPolicy:rc,worldNetworkPolicyFromEnv:tc,allowsWorldNetworkEgress:oc}});var Gx=eU((nJ0,Xx)=>{var ec=new Map;function $x($,_){if(!_||!Array.isArray(_.hosts)||!_.hosts.length)return null;return{name:$,url:typeof _.url==="string"?_.url:null,hosts:new Set(_.hosts.map((I)=>String(I).toLowerCase()))}}function Fs($){if(!$)return{routes:[],twins:{}};let _=Date.now(),I=ec.get($);if(I&&_-I.checkedAt<1000)return I;if(!I)I={checkedAt:0,mtimeMs:-1,routes:[],services:{},twins:{}},ec.set($,I);I.checkedAt=_;let J=(()=>({})),j=(jj(),X1(oN)),G=j.join(j.dirname($),"app-url.json");try{let X=JSON.parse(J.readFileSync($,"utf8"));I.services=X.services||{},I.twins=NK().twinOrigins(X.env||{})}catch{}try{let X=J.statSync(G).mtimeMs;if(X!==I.mtimeMs){I.mtimeMs=X;let T=JSON.parse(J.readFileSync(G,"utf8")),F=T.apps&&typeof T.apps==="object"?Object.entries(T.apps):[];I.routes=[$x("app",T),...F.map(([E,D])=>$x(E,D))].filter(Boolean)}let W=I.services;for(let T of I.routes){let F=T.url??W[T.name]?.url;T.origin=typeof F==="string"?F.replace(/\/$/,""):null}}catch(X){if(I.mtimeMs=-1,X&&X.code==="ENOENT")I.routes=[]}return I}function vx($,_,I={}){let J=String(_||"").toLowerCase().replace(/\.$/,""),j=Fs($),G=j.routes.find((W)=>W.origin&&_x(W.hosts,J));if(!G)return null;let X=(W)=>Object.hasOwn(j.twins,W)||Object.hasOwn(I,W);return NK().vendorsOfHost(J).some(X)?null:G}function _x($,_){if($.has(_))return!0;for(let I=_.indexOf(".");I>0;I=_.indexOf(".",I+1))if($.has(`*${_.slice(I)}`))return!0;return!1}function jx($){return{"x-forwarded-host":$.host,"x-forwarded-proto":$.protocol==="https:"?"https":"http"}}function hP($,_=process.env){let I;try{I=new URL(String($))}catch{return null}if(I.protocol!=="http:"&&I.protocol!=="https:")return null;return vx(_.VOLTER_WORLD_INSTANCE,I.hostname,NK().twinOrigins(_))}var fK=void 0;function mP(){if(fK===void 0){let $=process.env.NODE_EXTRA_CA_CERTS;try{fK=$?(()=>{throw new Error("Cannot require module "+"fs");})().readFileSync($):null}catch{fK=null}}return fK}var As=["accept-encoding","x-twins-key","x-volter-twin-original-host","proxy-connection","host","x-forwarded-host","x-forwarded-proto"];function Ux($,_,I,J,j){let{isIP:G}=(RP(),X1(zc)),X=new URL($.origin),W={};for(let[T,F]of Object.entries(J||{}))if(F!==void 0&&!As.includes(T.toLowerCase()))W[T]=F;if(Object.assign(W,jx(_),{host:_.host}),(_.username||_.password)&&!Object.keys(W).some((T)=>T.toLowerCase()==="authorization"))W.authorization=`Basic ${Buffer.from(`${decodeURIComponent(_.username)}:${decodeURIComponent(_.password)}`).toString("base64")}`;return{protocol:X.protocol,hostname:X.hostname,port:X.port||(X.protocol==="https:"?443:80),method:I,path:`${X.pathname.replace(/\/$/,"")}${_.pathname}${_.search}`,headers:W,...j&&j.signal?{signal:j.signal}:{},...j&&j.timeout!==void 0?{timeout:j.timeout}:{},...X.protocol==="https:"&&mP()?{ca:mP()}:{},...X.protocol==="https:"?{servername:G(X.hostname)?"":X.hostname}:{}}}function Ix($,_,{method:I="POST",headers:J={},body:j,timeoutMs:G=30000,signal:X}={}){let W=new URL(String(_));if(X&&X.aborted)return Promise.reject(X.reason);let T=Ux($,W,I,J),F=(T.protocol==="https:"?(Ac(),X1(Fc)):(SL(),X1(wK))).request;return new Promise((E,D)=>{let q=!1,S=()=>y(X.reason),k=()=>{if(q=!0,clearTimeout(n),X)X.removeEventListener("abort",S)},y=(h)=>{if(!q)k(),m.destroy(),D(h)},m=F(T,(h)=>{h.on("error",y),h.on("aborted",()=>y(Error(`the application's answer to ${W.origin}${W.pathname} was cut off`)));let i=String(h.headers["content-encoding"]||"").toLowerCase(),s=(ic(),X1(nc)),j0=i==="gzip"||i==="x-gzip"?s.createGunzip():i==="deflate"?s.createInflate():i==="br"?s.createBrotliDecompress():null,I0=j0?h.pipe(j0):h,H0=[];I0.on("data",(L0)=>H0.push(L0)),I0.on("error",y),I0.on("end",()=>{if(q)return;k();let L0={};for(let[R0,U0]of Object.entries(h.headers))if(U0!==void 0&&!(j0&&(R0==="content-encoding"||R0==="content-length")))L0[R0.toLowerCase()]=Array.isArray(U0)?U0.join(", "):String(U0);E({status:h.statusCode,headers:L0,body:Buffer.concat(H0).toString("utf8")})})}),n=Number.isFinite(G)?setTimeout(()=>y(Error(`the application did not answer ${W.origin}${W.pathname} within ${G} ms`)),G):void 0;if(m.on("error",y),X)X.addEventListener("abort",S,{once:!0});if(j!=null&&I!=="GET"&&I!=="HEAD")m.write(j);m.end()})}var Ms=[301,302,303,307,308],Es=[204,205,304],Vs=["authorization","cookie","proxy-authorization"];function Ts($,_){if($==null)return null;if(typeof $==="string")return $;if($ instanceof URLSearchParams){if(!Object.keys(_).some((I)=>I.toLowerCase()==="content-type"))_["content-type"]="application/x-www-form-urlencoded;charset=UTF-8";return $.toString()}if($ instanceof ArrayBuffer)return Buffer.from($);if(ArrayBuffer.isView($))return Buffer.from($.buffer,$.byteOffset,$.byteLength);throw TypeError("appFetch sends a string, URLSearchParams or bytes body")}async function Rs($,_={}){if(!hP($)){let T=yL().worldEgressRefusal($);if(T!==null)throw TypeError(T);return fetch($,_)}let I=_.redirect||"follow",J=_.signal||void 0,j=new URL(String($)),G=String(_.method||"GET").toUpperCase(),X={};new Headers(_.headers||{}).forEach((T,F)=>{X[F]=T});let W=Ts(_.body,X);for(let T=0;;T++){let F=hP(j),E;if(F){let S=yL().worldEgressRefusal(F.origin);if(S!==null)throw TypeError(S);let k=await Ix(F,j,{method:G,headers:X,body:W,signal:J,timeoutMs:300000}),y=Es.includes(k.status)||G==="HEAD",m=k.status>=200&&k.status<=599;if(E=new Response(y?null:k.body,{status:m?k.status:200,headers:k.headers}),!m)Object.defineProperties(E,{status:{value:k.status},ok:{value:!1}});Object.defineProperty(E,"url",{value:j.toString()})}else{let S=yL().worldEgressRefusal(j);if(S!==null)throw TypeError(S);for(let k of Object.keys(X))if(["x-twins-key","x-volter-twin-original-host"].includes(k.toLowerCase()))delete X[k];E=await fetch(j,{method:G,headers:X,...W!=null&&G!=="GET"&&G!=="HEAD"?{body:W}:{},redirect:"manual",signal:J})}if(T>0)Object.defineProperty(E,"redirected",{value:!0});let D=E.headers.get("location");if(!Ms.includes(E.status)||D===null||I==="manual")return E;if(I==="error")throw TypeError(`${j.origin}${j.pathname} redirected, and the request's redirect mode is error`);if(T>=20)throw TypeError("redirect count exceeded");if(E.body)await E.body.cancel();let q=new URL(D,j);if(q.protocol!=="http:"&&q.protocol!=="https:")throw TypeError(`redirect to ${q.protocol} is not followed`);if(E.status===303&&G!=="GET"&&G!=="HEAD"||(E.status===301||E.status===302)&&G==="POST"){G="GET",W=null;for(let S of Object.keys(X))if(/^content-/i.test(S))delete X[S]}if(q.origin!==j.origin){for(let S of Object.keys(X))if(Vs.includes(S.toLowerCase()))delete X[S]}j=q}}Xx.exports={appRouteFor:vx,appHostMatch:_x,appForwardHeaders:jx,appDestination:hP,appRequestOptions:Ux,deliverToApp:Ix,appFetch:Rs,sessionCa:mP}});var Jx=eU((Bs)=>{var bK=Q2(W8()),uP=Q2(U9());(function(){function $(R,C,b,o){return""+C+(b==="s"?"\\73 ":"\\53 ")+o}function _(R,C,b,o){return""+C+(b==="s"?"\\u0073":"\\u0053")+o}function I(R){if(R===null||typeof R!=="object")return null;return R=Z6&&R[Z6]||R["@@iterator"],typeof R==="function"?R:null}function J(R){return R=Object.prototype.toString.call(R),R.slice(8,R.length-1)}function j(R){var C=JSON.stringify(R);return'"'+R+'"'===C?R:C}function G(R){switch(typeof R){case"string":return JSON.stringify(10>=R.length?R:R.slice(0,10)+"...");case"object":if(SU(R))return"[...]";if(R!==null&&R.$$typeof===MX)return"client";return R=J(R),R==="Object"?"{...}":R;case"function":return R.$$typeof===MX?"client":(R=R.displayName||R.name)?"function "+R:"function";default:return String(R)}}function X(R){if(typeof R==="string")return R;switch(R){case S4:return"Suspense";case k4:return"SuspenseList"}if(typeof R==="object")switch(R.$$typeof){case RI:return X(R.render);case Vj:return X(R.type);case OU:var C=R._payload;R=R._init;try{return X(R(C))}catch(b){}}return""}function W(R,C){var b=J(R);if(b!=="Object"&&b!=="Array")return b;var o=-1,v0=0;if(SU(R))if(cY.has(R)){var V0=cY.get(R);b="<"+X(V0)+">";for(var n0=0;n0<R.length;n0++){var e0=R[n0];e0=typeof e0==="string"?e0:typeof e0==="object"&&e0!==null?"{"+W(e0)+"}":"{"+G(e0)+"}",""+n0===C?(o=b.length,v0=e0.length,b+=e0):b=15>e0.length&&40>b.length+e0.length?b+e0:b+"{...}"}b+="</"+X(V0)+">"}else{b="[";for(V0=0;V0<R.length;V0++)0<V0&&(b+=", "),n0=R[V0],n0=typeof n0==="object"&&n0!==null?W(n0):G(n0),""+V0===C?(o=b.length,v0=n0.length,b+=n0):b=10>n0.length&&40>b.length+n0.length?b+n0:b+"...";b+="]"}else if(R.$$typeof===n6)b="<"+X(R.type)+"/>";else{if(R.$$typeof===MX)return"client";if(kY.has(R)){b=kY.get(R),b="<"+(X(b)||"..."),V0=Object.keys(R);for(n0=0;n0<V0.length;n0++){b+=" ",e0=V0[n0],b+=j(e0)+"=";var k$=R[e0],Q$=e0===C&&typeof k$==="object"&&k$!==null?W(k$):G(k$);typeof k$!=="string"&&(Q$="{"+Q$+"}"),e0===C?(o=b.length,v0=Q$.length,b+=Q$):b=10>Q$.length&&40>b.length+Q$.length?b+Q$:b+"..."}b+=">"}else{b="{",V0=Object.keys(R);for(n0=0;n0<V0.length;n0++)0<n0&&(b+=", "),e0=V0[n0],b+=j(e0)+": ",k$=R[e0],k$=typeof k$==="object"&&k$!==null?W(k$):G(k$),e0===C?(o=b.length,v0=k$.length,b+=k$):b=10>k$.length&&40>b.length+k$.length?b+k$:b+"...";b+="}"}}return C===void 0?b:-1<o&&0<v0?(R=" ".repeat(o)+"^".repeat(v0),`
316
+ `));var J0=new y({actual:_0,expected:$0,message:G0,operator:q0,stackStartFn:K0});throw J0.generatedMessage=a,J0}}Y.match=function _0($0,G0,K0){P0($0,G0,K0,_0,"match")},Y.doesNotMatch=function _0($0,G0,K0){P0($0,G0,K0,_0,"doesNotMatch")};function E0(){for(var _0=arguments.length,$0=Array(_0),G0=0;G0<_0;G0++)$0[G0]=arguments[G0];K.apply(void 0,[E0,$0.length].concat($0))}Y.strict=j0(E0,Y,{equal:Y.strictEqual,deepEqual:Y.deepStrictEqual,notEqual:Y.notStrictEqual,notDeepEqual:Y.notDeepStrictEqual}),Y.strict.strict=Y.strict}),xc=io(qP(),1),{AssertionError:xa,CallTracker:fa,deepEqual:ya,deepStrictEqual:ba,doesNotMatch:ha,doesNotReject:ma,doesNotThrow:ua,equal:na,fail:ia,ifError:pa,match:la,notDeepEqual:da,notDeepStrictEqual:ra,notEqual:ta,notStrictEqual:oa,ok:aa,rejects:sa,strict:ea,strictEqual:$s,throws:vs}=xc,_s=xc});var nc={};_j(nc,{default:()=>Ds});var js,Us,fL,yP,bP,Is=($,_,I)=>{for(let J of yP(_))if(!bP.call($,J)&&J!=="default")fL($,J,{get:()=>_[J],enumerable:!0});if(I){for(let J of yP(_))if(!bP.call(I,J)&&J!=="default")fL(I,J,{get:()=>_[J],enumerable:!0});return I}},fc=($,_,I)=>{I=$!=null?js(Us($)):{};let J=_||!$||!$.__esModule?fL(I,"default",{value:$,enumerable:!0}):I;for(let j of yP($))if(!bP.call(J,j))fL(J,j,{get:()=>$[j],enumerable:!0});return J},V4=($,_)=>()=>(_||$((_={exports:{}}).exports,_),_.exports),Xs=($,_)=>{for(var I in _)fL($,I,{get:_[I],enumerable:!0,configurable:!0,set:(J)=>_[I]=()=>J})},Gs,xK,Ys,yc,bc,Js,Qs,zs,Zs,Os,Ls,Ws,hc,mc,uc,Ds;var ic=GX(()=>{js=Object.create,{getPrototypeOf:Us,defineProperty:fL,getOwnPropertyNames:yP}=Object,bP=Object.prototype.hasOwnProperty,Gs=V4(($,_)=>{function I(){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}_.exports=I}),xK=V4(($)=>{var _=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function I(G,X){return Object.prototype.hasOwnProperty.call(G,X)}$.assign=function(G){var X=Array.prototype.slice.call(arguments,1);while(X.length){var W=X.shift();if(!W)continue;if(typeof W!=="object")throw TypeError(W+"must be non-object");for(var T in W)if(I(W,T))G[T]=W[T]}return G},$.shrinkBuf=function(G,X){if(G.length===X)return G;if(G.subarray)return G.subarray(0,X);return G.length=X,G};var J={arraySet:function(G,X,W,T,F){if(X.subarray&&G.subarray){G.set(X.subarray(W,W+T),F);return}for(var E=0;E<T;E++)G[F+E]=X[W+E]},flattenChunks:function(G){var X,W,T,F,E,D;T=0;for(X=0,W=G.length;X<W;X++)T+=G[X].length;D=new Uint8Array(T),F=0;for(X=0,W=G.length;X<W;X++)E=G[X],D.set(E,F),F+=E.length;return D}},j={arraySet:function(G,X,W,T,F){for(var E=0;E<T;E++)G[F+E]=X[W+E]},flattenChunks:function(G){return[].concat.apply([],G)}};$.setTyped=function(G){if(G)$.Buf8=Uint8Array,$.Buf16=Uint16Array,$.Buf32=Int32Array,$.assign($,J);else $.Buf8=Array,$.Buf16=Array,$.Buf32=Array,$.assign($,j)},$.setTyped(_)}),Ys=V4(($)=>{var _=xK(),I=4,J=0,j=1,G=2;function X(T0){var u0=T0.length;while(--u0>=0)T0[u0]=0}var W=0,T=1,F=2,E=3,D=258,q=29,S=256,k=S+1+q,y=30,m=19,n=2*k+1,h=15,i=16,s=7,j0=256,I0=16,H0=17,L0=18,R0=[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],U0=[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],c0=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Y=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],O=512,H=Array((k+2)*2);X(H);var Z=Array(y*2);X(Z);var K=Array(O);X(K);var w=Array(D-E+1);X(w);var B=Array(q);X(B);var P=Array(y);X(P);function z(T0,u0,i0,R$,d){this.static_tree=T0,this.extra_bits=u0,this.extra_base=i0,this.elems=R$,this.max_length=d,this.has_stree=T0&&T0.length}var A,f,c;function p(T0,u0){this.dyn_tree=T0,this.max_code=0,this.stat_desc=u0}function Q0(T0){return T0<256?K[T0]:K[256+(T0>>>7)]}function F0(T0,u0){T0.pending_buf[T0.pending++]=u0&255,T0.pending_buf[T0.pending++]=u0>>>8&255}function P0(T0,u0,i0){if(T0.bi_valid>i-i0)T0.bi_buf|=u0<<T0.bi_valid&65535,F0(T0,T0.bi_buf),T0.bi_buf=u0>>i-T0.bi_valid,T0.bi_valid+=i0-i;else T0.bi_buf|=u0<<T0.bi_valid&65535,T0.bi_valid+=i0}function E0(T0,u0,i0){P0(T0,i0[u0*2],i0[u0*2+1])}function _0(T0,u0){var i0=0;do i0|=T0&1,T0>>>=1,i0<<=1;while(--u0>0);return i0>>>1}function $0(T0){if(T0.bi_valid===16)F0(T0,T0.bi_buf),T0.bi_buf=0,T0.bi_valid=0;else if(T0.bi_valid>=8)T0.pending_buf[T0.pending++]=T0.bi_buf&255,T0.bi_buf>>=8,T0.bi_valid-=8}function G0(T0,u0){var{dyn_tree:i0,max_code:R$}=u0,d=u0.stat_desc.static_tree,O0=u0.stat_desc.has_stree,X0=u0.stat_desc.extra_bits,k0=u0.stat_desc.extra_base,d0=u0.stat_desc.max_length,r,S0,b0,D0,g0,m0,u$=0;for(D0=0;D0<=h;D0++)T0.bl_count[D0]=0;i0[T0.heap[T0.heap_max]*2+1]=0;for(r=T0.heap_max+1;r<n;r++){if(S0=T0.heap[r],D0=i0[i0[S0*2+1]*2+1]+1,D0>d0)D0=d0,u$++;if(i0[S0*2+1]=D0,S0>R$)continue;if(T0.bl_count[D0]++,g0=0,S0>=k0)g0=X0[S0-k0];if(m0=i0[S0*2],T0.opt_len+=m0*(D0+g0),O0)T0.static_len+=m0*(d[S0*2+1]+g0)}if(u$===0)return;do{D0=d0-1;while(T0.bl_count[D0]===0)D0--;T0.bl_count[D0]--,T0.bl_count[D0+1]+=2,T0.bl_count[d0]--,u$-=2}while(u$>0);for(D0=d0;D0!==0;D0--){S0=T0.bl_count[D0];while(S0!==0){if(b0=T0.heap[--r],b0>R$)continue;if(i0[b0*2+1]!==D0)T0.opt_len+=(D0-i0[b0*2+1])*i0[b0*2],i0[b0*2+1]=D0;S0--}}}function K0(T0,u0,i0){var R$=Array(h+1),d=0,O0,X0;for(O0=1;O0<=h;O0++)R$[O0]=d=d+i0[O0-1]<<1;for(X0=0;X0<=u0;X0++){var k0=T0[X0*2+1];if(k0===0)continue;T0[X0*2]=_0(R$[k0]++,k0)}}function q0(){var T0,u0,i0,R$,d,O0=Array(h+1);i0=0;for(R$=0;R$<q-1;R$++){B[R$]=i0;for(T0=0;T0<1<<R0[R$];T0++)w[i0++]=R$}w[i0-1]=R$,d=0;for(R$=0;R$<16;R$++){P[R$]=d;for(T0=0;T0<1<<U0[R$];T0++)K[d++]=R$}d>>=7;for(;R$<y;R$++){P[R$]=d<<7;for(T0=0;T0<1<<U0[R$]-7;T0++)K[256+d++]=R$}for(u0=0;u0<=h;u0++)O0[u0]=0;T0=0;while(T0<=143)H[T0*2+1]=8,T0++,O0[8]++;while(T0<=255)H[T0*2+1]=9,T0++,O0[9]++;while(T0<=279)H[T0*2+1]=7,T0++,O0[7]++;while(T0<=287)H[T0*2+1]=8,T0++,O0[8]++;K0(H,k+1,O0);for(T0=0;T0<y;T0++)Z[T0*2+1]=5,Z[T0*2]=_0(T0,5);A=new z(H,R0,S+1,k,h),f=new z(Z,U0,0,y,h),c=new z([],c0,0,m,s)}function z0(T0){var u0;for(u0=0;u0<k;u0++)T0.dyn_ltree[u0*2]=0;for(u0=0;u0<y;u0++)T0.dyn_dtree[u0*2]=0;for(u0=0;u0<m;u0++)T0.bl_tree[u0*2]=0;T0.dyn_ltree[j0*2]=1,T0.opt_len=T0.static_len=0,T0.last_lit=T0.matches=0}function a(T0){if(T0.bi_valid>8)F0(T0,T0.bi_buf);else if(T0.bi_valid>0)T0.pending_buf[T0.pending++]=T0.bi_buf;T0.bi_buf=0,T0.bi_valid=0}function J0(T0,u0,i0,R$){if(a(T0),R$)F0(T0,i0),F0(T0,~i0);_.arraySet(T0.pending_buf,T0.window,u0,i0,T0.pending),T0.pending+=i0}function y0(T0,u0,i0,R$){var d=u0*2,O0=i0*2;return T0[d]<T0[O0]||T0[d]===T0[O0]&&R$[u0]<=R$[i0]}function N0(T0,u0,i0){var R$=T0.heap[i0],d=i0<<1;while(d<=T0.heap_len){if(d<T0.heap_len&&y0(u0,T0.heap[d+1],T0.heap[d],T0.depth))d++;if(y0(u0,R$,T0.heap[d],T0.depth))break;T0.heap[i0]=T0.heap[d],i0=d,d<<=1}T0.heap[i0]=R$}function A0(T0,u0,i0){var R$,d,O0=0,X0,k0;if(T0.last_lit!==0)do if(R$=T0.pending_buf[T0.d_buf+O0*2]<<8|T0.pending_buf[T0.d_buf+O0*2+1],d=T0.pending_buf[T0.l_buf+O0],O0++,R$===0)E0(T0,d,u0);else{if(X0=w[d],E0(T0,X0+S+1,u0),k0=R0[X0],k0!==0)d-=B[X0],P0(T0,d,k0);if(R$--,X0=Q0(R$),E0(T0,X0,i0),k0=U0[X0],k0!==0)R$-=P[X0],P0(T0,R$,k0)}while(O0<T0.last_lit);E0(T0,j0,u0)}function $$(T0,u0){var i0=u0.dyn_tree,R$=u0.stat_desc.static_tree,d=u0.stat_desc.has_stree,O0=u0.stat_desc.elems,X0,k0,d0=-1,r;T0.heap_len=0,T0.heap_max=n;for(X0=0;X0<O0;X0++)if(i0[X0*2]!==0)T0.heap[++T0.heap_len]=d0=X0,T0.depth[X0]=0;else i0[X0*2+1]=0;while(T0.heap_len<2)if(r=T0.heap[++T0.heap_len]=d0<2?++d0:0,i0[r*2]=1,T0.depth[r]=0,T0.opt_len--,d)T0.static_len-=R$[r*2+1];u0.max_code=d0;for(X0=T0.heap_len>>1;X0>=1;X0--)N0(T0,i0,X0);r=O0;do X0=T0.heap[1],T0.heap[1]=T0.heap[T0.heap_len--],N0(T0,i0,1),k0=T0.heap[1],T0.heap[--T0.heap_max]=X0,T0.heap[--T0.heap_max]=k0,i0[r*2]=i0[X0*2]+i0[k0*2],T0.depth[r]=(T0.depth[X0]>=T0.depth[k0]?T0.depth[X0]:T0.depth[k0])+1,i0[X0*2+1]=i0[k0*2+1]=r,T0.heap[1]=r++,N0(T0,i0,1);while(T0.heap_len>=2);T0.heap[--T0.heap_max]=T0.heap[1],G0(T0,u0),K0(i0,d0,T0.bl_count)}function w0(T0,u0,i0){var R$,d=-1,O0,X0=u0[1],k0=0,d0=7,r=4;if(X0===0)d0=138,r=3;u0[(i0+1)*2+1]=65535;for(R$=0;R$<=i0;R$++){if(O0=X0,X0=u0[(R$+1)*2+1],++k0<d0&&O0===X0)continue;else if(k0<r)T0.bl_tree[O0*2]+=k0;else if(O0!==0){if(O0!==d)T0.bl_tree[O0*2]++;T0.bl_tree[I0*2]++}else if(k0<=10)T0.bl_tree[H0*2]++;else T0.bl_tree[L0*2]++;if(k0=0,d=O0,X0===0)d0=138,r=3;else if(O0===X0)d0=6,r=3;else d0=7,r=4}}function h0(T0,u0,i0){var R$,d=-1,O0,X0=u0[1],k0=0,d0=7,r=4;if(X0===0)d0=138,r=3;for(R$=0;R$<=i0;R$++){if(O0=X0,X0=u0[(R$+1)*2+1],++k0<d0&&O0===X0)continue;else if(k0<r)do E0(T0,O0,T0.bl_tree);while(--k0!==0);else if(O0!==0){if(O0!==d)E0(T0,O0,T0.bl_tree),k0--;E0(T0,I0,T0.bl_tree),P0(T0,k0-3,2)}else if(k0<=10)E0(T0,H0,T0.bl_tree),P0(T0,k0-3,3);else E0(T0,L0,T0.bl_tree),P0(T0,k0-11,7);if(k0=0,d=O0,X0===0)d0=138,r=3;else if(O0===X0)d0=6,r=3;else d0=7,r=4}}function H$(T0){var u0;w0(T0,T0.dyn_ltree,T0.l_desc.max_code),w0(T0,T0.dyn_dtree,T0.d_desc.max_code),$$(T0,T0.bl_desc);for(u0=m-1;u0>=3;u0--)if(T0.bl_tree[Y[u0]*2+1]!==0)break;return T0.opt_len+=3*(u0+1)+5+5+4,u0}function p0(T0,u0,i0,R$){var d;P0(T0,u0-257,5),P0(T0,i0-1,5),P0(T0,R$-4,4);for(d=0;d<R$;d++)P0(T0,T0.bl_tree[Y[d]*2+1],3);h0(T0,T0.dyn_ltree,u0-1),h0(T0,T0.dyn_dtree,i0-1)}function j$(T0){var u0=4093624447,i0;for(i0=0;i0<=31;i0++,u0>>>=1)if(u0&1&&T0.dyn_ltree[i0*2]!==0)return J;if(T0.dyn_ltree[18]!==0||T0.dyn_ltree[20]!==0||T0.dyn_ltree[26]!==0)return j;for(i0=32;i0<S;i0++)if(T0.dyn_ltree[i0*2]!==0)return j;return J}var p$=!1;function C0(T0){if(!p$)q0(),p$=!0;T0.l_desc=new p(T0.dyn_ltree,A),T0.d_desc=new p(T0.dyn_dtree,f),T0.bl_desc=new p(T0.bl_tree,c),T0.bi_buf=0,T0.bi_valid=0,z0(T0)}function x0(T0,u0,i0,R$){P0(T0,(W<<1)+(R$?1:0),3),J0(T0,u0,i0,!0)}function T$(T0){P0(T0,T<<1,3),E0(T0,j0,H),$0(T0)}function U$(T0,u0,i0,R$){var d,O0,X0=0;if(T0.level>0){if(T0.strm.data_type===G)T0.strm.data_type=j$(T0);if($$(T0,T0.l_desc),$$(T0,T0.d_desc),X0=H$(T0),d=T0.opt_len+3+7>>>3,O0=T0.static_len+3+7>>>3,O0<=d)d=O0}else d=O0=i0+5;if(i0+4<=d&&u0!==-1)x0(T0,u0,i0,R$);else if(T0.strategy===I||O0===d)P0(T0,(T<<1)+(R$?1:0),3),A0(T0,H,Z);else P0(T0,(F<<1)+(R$?1:0),3),p0(T0,T0.l_desc.max_code+1,T0.d_desc.max_code+1,X0+1),A0(T0,T0.dyn_ltree,T0.dyn_dtree);if(z0(T0),R$)a(T0)}function G$(T0,u0,i0){if(T0.pending_buf[T0.d_buf+T0.last_lit*2]=u0>>>8&255,T0.pending_buf[T0.d_buf+T0.last_lit*2+1]=u0&255,T0.pending_buf[T0.l_buf+T0.last_lit]=i0&255,T0.last_lit++,u0===0)T0.dyn_ltree[i0*2]++;else T0.matches++,u0--,T0.dyn_ltree[(w[i0]+S+1)*2]++,T0.dyn_dtree[Q0(u0)*2]++;return T0.last_lit===T0.lit_bufsize-1}$._tr_init=C0,$._tr_stored_block=x0,$._tr_flush_block=U$,$._tr_tally=G$,$._tr_align=T$}),yc=V4(($,_)=>{function I(J,j,G,X){var W=J&65535|0,T=J>>>16&65535|0,F=0;while(G!==0){F=G>2000?2000:G,G-=F;do W=W+j[X++]|0,T=T+W|0;while(--F);W%=65521,T%=65521}return W|T<<16|0}_.exports=I}),bc=V4(($,_)=>{function I(){var G,X=[];for(var W=0;W<256;W++){G=W;for(var T=0;T<8;T++)G=G&1?3988292384^G>>>1:G>>>1;X[W]=G}return X}var J=I();function j(G,X,W,T){var F=J,E=T+W;G^=-1;for(var D=T;D<E;D++)G=G>>>8^F[(G^X[D])&255];return G^-1}_.exports=j}),Js=V4(($,_)=>{_.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"}}),Qs=V4(($)=>{var _=xK(),I=Ys(),J=yc(),j=bc(),G=Js(),X=0,W=1,T=3,F=4,E=5,D=0,q=1,S=-2,k=-3,y=-5,m=-1,n=1,h=2,i=3,s=4,j0=0,I0=2,H0=8,L0=9,R0=15,U0=8,c0=29,Y=256,O=Y+1+c0,H=30,Z=19,K=2*O+1,w=15,B=3,P=258,z=P+B+1,A=32,f=42,c=69,p=73,Q0=91,F0=103,P0=113,E0=666,_0=1,$0=2,G0=3,K0=4,q0=3;function z0(r,S0){return r.msg=G[S0],S0}function a(r){return(r<<1)-(r>4?9:0)}function J0(r){var S0=r.length;while(--S0>=0)r[S0]=0}function y0(r){var S0=r.state,b0=S0.pending;if(b0>r.avail_out)b0=r.avail_out;if(b0===0)return;if(_.arraySet(r.output,S0.pending_buf,S0.pending_out,b0,r.next_out),r.next_out+=b0,S0.pending_out+=b0,r.total_out+=b0,r.avail_out-=b0,S0.pending-=b0,S0.pending===0)S0.pending_out=0}function N0(r,S0){I._tr_flush_block(r,r.block_start>=0?r.block_start:-1,r.strstart-r.block_start,S0),r.block_start=r.strstart,y0(r.strm)}function A0(r,S0){r.pending_buf[r.pending++]=S0}function $$(r,S0){r.pending_buf[r.pending++]=S0>>>8&255,r.pending_buf[r.pending++]=S0&255}function w0(r,S0,b0,D0){var g0=r.avail_in;if(g0>D0)g0=D0;if(g0===0)return 0;if(r.avail_in-=g0,_.arraySet(S0,r.input,r.next_in,g0,b0),r.state.wrap===1)r.adler=J(r.adler,S0,g0,b0);else if(r.state.wrap===2)r.adler=j(r.adler,S0,g0,b0);return r.next_in+=g0,r.total_in+=g0,g0}function h0(r,S0){var{max_chain_length:b0,strstart:D0}=r,g0,m0,u$=r.prev_length,Y$=r.nice_match,Y0=r.strstart>r.w_size-z?r.strstart-(r.w_size-z):0,B0=r.window,s0=r.w_mask,a0=r.prev,g$=r.strstart+P,D$=B0[D0+u$-1],F$=B0[D0+u$];if(r.prev_length>=r.good_match)b0>>=2;if(Y$>r.lookahead)Y$=r.lookahead;do{if(g0=S0,B0[g0+u$]!==F$||B0[g0+u$-1]!==D$||B0[g0]!==B0[D0]||B0[++g0]!==B0[D0+1])continue;D0+=2,g0++;do;while(B0[++D0]===B0[++g0]&&B0[++D0]===B0[++g0]&&B0[++D0]===B0[++g0]&&B0[++D0]===B0[++g0]&&B0[++D0]===B0[++g0]&&B0[++D0]===B0[++g0]&&B0[++D0]===B0[++g0]&&B0[++D0]===B0[++g0]&&D0<g$);if(m0=P-(g$-D0),D0=g$-P,m0>u$){if(r.match_start=S0,u$=m0,m0>=Y$)break;D$=B0[D0+u$-1],F$=B0[D0+u$]}}while((S0=a0[S0&s0])>Y0&&--b0!==0);if(u$<=r.lookahead)return u$;return r.lookahead}function H$(r){var S0=r.w_size,b0,D0,g0,m0,u$;do{if(m0=r.window_size-r.lookahead-r.strstart,r.strstart>=S0+(S0-z)){_.arraySet(r.window,r.window,S0,S0,0),r.match_start-=S0,r.strstart-=S0,r.block_start-=S0,D0=r.hash_size,b0=D0;do g0=r.head[--b0],r.head[b0]=g0>=S0?g0-S0:0;while(--D0);D0=S0,b0=D0;do g0=r.prev[--b0],r.prev[b0]=g0>=S0?g0-S0:0;while(--D0);m0+=S0}if(r.strm.avail_in===0)break;if(D0=w0(r.strm,r.window,r.strstart+r.lookahead,m0),r.lookahead+=D0,r.lookahead+r.insert>=B){u$=r.strstart-r.insert,r.ins_h=r.window[u$],r.ins_h=(r.ins_h<<r.hash_shift^r.window[u$+1])&r.hash_mask;while(r.insert)if(r.ins_h=(r.ins_h<<r.hash_shift^r.window[u$+B-1])&r.hash_mask,r.prev[u$&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=u$,u$++,r.insert--,r.lookahead+r.insert<B)break}}while(r.lookahead<z&&r.strm.avail_in!==0)}function p0(r,S0){var b0=65535;if(b0>r.pending_buf_size-5)b0=r.pending_buf_size-5;for(;;){if(r.lookahead<=1){if(H$(r),r.lookahead===0&&S0===X)return _0;if(r.lookahead===0)break}r.strstart+=r.lookahead,r.lookahead=0;var D0=r.block_start+b0;if(r.strstart===0||r.strstart>=D0){if(r.lookahead=r.strstart-D0,r.strstart=D0,N0(r,!1),r.strm.avail_out===0)return _0}if(r.strstart-r.block_start>=r.w_size-z){if(N0(r,!1),r.strm.avail_out===0)return _0}}if(r.insert=0,S0===F){if(N0(r,!0),r.strm.avail_out===0)return G0;return K0}if(r.strstart>r.block_start){if(N0(r,!1),r.strm.avail_out===0)return _0}return _0}function j$(r,S0){var b0,D0;for(;;){if(r.lookahead<z){if(H$(r),r.lookahead<z&&S0===X)return _0;if(r.lookahead===0)break}if(b0=0,r.lookahead>=B)r.ins_h=(r.ins_h<<r.hash_shift^r.window[r.strstart+B-1])&r.hash_mask,b0=r.prev[r.strstart&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=r.strstart;if(b0!==0&&r.strstart-b0<=r.w_size-z)r.match_length=h0(r,b0);if(r.match_length>=B)if(D0=I._tr_tally(r,r.strstart-r.match_start,r.match_length-B),r.lookahead-=r.match_length,r.match_length<=r.max_lazy_match&&r.lookahead>=B){r.match_length--;do r.strstart++,r.ins_h=(r.ins_h<<r.hash_shift^r.window[r.strstart+B-1])&r.hash_mask,b0=r.prev[r.strstart&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=r.strstart;while(--r.match_length!==0);r.strstart++}else r.strstart+=r.match_length,r.match_length=0,r.ins_h=r.window[r.strstart],r.ins_h=(r.ins_h<<r.hash_shift^r.window[r.strstart+1])&r.hash_mask;else D0=I._tr_tally(r,0,r.window[r.strstart]),r.lookahead--,r.strstart++;if(D0){if(N0(r,!1),r.strm.avail_out===0)return _0}}if(r.insert=r.strstart<B-1?r.strstart:B-1,S0===F){if(N0(r,!0),r.strm.avail_out===0)return G0;return K0}if(r.last_lit){if(N0(r,!1),r.strm.avail_out===0)return _0}return $0}function p$(r,S0){var b0,D0,g0;for(;;){if(r.lookahead<z){if(H$(r),r.lookahead<z&&S0===X)return _0;if(r.lookahead===0)break}if(b0=0,r.lookahead>=B)r.ins_h=(r.ins_h<<r.hash_shift^r.window[r.strstart+B-1])&r.hash_mask,b0=r.prev[r.strstart&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=r.strstart;if(r.prev_length=r.match_length,r.prev_match=r.match_start,r.match_length=B-1,b0!==0&&r.prev_length<r.max_lazy_match&&r.strstart-b0<=r.w_size-z){if(r.match_length=h0(r,b0),r.match_length<=5&&(r.strategy===n||r.match_length===B&&r.strstart-r.match_start>4096))r.match_length=B-1}if(r.prev_length>=B&&r.match_length<=r.prev_length){g0=r.strstart+r.lookahead-B,D0=I._tr_tally(r,r.strstart-1-r.prev_match,r.prev_length-B),r.lookahead-=r.prev_length-1,r.prev_length-=2;do if(++r.strstart<=g0)r.ins_h=(r.ins_h<<r.hash_shift^r.window[r.strstart+B-1])&r.hash_mask,b0=r.prev[r.strstart&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=r.strstart;while(--r.prev_length!==0);if(r.match_available=0,r.match_length=B-1,r.strstart++,D0){if(N0(r,!1),r.strm.avail_out===0)return _0}}else if(r.match_available){if(D0=I._tr_tally(r,0,r.window[r.strstart-1]),D0)N0(r,!1);if(r.strstart++,r.lookahead--,r.strm.avail_out===0)return _0}else r.match_available=1,r.strstart++,r.lookahead--}if(r.match_available)D0=I._tr_tally(r,0,r.window[r.strstart-1]),r.match_available=0;if(r.insert=r.strstart<B-1?r.strstart:B-1,S0===F){if(N0(r,!0),r.strm.avail_out===0)return G0;return K0}if(r.last_lit){if(N0(r,!1),r.strm.avail_out===0)return _0}return $0}function C0(r,S0){var b0,D0,g0,m0,u$=r.window;for(;;){if(r.lookahead<=P){if(H$(r),r.lookahead<=P&&S0===X)return _0;if(r.lookahead===0)break}if(r.match_length=0,r.lookahead>=B&&r.strstart>0){if(g0=r.strstart-1,D0=u$[g0],D0===u$[++g0]&&D0===u$[++g0]&&D0===u$[++g0]){m0=r.strstart+P;do;while(D0===u$[++g0]&&D0===u$[++g0]&&D0===u$[++g0]&&D0===u$[++g0]&&D0===u$[++g0]&&D0===u$[++g0]&&D0===u$[++g0]&&D0===u$[++g0]&&g0<m0);if(r.match_length=P-(m0-g0),r.match_length>r.lookahead)r.match_length=r.lookahead}}if(r.match_length>=B)b0=I._tr_tally(r,1,r.match_length-B),r.lookahead-=r.match_length,r.strstart+=r.match_length,r.match_length=0;else b0=I._tr_tally(r,0,r.window[r.strstart]),r.lookahead--,r.strstart++;if(b0){if(N0(r,!1),r.strm.avail_out===0)return _0}}if(r.insert=0,S0===F){if(N0(r,!0),r.strm.avail_out===0)return G0;return K0}if(r.last_lit){if(N0(r,!1),r.strm.avail_out===0)return _0}return $0}function x0(r,S0){var b0;for(;;){if(r.lookahead===0){if(H$(r),r.lookahead===0){if(S0===X)return _0;break}}if(r.match_length=0,b0=I._tr_tally(r,0,r.window[r.strstart]),r.lookahead--,r.strstart++,b0){if(N0(r,!1),r.strm.avail_out===0)return _0}}if(r.insert=0,S0===F){if(N0(r,!0),r.strm.avail_out===0)return G0;return K0}if(r.last_lit){if(N0(r,!1),r.strm.avail_out===0)return _0}return $0}function T$(r,S0,b0,D0,g0){this.good_length=r,this.max_lazy=S0,this.nice_length=b0,this.max_chain=D0,this.func=g0}var U$=[new T$(0,0,0,0,p0),new T$(4,4,8,4,j$),new T$(4,5,16,8,j$),new T$(4,6,32,32,j$),new T$(4,4,16,16,p$),new T$(8,16,32,32,p$),new T$(8,16,128,128,p$),new T$(8,32,128,256,p$),new T$(32,128,258,1024,p$),new T$(32,258,258,4096,p$)];function G$(r){r.window_size=2*r.w_size,J0(r.head),r.max_lazy_match=U$[r.level].max_lazy,r.good_match=U$[r.level].good_length,r.nice_match=U$[r.level].nice_length,r.max_chain_length=U$[r.level].max_chain,r.strstart=0,r.block_start=0,r.lookahead=0,r.insert=0,r.match_length=r.prev_length=B-1,r.match_available=0,r.ins_h=0}function T0(){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=H0,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 _.Buf16(K*2),this.dyn_dtree=new _.Buf16((2*H+1)*2),this.bl_tree=new _.Buf16((2*Z+1)*2),J0(this.dyn_ltree),J0(this.dyn_dtree),J0(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new _.Buf16(w+1),this.heap=new _.Buf16(2*O+1),J0(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new _.Buf16(2*O+1),J0(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 u0(r){var S0;if(!r||!r.state)return z0(r,S);if(r.total_in=r.total_out=0,r.data_type=I0,S0=r.state,S0.pending=0,S0.pending_out=0,S0.wrap<0)S0.wrap=-S0.wrap;return S0.status=S0.wrap?f:P0,r.adler=S0.wrap===2?0:1,S0.last_flush=X,I._tr_init(S0),D}function i0(r){var S0=u0(r);if(S0===D)G$(r.state);return S0}function R$(r,S0){if(!r||!r.state)return S;if(r.state.wrap!==2)return S;return r.state.gzhead=S0,D}function d(r,S0,b0,D0,g0,m0){if(!r)return S;var u$=1;if(S0===m)S0=6;if(D0<0)u$=0,D0=-D0;else if(D0>15)u$=2,D0-=16;if(g0<1||g0>L0||b0!==H0||D0<8||D0>15||S0<0||S0>9||m0<0||m0>s)return z0(r,S);if(D0===8)D0=9;var Y$=new T0;return r.state=Y$,Y$.strm=r,Y$.wrap=u$,Y$.gzhead=null,Y$.w_bits=D0,Y$.w_size=1<<Y$.w_bits,Y$.w_mask=Y$.w_size-1,Y$.hash_bits=g0+7,Y$.hash_size=1<<Y$.hash_bits,Y$.hash_mask=Y$.hash_size-1,Y$.hash_shift=~~((Y$.hash_bits+B-1)/B),Y$.window=new _.Buf8(Y$.w_size*2),Y$.head=new _.Buf16(Y$.hash_size),Y$.prev=new _.Buf16(Y$.w_size),Y$.lit_bufsize=1<<g0+6,Y$.pending_buf_size=Y$.lit_bufsize*4,Y$.pending_buf=new _.Buf8(Y$.pending_buf_size),Y$.d_buf=1*Y$.lit_bufsize,Y$.l_buf=3*Y$.lit_bufsize,Y$.level=S0,Y$.strategy=m0,Y$.method=b0,i0(r)}function O0(r,S0){return d(r,S0,H0,R0,U0,j0)}function X0(r,S0){var b0,D0,g0,m0;if(!r||!r.state||S0>E||S0<0)return r?z0(r,S):S;if(D0=r.state,!r.output||!r.input&&r.avail_in!==0||D0.status===E0&&S0!==F)return z0(r,r.avail_out===0?y:S);if(D0.strm=r,b0=D0.last_flush,D0.last_flush=S0,D0.status===f)if(D0.wrap===2)if(r.adler=0,A0(D0,31),A0(D0,139),A0(D0,8),!D0.gzhead)A0(D0,0),A0(D0,0),A0(D0,0),A0(D0,0),A0(D0,0),A0(D0,D0.level===9?2:D0.strategy>=h||D0.level<2?4:0),A0(D0,q0),D0.status=P0;else{if(A0(D0,(D0.gzhead.text?1:0)+(D0.gzhead.hcrc?2:0)+(!D0.gzhead.extra?0:4)+(!D0.gzhead.name?0:8)+(!D0.gzhead.comment?0:16)),A0(D0,D0.gzhead.time&255),A0(D0,D0.gzhead.time>>8&255),A0(D0,D0.gzhead.time>>16&255),A0(D0,D0.gzhead.time>>24&255),A0(D0,D0.level===9?2:D0.strategy>=h||D0.level<2?4:0),A0(D0,D0.gzhead.os&255),D0.gzhead.extra&&D0.gzhead.extra.length)A0(D0,D0.gzhead.extra.length&255),A0(D0,D0.gzhead.extra.length>>8&255);if(D0.gzhead.hcrc)r.adler=j(r.adler,D0.pending_buf,D0.pending,0);D0.gzindex=0,D0.status=c}else{var u$=H0+(D0.w_bits-8<<4)<<8,Y$=-1;if(D0.strategy>=h||D0.level<2)Y$=0;else if(D0.level<6)Y$=1;else if(D0.level===6)Y$=2;else Y$=3;if(u$|=Y$<<6,D0.strstart!==0)u$|=A;if(u$+=31-u$%31,D0.status=P0,$$(D0,u$),D0.strstart!==0)$$(D0,r.adler>>>16),$$(D0,r.adler&65535);r.adler=1}if(D0.status===c)if(D0.gzhead.extra){g0=D0.pending;while(D0.gzindex<(D0.gzhead.extra.length&65535)){if(D0.pending===D0.pending_buf_size){if(D0.gzhead.hcrc&&D0.pending>g0)r.adler=j(r.adler,D0.pending_buf,D0.pending-g0,g0);if(y0(r),g0=D0.pending,D0.pending===D0.pending_buf_size)break}A0(D0,D0.gzhead.extra[D0.gzindex]&255),D0.gzindex++}if(D0.gzhead.hcrc&&D0.pending>g0)r.adler=j(r.adler,D0.pending_buf,D0.pending-g0,g0);if(D0.gzindex===D0.gzhead.extra.length)D0.gzindex=0,D0.status=p}else D0.status=p;if(D0.status===p)if(D0.gzhead.name){g0=D0.pending;do{if(D0.pending===D0.pending_buf_size){if(D0.gzhead.hcrc&&D0.pending>g0)r.adler=j(r.adler,D0.pending_buf,D0.pending-g0,g0);if(y0(r),g0=D0.pending,D0.pending===D0.pending_buf_size){m0=1;break}}if(D0.gzindex<D0.gzhead.name.length)m0=D0.gzhead.name.charCodeAt(D0.gzindex++)&255;else m0=0;A0(D0,m0)}while(m0!==0);if(D0.gzhead.hcrc&&D0.pending>g0)r.adler=j(r.adler,D0.pending_buf,D0.pending-g0,g0);if(m0===0)D0.gzindex=0,D0.status=Q0}else D0.status=Q0;if(D0.status===Q0)if(D0.gzhead.comment){g0=D0.pending;do{if(D0.pending===D0.pending_buf_size){if(D0.gzhead.hcrc&&D0.pending>g0)r.adler=j(r.adler,D0.pending_buf,D0.pending-g0,g0);if(y0(r),g0=D0.pending,D0.pending===D0.pending_buf_size){m0=1;break}}if(D0.gzindex<D0.gzhead.comment.length)m0=D0.gzhead.comment.charCodeAt(D0.gzindex++)&255;else m0=0;A0(D0,m0)}while(m0!==0);if(D0.gzhead.hcrc&&D0.pending>g0)r.adler=j(r.adler,D0.pending_buf,D0.pending-g0,g0);if(m0===0)D0.status=F0}else D0.status=F0;if(D0.status===F0)if(D0.gzhead.hcrc){if(D0.pending+2>D0.pending_buf_size)y0(r);if(D0.pending+2<=D0.pending_buf_size)A0(D0,r.adler&255),A0(D0,r.adler>>8&255),r.adler=0,D0.status=P0}else D0.status=P0;if(D0.pending!==0){if(y0(r),r.avail_out===0)return D0.last_flush=-1,D}else if(r.avail_in===0&&a(S0)<=a(b0)&&S0!==F)return z0(r,y);if(D0.status===E0&&r.avail_in!==0)return z0(r,y);if(r.avail_in!==0||D0.lookahead!==0||S0!==X&&D0.status!==E0){var Y0=D0.strategy===h?x0(D0,S0):D0.strategy===i?C0(D0,S0):U$[D0.level].func(D0,S0);if(Y0===G0||Y0===K0)D0.status=E0;if(Y0===_0||Y0===G0){if(r.avail_out===0)D0.last_flush=-1;return D}if(Y0===$0){if(S0===W)I._tr_align(D0);else if(S0!==E){if(I._tr_stored_block(D0,0,0,!1),S0===T){if(J0(D0.head),D0.lookahead===0)D0.strstart=0,D0.block_start=0,D0.insert=0}}if(y0(r),r.avail_out===0)return D0.last_flush=-1,D}}if(S0!==F)return D;if(D0.wrap<=0)return q;if(D0.wrap===2)A0(D0,r.adler&255),A0(D0,r.adler>>8&255),A0(D0,r.adler>>16&255),A0(D0,r.adler>>24&255),A0(D0,r.total_in&255),A0(D0,r.total_in>>8&255),A0(D0,r.total_in>>16&255),A0(D0,r.total_in>>24&255);else $$(D0,r.adler>>>16),$$(D0,r.adler&65535);if(y0(r),D0.wrap>0)D0.wrap=-D0.wrap;return D0.pending!==0?D:q}function k0(r){var S0;if(!r||!r.state)return S;if(S0=r.state.status,S0!==f&&S0!==c&&S0!==p&&S0!==Q0&&S0!==F0&&S0!==P0&&S0!==E0)return z0(r,S);return r.state=null,S0===P0?z0(r,k):D}function d0(r,S0){var b0=S0.length,D0,g0,m0,u$,Y$,Y0,B0,s0;if(!r||!r.state)return S;if(D0=r.state,u$=D0.wrap,u$===2||u$===1&&D0.status!==f||D0.lookahead)return S;if(u$===1)r.adler=J(r.adler,S0,b0,0);if(D0.wrap=0,b0>=D0.w_size){if(u$===0)J0(D0.head),D0.strstart=0,D0.block_start=0,D0.insert=0;s0=new _.Buf8(D0.w_size),_.arraySet(s0,S0,b0-D0.w_size,D0.w_size,0),S0=s0,b0=D0.w_size}Y$=r.avail_in,Y0=r.next_in,B0=r.input,r.avail_in=b0,r.next_in=0,r.input=S0,H$(D0);while(D0.lookahead>=B){g0=D0.strstart,m0=D0.lookahead-(B-1);do D0.ins_h=(D0.ins_h<<D0.hash_shift^D0.window[g0+B-1])&D0.hash_mask,D0.prev[g0&D0.w_mask]=D0.head[D0.ins_h],D0.head[D0.ins_h]=g0,g0++;while(--m0);D0.strstart=g0,D0.lookahead=B-1,H$(D0)}return D0.strstart+=D0.lookahead,D0.block_start=D0.strstart,D0.insert=D0.lookahead,D0.lookahead=0,D0.match_length=D0.prev_length=B-1,D0.match_available=0,r.next_in=Y0,r.input=B0,r.avail_in=Y$,D0.wrap=u$,D}$.deflateInit=O0,$.deflateInit2=d,$.deflateReset=i0,$.deflateResetKeep=u0,$.deflateSetHeader=R$,$.deflate=X0,$.deflateEnd=k0,$.deflateSetDictionary=d0,$.deflateInfo="pako deflate (from Nodeca project)"}),zs=V4(($,_)=>{var I=30,J=12;_.exports=function(j,G){var X,W,T,F,E,D,q,S,k,y,m,n,h,i,s,j0,I0,H0,L0,R0,U0,c0,Y,O,H;X=j.state,W=j.next_in,O=j.input,T=W+(j.avail_in-5),F=j.next_out,H=j.output,E=F-(G-j.avail_out),D=F+(j.avail_out-257),q=X.dmax,S=X.wsize,k=X.whave,y=X.wnext,m=X.window,n=X.hold,h=X.bits,i=X.lencode,s=X.distcode,j0=(1<<X.lenbits)-1,I0=(1<<X.distbits)-1;$:do{if(h<15)n+=O[W++]<<h,h+=8,n+=O[W++]<<h,h+=8;H0=i[n&j0];v:for(;;){if(L0=H0>>>24,n>>>=L0,h-=L0,L0=H0>>>16&255,L0===0)H[F++]=H0&65535;else if(L0&16){if(R0=H0&65535,L0&=15,L0){if(h<L0)n+=O[W++]<<h,h+=8;R0+=n&(1<<L0)-1,n>>>=L0,h-=L0}if(h<15)n+=O[W++]<<h,h+=8,n+=O[W++]<<h,h+=8;H0=s[n&I0];_:for(;;){if(L0=H0>>>24,n>>>=L0,h-=L0,L0=H0>>>16&255,L0&16){if(U0=H0&65535,L0&=15,h<L0){if(n+=O[W++]<<h,h+=8,h<L0)n+=O[W++]<<h,h+=8}if(U0+=n&(1<<L0)-1,U0>q){j.msg="invalid distance too far back",X.mode=I;break $}if(n>>>=L0,h-=L0,L0=F-E,U0>L0){if(L0=U0-L0,L0>k){if(X.sane){j.msg="invalid distance too far back",X.mode=I;break $}}if(c0=0,Y=m,y===0){if(c0+=S-L0,L0<R0){R0-=L0;do H[F++]=m[c0++];while(--L0);c0=F-U0,Y=H}}else if(y<L0){if(c0+=S+y-L0,L0-=y,L0<R0){R0-=L0;do H[F++]=m[c0++];while(--L0);if(c0=0,y<R0){L0=y,R0-=L0;do H[F++]=m[c0++];while(--L0);c0=F-U0,Y=H}}}else if(c0+=y-L0,L0<R0){R0-=L0;do H[F++]=m[c0++];while(--L0);c0=F-U0,Y=H}while(R0>2)H[F++]=Y[c0++],H[F++]=Y[c0++],H[F++]=Y[c0++],R0-=3;if(R0){if(H[F++]=Y[c0++],R0>1)H[F++]=Y[c0++]}}else{c0=F-U0;do H[F++]=H[c0++],H[F++]=H[c0++],H[F++]=H[c0++],R0-=3;while(R0>2);if(R0){if(H[F++]=H[c0++],R0>1)H[F++]=H[c0++]}}}else if((L0&64)===0){H0=s[(H0&65535)+(n&(1<<L0)-1)];continue _}else{j.msg="invalid distance code",X.mode=I;break $}break}}else if((L0&64)===0){H0=i[(H0&65535)+(n&(1<<L0)-1)];continue v}else if(L0&32){X.mode=J;break $}else{j.msg="invalid literal/length code",X.mode=I;break $}break}}while(W<T&&F<D);R0=h>>3,W-=R0,h-=R0<<3,n&=(1<<h)-1,j.next_in=W,j.next_out=F,j.avail_in=W<T?5+(T-W):5-(W-T),j.avail_out=F<D?257+(D-F):257-(F-D),X.hold=n,X.bits=h;return}}),Zs=V4(($,_)=>{var I=xK(),J=15,j=852,G=592,X=0,W=1,T=2,F=[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],E=[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],D=[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],q=[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];_.exports=function(S,k,y,m,n,h,i,s){var j0=s.bits,I0=0,H0=0,L0=0,R0=0,U0=0,c0=0,Y=0,O=0,H=0,Z=0,K,w,B,P,z,A=null,f=0,c,p=new I.Buf16(J+1),Q0=new I.Buf16(J+1),F0=null,P0=0,E0,_0,$0;for(I0=0;I0<=J;I0++)p[I0]=0;for(H0=0;H0<m;H0++)p[k[y+H0]]++;U0=j0;for(R0=J;R0>=1;R0--)if(p[R0]!==0)break;if(U0>R0)U0=R0;if(R0===0)return n[h++]=20971520,n[h++]=20971520,s.bits=1,0;for(L0=1;L0<R0;L0++)if(p[L0]!==0)break;if(U0<L0)U0=L0;O=1;for(I0=1;I0<=J;I0++)if(O<<=1,O-=p[I0],O<0)return-1;if(O>0&&(S===X||R0!==1))return-1;Q0[1]=0;for(I0=1;I0<J;I0++)Q0[I0+1]=Q0[I0]+p[I0];for(H0=0;H0<m;H0++)if(k[y+H0]!==0)i[Q0[k[y+H0]]++]=H0;if(S===X)A=F0=i,c=19;else if(S===W)A=F,f-=257,F0=E,P0-=257,c=256;else A=D,F0=q,c=-1;if(Z=0,H0=0,I0=L0,z=h,c0=U0,Y=0,B=-1,H=1<<U0,P=H-1,S===W&&H>j||S===T&&H>G)return 1;for(;;){if(E0=I0-Y,i[H0]<c)_0=0,$0=i[H0];else if(i[H0]>c)_0=F0[P0+i[H0]],$0=A[f+i[H0]];else _0=96,$0=0;K=1<<I0-Y,w=1<<c0,L0=w;do w-=K,n[z+(Z>>Y)+w]=E0<<24|_0<<16|$0|0;while(w!==0);K=1<<I0-1;while(Z&K)K>>=1;if(K!==0)Z&=K-1,Z+=K;else Z=0;if(H0++,--p[I0]===0){if(I0===R0)break;I0=k[y+i[H0]]}if(I0>U0&&(Z&P)!==B){if(Y===0)Y=U0;z+=L0,c0=I0-Y,O=1<<c0;while(c0+Y<R0){if(O-=p[c0+Y],O<=0)break;c0++,O<<=1}if(H+=1<<c0,S===W&&H>j||S===T&&H>G)return 1;B=Z&P,n[B]=U0<<24|c0<<16|z-h|0}}if(Z!==0)n[z+Z]=I0-Y<<24|4194304|0;return s.bits=U0,0}}),Os=V4(($)=>{var _=xK(),I=yc(),J=bc(),j=zs(),G=Zs(),X=0,W=1,T=2,F=4,E=5,D=6,q=0,S=1,k=2,y=-2,m=-3,n=-4,h=-5,i=8,s=1,j0=2,I0=3,H0=4,L0=5,R0=6,U0=7,c0=8,Y=9,O=10,H=11,Z=12,K=13,w=14,B=15,P=16,z=17,A=18,f=19,c=20,p=21,Q0=22,F0=23,P0=24,E0=25,_0=26,$0=27,G0=28,K0=29,q0=30,z0=31,a=32,J0=852,y0=592,N0=15,A0=N0;function $$(d){return(d>>>24&255)+(d>>>8&65280)+((d&65280)<<8)+((d&255)<<24)}function w0(){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 _.Buf16(320),this.work=new _.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function h0(d){var O0;if(!d||!d.state)return y;if(O0=d.state,d.total_in=d.total_out=O0.total=0,d.msg="",O0.wrap)d.adler=O0.wrap&1;return O0.mode=s,O0.last=0,O0.havedict=0,O0.dmax=32768,O0.head=null,O0.hold=0,O0.bits=0,O0.lencode=O0.lendyn=new _.Buf32(J0),O0.distcode=O0.distdyn=new _.Buf32(y0),O0.sane=1,O0.back=-1,q}function H$(d){var O0;if(!d||!d.state)return y;return O0=d.state,O0.wsize=0,O0.whave=0,O0.wnext=0,h0(d)}function p0(d,O0){var X0,k0;if(!d||!d.state)return y;if(k0=d.state,O0<0)X0=0,O0=-O0;else if(X0=(O0>>4)+1,O0<48)O0&=15;if(O0&&(O0<8||O0>15))return y;if(k0.window!==null&&k0.wbits!==O0)k0.window=null;return k0.wrap=X0,k0.wbits=O0,H$(d)}function j$(d,O0){var X0,k0;if(!d)return y;if(k0=new w0,d.state=k0,k0.window=null,X0=p0(d,O0),X0!==q)d.state=null;return X0}function p$(d){return j$(d,A0)}var C0=!0,x0,T$;function U$(d){if(C0){var O0;x0=new _.Buf32(512),T$=new _.Buf32(32),O0=0;while(O0<144)d.lens[O0++]=8;while(O0<256)d.lens[O0++]=9;while(O0<280)d.lens[O0++]=7;while(O0<288)d.lens[O0++]=8;G(W,d.lens,0,288,x0,0,d.work,{bits:9}),O0=0;while(O0<32)d.lens[O0++]=5;G(T,d.lens,0,32,T$,0,d.work,{bits:5}),C0=!1}d.lencode=x0,d.lenbits=9,d.distcode=T$,d.distbits=5}function G$(d,O0,X0,k0){var d0,r=d.state;if(r.window===null)r.wsize=1<<r.wbits,r.wnext=0,r.whave=0,r.window=new _.Buf8(r.wsize);if(k0>=r.wsize)_.arraySet(r.window,O0,X0-r.wsize,r.wsize,0),r.wnext=0,r.whave=r.wsize;else{if(d0=r.wsize-r.wnext,d0>k0)d0=k0;if(_.arraySet(r.window,O0,X0-k0,d0,r.wnext),k0-=d0,k0)_.arraySet(r.window,O0,X0-k0,k0,0),r.wnext=k0,r.whave=r.wsize;else{if(r.wnext+=d0,r.wnext===r.wsize)r.wnext=0;if(r.whave<r.wsize)r.whave+=d0}}return 0}function T0(d,O0){var X0,k0,d0,r,S0,b0,D0,g0,m0,u$,Y$,Y0,B0,s0,a0=0,g$,D$,F$,A1,c$,q$,Y1,O$,V$=new _.Buf8(4),w1,j1,v1=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!d||!d.state||!d.output||!d.input&&d.avail_in!==0)return y;if(X0=d.state,X0.mode===Z)X0.mode=K;S0=d.next_out,d0=d.output,D0=d.avail_out,r=d.next_in,k0=d.input,b0=d.avail_in,g0=X0.hold,m0=X0.bits,u$=b0,Y$=D0,O$=q;$:for(;;)switch(X0.mode){case s:if(X0.wrap===0){X0.mode=K;break}while(m0<16){if(b0===0)break $;b0--,g0+=k0[r++]<<m0,m0+=8}if(X0.wrap&2&&g0===35615){X0.check=0,V$[0]=g0&255,V$[1]=g0>>>8&255,X0.check=J(X0.check,V$,2,0),g0=0,m0=0,X0.mode=j0;break}if(X0.flags=0,X0.head)X0.head.done=!1;if(!(X0.wrap&1)||(((g0&255)<<8)+(g0>>8))%31){d.msg="incorrect header check",X0.mode=q0;break}if((g0&15)!==i){d.msg="unknown compression method",X0.mode=q0;break}if(g0>>>=4,m0-=4,Y1=(g0&15)+8,X0.wbits===0)X0.wbits=Y1;else if(Y1>X0.wbits){d.msg="invalid window size",X0.mode=q0;break}X0.dmax=1<<Y1,d.adler=X0.check=1,X0.mode=g0&512?O:Z,g0=0,m0=0;break;case j0:while(m0<16){if(b0===0)break $;b0--,g0+=k0[r++]<<m0,m0+=8}if(X0.flags=g0,(X0.flags&255)!==i){d.msg="unknown compression method",X0.mode=q0;break}if(X0.flags&57344){d.msg="unknown header flags set",X0.mode=q0;break}if(X0.head)X0.head.text=g0>>8&1;if(X0.flags&512)V$[0]=g0&255,V$[1]=g0>>>8&255,X0.check=J(X0.check,V$,2,0);g0=0,m0=0,X0.mode=I0;case I0:while(m0<32){if(b0===0)break $;b0--,g0+=k0[r++]<<m0,m0+=8}if(X0.head)X0.head.time=g0;if(X0.flags&512)V$[0]=g0&255,V$[1]=g0>>>8&255,V$[2]=g0>>>16&255,V$[3]=g0>>>24&255,X0.check=J(X0.check,V$,4,0);g0=0,m0=0,X0.mode=H0;case H0:while(m0<16){if(b0===0)break $;b0--,g0+=k0[r++]<<m0,m0+=8}if(X0.head)X0.head.xflags=g0&255,X0.head.os=g0>>8;if(X0.flags&512)V$[0]=g0&255,V$[1]=g0>>>8&255,X0.check=J(X0.check,V$,2,0);g0=0,m0=0,X0.mode=L0;case L0:if(X0.flags&1024){while(m0<16){if(b0===0)break $;b0--,g0+=k0[r++]<<m0,m0+=8}if(X0.length=g0,X0.head)X0.head.extra_len=g0;if(X0.flags&512)V$[0]=g0&255,V$[1]=g0>>>8&255,X0.check=J(X0.check,V$,2,0);g0=0,m0=0}else if(X0.head)X0.head.extra=null;X0.mode=R0;case R0:if(X0.flags&1024){if(Y0=X0.length,Y0>b0)Y0=b0;if(Y0){if(X0.head){if(Y1=X0.head.extra_len-X0.length,!X0.head.extra)X0.head.extra=Array(X0.head.extra_len);_.arraySet(X0.head.extra,k0,r,Y0,Y1)}if(X0.flags&512)X0.check=J(X0.check,k0,Y0,r);b0-=Y0,r+=Y0,X0.length-=Y0}if(X0.length)break $}X0.length=0,X0.mode=U0;case U0:if(X0.flags&2048){if(b0===0)break $;Y0=0;do if(Y1=k0[r+Y0++],X0.head&&Y1&&X0.length<65536)X0.head.name+=String.fromCharCode(Y1);while(Y1&&Y0<b0);if(X0.flags&512)X0.check=J(X0.check,k0,Y0,r);if(b0-=Y0,r+=Y0,Y1)break $}else if(X0.head)X0.head.name=null;X0.length=0,X0.mode=c0;case c0:if(X0.flags&4096){if(b0===0)break $;Y0=0;do if(Y1=k0[r+Y0++],X0.head&&Y1&&X0.length<65536)X0.head.comment+=String.fromCharCode(Y1);while(Y1&&Y0<b0);if(X0.flags&512)X0.check=J(X0.check,k0,Y0,r);if(b0-=Y0,r+=Y0,Y1)break $}else if(X0.head)X0.head.comment=null;X0.mode=Y;case Y:if(X0.flags&512){while(m0<16){if(b0===0)break $;b0--,g0+=k0[r++]<<m0,m0+=8}if(g0!==(X0.check&65535)){d.msg="header crc mismatch",X0.mode=q0;break}g0=0,m0=0}if(X0.head)X0.head.hcrc=X0.flags>>9&1,X0.head.done=!0;d.adler=X0.check=0,X0.mode=Z;break;case O:while(m0<32){if(b0===0)break $;b0--,g0+=k0[r++]<<m0,m0+=8}d.adler=X0.check=$$(g0),g0=0,m0=0,X0.mode=H;case H:if(X0.havedict===0)return d.next_out=S0,d.avail_out=D0,d.next_in=r,d.avail_in=b0,X0.hold=g0,X0.bits=m0,k;d.adler=X0.check=1,X0.mode=Z;case Z:if(O0===E||O0===D)break $;case K:if(X0.last){g0>>>=m0&7,m0-=m0&7,X0.mode=$0;break}while(m0<3){if(b0===0)break $;b0--,g0+=k0[r++]<<m0,m0+=8}switch(X0.last=g0&1,g0>>>=1,m0-=1,g0&3){case 0:X0.mode=w;break;case 1:if(U$(X0),X0.mode=c,O0===D){g0>>>=2,m0-=2;break $}break;case 2:X0.mode=z;break;case 3:d.msg="invalid block type",X0.mode=q0}g0>>>=2,m0-=2;break;case w:g0>>>=m0&7,m0-=m0&7;while(m0<32){if(b0===0)break $;b0--,g0+=k0[r++]<<m0,m0+=8}if((g0&65535)!==(g0>>>16^65535)){d.msg="invalid stored block lengths",X0.mode=q0;break}if(X0.length=g0&65535,g0=0,m0=0,X0.mode=B,O0===D)break $;case B:X0.mode=P;case P:if(Y0=X0.length,Y0){if(Y0>b0)Y0=b0;if(Y0>D0)Y0=D0;if(Y0===0)break $;_.arraySet(d0,k0,r,Y0,S0),b0-=Y0,r+=Y0,D0-=Y0,S0+=Y0,X0.length-=Y0;break}X0.mode=Z;break;case z:while(m0<14){if(b0===0)break $;b0--,g0+=k0[r++]<<m0,m0+=8}if(X0.nlen=(g0&31)+257,g0>>>=5,m0-=5,X0.ndist=(g0&31)+1,g0>>>=5,m0-=5,X0.ncode=(g0&15)+4,g0>>>=4,m0-=4,X0.nlen>286||X0.ndist>30){d.msg="too many length or distance symbols",X0.mode=q0;break}X0.have=0,X0.mode=A;case A:while(X0.have<X0.ncode){while(m0<3){if(b0===0)break $;b0--,g0+=k0[r++]<<m0,m0+=8}X0.lens[v1[X0.have++]]=g0&7,g0>>>=3,m0-=3}while(X0.have<19)X0.lens[v1[X0.have++]]=0;if(X0.lencode=X0.lendyn,X0.lenbits=7,w1={bits:X0.lenbits},O$=G(X,X0.lens,0,19,X0.lencode,0,X0.work,w1),X0.lenbits=w1.bits,O$){d.msg="invalid code lengths set",X0.mode=q0;break}X0.have=0,X0.mode=f;case f:while(X0.have<X0.nlen+X0.ndist){for(;;){if(a0=X0.lencode[g0&(1<<X0.lenbits)-1],g$=a0>>>24,D$=a0>>>16&255,F$=a0&65535,g$<=m0)break;if(b0===0)break $;b0--,g0+=k0[r++]<<m0,m0+=8}if(F$<16)g0>>>=g$,m0-=g$,X0.lens[X0.have++]=F$;else{if(F$===16){j1=g$+2;while(m0<j1){if(b0===0)break $;b0--,g0+=k0[r++]<<m0,m0+=8}if(g0>>>=g$,m0-=g$,X0.have===0){d.msg="invalid bit length repeat",X0.mode=q0;break}Y1=X0.lens[X0.have-1],Y0=3+(g0&3),g0>>>=2,m0-=2}else if(F$===17){j1=g$+3;while(m0<j1){if(b0===0)break $;b0--,g0+=k0[r++]<<m0,m0+=8}g0>>>=g$,m0-=g$,Y1=0,Y0=3+(g0&7),g0>>>=3,m0-=3}else{j1=g$+7;while(m0<j1){if(b0===0)break $;b0--,g0+=k0[r++]<<m0,m0+=8}g0>>>=g$,m0-=g$,Y1=0,Y0=11+(g0&127),g0>>>=7,m0-=7}if(X0.have+Y0>X0.nlen+X0.ndist){d.msg="invalid bit length repeat",X0.mode=q0;break}while(Y0--)X0.lens[X0.have++]=Y1}}if(X0.mode===q0)break;if(X0.lens[256]===0){d.msg="invalid code -- missing end-of-block",X0.mode=q0;break}if(X0.lenbits=9,w1={bits:X0.lenbits},O$=G(W,X0.lens,0,X0.nlen,X0.lencode,0,X0.work,w1),X0.lenbits=w1.bits,O$){d.msg="invalid literal/lengths set",X0.mode=q0;break}if(X0.distbits=6,X0.distcode=X0.distdyn,w1={bits:X0.distbits},O$=G(T,X0.lens,X0.nlen,X0.ndist,X0.distcode,0,X0.work,w1),X0.distbits=w1.bits,O$){d.msg="invalid distances set",X0.mode=q0;break}if(X0.mode=c,O0===D)break $;case c:X0.mode=p;case p:if(b0>=6&&D0>=258){if(d.next_out=S0,d.avail_out=D0,d.next_in=r,d.avail_in=b0,X0.hold=g0,X0.bits=m0,j(d,Y$),S0=d.next_out,d0=d.output,D0=d.avail_out,r=d.next_in,k0=d.input,b0=d.avail_in,g0=X0.hold,m0=X0.bits,X0.mode===Z)X0.back=-1;break}X0.back=0;for(;;){if(a0=X0.lencode[g0&(1<<X0.lenbits)-1],g$=a0>>>24,D$=a0>>>16&255,F$=a0&65535,g$<=m0)break;if(b0===0)break $;b0--,g0+=k0[r++]<<m0,m0+=8}if(D$&&(D$&240)===0){A1=g$,c$=D$,q$=F$;for(;;){if(a0=X0.lencode[q$+((g0&(1<<A1+c$)-1)>>A1)],g$=a0>>>24,D$=a0>>>16&255,F$=a0&65535,A1+g$<=m0)break;if(b0===0)break $;b0--,g0+=k0[r++]<<m0,m0+=8}g0>>>=A1,m0-=A1,X0.back+=A1}if(g0>>>=g$,m0-=g$,X0.back+=g$,X0.length=F$,D$===0){X0.mode=_0;break}if(D$&32){X0.back=-1,X0.mode=Z;break}if(D$&64){d.msg="invalid literal/length code",X0.mode=q0;break}X0.extra=D$&15,X0.mode=Q0;case Q0:if(X0.extra){j1=X0.extra;while(m0<j1){if(b0===0)break $;b0--,g0+=k0[r++]<<m0,m0+=8}X0.length+=g0&(1<<X0.extra)-1,g0>>>=X0.extra,m0-=X0.extra,X0.back+=X0.extra}X0.was=X0.length,X0.mode=F0;case F0:for(;;){if(a0=X0.distcode[g0&(1<<X0.distbits)-1],g$=a0>>>24,D$=a0>>>16&255,F$=a0&65535,g$<=m0)break;if(b0===0)break $;b0--,g0+=k0[r++]<<m0,m0+=8}if((D$&240)===0){A1=g$,c$=D$,q$=F$;for(;;){if(a0=X0.distcode[q$+((g0&(1<<A1+c$)-1)>>A1)],g$=a0>>>24,D$=a0>>>16&255,F$=a0&65535,A1+g$<=m0)break;if(b0===0)break $;b0--,g0+=k0[r++]<<m0,m0+=8}g0>>>=A1,m0-=A1,X0.back+=A1}if(g0>>>=g$,m0-=g$,X0.back+=g$,D$&64){d.msg="invalid distance code",X0.mode=q0;break}X0.offset=F$,X0.extra=D$&15,X0.mode=P0;case P0:if(X0.extra){j1=X0.extra;while(m0<j1){if(b0===0)break $;b0--,g0+=k0[r++]<<m0,m0+=8}X0.offset+=g0&(1<<X0.extra)-1,g0>>>=X0.extra,m0-=X0.extra,X0.back+=X0.extra}if(X0.offset>X0.dmax){d.msg="invalid distance too far back",X0.mode=q0;break}X0.mode=E0;case E0:if(D0===0)break $;if(Y0=Y$-D0,X0.offset>Y0){if(Y0=X0.offset-Y0,Y0>X0.whave){if(X0.sane){d.msg="invalid distance too far back",X0.mode=q0;break}}if(Y0>X0.wnext)Y0-=X0.wnext,B0=X0.wsize-Y0;else B0=X0.wnext-Y0;if(Y0>X0.length)Y0=X0.length;s0=X0.window}else s0=d0,B0=S0-X0.offset,Y0=X0.length;if(Y0>D0)Y0=D0;D0-=Y0,X0.length-=Y0;do d0[S0++]=s0[B0++];while(--Y0);if(X0.length===0)X0.mode=p;break;case _0:if(D0===0)break $;d0[S0++]=X0.length,D0--,X0.mode=p;break;case $0:if(X0.wrap){while(m0<32){if(b0===0)break $;b0--,g0|=k0[r++]<<m0,m0+=8}if(Y$-=D0,d.total_out+=Y$,X0.total+=Y$,Y$)d.adler=X0.check=X0.flags?J(X0.check,d0,Y$,S0-Y$):I(X0.check,d0,Y$,S0-Y$);if(Y$=D0,(X0.flags?g0:$$(g0))!==X0.check){d.msg="incorrect data check",X0.mode=q0;break}g0=0,m0=0}X0.mode=G0;case G0:if(X0.wrap&&X0.flags){while(m0<32){if(b0===0)break $;b0--,g0+=k0[r++]<<m0,m0+=8}if(g0!==(X0.total&4294967295)){d.msg="incorrect length check",X0.mode=q0;break}g0=0,m0=0}X0.mode=K0;case K0:O$=S;break $;case q0:O$=m;break $;case z0:return n;case a:default:return y}if(d.next_out=S0,d.avail_out=D0,d.next_in=r,d.avail_in=b0,X0.hold=g0,X0.bits=m0,X0.wsize||Y$!==d.avail_out&&X0.mode<q0&&(X0.mode<$0||O0!==F)){if(G$(d,d.output,d.next_out,Y$-d.avail_out))return X0.mode=z0,n}if(u$-=d.avail_in,Y$-=d.avail_out,d.total_in+=u$,d.total_out+=Y$,X0.total+=Y$,X0.wrap&&Y$)d.adler=X0.check=X0.flags?J(X0.check,d0,Y$,d.next_out-Y$):I(X0.check,d0,Y$,d.next_out-Y$);if(d.data_type=X0.bits+(X0.last?64:0)+(X0.mode===Z?128:0)+(X0.mode===c||X0.mode===B?256:0),(u$===0&&Y$===0||O0===F)&&O$===q)O$=h;return O$}function u0(d){if(!d||!d.state)return y;var O0=d.state;if(O0.window)O0.window=null;return d.state=null,q}function i0(d,O0){var X0;if(!d||!d.state)return y;if(X0=d.state,(X0.wrap&2)===0)return y;return X0.head=O0,O0.done=!1,q}function R$(d,O0){var X0=O0.length,k0,d0,r;if(!d||!d.state)return y;if(k0=d.state,k0.wrap!==0&&k0.mode!==H)return y;if(k0.mode===H){if(d0=1,d0=I(d0,O0,X0,0),d0!==k0.check)return m}if(r=G$(d,O0,X0,X0),r)return k0.mode=z0,n;return k0.havedict=1,q}$.inflateReset=H$,$.inflateReset2=p0,$.inflateResetKeep=h0,$.inflateInit=p$,$.inflateInit2=j$,$.inflate=T0,$.inflateEnd=u0,$.inflateGetHeader=i0,$.inflateSetDictionary=R$,$.inflateInfo="pako inflate (from Nodeca project)"}),Ls=V4(($,_)=>{_.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}}),Ws=V4(($)=>{var _=(fP(),X1(xP)),I=Gs(),J=Qs(),j=Os(),G=Ls();for(X in G)$[X]=G[X];var X;$.NONE=0,$.DEFLATE=1,$.INFLATE=2,$.GZIP=3,$.GUNZIP=4,$.DEFLATERAW=5,$.INFLATERAW=6,$.UNZIP=7;var W=31,T=139;function F(E){if(typeof E!=="number"||E<$.DEFLATE||E>$.UNZIP)throw TypeError("Bad argument");this.dictionary=null,this.err=0,this.flush=0,this.init_done=!1,this.level=0,this.memLevel=0,this.mode=E,this.strategy=0,this.windowBits=0,this.write_in_progress=!1,this.pending_close=!1,this.gzip_id_bytes_read=0}F.prototype.close=function(){if(this.write_in_progress){this.pending_close=!0;return}if(this.pending_close=!1,_(this.init_done,"close before init"),_(this.mode<=$.UNZIP),this.mode===$.DEFLATE||this.mode===$.GZIP||this.mode===$.DEFLATERAW)J.deflateEnd(this.strm);else if(this.mode===$.INFLATE||this.mode===$.GUNZIP||this.mode===$.INFLATERAW||this.mode===$.UNZIP)j.inflateEnd(this.strm);this.mode=$.NONE,this.dictionary=null},F.prototype.write=function(E,D,q,S,k,y,m){return this._write(!0,E,D,q,S,k,y,m)},F.prototype.writeSync=function(E,D,q,S,k,y,m){return this._write(!1,E,D,q,S,k,y,m)},F.prototype._write=function(E,D,q,S,k,y,m,n){if(_.equal(arguments.length,8),_(this.init_done,"write before init"),_(this.mode!==$.NONE,"already finalized"),_.equal(!1,this.write_in_progress,"write already in progress"),_.equal(!1,this.pending_close,"close is pending"),this.write_in_progress=!0,_.equal(!1,D===void 0,"must provide flush value"),this.write_in_progress=!0,D!==$.Z_NO_FLUSH&&D!==$.Z_PARTIAL_FLUSH&&D!==$.Z_SYNC_FLUSH&&D!==$.Z_FULL_FLUSH&&D!==$.Z_FINISH&&D!==$.Z_BLOCK)throw Error("Invalid flush value");if(q==null)q=Buffer.alloc(0),k=0,S=0;if(this.strm.avail_in=k,this.strm.input=q,this.strm.next_in=S,this.strm.avail_out=n,this.strm.output=y,this.strm.next_out=m,this.flush=D,!E){if(this._process(),this._checkError())return this._afterSync();return}var h=this;return process.nextTick(function(){h._process(),h._after()}),this},F.prototype._afterSync=function(){var E=this.strm.avail_out,D=this.strm.avail_in;return this.write_in_progress=!1,[D,E]},F.prototype._process=function(){var E=null;switch(this.mode){case $.DEFLATE:case $.GZIP:case $.DEFLATERAW:this.err=J.deflate(this.strm,this.flush);break;case $.UNZIP:if(this.strm.avail_in>0)E=this.strm.next_in;switch(this.gzip_id_bytes_read){case 0:if(E===null)break;if(this.strm.input[E]===W){if(this.gzip_id_bytes_read=1,E++,this.strm.avail_in===1)break}else{this.mode=$.INFLATE;break}case 1:if(E===null)break;if(this.strm.input[E]===T)this.gzip_id_bytes_read=2,this.mode=$.GUNZIP;else this.mode=$.INFLATE;break;default:throw Error("invalid number of gzip magic number bytes read")}case $.INFLATE:case $.GUNZIP:case $.INFLATERAW:if(this.err=j.inflate(this.strm,this.flush),this.err===$.Z_NEED_DICT&&this.dictionary){if(this.err=j.inflateSetDictionary(this.strm,this.dictionary),this.err===$.Z_OK)this.err=j.inflate(this.strm,this.flush);else if(this.err===$.Z_DATA_ERROR)this.err=$.Z_NEED_DICT}while(this.strm.avail_in>0&&this.mode===$.GUNZIP&&this.err===$.Z_STREAM_END&&this.strm.next_in[0]!==0)this.reset(),this.err=j.inflate(this.strm,this.flush);break;default:throw Error("Unknown mode "+this.mode)}},F.prototype._checkError=function(){switch(this.err){case $.Z_OK:case $.Z_BUF_ERROR:if(this.strm.avail_out!==0&&this.flush===$.Z_FINISH)return this._error("unexpected end of file"),!1;break;case $.Z_STREAM_END:break;case $.Z_NEED_DICT:if(this.dictionary==null)this._error("Missing dictionary");else this._error("Bad dictionary");return!1;default:return this._error("Zlib error"),!1}return!0},F.prototype._after=function(){if(!this._checkError())return;var E=this.strm.avail_out,D=this.strm.avail_in;if(this.write_in_progress=!1,this.callback(D,E),this.pending_close)this.close()},F.prototype._error=function(E){if(this.strm.msg)E=this.strm.msg;if(this.onerror(E,this.err),this.write_in_progress=!1,this.pending_close)this.close()},F.prototype.init=function(E,D,q,S,k){_(arguments.length===4||arguments.length===5,"init(windowBits, level, memLevel, strategy, [dictionary])"),_(E>=8&&E<=15,"invalid windowBits"),_(D>=-1&&D<=9,"invalid compression level"),_(q>=1&&q<=9,"invalid memlevel"),_(S===$.Z_FILTERED||S===$.Z_HUFFMAN_ONLY||S===$.Z_RLE||S===$.Z_FIXED||S===$.Z_DEFAULT_STRATEGY,"invalid strategy"),this._init(D,E,q,S,k),this._setDictionary()},F.prototype.params=function(){throw Error("deflateParams Not supported")},F.prototype.reset=function(){this._reset(),this._setDictionary()},F.prototype._init=function(E,D,q,S,k){if(this.level=E,this.windowBits=D,this.memLevel=q,this.strategy=S,this.flush=$.Z_NO_FLUSH,this.err=$.Z_OK,this.mode===$.GZIP||this.mode===$.GUNZIP)this.windowBits+=16;if(this.mode===$.UNZIP)this.windowBits+=32;if(this.mode===$.DEFLATERAW||this.mode===$.INFLATERAW)this.windowBits=-1*this.windowBits;switch(this.strm=new I,this.mode){case $.DEFLATE:case $.GZIP:case $.DEFLATERAW:this.err=J.deflateInit2(this.strm,this.level,$.Z_DEFLATED,this.windowBits,this.memLevel,this.strategy);break;case $.INFLATE:case $.GUNZIP:case $.INFLATERAW:case $.UNZIP:this.err=j.inflateInit2(this.strm,this.windowBits);break;default:throw Error("Unknown mode "+this.mode)}if(this.err!==$.Z_OK)this._error("Init error");this.dictionary=k,this.write_in_progress=!1,this.init_done=!0},F.prototype._setDictionary=function(){if(this.dictionary==null)return;switch(this.err=$.Z_OK,this.mode){case $.DEFLATE:case $.DEFLATERAW:this.err=J.deflateSetDictionary(this.strm,this.dictionary);break;default:break}if(this.err!==$.Z_OK)this._error("Failed to set dictionary")},F.prototype._reset=function(){switch(this.err=$.Z_OK,this.mode){case $.DEFLATE:case $.DEFLATERAW:case $.GZIP:this.err=J.deflateReset(this.strm);break;case $.INFLATE:case $.INFLATERAW:case $.GUNZIP:this.err=j.inflateReset(this.strm);break;default:break}if(this.err!==$.Z_OK)this._error("Failed to reset stream")},$.Zlib=F}),hc=V4(($)=>{var _=(j_(),X1(__)).Buffer,I=E8().Transform,J=Ws(),j=(pJ(),X1(iJ)),G=(fP(),X1(xP)).ok,X=(j_(),X1(__)).kMaxLength,W="Cannot create final Buffer. It would be larger than 0x"+X.toString(16)+" bytes";J.Z_MIN_WINDOWBITS=8,J.Z_MAX_WINDOWBITS=15,J.Z_DEFAULT_WINDOWBITS=15,J.Z_MIN_CHUNK=64,J.Z_MAX_CHUNK=1/0,J.Z_DEFAULT_CHUNK=16384,J.Z_MIN_MEMLEVEL=1,J.Z_MAX_MEMLEVEL=9,J.Z_DEFAULT_MEMLEVEL=8,J.Z_MIN_LEVEL=-1,J.Z_MAX_LEVEL=9,J.Z_DEFAULT_LEVEL=J.Z_DEFAULT_COMPRESSION;var T=Object.keys(J);for(E=0;E<T.length;E++)if(F=T[E],F.match(/^Z/))Object.defineProperty($,F,{enumerable:!0,value:J[F],writable:!1});var F,E,D={Z_OK:J.Z_OK,Z_STREAM_END:J.Z_STREAM_END,Z_NEED_DICT:J.Z_NEED_DICT,Z_ERRNO:J.Z_ERRNO,Z_STREAM_ERROR:J.Z_STREAM_ERROR,Z_DATA_ERROR:J.Z_DATA_ERROR,Z_MEM_ERROR:J.Z_MEM_ERROR,Z_BUF_ERROR:J.Z_BUF_ERROR,Z_VERSION_ERROR:J.Z_VERSION_ERROR},q=Object.keys(D);for(k=0;k<q.length;k++)S=q[k],D[D[S]]=S;var S,k;Object.defineProperty($,"codes",{enumerable:!0,value:Object.freeze(D),writable:!1}),$.Deflate=n,$.Inflate=h,$.Gzip=i,$.Gunzip=s,$.DeflateRaw=j0,$.InflateRaw=I0,$.Unzip=H0,$.createDeflate=function(Y){return new n(Y)},$.createInflate=function(Y){return new h(Y)},$.createDeflateRaw=function(Y){return new j0(Y)},$.createInflateRaw=function(Y){return new I0(Y)},$.createGzip=function(Y){return new i(Y)},$.createGunzip=function(Y){return new s(Y)},$.createUnzip=function(Y){return new H0(Y)},$.deflate=function(Y,O,H){if(typeof O==="function")H=O,O={};return y(new n(O),Y,H)},$.deflateSync=function(Y,O){return m(new n(O),Y)},$.gzip=function(Y,O,H){if(typeof O==="function")H=O,O={};return y(new i(O),Y,H)},$.gzipSync=function(Y,O){return m(new i(O),Y)},$.deflateRaw=function(Y,O,H){if(typeof O==="function")H=O,O={};return y(new j0(O),Y,H)},$.deflateRawSync=function(Y,O){return m(new j0(O),Y)},$.unzip=function(Y,O,H){if(typeof O==="function")H=O,O={};return y(new H0(O),Y,H)},$.unzipSync=function(Y,O){return m(new H0(O),Y)},$.inflate=function(Y,O,H){if(typeof O==="function")H=O,O={};return y(new h(O),Y,H)},$.inflateSync=function(Y,O){return m(new h(O),Y)},$.gunzip=function(Y,O,H){if(typeof O==="function")H=O,O={};return y(new s(O),Y,H)},$.gunzipSync=function(Y,O){return m(new s(O),Y)},$.inflateRaw=function(Y,O,H){if(typeof O==="function")H=O,O={};return y(new I0(O),Y,H)},$.inflateRawSync=function(Y,O){return m(new I0(O),Y)};function y(Y,O,H){var Z=[],K=0;Y.on("error",B),Y.on("end",P),Y.end(O),w();function w(){var z;while((z=Y.read())!==null)Z.push(z),K+=z.length;Y.once("readable",w)}function B(z){Y.removeListener("end",P),Y.removeListener("readable",w),H(z)}function P(){var z,A=null;if(K>=X)A=RangeError(W);else z=_.concat(Z,K);Z=[],Y.close(),H(A,z)}}function m(Y,O){if(typeof O==="string")O=_.from(O);if(!_.isBuffer(O))throw TypeError("Not a string or buffer");var H=Y._finishFlushFlag;return Y._processChunk(O,H)}function n(Y){if(!(this instanceof n))return new n(Y);R0.call(this,Y,J.DEFLATE)}function h(Y){if(!(this instanceof h))return new h(Y);R0.call(this,Y,J.INFLATE)}function i(Y){if(!(this instanceof i))return new i(Y);R0.call(this,Y,J.GZIP)}function s(Y){if(!(this instanceof s))return new s(Y);R0.call(this,Y,J.GUNZIP)}function j0(Y){if(!(this instanceof j0))return new j0(Y);R0.call(this,Y,J.DEFLATERAW)}function I0(Y){if(!(this instanceof I0))return new I0(Y);R0.call(this,Y,J.INFLATERAW)}function H0(Y){if(!(this instanceof H0))return new H0(Y);R0.call(this,Y,J.UNZIP)}function L0(Y){return Y===J.Z_NO_FLUSH||Y===J.Z_PARTIAL_FLUSH||Y===J.Z_SYNC_FLUSH||Y===J.Z_FULL_FLUSH||Y===J.Z_FINISH||Y===J.Z_BLOCK}function R0(Y,O){var H=this;if(this._opts=Y=Y||{},this._chunkSize=Y.chunkSize||$.Z_DEFAULT_CHUNK,I.call(this,Y),Y.flush&&!L0(Y.flush))throw Error("Invalid flush flag: "+Y.flush);if(Y.finishFlush&&!L0(Y.finishFlush))throw Error("Invalid flush flag: "+Y.finishFlush);if(this._flushFlag=Y.flush||J.Z_NO_FLUSH,this._finishFlushFlag=typeof Y.finishFlush<"u"?Y.finishFlush:J.Z_FINISH,Y.chunkSize){if(Y.chunkSize<$.Z_MIN_CHUNK||Y.chunkSize>$.Z_MAX_CHUNK)throw Error("Invalid chunk size: "+Y.chunkSize)}if(Y.windowBits){if(Y.windowBits<$.Z_MIN_WINDOWBITS||Y.windowBits>$.Z_MAX_WINDOWBITS)throw Error("Invalid windowBits: "+Y.windowBits)}if(Y.level){if(Y.level<$.Z_MIN_LEVEL||Y.level>$.Z_MAX_LEVEL)throw Error("Invalid compression level: "+Y.level)}if(Y.memLevel){if(Y.memLevel<$.Z_MIN_MEMLEVEL||Y.memLevel>$.Z_MAX_MEMLEVEL)throw Error("Invalid memLevel: "+Y.memLevel)}if(Y.strategy){if(Y.strategy!=$.Z_FILTERED&&Y.strategy!=$.Z_HUFFMAN_ONLY&&Y.strategy!=$.Z_RLE&&Y.strategy!=$.Z_FIXED&&Y.strategy!=$.Z_DEFAULT_STRATEGY)throw Error("Invalid strategy: "+Y.strategy)}if(Y.dictionary){if(!_.isBuffer(Y.dictionary))throw Error("Invalid dictionary: it should be a Buffer instance")}this._handle=new J.Zlib(O);var Z=this;this._hadError=!1,this._handle.onerror=function(B,P){U0(Z),Z._hadError=!0;var z=Error(B);z.errno=P,z.code=$.codes[P],Z.emit("error",z)};var K=$.Z_DEFAULT_COMPRESSION;if(typeof Y.level==="number")K=Y.level;var w=$.Z_DEFAULT_STRATEGY;if(typeof Y.strategy==="number")w=Y.strategy;this._handle.init(Y.windowBits||$.Z_DEFAULT_WINDOWBITS,K,Y.memLevel||$.Z_DEFAULT_MEMLEVEL,w,Y.dictionary),this._buffer=_.allocUnsafe(this._chunkSize),this._offset=0,this._level=K,this._strategy=w,this.once("end",this.close),Object.defineProperty(this,"_closed",{get:function(){return!H._handle},configurable:!0,enumerable:!0})}j.inherits(R0,I),R0.prototype.params=function(Y,O,H){if(Y<$.Z_MIN_LEVEL||Y>$.Z_MAX_LEVEL)throw RangeError("Invalid compression level: "+Y);if(O!=$.Z_FILTERED&&O!=$.Z_HUFFMAN_ONLY&&O!=$.Z_RLE&&O!=$.Z_FIXED&&O!=$.Z_DEFAULT_STRATEGY)throw TypeError("Invalid strategy: "+O);if(this._level!==Y||this._strategy!==O){var Z=this;this.flush(J.Z_SYNC_FLUSH,function(){if(G(Z._handle,"zlib binding closed"),Z._handle.params(Y,O),!Z._hadError){if(Z._level=Y,Z._strategy=O,H)H()}})}else process.nextTick(H)},R0.prototype.reset=function(){return G(this._handle,"zlib binding closed"),this._handle.reset()},R0.prototype._flush=function(Y){this._transform(_.alloc(0),"",Y)},R0.prototype.flush=function(Y,O){var H=this,Z=this._writableState;if(typeof Y==="function"||Y===void 0&&!O)O=Y,Y=J.Z_FULL_FLUSH;if(Z.ended){if(O)process.nextTick(O)}else if(Z.ending){if(O)this.once("end",O)}else if(Z.needDrain){if(O)this.once("drain",function(){return H.flush(Y,O)})}else this._flushFlag=Y,this.write(_.alloc(0),"",O)},R0.prototype.close=function(Y){U0(this,Y),process.nextTick(c0,this)};function U0(Y,O){if(O)process.nextTick(O);if(!Y._handle)return;Y._handle.close(),Y._handle=null}function c0(Y){Y.emit("close")}R0.prototype._transform=function(Y,O,H){var Z,K=this._writableState,w=K.ending||K.ended,B=w&&(!Y||K.length===Y.length);if(Y!==null&&!_.isBuffer(Y))return H(Error("invalid input"));if(!this._handle)return H(Error("zlib binding closed"));if(B)Z=this._finishFlushFlag;else if(Z=this._flushFlag,Y.length>=K.length)this._flushFlag=this._opts.flush||J.Z_NO_FLUSH;this._processChunk(Y,Z,H)},R0.prototype._processChunk=function(Y,O,H){var Z=Y&&Y.length,K=this._chunkSize-this._offset,w=0,B=this,P=typeof H==="function";if(!P){var z=[],A=0,f;this.on("error",function(P0){f=P0}),G(this._handle,"zlib binding closed");do var c=this._handle.writeSync(O,Y,w,Z,this._buffer,this._offset,K);while(!this._hadError&&F0(c[0],c[1]));if(this._hadError)throw f;if(A>=X)throw U0(this),RangeError(W);var p=_.concat(z,A);return U0(this),p}G(this._handle,"zlib binding closed");var Q0=this._handle.write(O,Y,w,Z,this._buffer,this._offset,K);Q0.buffer=Y,Q0.callback=F0;function F0(P0,E0){if(this)this.buffer=null,this.callback=null;if(B._hadError)return;var _0=K-E0;if(G(_0>=0,"have should not go down"),_0>0){var $0=B._buffer.slice(B._offset,B._offset+_0);if(B._offset+=_0,P)B.push($0);else z.push($0),A+=$0.length}if(E0===0||B._offset>=B._chunkSize)K=B._chunkSize,B._offset=0,B._buffer=_.allocUnsafe(B._chunkSize);if(E0===0){if(w+=Z-P0,Z=P0,!P)return!0;var G0=B._handle.write(O,Y,w,Z,B._buffer,B._offset,B._chunkSize);G0.callback=F0,G0.buffer=Y;return}if(!P)return!1;H()}},j.inherits(n,R0),j.inherits(h,R0),j.inherits(i,R0),j.inherits(s,R0),j.inherits(j0,R0),j.inherits(I0,R0),j.inherits(H0,R0)}),mc={};Xs(mc,{default:()=>uc.default});Is(mc,fc(hc(),1));uc=fc(hc(),1),Ds=uc.default});var yL=eU((pJ0,sc)=>{function pc($,_,I){if(!$||typeof $!=="object"||Array.isArray($)||Object.keys($).some((J)=>!_.includes(J)))throw Error(`${I} has an invalid shape`);return $}function Ks($){if(!Array.isArray($)||$.length>256)throw Error("World network egress must be an array of at most 256 exact HTTPS origins");let _=$.map((I)=>{if(typeof I!=="string"||I.length>2048)throw Error("World network egress origins must be strings");let J;try{J=new URL(I)}catch{throw Error(`Invalid World network origin: ${I}`)}if(J.protocol!=="https:"||J.origin!==I||J.username||J.password||!/^[a-z0-9](?:[a-z0-9.-]*[a-z0-9])?$/.test(J.hostname)||J.hostname.split(".").some((j)=>!j||j.length>63||j.startsWith("-")||j.endsWith("-"))||/^[\d.]+$/.test(J.hostname)||J.hostname==="localhost"||J.hostname.endsWith(".localhost"))throw Error(`World network requires an exact canonical HTTPS origin: ${I}`);return I});return Object.freeze([...new Set(_)].sort())}function lc($){let _=pc($,["egress"],"World network");return Object.freeze({egress:Ks(_.egress)})}function dc($,_){if(typeof $!=="string"||!$||$.length>256)throw Error("World network policy requires its World identity");return Object.freeze({version:1,world:$,egress:lc(_).egress})}function rc($){let _=pc($,["version","world","egress"],"World network policy");if(_.version!==1)throw Error("Unsupported World network policy version");return dc(_.world,{egress:_.egress})}function tc($){let _=$.VOLTER_WORLD_NETWORK_POLICY;if(_===void 0)return;if(typeof _!=="string"||_.length>65536)throw Error("Invalid published World network policy");let I=rc(JSON.parse(_));if(!$.VOLTER_WORLD||I.world!==$.VOLTER_WORLD)throw Error("World network policy does not belong to the attached World");return I}function oc($,_){let I;try{I=new URL(String(_))}catch{return!1}return I.protocol==="https:"&&!I.username&&!I.password&&$.egress.includes(I.origin)}function ac($){let _=String($||"").toLowerCase().replace(/^\[|\]$/g,"");if(!_)return!0;if(_==="localhost"||_.endsWith(".localhost")||_.endsWith(".test")||_==="0.0.0.0"||_==="::1")return!0;let I=/^(\d+)\.(\d+)\.(\d+)\.(\d+)$/.exec(_);if(I){let J=Number(I[1]),j=Number(I[2]);return J===127||J===10||J===172&&j>=16&&j<=31||J===192&&j===168||J===169&&j===254}return _.includes(":")&&(_.startsWith("fc")||_.startsWith("fd")||_.startsWith("fe80:"))}function Hs($,_=process.env){let I;try{I=new URL(String($))}catch{return`unparseable destination ${String($)}`}if(ac(I.hostname))return null;if(_.VOLTER_TWIN_STRICT_EGRESS==="1"||_.VOLTER_TWIN_STRICT_EGRESS==="true")return`sealed World refuses untwinned host ${I.hostname}`;let J;try{J=tc(_)}catch(j){return`World network policy unreadable (${j.message}); refusing ${I.hostname}`}if(J!==void 0&&!oc(J,I))return`World network policy does not allow ${I.origin}`;return null}sc.exports={isWorldInternalHost:ac,worldEgressRefusal:Hs,WORLD_NETWORK_POLICY_ENV:"VOLTER_WORLD_NETWORK_POLICY",normalizeWorldNetwork:lc,createWorldNetworkPolicy:dc,parseWorldNetworkPolicy:rc,worldNetworkPolicyFromEnv:tc,allowsWorldNetworkEgress:oc}});var Gx=eU((lJ0,Xx)=>{var ec=new Map;function $x($,_){if(!_||!Array.isArray(_.hosts)||!_.hosts.length)return null;return{name:$,url:typeof _.url==="string"?_.url:null,hosts:new Set(_.hosts.map((I)=>String(I).toLowerCase()))}}function Fs($){if(!$)return{routes:[],twins:{}};let _=Date.now(),I=ec.get($);if(I&&_-I.checkedAt<1000)return I;if(!I)I={checkedAt:0,mtimeMs:-1,routes:[],services:{},twins:{}},ec.set($,I);I.checkedAt=_;let J=(()=>({})),j=(jj(),X1(oN)),G=j.join(j.dirname($),"app-url.json");try{let X=JSON.parse(J.readFileSync($,"utf8"));I.services=X.services||{},I.twins=NK().twinOrigins(X.env||{})}catch{}try{let X=J.statSync(G).mtimeMs;if(X!==I.mtimeMs){I.mtimeMs=X;let T=JSON.parse(J.readFileSync(G,"utf8")),F=T.apps&&typeof T.apps==="object"?Object.entries(T.apps):[];I.routes=[$x("app",T),...F.map(([E,D])=>$x(E,D))].filter(Boolean)}let W=I.services;for(let T of I.routes){let F=T.url??W[T.name]?.url;T.origin=typeof F==="string"?F.replace(/\/$/,""):null}}catch(X){if(I.mtimeMs=-1,X&&X.code==="ENOENT")I.routes=[]}return I}function vx($,_,I={}){let J=String(_||"").toLowerCase().replace(/\.$/,""),j=Fs($),G=j.routes.find((W)=>W.origin&&_x(W.hosts,J));if(!G)return null;let X=(W)=>Object.hasOwn(j.twins,W)||Object.hasOwn(I,W);return NK().vendorsOfHost(J).some(X)?null:G}function _x($,_){if($.has(_))return!0;for(let I=_.indexOf(".");I>0;I=_.indexOf(".",I+1))if($.has(`*${_.slice(I)}`))return!0;return!1}function jx($){return{"x-forwarded-host":$.host,"x-forwarded-proto":$.protocol==="https:"?"https":"http"}}function hP($,_=process.env){let I;try{I=new URL(String($))}catch{return null}if(I.protocol!=="http:"&&I.protocol!=="https:")return null;return vx(_.VOLTER_WORLD_INSTANCE,I.hostname,NK().twinOrigins(_))}var fK=void 0;function mP(){if(fK===void 0){let $=process.env.NODE_EXTRA_CA_CERTS;try{fK=$?(()=>{throw new Error("Cannot require module "+"fs");})().readFileSync($):null}catch{fK=null}}return fK}var As=["accept-encoding","x-twins-key","x-volter-twin-original-host","proxy-connection","host","x-forwarded-host","x-forwarded-proto"];function Ux($,_,I,J,j){let{isIP:G}=(RP(),X1(zc)),X=new URL($.origin),W={};for(let[T,F]of Object.entries(J||{}))if(F!==void 0&&!As.includes(T.toLowerCase()))W[T]=F;if(Object.assign(W,jx(_),{host:_.host}),(_.username||_.password)&&!Object.keys(W).some((T)=>T.toLowerCase()==="authorization"))W.authorization=`Basic ${Buffer.from(`${decodeURIComponent(_.username)}:${decodeURIComponent(_.password)}`).toString("base64")}`;return{protocol:X.protocol,hostname:X.hostname,port:X.port||(X.protocol==="https:"?443:80),method:I,path:`${X.pathname.replace(/\/$/,"")}${_.pathname}${_.search}`,headers:W,...j&&j.signal?{signal:j.signal}:{},...j&&j.timeout!==void 0?{timeout:j.timeout}:{},...X.protocol==="https:"&&mP()?{ca:mP()}:{},...X.protocol==="https:"?{servername:G(X.hostname)?"":X.hostname}:{}}}function Ix($,_,{method:I="POST",headers:J={},body:j,timeoutMs:G=30000,signal:X}={}){let W=new URL(String(_));if(X&&X.aborted)return Promise.reject(X.reason);let T=Ux($,W,I,J),F=(T.protocol==="https:"?(Ac(),X1(Fc)):(SL(),X1(wK))).request;return new Promise((E,D)=>{let q=!1,S=()=>y(X.reason),k=()=>{if(q=!0,clearTimeout(n),X)X.removeEventListener("abort",S)},y=(h)=>{if(!q)k(),m.destroy(),D(h)},m=F(T,(h)=>{h.on("error",y),h.on("aborted",()=>y(Error(`the application's answer to ${W.origin}${W.pathname} was cut off`)));let i=String(h.headers["content-encoding"]||"").toLowerCase(),s=(ic(),X1(nc)),j0=i==="gzip"||i==="x-gzip"?s.createGunzip():i==="deflate"?s.createInflate():i==="br"?s.createBrotliDecompress():null,I0=j0?h.pipe(j0):h,H0=[];I0.on("data",(L0)=>H0.push(L0)),I0.on("error",y),I0.on("end",()=>{if(q)return;k();let L0={};for(let[R0,U0]of Object.entries(h.headers))if(U0!==void 0&&!(j0&&(R0==="content-encoding"||R0==="content-length")))L0[R0.toLowerCase()]=Array.isArray(U0)?U0.join(", "):String(U0);E({status:h.statusCode,headers:L0,body:Buffer.concat(H0).toString("utf8")})})}),n=Number.isFinite(G)?setTimeout(()=>y(Error(`the application did not answer ${W.origin}${W.pathname} within ${G} ms`)),G):void 0;if(m.on("error",y),X)X.addEventListener("abort",S,{once:!0});if(j!=null&&I!=="GET"&&I!=="HEAD")m.write(j);m.end()})}var Ms=[301,302,303,307,308],Es=[204,205,304],Vs=["authorization","cookie","proxy-authorization"];function Ts($,_){if($==null)return null;if(typeof $==="string")return $;if($ instanceof URLSearchParams){if(!Object.keys(_).some((I)=>I.toLowerCase()==="content-type"))_["content-type"]="application/x-www-form-urlencoded;charset=UTF-8";return $.toString()}if($ instanceof ArrayBuffer)return Buffer.from($);if(ArrayBuffer.isView($))return Buffer.from($.buffer,$.byteOffset,$.byteLength);throw TypeError("appFetch sends a string, URLSearchParams or bytes body")}async function Rs($,_={}){if(!hP($)){let T=yL().worldEgressRefusal($);if(T!==null)throw TypeError(T);return fetch($,_)}let I=_.redirect||"follow",J=_.signal||void 0,j=new URL(String($)),G=String(_.method||"GET").toUpperCase(),X={};new Headers(_.headers||{}).forEach((T,F)=>{X[F]=T});let W=Ts(_.body,X);for(let T=0;;T++){let F=hP(j),E;if(F){let S=yL().worldEgressRefusal(F.origin);if(S!==null)throw TypeError(S);let k=await Ix(F,j,{method:G,headers:X,body:W,signal:J,timeoutMs:300000}),y=Es.includes(k.status)||G==="HEAD",m=k.status>=200&&k.status<=599;if(E=new Response(y?null:k.body,{status:m?k.status:200,headers:k.headers}),!m)Object.defineProperties(E,{status:{value:k.status},ok:{value:!1}});Object.defineProperty(E,"url",{value:j.toString()})}else{let S=yL().worldEgressRefusal(j);if(S!==null)throw TypeError(S);for(let k of Object.keys(X))if(["x-twins-key","x-volter-twin-original-host"].includes(k.toLowerCase()))delete X[k];E=await fetch(j,{method:G,headers:X,...W!=null&&G!=="GET"&&G!=="HEAD"?{body:W}:{},redirect:"manual",signal:J})}if(T>0)Object.defineProperty(E,"redirected",{value:!0});let D=E.headers.get("location");if(!Ms.includes(E.status)||D===null||I==="manual")return E;if(I==="error")throw TypeError(`${j.origin}${j.pathname} redirected, and the request's redirect mode is error`);if(T>=20)throw TypeError("redirect count exceeded");if(E.body)await E.body.cancel();let q=new URL(D,j);if(q.protocol!=="http:"&&q.protocol!=="https:")throw TypeError(`redirect to ${q.protocol} is not followed`);if(E.status===303&&G!=="GET"&&G!=="HEAD"||(E.status===301||E.status===302)&&G==="POST"){G="GET",W=null;for(let S of Object.keys(X))if(/^content-/i.test(S))delete X[S]}if(q.origin!==j.origin){for(let S of Object.keys(X))if(Vs.includes(S.toLowerCase()))delete X[S]}j=q}}Xx.exports={appRouteFor:vx,appHostMatch:_x,appForwardHeaders:jx,appDestination:hP,appRequestOptions:Ux,deliverToApp:Ix,appFetch:Rs,sessionCa:mP}});var Jx=eU((Bs)=>{var bK=Q2(W8()),uP=Q2(U9());(function(){function $(R,C,b,o){return""+C+(b==="s"?"\\73 ":"\\53 ")+o}function _(R,C,b,o){return""+C+(b==="s"?"\\u0073":"\\u0053")+o}function I(R){if(R===null||typeof R!=="object")return null;return R=Z6&&R[Z6]||R["@@iterator"],typeof R==="function"?R:null}function J(R){return R=Object.prototype.toString.call(R),R.slice(8,R.length-1)}function j(R){var C=JSON.stringify(R);return'"'+R+'"'===C?R:C}function G(R){switch(typeof R){case"string":return JSON.stringify(10>=R.length?R:R.slice(0,10)+"...");case"object":if(SU(R))return"[...]";if(R!==null&&R.$$typeof===MX)return"client";return R=J(R),R==="Object"?"{...}":R;case"function":return R.$$typeof===MX?"client":(R=R.displayName||R.name)?"function "+R:"function";default:return String(R)}}function X(R){if(typeof R==="string")return R;switch(R){case S4:return"Suspense";case k4:return"SuspenseList"}if(typeof R==="object")switch(R.$$typeof){case RI:return X(R.render);case Vj:return X(R.type);case OU:var C=R._payload;R=R._init;try{return X(R(C))}catch(b){}}return""}function W(R,C){var b=J(R);if(b!=="Object"&&b!=="Array")return b;var o=-1,v0=0;if(SU(R))if(cY.has(R)){var V0=cY.get(R);b="<"+X(V0)+">";for(var n0=0;n0<R.length;n0++){var e0=R[n0];e0=typeof e0==="string"?e0:typeof e0==="object"&&e0!==null?"{"+W(e0)+"}":"{"+G(e0)+"}",""+n0===C?(o=b.length,v0=e0.length,b+=e0):b=15>e0.length&&40>b.length+e0.length?b+e0:b+"{...}"}b+="</"+X(V0)+">"}else{b="[";for(V0=0;V0<R.length;V0++)0<V0&&(b+=", "),n0=R[V0],n0=typeof n0==="object"&&n0!==null?W(n0):G(n0),""+V0===C?(o=b.length,v0=n0.length,b+=n0):b=10>n0.length&&40>b.length+n0.length?b+n0:b+"...";b+="]"}else if(R.$$typeof===n6)b="<"+X(R.type)+"/>";else{if(R.$$typeof===MX)return"client";if(kY.has(R)){b=kY.get(R),b="<"+(X(b)||"..."),V0=Object.keys(R);for(n0=0;n0<V0.length;n0++){b+=" ",e0=V0[n0],b+=j(e0)+"=";var k$=R[e0],Q$=e0===C&&typeof k$==="object"&&k$!==null?W(k$):G(k$);typeof k$!=="string"&&(Q$="{"+Q$+"}"),e0===C?(o=b.length,v0=Q$.length,b+=Q$):b=10>Q$.length&&40>b.length+Q$.length?b+Q$:b+"..."}b+=">"}else{b="{",V0=Object.keys(R);for(n0=0;n0<V0.length;n0++)0<n0&&(b+=", "),e0=V0[n0],b+=j(e0)+": ",k$=R[e0],k$=typeof k$==="object"&&k$!==null?W(k$):G(k$),e0===C?(o=b.length,v0=k$.length,b+=k$):b=10>k$.length&&40>b.length+k$.length?b+k$:b+"...";b+="}"}}return C===void 0?b:-1<o&&0<v0?(R=" ".repeat(o)+"^".repeat(v0),`
317
317
  `+b+`
318
318
  `+R):`
319
319
  `+b}function T(R,C){var b=R.length&3,o=R.length-b,v0=C;for(C=0;C<o;){var V0=R.charCodeAt(C)&255|(R.charCodeAt(++C)&255)<<8|(R.charCodeAt(++C)&255)<<16|(R.charCodeAt(++C)&255)<<24;++C,V0=3432918353*(V0&65535)+((3432918353*(V0>>>16)&65535)<<16)&4294967295,V0=V0<<15|V0>>>17,V0=461845907*(V0&65535)+((461845907*(V0>>>16)&65535)<<16)&4294967295,v0^=V0,v0=v0<<13|v0>>>19,v0=5*(v0&65535)+((5*(v0>>>16)&65535)<<16)&4294967295,v0=(v0&65535)+27492+(((v0>>>16)+58964&65535)<<16)}switch(V0=0,b){case 3:V0^=(R.charCodeAt(C+2)&255)<<16;case 2:V0^=(R.charCodeAt(C+1)&255)<<8;case 1:V0^=R.charCodeAt(C)&255,V0=3432918353*(V0&65535)+((3432918353*(V0>>>16)&65535)<<16)&4294967295,V0=V0<<15|V0>>>17,v0^=461845907*(V0&65535)+((461845907*(V0>>>16)&65535)<<16)&4294967295}return v0^=R.length,v0^=v0>>>16,v0=2246822507*(v0&65535)+((2246822507*(v0>>>16)&65535)<<16)&4294967295,v0^=v0>>>13,v0=3266489909*(v0&65535)+((3266489909*(v0>>>16)&65535)<<16)&4294967295,(v0^v0>>>16)>>>0}function F(R){return typeof Symbol==="function"&&Symbol.toStringTag&&R[Symbol.toStringTag]||R.constructor.name||"Object"}function E(R){try{return D(R),!1}catch(C){return!0}}function D(R){return""+R}function q(R,C){if(E(R))return console.error("The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before using it here.",C,F(R)),D(R)}function S(R,C){if(E(R))return console.error("The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before using it here.",C,F(R)),D(R)}function k(R){if(E(R))return console.error("The provided HTML markup uses a value of unsupported type %s. This value must be coerced to a string before using it here.",F(R)),D(R)}function y(R){if($2.call(gI,R))return!0;if($2.call(EX,R))return!1;if(uj.test(R))return gI[R]=!0;return EX[R]=!0,console.error("Invalid attribute name: `%s`",R),!1}function m(R,C){xY[C.type]||C.onChange||C.onInput||C.readOnly||C.disabled||C.value==null||(R==="select"?console.error("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set `onChange`."):console.error("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`.")),C.onChange||C.readOnly||C.disabled||C.checked==null||console.error("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.")}function n(R,C){if($2.call(c4,C)&&c4[C])return!0;if(O6.test(C)){if(R="aria-"+C.slice(4).toLowerCase(),R=LQ.hasOwnProperty(R)?R:null,R==null)return console.error("Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.",C),c4[C]=!0;if(C!==R)return console.error("Invalid ARIA attribute `%s`. Did you mean `%s`?",C,R),c4[C]=!0}if(nj.test(C)){if(R=C.toLowerCase(),R=LQ.hasOwnProperty(R)?R:null,R==null)return c4[C]=!0,!1;C!==R&&(console.error("Unknown ARIA attribute `%s`. Did you mean `%s`?",C,R),c4[C]=!0)}return!0}function h(R,C){var b=[],o;for(o in C)n(R,o)||b.push(o);C=b.map(function(v0){return"`"+v0+"`"}).join(", "),b.length===1?console.error("Invalid aria prop %s on <%s> tag. For details, see https://react.dev/link/invalid-aria-props",C,R):1<b.length&&console.error("Invalid aria props %s on <%s> tag. For details, see https://react.dev/link/invalid-aria-props",C,R)}function i(R,C,b,o){if($2.call(D_,C)&&D_[C])return!0;var v0=C.toLowerCase();if(v0==="onfocusin"||v0==="onfocusout")return console.error("React uses onFocus and onBlur instead of onFocusIn and onFocusOut. All React events are normalized to bubble, so onFocusIn and onFocusOut are not needed/supported by React."),D_[C]=!0;if(typeof b==="function"&&(R==="form"&&C==="action"||R==="input"&&C==="formAction"||R==="button"&&C==="formAction"))return!0;if(o!=null){if(R=o.possibleRegistrationNames,o.registrationNameDependencies.hasOwnProperty(C))return!0;if(o=R.hasOwnProperty(v0)?R[v0]:null,o!=null)return console.error("Invalid event handler property `%s`. Did you mean `%s`?",C,o),D_[C]=!0;if(gG.test(C))return console.error("Unknown event handler property `%s`. It will be ignored.",C),D_[C]=!0}else if(gG.test(C))return WQ.test(C)&&console.error("Invalid event handler property `%s`. React events use the camelCase naming convention, for example `onClick`.",C),D_[C]=!0;if(p6.test(C)||wI.test(C))return!0;if(v0==="innerhtml")return console.error("Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML`."),D_[C]=!0;if(v0==="aria")return console.error("The `aria` attribute is reserved for future use in React. Pass individual `aria-` attributes instead."),D_[C]=!0;if(v0==="is"&&b!==null&&b!==void 0&&typeof b!=="string")return console.error("Received a `%s` for a string attribute `is`. If this is expected, cast the value to a string.",typeof b),D_[C]=!0;if(typeof b==="number"&&isNaN(b))return console.error("Received NaN for the `%s` attribute. If this is expected, cast the value to a string.",C),D_[C]=!0;if(qG.hasOwnProperty(v0)){if(v0=qG[v0],v0!==C)return console.error("Invalid DOM property `%s`. Did you mean `%s`?",C,v0),D_[C]=!0}else if(C!==v0)return console.error("React does not recognize the `%s` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `%s` instead. If you accidentally passed it from a parent component, remove it from the DOM element.",C,v0),D_[C]=!0;switch(C){case"dangerouslySetInnerHTML":case"children":case"style":case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":return!0;case"innerText":case"textContent":return!0}switch(typeof b){case"boolean":switch(C){case"autoFocus":case"checked":case"multiple":case"muted":case"selected":case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":case"capture":case"download":case"inert":return!0;default:if(v0=C.toLowerCase().slice(0,5),v0==="data-"||v0==="aria-")return!0;return b?console.error('Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.',b,C,C,b,C):console.error('Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.',b,C,C,b,C,C,C),D_[C]=!0}case"function":case"symbol":return D_[C]=!0,!1;case"string":if(b==="false"||b==="true"){switch(C){case"checked":case"selected":case"multiple":case"muted":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":case"inert":break;default:return!0}console.error("Received the string `%s` for the boolean attribute `%s`. %s Did you mean %s={%s}?",b,C,b==="false"?"The browser will interpret it as a truthy value.":'Although this works, it will not work as expected if you pass the string "false".',C,b),D_[C]=!0}}return!0}function s(R,C,b){var o=[],v0;for(v0 in C)i(R,v0,C[v0],b)||o.push(v0);C=o.map(function(V0){return"`"+V0+"`"}).join(", "),o.length===1?console.error("Invalid value for prop %s on <%s> tag. Either remove it from the element, or pass a string or number value to keep it in the DOM. For details, see https://react.dev/link/attribute-behavior ",C,R):1<o.length&&console.error("Invalid values for props %s on <%s> tag. Either remove them from the element, or pass a string or number value to keep them in the DOM. For details, see https://react.dev/link/attribute-behavior ",C,R)}function j0(R){return R.replace(lv,function(C,b){return b.toUpperCase()})}function I0(R){if(typeof R==="boolean"||typeof R==="number"||typeof R==="bigint")return""+R;k(R),R=""+R;var C=VX.exec(R);if(C){var b="",o,v0=0;for(o=C.index;o<R.length;o++){switch(R.charCodeAt(o)){case 34:C="&quot;";break;case 38:C="&amp;";break;case 39:C="&#x27;";break;case 60:C="&lt;";break;case 62:C="&gt;";break;default:continue}v0!==o&&(b+=R.slice(v0,o)),v0=o+1,b+=C}R=v0!==o?b+R.slice(v0,o):b}return R}function H0(R){return f4.test(""+R)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":R}function L0(R){return k(R),(""+R).replace(r6,_)}function R0(R,C,b,o,v0){return{idPrefix:R===void 0?"":R,nextFormID:0,streamingFormat:0,bootstrapScriptContent:b,bootstrapScripts:o,bootstrapModules:v0,instructions:Gj,hasBody:!1,hasHtml:!1,unknownResources:{},dnsResources:{},connectResources:{default:{},anonymous:{},credentials:{}},imageResources:{},styleResources:{},scriptResources:{},moduleUnknownResources:{},moduleScriptResources:{}}}function U0(R,C,b,o){return{insertionMode:R,selectedValue:C,tagScope:b,viewTransition:o}}function c0(R,C,b){var o=R.tagScope&-25;switch(C){case"noscript":return U0(Dv,null,o|1,null);case"select":return U0(Dv,b.value!=null?b.value:b.defaultValue,o,null);case"svg":return U0(H_,null,o,null);case"picture":return U0(Dv,null,o|2,null);case"math":return U0(lj,null,o,null);case"foreignObject":return U0(Dv,null,o,null);case"table":return U0(C2,null,o,null);case"thead":case"tbody":case"tfoot":return U0(RX,null,o,null);case"colgroup":return U0(LU,null,o,null);case"tr":return U0(wG,null,o,null);case"head":if(R.insertionMode<Dv)return U0(pj,null,o,null);break;case"html":if(R.insertionMode===W6)return U0(K_,null,o,null)}return R.insertionMode>=C2||R.insertionMode<Dv?U0(Dv,null,o,null):R.tagScope!==o?U0(R.insertionMode,R.selectedValue,o,null):R}function Y(R){return R===null?null:{update:R.update,enter:"none",exit:"none",share:R.update,name:R.autoName,autoName:R.autoName,nameIdx:0}}function O(R,C){return C.tagScope&32&&(R.instructions|=128),U0(C.insertionMode,C.selectedValue,C.tagScope|12,Y(C.viewTransition))}function H(R,C){R=Y(C.viewTransition);var b=C.tagScope|16;return R!==null&&R.share!=="none"&&(b|=64),U0(C.insertionMode,C.selectedValue,b,R)}function Z(R,C){if(typeof C!=="object")throw Error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.");var b=!0,o;for(o in C)if($2.call(C,o)){var v0=C[o];if(v0!=null&&typeof v0!=="boolean"&&v0!==""){if(o.indexOf("--")===0){var V0=I0(o);S(v0,o),v0=I0((""+v0).trim())}else{V0=o;var n0=v0;if(-1<V0.indexOf("-")){var e0=V0;y2.hasOwnProperty(e0)&&y2[e0]||(y2[e0]=!0,console.error("Unsupported style property %s. Did you mean %s?",e0,j0(e0.replace(h_,"ms-"))))}else if(DQ.test(V0))e0=V0,y2.hasOwnProperty(e0)&&y2[e0]||(y2[e0]=!0,console.error("Unsupported vendor-prefixed style property %s. Did you mean %s?",e0,e0.charAt(0).toUpperCase()+e0.slice(1)));else if(fY.test(n0)){e0=V0;var k$=n0;p1.hasOwnProperty(k$)&&p1[k$]||(p1[k$]=!0,console.error(`Style property values shouldn't contain a semicolon. Try "%s: %s" instead.`,e0,k$.replace(fY,"")))}typeof n0==="number"&&(isNaN(n0)?x4||(x4=!0,console.error("`NaN` is an invalid value for the `%s` css style property.",V0)):isFinite(n0)||CG||(CG=!0,console.error("`Infinity` is an invalid value for the `%s` css style property.",V0))),V0=o,n0=Rv.get(V0),n0!==void 0?V0=n0:(n0=I0(V0.replace(KQ,"-$1").toLowerCase().replace(yY,"-ms-")),Rv.set(V0,n0),V0=n0),typeof v0==="number"?v0=v0===0||i6.has(o)?""+v0:v0+"px":(S(v0,o),v0=I0((""+v0).trim()))}b?(b=!1,R.push(AQ,V0,Rj,v0)):R.push(m4,V0,Rj,v0)}}b||R.push(Pv)}function K(R,C,b){b&&typeof b!=="function"&&typeof b!=="symbol"&&R.push(m_,C,qv)}function w(R,C,b){typeof b!=="function"&&typeof b!=="symbol"&&typeof b!=="boolean"&&R.push(m_,C,C_,I0(b),Pv)}function B(R,C){this.push('<input type="hidden"'),P(R),w(this,"name",C),w(this,"value",R),this.push(PX)}function P(R){if(typeof R!=="string")throw Error("File/Blob fields are not yet supported in progressive forms. Will fallback to client hydration.")}function z(R,C){if(typeof C.$$FORM_ACTION==="function"){var b=R.nextFormID++;R=R.idPrefix+b;try{var o=C.$$FORM_ACTION(R);if(o){var v0=o.data;v0!=null&&v0.forEach(P)}return o}catch(V0){if(typeof V0==="object"&&V0!==null&&typeof V0.then==="function")throw V0;console.error(`Failed to serialize an action for progressive enhancement:
@@ -446,7 +446,7 @@ performance.now();setTimeout(w,2300>q&&2E3<q?2300-q:500)})])},types:[]});z.ready
446
446
  <%s {...props} />
447
447
  React keys must be passed directly to JSX without using spread:
448
448
  let props = %s;
449
- <%s key={someKey} {...props} />`,c,F0,P0,F0),P[F0+c]=!0)}if(F0=null,f!==void 0&&(I(f),F0=""+f),X(A)&&(I(A.key),F0=""+A.key),"key"in A){f={};for(var E0 in A)E0!=="key"&&(f[E0]=A[E0])}else f=A;return F0&&W(f,typeof z==="function"?z.displayName||z.name||"Unknown":z),F(z,F0,f,j(),p,Q0)}function D(z){q(z)?z._store&&(z._store.validated=1):typeof z==="object"&&z!==null&&z.$$typeof===L0&&(z._payload.status==="fulfilled"?q(z._payload.value)&&z._payload.value._store&&(z._payload.value._store.validated=1):z._store&&(z._store.validated=1))}function q(z){return typeof z==="object"&&z!==null&&z.$$typeof===S}var S=Symbol.for("react.transitional.element"),k=Symbol.for("react.portal"),y=Symbol.for("react.fragment"),m=Symbol.for("react.strict_mode"),n=Symbol.for("react.profiler"),h=Symbol.for("react.consumer"),i=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),j0=Symbol.for("react.suspense"),I0=Symbol.for("react.suspense_list"),H0=Symbol.for("react.memo"),L0=Symbol.for("react.lazy"),R0=Symbol.for("react.activity"),U0=Symbol.for("react.client.reference"),c0=l8.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y=Object.prototype.hasOwnProperty,O=Array.isArray,H=console.createTask?console.createTask:function(){return null};l8={react_stack_bottom_frame:function(z){return z()}};var Z,K={},w=l8.react_stack_bottom_frame.bind(l8,G)(),B=H(J(G)),P={};hs.Fragment=y,hs.jsxDEV=function(z,A,f,c){var p=1e4>c0.recentlyCreatedOwnerStacks++;return E(z,A,f,c,p?Error("react-stack-top-frame"):w,p?H(J(z)):B)}})()});var Tx=Q2(Ow(),1),jO=Q2(W8(),1);var{readFile:e80}=(()=>({}));Mv();var{closeSync:B_0,existsSync:S_0,fstatSync:k_0,mkdirSync:c_0,openSync:x_0,readFileSync:f_0,renameSync:y_0,rmSync:b_0,statSync:h_0,writeFileSync:m_0,writeSync:u_0}=(()=>({}));var M9=function(){if(typeof location<"u")return location.hostname;else return""};var QA=function(){return"/"};jj();function T5(){let $=process.env.VOLTER_HOME;return $!==void 0&&$!==""?$:F2(QA(),".volter")}jj();jj();Mv();Mv();jj();var{appendFileSync:cu,chmodSync:eN,closeSync:E9,existsSync:R5,fsyncSync:xu,fstatSync:$B,lstatSync:vB,mkdirSync:P5,openSync:V9,readdirSync:fu,readSync:yu,realpathSync:bu,readFileSync:KA,renameSync:_B,rmSync:jB,statSync:XB,unlinkSync:DA,writeFileSync:q5}=(()=>({}));var{AsyncLocalStorage:o00}=(()=>({}));var aN="x-volter-read-only";class LA extends Error{service;constructor($){super(`${$}: this request is read-only (${aN}: 1); it cannot write`);this.service=$;this.name="ReadOnlyRequestError"}}var sN;function WA(){let $=sN?.getStore();return $!==void 0&&$.readOnly&&!$.vendorMove}function TY($){if(!WA())return;let _=new LA($);throw sN.getStore().refusals.push(_),_}jj();var hu=0,mu=60000;function HA($){try{return JSON.parse(KA($,"utf8"))}catch{return null}}function uu($){try{return process.kill($,0),!0}catch(_){return _.code==="EPERM"}}function UB($,_=!1){let I=HA($);if(I&&I.hostname===M9()&&Number.isInteger(I.pid)&&!uu(I.pid))return!0;if(_)return!1;let j=I&&typeof I.at==="string"?Date.parse(I.at):NaN;if(!Number.isFinite(j))try{j=XB($).mtimeMs}catch{return!1}return Date.now()-j>mu}function IB($){Atomics.wait(new Int32Array(new SharedArrayBuffer(4)),0,0,$)}class T9{read($){if(!R5($))return null;return KA($,"utf8")}readLines($){if(!R5($))return[];return KA($,"utf8").split(`
449
+ <%s key={someKey} {...props} />`,c,F0,P0,F0),P[F0+c]=!0)}if(F0=null,f!==void 0&&(I(f),F0=""+f),X(A)&&(I(A.key),F0=""+A.key),"key"in A){f={};for(var E0 in A)E0!=="key"&&(f[E0]=A[E0])}else f=A;return F0&&W(f,typeof z==="function"?z.displayName||z.name||"Unknown":z),F(z,F0,f,j(),p,Q0)}function D(z){q(z)?z._store&&(z._store.validated=1):typeof z==="object"&&z!==null&&z.$$typeof===L0&&(z._payload.status==="fulfilled"?q(z._payload.value)&&z._payload.value._store&&(z._payload.value._store.validated=1):z._store&&(z._store.validated=1))}function q(z){return typeof z==="object"&&z!==null&&z.$$typeof===S}var S=Symbol.for("react.transitional.element"),k=Symbol.for("react.portal"),y=Symbol.for("react.fragment"),m=Symbol.for("react.strict_mode"),n=Symbol.for("react.profiler"),h=Symbol.for("react.consumer"),i=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),j0=Symbol.for("react.suspense"),I0=Symbol.for("react.suspense_list"),H0=Symbol.for("react.memo"),L0=Symbol.for("react.lazy"),R0=Symbol.for("react.activity"),U0=Symbol.for("react.client.reference"),c0=l8.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y=Object.prototype.hasOwnProperty,O=Array.isArray,H=console.createTask?console.createTask:function(){return null};l8={react_stack_bottom_frame:function(z){return z()}};var Z,K={},w=l8.react_stack_bottom_frame.bind(l8,G)(),B=H(J(G)),P={};hs.Fragment=y,hs.jsxDEV=function(z,A,f,c){var p=1e4>c0.recentlyCreatedOwnerStacks++;return E(z,A,f,c,p?Error("react-stack-top-frame"):w,p?H(J(z)):B)}})()});var Tx=Q2(Ow(),1),jO=Q2(W8(),1);var{readFile:_z0}=(()=>({}));Mv();var{closeSync:B_0,existsSync:S_0,fstatSync:k_0,mkdirSync:c_0,openSync:x_0,readFileSync:f_0,renameSync:y_0,rmSync:b_0,statSync:h_0,writeFileSync:m_0,writeSync:u_0}=(()=>({}));var M9=function(){if(typeof location<"u")return location.hostname;else return""};var QA=function(){return"/"};jj();function T5(){let $=process.env.VOLTER_HOME;return $!==void 0&&$!==""?$:F2(QA(),".volter")}jj();jj();Mv();Mv();jj();var{appendFileSync:cu,chmodSync:eN,closeSync:E9,existsSync:R5,fsyncSync:xu,fstatSync:$B,lstatSync:vB,mkdirSync:P5,openSync:V9,readdirSync:fu,readSync:yu,realpathSync:bu,readFileSync:KA,renameSync:_B,rmSync:jB,statSync:XB,unlinkSync:DA,writeFileSync:q5}=(()=>({}));var{AsyncLocalStorage:o00}=(()=>({}));var aN="x-volter-read-only";class LA extends Error{service;constructor($){super(`${$}: this request is read-only (${aN}: 1); it cannot write`);this.service=$;this.name="ReadOnlyRequestError"}}var sN;function WA(){let $=sN?.getStore();return $!==void 0&&$.readOnly&&!$.vendorMove}function TY($){if(!WA())return;let _=new LA($);throw sN.getStore().refusals.push(_),_}jj();var hu=0,mu=60000;function HA($){try{return JSON.parse(KA($,"utf8"))}catch{return null}}function uu($){try{return process.kill($,0),!0}catch(_){return _.code==="EPERM"}}function UB($,_=!1){let I=HA($);if(I&&I.hostname===M9()&&Number.isInteger(I.pid)&&!uu(I.pid))return!0;if(_)return!1;let j=I&&typeof I.at==="string"?Date.parse(I.at):NaN;if(!Number.isFinite(j))try{j=XB($).mtimeMs}catch{return!1}return Date.now()-j>mu}function IB($){Atomics.wait(new Int32Array(new SharedArrayBuffer(4)),0,0,$)}class T9{read($){if(!R5($))return null;return KA($,"utf8")}readLines($){if(!R5($))return[];return KA($,"utf8").split(`
450
450
  `)}readRange($,_){let I;try{I=V9($,"r")}catch(J){if(J.code==="ENOENT")return null;throw J}try{let J=$B(I).size;if(_>=J)return"";let j=Buffer.allocUnsafe(J-_),G=0;while(G<j.length){let X=yu(I,j,G,j.length-G,_+G);if(X===0)break;G+=X}return j.toString("utf8",0,G)}finally{E9(I)}}append($,_){TY("the World");let I=V9($,"a");try{if(cu(I,_),process.env.VOLTER_DURABLE==="1")xu(I)}finally{E9(I)}}write($,_,I={}){if(TY("the World"),!I.secret){P5(W_($),{recursive:!0}),q5($,_);return}P5(W_($),{recursive:!0,mode:448}),q5($,_,{mode:384}),eN($,384)}writeAtomic($,_,I={}){TY("the World"),P5(W_($),{recursive:!0});let J=`${$}.${process.pid}.${Date.now()}.${hu++}.tmp`;try{if(q5(J,_,I.secret?{mode:384}:void 0),_B(J,$),I.secret)eN($,384)}finally{jB(J,{force:!0})}}exists($){return R5($)}remove($){TY("the World"),jB($,{recursive:!0,force:!0})}mkdir($){P5($,{recursive:!0})}list($){if(!R5($))return[];return fu($)}canonicalPath($){let _=ZI($);try{return bu(_)}catch(I){if(I.code!=="ENOENT"||W_(_)===_)throw I;return F2(this.canonicalPath(W_(_)),QZ(_))}}stat($){if(!R5($))return null;let _=XB($);return{size:_.size,mtimeMs:_.mtimeMs,isDirectory:_.isDirectory(),...vB($).isSymbolicLink()?{isSymbolicLink:!0}:{}}}withLock($,_,I={}){P5(W_($),{recursive:!0});let J=Date.now(),j=null;while(j===null)try{j=V9($,"wx")}catch(X){if(X.code!=="EEXIST")throw X;if(UB($,I.retainLiveOwner)){let T=`${$}.recovery`,F;try{F=V9(T,"wx")}catch(E){if(E.code!=="EEXIST")throw E;if(Date.now()-J>1e4)throw Error(`Lock recovery is active or interrupted: ${T}. Inspect its owner before removing the recovery record.`);IB(25);continue}try{if(q5(F,JSON.stringify({pid:process.pid,hostname:M9()})),UB($,I.retainLiveOwner)){let E=HA($),D=`${$}.stale.${process.pid}.${Date.now()}`;try{_B($,D),console.warn(`[world] reclaiming stale storage lock ${$} (held by pid ${E?.pid??"?"} on ${E?.hostname??"?"})`),DA(D)}catch(q){if(q.code!=="ENOENT")throw q}}}finally{E9(F),DA(T)}continue}if(Date.now()-J>1e4){let T=HA($),F=T&&typeof T.at==="string"?Date.parse(T.at):NaN;throw Error(`Timed out waiting for world storage lock: ${$}${T?` (held by pid ${T.pid} on ${T.hostname}${Number.isFinite(F)?` for ${Date.now()-F}ms`:""})`:""}`)}IB(25)}try{q5(j,`${JSON.stringify({pid:process.pid,hostname:M9(),at:new Date().toISOString()})}
451
451
  `)}catch{}let G=Date.now();try{return _()}finally{let X=Date.now()-G;if(X>2000)console.warn(`[world] held storage lock ${$} for ${X}ms (pid ${process.pid})
452
452
  ${Error().stack?.split(`
@@ -512,5 +512,5 @@ ${T}`:T:"",E=Function,D=`return (input) => {
512
512
  ${T}
513
513
  }`,q;try{q=new E(...X,D)(...W)}catch(S){throw new U2(`this schema (generated code failed to evaluate: ${S.message})`)}if(_?.debug)q.code=F;return q.definite=J.definite,q}function D1($,_){for(let[J,j]of $.constants)if(j===_)return J;let I=`c${$.constantCounter++}`;return $.constants.set(I,_),I}function B8($,_){return $.definite=!1,D1($,_)}function z1($){return`v${$.varCounter++}`}function np($,_){let I=$._zod.run({value:_,issues:[]},{});if(I&&typeof I.then==="function")return U6;let J=I;return J.issues.length===0?J.value:U6}function CU($,_,I,J,j=!0){let G=$.content.length,X=_.constants.size,W=_.constantCounter,T=_.varCounter;try{return U_($,_,I,J,j)}catch(F){if(!(F instanceof U2)||!F.islandable)throw F;if($.content.length=G,_.constants.size>X){let E=Array.from(_.constants.keys()).slice(X);for(let D of E)_.constants.delete(D)}return _.constantCounter=W,_.varCounter=T,ip($,_,I,J)}}function ip($,_,I,J){_.definite=!1;let j=D1(_,I),G=D1(_,np),X=z1(_);return $.write(`const ${X} = ${G}(${j}, ${J});`),$.write(`if (${X} === INVALID) return INVALID;`),X}var pp=new Set(["max_size","min_size","size_equals","max_length","min_length","length_equals"]);function lp($,_,I,J){let j=I._zod.def.checks;if(!j||j.length===0)return J;let G=J;for(let X of j){let W=X._zod.def;if(W.when&&!pp.has(W.check))throw new U2('check with a custom "when" condition');switch(W.check){case"greater_than":dp($,_,W,G);break;case"less_than":rp($,_,W,G);break;case"multiple_of":tp($,_,W,G);break;case"number_format":zS($,W,G);break;case"min_length":{let T=w8(W.minimum,"min_length"),F=KV($,_,G,`${G}.length >= ${T} && ${G}.length < ${W.minimum*2}`);$.write(`if (${F} < ${T}) return INVALID;`);break}case"max_length":{let T=w8(W.maximum,"max_length"),F=KV($,_,G,`${G}.length > ${T}`);$.write(`if (${F} > ${T}) return INVALID;`);break}case"length_equals":{let T=w8(W.length,"length_equals"),F=KV($,_,G,`${G}.length >= ${T} && ${G}.length <= ${W.length*2}`);$.write(`if (${F} !== ${T}) return INVALID;`);break}case"min_size":$.write(`if (${G}.size < ${w8(W.minimum,"min_size")}) return INVALID;`);break;case"max_size":$.write(`if (${G}.size > ${w8(W.maximum,"max_size")}) return INVALID;`);break;case"size_equals":$.write(`if (${G}.size !== ${w8(W.size,"size_equals")}) return INVALID;`);break;case"string_format":G=ZS($,_,W,G);break;case"custom":G=vl($,_,X,G);break;case"bigint_format":op($,W,G);break;case"mime_type":ap($,_,W,G);break;case"property":ep($,_,W,G);break;case"properties":sp($,_,W,G);break;case"overwrite":{let T=z1(_);$l($,_,X,G,T),G=T;break}default:throw new U2(`check type ${W.check}`)}}return G}function KV($,_,I,J){let j=D1(_,P8),G=z1(_);return $.write(`const ${G} = typeof ${I} === "string" && ${J} ? ${j}(${I}) : ${I}.length;`),G}function w8($,_){if(typeof $!=="number"||!Number.isFinite($))throw new U2(`${_} bound of type ${typeof $}`);return`${$}`}function QS($,_){if(typeof _==="bigint")return`${_}n`;if(typeof _==="number"){if(Number.isNaN(_))throw new U2("comparison check with NaN bound");return`${_}`}if(_ instanceof Date){if(Number.isNaN(_.getTime()))throw new U2("comparison check with Invalid Date bound");return D1($,_)}throw new U2(`comparison check bound of type ${typeof _}`)}function dp($,_,I,J){let j=I.inclusive?"<":"<=";$.write(`if (${J} ${j} ${QS(_,I.value)}) return INVALID;`)}function rp($,_,I,J){let j=I.inclusive?">":">=";$.write(`if (${J} ${j} ${QS(_,I.value)}) return INVALID;`)}function tp($,_,I,J){if(typeof I.value==="bigint"){if(I.value===BigInt(0))throw new U2("multiple_of check with a zero divisor");$.write(`if (${J} % ${I.value}n !== 0n) return INVALID;`)}else{let j=D1(_,C5);$.write(`if (${j}(${J}, ${w8(I.value,"multiple_of")}) !== 0) return INVALID;`)}}function zS($,_,I){let J=_.format;switch(J){case"safeint":$.write(`if (!Number.isSafeInteger(${I})) return INVALID;`);break;case"int32":$.write(`if (!Number.isInteger(${I}) || ${I} < -2147483648 || ${I} > 2147483647) return INVALID;`);break;case"uint32":$.write(`if (!Number.isInteger(${I}) || ${I} < 0 || ${I} > 4294967295) return INVALID;`);break;case"float32":$.write(`if (!Number.isFinite(${I}) || ${I} < -3.4028234663852886e38 || ${I} > 3.4028234663852886e38) return INVALID;`);break;case"float64":$.write(`if (!Number.isFinite(${I})) return INVALID;`);break;default:throw new U2(`number format ${J}`)}}function op($,_,I){let J=_.format;if(!J)return;switch(J){case"int64":$.write(`if (${I} < -9223372036854775808n || ${I} > 9223372036854775807n) return INVALID;`);break;case"uint64":$.write(`if (${I} < 0n || ${I} > 18446744073709551615n) return INVALID;`);break;default:throw new U2(`bigint format ${J}`)}}function ap($,_,I,J){let j=I.mime;if(j&&j.length>0){let G=D1(_,new Set(j));$.write(`if (!${G}.has(${J}.type)) return INVALID;`)}}function sp($,_,I,J){if(I.when)throw new U2('check with a custom "when" condition');$.write(`if (${J} == null) return INVALID;`);let j=I.shape;for(let G of Reflect.ownKeys(j)){let X=typeof G==="symbol"?D1(_,G):_6(G),W=z1(_);$.write(`const ${W} = ${J}[${X}];`),CU($,_,j[G],W,!1)}}function ep($,_,I,J){let j=`${J}[${JSON.stringify(I.property)}]`;U_($,_,I.schema,j)}function $l($,_,I,J,j){let G=I._zod.def.tx;if(!G)throw new U2("overwrite check without a transform function");if(S8(G))throw new WG("z.compile: async overwrite transforms are not supported");let X=D1(_,G);$.write(`const ${j} = ${X}(${J});`)}function HV(){throw new F4}function MV($){this.issues.push($)}function vl($,_,I,J){let j=I._zod.def;if(j.fn){if(S8(j.fn))throw new WG("z.compile: async .refine() predicates are not supported");let G=B8(_,j.fn),X=D1(_,HV),W=z1(_);return $.write(`const ${W} = ${G}(${J});`),$.write(`if (${W} instanceof Promise) ${X}();`),$.write(`if (!${W}) return INVALID;`),J}if(I._zod.check){if(S8(I._zod.check))throw new WG("z.compile: async .superRefine() / check functions are not supported");let G=I._zod.check,W=B8(_,(F)=>{let E={value:F,issues:[],addIssue:MV};if(G(E)instanceof Promise)HV();return E.issues.length===0?E.value:U6}),T=z1(_);return $.write(`const ${T} = ${W}(${J});`),$.write(`if (${T} === INVALID) return INVALID;`),T}throw new U2("custom check without a predicate or check function")}var _l=new Set(["cidrv4","cuid","cuid2","date","datetime","duration","e164","email","emoji","ends_with","guid","includes","ipv4","ksuid","lowercase","mac","nanoid","regex","starts_with","time","ulid","uppercase","uuid","xid"]);function ZS($,_,I,J,j=!0){let G=I.format;if(G==="base64"){let F=D1(_,r5);return $.write(`if (!${F}(${J})) return INVALID;`),J}if(G==="base64url"){let F=D1(_,ID);return $.write(`if (!${F}(${J})) return INVALID;`),J}if(G==="jwt"){let F=D1(_,YD),E=D1(_,I.alg??null);return $.write(`if (!${F}(${J}, ${E})) return INVALID;`),J}if(G==="ipv6"){let F=D1(_,d5);return $.write(`if (!${F}(${J})) return INVALID;`),J}if(G==="cidrv6"){let F=D1(_,jD);return $.write(`if (!${F}(${J})) return INVALID;`),J}if(G==="credit_card"){let F=D1(_,XD);return $.write(`if (!${F}(${J})) return INVALID;`),J}if(G==="iban"){let F=D1(_,GD);return $.write(`if (!${F}(${J})) return INVALID;`),J}let X=I;if(G==="url"||G==="httpurl"||X.normalize||X.hostname!==void 0||X.protocol!==void 0){let F=D1(_,$D),E=D1(_,I),D=z1(_),q=z1(_);if($.write(`const ${D} = ${J}.trim();`),$.write(`const ${q} = ${F}(${D}, ${E});`),$.write(`if (typeof ${q} === "number") return INVALID;`),X.hostname!==void 0){let y=D1(_,vD);$.write(`if (!${y}(${q}, ${E}.hostname)) return INVALID;`)}if(X.protocol!==void 0){let y=D1(_,_D);$.write(`if (!${y}(${q}, ${E}.protocol)) return INVALID;`)}if(!j)return null;let S=z1(_),k=X.normalize?`${q}.href`:`${D1(_,l5)}(${D})`;return $.write(`const ${S} = ${k};`),S}let W=I.fn;if(W){if(S8(W))throw new U2(`async string format ${G}`);let F=D1(_,W);return $.write(`if (!${F}(${J})) return INVALID;`),J}if(_l.has(G)&&I.pattern){let F=D1(_,I.pattern);return $.write(`${F}.lastIndex = 0;`),$.write(`if (!${F}.test(${J})) return INVALID;`),J}let T=I.format;switch(T){case"regex":throw new U2("regex format without a pattern");case"lowercase":$.write(`if (${J} !== ${J}.toLowerCase()) return INVALID;`);break;case"uppercase":$.write(`if (${J} !== ${J}.toUpperCase()) return INVALID;`);break;case"includes":$.write(`if (!${J}.includes(${_6(I.includes)})) return INVALID;`);break;case"starts_with":{let F=I.prefix;$.write(`if (${J}.slice(0, ${F.length}) !== ${_6(F)}) return INVALID;`);break}case"ends_with":{let F=I.suffix;$.write(`if (${J}.slice(-${F.length}) !== ${_6(F)}) return INVALID;`);break}default:throw new U2(`string format ${T}`)}return J}function U_($,_,I,J,j=!0){let G=I._zod.def,X=G.type;if(G.coerce)throw new U2(`coercion (z.coerce.${X}())`);let W=j||!!G.checks?.length,T;switch(X){case"string":T=jl($,_,I,J,W);break;case"number":T=Ul($,I,J);break;case"boolean":T=Il($,J);break;case"bigint":T=Xl($,I,J);break;case"symbol":T=Gl($,J);break;case"undefined":T=Yl($,J);break;case"null":T=Jl($,J);break;case"any":case"unknown":T=J;break;case"never":$.write("return INVALID;"),T=J;break;case"void":T=Ql($,J);break;case"nan":T=zl($,J);break;case"date":T=Zl($,J);break;case"object":T=Ol($,_,I,J,W);break;case"optional":T=Ll($,_,I,J,W);break;case"nullable":T=Kl($,_,I,J,W);break;case"array":T=Hl($,_,I,J,W);break;case"literal":T=Fl($,_,I,J);break;case"enum":T=Al($,_,I,J);break;case"readonly":{let F=GS($,_,I,J),E=z1(_);$.write(`const ${E} = Object.freeze(${F});`),T=E;break}case"success":GS($,_,I,J),T="true";break;case"default":case"prefault":T=Ml($,_,I,J);break;case"nonoptional":T=El($,_,I,J);break;case"tuple":T=Vl($,_,I,J);break;case"union":T=Tl($,_,I,J);break;case"intersection":T=ql($,_,I,J);break;case"record":T=gl($,_,I,J);break;case"map":T=wl($,_,I,J);break;case"set":T=Nl($,_,I,J);break;case"file":T=Bl($,J);break;case"template_literal":T=Sl($,_,I,J);break;case"lazy":T=kl($,_,I,J);break;case"pipe":T=cl($,_,I,J);break;case"custom":T=xl($,_,I,J);break;case"transform":T=bl($,_,I,J);break;case"catch":T=yl($,_,I,J);break;default:throw new U2(`schema type ${X}`)}if(T===null)return null;return lp($,_,I,T)}function jl($,_,I,J,j=!0){$.write(`if (typeof ${J} !== "string") return INVALID;`);let G=I._zod.def;if(G.format===void 0)return J;return ZS($,_,G,J,j)}function Ul($,_,I){$.write(`if (typeof ${I} !== "number" || !Number.isFinite(${I})) return INVALID;`);let J=_._zod.def;if(J.check==="number_format"&&J.format)zS($,{format:J.format},I);return I}function Il($,_){return $.write(`if (typeof ${_} !== "boolean") return INVALID;`),_}function Xl($,_,I){$.write(`if (typeof ${I} !== "bigint") return INVALID;`);let J=_._zod.def;if(J.format)switch(J.format){case"int64":$.write(`if (${I} < -9223372036854775808n || ${I} > 9223372036854775807n) return INVALID;`);break;case"uint64":$.write(`if (${I} < 0n || ${I} > 18446744073709551615n) return INVALID;`);break}return I}function Gl($,_){return $.write(`if (typeof ${_} !== "symbol") return INVALID;`),_}function Yl($,_){return $.write(`if (${_} !== undefined) return INVALID;`),_}function Jl($,_){return $.write(`if (${_} !== null) return INVALID;`),_}function Ql($,_){return $.write(`if (${_} !== undefined) return INVALID;`),_}function zl($,_){return $.write(`if (typeof ${_} !== "number" || !Number.isNaN(${_})) return INVALID;`),_}function Zl($,_){return $.write(`if (!(${_} instanceof Date) || Number.isNaN(${_}.getTime())) return INVALID;`),_}function Ol($,_,I,J,j=!0){let G=I._zod.def;$.write(`if (typeof ${J} !== "object" || ${J} === null || Array.isArray(${J})) return INVALID;`);let X=G.shape,W=Object.keys(X),T=Object.getOwnPropertySymbols(X),F=T.length?[...W,...T]:W,E=(h)=>typeof h==="symbol"?D1(_,h):_6(h),D=(h)=>typeof h==="symbol"?`[${E(h)}]`:_6(h),q=X;if(W.includes("__proto__"))throw new U2('object shape key "__proto__"');let S=new Map;for(let h of F){let i=q[h],s=E(h),j0=z1(_);if($.write(`const ${j0} = ${J}[${s}];`),i._zod.optin!==void 0){let I0=z1(_);if($.write(`let ${I0} = (() => {`),$.indented((H0)=>{let L0=CU(H0,_,i,j0);H0.write(`return ${L0};`)}),$.write("})();"),i._zod.optout==="optional")$.write(`if (${I0} === INVALID) {`),$.indented((H0)=>{H0.write(`if (${s} in ${J}) return INVALID;`),H0.write(`${I0} = undefined;`)}),$.write("}");else $.write(`if (${I0} === INVALID) return INVALID;`);S.set(h,I0)}else{if(Dl(i))$.write(`if (!(${s} in ${J})) return INVALID;`);let I0=CU($,_,i,j0,j);if(I0!==null)S.set(h,I0)}}let k=G.catchall,y="none";if(k){let h=k._zod.def.type;if(h==="never"){let i=W.map((s)=>`k !== ${_6(s)}`).join(" && ")||"true";$.write(`for (const k in ${J}) {`),$.indented((s)=>{s.write(`if (${i}) return INVALID;`)}),$.write("}")}else if((h==="unknown"||h==="any")&&!k._zod.def.checks?.length)y="passthrough";else y="schema"}let m=z1(_),n=F.some((h)=>XS(q[h])||FV(q[h]));if(!j){if(y==="schema"){let h=W.length>0?D1(_,new Set(W)):null;$.write(`for (const k in ${J}) {`),$.indented((i)=>{if(i.write('if (k === "__proto__") continue;'),h)i.write(`if (${h}.has(k)) continue;`);let s=z1(_);i.write(`const ${s} = ${J}[k];`),CU(i,_,k,s,!1)}),$.write("}")}return null}if(!n){let h=F.map((i)=>`${D(i)}: ${S.get(i)}`).join(", ");$.write(`const ${m} = { ${h} };`)}else{$.write(`const ${m} = {};`);for(let h of F){let i=E(h),s=S.get(h);if(FV(q[h]))$.write(`if (${i} in ${J}) ${m}[${i}] = ${s};`);else if(XS(q[h]))$.write(`if (${s} !== undefined || ${i} in ${J}) ${m}[${i}] = ${s};`);else $.write(`${m}[${i}] = ${s};`)}}if(y!=="none"){let h=W.length>0?D1(_,new Set(W)):null;$.write(`for (const k in ${J}) {`),$.indented((i)=>{if(i.write('if (k === "__proto__") continue;'),h)i.write(`if (${h}.has(k)) continue;`);if(y==="passthrough")i.write(`${m}[k] = ${J}[k];`);else{let s=z1(_);i.write(`const ${s} = ${J}[k];`);let j0=CU(i,_,k,s);i.write(`${m}[k] = ${j0};`)}}),$.write("}")}return m}function Ll($,_,I,J,j=!0){let G=I._zod.def;if(Wl(I))return U_($,_,G.innerType,J,j);if(G.innerType._zod.optin==="defaulted"){let W=z1(_),T=z1(_);return $.write(`let ${W};`),$.write(`if (${J} === undefined) {`),$.indented((F)=>{F.write(`const ${T} = (() => {`),F.indented((E)=>{let D=U_(E,_,G.innerType,J);E.write(`return ${D};`)}),F.write("})();"),F.write(`if (${T} !== INVALID) ${W} = ${T};`)}),$.write("} else {"),$.indented((F)=>{let E=U_(F,_,G.innerType,J);F.write(`${W} = ${E};`)}),$.write("}"),W}let X=j?z1(_):null;if(X)$.write(`let ${X};`);return $.write(`if (${J} !== undefined) {`),$.indented((W)=>{let T=U_(W,_,G.innerType,J,j);if(X&&T!==null)W.write(`${X} = ${T};`)}),$.write("}"),X}function Wl($){return $._zod.traits?.has("$ZodExactOptional")===!0}function Dl($){return $._zod.optin===void 0&&N8($)}function N8($){if($._zod.def.coerce)return!0;let _=$._zod.def;switch(_.type){case"any":case"unknown":case"undefined":case"void":case"default":case"prefault":case"transform":case"custom":case"lazy":return!0;case"string":case"number":case"boolean":case"bigint":case"symbol":case"null":case"never":case"nan":case"date":case"object":case"array":case"tuple":case"record":case"map":case"set":case"file":case"template_literal":return!1;case"nonoptional":return _.innerType?N8(_.innerType):!1;case"literal":return!!_.values?.includes(void 0);case"enum":return!!$._zod.values?.has(void 0);case"optional":case"nullable":case"readonly":case"success":return _.innerType?N8(_.innerType):!0;case"catch":return!0;case"union":return _.options?_.options.some(N8):!0;case"intersection":if(!_.left||!_.right)return!0;return N8(_.left)&&N8(_.right);case"pipe":return _.in?N8(_.in):!0;default:return!0}}function FV($){return $._zod.optin==="optional"&&$._zod.optout==="optional"}function XS($){return($._zod.optin!=="defaulted"||$._zod.optout==="optional")&&qZ($)}function qZ($){let _=$._zod.def;switch(_.type){case"string":case"number":case"boolean":case"bigint":case"symbol":case"null":case"nan":case"date":case"object":case"array":case"tuple":case"record":case"map":case"set":case"file":case"template_literal":case"never":case"success":return!1;case"literal":return!!_.values?.includes(void 0);case"enum":return!!$._zod.values?.has(void 0);case"optional":return!0;case"nullable":case"readonly":case"nonoptional":return _.innerType?qZ(_.innerType):!0;case"union":return _.options?_.options.some(qZ):!0;case"intersection":return!_.left||!_.right||qZ(_.left)||qZ(_.right);case"pipe":return _.out?qZ(_.out):!0;default:return!0}}function Kl($,_,I,J,j=!0){let G=I._zod.def,X=j?z1(_):null;if(X)$.write(`let ${X} = null;`);return $.write(`if (${J} !== null) {`),$.indented((W)=>{let T=U_(W,_,G.innerType,J,j);if(X&&T!==null)W.write(`${X} = ${T};`)}),$.write("}"),X}function Hl($,_,I,J,j=!0){let G=I._zod.def;$.write(`if (!Array.isArray(${J})) return INVALID;`);let X=j?z1(_):null,W=z1(_),T=z1(_);if(X)$.write(`const ${X} = new Array(${J}.length);`);return $.write(`for (let ${W} = 0; ${W} < ${J}.length; ${W}++) {`),$.indented((F)=>{F.write(`const ${T} = ${J}[${W}];`);let E=CU(F,_,G.element,T,j);if(X&&E!==null)F.write(`${X}[${W}] = ${E};`)}),$.write("}"),X}function Fl($,_,I,J){let G=I._zod.def.values;if(G.length!==1){let W=D1(_,new Set(G));return $.write(`if (!${W}.has(${J})) return INVALID;`),J}let X=G[0];if(typeof X==="number"&&Number.isNaN(X)){let W=D1(_,new Set(G));return $.write(`if (!${W}.has(${J})) return INVALID;`),J}if(typeof X==="string")$.write(`if (${J} !== ${_6(X)}) return INVALID;`);else if(typeof X==="number"||typeof X==="boolean")$.write(`if (${J} !== ${X}) return INVALID;`);else if(X===null)$.write(`if (${J} !== null) return INVALID;`);else if(X===void 0)$.write(`if (${J} !== undefined) return INVALID;`);else if(typeof X==="bigint")$.write(`if (${J} !== ${X}n) return INVALID;`);else throw new U2(`literal type ${typeof X}`);return J}function Al($,_,I,J){let j=I._zod.values;if(!j)throw new U2("enum schema without enumerated values");let G=D1(_,j);return $.write(`if (!${G}.has(${J})) return INVALID;`),J}function GS($,_,I,J){let j=I._zod.def;return U_($,_,j.innerType,J)}function Ml($,_,I,J){let j=I._zod.def,X=Object.getOwnPropertyDescriptor(I._zod.def,"defaultValue")?()=>I._zod.def.defaultValue:void 0;if(I._zod.def.type==="prefault"){if(!X)return U_($,_,j.innerType,J);let T=D1(_,X),F=z1(_);return $.write(`let ${F} = ${J};`),$.write(`if (${J} === undefined) ${F} = ${T}();`),U_($,_,j.innerType,F)}let W=z1(_);if(X){let T=D1(_,X),F=D1(_,w5);$.write(`let ${W};`),$.write(`if (${J} === undefined) {`),$.indented((E)=>{E.write(`${W} = ${F}(${T}());`)}),$.write("} else {"),$.indented((E)=>{let D=U_(E,_,j.innerType,J);E.write(`${W} = ${D} === undefined ? ${F}(${T}()) : ${D};`)}),$.write("}")}else $.write(`let ${W};`),$.write(`if (${J} !== undefined) {`),$.indented((T)=>{let F=U_(T,_,j.innerType,J);T.write(`${W} = ${F};`)}),$.write("}");return W}function El($,_,I,J){let j=I._zod.def,G=U_($,_,j.innerType,J),X=z1(_);return $.write(`const ${X} = ${G};`),$.write(`if (${X} === undefined) return INVALID;`),X}function Vl($,_,I,J){let j=I._zod.def,G=j.items,X=j.rest;$.write(`if (!Array.isArray(${J})) return INVALID;`);let W=YS(G,"optin"),T=YS(G,"optout");if(X)$.write(`if (${J}.length < ${W}) return INVALID;`);else $.write(`if (${J}.length < ${W} || ${J}.length > ${G.length}) return INVALID;`);let F=z1(_);$.write(`const ${F} = [];`);for(let E=0;E<G.length;E++){let D=G[E];if(E>=T)$.write(`if (${F}.length === ${E}) {`),$.indented((q)=>{q.write(`if (${E} < ${J}.length) {`),q.indented((S)=>{let k=z1(_);S.write(`const ${k} = ${J}[${E}];`);let y=CU(S,_,D,k);S.write(`${F}[${E}] = ${y};`)}),q.write("} else {"),q.indented((S)=>{if(FV(D)){S.write(`${F}.length = ${E};`);return}let k=z1(_),y=z1(_);S.write(`const ${k} = undefined;`),S.write(`const ${y} = (() => {`),S.indented((m)=>{let n=CU(m,_,D,k);m.write(`return ${n};`)}),S.write("})();"),S.write(`if (${y} === INVALID || ${y} === undefined) ${F}.length = ${E};`),S.write(`else ${F}[${E}] = ${y};`)}),q.write("}")}),$.write("}");else{let q=z1(_);$.write(`const ${q} = ${J}[${E}];`);let S=CU($,_,D,q);$.write(`${F}[${E}] = ${S};`)}}if(X){let E=z1(_),D=z1(_);$.write(`for (let ${E} = ${G.length}; ${E} < ${J}.length; ${E}++) {`),$.indented((q)=>{q.write(`const ${D} = ${J}[${E}];`);let S=CU(q,_,X,D);q.write(`${F}[${E}] = ${S};`)}),$.write("}")}return F}function YS($,_){for(let I=$.length-1;I>=0;I--)if(!(_==="optin"?$[I]._zod.optin!==void 0:$[I]._zod.optout==="optional"))return I+1;return 0}function Tl($,_,I,J){let j=I._zod.def,G=j.options;if(j.discriminator)return Rl($,_,j,J);if(j.inclusive===!1)throw new U2("exclusive unions (z.xor)");if(G.length===0)return $.write("return INVALID;"),J;if(G.length===1)return U_($,_,G[0],J);if(G.every((T)=>T._zod.def.type==="literal"&&!T._zod.def.checks?.length)){let T=new Set(G.flatMap((E)=>E._zod.def.values)),F=D1(_,T);return $.write(`if (!${F}.has(${J})) return INVALID;`),J}let W=z1(_);$.write(`let ${W};`);for(let T=0;T<G.length;T++){let F=G[T];if(T===0)$.write(`${W} = (() => {`);else $.write(`if (${W} === INVALID) ${W} = (() => {`);$.indented((E)=>{let D=U_(E,_,F,J);E.write(`return ${D};`)}),$.write("})();")}return $.write(`if (${W} === INVALID) return INVALID;`),W}function Rl($,_,I,J){if(I.unionFallback)throw new U2("discriminated union with unionFallback");if(I.options.length===0)return $.write("return INVALID;"),J;let j=z1(_),G=z1(_);$.write(`const ${j} = ${J}?.[${_6(I.discriminator)}];`),$.write(`let ${G};`);let X=!0,W=new Set;for(let T of I.options){let F=T._zod.propValues?.[I.discriminator];if(!F||F.size===0)throw new U2("discriminated union option without static discriminator values");for(let q of F){if(W.has(q))throw new U2(`duplicate discriminator value ${String(q)}`);W.add(q)}let E=Array.from(F,(q)=>Pl(_,j,q)),D=X?"if":"else if";$.write(`${D} (${E.join(" || ")}) {`),$.indented((q)=>{let S=U_(q,_,T,J);q.write(`${G} = ${S};`)}),$.write("}"),X=!1}return $.write("else { return INVALID; }"),G}function Pl($,_,I){if(typeof I==="string")return`${_} === ${_6(I)}`;if(typeof I==="number"){if(Number.isNaN(I))return`Number.isNaN(${_})`;return`${_} === ${I}`}if(typeof I==="boolean")return`${_} === ${I}`;if(I===null)return`${_} === null`;if(I===void 0)return`${_} === undefined`;if(typeof I==="bigint")return`${_} === ${I}n`;if(typeof I==="symbol"){let J=D1($,I);return`${_} === ${J}`}throw new U2(`literal discriminator value ${String(I)}`)}function ql($,_,I,J){let j=I._zod.def;_.definite=!1;let G=CU($,_,j.left,J),X=CU($,_,j.right,J),W=D1(_,TZ),T=z1(_);return $.write(`const ${T} = ${W}(${G}, ${X});`),$.write(`if (!${T}.valid) return INVALID;`),`${T}.data`}function gl($,_,I,J){let j=I._zod.def,G=D1(_,OI);$.write(`if (!${G}(${J})) return INVALID;`);let X=z1(_),W=z1(_),T=z1(_);$.write(`const ${X} = {};`);let F=j,E=F.partial?void 0:j.keyType._zod.values;if(E){let S=[];for(let y of E){if(!(typeof y==="string"||typeof y==="number"||typeof y==="symbol"))throw new U2(`record key value ${String(y)}`);let m=typeof y==="number"?y.toString():y;if(m==="__proto__")throw new U2('record key "__proto__"');S.push(m);let n=D1(_,y),h=U_($,_,j.keyType,n),i=z1(_);$.write(`const ${i} = ${J}[${Cl(_,m)}];`);let s=CU($,_,j.valueType,i);$.write(`${X}[${h}] = ${s};`)}let k=D1(_,new Set(S));return $.write(`for (const ${W} in ${J}) {`),$.indented((y)=>{if(y.write(`if (${k}.has(${W})) continue;`),F.mode==="loose")y.write(`if (${W} !== "__proto__") ${X}[${W}] = ${J}[${W}];`);else y.write("return INVALID;")}),$.write("}"),X}let D=j.keyType._zod.def;if(!(D.type==="string"&&D.format===void 0&&!D.coerce&&(D.checks?.length??0)===0)){let S=j.mode==="loose",k=MD(j.keyType);if(k.definite===!1)_.definite=!1;let y=D1(_,k),m=D1(_,LG),n=z1(_);return JS($,_,J,W,(h)=>{if(h.write(`let ${n} = ${y}(${W});`),h.write(`if (${n} === INVALID && typeof ${W} === "string" && ${m}.test(${W})) ${n} = ${y}(Number(${W}));`),S)h.write(`if (${n} === INVALID) { ${X}[${W}] = ${J}[${W}]; continue; }`);else h.write(`if (${n} === INVALID) return INVALID;`);h.write(`if (${n} === "__proto__") continue;`);let i=z1(_);h.write(`const ${i} = ${J}[${W}];`);let s=CU(h,_,j.valueType,i);h.write(`${X}[${n}] = ${s};`)}),X}return JS($,_,J,W,(S)=>{S.write(`const ${T} = ${J}[${W}];`);let k=CU(S,_,j.valueType,T);S.write(`${X}[${W}] = ${k};`)},"return INVALID;"),X}function JS($,_,I,J,j,G){let X=D1(_,Object.prototype.propertyIsEnumerable),W=z1(_),T=z1(_),F=z1(_);$.write(`const ${W} = Object.getOwnPropertySymbols(${I});`),$.write(`const ${T} = Object.getOwnPropertyNames(${I});`),$.write(`for (let ${F} = 0; ${F} < ${T}.length; ${F}++) {`),$.indented((E)=>{E.write(`const ${J} = ${T}[${F}];`),E.write(`if (${J} === "__proto__" || !${X}.call(${I}, ${J})) continue;`),j(E)}),$.write("}"),$.write(`for (let ${F} = 0; ${F} < ${W}.length; ${F}++) {`),$.indented((E)=>{if(E.write(`const ${J} = ${W}[${F}];`),E.write(`if (!${X}.call(${I}, ${J})) continue;`),G)E.write(G);else j(E)}),$.write("}")}function Cl($,_){if(typeof _==="string")return _6(_);return D1($,_)}function wl($,_,I,J){let j=I._zod.def;$.write(`if (!(${J} instanceof Map)) return INVALID;`);let G=z1(_),X=z1(_),W=z1(_);return $.write(`const ${G} = new Map();`),$.write(`for (const [${X}, ${W}] of ${J}) {`),$.indented((T)=>{let F=U_(T,_,j.keyType,X),E=U_(T,_,j.valueType,W);T.write(`${G}.set(${F}, ${E});`)}),$.write("}"),G}function Nl($,_,I,J){let j=I._zod.def;$.write(`if (!(${J} instanceof Set)) return INVALID;`);let G=z1(_),X=z1(_);return $.write(`const ${G} = new Set();`),$.write(`for (const ${X} of ${J}) {`),$.indented((W)=>{let T=U_(W,_,j.valueType,X);W.write(`${G}.add(${T});`)}),$.write("}"),G}function Bl($,_){return $.write(`if (!(${_} instanceof File)) return INVALID;`),_}function Sl($,_,I,J){$.write(`if (typeof ${J} !== "string") return INVALID;`);let j=I._zod.pattern;if(j){let G=D1(_,j);$.write(`${G}.lastIndex = 0;`),$.write(`if (!${G}.test(${J})) return INVALID;`)}return J}function kl($,_,I,J){let j=I._zod.def,G=B8(_,j.getter),X=D1(_,{parser:null});$.write(`if (!${X}.parser) {`),$.indented((T)=>{T.write(`const inner = ${G}();`),T.write(`${X}.parser = function(input) {`),T.indented((F)=>{F.write("const result = inner._zod.run({ value: input, issues: [] }, {});"),F.write("return result.issues.length === 0 ? result.value : INVALID;")}),T.write("};")}),$.write("}");let W=z1(_);return $.write(`const ${W} = ${X}.parser(${J});`),$.write(`if (${W} === INVALID) return INVALID;`),W}function cl($,_,I,J){let j=I._zod.def,G=U_($,_,j.in,J);if(j.transform){if(S8(j.transform))throw new WG("z.compile: async transforms in pipes are not supported");let X=j.transform,T=B8(_,(E)=>{let D={value:E,issues:[],addIssue:MV},q=X(E,D);if(q instanceof Promise)return U6;return D.issues.length===0?q:U6}),F=z1(_);return $.write(`const ${F} = ${T}(${G});`),$.write(`if (${F} === INVALID) return INVALID;`),U_($,_,j.out,F)}else return U_($,_,j.out,G)}function S8($){return typeof $==="function"&&($.constructor.name==="AsyncFunction"||$[Symbol.toStringTag]==="AsyncFunction")}function xl($,_,I,J){let j=I._zod.def;if(j.fn){if(S8(j.fn))throw new WG("z.compile: async custom predicates are not supported");let G=B8(_,j.fn),X=D1(_,HV),W=z1(_);$.write(`const ${W} = ${G}(${J});`),$.write(`if (${W} instanceof Promise) ${X}();`),$.write(`if (!${W}) return INVALID;`)}else throw new U2("custom schema without a predicate function");return J}function fl($,_,I){let J=$._zod.run({value:I,issues:[]},{});if(J&&typeof J.then==="function")return U6;let j=J;if(j.issues.length===0)return j.value;return _()}function yl($,_,I,J){let j=I._zod.def;if(!j.catchValue[N9])throw new U2("catch with a callback (only a constant catch value compiles)",!1);let G=z1(_);$.write(`let ${G} = (() => {`),$.indented((F)=>{let E=CU(F,_,j.innerType,J);F.write(`return ${E};`)}),$.write("})();");let X=D1(_,j.innerType),W=B8(_,j.catchValue),T=D1(_,fl);return $.write(`if (${G} === INVALID) {`),$.indented((F)=>{F.write(`${G} = ${T}(${X}, ${W}, ${J});`),F.write(`if (${G} === INVALID) return INVALID;`)}),$.write("}"),G}function bl($,_,I,J){let j=I._zod.def;if(j.transform){if(S8(j.transform))throw new WG("z.compile: async transforms are not supported");let G=j.transform,W=B8(_,(F)=>{let E={value:F,issues:[],addIssue:MV},D=G(F,E);if(D instanceof Promise)return U6;return E.issues.length===0?D:U6}),T=z1(_);return $.write(`const ${T} = ${W}(${J});`),$.write(`if (${T} === INVALID) return INVALID;`),T}return J}function ED($){if($.checks)$.checks=[...$.checks];return $}function EV($,_){return new $(ED({type:"string",...m$(_)}))}function VV($,_){return new $(ED({type:"string",coerce:!0,...m$(_)}))}function VD($,_){return new $({type:"string",format:"email",check:"string_format",abort:!1,...m$(_)})}function TD($,_){return new $({type:"string",format:"guid",check:"string_format",abort:!1,...m$(_)})}function RD($,_){return new $({type:"string",format:"uuid",check:"string_format",abort:!1,...m$(_)})}function PD($,_){return new $({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...m$(_)})}function qD($,_){return new $({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...m$(_)})}function gD($,_){return new $({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...m$(_)})}function YL($,_){return new $({type:"string",format:"url",check:"string_format",abort:!1,...m$(_)})}function CD($,_){return new $({type:"string",format:"emoji",check:"string_format",abort:!1,...m$(_)})}function wD($,_){return new $({type:"string",format:"nanoid",check:"string_format",abort:!1,...m$(_)})}function ND($,_){return new $({type:"string",format:"cuid",check:"string_format",abort:!1,...m$(_)})}function BD($,_){return new $({type:"string",format:"cuid2",check:"string_format",abort:!1,...m$(_)})}function SD($,_){return new $({type:"string",format:"ulid",check:"string_format",abort:!1,...m$(_)})}function kD($,_){return new $({type:"string",format:"xid",check:"string_format",abort:!1,...m$(_)})}function cD($,_){return new $({type:"string",format:"ksuid",check:"string_format",abort:!1,...m$(_)})}function xD($,_){return new $({type:"string",format:"ipv4",check:"string_format",abort:!1,...m$(_)})}function fD($,_){return new $({type:"string",format:"ipv6",check:"string_format",abort:!1,...m$(_)})}function TV($,_){return new $({type:"string",format:"mac",check:"string_format",abort:!1,...m$(_)})}function yD($,_){return new $({type:"string",format:"cidrv4",check:"string_format",abort:!1,...m$(_)})}function bD($,_){return new $({type:"string",format:"cidrv6",check:"string_format",abort:!1,...m$(_)})}function hD($,_){return new $({type:"string",format:"base64",check:"string_format",abort:!1,...m$(_)})}function mD($,_){return new $({type:"string",format:"base64url",check:"string_format",abort:!1,...m$(_)})}function uD($,_){return new $({type:"string",format:"e164",check:"string_format",abort:!1,...m$(_)})}function RV($,_){return new $({type:"string",format:"credit_card",check:"string_format",abort:!1,...m$(_)})}function PV($,_){return new $({type:"string",format:"iban",check:"string_format",abort:!1,...m$(_)})}function nD($,_){return new $({type:"string",format:"jwt",check:"string_format",abort:!1,...m$(_)})}var qV={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function JL($,_){return new $({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...m$(_)})}function QL($,_){return new $({type:"string",format:"date",check:"string_format",...m$(_)})}function zL($,_){return new $({type:"string",format:"time",check:"string_format",precision:null,...m$(_)})}function ZL($,_){return new $({type:"string",format:"duration",check:"string_format",...m$(_)})}function gV($,_){return new $(ED({type:"number",checks:[],...m$(_)}))}function CV($,_){return new $(ED({type:"number",coerce:!0,checks:[],...m$(_)}))}function wV($,_){return new $({type:"number",check:"number_format",abort:!1,format:"safeint",...m$(_)})}function NV($,_){return new $({type:"number",check:"number_format",abort:!1,format:"float32",...m$(_)})}function BV($,_){return new $({type:"number",check:"number_format",abort:!1,format:"float64",...m$(_)})}function SV($,_){return new $({type:"number",check:"number_format",abort:!1,format:"int32",...m$(_)})}function kV($,_){return new $({type:"number",check:"number_format",abort:!1,format:"uint32",...m$(_)})}function cV($,_){return new $({type:"boolean",...m$(_)})}function xV($,_){return new $({type:"boolean",coerce:!0,...m$(_)})}function fV($,_){return new $({type:"bigint",...m$(_)})}function yV($,_){return new $({type:"bigint",coerce:!0,...m$(_)})}function bV($,_){return new $({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...m$(_)})}function hV($,_){return new $({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...m$(_)})}function mV($,_){return new $({type:"symbol",...m$(_)})}function uV($,_){return new $({type:"undefined",...m$(_)})}function nV($,_){return new $({type:"null",...m$(_)})}function iV($){return new $({type:"any"})}function pV($){return new $({type:"unknown"})}function lV($,_){return new $({type:"never",...m$(_)})}function dV($,_){return new $({type:"void",...m$(_)})}function rV($,_){return new $({type:"date",...m$(_)})}function tV($,_){return new $({type:"date",coerce:!0,...m$(_)})}function oV($,_){return new $({type:"nan",...m$(_)})}function DG($,_){return new d9({check:"less_than",...m$(_),value:$,inclusive:!1})}function A4($,_){return new d9({check:"less_than",...m$(_),value:$,inclusive:!0})}function KG($,_){return new r9({check:"greater_than",...m$(_),value:$,inclusive:!1})}function M4($,_){return new r9({check:"greater_than",...m$(_),value:$,inclusive:!0})}function iD($){return KG(0,$)}function pD($){return DG(0,$)}function lD($){return A4(0,$)}function dD($){return M4(0,$)}function sJ($,_){return new PM({check:"multiple_of",...m$(_),value:$})}function eJ($,_){return new CM({check:"max_size",...m$(_),maximum:$})}function HG($,_){return new wM({check:"min_size",...m$(_),minimum:$})}function k8($,_){return new NM({check:"size_equals",...m$(_),size:$})}function c8($,_){return new BM({check:"max_length",...m$(_),maximum:$})}function qY($,_){return new SM({check:"min_length",...m$(_),minimum:$})}function x8($,_){return new kM({check:"length_equals",...m$(_),length:$})}function gZ($,_){return new cM({check:"string_format",format:"regex",...m$(_),pattern:$})}function CZ($){return new xM({check:"string_format",format:"lowercase",...m$($)})}function wZ($){return new fM({check:"string_format",format:"uppercase",...m$($)})}function NZ($,_){return new yM({check:"string_format",format:"includes",...m$(_),includes:$})}function BZ($,_){return new bM({check:"string_format",format:"starts_with",...m$(_),prefix:$})}function SZ($,_){return new hM({check:"string_format",format:"ends_with",...m$(_),suffix:$})}function rD($,_,I){return new mM({check:"property",property:$,schema:_,...m$(I)})}function kZ($,_){return new uM({check:"properties",shape:$,...m$(_)})}function cZ($,_){return new nM({check:"mime_type",mime:$,...m$(_)})}function JX($){return new iM({check:"overwrite",tx:$})}function xZ($){return JX((_)=>_.normalize($))}function fZ(){return JX(($)=>$.trim())}function yZ(){return JX(($)=>$.toLowerCase())}function bZ(){return JX(($)=>$.toUpperCase())}function hZ(){return JX(($)=>gA($))}function aV($,_,I){return new $({type:"array",element:_,...m$(I)})}function hl($,_,I){return new $({type:"union",options:_,...m$(I)})}function ml($,_,I){return new $({type:"union",options:_,inclusive:!1,...m$(I)})}function ul($,_,I,J){return new $({type:"union",options:I,discriminator:_,...m$(J)})}function nl($,_,I){return new $({type:"intersection",left:_,right:I})}function il($,_,I,J){let j=I instanceof P1;return new $({type:"tuple",items:_,rest:j?I:null,...m$(j?J:I)})}function pl($,_,I,J){return new $({type:"record",keyType:_,valueType:I,...m$(J)})}function ll($,_,I,J){return new $({type:"map",keyType:_,valueType:I,...m$(J)})}function dl($,_,I){return new $({type:"set",valueType:_,...m$(I)})}function rl($,_,I){let J=Array.isArray(_)?Object.fromEntries(_.map((j)=>[j,j])):_;return new $({type:"enum",entries:J,...m$(I)})}function tl($,_,I){return new $({type:"enum",entries:_,...m$(I)})}function ol($,_,I){return new $({type:"literal",values:Array.isArray(_)?_:[_],...m$(I)})}function sV($,_){return new $({type:"file",...m$(_)})}function al($,_){return new $({type:"transform",transform:_})}function sl($,_){return new $({type:"optional",innerType:_})}function el($,_){return new $({type:"nullable",innerType:_})}function $d($,_,I){return new $({type:"default",innerType:_,get defaultValue(){return typeof I==="function"?I():w5(I)}})}function vd($,_,I){return new $({type:"nonoptional",innerType:_,...m$(I)})}function _d($,_){return new $({type:"success",innerType:_})}function jd($,_,I){return new $({type:"catch",innerType:_,catchValue:typeof I==="function"?I:kA(I)})}function Ud($,_,I){return new $({type:"pipe",in:_,out:I})}function Id($,_){return new $({type:"readonly",innerType:_})}function Xd($,_,I){return new $({type:"template_literal",parts:_,...m$(I)})}function Gd($,_){return new $({type:"lazy",getter:_})}function Yd($,_){return new $({type:"promise",innerType:_})}function eV($,_,I){let J=m$(I);return J.abort??(J.abort=!0),new $({type:"custom",check:"custom",fn:_,...J})}function $T($,_,I){return new $({type:"custom",check:"custom",fn:_,...m$(I)})}function vT($,_){let I=OS((J)=>{return J.addIssue=(j)=>{if(typeof j==="string")J.issues.push(KZ(j,J.value,I._zod.def));else{let G=j;if(G.fatal)G.continue=!1;if(G.code??(G.code="custom"),!("input"in G))G.input=J.value;G.inst??(G.inst=I),G.continue??(G.continue=!I._zod.def.abort),J.issues.push(KZ(G))}},$(J.value,J)},_);return I}function OS($,_){let I=new Wv({check:"custom",...m$(_)});return I._zod.check=$,I}function _T($){let _=new Wv({check:"describe"});return _._zod.onattach=[(I)=>{let J=zU.get(I)??{};zU.add(I,{...J,description:$})}],_._zod.check=()=>{},_}function jT($){let _=new Wv({check:"meta"});return _._zod.onattach=[(I)=>{let J=zU.get(I)??{};zU.add(I,{...J,...$})}],_._zod.check=()=>{},_}function UT($,_){let I=m$(_),J=I.truthy??["true","1","yes","on","y","enabled"],j=I.falsy??["false","0","no","off","n","disabled"];if(I.case!=="sensitive")J=J.map((S)=>typeof S==="string"?S.toLowerCase():S),j=j.map((S)=>typeof S==="string"?S.toLowerCase():S);let G=new Set(J),X=new Set(j),W=$.Codec??s5,T=$.Boolean??o5,E=new($.String??C8)({type:"string",error:I.error}),D=new T({type:"boolean",error:I.error}),q=new W({type:"pipe",in:E,out:D,transform:(S,k)=>{let y=S;if(I.case!=="sensitive")y=y.toLowerCase();if(G.has(y))return!0;else if(X.has(y))return!1;else return k.issues.push({code:"invalid_value",expected:"stringbool",values:[...G,...X],input:k.value,inst:q,continue:!1}),{}},reverseTransform:(S,k)=>{if(S===!0)return J[0]||"true";else return j[0]||"false"},error:I.error});return q._zod.bag.truthy=J,q._zod.bag.falsy=j,q._zod.bag.case=I.case??"insensitive",q}function f8($,_,I,J={}){let j=m$(J),G={check:"string_format",type:"string",format:_,fn:typeof I==="function"?I:(W)=>I.test(W),...j};if(I instanceof RegExp)G.pattern=I;return new $(G)}function OL($,..._){for(let I of _)for(let J of Reflect.ownKeys(I))if(Object.prototype.propertyIsEnumerable.call(I,J))QU($,J,I[J]);return $}function $Q($){let _=$?.target??"draft-2020-12";if(_==="draft-4")_="draft-04";if(_==="draft-7")_="draft-07";return{processors:$.processors??{},metadataRegistry:$?.metadata??zU,target:_,unrepresentable:$?.unrepresentable??"throw",override:$?.override??(()=>{}),io:$?.io??"output",counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:$?.cycles??"ref",reused:$?.reused??"inline",intersections:[],deferred:[],external:$?.external??void 0}}function Fj($,_,I,J,j){let G=typeof _.unrepresentable==="function"?_.unrepresentable({zodSchema:$,path:J.path,message:j}):_.unrepresentable;if(G==="any")return!1;if(G===void 0||G==="throw")throw Error(j);return Object.assign(I,G),!0}function vv($,_,I={path:[],schemaPath:[]}){var J;let j=$._zod.def,G=_.seen.get($);if(G){if(G.count++,I.schemaPath.includes($))G.cycle=I.path;return G.schema}let X={schema:{},count:1,cycle:void 0,path:I.path};_.seen.set($,X),_.sharedDefsExtractedFor=void 0,_.sharedEmitDoneFor=void 0;let W=$._zod.toJSONSchema?.();if(W)X.schema=W;else{let E={...I,schemaPath:[...I.schemaPath,$],path:I.path};if($._zod.processJSONSchema)$._zod.processJSONSchema(_,X.schema,E);else{let q=X.schema,S=_.processors[j.type];if(!S)throw Error(`[toJSONSchema]: Non-representable type encountered: ${j.type}`);S($,_,q,E)}let D=$._zod.parent;if(D){if(!X.ref)X.ref=D;vv(D,_,E),_.seen.get(D).isParent=!0}}let T=_.metadataRegistry.get($);if(T)OL(X.schema,T);if(_.io==="input"&&I6($))delete X.schema.examples,delete X.schema.default;if(_.io==="input"&&"_prefault"in X.schema)(J=X.schema).default??(J.default=X.schema._prefault);return delete X.schema._prefault,_.seen.get($).schema}function LS($){return $.replace(/~/g,"~0").replace(/\//g,"~1")}function vQ($,_){let I=$.seen.get(_);if(!I)throw Error("Unprocessed schema. This is a bug in Zod.");if($.external&&$.sharedDefsExtractedFor===$.external)return;let J=new Map;for(let X of $.seen.entries()){let W=$.metadataRegistry.get(X[0])?.id;if(W){let T=J.get(W);if(T&&T!==X[0])throw Error(`Duplicate schema id "${W}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);J.set(W,X[0])}}let j=(X)=>{let W=$.target==="draft-2020-12"?"$defs":"definitions";if($.external){let D=$.external.registry.get(X[0])?.id,q=$.external.uri??((k)=>k);if(D)return{ref:q(D)};let S=X[1].defId??X[1].schema.id??`schema${$.counter++}`;return X[1].defId=S,{defId:S,ref:`${q("__shared")}#/${W}/${LS(S)}`}}let T="#",F=`${T}/${W}/`;if(X[1]===I&&!X[1].schema.id)return{ref:T};let E=X[1].schema.id??`__schema${$.counter++}`;return{defId:E,ref:F+LS(E)}},G=(X)=>{if(X[1].schema.$ref)return;let W=X[1],{ref:T,defId:F}=j(X);if(W.def={...W.schema},F)W.defId=F;let E=W.schema;for(let D in E)delete E[D];E.$ref=T};if($.cycles==="throw")for(let X of $.seen.entries()){let W=X[1];if(W.cycle)throw Error(`Cycle detected: #/${W.cycle?.join("/")}/<root>
514
514
 
515
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let X of $.seen.entries()){let W=X[1];if(_===X[0]){G(X);continue}if($.external){let F=$.external.registry.get(X[0])?.id;if(_!==X[0]&&F){G(X);continue}}if($.metadataRegistry.get(X[0])?.id){G(X);continue}if(W.cycle){G(X);continue}if(W.count>1){if($.reused==="ref")G(X)}}if($.external)$.sharedDefsExtractedFor=$.external}function KS($){let _=$.anyOf;if(!Array.isArray(_)||_.length===0||$.type!==void 0)return;let I=[];for(let J of _){if(!J||typeof J!=="object")return;KS(J);let j=Object.keys(J);if(j.length!==1||j[0]!=="type")return;let G=J.type;for(let X of Array.isArray(G)?G:[G]){if(typeof X!=="string")return;if(!I.includes(X))I.push(X)}}delete $.anyOf,$.type=I.length===1?I[0]:I}var HS=new Set(["type","properties","required","additionalProperties"]),WS=["oneOf","anyOf"];function DS($){let _=$.additionalProperties;if(_===void 0||_===!1||typeof _!=="object"||_===null)return null;return Object.keys(_).length?_:null}function IT($){let _=[];for(let G of $){if(typeof G!=="object"||G.type!=="object")return null;for(let X in G)if(!HS.has(X))return null;_.push(G)}let I={},J=new Set;for(let G of _){for(let X in G.properties){if(Object.prototype.hasOwnProperty.call(I,X))continue;let W=[];for(let F of _){let E=F.properties?.[X]??DS(F);if(E===null||E===void 0)continue;if(!W.some((D)=>JSON.stringify(D)===JSON.stringify(E)))W.push(E)}let T=W.length===1?W[0]:IT(W)??{allOf:W};QU(I,X,T)}for(let X of G.required??[])J.add(X)}let j={type:"object",properties:I};if(J.size)j.required=[...J];if(_.every((G)=>G.additionalProperties===!1))j.additionalProperties=!1;else{let G=[];for(let X of _){let W=DS(X);if(W&&!G.some((T)=>JSON.stringify(T)===JSON.stringify(W)))G.push(W)}if(G.length===1)j.additionalProperties=G[0];else if(G.length>1)j.additionalProperties={allOf:G}}return j}function Jd($){let _=$.allOf;if(!Array.isArray(_)||_.length<2)return;for(let j of HS)if(j in $)return;let I=_.filter((j)=>WS.some((G)=>Array.isArray(j[G]))),J=null;if(!I.length)J=IT(_);else{let j=I[0],G=WS.find((T)=>Array.isArray(j[T]));if(Object.keys(j).length!==1)return;let X=_.filter((T)=>T!==j),W=j[G].map((T)=>IT([...X,T]));if(W.some((T)=>!T))return;J={[G]:W}}if(!J)return;delete $.allOf,OL($,J)}function _Q($,_){let I=$.seen.get(_);if(!I)throw Error("Unprocessed schema. This is a bug in Zod.");let J=(W)=>{let T=$.seen.get(W);if(T.ref===null)return;let F=T.def??T.schema,E={...F},D=T.ref;if(T.ref=null,D){J(D);let S=$.seen.get(D),k=S.schema;if(k.$ref&&($.target==="draft-07"||$.target==="draft-04"||$.target==="openapi-3.0"))F.allOf=F.allOf??[],F.allOf.push(k);else OL(F,k);if(OL(F,E),W._zod.parent===D)for(let m in F){if(m==="$ref"||m==="allOf")continue;if(!(m in E))delete F[m]}if(k.$ref&&S.def)for(let m in F){if(m==="$ref"||m==="allOf")continue;if(m in S.def&&JSON.stringify(F[m])===JSON.stringify(S.def[m]))delete F[m]}}let q=W._zod.parent;if(q&&q!==D){J(q);let S=$.seen.get(q);if(S?.schema.$ref){if(F.$ref=S.schema.$ref,S.def)for(let k in F){if(k==="$ref"||k==="allOf")continue;if(k in S.def&&JSON.stringify(F[k])===JSON.stringify(S.def[k]))delete F[k]}}}$.override({zodSchema:W,jsonSchema:F,path:T.path??[]})};if(!$.external||$.sharedEmitDoneFor!==$.external){for(let W of[...$.seen.entries()].reverse())J(W[0]);if($.target!=="openapi-3.0")for(let W of $.seen.entries())KS(W[1].def??W[1].schema);for(let W of $.deferred)W();if($.intersections.length){let W=new Map;for(let T of $.seen.values())for(let F of[T.schema,T.def]){let E=F?.allOf;if(!Array.isArray(E))continue;let D=W.get(E);if(D)D.push(F);else W.set(E,[F])}for(let T of $.intersections)for(let F of W.get(T)??[])Jd(F)}}let j={};if($.target==="draft-2020-12")j.$schema="https://json-schema.org/draft/2020-12/schema";else if($.target==="draft-07")j.$schema="http://json-schema.org/draft-07/schema#";else if($.target==="draft-04")j.$schema="http://json-schema.org/draft-04/schema#";else if($.target==="openapi-3.0");if($.external?.uri){let W=$.external.registry.get(_)?.id;if(!W)throw Error("Schema is missing an `id` property");j.$id=$.external.uri(W)}OL(j,I.defId?I.schema:I.def??I.schema);let G=$.metadataRegistry.get(_)?.id;if(G!==void 0&&j.id===G)delete j.id;let X=$.external?.defs??{};if(!$.external||$.sharedEmitDoneFor!==$.external)for(let W of $.seen.entries()){let T=W[1];if(T.def&&T.defId){if(T.def.id===T.defId)delete T.def.id;QU(X,T.defId,T.def)}}if($.external)$.sharedEmitDoneFor=$.external;if($.external);else if(Object.keys(X).length>0)if($.target==="draft-2020-12")j.$defs=X;else j.definitions=X;try{let W=JSON.parse(JSON.stringify(j));return Object.defineProperty(W,"~standard",{value:{..._["~standard"],jsonSchema:{input:mZ(_,"input",$.processors),output:mZ(_,"output",$.processors)}},enumerable:!1,writable:!1}),W}catch(W){throw Error("Error converting schema to JSON.")}}function I6($,_){let I=_??{seen:new Set};if(I.seen.has($))return!1;I.seen.add($);let J=$._zod.def;if(J.type==="transform")return!0;if(J.type==="array")return I6(J.element,I);if(J.type==="set")return I6(J.valueType,I);if(J.type==="lazy")return I6(J.getter(),I);if(J.type==="promise"||J.type==="optional"||J.type==="nonoptional"||J.type==="nullable"||J.type==="readonly"||J.type==="default"||J.type==="prefault"||J.type==="catch")return I6(J.innerType,I);if(J.type==="intersection")return I6(J.left,I)||I6(J.right,I);if(J.type==="record"||J.type==="map")return I6(J.keyType,I)||I6(J.valueType,I);if(J.type==="pipe"){if($._zod.traits.has("$ZodCodec"))return!0;return I6(J.in,I)||I6(J.out,I)}if(J.type==="object"){for(let j in J.shape)if(I6(J.shape[j],I))return!0;return!1}if(J.type==="union"){for(let j of J.options)if(I6(j,I))return!0;return!1}if(J.type==="tuple"){for(let j of J.items)if(I6(j,I))return!0;if(J.rest&&I6(J.rest,I))return!0;return!1}return!1}var XT=($,_={})=>(I)=>{let J=$Q({...I,processors:_});return vv($,J),vQ(J,$),_Q(J,$)},mZ=($,_,I={})=>(J)=>{let{libraryOptions:j,target:G}=J??{},X=$Q({...j??{},target:G,io:_,processors:I});return vv($,X),vQ(X,$),_Q(X,$)};var uZ=($,_,I)=>{if($[_]===void 0||I>$[_])$[_]=I},nZ=($,_,I)=>{if($[_]===void 0||I<$[_])$[_]=I},FS=($,_)=>{uZ($,"minimum",_),nZ($,"maximum",_)},VS=($,_)=>{if($.multipleOf??($.multipleOf=[]),!$.multipleOf.includes(_))$.multipleOf.push(_)},TS=($,_)=>{$.patterns??($.patterns=new Set),$.patterns.add(_)},RS=($,_)=>{$.mime=$.mime?$.mime.filter((I)=>_.includes(I)):[..._]},PS=($,_)=>{if($.format=_,_.includes("int"))$.isInt=!0},AS=($,_)=>uZ($,"minimum",_.minimum),MS=($,_)=>nZ($,"maximum",_.maximum),ES=($)=>(_,I)=>{PS(_,I.format);let[J,j]=$[I.format];uZ(_,"minimum",J),nZ(_,"maximum",j)},Qd={greater_than:($,_)=>uZ($,_.inclusive?"minimum":"exclusiveMinimum",_.value),less_than:($,_)=>nZ($,_.inclusive?"maximum":"exclusiveMaximum",_.value),multiple_of:($,_)=>VS($,_.value),number_format:ES(B5),bigint_format:ES(S5),min_length:AS,max_length:MS,length_equals:($,_)=>FS($,_.length),min_size:AS,max_size:MS,size_equals:($,_)=>FS($,_.size),string_format:($,_)=>{if(PS($,_.format),_.pattern)TS($,_.pattern);if(_.format==="base64"||_.format==="base64url")$.contentEncoding=_.format;if(_.local||_.precision===-1)$.laxFormat=!0},mime_type:($,_)=>RS($,_.mime)};function Aj($){let _={},I=$._zod.def,J=$._zod.traits.has("$ZodCheck")?[$,...I.checks??[]]:I.checks??[];for(let G of J)Qd[G._zod.def.check]?.(_,G._zod.def);let j=$._zod.bag;if(j.minimum!==void 0)uZ(_,"minimum",j.minimum);if(j.exclusiveMinimum!==void 0)uZ(_,"exclusiveMinimum",j.exclusiveMinimum);if(j.maximum!==void 0)nZ(_,"maximum",j.maximum);if(j.exclusiveMaximum!==void 0)nZ(_,"exclusiveMaximum",j.exclusiveMaximum);if(j.multipleOf!==void 0)VS(_,j.multipleOf);if(j.format!==void 0){if(_.format??(_.format=j.format),j.format.includes("int"))_.isInt=!0}if(j.mime)RS(_,j.mime);for(let G of j.patterns??[])TS(_,G);return _}var zd={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Zd=new Map([[UD,XM],[t5,GM]]),qS=($)=>Zd.get($)??$,JT=($,_,I,J)=>{let j=I;j.type="string";let{minimum:G,maximum:X,format:W,patterns:T,contentEncoding:F,laxFormat:E}=Aj($);if(typeof G==="number")j.minLength=G;if(typeof X==="number")j.maxLength=X;if(W){if(j.format=zd[W]??W,j.format==="")delete j.format;if(W==="time"||E)delete j.format}if(F)j.contentEncoding=F;if(T&&T.size>0){let D=[...T].map(qS);if(D.length===1)j.pattern=D[0].source;else if(D.length>1)j.allOf=[...D.map((q)=>({..._.target==="draft-07"||_.target==="draft-04"||_.target==="openapi-3.0"?{type:"string"}:{},pattern:q.source}))]}},QT=($,_,I,J)=>{let j=I,{minimum:G,maximum:X,multipleOf:W,exclusiveMaximum:T,exclusiveMinimum:F,isInt:E}=Aj($);j.type=E?"integer":"number";let D=typeof F==="number"&&F>=(G??Number.NEGATIVE_INFINITY),q=typeof T==="number"&&T<=(X??Number.POSITIVE_INFINITY),S=_.target==="draft-04"||_.target==="openapi-3.0";if(D)if(S)j.minimum=F,j.exclusiveMinimum=!0;else j.exclusiveMinimum=F;else if(typeof G==="number")j.minimum=G;if(q)if(S)j.maximum=T,j.exclusiveMaximum=!0;else j.exclusiveMaximum=T;else if(typeof X==="number")j.maximum=X;if(W){let k=new Set;for(let n of W)if(Number.isFinite(n)&&n!==0)k.add(Math.abs(n));else Fj($,_,j,J,`A multipleOf divisor of ${n} cannot be represented in JSON Schema`);let[y,...m]=k;if(y!==void 0)j.multipleOf=y;if(m.length)j.allOf=[...j.allOf??[],...m.map((n)=>({multipleOf:n}))]}},zT=($,_,I,J)=>{I.type="boolean"},ZT=($,_,I,J)=>{Fj($,_,I,J,"BigInt cannot be represented in JSON Schema")},OT=($,_,I,J)=>{Fj($,_,I,J,"Symbols cannot be represented in JSON Schema")},LT=($,_,I,J)=>{if(_.target==="openapi-3.0")I.type="string",I.nullable=!0,I.enum=[null];else I.type="null"},WT=($,_,I,J)=>{Fj($,_,I,J,"Undefined cannot be represented in JSON Schema")},DT=($,_,I,J)=>{Fj($,_,I,J,"Void cannot be represented in JSON Schema")},KT=($,_,I,J)=>{I.not={}},HT=($,_,I,J)=>{},FT=($,_,I,J)=>{},AT=($,_,I,J)=>{Fj($,_,I,J,"Date cannot be represented in JSON Schema")},MT=($,_,I,J)=>{let j=$._zod.def,G=OZ(j.entries);if(G.length===0){I.not={};return}if(G.every((X)=>typeof X==="number"))I.type="number";if(G.every((X)=>typeof X==="string"))I.type="string";I.enum=G},ET=($,_,I,J)=>{let j=$._zod.def;if(j.values.length===0){I.not={};return}let G=[];for(let X of j.values)if(X===void 0){if(Fj($,_,I,J,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof X==="bigint"){if(Fj($,_,I,J,"BigInt literals cannot be represented in JSON Schema"))return;G.push(Number(X))}else G.push(X);if(G.length===0);else if(G.length===1){let X=G[0];if(I.type=X===null?"null":typeof X,_.target==="draft-04"||_.target==="openapi-3.0")I.enum=[X];else I.const=X}else{if(G.every((X)=>typeof X==="number"))I.type="number";if(G.every((X)=>typeof X==="string"))I.type="string";if(G.every((X)=>typeof X==="boolean"))I.type="boolean";if(G.every((X)=>X===null))I.type="null";I.enum=G}},VT=($,_,I,J)=>{Fj($,_,I,J,"NaN cannot be represented in JSON Schema")},TT=($,_,I,J)=>{let j=I,G=$._zod.pattern;if(!G)throw Error("Pattern not found in template literal");j.type="string",j.pattern=G.source},RT=($,_,I,J)=>{let j=I;j.type="string",j.format="binary",j.contentEncoding="binary";let{minimum:G,maximum:X,mime:W}=Aj($);if(G!==void 0)j.minLength=G;if(X!==void 0)j.maxLength=X;if(!W)return;if(W.length===0)j.not={};else if(W.length===1)j.contentMediaType=W[0];else j.anyOf=W.map((T)=>({contentMediaType:T}))},PT=($,_,I,J)=>{I.type="boolean"},qT=($,_,I,J)=>{Fj($,_,I,J,"Custom types cannot be represented in JSON Schema")},gT=($,_,I,J)=>{Fj($,_,I,J,"Function types cannot be represented in JSON Schema")},CT=($,_,I,J)=>{Fj($,_,I,J,"Transforms cannot be represented in JSON Schema")},wT=($,_,I,J)=>{Fj($,_,I,J,"Map cannot be represented in JSON Schema")},NT=($,_,I,J)=>{Fj($,_,I,J,"Set cannot be represented in JSON Schema")},BT=($,_,I,J)=>{let j=I,G=$._zod.def,{minimum:X,maximum:W}=Aj($);if(typeof X==="number")j.minItems=X;if(typeof W==="number")j.maxItems=W;j.type="array",j.items=vv(G.element,_,{...J,path:[...J.path,"items"]})};function LL($){let _=$._zod.def;if(_.type==="pipe"&&_.in._zod.traits.has("$ZodTransform"))return LL(_.out);if(_.type==="catch")return LL(_.innerType);return $._zod.optin}var ST=($,_,I,J)=>{let j=I,G=$._zod.def,X=G.shape;if(Object.getOwnPropertySymbols(X).length&&Fj($,_,j,J,"Symbol keys cannot be represented in JSON Schema"))return;j.type="object",j.properties={};for(let F in X)QU(j.properties,F,vv(X[F],_,{...J,path:[...J.path,"properties",F]}));let T=[];for(let F of Object.keys(X)){let E=G.shape[F];if(_.io==="input"?LL(E)===void 0:E._zod.optout===void 0)T.push(F)}if(T.length>0)j.required=T;if(G.catchall?._zod.def.type==="never")j.additionalProperties=!1;else if(!G.catchall){if(_.io==="output")j.additionalProperties=!1}else if(G.catchall)j.additionalProperties=vv(G.catchall,_,{...J,path:[...J.path,"additionalProperties"]})},oD=($,_,I,J)=>{let j=$._zod.def,G=j.inclusive===!1,X=j.options.map((W,T)=>vv(W,_,{...J,path:[...J.path,G?"oneOf":"anyOf",T]}));if(G)I.oneOf=X;else I.anyOf=X},kT=($,_,I,J)=>{let j=$._zod.def,G=vv(j.left,_,{...J,path:[...J.path,"allOf",0]}),X=vv(j.right,_,{...J,path:[...J.path,"allOf",1]}),W=(F)=>("allOf"in F)&&Object.keys(F).length===1,T=[...W(G)?G.allOf:[G],...W(X)?X.allOf:[X]];I.allOf=T,_.intersections.push(T)},cT=($,_,I,J)=>{let j=I,G=$._zod.def;j.type="array";let X=_.target==="draft-2020-12"?"prefixItems":"items",W=_.target==="draft-2020-12"?"items":_.target==="openapi-3.0"?"items":"additionalItems",T=G.items.map((y,m)=>vv(y,_,{...J,path:[...J.path,X,m]})),F=G.rest?vv(G.rest,_,{...J,path:[...J.path,W,..._.target==="openapi-3.0"?[G.items.length]:[]]}):null,E=G.items.length;while(E>0){let y=G.items[E-1];if(!(_.io==="input"?LL(y)!==void 0:y._zod.optout==="optional"))break;E--}let D=G.items.length,q=!G.rest;if(_.target==="draft-2020-12"){if(j.prefixItems=T,q)j.items=!1;else if(F)j.items=F;if(E>0)j.minItems=E;if(q)j.maxItems=D}else if(_.target==="openapi-3.0"){if(j.items={anyOf:T},F)j.items.anyOf.push(F);if(E>0)j.minItems=E;if(q)j.maxItems=D}else{if(j.items=T,q)j.additionalItems=!1;else if(F)j.additionalItems=F;if(E>0)j.minItems=E;if(q)j.maxItems=D}let{minimum:S,maximum:k}=Aj($);if(typeof S==="number")j.minItems=S;if(typeof k==="number")j.maxItems=k};function GT($,_,I){if(_.$ref){if(I.has(_))return _;I.add(_);let k=$.get(_)?.def;if(!k)return _;let y=GT($,k,I);return y===k?_:y}for(let k of["anyOf","oneOf"]){let y=_[k];if(!Array.isArray(y))continue;let m=y.map((n)=>GT($,n,I));if(m.some((n,h)=>n!==y[h]))_={..._,[k]:m}}let J=Array.isArray(_.type)?_.type:[_.type],j=!J.includes("string")&&J.some((k)=>k==="number"||k==="integer"),G=_.enum??(_.const!==void 0?[_.const]:void 0);if(!j&&!G?.some((k)=>typeof k==="number"))return _;let{minimum:X,maximum:W,exclusiveMinimum:T,exclusiveMaximum:F,multipleOf:E,format:D,id:q,...S}=_;if(S.enum)S.enum=S.enum.map((k)=>typeof k==="number"?String(k):k);else if(typeof S.const==="number")S.const=String(S.const);if(!j)return S;if(S.type="string",!G)S.pattern=(J.includes("number")?LG:u5).source;return S}var YT=new WeakMap;function Od($){let _=new Map;for(let J of $.seen.values())if(J.def&&!_.has(J.schema))_.set(J.schema,J);let I=new Map;for(let J of YT.get($)??[]){let j=$.seen.get(J),G=(j?.def??j?.schema)?.propertyNames;if(!G||G===!0||I.has(G))continue;let X=GT(_,G,new Set);if(X!==G)I.set(G,X)}if(!I.size)return;for(let J of $.seen.values())for(let j of[J.schema,J.def]){let G=j&&I.get(j.propertyNames);if(G)j.propertyNames=G}}var xT=($,_,I,J)=>{let j=I,G=$._zod.def;j.type="object";let X=G.keyType,W=Aj(X).patterns;if(G.mode==="loose"&&W&&W.size>0){let E=vv(G.valueType,_,{...J,path:[...J.path,"patternProperties","*"]});j.patternProperties={};for(let D of W)QU(j.patternProperties,qS(D).source,E)}else{if(_.target==="draft-07"||_.target==="draft-2020-12"){j.propertyNames=vv(G.keyType,_,{...J,path:[...J.path,"propertyNames"]});let E=YT.get(_);if(!E)E=[],YT.set(_,E),_.deferred.push(()=>Od(_));E.push($)}j.additionalProperties=vv(G.valueType,_,{...J,path:[...J.path,"additionalProperties"]})}let T=X._zod.values,F=_.io==="input"&&LL(G.valueType)!==void 0;if(T&&!G.partial&&!F){let E=[...T].filter((D)=>typeof D==="string"||typeof D==="number");if(E.length>0)j.required=E.map(String)}},fT=($,_,I,J)=>{let j=$._zod.def,G=vv(j.innerType,_,J),X=_.seen.get($);if(_.target==="openapi-3.0")X.ref=j.innerType,I.nullable=!0;else I.anyOf=[G,{type:"null"}]},yT=($,_,I,J)=>{let j=$._zod.def;vv(j.innerType,_,J);let G=_.seen.get($);G.ref=j.innerType},bT=Symbol();function gS($,_,I,J,j){let G=!1,X=JSON.stringify($,(W,T)=>{if(typeof T!=="bigint")return T;return G=!0,null});if(!G)return JSON.parse(X);return Fj(_,I,J,j,"BigInt defaults cannot be represented in JSON Schema"),bT}var hT=($,_,I,J)=>{let j=$._zod.def;vv(j.innerType,_,J);let G=_.seen.get($);G.ref=j.innerType;let X=gS(j.defaultValue,$,_,I,J);if(X!==bT)I.default=X},mT=($,_,I,J)=>{let j=$._zod.def;vv(j.innerType,_,J);let G=_.seen.get($);if(G.ref=j.innerType,_.io!=="input")return;let X=gS(j.defaultValue,$,_,I,J);if(X!==bT)I._prefault=X},uT=($,_,I,J)=>{let j=$._zod.def;vv(j.innerType,_,J);let G=_.seen.get($);G.ref=j.innerType;let X;try{X=j.catchValue(void 0)}catch{Fj($,_,I,J,"Dynamic catch values are not supported in JSON Schema");return}I.default=X},nT=($,_,I,J)=>{let j=$._zod.def,G=j.in._zod.traits.has("$ZodTransform"),X=_.io==="input"?G?j.out:j.in:j.out;vv(X,_,J);let W=_.seen.get($);W.ref=X},iT=($,_,I,J)=>{let j=$._zod.def;vv(j.innerType,_,J);let G=_.seen.get($);G.ref=j.innerType,I.readOnly=!0},pT=($,_,I,J)=>{let j=$._zod.def;vv(j.innerType,_,J);let G=_.seen.get($);G.ref=j.innerType},aD=($,_,I,J)=>{let j=$._zod.def;vv(j.innerType,_,J);let G=_.seen.get($);G.ref=j.innerType},lT=($,_,I,J)=>{let j=$._zod.innerType;vv(j,_,J);let G=_.seen.get($);G.ref=j},tD={string:JT,number:QT,boolean:zT,bigint:ZT,symbol:OT,null:LT,undefined:WT,void:DT,never:KT,any:HT,unknown:FT,date:AT,enum:MT,literal:ET,nan:VT,template_literal:TT,file:RT,success:PT,custom:qT,function:gT,transform:CT,map:wT,set:NT,array:BT,object:ST,union:oD,intersection:kT,tuple:cT,record:xT,nullable:fT,nonoptional:yT,default:hT,prefault:mT,catch:uT,pipe:nT,readonly:iT,promise:pT,optional:aD,lazy:lT};function sD($,_){if("_idmap"in $){let J=$,j=$Q({..._,processors:tD}),G={};for(let T of J._idmap.entries()){let[F,E]=T;vv(E,j)}let X={},W={registry:J,uri:_?.uri,defs:G};j.external=W;for(let T of J._idmap.entries()){let[F,E]=T;vQ(j,E),QU(X,F,_Q(j,E))}if(Object.keys(G).length>0){let T=j.target==="draft-2020-12"?"$defs":"definitions";X.__shared={[T]:G}}return{schemas:X}}let I=$Q({..._,processors:tD});return vv($,I),vQ(I,$),_Q(I,$)}class dT{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter($){this.ctx.counter=$}get seen(){return this.ctx.seen}constructor($){let _=$?.target??"draft-2020-12";if(_==="draft-4")_="draft-04";if(_==="draft-7")_="draft-07";this.ctx=$Q({processors:tD,target:_,...$?.metadata&&{metadata:$.metadata},...$?.unrepresentable&&{unrepresentable:$.unrepresentable},...$?.override&&{override:$.override},...$?.io&&{io:$.io}})}process($,_={path:[],schemaPath:[]}){return vv($,this.ctx,_)}emit($,_){if(_){if(_.cycles)this.ctx.cycles=_.cycles;if(_.reused)this.ctx.reused=_.reused;if(_.external)this.ctx.external=_.external}this.ctx.sharedDefsExtractedFor=void 0,this.ctx.sharedEmitDoneFor=void 0,vQ(this.ctx,$);let I=_Q(this.ctx,$),{"~standard":J,...j}=I;return j}}var CS={};var aZ={};_j(aZ,{xor:()=>R3,xid:()=>pS,void:()=>F3,uuidv7:()=>fS,uuidv6:()=>xS,uuidv4:()=>cS,uuid:()=>kS,url:()=>yS,unknown:()=>y8,union:()=>oZ,undefined:()=>K3,ulid:()=>iS,uint64:()=>W3,uint32:()=>Z3,tuple:()=>RR,transform:()=>TK,templateLiteral:()=>b3,symbol:()=>D3,superRefine:()=>sR,success:()=>c3,stringbool:()=>d3,stringFormat:()=>U3,string:()=>WL,strictObject:()=>V3,set:()=>w3,refine:()=>aR,record:()=>PR,readonly:()=>pR,promise:()=>h3,preprocess:()=>t3,prefault:()=>fR,pipe:()=>_K,partialRecord:()=>q3,optional:()=>b8,object:()=>E3,number:()=>JR,nullish:()=>k3,nullable:()=>DL,null:()=>LR,nonoptional:()=>yR,never:()=>EK,nativeEnum:()=>N3,nanoid:()=>mS,nan:()=>x3,meta:()=>p3,map:()=>C3,mac:()=>rS,looseRecord:()=>g3,looseObject:()=>T3,literal:()=>B3,lazy:()=>rR,ksuid:()=>lS,keyof:()=>M3,jwt:()=>j3,json:()=>r3,ipv6:()=>tS,ipv4:()=>dS,invertCodec:()=>y3,intersection:()=>VR,int64:()=>L3,int32:()=>z3,int:()=>vK,instanceof:()=>l3,iban:()=>_3,httpUrl:()=>bS,hostname:()=>I3,hex:()=>X3,hash:()=>Y3,guid:()=>SS,function:()=>m3,float64:()=>Q3,float32:()=>J3,file:()=>S3,exactOptional:()=>BR,enum:()=>VK,emoji:()=>hS,email:()=>BS,e164:()=>$3,discriminatedUnion:()=>P3,describe:()=>i3,date:()=>A3,custom:()=>n3,currencyCode:()=>G3,cuid2:()=>nS,cuid:()=>uS,creditCard:()=>v3,codec:()=>f3,cidrv6:()=>aS,cidrv4:()=>oS,check:()=>u3,catch:()=>mR,boolean:()=>QR,bigint:()=>O3,base64url:()=>eS,base64:()=>sS,array:()=>FL,any:()=>H3,_function:()=>m3,_default:()=>cR,_ZodString:()=>jK,ZodXor:()=>AR,ZodXID:()=>zK,ZodVoid:()=>HR,ZodUnknown:()=>DR,ZodUnion:()=>ML,ZodUndefined:()=>ZR,ZodUUID:()=>FG,ZodURL:()=>KL,ZodULID:()=>QK,ZodType:()=>x1,ZodTuple:()=>TR,ZodTransform:()=>NR,ZodTemplateLiteral:()=>lR,ZodSymbol:()=>zR,ZodSuccess:()=>bR,ZodStringFormat:()=>Xv,ZodString:()=>lZ,ZodSet:()=>gR,ZodRecord:()=>iZ,ZodReadonly:()=>iR,ZodPromise:()=>tR,ZodPreprocess:()=>nR,ZodPrefault:()=>xR,ZodPipe:()=>VL,ZodOptional:()=>EL,ZodObject:()=>AL,ZodNumberFormat:()=>u8,ZodNumber:()=>dZ,ZodNullable:()=>SR,ZodNull:()=>OR,ZodNonOptional:()=>PK,ZodNever:()=>KR,ZodNanoID:()=>GK,ZodNaN:()=>uR,ZodMap:()=>qR,ZodMAC:()=>XR,ZodLiteral:()=>CR,ZodLazy:()=>dR,ZodKSUID:()=>ZK,ZodJWT:()=>AK,ZodIntersection:()=>ER,ZodInstanceOf:()=>eR,ZodISOTime:()=>IQ,ZodISODuration:()=>XQ,ZodISODateTime:()=>jQ,ZodISODate:()=>UQ,ZodIPv6:()=>LK,ZodIPv4:()=>OK,ZodIBAN:()=>YR,ZodGUID:()=>IK,ZodFunction:()=>oR,ZodFile:()=>wR,ZodExactOptional:()=>RK,ZodEnum:()=>pZ,ZodEmoji:()=>XK,ZodEmail:()=>UK,ZodE164:()=>FK,ZodDiscriminatedUnion:()=>MR,ZodDefault:()=>kR,ZodDate:()=>HL,ZodCustomStringFormat:()=>m8,ZodCustom:()=>RL,ZodCreditCard:()=>GR,ZodCodec:()=>TL,ZodCatch:()=>hR,ZodCUID2:()=>JK,ZodCUID:()=>YK,ZodCIDRv6:()=>DK,ZodCIDRv4:()=>WK,ZodBoolean:()=>rZ,ZodBigIntFormat:()=>MK,ZodBigInt:()=>tZ,ZodBase64URL:()=>HK,ZodBase64:()=>KK,ZodArray:()=>FR,ZodAny:()=>WR});var eD={};_j(eD,{uppercase:()=>wZ,trim:()=>fZ,toUpperCase:()=>bZ,toLowerCase:()=>yZ,startsWith:()=>BZ,slugify:()=>hZ,size:()=>k8,regex:()=>gZ,property:()=>rD,properties:()=>kZ,positive:()=>iD,overwrite:()=>JX,normalize:()=>xZ,nonpositive:()=>lD,nonnegative:()=>dD,negative:()=>pD,multipleOf:()=>sJ,minSize:()=>HG,minLength:()=>qY,mime:()=>cZ,maxSize:()=>eJ,maxLength:()=>c8,lte:()=>A4,lt:()=>DG,lowercase:()=>CZ,length:()=>x8,includes:()=>NZ,gte:()=>M4,gt:()=>KG,endsWith:()=>SZ});var wS=new WeakSet([Object.prototype,Error.prototype]);function $K($,_,I){Object.defineProperty($,_,{configurable:!0,enumerable:!1,get(){let J=I(this);return Object.defineProperty(this,_,{value:J,configurable:!0,writable:!0}),J},set(J){Object.defineProperty(this,_,{value:J,configurable:!0,writable:!0})}})}var NS=($,_)=>{hA.init($,_),$.name="ZodError";let I=Object.getPrototypeOf($);if(wS.has(I))return;wS.add(I),$K(I,"format",(J)=>(j)=>y5(J,j)),$K(I,"flatten",(J)=>(j)=>f5(J,j)),$K(I,"addIssue",(J)=>(j)=>{J.issues.push(j),J.message=JSON.stringify(J.issues,LZ,2)}),$K(I,"addIssues",(J)=>(j)=>{J.issues.push(...j),J.message=JSON.stringify(J.issues,LZ,2)}),Object.defineProperty(I,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}})},Wd=J$("ZodError",NS),f6=J$("ZodError",NS,void 0,{Parent:Error});var rT=HZ(f6),tT=FZ(f6),oT=AZ(f6),aT=MZ(f6),sT=c9(f6),eT=x9(f6),$R=f9(f6),vR=y9(f6),_R=b9(f6),jR=h9(f6),UR=m9(f6),IR=u9(f6);function Kd(){if(!hj.localeError)R_(jL())}function h8(){if(!hj.memoizer)R_({memoizer:_L()})}var x1=J$("ZodType",($,_)=>{return Kd(),P1.init($,_),$.def=_,$.type=_.type,$},{check(...$){let _=this.def;return this.clone(w$.mergeDefs(_,{checks:[..._.checks??[],...$.map((I)=>typeof I==="function"?{_zod:{check:I,def:{check:"custom"},onattach:[]}}:I)]}),{parent:!0})},with(...$){return this.check(...$)},clone($,_){return e2(this,$,_)},brand(){return this},register($,_){return $.add(this,_),this},refine($,_){return this.check(aR($,_))},superRefine($,_){return this.check(sR($,_))},overwrite($){return this.check(JX($))},optional(){return b8(this)},exactOptional(){return BR(this)},nullable(){return DL(this)},nullish(){return b8(DL(this))},nonoptional($){return yR(this,$)},array(){return FL(this)},or($){return oZ([this,$])},and($){return VR(this,$)},transform($){return _K(this,TK($))},default($){return cR(this,$)},prefault($){return fR(this,$)},catch($){return mR(this,$)},pipe($){return _K(this,$)},readonly(){return pR(this)},describe($){let _=this.clone();return zU.add(_,{description:$}),_},meta(...$){if($.length===0)return zU.get(this);let _=this.clone();return zU.add(_,$[0]),_},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply($,..._){return _.length===0?$(this):$(this,..._)},get "~standard"(){return w$.hide(this,"~standard",{...e9(this),jsonSchema:{input:mZ(this,"input"),output:mZ(this,"output")}})},set "~standard"($){w$.own(this,"~standard",$)},parse:function $(_,I){return rT(this,_,I,{callee:$})},parseAsync:async function $(_,I){return await tT(this,_,I,{callee:$})},safeParse($,_){return oT(this,$,_)},async safeParseAsync($,_){return aT(this,$,_)},get spa(){return this?.safeParseAsync},set spa($){w$.own(this,"spa",$)},validate($,_){return b5(this,$,_)},validateAsync($,_){return h5(this,$,_)},encode:function $(_,I){return sT(this,_,I,{callee:$})},decode:function $(_,I){return eT(this,_,I,{callee:$})},encodeAsync:async function $(_,I){return await $R(this,_,I,{callee:$})},decodeAsync:async function $(_,I){return await vR(this,_,I,{callee:$})},safeEncode($,_){return _R(this,$,_)},safeDecode($,_){return jR(this,$,_)},async safeEncodeAsync($,_){return UR(this,$,_)},async safeDecodeAsync($,_){return IR(this,$,_)},toJSONSchema($){return XT(this,{})($)},get description(){return zU.get(this)?.description},get _def(){return this._zod.def}}),jK=J$("_ZodString",($,_)=>{C8.init($,_),x1.init($,_),$._zod.processJSONSchema=(I,J,j)=>JT($,I,J,j)},w$.derived({format:($)=>Aj($).format??null,minLength:($)=>Aj($).minimum??null,maxLength:($)=>Aj($).maximum??null},{regex(...$){return this.check(gZ(...$))},includes(...$){return this.check(NZ(...$))},startsWith(...$){return this.check(BZ(...$))},endsWith(...$){return this.check(SZ(...$))},min(...$){return this.check(qY(...$))},max(...$){return this.check(c8(...$))},length(...$){return this.check(x8(...$))},nonempty(...$){return this.check(qY(1,...$))},lowercase($){return this.check(CZ($))},uppercase($){return this.check(wZ($))},trim(){return this.check(fZ())},normalize(...$){return this.check(xZ(...$))},toLowerCase(){return this.check(yZ())},toUpperCase(){return this.check(bZ())},slugify(){return this.check(hZ())}})),lZ=J$("ZodString",($,_)=>{C8.init($,_),jK.init($,_)},{email($){return this.check(VD(UK,$))},url($){return this.check(YL(KL,$))},jwt($){return this.check(nD(AK,$))},emoji($){return this.check(CD(XK,$))},guid($){return this.check(TD(IK,$))},uuid($){return this.check(RD(FG,$))},uuidv4($){return this.check(PD(FG,$))},uuidv6($){return this.check(qD(FG,$))},uuidv7($){return this.check(gD(FG,$))},nanoid($){return this.check(wD(GK,$))},cuid($){return this.check(ND(YK,$))},cuid2($){return this.check(BD(JK,$))},ulid($){return this.check(SD(QK,$))},base64($){return this.check(hD(KK,$))},base64url($){return this.check(mD(HK,$))},xid($){return this.check(kD(zK,$))},ksuid($){return this.check(cD(ZK,$))},ipv4($){return this.check(xD(OK,$))},ipv6($){return this.check(fD(LK,$))},cidrv4($){return this.check(yD(WK,$))},cidrv6($){return this.check(bD(DK,$))},e164($){return this.check(uD(FK,$))},datetime($){return this.check(JL(jQ,$))},date($){return this.check(QL(UQ,$))},time($){return this.check(zL(IQ,$))},duration($){return this.check(ZL(XQ,$))}});function WL($){return EV(lZ,$)}var Xv=J$("ZodStringFormat",($,_)=>{$v.init($,_),jK.init($,_)}),jQ=J$("ZodISODateTime",($,_)=>{X7.init($,_),Xv.init($,_)}),UQ=J$("ZodISODate",($,_)=>{G7.init($,_),Xv.init($,_)}),IQ=J$("ZodISOTime",($,_)=>{Y7.init($,_),Xv.init($,_)}),XQ=J$("ZodISODuration",($,_)=>{J7.init($,_),Xv.init($,_)}),UK=J$("ZodEmail",($,_)=>{tM.init($,_),Xv.init($,_)});function BS($){return VD(UK,$)}var IK=J$("ZodGUID",($,_)=>{dM.init($,_),Xv.init($,_)});function SS($){return TD(IK,$)}var FG=J$("ZodUUID",($,_)=>{rM.init($,_),Xv.init($,_)});function kS($){return RD(FG,$)}function cS($){return PD(FG,$)}function xS($){return qD(FG,$)}function fS($){return gD(FG,$)}var KL=J$("ZodURL",($,_)=>{sM.init($,_),Xv.init($,_)});function yS($){return YL(KL,$)}function bS($){return YL(KL,{protocol:m5,hostname:JM,...w$.normalizeParams($)})}var XK=J$("ZodEmoji",($,_)=>{eM.init($,_),Xv.init($,_)});function hS($){return CD(XK,$)}var GK=J$("ZodNanoID",($,_)=>{$7.init($,_),Xv.init($,_)});function mS($){return wD(GK,$)}var YK=J$("ZodCUID",($,_)=>{v7.init($,_),Xv.init($,_)});function uS($){return ND(YK,$)}var JK=J$("ZodCUID2",($,_)=>{_7.init($,_),Xv.init($,_)});function nS($){return BD(JK,$)}var QK=J$("ZodULID",($,_)=>{j7.init($,_),Xv.init($,_)});function iS($){return SD(QK,$)}var zK=J$("ZodXID",($,_)=>{U7.init($,_),Xv.init($,_)});function pS($){return kD(zK,$)}var ZK=J$("ZodKSUID",($,_)=>{I7.init($,_),Xv.init($,_)});function lS($){return cD(ZK,$)}var OK=J$("ZodIPv4",($,_)=>{Q7.init($,_),Xv.init($,_)});function dS($){return xD(OK,$)}var XR=J$("ZodMAC",($,_)=>{Z7.init($,_),Xv.init($,_)});function rS($){return TV(XR,$)}var LK=J$("ZodIPv6",($,_)=>{z7.init($,_),Xv.init($,_)});function tS($){return fD(LK,$)}var WK=J$("ZodCIDRv4",($,_)=>{O7.init($,_),Xv.init($,_)});function oS($){return yD(WK,$)}var DK=J$("ZodCIDRv6",($,_)=>{L7.init($,_),Xv.init($,_)});function aS($){return bD(DK,$)}var KK=J$("ZodBase64",($,_)=>{W7.init($,_),Xv.init($,_)});function sS($){return hD(KK,$)}var HK=J$("ZodBase64URL",($,_)=>{D7.init($,_),Xv.init($,_)});function eS($){return mD(HK,$)}var FK=J$("ZodE164",($,_)=>{K7.init($,_),Xv.init($,_)});function $3($){return uD(FK,$)}var GR=J$("ZodCreditCard",($,_)=>{H7.init($,_),Xv.init($,_)});function v3($){return RV(GR,$)}var YR=J$("ZodIBAN",($,_)=>{F7.init($,_),Xv.init($,_)});function _3($){return PV(YR,$)}var AK=J$("ZodJWT",($,_)=>{A7.init($,_),Xv.init($,_)});function j3($){return nD(AK,$)}var m8=J$("ZodCustomStringFormat",($,_)=>{M7.init($,_),Xv.init($,_)});function U3($,_,I={}){return f8(m8,$,_,I)}function I3($){return f8(m8,"hostname",YM,$)}function X3($){return f8(m8,"hex",VM,$)}function G3($){return f8(m8,"currency_code",zM,$)}function Y3($,_){let I=_?.enc??"hex",J=`${$}_${I}`,j=WI[J];if(!j)throw Error(`Unrecognized hash format: ${J}`);return f8(m8,J,j,_)}var dZ=J$("ZodNumber",($,_)=>{JD.init($,_),x1.init($,_),$._zod.processJSONSchema=(I,J,j)=>QT($,I,J,j),$.isFinite=!0},w$.derived({minValue:($)=>{let{minimum:_,exclusiveMinimum:I}=Aj($);return Math.max(_??Number.NEGATIVE_INFINITY,I??Number.NEGATIVE_INFINITY)},maxValue:($)=>{let{maximum:_,exclusiveMaximum:I}=Aj($);return Math.min(_??Number.POSITIVE_INFINITY,I??Number.POSITIVE_INFINITY)},isInt:($)=>{let{isInt:_,multipleOf:I}=Aj($);return!!_||!!I?.some(Number.isSafeInteger)},format:($)=>Aj($).format??null},{gt($,_){return this.check(KG($,_))},gte($,_){return this.check(M4($,_))},min($,_){return this.check(M4($,_))},lt($,_){return this.check(DG($,_))},lte($,_){return this.check(A4($,_))},max($,_){return this.check(A4($,_))},int($){return this.check(vK($))},safe($){return this.check(vK($))},positive($){return this.check(KG(0,$))},nonnegative($){return this.check(M4(0,$))},negative($){return this.check(DG(0,$))},nonpositive($){return this.check(A4(0,$))},multipleOf($,_){return this.check(sJ($,_))},step($,_){return this.check(sJ($,_))},finite(){return this}}));function JR($){return gV(dZ,$)}var u8=J$("ZodNumberFormat",($,_)=>{E7.init($,_),dZ.init($,_)});function vK($){return wV(u8,$)}function J3($){return NV(u8,$)}function Q3($){return BV(u8,$)}function z3($){return SV(u8,$)}function Z3($){return kV(u8,$)}var rZ=J$("ZodBoolean",($,_)=>{o5.init($,_),x1.init($,_),$._zod.processJSONSchema=(I,J,j)=>zT($,I,J,j)});function QR($){return cV(rZ,$)}var tZ=J$("ZodBigInt",($,_)=>{QD.init($,_),x1.init($,_),$._zod.processJSONSchema=(I,J,j)=>ZT($,I,J,j)},w$.derived({minValue:($)=>Aj($).minimum??null,maxValue:($)=>Aj($).maximum??null,format:($)=>Aj($).format??null},{gte($,_){return this.check(M4($,_))},min($,_){return this.check(M4($,_))},gt($,_){return this.check(KG($,_))},lt($,_){return this.check(DG($,_))},lte($,_){return this.check(A4($,_))},max($,_){return this.check(A4($,_))},positive($){return this.check(KG(BigInt(0),$))},negative($){return this.check(DG(BigInt(0),$))},nonpositive($){return this.check(A4(BigInt(0),$))},nonnegative($){return this.check(M4(BigInt(0),$))},multipleOf($,_){return this.check(sJ($,_))}}));function O3($){return fV(tZ,$)}var MK=J$("ZodBigIntFormat",($,_)=>{V7.init($,_),tZ.init($,_)});function L3($){return bV(MK,$)}function W3($){return hV(MK,$)}var zR=J$("ZodSymbol",($,_)=>{T7.init($,_),x1.init($,_),$._zod.processJSONSchema=(I,J,j)=>OT($,I,J,j)});function D3($){return mV(zR,$)}var ZR=J$("ZodUndefined",($,_)=>{R7.init($,_),x1.init($,_),$._zod.processJSONSchema=(I,J,j)=>WT($,I,J,j)});function K3($){return uV(ZR,$)}var OR=J$("ZodNull",($,_)=>{P7.init($,_),x1.init($,_),$._zod.processJSONSchema=(I,J,j)=>LT($,I,J,j)});function LR($){return nV(OR,$)}var WR=J$("ZodAny",($,_)=>{q7.init($,_),x1.init($,_),$._zod.processJSONSchema=(I,J,j)=>HT($,I,J,j)});function H3(){return iV(WR)}var DR=J$("ZodUnknown",($,_)=>{g7.init($,_),x1.init($,_),$._zod.processJSONSchema=(I,J,j)=>FT($,I,J,j)});function y8(){return pV(DR)}var KR=J$("ZodNever",($,_)=>{C7.init($,_),x1.init($,_),$._zod.processJSONSchema=(I,J,j)=>KT($,I,J,j)});function EK($){return lV(KR,$)}var HR=J$("ZodVoid",($,_)=>{w7.init($,_),x1.init($,_),$._zod.processJSONSchema=(I,J,j)=>DT($,I,J,j)});function F3($){return dV(HR,$)}var HL=J$("ZodDate",($,_)=>{N7.init($,_),x1.init($,_),$._zod.processJSONSchema=(I,J,j)=>AT($,I,J,j),$.min=(I,J)=>$.check(M4(I,J)),$.max=(I,J)=>$.check(A4(I,J))},w$.derived({minDate:($)=>{let{minimum:_}=Aj($);return _?new Date(_):null},maxDate:($)=>{let{maximum:_}=Aj($);return _?new Date(_):null}},{}));function A3($){return rV(HL,$)}var FR=J$("ZodArray",($,_)=>{h8(),B7.init($,_),x1.init($,_),$._zod.processJSONSchema=(I,J,j)=>BT($,I,J,j),$.element=_.element},{min($,_){return this.check(qY($,_))},nonempty($){return this.check(qY(1,$))},max($,_){return this.check(c8($,_))},length($,_){return this.check(x8($,_))},unwrap(){return this.element}});function FL($,_){return aV(FR,$,_)}function M3($){let _=$._zod.def.shape;return VK(Object.keys(_))}var AL=J$("ZodObject",($,_)=>{h8(),S7.init($,_),x1.init($,_),$._zod.processJSONSchema=(I,J,j)=>ST($,I,J,j),w$.installLazyProp($,"shape",(I)=>I._zod.def.shape,!1)},{keyof(){return VK(Object.keys(this._zod.def.shape))},catchall($){return this.clone(w$.mergeDefs(this._zod.def,{catchall:$}))},passthrough(){return this.clone(w$.mergeDefs(this._zod.def,{catchall:y8()}))},loose(){return this.clone(w$.mergeDefs(this._zod.def,{catchall:y8()}))},strict(){return this.clone(w$.mergeDefs(this._zod.def,{catchall:EK()}))},strip(){return this.clone(w$.mergeDefs(this._zod.def,{catchall:void 0}))},extend($){return w$.extend(this,$)},safeExtend($){return w$.safeExtend(this,$)},merge($){return w$.merge(this,$)},pick($){return w$.pick(this,$)},omit($){return w$.omit(this,$)},partial(...$){return w$.partial(EL,this,$[0])},exactPartial(...$){return w$.partial(RK,this,$[0],"exactPartial")},required(...$){return w$.required(PK,this,$[0])}});function E3($,_){let I={type:"object",shape:$??{},...w$.normalizeParams(_)};return new AL(I)}function V3($,_){return new AL({type:"object",shape:$,catchall:EK(),...w$.normalizeParams(_)})}function T3($,_){return new AL({type:"object",shape:$,catchall:y8(),...w$.normalizeParams(_)})}var ML=J$("ZodUnion",($,_)=>{a5.init($,_),x1.init($,_),$._zod.processJSONSchema=(I,J,j)=>oD($,I,J,j),$.options=_.options});function oZ($,_){return new ML({type:"union",options:$,...w$.normalizeParams(_)})}var AR=J$("ZodXor",($,_)=>{ML.init($,_),k7.init($,_),$._zod.processJSONSchema=(I,J,j)=>oD($,I,J,j),$.options=_.options});function R3($,_){return new AR({type:"union",options:$,inclusive:!1,...w$.normalizeParams(_)})}var MR=J$("ZodDiscriminatedUnion",($,_)=>{ML.init($,_),x7.init($,_)});function P3($,_,I){return new MR({type:"union",options:_,discriminator:$,...w$.normalizeParams(I)})}var ER=J$("ZodIntersection",($,_)=>{f7.init($,_),x1.init($,_),$._zod.processJSONSchema=(I,J,j)=>kT($,I,J,j)});function VR($,_){return new ER({type:"intersection",left:$,right:_})}var TR=J$("ZodTuple",($,_)=>{h8(),zD.init($,_),x1.init($,_),$._zod.processJSONSchema=(I,J,j)=>cT($,I,J,j)},{rest($){return this.clone({...this._zod.def,rest:$})},partial(){let $=this._zod.def;if($.checks?.length)throw Error(".partial() cannot be used on tuple schemas containing refinements");return this.clone({...$,items:$.items.map((_)=>new EL({type:"optional",innerType:_}))})}});function RR($,_,I){let J=_ instanceof P1,j=J?I:_;return new TR({type:"tuple",items:$,rest:J?_:null,...w$.normalizeParams(j)})}var iZ=J$("ZodRecord",($,_)=>{h8(),y7.init($,_),x1.init($,_),$._zod.processJSONSchema=(I,J,j)=>xT($,I,J,j),$.keyType=_.keyType,$.valueType=_.valueType});function PR($,_,I){if(!_||!_._zod)return new iZ({type:"record",keyType:WL(),valueType:$,...w$.normalizeParams(_)});return new iZ({type:"record",keyType:$,valueType:_,...w$.normalizeParams(I)})}function q3($,_,I){return new iZ({type:"record",keyType:$,valueType:_,...w$.normalizeParams(I),partial:!0})}function g3($,_,I){return new iZ({type:"record",keyType:$,valueType:_,mode:"loose",...w$.normalizeParams(I)})}var qR=J$("ZodMap",($,_)=>{h8(),b7.init($,_),x1.init($,_),$._zod.processJSONSchema=(I,J,j)=>wT($,I,J,j),$.keyType=_.keyType,$.valueType=_.valueType,$.min=(...I)=>$.check(HG(...I)),$.nonempty=(I)=>$.check(HG(1,I)),$.max=(...I)=>$.check(eJ(...I)),$.size=(...I)=>$.check(k8(...I))});function C3($,_,I){return new qR({type:"map",keyType:$,valueType:_,...w$.normalizeParams(I)})}var gR=J$("ZodSet",($,_)=>{h8(),h7.init($,_),x1.init($,_),$._zod.processJSONSchema=(I,J,j)=>NT($,I,J,j),$.min=(...I)=>$.check(HG(...I)),$.nonempty=(I)=>$.check(HG(1,I)),$.max=(...I)=>$.check(eJ(...I)),$.size=(...I)=>$.check(k8(...I))});function w3($,_){return new gR({type:"set",valueType:$,...w$.normalizeParams(_)})}var pZ=J$("ZodEnum",($,_)=>{m7.init($,_),x1.init($,_),$._zod.processJSONSchema=(J,j,G)=>MT($,J,j,G),$.enum=_.entries,$.options=[...$._zod.values];let I=new Set(Object.keys(_.entries));$.extract=(J,j)=>{let G={};for(let X of J)if(I.has(X))G[X]=_.entries[X];else throw Error(`Key ${X} not found in enum`);return new pZ({..._,checks:[],...w$.normalizeParams(j),entries:G})},$.exclude=(J,j)=>{let G={..._.entries};for(let X of J)if(I.has(X))delete G[X];else throw Error(`Key ${X} not found in enum`);return new pZ({..._,checks:[],...w$.normalizeParams(j),entries:G})}});function VK($,_){let I=Array.isArray($)?Object.fromEntries($.map((J)=>[J,J])):$;return new pZ({type:"enum",entries:I,...w$.normalizeParams(_)})}function N3($,_){return new pZ({type:"enum",entries:$,...w$.normalizeParams(_)})}var CR=J$("ZodLiteral",($,_)=>{u7.init($,_),x1.init($,_),$._zod.processJSONSchema=(I,J,j)=>ET($,I,J,j),$.values=new Set(_.values),Object.defineProperty($,"value",{get(){if(_.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return _.values[0]}})});function B3($,_){return new CR({type:"literal",values:Array.isArray($)?$:[$],...w$.normalizeParams(_)})}var wR=J$("ZodFile",($,_)=>{n7.init($,_),x1.init($,_),$._zod.processJSONSchema=(I,J,j)=>RT($,I,J,j),$.min=(I,J)=>$.check(HG(I,J)),$.max=(I,J)=>$.check(eJ(I,J)),$.mime=(I,J)=>$.check(cZ(Array.isArray(I)?I:[I],J))});function S3($){return sV(wR,$)}var NR=J$("ZodTransform",($,_)=>{h8(),i7.init($,_),x1.init($,_),$._zod.processJSONSchema=(I,J,j)=>CT($,I,J,j),$._zod.parse=(I,J)=>{if(J.direction==="backward")throw new q8($.constructor.name);I.addIssue=(G)=>{if(typeof G==="string")I.issues.push(w$.issue(G,I.value,_));else{let X=G;if(X.fatal)X.continue=!1;if(X.code??(X.code="custom"),!("input"in X))X.input=I.value;X.inst??(X.inst=$),I.issues.push(w$.issue(X))}};let j=_.transform(I.value,I);if(j instanceof Promise)return j.then((G)=>{return I.value=G,I});return I.value=j,I}});function TK($){return new NR({type:"transform",transform:$})}var EL=J$("ZodOptional",($,_)=>{ZD.init($,_),x1.init($,_),$._zod.processJSONSchema=(I,J,j)=>aD($,I,J,j),$.unwrap=()=>$._zod.def.innerType});function b8($){return new EL({type:"optional",innerType:$})}var RK=J$("ZodExactOptional",($,_)=>{p7.init($,_),x1.init($,_),$._zod.processJSONSchema=(I,J,j)=>aD($,I,J,j),$.unwrap=()=>$._zod.def.innerType});function BR($){return new RK({type:"optional",innerType:$})}var SR=J$("ZodNullable",($,_)=>{l7.init($,_),x1.init($,_),$._zod.processJSONSchema=(I,J,j)=>fT($,I,J,j),$.unwrap=()=>$._zod.def.innerType});function DL($){return new SR({type:"nullable",innerType:$})}function k3($){return b8(DL($))}var kR=J$("ZodDefault",($,_)=>{d7.init($,_),x1.init($,_),$._zod.processJSONSchema=(I,J,j)=>hT($,I,J,j),$.unwrap=()=>$._zod.def.innerType,$.removeDefault=$.unwrap});function cR($,_){return new kR({type:"default",innerType:$,get defaultValue(){return typeof _==="function"?_():w$.shallowClone(_)}})}var xR=J$("ZodPrefault",($,_)=>{r7.init($,_),x1.init($,_),$._zod.processJSONSchema=(I,J,j)=>mT($,I,J,j),$.unwrap=()=>$._zod.def.innerType});function fR($,_){return new xR({type:"prefault",innerType:$,get defaultValue(){return typeof _==="function"?_():w$.shallowClone(_)}})}var PK=J$("ZodNonOptional",($,_)=>{t7.init($,_),x1.init($,_),$._zod.processJSONSchema=(I,J,j)=>yT($,I,J,j),$.unwrap=()=>$._zod.def.innerType});function yR($,_){return new PK({type:"nonoptional",innerType:$,...w$.normalizeParams(_)})}var bR=J$("ZodSuccess",($,_)=>{o7.init($,_),x1.init($,_),$._zod.processJSONSchema=(I,J,j)=>PT($,I,J,j),$.unwrap=()=>$._zod.def.innerType});function c3($){return new bR({type:"success",innerType:$})}var hR=J$("ZodCatch",($,_)=>{a7.init($,_),x1.init($,_),$._zod.processJSONSchema=(I,J,j)=>uT($,I,J,j),$.unwrap=()=>$._zod.def.innerType,$.removeCatch=$.unwrap});function mR($,_){return new hR({type:"catch",innerType:$,catchValue:typeof _==="function"?_:w$.constantCatch(_)})}var uR=J$("ZodNaN",($,_)=>{s7.init($,_),x1.init($,_),$._zod.processJSONSchema=(I,J,j)=>VT($,I,J,j)});function x3($){return oV(uR,$)}var VL=J$("ZodPipe",($,_)=>{OD.init($,_),x1.init($,_),$._zod.processJSONSchema=(I,J,j)=>nT($,I,J,j),$.in=_.in,$.out=_.out});function _K($,_){return new VL({type:"pipe",in:$,out:_})}var TL=J$("ZodCodec",($,_)=>{VL.init($,_),s5.init($,_)});function f3($,_,I){return new TL({type:"pipe",in:$,out:_,transform:I.decode,reverseTransform:I.encode})}function y3($){let _=$._zod.def;return new TL({type:"pipe",in:_.out,out:_.in,transform:_.reverseTransform,reverseTransform:_.transform})}var nR=J$("ZodPreprocess",($,_)=>{VL.init($,_),e7.init($,_)}),iR=J$("ZodReadonly",($,_)=>{$E.init($,_),x1.init($,_),$._zod.processJSONSchema=(I,J,j)=>iT($,I,J,j),$.unwrap=()=>$._zod.def.innerType});function pR($){return new iR({type:"readonly",innerType:$})}var lR=J$("ZodTemplateLiteral",($,_)=>{vE.init($,_),x1.init($,_),$._zod.processJSONSchema=(I,J,j)=>TT($,I,J,j)});function b3($,_){return new lR({type:"template_literal",parts:$,...w$.normalizeParams(_)})}var dR=J$("ZodLazy",($,_)=>{e5.init($,_),x1.init($,_),$._zod.processJSONSchema=(I,J,j)=>lT($,I,J,j),$.unwrap=()=>$._zod.def.getter()});function rR($){return new dR({type:"lazy",getter:$})}var tR=J$("ZodPromise",($,_)=>{jE.init($,_),x1.init($,_),$._zod.processJSONSchema=(I,J,j)=>pT($,I,J,j),$.unwrap=()=>$._zod.def.innerType});function h3($){return new tR({type:"promise",innerType:$})}var oR=J$("ZodFunction",($,_)=>{_E.init($,_),x1.init($,_),$._zod.processJSONSchema=(I,J,j)=>gT($,I,J,j)});function m3($){return new oR({type:"function",input:Array.isArray($?.input)?RR($?.input):$?.input??FL(y8()),output:$?.output??y8()})}var RL=J$("ZodCustom",($,_)=>{UE.init($,_),x1.init($,_),$._zod.processJSONSchema=(I,J,j)=>qT($,I,J,j)});function u3($){let _=new Wv({check:"custom"});return _._zod.check=$,_}function n3($,_){return eV(RL,$??(()=>!0),_)}function aR($,_={}){return $T(RL,$,_)}function sR($,_){return vT($,_)}var i3=_T,p3=jT,eR=J$("ZodInstanceOf",($,_)=>{RL.init($,_)},{properties($,_){return this.check(kZ($,_))}});function l3($,_={}){let I=new eR({type:"custom",check:"custom",fn:(J)=>J instanceof $,abort:!0,...w$.normalizeParams(_)});return I._zod.bag.Class=$,I._zod.check=(J)=>{if(!(J.value instanceof $))J.issues.push({code:"invalid_type",expected:$.name,input:J.value,inst:I,path:[...I._zod.def.path??[]]})},I}var d3=(...$)=>UT({Codec:TL,Boolean:rZ,String:lZ},...$);function r3($){let _=rR(()=>{return oZ([WL($),JR(),QR(),LR(),FL(_),PR(WL(),_)])});return _}function t3($,_){return new nR({type:"pipe",in:TK($),out:_})}var Hd={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function Fd($){R_({customError:$})}function Ad(){return R_().customError}var $P;(function($){})($P||($P={}));var PL={};_j(PL,{time:()=>Vd,duration:()=>Td,datetime:()=>Md,date:()=>Ed,ZodISOTime:()=>IQ,ZodISODuration:()=>XQ,ZodISODateTime:()=>jQ,ZodISODate:()=>UQ});function Md($){return JL(jQ,$)}function Ed($){return QL(UQ,$)}function Vd($){return zL(IQ,$)}function Td($){return ZL(XQ,$)}var a$={...aZ,...eD,iso:PL},Rd=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"]);function Pd($,_){let I=$.$schema;if(I==="https://json-schema.org/draft/2020-12/schema")return"draft-2020-12";if(I==="http://json-schema.org/draft-07/schema#")return"draft-7";if(I==="http://json-schema.org/draft-04/schema#")return"draft-4";return _??"draft-2020-12"}function o3($,_){return $.map((I,J)=>J<_?I:I.optional())}function qd($){return $.replace(/~1/g,"/").replace(/~0/g,"~")}function gd($,_){if(!$.startsWith("#"))throw Error("External $ref is not supported, only local refs (#/...) are allowed");let I=$.slice(1).split("/").filter(Boolean);if(I.length===0)return _.rootSchema;let J=_.version==="draft-2020-12"?"$defs":"definitions";if(I[0]===J){let j=I[1]===void 0?void 0:qd(I[1]);if(!j||!_.defs[j])throw Error(`Reference not found: ${$}`);return _.defs[j]}throw Error(`Reference not found: ${$}`)}function Cd($,_){return a$.transform((J)=>J).check((J)=>{let j=J.value;if(typeof j!=="object"||j===null||Array.isArray(j))return;let G=Object.getOwnPropertyNames(j);if(_.minProperties!==void 0&&G.length<_.minProperties)J.issues.push({origin:"object",code:"too_small",minimum:_.minProperties,inclusive:!0,message:`Too small: expected object to have >=${_.minProperties} properties`,input:j,inst:$,continue:!0});if(_.maxProperties!==void 0&&G.length>_.maxProperties)J.issues.push({origin:"object",code:"too_big",maximum:_.maxProperties,inclusive:!0,message:`Too big: expected object to have <=${_.maxProperties} properties`,input:j,inst:$,continue:!0});if(_.keySchema)for(let X of G){let W=_.keySchema.safeParse(X);if(W.success)continue;J.issues.push({code:"invalid_key",origin:"record",issues:W.error.issues,input:X,path:[X],continue:!0})}}).pipe($)}function vP($,_){if($===null)return"z";let I=typeof $;if(I!=="object"){if(I==="number"&&Number.isNaN($))return null;let J=String($);return`${I[0]}${J.length}:${J}`}if(_.has($))return null;_.add($);try{if(Array.isArray($)){let G=[];for(let X of $){let W=vP(X,_);if(W===null)return null;G.push(W)}return`a${G.length}:[${G.join(",")}]`}let J=Object.keys($).sort(),j=[];for(let G of J){let X=vP($[G],_);if(X===null)return null;j.push(`${G.length}:${G}=${X}`)}return`o${j.length}:{${j.join(",")}}`}finally{_.delete($)}}var wd=new Set(["items","prefixItems","additionalItems","additionalProperties","contains","propertyNames","not","if","then","else","allOf","anyOf","oneOf","unevaluatedItems","unevaluatedProperties","contentSchema"]),Nd=new Set(["properties","patternProperties","dependentSchemas","dependencies","$defs","definitions"]);function qL($){if(typeof $!=="object"||$===null)return!1;if(Array.isArray($))return $.some(qL);if(typeof $.$ref==="string")return!0;return Object.entries($).some(([_,I])=>{if(wd.has(_))return qL(I);if(!Nd.has(_)||typeof I!=="object"||I===null)return!1;return Object.values(I).some(qL)})}function a3($){return $===1?"element":"elements"}function Bd($,_){return a$.transform((J)=>J).check((J)=>{let j=J.value;if(!Array.isArray(j))return;if(_.uniqueItems===!0){let G=new Map;for(let X=0;X<j.length;X++){let W=vP(j[X],new Set);if(W===null)continue;let T=G.get(W);if(T===void 0){G.set(W,X);continue}J.issues.push({code:"custom",message:`Array items must be unique: element at index ${X} duplicates the one at index ${T}`,input:j,path:[X],continue:!0})}}if(_.containsSchema){let G=_.minContains??1,X=_.maxContains!==void 0?_.maxContains+1:Number.POSITIVE_INFINITY,W=0;for(let T of j)if(_.containsSchema.safeParse(T).success&&++W>=X)break;if(W<G)J.issues.push({code:"custom",message:`Array must contain at least ${G} matching ${a3(G)}; found ${W}`,input:j,continue:!0});if(_.maxContains!==void 0&&W>_.maxContains)J.issues.push({code:"custom",message:`Array must contain at most ${_.maxContains} matching ${a3(_.maxContains)}`,input:j,continue:!0})}}).pipe($)}function s3($,_){if($===!1)return;if($===void 0||$===!0)return a$.any();return X6($,_)}var Sd=/^(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|[+-](?:[01]\d|2[0-3]):[0-5]\d)$/;function e3($,_){if($.not!==void 0){if(typeof $.not==="object"&&Object.keys($.not).length===0)return a$.never();throw Error("not is not supported in Zod (except { not: {} } for never)")}if($.unevaluatedItems!==void 0)throw Error("unevaluatedItems is not supported");if($.unevaluatedProperties!==void 0)throw Error("unevaluatedProperties is not supported");if($.if!==void 0||$.then!==void 0||$.else!==void 0)throw Error("Conditional schemas (if/then/else) are not supported");if($.dependentSchemas!==void 0||$.dependentRequired!==void 0)throw Error("dependentSchemas and dependentRequired are not supported");if($.$ref){let j=$.$ref;if(_.refs.has(j))return _.refs.get(j);if(_.processing.has(j))return a$.lazy(()=>{if(!_.refs.has(j))throw Error(`Circular reference not resolved: ${j}`);return _.refs.get(j)});_.processing.add(j);let G=gd(j,_),X=X6(G,_);return _.refs.set(j,X),_.processing.delete(j),X}if($.enum!==void 0){let j=$.enum;if(_.version==="openapi-3.0"&&$.nullable===!0&&j.length===1&&j[0]===null)return a$.null();if(j.length===0)return a$.never();if(j.length===1)return a$.literal(j[0]);if(j.every((X)=>typeof X==="string"))return a$.enum(j);let G=j.map((X)=>a$.literal(X));if(G.length<2)return G[0];return a$.union([G[0],G[1],...G.slice(2)])}if($.const!==void 0)return a$.literal($.const);let I=$.type;if(Array.isArray(I)){let j=I.map((G)=>{let X={...$,type:G};return e3(X,_)});if(j.length===0)return a$.never();if(j.length===1)return j[0];return a$.union(j)}if(!I)return a$.any();let J;switch(I){case"string":{let j=a$.string();if($.format){let G=$.format;if(G==="email")j=j.check(a$.email());else if(G==="uri"||G==="uri-reference")j=j.check(a$.url());else if(G==="uuid"||G==="guid")j=j.check(a$.uuid());else if(G==="date-time")j=j.check(a$.iso.datetime({offset:!0}));else if(G==="date")j=j.check(a$.iso.date());else if(G==="time")j=j.check(a$.regex(Sd));else if(G==="duration")j=j.check(a$.iso.duration());else if(G==="hostname")j=j.check(a$.hostname());else if(G==="ipv4")j=j.check(a$.ipv4());else if(G==="ipv6")j=j.check(a$.ipv6());else if(G==="mac")j=j.check(a$.mac());else if(G==="cidr")j=j.check(a$.cidrv4());else if(G==="cidr-v6")j=j.check(a$.cidrv6());else if(G==="base64")j=j.check(a$.base64());else if(G==="base64url")j=j.check(a$.base64url());else if(G==="e164")j=j.check(a$.e164());else if(G==="credit_card")j=j.check(a$.creditCard());else if(G==="iban")j=j.check(a$.iban());else if(G==="jwt")j=j.check(a$.jwt());else if(G==="emoji")j=j.check(a$.emoji());else if(G==="nanoid")j=j.check(a$.nanoid());else if(G==="cuid")j=j.check(a$.cuid());else if(G==="cuid2")j=j.check(a$.cuid2());else if(G==="ulid")j=j.check(a$.ulid());else if(G==="xid")j=j.check(a$.xid());else if(G==="ksuid")j=j.check(a$.ksuid())}if(typeof $.minLength==="number")j=j.min($.minLength);if(typeof $.maxLength==="number")j=j.max($.maxLength);if($.pattern)j=j.regex(new RegExp($.pattern));J=j;break}case"number":case"integer":{let j=I==="integer"?a$.number().int():a$.number();if(typeof $.minimum==="number"&&$.exclusiveMinimum!==!0)j=j.min($.minimum);if(typeof $.maximum==="number"&&$.exclusiveMaximum!==!0)j=j.max($.maximum);if(typeof $.exclusiveMinimum==="number")j=j.gt($.exclusiveMinimum);else if($.exclusiveMinimum===!0&&typeof $.minimum==="number")j=j.gt($.minimum);if(typeof $.exclusiveMaximum==="number")j=j.lt($.exclusiveMaximum);else if($.exclusiveMaximum===!0&&typeof $.maximum==="number")j=j.lt($.maximum);if(typeof $.multipleOf==="number")j=j.multipleOf($.multipleOf);J=j;break}case"boolean":{J=a$.boolean();break}case"null":{J=a$.null();break}case"object":{let j={},G=$.properties||{},X=new Set($.required||[]),W=typeof $.additionalProperties==="object"?X6($.additionalProperties,_):void 0;for(let[D,q]of Object.entries(G)){let S=X6(q,_);QU(j,D,X.has(D)?S:S.optional())}if($.patternProperties){let D=$.patternProperties,q=Object.keys(D),S=[];for(let y of q){let m=X6(D[y],_),n=a$.string().regex(new RegExp(y));S.push(a$.looseRecord(n,m))}let k=[];if(Object.keys(j).length>0)k.push(a$.object(j).passthrough());if(k.push(...S),k.length===0)J=a$.object({}).passthrough();else if(k.length===1)J=k[0];else{let y=a$.intersection(k[0],k[1]);for(let m=2;m<k.length;m++)y=a$.intersection(y,k[m]);J=y}if($.additionalProperties===!1){let y=Object.keys(j),m=q.map((h)=>new RegExp(h)),n=J;J=J.check((h)=>{if(!OI(h.value))return;let i=[];for(let s of Object.keys(h.value)){if(y.includes(s))continue;if(m.some((j0)=>j0.test(s)))continue;i.push(s)}if(i.length)h.issues.push({code:"unrecognized_keys",keys:i,input:h.value,inst:n})})}}else{let D=a$.object(j);if($.additionalProperties===!1)J=D.strict();else if(W)J=D.catchall(W);else J=D.passthrough()}let T=$.propertyNames!==void 0&&$.propertyNames!==!0,F=typeof $.minProperties==="number"?$.minProperties:void 0,E=typeof $.maxProperties==="number"?$.maxProperties:void 0;if(T||F!==void 0||E!==void 0){let D;if(T){let q=typeof $.propertyNames==="object"&&$.propertyNames.type===void 0?{type:"string",...$.propertyNames}:$.propertyNames;D=X6(q,_)}J=Cd(J,{keySchema:D,minProperties:F,maxProperties:E})}break}case"array":{let{prefixItems:j,items:G}=$;if(j&&Array.isArray(j)){let X=typeof $.minItems==="number"?$.minItems:0,W=j.map((D)=>X6(D,_)),T=o3(W,X),F=!Array.isArray(G)?s3(G,_):void 0,E=a$.tuple(T);if(J=F?E.rest(F):E,typeof $.minItems==="number")J=J.check(a$.minLength($.minItems));if(typeof $.maxItems==="number")J=J.check(a$.maxLength($.maxItems))}else if(Array.isArray(G)){let X=typeof $.minItems==="number"?$.minItems:0,W=G.map((D)=>X6(D,_)),T=o3(W,X),F=s3($.additionalItems,_),E=a$.tuple(T);if(J=F?E.rest(F):E,typeof $.minItems==="number")J=J.check(a$.minLength($.minItems));if(typeof $.maxItems==="number")J=J.check(a$.maxLength($.maxItems))}else if(G!==void 0){let X=X6(G,_),W=a$.array(X);if(typeof $.minItems==="number")W=W.min($.minItems);if(typeof $.maxItems==="number")W=W.max($.maxItems);J=W}else J=a$.array(a$.any());if($.uniqueItems===!0||$.contains!==void 0)J=Bd(J,{uniqueItems:$.uniqueItems===!0,containsSchema:$.contains!==void 0?X6($.contains,_):void 0,minContains:typeof $.minContains==="number"?$.minContains:void 0,maxContains:typeof $.maxContains==="number"?$.maxContains:void 0});break}default:throw Error(`Unsupported type: ${I}`)}return J}function X6($,_){if(typeof $==="boolean")return $?a$.any():a$.never();let I=e3($,_),J=$.type||$.enum!==void 0||$.const!==void 0;if($.anyOf&&Array.isArray($.anyOf)){let W=$.anyOf.map((F)=>X6(F,_)),T=a$.union(W);I=J?a$.intersection(I,T):T}if($.oneOf&&Array.isArray($.oneOf)){let W=$.oneOf.map((F)=>X6(F,_)),T=a$.xor(W);I=J?a$.intersection(I,T):T}if($.allOf&&Array.isArray($.allOf))if($.allOf.length===0)I=J?I:a$.any();else{let W=J?I:X6($.allOf[0],_),T=J?0:1;for(let F=T;F<$.allOf.length;F++)W=a$.intersection(W,X6($.allOf[F],_));I=W}if($.nullable===!0&&_.version==="openapi-3.0")I=a$.nullable(I);if($.readOnly===!0)I=a$.readonly(I);if($.default!==void 0)I=I.default($.default);let j={},G=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let W of G)if(W in $)j[W]=$[W];let X=["contentEncoding","contentMediaType","contentSchema"];for(let W of X)if(W in $)j[W]=$[W];if($.type==="object"&&$.$ref===void 0){if($.propertyNames!==void 0&&!qL($.propertyNames))j.propertyNames=$.propertyNames;for(let W of["minProperties","maxProperties"])if($[W]!==void 0)j[W]=$[W]}if($.type==="array"&&$.$ref===void 0){if($.contains!==void 0&&!qL($.contains))j.contains=$.contains;for(let W of["uniqueItems","minContains","maxContains"])if($[W]!==void 0)j[W]=$[W]}for(let W of Object.keys($))if(!Rd.has(W))QU(j,W,$[W]);if(Object.keys(j).length>0)_.registry.add(I,j);if($.description)I=I.describe($.description);return I}function $k($,_){if(typeof $==="boolean")return $?a$.any():a$.never();let I;try{I=JSON.parse(JSON.stringify($))}catch{throw Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let J=Pd(I,_?.defaultTarget),j=I.$defs||I.definitions||{},G={version:J,defs:j,refs:new Map,processing:new Set,rootSchema:I,registry:_?.registry??zU};return X6(I,G)}var vk=Symbol("z.visit/resolving");function gL($,_){let I=typeof _==="function"?_:(X,W)=>{let T=_[X._zod.def.type];return T?T(X,W):X},J=new Map;function j(X){let W=J.get(X);if(W===vk)return new e5({type:"lazy",getter:()=>J.get(X)});if(W!==void 0)return W;J.set(X,vk);let T=G(X),F=I(T,T!==X);return J.set(X,F),F}function G(X){let W=X._zod.def,T=W.type;switch(T){case"object":{let F=W.shape,E=Object.keys(F),D=!1,q={};for(let k of E){let y=j(F[k]);if(y!==F[k])D=!0;q[k]=y}let S=W.catchall;if(W.catchall){if(S=j(W.catchall),S!==W.catchall)D=!0}return D?e2(X,{...W,shape:q,catchall:S}):X}case"array":{let F=j(W.element);return F===W.element?X:e2(X,{...W,element:F})}case"tuple":{let F=W.items,E=!1,D=[];for(let S of F){let k=j(S);if(k!==S)E=!0;D.push(k)}let q=W.rest;if(W.rest){if(q=j(W.rest),q!==W.rest)E=!0}return E?e2(X,{...W,items:D,rest:q}):X}case"record":case"map":{let F=j(W.keyType),E=j(W.valueType);return F===W.keyType&&E===W.valueType?X:e2(X,{...W,keyType:F,valueType:E})}case"set":{let F=j(W.valueType);return F===W.valueType?X:e2(X,{...W,valueType:F})}case"union":{let F=W.options,E=!1,D=[];for(let q of F){let S=j(q);if(S!==q)E=!0;D.push(S)}return E?e2(X,{...W,options:D}):X}case"intersection":{let F=j(W.left),E=j(W.right);return F===W.left&&E===W.right?X:e2(X,{...W,left:F,right:E})}case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":{let F=j(W.innerType);return F===W.innerType?X:e2(X,{...W,innerType:F})}case"pipe":{let F=j(W.in),E=j(W.out);return F===W.in&&E===W.out?X:e2(X,{...W,in:F,out:E})}case"function":{let F=j(W.input),E=j(W.output);return F===W.input&&E===W.output?X:e2(X,{...W,input:F,output:E})}case"lazy":{let F=W.getter,{_cachedInner:E,...D}=W;return e2(X,{...D,getter:()=>j(F())})}case"template_literal":case"string":case"number":case"int":case"boolean":case"bigint":case"symbol":case"undefined":case"null":case"void":case"never":case"any":case"unknown":case"date":case"nan":case"enum":case"literal":case"file":case"transform":case"custom":return X;default:return X}}return j($)}function _k($){return gL($,{object:(_)=>_.partial(),union:(_)=>{let I=_._zod.def;return I.discriminator===void 0?_:oZ(I.options)}})}function kd($,_){if(!_?.length)return $;let I=$._zod.def;return e2($,YX(I,{checks:[...I.checks??[],..._]}),{parent:!0})}function jk($){return kd($.out,$.checks)}function cd($){return $.in._zod.traits.has("$ZodTransform")?jk($):$.in}function Uk($){return gL($,{pipe:(_)=>cd(_._zod.def),default:(_,I)=>I?b8(_._zod.def.innerType):_,catch:(_,I)=>I?_._zod.def.innerType:_})}function Ik($){return gL($,{pipe:(_)=>jk(_._zod.def),prefault:(_,I)=>I?_._zod.def.innerType:_})}var _P={};_j(_P,{string:()=>xd,number:()=>fd,date:()=>hd,boolean:()=>yd,bigint:()=>bd});function xd($){return VV(lZ,$)}function fd($){return CV(dZ,$)}function yd($){return xV(rZ,$)}function bd($){return yV(tZ,$)}function hd($){return tV(HL,$)}var Xk=E1.object({id:E1.string().min(1).optional(),name:E1.string().min(1).optional(),kind:E1.enum(["human","agent","bot","system"])}),Gk=E1.object({type:E1.string().min(1),id:E1.string().min(1)}),Yk=E1.object({provider:E1.string().min(1),id:E1.string().min(1).optional(),url:E1.string().min(1).optional(),cursor:E1.string().min(1).optional(),rawRef:E1.string().min(1).optional()}),jP=E1.object({id:E1.string().min(1),service:E1.string().min(1),type:E1.string().min(1),schemaVersion:E1.number().int().positive(),idempotencyKey:E1.string().min(1),occurredAt:E1.string().min(1),observedAt:E1.string().min(1),origin:E1.enum(["virtual","external","agent","connector","replay","migration"]),actor:Xk.optional(),subject:Gk,causationId:E1.string().min(1).optional(),correlationId:E1.string().min(1).optional(),external:Yk.optional(),data:E1.record(E1.string(),E1.unknown()),raw:E1.record(E1.string(),E1.unknown()).optional()}),Jk=E1.object({version:E1.literal(1),service:E1.string().min(1),rebuiltAt:E1.string().min(1),eventCount:E1.number().int().nonnegative(),latestEventId:E1.string().min(1).optional(),subjects:E1.record(E1.string(),E1.object({type:E1.string().min(1),id:E1.string().min(1),latestEventId:E1.string().min(1),latestType:E1.string().min(1),updatedAt:E1.string().min(1)}))});function Qk($){return ZI($||process.env.PROJECT_ROOT||process.cwd())}function R9(){let $=process.env.VOLTER_STATE_DIR||".volter";if(tJ($)||$.split(/[\\/]/).includes(".."))throw Error("VOLTER_STATE_DIR must be a relative directory without .. segments");return $}function qK($){return F2(Qk($),R9(),"world")}function nd($){if(!/^[A-Za-z0-9_-]+$/.test($))throw Error(`Invalid world service name: ${$}`);return $}var UP;function zk($){let _=UP;return UP=$,_}var id=0;function H4($,_){let I=nd($);if(id===0)UP?.(I,_);let J=Qk(_),j=F2(qK(_),I);return{root:J,service:I,dir:j,events:F2(j,"events.jsonl"),state:F2(j,"state.json"),resources:F2(j,"resources"),cursors:F2(j,"cursors"),ingests:F2(j,"ingests"),eventQueue:F2(j,"event-queue.jsonl")}}var pd={windowMs:60000,ceiling:60,defaultWeight:2,maxRetryAfterSeconds:300,rules:[],reason:"no pack declared a budget for this vendor — this is the conservative fallback (30 calls/min at "+"the default weight), not a considered limit. Declare one on the pack with the vendor's real limits."};jj();var Zk="2.0",od=Number(Zk.split(".")[0]);var $r=Q2(Lk(),1);Mv();jj();var{AsyncLocalStorage:Rj0}=(()=>({}));jj();var{AsyncLocalStorage:Dj0}=(()=>({}));var Kj0="0".repeat(32),Hj0="0".repeat(16);var{AsyncLocalStorage:gr}=(()=>({}));var Lr;function Fk($){Lr=$}var GP="/__volter/world-boot";var{chmodSync:rj0,existsSync:tj0,mkdirSync:oj0,readFileSync:aj0,writeFileSync:sj0}=(()=>({}));jj();Mv();jj();var Cr=1e6,wr=/(?:^|[-_.])(?:auth|authorization|token|jwt|key|apikey|secret|credential|credentials|signature|sig|password|passwd|pwd|session|sessionid|cookie|access[-_]?token|refresh[-_]?token)(?:[-_.]|$)/i,Nr=/^(Bearer|Basic|Digest|Token|Negotiate|NTLM|OAuth|Signature|Hawk|AWS4-HMAC-SHA256|SharedKey|SharedKeyLite|GoogleLogin)\s+(\S[\s\S]*)$/i;function Ek($){return`sha256:${JU("sha256").update($,"utf8").digest("hex").slice(0,16)}`}function Br($,_,I){let J=Nr.exec(_);if(!J&&!wr.test($))return;let j=$.toLowerCase();if(_==="")return{name:j,in:I,empty:!0};if(J)return{name:j,in:I,scheme:J[1],fp:Ek(J[2])};return{name:j,in:I,fp:Ek(_)}}function qk($,_){let I=[],J=new Set,j=(G,X,W)=>{let T=Br(G,X,W);if(!T)return;let F=`${T.in}:${T.name}`;if(J.has(F))return;J.add(F),I.push(T)};try{if(typeof $.forEach==="function")$.forEach((G,X)=>j(X,G,"header"));else for(let[G,X]of Object.entries($))j(G,String(X),"header")}catch{}try{if(_!==void 0){let G=typeof _==="string"?new URL(_,"http://twin.invalid").search:_.search;for(let[X,W]of new URLSearchParams(G))j(X,W,"query")}}catch{}return I.sort((G,X)=>G.in===X.in?G.name.localeCompare(X.name):G.in.localeCompare(X.in))}function JP($=process.env){return $.VOLTER_TWIN_REQUEST_JOURNAL==="1"}function gk($,_){return F2(W_(H4($,_).events),"requests.jsonl")}function Ck($,_,I){if(!JP())return;try{let J=gU(),j=gk($,I);if(J.mkdir(W_(j)),(J.stat(j)?.size??0)>=Cr)J.writeAtomic(`${j}.1`,J.read(j)??""),J.write(j,"");let X=JSON.stringify({at:_.at??new Date().toISOString(),method:_.method.toUpperCase(),path:_.path.split("?")[0],status:_.status,...typeof _.ms==="number"?{ms:_.ms}:{},..._.credentials?.length?{credentials:_.credentials}:{}});J.append(j,`${X}
516
- `)}catch{}}var wk=Symbol.for("volter.twin.requestJournal.identity"),Vk=Symbol.for("volter.twin.requestJournal.installed"),YP;function Sr(){return YP??=new gr,YP}function kr(){zk(($,_)=>{let I=YP?.getStore();if(!I||I.identity!==void 0)return;I.identity=_===void 0?{service:$}:{service:$,root:_}})}function cr($=process.argv){let _=$.indexOf("--root"),I=_>=0?$[_+1]:void 0;return I&&!I.startsWith("--")?I:void 0}var xr=new Set(["world-runtime","world-tooling","world-attach","world-browser-assets","world-host"]);function Tk($){if(!$)return;let _=/(?:packages[\\/]twin[\\/]|@volter[\\/]twin-)([A-Za-z0-9_-]+)/g;for(let I of $.matchAll(_)){let J=I[1];if(!xr.has(J))return J}return}function fr(){if(typeof window<"u"||typeof document<"u")return!1;let $=globalThis.Bun,_=$&&typeof $.serve==="function"?$.serve:void 0;if(_&&_[Vk])return!0;if(kr(),Fk((J)=>Rk(J,Tk(Error().stack))),!_)return!1;let I=function(j,...G){let X=j;if(!X||typeof X.fetch!=="function")return _.apply(this,[j,...G]);let W=X[wk]?void 0:Tk(Error().stack);return _.apply(this,[{...X,fetch:Rk(X,W)},...G])};return Object.defineProperty(I,Vk,{value:!0}),$.serve=I,!0}function Rk($,_){if($.twinRequestJournal===!1)return $.fetch;{let J=$[wk],j=$.fetch;return async function(X,W){if(!JP()||new URL(X.url).pathname===GP)return j.call(this,X,W);let T={},F=500,E=Date.now();try{let D=await Sr().run(T,()=>j.call(this,X,W));if(D instanceof Response)F=D.status;else if(D===void 0)return D;return D}finally{J??=T.identity;let D=J??yr(_);if(D){let q=new URL(X.url);Ck(D.service,{method:X.method,path:q.pathname,status:F,ms:Date.now()-E,credentials:qk(X.headers,q)},D.root)}}}}}function yr($){let _=process.env.VOLTER_TWIN_JOURNAL_SERVICE||$;if(!_||!/^[A-Za-z0-9_-]+$/.test(_))return;let I=cr();return I===void 0?{service:_}:{service:_,root:I}}fr();Mv();var cU0=Symbol("absent");jj();Mv();jj();var{closeSync:$t,existsSync:BL,mkdirSync:vt,openSync:_t,readdirSync:jt,readFileSync:Ut,readSync:It,renameSync:Xt,rmSync:mk,statSync:OP,writeFileSync:Gt}=(()=>({}));Mv();jj();var{closeSync:zP,constants:n8,fstatSync:ck,ftruncateSync:dr,linkSync:rr,lstatSync:QP,mkdirSync:tr,openSync:ZP,readFileSync:or,readSync:Bk,rmSync:ar,writeFileSync:sr}=(()=>({}));var xk=131072,fk=32,yk=4;function bk($){return $.isFile()&&$.nlink===1&&(!process.getuid||$.uid===process.getuid())&&($.mode&63)===0}function Sk($){try{let _=QP($);return _.isDirectory()&&(_.mode&63)===0&&(!process.getuid||_.uid===process.getuid())}catch{return!1}}function kk($){let _;try{_=ZP($,n8.O_RDONLY|n8.O_NONBLOCK|(n8.O_NOFOLLOW??0));let I=ck(_);if(!bk(I)||I.size>xk)return{};let J=JSON.parse(or(_,"utf8"));if(!J||typeof J!=="object"||Array.isArray(J))return{};let j={};for(let[G,X]of Object.entries(J).slice(-fk)){if(!/^\d+:[a-f0-9]{64}$/.test(G)||!Array.isArray(X))continue;j[G]=X.filter((W)=>typeof W==="string"&&W.length<=4096&&tJ(W)).slice(0,yk)}return j}catch{return{}}finally{if(_!==void 0)zP(_)}}function er($,_){let I=ZP($,"r");try{let J=JU("sha256"),j=Buffer.allocUnsafe(65536),G=_;while(G>0){let X=Bk(I,j,0,Math.min(j.length,G),null);if(!X)return null;J.update(j.subarray(0,X)),G-=X}if(Bk(I,j,0,1,null))return null;return J.digest("hex")}finally{zP(I)}}function hk($,_,I){let J=F2($,`${I.slice(0,2)}.json`),j=`${_}:${I}`;return{reuse(G,X){if(!Sk($))return!1;for(let W of kk(J)[j]??[]){try{let T=QP(W);if(!T.isFile()||T.dev!==_||T.size!==X||process.getuid&&T.uid!==process.getuid())continue;rr(W,G);let F=QP(G);if(F.isFile()&&F.dev===_&&F.size===X&&(!process.getuid||F.uid===process.getuid())&&er(G,X)===I)return!0}catch{}ar(G,{force:!0})}return!1},record(G){try{let X=ZI(G);if(X.length>4096)return;let W=kk(J),T=[X,...(W[j]??[]).filter((D)=>D!==X)].slice(0,yk);delete W[j],W[j]=T;let F=JSON.stringify(W);while(Object.keys(W).length>fk||Buffer.byteLength(F)>xk)delete W[Object.keys(W)[0]],F=JSON.stringify(W);if(tr($,{recursive:!0,mode:448}),!Sk($))return;let E=ZP(J,n8.O_WRONLY|n8.O_CREAT|n8.O_NONBLOCK|(n8.O_NOFOLLOW??0),384);try{if(!bk(ck(E)))return;dr(E,0),sr(E,F)}finally{zP(E)}}catch{}}}}class LP{options;constructor($={}){this.options=$}async get($){if(!BL($))return null;return new Uint8Array(Ut($))}async put($,_){vt(W_($),{recursive:!0});let I=`${$}.tmp.${JZ()}`,J;try{if(this.options.sharedIndexRoot!==!1)try{J=hk(this.options.sharedIndexRoot??F2(T5(),"blob-index-v1"),OP(W_($)).dev,uk(_))}catch{}if(!J?.reuse(I,_.byteLength))Gt(I,_,{flag:"wx"});Xt(I,$),J?.record($)}finally{mk(I,{force:!0})}}async exists($){return BL($)}async remove($){mk($,{force:!0,recursive:$.endsWith("/")})}async list($){let _=[],I=(J)=>{if(!BL(J))return;for(let j of jt(J,{withFileTypes:!0})){let G=F2(J,j.name);if(j.isDirectory())I(G);else if(!j.name.includes(".tmp."))_.push(G)}};return I($.replace(/\/$/,"")),_.sort()}async size($){if(!BL($))return null;return OP($).size}async getRange($,_,I){if(!BL($))return null;let J=OP($).size,j=Math.max(0,_),G=Math.min(I,J-1);if(G<j)return new Uint8Array(0);let X=new Uint8Array(G-j+1),W=_t($,"r"),T=0;try{while(T<X.length){let F=It(W,X,T,X.length-T,j+T);if(F===0)break;T+=F}}finally{$t(W)}return T===X.length?X:X.subarray(0,T)}}function uk($){return JU("sha256").update($).digest("hex")}var eU0=new LP;SL();RP();jj();Mv();var{existsSync:g60,readFileSync:C60,statSync:w60}=(()=>({}));class ot{buf=new Uint8Array(65536);len=0;push($){if(this.len===this.buf.length){let _=new Uint8Array(this.buf.length*2);_.set(this.buf),this.buf=_}this.buf[this.len++]=$}copy($,_){if($>this.len)throw Error("inflate: distance too far back");for(let I=0;I<_;I++)this.push(this.buf[this.len-$])}bytes(){return this.buf.slice(0,this.len)}}var a60="0".repeat(40),s60=new Uint8Array([48,48,48,48]);var{AsyncLocalStorage:z40}=(()=>({}));var{AsyncLocalStorage:K40}=(()=>({}));var{existsSync:A40,readFileSync:M40,statSync:E40}=(()=>({}));var{existsSync:R40,readFileSync:P40}=(()=>({}));jj();var{existsSync:C40}=(()=>({}));jj();var{AsyncLocalStorage:Yo}=(()=>({}));var cJ0=new Yo;Mv();Mv();var Yx=Q2(Gx(),1),Cs=Q2(yL(),1);Mv();var jQ0=Object.freeze({"x-hubspot-ratelimit-max":"190","x-hubspot-ratelimit-interval-milliseconds":"10000","x-hubspot-ratelimit-daily":"625000"});var Ns=["EQ","NEQ","LT","LTE","GT","GTE","BETWEEN","IN","NOT_IN","HAS_PROPERTY","NOT_HAS_PROPERTY","CONTAINS_TOKEN","NOT_CONTAINS_TOKEN"],UQ0=new Set(Ns);Mv();var ks=Q2(Jx(),1),cs=Q2(Qx(),1),hK,iP;hK=ks,iP=cs;var{version:xs,renderToString:fs,renderToStaticMarkup:zx}=hK,ys=iP.renderToReadableStream,bs=iP.resume;var Zx=Q2(Mj(),1);var ms=Q2(Mj(),1);var us=Q2(Mj(),1);var ns=Q2(Mj(),1);var ts=Q2(Mj(),1);var os=Q2(Mj(),1);var $e=Q2(Mj(),1);var ve=Q2(Mj(),1);var tP=[{key:"contacts",label:"Contacts",path:"/crm/v3/objects/contacts?limit=100&properties=email,firstname,lastname,phone,lifecyclestage"},{key:"companies",label:"Companies",path:"/crm/v3/objects/companies?limit=100&properties=name,domain,city,industry"},{key:"deals",label:"Deals",path:"/crm/v3/objects/deals?limit=100&properties=dealname,amount,dealstage,pipeline,closedate"},{key:"tickets",label:"Tickets",path:"/crm/v3/objects/tickets?limit=100&properties=subject,content,hs_pipeline_stage,hs_ticket_priority"}],Mx={contacts:[{prop:"firstname",label:"First name"},{prop:"lastname",label:"Last name"},{prop:"email",label:"Email"},{prop:"phone",label:"Phone"},{prop:"lifecyclestage",label:"Lifecycle stage"}],companies:[{prop:"name",label:"Name"},{prop:"domain",label:"Domain"},{prop:"city",label:"City"},{prop:"industry",label:"Industry"}],deals:[{prop:"dealname",label:"Deal name"},{prop:"amount",label:"Amount"},{prop:"dealstage",label:"Stage"},{prop:"closedate",label:"Close date"}],tickets:[{prop:"subject",label:"Ticket name"},{prop:"hs_ticket_priority",label:"Priority"},{prop:"hs_pipeline_stage",label:"Status"}]},_e={contacts:["firstname","lastname","email"],companies:["name","domain"],deals:["dealname"],tickets:["subject"]};function uK($,_){let I=_??{},J=_e[$].map((j)=>I[j]).filter((j)=>typeof j==="string"&&j!=="");return J.length?J.join(" "):"(no name)"}function oP($){let _=String($??"").toLowerCase();if(_==="")return"";if(_==="closedwon")return"ok";if(_==="closedlost")return"bad";return"warn"}function aP($){let _=Number($);if($===null||$===void 0||$===""||!Number.isFinite(_))return"—";return`$${_.toLocaleString("en-US",{maximumFractionDigits:2})}`}function Ex($){let _=new Map;for(let I of $){let J=String(I.properties?.dealstage??"")||"unstaged",j=_.get(J);if(j)j.push(I);else _.set(J,[I])}return[..._.entries()].sort((I,J)=>I[0].localeCompare(J[0])).map(([I,J])=>({stage:I,rows:J}))}var h1=Q2(Mj(),1),je=typeof document>"u"||document.querySelector("base[href]")===null?"":new URL(".",document.baseURI).pathname.replace(/\/$/,""),Rx={ok:"pill pill-ok",warn:"pill pill-warn",bad:"pill pill-bad","":"pill"};async function Ue($){let I=await(await fetch(`${je}${$}`)).json();return Array.isArray(I.results)?I.results:[]}function Ie({section:$,rows:_}){if(_.length===0)return h1.jsxDEV("div",{className:"empty",children:["No ",$," yet."]},void 0,!0,void 0,this);let I=Mx[$];return h1.jsxDEV("table",{className:"records-table",children:[h1.jsxDEV("thead",{children:h1.jsxDEV("tr",{children:[h1.jsxDEV("th",{children:"Name"},void 0,!1,void 0,this),I.map((J)=>h1.jsxDEV("th",{children:J.label},J.prop,!1,void 0,this)),h1.jsxDEV("th",{children:"Record ID"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),h1.jsxDEV("tbody",{children:_.map((J)=>h1.jsxDEV("tr",{className:"list-row","data-record-id":J.id,children:[h1.jsxDEV("td",{className:"cell-title",children:uK($,J.properties)},void 0,!1,void 0,this),I.map((j)=>h1.jsxDEV("td",{className:"cell-prop",children:j.prop==="amount"?aP(J.properties?.amount):j.prop==="dealstage"?h1.jsxDEV("span",{className:Rx[oP(J.properties?.dealstage)],children:J.properties?.dealstage??"—"},void 0,!1,void 0,this):J.properties?.[j.prop]??"—"},j.prop,!1,void 0,this)),h1.jsxDEV("td",{className:"cell-id",children:J.id},void 0,!1,void 0,this)]},J.id,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function Xe({rows:$}){let _=Ex($);if(_.length===0)return h1.jsxDEV("div",{className:"empty",children:"No deals yet."},void 0,!1,void 0,this);return h1.jsxDEV("div",{className:"deal-board",children:_.map((I)=>h1.jsxDEV("section",{className:"board-column","data-stage":I.stage,children:[h1.jsxDEV("header",{className:"board-column-head",children:[h1.jsxDEV("span",{className:Rx[oP(I.stage)],children:I.stage},void 0,!1,void 0,this),h1.jsxDEV("span",{className:"board-count",children:I.rows.length},void 0,!1,void 0,this)]},void 0,!0,void 0,this),I.rows.map((J)=>h1.jsxDEV("article",{className:"deal-card list-row","data-record-id":J.id,children:[h1.jsxDEV("div",{className:"cell-title",children:uK("deals",J.properties)},void 0,!1,void 0,this),h1.jsxDEV("div",{className:"deal-amount",children:aP(J.properties?.amount)},void 0,!1,void 0,this)]},J.id,!0,void 0,this))]},I.stage,!0,void 0,this))},void 0,!1,void 0,this)}function Iz0({section:$,rows:_}){let I=_[0];if(!I)return h1.jsxDEV("div",{className:"empty",children:"No record."},void 0,!1,void 0,this);let J=Object.entries(I.properties??{});return h1.jsxDEV("section",{className:"record-detail","data-record-id":I.id,children:[h1.jsxDEV("h2",{className:"detail-title",children:uK($,I.properties)},void 0,!1,void 0,this),h1.jsxDEV("table",{className:"property-table",children:h1.jsxDEV("tbody",{children:J.map(([j,G])=>h1.jsxDEV("tr",{className:"list-row","data-prop":j,children:[h1.jsxDEV("td",{className:"cell-prop-name",children:j},void 0,!1,void 0,this),h1.jsxDEV("td",{className:"cell-prop-value",children:G??"—"},void 0,!1,void 0,this)]},j,!0,void 0,this))},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function Ge(){let[$,_]=jO.useState("contacts"),[I,J]=jO.useState(!1),[j,G]=jO.useState([]);return jO.useEffect(()=>{let X=tP.find((W)=>W.key===$);Ue(X.path).then(G).catch(()=>G([]))},[$]),h1.jsxDEV("div",{className:"app",children:[h1.jsxDEV("header",{className:"topbar",children:[h1.jsxDEV("span",{className:"brand",children:"HubSpot twin"},void 0,!1,void 0,this),$==="deals"?h1.jsxDEV("button",{className:"view-toggle",onClick:()=>J((X)=>!X),children:I?"Table":"Board"},void 0,!1,void 0,this):null]},void 0,!0,void 0,this),h1.jsxDEV("nav",{className:"sidebar",children:tP.map((X)=>h1.jsxDEV("button",{className:`nav-item${X.key===$?" active":""}`,onClick:()=>{_(X.key),J(!1)},children:X.label},X.key,!1,void 0,this))},void 0,!1,void 0,this),h1.jsxDEV("main",{className:"content",children:$==="deals"&&I?h1.jsxDEV(Xe,{rows:j},void 0,!1,void 0,this):h1.jsxDEV(Ie,{section:$,rows:j},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}var Vx=typeof document<"u"?document.getElementById("root"):null;if(Vx)Tx.createRoot(Vx).render(h1.jsxDEV(Ge,{},void 0,!1,void 0,this));export{Ie as RecordsTable,Iz0 as RecordDetail,Xe as DealBoard};
515
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let X of $.seen.entries()){let W=X[1];if(_===X[0]){G(X);continue}if($.external){let F=$.external.registry.get(X[0])?.id;if(_!==X[0]&&F){G(X);continue}}if($.metadataRegistry.get(X[0])?.id){G(X);continue}if(W.cycle){G(X);continue}if(W.count>1){if($.reused==="ref")G(X)}}if($.external)$.sharedDefsExtractedFor=$.external}function KS($){let _=$.anyOf;if(!Array.isArray(_)||_.length===0||$.type!==void 0)return;let I=[];for(let J of _){if(!J||typeof J!=="object")return;KS(J);let j=Object.keys(J);if(j.length!==1||j[0]!=="type")return;let G=J.type;for(let X of Array.isArray(G)?G:[G]){if(typeof X!=="string")return;if(!I.includes(X))I.push(X)}}delete $.anyOf,$.type=I.length===1?I[0]:I}var HS=new Set(["type","properties","required","additionalProperties"]),WS=["oneOf","anyOf"];function DS($){let _=$.additionalProperties;if(_===void 0||_===!1||typeof _!=="object"||_===null)return null;return Object.keys(_).length?_:null}function IT($){let _=[];for(let G of $){if(typeof G!=="object"||G.type!=="object")return null;for(let X in G)if(!HS.has(X))return null;_.push(G)}let I={},J=new Set;for(let G of _){for(let X in G.properties){if(Object.prototype.hasOwnProperty.call(I,X))continue;let W=[];for(let F of _){let E=F.properties?.[X]??DS(F);if(E===null||E===void 0)continue;if(!W.some((D)=>JSON.stringify(D)===JSON.stringify(E)))W.push(E)}let T=W.length===1?W[0]:IT(W)??{allOf:W};QU(I,X,T)}for(let X of G.required??[])J.add(X)}let j={type:"object",properties:I};if(J.size)j.required=[...J];if(_.every((G)=>G.additionalProperties===!1))j.additionalProperties=!1;else{let G=[];for(let X of _){let W=DS(X);if(W&&!G.some((T)=>JSON.stringify(T)===JSON.stringify(W)))G.push(W)}if(G.length===1)j.additionalProperties=G[0];else if(G.length>1)j.additionalProperties={allOf:G}}return j}function Jd($){let _=$.allOf;if(!Array.isArray(_)||_.length<2)return;for(let j of HS)if(j in $)return;let I=_.filter((j)=>WS.some((G)=>Array.isArray(j[G]))),J=null;if(!I.length)J=IT(_);else{let j=I[0],G=WS.find((T)=>Array.isArray(j[T]));if(Object.keys(j).length!==1)return;let X=_.filter((T)=>T!==j),W=j[G].map((T)=>IT([...X,T]));if(W.some((T)=>!T))return;J={[G]:W}}if(!J)return;delete $.allOf,OL($,J)}function _Q($,_){let I=$.seen.get(_);if(!I)throw Error("Unprocessed schema. This is a bug in Zod.");let J=(W)=>{let T=$.seen.get(W);if(T.ref===null)return;let F=T.def??T.schema,E={...F},D=T.ref;if(T.ref=null,D){J(D);let S=$.seen.get(D),k=S.schema;if(k.$ref&&($.target==="draft-07"||$.target==="draft-04"||$.target==="openapi-3.0"))F.allOf=F.allOf??[],F.allOf.push(k);else OL(F,k);if(OL(F,E),W._zod.parent===D)for(let m in F){if(m==="$ref"||m==="allOf")continue;if(!(m in E))delete F[m]}if(k.$ref&&S.def)for(let m in F){if(m==="$ref"||m==="allOf")continue;if(m in S.def&&JSON.stringify(F[m])===JSON.stringify(S.def[m]))delete F[m]}}let q=W._zod.parent;if(q&&q!==D){J(q);let S=$.seen.get(q);if(S?.schema.$ref){if(F.$ref=S.schema.$ref,S.def)for(let k in F){if(k==="$ref"||k==="allOf")continue;if(k in S.def&&JSON.stringify(F[k])===JSON.stringify(S.def[k]))delete F[k]}}}$.override({zodSchema:W,jsonSchema:F,path:T.path??[]})};if(!$.external||$.sharedEmitDoneFor!==$.external){for(let W of[...$.seen.entries()].reverse())J(W[0]);if($.target!=="openapi-3.0")for(let W of $.seen.entries())KS(W[1].def??W[1].schema);for(let W of $.deferred)W();if($.intersections.length){let W=new Map;for(let T of $.seen.values())for(let F of[T.schema,T.def]){let E=F?.allOf;if(!Array.isArray(E))continue;let D=W.get(E);if(D)D.push(F);else W.set(E,[F])}for(let T of $.intersections)for(let F of W.get(T)??[])Jd(F)}}let j={};if($.target==="draft-2020-12")j.$schema="https://json-schema.org/draft/2020-12/schema";else if($.target==="draft-07")j.$schema="http://json-schema.org/draft-07/schema#";else if($.target==="draft-04")j.$schema="http://json-schema.org/draft-04/schema#";else if($.target==="openapi-3.0");if($.external?.uri){let W=$.external.registry.get(_)?.id;if(!W)throw Error("Schema is missing an `id` property");j.$id=$.external.uri(W)}OL(j,I.defId?I.schema:I.def??I.schema);let G=$.metadataRegistry.get(_)?.id;if(G!==void 0&&j.id===G)delete j.id;let X=$.external?.defs??{};if(!$.external||$.sharedEmitDoneFor!==$.external)for(let W of $.seen.entries()){let T=W[1];if(T.def&&T.defId){if(T.def.id===T.defId)delete T.def.id;QU(X,T.defId,T.def)}}if($.external)$.sharedEmitDoneFor=$.external;if($.external);else if(Object.keys(X).length>0)if($.target==="draft-2020-12")j.$defs=X;else j.definitions=X;try{let W=JSON.parse(JSON.stringify(j));return Object.defineProperty(W,"~standard",{value:{..._["~standard"],jsonSchema:{input:mZ(_,"input",$.processors),output:mZ(_,"output",$.processors)}},enumerable:!1,writable:!1}),W}catch(W){throw Error("Error converting schema to JSON.")}}function I6($,_){let I=_??{seen:new Set};if(I.seen.has($))return!1;I.seen.add($);let J=$._zod.def;if(J.type==="transform")return!0;if(J.type==="array")return I6(J.element,I);if(J.type==="set")return I6(J.valueType,I);if(J.type==="lazy")return I6(J.getter(),I);if(J.type==="promise"||J.type==="optional"||J.type==="nonoptional"||J.type==="nullable"||J.type==="readonly"||J.type==="default"||J.type==="prefault"||J.type==="catch")return I6(J.innerType,I);if(J.type==="intersection")return I6(J.left,I)||I6(J.right,I);if(J.type==="record"||J.type==="map")return I6(J.keyType,I)||I6(J.valueType,I);if(J.type==="pipe"){if($._zod.traits.has("$ZodCodec"))return!0;return I6(J.in,I)||I6(J.out,I)}if(J.type==="object"){for(let j in J.shape)if(I6(J.shape[j],I))return!0;return!1}if(J.type==="union"){for(let j of J.options)if(I6(j,I))return!0;return!1}if(J.type==="tuple"){for(let j of J.items)if(I6(j,I))return!0;if(J.rest&&I6(J.rest,I))return!0;return!1}return!1}var XT=($,_={})=>(I)=>{let J=$Q({...I,processors:_});return vv($,J),vQ(J,$),_Q(J,$)},mZ=($,_,I={})=>(J)=>{let{libraryOptions:j,target:G}=J??{},X=$Q({...j??{},target:G,io:_,processors:I});return vv($,X),vQ(X,$),_Q(X,$)};var uZ=($,_,I)=>{if($[_]===void 0||I>$[_])$[_]=I},nZ=($,_,I)=>{if($[_]===void 0||I<$[_])$[_]=I},FS=($,_)=>{uZ($,"minimum",_),nZ($,"maximum",_)},VS=($,_)=>{if($.multipleOf??($.multipleOf=[]),!$.multipleOf.includes(_))$.multipleOf.push(_)},TS=($,_)=>{$.patterns??($.patterns=new Set),$.patterns.add(_)},RS=($,_)=>{$.mime=$.mime?$.mime.filter((I)=>_.includes(I)):[..._]},PS=($,_)=>{if($.format=_,_.includes("int"))$.isInt=!0},AS=($,_)=>uZ($,"minimum",_.minimum),MS=($,_)=>nZ($,"maximum",_.maximum),ES=($)=>(_,I)=>{PS(_,I.format);let[J,j]=$[I.format];uZ(_,"minimum",J),nZ(_,"maximum",j)},Qd={greater_than:($,_)=>uZ($,_.inclusive?"minimum":"exclusiveMinimum",_.value),less_than:($,_)=>nZ($,_.inclusive?"maximum":"exclusiveMaximum",_.value),multiple_of:($,_)=>VS($,_.value),number_format:ES(B5),bigint_format:ES(S5),min_length:AS,max_length:MS,length_equals:($,_)=>FS($,_.length),min_size:AS,max_size:MS,size_equals:($,_)=>FS($,_.size),string_format:($,_)=>{if(PS($,_.format),_.pattern)TS($,_.pattern);if(_.format==="base64"||_.format==="base64url")$.contentEncoding=_.format;if(_.local||_.precision===-1)$.laxFormat=!0},mime_type:($,_)=>RS($,_.mime)};function Aj($){let _={},I=$._zod.def,J=$._zod.traits.has("$ZodCheck")?[$,...I.checks??[]]:I.checks??[];for(let G of J)Qd[G._zod.def.check]?.(_,G._zod.def);let j=$._zod.bag;if(j.minimum!==void 0)uZ(_,"minimum",j.minimum);if(j.exclusiveMinimum!==void 0)uZ(_,"exclusiveMinimum",j.exclusiveMinimum);if(j.maximum!==void 0)nZ(_,"maximum",j.maximum);if(j.exclusiveMaximum!==void 0)nZ(_,"exclusiveMaximum",j.exclusiveMaximum);if(j.multipleOf!==void 0)VS(_,j.multipleOf);if(j.format!==void 0){if(_.format??(_.format=j.format),j.format.includes("int"))_.isInt=!0}if(j.mime)RS(_,j.mime);for(let G of j.patterns??[])TS(_,G);return _}var zd={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Zd=new Map([[UD,XM],[t5,GM]]),qS=($)=>Zd.get($)??$,JT=($,_,I,J)=>{let j=I;j.type="string";let{minimum:G,maximum:X,format:W,patterns:T,contentEncoding:F,laxFormat:E}=Aj($);if(typeof G==="number")j.minLength=G;if(typeof X==="number")j.maxLength=X;if(W){if(j.format=zd[W]??W,j.format==="")delete j.format;if(W==="time"||E)delete j.format}if(F)j.contentEncoding=F;if(T&&T.size>0){let D=[...T].map(qS);if(D.length===1)j.pattern=D[0].source;else if(D.length>1)j.allOf=[...D.map((q)=>({..._.target==="draft-07"||_.target==="draft-04"||_.target==="openapi-3.0"?{type:"string"}:{},pattern:q.source}))]}},QT=($,_,I,J)=>{let j=I,{minimum:G,maximum:X,multipleOf:W,exclusiveMaximum:T,exclusiveMinimum:F,isInt:E}=Aj($);j.type=E?"integer":"number";let D=typeof F==="number"&&F>=(G??Number.NEGATIVE_INFINITY),q=typeof T==="number"&&T<=(X??Number.POSITIVE_INFINITY),S=_.target==="draft-04"||_.target==="openapi-3.0";if(D)if(S)j.minimum=F,j.exclusiveMinimum=!0;else j.exclusiveMinimum=F;else if(typeof G==="number")j.minimum=G;if(q)if(S)j.maximum=T,j.exclusiveMaximum=!0;else j.exclusiveMaximum=T;else if(typeof X==="number")j.maximum=X;if(W){let k=new Set;for(let n of W)if(Number.isFinite(n)&&n!==0)k.add(Math.abs(n));else Fj($,_,j,J,`A multipleOf divisor of ${n} cannot be represented in JSON Schema`);let[y,...m]=k;if(y!==void 0)j.multipleOf=y;if(m.length)j.allOf=[...j.allOf??[],...m.map((n)=>({multipleOf:n}))]}},zT=($,_,I,J)=>{I.type="boolean"},ZT=($,_,I,J)=>{Fj($,_,I,J,"BigInt cannot be represented in JSON Schema")},OT=($,_,I,J)=>{Fj($,_,I,J,"Symbols cannot be represented in JSON Schema")},LT=($,_,I,J)=>{if(_.target==="openapi-3.0")I.type="string",I.nullable=!0,I.enum=[null];else I.type="null"},WT=($,_,I,J)=>{Fj($,_,I,J,"Undefined cannot be represented in JSON Schema")},DT=($,_,I,J)=>{Fj($,_,I,J,"Void cannot be represented in JSON Schema")},KT=($,_,I,J)=>{I.not={}},HT=($,_,I,J)=>{},FT=($,_,I,J)=>{},AT=($,_,I,J)=>{Fj($,_,I,J,"Date cannot be represented in JSON Schema")},MT=($,_,I,J)=>{let j=$._zod.def,G=OZ(j.entries);if(G.length===0){I.not={};return}if(G.every((X)=>typeof X==="number"))I.type="number";if(G.every((X)=>typeof X==="string"))I.type="string";I.enum=G},ET=($,_,I,J)=>{let j=$._zod.def;if(j.values.length===0){I.not={};return}let G=[];for(let X of j.values)if(X===void 0){if(Fj($,_,I,J,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof X==="bigint"){if(Fj($,_,I,J,"BigInt literals cannot be represented in JSON Schema"))return;G.push(Number(X))}else G.push(X);if(G.length===0);else if(G.length===1){let X=G[0];if(I.type=X===null?"null":typeof X,_.target==="draft-04"||_.target==="openapi-3.0")I.enum=[X];else I.const=X}else{if(G.every((X)=>typeof X==="number"))I.type="number";if(G.every((X)=>typeof X==="string"))I.type="string";if(G.every((X)=>typeof X==="boolean"))I.type="boolean";if(G.every((X)=>X===null))I.type="null";I.enum=G}},VT=($,_,I,J)=>{Fj($,_,I,J,"NaN cannot be represented in JSON Schema")},TT=($,_,I,J)=>{let j=I,G=$._zod.pattern;if(!G)throw Error("Pattern not found in template literal");j.type="string",j.pattern=G.source},RT=($,_,I,J)=>{let j=I;j.type="string",j.format="binary",j.contentEncoding="binary";let{minimum:G,maximum:X,mime:W}=Aj($);if(G!==void 0)j.minLength=G;if(X!==void 0)j.maxLength=X;if(!W)return;if(W.length===0)j.not={};else if(W.length===1)j.contentMediaType=W[0];else j.anyOf=W.map((T)=>({contentMediaType:T}))},PT=($,_,I,J)=>{I.type="boolean"},qT=($,_,I,J)=>{Fj($,_,I,J,"Custom types cannot be represented in JSON Schema")},gT=($,_,I,J)=>{Fj($,_,I,J,"Function types cannot be represented in JSON Schema")},CT=($,_,I,J)=>{Fj($,_,I,J,"Transforms cannot be represented in JSON Schema")},wT=($,_,I,J)=>{Fj($,_,I,J,"Map cannot be represented in JSON Schema")},NT=($,_,I,J)=>{Fj($,_,I,J,"Set cannot be represented in JSON Schema")},BT=($,_,I,J)=>{let j=I,G=$._zod.def,{minimum:X,maximum:W}=Aj($);if(typeof X==="number")j.minItems=X;if(typeof W==="number")j.maxItems=W;j.type="array",j.items=vv(G.element,_,{...J,path:[...J.path,"items"]})};function LL($){let _=$._zod.def;if(_.type==="pipe"&&_.in._zod.traits.has("$ZodTransform"))return LL(_.out);if(_.type==="catch")return LL(_.innerType);return $._zod.optin}var ST=($,_,I,J)=>{let j=I,G=$._zod.def,X=G.shape;if(Object.getOwnPropertySymbols(X).length&&Fj($,_,j,J,"Symbol keys cannot be represented in JSON Schema"))return;j.type="object",j.properties={};for(let F in X)QU(j.properties,F,vv(X[F],_,{...J,path:[...J.path,"properties",F]}));let T=[];for(let F of Object.keys(X)){let E=G.shape[F];if(_.io==="input"?LL(E)===void 0:E._zod.optout===void 0)T.push(F)}if(T.length>0)j.required=T;if(G.catchall?._zod.def.type==="never")j.additionalProperties=!1;else if(!G.catchall){if(_.io==="output")j.additionalProperties=!1}else if(G.catchall)j.additionalProperties=vv(G.catchall,_,{...J,path:[...J.path,"additionalProperties"]})},oD=($,_,I,J)=>{let j=$._zod.def,G=j.inclusive===!1,X=j.options.map((W,T)=>vv(W,_,{...J,path:[...J.path,G?"oneOf":"anyOf",T]}));if(G)I.oneOf=X;else I.anyOf=X},kT=($,_,I,J)=>{let j=$._zod.def,G=vv(j.left,_,{...J,path:[...J.path,"allOf",0]}),X=vv(j.right,_,{...J,path:[...J.path,"allOf",1]}),W=(F)=>("allOf"in F)&&Object.keys(F).length===1,T=[...W(G)?G.allOf:[G],...W(X)?X.allOf:[X]];I.allOf=T,_.intersections.push(T)},cT=($,_,I,J)=>{let j=I,G=$._zod.def;j.type="array";let X=_.target==="draft-2020-12"?"prefixItems":"items",W=_.target==="draft-2020-12"?"items":_.target==="openapi-3.0"?"items":"additionalItems",T=G.items.map((y,m)=>vv(y,_,{...J,path:[...J.path,X,m]})),F=G.rest?vv(G.rest,_,{...J,path:[...J.path,W,..._.target==="openapi-3.0"?[G.items.length]:[]]}):null,E=G.items.length;while(E>0){let y=G.items[E-1];if(!(_.io==="input"?LL(y)!==void 0:y._zod.optout==="optional"))break;E--}let D=G.items.length,q=!G.rest;if(_.target==="draft-2020-12"){if(j.prefixItems=T,q)j.items=!1;else if(F)j.items=F;if(E>0)j.minItems=E;if(q)j.maxItems=D}else if(_.target==="openapi-3.0"){if(j.items={anyOf:T},F)j.items.anyOf.push(F);if(E>0)j.minItems=E;if(q)j.maxItems=D}else{if(j.items=T,q)j.additionalItems=!1;else if(F)j.additionalItems=F;if(E>0)j.minItems=E;if(q)j.maxItems=D}let{minimum:S,maximum:k}=Aj($);if(typeof S==="number")j.minItems=S;if(typeof k==="number")j.maxItems=k};function GT($,_,I){if(_.$ref){if(I.has(_))return _;I.add(_);let k=$.get(_)?.def;if(!k)return _;let y=GT($,k,I);return y===k?_:y}for(let k of["anyOf","oneOf"]){let y=_[k];if(!Array.isArray(y))continue;let m=y.map((n)=>GT($,n,I));if(m.some((n,h)=>n!==y[h]))_={..._,[k]:m}}let J=Array.isArray(_.type)?_.type:[_.type],j=!J.includes("string")&&J.some((k)=>k==="number"||k==="integer"),G=_.enum??(_.const!==void 0?[_.const]:void 0);if(!j&&!G?.some((k)=>typeof k==="number"))return _;let{minimum:X,maximum:W,exclusiveMinimum:T,exclusiveMaximum:F,multipleOf:E,format:D,id:q,...S}=_;if(S.enum)S.enum=S.enum.map((k)=>typeof k==="number"?String(k):k);else if(typeof S.const==="number")S.const=String(S.const);if(!j)return S;if(S.type="string",!G)S.pattern=(J.includes("number")?LG:u5).source;return S}var YT=new WeakMap;function Od($){let _=new Map;for(let J of $.seen.values())if(J.def&&!_.has(J.schema))_.set(J.schema,J);let I=new Map;for(let J of YT.get($)??[]){let j=$.seen.get(J),G=(j?.def??j?.schema)?.propertyNames;if(!G||G===!0||I.has(G))continue;let X=GT(_,G,new Set);if(X!==G)I.set(G,X)}if(!I.size)return;for(let J of $.seen.values())for(let j of[J.schema,J.def]){let G=j&&I.get(j.propertyNames);if(G)j.propertyNames=G}}var xT=($,_,I,J)=>{let j=I,G=$._zod.def;j.type="object";let X=G.keyType,W=Aj(X).patterns;if(G.mode==="loose"&&W&&W.size>0){let E=vv(G.valueType,_,{...J,path:[...J.path,"patternProperties","*"]});j.patternProperties={};for(let D of W)QU(j.patternProperties,qS(D).source,E)}else{if(_.target==="draft-07"||_.target==="draft-2020-12"){j.propertyNames=vv(G.keyType,_,{...J,path:[...J.path,"propertyNames"]});let E=YT.get(_);if(!E)E=[],YT.set(_,E),_.deferred.push(()=>Od(_));E.push($)}j.additionalProperties=vv(G.valueType,_,{...J,path:[...J.path,"additionalProperties"]})}let T=X._zod.values,F=_.io==="input"&&LL(G.valueType)!==void 0;if(T&&!G.partial&&!F){let E=[...T].filter((D)=>typeof D==="string"||typeof D==="number");if(E.length>0)j.required=E.map(String)}},fT=($,_,I,J)=>{let j=$._zod.def,G=vv(j.innerType,_,J),X=_.seen.get($);if(_.target==="openapi-3.0")X.ref=j.innerType,I.nullable=!0;else I.anyOf=[G,{type:"null"}]},yT=($,_,I,J)=>{let j=$._zod.def;vv(j.innerType,_,J);let G=_.seen.get($);G.ref=j.innerType},bT=Symbol();function gS($,_,I,J,j){let G=!1,X=JSON.stringify($,(W,T)=>{if(typeof T!=="bigint")return T;return G=!0,null});if(!G)return JSON.parse(X);return Fj(_,I,J,j,"BigInt defaults cannot be represented in JSON Schema"),bT}var hT=($,_,I,J)=>{let j=$._zod.def;vv(j.innerType,_,J);let G=_.seen.get($);G.ref=j.innerType;let X=gS(j.defaultValue,$,_,I,J);if(X!==bT)I.default=X},mT=($,_,I,J)=>{let j=$._zod.def;vv(j.innerType,_,J);let G=_.seen.get($);if(G.ref=j.innerType,_.io!=="input")return;let X=gS(j.defaultValue,$,_,I,J);if(X!==bT)I._prefault=X},uT=($,_,I,J)=>{let j=$._zod.def;vv(j.innerType,_,J);let G=_.seen.get($);G.ref=j.innerType;let X;try{X=j.catchValue(void 0)}catch{Fj($,_,I,J,"Dynamic catch values are not supported in JSON Schema");return}I.default=X},nT=($,_,I,J)=>{let j=$._zod.def,G=j.in._zod.traits.has("$ZodTransform"),X=_.io==="input"?G?j.out:j.in:j.out;vv(X,_,J);let W=_.seen.get($);W.ref=X},iT=($,_,I,J)=>{let j=$._zod.def;vv(j.innerType,_,J);let G=_.seen.get($);G.ref=j.innerType,I.readOnly=!0},pT=($,_,I,J)=>{let j=$._zod.def;vv(j.innerType,_,J);let G=_.seen.get($);G.ref=j.innerType},aD=($,_,I,J)=>{let j=$._zod.def;vv(j.innerType,_,J);let G=_.seen.get($);G.ref=j.innerType},lT=($,_,I,J)=>{let j=$._zod.innerType;vv(j,_,J);let G=_.seen.get($);G.ref=j},tD={string:JT,number:QT,boolean:zT,bigint:ZT,symbol:OT,null:LT,undefined:WT,void:DT,never:KT,any:HT,unknown:FT,date:AT,enum:MT,literal:ET,nan:VT,template_literal:TT,file:RT,success:PT,custom:qT,function:gT,transform:CT,map:wT,set:NT,array:BT,object:ST,union:oD,intersection:kT,tuple:cT,record:xT,nullable:fT,nonoptional:yT,default:hT,prefault:mT,catch:uT,pipe:nT,readonly:iT,promise:pT,optional:aD,lazy:lT};function sD($,_){if("_idmap"in $){let J=$,j=$Q({..._,processors:tD}),G={};for(let T of J._idmap.entries()){let[F,E]=T;vv(E,j)}let X={},W={registry:J,uri:_?.uri,defs:G};j.external=W;for(let T of J._idmap.entries()){let[F,E]=T;vQ(j,E),QU(X,F,_Q(j,E))}if(Object.keys(G).length>0){let T=j.target==="draft-2020-12"?"$defs":"definitions";X.__shared={[T]:G}}return{schemas:X}}let I=$Q({..._,processors:tD});return vv($,I),vQ(I,$),_Q(I,$)}class dT{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter($){this.ctx.counter=$}get seen(){return this.ctx.seen}constructor($){let _=$?.target??"draft-2020-12";if(_==="draft-4")_="draft-04";if(_==="draft-7")_="draft-07";this.ctx=$Q({processors:tD,target:_,...$?.metadata&&{metadata:$.metadata},...$?.unrepresentable&&{unrepresentable:$.unrepresentable},...$?.override&&{override:$.override},...$?.io&&{io:$.io}})}process($,_={path:[],schemaPath:[]}){return vv($,this.ctx,_)}emit($,_){if(_){if(_.cycles)this.ctx.cycles=_.cycles;if(_.reused)this.ctx.reused=_.reused;if(_.external)this.ctx.external=_.external}this.ctx.sharedDefsExtractedFor=void 0,this.ctx.sharedEmitDoneFor=void 0,vQ(this.ctx,$);let I=_Q(this.ctx,$),{"~standard":J,...j}=I;return j}}var CS={};var aZ={};_j(aZ,{xor:()=>R3,xid:()=>pS,void:()=>F3,uuidv7:()=>fS,uuidv6:()=>xS,uuidv4:()=>cS,uuid:()=>kS,url:()=>yS,unknown:()=>y8,union:()=>oZ,undefined:()=>K3,ulid:()=>iS,uint64:()=>W3,uint32:()=>Z3,tuple:()=>RR,transform:()=>TK,templateLiteral:()=>b3,symbol:()=>D3,superRefine:()=>sR,success:()=>c3,stringbool:()=>d3,stringFormat:()=>U3,string:()=>WL,strictObject:()=>V3,set:()=>w3,refine:()=>aR,record:()=>PR,readonly:()=>pR,promise:()=>h3,preprocess:()=>t3,prefault:()=>fR,pipe:()=>_K,partialRecord:()=>q3,optional:()=>b8,object:()=>E3,number:()=>JR,nullish:()=>k3,nullable:()=>DL,null:()=>LR,nonoptional:()=>yR,never:()=>EK,nativeEnum:()=>N3,nanoid:()=>mS,nan:()=>x3,meta:()=>p3,map:()=>C3,mac:()=>rS,looseRecord:()=>g3,looseObject:()=>T3,literal:()=>B3,lazy:()=>rR,ksuid:()=>lS,keyof:()=>M3,jwt:()=>j3,json:()=>r3,ipv6:()=>tS,ipv4:()=>dS,invertCodec:()=>y3,intersection:()=>VR,int64:()=>L3,int32:()=>z3,int:()=>vK,instanceof:()=>l3,iban:()=>_3,httpUrl:()=>bS,hostname:()=>I3,hex:()=>X3,hash:()=>Y3,guid:()=>SS,function:()=>m3,float64:()=>Q3,float32:()=>J3,file:()=>S3,exactOptional:()=>BR,enum:()=>VK,emoji:()=>hS,email:()=>BS,e164:()=>$3,discriminatedUnion:()=>P3,describe:()=>i3,date:()=>A3,custom:()=>n3,currencyCode:()=>G3,cuid2:()=>nS,cuid:()=>uS,creditCard:()=>v3,codec:()=>f3,cidrv6:()=>aS,cidrv4:()=>oS,check:()=>u3,catch:()=>mR,boolean:()=>QR,bigint:()=>O3,base64url:()=>eS,base64:()=>sS,array:()=>FL,any:()=>H3,_function:()=>m3,_default:()=>cR,_ZodString:()=>jK,ZodXor:()=>AR,ZodXID:()=>zK,ZodVoid:()=>HR,ZodUnknown:()=>DR,ZodUnion:()=>ML,ZodUndefined:()=>ZR,ZodUUID:()=>FG,ZodURL:()=>KL,ZodULID:()=>QK,ZodType:()=>x1,ZodTuple:()=>TR,ZodTransform:()=>NR,ZodTemplateLiteral:()=>lR,ZodSymbol:()=>zR,ZodSuccess:()=>bR,ZodStringFormat:()=>Xv,ZodString:()=>lZ,ZodSet:()=>gR,ZodRecord:()=>iZ,ZodReadonly:()=>iR,ZodPromise:()=>tR,ZodPreprocess:()=>nR,ZodPrefault:()=>xR,ZodPipe:()=>VL,ZodOptional:()=>EL,ZodObject:()=>AL,ZodNumberFormat:()=>u8,ZodNumber:()=>dZ,ZodNullable:()=>SR,ZodNull:()=>OR,ZodNonOptional:()=>PK,ZodNever:()=>KR,ZodNanoID:()=>GK,ZodNaN:()=>uR,ZodMap:()=>qR,ZodMAC:()=>XR,ZodLiteral:()=>CR,ZodLazy:()=>dR,ZodKSUID:()=>ZK,ZodJWT:()=>AK,ZodIntersection:()=>ER,ZodInstanceOf:()=>eR,ZodISOTime:()=>IQ,ZodISODuration:()=>XQ,ZodISODateTime:()=>jQ,ZodISODate:()=>UQ,ZodIPv6:()=>LK,ZodIPv4:()=>OK,ZodIBAN:()=>YR,ZodGUID:()=>IK,ZodFunction:()=>oR,ZodFile:()=>wR,ZodExactOptional:()=>RK,ZodEnum:()=>pZ,ZodEmoji:()=>XK,ZodEmail:()=>UK,ZodE164:()=>FK,ZodDiscriminatedUnion:()=>MR,ZodDefault:()=>kR,ZodDate:()=>HL,ZodCustomStringFormat:()=>m8,ZodCustom:()=>RL,ZodCreditCard:()=>GR,ZodCodec:()=>TL,ZodCatch:()=>hR,ZodCUID2:()=>JK,ZodCUID:()=>YK,ZodCIDRv6:()=>DK,ZodCIDRv4:()=>WK,ZodBoolean:()=>rZ,ZodBigIntFormat:()=>MK,ZodBigInt:()=>tZ,ZodBase64URL:()=>HK,ZodBase64:()=>KK,ZodArray:()=>FR,ZodAny:()=>WR});var eD={};_j(eD,{uppercase:()=>wZ,trim:()=>fZ,toUpperCase:()=>bZ,toLowerCase:()=>yZ,startsWith:()=>BZ,slugify:()=>hZ,size:()=>k8,regex:()=>gZ,property:()=>rD,properties:()=>kZ,positive:()=>iD,overwrite:()=>JX,normalize:()=>xZ,nonpositive:()=>lD,nonnegative:()=>dD,negative:()=>pD,multipleOf:()=>sJ,minSize:()=>HG,minLength:()=>qY,mime:()=>cZ,maxSize:()=>eJ,maxLength:()=>c8,lte:()=>A4,lt:()=>DG,lowercase:()=>CZ,length:()=>x8,includes:()=>NZ,gte:()=>M4,gt:()=>KG,endsWith:()=>SZ});var wS=new WeakSet([Object.prototype,Error.prototype]);function $K($,_,I){Object.defineProperty($,_,{configurable:!0,enumerable:!1,get(){let J=I(this);return Object.defineProperty(this,_,{value:J,configurable:!0,writable:!0}),J},set(J){Object.defineProperty(this,_,{value:J,configurable:!0,writable:!0})}})}var NS=($,_)=>{hA.init($,_),$.name="ZodError";let I=Object.getPrototypeOf($);if(wS.has(I))return;wS.add(I),$K(I,"format",(J)=>(j)=>y5(J,j)),$K(I,"flatten",(J)=>(j)=>f5(J,j)),$K(I,"addIssue",(J)=>(j)=>{J.issues.push(j),J.message=JSON.stringify(J.issues,LZ,2)}),$K(I,"addIssues",(J)=>(j)=>{J.issues.push(...j),J.message=JSON.stringify(J.issues,LZ,2)}),Object.defineProperty(I,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}})},Wd=J$("ZodError",NS),f6=J$("ZodError",NS,void 0,{Parent:Error});var rT=HZ(f6),tT=FZ(f6),oT=AZ(f6),aT=MZ(f6),sT=c9(f6),eT=x9(f6),$R=f9(f6),vR=y9(f6),_R=b9(f6),jR=h9(f6),UR=m9(f6),IR=u9(f6);function Kd(){if(!hj.localeError)R_(jL())}function h8(){if(!hj.memoizer)R_({memoizer:_L()})}var x1=J$("ZodType",($,_)=>{return Kd(),P1.init($,_),$.def=_,$.type=_.type,$},{check(...$){let _=this.def;return this.clone(w$.mergeDefs(_,{checks:[..._.checks??[],...$.map((I)=>typeof I==="function"?{_zod:{check:I,def:{check:"custom"},onattach:[]}}:I)]}),{parent:!0})},with(...$){return this.check(...$)},clone($,_){return e2(this,$,_)},brand(){return this},register($,_){return $.add(this,_),this},refine($,_){return this.check(aR($,_))},superRefine($,_){return this.check(sR($,_))},overwrite($){return this.check(JX($))},optional(){return b8(this)},exactOptional(){return BR(this)},nullable(){return DL(this)},nullish(){return b8(DL(this))},nonoptional($){return yR(this,$)},array(){return FL(this)},or($){return oZ([this,$])},and($){return VR(this,$)},transform($){return _K(this,TK($))},default($){return cR(this,$)},prefault($){return fR(this,$)},catch($){return mR(this,$)},pipe($){return _K(this,$)},readonly(){return pR(this)},describe($){let _=this.clone();return zU.add(_,{description:$}),_},meta(...$){if($.length===0)return zU.get(this);let _=this.clone();return zU.add(_,$[0]),_},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply($,..._){return _.length===0?$(this):$(this,..._)},get "~standard"(){return w$.hide(this,"~standard",{...e9(this),jsonSchema:{input:mZ(this,"input"),output:mZ(this,"output")}})},set "~standard"($){w$.own(this,"~standard",$)},parse:function $(_,I){return rT(this,_,I,{callee:$})},parseAsync:async function $(_,I){return await tT(this,_,I,{callee:$})},safeParse($,_){return oT(this,$,_)},async safeParseAsync($,_){return aT(this,$,_)},get spa(){return this?.safeParseAsync},set spa($){w$.own(this,"spa",$)},validate($,_){return b5(this,$,_)},validateAsync($,_){return h5(this,$,_)},encode:function $(_,I){return sT(this,_,I,{callee:$})},decode:function $(_,I){return eT(this,_,I,{callee:$})},encodeAsync:async function $(_,I){return await $R(this,_,I,{callee:$})},decodeAsync:async function $(_,I){return await vR(this,_,I,{callee:$})},safeEncode($,_){return _R(this,$,_)},safeDecode($,_){return jR(this,$,_)},async safeEncodeAsync($,_){return UR(this,$,_)},async safeDecodeAsync($,_){return IR(this,$,_)},toJSONSchema($){return XT(this,{})($)},get description(){return zU.get(this)?.description},get _def(){return this._zod.def}}),jK=J$("_ZodString",($,_)=>{C8.init($,_),x1.init($,_),$._zod.processJSONSchema=(I,J,j)=>JT($,I,J,j)},w$.derived({format:($)=>Aj($).format??null,minLength:($)=>Aj($).minimum??null,maxLength:($)=>Aj($).maximum??null},{regex(...$){return this.check(gZ(...$))},includes(...$){return this.check(NZ(...$))},startsWith(...$){return this.check(BZ(...$))},endsWith(...$){return this.check(SZ(...$))},min(...$){return this.check(qY(...$))},max(...$){return this.check(c8(...$))},length(...$){return this.check(x8(...$))},nonempty(...$){return this.check(qY(1,...$))},lowercase($){return this.check(CZ($))},uppercase($){return this.check(wZ($))},trim(){return this.check(fZ())},normalize(...$){return this.check(xZ(...$))},toLowerCase(){return this.check(yZ())},toUpperCase(){return this.check(bZ())},slugify(){return this.check(hZ())}})),lZ=J$("ZodString",($,_)=>{C8.init($,_),jK.init($,_)},{email($){return this.check(VD(UK,$))},url($){return this.check(YL(KL,$))},jwt($){return this.check(nD(AK,$))},emoji($){return this.check(CD(XK,$))},guid($){return this.check(TD(IK,$))},uuid($){return this.check(RD(FG,$))},uuidv4($){return this.check(PD(FG,$))},uuidv6($){return this.check(qD(FG,$))},uuidv7($){return this.check(gD(FG,$))},nanoid($){return this.check(wD(GK,$))},cuid($){return this.check(ND(YK,$))},cuid2($){return this.check(BD(JK,$))},ulid($){return this.check(SD(QK,$))},base64($){return this.check(hD(KK,$))},base64url($){return this.check(mD(HK,$))},xid($){return this.check(kD(zK,$))},ksuid($){return this.check(cD(ZK,$))},ipv4($){return this.check(xD(OK,$))},ipv6($){return this.check(fD(LK,$))},cidrv4($){return this.check(yD(WK,$))},cidrv6($){return this.check(bD(DK,$))},e164($){return this.check(uD(FK,$))},datetime($){return this.check(JL(jQ,$))},date($){return this.check(QL(UQ,$))},time($){return this.check(zL(IQ,$))},duration($){return this.check(ZL(XQ,$))}});function WL($){return EV(lZ,$)}var Xv=J$("ZodStringFormat",($,_)=>{$v.init($,_),jK.init($,_)}),jQ=J$("ZodISODateTime",($,_)=>{X7.init($,_),Xv.init($,_)}),UQ=J$("ZodISODate",($,_)=>{G7.init($,_),Xv.init($,_)}),IQ=J$("ZodISOTime",($,_)=>{Y7.init($,_),Xv.init($,_)}),XQ=J$("ZodISODuration",($,_)=>{J7.init($,_),Xv.init($,_)}),UK=J$("ZodEmail",($,_)=>{tM.init($,_),Xv.init($,_)});function BS($){return VD(UK,$)}var IK=J$("ZodGUID",($,_)=>{dM.init($,_),Xv.init($,_)});function SS($){return TD(IK,$)}var FG=J$("ZodUUID",($,_)=>{rM.init($,_),Xv.init($,_)});function kS($){return RD(FG,$)}function cS($){return PD(FG,$)}function xS($){return qD(FG,$)}function fS($){return gD(FG,$)}var KL=J$("ZodURL",($,_)=>{sM.init($,_),Xv.init($,_)});function yS($){return YL(KL,$)}function bS($){return YL(KL,{protocol:m5,hostname:JM,...w$.normalizeParams($)})}var XK=J$("ZodEmoji",($,_)=>{eM.init($,_),Xv.init($,_)});function hS($){return CD(XK,$)}var GK=J$("ZodNanoID",($,_)=>{$7.init($,_),Xv.init($,_)});function mS($){return wD(GK,$)}var YK=J$("ZodCUID",($,_)=>{v7.init($,_),Xv.init($,_)});function uS($){return ND(YK,$)}var JK=J$("ZodCUID2",($,_)=>{_7.init($,_),Xv.init($,_)});function nS($){return BD(JK,$)}var QK=J$("ZodULID",($,_)=>{j7.init($,_),Xv.init($,_)});function iS($){return SD(QK,$)}var zK=J$("ZodXID",($,_)=>{U7.init($,_),Xv.init($,_)});function pS($){return kD(zK,$)}var ZK=J$("ZodKSUID",($,_)=>{I7.init($,_),Xv.init($,_)});function lS($){return cD(ZK,$)}var OK=J$("ZodIPv4",($,_)=>{Q7.init($,_),Xv.init($,_)});function dS($){return xD(OK,$)}var XR=J$("ZodMAC",($,_)=>{Z7.init($,_),Xv.init($,_)});function rS($){return TV(XR,$)}var LK=J$("ZodIPv6",($,_)=>{z7.init($,_),Xv.init($,_)});function tS($){return fD(LK,$)}var WK=J$("ZodCIDRv4",($,_)=>{O7.init($,_),Xv.init($,_)});function oS($){return yD(WK,$)}var DK=J$("ZodCIDRv6",($,_)=>{L7.init($,_),Xv.init($,_)});function aS($){return bD(DK,$)}var KK=J$("ZodBase64",($,_)=>{W7.init($,_),Xv.init($,_)});function sS($){return hD(KK,$)}var HK=J$("ZodBase64URL",($,_)=>{D7.init($,_),Xv.init($,_)});function eS($){return mD(HK,$)}var FK=J$("ZodE164",($,_)=>{K7.init($,_),Xv.init($,_)});function $3($){return uD(FK,$)}var GR=J$("ZodCreditCard",($,_)=>{H7.init($,_),Xv.init($,_)});function v3($){return RV(GR,$)}var YR=J$("ZodIBAN",($,_)=>{F7.init($,_),Xv.init($,_)});function _3($){return PV(YR,$)}var AK=J$("ZodJWT",($,_)=>{A7.init($,_),Xv.init($,_)});function j3($){return nD(AK,$)}var m8=J$("ZodCustomStringFormat",($,_)=>{M7.init($,_),Xv.init($,_)});function U3($,_,I={}){return f8(m8,$,_,I)}function I3($){return f8(m8,"hostname",YM,$)}function X3($){return f8(m8,"hex",VM,$)}function G3($){return f8(m8,"currency_code",zM,$)}function Y3($,_){let I=_?.enc??"hex",J=`${$}_${I}`,j=WI[J];if(!j)throw Error(`Unrecognized hash format: ${J}`);return f8(m8,J,j,_)}var dZ=J$("ZodNumber",($,_)=>{JD.init($,_),x1.init($,_),$._zod.processJSONSchema=(I,J,j)=>QT($,I,J,j),$.isFinite=!0},w$.derived({minValue:($)=>{let{minimum:_,exclusiveMinimum:I}=Aj($);return Math.max(_??Number.NEGATIVE_INFINITY,I??Number.NEGATIVE_INFINITY)},maxValue:($)=>{let{maximum:_,exclusiveMaximum:I}=Aj($);return Math.min(_??Number.POSITIVE_INFINITY,I??Number.POSITIVE_INFINITY)},isInt:($)=>{let{isInt:_,multipleOf:I}=Aj($);return!!_||!!I?.some(Number.isSafeInteger)},format:($)=>Aj($).format??null},{gt($,_){return this.check(KG($,_))},gte($,_){return this.check(M4($,_))},min($,_){return this.check(M4($,_))},lt($,_){return this.check(DG($,_))},lte($,_){return this.check(A4($,_))},max($,_){return this.check(A4($,_))},int($){return this.check(vK($))},safe($){return this.check(vK($))},positive($){return this.check(KG(0,$))},nonnegative($){return this.check(M4(0,$))},negative($){return this.check(DG(0,$))},nonpositive($){return this.check(A4(0,$))},multipleOf($,_){return this.check(sJ($,_))},step($,_){return this.check(sJ($,_))},finite(){return this}}));function JR($){return gV(dZ,$)}var u8=J$("ZodNumberFormat",($,_)=>{E7.init($,_),dZ.init($,_)});function vK($){return wV(u8,$)}function J3($){return NV(u8,$)}function Q3($){return BV(u8,$)}function z3($){return SV(u8,$)}function Z3($){return kV(u8,$)}var rZ=J$("ZodBoolean",($,_)=>{o5.init($,_),x1.init($,_),$._zod.processJSONSchema=(I,J,j)=>zT($,I,J,j)});function QR($){return cV(rZ,$)}var tZ=J$("ZodBigInt",($,_)=>{QD.init($,_),x1.init($,_),$._zod.processJSONSchema=(I,J,j)=>ZT($,I,J,j)},w$.derived({minValue:($)=>Aj($).minimum??null,maxValue:($)=>Aj($).maximum??null,format:($)=>Aj($).format??null},{gte($,_){return this.check(M4($,_))},min($,_){return this.check(M4($,_))},gt($,_){return this.check(KG($,_))},lt($,_){return this.check(DG($,_))},lte($,_){return this.check(A4($,_))},max($,_){return this.check(A4($,_))},positive($){return this.check(KG(BigInt(0),$))},negative($){return this.check(DG(BigInt(0),$))},nonpositive($){return this.check(A4(BigInt(0),$))},nonnegative($){return this.check(M4(BigInt(0),$))},multipleOf($,_){return this.check(sJ($,_))}}));function O3($){return fV(tZ,$)}var MK=J$("ZodBigIntFormat",($,_)=>{V7.init($,_),tZ.init($,_)});function L3($){return bV(MK,$)}function W3($){return hV(MK,$)}var zR=J$("ZodSymbol",($,_)=>{T7.init($,_),x1.init($,_),$._zod.processJSONSchema=(I,J,j)=>OT($,I,J,j)});function D3($){return mV(zR,$)}var ZR=J$("ZodUndefined",($,_)=>{R7.init($,_),x1.init($,_),$._zod.processJSONSchema=(I,J,j)=>WT($,I,J,j)});function K3($){return uV(ZR,$)}var OR=J$("ZodNull",($,_)=>{P7.init($,_),x1.init($,_),$._zod.processJSONSchema=(I,J,j)=>LT($,I,J,j)});function LR($){return nV(OR,$)}var WR=J$("ZodAny",($,_)=>{q7.init($,_),x1.init($,_),$._zod.processJSONSchema=(I,J,j)=>HT($,I,J,j)});function H3(){return iV(WR)}var DR=J$("ZodUnknown",($,_)=>{g7.init($,_),x1.init($,_),$._zod.processJSONSchema=(I,J,j)=>FT($,I,J,j)});function y8(){return pV(DR)}var KR=J$("ZodNever",($,_)=>{C7.init($,_),x1.init($,_),$._zod.processJSONSchema=(I,J,j)=>KT($,I,J,j)});function EK($){return lV(KR,$)}var HR=J$("ZodVoid",($,_)=>{w7.init($,_),x1.init($,_),$._zod.processJSONSchema=(I,J,j)=>DT($,I,J,j)});function F3($){return dV(HR,$)}var HL=J$("ZodDate",($,_)=>{N7.init($,_),x1.init($,_),$._zod.processJSONSchema=(I,J,j)=>AT($,I,J,j),$.min=(I,J)=>$.check(M4(I,J)),$.max=(I,J)=>$.check(A4(I,J))},w$.derived({minDate:($)=>{let{minimum:_}=Aj($);return _?new Date(_):null},maxDate:($)=>{let{maximum:_}=Aj($);return _?new Date(_):null}},{}));function A3($){return rV(HL,$)}var FR=J$("ZodArray",($,_)=>{h8(),B7.init($,_),x1.init($,_),$._zod.processJSONSchema=(I,J,j)=>BT($,I,J,j),$.element=_.element},{min($,_){return this.check(qY($,_))},nonempty($){return this.check(qY(1,$))},max($,_){return this.check(c8($,_))},length($,_){return this.check(x8($,_))},unwrap(){return this.element}});function FL($,_){return aV(FR,$,_)}function M3($){let _=$._zod.def.shape;return VK(Object.keys(_))}var AL=J$("ZodObject",($,_)=>{h8(),S7.init($,_),x1.init($,_),$._zod.processJSONSchema=(I,J,j)=>ST($,I,J,j),w$.installLazyProp($,"shape",(I)=>I._zod.def.shape,!1)},{keyof(){return VK(Object.keys(this._zod.def.shape))},catchall($){return this.clone(w$.mergeDefs(this._zod.def,{catchall:$}))},passthrough(){return this.clone(w$.mergeDefs(this._zod.def,{catchall:y8()}))},loose(){return this.clone(w$.mergeDefs(this._zod.def,{catchall:y8()}))},strict(){return this.clone(w$.mergeDefs(this._zod.def,{catchall:EK()}))},strip(){return this.clone(w$.mergeDefs(this._zod.def,{catchall:void 0}))},extend($){return w$.extend(this,$)},safeExtend($){return w$.safeExtend(this,$)},merge($){return w$.merge(this,$)},pick($){return w$.pick(this,$)},omit($){return w$.omit(this,$)},partial(...$){return w$.partial(EL,this,$[0])},exactPartial(...$){return w$.partial(RK,this,$[0],"exactPartial")},required(...$){return w$.required(PK,this,$[0])}});function E3($,_){let I={type:"object",shape:$??{},...w$.normalizeParams(_)};return new AL(I)}function V3($,_){return new AL({type:"object",shape:$,catchall:EK(),...w$.normalizeParams(_)})}function T3($,_){return new AL({type:"object",shape:$,catchall:y8(),...w$.normalizeParams(_)})}var ML=J$("ZodUnion",($,_)=>{a5.init($,_),x1.init($,_),$._zod.processJSONSchema=(I,J,j)=>oD($,I,J,j),$.options=_.options});function oZ($,_){return new ML({type:"union",options:$,...w$.normalizeParams(_)})}var AR=J$("ZodXor",($,_)=>{ML.init($,_),k7.init($,_),$._zod.processJSONSchema=(I,J,j)=>oD($,I,J,j),$.options=_.options});function R3($,_){return new AR({type:"union",options:$,inclusive:!1,...w$.normalizeParams(_)})}var MR=J$("ZodDiscriminatedUnion",($,_)=>{ML.init($,_),x7.init($,_)});function P3($,_,I){return new MR({type:"union",options:_,discriminator:$,...w$.normalizeParams(I)})}var ER=J$("ZodIntersection",($,_)=>{f7.init($,_),x1.init($,_),$._zod.processJSONSchema=(I,J,j)=>kT($,I,J,j)});function VR($,_){return new ER({type:"intersection",left:$,right:_})}var TR=J$("ZodTuple",($,_)=>{h8(),zD.init($,_),x1.init($,_),$._zod.processJSONSchema=(I,J,j)=>cT($,I,J,j)},{rest($){return this.clone({...this._zod.def,rest:$})},partial(){let $=this._zod.def;if($.checks?.length)throw Error(".partial() cannot be used on tuple schemas containing refinements");return this.clone({...$,items:$.items.map((_)=>new EL({type:"optional",innerType:_}))})}});function RR($,_,I){let J=_ instanceof P1,j=J?I:_;return new TR({type:"tuple",items:$,rest:J?_:null,...w$.normalizeParams(j)})}var iZ=J$("ZodRecord",($,_)=>{h8(),y7.init($,_),x1.init($,_),$._zod.processJSONSchema=(I,J,j)=>xT($,I,J,j),$.keyType=_.keyType,$.valueType=_.valueType});function PR($,_,I){if(!_||!_._zod)return new iZ({type:"record",keyType:WL(),valueType:$,...w$.normalizeParams(_)});return new iZ({type:"record",keyType:$,valueType:_,...w$.normalizeParams(I)})}function q3($,_,I){return new iZ({type:"record",keyType:$,valueType:_,...w$.normalizeParams(I),partial:!0})}function g3($,_,I){return new iZ({type:"record",keyType:$,valueType:_,mode:"loose",...w$.normalizeParams(I)})}var qR=J$("ZodMap",($,_)=>{h8(),b7.init($,_),x1.init($,_),$._zod.processJSONSchema=(I,J,j)=>wT($,I,J,j),$.keyType=_.keyType,$.valueType=_.valueType,$.min=(...I)=>$.check(HG(...I)),$.nonempty=(I)=>$.check(HG(1,I)),$.max=(...I)=>$.check(eJ(...I)),$.size=(...I)=>$.check(k8(...I))});function C3($,_,I){return new qR({type:"map",keyType:$,valueType:_,...w$.normalizeParams(I)})}var gR=J$("ZodSet",($,_)=>{h8(),h7.init($,_),x1.init($,_),$._zod.processJSONSchema=(I,J,j)=>NT($,I,J,j),$.min=(...I)=>$.check(HG(...I)),$.nonempty=(I)=>$.check(HG(1,I)),$.max=(...I)=>$.check(eJ(...I)),$.size=(...I)=>$.check(k8(...I))});function w3($,_){return new gR({type:"set",valueType:$,...w$.normalizeParams(_)})}var pZ=J$("ZodEnum",($,_)=>{m7.init($,_),x1.init($,_),$._zod.processJSONSchema=(J,j,G)=>MT($,J,j,G),$.enum=_.entries,$.options=[...$._zod.values];let I=new Set(Object.keys(_.entries));$.extract=(J,j)=>{let G={};for(let X of J)if(I.has(X))G[X]=_.entries[X];else throw Error(`Key ${X} not found in enum`);return new pZ({..._,checks:[],...w$.normalizeParams(j),entries:G})},$.exclude=(J,j)=>{let G={..._.entries};for(let X of J)if(I.has(X))delete G[X];else throw Error(`Key ${X} not found in enum`);return new pZ({..._,checks:[],...w$.normalizeParams(j),entries:G})}});function VK($,_){let I=Array.isArray($)?Object.fromEntries($.map((J)=>[J,J])):$;return new pZ({type:"enum",entries:I,...w$.normalizeParams(_)})}function N3($,_){return new pZ({type:"enum",entries:$,...w$.normalizeParams(_)})}var CR=J$("ZodLiteral",($,_)=>{u7.init($,_),x1.init($,_),$._zod.processJSONSchema=(I,J,j)=>ET($,I,J,j),$.values=new Set(_.values),Object.defineProperty($,"value",{get(){if(_.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return _.values[0]}})});function B3($,_){return new CR({type:"literal",values:Array.isArray($)?$:[$],...w$.normalizeParams(_)})}var wR=J$("ZodFile",($,_)=>{n7.init($,_),x1.init($,_),$._zod.processJSONSchema=(I,J,j)=>RT($,I,J,j),$.min=(I,J)=>$.check(HG(I,J)),$.max=(I,J)=>$.check(eJ(I,J)),$.mime=(I,J)=>$.check(cZ(Array.isArray(I)?I:[I],J))});function S3($){return sV(wR,$)}var NR=J$("ZodTransform",($,_)=>{h8(),i7.init($,_),x1.init($,_),$._zod.processJSONSchema=(I,J,j)=>CT($,I,J,j),$._zod.parse=(I,J)=>{if(J.direction==="backward")throw new q8($.constructor.name);I.addIssue=(G)=>{if(typeof G==="string")I.issues.push(w$.issue(G,I.value,_));else{let X=G;if(X.fatal)X.continue=!1;if(X.code??(X.code="custom"),!("input"in X))X.input=I.value;X.inst??(X.inst=$),I.issues.push(w$.issue(X))}};let j=_.transform(I.value,I);if(j instanceof Promise)return j.then((G)=>{return I.value=G,I});return I.value=j,I}});function TK($){return new NR({type:"transform",transform:$})}var EL=J$("ZodOptional",($,_)=>{ZD.init($,_),x1.init($,_),$._zod.processJSONSchema=(I,J,j)=>aD($,I,J,j),$.unwrap=()=>$._zod.def.innerType});function b8($){return new EL({type:"optional",innerType:$})}var RK=J$("ZodExactOptional",($,_)=>{p7.init($,_),x1.init($,_),$._zod.processJSONSchema=(I,J,j)=>aD($,I,J,j),$.unwrap=()=>$._zod.def.innerType});function BR($){return new RK({type:"optional",innerType:$})}var SR=J$("ZodNullable",($,_)=>{l7.init($,_),x1.init($,_),$._zod.processJSONSchema=(I,J,j)=>fT($,I,J,j),$.unwrap=()=>$._zod.def.innerType});function DL($){return new SR({type:"nullable",innerType:$})}function k3($){return b8(DL($))}var kR=J$("ZodDefault",($,_)=>{d7.init($,_),x1.init($,_),$._zod.processJSONSchema=(I,J,j)=>hT($,I,J,j),$.unwrap=()=>$._zod.def.innerType,$.removeDefault=$.unwrap});function cR($,_){return new kR({type:"default",innerType:$,get defaultValue(){return typeof _==="function"?_():w$.shallowClone(_)}})}var xR=J$("ZodPrefault",($,_)=>{r7.init($,_),x1.init($,_),$._zod.processJSONSchema=(I,J,j)=>mT($,I,J,j),$.unwrap=()=>$._zod.def.innerType});function fR($,_){return new xR({type:"prefault",innerType:$,get defaultValue(){return typeof _==="function"?_():w$.shallowClone(_)}})}var PK=J$("ZodNonOptional",($,_)=>{t7.init($,_),x1.init($,_),$._zod.processJSONSchema=(I,J,j)=>yT($,I,J,j),$.unwrap=()=>$._zod.def.innerType});function yR($,_){return new PK({type:"nonoptional",innerType:$,...w$.normalizeParams(_)})}var bR=J$("ZodSuccess",($,_)=>{o7.init($,_),x1.init($,_),$._zod.processJSONSchema=(I,J,j)=>PT($,I,J,j),$.unwrap=()=>$._zod.def.innerType});function c3($){return new bR({type:"success",innerType:$})}var hR=J$("ZodCatch",($,_)=>{a7.init($,_),x1.init($,_),$._zod.processJSONSchema=(I,J,j)=>uT($,I,J,j),$.unwrap=()=>$._zod.def.innerType,$.removeCatch=$.unwrap});function mR($,_){return new hR({type:"catch",innerType:$,catchValue:typeof _==="function"?_:w$.constantCatch(_)})}var uR=J$("ZodNaN",($,_)=>{s7.init($,_),x1.init($,_),$._zod.processJSONSchema=(I,J,j)=>VT($,I,J,j)});function x3($){return oV(uR,$)}var VL=J$("ZodPipe",($,_)=>{OD.init($,_),x1.init($,_),$._zod.processJSONSchema=(I,J,j)=>nT($,I,J,j),$.in=_.in,$.out=_.out});function _K($,_){return new VL({type:"pipe",in:$,out:_})}var TL=J$("ZodCodec",($,_)=>{VL.init($,_),s5.init($,_)});function f3($,_,I){return new TL({type:"pipe",in:$,out:_,transform:I.decode,reverseTransform:I.encode})}function y3($){let _=$._zod.def;return new TL({type:"pipe",in:_.out,out:_.in,transform:_.reverseTransform,reverseTransform:_.transform})}var nR=J$("ZodPreprocess",($,_)=>{VL.init($,_),e7.init($,_)}),iR=J$("ZodReadonly",($,_)=>{$E.init($,_),x1.init($,_),$._zod.processJSONSchema=(I,J,j)=>iT($,I,J,j),$.unwrap=()=>$._zod.def.innerType});function pR($){return new iR({type:"readonly",innerType:$})}var lR=J$("ZodTemplateLiteral",($,_)=>{vE.init($,_),x1.init($,_),$._zod.processJSONSchema=(I,J,j)=>TT($,I,J,j)});function b3($,_){return new lR({type:"template_literal",parts:$,...w$.normalizeParams(_)})}var dR=J$("ZodLazy",($,_)=>{e5.init($,_),x1.init($,_),$._zod.processJSONSchema=(I,J,j)=>lT($,I,J,j),$.unwrap=()=>$._zod.def.getter()});function rR($){return new dR({type:"lazy",getter:$})}var tR=J$("ZodPromise",($,_)=>{jE.init($,_),x1.init($,_),$._zod.processJSONSchema=(I,J,j)=>pT($,I,J,j),$.unwrap=()=>$._zod.def.innerType});function h3($){return new tR({type:"promise",innerType:$})}var oR=J$("ZodFunction",($,_)=>{_E.init($,_),x1.init($,_),$._zod.processJSONSchema=(I,J,j)=>gT($,I,J,j)});function m3($){return new oR({type:"function",input:Array.isArray($?.input)?RR($?.input):$?.input??FL(y8()),output:$?.output??y8()})}var RL=J$("ZodCustom",($,_)=>{UE.init($,_),x1.init($,_),$._zod.processJSONSchema=(I,J,j)=>qT($,I,J,j)});function u3($){let _=new Wv({check:"custom"});return _._zod.check=$,_}function n3($,_){return eV(RL,$??(()=>!0),_)}function aR($,_={}){return $T(RL,$,_)}function sR($,_){return vT($,_)}var i3=_T,p3=jT,eR=J$("ZodInstanceOf",($,_)=>{RL.init($,_)},{properties($,_){return this.check(kZ($,_))}});function l3($,_={}){let I=new eR({type:"custom",check:"custom",fn:(J)=>J instanceof $,abort:!0,...w$.normalizeParams(_)});return I._zod.bag.Class=$,I._zod.check=(J)=>{if(!(J.value instanceof $))J.issues.push({code:"invalid_type",expected:$.name,input:J.value,inst:I,path:[...I._zod.def.path??[]]})},I}var d3=(...$)=>UT({Codec:TL,Boolean:rZ,String:lZ},...$);function r3($){let _=rR(()=>{return oZ([WL($),JR(),QR(),LR(),FL(_),PR(WL(),_)])});return _}function t3($,_){return new nR({type:"pipe",in:TK($),out:_})}var Hd={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function Fd($){R_({customError:$})}function Ad(){return R_().customError}var $P;(function($){})($P||($P={}));var PL={};_j(PL,{time:()=>Vd,duration:()=>Td,datetime:()=>Md,date:()=>Ed,ZodISOTime:()=>IQ,ZodISODuration:()=>XQ,ZodISODateTime:()=>jQ,ZodISODate:()=>UQ});function Md($){return JL(jQ,$)}function Ed($){return QL(UQ,$)}function Vd($){return zL(IQ,$)}function Td($){return ZL(XQ,$)}var a$={...aZ,...eD,iso:PL},Rd=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"]);function Pd($,_){let I=$.$schema;if(I==="https://json-schema.org/draft/2020-12/schema")return"draft-2020-12";if(I==="http://json-schema.org/draft-07/schema#")return"draft-7";if(I==="http://json-schema.org/draft-04/schema#")return"draft-4";return _??"draft-2020-12"}function o3($,_){return $.map((I,J)=>J<_?I:I.optional())}function qd($){return $.replace(/~1/g,"/").replace(/~0/g,"~")}function gd($,_){if(!$.startsWith("#"))throw Error("External $ref is not supported, only local refs (#/...) are allowed");let I=$.slice(1).split("/").filter(Boolean);if(I.length===0)return _.rootSchema;let J=_.version==="draft-2020-12"?"$defs":"definitions";if(I[0]===J){let j=I[1]===void 0?void 0:qd(I[1]);if(!j||!_.defs[j])throw Error(`Reference not found: ${$}`);return _.defs[j]}throw Error(`Reference not found: ${$}`)}function Cd($,_){return a$.transform((J)=>J).check((J)=>{let j=J.value;if(typeof j!=="object"||j===null||Array.isArray(j))return;let G=Object.getOwnPropertyNames(j);if(_.minProperties!==void 0&&G.length<_.minProperties)J.issues.push({origin:"object",code:"too_small",minimum:_.minProperties,inclusive:!0,message:`Too small: expected object to have >=${_.minProperties} properties`,input:j,inst:$,continue:!0});if(_.maxProperties!==void 0&&G.length>_.maxProperties)J.issues.push({origin:"object",code:"too_big",maximum:_.maxProperties,inclusive:!0,message:`Too big: expected object to have <=${_.maxProperties} properties`,input:j,inst:$,continue:!0});if(_.keySchema)for(let X of G){let W=_.keySchema.safeParse(X);if(W.success)continue;J.issues.push({code:"invalid_key",origin:"record",issues:W.error.issues,input:X,path:[X],continue:!0})}}).pipe($)}function vP($,_){if($===null)return"z";let I=typeof $;if(I!=="object"){if(I==="number"&&Number.isNaN($))return null;let J=String($);return`${I[0]}${J.length}:${J}`}if(_.has($))return null;_.add($);try{if(Array.isArray($)){let G=[];for(let X of $){let W=vP(X,_);if(W===null)return null;G.push(W)}return`a${G.length}:[${G.join(",")}]`}let J=Object.keys($).sort(),j=[];for(let G of J){let X=vP($[G],_);if(X===null)return null;j.push(`${G.length}:${G}=${X}`)}return`o${j.length}:{${j.join(",")}}`}finally{_.delete($)}}var wd=new Set(["items","prefixItems","additionalItems","additionalProperties","contains","propertyNames","not","if","then","else","allOf","anyOf","oneOf","unevaluatedItems","unevaluatedProperties","contentSchema"]),Nd=new Set(["properties","patternProperties","dependentSchemas","dependencies","$defs","definitions"]);function qL($){if(typeof $!=="object"||$===null)return!1;if(Array.isArray($))return $.some(qL);if(typeof $.$ref==="string")return!0;return Object.entries($).some(([_,I])=>{if(wd.has(_))return qL(I);if(!Nd.has(_)||typeof I!=="object"||I===null)return!1;return Object.values(I).some(qL)})}function a3($){return $===1?"element":"elements"}function Bd($,_){return a$.transform((J)=>J).check((J)=>{let j=J.value;if(!Array.isArray(j))return;if(_.uniqueItems===!0){let G=new Map;for(let X=0;X<j.length;X++){let W=vP(j[X],new Set);if(W===null)continue;let T=G.get(W);if(T===void 0){G.set(W,X);continue}J.issues.push({code:"custom",message:`Array items must be unique: element at index ${X} duplicates the one at index ${T}`,input:j,path:[X],continue:!0})}}if(_.containsSchema){let G=_.minContains??1,X=_.maxContains!==void 0?_.maxContains+1:Number.POSITIVE_INFINITY,W=0;for(let T of j)if(_.containsSchema.safeParse(T).success&&++W>=X)break;if(W<G)J.issues.push({code:"custom",message:`Array must contain at least ${G} matching ${a3(G)}; found ${W}`,input:j,continue:!0});if(_.maxContains!==void 0&&W>_.maxContains)J.issues.push({code:"custom",message:`Array must contain at most ${_.maxContains} matching ${a3(_.maxContains)}`,input:j,continue:!0})}}).pipe($)}function s3($,_){if($===!1)return;if($===void 0||$===!0)return a$.any();return X6($,_)}var Sd=/^(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|[+-](?:[01]\d|2[0-3]):[0-5]\d)$/;function e3($,_){if($.not!==void 0){if(typeof $.not==="object"&&Object.keys($.not).length===0)return a$.never();throw Error("not is not supported in Zod (except { not: {} } for never)")}if($.unevaluatedItems!==void 0)throw Error("unevaluatedItems is not supported");if($.unevaluatedProperties!==void 0)throw Error("unevaluatedProperties is not supported");if($.if!==void 0||$.then!==void 0||$.else!==void 0)throw Error("Conditional schemas (if/then/else) are not supported");if($.dependentSchemas!==void 0||$.dependentRequired!==void 0)throw Error("dependentSchemas and dependentRequired are not supported");if($.$ref){let j=$.$ref;if(_.refs.has(j))return _.refs.get(j);if(_.processing.has(j))return a$.lazy(()=>{if(!_.refs.has(j))throw Error(`Circular reference not resolved: ${j}`);return _.refs.get(j)});_.processing.add(j);let G=gd(j,_),X=X6(G,_);return _.refs.set(j,X),_.processing.delete(j),X}if($.enum!==void 0){let j=$.enum;if(_.version==="openapi-3.0"&&$.nullable===!0&&j.length===1&&j[0]===null)return a$.null();if(j.length===0)return a$.never();if(j.length===1)return a$.literal(j[0]);if(j.every((X)=>typeof X==="string"))return a$.enum(j);let G=j.map((X)=>a$.literal(X));if(G.length<2)return G[0];return a$.union([G[0],G[1],...G.slice(2)])}if($.const!==void 0)return a$.literal($.const);let I=$.type;if(Array.isArray(I)){let j=I.map((G)=>{let X={...$,type:G};return e3(X,_)});if(j.length===0)return a$.never();if(j.length===1)return j[0];return a$.union(j)}if(!I)return a$.any();let J;switch(I){case"string":{let j=a$.string();if($.format){let G=$.format;if(G==="email")j=j.check(a$.email());else if(G==="uri"||G==="uri-reference")j=j.check(a$.url());else if(G==="uuid"||G==="guid")j=j.check(a$.uuid());else if(G==="date-time")j=j.check(a$.iso.datetime({offset:!0}));else if(G==="date")j=j.check(a$.iso.date());else if(G==="time")j=j.check(a$.regex(Sd));else if(G==="duration")j=j.check(a$.iso.duration());else if(G==="hostname")j=j.check(a$.hostname());else if(G==="ipv4")j=j.check(a$.ipv4());else if(G==="ipv6")j=j.check(a$.ipv6());else if(G==="mac")j=j.check(a$.mac());else if(G==="cidr")j=j.check(a$.cidrv4());else if(G==="cidr-v6")j=j.check(a$.cidrv6());else if(G==="base64")j=j.check(a$.base64());else if(G==="base64url")j=j.check(a$.base64url());else if(G==="e164")j=j.check(a$.e164());else if(G==="credit_card")j=j.check(a$.creditCard());else if(G==="iban")j=j.check(a$.iban());else if(G==="jwt")j=j.check(a$.jwt());else if(G==="emoji")j=j.check(a$.emoji());else if(G==="nanoid")j=j.check(a$.nanoid());else if(G==="cuid")j=j.check(a$.cuid());else if(G==="cuid2")j=j.check(a$.cuid2());else if(G==="ulid")j=j.check(a$.ulid());else if(G==="xid")j=j.check(a$.xid());else if(G==="ksuid")j=j.check(a$.ksuid())}if(typeof $.minLength==="number")j=j.min($.minLength);if(typeof $.maxLength==="number")j=j.max($.maxLength);if($.pattern)j=j.regex(new RegExp($.pattern));J=j;break}case"number":case"integer":{let j=I==="integer"?a$.number().int():a$.number();if(typeof $.minimum==="number"&&$.exclusiveMinimum!==!0)j=j.min($.minimum);if(typeof $.maximum==="number"&&$.exclusiveMaximum!==!0)j=j.max($.maximum);if(typeof $.exclusiveMinimum==="number")j=j.gt($.exclusiveMinimum);else if($.exclusiveMinimum===!0&&typeof $.minimum==="number")j=j.gt($.minimum);if(typeof $.exclusiveMaximum==="number")j=j.lt($.exclusiveMaximum);else if($.exclusiveMaximum===!0&&typeof $.maximum==="number")j=j.lt($.maximum);if(typeof $.multipleOf==="number")j=j.multipleOf($.multipleOf);J=j;break}case"boolean":{J=a$.boolean();break}case"null":{J=a$.null();break}case"object":{let j={},G=$.properties||{},X=new Set($.required||[]),W=typeof $.additionalProperties==="object"?X6($.additionalProperties,_):void 0;for(let[D,q]of Object.entries(G)){let S=X6(q,_);QU(j,D,X.has(D)?S:S.optional())}if($.patternProperties){let D=$.patternProperties,q=Object.keys(D),S=[];for(let y of q){let m=X6(D[y],_),n=a$.string().regex(new RegExp(y));S.push(a$.looseRecord(n,m))}let k=[];if(Object.keys(j).length>0)k.push(a$.object(j).passthrough());if(k.push(...S),k.length===0)J=a$.object({}).passthrough();else if(k.length===1)J=k[0];else{let y=a$.intersection(k[0],k[1]);for(let m=2;m<k.length;m++)y=a$.intersection(y,k[m]);J=y}if($.additionalProperties===!1){let y=Object.keys(j),m=q.map((h)=>new RegExp(h)),n=J;J=J.check((h)=>{if(!OI(h.value))return;let i=[];for(let s of Object.keys(h.value)){if(y.includes(s))continue;if(m.some((j0)=>j0.test(s)))continue;i.push(s)}if(i.length)h.issues.push({code:"unrecognized_keys",keys:i,input:h.value,inst:n})})}}else{let D=a$.object(j);if($.additionalProperties===!1)J=D.strict();else if(W)J=D.catchall(W);else J=D.passthrough()}let T=$.propertyNames!==void 0&&$.propertyNames!==!0,F=typeof $.minProperties==="number"?$.minProperties:void 0,E=typeof $.maxProperties==="number"?$.maxProperties:void 0;if(T||F!==void 0||E!==void 0){let D;if(T){let q=typeof $.propertyNames==="object"&&$.propertyNames.type===void 0?{type:"string",...$.propertyNames}:$.propertyNames;D=X6(q,_)}J=Cd(J,{keySchema:D,minProperties:F,maxProperties:E})}break}case"array":{let{prefixItems:j,items:G}=$;if(j&&Array.isArray(j)){let X=typeof $.minItems==="number"?$.minItems:0,W=j.map((D)=>X6(D,_)),T=o3(W,X),F=!Array.isArray(G)?s3(G,_):void 0,E=a$.tuple(T);if(J=F?E.rest(F):E,typeof $.minItems==="number")J=J.check(a$.minLength($.minItems));if(typeof $.maxItems==="number")J=J.check(a$.maxLength($.maxItems))}else if(Array.isArray(G)){let X=typeof $.minItems==="number"?$.minItems:0,W=G.map((D)=>X6(D,_)),T=o3(W,X),F=s3($.additionalItems,_),E=a$.tuple(T);if(J=F?E.rest(F):E,typeof $.minItems==="number")J=J.check(a$.minLength($.minItems));if(typeof $.maxItems==="number")J=J.check(a$.maxLength($.maxItems))}else if(G!==void 0){let X=X6(G,_),W=a$.array(X);if(typeof $.minItems==="number")W=W.min($.minItems);if(typeof $.maxItems==="number")W=W.max($.maxItems);J=W}else J=a$.array(a$.any());if($.uniqueItems===!0||$.contains!==void 0)J=Bd(J,{uniqueItems:$.uniqueItems===!0,containsSchema:$.contains!==void 0?X6($.contains,_):void 0,minContains:typeof $.minContains==="number"?$.minContains:void 0,maxContains:typeof $.maxContains==="number"?$.maxContains:void 0});break}default:throw Error(`Unsupported type: ${I}`)}return J}function X6($,_){if(typeof $==="boolean")return $?a$.any():a$.never();let I=e3($,_),J=$.type||$.enum!==void 0||$.const!==void 0;if($.anyOf&&Array.isArray($.anyOf)){let W=$.anyOf.map((F)=>X6(F,_)),T=a$.union(W);I=J?a$.intersection(I,T):T}if($.oneOf&&Array.isArray($.oneOf)){let W=$.oneOf.map((F)=>X6(F,_)),T=a$.xor(W);I=J?a$.intersection(I,T):T}if($.allOf&&Array.isArray($.allOf))if($.allOf.length===0)I=J?I:a$.any();else{let W=J?I:X6($.allOf[0],_),T=J?0:1;for(let F=T;F<$.allOf.length;F++)W=a$.intersection(W,X6($.allOf[F],_));I=W}if($.nullable===!0&&_.version==="openapi-3.0")I=a$.nullable(I);if($.readOnly===!0)I=a$.readonly(I);if($.default!==void 0)I=I.default($.default);let j={},G=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let W of G)if(W in $)j[W]=$[W];let X=["contentEncoding","contentMediaType","contentSchema"];for(let W of X)if(W in $)j[W]=$[W];if($.type==="object"&&$.$ref===void 0){if($.propertyNames!==void 0&&!qL($.propertyNames))j.propertyNames=$.propertyNames;for(let W of["minProperties","maxProperties"])if($[W]!==void 0)j[W]=$[W]}if($.type==="array"&&$.$ref===void 0){if($.contains!==void 0&&!qL($.contains))j.contains=$.contains;for(let W of["uniqueItems","minContains","maxContains"])if($[W]!==void 0)j[W]=$[W]}for(let W of Object.keys($))if(!Rd.has(W))QU(j,W,$[W]);if(Object.keys(j).length>0)_.registry.add(I,j);if($.description)I=I.describe($.description);return I}function $k($,_){if(typeof $==="boolean")return $?a$.any():a$.never();let I;try{I=JSON.parse(JSON.stringify($))}catch{throw Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let J=Pd(I,_?.defaultTarget),j=I.$defs||I.definitions||{},G={version:J,defs:j,refs:new Map,processing:new Set,rootSchema:I,registry:_?.registry??zU};return X6(I,G)}var vk=Symbol("z.visit/resolving");function gL($,_){let I=typeof _==="function"?_:(X,W)=>{let T=_[X._zod.def.type];return T?T(X,W):X},J=new Map;function j(X){let W=J.get(X);if(W===vk)return new e5({type:"lazy",getter:()=>J.get(X)});if(W!==void 0)return W;J.set(X,vk);let T=G(X),F=I(T,T!==X);return J.set(X,F),F}function G(X){let W=X._zod.def,T=W.type;switch(T){case"object":{let F=W.shape,E=Object.keys(F),D=!1,q={};for(let k of E){let y=j(F[k]);if(y!==F[k])D=!0;q[k]=y}let S=W.catchall;if(W.catchall){if(S=j(W.catchall),S!==W.catchall)D=!0}return D?e2(X,{...W,shape:q,catchall:S}):X}case"array":{let F=j(W.element);return F===W.element?X:e2(X,{...W,element:F})}case"tuple":{let F=W.items,E=!1,D=[];for(let S of F){let k=j(S);if(k!==S)E=!0;D.push(k)}let q=W.rest;if(W.rest){if(q=j(W.rest),q!==W.rest)E=!0}return E?e2(X,{...W,items:D,rest:q}):X}case"record":case"map":{let F=j(W.keyType),E=j(W.valueType);return F===W.keyType&&E===W.valueType?X:e2(X,{...W,keyType:F,valueType:E})}case"set":{let F=j(W.valueType);return F===W.valueType?X:e2(X,{...W,valueType:F})}case"union":{let F=W.options,E=!1,D=[];for(let q of F){let S=j(q);if(S!==q)E=!0;D.push(S)}return E?e2(X,{...W,options:D}):X}case"intersection":{let F=j(W.left),E=j(W.right);return F===W.left&&E===W.right?X:e2(X,{...W,left:F,right:E})}case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":{let F=j(W.innerType);return F===W.innerType?X:e2(X,{...W,innerType:F})}case"pipe":{let F=j(W.in),E=j(W.out);return F===W.in&&E===W.out?X:e2(X,{...W,in:F,out:E})}case"function":{let F=j(W.input),E=j(W.output);return F===W.input&&E===W.output?X:e2(X,{...W,input:F,output:E})}case"lazy":{let F=W.getter,{_cachedInner:E,...D}=W;return e2(X,{...D,getter:()=>j(F())})}case"template_literal":case"string":case"number":case"int":case"boolean":case"bigint":case"symbol":case"undefined":case"null":case"void":case"never":case"any":case"unknown":case"date":case"nan":case"enum":case"literal":case"file":case"transform":case"custom":return X;default:return X}}return j($)}function _k($){return gL($,{object:(_)=>_.partial(),union:(_)=>{let I=_._zod.def;return I.discriminator===void 0?_:oZ(I.options)}})}function kd($,_){if(!_?.length)return $;let I=$._zod.def;return e2($,YX(I,{checks:[...I.checks??[],..._]}),{parent:!0})}function jk($){return kd($.out,$.checks)}function cd($){return $.in._zod.traits.has("$ZodTransform")?jk($):$.in}function Uk($){return gL($,{pipe:(_)=>cd(_._zod.def),default:(_,I)=>I?b8(_._zod.def.innerType):_,catch:(_,I)=>I?_._zod.def.innerType:_})}function Ik($){return gL($,{pipe:(_)=>jk(_._zod.def),prefault:(_,I)=>I?_._zod.def.innerType:_})}var _P={};_j(_P,{string:()=>xd,number:()=>fd,date:()=>hd,boolean:()=>yd,bigint:()=>bd});function xd($){return VV(lZ,$)}function fd($){return CV(dZ,$)}function yd($){return xV(rZ,$)}function bd($){return yV(tZ,$)}function hd($){return tV(HL,$)}var Xk=E1.object({id:E1.string().min(1).optional(),name:E1.string().min(1).optional(),kind:E1.enum(["human","agent","bot","system"])}),Gk=E1.object({type:E1.string().min(1),id:E1.string().min(1)}),Yk=E1.object({provider:E1.string().min(1),id:E1.string().min(1).optional(),url:E1.string().min(1).optional(),cursor:E1.string().min(1).optional(),rawRef:E1.string().min(1).optional()}),jP=E1.object({id:E1.string().min(1),service:E1.string().min(1),type:E1.string().min(1),schemaVersion:E1.number().int().positive(),idempotencyKey:E1.string().min(1),occurredAt:E1.string().min(1),observedAt:E1.string().min(1),origin:E1.enum(["virtual","external","agent","connector","replay","migration"]),actor:Xk.optional(),subject:Gk,causationId:E1.string().min(1).optional(),correlationId:E1.string().min(1).optional(),external:Yk.optional(),data:E1.record(E1.string(),E1.unknown()),raw:E1.record(E1.string(),E1.unknown()).optional()}),Jk=E1.object({version:E1.literal(1),service:E1.string().min(1),rebuiltAt:E1.string().min(1),eventCount:E1.number().int().nonnegative(),latestEventId:E1.string().min(1).optional(),subjects:E1.record(E1.string(),E1.object({type:E1.string().min(1),id:E1.string().min(1),latestEventId:E1.string().min(1),latestType:E1.string().min(1),updatedAt:E1.string().min(1)}))});function Qk($){return ZI($||process.env.PROJECT_ROOT||process.cwd())}function R9(){let $=process.env.VOLTER_STATE_DIR||".volter";if(tJ($)||$.split(/[\\/]/).includes(".."))throw Error("VOLTER_STATE_DIR must be a relative directory without .. segments");return $}function qK($){return F2(Qk($),R9(),"world")}function nd($){if(!/^[A-Za-z0-9_-]+$/.test($))throw Error(`Invalid world service name: ${$}`);return $}var UP;function zk($){let _=UP;return UP=$,_}var id=0;function H4($,_){let I=nd($);if(id===0)UP?.(I,_);let J=Qk(_),j=F2(qK(_),I);return{root:J,service:I,dir:j,events:F2(j,"events.jsonl"),state:F2(j,"state.json"),resources:F2(j,"resources"),cursors:F2(j,"cursors"),ingests:F2(j,"ingests"),eventQueue:F2(j,"event-queue.jsonl")}}var pd={windowMs:60000,ceiling:60,defaultWeight:2,maxRetryAfterSeconds:300,rules:[],reason:"no pack declared a budget for this vendor — this is the conservative fallback (30 calls/min at "+"the default weight), not a considered limit. Declare one on the pack with the vendor's real limits."};jj();var Zk="2.0",od=Number(Zk.split(".")[0]);var $r=Q2(Lk(),1);Mv();jj();var{AsyncLocalStorage:Rj0}=(()=>({}));jj();var{AsyncLocalStorage:Dj0}=(()=>({}));var Kj0="0".repeat(32),Hj0="0".repeat(16);var{AsyncLocalStorage:gr}=(()=>({}));var Lr;function Fk($){Lr=$}var GP="/__volter/world-boot";var{chmodSync:rj0,existsSync:tj0,mkdirSync:oj0,readFileSync:aj0,writeFileSync:sj0}=(()=>({}));jj();Mv();jj();var Cr=1e6,wr=/(?:^|[-_.])(?:auth|authorization|token|jwt|key|apikey|secret|credential|credentials|signature|sig|password|passwd|pwd|session|sessionid|cookie|access[-_]?token|refresh[-_]?token)(?:[-_.]|$)/i,Nr=/^(Bearer|Basic|Digest|Token|Negotiate|NTLM|OAuth|Signature|Hawk|AWS4-HMAC-SHA256|SharedKey|SharedKeyLite|GoogleLogin)\s+(\S[\s\S]*)$/i;function Ek($){return`sha256:${JU("sha256").update($,"utf8").digest("hex").slice(0,16)}`}function Br($,_,I){let J=Nr.exec(_);if(!J&&!wr.test($))return;let j=$.toLowerCase();if(_==="")return{name:j,in:I,empty:!0};if(J)return{name:j,in:I,scheme:J[1],fp:Ek(J[2])};return{name:j,in:I,fp:Ek(_)}}function qk($,_){let I=[],J=new Set,j=(G,X,W)=>{let T=Br(G,X,W);if(!T)return;let F=`${T.in}:${T.name}`;if(J.has(F))return;J.add(F),I.push(T)};try{if(typeof $.forEach==="function")$.forEach((G,X)=>j(X,G,"header"));else for(let[G,X]of Object.entries($))j(G,String(X),"header")}catch{}try{if(_!==void 0){let G=typeof _==="string"?new URL(_,"http://twin.invalid").search:_.search;for(let[X,W]of new URLSearchParams(G))j(X,W,"query")}}catch{}return I.sort((G,X)=>G.in===X.in?G.name.localeCompare(X.name):G.in.localeCompare(X.in))}function JP($=process.env){return $.VOLTER_TWIN_REQUEST_JOURNAL!=="0"}function gk($,_){return F2(W_(H4($,_).events),"requests.jsonl")}function Ck($,_,I){if(!JP())return;try{let J=gU(),j=gk($,I);if(J.mkdir(W_(j)),(J.stat(j)?.size??0)>=Cr)J.writeAtomic(`${j}.1`,J.read(j)??""),J.write(j,"");let X=JSON.stringify({at:_.at??new Date().toISOString(),method:_.method.toUpperCase(),path:_.path.split("?")[0],status:_.status,...typeof _.ms==="number"?{ms:_.ms}:{},..._.credentials?.length?{credentials:_.credentials}:{}});J.append(j,`${X}
516
+ `)}catch{}}var wk=Symbol.for("volter.twin.requestJournal.identity"),Vk=Symbol.for("volter.twin.requestJournal.installed"),YP;function Sr(){return YP??=new gr,YP}function kr(){zk(($,_)=>{let I=YP?.getStore();if(!I||I.identity!==void 0)return;I.identity=_===void 0?{service:$}:{service:$,root:_}})}function cr($=process.argv){let _=$.indexOf("--root"),I=_>=0?$[_+1]:void 0;return I&&!I.startsWith("--")?I:void 0}var xr=new Set(["world-runtime","world-tooling","world-attach","world-browser-assets","world-host"]);function Tk($){if(!$)return;let _=/(?:packages[\\/]twin[\\/]|@volter[\\/]twin-)([A-Za-z0-9_-]+)/g;for(let I of $.matchAll(_)){let J=I[1];if(!xr.has(J))return J}return}function fr(){if(typeof window<"u"||typeof document<"u")return!1;let $=globalThis.Bun,_=$&&typeof $.serve==="function"?$.serve:void 0;if(_&&_[Vk])return!0;if(kr(),Fk((J)=>Rk(J,Tk(Error().stack))),!_)return!1;let I=function(j,...G){let X=j;if(!X||typeof X.fetch!=="function")return _.apply(this,[j,...G]);let W=X[wk]?void 0:Tk(Error().stack);return _.apply(this,[{...X,fetch:Rk(X,W)},...G])};return Object.defineProperty(I,Vk,{value:!0}),$.serve=I,!0}function Rk($,_){if($.twinRequestJournal===!1)return $.fetch;{let J=$[wk],j=$.fetch;return async function(X,W){if(!JP()||new URL(X.url).pathname===GP)return j.call(this,X,W);let T={},F=500,E=Date.now();try{let D=await Sr().run(T,()=>j.call(this,X,W));if(D instanceof Response)F=D.status;else if(D===void 0)return D;return D}finally{J??=T.identity;let D=J??yr(_);if(D){let q=new URL(X.url);Ck(D.service,{method:X.method,path:q.pathname,status:F,ms:Date.now()-E,credentials:qk(X.headers,q)},D.root)}}}}}function yr($){let _=process.env.VOLTER_TWIN_JOURNAL_SERVICE||$;if(!_||!/^[A-Za-z0-9_-]+$/.test(_))return;let I=cr();return I===void 0?{service:_}:{service:_,root:I}}fr();Mv();var cU0=Symbol("absent");jj();Mv();jj();var{closeSync:$t,existsSync:BL,mkdirSync:vt,openSync:_t,readdirSync:jt,readFileSync:Ut,readSync:It,renameSync:Xt,rmSync:mk,statSync:OP,writeFileSync:Gt}=(()=>({}));Mv();jj();var{closeSync:zP,constants:n8,fstatSync:ck,ftruncateSync:dr,linkSync:rr,lstatSync:QP,mkdirSync:tr,openSync:ZP,readFileSync:or,readSync:Bk,rmSync:ar,writeFileSync:sr}=(()=>({}));var xk=131072,fk=32,yk=4;function bk($){return $.isFile()&&$.nlink===1&&(!process.getuid||$.uid===process.getuid())&&($.mode&63)===0}function Sk($){try{let _=QP($);return _.isDirectory()&&(_.mode&63)===0&&(!process.getuid||_.uid===process.getuid())}catch{return!1}}function kk($){let _;try{_=ZP($,n8.O_RDONLY|n8.O_NONBLOCK|(n8.O_NOFOLLOW??0));let I=ck(_);if(!bk(I)||I.size>xk)return{};let J=JSON.parse(or(_,"utf8"));if(!J||typeof J!=="object"||Array.isArray(J))return{};let j={};for(let[G,X]of Object.entries(J).slice(-fk)){if(!/^\d+:[a-f0-9]{64}$/.test(G)||!Array.isArray(X))continue;j[G]=X.filter((W)=>typeof W==="string"&&W.length<=4096&&tJ(W)).slice(0,yk)}return j}catch{return{}}finally{if(_!==void 0)zP(_)}}function er($,_){let I=ZP($,"r");try{let J=JU("sha256"),j=Buffer.allocUnsafe(65536),G=_;while(G>0){let X=Bk(I,j,0,Math.min(j.length,G),null);if(!X)return null;J.update(j.subarray(0,X)),G-=X}if(Bk(I,j,0,1,null))return null;return J.digest("hex")}finally{zP(I)}}function hk($,_,I){let J=F2($,`${I.slice(0,2)}.json`),j=`${_}:${I}`;return{reuse(G,X){if(!Sk($))return!1;for(let W of kk(J)[j]??[]){try{let T=QP(W);if(!T.isFile()||T.dev!==_||T.size!==X||process.getuid&&T.uid!==process.getuid())continue;rr(W,G);let F=QP(G);if(F.isFile()&&F.dev===_&&F.size===X&&(!process.getuid||F.uid===process.getuid())&&er(G,X)===I)return!0}catch{}ar(G,{force:!0})}return!1},record(G){try{let X=ZI(G);if(X.length>4096)return;let W=kk(J),T=[X,...(W[j]??[]).filter((D)=>D!==X)].slice(0,yk);delete W[j],W[j]=T;let F=JSON.stringify(W);while(Object.keys(W).length>fk||Buffer.byteLength(F)>xk)delete W[Object.keys(W)[0]],F=JSON.stringify(W);if(tr($,{recursive:!0,mode:448}),!Sk($))return;let E=ZP(J,n8.O_WRONLY|n8.O_CREAT|n8.O_NONBLOCK|(n8.O_NOFOLLOW??0),384);try{if(!bk(ck(E)))return;dr(E,0),sr(E,F)}finally{zP(E)}}catch{}}}}class LP{options;constructor($={}){this.options=$}async get($){if(!BL($))return null;return new Uint8Array(Ut($))}async put($,_){vt(W_($),{recursive:!0});let I=`${$}.tmp.${JZ()}`,J;try{if(this.options.sharedIndexRoot!==!1)try{J=hk(this.options.sharedIndexRoot??F2(T5(),"blob-index-v1"),OP(W_($)).dev,uk(_))}catch{}if(!J?.reuse(I,_.byteLength))Gt(I,_,{flag:"wx"});Xt(I,$),J?.record($)}finally{mk(I,{force:!0})}}async exists($){return BL($)}async remove($){mk($,{force:!0,recursive:$.endsWith("/")})}async list($){let _=[],I=(J)=>{if(!BL(J))return;for(let j of jt(J,{withFileTypes:!0})){let G=F2(J,j.name);if(j.isDirectory())I(G);else if(!j.name.includes(".tmp."))_.push(G)}};return I($.replace(/\/$/,"")),_.sort()}async size($){if(!BL($))return null;return OP($).size}async getRange($,_,I){if(!BL($))return null;let J=OP($).size,j=Math.max(0,_),G=Math.min(I,J-1);if(G<j)return new Uint8Array(0);let X=new Uint8Array(G-j+1),W=_t($,"r"),T=0;try{while(T<X.length){let F=It(W,X,T,X.length-T,j+T);if(F===0)break;T+=F}}finally{$t(W)}return T===X.length?X:X.subarray(0,T)}}function uk($){return JU("sha256").update($).digest("hex")}var eU0=new LP;SL();RP();jj();Mv();var{existsSync:g60,readFileSync:C60,statSync:w60}=(()=>({}));class ot{buf=new Uint8Array(65536);len=0;push($){if(this.len===this.buf.length){let _=new Uint8Array(this.buf.length*2);_.set(this.buf),this.buf=_}this.buf[this.len++]=$}copy($,_){if($>this.len)throw Error("inflate: distance too far back");for(let I=0;I<_;I++)this.push(this.buf[this.len-$])}bytes(){return this.buf.slice(0,this.len)}}var a60="0".repeat(40),s60=new Uint8Array([48,48,48,48]);var{AsyncLocalStorage:z40}=(()=>({}));var{AsyncLocalStorage:K40}=(()=>({}));var{existsSync:A40,readFileSync:M40,statSync:E40}=(()=>({}));var{existsSync:R40,readFileSync:P40}=(()=>({}));jj();var{existsSync:C40}=(()=>({}));jj();var{AsyncLocalStorage:Yo}=(()=>({}));var yJ0=new Yo;Mv();Mv();var Yx=Q2(Gx(),1),Cs=Q2(yL(),1);Mv();var XQ0=Object.freeze({"x-hubspot-ratelimit-max":"190","x-hubspot-ratelimit-interval-milliseconds":"10000","x-hubspot-ratelimit-daily":"625000"});var Ns=["EQ","NEQ","LT","LTE","GT","GTE","BETWEEN","IN","NOT_IN","HAS_PROPERTY","NOT_HAS_PROPERTY","CONTAINS_TOKEN","NOT_CONTAINS_TOKEN"],GQ0=new Set(Ns);Mv();var ks=Q2(Jx(),1),cs=Q2(Qx(),1),hK,iP;hK=ks,iP=cs;var{version:xs,renderToString:fs,renderToStaticMarkup:zx}=hK,ys=iP.renderToReadableStream,bs=iP.resume;var Zx=Q2(Mj(),1);var ms=Q2(Mj(),1);var us=Q2(Mj(),1);var ns=Q2(Mj(),1);var ts=Q2(Mj(),1);var os=Q2(Mj(),1);var $e=Q2(Mj(),1);var ve=Q2(Mj(),1);var tP=[{key:"contacts",label:"Contacts",path:"/crm/v3/objects/contacts?limit=100&properties=email,firstname,lastname,phone,lifecyclestage"},{key:"companies",label:"Companies",path:"/crm/v3/objects/companies?limit=100&properties=name,domain,city,industry"},{key:"deals",label:"Deals",path:"/crm/v3/objects/deals?limit=100&properties=dealname,amount,dealstage,pipeline,closedate"},{key:"tickets",label:"Tickets",path:"/crm/v3/objects/tickets?limit=100&properties=subject,content,hs_pipeline_stage,hs_ticket_priority"}],Mx={contacts:[{prop:"firstname",label:"First name"},{prop:"lastname",label:"Last name"},{prop:"email",label:"Email"},{prop:"phone",label:"Phone"},{prop:"lifecyclestage",label:"Lifecycle stage"}],companies:[{prop:"name",label:"Name"},{prop:"domain",label:"Domain"},{prop:"city",label:"City"},{prop:"industry",label:"Industry"}],deals:[{prop:"dealname",label:"Deal name"},{prop:"amount",label:"Amount"},{prop:"dealstage",label:"Stage"},{prop:"closedate",label:"Close date"}],tickets:[{prop:"subject",label:"Ticket name"},{prop:"hs_ticket_priority",label:"Priority"},{prop:"hs_pipeline_stage",label:"Status"}]},_e={contacts:["firstname","lastname","email"],companies:["name","domain"],deals:["dealname"],tickets:["subject"]};function uK($,_){let I=_??{},J=_e[$].map((j)=>I[j]).filter((j)=>typeof j==="string"&&j!=="");return J.length?J.join(" "):"(no name)"}function oP($){let _=String($??"").toLowerCase();if(_==="")return"";if(_==="closedwon")return"ok";if(_==="closedlost")return"bad";return"warn"}function aP($){let _=Number($);if($===null||$===void 0||$===""||!Number.isFinite(_))return"—";return`$${_.toLocaleString("en-US",{maximumFractionDigits:2})}`}function Ex($){let _=new Map;for(let I of $){let J=String(I.properties?.dealstage??"")||"unstaged",j=_.get(J);if(j)j.push(I);else _.set(J,[I])}return[..._.entries()].sort((I,J)=>I[0].localeCompare(J[0])).map(([I,J])=>({stage:I,rows:J}))}var h1=Q2(Mj(),1),je=typeof document>"u"||document.querySelector("base[href]")===null?"":new URL(".",document.baseURI).pathname.replace(/\/$/,""),Rx={ok:"pill pill-ok",warn:"pill pill-warn",bad:"pill pill-bad","":"pill"};async function Ue($){let I=await(await fetch(`${je}${$}`)).json();return Array.isArray(I.results)?I.results:[]}function Ie({section:$,rows:_}){if(_.length===0)return h1.jsxDEV("div",{className:"empty",children:["No ",$," yet."]},void 0,!0,void 0,this);let I=Mx[$];return h1.jsxDEV("table",{className:"records-table",children:[h1.jsxDEV("thead",{children:h1.jsxDEV("tr",{children:[h1.jsxDEV("th",{children:"Name"},void 0,!1,void 0,this),I.map((J)=>h1.jsxDEV("th",{children:J.label},J.prop,!1,void 0,this)),h1.jsxDEV("th",{children:"Record ID"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),h1.jsxDEV("tbody",{children:_.map((J)=>h1.jsxDEV("tr",{className:"list-row","data-record-id":J.id,children:[h1.jsxDEV("td",{className:"cell-title",children:uK($,J.properties)},void 0,!1,void 0,this),I.map((j)=>h1.jsxDEV("td",{className:"cell-prop",children:j.prop==="amount"?aP(J.properties?.amount):j.prop==="dealstage"?h1.jsxDEV("span",{className:Rx[oP(J.properties?.dealstage)],children:J.properties?.dealstage??"—"},void 0,!1,void 0,this):J.properties?.[j.prop]??"—"},j.prop,!1,void 0,this)),h1.jsxDEV("td",{className:"cell-id",children:J.id},void 0,!1,void 0,this)]},J.id,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function Xe({rows:$}){let _=Ex($);if(_.length===0)return h1.jsxDEV("div",{className:"empty",children:"No deals yet."},void 0,!1,void 0,this);return h1.jsxDEV("div",{className:"deal-board",children:_.map((I)=>h1.jsxDEV("section",{className:"board-column","data-stage":I.stage,children:[h1.jsxDEV("header",{className:"board-column-head",children:[h1.jsxDEV("span",{className:Rx[oP(I.stage)],children:I.stage},void 0,!1,void 0,this),h1.jsxDEV("span",{className:"board-count",children:I.rows.length},void 0,!1,void 0,this)]},void 0,!0,void 0,this),I.rows.map((J)=>h1.jsxDEV("article",{className:"deal-card list-row","data-record-id":J.id,children:[h1.jsxDEV("div",{className:"cell-title",children:uK("deals",J.properties)},void 0,!1,void 0,this),h1.jsxDEV("div",{className:"deal-amount",children:aP(J.properties?.amount)},void 0,!1,void 0,this)]},J.id,!0,void 0,this))]},I.stage,!0,void 0,this))},void 0,!1,void 0,this)}function Yz0({section:$,rows:_}){let I=_[0];if(!I)return h1.jsxDEV("div",{className:"empty",children:"No record."},void 0,!1,void 0,this);let J=Object.entries(I.properties??{});return h1.jsxDEV("section",{className:"record-detail","data-record-id":I.id,children:[h1.jsxDEV("h2",{className:"detail-title",children:uK($,I.properties)},void 0,!1,void 0,this),h1.jsxDEV("table",{className:"property-table",children:h1.jsxDEV("tbody",{children:J.map(([j,G])=>h1.jsxDEV("tr",{className:"list-row","data-prop":j,children:[h1.jsxDEV("td",{className:"cell-prop-name",children:j},void 0,!1,void 0,this),h1.jsxDEV("td",{className:"cell-prop-value",children:G??"—"},void 0,!1,void 0,this)]},j,!0,void 0,this))},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function Ge(){let[$,_]=jO.useState("contacts"),[I,J]=jO.useState(!1),[j,G]=jO.useState([]);return jO.useEffect(()=>{let X=tP.find((W)=>W.key===$);Ue(X.path).then(G).catch(()=>G([]))},[$]),h1.jsxDEV("div",{className:"app",children:[h1.jsxDEV("header",{className:"topbar",children:[h1.jsxDEV("span",{className:"brand",children:"HubSpot twin"},void 0,!1,void 0,this),$==="deals"?h1.jsxDEV("button",{className:"view-toggle",onClick:()=>J((X)=>!X),children:I?"Table":"Board"},void 0,!1,void 0,this):null]},void 0,!0,void 0,this),h1.jsxDEV("nav",{className:"sidebar",children:tP.map((X)=>h1.jsxDEV("button",{className:`nav-item${X.key===$?" active":""}`,onClick:()=>{_(X.key),J(!1)},children:X.label},X.key,!1,void 0,this))},void 0,!1,void 0,this),h1.jsxDEV("main",{className:"content",children:$==="deals"&&I?h1.jsxDEV(Xe,{rows:j},void 0,!1,void 0,this):h1.jsxDEV(Ie,{section:$,rows:j},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}var Vx=typeof document<"u"?document.getElementById("root"):null;if(Vx)Tx.createRoot(Vx).render(h1.jsxDEV(Ge,{},void 0,!1,void 0,this));export{Ie as RecordsTable,Yz0 as RecordDetail,Xe as DealBoard};