@activepieces/piece-google-bigquery 0.0.7 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.js +82 -44
package/src/index.js CHANGED
@@ -1,59 +1,97 @@
1
- "use strict";var kT=Object.create;var hi=Object.defineProperty;var $T=Object.getOwnPropertyDescriptor;var zT=Object.getOwnPropertyNames;var NT=Object.getPrototypeOf,DT=Object.prototype.hasOwnProperty;var o=(t,e)=>hi(t,"name",{value:e,configurable:!0});var ct=(t,e,r)=>()=>{if(r)throw r[0];try{return t&&(e=t(t=0)),e}catch(n){throw r=[n],n}};var L=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(r){throw e=0,r}},qa=(t,e)=>{for(var r in e)hi(t,r,{get:e[r],enumerable:!0})},Qf=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of zT(e))!DT.call(t,i)&&i!==r&&hi(t,i,{get:()=>e[i],enumerable:!(n=$T(e,i))||n.enumerable});return t};var yt=(t,e,r)=>(r=t!=null?kT(NT(t)):{},Qf(e||!t||!t.__esModule?hi(r,"default",{value:t,enumerable:!0}):r,t)),UT=t=>Qf(hi({},"__esModule",{value:!0}),t);var Ph=L((Eh,ls)=>{(function(t){"use strict";let e="(0?\\d+|0x[a-f0-9]+)",r={fourOctet:new RegExp(`^${e}\\.${e}\\.${e}\\.${e}$`,"i"),threeOctet:new RegExp(`^${e}\\.${e}\\.${e}$`,"i"),twoOctet:new RegExp(`^${e}\\.${e}$`,"i"),longValue:new RegExp(`^${e}$`,"i")},n=new RegExp("^0[0-7]+$","i"),i=new RegExp("^0x[a-f0-9]+$","i"),u="%[0-9a-z]{1,}",c="(?:[0-9a-f]+::?)+",l={zoneIndex:new RegExp(u,"i"),native:new RegExp(`^(::)?(${c})?([0-9a-f]+)?(::)?(${u})?$`,"i"),deprecatedTransitional:new RegExp(`^(?:::)(${e}\\.${e}\\.${e}\\.${e}(${u})?)$`,"i"),transitional:new RegExp(`^((?:${c})|(?:::)(?:${c})?)${e}\\.${e}\\.${e}\\.${e}(${u})?$`,"i")};function p(h,b){if(h.indexOf("::")!==h.lastIndexOf("::"))return null;let T=0,E=-1,w=(h.match(l.zoneIndex)||[])[0],k,q;for(w&&(w=w.substring(1),h=h.replace(/%.+$/,""));(E=h.indexOf(":",E+1))>=0;)T++;if(h.substr(0,2)==="::"&&T--,h.substr(-2,2)==="::"&&T--,T>b)return null;for(q=b-T,k=":";q--;)k+="0:";return h=h.replace("::",k),h[0]===":"&&(h=h.slice(1)),h[h.length-1]===":"&&(h=h.slice(0,-1)),b=(function(){let W=h.split(":"),H=[];for(let V=0;V<W.length;V++)H.push(parseInt(W[V],16));return H})(),{parts:b,zoneId:w}}o(p,"expandIPv6");function f(h,b,T,E){if(h.length!==b.length)throw new Error("ipaddr: cannot match CIDR for objects with different lengths");let w=0,k;for(;E>0;){if(k=T-E,k<0&&(k=0),h[w]>>k!==b[w]>>k)return!1;E-=T,w+=1}return!0}o(f,"matchCIDR");function m(h){if(i.test(h))return parseInt(h,16);if(h[0]==="0"&&!isNaN(parseInt(h[1],10))){if(n.test(h))return parseInt(h,8);throw new Error(`ipaddr: cannot parse ${h} as octal`)}return parseInt(h,10)}o(m,"parseIntAuto");function y(h,b){for(;h.length<b;)h=`0${h}`;return h}o(y,"padPart");let P={};P.IPv4=(function(){function h(b){if(b.length!==4)throw new Error("ipaddr: ipv4 octet count should be 4");let T,E;for(T=0;T<b.length;T++)if(E=b[T],!(0<=E&&E<=255))throw new Error("ipaddr: ipv4 octet should fit in 8 bits");this.octets=b}return o(h,"IPv4"),h.prototype.SpecialRanges={unspecified:[[new h([0,0,0,0]),8]],broadcast:[[new h([255,255,255,255]),32]],multicast:[[new h([224,0,0,0]),4]],linkLocal:[[new h([169,254,0,0]),16]],loopback:[[new h([127,0,0,0]),8]],carrierGradeNat:[[new h([100,64,0,0]),10]],private:[[new h([10,0,0,0]),8],[new h([172,16,0,0]),12],[new h([192,168,0,0]),16]],reserved:[[new h([192,0,0,0]),24],[new h([192,0,2,0]),24],[new h([192,88,99,0]),24],[new h([198,18,0,0]),15],[new h([198,51,100,0]),24],[new h([203,0,113,0]),24],[new h([240,0,0,0]),4]],as112:[[new h([192,175,48,0]),24],[new h([192,31,196,0]),24]],amt:[[new h([192,52,193,0]),24]]},h.prototype.kind=function(){return"ipv4"},h.prototype.match=function(b,T){let E;if(T===void 0&&(E=b,b=E[0],T=E[1]),b.kind()!=="ipv4")throw new Error("ipaddr: cannot match ipv4 address with non-ipv4 one");return f(this.octets,b.octets,8,T)},h.prototype.prefixLengthFromSubnetMask=function(){let b=0,T=!1,E={0:8,128:7,192:6,224:5,240:4,248:3,252:2,254:1,255:0},w,k,q;for(w=3;w>=0;w-=1)if(k=this.octets[w],k in E){if(q=E[k],T&&q!==0)return null;q!==8&&(T=!0),b+=q}else return null;return 32-b},h.prototype.range=function(){return P.subnetMatch(this,this.SpecialRanges)},h.prototype.toByteArray=function(){return this.octets.slice(0)},h.prototype.toIPv4MappedAddress=function(){return P.IPv6.parse(`::ffff:${this.toString()}`)},h.prototype.toNormalizedString=function(){return this.toString()},h.prototype.toString=function(){return this.octets.join(".")},h})(),P.IPv4.broadcastAddressFromCIDR=function(h){try{let b=this.parseCIDR(h),T=b[0].toByteArray(),E=this.subnetMaskFromPrefixLength(b[1]).toByteArray(),w=[],k=0;for(;k<4;)w.push(parseInt(T[k],10)|parseInt(E[k],10)^255),k++;return new this(w)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},P.IPv4.isIPv4=function(h){return this.parser(h)!==null},P.IPv4.isValid=function(h){try{return new this(this.parser(h)),!0}catch{return!1}},P.IPv4.isValidCIDR=function(h){try{return this.parseCIDR(h),!0}catch{return!1}},P.IPv4.isValidFourPartDecimal=function(h){return!!(P.IPv4.isValid(h)&&h.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/))},P.IPv4.isValidCIDRFourPartDecimal=function(h){let b=h.match(/^(.+)\/(\d+)$/);return!P.IPv4.isValidCIDR(h)||!b?!1:P.IPv4.isValidFourPartDecimal(b[1])},P.IPv4.networkAddressFromCIDR=function(h){let b,T,E,w,k;try{for(b=this.parseCIDR(h),E=b[0].toByteArray(),k=this.subnetMaskFromPrefixLength(b[1]).toByteArray(),w=[],T=0;T<4;)w.push(parseInt(E[T],10)&parseInt(k[T],10)),T++;return new this(w)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},P.IPv4.parse=function(h){let b=this.parser(h);if(b===null)throw new Error("ipaddr: string is not formatted like an IPv4 Address");return new this(b)},P.IPv4.parseCIDR=function(h){let b;if(b=h.match(/^(.+)\/(\d+)$/)){let T=parseInt(b[2]);if(T>=0&&T<=32){let E=[this.parse(b[1]),T];return Object.defineProperty(E,"toString",{value:o(function(){return this.join("/")},"value")}),E}}throw new Error("ipaddr: string is not formatted like an IPv4 CIDR range")},P.IPv4.parser=function(h){let b,T,E;if(b=h.match(r.fourOctet))return(function(){let w=b.slice(1,6),k=[];for(let q=0;q<w.length;q++)T=w[q],k.push(m(T));return k})();if(b=h.match(r.longValue)){if(E=m(b[1]),E>4294967295||E<0)throw new Error("ipaddr: address outside defined range");return(function(){let w=[],k;for(k=0;k<=24;k+=8)w.push(E>>k&255);return w})().reverse()}else return(b=h.match(r.twoOctet))?(function(){let w=b.slice(1,4),k=[];if(E=m(w[1]),E>16777215||E<0)throw new Error("ipaddr: address outside defined range");return k.push(m(w[0])),k.push(E>>16&255),k.push(E>>8&255),k.push(E&255),k})():(b=h.match(r.threeOctet))?(function(){let w=b.slice(1,5),k=[];if(E=m(w[2]),E>65535||E<0)throw new Error("ipaddr: address outside defined range");return k.push(m(w[0])),k.push(m(w[1])),k.push(E>>8&255),k.push(E&255),k})():null},P.IPv4.subnetMaskFromPrefixLength=function(h){if(h=parseInt(h),h<0||h>32)throw new Error("ipaddr: invalid IPv4 prefix length");let b=[0,0,0,0],T=0,E=Math.floor(h/8);for(;T<E;)b[T]=255,T++;return E<4&&(b[E]=Math.pow(2,h%8)-1<<8-h%8),new this(b)},P.IPv6=(function(){function h(b,T){let E,w;if(b.length===16)for(this.parts=[],E=0;E<=14;E+=2)this.parts.push(b[E]<<8|b[E+1]);else if(b.length===8)this.parts=b;else throw new Error("ipaddr: ipv6 part count should be 8 or 16");for(E=0;E<this.parts.length;E++)if(w=this.parts[E],!(0<=w&&w<=65535))throw new Error("ipaddr: ipv6 part should fit in 16 bits");T&&(this.zoneId=T)}return o(h,"IPv6"),h.prototype.SpecialRanges={unspecified:[new h([0,0,0,0,0,0,0,0]),128],linkLocal:[new h([65152,0,0,0,0,0,0,0]),10],multicast:[new h([65280,0,0,0,0,0,0,0]),8],loopback:[new h([0,0,0,0,0,0,0,1]),128],uniqueLocal:[new h([64512,0,0,0,0,0,0,0]),7],ipv4Mapped:[new h([0,0,0,0,0,65535,0,0]),96],discard:[new h([256,0,0,0,0,0,0,0]),64],rfc6145:[new h([0,0,0,0,65535,0,0,0]),96],rfc6052:[new h([100,65435,0,0,0,0,0,0]),96],"6to4":[new h([8194,0,0,0,0,0,0,0]),16],teredo:[new h([8193,0,0,0,0,0,0,0]),32],benchmarking:[new h([8193,2,0,0,0,0,0,0]),48],amt:[new h([8193,3,0,0,0,0,0,0]),32],as112v6:[[new h([8193,4,274,0,0,0,0,0]),48],[new h([9760,79,32768,0,0,0,0,0]),48]],deprecated:[new h([8193,16,0,0,0,0,0,0]),28],orchid2:[new h([8193,32,0,0,0,0,0,0]),28],droneRemoteIdProtocolEntityTags:[new h([8193,48,0,0,0,0,0,0]),28],reserved:[[new h([8193,0,0,0,0,0,0,0]),23],[new h([8193,3512,0,0,0,0,0,0]),32]]},h.prototype.isIPv4MappedAddress=function(){return this.range()==="ipv4Mapped"},h.prototype.kind=function(){return"ipv6"},h.prototype.match=function(b,T){let E;if(T===void 0&&(E=b,b=E[0],T=E[1]),b.kind()!=="ipv6")throw new Error("ipaddr: cannot match ipv6 address with non-ipv6 one");return f(this.parts,b.parts,16,T)},h.prototype.prefixLengthFromSubnetMask=function(){let b=0,T=!1,E={0:16,32768:15,49152:14,57344:13,61440:12,63488:11,64512:10,65024:9,65280:8,65408:7,65472:6,65504:5,65520:4,65528:3,65532:2,65534:1,65535:0},w,k;for(let q=7;q>=0;q-=1)if(w=this.parts[q],w in E){if(k=E[w],T&&k!==0)return null;k!==16&&(T=!0),b+=k}else return null;return 128-b},h.prototype.range=function(){return P.subnetMatch(this,this.SpecialRanges)},h.prototype.toByteArray=function(){let b,T=[],E=this.parts;for(let w=0;w<E.length;w++)b=E[w],T.push(b>>8),T.push(b&255);return T},h.prototype.toFixedLengthString=function(){let b=(function(){let E=[];for(let w=0;w<this.parts.length;w++)E.push(y(this.parts[w].toString(16),4));return E}).call(this).join(":"),T="";return this.zoneId&&(T=`%${this.zoneId}`),b+T},h.prototype.toIPv4Address=function(){if(!this.isIPv4MappedAddress())throw new Error("ipaddr: trying to convert a generic ipv6 address to ipv4");let b=this.parts.slice(-2),T=b[0],E=b[1];return new P.IPv4([T>>8,T&255,E>>8,E&255])},h.prototype.toNormalizedString=function(){let b=(function(){let E=[];for(let w=0;w<this.parts.length;w++)E.push(this.parts[w].toString(16));return E}).call(this).join(":"),T="";return this.zoneId&&(T=`%${this.zoneId}`),b+T},h.prototype.toRFC5952String=function(){let b=/((^|:)(0(:|$)){2,})/g,T=this.toNormalizedString(),E=0,w=-1,k;for(;k=b.exec(T);)k[0].length>w&&(E=k.index,w=k[0].length);return w<0?T:`${T.substring(0,E)}::${T.substring(E+w)}`},h.prototype.toString=function(){return this.toRFC5952String()},h})(),P.IPv6.broadcastAddressFromCIDR=function(h){try{let b=this.parseCIDR(h),T=b[0].toByteArray(),E=this.subnetMaskFromPrefixLength(b[1]).toByteArray(),w=[],k=0;for(;k<16;)w.push(parseInt(T[k],10)|parseInt(E[k],10)^255),k++;return new this(w)}catch(b){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${b})`)}},P.IPv6.isIPv6=function(h){return this.parser(h)!==null},P.IPv6.isValid=function(h){if(typeof h=="string"&&h.indexOf(":")===-1)return!1;try{let b=this.parser(h);return new this(b.parts,b.zoneId),!0}catch{return!1}},P.IPv6.isValidCIDR=function(h){if(typeof h=="string"&&h.indexOf(":")===-1)return!1;try{return this.parseCIDR(h),!0}catch{return!1}},P.IPv6.networkAddressFromCIDR=function(h){let b,T,E,w,k;try{for(b=this.parseCIDR(h),E=b[0].toByteArray(),k=this.subnetMaskFromPrefixLength(b[1]).toByteArray(),w=[],T=0;T<16;)w.push(parseInt(E[T],10)&parseInt(k[T],10)),T++;return new this(w)}catch(q){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${q})`)}},P.IPv6.parse=function(h){let b=this.parser(h);if(b.parts===null)throw new Error("ipaddr: string is not formatted like an IPv6 Address");return new this(b.parts,b.zoneId)},P.IPv6.parseCIDR=function(h){let b,T,E;if((T=h.match(/^(.+)\/(\d+)$/))&&(b=parseInt(T[2]),b>=0&&b<=128))return E=[this.parse(T[1]),b],Object.defineProperty(E,"toString",{value:o(function(){return this.join("/")},"value")}),E;throw new Error("ipaddr: string is not formatted like an IPv6 CIDR range")},P.IPv6.parser=function(h){let b,T,E,w,k,q;if(E=h.match(l.deprecatedTransitional))return this.parser(`::ffff:${E[1]}`);if(l.native.test(h))return p(h,8);if((E=h.match(l.transitional))&&(q=E[6]||"",b=E[1],E[1].endsWith("::")||(b=b.slice(0,-1)),b=p(b+q,6),b.parts)){for(k=[parseInt(E[2]),parseInt(E[3]),parseInt(E[4]),parseInt(E[5])],T=0;T<k.length;T++)if(w=k[T],!(0<=w&&w<=255))return null;return b.parts.push(k[0]<<8|k[1]),b.parts.push(k[2]<<8|k[3]),{parts:b.parts,zoneId:b.zoneId}}return null},P.IPv6.subnetMaskFromPrefixLength=function(h){if(h=parseInt(h),h<0||h>128)throw new Error("ipaddr: invalid IPv6 prefix length");let b=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],T=0,E=Math.floor(h/8);for(;T<E;)b[T]=255,T++;return E<16&&(b[E]=Math.pow(2,h%8)-1<<8-h%8),new this(b)},P.fromByteArray=function(h){let b=h.length;if(b===4)return new P.IPv4(h);if(b===16)return new P.IPv6(h);throw new Error("ipaddr: the binary input is neither an IPv6 nor IPv4 address")},P.isValid=function(h){return P.IPv6.isValid(h)||P.IPv4.isValid(h)},P.isValidCIDR=function(h){return P.IPv6.isValidCIDR(h)||P.IPv4.isValidCIDR(h)},P.parse=function(h){if(P.IPv6.isValid(h))return P.IPv6.parse(h);if(P.IPv4.isValid(h))return P.IPv4.parse(h);throw new Error("ipaddr: the address has neither IPv6 nor IPv4 format")},P.parseCIDR=function(h){try{return P.IPv6.parseCIDR(h)}catch{try{return P.IPv4.parseCIDR(h)}catch{throw new Error("ipaddr: the address has neither IPv6 nor IPv4 CIDR format")}}},P.process=function(h){let b=this.parse(h);return b.kind()==="ipv6"&&b.isIPv4MappedAddress()?b.toIPv4Address():b},P.subnetMatch=function(h,b,T){let E,w,k,q;T==null&&(T="unicast");for(w in b)if(Object.prototype.hasOwnProperty.call(b,w)){for(k=b[w],k[0]&&!(k[0]instanceof Array)&&(k=[k]),E=0;E<k.length;E++)if(q=k[E],h.kind()===q[0].kind()&&h.match.apply(h,q))return w}return T},typeof ls<"u"&&ls.exports?ls.exports=P:t.ipaddr=P})(Eh)});var wg=L((LH,Tg)=>{var Sg=require("stream").Stream,EA=require("util");Tg.exports=hr;function hr(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}o(hr,"DelayedStream");EA.inherits(hr,Sg);hr.create=function(t,e){var r=new this;e=e||{};for(var n in e)r[n]=e[n];r.source=t;var i=t.emit;return t.emit=function(){return r._handleEmit(arguments),i.apply(t,arguments)},t.on("error",function(){}),r.pauseStream&&t.pause(),r};Object.defineProperty(hr.prototype,"readable",{configurable:!0,enumerable:!0,get:o(function(){return this.source.readable},"get")});hr.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};hr.prototype.resume=function(){this._released||this.release(),this.source.resume()};hr.prototype.pause=function(){this.source.pause()};hr.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(t){this.emit.apply(this,t)}.bind(this)),this._bufferedEvents=[]};hr.prototype.pipe=function(){var t=Sg.prototype.pipe.apply(this,arguments);return this.resume(),t};hr.prototype._handleEmit=function(t){if(this._released){this.emit.apply(this,t);return}t[0]==="data"&&(this.dataSize+=t[1].length,this._checkIfMaxDataSizeExceeded()),this._bufferedEvents.push(t)};hr.prototype._checkIfMaxDataSizeExceeded=function(){if(!this._maxDataSizeExceeded&&!(this.dataSize<=this.maxDataSize)){this._maxDataSizeExceeded=!0;var t="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(t))}}});var Rg=L((BH,Ig)=>{var PA=require("util"),Ag=require("stream").Stream,xg=wg();Ig.exports=Xe;function Xe(){this.writable=!1,this.readable=!0,this.dataSize=0,this.maxDataSize=2*1024*1024,this.pauseStreams=!0,this._released=!1,this._streams=[],this._currentStream=null,this._insideLoop=!1,this._pendingNext=!1}o(Xe,"CombinedStream");PA.inherits(Xe,Ag);Xe.create=function(t){var e=new this;t=t||{};for(var r in t)e[r]=t[r];return e};Xe.isStreamLike=function(t){return typeof t!="function"&&typeof t!="string"&&typeof t!="boolean"&&typeof t!="number"&&!Buffer.isBuffer(t)};Xe.prototype.append=function(t){var e=Xe.isStreamLike(t);if(e){if(!(t instanceof xg)){var r=xg.create(t,{maxDataSize:1/0,pauseStream:this.pauseStreams});t.on("data",this._checkDataSize.bind(this)),t=r}this._handleErrors(t),this.pauseStreams&&t.pause()}return this._streams.push(t),this};Xe.prototype.pipe=function(t,e){return Ag.prototype.pipe.call(this,t,e),this.resume(),t};Xe.prototype._getNext=function(){if(this._currentStream=null,this._insideLoop){this._pendingNext=!0;return}this._insideLoop=!0;try{do this._pendingNext=!1,this._realGetNext();while(this._pendingNext)}finally{this._insideLoop=!1}};Xe.prototype._realGetNext=function(){var t=this._streams.shift();if(typeof t>"u"){this.end();return}if(typeof t!="function"){this._pipeNext(t);return}var e=t;e(function(r){var n=Xe.isStreamLike(r);n&&(r.on("data",this._checkDataSize.bind(this)),this._handleErrors(r)),this._pipeNext(r)}.bind(this))};Xe.prototype._pipeNext=function(t){this._currentStream=t;var e=Xe.isStreamLike(t);if(e){t.on("end",this._getNext.bind(this)),t.pipe(this,{end:!1});return}var r=t;this.write(r),this._getNext()};Xe.prototype._handleErrors=function(t){var e=this;t.on("error",function(r){e._emitError(r)})};Xe.prototype.write=function(t){this.emit("data",t)};Xe.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"))};Xe.prototype.resume=function(){this._released||(this._released=!0,this.writable=!0,this._getNext()),this.pauseStreams&&this._currentStream&&typeof this._currentStream.resume=="function"&&this._currentStream.resume(),this.emit("resume")};Xe.prototype.end=function(){this._reset(),this.emit("end")};Xe.prototype.destroy=function(){this._reset(),this.emit("close")};Xe.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};Xe.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var t="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(t))}};Xe.prototype._updateDataSize=function(){this.dataSize=0;var t=this;this._streams.forEach(function(e){e.dataSize&&(t.dataSize+=e.dataSize)}),this._currentStream&&this._currentStream.dataSize&&(this.dataSize+=this._currentStream.dataSize)};Xe.prototype._emitError=function(t){this._reset(),this.emit("error",t)}});var Og=L((VH,Cg)=>{"use strict";Cg.exports={"application/json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["json","map"]},"application/xml":{source:"iana",compressible:!0,extensions:["xml"]},"application/javascript":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["js","mjs"]},"application/pdf":{source:"iana",compressible:!1,extensions:["pdf"]},"application/zip":{source:"iana",compressible:!1,extensions:["zip"]},"application/gzip":{source:"iana",compressible:!1,extensions:["gz"]},"application/octet-stream":{source:"iana",compressible:!1,extensions:["bin","dat"]},"application/msword":{source:"iana",extensions:["doc"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{source:"iana",extensions:["docx"]},"application/vnd.ms-excel":{source:"iana",extensions:["xls"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{source:"iana",extensions:["xlsx"]},"application/vnd.ms-powerpoint":{source:"iana",extensions:["ppt"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{source:"iana",extensions:["pptx"]},"application/csv":{compressible:!0,extensions:["csv"]},"application/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"application/x-tar":{source:"apache",compressible:!0,extensions:["tar"]},"application/x-7z-compressed":{source:"apache",compressible:!1,extensions:["7z"]},"application/wasm":{source:"iana",compressible:!0,extensions:["wasm"]},"text/plain":{source:"iana",compressible:!0,charset:"UTF-8",extensions:["txt","text","log"]},"text/html":{source:"iana",compressible:!0,charset:"UTF-8",extensions:["html","htm"]},"text/css":{source:"iana",compressible:!0,charset:"UTF-8",extensions:["css"]},"text/csv":{source:"iana",compressible:!0,charset:"UTF-8",extensions:["csv"]},"text/markdown":{source:"iana",compressible:!0,charset:"UTF-8",extensions:["md","markdown"]},"text/xml":{source:"iana",compressible:!0,extensions:["xml"]},"text/yaml":{compressible:!0,extensions:["yaml","yml"]},"image/png":{source:"iana",compressible:!1,extensions:["png"]},"image/jpeg":{source:"iana",compressible:!1,extensions:["jpeg","jpg","jpe"]},"image/gif":{source:"iana",compressible:!1,extensions:["gif"]},"image/webp":{source:"apache",compressible:!1,extensions:["webp"]},"image/svg+xml":{source:"iana",compressible:!0,extensions:["svg","svgz"]},"image/bmp":{source:"iana",compressible:!0,extensions:["bmp"]},"image/tiff":{source:"iana",compressible:!1,extensions:["tiff","tif"]},"image/x-icon":{source:"apache",compressible:!0,extensions:["ico"]},"image/heic":{source:"iana",compressible:!1,extensions:["heic"]},"image/avif":{source:"iana",compressible:!1,extensions:["avif"]},"audio/mpeg":{source:"iana",compressible:!1,extensions:["mp3","mpga"]},"audio/wav":{compressible:!1,extensions:["wav"]},"audio/ogg":{source:"iana",compressible:!1,extensions:["ogg","oga"]},"audio/webm":{source:"apache",compressible:!1,extensions:["weba"]},"audio/mp4":{source:"iana",compressible:!1,extensions:["m4a"]},"video/mp4":{source:"iana",compressible:!1,extensions:["mp4","m4v"]},"video/mpeg":{source:"iana",compressible:!1,extensions:["mpeg","mpg"]},"video/webm":{source:"iana",compressible:!1,extensions:["webm"]},"video/quicktime":{source:"iana",compressible:!1,extensions:["mov","qt"]},"video/x-msvideo":{source:"iana",compressible:!1,extensions:["avi"]},"font/woff":{source:"iana",compressible:!1,extensions:["woff"]},"font/woff2":{source:"iana",compressible:!1,extensions:["woff2"]},"font/ttf":{source:"iana",compressible:!0,extensions:["ttf"]},"font/otf":{source:"iana",compressible:!0,extensions:["otf"]},"application/ld+json":{source:"iana",compressible:!0,extensions:["jsonld"]},"application/x-www-form-urlencoded":{source:"iana",compressible:!0},"multipart/form-data":{source:"iana"},"application/vnd.api+json":{source:"iana",compressible:!0},"application/manifest+json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["webmanifest"]},"application/ics":{compressible:!0,extensions:["ics"]},"text/calendar":{source:"iana",compressible:!0,extensions:["ics","ifb"]},"application/x-ndjson":{compressible:!0,extensions:["ndjson"]}}});var zg=L(Ot=>{"use strict";var gs=Og(),SA=require("path").extname,kg=/^\s*([^;\s]*)(?:;|\s|$)/,TA=/^text\//i;Ot.charset=$g;Ot.charsets={lookup:$g};Ot.contentType=wA;Ot.extension=xA;Ot.extensions=Object.create(null);Ot.lookup=AA;Ot.types=Object.create(null);IA(Ot.extensions,Ot.types);function $g(t){if(!t||typeof t!="string")return!1;var e=kg.exec(t),r=e&&gs[e[1].toLowerCase()];return r&&r.charset?r.charset:e&&TA.test(e[1])?"UTF-8":!1}o($g,"charset");function wA(t){if(!t||typeof t!="string")return!1;var e=t.indexOf("/")===-1?Ot.lookup(t):t;if(!e)return!1;if(e.indexOf("charset")===-1){var r=Ot.charset(e);r&&(e+="; charset="+r.toLowerCase())}return e}o(wA,"contentType");function xA(t){if(!t||typeof t!="string")return!1;var e=kg.exec(t),r=e&&Ot.extensions[e[1].toLowerCase()];return!r||!r.length?!1:r[0]}o(xA,"extension");function AA(t){if(!t||typeof t!="string")return!1;var e=SA("x."+t).toLowerCase().substr(1);return e&&Ot.types[e]||!1}o(AA,"lookup");function IA(t,e){var r=["nginx","apache",void 0,"iana"];Object.keys(gs).forEach(o(function(i){var u=gs[i],c=u.extensions;if(!(!c||!c.length)){t[i]=c;for(var l=0;l<c.length;l++){var p=c[l];if(e[p]){var f=r.indexOf(gs[e[p]].source),m=r.indexOf(u.source);if(e[p]!=="application/octet-stream"&&(f>m||f===m&&e[p].substr(0,12)==="application/"))continue}e[p]=i}}},"forEachMimeType"))}o(IA,"populateMaps")});var Dg=L((WH,Ng)=>{Ng.exports=RA;function RA(t){var e=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;e?e(t):setTimeout(t,0)}o(RA,"defer")});var al=L((JH,jg)=>{var Ug=Dg();jg.exports=CA;function CA(t){var e=!1;return Ug(function(){e=!0}),o(function(n,i){e?t(n,i):Ug(o(function(){t(n,i)},"nextTick_callback"))},"async_callback")}o(CA,"async")});var sl=L((QH,Mg)=>{Mg.exports=OA;function OA(t){Object.keys(t.jobs).forEach(kA.bind(t)),t.jobs={}}o(OA,"abort");function kA(t){typeof this.jobs[t]=="function"&&this.jobs[t]()}o(kA,"clean")});var ul=L((XH,Fg)=>{var Lg=al(),$A=sl();Fg.exports=zA;function zA(t,e,r,n){var i=r.keyedList?r.keyedList[r.index]:r.index;r.jobs[i]=NA(e,i,t[i],function(u,c){i in r.jobs&&(delete r.jobs[i],u?$A(r):r.results[i]=c,n(u,r.results))})}o(zA,"iterate");function NA(t,e,r,n){var i;return t.length==2?i=t(r,Lg(n)):i=t(r,e,Lg(n)),i}o(NA,"runJob")});var cl=L((tG,Bg)=>{Bg.exports=DA;function DA(t,e){var r=!Array.isArray(t),n={index:0,keyedList:r||e?Object.keys(t):null,jobs:{},results:r?{}:[],size:r?Object.keys(t).length:t.length};return e&&n.keyedList.sort(r?e:function(i,u){return e(t[i],t[u])}),n}o(DA,"state")});var ll=L((nG,qg)=>{var UA=sl(),jA=al();qg.exports=MA;function MA(t){Object.keys(this.jobs).length&&(this.index=this.size,UA(this),jA(t)(null,this.results))}o(MA,"terminator")});var Hg=L((iG,Vg)=>{var LA=ul(),FA=cl(),BA=ll();Vg.exports=qA;function qA(t,e,r){for(var n=FA(t);n.index<(n.keyedList||t).length;)LA(t,e,n,function(i,u){if(i){r(i,u);return}if(Object.keys(n.jobs).length===0){r(null,n.results);return}}),n.index++;return BA.bind(n,r)}o(qA,"parallel")});var dl=L((sG,ys)=>{var Gg=ul(),VA=cl(),HA=ll();ys.exports=GA;ys.exports.ascending=Wg;ys.exports.descending=WA;function GA(t,e,r,n){var i=VA(t,r);return Gg(t,e,i,o(function u(c,l){if(c){n(c,l);return}if(i.index++,i.index<(i.keyedList||t).length){Gg(t,e,i,u);return}n(null,i.results)},"iteratorHandler")),HA.bind(i,n)}o(GA,"serialOrdered");function Wg(t,e){return t<e?-1:t>e?1:0}o(Wg,"ascending");function WA(t,e){return-1*Wg(t,e)}o(WA,"descending")});var Jg=L((cG,Zg)=>{var ZA=dl();Zg.exports=JA;function JA(t,e,r){return ZA(t,e,null,r)}o(JA,"serial")});var Qg=L((dG,Kg)=>{Kg.exports={parallel:Hg(),serial:Jg(),serialOrdered:dl()}});var pl=L((pG,Yg)=>{"use strict";Yg.exports=Object});var ey=L((fG,Xg)=>{"use strict";Xg.exports=Error});var ry=L((mG,ty)=>{"use strict";ty.exports=EvalError});var oy=L((hG,ny)=>{"use strict";ny.exports=RangeError});var ay=L((gG,iy)=>{"use strict";iy.exports=ReferenceError});var uy=L((yG,sy)=>{"use strict";sy.exports=SyntaxError});var _s=L((_G,cy)=>{"use strict";cy.exports=TypeError});var dy=L((bG,ly)=>{"use strict";ly.exports=URIError});var fy=L((vG,py)=>{"use strict";py.exports=Math.abs});var hy=L((EG,my)=>{"use strict";my.exports=Math.floor});var yy=L((PG,gy)=>{"use strict";gy.exports=Math.max});var by=L((SG,_y)=>{"use strict";_y.exports=Math.min});var Ey=L((TG,vy)=>{"use strict";vy.exports=Math.pow});var Sy=L((wG,Py)=>{"use strict";Py.exports=Math.round});var wy=L((xG,Ty)=>{"use strict";Ty.exports=Number.isNaN||o(function(e){return e!==e},"isNaN")});var Ay=L((IG,xy)=>{"use strict";var KA=wy();xy.exports=o(function(e){return KA(e)||e===0?e:e<0?-1:1},"sign")});var Ry=L((CG,Iy)=>{"use strict";Iy.exports=Object.getOwnPropertyDescriptor});var fl=L((OG,Cy)=>{"use strict";var bs=Ry();if(bs)try{bs([],"length")}catch{bs=null}Cy.exports=bs});var ky=L((kG,Oy)=>{"use strict";var vs=Object.defineProperty||!1;if(vs)try{vs({},"a",{value:1})}catch{vs=!1}Oy.exports=vs});var ml=L(($G,$y)=>{"use strict";$y.exports=o(function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;e[r]=i;for(var u in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var c=Object.getOwnPropertySymbols(e);if(c.length!==1||c[0]!==r||!Object.prototype.propertyIsEnumerable.call(e,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var l=Object.getOwnPropertyDescriptor(e,r);if(l.value!==i||l.enumerable!==!0)return!1}return!0},"hasSymbols")});var Dy=L((NG,Ny)=>{"use strict";var zy=typeof Symbol<"u"&&Symbol,QA=ml();Ny.exports=o(function(){return typeof zy!="function"||typeof Symbol!="function"||typeof zy("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:QA()},"hasNativeSymbols")});var hl=L((UG,Uy)=>{"use strict";Uy.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var gl=L((jG,jy)=>{"use strict";var YA=pl();jy.exports=YA.getPrototypeOf||null});var Fy=L((MG,Ly)=>{"use strict";var XA="Function.prototype.bind called on incompatible ",eI=Object.prototype.toString,tI=Math.max,rI="[object Function]",My=o(function(e,r){for(var n=[],i=0;i<e.length;i+=1)n[i]=e[i];for(var u=0;u<r.length;u+=1)n[u+e.length]=r[u];return n},"concatty"),nI=o(function(e,r){for(var n=[],i=r||0,u=0;i<e.length;i+=1,u+=1)n[u]=e[i];return n},"slicy"),oI=o(function(t,e){for(var r="",n=0;n<t.length;n+=1)r+=t[n],n+1<t.length&&(r+=e);return r},"joiny");Ly.exports=o(function(e){var r=this;if(typeof r!="function"||eI.apply(r)!==rI)throw new TypeError(XA+r);for(var n=nI(arguments,1),i,u=o(function(){if(this instanceof i){var m=r.apply(this,My(n,arguments));return Object(m)===m?m:this}return r.apply(e,My(n,arguments))},"binder"),c=tI(0,r.length-n.length),l=[],p=0;p<c;p++)l[p]="$"+p;if(i=Function("binder","return function ("+oI(l,",")+"){ return binder.apply(this,arguments); }")(u),r.prototype){var f=o(function(){},"Empty");f.prototype=r.prototype,i.prototype=new f,f.prototype=null}return i},"bind")});var Ao=L((FG,By)=>{"use strict";var iI=Fy();By.exports=Function.prototype.bind||iI});var Es=L((BG,qy)=>{"use strict";qy.exports=Function.prototype.call});var yl=L((qG,Vy)=>{"use strict";Vy.exports=Function.prototype.apply});var Gy=L((VG,Hy)=>{"use strict";Hy.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var Zy=L((HG,Wy)=>{"use strict";var aI=Ao(),sI=yl(),uI=Es(),cI=Gy();Wy.exports=cI||aI.call(uI,sI)});var Ky=L((GG,Jy)=>{"use strict";var lI=Ao(),dI=_s(),pI=Es(),fI=Zy();Jy.exports=o(function(e){if(e.length<1||typeof e[0]!="function")throw new dI("a function is required");return fI(lI,pI,e)},"callBindBasic")});var r_=L((ZG,t_)=>{"use strict";var mI=Ky(),Qy=fl(),Xy;try{Xy=[].__proto__===Array.prototype}catch(t){if(!t||typeof t!="object"||!("code"in t)||t.code!=="ERR_PROTO_ACCESS")throw t}var _l=!!Xy&&Qy&&Qy(Object.prototype,"__proto__"),e_=Object,Yy=e_.getPrototypeOf;t_.exports=_l&&typeof _l.get=="function"?mI([_l.get]):typeof Yy=="function"?o(function(e){return Yy(e==null?e:e_(e))},"getDunder"):!1});var s_=L((KG,a_)=>{"use strict";var n_=hl(),o_=gl(),i_=r_();a_.exports=n_?o(function(e){return n_(e)},"getProto"):o_?o(function(e){if(!e||typeof e!="object"&&typeof e!="function")throw new TypeError("getProto: not an object");return o_(e)},"getProto"):i_?o(function(e){return i_(e)},"getProto"):null});var bl=L((YG,u_)=>{"use strict";var hI=Function.prototype.call,gI=Object.prototype.hasOwnProperty,yI=Ao();u_.exports=yI.call(hI,gI)});var h_=L((XG,m_)=>{"use strict";var Te,_I=pl(),bI=ey(),vI=ry(),EI=oy(),PI=ay(),Oo=uy(),Co=_s(),SI=dy(),TI=fy(),wI=hy(),xI=yy(),AI=by(),II=Ey(),RI=Sy(),CI=Ay(),p_=Function,vl=o(function(t){try{return p_('"use strict"; return ('+t+").constructor;")()}catch{}},"getEvalledConstructor"),Ui=fl(),OI=ky(),El=o(function(){throw new Co},"throwTypeError"),kI=Ui?(function(){try{return arguments.callee,El}catch{try{return Ui(arguments,"callee").get}catch{return El}}})():El,Io=Dy()(),dt=s_(),$I=gl(),zI=hl(),f_=yl(),ji=Es(),Ro={},NI=typeof Uint8Array>"u"||!dt?Te:dt(Uint8Array),Vn={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?Te:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Te:ArrayBuffer,"%ArrayIteratorPrototype%":Io&&dt?dt([][Symbol.iterator]()):Te,"%AsyncFromSyncIteratorPrototype%":Te,"%AsyncFunction%":Ro,"%AsyncGenerator%":Ro,"%AsyncGeneratorFunction%":Ro,"%AsyncIteratorPrototype%":Ro,"%Atomics%":typeof Atomics>"u"?Te:Atomics,"%BigInt%":typeof BigInt>"u"?Te:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Te:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Te:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Te:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":bI,"%eval%":eval,"%EvalError%":vI,"%Float16Array%":typeof Float16Array>"u"?Te:Float16Array,"%Float32Array%":typeof Float32Array>"u"?Te:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Te:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Te:FinalizationRegistry,"%Function%":p_,"%GeneratorFunction%":Ro,"%Int8Array%":typeof Int8Array>"u"?Te:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Te:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Te:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Io&&dt?dt(dt([][Symbol.iterator]())):Te,"%JSON%":typeof JSON=="object"?JSON:Te,"%Map%":typeof Map>"u"?Te:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Io||!dt?Te:dt(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":_I,"%Object.getOwnPropertyDescriptor%":Ui,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Te:Promise,"%Proxy%":typeof Proxy>"u"?Te:Proxy,"%RangeError%":EI,"%ReferenceError%":PI,"%Reflect%":typeof Reflect>"u"?Te:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Te:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Io||!dt?Te:dt(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Te:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Io&&dt?dt(""[Symbol.iterator]()):Te,"%Symbol%":Io?Symbol:Te,"%SyntaxError%":Oo,"%ThrowTypeError%":kI,"%TypedArray%":NI,"%TypeError%":Co,"%Uint8Array%":typeof Uint8Array>"u"?Te:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Te:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Te:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Te:Uint32Array,"%URIError%":SI,"%WeakMap%":typeof WeakMap>"u"?Te:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Te:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Te:WeakSet,"%Function.prototype.call%":ji,"%Function.prototype.apply%":f_,"%Object.defineProperty%":OI,"%Object.getPrototypeOf%":$I,"%Math.abs%":TI,"%Math.floor%":wI,"%Math.max%":xI,"%Math.min%":AI,"%Math.pow%":II,"%Math.round%":RI,"%Math.sign%":CI,"%Reflect.getPrototypeOf%":zI};if(dt)try{null.error}catch(t){c_=dt(dt(t)),Vn["%Error.prototype%"]=c_}var c_,DI=o(function t(e){var r;if(e==="%AsyncFunction%")r=vl("async function () {}");else if(e==="%GeneratorFunction%")r=vl("function* () {}");else if(e==="%AsyncGeneratorFunction%")r=vl("async function* () {}");else if(e==="%AsyncGenerator%"){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var i=t("%AsyncGenerator%");i&&dt&&(r=dt(i.prototype))}return Vn[e]=r,r},"doEval"),l_={__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"]},Mi=Ao(),Ps=bl(),UI=Mi.call(ji,Array.prototype.concat),jI=Mi.call(f_,Array.prototype.splice),d_=Mi.call(ji,String.prototype.replace),Ss=Mi.call(ji,String.prototype.slice),MI=Mi.call(ji,RegExp.prototype.exec),LI=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,FI=/\\(\\)?/g,BI=o(function(e){var r=Ss(e,0,1),n=Ss(e,-1);if(r==="%"&&n!=="%")throw new Oo("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new Oo("invalid intrinsic syntax, expected opening `%`");var i=[];return d_(e,LI,function(u,c,l,p){i[i.length]=l?d_(p,FI,"$1"):c||u}),i},"stringToPath"),qI=o(function(e,r){var n=e,i;if(Ps(l_,n)&&(i=l_[n],n="%"+i[0]+"%"),Ps(Vn,n)){var u=Vn[n];if(u===Ro&&(u=DI(n)),typeof u>"u"&&!r)throw new Co("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:u}}throw new Oo("intrinsic "+e+" does not exist!")},"getBaseIntrinsic");m_.exports=o(function(e,r){if(typeof e!="string"||e.length===0)throw new Co("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new Co('"allowMissing" argument must be a boolean');if(MI(/^%?[^%]*%?$/,e)===null)throw new Oo("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=BI(e),i=n.length>0?n[0]:"",u=qI("%"+i+"%",r),c=u.name,l=u.value,p=!1,f=u.alias;f&&(i=f[0],jI(n,UI([0,1],f)));for(var m=1,y=!0;m<n.length;m+=1){var P=n[m],h=Ss(P,0,1),b=Ss(P,-1);if((h==='"'||h==="'"||h==="`"||b==='"'||b==="'"||b==="`")&&h!==b)throw new Oo("property names with quotes must have matching quotes");if((P==="constructor"||!y)&&(p=!0),i+="."+P,c="%"+i+"%",Ps(Vn,c))l=Vn[c];else if(l!=null){if(!(P in l)){if(!r)throw new Co("base intrinsic for "+e+" exists, but the property is not available.");return}if(Ui&&m+1>=n.length){var T=Ui(l,P);y=!!T,y&&"get"in T&&!("originalValue"in T.get)?l=T.get:l=l[P]}else y=Ps(l,P),l=l[P];y&&!p&&(Vn[c]=l)}}return l},"GetIntrinsic")});var y_=L((tW,g_)=>{"use strict";var VI=ml();g_.exports=o(function(){return VI()&&!!Symbol.toStringTag},"hasToStringTagShams")});var v_=L((nW,b_)=>{"use strict";var HI=h_(),__=HI("%Object.defineProperty%",!0),GI=y_()(),WI=bl(),ZI=_s(),Ts=GI?Symbol.toStringTag:null;b_.exports=o(function(e,r){var n=arguments.length>2&&!!arguments[2]&&arguments[2].force,i=arguments.length>2&&!!arguments[2]&&arguments[2].nonConfigurable;if(typeof n<"u"&&typeof n!="boolean"||typeof i<"u"&&typeof i!="boolean")throw new ZI("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");Ts&&(n||!WI(e,Ts))&&(__?__(e,Ts,{configurable:!i,enumerable:!1,value:r,writable:!1}):e[Ts]=r)},"setToStringTag")});var P_=L((iW,E_)=>{"use strict";var JI=Function.prototype.call,KI=Object.prototype.hasOwnProperty,QI=Ao();E_.exports=QI.call(JI,KI)});var T_=L((aW,S_)=>{"use strict";S_.exports=function(t,e){return Object.keys(e).forEach(function(r){t[r]=t[r]||e[r]}),t}});var A_=L((sW,x_)=>{"use strict";var wl=Rg(),YI=require("util"),Pl=require("path"),XI=require("http"),eR=require("https"),tR=require("url").parse,rR=require("fs"),nR=require("stream").Stream,oR=require("crypto"),Sl=zg(),iR=Qg(),aR=v_(),wn=P_(),Tl=T_();function w_(t){return String(t).replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/"/g,"%22")}o(w_,"escapeHeaderParam");function Oe(t){if(!(this instanceof Oe))return new Oe(t);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],wl.call(this),t=t||{};for(var e in t)this[e]=t[e]}o(Oe,"FormData");YI.inherits(Oe,wl);Oe.LINE_BREAK=`\r
2
- `;Oe.DEFAULT_CONTENT_TYPE="application/octet-stream";Oe.prototype.append=function(t,e,r){r=r||{},typeof r=="string"&&(r={filename:r});var n=wl.prototype.append.bind(this);if((typeof e=="number"||e==null)&&(e=String(e)),Array.isArray(e)){this._error(new Error("Arrays are not supported."));return}var i=this._multiPartHeader(t,e,r),u=this._multiPartFooter();n(i),n(e),n(u),this._trackLength(i,e,r)};Oe.prototype._trackLength=function(t,e,r){var n=0;r.knownLength!=null?n+=Number(r.knownLength):Buffer.isBuffer(e)?n=e.length:typeof e=="string"&&(n=Buffer.byteLength(e)),this._valueLength+=n,this._overheadLength+=Buffer.byteLength(t)+Oe.LINE_BREAK.length,!(!e||!e.path&&!(e.readable&&wn(e,"httpVersion"))&&!(e instanceof nR))&&(r.knownLength||this._valuesToMeasure.push(e))};Oe.prototype._lengthRetriever=function(t,e){wn(t,"fd")?t.end!=null&&t.end!=1/0&&t.start!=null?e(null,t.end+1-(t.start?t.start:0)):rR.stat(t.path,function(r,n){if(r){e(r);return}var i=n.size-(t.start?t.start:0);e(null,i)}):wn(t,"httpVersion")?e(null,Number(t.headers["content-length"])):wn(t,"httpModule")?(t.on("response",function(r){t.pause(),e(null,Number(r.headers["content-length"]))}),t.resume()):e("Unknown stream")};Oe.prototype._multiPartHeader=function(t,e,r){if(typeof r.header=="string")return r.header;var n=this._getContentDisposition(e,r),i=this._getContentType(e,r),u="",c={"Content-Disposition":["form-data",'name="'+w_(t)+'"'].concat(n||[]),"Content-Type":[].concat(i||[])};typeof r.header=="object"&&Tl(c,r.header);var l;for(var p in c)if(wn(c,p)){if(l=c[p],l==null)continue;Array.isArray(l)||(l=[l]),l.length&&(u+=p+": "+l.join("; ")+Oe.LINE_BREAK)}return"--"+this.getBoundary()+Oe.LINE_BREAK+u+Oe.LINE_BREAK};Oe.prototype._getContentDisposition=function(t,e){var r;if(typeof e.filepath=="string"?r=Pl.normalize(e.filepath).replace(/\\/g,"/"):e.filename||t&&(t.name||t.path)?r=Pl.basename(e.filename||t&&(t.name||t.path)):t&&t.readable&&wn(t,"httpVersion")&&(r=Pl.basename(t.client._httpMessage.path||"")),r)return'filename="'+w_(r)+'"'};Oe.prototype._getContentType=function(t,e){var r=e.contentType;return!r&&t&&t.name&&(r=Sl.lookup(t.name)),!r&&t&&t.path&&(r=Sl.lookup(t.path)),!r&&t&&t.readable&&wn(t,"httpVersion")&&(r=t.headers["content-type"]),!r&&(e.filepath||e.filename)&&(r=Sl.lookup(e.filepath||e.filename)),!r&&t&&typeof t=="object"&&(r=Oe.DEFAULT_CONTENT_TYPE),r};Oe.prototype._multiPartFooter=function(){return function(t){var e=Oe.LINE_BREAK,r=this._streams.length===0;r&&(e+=this._lastBoundary()),t(e)}.bind(this)};Oe.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+Oe.LINE_BREAK};Oe.prototype.getHeaders=function(t){var e,r={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(e in t)wn(t,e)&&(r[e.toLowerCase()]=t[e]);return r};Oe.prototype.setBoundary=function(t){if(typeof t!="string")throw new TypeError("FormData boundary must be a string");this._boundary=t};Oe.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};Oe.prototype.getBuffer=function(){for(var t=new Buffer.alloc(0),e=this.getBoundary(),r=0,n=this._streams.length;r<n;r++)typeof this._streams[r]!="function"&&(Buffer.isBuffer(this._streams[r])?t=Buffer.concat([t,this._streams[r]]):t=Buffer.concat([t,Buffer.from(this._streams[r])]),(typeof this._streams[r]!="string"||this._streams[r].substring(2,e.length+2)!==e)&&(t=Buffer.concat([t,Buffer.from(Oe.LINE_BREAK)])));return Buffer.concat([t,Buffer.from(this._lastBoundary())])};Oe.prototype._generateBoundary=function(){this._boundary="--------------------------"+oR.randomBytes(12).toString("hex")};Oe.prototype.getLengthSync=function(){var t=this._overheadLength+this._valueLength;return this._streams.length&&(t+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),t};Oe.prototype.hasKnownLength=function(){var t=!0;return this._valuesToMeasure.length&&(t=!1),t};Oe.prototype.getLength=function(t){var e=this._overheadLength+this._valueLength;if(this._streams.length&&(e+=this._lastBoundary().length),!this._valuesToMeasure.length){process.nextTick(t.bind(this,null,e));return}iR.parallel(this._valuesToMeasure,this._lengthRetriever,function(r,n){if(r){t(r);return}n.forEach(function(i){e+=i}),t(null,e)})};Oe.prototype.submit=function(t,e){var r,n,i={method:"post"};return typeof t=="string"?(t=tR(t),n=Tl({port:t.port,path:t.pathname,host:t.hostname,protocol:t.protocol},i)):(n=Tl(t,i),n.port||(n.port=n.protocol==="https:"?443:80)),n.headers=this.getHeaders(t.headers),n.protocol==="https:"?r=eR.request(n):r=XI.request(n),this.getLength(function(u,c){if(u&&u!=="Unknown stream"){this._error(u);return}if(c&&r.setHeader("Content-Length",c),this.pipe(r),e){var l,p=o(function(f,m){return r.removeListener("error",p),r.removeListener("response",l),e.call(this,f,m)},"callback");l=p.bind(this,null),r.on("error",p),r.on("response",l)}}.bind(this)),r};Oe.prototype._error=function(t){this.error||(this.error=t,this.pause(),this.emit("error",t))};Oe.prototype.toString=function(){return"[object FormData]"};aR(Oe.prototype,"FormData");x_.exports=Oe});var xl=L((CW,U_)=>{"use strict";var ws=Object.prototype.hasOwnProperty,D_=Object.prototype.toString,C_=Object.defineProperty,O_=Object.getOwnPropertyDescriptor,k_=o(function(e){return typeof Array.isArray=="function"?Array.isArray(e):D_.call(e)==="[object Array]"},"isArray"),$_=o(function(e){if(!e||D_.call(e)!=="[object Object]")return!1;var r=ws.call(e,"constructor"),n=e.constructor&&e.constructor.prototype&&ws.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!r&&!n)return!1;var i;for(i in e);return typeof i>"u"||ws.call(e,i)},"isPlainObject"),z_=o(function(e,r){C_&&r.name==="__proto__"?C_(e,r.name,{enumerable:!0,configurable:!0,value:r.newValue,writable:!0}):e[r.name]=r.newValue},"setProperty"),N_=o(function(e,r){if(r==="__proto__")if(ws.call(e,r)){if(O_)return O_(e,r).value}else return;return e[r]},"getProperty");U_.exports=o(function t(){var e,r,n,i,u,c,l=arguments[0],p=1,f=arguments.length,m=!1;for(typeof l=="boolean"&&(m=l,l=arguments[1]||{},p=2),(l==null||typeof l!="object"&&typeof l!="function")&&(l={});p<f;++p)if(e=arguments[p],e!=null)for(r in e)n=N_(l,r),i=N_(e,r),l!==i&&(m&&i&&($_(i)||(u=k_(i)))?(u?(u=!1,c=n&&k_(n)?n:[]):c=n&&$_(n)?n:{},z_(l,{name:r,newValue:t(m,c,i)})):typeof i<"u"&&z_(l,{name:r,newValue:i}));return l},"extend")});var j_=L((kW,hR)=>{hR.exports={name:"gaxios",version:"7.1.3",description:"A simple common HTTP client specifically for Google APIs and services.",main:"build/cjs/src/index.js",types:"build/cjs/src/index.d.ts",files:["build/"],exports:{".":{import:{types:"./build/esm/src/index.d.ts",default:"./build/esm/src/index.js"},require:{types:"./build/cjs/src/index.d.ts",default:"./build/cjs/src/index.js"}}},scripts:{lint:"gts check --no-inline-config",test:"c8 mocha build/esm/test","presystem-test":"npm run compile","system-test":"mocha build/esm/system-test --timeout 80000",compile:"tsc -b ./tsconfig.json ./tsconfig.cjs.json && node utils/enable-esm.mjs",fix:"gts fix",prepare:"npm run compile",pretest:"npm run compile",webpack:"webpack","prebrowser-test":"npm run compile","browser-test":"node build/browser-test/browser-test-runner.js",docs:"jsdoc -c .jsdoc.js","docs-test":"linkinator docs","predocs-test":"npm run docs","samples-test":"cd samples/ && npm link ../ && npm test && cd ../",prelint:"cd samples; npm link ../; npm install",clean:"gts clean"},repository:{type:"git",directory:"packages/gaxios",url:"https://github.com/googleapis/google-cloud-node-core.git"},keywords:["google"],engines:{node:">=18"},author:"Google, LLC",license:"Apache-2.0",devDependencies:{"@babel/plugin-proposal-private-methods":"^7.18.6","@types/cors":"^2.8.6","@types/express":"^5.0.0","@types/extend":"^3.0.1","@types/mocha":"^10.0.10","@types/multiparty":"4.2.1","@types/mv":"^2.1.0","@types/ncp":"^2.0.1","@types/node":"^22.0.0","@types/sinon":"^17.0.0","@types/tmp":"0.2.6",assert:"^2.0.0",browserify:"^17.0.0",c8:"^10.0.0",cors:"^2.8.5",express:"^5.0.0",gts:"^6.0.0","is-docker":"^3.0.0",jsdoc:"^4.0.0","jsdoc-fresh":"^5.0.0","jsdoc-region-tag":"^4.0.0",karma:"^6.0.0","karma-chrome-launcher":"^3.0.0","karma-coverage":"^2.0.0","karma-firefox-launcher":"^2.0.0","karma-mocha":"^2.0.0","karma-remap-coverage":"^0.1.5","karma-sourcemap-loader":"^0.4.0","karma-webpack":"^5.0.1",linkinator:"^6.1.2",mocha:"^11.1.0",multiparty:"^4.2.1",mv:"^2.1.1",ncp:"^2.0.0",nock:"^14.0.0-beta.13","null-loader":"^4.0.0","pack-n-play":"^4.0.0",puppeteer:"^24.0.0",sinon:"^21.0.0","stream-browserify":"^3.0.0",tmp:"0.2.5","ts-loader":"^9.5.2",typescript:"^5.8.3",webpack:"^5.35.0","webpack-cli":"^6.0.1"},dependencies:{extend:"^3.0.2","https-proxy-agent":"^7.0.1","node-fetch":"^3.3.2",rimraf:"^5.0.1"},homepage:"https://github.com/googleapis/google-cloud-node-core/tree/main/packages/gaxios"}});var L_=L(($W,M_)=>{"use strict";var gR=j_();M_.exports={pkg:gR}});var Rl=L(rr=>{"use strict";var B_=rr&&rr.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(rr,"__esModule",{value:!0});rr.GaxiosError=rr.GAXIOS_ERROR_SYMBOL=void 0;rr.defaultErrorRedactor=q_;var F_=B_(xl()),yR=B_(L_()),Al=yR.default.pkg;rr.GAXIOS_ERROR_SYMBOL=Symbol.for(`${Al.name}-gaxios-error`);var Il=class t extends Error{static{o(this,"GaxiosError")}config;response;code;status;error;[rr.GAXIOS_ERROR_SYMBOL]=Al.version;static[Symbol.hasInstance](e){return e&&typeof e=="object"&&rr.GAXIOS_ERROR_SYMBOL in e&&e[rr.GAXIOS_ERROR_SYMBOL]===Al.version?!0:Function.prototype[Symbol.hasInstance].call(t,e)}constructor(e,r,n,i){if(super(e,{cause:i}),this.config=r,this.response=n,this.error=i instanceof Error?i:void 0,this.config=(0,F_.default)(!0,{},r),this.response&&(this.response.config=(0,F_.default)(!0,{},this.response.config)),this.response){try{this.response.data=_R(this.config.responseType,this.response?.bodyUsed?this.response?.data:void 0)}catch{}this.status=this.response.status}i instanceof DOMException?this.code=i.name:i&&typeof i=="object"&&"code"in i&&(typeof i.code=="string"||typeof i.code=="number")&&(this.code=i.code)}static extractAPIErrorFromResponse(e,r="The request failed"){let n=r;if(typeof e.data=="string"&&(n=e.data),e.data&&typeof e.data=="object"&&"error"in e.data&&e.data.error&&!e.ok){if(typeof e.data.error=="string")return{message:e.data.error,code:e.status,status:e.statusText};if(typeof e.data.error=="object"){n="message"in e.data.error&&typeof e.data.error.message=="string"?e.data.error.message:n;let i="status"in e.data.error&&typeof e.data.error.status=="string"?e.data.error.status:e.statusText,u="code"in e.data.error&&typeof e.data.error.code=="number"?e.data.error.code:e.status;if("errors"in e.data.error&&Array.isArray(e.data.error.errors)){let c=[];for(let l of e.data.error.errors)typeof l=="object"&&"message"in l&&typeof l.message=="string"&&c.push(l.message);return Object.assign({message:c.join(`
3
- `)||n,code:u,status:i},e.data.error)}return Object.assign({message:n,code:u,status:i},e.data.error)}}return{message:n,code:e.status,status:e.statusText}}};rr.GaxiosError=Il;function _R(t,e){switch(t){case"stream":return e;case"json":return JSON.parse(JSON.stringify(e));case"arraybuffer":return JSON.parse(Buffer.from(e).toString("utf8"));case"blob":return JSON.parse(e.text());default:return e}}o(_R,"translateData");function q_(t){let e="<<REDACTED> - See `errorRedactor` option in `gaxios` for configuration>.";function r(u){u&&u.forEach((c,l)=>{(/^authentication$/i.test(l)||/^authorization$/i.test(l)||/secret/i.test(l))&&u.set(l,e)})}o(r,"redactHeaders");function n(u,c){if(typeof u=="object"&&u!==null&&typeof u[c]=="string"){let l=u[c];(/grant_type=/i.test(l)||/assertion=/i.test(l)||/secret/i.test(l))&&(u[c]=e)}}o(n,"redactString");function i(u){!u||typeof u!="object"||(u instanceof FormData||u instanceof URLSearchParams||"forEach"in u&&"set"in u?u.forEach((c,l)=>{(["grant_type","assertion"].includes(l)||/secret/.test(l))&&u.set(l,e)}):("grant_type"in u&&(u.grant_type=e),"assertion"in u&&(u.assertion=e),"client_secret"in u&&(u.client_secret=e)))}return o(i,"redactObject"),t.config&&(r(t.config.headers),n(t.config,"data"),i(t.config.data),n(t.config,"body"),i(t.config.body),t.config.url.searchParams.has("token")&&t.config.url.searchParams.set("token",e),t.config.url.searchParams.has("client_secret")&&t.config.url.searchParams.set("client_secret",e)),t.response&&(q_({config:t.response.config}),r(t.response.headers),t.response.bodyUsed&&(n(t.response,"data"),i(t.response.data))),t}o(q_,"defaultErrorRedactor")});var H_=L(Cl=>{"use strict";Object.defineProperty(Cl,"__esModule",{value:!0});Cl.getRetryConfig=bR;async function bR(t){let e=V_(t);if(!t||!t.config||!e&&!t.config.retry)return{shouldRetry:!1};e=e||{},e.currentRetryAttempt=e.currentRetryAttempt||0,e.retry=e.retry===void 0||e.retry===null?3:e.retry,e.httpMethodsToRetry=e.httpMethodsToRetry||["GET","HEAD","PUT","OPTIONS","DELETE"],e.noResponseRetries=e.noResponseRetries===void 0||e.noResponseRetries===null?2:e.noResponseRetries,e.retryDelayMultiplier=e.retryDelayMultiplier?e.retryDelayMultiplier:2,e.timeOfFirstRequest=e.timeOfFirstRequest?e.timeOfFirstRequest:Date.now(),e.totalTimeout=e.totalTimeout?e.totalTimeout:Number.MAX_SAFE_INTEGER,e.maxRetryDelay=e.maxRetryDelay?e.maxRetryDelay:Number.MAX_SAFE_INTEGER;let r=[[100,199],[408,408],[429,429],[500,599]];if(e.statusCodesToRetry=e.statusCodesToRetry||r,t.config.retryConfig=e,!await(e.shouldRetry||vR)(t))return{shouldRetry:!1,config:t.config};let i=ER(e);t.config.retryConfig.currentRetryAttempt+=1;let u=e.retryBackoff?e.retryBackoff(t,i):new Promise(c=>{setTimeout(c,i)});return e.onRetryAttempt&&await e.onRetryAttempt(t),await u,{shouldRetry:!0,config:t.config}}o(bR,"getRetryConfig");function vR(t){let e=V_(t);if(t.config.signal?.aborted&&t.code!=="TimeoutError"||t.code==="AbortError"||!e||e.retry===0||!t.response&&(e.currentRetryAttempt||0)>=e.noResponseRetries||!e.httpMethodsToRetry||!e.httpMethodsToRetry.includes(t.config.method?.toUpperCase()||"GET"))return!1;if(t.response&&t.response.status){let r=!1;for(let[n,i]of e.statusCodesToRetry){let u=t.response.status;if(u>=n&&u<=i){r=!0;break}}if(!r)return!1}return e.currentRetryAttempt=e.currentRetryAttempt||0,!(e.currentRetryAttempt>=e.retry)}o(vR,"shouldRetryRequest");function V_(t){if(t&&t.config&&t.config.retryConfig)return t.config.retryConfig}o(V_,"getConfig");function ER(t){let r=(t.currentRetryAttempt?0:t.retryDelay??100)+(Math.pow(t.retryDelayMultiplier,t.currentRetryAttempt)-1)/2*1e3,n=t.totalTimeout-(Date.now()-t.timeOfFirstRequest);return Math.min(r,n,t.maxRetryDelay)}o(ER,"getNextRetryDelay")});var kl=L(xs=>{"use strict";Object.defineProperty(xs,"__esModule",{value:!0});xs.GaxiosInterceptorManager=void 0;var Ol=class extends Set{static{o(this,"GaxiosInterceptorManager")}};xs.GaxiosInterceptorManager=Ol});var W_=L((LW,G_)=>{var ko=1e3,$o=ko*60,zo=$o*60,Hn=zo*24,PR=Hn*7,SR=Hn*365.25;G_.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return TR(t);if(r==="number"&&isFinite(t))return e.long?xR(t):wR(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function TR(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var r=parseFloat(e[1]),n=(e[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*SR;case"weeks":case"week":case"w":return r*PR;case"days":case"day":case"d":return r*Hn;case"hours":case"hour":case"hrs":case"hr":case"h":return r*zo;case"minutes":case"minute":case"mins":case"min":case"m":return r*$o;case"seconds":case"second":case"secs":case"sec":case"s":return r*ko;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}o(TR,"parse");function wR(t){var e=Math.abs(t);return e>=Hn?Math.round(t/Hn)+"d":e>=zo?Math.round(t/zo)+"h":e>=$o?Math.round(t/$o)+"m":e>=ko?Math.round(t/ko)+"s":t+"ms"}o(wR,"fmtShort");function xR(t){var e=Math.abs(t);return e>=Hn?As(t,e,Hn,"day"):e>=zo?As(t,e,zo,"hour"):e>=$o?As(t,e,$o,"minute"):e>=ko?As(t,e,ko,"second"):t+" ms"}o(xR,"fmtLong");function As(t,e,r,n){var i=e>=r*1.5;return Math.round(t/r)+" "+n+(i?"s":"")}o(As,"plural")});var $l=L((BW,Z_)=>{function AR(t){r.debug=r,r.default=r,r.coerce=p,r.disable=c,r.enable=i,r.enabled=l,r.humanize=W_(),r.destroy=f,Object.keys(t).forEach(m=>{r[m]=t[m]}),r.names=[],r.skips=[],r.formatters={};function e(m){let y=0;for(let P=0;P<m.length;P++)y=(y<<5)-y+m.charCodeAt(P),y|=0;return r.colors[Math.abs(y)%r.colors.length]}o(e,"selectColor"),r.selectColor=e;function r(m){let y,P=null,h,b;function T(...E){if(!T.enabled)return;let w=T,k=Number(new Date),q=k-(y||k);w.diff=q,w.prev=y,w.curr=k,y=k,E[0]=r.coerce(E[0]),typeof E[0]!="string"&&E.unshift("%O");let W=0;E[0]=E[0].replace(/%([a-zA-Z%])/g,(V,J)=>{if(V==="%%")return"%";W++;let re=r.formatters[J];if(typeof re=="function"){let G=E[W];V=re.call(w,G),E.splice(W,1),W--}return V}),r.formatArgs.call(w,E),(w.log||r.log).apply(w,E)}return o(T,"debug"),T.namespace=m,T.useColors=r.useColors(),T.color=r.selectColor(m),T.extend=n,T.destroy=r.destroy,Object.defineProperty(T,"enabled",{enumerable:!0,configurable:!1,get:o(()=>P!==null?P:(h!==r.namespaces&&(h=r.namespaces,b=r.enabled(m)),b),"get"),set:o(E=>{P=E},"set")}),typeof r.init=="function"&&r.init(T),T}o(r,"createDebug");function n(m,y){let P=r(this.namespace+(typeof y>"u"?":":y)+m);return P.log=this.log,P}o(n,"extend");function i(m){r.save(m),r.namespaces=m,r.names=[],r.skips=[];let y=(typeof m=="string"?m:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let P of y)P[0]==="-"?r.skips.push(P.slice(1)):r.names.push(P)}o(i,"enable");function u(m,y){let P=0,h=0,b=-1,T=0;for(;P<m.length;)if(h<y.length&&(y[h]===m[P]||y[h]==="*"))y[h]==="*"?(b=h,T=P,h++):(P++,h++);else if(b!==-1)h=b+1,T++,P=T;else return!1;for(;h<y.length&&y[h]==="*";)h++;return h===y.length}o(u,"matchesTemplate");function c(){let m=[...r.names,...r.skips.map(y=>"-"+y)].join(",");return r.enable(""),m}o(c,"disable");function l(m){for(let y of r.skips)if(u(m,y))return!1;for(let y of r.names)if(u(m,y))return!0;return!1}o(l,"enabled");function p(m){return m instanceof Error?m.stack||m.message:m}o(p,"coerce");function f(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return o(f,"destroy"),r.enable(r.load()),r}o(AR,"setup");Z_.exports=AR});var J_=L((kt,Is)=>{kt.formatArgs=RR;kt.save=CR;kt.load=OR;kt.useColors=IR;kt.storage=kR();kt.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();kt.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function IR(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let t;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(t=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(t[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}o(IR,"useColors");function RR(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+Is.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;t.splice(1,0,e,"color: inherit");let r=0,n=0;t[0].replace(/%[a-zA-Z%]/g,i=>{i!=="%%"&&(r++,i==="%c"&&(n=r))}),t.splice(n,0,e)}o(RR,"formatArgs");kt.log=console.debug||console.log||(()=>{});function CR(t){try{t?kt.storage.setItem("debug",t):kt.storage.removeItem("debug")}catch{}}o(CR,"save");function OR(){let t;try{t=kt.storage.getItem("debug")||kt.storage.getItem("DEBUG")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}o(OR,"load");function kR(){try{return localStorage}catch{}}o(kR,"localstorage");Is.exports=$l()(kt);var{formatters:$R}=Is.exports;$R.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var Q_=L((HW,K_)=>{"use strict";K_.exports=(t,e=process.argv)=>{let r=t.startsWith("-")?"":t.length===1?"-":"--",n=e.indexOf(r+t),i=e.indexOf("--");return n!==-1&&(i===-1||n<i)}});var eb=L((GW,X_)=>{"use strict";var zR=require("os"),Y_=require("tty"),nr=Q_(),{env:pt}=process,xn;nr("no-color")||nr("no-colors")||nr("color=false")||nr("color=never")?xn=0:(nr("color")||nr("colors")||nr("color=true")||nr("color=always"))&&(xn=1);"FORCE_COLOR"in pt&&(pt.FORCE_COLOR==="true"?xn=1:pt.FORCE_COLOR==="false"?xn=0:xn=pt.FORCE_COLOR.length===0?1:Math.min(parseInt(pt.FORCE_COLOR,10),3));function zl(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}o(zl,"translateLevel");function Nl(t,e){if(xn===0)return 0;if(nr("color=16m")||nr("color=full")||nr("color=truecolor"))return 3;if(nr("color=256"))return 2;if(t&&!e&&xn===void 0)return 0;let r=xn||0;if(pt.TERM==="dumb")return r;if(process.platform==="win32"){let n=zR.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in pt)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(n=>n in pt)||pt.CI_NAME==="codeship"?1:r;if("TEAMCITY_VERSION"in pt)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(pt.TEAMCITY_VERSION)?1:0;if(pt.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in pt){let n=parseInt((pt.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(pt.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(pt.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(pt.TERM)||"COLORTERM"in pt?1:r}o(Nl,"supportsColor");function NR(t){let e=Nl(t,t&&t.isTTY);return zl(e)}o(NR,"getSupportLevel");X_.exports={supportsColor:NR,stdout:zl(Nl(!0,Y_.isatty(1))),stderr:zl(Nl(!0,Y_.isatty(2)))}});var rb=L((ft,Cs)=>{var DR=require("tty"),Rs=require("util");ft.init=qR;ft.log=LR;ft.formatArgs=jR;ft.save=FR;ft.load=BR;ft.useColors=UR;ft.destroy=Rs.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");ft.colors=[6,2,3,4,5,1];try{let t=eb();t&&(t.stderr||t).level>=2&&(ft.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}ft.inspectOpts=Object.keys(process.env).filter(t=>/^debug_/i.test(t)).reduce((t,e)=>{let r=e.substring(6).toLowerCase().replace(/_([a-z])/g,(i,u)=>u.toUpperCase()),n=process.env[e];return/^(yes|on|true|enabled)$/i.test(n)?n=!0:/^(no|off|false|disabled)$/i.test(n)?n=!1:n==="null"?n=null:n=Number(n),t[r]=n,t},{});function UR(){return"colors"in ft.inspectOpts?!!ft.inspectOpts.colors:DR.isatty(process.stderr.fd)}o(UR,"useColors");function jR(t){let{namespace:e,useColors:r}=this;if(r){let n=this.color,i="\x1B[3"+(n<8?n:"8;5;"+n),u=` ${i};1m${e} \x1B[0m`;t[0]=u+t[0].split(`
1
+ "use strict";var D$=Object.create;var Za=Object.defineProperty;var U$=Object.getOwnPropertyDescriptor;var j$=Object.getOwnPropertyNames;var M$=Object.getPrototypeOf,L$=Object.prototype.hasOwnProperty;var a=(e,t)=>Za(e,"name",{value:t,configurable:!0});var _t=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(o){throw n=[o],o}};var B=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(n){throw t=0,n}},ar=(e,t)=>{for(var n in t)Za(e,n,{get:t[n],enumerable:!0})},WS=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of j$(t))!L$.call(e,r)&&r!==n&&Za(e,r,{get:()=>t[r],enumerable:!(o=U$(t,r))||o.enumerable});return e};var It=(e,t,n)=>(n=e!=null?D$(M$(e)):{},WS(t||!e||!e.__esModule?Za(n,"default",{value:e,enumerable:!0}):n,e)),F$=e=>WS(Za({},"__esModule",{value:!0}),e);var sx=B((ax,Zd)=>{(function(e){"use strict";let t="(0?\\d+|0x[a-f0-9]+)",n={fourOctet:new RegExp(`^${t}\\.${t}\\.${t}\\.${t}$`,"i"),threeOctet:new RegExp(`^${t}\\.${t}\\.${t}$`,"i"),twoOctet:new RegExp(`^${t}\\.${t}$`,"i"),longValue:new RegExp(`^${t}$`,"i")},o=new RegExp("^0[0-7]+$","i"),r=new RegExp("^0x[a-f0-9]+$","i"),i="%[0-9a-z]{1,}",s="(?:[0-9a-f]+::?)+",u={zoneIndex:new RegExp(i,"i"),native:new RegExp(`^(::)?(${s})?([0-9a-f]+)?(::)?(${i})?$`,"i"),deprecatedTransitional:new RegExp(`^(?:::)(${t}\\.${t}\\.${t}\\.${t}(${i})?)$`,"i"),transitional:new RegExp(`^((?:${s})|(?:::)(?:${s})?)${t}\\.${t}\\.${t}\\.${t}(${i})?$`,"i")};function d(h,_){if(h.indexOf("::")!==h.lastIndexOf("::"))return null;let P=0,x=-1,S=(h.match(u.zoneIndex)||[])[0],$,V;for(S&&(S=S.substring(1),h=h.replace(/%.+$/,""));(x=h.indexOf(":",x+1))>=0;)P++;if(h.substr(0,2)==="::"&&P--,h.substr(-2,2)==="::"&&P--,P>_)return null;for(V=_-P,$=":";V--;)$+="0:";return h=h.replace("::",$),h[0]===":"&&(h=h.slice(1)),h[h.length-1]===":"&&(h=h.slice(0,-1)),_=(function(){let W=h.split(":"),Z=[];for(let G=0;G<W.length;G++)Z.push(parseInt(W[G],16));return Z})(),{parts:_,zoneId:S}}a(d,"expandIPv6");function p(h,_,P,x){if(h.length!==_.length)throw new Error("ipaddr: cannot match CIDR for objects with different lengths");let S=0,$;for(;x>0;){if($=P-x,$<0&&($=0),h[S]>>$!==_[S]>>$)return!1;x-=P,S+=1}return!0}a(p,"matchCIDR");function f(h){if(r.test(h))return parseInt(h,16);if(h[0]==="0"&&!isNaN(parseInt(h[1],10))){if(o.test(h))return parseInt(h,8);throw new Error(`ipaddr: cannot parse ${h} as octal`)}return parseInt(h,10)}a(f,"parseIntAuto");function g(h,_){for(;h.length<_;)h=`0${h}`;return h}a(g,"padPart");let y={};y.IPv4=(function(){function h(_){if(_.length!==4)throw new Error("ipaddr: ipv4 octet count should be 4");let P,x;for(P=0;P<_.length;P++)if(x=_[P],!(0<=x&&x<=255))throw new Error("ipaddr: ipv4 octet should fit in 8 bits");this.octets=_}return a(h,"IPv4"),h.prototype.SpecialRanges={unspecified:[[new h([0,0,0,0]),8]],broadcast:[[new h([255,255,255,255]),32]],multicast:[[new h([224,0,0,0]),4]],linkLocal:[[new h([169,254,0,0]),16]],loopback:[[new h([127,0,0,0]),8]],carrierGradeNat:[[new h([100,64,0,0]),10]],private:[[new h([10,0,0,0]),8],[new h([172,16,0,0]),12],[new h([192,168,0,0]),16]],reserved:[[new h([192,0,0,0]),24],[new h([192,0,2,0]),24],[new h([192,88,99,0]),24],[new h([198,18,0,0]),15],[new h([198,51,100,0]),24],[new h([203,0,113,0]),24],[new h([240,0,0,0]),4]],as112:[[new h([192,175,48,0]),24],[new h([192,31,196,0]),24]],amt:[[new h([192,52,193,0]),24]]},h.prototype.kind=function(){return"ipv4"},h.prototype.match=function(_,P){let x;if(P===void 0&&(x=_,_=x[0],P=x[1]),_.kind()!=="ipv4")throw new Error("ipaddr: cannot match ipv4 address with non-ipv4 one");return p(this.octets,_.octets,8,P)},h.prototype.prefixLengthFromSubnetMask=function(){let _=0,P=!1,x={0:8,128:7,192:6,224:5,240:4,248:3,252:2,254:1,255:0},S,$,V;for(S=3;S>=0;S-=1)if($=this.octets[S],$ in x){if(V=x[$],P&&V!==0)return null;V!==8&&(P=!0),_+=V}else return null;return 32-_},h.prototype.range=function(){return y.subnetMatch(this,this.SpecialRanges)},h.prototype.toByteArray=function(){return this.octets.slice(0)},h.prototype.toIPv4MappedAddress=function(){return y.IPv6.parse(`::ffff:${this.toString()}`)},h.prototype.toNormalizedString=function(){return this.toString()},h.prototype.toString=function(){return this.octets.join(".")},h})(),y.IPv4.broadcastAddressFromCIDR=function(h){try{let _=this.parseCIDR(h),P=_[0].toByteArray(),x=this.subnetMaskFromPrefixLength(_[1]).toByteArray(),S=[],$=0;for(;$<4;)S.push(parseInt(P[$],10)|parseInt(x[$],10)^255),$++;return new this(S)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},y.IPv4.isIPv4=function(h){return this.parser(h)!==null},y.IPv4.isValid=function(h){try{return new this(this.parser(h)),!0}catch{return!1}},y.IPv4.isValidCIDR=function(h){try{return this.parseCIDR(h),!0}catch{return!1}},y.IPv4.isValidFourPartDecimal=function(h){return!!(y.IPv4.isValid(h)&&h.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/))},y.IPv4.isValidCIDRFourPartDecimal=function(h){let _=h.match(/^(.+)\/(\d+)$/);return!y.IPv4.isValidCIDR(h)||!_?!1:y.IPv4.isValidFourPartDecimal(_[1])},y.IPv4.networkAddressFromCIDR=function(h){let _,P,x,S,$;try{for(_=this.parseCIDR(h),x=_[0].toByteArray(),$=this.subnetMaskFromPrefixLength(_[1]).toByteArray(),S=[],P=0;P<4;)S.push(parseInt(x[P],10)&parseInt($[P],10)),P++;return new this(S)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},y.IPv4.parse=function(h){let _=this.parser(h);if(_===null)throw new Error("ipaddr: string is not formatted like an IPv4 Address");return new this(_)},y.IPv4.parseCIDR=function(h){let _;if(_=h.match(/^(.+)\/(\d+)$/)){let P=parseInt(_[2]);if(P>=0&&P<=32){let x=[this.parse(_[1]),P];return Object.defineProperty(x,"toString",{value:a(function(){return this.join("/")},"value")}),x}}throw new Error("ipaddr: string is not formatted like an IPv4 CIDR range")},y.IPv4.parser=function(h){let _,P,x;if(_=h.match(n.fourOctet))return(function(){let S=_.slice(1,6),$=[];for(let V=0;V<S.length;V++)P=S[V],$.push(f(P));return $})();if(_=h.match(n.longValue)){if(x=f(_[1]),x>4294967295||x<0)throw new Error("ipaddr: address outside defined range");return(function(){let S=[],$;for($=0;$<=24;$+=8)S.push(x>>$&255);return S})().reverse()}else return(_=h.match(n.twoOctet))?(function(){let S=_.slice(1,4),$=[];if(x=f(S[1]),x>16777215||x<0)throw new Error("ipaddr: address outside defined range");return $.push(f(S[0])),$.push(x>>16&255),$.push(x>>8&255),$.push(x&255),$})():(_=h.match(n.threeOctet))?(function(){let S=_.slice(1,5),$=[];if(x=f(S[2]),x>65535||x<0)throw new Error("ipaddr: address outside defined range");return $.push(f(S[0])),$.push(f(S[1])),$.push(x>>8&255),$.push(x&255),$})():null},y.IPv4.subnetMaskFromPrefixLength=function(h){if(h=parseInt(h),h<0||h>32)throw new Error("ipaddr: invalid IPv4 prefix length");let _=[0,0,0,0],P=0,x=Math.floor(h/8);for(;P<x;)_[P]=255,P++;return x<4&&(_[x]=Math.pow(2,h%8)-1<<8-h%8),new this(_)},y.IPv6=(function(){function h(_,P){let x,S;if(_.length===16)for(this.parts=[],x=0;x<=14;x+=2)this.parts.push(_[x]<<8|_[x+1]);else if(_.length===8)this.parts=_;else throw new Error("ipaddr: ipv6 part count should be 8 or 16");for(x=0;x<this.parts.length;x++)if(S=this.parts[x],!(0<=S&&S<=65535))throw new Error("ipaddr: ipv6 part should fit in 16 bits");P&&(this.zoneId=P)}return a(h,"IPv6"),h.prototype.SpecialRanges={unspecified:[new h([0,0,0,0,0,0,0,0]),128],linkLocal:[new h([65152,0,0,0,0,0,0,0]),10],multicast:[new h([65280,0,0,0,0,0,0,0]),8],loopback:[new h([0,0,0,0,0,0,0,1]),128],uniqueLocal:[new h([64512,0,0,0,0,0,0,0]),7],ipv4Mapped:[new h([0,0,0,0,0,65535,0,0]),96],discard:[new h([256,0,0,0,0,0,0,0]),64],rfc6145:[new h([0,0,0,0,65535,0,0,0]),96],rfc6052:[new h([100,65435,0,0,0,0,0,0]),96],"6to4":[new h([8194,0,0,0,0,0,0,0]),16],teredo:[new h([8193,0,0,0,0,0,0,0]),32],benchmarking:[new h([8193,2,0,0,0,0,0,0]),48],amt:[new h([8193,3,0,0,0,0,0,0]),32],as112v6:[[new h([8193,4,274,0,0,0,0,0]),48],[new h([9760,79,32768,0,0,0,0,0]),48]],deprecated:[new h([8193,16,0,0,0,0,0,0]),28],orchid2:[new h([8193,32,0,0,0,0,0,0]),28],droneRemoteIdProtocolEntityTags:[new h([8193,48,0,0,0,0,0,0]),28],reserved:[[new h([8193,0,0,0,0,0,0,0]),23],[new h([8193,3512,0,0,0,0,0,0]),32]]},h.prototype.isIPv4MappedAddress=function(){return this.range()==="ipv4Mapped"},h.prototype.kind=function(){return"ipv6"},h.prototype.match=function(_,P){let x;if(P===void 0&&(x=_,_=x[0],P=x[1]),_.kind()!=="ipv6")throw new Error("ipaddr: cannot match ipv6 address with non-ipv6 one");return p(this.parts,_.parts,16,P)},h.prototype.prefixLengthFromSubnetMask=function(){let _=0,P=!1,x={0:16,32768:15,49152:14,57344:13,61440:12,63488:11,64512:10,65024:9,65280:8,65408:7,65472:6,65504:5,65520:4,65528:3,65532:2,65534:1,65535:0},S,$;for(let V=7;V>=0;V-=1)if(S=this.parts[V],S in x){if($=x[S],P&&$!==0)return null;$!==16&&(P=!0),_+=$}else return null;return 128-_},h.prototype.range=function(){return y.subnetMatch(this,this.SpecialRanges)},h.prototype.toByteArray=function(){let _,P=[],x=this.parts;for(let S=0;S<x.length;S++)_=x[S],P.push(_>>8),P.push(_&255);return P},h.prototype.toFixedLengthString=function(){let _=(function(){let x=[];for(let S=0;S<this.parts.length;S++)x.push(g(this.parts[S].toString(16),4));return x}).call(this).join(":"),P="";return this.zoneId&&(P=`%${this.zoneId}`),_+P},h.prototype.toIPv4Address=function(){if(!this.isIPv4MappedAddress())throw new Error("ipaddr: trying to convert a generic ipv6 address to ipv4");let _=this.parts.slice(-2),P=_[0],x=_[1];return new y.IPv4([P>>8,P&255,x>>8,x&255])},h.prototype.toNormalizedString=function(){let _=(function(){let x=[];for(let S=0;S<this.parts.length;S++)x.push(this.parts[S].toString(16));return x}).call(this).join(":"),P="";return this.zoneId&&(P=`%${this.zoneId}`),_+P},h.prototype.toRFC5952String=function(){let _=/((^|:)(0(:|$)){2,})/g,P=this.toNormalizedString(),x=0,S=-1,$;for(;$=_.exec(P);)$[0].length>S&&(x=$.index,S=$[0].length);return S<0?P:`${P.substring(0,x)}::${P.substring(x+S)}`},h.prototype.toString=function(){return this.toRFC5952String()},h})(),y.IPv6.broadcastAddressFromCIDR=function(h){try{let _=this.parseCIDR(h),P=_[0].toByteArray(),x=this.subnetMaskFromPrefixLength(_[1]).toByteArray(),S=[],$=0;for(;$<16;)S.push(parseInt(P[$],10)|parseInt(x[$],10)^255),$++;return new this(S)}catch(_){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${_})`)}},y.IPv6.isIPv6=function(h){return this.parser(h)!==null},y.IPv6.isValid=function(h){if(typeof h=="string"&&h.indexOf(":")===-1)return!1;try{let _=this.parser(h);return new this(_.parts,_.zoneId),!0}catch{return!1}},y.IPv6.isValidCIDR=function(h){if(typeof h=="string"&&h.indexOf(":")===-1)return!1;try{return this.parseCIDR(h),!0}catch{return!1}},y.IPv6.networkAddressFromCIDR=function(h){let _,P,x,S,$;try{for(_=this.parseCIDR(h),x=_[0].toByteArray(),$=this.subnetMaskFromPrefixLength(_[1]).toByteArray(),S=[],P=0;P<16;)S.push(parseInt(x[P],10)&parseInt($[P],10)),P++;return new this(S)}catch(V){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${V})`)}},y.IPv6.parse=function(h){let _=this.parser(h);if(_.parts===null)throw new Error("ipaddr: string is not formatted like an IPv6 Address");return new this(_.parts,_.zoneId)},y.IPv6.parseCIDR=function(h){let _,P,x;if((P=h.match(/^(.+)\/(\d+)$/))&&(_=parseInt(P[2]),_>=0&&_<=128))return x=[this.parse(P[1]),_],Object.defineProperty(x,"toString",{value:a(function(){return this.join("/")},"value")}),x;throw new Error("ipaddr: string is not formatted like an IPv6 CIDR range")},y.IPv6.parser=function(h){let _,P,x,S,$,V;if(x=h.match(u.deprecatedTransitional))return this.parser(`::ffff:${x[1]}`);if(u.native.test(h))return d(h,8);if((x=h.match(u.transitional))&&(V=x[6]||"",_=x[1],x[1].endsWith("::")||(_=_.slice(0,-1)),_=d(_+V,6),_.parts)){for($=[parseInt(x[2]),parseInt(x[3]),parseInt(x[4]),parseInt(x[5])],P=0;P<$.length;P++)if(S=$[P],!(0<=S&&S<=255))return null;return _.parts.push($[0]<<8|$[1]),_.parts.push($[2]<<8|$[3]),{parts:_.parts,zoneId:_.zoneId}}return null},y.IPv6.subnetMaskFromPrefixLength=function(h){if(h=parseInt(h),h<0||h>128)throw new Error("ipaddr: invalid IPv6 prefix length");let _=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],P=0,x=Math.floor(h/8);for(;P<x;)_[P]=255,P++;return x<16&&(_[x]=Math.pow(2,h%8)-1<<8-h%8),new this(_)},y.fromByteArray=function(h){let _=h.length;if(_===4)return new y.IPv4(h);if(_===16)return new y.IPv6(h);throw new Error("ipaddr: the binary input is neither an IPv6 nor IPv4 address")},y.isValid=function(h){return y.IPv6.isValid(h)||y.IPv4.isValid(h)},y.isValidCIDR=function(h){return y.IPv6.isValidCIDR(h)||y.IPv4.isValidCIDR(h)},y.parse=function(h){if(y.IPv6.isValid(h))return y.IPv6.parse(h);if(y.IPv4.isValid(h))return y.IPv4.parse(h);throw new Error("ipaddr: the address has neither IPv6 nor IPv4 format")},y.parseCIDR=function(h){try{return y.IPv6.parseCIDR(h)}catch{try{return y.IPv4.parseCIDR(h)}catch{throw new Error("ipaddr: the address has neither IPv6 nor IPv4 CIDR format")}}},y.process=function(h){let _=this.parse(h);return _.kind()==="ipv6"&&_.isIPv4MappedAddress()?_.toIPv4Address():_},y.subnetMatch=function(h,_,P){let x,S,$,V;P==null&&(P="unicast");for(S in _)if(Object.prototype.hasOwnProperty.call(_,S)){for($=_[S],$[0]&&!($[0]instanceof Array)&&($=[$]),x=0;x<$.length;x++)if(V=$[x],h.kind()===V[0].kind()&&h.match.apply(h,V))return S}return P},typeof Zd<"u"&&Zd.exports?Zd.exports=y:e.ipaddr=y})(ax)});var Rw=B((y8,Iw)=>{var Aw=require("stream").Stream,Cj=require("util");Iw.exports=qr;function qr(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}a(qr,"DelayedStream");Cj.inherits(qr,Aw);qr.create=function(e,t){var n=new this;t=t||{};for(var o in t)n[o]=t[o];n.source=e;var r=e.emit;return e.emit=function(){return n._handleEmit(arguments),r.apply(e,arguments)},e.on("error",function(){}),n.pauseStream&&e.pause(),n};Object.defineProperty(qr.prototype,"readable",{configurable:!0,enumerable:!0,get:a(function(){return this.source.readable},"get")});qr.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};qr.prototype.resume=function(){this._released||this.release(),this.source.resume()};qr.prototype.pause=function(){this.source.pause()};qr.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(e){this.emit.apply(this,e)}.bind(this)),this._bufferedEvents=[]};qr.prototype.pipe=function(){var e=Aw.prototype.pipe.apply(this,arguments);return this.resume(),e};qr.prototype._handleEmit=function(e){if(this._released){this.emit.apply(this,e);return}e[0]==="data"&&(this.dataSize+=e[1].length,this._checkIfMaxDataSizeExceeded()),this._bufferedEvents.push(e)};qr.prototype._checkIfMaxDataSizeExceeded=function(){if(!this._maxDataSizeExceeded&&!(this.dataSize<=this.maxDataSize)){this._maxDataSizeExceeded=!0;var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(e))}}});var $w=B((b8,Cw)=>{var $j=require("util"),kw=require("stream").Stream,Ow=Rw();Cw.exports=st;function st(){this.writable=!1,this.readable=!0,this.dataSize=0,this.maxDataSize=2*1024*1024,this.pauseStreams=!0,this._released=!1,this._streams=[],this._currentStream=null,this._insideLoop=!1,this._pendingNext=!1}a(st,"CombinedStream");$j.inherits(st,kw);st.create=function(e){var t=new this;e=e||{};for(var n in e)t[n]=e[n];return t};st.isStreamLike=function(e){return typeof e!="function"&&typeof e!="string"&&typeof e!="boolean"&&typeof e!="number"&&!Buffer.isBuffer(e)};st.prototype.append=function(e){var t=st.isStreamLike(e);if(t){if(!(e instanceof Ow)){var n=Ow.create(e,{maxDataSize:1/0,pauseStream:this.pauseStreams});e.on("data",this._checkDataSize.bind(this)),e=n}this._handleErrors(e),this.pauseStreams&&e.pause()}return this._streams.push(e),this};st.prototype.pipe=function(e,t){return kw.prototype.pipe.call(this,e,t),this.resume(),e};st.prototype._getNext=function(){if(this._currentStream=null,this._insideLoop){this._pendingNext=!0;return}this._insideLoop=!0;try{do this._pendingNext=!1,this._realGetNext();while(this._pendingNext)}finally{this._insideLoop=!1}};st.prototype._realGetNext=function(){var e=this._streams.shift();if(typeof e>"u"){this.end();return}if(typeof e!="function"){this._pipeNext(e);return}var t=e;t(function(n){var o=st.isStreamLike(n);o&&(n.on("data",this._checkDataSize.bind(this)),this._handleErrors(n)),this._pipeNext(n)}.bind(this))};st.prototype._pipeNext=function(e){this._currentStream=e;var t=st.isStreamLike(e);if(t){e.on("end",this._getNext.bind(this)),e.pipe(this,{end:!1});return}var n=e;this.write(n),this._getNext()};st.prototype._handleErrors=function(e){var t=this;e.on("error",function(n){t._emitError(n)})};st.prototype.write=function(e){this.emit("data",e)};st.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"))};st.prototype.resume=function(){this._released||(this._released=!0,this.writable=!0,this._getNext()),this.pauseStreams&&this._currentStream&&typeof this._currentStream.resume=="function"&&this._currentStream.resume(),this.emit("resume")};st.prototype.end=function(){this._reset(),this.emit("end")};st.prototype.destroy=function(){this._reset(),this.emit("close")};st.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};st.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(e))}};st.prototype._updateDataSize=function(){this.dataSize=0;var e=this;this._streams.forEach(function(t){t.dataSize&&(e.dataSize+=t.dataSize)}),this._currentStream&&this._currentStream.dataSize&&(this.dataSize+=this._currentStream.dataSize)};st.prototype._emitError=function(e){this._reset(),this.emit("error",e)}});var Nw=B((E8,zw)=>{"use strict";zw.exports={"application/json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["json","map"]},"application/xml":{source:"iana",compressible:!0,extensions:["xml"]},"application/javascript":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["js","mjs"]},"application/pdf":{source:"iana",compressible:!1,extensions:["pdf"]},"application/zip":{source:"iana",compressible:!1,extensions:["zip"]},"application/gzip":{source:"iana",compressible:!1,extensions:["gz"]},"application/octet-stream":{source:"iana",compressible:!1,extensions:["bin","dat"]},"application/msword":{source:"iana",extensions:["doc"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{source:"iana",extensions:["docx"]},"application/vnd.ms-excel":{source:"iana",extensions:["xls"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{source:"iana",extensions:["xlsx"]},"application/vnd.ms-powerpoint":{source:"iana",extensions:["ppt"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{source:"iana",extensions:["pptx"]},"application/csv":{compressible:!0,extensions:["csv"]},"application/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"application/x-tar":{source:"apache",compressible:!0,extensions:["tar"]},"application/x-7z-compressed":{source:"apache",compressible:!1,extensions:["7z"]},"application/wasm":{source:"iana",compressible:!0,extensions:["wasm"]},"text/plain":{source:"iana",compressible:!0,charset:"UTF-8",extensions:["txt","text","log"]},"text/html":{source:"iana",compressible:!0,charset:"UTF-8",extensions:["html","htm"]},"text/css":{source:"iana",compressible:!0,charset:"UTF-8",extensions:["css"]},"text/csv":{source:"iana",compressible:!0,charset:"UTF-8",extensions:["csv"]},"text/markdown":{source:"iana",compressible:!0,charset:"UTF-8",extensions:["md","markdown"]},"text/xml":{source:"iana",compressible:!0,extensions:["xml"]},"text/yaml":{compressible:!0,extensions:["yaml","yml"]},"image/png":{source:"iana",compressible:!1,extensions:["png"]},"image/jpeg":{source:"iana",compressible:!1,extensions:["jpeg","jpg","jpe"]},"image/gif":{source:"iana",compressible:!1,extensions:["gif"]},"image/webp":{source:"apache",compressible:!1,extensions:["webp"]},"image/svg+xml":{source:"iana",compressible:!0,extensions:["svg","svgz"]},"image/bmp":{source:"iana",compressible:!0,extensions:["bmp"]},"image/tiff":{source:"iana",compressible:!1,extensions:["tiff","tif"]},"image/x-icon":{source:"apache",compressible:!0,extensions:["ico"]},"image/heic":{source:"iana",compressible:!1,extensions:["heic"]},"image/avif":{source:"iana",compressible:!1,extensions:["avif"]},"audio/mpeg":{source:"iana",compressible:!1,extensions:["mp3","mpga"]},"audio/wav":{compressible:!1,extensions:["wav"]},"audio/ogg":{source:"iana",compressible:!1,extensions:["ogg","oga"]},"audio/webm":{source:"apache",compressible:!1,extensions:["weba"]},"audio/mp4":{source:"iana",compressible:!1,extensions:["m4a"]},"video/mp4":{source:"iana",compressible:!1,extensions:["mp4","m4v"]},"video/mpeg":{source:"iana",compressible:!1,extensions:["mpeg","mpg"]},"video/webm":{source:"iana",compressible:!1,extensions:["webm"]},"video/quicktime":{source:"iana",compressible:!1,extensions:["mov","qt"]},"video/x-msvideo":{source:"iana",compressible:!1,extensions:["avi"]},"font/woff":{source:"iana",compressible:!1,extensions:["woff"]},"font/woff2":{source:"iana",compressible:!1,extensions:["woff2"]},"font/ttf":{source:"iana",compressible:!0,extensions:["ttf"]},"font/otf":{source:"iana",compressible:!0,extensions:["otf"]},"application/ld+json":{source:"iana",compressible:!0,extensions:["jsonld"]},"application/x-www-form-urlencoded":{source:"iana",compressible:!0},"multipart/form-data":{source:"iana"},"application/vnd.api+json":{source:"iana",compressible:!0},"application/manifest+json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["webmanifest"]},"application/ics":{compressible:!0,extensions:["ics"]},"text/calendar":{source:"iana",compressible:!0,extensions:["ics","ifb"]},"application/x-ndjson":{compressible:!0,extensions:["ndjson"]}}});var jw=B(Xt=>{"use strict";var Cp=Nw(),zj=require("path").extname,Dw=/^\s*([^;\s]*)(?:;|\s|$)/,Nj=/^text\//i;Xt.charset=Uw;Xt.charsets={lookup:Uw};Xt.contentType=Dj;Xt.extension=Uj;Xt.extensions=Object.create(null);Xt.lookup=jj;Xt.types=Object.create(null);Mj(Xt.extensions,Xt.types);function Uw(e){if(!e||typeof e!="string")return!1;var t=Dw.exec(e),n=t&&Cp[t[1].toLowerCase()];return n&&n.charset?n.charset:t&&Nj.test(t[1])?"UTF-8":!1}a(Uw,"charset");function Dj(e){if(!e||typeof e!="string")return!1;var t=e.indexOf("/")===-1?Xt.lookup(e):e;if(!t)return!1;if(t.indexOf("charset")===-1){var n=Xt.charset(t);n&&(t+="; charset="+n.toLowerCase())}return t}a(Dj,"contentType");function Uj(e){if(!e||typeof e!="string")return!1;var t=Dw.exec(e),n=t&&Xt.extensions[t[1].toLowerCase()];return!n||!n.length?!1:n[0]}a(Uj,"extension");function jj(e){if(!e||typeof e!="string")return!1;var t=zj("x."+e).toLowerCase().substr(1);return t&&Xt.types[t]||!1}a(jj,"lookup");function Mj(e,t){var n=["nginx","apache",void 0,"iana"];Object.keys(Cp).forEach(a(function(r){var i=Cp[r],s=i.extensions;if(!(!s||!s.length)){e[r]=s;for(var u=0;u<s.length;u++){var d=s[u];if(t[d]){var p=n.indexOf(Cp[t[d]].source),f=n.indexOf(i.source);if(t[d]!=="application/octet-stream"&&(p>f||p===f&&t[d].substr(0,12)==="application/"))continue}t[d]=r}}},"forEachMimeType"))}a(Mj,"populateMaps")});var Lw=B((x8,Mw)=>{Mw.exports=Lj;function Lj(e){var t=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;t?t(e):setTimeout(e,0)}a(Lj,"defer")});var ob=B((w8,Bw)=>{var Fw=Lw();Bw.exports=Fj;function Fj(e){var t=!1;return Fw(function(){t=!0}),a(function(o,r){t?e(o,r):Fw(a(function(){e(o,r)},"nextTick_callback"))},"async_callback")}a(Fj,"async")});var ib=B((I8,qw)=>{qw.exports=Bj;function Bj(e){Object.keys(e.jobs).forEach(qj.bind(e)),e.jobs={}}a(Bj,"abort");function qj(e){typeof this.jobs[e]=="function"&&this.jobs[e]()}a(qj,"clean")});var ab=B((O8,Zw)=>{var Vw=ob(),Vj=ib();Zw.exports=Zj;function Zj(e,t,n,o){var r=n.keyedList?n.keyedList[n.index]:n.index;n.jobs[r]=Hj(t,r,e[r],function(i,s){r in n.jobs&&(delete n.jobs[r],i?Vj(n):n.results[r]=s,o(i,n.results))})}a(Zj,"iterate");function Hj(e,t,n,o){var r;return e.length==2?r=e(n,Vw(o)):r=e(n,t,Vw(o)),r}a(Hj,"runJob")});var sb=B((C8,Hw)=>{Hw.exports=Gj;function Gj(e,t){var n=!Array.isArray(e),o={index:0,keyedList:n||t?Object.keys(e):null,jobs:{},results:n?{}:[],size:n?Object.keys(e).length:e.length};return t&&o.keyedList.sort(n?t:function(r,i){return t(e[r],e[i])}),o}a(Gj,"state")});var cb=B((z8,Gw)=>{var Wj=ib(),Jj=ob();Gw.exports=Kj;function Kj(e){Object.keys(this.jobs).length&&(this.index=this.size,Wj(this),Jj(e)(null,this.results))}a(Kj,"terminator")});var Jw=B((D8,Ww)=>{var Xj=ab(),Qj=sb(),Yj=cb();Ww.exports=eM;function eM(e,t,n){for(var o=Qj(e);o.index<(o.keyedList||e).length;)Xj(e,t,o,function(r,i){if(r){n(r,i);return}if(Object.keys(o.jobs).length===0){n(null,o.results);return}}),o.index++;return Yj.bind(o,n)}a(eM,"parallel")});var ub=B((j8,$p)=>{var Kw=ab(),tM=sb(),rM=cb();$p.exports=nM;$p.exports.ascending=Xw;$p.exports.descending=oM;function nM(e,t,n,o){var r=tM(e,n);return Kw(e,t,r,a(function i(s,u){if(s){o(s,u);return}if(r.index++,r.index<(r.keyedList||e).length){Kw(e,t,r,i);return}o(null,r.results)},"iteratorHandler")),rM.bind(r,o)}a(nM,"serialOrdered");function Xw(e,t){return e<t?-1:e>t?1:0}a(Xw,"ascending");function oM(e,t){return-1*Xw(e,t)}a(oM,"descending")});var Yw=B((L8,Qw)=>{var iM=ub();Qw.exports=aM;function aM(e,t,n){return iM(e,t,null,n)}a(aM,"serial")});var tA=B((B8,eA)=>{eA.exports={parallel:Jw(),serial:Yw(),serialOrdered:ub()}});var lb=B((q8,rA)=>{"use strict";rA.exports=Object});var oA=B((V8,nA)=>{"use strict";nA.exports=Error});var aA=B((Z8,iA)=>{"use strict";iA.exports=EvalError});var cA=B((H8,sA)=>{"use strict";sA.exports=RangeError});var lA=B((G8,uA)=>{"use strict";uA.exports=ReferenceError});var pA=B((W8,dA)=>{"use strict";dA.exports=SyntaxError});var zp=B((J8,fA)=>{"use strict";fA.exports=TypeError});var hA=B((K8,mA)=>{"use strict";mA.exports=URIError});var yA=B((X8,gA)=>{"use strict";gA.exports=Math.abs});var bA=B((Q8,_A)=>{"use strict";_A.exports=Math.floor});var EA=B((Y8,vA)=>{"use strict";vA.exports=Math.max});var PA=B((e9,SA)=>{"use strict";SA.exports=Math.min});var TA=B((t9,xA)=>{"use strict";xA.exports=Math.pow});var AA=B((r9,wA)=>{"use strict";wA.exports=Math.round});var RA=B((n9,IA)=>{"use strict";IA.exports=Number.isNaN||a(function(t){return t!==t},"isNaN")});var kA=B((i9,OA)=>{"use strict";var sM=RA();OA.exports=a(function(t){return sM(t)||t===0?t:t<0?-1:1},"sign")});var $A=B((s9,CA)=>{"use strict";CA.exports=Object.getOwnPropertyDescriptor});var db=B((c9,zA)=>{"use strict";var Np=$A();if(Np)try{Np([],"length")}catch{Np=null}zA.exports=Np});var DA=B((u9,NA)=>{"use strict";var Dp=Object.defineProperty||!1;if(Dp)try{Dp({},"a",{value:1})}catch{Dp=!1}NA.exports=Dp});var pb=B((l9,UA)=>{"use strict";UA.exports=a(function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},n=Symbol("test"),o=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(o)!=="[object Symbol]")return!1;var r=42;t[n]=r;for(var i in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var s=Object.getOwnPropertySymbols(t);if(s.length!==1||s[0]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var u=Object.getOwnPropertyDescriptor(t,n);if(u.value!==r||u.enumerable!==!0)return!1}return!0},"hasSymbols")});var LA=B((p9,MA)=>{"use strict";var jA=typeof Symbol<"u"&&Symbol,cM=pb();MA.exports=a(function(){return typeof jA!="function"||typeof Symbol!="function"||typeof jA("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:cM()},"hasNativeSymbols")});var fb=B((m9,FA)=>{"use strict";FA.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var mb=B((h9,BA)=>{"use strict";var uM=lb();BA.exports=uM.getPrototypeOf||null});var ZA=B((g9,VA)=>{"use strict";var lM="Function.prototype.bind called on incompatible ",dM=Object.prototype.toString,pM=Math.max,fM="[object Function]",qA=a(function(t,n){for(var o=[],r=0;r<t.length;r+=1)o[r]=t[r];for(var i=0;i<n.length;i+=1)o[i+t.length]=n[i];return o},"concatty"),mM=a(function(t,n){for(var o=[],r=n||0,i=0;r<t.length;r+=1,i+=1)o[i]=t[r];return o},"slicy"),hM=a(function(e,t){for(var n="",o=0;o<e.length;o+=1)n+=e[o],o+1<e.length&&(n+=t);return n},"joiny");VA.exports=a(function(t){var n=this;if(typeof n!="function"||dM.apply(n)!==fM)throw new TypeError(lM+n);for(var o=mM(arguments,1),r,i=a(function(){if(this instanceof r){var f=n.apply(this,qA(o,arguments));return Object(f)===f?f:this}return n.apply(t,qA(o,arguments))},"binder"),s=pM(0,n.length-o.length),u=[],d=0;d<s;d++)u[d]="$"+d;if(r=Function("binder","return function ("+hM(u,",")+"){ return binder.apply(this,arguments); }")(i),n.prototype){var p=a(function(){},"Empty");p.prototype=n.prototype,r.prototype=new p,p.prototype=null}return r},"bind")});var na=B((_9,HA)=>{"use strict";var gM=ZA();HA.exports=Function.prototype.bind||gM});var Up=B((b9,GA)=>{"use strict";GA.exports=Function.prototype.call});var hb=B((v9,WA)=>{"use strict";WA.exports=Function.prototype.apply});var KA=B((E9,JA)=>{"use strict";JA.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var QA=B((S9,XA)=>{"use strict";var yM=na(),_M=hb(),bM=Up(),vM=KA();XA.exports=vM||yM.call(bM,_M)});var eI=B((P9,YA)=>{"use strict";var EM=na(),SM=zp(),PM=Up(),xM=QA();YA.exports=a(function(t){if(t.length<1||typeof t[0]!="function")throw new SM("a function is required");return xM(EM,PM,t)},"callBindBasic")});var aI=B((T9,iI)=>{"use strict";var TM=eI(),tI=db(),nI;try{nI=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!="object"||!("code"in e)||e.code!=="ERR_PROTO_ACCESS")throw e}var gb=!!nI&&tI&&tI(Object.prototype,"__proto__"),oI=Object,rI=oI.getPrototypeOf;iI.exports=gb&&typeof gb.get=="function"?TM([gb.get]):typeof rI=="function"?a(function(t){return rI(t==null?t:oI(t))},"getDunder"):!1});var dI=B((A9,lI)=>{"use strict";var sI=fb(),cI=mb(),uI=aI();lI.exports=sI?a(function(t){return sI(t)},"getProto"):cI?a(function(t){if(!t||typeof t!="object"&&typeof t!="function")throw new TypeError("getProto: not an object");return cI(t)},"getProto"):uI?a(function(t){return uI(t)},"getProto"):null});var yb=B((R9,pI)=>{"use strict";var wM=Function.prototype.call,AM=Object.prototype.hasOwnProperty,IM=na();pI.exports=IM.call(wM,AM)});var bI=B((O9,_I)=>{"use strict";var Re,RM=lb(),OM=oA(),kM=aA(),CM=cA(),$M=lA(),sa=pA(),aa=zp(),zM=hA(),NM=yA(),DM=bA(),UM=EA(),jM=PA(),MM=TA(),LM=AA(),FM=kA(),gI=Function,_b=a(function(e){try{return gI('"use strict"; return ('+e+").constructor;")()}catch{}},"getEvalledConstructor"),Uc=db(),BM=DA(),bb=a(function(){throw new aa},"throwTypeError"),qM=Uc?(function(){try{return arguments.callee,bb}catch{try{return Uc(arguments,"callee").get}catch{return bb}}})():bb,oa=LA()(),St=dI(),VM=mb(),ZM=fb(),yI=hb(),jc=Up(),ia={},HM=typeof Uint8Array>"u"||!St?Re:St(Uint8Array),Wo={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?Re:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Re:ArrayBuffer,"%ArrayIteratorPrototype%":oa&&St?St([][Symbol.iterator]()):Re,"%AsyncFromSyncIteratorPrototype%":Re,"%AsyncFunction%":ia,"%AsyncGenerator%":ia,"%AsyncGeneratorFunction%":ia,"%AsyncIteratorPrototype%":ia,"%Atomics%":typeof Atomics>"u"?Re:Atomics,"%BigInt%":typeof BigInt>"u"?Re:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Re:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Re:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Re:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":OM,"%eval%":eval,"%EvalError%":kM,"%Float16Array%":typeof Float16Array>"u"?Re:Float16Array,"%Float32Array%":typeof Float32Array>"u"?Re:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Re:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Re:FinalizationRegistry,"%Function%":gI,"%GeneratorFunction%":ia,"%Int8Array%":typeof Int8Array>"u"?Re:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Re:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Re:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":oa&&St?St(St([][Symbol.iterator]())):Re,"%JSON%":typeof JSON=="object"?JSON:Re,"%Map%":typeof Map>"u"?Re:Map,"%MapIteratorPrototype%":typeof Map>"u"||!oa||!St?Re:St(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":RM,"%Object.getOwnPropertyDescriptor%":Uc,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Re:Promise,"%Proxy%":typeof Proxy>"u"?Re:Proxy,"%RangeError%":CM,"%ReferenceError%":$M,"%Reflect%":typeof Reflect>"u"?Re:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Re:Set,"%SetIteratorPrototype%":typeof Set>"u"||!oa||!St?Re:St(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Re:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":oa&&St?St(""[Symbol.iterator]()):Re,"%Symbol%":oa?Symbol:Re,"%SyntaxError%":sa,"%ThrowTypeError%":qM,"%TypedArray%":HM,"%TypeError%":aa,"%Uint8Array%":typeof Uint8Array>"u"?Re:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Re:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Re:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Re:Uint32Array,"%URIError%":zM,"%WeakMap%":typeof WeakMap>"u"?Re:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Re:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Re:WeakSet,"%Function.prototype.call%":jc,"%Function.prototype.apply%":yI,"%Object.defineProperty%":BM,"%Object.getPrototypeOf%":VM,"%Math.abs%":NM,"%Math.floor%":DM,"%Math.max%":UM,"%Math.min%":jM,"%Math.pow%":MM,"%Math.round%":LM,"%Math.sign%":FM,"%Reflect.getPrototypeOf%":ZM};if(St)try{null.error}catch(e){fI=St(St(e)),Wo["%Error.prototype%"]=fI}var fI,GM=a(function e(t){var n;if(t==="%AsyncFunction%")n=_b("async function () {}");else if(t==="%GeneratorFunction%")n=_b("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=_b("async function* () {}");else if(t==="%AsyncGenerator%"){var o=e("%AsyncGeneratorFunction%");o&&(n=o.prototype)}else if(t==="%AsyncIteratorPrototype%"){var r=e("%AsyncGenerator%");r&&St&&(n=St(r.prototype))}return Wo[t]=n,n},"doEval"),mI={__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"]},Mc=na(),jp=yb(),WM=Mc.call(jc,Array.prototype.concat),JM=Mc.call(yI,Array.prototype.splice),hI=Mc.call(jc,String.prototype.replace),Mp=Mc.call(jc,String.prototype.slice),KM=Mc.call(jc,RegExp.prototype.exec),XM=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,QM=/\\(\\)?/g,YM=a(function(t){var n=Mp(t,0,1),o=Mp(t,-1);if(n==="%"&&o!=="%")throw new sa("invalid intrinsic syntax, expected closing `%`");if(o==="%"&&n!=="%")throw new sa("invalid intrinsic syntax, expected opening `%`");var r=[];return hI(t,XM,function(i,s,u,d){r[r.length]=u?hI(d,QM,"$1"):s||i}),r},"stringToPath"),eL=a(function(t,n){var o=t,r;if(jp(mI,o)&&(r=mI[o],o="%"+r[0]+"%"),jp(Wo,o)){var i=Wo[o];if(i===ia&&(i=GM(o)),typeof i>"u"&&!n)throw new aa("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:r,name:o,value:i}}throw new sa("intrinsic "+t+" does not exist!")},"getBaseIntrinsic");_I.exports=a(function(t,n){if(typeof t!="string"||t.length===0)throw new aa("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new aa('"allowMissing" argument must be a boolean');if(KM(/^%?[^%]*%?$/,t)===null)throw new sa("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var o=YM(t),r=o.length>0?o[0]:"",i=eL("%"+r+"%",n),s=i.name,u=i.value,d=!1,p=i.alias;p&&(r=p[0],JM(o,WM([0,1],p)));for(var f=1,g=!0;f<o.length;f+=1){var y=o[f],h=Mp(y,0,1),_=Mp(y,-1);if((h==='"'||h==="'"||h==="`"||_==='"'||_==="'"||_==="`")&&h!==_)throw new sa("property names with quotes must have matching quotes");if((y==="constructor"||!g)&&(d=!0),r+="."+y,s="%"+r+"%",jp(Wo,s))u=Wo[s];else if(u!=null){if(!(y in u)){if(!n)throw new aa("base intrinsic for "+t+" exists, but the property is not available.");return}if(Uc&&f+1>=o.length){var P=Uc(u,y);g=!!P,g&&"get"in P&&!("originalValue"in P.get)?u=P.get:u=u[y]}else g=jp(u,y),u=u[y];g&&!d&&(Wo[s]=u)}}return u},"GetIntrinsic")});var EI=B((C9,vI)=>{"use strict";var tL=pb();vI.exports=a(function(){return tL()&&!!Symbol.toStringTag},"hasToStringTagShams")});var xI=B((z9,PI)=>{"use strict";var rL=bI(),SI=rL("%Object.defineProperty%",!0),nL=EI()(),oL=yb(),iL=zp(),Lp=nL?Symbol.toStringTag:null;PI.exports=a(function(t,n){var o=arguments.length>2&&!!arguments[2]&&arguments[2].force,r=arguments.length>2&&!!arguments[2]&&arguments[2].nonConfigurable;if(typeof o<"u"&&typeof o!="boolean"||typeof r<"u"&&typeof r!="boolean")throw new iL("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");Lp&&(o||!oL(t,Lp))&&(SI?SI(t,Lp,{configurable:!r,enumerable:!1,value:n,writable:!1}):t[Lp]=n)},"setToStringTag")});var wI=B((D9,TI)=>{"use strict";var aL=Function.prototype.call,sL=Object.prototype.hasOwnProperty,cL=na();TI.exports=cL.call(aL,sL)});var II=B((U9,AI)=>{"use strict";AI.exports=function(e,t){return Object.keys(t).forEach(function(n){e[n]=e[n]||t[n]}),e}});var kI=B((j9,OI)=>{"use strict";var Pb=$w(),uL=require("util"),vb=require("path"),lL=require("http"),dL=require("https"),pL=require("url").parse,fL=require("fs"),mL=require("stream").Stream,hL=require("crypto"),Eb=jw(),gL=tA(),yL=xI(),co=wI(),Sb=II();function RI(e){return String(e).replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/"/g,"%22")}a(RI,"escapeHeaderParam");function De(e){if(!(this instanceof De))return new De(e);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],Pb.call(this),e=e||{};for(var t in e)this[t]=e[t]}a(De,"FormData");uL.inherits(De,Pb);De.LINE_BREAK=`\r
2
+ `;De.DEFAULT_CONTENT_TYPE="application/octet-stream";De.prototype.append=function(e,t,n){n=n||{},typeof n=="string"&&(n={filename:n});var o=Pb.prototype.append.bind(this);if((typeof t=="number"||t==null)&&(t=String(t)),Array.isArray(t)){this._error(new Error("Arrays are not supported."));return}var r=this._multiPartHeader(e,t,n),i=this._multiPartFooter();o(r),o(t),o(i),this._trackLength(r,t,n)};De.prototype._trackLength=function(e,t,n){var o=0;n.knownLength!=null?o+=Number(n.knownLength):Buffer.isBuffer(t)?o=t.length:typeof t=="string"&&(o=Buffer.byteLength(t)),this._valueLength+=o,this._overheadLength+=Buffer.byteLength(e)+De.LINE_BREAK.length,!(!t||!t.path&&!(t.readable&&co(t,"httpVersion"))&&!(t instanceof mL))&&(n.knownLength||this._valuesToMeasure.push(t))};De.prototype._lengthRetriever=function(e,t){co(e,"fd")?e.end!=null&&e.end!=1/0&&e.start!=null?t(null,e.end+1-(e.start?e.start:0)):fL.stat(e.path,function(n,o){if(n){t(n);return}var r=o.size-(e.start?e.start:0);t(null,r)}):co(e,"httpVersion")?t(null,Number(e.headers["content-length"])):co(e,"httpModule")?(e.on("response",function(n){e.pause(),t(null,Number(n.headers["content-length"]))}),e.resume()):t("Unknown stream")};De.prototype._multiPartHeader=function(e,t,n){if(typeof n.header=="string")return n.header;var o=this._getContentDisposition(t,n),r=this._getContentType(t,n),i="",s={"Content-Disposition":["form-data",'name="'+RI(e)+'"'].concat(o||[]),"Content-Type":[].concat(r||[])};typeof n.header=="object"&&Sb(s,n.header);var u;for(var d in s)if(co(s,d)){if(u=s[d],u==null)continue;Array.isArray(u)||(u=[u]),u.length&&(i+=d+": "+u.join("; ")+De.LINE_BREAK)}return"--"+this.getBoundary()+De.LINE_BREAK+i+De.LINE_BREAK};De.prototype._getContentDisposition=function(e,t){var n;if(typeof t.filepath=="string"?n=vb.normalize(t.filepath).replace(/\\/g,"/"):t.filename||e&&(e.name||e.path)?n=vb.basename(t.filename||e&&(e.name||e.path)):e&&e.readable&&co(e,"httpVersion")&&(n=vb.basename(e.client._httpMessage.path||"")),n)return'filename="'+RI(n)+'"'};De.prototype._getContentType=function(e,t){var n=t.contentType;return!n&&e&&e.name&&(n=Eb.lookup(e.name)),!n&&e&&e.path&&(n=Eb.lookup(e.path)),!n&&e&&e.readable&&co(e,"httpVersion")&&(n=e.headers["content-type"]),!n&&(t.filepath||t.filename)&&(n=Eb.lookup(t.filepath||t.filename)),!n&&e&&typeof e=="object"&&(n=De.DEFAULT_CONTENT_TYPE),n};De.prototype._multiPartFooter=function(){return function(e){var t=De.LINE_BREAK,n=this._streams.length===0;n&&(t+=this._lastBoundary()),e(t)}.bind(this)};De.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+De.LINE_BREAK};De.prototype.getHeaders=function(e){var t,n={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in e)co(e,t)&&(n[t.toLowerCase()]=e[t]);return n};De.prototype.setBoundary=function(e){if(typeof e!="string")throw new TypeError("FormData boundary must be a string");this._boundary=e};De.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};De.prototype.getBuffer=function(){for(var e=new Buffer.alloc(0),t=this.getBoundary(),n=0,o=this._streams.length;n<o;n++)typeof this._streams[n]!="function"&&(Buffer.isBuffer(this._streams[n])?e=Buffer.concat([e,this._streams[n]]):e=Buffer.concat([e,Buffer.from(this._streams[n])]),(typeof this._streams[n]!="string"||this._streams[n].substring(2,t.length+2)!==t)&&(e=Buffer.concat([e,Buffer.from(De.LINE_BREAK)])));return Buffer.concat([e,Buffer.from(this._lastBoundary())])};De.prototype._generateBoundary=function(){this._boundary="--------------------------"+hL.randomBytes(12).toString("hex")};De.prototype.getLengthSync=function(){var e=this._overheadLength+this._valueLength;return this._streams.length&&(e+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),e};De.prototype.hasKnownLength=function(){var e=!0;return this._valuesToMeasure.length&&(e=!1),e};De.prototype.getLength=function(e){var t=this._overheadLength+this._valueLength;if(this._streams.length&&(t+=this._lastBoundary().length),!this._valuesToMeasure.length){process.nextTick(e.bind(this,null,t));return}gL.parallel(this._valuesToMeasure,this._lengthRetriever,function(n,o){if(n){e(n);return}o.forEach(function(r){t+=r}),e(null,t)})};De.prototype.submit=function(e,t){var n,o,r={method:"post"};return typeof e=="string"?(e=pL(e),o=Sb({port:e.port,path:e.pathname,host:e.hostname,protocol:e.protocol},r)):(o=Sb(e,r),o.port||(o.port=o.protocol==="https:"?443:80)),o.headers=this.getHeaders(e.headers),o.protocol==="https:"?n=dL.request(o):n=lL.request(o),this.getLength(function(i,s){if(i&&i!=="Unknown stream"){this._error(i);return}if(s&&n.setHeader("Content-Length",s),this.pipe(n),t){var u,d=a(function(p,f){return n.removeListener("error",d),n.removeListener("response",u),t.call(this,p,f)},"callback");u=d.bind(this,null),n.on("error",d),n.on("response",u)}}.bind(this)),n};De.prototype._error=function(e){this.error||(this.error=e,this.pause(),this.emit("error",e))};De.prototype.toString=function(){return"[object FormData]"};yL(De.prototype,"FormData");OI.exports=De});var xb=B((sQ,FI)=>{"use strict";var Fp=Object.prototype.hasOwnProperty,LI=Object.prototype.toString,zI=Object.defineProperty,NI=Object.getOwnPropertyDescriptor,DI=a(function(t){return typeof Array.isArray=="function"?Array.isArray(t):LI.call(t)==="[object Array]"},"isArray"),UI=a(function(t){if(!t||LI.call(t)!=="[object Object]")return!1;var n=Fp.call(t,"constructor"),o=t.constructor&&t.constructor.prototype&&Fp.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!o)return!1;var r;for(r in t);return typeof r>"u"||Fp.call(t,r)},"isPlainObject"),jI=a(function(t,n){zI&&n.name==="__proto__"?zI(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},"setProperty"),MI=a(function(t,n){if(n==="__proto__")if(Fp.call(t,n)){if(NI)return NI(t,n).value}else return;return t[n]},"getProperty");FI.exports=a(function e(){var t,n,o,r,i,s,u=arguments[0],d=1,p=arguments.length,f=!1;for(typeof u=="boolean"&&(f=u,u=arguments[1]||{},d=2),(u==null||typeof u!="object"&&typeof u!="function")&&(u={});d<p;++d)if(t=arguments[d],t!=null)for(n in t)o=MI(u,n),r=MI(t,n),u!==r&&(f&&r&&(UI(r)||(i=DI(r)))?(i?(i=!1,s=o&&DI(o)?o:[]):s=o&&UI(o)?o:{},jI(u,{name:n,newValue:e(f,s,r)})):typeof r<"u"&&jI(u,{name:n,newValue:r}));return u},"extend")});var BI=B((uQ,wL)=>{wL.exports={name:"gaxios",version:"7.1.3",description:"A simple common HTTP client specifically for Google APIs and services.",main:"build/cjs/src/index.js",types:"build/cjs/src/index.d.ts",files:["build/"],exports:{".":{import:{types:"./build/esm/src/index.d.ts",default:"./build/esm/src/index.js"},require:{types:"./build/cjs/src/index.d.ts",default:"./build/cjs/src/index.js"}}},scripts:{lint:"gts check --no-inline-config",test:"c8 mocha build/esm/test","presystem-test":"npm run compile","system-test":"mocha build/esm/system-test --timeout 80000",compile:"tsc -b ./tsconfig.json ./tsconfig.cjs.json && node utils/enable-esm.mjs",fix:"gts fix",prepare:"npm run compile",pretest:"npm run compile",webpack:"webpack","prebrowser-test":"npm run compile","browser-test":"node build/browser-test/browser-test-runner.js",docs:"jsdoc -c .jsdoc.js","docs-test":"linkinator docs","predocs-test":"npm run docs","samples-test":"cd samples/ && npm link ../ && npm test && cd ../",prelint:"cd samples; npm link ../; npm install",clean:"gts clean"},repository:{type:"git",directory:"packages/gaxios",url:"https://github.com/googleapis/google-cloud-node-core.git"},keywords:["google"],engines:{node:">=18"},author:"Google, LLC",license:"Apache-2.0",devDependencies:{"@babel/plugin-proposal-private-methods":"^7.18.6","@types/cors":"^2.8.6","@types/express":"^5.0.0","@types/extend":"^3.0.1","@types/mocha":"^10.0.10","@types/multiparty":"4.2.1","@types/mv":"^2.1.0","@types/ncp":"^2.0.1","@types/node":"^22.0.0","@types/sinon":"^17.0.0","@types/tmp":"0.2.6",assert:"^2.0.0",browserify:"^17.0.0",c8:"^10.0.0",cors:"^2.8.5",express:"^5.0.0",gts:"^6.0.0","is-docker":"^3.0.0",jsdoc:"^4.0.0","jsdoc-fresh":"^5.0.0","jsdoc-region-tag":"^4.0.0",karma:"^6.0.0","karma-chrome-launcher":"^3.0.0","karma-coverage":"^2.0.0","karma-firefox-launcher":"^2.0.0","karma-mocha":"^2.0.0","karma-remap-coverage":"^0.1.5","karma-sourcemap-loader":"^0.4.0","karma-webpack":"^5.0.1",linkinator:"^6.1.2",mocha:"^11.1.0",multiparty:"^4.2.1",mv:"^2.1.1",ncp:"^2.0.0",nock:"^14.0.0-beta.13","null-loader":"^4.0.0","pack-n-play":"^4.0.0",puppeteer:"^24.0.0",sinon:"^21.0.0","stream-browserify":"^3.0.0",tmp:"0.2.5","ts-loader":"^9.5.2",typescript:"^5.8.3",webpack:"^5.35.0","webpack-cli":"^6.0.1"},dependencies:{extend:"^3.0.2","https-proxy-agent":"^7.0.1","node-fetch":"^3.3.2",rimraf:"^5.0.1"},homepage:"https://github.com/googleapis/google-cloud-node-core/tree/main/packages/gaxios"}});var VI=B((lQ,qI)=>{"use strict";var AL=BI();qI.exports={pkg:AL}});var Ab=B(Ar=>{"use strict";var HI=Ar&&Ar.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ar,"__esModule",{value:!0});Ar.GaxiosError=Ar.GAXIOS_ERROR_SYMBOL=void 0;Ar.defaultErrorRedactor=GI;var ZI=HI(xb()),IL=HI(VI()),Tb=IL.default.pkg;Ar.GAXIOS_ERROR_SYMBOL=Symbol.for(`${Tb.name}-gaxios-error`);var wb=class e extends Error{static{a(this,"GaxiosError")}config;response;code;status;error;[Ar.GAXIOS_ERROR_SYMBOL]=Tb.version;static[Symbol.hasInstance](t){return t&&typeof t=="object"&&Ar.GAXIOS_ERROR_SYMBOL in t&&t[Ar.GAXIOS_ERROR_SYMBOL]===Tb.version?!0:Function.prototype[Symbol.hasInstance].call(e,t)}constructor(t,n,o,r){if(super(t,{cause:r}),this.config=n,this.response=o,this.error=r instanceof Error?r:void 0,this.config=(0,ZI.default)(!0,{},n),this.response&&(this.response.config=(0,ZI.default)(!0,{},this.response.config)),this.response){try{this.response.data=RL(this.config.responseType,this.response?.bodyUsed?this.response?.data:void 0)}catch{}this.status=this.response.status}r instanceof DOMException?this.code=r.name:r&&typeof r=="object"&&"code"in r&&(typeof r.code=="string"||typeof r.code=="number")&&(this.code=r.code)}static extractAPIErrorFromResponse(t,n="The request failed"){let o=n;if(typeof t.data=="string"&&(o=t.data),t.data&&typeof t.data=="object"&&"error"in t.data&&t.data.error&&!t.ok){if(typeof t.data.error=="string")return{message:t.data.error,code:t.status,status:t.statusText};if(typeof t.data.error=="object"){o="message"in t.data.error&&typeof t.data.error.message=="string"?t.data.error.message:o;let r="status"in t.data.error&&typeof t.data.error.status=="string"?t.data.error.status:t.statusText,i="code"in t.data.error&&typeof t.data.error.code=="number"?t.data.error.code:t.status;if("errors"in t.data.error&&Array.isArray(t.data.error.errors)){let s=[];for(let u of t.data.error.errors)typeof u=="object"&&"message"in u&&typeof u.message=="string"&&s.push(u.message);return Object.assign({message:s.join(`
3
+ `)||o,code:i,status:r},t.data.error)}return Object.assign({message:o,code:i,status:r},t.data.error)}}return{message:o,code:t.status,status:t.statusText}}};Ar.GaxiosError=wb;function RL(e,t){switch(e){case"stream":return t;case"json":return JSON.parse(JSON.stringify(t));case"arraybuffer":return JSON.parse(Buffer.from(t).toString("utf8"));case"blob":return JSON.parse(t.text());default:return t}}a(RL,"translateData");function GI(e){let t="<<REDACTED> - See `errorRedactor` option in `gaxios` for configuration>.";function n(i){i&&i.forEach((s,u)=>{(/^authentication$/i.test(u)||/^authorization$/i.test(u)||/secret/i.test(u))&&i.set(u,t)})}a(n,"redactHeaders");function o(i,s){if(typeof i=="object"&&i!==null&&typeof i[s]=="string"){let u=i[s];(/grant_type=/i.test(u)||/assertion=/i.test(u)||/secret/i.test(u))&&(i[s]=t)}}a(o,"redactString");function r(i){!i||typeof i!="object"||(i instanceof FormData||i instanceof URLSearchParams||"forEach"in i&&"set"in i?i.forEach((s,u)=>{(["grant_type","assertion"].includes(u)||/secret/.test(u))&&i.set(u,t)}):("grant_type"in i&&(i.grant_type=t),"assertion"in i&&(i.assertion=t),"client_secret"in i&&(i.client_secret=t)))}return a(r,"redactObject"),e.config&&(n(e.config.headers),o(e.config,"data"),r(e.config.data),o(e.config,"body"),r(e.config.body),e.config.url.searchParams.has("token")&&e.config.url.searchParams.set("token",t),e.config.url.searchParams.has("client_secret")&&e.config.url.searchParams.set("client_secret",t)),e.response&&(GI({config:e.response.config}),n(e.response.headers),e.response.bodyUsed&&(o(e.response,"data"),r(e.response.data))),e}a(GI,"defaultErrorRedactor")});var JI=B(Ib=>{"use strict";Object.defineProperty(Ib,"__esModule",{value:!0});Ib.getRetryConfig=OL;async function OL(e){let t=WI(e);if(!e||!e.config||!t&&!e.config.retry)return{shouldRetry:!1};t=t||{},t.currentRetryAttempt=t.currentRetryAttempt||0,t.retry=t.retry===void 0||t.retry===null?3:t.retry,t.httpMethodsToRetry=t.httpMethodsToRetry||["GET","HEAD","PUT","OPTIONS","DELETE"],t.noResponseRetries=t.noResponseRetries===void 0||t.noResponseRetries===null?2:t.noResponseRetries,t.retryDelayMultiplier=t.retryDelayMultiplier?t.retryDelayMultiplier:2,t.timeOfFirstRequest=t.timeOfFirstRequest?t.timeOfFirstRequest:Date.now(),t.totalTimeout=t.totalTimeout?t.totalTimeout:Number.MAX_SAFE_INTEGER,t.maxRetryDelay=t.maxRetryDelay?t.maxRetryDelay:Number.MAX_SAFE_INTEGER;let n=[[100,199],[408,408],[429,429],[500,599]];if(t.statusCodesToRetry=t.statusCodesToRetry||n,e.config.retryConfig=t,!await(t.shouldRetry||kL)(e))return{shouldRetry:!1,config:e.config};let r=CL(t);e.config.retryConfig.currentRetryAttempt+=1;let i=t.retryBackoff?t.retryBackoff(e,r):new Promise(s=>{setTimeout(s,r)});return t.onRetryAttempt&&await t.onRetryAttempt(e),await i,{shouldRetry:!0,config:e.config}}a(OL,"getRetryConfig");function kL(e){let t=WI(e);if(e.config.signal?.aborted&&e.code!=="TimeoutError"||e.code==="AbortError"||!t||t.retry===0||!e.response&&(t.currentRetryAttempt||0)>=t.noResponseRetries||!t.httpMethodsToRetry||!t.httpMethodsToRetry.includes(e.config.method?.toUpperCase()||"GET"))return!1;if(e.response&&e.response.status){let n=!1;for(let[o,r]of t.statusCodesToRetry){let i=e.response.status;if(i>=o&&i<=r){n=!0;break}}if(!n)return!1}return t.currentRetryAttempt=t.currentRetryAttempt||0,!(t.currentRetryAttempt>=t.retry)}a(kL,"shouldRetryRequest");function WI(e){if(e&&e.config&&e.config.retryConfig)return e.config.retryConfig}a(WI,"getConfig");function CL(e){let n=(e.currentRetryAttempt?0:e.retryDelay??100)+(Math.pow(e.retryDelayMultiplier,e.currentRetryAttempt)-1)/2*1e3,o=e.totalTimeout-(Date.now()-e.timeOfFirstRequest);return Math.min(n,o,e.maxRetryDelay)}a(CL,"getNextRetryDelay")});var Ob=B(Bp=>{"use strict";Object.defineProperty(Bp,"__esModule",{value:!0});Bp.GaxiosInterceptorManager=void 0;var Rb=class extends Set{static{a(this,"GaxiosInterceptorManager")}};Bp.GaxiosInterceptorManager=Rb});var XI=B((yQ,KI)=>{var ca=1e3,ua=ca*60,la=ua*60,Jo=la*24,$L=Jo*7,zL=Jo*365.25;KI.exports=function(e,t){t=t||{};var n=typeof e;if(n==="string"&&e.length>0)return NL(e);if(n==="number"&&isFinite(e))return t.long?UL(e):DL(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function NL(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var n=parseFloat(t[1]),o=(t[2]||"ms").toLowerCase();switch(o){case"years":case"year":case"yrs":case"yr":case"y":return n*zL;case"weeks":case"week":case"w":return n*$L;case"days":case"day":case"d":return n*Jo;case"hours":case"hour":case"hrs":case"hr":case"h":return n*la;case"minutes":case"minute":case"mins":case"min":case"m":return n*ua;case"seconds":case"second":case"secs":case"sec":case"s":return n*ca;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}a(NL,"parse");function DL(e){var t=Math.abs(e);return t>=Jo?Math.round(e/Jo)+"d":t>=la?Math.round(e/la)+"h":t>=ua?Math.round(e/ua)+"m":t>=ca?Math.round(e/ca)+"s":e+"ms"}a(DL,"fmtShort");function UL(e){var t=Math.abs(e);return t>=Jo?qp(e,t,Jo,"day"):t>=la?qp(e,t,la,"hour"):t>=ua?qp(e,t,ua,"minute"):t>=ca?qp(e,t,ca,"second"):e+" ms"}a(UL,"fmtLong");function qp(e,t,n,o){var r=t>=n*1.5;return Math.round(e/n)+" "+o+(r?"s":"")}a(qp,"plural")});var kb=B((bQ,QI)=>{function jL(e){n.debug=n,n.default=n,n.coerce=d,n.disable=s,n.enable=r,n.enabled=u,n.humanize=XI(),n.destroy=p,Object.keys(e).forEach(f=>{n[f]=e[f]}),n.names=[],n.skips=[],n.formatters={};function t(f){let g=0;for(let y=0;y<f.length;y++)g=(g<<5)-g+f.charCodeAt(y),g|=0;return n.colors[Math.abs(g)%n.colors.length]}a(t,"selectColor"),n.selectColor=t;function n(f){let g,y=null,h,_;function P(...x){if(!P.enabled)return;let S=P,$=Number(new Date),V=$-(g||$);S.diff=V,S.prev=g,S.curr=$,g=$,x[0]=n.coerce(x[0]),typeof x[0]!="string"&&x.unshift("%O");let W=0;x[0]=x[0].replace(/%([a-zA-Z%])/g,(G,te)=>{if(G==="%%")return"%";W++;let ce=n.formatters[te];if(typeof ce=="function"){let Y=x[W];G=ce.call(S,Y),x.splice(W,1),W--}return G}),n.formatArgs.call(S,x),(S.log||n.log).apply(S,x)}return a(P,"debug"),P.namespace=f,P.useColors=n.useColors(),P.color=n.selectColor(f),P.extend=o,P.destroy=n.destroy,Object.defineProperty(P,"enabled",{enumerable:!0,configurable:!1,get:a(()=>y!==null?y:(h!==n.namespaces&&(h=n.namespaces,_=n.enabled(f)),_),"get"),set:a(x=>{y=x},"set")}),typeof n.init=="function"&&n.init(P),P}a(n,"createDebug");function o(f,g){let y=n(this.namespace+(typeof g>"u"?":":g)+f);return y.log=this.log,y}a(o,"extend");function r(f){n.save(f),n.namespaces=f,n.names=[],n.skips=[];let g=(typeof f=="string"?f:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let y of g)y[0]==="-"?n.skips.push(y.slice(1)):n.names.push(y)}a(r,"enable");function i(f,g){let y=0,h=0,_=-1,P=0;for(;y<f.length;)if(h<g.length&&(g[h]===f[y]||g[h]==="*"))g[h]==="*"?(_=h,P=y,h++):(y++,h++);else if(_!==-1)h=_+1,P++,y=P;else return!1;for(;h<g.length&&g[h]==="*";)h++;return h===g.length}a(i,"matchesTemplate");function s(){let f=[...n.names,...n.skips.map(g=>"-"+g)].join(",");return n.enable(""),f}a(s,"disable");function u(f){for(let g of n.skips)if(i(f,g))return!1;for(let g of n.names)if(i(f,g))return!0;return!1}a(u,"enabled");function d(f){return f instanceof Error?f.stack||f.message:f}a(d,"coerce");function p(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return a(p,"destroy"),n.enable(n.load()),n}a(jL,"setup");QI.exports=jL});var YI=B((Qt,Vp)=>{Qt.formatArgs=LL;Qt.save=FL;Qt.load=BL;Qt.useColors=ML;Qt.storage=qL();Qt.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();Qt.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function ML(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}a(ML,"useColors");function LL(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+Vp.exports.humanize(this.diff),!this.useColors)return;let t="color: "+this.color;e.splice(1,0,t,"color: inherit");let n=0,o=0;e[0].replace(/%[a-zA-Z%]/g,r=>{r!=="%%"&&(n++,r==="%c"&&(o=n))}),e.splice(o,0,t)}a(LL,"formatArgs");Qt.log=console.debug||console.log||(()=>{});function FL(e){try{e?Qt.storage.setItem("debug",e):Qt.storage.removeItem("debug")}catch{}}a(FL,"save");function BL(){let e;try{e=Qt.storage.getItem("debug")||Qt.storage.getItem("DEBUG")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}a(BL,"load");function qL(){try{return localStorage}catch{}}a(qL,"localstorage");Vp.exports=kb()(Qt);var{formatters:VL}=Vp.exports;VL.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var tR=B((SQ,eR)=>{"use strict";eR.exports=(e,t=process.argv)=>{let n=e.startsWith("-")?"":e.length===1?"-":"--",o=t.indexOf(n+e),r=t.indexOf("--");return o!==-1&&(r===-1||o<r)}});var oR=B((PQ,nR)=>{"use strict";var ZL=require("os"),rR=require("tty"),Ir=tR(),{env:Pt}=process,uo;Ir("no-color")||Ir("no-colors")||Ir("color=false")||Ir("color=never")?uo=0:(Ir("color")||Ir("colors")||Ir("color=true")||Ir("color=always"))&&(uo=1);"FORCE_COLOR"in Pt&&(Pt.FORCE_COLOR==="true"?uo=1:Pt.FORCE_COLOR==="false"?uo=0:uo=Pt.FORCE_COLOR.length===0?1:Math.min(parseInt(Pt.FORCE_COLOR,10),3));function Cb(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}a(Cb,"translateLevel");function $b(e,t){if(uo===0)return 0;if(Ir("color=16m")||Ir("color=full")||Ir("color=truecolor"))return 3;if(Ir("color=256"))return 2;if(e&&!t&&uo===void 0)return 0;let n=uo||0;if(Pt.TERM==="dumb")return n;if(process.platform==="win32"){let o=ZL.release().split(".");return Number(o[0])>=10&&Number(o[2])>=10586?Number(o[2])>=14931?3:2:1}if("CI"in Pt)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(o=>o in Pt)||Pt.CI_NAME==="codeship"?1:n;if("TEAMCITY_VERSION"in Pt)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Pt.TEAMCITY_VERSION)?1:0;if(Pt.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in Pt){let o=parseInt((Pt.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Pt.TERM_PROGRAM){case"iTerm.app":return o>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Pt.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Pt.TERM)||"COLORTERM"in Pt?1:n}a($b,"supportsColor");function HL(e){let t=$b(e,e&&e.isTTY);return Cb(t)}a(HL,"getSupportLevel");nR.exports={supportsColor:HL,stdout:Cb($b(!0,rR.isatty(1))),stderr:Cb($b(!0,rR.isatty(2)))}});var aR=B((xt,Hp)=>{var GL=require("tty"),Zp=require("util");xt.init=e1;xt.log=XL;xt.formatArgs=JL;xt.save=QL;xt.load=YL;xt.useColors=WL;xt.destroy=Zp.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");xt.colors=[6,2,3,4,5,1];try{let e=oR();e&&(e.stderr||e).level>=2&&(xt.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}xt.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{let n=t.substring(6).toLowerCase().replace(/_([a-z])/g,(r,i)=>i.toUpperCase()),o=process.env[t];return/^(yes|on|true|enabled)$/i.test(o)?o=!0:/^(no|off|false|disabled)$/i.test(o)?o=!1:o==="null"?o=null:o=Number(o),e[n]=o,e},{});function WL(){return"colors"in xt.inspectOpts?!!xt.inspectOpts.colors:GL.isatty(process.stderr.fd)}a(WL,"useColors");function JL(e){let{namespace:t,useColors:n}=this;if(n){let o=this.color,r="\x1B[3"+(o<8?o:"8;5;"+o),i=` ${r};1m${t} \x1B[0m`;e[0]=i+e[0].split(`
4
4
  `).join(`
5
- `+u),t.push(i+"m+"+Cs.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=MR()+e+" "+t[0]}o(jR,"formatArgs");function MR(){return ft.inspectOpts.hideDate?"":new Date().toISOString()+" "}o(MR,"getDate");function LR(...t){return process.stderr.write(Rs.formatWithOptions(ft.inspectOpts,...t)+`
6
- `)}o(LR,"log");function FR(t){t?process.env.DEBUG=t:delete process.env.DEBUG}o(FR,"save");function BR(){return process.env.DEBUG}o(BR,"load");function qR(t){t.inspectOpts={};let e=Object.keys(ft.inspectOpts);for(let r=0;r<e.length;r++)t.inspectOpts[e[r]]=ft.inspectOpts[e[r]]}o(qR,"init");Cs.exports=$l()(ft);var{formatters:tb}=Cs.exports;tb.o=function(t){return this.inspectOpts.colors=this.useColors,Rs.inspect(t,this.inspectOpts).split(`
7
- `).map(e=>e.trim()).join(" ")};tb.O=function(t){return this.inspectOpts.colors=this.useColors,Rs.inspect(t,this.inspectOpts)}});var Ul=L((JW,Dl)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?Dl.exports=J_():Dl.exports=rb()});var ib=L($t=>{"use strict";var VR=$t&&$t.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:o(function(){return e[r]},"get")}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),HR=$t&&$t.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),nb=$t&&$t.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&VR(e,t,r);return HR(e,t),e};Object.defineProperty($t,"__esModule",{value:!0});$t.req=$t.json=$t.toBuffer=void 0;var GR=nb(require("http")),WR=nb(require("https"));async function ob(t){let e=0,r=[];for await(let n of t)e+=n.length,r.push(n);return Buffer.concat(r,e)}o(ob,"toBuffer");$t.toBuffer=ob;async function ZR(t){let r=(await ob(t)).toString("utf8");try{return JSON.parse(r)}catch(n){let i=n;throw i.message+=` (input: ${r})`,i}}o(ZR,"json");$t.json=ZR;function JR(t,e={}){let n=((typeof t=="string"?t:t.href).startsWith("https:")?WR:GR).request(t,e),i=new Promise((u,c)=>{n.once("response",u).once("error",c).end()});return n.then=i.then.bind(i),n}o(JR,"req");$t.req=JR});var cb=L(Bt=>{"use strict";var sb=Bt&&Bt.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:o(function(){return e[r]},"get")}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),KR=Bt&&Bt.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),ub=Bt&&Bt.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&sb(e,t,r);return KR(e,t),e},QR=Bt&&Bt.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&sb(e,t,r)};Object.defineProperty(Bt,"__esModule",{value:!0});Bt.Agent=void 0;var YR=ub(require("net")),ab=ub(require("http")),XR=require("https");QR(ib(),Bt);var Cr=Symbol("AgentBaseInternalState"),jl=class extends ab.Agent{static{o(this,"Agent")}constructor(e){super(e),this[Cr]={}}isSecureEndpoint(e){if(e){if(typeof e.secureEndpoint=="boolean")return e.secureEndpoint;if(typeof e.protocol=="string")return e.protocol==="https:"}let{stack:r}=new Error;return typeof r!="string"?!1:r.split(`
8
- `).some(n=>n.indexOf("(https.js:")!==-1||n.indexOf("node:https:")!==-1)}incrementSockets(e){if(this.maxSockets===1/0&&this.maxTotalSockets===1/0)return null;this.sockets[e]||(this.sockets[e]=[]);let r=new YR.Socket({writable:!1});return this.sockets[e].push(r),this.totalSocketCount++,r}decrementSockets(e,r){if(!this.sockets[e]||r===null)return;let n=this.sockets[e],i=n.indexOf(r);i!==-1&&(n.splice(i,1),this.totalSocketCount--,n.length===0&&delete this.sockets[e])}getName(e){return this.isSecureEndpoint(e)?XR.Agent.prototype.getName.call(this,e):super.getName(e)}createSocket(e,r,n){let i={...r,secureEndpoint:this.isSecureEndpoint(r)},u=this.getName(i),c=this.incrementSockets(u);Promise.resolve().then(()=>this.connect(e,i)).then(l=>{if(this.decrementSockets(u,c),l instanceof ab.Agent)try{return l.addRequest(e,i)}catch(p){return n(p)}this[Cr].currentSocket=l,super.createSocket(e,r,n)},l=>{this.decrementSockets(u,c),n(l)})}createConnection(){let e=this[Cr].currentSocket;if(this[Cr].currentSocket=void 0,!e)throw new Error("No socket was returned in the `connect()` function");return e}get defaultPort(){return this[Cr].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(e){this[Cr]&&(this[Cr].defaultPort=e)}get protocol(){return this[Cr].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(e){this[Cr]&&(this[Cr].protocol=e)}};Bt.Agent=jl});var lb=L(No=>{"use strict";var eC=No&&No.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(No,"__esModule",{value:!0});No.parseProxyResponse=void 0;var tC=eC(Ul()),Os=(0,tC.default)("https-proxy-agent:parse-proxy-response");function rC(t){return new Promise((e,r)=>{let n=0,i=[];function u(){let m=t.read();m?f(m):t.once("readable",u)}o(u,"read");function c(){t.removeListener("end",l),t.removeListener("error",p),t.removeListener("readable",u)}o(c,"cleanup");function l(){c(),Os("onend"),r(new Error("Proxy connection ended before receiving CONNECT response"))}o(l,"onend");function p(m){c(),Os("onerror %o",m),r(m)}o(p,"onerror");function f(m){i.push(m),n+=m.length;let y=Buffer.concat(i,n),P=y.indexOf(`\r
5
+ `+i),e.push(r+"m+"+Hp.exports.humanize(this.diff)+"\x1B[0m")}else e[0]=KL()+t+" "+e[0]}a(JL,"formatArgs");function KL(){return xt.inspectOpts.hideDate?"":new Date().toISOString()+" "}a(KL,"getDate");function XL(...e){return process.stderr.write(Zp.formatWithOptions(xt.inspectOpts,...e)+`
6
+ `)}a(XL,"log");function QL(e){e?process.env.DEBUG=e:delete process.env.DEBUG}a(QL,"save");function YL(){return process.env.DEBUG}a(YL,"load");function e1(e){e.inspectOpts={};let t=Object.keys(xt.inspectOpts);for(let n=0;n<t.length;n++)e.inspectOpts[t[n]]=xt.inspectOpts[t[n]]}a(e1,"init");Hp.exports=kb()(xt);var{formatters:iR}=Hp.exports;iR.o=function(e){return this.inspectOpts.colors=this.useColors,Zp.inspect(e,this.inspectOpts).split(`
7
+ `).map(t=>t.trim()).join(" ")};iR.O=function(e){return this.inspectOpts.colors=this.useColors,Zp.inspect(e,this.inspectOpts)}});var Nb=B((wQ,zb)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?zb.exports=YI():zb.exports=aR()});var uR=B(Yt=>{"use strict";var t1=Yt&&Yt.__createBinding||(Object.create?(function(e,t,n,o){o===void 0&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:a(function(){return t[n]},"get")}),Object.defineProperty(e,o,r)}):(function(e,t,n,o){o===void 0&&(o=n),e[o]=t[n]})),r1=Yt&&Yt.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),sR=Yt&&Yt.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&t1(t,e,n);return r1(t,e),t};Object.defineProperty(Yt,"__esModule",{value:!0});Yt.req=Yt.json=Yt.toBuffer=void 0;var n1=sR(require("http")),o1=sR(require("https"));async function cR(e){let t=0,n=[];for await(let o of e)t+=o.length,n.push(o);return Buffer.concat(n,t)}a(cR,"toBuffer");Yt.toBuffer=cR;async function i1(e){let n=(await cR(e)).toString("utf8");try{return JSON.parse(n)}catch(o){let r=o;throw r.message+=` (input: ${n})`,r}}a(i1,"json");Yt.json=i1;function a1(e,t={}){let o=((typeof e=="string"?e:e.href).startsWith("https:")?o1:n1).request(e,t),r=new Promise((i,s)=>{o.once("response",i).once("error",s).end()});return o.then=r.then.bind(r),o}a(a1,"req");Yt.req=a1});var fR=B(dr=>{"use strict";var dR=dr&&dr.__createBinding||(Object.create?(function(e,t,n,o){o===void 0&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:a(function(){return t[n]},"get")}),Object.defineProperty(e,o,r)}):(function(e,t,n,o){o===void 0&&(o=n),e[o]=t[n]})),s1=dr&&dr.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),pR=dr&&dr.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&dR(t,e,n);return s1(t,e),t},c1=dr&&dr.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&dR(t,e,n)};Object.defineProperty(dr,"__esModule",{value:!0});dr.Agent=void 0;var u1=pR(require("net")),lR=pR(require("http")),l1=require("https");c1(uR(),dr);var nn=Symbol("AgentBaseInternalState"),Db=class extends lR.Agent{static{a(this,"Agent")}constructor(t){super(t),this[nn]={}}isSecureEndpoint(t){if(t){if(typeof t.secureEndpoint=="boolean")return t.secureEndpoint;if(typeof t.protocol=="string")return t.protocol==="https:"}let{stack:n}=new Error;return typeof n!="string"?!1:n.split(`
8
+ `).some(o=>o.indexOf("(https.js:")!==-1||o.indexOf("node:https:")!==-1)}incrementSockets(t){if(this.maxSockets===1/0&&this.maxTotalSockets===1/0)return null;this.sockets[t]||(this.sockets[t]=[]);let n=new u1.Socket({writable:!1});return this.sockets[t].push(n),this.totalSocketCount++,n}decrementSockets(t,n){if(!this.sockets[t]||n===null)return;let o=this.sockets[t],r=o.indexOf(n);r!==-1&&(o.splice(r,1),this.totalSocketCount--,o.length===0&&delete this.sockets[t])}getName(t){return this.isSecureEndpoint(t)?l1.Agent.prototype.getName.call(this,t):super.getName(t)}createSocket(t,n,o){let r={...n,secureEndpoint:this.isSecureEndpoint(n)},i=this.getName(r),s=this.incrementSockets(i);Promise.resolve().then(()=>this.connect(t,r)).then(u=>{if(this.decrementSockets(i,s),u instanceof lR.Agent)try{return u.addRequest(t,r)}catch(d){return o(d)}this[nn].currentSocket=u,super.createSocket(t,n,o)},u=>{this.decrementSockets(i,s),o(u)})}createConnection(){let t=this[nn].currentSocket;if(this[nn].currentSocket=void 0,!t)throw new Error("No socket was returned in the `connect()` function");return t}get defaultPort(){return this[nn].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(t){this[nn]&&(this[nn].defaultPort=t)}get protocol(){return this[nn].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(t){this[nn]&&(this[nn].protocol=t)}};dr.Agent=Db});var mR=B(da=>{"use strict";var d1=da&&da.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(da,"__esModule",{value:!0});da.parseProxyResponse=void 0;var p1=d1(Nb()),Gp=(0,p1.default)("https-proxy-agent:parse-proxy-response");function f1(e){return new Promise((t,n)=>{let o=0,r=[];function i(){let f=e.read();f?p(f):e.once("readable",i)}a(i,"read");function s(){e.removeListener("end",u),e.removeListener("error",d),e.removeListener("readable",i)}a(s,"cleanup");function u(){s(),Gp("onend"),n(new Error("Proxy connection ended before receiving CONNECT response"))}a(u,"onend");function d(f){s(),Gp("onerror %o",f),n(f)}a(d,"onerror");function p(f){r.push(f),o+=f.length;let g=Buffer.concat(r,o),y=g.indexOf(`\r
9
9
  \r
10
- `);if(P===-1){Os("have not received end of HTTP headers yet..."),u();return}let h=y.slice(0,P).toString("ascii").split(`\r
11
- `),b=h.shift();if(!b)return t.destroy(),r(new Error("No header received from proxy CONNECT response"));let T=b.split(" "),E=+T[1],w=T.slice(2).join(" "),k={};for(let q of h){if(!q)continue;let W=q.indexOf(":");if(W===-1)return t.destroy(),r(new Error(`Invalid header from proxy CONNECT response: "${q}"`));let H=q.slice(0,W).toLowerCase(),V=q.slice(W+1).trimStart(),J=k[H];typeof J=="string"?k[H]=[J,V]:Array.isArray(J)?J.push(V):k[H]=V}Os("got proxy server response: %o %o",b,k),c(),e({connect:{statusCode:E,statusText:w,headers:k},buffered:y})}o(f,"ondata"),t.on("error",p),t.on("end",l),u()})}o(rC,"parseProxyResponse");No.parseProxyResponse=rC});var gb=L(or=>{"use strict";var nC=or&&or.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:o(function(){return e[r]},"get")}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),oC=or&&or.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),mb=or&&or.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&nC(e,t,r);return oC(e,t),e},hb=or&&or.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(or,"__esModule",{value:!0});or.HttpsProxyAgent=void 0;var ks=mb(require("net")),db=mb(require("tls")),iC=hb(require("assert")),aC=hb(Ul()),sC=cb(),uC=require("url"),cC=lb(),Li=(0,aC.default)("https-proxy-agent"),pb=o(t=>t.servername===void 0&&t.host&&!ks.isIP(t.host)?{...t,servername:t.host}:t,"setServernameFromNonIpHost"),$s=class extends sC.Agent{static{o(this,"HttpsProxyAgent")}constructor(e,r){super(r),this.options={path:void 0},this.proxy=typeof e=="string"?new uC.URL(e):e,this.proxyHeaders=r?.headers??{},Li("Creating new HttpsProxyAgent instance: %o",this.proxy.href);let n=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),i=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={ALPNProtocols:["http/1.1"],...r?fb(r,"headers"):null,host:n,port:i}}async connect(e,r){let{proxy:n}=this;if(!r.host)throw new TypeError('No "host" provided');let i;n.protocol==="https:"?(Li("Creating `tls.Socket`: %o",this.connectOpts),i=db.connect(pb(this.connectOpts))):(Li("Creating `net.Socket`: %o",this.connectOpts),i=ks.connect(this.connectOpts));let u=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders},c=ks.isIPv6(r.host)?`[${r.host}]`:r.host,l=`CONNECT ${c}:${r.port} HTTP/1.1\r
12
- `;if(n.username||n.password){let P=`${decodeURIComponent(n.username)}:${decodeURIComponent(n.password)}`;u["Proxy-Authorization"]=`Basic ${Buffer.from(P).toString("base64")}`}u.Host=`${c}:${r.port}`,u["Proxy-Connection"]||(u["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let P of Object.keys(u))l+=`${P}: ${u[P]}\r
13
- `;let p=(0,cC.parseProxyResponse)(i);i.write(`${l}\r
14
- `);let{connect:f,buffered:m}=await p;if(e.emit("proxyConnect",f),this.emit("proxyConnect",f,e),f.statusCode===200)return e.once("socket",lC),r.secureEndpoint?(Li("Upgrading socket connection to TLS"),db.connect({...fb(pb(r),"host","path","port"),socket:i})):i;i.destroy();let y=new ks.Socket({writable:!1});return y.readable=!0,e.once("socket",P=>{Li("Replaying proxy buffer for failed request"),(0,iC.default)(P.listenerCount("data")>0),P.push(m),P.push(null)}),y}};$s.protocols=["http","https"];or.HttpsProxyAgent=$s;function lC(t){t.resume()}o(lC,"resume");function fb(t,...e){let r={},n;for(n in t)e.includes(n)||(r[n]=t[n]);return r}o(fb,"omit")});function dC(t){if(!/^data:/i.test(t))throw new TypeError('`uri` does not appear to be a Data URI (must begin with "data:")');t=t.replace(/\r?\n/g,"");let e=t.indexOf(",");if(e===-1||e<=4)throw new TypeError("malformed data: URI");let r=t.substring(5,e).split(";"),n="",i=!1,u=r[0]||"text/plain",c=u;for(let m=1;m<r.length;m++)r[m]==="base64"?i=!0:r[m]&&(c+=`;${r[m]}`,r[m].indexOf("charset=")===0&&(n=r[m].substring(8)));!r[0]&&!n.length&&(c+=";charset=US-ASCII",n="US-ASCII");let l=i?"base64":"ascii",p=unescape(t.substring(e+1)),f=Buffer.from(p,l);return f.type=u,f.typeFull=c,f.charset=n,f}var yb,_b=ct(()=>{o(dC,"dataUriToBuffer");yb=dC});var vb=L((zs,bb)=>{(function(t,e){typeof zs=="object"&&typeof bb<"u"?e(zs):typeof define=="function"&&define.amd?define(["exports"],e):(t=typeof globalThis<"u"?globalThis:t||self,e(t.WebStreamsPolyfill={}))})(zs,(function(t){"use strict";function e(){}o(e,"noop");function r(a){return typeof a=="object"&&a!==null||typeof a=="function"}o(r,"typeIsObject");let n=e;function i(a,s){try{Object.defineProperty(a,"name",{value:s,configurable:!0})}catch{}}o(i,"setFunctionName");let u=Promise,c=Promise.prototype.then,l=Promise.reject.bind(u);function p(a){return new u(a)}o(p,"newPromise");function f(a){return p(s=>s(a))}o(f,"promiseResolvedWith");function m(a){return l(a)}o(m,"promiseRejectedWith");function y(a,s,d){return c.call(a,s,d)}o(y,"PerformPromiseThen");function P(a,s,d){y(y(a,s,d),void 0,n)}o(P,"uponPromise");function h(a,s){P(a,s)}o(h,"uponFulfillment");function b(a,s){P(a,void 0,s)}o(b,"uponRejection");function T(a,s,d){return y(a,s,d)}o(T,"transformPromiseWith");function E(a){y(a,void 0,n)}o(E,"setPromiseIsHandledToTrue");let w=o(a=>{if(typeof queueMicrotask=="function")w=queueMicrotask;else{let s=f(void 0);w=o(d=>y(s,d),"_queueMicrotask")}return w(a)},"_queueMicrotask");function k(a,s,d){if(typeof a!="function")throw new TypeError("Argument is not a function");return Function.prototype.apply.call(a,s,d)}o(k,"reflectCall");function q(a,s,d){try{return f(k(a,s,d))}catch(v){return m(v)}}o(q,"promiseCall");let W=16384;class H{static{o(this,"SimpleQueue")}constructor(){this._cursor=0,this._size=0,this._front={_elements:[],_next:void 0},this._back=this._front,this._cursor=0,this._size=0}get length(){return this._size}push(s){let d=this._back,v=d;d._elements.length===W-1&&(v={_elements:[],_next:void 0}),d._elements.push(s),v!==d&&(this._back=v,d._next=v),++this._size}shift(){let s=this._front,d=s,v=this._cursor,A=v+1,U=s._elements,F=U[v];return A===W&&(d=s._next,A=0),--this._size,this._cursor=A,s!==d&&(this._front=d),U[v]=void 0,F}forEach(s){let d=this._cursor,v=this._front,A=v._elements;for(;(d!==A.length||v._next!==void 0)&&!(d===A.length&&(v=v._next,A=v._elements,d=0,A.length===0));)s(A[d]),++d}peek(){let s=this._front,d=this._cursor;return s._elements[d]}}let V=Symbol("[[AbortSteps]]"),J=Symbol("[[ErrorSteps]]"),re=Symbol("[[CancelSteps]]"),G=Symbol("[[PullSteps]]"),je=Symbol("[[ReleaseSteps]]");function Ee(a,s){a._ownerReadableStream=s,s._reader=a,s._state==="readable"?Ue(a):s._state==="closed"?Ke(a):He(a,s._storedError)}o(Ee,"ReadableStreamReaderGenericInitialize");function ve(a,s){let d=a._ownerReadableStream;return dr(d,s)}o(ve,"ReadableStreamReaderGenericCancel");function ze(a){let s=a._ownerReadableStream;s._state==="readable"?Ut(a,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):Pt(a,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")),s._readableStreamController[je](),s._reader=void 0,a._ownerReadableStream=void 0}o(ze,"ReadableStreamReaderGenericRelease");function $e(a){return new TypeError("Cannot "+a+" a stream using a released reader")}o($e,"readerLockException");function Ue(a){a._closedPromise=p((s,d)=>{a._closedPromise_resolve=s,a._closedPromise_reject=d})}o(Ue,"defaultReaderClosedPromiseInitialize");function He(a,s){Ue(a),Ut(a,s)}o(He,"defaultReaderClosedPromiseInitializeAsRejected");function Ke(a){Ue(a),ro(a)}o(Ke,"defaultReaderClosedPromiseInitializeAsResolved");function Ut(a,s){a._closedPromise_reject!==void 0&&(E(a._closedPromise),a._closedPromise_reject(s),a._closedPromise_resolve=void 0,a._closedPromise_reject=void 0)}o(Ut,"defaultReaderClosedPromiseReject");function Pt(a,s){He(a,s)}o(Pt,"defaultReaderClosedPromiseResetToRejected");function ro(a){a._closedPromise_resolve!==void 0&&(a._closedPromise_resolve(void 0),a._closedPromise_resolve=void 0,a._closedPromise_reject=void 0)}o(ro,"defaultReaderClosedPromiseResolve");let wr=Number.isFinite||function(a){return typeof a=="number"&&isFinite(a)},ii=Math.trunc||function(a){return a<0?Math.ceil(a):Math.floor(a)};function Z(a){return typeof a=="object"||typeof a=="function"}o(Z,"isDictionary");function Rt(a,s){if(a!==void 0&&!Z(a))throw new TypeError(`${s} is not an object.`)}o(Rt,"assertDictionary");function St(a,s){if(typeof a!="function")throw new TypeError(`${s} is not a function.`)}o(St,"assertFunction");function ai(a){return typeof a=="object"&&a!==null||typeof a=="function"}o(ai,"isObject");function Tt(a,s){if(!ai(a))throw new TypeError(`${s} is not an object.`)}o(Tt,"assertObject");function at(a,s,d){if(a===void 0)throw new TypeError(`Parameter ${s} is required in '${d}'.`)}o(at,"assertRequiredArgument");function _(a,s,d){if(a===void 0)throw new TypeError(`${s} is required in '${d}'.`)}o(_,"assertRequiredField");function S(a){return Number(a)}o(S,"convertUnrestrictedDouble");function x(a){return a===0?0:a}o(x,"censorNegativeZero");function N(a){return x(ii(a))}o(N,"integerPart");function R(a,s){let v=Number.MAX_SAFE_INTEGER,A=Number(a);if(A=x(A),!wr(A))throw new TypeError(`${s} is not a finite number`);if(A=N(A),A<0||A>v)throw new TypeError(`${s} is outside the accepted range of 0 to ${v}, inclusive`);return!wr(A)||A===0?0:A}o(R,"convertUnsignedLongLongWithEnforceRange");function $(a,s){if(!dn(a))throw new TypeError(`${s} is not a ReadableStream.`)}o($,"assertReadableStream");function j(a){return new B(a)}o(j,"AcquireReadableStreamDefaultReader");function I(a,s){a._reader._readRequests.push(s)}o(I,"ReadableStreamAddReadRequest");function O(a,s,d){let A=a._reader._readRequests.shift();d?A._closeSteps():A._chunkSteps(s)}o(O,"ReadableStreamFulfillReadRequest");function D(a){return a._reader._readRequests.length}o(D,"ReadableStreamGetNumReadRequests");function z(a){let s=a._reader;return!(s===void 0||!Y(s))}o(z,"ReadableStreamHasDefaultReader");class B{static{o(this,"ReadableStreamDefaultReader")}constructor(s){if(at(s,1,"ReadableStreamDefaultReader"),$(s,"First parameter"),pn(s))throw new TypeError("This stream has already been locked for exclusive reading by another reader");Ee(this,s),this._readRequests=new H}get closed(){return Y(this)?this._closedPromise:m(We("closed"))}cancel(s=void 0){return Y(this)?this._ownerReadableStream===void 0?m($e("cancel")):ve(this,s):m(We("cancel"))}read(){if(!Y(this))return m(We("read"));if(this._ownerReadableStream===void 0)return m($e("read from"));let s,d,v=p((U,F)=>{s=U,d=F});return te(this,{_chunkSteps:o(U=>s({value:U,done:!1}),"_chunkSteps"),_closeSteps:o(()=>s({value:void 0,done:!0}),"_closeSteps"),_errorSteps:o(U=>d(U),"_errorSteps")}),v}releaseLock(){if(!Y(this))throw We("releaseLock");this._ownerReadableStream!==void 0&&Re(this)}}Object.defineProperties(B.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),i(B.prototype.cancel,"cancel"),i(B.prototype.read,"read"),i(B.prototype.releaseLock,"releaseLock"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(B.prototype,Symbol.toStringTag,{value:"ReadableStreamDefaultReader",configurable:!0});function Y(a){return!r(a)||!Object.prototype.hasOwnProperty.call(a,"_readRequests")?!1:a instanceof B}o(Y,"IsReadableStreamDefaultReader");function te(a,s){let d=a._ownerReadableStream;d._disturbed=!0,d._state==="closed"?s._closeSteps():d._state==="errored"?s._errorSteps(d._storedError):d._readableStreamController[G](s)}o(te,"ReadableStreamDefaultReaderRead");function Re(a){ze(a);let s=new TypeError("Reader was released");Ge(a,s)}o(Re,"ReadableStreamDefaultReaderRelease");function Ge(a,s){let d=a._readRequests;a._readRequests=new H,d.forEach(v=>{v._errorSteps(s)})}o(Ge,"ReadableStreamDefaultReaderErrorReadRequests");function We(a){return new TypeError(`ReadableStreamDefaultReader.prototype.${a} can only be used on a ReadableStreamDefaultReader`)}o(We,"defaultReaderBrandCheckException");let Ie=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);class De{static{o(this,"ReadableStreamAsyncIteratorImpl")}constructor(s,d){this._ongoingPromise=void 0,this._isFinished=!1,this._reader=s,this._preventCancel=d}next(){let s=o(()=>this._nextSteps(),"nextSteps");return this._ongoingPromise=this._ongoingPromise?T(this._ongoingPromise,s,s):s(),this._ongoingPromise}return(s){let d=o(()=>this._returnSteps(s),"returnSteps");return this._ongoingPromise?T(this._ongoingPromise,d,d):d()}_nextSteps(){if(this._isFinished)return Promise.resolve({value:void 0,done:!0});let s=this._reader,d,v,A=p((F,Q)=>{d=F,v=Q});return te(s,{_chunkSteps:o(F=>{this._ongoingPromise=void 0,w(()=>d({value:F,done:!1}))},"_chunkSteps"),_closeSteps:o(()=>{this._ongoingPromise=void 0,this._isFinished=!0,ze(s),d({value:void 0,done:!0})},"_closeSteps"),_errorSteps:o(F=>{this._ongoingPromise=void 0,this._isFinished=!0,ze(s),v(F)},"_errorSteps")}),A}_returnSteps(s){if(this._isFinished)return Promise.resolve({value:s,done:!0});this._isFinished=!0;let d=this._reader;if(!this._preventCancel){let v=ve(d,s);return ze(d),T(v,()=>({value:s,done:!0}))}return ze(d),f({value:s,done:!0})}}let st={next(){return oo(this)?this._asyncIteratorImpl.next():m(io("next"))},return(a){return oo(this)?this._asyncIteratorImpl.return(a):m(io("return"))}};Object.setPrototypeOf(st,Ie);function no(a,s){let d=j(a),v=new De(d,s),A=Object.create(st);return A._asyncIteratorImpl=v,A}o(no,"AcquireReadableStreamAsyncIterator");function oo(a){if(!r(a)||!Object.prototype.hasOwnProperty.call(a,"_asyncIteratorImpl"))return!1;try{return a._asyncIteratorImpl instanceof De}catch{return!1}}o(oo,"IsReadableStreamAsyncIterator");function io(a){return new TypeError(`ReadableStreamAsyncIterator.${a} can only be used on a ReadableSteamAsyncIterator`)}o(io,"streamAsyncIteratorBrandCheckException");let jt=Number.isNaN||function(a){return a!==a};var Fr,bt,ut;function Me(a){return a.slice()}o(Me,"CreateArrayFromList");function Zp(a,s,d,v,A){new Uint8Array(a).set(new Uint8Array(d,v,A),s)}o(Zp,"CopyDataBlockBytes");let Br=o(a=>(typeof a.transfer=="function"?Br=o(s=>s.transfer(),"TransferArrayBuffer"):typeof structuredClone=="function"?Br=o(s=>structuredClone(s,{transfer:[s]}),"TransferArrayBuffer"):Br=o(s=>s,"TransferArrayBuffer"),Br(a)),"TransferArrayBuffer"),sn=o(a=>(typeof a.detached=="boolean"?sn=o(s=>s.detached,"IsDetachedBuffer"):sn=o(s=>s.byteLength===0,"IsDetachedBuffer"),sn(a)),"IsDetachedBuffer");function Jp(a,s,d){if(a.slice)return a.slice(s,d);let v=d-s,A=new ArrayBuffer(v);return Zp(A,0,a,s,v),A}o(Jp,"ArrayBufferSlice");function ga(a,s){let d=a[s];if(d!=null){if(typeof d!="function")throw new TypeError(`${String(s)} is not a function`);return d}}o(ga,"GetMethod");function QP(a){let s={[Symbol.iterator]:()=>a.iterator},d=(async function*(){return yield*s})(),v=d.next;return{iterator:d,nextMethod:v,done:!1}}o(QP,"CreateAsyncFromSyncIterator");let Gu=(ut=(Fr=Symbol.asyncIterator)!==null&&Fr!==void 0?Fr:(bt=Symbol.for)===null||bt===void 0?void 0:bt.call(Symbol,"Symbol.asyncIterator"))!==null&&ut!==void 0?ut:"@@asyncIterator";function Kp(a,s="sync",d){if(d===void 0)if(s==="async"){if(d=ga(a,Gu),d===void 0){let U=ga(a,Symbol.iterator),F=Kp(a,"sync",U);return QP(F)}}else d=ga(a,Symbol.iterator);if(d===void 0)throw new TypeError("The object is not iterable");let v=k(d,a,[]);if(!r(v))throw new TypeError("The iterator method must return an object");let A=v.next;return{iterator:v,nextMethod:A,done:!1}}o(Kp,"GetIterator");function YP(a){let s=k(a.nextMethod,a.iterator,[]);if(!r(s))throw new TypeError("The iterator.next() method must return an object");return s}o(YP,"IteratorNext");function XP(a){return!!a.done}o(XP,"IteratorComplete");function eS(a){return a.value}o(eS,"IteratorValue");function tS(a){return!(typeof a!="number"||jt(a)||a<0)}o(tS,"IsNonNegativeNumber");function Qp(a){let s=Jp(a.buffer,a.byteOffset,a.byteOffset+a.byteLength);return new Uint8Array(s)}o(Qp,"CloneAsUint8Array");function Wu(a){let s=a._queue.shift();return a._queueTotalSize-=s.size,a._queueTotalSize<0&&(a._queueTotalSize=0),s.value}o(Wu,"DequeueValue");function Zu(a,s,d){if(!tS(d)||d===1/0)throw new RangeError("Size must be a finite, non-NaN, non-negative number.");a._queue.push({value:s,size:d}),a._queueTotalSize+=d}o(Zu,"EnqueueValueWithSize");function rS(a){return a._queue.peek().value}o(rS,"PeekQueueValue");function un(a){a._queue=new H,a._queueTotalSize=0}o(un,"ResetQueue");function Yp(a){return a===DataView}o(Yp,"isDataViewConstructor");function nS(a){return Yp(a.constructor)}o(nS,"isDataView");function oS(a){return Yp(a)?1:a.BYTES_PER_ELEMENT}o(oS,"arrayBufferViewElementSize");class zn{static{o(this,"ReadableStreamBYOBRequest")}constructor(){throw new TypeError("Illegal constructor")}get view(){if(!Ju(this))throw ec("view");return this._view}respond(s){if(!Ju(this))throw ec("respond");if(at(s,1,"respond"),s=R(s,"First parameter"),this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");if(sn(this._view.buffer))throw new TypeError("The BYOB request's buffer has been detached and so cannot be used as a response");va(this._associatedReadableByteStreamController,s)}respondWithNewView(s){if(!Ju(this))throw ec("respondWithNewView");if(at(s,1,"respondWithNewView"),!ArrayBuffer.isView(s))throw new TypeError("You can only respond with array buffer views");if(this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");if(sn(s.buffer))throw new TypeError("The given view's buffer has been detached and so cannot be used as a response");Ea(this._associatedReadableByteStreamController,s)}}Object.defineProperties(zn.prototype,{respond:{enumerable:!0},respondWithNewView:{enumerable:!0},view:{enumerable:!0}}),i(zn.prototype.respond,"respond"),i(zn.prototype.respondWithNewView,"respondWithNewView"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(zn.prototype,Symbol.toStringTag,{value:"ReadableStreamBYOBRequest",configurable:!0});class qr{static{o(this,"ReadableByteStreamController")}constructor(){throw new TypeError("Illegal constructor")}get byobRequest(){if(!Nn(this))throw ui("byobRequest");return Xu(this)}get desiredSize(){if(!Nn(this))throw ui("desiredSize");return cf(this)}close(){if(!Nn(this))throw ui("close");if(this._closeRequested)throw new TypeError("The stream has already been closed; do not close it again!");let s=this._controlledReadableByteStream._state;if(s!=="readable")throw new TypeError(`The stream (in ${s} state) is not in the readable state and cannot be closed`);si(this)}enqueue(s){if(!Nn(this))throw ui("enqueue");if(at(s,1,"enqueue"),!ArrayBuffer.isView(s))throw new TypeError("chunk must be an array buffer view");if(s.byteLength===0)throw new TypeError("chunk must have non-zero byteLength");if(s.buffer.byteLength===0)throw new TypeError("chunk's buffer must have non-zero byteLength");if(this._closeRequested)throw new TypeError("stream is closed or draining");let d=this._controlledReadableByteStream._state;if(d!=="readable")throw new TypeError(`The stream (in ${d} state) is not in the readable state and cannot be enqueued to`);ba(this,s)}error(s=void 0){if(!Nn(this))throw ui("error");Xt(this,s)}[re](s){Xp(this),un(this);let d=this._cancelAlgorithm(s);return _a(this),d}[G](s){let d=this._controlledReadableByteStream;if(this._queueTotalSize>0){uf(this,s);return}let v=this._autoAllocateChunkSize;if(v!==void 0){let A;try{A=new ArrayBuffer(v)}catch(F){s._errorSteps(F);return}let U={buffer:A,bufferByteLength:v,byteOffset:0,byteLength:v,bytesFilled:0,minimumFill:1,elementSize:1,viewConstructor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(U)}I(d,s),Dn(this)}[je](){if(this._pendingPullIntos.length>0){let s=this._pendingPullIntos.peek();s.readerType="none",this._pendingPullIntos=new H,this._pendingPullIntos.push(s)}}}Object.defineProperties(qr.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},byobRequest:{enumerable:!0},desiredSize:{enumerable:!0}}),i(qr.prototype.close,"close"),i(qr.prototype.enqueue,"enqueue"),i(qr.prototype.error,"error"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(qr.prototype,Symbol.toStringTag,{value:"ReadableByteStreamController",configurable:!0});function Nn(a){return!r(a)||!Object.prototype.hasOwnProperty.call(a,"_controlledReadableByteStream")?!1:a instanceof qr}o(Nn,"IsReadableByteStreamController");function Ju(a){return!r(a)||!Object.prototype.hasOwnProperty.call(a,"_associatedReadableByteStreamController")?!1:a instanceof zn}o(Ju,"IsReadableStreamBYOBRequest");function Dn(a){if(!cS(a))return;if(a._pulling){a._pullAgain=!0;return}a._pulling=!0;let d=a._pullAlgorithm();P(d,()=>(a._pulling=!1,a._pullAgain&&(a._pullAgain=!1,Dn(a)),null),v=>(Xt(a,v),null))}o(Dn,"ReadableByteStreamControllerCallPullIfNeeded");function Xp(a){Qu(a),a._pendingPullIntos=new H}o(Xp,"ReadableByteStreamControllerClearPendingPullIntos");function Ku(a,s){let d=!1;a._state==="closed"&&(d=!0);let v=ef(s);s.readerType==="default"?O(a,v,d):hS(a,v,d)}o(Ku,"ReadableByteStreamControllerCommitPullIntoDescriptor");function ef(a){let s=a.bytesFilled,d=a.elementSize;return new a.viewConstructor(a.buffer,a.byteOffset,s/d)}o(ef,"ReadableByteStreamControllerConvertPullIntoDescriptor");function ya(a,s,d,v){a._queue.push({buffer:s,byteOffset:d,byteLength:v}),a._queueTotalSize+=v}o(ya,"ReadableByteStreamControllerEnqueueChunkToQueue");function tf(a,s,d,v){let A;try{A=Jp(s,d,d+v)}catch(U){throw Xt(a,U),U}ya(a,A,0,v)}o(tf,"ReadableByteStreamControllerEnqueueClonedChunkToQueue");function rf(a,s){s.bytesFilled>0&&tf(a,s.buffer,s.byteOffset,s.bytesFilled),ao(a)}o(rf,"ReadableByteStreamControllerEnqueueDetachedPullIntoToQueue");function nf(a,s){let d=Math.min(a._queueTotalSize,s.byteLength-s.bytesFilled),v=s.bytesFilled+d,A=d,U=!1,F=v%s.elementSize,Q=v-F;Q>=s.minimumFill&&(A=Q-s.bytesFilled,U=!0);let le=a._queue;for(;A>0;){let oe=le.peek(),_e=Math.min(A,oe.byteLength),Pe=s.byteOffset+s.bytesFilled;Zp(s.buffer,Pe,oe.buffer,oe.byteOffset,_e),oe.byteLength===_e?le.shift():(oe.byteOffset+=_e,oe.byteLength-=_e),a._queueTotalSize-=_e,of(a,_e,s),A-=_e}return U}o(nf,"ReadableByteStreamControllerFillPullIntoDescriptorFromQueue");function of(a,s,d){d.bytesFilled+=s}o(of,"ReadableByteStreamControllerFillHeadPullIntoDescriptor");function af(a){a._queueTotalSize===0&&a._closeRequested?(_a(a),mi(a._controlledReadableByteStream)):Dn(a)}o(af,"ReadableByteStreamControllerHandleQueueDrain");function Qu(a){a._byobRequest!==null&&(a._byobRequest._associatedReadableByteStreamController=void 0,a._byobRequest._view=null,a._byobRequest=null)}o(Qu,"ReadableByteStreamControllerInvalidateBYOBRequest");function Yu(a){for(;a._pendingPullIntos.length>0;){if(a._queueTotalSize===0)return;let s=a._pendingPullIntos.peek();nf(a,s)&&(ao(a),Ku(a._controlledReadableByteStream,s))}}o(Yu,"ReadableByteStreamControllerProcessPullIntoDescriptorsUsingQueue");function iS(a){let s=a._controlledReadableByteStream._reader;for(;s._readRequests.length>0;){if(a._queueTotalSize===0)return;let d=s._readRequests.shift();uf(a,d)}}o(iS,"ReadableByteStreamControllerProcessReadRequestsUsingQueue");function aS(a,s,d,v){let A=a._controlledReadableByteStream,U=s.constructor,F=oS(U),{byteOffset:Q,byteLength:le}=s,oe=d*F,_e;try{_e=Br(s.buffer)}catch(Fe){v._errorSteps(Fe);return}let Pe={buffer:_e,bufferByteLength:_e.byteLength,byteOffset:Q,byteLength:le,bytesFilled:0,minimumFill:oe,elementSize:F,viewConstructor:U,readerType:"byob"};if(a._pendingPullIntos.length>0){a._pendingPullIntos.push(Pe),pf(A,v);return}if(A._state==="closed"){let Fe=new U(Pe.buffer,Pe.byteOffset,0);v._closeSteps(Fe);return}if(a._queueTotalSize>0){if(nf(a,Pe)){let Fe=ef(Pe);af(a),v._chunkSteps(Fe);return}if(a._closeRequested){let Fe=new TypeError("Insufficient bytes to fill elements in the given buffer");Xt(a,Fe),v._errorSteps(Fe);return}}a._pendingPullIntos.push(Pe),pf(A,v),Dn(a)}o(aS,"ReadableByteStreamControllerPullInto");function sS(a,s){s.readerType==="none"&&ao(a);let d=a._controlledReadableByteStream;if(tc(d))for(;ff(d)>0;){let v=ao(a);Ku(d,v)}}o(sS,"ReadableByteStreamControllerRespondInClosedState");function uS(a,s,d){if(of(a,s,d),d.readerType==="none"){rf(a,d),Yu(a);return}if(d.bytesFilled<d.minimumFill)return;ao(a);let v=d.bytesFilled%d.elementSize;if(v>0){let A=d.byteOffset+d.bytesFilled;tf(a,d.buffer,A-v,v)}d.bytesFilled-=v,Ku(a._controlledReadableByteStream,d),Yu(a)}o(uS,"ReadableByteStreamControllerRespondInReadableState");function sf(a,s){let d=a._pendingPullIntos.peek();Qu(a),a._controlledReadableByteStream._state==="closed"?sS(a,d):uS(a,s,d),Dn(a)}o(sf,"ReadableByteStreamControllerRespondInternal");function ao(a){return a._pendingPullIntos.shift()}o(ao,"ReadableByteStreamControllerShiftPendingPullInto");function cS(a){let s=a._controlledReadableByteStream;return s._state!=="readable"||a._closeRequested||!a._started?!1:!!(z(s)&&D(s)>0||tc(s)&&ff(s)>0||cf(a)>0)}o(cS,"ReadableByteStreamControllerShouldCallPull");function _a(a){a._pullAlgorithm=void 0,a._cancelAlgorithm=void 0}o(_a,"ReadableByteStreamControllerClearAlgorithms");function si(a){let s=a._controlledReadableByteStream;if(!(a._closeRequested||s._state!=="readable")){if(a._queueTotalSize>0){a._closeRequested=!0;return}if(a._pendingPullIntos.length>0){let d=a._pendingPullIntos.peek();if(d.bytesFilled%d.elementSize!==0){let v=new TypeError("Insufficient bytes to fill elements in the given buffer");throw Xt(a,v),v}}_a(a),mi(s)}}o(si,"ReadableByteStreamControllerClose");function ba(a,s){let d=a._controlledReadableByteStream;if(a._closeRequested||d._state!=="readable")return;let{buffer:v,byteOffset:A,byteLength:U}=s;if(sn(v))throw new TypeError("chunk's buffer is detached and so cannot be enqueued");let F=Br(v);if(a._pendingPullIntos.length>0){let Q=a._pendingPullIntos.peek();if(sn(Q.buffer))throw new TypeError("The BYOB request's buffer has been detached and so cannot be filled with an enqueued chunk");Qu(a),Q.buffer=Br(Q.buffer),Q.readerType==="none"&&rf(a,Q)}if(z(d))if(iS(a),D(d)===0)ya(a,F,A,U);else{a._pendingPullIntos.length>0&&ao(a);let Q=new Uint8Array(F,A,U);O(d,Q,!1)}else tc(d)?(ya(a,F,A,U),Yu(a)):ya(a,F,A,U);Dn(a)}o(ba,"ReadableByteStreamControllerEnqueue");function Xt(a,s){let d=a._controlledReadableByteStream;d._state==="readable"&&(Xp(a),un(a),_a(a),Uf(d,s))}o(Xt,"ReadableByteStreamControllerError");function uf(a,s){let d=a._queue.shift();a._queueTotalSize-=d.byteLength,af(a);let v=new Uint8Array(d.buffer,d.byteOffset,d.byteLength);s._chunkSteps(v)}o(uf,"ReadableByteStreamControllerFillReadRequestFromQueue");function Xu(a){if(a._byobRequest===null&&a._pendingPullIntos.length>0){let s=a._pendingPullIntos.peek(),d=new Uint8Array(s.buffer,s.byteOffset+s.bytesFilled,s.byteLength-s.bytesFilled),v=Object.create(zn.prototype);dS(v,a,d),a._byobRequest=v}return a._byobRequest}o(Xu,"ReadableByteStreamControllerGetBYOBRequest");function cf(a){let s=a._controlledReadableByteStream._state;return s==="errored"?null:s==="closed"?0:a._strategyHWM-a._queueTotalSize}o(cf,"ReadableByteStreamControllerGetDesiredSize");function va(a,s){let d=a._pendingPullIntos.peek();if(a._controlledReadableByteStream._state==="closed"){if(s!==0)throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream")}else{if(s===0)throw new TypeError("bytesWritten must be greater than 0 when calling respond() on a readable stream");if(d.bytesFilled+s>d.byteLength)throw new RangeError("bytesWritten out of range")}d.buffer=Br(d.buffer),sf(a,s)}o(va,"ReadableByteStreamControllerRespond");function Ea(a,s){let d=a._pendingPullIntos.peek();if(a._controlledReadableByteStream._state==="closed"){if(s.byteLength!==0)throw new TypeError("The view's length must be 0 when calling respondWithNewView() on a closed stream")}else if(s.byteLength===0)throw new TypeError("The view's length must be greater than 0 when calling respondWithNewView() on a readable stream");if(d.byteOffset+d.bytesFilled!==s.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(d.bufferByteLength!==s.buffer.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");if(d.bytesFilled+s.byteLength>d.byteLength)throw new RangeError("The region specified by view is larger than byobRequest");let A=s.byteLength;d.buffer=Br(s.buffer),sf(a,A)}o(Ea,"ReadableByteStreamControllerRespondWithNewView");function lf(a,s,d,v,A,U,F){s._controlledReadableByteStream=a,s._pullAgain=!1,s._pulling=!1,s._byobRequest=null,s._queue=s._queueTotalSize=void 0,un(s),s._closeRequested=!1,s._started=!1,s._strategyHWM=U,s._pullAlgorithm=v,s._cancelAlgorithm=A,s._autoAllocateChunkSize=F,s._pendingPullIntos=new H,a._readableStreamController=s;let Q=d();P(f(Q),()=>(s._started=!0,Dn(s),null),le=>(Xt(s,le),null))}o(lf,"SetUpReadableByteStreamController");function lS(a,s,d){let v=Object.create(qr.prototype),A,U,F;s.start!==void 0?A=o(()=>s.start(v),"startAlgorithm"):A=o(()=>{},"startAlgorithm"),s.pull!==void 0?U=o(()=>s.pull(v),"pullAlgorithm"):U=o(()=>f(void 0),"pullAlgorithm"),s.cancel!==void 0?F=o(le=>s.cancel(le),"cancelAlgorithm"):F=o(()=>f(void 0),"cancelAlgorithm");let Q=s.autoAllocateChunkSize;if(Q===0)throw new TypeError("autoAllocateChunkSize must be greater than 0");lf(a,v,A,U,F,d,Q)}o(lS,"SetUpReadableByteStreamControllerFromUnderlyingSource");function dS(a,s,d){a._associatedReadableByteStreamController=s,a._view=d}o(dS,"SetUpReadableStreamBYOBRequest");function ec(a){return new TypeError(`ReadableStreamBYOBRequest.prototype.${a} can only be used on a ReadableStreamBYOBRequest`)}o(ec,"byobRequestBrandCheckException");function ui(a){return new TypeError(`ReadableByteStreamController.prototype.${a} can only be used on a ReadableByteStreamController`)}o(ui,"byteStreamControllerBrandCheckException");function pS(a,s){Rt(a,s);let d=a?.mode;return{mode:d===void 0?void 0:fS(d,`${s} has member 'mode' that`)}}o(pS,"convertReaderOptions");function fS(a,s){if(a=`${a}`,a!=="byob")throw new TypeError(`${s} '${a}' is not a valid enumeration value for ReadableStreamReaderMode`);return a}o(fS,"convertReadableStreamReaderMode");function mS(a,s){var d;Rt(a,s);let v=(d=a?.min)!==null&&d!==void 0?d:1;return{min:R(v,`${s} has member 'min' that`)}}o(mS,"convertByobReadOptions");function df(a){return new cn(a)}o(df,"AcquireReadableStreamBYOBReader");function pf(a,s){a._reader._readIntoRequests.push(s)}o(pf,"ReadableStreamAddReadIntoRequest");function hS(a,s,d){let A=a._reader._readIntoRequests.shift();d?A._closeSteps(s):A._chunkSteps(s)}o(hS,"ReadableStreamFulfillReadIntoRequest");function ff(a){return a._reader._readIntoRequests.length}o(ff,"ReadableStreamGetNumReadIntoRequests");function tc(a){let s=a._reader;return!(s===void 0||!Un(s))}o(tc,"ReadableStreamHasBYOBReader");class cn{static{o(this,"ReadableStreamBYOBReader")}constructor(s){if(at(s,1,"ReadableStreamBYOBReader"),$(s,"First parameter"),pn(s))throw new TypeError("This stream has already been locked for exclusive reading by another reader");if(!Nn(s._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");Ee(this,s),this._readIntoRequests=new H}get closed(){return Un(this)?this._closedPromise:m(Pa("closed"))}cancel(s=void 0){return Un(this)?this._ownerReadableStream===void 0?m($e("cancel")):ve(this,s):m(Pa("cancel"))}read(s,d={}){if(!Un(this))return m(Pa("read"));if(!ArrayBuffer.isView(s))return m(new TypeError("view must be an array buffer view"));if(s.byteLength===0)return m(new TypeError("view must have non-zero byteLength"));if(s.buffer.byteLength===0)return m(new TypeError("view's buffer must have non-zero byteLength"));if(sn(s.buffer))return m(new TypeError("view's buffer has been detached"));let v;try{v=mS(d,"options")}catch(oe){return m(oe)}let A=v.min;if(A===0)return m(new TypeError("options.min must be greater than 0"));if(nS(s)){if(A>s.byteLength)return m(new RangeError("options.min must be less than or equal to view's byteLength"))}else if(A>s.length)return m(new RangeError("options.min must be less than or equal to view's length"));if(this._ownerReadableStream===void 0)return m($e("read from"));let U,F,Q=p((oe,_e)=>{U=oe,F=_e});return mf(this,s,A,{_chunkSteps:o(oe=>U({value:oe,done:!1}),"_chunkSteps"),_closeSteps:o(oe=>U({value:oe,done:!0}),"_closeSteps"),_errorSteps:o(oe=>F(oe),"_errorSteps")}),Q}releaseLock(){if(!Un(this))throw Pa("releaseLock");this._ownerReadableStream!==void 0&&gS(this)}}Object.defineProperties(cn.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),i(cn.prototype.cancel,"cancel"),i(cn.prototype.read,"read"),i(cn.prototype.releaseLock,"releaseLock"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(cn.prototype,Symbol.toStringTag,{value:"ReadableStreamBYOBReader",configurable:!0});function Un(a){return!r(a)||!Object.prototype.hasOwnProperty.call(a,"_readIntoRequests")?!1:a instanceof cn}o(Un,"IsReadableStreamBYOBReader");function mf(a,s,d,v){let A=a._ownerReadableStream;A._disturbed=!0,A._state==="errored"?v._errorSteps(A._storedError):aS(A._readableStreamController,s,d,v)}o(mf,"ReadableStreamBYOBReaderRead");function gS(a){ze(a);let s=new TypeError("Reader was released");hf(a,s)}o(gS,"ReadableStreamBYOBReaderRelease");function hf(a,s){let d=a._readIntoRequests;a._readIntoRequests=new H,d.forEach(v=>{v._errorSteps(s)})}o(hf,"ReadableStreamBYOBReaderErrorReadIntoRequests");function Pa(a){return new TypeError(`ReadableStreamBYOBReader.prototype.${a} can only be used on a ReadableStreamBYOBReader`)}o(Pa,"byobReaderBrandCheckException");function ci(a,s){let{highWaterMark:d}=a;if(d===void 0)return s;if(jt(d)||d<0)throw new RangeError("Invalid highWaterMark");return d}o(ci,"ExtractHighWaterMark");function Sa(a){let{size:s}=a;return s||(()=>1)}o(Sa,"ExtractSizeAlgorithm");function Ta(a,s){Rt(a,s);let d=a?.highWaterMark,v=a?.size;return{highWaterMark:d===void 0?void 0:S(d),size:v===void 0?void 0:yS(v,`${s} has member 'size' that`)}}o(Ta,"convertQueuingStrategy");function yS(a,s){return St(a,s),d=>S(a(d))}o(yS,"convertQueuingStrategySize");function _S(a,s){Rt(a,s);let d=a?.abort,v=a?.close,A=a?.start,U=a?.type,F=a?.write;return{abort:d===void 0?void 0:bS(d,a,`${s} has member 'abort' that`),close:v===void 0?void 0:vS(v,a,`${s} has member 'close' that`),start:A===void 0?void 0:ES(A,a,`${s} has member 'start' that`),write:F===void 0?void 0:PS(F,a,`${s} has member 'write' that`),type:U}}o(_S,"convertUnderlyingSink");function bS(a,s,d){return St(a,d),v=>q(a,s,[v])}o(bS,"convertUnderlyingSinkAbortCallback");function vS(a,s,d){return St(a,d),()=>q(a,s,[])}o(vS,"convertUnderlyingSinkCloseCallback");function ES(a,s,d){return St(a,d),v=>k(a,s,[v])}o(ES,"convertUnderlyingSinkStartCallback");function PS(a,s,d){return St(a,d),(v,A)=>q(a,s,[v,A])}o(PS,"convertUnderlyingSinkWriteCallback");function gf(a,s){if(!so(a))throw new TypeError(`${s} is not a WritableStream.`)}o(gf,"assertWritableStream");function SS(a){if(typeof a!="object"||a===null)return!1;try{return typeof a.aborted=="boolean"}catch{return!1}}o(SS,"isAbortSignal");let TS=typeof AbortController=="function";function wS(){if(TS)return new AbortController}o(wS,"createAbortController");class ln{static{o(this,"WritableStream")}constructor(s={},d={}){s===void 0?s=null:Tt(s,"First parameter");let v=Ta(d,"Second parameter"),A=_S(s,"First parameter");if(_f(this),A.type!==void 0)throw new RangeError("Invalid type is specified");let F=Sa(v),Q=ci(v,1);MS(this,A,Q,F)}get locked(){if(!so(this))throw Ra("locked");return uo(this)}abort(s=void 0){return so(this)?uo(this)?m(new TypeError("Cannot abort a stream that already has a writer")):wa(this,s):m(Ra("abort"))}close(){return so(this)?uo(this)?m(new TypeError("Cannot close a stream that already has a writer")):xr(this)?m(new TypeError("Cannot close an already-closing stream")):bf(this):m(Ra("close"))}getWriter(){if(!so(this))throw Ra("getWriter");return yf(this)}}Object.defineProperties(ln.prototype,{abort:{enumerable:!0},close:{enumerable:!0},getWriter:{enumerable:!0},locked:{enumerable:!0}}),i(ln.prototype.abort,"abort"),i(ln.prototype.close,"close"),i(ln.prototype.getWriter,"getWriter"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(ln.prototype,Symbol.toStringTag,{value:"WritableStream",configurable:!0});function yf(a){return new Vr(a)}o(yf,"AcquireWritableStreamDefaultWriter");function xS(a,s,d,v,A=1,U=()=>1){let F=Object.create(ln.prototype);_f(F);let Q=Object.create(co.prototype);return wf(F,Q,a,s,d,v,A,U),F}o(xS,"CreateWritableStream");function _f(a){a._state="writable",a._storedError=void 0,a._writer=void 0,a._writableStreamController=void 0,a._writeRequests=new H,a._inFlightWriteRequest=void 0,a._closeRequest=void 0,a._inFlightCloseRequest=void 0,a._pendingAbortRequest=void 0,a._backpressure=!1}o(_f,"InitializeWritableStream");function so(a){return!r(a)||!Object.prototype.hasOwnProperty.call(a,"_writableStreamController")?!1:a instanceof ln}o(so,"IsWritableStream");function uo(a){return a._writer!==void 0}o(uo,"IsWritableStreamLocked");function wa(a,s){var d;if(a._state==="closed"||a._state==="errored")return f(void 0);a._writableStreamController._abortReason=s,(d=a._writableStreamController._abortController)===null||d===void 0||d.abort(s);let v=a._state;if(v==="closed"||v==="errored")return f(void 0);if(a._pendingAbortRequest!==void 0)return a._pendingAbortRequest._promise;let A=!1;v==="erroring"&&(A=!0,s=void 0);let U=p((F,Q)=>{a._pendingAbortRequest={_promise:void 0,_resolve:F,_reject:Q,_reason:s,_wasAlreadyErroring:A}});return a._pendingAbortRequest._promise=U,A||nc(a,s),U}o(wa,"WritableStreamAbort");function bf(a){let s=a._state;if(s==="closed"||s==="errored")return m(new TypeError(`The stream (in ${s} state) is not in the writable state and cannot be closed`));let d=p((A,U)=>{let F={_resolve:A,_reject:U};a._closeRequest=F}),v=a._writer;return v!==void 0&&a._backpressure&&s==="writable"&&dc(v),LS(a._writableStreamController),d}o(bf,"WritableStreamClose");function AS(a){return p((d,v)=>{let A={_resolve:d,_reject:v};a._writeRequests.push(A)})}o(AS,"WritableStreamAddWriteRequest");function rc(a,s){if(a._state==="writable"){nc(a,s);return}oc(a)}o(rc,"WritableStreamDealWithRejection");function nc(a,s){let d=a._writableStreamController;a._state="erroring",a._storedError=s;let v=a._writer;v!==void 0&&Ef(v,s),!kS(a)&&d._started&&oc(a)}o(nc,"WritableStreamStartErroring");function oc(a){a._state="errored",a._writableStreamController[J]();let s=a._storedError;if(a._writeRequests.forEach(A=>{A._reject(s)}),a._writeRequests=new H,a._pendingAbortRequest===void 0){xa(a);return}let d=a._pendingAbortRequest;if(a._pendingAbortRequest=void 0,d._wasAlreadyErroring){d._reject(s),xa(a);return}let v=a._writableStreamController[V](d._reason);P(v,()=>(d._resolve(),xa(a),null),A=>(d._reject(A),xa(a),null))}o(oc,"WritableStreamFinishErroring");function IS(a){a._inFlightWriteRequest._resolve(void 0),a._inFlightWriteRequest=void 0}o(IS,"WritableStreamFinishInFlightWrite");function RS(a,s){a._inFlightWriteRequest._reject(s),a._inFlightWriteRequest=void 0,rc(a,s)}o(RS,"WritableStreamFinishInFlightWriteWithError");function CS(a){a._inFlightCloseRequest._resolve(void 0),a._inFlightCloseRequest=void 0,a._state==="erroring"&&(a._storedError=void 0,a._pendingAbortRequest!==void 0&&(a._pendingAbortRequest._resolve(),a._pendingAbortRequest=void 0)),a._state="closed";let d=a._writer;d!==void 0&&Rf(d)}o(CS,"WritableStreamFinishInFlightClose");function OS(a,s){a._inFlightCloseRequest._reject(s),a._inFlightCloseRequest=void 0,a._pendingAbortRequest!==void 0&&(a._pendingAbortRequest._reject(s),a._pendingAbortRequest=void 0),rc(a,s)}o(OS,"WritableStreamFinishInFlightCloseWithError");function xr(a){return!(a._closeRequest===void 0&&a._inFlightCloseRequest===void 0)}o(xr,"WritableStreamCloseQueuedOrInFlight");function kS(a){return!(a._inFlightWriteRequest===void 0&&a._inFlightCloseRequest===void 0)}o(kS,"WritableStreamHasOperationMarkedInFlight");function $S(a){a._inFlightCloseRequest=a._closeRequest,a._closeRequest=void 0}o($S,"WritableStreamMarkCloseRequestInFlight");function zS(a){a._inFlightWriteRequest=a._writeRequests.shift()}o(zS,"WritableStreamMarkFirstWriteRequestInFlight");function xa(a){a._closeRequest!==void 0&&(a._closeRequest._reject(a._storedError),a._closeRequest=void 0);let s=a._writer;s!==void 0&&cc(s,a._storedError)}o(xa,"WritableStreamRejectCloseAndClosedPromiseIfNeeded");function ic(a,s){let d=a._writer;d!==void 0&&s!==a._backpressure&&(s?WS(d):dc(d)),a._backpressure=s}o(ic,"WritableStreamUpdateBackpressure");class Vr{static{o(this,"WritableStreamDefaultWriter")}constructor(s){if(at(s,1,"WritableStreamDefaultWriter"),gf(s,"First parameter"),uo(s))throw new TypeError("This stream has already been locked for exclusive writing by another writer");this._ownerWritableStream=s,s._writer=this;let d=s._state;if(d==="writable")!xr(s)&&s._backpressure?Oa(this):Cf(this),Ca(this);else if(d==="erroring")lc(this,s._storedError),Ca(this);else if(d==="closed")Cf(this),HS(this);else{let v=s._storedError;lc(this,v),If(this,v)}}get closed(){return jn(this)?this._closedPromise:m(Mn("closed"))}get desiredSize(){if(!jn(this))throw Mn("desiredSize");if(this._ownerWritableStream===void 0)throw di("desiredSize");return jS(this)}get ready(){return jn(this)?this._readyPromise:m(Mn("ready"))}abort(s=void 0){return jn(this)?this._ownerWritableStream===void 0?m(di("abort")):NS(this,s):m(Mn("abort"))}close(){if(!jn(this))return m(Mn("close"));let s=this._ownerWritableStream;return s===void 0?m(di("close")):xr(s)?m(new TypeError("Cannot close an already-closing stream")):vf(this)}releaseLock(){if(!jn(this))throw Mn("releaseLock");this._ownerWritableStream!==void 0&&Pf(this)}write(s=void 0){return jn(this)?this._ownerWritableStream===void 0?m(di("write to")):Sf(this,s):m(Mn("write"))}}Object.defineProperties(Vr.prototype,{abort:{enumerable:!0},close:{enumerable:!0},releaseLock:{enumerable:!0},write:{enumerable:!0},closed:{enumerable:!0},desiredSize:{enumerable:!0},ready:{enumerable:!0}}),i(Vr.prototype.abort,"abort"),i(Vr.prototype.close,"close"),i(Vr.prototype.releaseLock,"releaseLock"),i(Vr.prototype.write,"write"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Vr.prototype,Symbol.toStringTag,{value:"WritableStreamDefaultWriter",configurable:!0});function jn(a){return!r(a)||!Object.prototype.hasOwnProperty.call(a,"_ownerWritableStream")?!1:a instanceof Vr}o(jn,"IsWritableStreamDefaultWriter");function NS(a,s){let d=a._ownerWritableStream;return wa(d,s)}o(NS,"WritableStreamDefaultWriterAbort");function vf(a){let s=a._ownerWritableStream;return bf(s)}o(vf,"WritableStreamDefaultWriterClose");function DS(a){let s=a._ownerWritableStream,d=s._state;return xr(s)||d==="closed"?f(void 0):d==="errored"?m(s._storedError):vf(a)}o(DS,"WritableStreamDefaultWriterCloseWithErrorPropagation");function US(a,s){a._closedPromiseState==="pending"?cc(a,s):GS(a,s)}o(US,"WritableStreamDefaultWriterEnsureClosedPromiseRejected");function Ef(a,s){a._readyPromiseState==="pending"?Of(a,s):ZS(a,s)}o(Ef,"WritableStreamDefaultWriterEnsureReadyPromiseRejected");function jS(a){let s=a._ownerWritableStream,d=s._state;return d==="errored"||d==="erroring"?null:d==="closed"?0:xf(s._writableStreamController)}o(jS,"WritableStreamDefaultWriterGetDesiredSize");function Pf(a){let s=a._ownerWritableStream,d=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");Ef(a,d),US(a,d),s._writer=void 0,a._ownerWritableStream=void 0}o(Pf,"WritableStreamDefaultWriterRelease");function Sf(a,s){let d=a._ownerWritableStream,v=d._writableStreamController,A=FS(v,s);if(d!==a._ownerWritableStream)return m(di("write to"));let U=d._state;if(U==="errored")return m(d._storedError);if(xr(d)||U==="closed")return m(new TypeError("The stream is closing or closed and cannot be written to"));if(U==="erroring")return m(d._storedError);let F=AS(d);return BS(v,s,A),F}o(Sf,"WritableStreamDefaultWriterWrite");let Tf={};class co{static{o(this,"WritableStreamDefaultController")}constructor(){throw new TypeError("Illegal constructor")}get abortReason(){if(!ac(this))throw uc("abortReason");return this._abortReason}get signal(){if(!ac(this))throw uc("signal");if(this._abortController===void 0)throw new TypeError("WritableStreamDefaultController.prototype.signal is not supported");return this._abortController.signal}error(s=void 0){if(!ac(this))throw uc("error");this._controlledWritableStream._state==="writable"&&Af(this,s)}[V](s){let d=this._abortAlgorithm(s);return Aa(this),d}[J](){un(this)}}Object.defineProperties(co.prototype,{abortReason:{enumerable:!0},signal:{enumerable:!0},error:{enumerable:!0}}),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(co.prototype,Symbol.toStringTag,{value:"WritableStreamDefaultController",configurable:!0});function ac(a){return!r(a)||!Object.prototype.hasOwnProperty.call(a,"_controlledWritableStream")?!1:a instanceof co}o(ac,"IsWritableStreamDefaultController");function wf(a,s,d,v,A,U,F,Q){s._controlledWritableStream=a,a._writableStreamController=s,s._queue=void 0,s._queueTotalSize=void 0,un(s),s._abortReason=void 0,s._abortController=wS(),s._started=!1,s._strategySizeAlgorithm=Q,s._strategyHWM=F,s._writeAlgorithm=v,s._closeAlgorithm=A,s._abortAlgorithm=U;let le=sc(s);ic(a,le);let oe=d(),_e=f(oe);P(_e,()=>(s._started=!0,Ia(s),null),Pe=>(s._started=!0,rc(a,Pe),null))}o(wf,"SetUpWritableStreamDefaultController");function MS(a,s,d,v){let A=Object.create(co.prototype),U,F,Q,le;s.start!==void 0?U=o(()=>s.start(A),"startAlgorithm"):U=o(()=>{},"startAlgorithm"),s.write!==void 0?F=o(oe=>s.write(oe,A),"writeAlgorithm"):F=o(()=>f(void 0),"writeAlgorithm"),s.close!==void 0?Q=o(()=>s.close(),"closeAlgorithm"):Q=o(()=>f(void 0),"closeAlgorithm"),s.abort!==void 0?le=o(oe=>s.abort(oe),"abortAlgorithm"):le=o(()=>f(void 0),"abortAlgorithm"),wf(a,A,U,F,Q,le,d,v)}o(MS,"SetUpWritableStreamDefaultControllerFromUnderlyingSink");function Aa(a){a._writeAlgorithm=void 0,a._closeAlgorithm=void 0,a._abortAlgorithm=void 0,a._strategySizeAlgorithm=void 0}o(Aa,"WritableStreamDefaultControllerClearAlgorithms");function LS(a){Zu(a,Tf,0),Ia(a)}o(LS,"WritableStreamDefaultControllerClose");function FS(a,s){try{return a._strategySizeAlgorithm(s)}catch(d){return li(a,d),1}}o(FS,"WritableStreamDefaultControllerGetChunkSize");function xf(a){return a._strategyHWM-a._queueTotalSize}o(xf,"WritableStreamDefaultControllerGetDesiredSize");function BS(a,s,d){try{Zu(a,s,d)}catch(A){li(a,A);return}let v=a._controlledWritableStream;if(!xr(v)&&v._state==="writable"){let A=sc(a);ic(v,A)}Ia(a)}o(BS,"WritableStreamDefaultControllerWrite");function Ia(a){let s=a._controlledWritableStream;if(!a._started||s._inFlightWriteRequest!==void 0)return;if(s._state==="erroring"){oc(s);return}if(a._queue.length===0)return;let v=rS(a);v===Tf?qS(a):VS(a,v)}o(Ia,"WritableStreamDefaultControllerAdvanceQueueIfNeeded");function li(a,s){a._controlledWritableStream._state==="writable"&&Af(a,s)}o(li,"WritableStreamDefaultControllerErrorIfNeeded");function qS(a){let s=a._controlledWritableStream;$S(s),Wu(a);let d=a._closeAlgorithm();Aa(a),P(d,()=>(CS(s),null),v=>(OS(s,v),null))}o(qS,"WritableStreamDefaultControllerProcessClose");function VS(a,s){let d=a._controlledWritableStream;zS(d);let v=a._writeAlgorithm(s);P(v,()=>{IS(d);let A=d._state;if(Wu(a),!xr(d)&&A==="writable"){let U=sc(a);ic(d,U)}return Ia(a),null},A=>(d._state==="writable"&&Aa(a),RS(d,A),null))}o(VS,"WritableStreamDefaultControllerProcessWrite");function sc(a){return xf(a)<=0}o(sc,"WritableStreamDefaultControllerGetBackpressure");function Af(a,s){let d=a._controlledWritableStream;Aa(a),nc(d,s)}o(Af,"WritableStreamDefaultControllerError");function Ra(a){return new TypeError(`WritableStream.prototype.${a} can only be used on a WritableStream`)}o(Ra,"streamBrandCheckException$2");function uc(a){return new TypeError(`WritableStreamDefaultController.prototype.${a} can only be used on a WritableStreamDefaultController`)}o(uc,"defaultControllerBrandCheckException$2");function Mn(a){return new TypeError(`WritableStreamDefaultWriter.prototype.${a} can only be used on a WritableStreamDefaultWriter`)}o(Mn,"defaultWriterBrandCheckException");function di(a){return new TypeError("Cannot "+a+" a stream using a released writer")}o(di,"defaultWriterLockException");function Ca(a){a._closedPromise=p((s,d)=>{a._closedPromise_resolve=s,a._closedPromise_reject=d,a._closedPromiseState="pending"})}o(Ca,"defaultWriterClosedPromiseInitialize");function If(a,s){Ca(a),cc(a,s)}o(If,"defaultWriterClosedPromiseInitializeAsRejected");function HS(a){Ca(a),Rf(a)}o(HS,"defaultWriterClosedPromiseInitializeAsResolved");function cc(a,s){a._closedPromise_reject!==void 0&&(E(a._closedPromise),a._closedPromise_reject(s),a._closedPromise_resolve=void 0,a._closedPromise_reject=void 0,a._closedPromiseState="rejected")}o(cc,"defaultWriterClosedPromiseReject");function GS(a,s){If(a,s)}o(GS,"defaultWriterClosedPromiseResetToRejected");function Rf(a){a._closedPromise_resolve!==void 0&&(a._closedPromise_resolve(void 0),a._closedPromise_resolve=void 0,a._closedPromise_reject=void 0,a._closedPromiseState="resolved")}o(Rf,"defaultWriterClosedPromiseResolve");function Oa(a){a._readyPromise=p((s,d)=>{a._readyPromise_resolve=s,a._readyPromise_reject=d}),a._readyPromiseState="pending"}o(Oa,"defaultWriterReadyPromiseInitialize");function lc(a,s){Oa(a),Of(a,s)}o(lc,"defaultWriterReadyPromiseInitializeAsRejected");function Cf(a){Oa(a),dc(a)}o(Cf,"defaultWriterReadyPromiseInitializeAsResolved");function Of(a,s){a._readyPromise_reject!==void 0&&(E(a._readyPromise),a._readyPromise_reject(s),a._readyPromise_resolve=void 0,a._readyPromise_reject=void 0,a._readyPromiseState="rejected")}o(Of,"defaultWriterReadyPromiseReject");function WS(a){Oa(a)}o(WS,"defaultWriterReadyPromiseReset");function ZS(a,s){lc(a,s)}o(ZS,"defaultWriterReadyPromiseResetToRejected");function dc(a){a._readyPromise_resolve!==void 0&&(a._readyPromise_resolve(void 0),a._readyPromise_resolve=void 0,a._readyPromise_reject=void 0,a._readyPromiseState="fulfilled")}o(dc,"defaultWriterReadyPromiseResolve");function JS(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof global<"u")return global}o(JS,"getGlobals");let pc=JS();function KS(a){if(!(typeof a=="function"||typeof a=="object")||a.name!=="DOMException")return!1;try{return new a,!0}catch{return!1}}o(KS,"isDOMExceptionConstructor");function QS(){let a=pc?.DOMException;return KS(a)?a:void 0}o(QS,"getFromGlobal");function YS(){let a=o(function(d,v){this.message=d||"",this.name=v||"Error",Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)},"DOMException");return i(a,"DOMException"),a.prototype=Object.create(Error.prototype),Object.defineProperty(a.prototype,"constructor",{value:a,writable:!0,configurable:!0}),a}o(YS,"createPolyfill");let XS=QS()||YS();function kf(a,s,d,v,A,U){let F=j(a),Q=yf(s);a._disturbed=!0;let le=!1,oe=f(void 0);return p((_e,Pe)=>{let Fe;if(U!==void 0){if(Fe=o(()=>{let ae=U.reason!==void 0?U.reason:new XS("Aborted","AbortError"),we=[];v||we.push(()=>s._state==="writable"?wa(s,ae):f(void 0)),A||we.push(()=>a._state==="readable"?dr(a,ae):f(void 0)),Ct(()=>Promise.all(we.map(Be=>Be())),!0,ae)},"abortAlgorithm"),U.aborted){Fe();return}U.addEventListener("abort",Fe)}function pr(){return p((ae,we)=>{function Be(Mt){Mt?ae():y(mo(),Be,we)}o(Be,"next"),Be(!1)})}o(pr,"pipeLoop");function mo(){return le?f(!0):y(Q._readyPromise,()=>p((ae,we)=>{te(F,{_chunkSteps:o(Be=>{oe=y(Sf(Q,Be),void 0,e),ae(!1)},"_chunkSteps"),_closeSteps:o(()=>ae(!0),"_closeSteps"),_errorSteps:we})}))}if(o(mo,"pipeStep"),Gr(a,F._closedPromise,ae=>(v?er(!0,ae):Ct(()=>wa(s,ae),!0,ae),null)),Gr(s,Q._closedPromise,ae=>(A?er(!0,ae):Ct(()=>dr(a,ae),!0,ae),null)),wt(a,F._closedPromise,()=>(d?er():Ct(()=>DS(Q)),null)),xr(s)||s._state==="closed"){let ae=new TypeError("the destination writable stream closed before all data could be piped to it");A?er(!0,ae):Ct(()=>dr(a,ae),!0,ae)}E(pr());function mn(){let ae=oe;return y(oe,()=>ae!==oe?mn():void 0)}o(mn,"waitForWritesToFinish");function Gr(ae,we,Be){ae._state==="errored"?Be(ae._storedError):b(we,Be)}o(Gr,"isOrBecomesErrored");function wt(ae,we,Be){ae._state==="closed"?Be():h(we,Be)}o(wt,"isOrBecomesClosed");function Ct(ae,we,Be){if(le)return;le=!0,s._state==="writable"&&!xr(s)?h(mn(),Mt):Mt();function Mt(){return P(ae(),()=>Wr(we,Be),ho=>Wr(!0,ho)),null}o(Mt,"doTheRest")}o(Ct,"shutdownWithAction");function er(ae,we){le||(le=!0,s._state==="writable"&&!xr(s)?h(mn(),()=>Wr(ae,we)):Wr(ae,we))}o(er,"shutdown");function Wr(ae,we){return Pf(Q),ze(F),U!==void 0&&U.removeEventListener("abort",Fe),ae?Pe(we):_e(void 0),null}o(Wr,"finalize")})}o(kf,"ReadableStreamPipeTo");class Hr{static{o(this,"ReadableStreamDefaultController")}constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!ka(this))throw za("desiredSize");return fc(this)}close(){if(!ka(this))throw za("close");if(!po(this))throw new TypeError("The stream is not in a state that permits close");Ln(this)}enqueue(s=void 0){if(!ka(this))throw za("enqueue");if(!po(this))throw new TypeError("The stream is not in a state that permits enqueue");return lo(this,s)}error(s=void 0){if(!ka(this))throw za("error");lr(this,s)}[re](s){un(this);let d=this._cancelAlgorithm(s);return $a(this),d}[G](s){let d=this._controlledReadableStream;if(this._queue.length>0){let v=Wu(this);this._closeRequested&&this._queue.length===0?($a(this),mi(d)):pi(this),s._chunkSteps(v)}else I(d,s),pi(this)}[je](){}}Object.defineProperties(Hr.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},desiredSize:{enumerable:!0}}),i(Hr.prototype.close,"close"),i(Hr.prototype.enqueue,"enqueue"),i(Hr.prototype.error,"error"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Hr.prototype,Symbol.toStringTag,{value:"ReadableStreamDefaultController",configurable:!0});function ka(a){return!r(a)||!Object.prototype.hasOwnProperty.call(a,"_controlledReadableStream")?!1:a instanceof Hr}o(ka,"IsReadableStreamDefaultController");function pi(a){if(!$f(a))return;if(a._pulling){a._pullAgain=!0;return}a._pulling=!0;let d=a._pullAlgorithm();P(d,()=>(a._pulling=!1,a._pullAgain&&(a._pullAgain=!1,pi(a)),null),v=>(lr(a,v),null))}o(pi,"ReadableStreamDefaultControllerCallPullIfNeeded");function $f(a){let s=a._controlledReadableStream;return!po(a)||!a._started?!1:!!(pn(s)&&D(s)>0||fc(a)>0)}o($f,"ReadableStreamDefaultControllerShouldCallPull");function $a(a){a._pullAlgorithm=void 0,a._cancelAlgorithm=void 0,a._strategySizeAlgorithm=void 0}o($a,"ReadableStreamDefaultControllerClearAlgorithms");function Ln(a){if(!po(a))return;let s=a._controlledReadableStream;a._closeRequested=!0,a._queue.length===0&&($a(a),mi(s))}o(Ln,"ReadableStreamDefaultControllerClose");function lo(a,s){if(!po(a))return;let d=a._controlledReadableStream;if(pn(d)&&D(d)>0)O(d,s,!1);else{let v;try{v=a._strategySizeAlgorithm(s)}catch(A){throw lr(a,A),A}try{Zu(a,s,v)}catch(A){throw lr(a,A),A}}pi(a)}o(lo,"ReadableStreamDefaultControllerEnqueue");function lr(a,s){let d=a._controlledReadableStream;d._state==="readable"&&(un(a),$a(a),Uf(d,s))}o(lr,"ReadableStreamDefaultControllerError");function fc(a){let s=a._controlledReadableStream._state;return s==="errored"?null:s==="closed"?0:a._strategyHWM-a._queueTotalSize}o(fc,"ReadableStreamDefaultControllerGetDesiredSize");function eT(a){return!$f(a)}o(eT,"ReadableStreamDefaultControllerHasBackpressure");function po(a){let s=a._controlledReadableStream._state;return!a._closeRequested&&s==="readable"}o(po,"ReadableStreamDefaultControllerCanCloseOrEnqueue");function zf(a,s,d,v,A,U,F){s._controlledReadableStream=a,s._queue=void 0,s._queueTotalSize=void 0,un(s),s._started=!1,s._closeRequested=!1,s._pullAgain=!1,s._pulling=!1,s._strategySizeAlgorithm=F,s._strategyHWM=U,s._pullAlgorithm=v,s._cancelAlgorithm=A,a._readableStreamController=s;let Q=d();P(f(Q),()=>(s._started=!0,pi(s),null),le=>(lr(s,le),null))}o(zf,"SetUpReadableStreamDefaultController");function tT(a,s,d,v){let A=Object.create(Hr.prototype),U,F,Q;s.start!==void 0?U=o(()=>s.start(A),"startAlgorithm"):U=o(()=>{},"startAlgorithm"),s.pull!==void 0?F=o(()=>s.pull(A),"pullAlgorithm"):F=o(()=>f(void 0),"pullAlgorithm"),s.cancel!==void 0?Q=o(le=>s.cancel(le),"cancelAlgorithm"):Q=o(()=>f(void 0),"cancelAlgorithm"),zf(a,A,U,F,Q,d,v)}o(tT,"SetUpReadableStreamDefaultControllerFromUnderlyingSource");function za(a){return new TypeError(`ReadableStreamDefaultController.prototype.${a} can only be used on a ReadableStreamDefaultController`)}o(za,"defaultControllerBrandCheckException$1");function rT(a,s){return Nn(a._readableStreamController)?oT(a):nT(a)}o(rT,"ReadableStreamTee");function nT(a,s){let d=j(a),v=!1,A=!1,U=!1,F=!1,Q,le,oe,_e,Pe,Fe=p(wt=>{Pe=wt});function pr(){return v?(A=!0,f(void 0)):(v=!0,te(d,{_chunkSteps:o(Ct=>{w(()=>{A=!1;let er=Ct,Wr=Ct;U||lo(oe._readableStreamController,er),F||lo(_e._readableStreamController,Wr),v=!1,A&&pr()})},"_chunkSteps"),_closeSteps:o(()=>{v=!1,U||Ln(oe._readableStreamController),F||Ln(_e._readableStreamController),(!U||!F)&&Pe(void 0)},"_closeSteps"),_errorSteps:o(()=>{v=!1},"_errorSteps")}),f(void 0))}o(pr,"pullAlgorithm");function mo(wt){if(U=!0,Q=wt,F){let Ct=Me([Q,le]),er=dr(a,Ct);Pe(er)}return Fe}o(mo,"cancel1Algorithm");function mn(wt){if(F=!0,le=wt,U){let Ct=Me([Q,le]),er=dr(a,Ct);Pe(er)}return Fe}o(mn,"cancel2Algorithm");function Gr(){}return o(Gr,"startAlgorithm"),oe=fi(Gr,pr,mo),_e=fi(Gr,pr,mn),b(d._closedPromise,wt=>(lr(oe._readableStreamController,wt),lr(_e._readableStreamController,wt),(!U||!F)&&Pe(void 0),null)),[oe,_e]}o(nT,"ReadableStreamDefaultTee");function oT(a){let s=j(a),d=!1,v=!1,A=!1,U=!1,F=!1,Q,le,oe,_e,Pe,Fe=p(ae=>{Pe=ae});function pr(ae){b(ae._closedPromise,we=>(ae!==s||(Xt(oe._readableStreamController,we),Xt(_e._readableStreamController,we),(!U||!F)&&Pe(void 0)),null))}o(pr,"forwardReaderError");function mo(){Un(s)&&(ze(s),s=j(a),pr(s)),te(s,{_chunkSteps:o(we=>{w(()=>{v=!1,A=!1;let Be=we,Mt=we;if(!U&&!F)try{Mt=Qp(we)}catch(ho){Xt(oe._readableStreamController,ho),Xt(_e._readableStreamController,ho),Pe(dr(a,ho));return}U||ba(oe._readableStreamController,Be),F||ba(_e._readableStreamController,Mt),d=!1,v?Gr():A&&wt()})},"_chunkSteps"),_closeSteps:o(()=>{d=!1,U||si(oe._readableStreamController),F||si(_e._readableStreamController),oe._readableStreamController._pendingPullIntos.length>0&&va(oe._readableStreamController,0),_e._readableStreamController._pendingPullIntos.length>0&&va(_e._readableStreamController,0),(!U||!F)&&Pe(void 0)},"_closeSteps"),_errorSteps:o(()=>{d=!1},"_errorSteps")})}o(mo,"pullWithDefaultReader");function mn(ae,we){Y(s)&&(ze(s),s=df(a),pr(s));let Be=we?_e:oe,Mt=we?oe:_e;mf(s,ae,1,{_chunkSteps:o(go=>{w(()=>{v=!1,A=!1;let yo=we?F:U;if(we?U:F)yo||Ea(Be._readableStreamController,go);else{let Kf;try{Kf=Qp(go)}catch(_c){Xt(Be._readableStreamController,_c),Xt(Mt._readableStreamController,_c),Pe(dr(a,_c));return}yo||Ea(Be._readableStreamController,go),ba(Mt._readableStreamController,Kf)}d=!1,v?Gr():A&&wt()})},"_chunkSteps"),_closeSteps:o(go=>{d=!1;let yo=we?F:U,Ba=we?U:F;yo||si(Be._readableStreamController),Ba||si(Mt._readableStreamController),go!==void 0&&(yo||Ea(Be._readableStreamController,go),!Ba&&Mt._readableStreamController._pendingPullIntos.length>0&&va(Mt._readableStreamController,0)),(!yo||!Ba)&&Pe(void 0)},"_closeSteps"),_errorSteps:o(()=>{d=!1},"_errorSteps")})}o(mn,"pullWithBYOBReader");function Gr(){if(d)return v=!0,f(void 0);d=!0;let ae=Xu(oe._readableStreamController);return ae===null?mo():mn(ae._view,!1),f(void 0)}o(Gr,"pull1Algorithm");function wt(){if(d)return A=!0,f(void 0);d=!0;let ae=Xu(_e._readableStreamController);return ae===null?mo():mn(ae._view,!0),f(void 0)}o(wt,"pull2Algorithm");function Ct(ae){if(U=!0,Q=ae,F){let we=Me([Q,le]),Be=dr(a,we);Pe(Be)}return Fe}o(Ct,"cancel1Algorithm");function er(ae){if(F=!0,le=ae,U){let we=Me([Q,le]),Be=dr(a,we);Pe(Be)}return Fe}o(er,"cancel2Algorithm");function Wr(){}return o(Wr,"startAlgorithm"),oe=Df(Wr,Gr,Ct),_e=Df(Wr,wt,er),pr(s),[oe,_e]}o(oT,"ReadableByteStreamTee");function iT(a){return r(a)&&typeof a.getReader<"u"}o(iT,"isReadableStreamLike");function aT(a){return iT(a)?uT(a.getReader()):sT(a)}o(aT,"ReadableStreamFrom");function sT(a){let s,d=Kp(a,"async"),v=e;function A(){let F;try{F=YP(d)}catch(le){return m(le)}let Q=f(F);return T(Q,le=>{if(!r(le))throw new TypeError("The promise returned by the iterator.next() method must fulfill with an object");if(XP(le))Ln(s._readableStreamController);else{let _e=eS(le);lo(s._readableStreamController,_e)}})}o(A,"pullAlgorithm");function U(F){let Q=d.iterator,le;try{le=ga(Q,"return")}catch(Pe){return m(Pe)}if(le===void 0)return f(void 0);let oe;try{oe=k(le,Q,[F])}catch(Pe){return m(Pe)}let _e=f(oe);return T(_e,Pe=>{if(!r(Pe))throw new TypeError("The promise returned by the iterator.return() method must fulfill with an object")})}return o(U,"cancelAlgorithm"),s=fi(v,A,U,0),s}o(sT,"ReadableStreamFromIterable");function uT(a){let s,d=e;function v(){let U;try{U=a.read()}catch(F){return m(F)}return T(U,F=>{if(!r(F))throw new TypeError("The promise returned by the reader.read() method must fulfill with an object");if(F.done)Ln(s._readableStreamController);else{let Q=F.value;lo(s._readableStreamController,Q)}})}o(v,"pullAlgorithm");function A(U){try{return f(a.cancel(U))}catch(F){return m(F)}}return o(A,"cancelAlgorithm"),s=fi(d,v,A,0),s}o(uT,"ReadableStreamFromDefaultReader");function cT(a,s){Rt(a,s);let d=a,v=d?.autoAllocateChunkSize,A=d?.cancel,U=d?.pull,F=d?.start,Q=d?.type;return{autoAllocateChunkSize:v===void 0?void 0:R(v,`${s} has member 'autoAllocateChunkSize' that`),cancel:A===void 0?void 0:lT(A,d,`${s} has member 'cancel' that`),pull:U===void 0?void 0:dT(U,d,`${s} has member 'pull' that`),start:F===void 0?void 0:pT(F,d,`${s} has member 'start' that`),type:Q===void 0?void 0:fT(Q,`${s} has member 'type' that`)}}o(cT,"convertUnderlyingDefaultOrByteSource");function lT(a,s,d){return St(a,d),v=>q(a,s,[v])}o(lT,"convertUnderlyingSourceCancelCallback");function dT(a,s,d){return St(a,d),v=>q(a,s,[v])}o(dT,"convertUnderlyingSourcePullCallback");function pT(a,s,d){return St(a,d),v=>k(a,s,[v])}o(pT,"convertUnderlyingSourceStartCallback");function fT(a,s){if(a=`${a}`,a!=="bytes")throw new TypeError(`${s} '${a}' is not a valid enumeration value for ReadableStreamType`);return a}o(fT,"convertReadableStreamType");function mT(a,s){return Rt(a,s),{preventCancel:!!a?.preventCancel}}o(mT,"convertIteratorOptions");function Nf(a,s){Rt(a,s);let d=a?.preventAbort,v=a?.preventCancel,A=a?.preventClose,U=a?.signal;return U!==void 0&&hT(U,`${s} has member 'signal' that`),{preventAbort:!!d,preventCancel:!!v,preventClose:!!A,signal:U}}o(Nf,"convertPipeOptions");function hT(a,s){if(!SS(a))throw new TypeError(`${s} is not an AbortSignal.`)}o(hT,"assertAbortSignal");function gT(a,s){Rt(a,s);let d=a?.readable;_(d,"readable","ReadableWritablePair"),$(d,`${s} has member 'readable' that`);let v=a?.writable;return _(v,"writable","ReadableWritablePair"),gf(v,`${s} has member 'writable' that`),{readable:d,writable:v}}o(gT,"convertReadableWritablePair");class vt{static{o(this,"ReadableStream")}constructor(s={},d={}){s===void 0?s=null:Tt(s,"First parameter");let v=Ta(d,"Second parameter"),A=cT(s,"First parameter");if(mc(this),A.type==="bytes"){if(v.size!==void 0)throw new RangeError("The strategy for a byte stream cannot have a size function");let U=ci(v,0);lS(this,A,U)}else{let U=Sa(v),F=ci(v,1);tT(this,A,F,U)}}get locked(){if(!dn(this))throw Fn("locked");return pn(this)}cancel(s=void 0){return dn(this)?pn(this)?m(new TypeError("Cannot cancel a stream that already has a reader")):dr(this,s):m(Fn("cancel"))}getReader(s=void 0){if(!dn(this))throw Fn("getReader");return pS(s,"First parameter").mode===void 0?j(this):df(this)}pipeThrough(s,d={}){if(!dn(this))throw Fn("pipeThrough");at(s,1,"pipeThrough");let v=gT(s,"First parameter"),A=Nf(d,"Second parameter");if(pn(this))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(uo(v.writable))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");let U=kf(this,v.writable,A.preventClose,A.preventAbort,A.preventCancel,A.signal);return E(U),v.readable}pipeTo(s,d={}){if(!dn(this))return m(Fn("pipeTo"));if(s===void 0)return m("Parameter 1 is required in 'pipeTo'.");if(!so(s))return m(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));let v;try{v=Nf(d,"Second parameter")}catch(A){return m(A)}return pn(this)?m(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):uo(s)?m(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):kf(this,s,v.preventClose,v.preventAbort,v.preventCancel,v.signal)}tee(){if(!dn(this))throw Fn("tee");let s=rT(this);return Me(s)}values(s=void 0){if(!dn(this))throw Fn("values");let d=mT(s,"First parameter");return no(this,d.preventCancel)}[Gu](s){return this.values(s)}static from(s){return aT(s)}}Object.defineProperties(vt,{from:{enumerable:!0}}),Object.defineProperties(vt.prototype,{cancel:{enumerable:!0},getReader:{enumerable:!0},pipeThrough:{enumerable:!0},pipeTo:{enumerable:!0},tee:{enumerable:!0},values:{enumerable:!0},locked:{enumerable:!0}}),i(vt.from,"from"),i(vt.prototype.cancel,"cancel"),i(vt.prototype.getReader,"getReader"),i(vt.prototype.pipeThrough,"pipeThrough"),i(vt.prototype.pipeTo,"pipeTo"),i(vt.prototype.tee,"tee"),i(vt.prototype.values,"values"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(vt.prototype,Symbol.toStringTag,{value:"ReadableStream",configurable:!0}),Object.defineProperty(vt.prototype,Gu,{value:vt.prototype.values,writable:!0,configurable:!0});function fi(a,s,d,v=1,A=()=>1){let U=Object.create(vt.prototype);mc(U);let F=Object.create(Hr.prototype);return zf(U,F,a,s,d,v,A),U}o(fi,"CreateReadableStream");function Df(a,s,d){let v=Object.create(vt.prototype);mc(v);let A=Object.create(qr.prototype);return lf(v,A,a,s,d,0,void 0),v}o(Df,"CreateReadableByteStream");function mc(a){a._state="readable",a._reader=void 0,a._storedError=void 0,a._disturbed=!1}o(mc,"InitializeReadableStream");function dn(a){return!r(a)||!Object.prototype.hasOwnProperty.call(a,"_readableStreamController")?!1:a instanceof vt}o(dn,"IsReadableStream");function pn(a){return a._reader!==void 0}o(pn,"IsReadableStreamLocked");function dr(a,s){if(a._disturbed=!0,a._state==="closed")return f(void 0);if(a._state==="errored")return m(a._storedError);mi(a);let d=a._reader;if(d!==void 0&&Un(d)){let A=d._readIntoRequests;d._readIntoRequests=new H,A.forEach(U=>{U._closeSteps(void 0)})}let v=a._readableStreamController[re](s);return T(v,e)}o(dr,"ReadableStreamCancel");function mi(a){a._state="closed";let s=a._reader;if(s!==void 0&&(ro(s),Y(s))){let d=s._readRequests;s._readRequests=new H,d.forEach(v=>{v._closeSteps()})}}o(mi,"ReadableStreamClose");function Uf(a,s){a._state="errored",a._storedError=s;let d=a._reader;d!==void 0&&(Ut(d,s),Y(d)?Ge(d,s):hf(d,s))}o(Uf,"ReadableStreamError");function Fn(a){return new TypeError(`ReadableStream.prototype.${a} can only be used on a ReadableStream`)}o(Fn,"streamBrandCheckException$1");function jf(a,s){Rt(a,s);let d=a?.highWaterMark;return _(d,"highWaterMark","QueuingStrategyInit"),{highWaterMark:S(d)}}o(jf,"convertQueuingStrategyInit");let Mf=o(a=>a.byteLength,"byteLengthSizeFunction");i(Mf,"size");class Na{static{o(this,"ByteLengthQueuingStrategy")}constructor(s){at(s,1,"ByteLengthQueuingStrategy"),s=jf(s,"First parameter"),this._byteLengthQueuingStrategyHighWaterMark=s.highWaterMark}get highWaterMark(){if(!Ff(this))throw Lf("highWaterMark");return this._byteLengthQueuingStrategyHighWaterMark}get size(){if(!Ff(this))throw Lf("size");return Mf}}Object.defineProperties(Na.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Na.prototype,Symbol.toStringTag,{value:"ByteLengthQueuingStrategy",configurable:!0});function Lf(a){return new TypeError(`ByteLengthQueuingStrategy.prototype.${a} can only be used on a ByteLengthQueuingStrategy`)}o(Lf,"byteLengthBrandCheckException");function Ff(a){return!r(a)||!Object.prototype.hasOwnProperty.call(a,"_byteLengthQueuingStrategyHighWaterMark")?!1:a instanceof Na}o(Ff,"IsByteLengthQueuingStrategy");let Bf=o(()=>1,"countSizeFunction");i(Bf,"size");class Da{static{o(this,"CountQueuingStrategy")}constructor(s){at(s,1,"CountQueuingStrategy"),s=jf(s,"First parameter"),this._countQueuingStrategyHighWaterMark=s.highWaterMark}get highWaterMark(){if(!Vf(this))throw qf("highWaterMark");return this._countQueuingStrategyHighWaterMark}get size(){if(!Vf(this))throw qf("size");return Bf}}Object.defineProperties(Da.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Da.prototype,Symbol.toStringTag,{value:"CountQueuingStrategy",configurable:!0});function qf(a){return new TypeError(`CountQueuingStrategy.prototype.${a} can only be used on a CountQueuingStrategy`)}o(qf,"countBrandCheckException");function Vf(a){return!r(a)||!Object.prototype.hasOwnProperty.call(a,"_countQueuingStrategyHighWaterMark")?!1:a instanceof Da}o(Vf,"IsCountQueuingStrategy");function yT(a,s){Rt(a,s);let d=a?.cancel,v=a?.flush,A=a?.readableType,U=a?.start,F=a?.transform,Q=a?.writableType;return{cancel:d===void 0?void 0:ET(d,a,`${s} has member 'cancel' that`),flush:v===void 0?void 0:_T(v,a,`${s} has member 'flush' that`),readableType:A,start:U===void 0?void 0:bT(U,a,`${s} has member 'start' that`),transform:F===void 0?void 0:vT(F,a,`${s} has member 'transform' that`),writableType:Q}}o(yT,"convertTransformer");function _T(a,s,d){return St(a,d),v=>q(a,s,[v])}o(_T,"convertTransformerFlushCallback");function bT(a,s,d){return St(a,d),v=>k(a,s,[v])}o(bT,"convertTransformerStartCallback");function vT(a,s,d){return St(a,d),(v,A)=>q(a,s,[v,A])}o(vT,"convertTransformerTransformCallback");function ET(a,s,d){return St(a,d),v=>q(a,s,[v])}o(ET,"convertTransformerCancelCallback");class Ua{static{o(this,"TransformStream")}constructor(s={},d={},v={}){s===void 0&&(s=null);let A=Ta(d,"Second parameter"),U=Ta(v,"Third parameter"),F=yT(s,"First parameter");if(F.readableType!==void 0)throw new RangeError("Invalid readableType specified");if(F.writableType!==void 0)throw new RangeError("Invalid writableType specified");let Q=ci(U,0),le=Sa(U),oe=ci(A,1),_e=Sa(A),Pe,Fe=p(pr=>{Pe=pr});PT(this,Fe,oe,_e,Q,le),TT(this,F),F.start!==void 0?Pe(F.start(this._transformStreamController)):Pe(void 0)}get readable(){if(!Hf(this))throw Jf("readable");return this._readable}get writable(){if(!Hf(this))throw Jf("writable");return this._writable}}Object.defineProperties(Ua.prototype,{readable:{enumerable:!0},writable:{enumerable:!0}}),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Ua.prototype,Symbol.toStringTag,{value:"TransformStream",configurable:!0});function PT(a,s,d,v,A,U){function F(){return s}o(F,"startAlgorithm");function Q(Fe){return AT(a,Fe)}o(Q,"writeAlgorithm");function le(Fe){return IT(a,Fe)}o(le,"abortAlgorithm");function oe(){return RT(a)}o(oe,"closeAlgorithm"),a._writable=xS(F,Q,oe,le,d,v);function _e(){return CT(a)}o(_e,"pullAlgorithm");function Pe(Fe){return OT(a,Fe)}o(Pe,"cancelAlgorithm"),a._readable=fi(F,_e,Pe,A,U),a._backpressure=void 0,a._backpressureChangePromise=void 0,a._backpressureChangePromise_resolve=void 0,ja(a,!0),a._transformStreamController=void 0}o(PT,"InitializeTransformStream");function Hf(a){return!r(a)||!Object.prototype.hasOwnProperty.call(a,"_transformStreamController")?!1:a instanceof Ua}o(Hf,"IsTransformStream");function Gf(a,s){lr(a._readable._readableStreamController,s),hc(a,s)}o(Gf,"TransformStreamError");function hc(a,s){La(a._transformStreamController),li(a._writable._writableStreamController,s),gc(a)}o(hc,"TransformStreamErrorWritableAndUnblockWrite");function gc(a){a._backpressure&&ja(a,!1)}o(gc,"TransformStreamUnblockWrite");function ja(a,s){a._backpressureChangePromise!==void 0&&a._backpressureChangePromise_resolve(),a._backpressureChangePromise=p(d=>{a._backpressureChangePromise_resolve=d}),a._backpressure=s}o(ja,"TransformStreamSetBackpressure");class fn{static{o(this,"TransformStreamDefaultController")}constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!Ma(this))throw Fa("desiredSize");let s=this._controlledTransformStream._readable._readableStreamController;return fc(s)}enqueue(s=void 0){if(!Ma(this))throw Fa("enqueue");Wf(this,s)}error(s=void 0){if(!Ma(this))throw Fa("error");wT(this,s)}terminate(){if(!Ma(this))throw Fa("terminate");xT(this)}}Object.defineProperties(fn.prototype,{enqueue:{enumerable:!0},error:{enumerable:!0},terminate:{enumerable:!0},desiredSize:{enumerable:!0}}),i(fn.prototype.enqueue,"enqueue"),i(fn.prototype.error,"error"),i(fn.prototype.terminate,"terminate"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(fn.prototype,Symbol.toStringTag,{value:"TransformStreamDefaultController",configurable:!0});function Ma(a){return!r(a)||!Object.prototype.hasOwnProperty.call(a,"_controlledTransformStream")?!1:a instanceof fn}o(Ma,"IsTransformStreamDefaultController");function ST(a,s,d,v,A){s._controlledTransformStream=a,a._transformStreamController=s,s._transformAlgorithm=d,s._flushAlgorithm=v,s._cancelAlgorithm=A,s._finishPromise=void 0,s._finishPromise_resolve=void 0,s._finishPromise_reject=void 0}o(ST,"SetUpTransformStreamDefaultController");function TT(a,s){let d=Object.create(fn.prototype),v,A,U;s.transform!==void 0?v=o(F=>s.transform(F,d),"transformAlgorithm"):v=o(F=>{try{return Wf(d,F),f(void 0)}catch(Q){return m(Q)}},"transformAlgorithm"),s.flush!==void 0?A=o(()=>s.flush(d),"flushAlgorithm"):A=o(()=>f(void 0),"flushAlgorithm"),s.cancel!==void 0?U=o(F=>s.cancel(F),"cancelAlgorithm"):U=o(()=>f(void 0),"cancelAlgorithm"),ST(a,d,v,A,U)}o(TT,"SetUpTransformStreamDefaultControllerFromTransformer");function La(a){a._transformAlgorithm=void 0,a._flushAlgorithm=void 0,a._cancelAlgorithm=void 0}o(La,"TransformStreamDefaultControllerClearAlgorithms");function Wf(a,s){let d=a._controlledTransformStream,v=d._readable._readableStreamController;if(!po(v))throw new TypeError("Readable side is not in a state that permits enqueue");try{lo(v,s)}catch(U){throw hc(d,U),d._readable._storedError}eT(v)!==d._backpressure&&ja(d,!0)}o(Wf,"TransformStreamDefaultControllerEnqueue");function wT(a,s){Gf(a._controlledTransformStream,s)}o(wT,"TransformStreamDefaultControllerError");function Zf(a,s){let d=a._transformAlgorithm(s);return T(d,void 0,v=>{throw Gf(a._controlledTransformStream,v),v})}o(Zf,"TransformStreamDefaultControllerPerformTransform");function xT(a){let s=a._controlledTransformStream,d=s._readable._readableStreamController;Ln(d);let v=new TypeError("TransformStream terminated");hc(s,v)}o(xT,"TransformStreamDefaultControllerTerminate");function AT(a,s){let d=a._transformStreamController;if(a._backpressure){let v=a._backpressureChangePromise;return T(v,()=>{let A=a._writable;if(A._state==="erroring")throw A._storedError;return Zf(d,s)})}return Zf(d,s)}o(AT,"TransformStreamDefaultSinkWriteAlgorithm");function IT(a,s){let d=a._transformStreamController;if(d._finishPromise!==void 0)return d._finishPromise;let v=a._readable;d._finishPromise=p((U,F)=>{d._finishPromise_resolve=U,d._finishPromise_reject=F});let A=d._cancelAlgorithm(s);return La(d),P(A,()=>(v._state==="errored"?fo(d,v._storedError):(lr(v._readableStreamController,s),yc(d)),null),U=>(lr(v._readableStreamController,U),fo(d,U),null)),d._finishPromise}o(IT,"TransformStreamDefaultSinkAbortAlgorithm");function RT(a){let s=a._transformStreamController;if(s._finishPromise!==void 0)return s._finishPromise;let d=a._readable;s._finishPromise=p((A,U)=>{s._finishPromise_resolve=A,s._finishPromise_reject=U});let v=s._flushAlgorithm();return La(s),P(v,()=>(d._state==="errored"?fo(s,d._storedError):(Ln(d._readableStreamController),yc(s)),null),A=>(lr(d._readableStreamController,A),fo(s,A),null)),s._finishPromise}o(RT,"TransformStreamDefaultSinkCloseAlgorithm");function CT(a){return ja(a,!1),a._backpressureChangePromise}o(CT,"TransformStreamDefaultSourcePullAlgorithm");function OT(a,s){let d=a._transformStreamController;if(d._finishPromise!==void 0)return d._finishPromise;let v=a._writable;d._finishPromise=p((U,F)=>{d._finishPromise_resolve=U,d._finishPromise_reject=F});let A=d._cancelAlgorithm(s);return La(d),P(A,()=>(v._state==="errored"?fo(d,v._storedError):(li(v._writableStreamController,s),gc(a),yc(d)),null),U=>(li(v._writableStreamController,U),gc(a),fo(d,U),null)),d._finishPromise}o(OT,"TransformStreamDefaultSourceCancelAlgorithm");function Fa(a){return new TypeError(`TransformStreamDefaultController.prototype.${a} can only be used on a TransformStreamDefaultController`)}o(Fa,"defaultControllerBrandCheckException");function yc(a){a._finishPromise_resolve!==void 0&&(a._finishPromise_resolve(),a._finishPromise_resolve=void 0,a._finishPromise_reject=void 0)}o(yc,"defaultControllerFinishPromiseResolve");function fo(a,s){a._finishPromise_reject!==void 0&&(E(a._finishPromise),a._finishPromise_reject(s),a._finishPromise_resolve=void 0,a._finishPromise_reject=void 0)}o(fo,"defaultControllerFinishPromiseReject");function Jf(a){return new TypeError(`TransformStream.prototype.${a} can only be used on a TransformStream`)}o(Jf,"streamBrandCheckException"),t.ByteLengthQueuingStrategy=Na,t.CountQueuingStrategy=Da,t.ReadableByteStreamController=qr,t.ReadableStream=vt,t.ReadableStreamBYOBReader=cn,t.ReadableStreamBYOBRequest=zn,t.ReadableStreamDefaultController=Hr,t.ReadableStreamDefaultReader=B,t.TransformStream=Ua,t.TransformStreamDefaultController=fn,t.WritableStream=ln,t.WritableStreamDefaultController=co,t.WritableStreamDefaultWriter=Vr}))});var Eb=L(()=>{if(!globalThis.ReadableStream)try{let t=require("node:process"),{emitWarning:e}=t;try{t.emitWarning=()=>{},Object.assign(globalThis,require("node:stream/web")),t.emitWarning=e}catch(r){throw t.emitWarning=e,r}}catch{Object.assign(globalThis,vb())}try{let{Blob:t}=require("buffer");t&&!t.prototype.stream&&(t.prototype.stream=o(function(r){let n=0,i=this;return new ReadableStream({type:"bytes",async pull(u){let l=await i.slice(n,Math.min(i.size,n+65536)).arrayBuffer();n+=l.byteLength,u.enqueue(new Uint8Array(l)),n===i.size&&u.close()}})},"name"))}catch{}});async function*Ml(t,e=!0){for(let r of t)if("stream"in r)yield*r.stream();else if(ArrayBuffer.isView(r))if(e){let n=r.byteOffset,i=r.byteOffset+r.byteLength;for(;n!==i;){let u=Math.min(i-n,Pb),c=r.buffer.slice(n,n+u);n+=c.byteLength,yield new Uint8Array(c)}}else yield r;else{let n=0,i=r;for(;n!==i.size;){let c=await i.slice(n,Math.min(i.size,n+Pb)).arrayBuffer();n+=c.byteLength,yield new Uint8Array(c)}}}var lZ,Pb,Sb,pC,gr,Fi=ct(()=>{lZ=yt(Eb(),1);Pb=65536;o(Ml,"toIterator");Sb=class Ll{static{o(this,"Blob")}#e=[];#t="";#r=0;#n="transparent";constructor(e=[],r={}){if(typeof e!="object"||e===null)throw new TypeError("Failed to construct 'Blob': The provided value cannot be converted to a sequence.");if(typeof e[Symbol.iterator]!="function")throw new TypeError("Failed to construct 'Blob': The object must have a callable @@iterator property.");if(typeof r!="object"&&typeof r!="function")throw new TypeError("Failed to construct 'Blob': parameter 2 cannot convert to dictionary.");r===null&&(r={});let n=new TextEncoder;for(let u of e){let c;ArrayBuffer.isView(u)?c=new Uint8Array(u.buffer.slice(u.byteOffset,u.byteOffset+u.byteLength)):u instanceof ArrayBuffer?c=new Uint8Array(u.slice(0)):u instanceof Ll?c=u:c=n.encode(`${u}`),this.#r+=ArrayBuffer.isView(c)?c.byteLength:c.size,this.#e.push(c)}this.#n=`${r.endings===void 0?"transparent":r.endings}`;let i=r.type===void 0?"":String(r.type);this.#t=/^[\x20-\x7E]*$/.test(i)?i:""}get size(){return this.#r}get type(){return this.#t}async text(){let e=new TextDecoder,r="";for await(let n of Ml(this.#e,!1))r+=e.decode(n,{stream:!0});return r+=e.decode(),r}async arrayBuffer(){let e=new Uint8Array(this.size),r=0;for await(let n of Ml(this.#e,!1))e.set(n,r),r+=n.length;return e.buffer}stream(){let e=Ml(this.#e,!0);return new globalThis.ReadableStream({type:"bytes",async pull(r){let n=await e.next();n.done?r.close():r.enqueue(n.value)},async cancel(){await e.return()}})}slice(e=0,r=this.size,n=""){let{size:i}=this,u=e<0?Math.max(i+e,0):Math.min(e,i),c=r<0?Math.max(i+r,0):Math.min(r,i),l=Math.max(c-u,0),p=this.#e,f=[],m=0;for(let P of p){if(m>=l)break;let h=ArrayBuffer.isView(P)?P.byteLength:P.size;if(u&&h<=u)u-=h,c-=h;else{let b;ArrayBuffer.isView(P)?(b=P.subarray(u,Math.min(h,c)),m+=b.byteLength):(b=P.slice(u,Math.min(h,c)),m+=b.size),c-=h,f.push(b),u=0}}let y=new Ll([],{type:String(n).toLowerCase()});return y.#r=l,y.#e=f,y}get[Symbol.toStringTag](){return"Blob"}static[Symbol.hasInstance](e){return e&&typeof e=="object"&&typeof e.constructor=="function"&&(typeof e.stream=="function"||typeof e.arrayBuffer=="function")&&/^(Blob|File)$/.test(e[Symbol.toStringTag])}};Object.defineProperties(Sb.prototype,{size:{enumerable:!0},type:{enumerable:!0},slice:{enumerable:!0}});pC=Sb,gr=pC});var fC,mC,An,Fl=ct(()=>{Fi();fC=class extends gr{static{o(this,"File")}#e=0;#t="";constructor(e,r,n={}){if(arguments.length<2)throw new TypeError(`Failed to construct 'File': 2 arguments required, but only ${arguments.length} present.`);super(e,n),n===null&&(n={});let i=n.lastModified===void 0?Date.now():Number(n.lastModified);Number.isNaN(i)||(this.#e=i),this.#t=String(r)}get name(){return this.#t}get lastModified(){return this.#e}get[Symbol.toStringTag](){return"File"}static[Symbol.hasInstance](e){return!!e&&e instanceof gr&&/^(File)$/.test(e[Symbol.toStringTag])}},mC=fC,An=mC});function xb(t,e=gr){var r=`${Tb()}${Tb()}`.replace(/\./g,"").slice(-28).padStart(32,"-"),n=[],i=`--${r}\r
15
- Content-Disposition: form-data; name="`;return t.forEach((u,c)=>typeof u=="string"?n.push(i+Bl(c)+`"\r
10
+ `);if(y===-1){Gp("have not received end of HTTP headers yet..."),i();return}let h=g.slice(0,y).toString("ascii").split(`\r
11
+ `),_=h.shift();if(!_)return e.destroy(),n(new Error("No header received from proxy CONNECT response"));let P=_.split(" "),x=+P[1],S=P.slice(2).join(" "),$={};for(let V of h){if(!V)continue;let W=V.indexOf(":");if(W===-1)return e.destroy(),n(new Error(`Invalid header from proxy CONNECT response: "${V}"`));let Z=V.slice(0,W).toLowerCase(),G=V.slice(W+1).trimStart(),te=$[Z];typeof te=="string"?$[Z]=[te,G]:Array.isArray(te)?te.push(G):$[Z]=G}Gp("got proxy server response: %o %o",_,$),s(),t({connect:{statusCode:x,statusText:S,headers:$},buffered:g})}a(p,"ondata"),e.on("error",d),e.on("end",u),i()})}a(f1,"parseProxyResponse");da.parseProxyResponse=f1});var vR=B(Rr=>{"use strict";var m1=Rr&&Rr.__createBinding||(Object.create?(function(e,t,n,o){o===void 0&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:a(function(){return t[n]},"get")}),Object.defineProperty(e,o,r)}):(function(e,t,n,o){o===void 0&&(o=n),e[o]=t[n]})),h1=Rr&&Rr.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),_R=Rr&&Rr.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&m1(t,e,n);return h1(t,e),t},bR=Rr&&Rr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Rr,"__esModule",{value:!0});Rr.HttpsProxyAgent=void 0;var Wp=_R(require("net")),hR=_R(require("tls")),g1=bR(require("assert")),y1=bR(Nb()),_1=fR(),b1=require("url"),v1=mR(),Lc=(0,y1.default)("https-proxy-agent"),gR=a(e=>e.servername===void 0&&e.host&&!Wp.isIP(e.host)?{...e,servername:e.host}:e,"setServernameFromNonIpHost"),Jp=class extends _1.Agent{static{a(this,"HttpsProxyAgent")}constructor(t,n){super(n),this.options={path:void 0},this.proxy=typeof t=="string"?new b1.URL(t):t,this.proxyHeaders=n?.headers??{},Lc("Creating new HttpsProxyAgent instance: %o",this.proxy.href);let o=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),r=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={ALPNProtocols:["http/1.1"],...n?yR(n,"headers"):null,host:o,port:r}}async connect(t,n){let{proxy:o}=this;if(!n.host)throw new TypeError('No "host" provided');let r;o.protocol==="https:"?(Lc("Creating `tls.Socket`: %o",this.connectOpts),r=hR.connect(gR(this.connectOpts))):(Lc("Creating `net.Socket`: %o",this.connectOpts),r=Wp.connect(this.connectOpts));let i=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders},s=Wp.isIPv6(n.host)?`[${n.host}]`:n.host,u=`CONNECT ${s}:${n.port} HTTP/1.1\r
12
+ `;if(o.username||o.password){let y=`${decodeURIComponent(o.username)}:${decodeURIComponent(o.password)}`;i["Proxy-Authorization"]=`Basic ${Buffer.from(y).toString("base64")}`}i.Host=`${s}:${n.port}`,i["Proxy-Connection"]||(i["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let y of Object.keys(i))u+=`${y}: ${i[y]}\r
13
+ `;let d=(0,v1.parseProxyResponse)(r);r.write(`${u}\r
14
+ `);let{connect:p,buffered:f}=await d;if(t.emit("proxyConnect",p),this.emit("proxyConnect",p,t),p.statusCode===200)return t.once("socket",E1),n.secureEndpoint?(Lc("Upgrading socket connection to TLS"),hR.connect({...yR(gR(n),"host","path","port"),socket:r})):r;r.destroy();let g=new Wp.Socket({writable:!1});return g.readable=!0,t.once("socket",y=>{Lc("Replaying proxy buffer for failed request"),(0,g1.default)(y.listenerCount("data")>0),y.push(f),y.push(null)}),g}};Jp.protocols=["http","https"];Rr.HttpsProxyAgent=Jp;function E1(e){e.resume()}a(E1,"resume");function yR(e,...t){let n={},o;for(o in e)t.includes(o)||(n[o]=e[o]);return n}a(yR,"omit")});function S1(e){if(!/^data:/i.test(e))throw new TypeError('`uri` does not appear to be a Data URI (must begin with "data:")');e=e.replace(/\r?\n/g,"");let t=e.indexOf(",");if(t===-1||t<=4)throw new TypeError("malformed data: URI");let n=e.substring(5,t).split(";"),o="",r=!1,i=n[0]||"text/plain",s=i;for(let f=1;f<n.length;f++)n[f]==="base64"?r=!0:n[f]&&(s+=`;${n[f]}`,n[f].indexOf("charset=")===0&&(o=n[f].substring(8)));!n[0]&&!o.length&&(s+=";charset=US-ASCII",o="US-ASCII");let u=r?"base64":"ascii",d=unescape(e.substring(t+1)),p=Buffer.from(d,u);return p.type=i,p.typeFull=s,p.charset=o,p}var ER,SR=_t(()=>{a(S1,"dataUriToBuffer");ER=S1});var xR=B((Kp,PR)=>{(function(e,t){typeof Kp=="object"&&typeof PR<"u"?t(Kp):typeof define=="function"&&define.amd?define(["exports"],t):(e=typeof globalThis<"u"?globalThis:e||self,t(e.WebStreamsPolyfill={}))})(Kp,(function(e){"use strict";function t(){}a(t,"noop");function n(c){return typeof c=="object"&&c!==null||typeof c=="function"}a(n,"typeIsObject");let o=t;function r(c,l){try{Object.defineProperty(c,"name",{value:l,configurable:!0})}catch{}}a(r,"setFunctionName");let i=Promise,s=Promise.prototype.then,u=Promise.reject.bind(i);function d(c){return new i(c)}a(d,"newPromise");function p(c){return d(l=>l(c))}a(p,"promiseResolvedWith");function f(c){return u(c)}a(f,"promiseRejectedWith");function g(c,l,m){return s.call(c,l,m)}a(g,"PerformPromiseThen");function y(c,l,m){g(g(c,l,m),void 0,o)}a(y,"uponPromise");function h(c,l){y(c,l)}a(h,"uponFulfillment");function _(c,l){y(c,void 0,l)}a(_,"uponRejection");function P(c,l,m){return g(c,l,m)}a(P,"transformPromiseWith");function x(c){g(c,void 0,o)}a(x,"setPromiseIsHandledToTrue");let S=a(c=>{if(typeof queueMicrotask=="function")S=queueMicrotask;else{let l=p(void 0);S=a(m=>g(l,m),"_queueMicrotask")}return S(c)},"_queueMicrotask");function $(c,l,m){if(typeof c!="function")throw new TypeError("Argument is not a function");return Function.prototype.apply.call(c,l,m)}a($,"reflectCall");function V(c,l,m){try{return p($(c,l,m))}catch(E){return f(E)}}a(V,"promiseCall");let W=16384;class Z{static{a(this,"SimpleQueue")}constructor(){this._cursor=0,this._size=0,this._front={_elements:[],_next:void 0},this._back=this._front,this._cursor=0,this._size=0}get length(){return this._size}push(l){let m=this._back,E=m;m._elements.length===W-1&&(E={_elements:[],_next:void 0}),m._elements.push(l),E!==m&&(this._back=E,m._next=E),++this._size}shift(){let l=this._front,m=l,E=this._cursor,I=E+1,j=l._elements,q=j[E];return I===W&&(m=l._next,I=0),--this._size,this._cursor=I,l!==m&&(this._front=m),j[E]=void 0,q}forEach(l){let m=this._cursor,E=this._front,I=E._elements;for(;(m!==I.length||E._next!==void 0)&&!(m===I.length&&(E=E._next,I=E._elements,m=0,I.length===0));)l(I[m]),++m}peek(){let l=this._front,m=this._cursor;return l._elements[m]}}let G=Symbol("[[AbortSteps]]"),te=Symbol("[[ErrorSteps]]"),ce=Symbol("[[CancelSteps]]"),Y=Symbol("[[PullSteps]]"),Ze=Symbol("[[ReleaseSteps]]");function we(c,l){c._ownerReadableStream=l,l._reader=c,l._state==="readable"?Ve(c):l._state==="closed"?ot(c):et(c,l._storedError)}a(we,"ReadableStreamReaderGenericInitialize");function Te(c,l){let m=c._ownerReadableStream;return Dr(m,l)}a(Te,"ReadableStreamReaderGenericCancel");function Me(c){let l=c._ownerReadableStream;l._state==="readable"?nr(c,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):Dt(c,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")),l._readableStreamController[Ze](),l._reader=void 0,c._ownerReadableStream=void 0}a(Me,"ReadableStreamReaderGenericRelease");function je(c){return new TypeError("Cannot "+c+" a stream using a released reader")}a(je,"readerLockException");function Ve(c){c._closedPromise=d((l,m)=>{c._closedPromise_resolve=l,c._closedPromise_reject=m})}a(Ve,"defaultReaderClosedPromiseInitialize");function et(c,l){Ve(c),nr(c,l)}a(et,"defaultReaderClosedPromiseInitializeAsRejected");function ot(c){Ve(c),ai(c)}a(ot,"defaultReaderClosedPromiseInitializeAsResolved");function nr(c,l){c._closedPromise_reject!==void 0&&(x(c._closedPromise),c._closedPromise_reject(l),c._closedPromise_resolve=void 0,c._closedPromise_reject=void 0)}a(nr,"defaultReaderClosedPromiseReject");function Dt(c,l){et(c,l)}a(Dt,"defaultReaderClosedPromiseResetToRejected");function ai(c){c._closedPromise_resolve!==void 0&&(c._closedPromise_resolve(void 0),c._closedPromise_resolve=void 0,c._closedPromise_reject=void 0)}a(ai,"defaultReaderClosedPromiseResolve");let Yr=Number.isFinite||function(c){return typeof c=="number"&&isFinite(c)},Na=Math.trunc||function(c){return c<0?Math.ceil(c):Math.floor(c)};function ee(c){return typeof c=="object"||typeof c=="function"}a(ee,"isDictionary");function Zt(c,l){if(c!==void 0&&!ee(c))throw new TypeError(`${l} is not an object.`)}a(Zt,"assertDictionary");function Ut(c,l){if(typeof c!="function")throw new TypeError(`${l} is not a function.`)}a(Ut,"assertFunction");function Da(c){return typeof c=="object"&&c!==null||typeof c=="function"}a(Da,"isObject");function jt(c,l){if(!Da(c))throw new TypeError(`${l} is not an object.`)}a(jt,"assertObject");function mt(c,l,m){if(c===void 0)throw new TypeError(`Parameter ${l} is required in '${m}'.`)}a(mt,"assertRequiredArgument");function v(c,l,m){if(c===void 0)throw new TypeError(`${l} is required in '${m}'.`)}a(v,"assertRequiredField");function T(c){return Number(c)}a(T,"convertUnrestrictedDouble");function w(c){return c===0?0:c}a(w,"censorNegativeZero");function D(c){return w(Na(c))}a(D,"integerPart");function O(c,l){let E=Number.MAX_SAFE_INTEGER,I=Number(c);if(I=w(I),!Yr(I))throw new TypeError(`${l} is not a finite number`);if(I=D(I),I<0||I>E)throw new TypeError(`${l} is outside the accepted range of 0 to ${E}, inclusive`);return!Yr(I)||I===0?0:I}a(O,"convertUnsignedLongLongWithEnforceRange");function z(c,l){if(!Fn(c))throw new TypeError(`${l} is not a ReadableStream.`)}a(z,"assertReadableStream");function M(c){return new H(c)}a(M,"AcquireReadableStreamDefaultReader");function R(c,l){c._reader._readRequests.push(l)}a(R,"ReadableStreamAddReadRequest");function C(c,l,m){let I=c._reader._readRequests.shift();m?I._closeSteps():I._chunkSteps(l)}a(C,"ReadableStreamFulfillReadRequest");function U(c){return c._reader._readRequests.length}a(U,"ReadableStreamGetNumReadRequests");function N(c){let l=c._reader;return!(l===void 0||!ie(l))}a(N,"ReadableStreamHasDefaultReader");class H{static{a(this,"ReadableStreamDefaultReader")}constructor(l){if(mt(l,1,"ReadableStreamDefaultReader"),z(l,"First parameter"),Bn(l))throw new TypeError("This stream has already been locked for exclusive reading by another reader");we(this,l),this._readRequests=new Z}get closed(){return ie(this)?this._closedPromise:f(rt("closed"))}cancel(l=void 0){return ie(this)?this._ownerReadableStream===void 0?f(je("cancel")):Te(this,l):f(rt("cancel"))}read(){if(!ie(this))return f(rt("read"));if(this._ownerReadableStream===void 0)return f(je("read from"));let l,m,E=d((j,q)=>{l=j,m=q});return se(this,{_chunkSteps:a(j=>l({value:j,done:!1}),"_chunkSteps"),_closeSteps:a(()=>l({value:void 0,done:!0}),"_closeSteps"),_errorSteps:a(j=>m(j),"_errorSteps")}),E}releaseLock(){if(!ie(this))throw rt("releaseLock");this._ownerReadableStream!==void 0&&Ne(this)}}Object.defineProperties(H.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),r(H.prototype.cancel,"cancel"),r(H.prototype.read,"read"),r(H.prototype.releaseLock,"releaseLock"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(H.prototype,Symbol.toStringTag,{value:"ReadableStreamDefaultReader",configurable:!0});function ie(c){return!n(c)||!Object.prototype.hasOwnProperty.call(c,"_readRequests")?!1:c instanceof H}a(ie,"IsReadableStreamDefaultReader");function se(c,l){let m=c._ownerReadableStream;m._disturbed=!0,m._state==="closed"?l._closeSteps():m._state==="errored"?l._errorSteps(m._storedError):m._readableStreamController[Y](l)}a(se,"ReadableStreamDefaultReaderRead");function Ne(c){Me(c);let l=new TypeError("Reader was released");tt(c,l)}a(Ne,"ReadableStreamDefaultReaderRelease");function tt(c,l){let m=c._readRequests;c._readRequests=new Z,m.forEach(E=>{E._errorSteps(l)})}a(tt,"ReadableStreamDefaultReaderErrorReadRequests");function rt(c){return new TypeError(`ReadableStreamDefaultReader.prototype.${c} can only be used on a ReadableStreamDefaultReader`)}a(rt,"defaultReaderBrandCheckException");let $e=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);class Fe{static{a(this,"ReadableStreamAsyncIteratorImpl")}constructor(l,m){this._ongoingPromise=void 0,this._isFinished=!1,this._reader=l,this._preventCancel=m}next(){let l=a(()=>this._nextSteps(),"nextSteps");return this._ongoingPromise=this._ongoingPromise?P(this._ongoingPromise,l,l):l(),this._ongoingPromise}return(l){let m=a(()=>this._returnSteps(l),"returnSteps");return this._ongoingPromise?P(this._ongoingPromise,m,m):m()}_nextSteps(){if(this._isFinished)return Promise.resolve({value:void 0,done:!0});let l=this._reader,m,E,I=d((q,oe)=>{m=q,E=oe});return se(l,{_chunkSteps:a(q=>{this._ongoingPromise=void 0,S(()=>m({value:q,done:!1}))},"_chunkSteps"),_closeSteps:a(()=>{this._ongoingPromise=void 0,this._isFinished=!0,Me(l),m({value:void 0,done:!0})},"_closeSteps"),_errorSteps:a(q=>{this._ongoingPromise=void 0,this._isFinished=!0,Me(l),E(q)},"_errorSteps")}),I}_returnSteps(l){if(this._isFinished)return Promise.resolve({value:l,done:!0});this._isFinished=!0;let m=this._reader;if(!this._preventCancel){let E=Te(m,l);return Me(m),P(E,()=>({value:l,done:!0}))}return Me(m),p({value:l,done:!0})}}let ht={next(){return ci(this)?this._asyncIteratorImpl.next():f(ui("next"))},return(c){return ci(this)?this._asyncIteratorImpl.return(c):f(ui("return"))}};Object.setPrototypeOf(ht,$e);function si(c,l){let m=M(c),E=new Fe(m,l),I=Object.create(ht);return I._asyncIteratorImpl=E,I}a(si,"AcquireReadableStreamAsyncIterator");function ci(c){if(!n(c)||!Object.prototype.hasOwnProperty.call(c,"_asyncIteratorImpl"))return!1;try{return c._asyncIteratorImpl instanceof Fe}catch{return!1}}a(ci,"IsReadableStreamAsyncIterator");function ui(c){return new TypeError(`ReadableStreamAsyncIterator.${c} can only be used on a ReadableSteamAsyncIterator`)}a(ui,"streamAsyncIteratorBrandCheckException");let or=Number.isNaN||function(c){return c!==c};var hn,Ct,gt;function He(c){return c.slice()}a(He,"CreateArrayFromList");function HE(c,l,m,E,I){new Uint8Array(c).set(new Uint8Array(m,E,I),l)}a(HE,"CopyDataBlockBytes");let gn=a(c=>(typeof c.transfer=="function"?gn=a(l=>l.transfer(),"TransferArrayBuffer"):typeof structuredClone=="function"?gn=a(l=>structuredClone(l,{transfer:[l]}),"TransferArrayBuffer"):gn=a(l=>l,"TransferArrayBuffer"),gn(c)),"TransferArrayBuffer"),Un=a(c=>(typeof c.detached=="boolean"?Un=a(l=>l.detached,"IsDetachedBuffer"):Un=a(l=>l.byteLength===0,"IsDetachedBuffer"),Un(c)),"IsDetachedBuffer");function GE(c,l,m){if(c.slice)return c.slice(l,m);let E=m-l,I=new ArrayBuffer(E);return HE(I,0,c,l,E),I}a(GE,"ArrayBufferSlice");function gu(c,l){let m=c[l];if(m!=null){if(typeof m!="function")throw new TypeError(`${String(l)} is not a function`);return m}}a(gu,"GetMethod");function t0(c){let l={[Symbol.iterator]:()=>c.iterator},m=(async function*(){return yield*l})(),E=m.next;return{iterator:m,nextMethod:E,done:!1}}a(t0,"CreateAsyncFromSyncIterator");let um=(gt=(hn=Symbol.asyncIterator)!==null&&hn!==void 0?hn:(Ct=Symbol.for)===null||Ct===void 0?void 0:Ct.call(Symbol,"Symbol.asyncIterator"))!==null&&gt!==void 0?gt:"@@asyncIterator";function WE(c,l="sync",m){if(m===void 0)if(l==="async"){if(m=gu(c,um),m===void 0){let j=gu(c,Symbol.iterator),q=WE(c,"sync",j);return t0(q)}}else m=gu(c,Symbol.iterator);if(m===void 0)throw new TypeError("The object is not iterable");let E=$(m,c,[]);if(!n(E))throw new TypeError("The iterator method must return an object");let I=E.next;return{iterator:E,nextMethod:I,done:!1}}a(WE,"GetIterator");function r0(c){let l=$(c.nextMethod,c.iterator,[]);if(!n(l))throw new TypeError("The iterator.next() method must return an object");return l}a(r0,"IteratorNext");function n0(c){return!!c.done}a(n0,"IteratorComplete");function o0(c){return c.value}a(o0,"IteratorValue");function i0(c){return!(typeof c!="number"||or(c)||c<0)}a(i0,"IsNonNegativeNumber");function JE(c){let l=GE(c.buffer,c.byteOffset,c.byteOffset+c.byteLength);return new Uint8Array(l)}a(JE,"CloneAsUint8Array");function lm(c){let l=c._queue.shift();return c._queueTotalSize-=l.size,c._queueTotalSize<0&&(c._queueTotalSize=0),l.value}a(lm,"DequeueValue");function dm(c,l,m){if(!i0(m)||m===1/0)throw new RangeError("Size must be a finite, non-NaN, non-negative number.");c._queue.push({value:l,size:m}),c._queueTotalSize+=m}a(dm,"EnqueueValueWithSize");function a0(c){return c._queue.peek().value}a(a0,"PeekQueueValue");function jn(c){c._queue=new Z,c._queueTotalSize=0}a(jn,"ResetQueue");function KE(c){return c===DataView}a(KE,"isDataViewConstructor");function s0(c){return KE(c.constructor)}a(s0,"isDataView");function c0(c){return KE(c)?1:c.BYTES_PER_ELEMENT}a(c0,"arrayBufferViewElementSize");class _o{static{a(this,"ReadableStreamBYOBRequest")}constructor(){throw new TypeError("Illegal constructor")}get view(){if(!pm(this))throw ym("view");return this._view}respond(l){if(!pm(this))throw ym("respond");if(mt(l,1,"respond"),l=O(l,"First parameter"),this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");if(Un(this._view.buffer))throw new TypeError("The BYOB request's buffer has been detached and so cannot be used as a response");vu(this._associatedReadableByteStreamController,l)}respondWithNewView(l){if(!pm(this))throw ym("respondWithNewView");if(mt(l,1,"respondWithNewView"),!ArrayBuffer.isView(l))throw new TypeError("You can only respond with array buffer views");if(this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");if(Un(l.buffer))throw new TypeError("The given view's buffer has been detached and so cannot be used as a response");Eu(this._associatedReadableByteStreamController,l)}}Object.defineProperties(_o.prototype,{respond:{enumerable:!0},respondWithNewView:{enumerable:!0},view:{enumerable:!0}}),r(_o.prototype.respond,"respond"),r(_o.prototype.respondWithNewView,"respondWithNewView"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(_o.prototype,Symbol.toStringTag,{value:"ReadableStreamBYOBRequest",configurable:!0});class yn{static{a(this,"ReadableByteStreamController")}constructor(){throw new TypeError("Illegal constructor")}get byobRequest(){if(!bo(this))throw ja("byobRequest");return gm(this)}get desiredSize(){if(!bo(this))throw ja("desiredSize");return aS(this)}close(){if(!bo(this))throw ja("close");if(this._closeRequested)throw new TypeError("The stream has already been closed; do not close it again!");let l=this._controlledReadableByteStream._state;if(l!=="readable")throw new TypeError(`The stream (in ${l} state) is not in the readable state and cannot be closed`);Ua(this)}enqueue(l){if(!bo(this))throw ja("enqueue");if(mt(l,1,"enqueue"),!ArrayBuffer.isView(l))throw new TypeError("chunk must be an array buffer view");if(l.byteLength===0)throw new TypeError("chunk must have non-zero byteLength");if(l.buffer.byteLength===0)throw new TypeError("chunk's buffer must have non-zero byteLength");if(this._closeRequested)throw new TypeError("stream is closed or draining");let m=this._controlledReadableByteStream._state;if(m!=="readable")throw new TypeError(`The stream (in ${m} state) is not in the readable state and cannot be enqueued to`);bu(this,l)}error(l=void 0){if(!bo(this))throw ja("error");Sr(this,l)}[ce](l){XE(this),jn(this);let m=this._cancelAlgorithm(l);return _u(this),m}[Y](l){let m=this._controlledReadableByteStream;if(this._queueTotalSize>0){iS(this,l);return}let E=this._autoAllocateChunkSize;if(E!==void 0){let I;try{I=new ArrayBuffer(E)}catch(q){l._errorSteps(q);return}let j={buffer:I,bufferByteLength:E,byteOffset:0,byteLength:E,bytesFilled:0,minimumFill:1,elementSize:1,viewConstructor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(j)}R(m,l),vo(this)}[Ze](){if(this._pendingPullIntos.length>0){let l=this._pendingPullIntos.peek();l.readerType="none",this._pendingPullIntos=new Z,this._pendingPullIntos.push(l)}}}Object.defineProperties(yn.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},byobRequest:{enumerable:!0},desiredSize:{enumerable:!0}}),r(yn.prototype.close,"close"),r(yn.prototype.enqueue,"enqueue"),r(yn.prototype.error,"error"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(yn.prototype,Symbol.toStringTag,{value:"ReadableByteStreamController",configurable:!0});function bo(c){return!n(c)||!Object.prototype.hasOwnProperty.call(c,"_controlledReadableByteStream")?!1:c instanceof yn}a(bo,"IsReadableByteStreamController");function pm(c){return!n(c)||!Object.prototype.hasOwnProperty.call(c,"_associatedReadableByteStreamController")?!1:c instanceof _o}a(pm,"IsReadableStreamBYOBRequest");function vo(c){if(!f0(c))return;if(c._pulling){c._pullAgain=!0;return}c._pulling=!0;let m=c._pullAlgorithm();y(m,()=>(c._pulling=!1,c._pullAgain&&(c._pullAgain=!1,vo(c)),null),E=>(Sr(c,E),null))}a(vo,"ReadableByteStreamControllerCallPullIfNeeded");function XE(c){mm(c),c._pendingPullIntos=new Z}a(XE,"ReadableByteStreamControllerClearPendingPullIntos");function fm(c,l){let m=!1;c._state==="closed"&&(m=!0);let E=QE(l);l.readerType==="default"?C(c,E,m):b0(c,E,m)}a(fm,"ReadableByteStreamControllerCommitPullIntoDescriptor");function QE(c){let l=c.bytesFilled,m=c.elementSize;return new c.viewConstructor(c.buffer,c.byteOffset,l/m)}a(QE,"ReadableByteStreamControllerConvertPullIntoDescriptor");function yu(c,l,m,E){c._queue.push({buffer:l,byteOffset:m,byteLength:E}),c._queueTotalSize+=E}a(yu,"ReadableByteStreamControllerEnqueueChunkToQueue");function YE(c,l,m,E){let I;try{I=GE(l,m,m+E)}catch(j){throw Sr(c,j),j}yu(c,I,0,E)}a(YE,"ReadableByteStreamControllerEnqueueClonedChunkToQueue");function eS(c,l){l.bytesFilled>0&&YE(c,l.buffer,l.byteOffset,l.bytesFilled),li(c)}a(eS,"ReadableByteStreamControllerEnqueueDetachedPullIntoToQueue");function tS(c,l){let m=Math.min(c._queueTotalSize,l.byteLength-l.bytesFilled),E=l.bytesFilled+m,I=m,j=!1,q=E%l.elementSize,oe=E-q;oe>=l.minimumFill&&(I=oe-l.bytesFilled,j=!0);let ye=c._queue;for(;I>0;){let ue=ye.peek(),Ee=Math.min(I,ue.byteLength),Ae=l.byteOffset+l.bytesFilled;HE(l.buffer,Ae,ue.buffer,ue.byteOffset,Ee),ue.byteLength===Ee?ye.shift():(ue.byteOffset+=Ee,ue.byteLength-=Ee),c._queueTotalSize-=Ee,rS(c,Ee,l),I-=Ee}return j}a(tS,"ReadableByteStreamControllerFillPullIntoDescriptorFromQueue");function rS(c,l,m){m.bytesFilled+=l}a(rS,"ReadableByteStreamControllerFillHeadPullIntoDescriptor");function nS(c){c._queueTotalSize===0&&c._closeRequested?(_u(c),Va(c._controlledReadableByteStream)):vo(c)}a(nS,"ReadableByteStreamControllerHandleQueueDrain");function mm(c){c._byobRequest!==null&&(c._byobRequest._associatedReadableByteStreamController=void 0,c._byobRequest._view=null,c._byobRequest=null)}a(mm,"ReadableByteStreamControllerInvalidateBYOBRequest");function hm(c){for(;c._pendingPullIntos.length>0;){if(c._queueTotalSize===0)return;let l=c._pendingPullIntos.peek();tS(c,l)&&(li(c),fm(c._controlledReadableByteStream,l))}}a(hm,"ReadableByteStreamControllerProcessPullIntoDescriptorsUsingQueue");function u0(c){let l=c._controlledReadableByteStream._reader;for(;l._readRequests.length>0;){if(c._queueTotalSize===0)return;let m=l._readRequests.shift();iS(c,m)}}a(u0,"ReadableByteStreamControllerProcessReadRequestsUsingQueue");function l0(c,l,m,E){let I=c._controlledReadableByteStream,j=l.constructor,q=c0(j),{byteOffset:oe,byteLength:ye}=l,ue=m*q,Ee;try{Ee=gn(l.buffer)}catch(Ke){E._errorSteps(Ke);return}let Ae={buffer:Ee,bufferByteLength:Ee.byteLength,byteOffset:oe,byteLength:ye,bytesFilled:0,minimumFill:ue,elementSize:q,viewConstructor:j,readerType:"byob"};if(c._pendingPullIntos.length>0){c._pendingPullIntos.push(Ae),uS(I,E);return}if(I._state==="closed"){let Ke=new j(Ae.buffer,Ae.byteOffset,0);E._closeSteps(Ke);return}if(c._queueTotalSize>0){if(tS(c,Ae)){let Ke=QE(Ae);nS(c),E._chunkSteps(Ke);return}if(c._closeRequested){let Ke=new TypeError("Insufficient bytes to fill elements in the given buffer");Sr(c,Ke),E._errorSteps(Ke);return}}c._pendingPullIntos.push(Ae),uS(I,E),vo(c)}a(l0,"ReadableByteStreamControllerPullInto");function d0(c,l){l.readerType==="none"&&li(c);let m=c._controlledReadableByteStream;if(_m(m))for(;lS(m)>0;){let E=li(c);fm(m,E)}}a(d0,"ReadableByteStreamControllerRespondInClosedState");function p0(c,l,m){if(rS(c,l,m),m.readerType==="none"){eS(c,m),hm(c);return}if(m.bytesFilled<m.minimumFill)return;li(c);let E=m.bytesFilled%m.elementSize;if(E>0){let I=m.byteOffset+m.bytesFilled;YE(c,m.buffer,I-E,E)}m.bytesFilled-=E,fm(c._controlledReadableByteStream,m),hm(c)}a(p0,"ReadableByteStreamControllerRespondInReadableState");function oS(c,l){let m=c._pendingPullIntos.peek();mm(c),c._controlledReadableByteStream._state==="closed"?d0(c,m):p0(c,l,m),vo(c)}a(oS,"ReadableByteStreamControllerRespondInternal");function li(c){return c._pendingPullIntos.shift()}a(li,"ReadableByteStreamControllerShiftPendingPullInto");function f0(c){let l=c._controlledReadableByteStream;return l._state!=="readable"||c._closeRequested||!c._started?!1:!!(N(l)&&U(l)>0||_m(l)&&lS(l)>0||aS(c)>0)}a(f0,"ReadableByteStreamControllerShouldCallPull");function _u(c){c._pullAlgorithm=void 0,c._cancelAlgorithm=void 0}a(_u,"ReadableByteStreamControllerClearAlgorithms");function Ua(c){let l=c._controlledReadableByteStream;if(!(c._closeRequested||l._state!=="readable")){if(c._queueTotalSize>0){c._closeRequested=!0;return}if(c._pendingPullIntos.length>0){let m=c._pendingPullIntos.peek();if(m.bytesFilled%m.elementSize!==0){let E=new TypeError("Insufficient bytes to fill elements in the given buffer");throw Sr(c,E),E}}_u(c),Va(l)}}a(Ua,"ReadableByteStreamControllerClose");function bu(c,l){let m=c._controlledReadableByteStream;if(c._closeRequested||m._state!=="readable")return;let{buffer:E,byteOffset:I,byteLength:j}=l;if(Un(E))throw new TypeError("chunk's buffer is detached and so cannot be enqueued");let q=gn(E);if(c._pendingPullIntos.length>0){let oe=c._pendingPullIntos.peek();if(Un(oe.buffer))throw new TypeError("The BYOB request's buffer has been detached and so cannot be filled with an enqueued chunk");mm(c),oe.buffer=gn(oe.buffer),oe.readerType==="none"&&eS(c,oe)}if(N(m))if(u0(c),U(m)===0)yu(c,q,I,j);else{c._pendingPullIntos.length>0&&li(c);let oe=new Uint8Array(q,I,j);C(m,oe,!1)}else _m(m)?(yu(c,q,I,j),hm(c)):yu(c,q,I,j);vo(c)}a(bu,"ReadableByteStreamControllerEnqueue");function Sr(c,l){let m=c._controlledReadableByteStream;m._state==="readable"&&(XE(c),jn(c),_u(c),zS(m,l))}a(Sr,"ReadableByteStreamControllerError");function iS(c,l){let m=c._queue.shift();c._queueTotalSize-=m.byteLength,nS(c);let E=new Uint8Array(m.buffer,m.byteOffset,m.byteLength);l._chunkSteps(E)}a(iS,"ReadableByteStreamControllerFillReadRequestFromQueue");function gm(c){if(c._byobRequest===null&&c._pendingPullIntos.length>0){let l=c._pendingPullIntos.peek(),m=new Uint8Array(l.buffer,l.byteOffset+l.bytesFilled,l.byteLength-l.bytesFilled),E=Object.create(_o.prototype);h0(E,c,m),c._byobRequest=E}return c._byobRequest}a(gm,"ReadableByteStreamControllerGetBYOBRequest");function aS(c){let l=c._controlledReadableByteStream._state;return l==="errored"?null:l==="closed"?0:c._strategyHWM-c._queueTotalSize}a(aS,"ReadableByteStreamControllerGetDesiredSize");function vu(c,l){let m=c._pendingPullIntos.peek();if(c._controlledReadableByteStream._state==="closed"){if(l!==0)throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream")}else{if(l===0)throw new TypeError("bytesWritten must be greater than 0 when calling respond() on a readable stream");if(m.bytesFilled+l>m.byteLength)throw new RangeError("bytesWritten out of range")}m.buffer=gn(m.buffer),oS(c,l)}a(vu,"ReadableByteStreamControllerRespond");function Eu(c,l){let m=c._pendingPullIntos.peek();if(c._controlledReadableByteStream._state==="closed"){if(l.byteLength!==0)throw new TypeError("The view's length must be 0 when calling respondWithNewView() on a closed stream")}else if(l.byteLength===0)throw new TypeError("The view's length must be greater than 0 when calling respondWithNewView() on a readable stream");if(m.byteOffset+m.bytesFilled!==l.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(m.bufferByteLength!==l.buffer.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");if(m.bytesFilled+l.byteLength>m.byteLength)throw new RangeError("The region specified by view is larger than byobRequest");let I=l.byteLength;m.buffer=gn(l.buffer),oS(c,I)}a(Eu,"ReadableByteStreamControllerRespondWithNewView");function sS(c,l,m,E,I,j,q){l._controlledReadableByteStream=c,l._pullAgain=!1,l._pulling=!1,l._byobRequest=null,l._queue=l._queueTotalSize=void 0,jn(l),l._closeRequested=!1,l._started=!1,l._strategyHWM=j,l._pullAlgorithm=E,l._cancelAlgorithm=I,l._autoAllocateChunkSize=q,l._pendingPullIntos=new Z,c._readableStreamController=l;let oe=m();y(p(oe),()=>(l._started=!0,vo(l),null),ye=>(Sr(l,ye),null))}a(sS,"SetUpReadableByteStreamController");function m0(c,l,m){let E=Object.create(yn.prototype),I,j,q;l.start!==void 0?I=a(()=>l.start(E),"startAlgorithm"):I=a(()=>{},"startAlgorithm"),l.pull!==void 0?j=a(()=>l.pull(E),"pullAlgorithm"):j=a(()=>p(void 0),"pullAlgorithm"),l.cancel!==void 0?q=a(ye=>l.cancel(ye),"cancelAlgorithm"):q=a(()=>p(void 0),"cancelAlgorithm");let oe=l.autoAllocateChunkSize;if(oe===0)throw new TypeError("autoAllocateChunkSize must be greater than 0");sS(c,E,I,j,q,m,oe)}a(m0,"SetUpReadableByteStreamControllerFromUnderlyingSource");function h0(c,l,m){c._associatedReadableByteStreamController=l,c._view=m}a(h0,"SetUpReadableStreamBYOBRequest");function ym(c){return new TypeError(`ReadableStreamBYOBRequest.prototype.${c} can only be used on a ReadableStreamBYOBRequest`)}a(ym,"byobRequestBrandCheckException");function ja(c){return new TypeError(`ReadableByteStreamController.prototype.${c} can only be used on a ReadableByteStreamController`)}a(ja,"byteStreamControllerBrandCheckException");function g0(c,l){Zt(c,l);let m=c?.mode;return{mode:m===void 0?void 0:y0(m,`${l} has member 'mode' that`)}}a(g0,"convertReaderOptions");function y0(c,l){if(c=`${c}`,c!=="byob")throw new TypeError(`${l} '${c}' is not a valid enumeration value for ReadableStreamReaderMode`);return c}a(y0,"convertReadableStreamReaderMode");function _0(c,l){var m;Zt(c,l);let E=(m=c?.min)!==null&&m!==void 0?m:1;return{min:O(E,`${l} has member 'min' that`)}}a(_0,"convertByobReadOptions");function cS(c){return new Mn(c)}a(cS,"AcquireReadableStreamBYOBReader");function uS(c,l){c._reader._readIntoRequests.push(l)}a(uS,"ReadableStreamAddReadIntoRequest");function b0(c,l,m){let I=c._reader._readIntoRequests.shift();m?I._closeSteps(l):I._chunkSteps(l)}a(b0,"ReadableStreamFulfillReadIntoRequest");function lS(c){return c._reader._readIntoRequests.length}a(lS,"ReadableStreamGetNumReadIntoRequests");function _m(c){let l=c._reader;return!(l===void 0||!Eo(l))}a(_m,"ReadableStreamHasBYOBReader");class Mn{static{a(this,"ReadableStreamBYOBReader")}constructor(l){if(mt(l,1,"ReadableStreamBYOBReader"),z(l,"First parameter"),Bn(l))throw new TypeError("This stream has already been locked for exclusive reading by another reader");if(!bo(l._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");we(this,l),this._readIntoRequests=new Z}get closed(){return Eo(this)?this._closedPromise:f(Su("closed"))}cancel(l=void 0){return Eo(this)?this._ownerReadableStream===void 0?f(je("cancel")):Te(this,l):f(Su("cancel"))}read(l,m={}){if(!Eo(this))return f(Su("read"));if(!ArrayBuffer.isView(l))return f(new TypeError("view must be an array buffer view"));if(l.byteLength===0)return f(new TypeError("view must have non-zero byteLength"));if(l.buffer.byteLength===0)return f(new TypeError("view's buffer must have non-zero byteLength"));if(Un(l.buffer))return f(new TypeError("view's buffer has been detached"));let E;try{E=_0(m,"options")}catch(ue){return f(ue)}let I=E.min;if(I===0)return f(new TypeError("options.min must be greater than 0"));if(s0(l)){if(I>l.byteLength)return f(new RangeError("options.min must be less than or equal to view's byteLength"))}else if(I>l.length)return f(new RangeError("options.min must be less than or equal to view's length"));if(this._ownerReadableStream===void 0)return f(je("read from"));let j,q,oe=d((ue,Ee)=>{j=ue,q=Ee});return dS(this,l,I,{_chunkSteps:a(ue=>j({value:ue,done:!1}),"_chunkSteps"),_closeSteps:a(ue=>j({value:ue,done:!0}),"_closeSteps"),_errorSteps:a(ue=>q(ue),"_errorSteps")}),oe}releaseLock(){if(!Eo(this))throw Su("releaseLock");this._ownerReadableStream!==void 0&&v0(this)}}Object.defineProperties(Mn.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),r(Mn.prototype.cancel,"cancel"),r(Mn.prototype.read,"read"),r(Mn.prototype.releaseLock,"releaseLock"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Mn.prototype,Symbol.toStringTag,{value:"ReadableStreamBYOBReader",configurable:!0});function Eo(c){return!n(c)||!Object.prototype.hasOwnProperty.call(c,"_readIntoRequests")?!1:c instanceof Mn}a(Eo,"IsReadableStreamBYOBReader");function dS(c,l,m,E){let I=c._ownerReadableStream;I._disturbed=!0,I._state==="errored"?E._errorSteps(I._storedError):l0(I._readableStreamController,l,m,E)}a(dS,"ReadableStreamBYOBReaderRead");function v0(c){Me(c);let l=new TypeError("Reader was released");pS(c,l)}a(v0,"ReadableStreamBYOBReaderRelease");function pS(c,l){let m=c._readIntoRequests;c._readIntoRequests=new Z,m.forEach(E=>{E._errorSteps(l)})}a(pS,"ReadableStreamBYOBReaderErrorReadIntoRequests");function Su(c){return new TypeError(`ReadableStreamBYOBReader.prototype.${c} can only be used on a ReadableStreamBYOBReader`)}a(Su,"byobReaderBrandCheckException");function Ma(c,l){let{highWaterMark:m}=c;if(m===void 0)return l;if(or(m)||m<0)throw new RangeError("Invalid highWaterMark");return m}a(Ma,"ExtractHighWaterMark");function Pu(c){let{size:l}=c;return l||(()=>1)}a(Pu,"ExtractSizeAlgorithm");function xu(c,l){Zt(c,l);let m=c?.highWaterMark,E=c?.size;return{highWaterMark:m===void 0?void 0:T(m),size:E===void 0?void 0:E0(E,`${l} has member 'size' that`)}}a(xu,"convertQueuingStrategy");function E0(c,l){return Ut(c,l),m=>T(c(m))}a(E0,"convertQueuingStrategySize");function S0(c,l){Zt(c,l);let m=c?.abort,E=c?.close,I=c?.start,j=c?.type,q=c?.write;return{abort:m===void 0?void 0:P0(m,c,`${l} has member 'abort' that`),close:E===void 0?void 0:x0(E,c,`${l} has member 'close' that`),start:I===void 0?void 0:T0(I,c,`${l} has member 'start' that`),write:q===void 0?void 0:w0(q,c,`${l} has member 'write' that`),type:j}}a(S0,"convertUnderlyingSink");function P0(c,l,m){return Ut(c,m),E=>V(c,l,[E])}a(P0,"convertUnderlyingSinkAbortCallback");function x0(c,l,m){return Ut(c,m),()=>V(c,l,[])}a(x0,"convertUnderlyingSinkCloseCallback");function T0(c,l,m){return Ut(c,m),E=>$(c,l,[E])}a(T0,"convertUnderlyingSinkStartCallback");function w0(c,l,m){return Ut(c,m),(E,I)=>V(c,l,[E,I])}a(w0,"convertUnderlyingSinkWriteCallback");function fS(c,l){if(!di(c))throw new TypeError(`${l} is not a WritableStream.`)}a(fS,"assertWritableStream");function A0(c){if(typeof c!="object"||c===null)return!1;try{return typeof c.aborted=="boolean"}catch{return!1}}a(A0,"isAbortSignal");let I0=typeof AbortController=="function";function R0(){if(I0)return new AbortController}a(R0,"createAbortController");class Ln{static{a(this,"WritableStream")}constructor(l={},m={}){l===void 0?l=null:jt(l,"First parameter");let E=xu(m,"Second parameter"),I=S0(l,"First parameter");if(hS(this),I.type!==void 0)throw new RangeError("Invalid type is specified");let q=Pu(E),oe=Ma(E,1);q0(this,I,oe,q)}get locked(){if(!di(this))throw Ru("locked");return pi(this)}abort(l=void 0){return di(this)?pi(this)?f(new TypeError("Cannot abort a stream that already has a writer")):Tu(this,l):f(Ru("abort"))}close(){return di(this)?pi(this)?f(new TypeError("Cannot close a stream that already has a writer")):en(this)?f(new TypeError("Cannot close an already-closing stream")):gS(this):f(Ru("close"))}getWriter(){if(!di(this))throw Ru("getWriter");return mS(this)}}Object.defineProperties(Ln.prototype,{abort:{enumerable:!0},close:{enumerable:!0},getWriter:{enumerable:!0},locked:{enumerable:!0}}),r(Ln.prototype.abort,"abort"),r(Ln.prototype.close,"close"),r(Ln.prototype.getWriter,"getWriter"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Ln.prototype,Symbol.toStringTag,{value:"WritableStream",configurable:!0});function mS(c){return new _n(c)}a(mS,"AcquireWritableStreamDefaultWriter");function O0(c,l,m,E,I=1,j=()=>1){let q=Object.create(Ln.prototype);hS(q);let oe=Object.create(fi.prototype);return SS(q,oe,c,l,m,E,I,j),q}a(O0,"CreateWritableStream");function hS(c){c._state="writable",c._storedError=void 0,c._writer=void 0,c._writableStreamController=void 0,c._writeRequests=new Z,c._inFlightWriteRequest=void 0,c._closeRequest=void 0,c._inFlightCloseRequest=void 0,c._pendingAbortRequest=void 0,c._backpressure=!1}a(hS,"InitializeWritableStream");function di(c){return!n(c)||!Object.prototype.hasOwnProperty.call(c,"_writableStreamController")?!1:c instanceof Ln}a(di,"IsWritableStream");function pi(c){return c._writer!==void 0}a(pi,"IsWritableStreamLocked");function Tu(c,l){var m;if(c._state==="closed"||c._state==="errored")return p(void 0);c._writableStreamController._abortReason=l,(m=c._writableStreamController._abortController)===null||m===void 0||m.abort(l);let E=c._state;if(E==="closed"||E==="errored")return p(void 0);if(c._pendingAbortRequest!==void 0)return c._pendingAbortRequest._promise;let I=!1;E==="erroring"&&(I=!0,l=void 0);let j=d((q,oe)=>{c._pendingAbortRequest={_promise:void 0,_resolve:q,_reject:oe,_reason:l,_wasAlreadyErroring:I}});return c._pendingAbortRequest._promise=j,I||vm(c,l),j}a(Tu,"WritableStreamAbort");function gS(c){let l=c._state;if(l==="closed"||l==="errored")return f(new TypeError(`The stream (in ${l} state) is not in the writable state and cannot be closed`));let m=d((I,j)=>{let q={_resolve:I,_reject:j};c._closeRequest=q}),E=c._writer;return E!==void 0&&c._backpressure&&l==="writable"&&Im(E),V0(c._writableStreamController),m}a(gS,"WritableStreamClose");function k0(c){return d((m,E)=>{let I={_resolve:m,_reject:E};c._writeRequests.push(I)})}a(k0,"WritableStreamAddWriteRequest");function bm(c,l){if(c._state==="writable"){vm(c,l);return}Em(c)}a(bm,"WritableStreamDealWithRejection");function vm(c,l){let m=c._writableStreamController;c._state="erroring",c._storedError=l;let E=c._writer;E!==void 0&&_S(E,l),!D0(c)&&m._started&&Em(c)}a(vm,"WritableStreamStartErroring");function Em(c){c._state="errored",c._writableStreamController[te]();let l=c._storedError;if(c._writeRequests.forEach(I=>{I._reject(l)}),c._writeRequests=new Z,c._pendingAbortRequest===void 0){wu(c);return}let m=c._pendingAbortRequest;if(c._pendingAbortRequest=void 0,m._wasAlreadyErroring){m._reject(l),wu(c);return}let E=c._writableStreamController[G](m._reason);y(E,()=>(m._resolve(),wu(c),null),I=>(m._reject(I),wu(c),null))}a(Em,"WritableStreamFinishErroring");function C0(c){c._inFlightWriteRequest._resolve(void 0),c._inFlightWriteRequest=void 0}a(C0,"WritableStreamFinishInFlightWrite");function $0(c,l){c._inFlightWriteRequest._reject(l),c._inFlightWriteRequest=void 0,bm(c,l)}a($0,"WritableStreamFinishInFlightWriteWithError");function z0(c){c._inFlightCloseRequest._resolve(void 0),c._inFlightCloseRequest=void 0,c._state==="erroring"&&(c._storedError=void 0,c._pendingAbortRequest!==void 0&&(c._pendingAbortRequest._resolve(),c._pendingAbortRequest=void 0)),c._state="closed";let m=c._writer;m!==void 0&&wS(m)}a(z0,"WritableStreamFinishInFlightClose");function N0(c,l){c._inFlightCloseRequest._reject(l),c._inFlightCloseRequest=void 0,c._pendingAbortRequest!==void 0&&(c._pendingAbortRequest._reject(l),c._pendingAbortRequest=void 0),bm(c,l)}a(N0,"WritableStreamFinishInFlightCloseWithError");function en(c){return!(c._closeRequest===void 0&&c._inFlightCloseRequest===void 0)}a(en,"WritableStreamCloseQueuedOrInFlight");function D0(c){return!(c._inFlightWriteRequest===void 0&&c._inFlightCloseRequest===void 0)}a(D0,"WritableStreamHasOperationMarkedInFlight");function U0(c){c._inFlightCloseRequest=c._closeRequest,c._closeRequest=void 0}a(U0,"WritableStreamMarkCloseRequestInFlight");function j0(c){c._inFlightWriteRequest=c._writeRequests.shift()}a(j0,"WritableStreamMarkFirstWriteRequestInFlight");function wu(c){c._closeRequest!==void 0&&(c._closeRequest._reject(c._storedError),c._closeRequest=void 0);let l=c._writer;l!==void 0&&wm(l,c._storedError)}a(wu,"WritableStreamRejectCloseAndClosedPromiseIfNeeded");function Sm(c,l){let m=c._writer;m!==void 0&&l!==c._backpressure&&(l?X0(m):Im(m)),c._backpressure=l}a(Sm,"WritableStreamUpdateBackpressure");class _n{static{a(this,"WritableStreamDefaultWriter")}constructor(l){if(mt(l,1,"WritableStreamDefaultWriter"),fS(l,"First parameter"),pi(l))throw new TypeError("This stream has already been locked for exclusive writing by another writer");this._ownerWritableStream=l,l._writer=this;let m=l._state;if(m==="writable")!en(l)&&l._backpressure?ku(this):AS(this),Ou(this);else if(m==="erroring")Am(this,l._storedError),Ou(this);else if(m==="closed")AS(this),J0(this);else{let E=l._storedError;Am(this,E),TS(this,E)}}get closed(){return So(this)?this._closedPromise:f(Po("closed"))}get desiredSize(){if(!So(this))throw Po("desiredSize");if(this._ownerWritableStream===void 0)throw Fa("desiredSize");return B0(this)}get ready(){return So(this)?this._readyPromise:f(Po("ready"))}abort(l=void 0){return So(this)?this._ownerWritableStream===void 0?f(Fa("abort")):M0(this,l):f(Po("abort"))}close(){if(!So(this))return f(Po("close"));let l=this._ownerWritableStream;return l===void 0?f(Fa("close")):en(l)?f(new TypeError("Cannot close an already-closing stream")):yS(this)}releaseLock(){if(!So(this))throw Po("releaseLock");this._ownerWritableStream!==void 0&&bS(this)}write(l=void 0){return So(this)?this._ownerWritableStream===void 0?f(Fa("write to")):vS(this,l):f(Po("write"))}}Object.defineProperties(_n.prototype,{abort:{enumerable:!0},close:{enumerable:!0},releaseLock:{enumerable:!0},write:{enumerable:!0},closed:{enumerable:!0},desiredSize:{enumerable:!0},ready:{enumerable:!0}}),r(_n.prototype.abort,"abort"),r(_n.prototype.close,"close"),r(_n.prototype.releaseLock,"releaseLock"),r(_n.prototype.write,"write"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(_n.prototype,Symbol.toStringTag,{value:"WritableStreamDefaultWriter",configurable:!0});function So(c){return!n(c)||!Object.prototype.hasOwnProperty.call(c,"_ownerWritableStream")?!1:c instanceof _n}a(So,"IsWritableStreamDefaultWriter");function M0(c,l){let m=c._ownerWritableStream;return Tu(m,l)}a(M0,"WritableStreamDefaultWriterAbort");function yS(c){let l=c._ownerWritableStream;return gS(l)}a(yS,"WritableStreamDefaultWriterClose");function L0(c){let l=c._ownerWritableStream,m=l._state;return en(l)||m==="closed"?p(void 0):m==="errored"?f(l._storedError):yS(c)}a(L0,"WritableStreamDefaultWriterCloseWithErrorPropagation");function F0(c,l){c._closedPromiseState==="pending"?wm(c,l):K0(c,l)}a(F0,"WritableStreamDefaultWriterEnsureClosedPromiseRejected");function _S(c,l){c._readyPromiseState==="pending"?IS(c,l):Q0(c,l)}a(_S,"WritableStreamDefaultWriterEnsureReadyPromiseRejected");function B0(c){let l=c._ownerWritableStream,m=l._state;return m==="errored"||m==="erroring"?null:m==="closed"?0:PS(l._writableStreamController)}a(B0,"WritableStreamDefaultWriterGetDesiredSize");function bS(c){let l=c._ownerWritableStream,m=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");_S(c,m),F0(c,m),l._writer=void 0,c._ownerWritableStream=void 0}a(bS,"WritableStreamDefaultWriterRelease");function vS(c,l){let m=c._ownerWritableStream,E=m._writableStreamController,I=Z0(E,l);if(m!==c._ownerWritableStream)return f(Fa("write to"));let j=m._state;if(j==="errored")return f(m._storedError);if(en(m)||j==="closed")return f(new TypeError("The stream is closing or closed and cannot be written to"));if(j==="erroring")return f(m._storedError);let q=k0(m);return H0(E,l,I),q}a(vS,"WritableStreamDefaultWriterWrite");let ES={};class fi{static{a(this,"WritableStreamDefaultController")}constructor(){throw new TypeError("Illegal constructor")}get abortReason(){if(!Pm(this))throw Tm("abortReason");return this._abortReason}get signal(){if(!Pm(this))throw Tm("signal");if(this._abortController===void 0)throw new TypeError("WritableStreamDefaultController.prototype.signal is not supported");return this._abortController.signal}error(l=void 0){if(!Pm(this))throw Tm("error");this._controlledWritableStream._state==="writable"&&xS(this,l)}[G](l){let m=this._abortAlgorithm(l);return Au(this),m}[te](){jn(this)}}Object.defineProperties(fi.prototype,{abortReason:{enumerable:!0},signal:{enumerable:!0},error:{enumerable:!0}}),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(fi.prototype,Symbol.toStringTag,{value:"WritableStreamDefaultController",configurable:!0});function Pm(c){return!n(c)||!Object.prototype.hasOwnProperty.call(c,"_controlledWritableStream")?!1:c instanceof fi}a(Pm,"IsWritableStreamDefaultController");function SS(c,l,m,E,I,j,q,oe){l._controlledWritableStream=c,c._writableStreamController=l,l._queue=void 0,l._queueTotalSize=void 0,jn(l),l._abortReason=void 0,l._abortController=R0(),l._started=!1,l._strategySizeAlgorithm=oe,l._strategyHWM=q,l._writeAlgorithm=E,l._closeAlgorithm=I,l._abortAlgorithm=j;let ye=xm(l);Sm(c,ye);let ue=m(),Ee=p(ue);y(Ee,()=>(l._started=!0,Iu(l),null),Ae=>(l._started=!0,bm(c,Ae),null))}a(SS,"SetUpWritableStreamDefaultController");function q0(c,l,m,E){let I=Object.create(fi.prototype),j,q,oe,ye;l.start!==void 0?j=a(()=>l.start(I),"startAlgorithm"):j=a(()=>{},"startAlgorithm"),l.write!==void 0?q=a(ue=>l.write(ue,I),"writeAlgorithm"):q=a(()=>p(void 0),"writeAlgorithm"),l.close!==void 0?oe=a(()=>l.close(),"closeAlgorithm"):oe=a(()=>p(void 0),"closeAlgorithm"),l.abort!==void 0?ye=a(ue=>l.abort(ue),"abortAlgorithm"):ye=a(()=>p(void 0),"abortAlgorithm"),SS(c,I,j,q,oe,ye,m,E)}a(q0,"SetUpWritableStreamDefaultControllerFromUnderlyingSink");function Au(c){c._writeAlgorithm=void 0,c._closeAlgorithm=void 0,c._abortAlgorithm=void 0,c._strategySizeAlgorithm=void 0}a(Au,"WritableStreamDefaultControllerClearAlgorithms");function V0(c){dm(c,ES,0),Iu(c)}a(V0,"WritableStreamDefaultControllerClose");function Z0(c,l){try{return c._strategySizeAlgorithm(l)}catch(m){return La(c,m),1}}a(Z0,"WritableStreamDefaultControllerGetChunkSize");function PS(c){return c._strategyHWM-c._queueTotalSize}a(PS,"WritableStreamDefaultControllerGetDesiredSize");function H0(c,l,m){try{dm(c,l,m)}catch(I){La(c,I);return}let E=c._controlledWritableStream;if(!en(E)&&E._state==="writable"){let I=xm(c);Sm(E,I)}Iu(c)}a(H0,"WritableStreamDefaultControllerWrite");function Iu(c){let l=c._controlledWritableStream;if(!c._started||l._inFlightWriteRequest!==void 0)return;if(l._state==="erroring"){Em(l);return}if(c._queue.length===0)return;let E=a0(c);E===ES?G0(c):W0(c,E)}a(Iu,"WritableStreamDefaultControllerAdvanceQueueIfNeeded");function La(c,l){c._controlledWritableStream._state==="writable"&&xS(c,l)}a(La,"WritableStreamDefaultControllerErrorIfNeeded");function G0(c){let l=c._controlledWritableStream;U0(l),lm(c);let m=c._closeAlgorithm();Au(c),y(m,()=>(z0(l),null),E=>(N0(l,E),null))}a(G0,"WritableStreamDefaultControllerProcessClose");function W0(c,l){let m=c._controlledWritableStream;j0(m);let E=c._writeAlgorithm(l);y(E,()=>{C0(m);let I=m._state;if(lm(c),!en(m)&&I==="writable"){let j=xm(c);Sm(m,j)}return Iu(c),null},I=>(m._state==="writable"&&Au(c),$0(m,I),null))}a(W0,"WritableStreamDefaultControllerProcessWrite");function xm(c){return PS(c)<=0}a(xm,"WritableStreamDefaultControllerGetBackpressure");function xS(c,l){let m=c._controlledWritableStream;Au(c),vm(m,l)}a(xS,"WritableStreamDefaultControllerError");function Ru(c){return new TypeError(`WritableStream.prototype.${c} can only be used on a WritableStream`)}a(Ru,"streamBrandCheckException$2");function Tm(c){return new TypeError(`WritableStreamDefaultController.prototype.${c} can only be used on a WritableStreamDefaultController`)}a(Tm,"defaultControllerBrandCheckException$2");function Po(c){return new TypeError(`WritableStreamDefaultWriter.prototype.${c} can only be used on a WritableStreamDefaultWriter`)}a(Po,"defaultWriterBrandCheckException");function Fa(c){return new TypeError("Cannot "+c+" a stream using a released writer")}a(Fa,"defaultWriterLockException");function Ou(c){c._closedPromise=d((l,m)=>{c._closedPromise_resolve=l,c._closedPromise_reject=m,c._closedPromiseState="pending"})}a(Ou,"defaultWriterClosedPromiseInitialize");function TS(c,l){Ou(c),wm(c,l)}a(TS,"defaultWriterClosedPromiseInitializeAsRejected");function J0(c){Ou(c),wS(c)}a(J0,"defaultWriterClosedPromiseInitializeAsResolved");function wm(c,l){c._closedPromise_reject!==void 0&&(x(c._closedPromise),c._closedPromise_reject(l),c._closedPromise_resolve=void 0,c._closedPromise_reject=void 0,c._closedPromiseState="rejected")}a(wm,"defaultWriterClosedPromiseReject");function K0(c,l){TS(c,l)}a(K0,"defaultWriterClosedPromiseResetToRejected");function wS(c){c._closedPromise_resolve!==void 0&&(c._closedPromise_resolve(void 0),c._closedPromise_resolve=void 0,c._closedPromise_reject=void 0,c._closedPromiseState="resolved")}a(wS,"defaultWriterClosedPromiseResolve");function ku(c){c._readyPromise=d((l,m)=>{c._readyPromise_resolve=l,c._readyPromise_reject=m}),c._readyPromiseState="pending"}a(ku,"defaultWriterReadyPromiseInitialize");function Am(c,l){ku(c),IS(c,l)}a(Am,"defaultWriterReadyPromiseInitializeAsRejected");function AS(c){ku(c),Im(c)}a(AS,"defaultWriterReadyPromiseInitializeAsResolved");function IS(c,l){c._readyPromise_reject!==void 0&&(x(c._readyPromise),c._readyPromise_reject(l),c._readyPromise_resolve=void 0,c._readyPromise_reject=void 0,c._readyPromiseState="rejected")}a(IS,"defaultWriterReadyPromiseReject");function X0(c){ku(c)}a(X0,"defaultWriterReadyPromiseReset");function Q0(c,l){Am(c,l)}a(Q0,"defaultWriterReadyPromiseResetToRejected");function Im(c){c._readyPromise_resolve!==void 0&&(c._readyPromise_resolve(void 0),c._readyPromise_resolve=void 0,c._readyPromise_reject=void 0,c._readyPromiseState="fulfilled")}a(Im,"defaultWriterReadyPromiseResolve");function Y0(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof global<"u")return global}a(Y0,"getGlobals");let Rm=Y0();function e$(c){if(!(typeof c=="function"||typeof c=="object")||c.name!=="DOMException")return!1;try{return new c,!0}catch{return!1}}a(e$,"isDOMExceptionConstructor");function t$(){let c=Rm?.DOMException;return e$(c)?c:void 0}a(t$,"getFromGlobal");function r$(){let c=a(function(m,E){this.message=m||"",this.name=E||"Error",Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)},"DOMException");return r(c,"DOMException"),c.prototype=Object.create(Error.prototype),Object.defineProperty(c.prototype,"constructor",{value:c,writable:!0,configurable:!0}),c}a(r$,"createPolyfill");let n$=t$()||r$();function RS(c,l,m,E,I,j){let q=M(c),oe=mS(l);c._disturbed=!0;let ye=!1,ue=p(void 0);return d((Ee,Ae)=>{let Ke;if(j!==void 0){if(Ke=a(()=>{let de=j.reason!==void 0?j.reason:new n$("Aborted","AbortError"),Oe=[];E||Oe.push(()=>l._state==="writable"?Tu(l,de):p(void 0)),I||Oe.push(()=>c._state==="readable"?Dr(c,de):p(void 0)),Ht(()=>Promise.all(Oe.map(Xe=>Xe())),!0,de)},"abortAlgorithm"),j.aborted){Ke();return}j.addEventListener("abort",Ke)}function Ur(){return d((de,Oe)=>{function Xe(ir){ir?de():g(yi(),Xe,Oe)}a(Xe,"next"),Xe(!1)})}a(Ur,"pipeLoop");function yi(){return ye?p(!0):g(oe._readyPromise,()=>d((de,Oe)=>{se(q,{_chunkSteps:a(Xe=>{ue=g(vS(oe,Xe),void 0,t),de(!1)},"_chunkSteps"),_closeSteps:a(()=>de(!0),"_closeSteps"),_errorSteps:Oe})}))}if(a(yi,"pipeStep"),vn(c,q._closedPromise,de=>(E?Pr(!0,de):Ht(()=>Tu(l,de),!0,de),null)),vn(l,oe._closedPromise,de=>(I?Pr(!0,de):Ht(()=>Dr(c,de),!0,de),null)),Mt(c,q._closedPromise,()=>(m?Pr():Ht(()=>L0(oe)),null)),en(l)||l._state==="closed"){let de=new TypeError("the destination writable stream closed before all data could be piped to it");I?Pr(!0,de):Ht(()=>Dr(c,de),!0,de)}x(Ur());function Vn(){let de=ue;return g(ue,()=>de!==ue?Vn():void 0)}a(Vn,"waitForWritesToFinish");function vn(de,Oe,Xe){de._state==="errored"?Xe(de._storedError):_(Oe,Xe)}a(vn,"isOrBecomesErrored");function Mt(de,Oe,Xe){de._state==="closed"?Xe():h(Oe,Xe)}a(Mt,"isOrBecomesClosed");function Ht(de,Oe,Xe){if(ye)return;ye=!0,l._state==="writable"&&!en(l)?h(Vn(),ir):ir();function ir(){return y(de(),()=>En(Oe,Xe),_i=>En(!0,_i)),null}a(ir,"doTheRest")}a(Ht,"shutdownWithAction");function Pr(de,Oe){ye||(ye=!0,l._state==="writable"&&!en(l)?h(Vn(),()=>En(de,Oe)):En(de,Oe))}a(Pr,"shutdown");function En(de,Oe){return bS(oe),Me(q),j!==void 0&&j.removeEventListener("abort",Ke),de?Ae(Oe):Ee(void 0),null}a(En,"finalize")})}a(RS,"ReadableStreamPipeTo");class bn{static{a(this,"ReadableStreamDefaultController")}constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!Cu(this))throw zu("desiredSize");return Om(this)}close(){if(!Cu(this))throw zu("close");if(!hi(this))throw new TypeError("The stream is not in a state that permits close");xo(this)}enqueue(l=void 0){if(!Cu(this))throw zu("enqueue");if(!hi(this))throw new TypeError("The stream is not in a state that permits enqueue");return mi(this,l)}error(l=void 0){if(!Cu(this))throw zu("error");Nr(this,l)}[ce](l){jn(this);let m=this._cancelAlgorithm(l);return $u(this),m}[Y](l){let m=this._controlledReadableStream;if(this._queue.length>0){let E=lm(this);this._closeRequested&&this._queue.length===0?($u(this),Va(m)):Ba(this),l._chunkSteps(E)}else R(m,l),Ba(this)}[Ze](){}}Object.defineProperties(bn.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},desiredSize:{enumerable:!0}}),r(bn.prototype.close,"close"),r(bn.prototype.enqueue,"enqueue"),r(bn.prototype.error,"error"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(bn.prototype,Symbol.toStringTag,{value:"ReadableStreamDefaultController",configurable:!0});function Cu(c){return!n(c)||!Object.prototype.hasOwnProperty.call(c,"_controlledReadableStream")?!1:c instanceof bn}a(Cu,"IsReadableStreamDefaultController");function Ba(c){if(!OS(c))return;if(c._pulling){c._pullAgain=!0;return}c._pulling=!0;let m=c._pullAlgorithm();y(m,()=>(c._pulling=!1,c._pullAgain&&(c._pullAgain=!1,Ba(c)),null),E=>(Nr(c,E),null))}a(Ba,"ReadableStreamDefaultControllerCallPullIfNeeded");function OS(c){let l=c._controlledReadableStream;return!hi(c)||!c._started?!1:!!(Bn(l)&&U(l)>0||Om(c)>0)}a(OS,"ReadableStreamDefaultControllerShouldCallPull");function $u(c){c._pullAlgorithm=void 0,c._cancelAlgorithm=void 0,c._strategySizeAlgorithm=void 0}a($u,"ReadableStreamDefaultControllerClearAlgorithms");function xo(c){if(!hi(c))return;let l=c._controlledReadableStream;c._closeRequested=!0,c._queue.length===0&&($u(c),Va(l))}a(xo,"ReadableStreamDefaultControllerClose");function mi(c,l){if(!hi(c))return;let m=c._controlledReadableStream;if(Bn(m)&&U(m)>0)C(m,l,!1);else{let E;try{E=c._strategySizeAlgorithm(l)}catch(I){throw Nr(c,I),I}try{dm(c,l,E)}catch(I){throw Nr(c,I),I}}Ba(c)}a(mi,"ReadableStreamDefaultControllerEnqueue");function Nr(c,l){let m=c._controlledReadableStream;m._state==="readable"&&(jn(c),$u(c),zS(m,l))}a(Nr,"ReadableStreamDefaultControllerError");function Om(c){let l=c._controlledReadableStream._state;return l==="errored"?null:l==="closed"?0:c._strategyHWM-c._queueTotalSize}a(Om,"ReadableStreamDefaultControllerGetDesiredSize");function o$(c){return!OS(c)}a(o$,"ReadableStreamDefaultControllerHasBackpressure");function hi(c){let l=c._controlledReadableStream._state;return!c._closeRequested&&l==="readable"}a(hi,"ReadableStreamDefaultControllerCanCloseOrEnqueue");function kS(c,l,m,E,I,j,q){l._controlledReadableStream=c,l._queue=void 0,l._queueTotalSize=void 0,jn(l),l._started=!1,l._closeRequested=!1,l._pullAgain=!1,l._pulling=!1,l._strategySizeAlgorithm=q,l._strategyHWM=j,l._pullAlgorithm=E,l._cancelAlgorithm=I,c._readableStreamController=l;let oe=m();y(p(oe),()=>(l._started=!0,Ba(l),null),ye=>(Nr(l,ye),null))}a(kS,"SetUpReadableStreamDefaultController");function i$(c,l,m,E){let I=Object.create(bn.prototype),j,q,oe;l.start!==void 0?j=a(()=>l.start(I),"startAlgorithm"):j=a(()=>{},"startAlgorithm"),l.pull!==void 0?q=a(()=>l.pull(I),"pullAlgorithm"):q=a(()=>p(void 0),"pullAlgorithm"),l.cancel!==void 0?oe=a(ye=>l.cancel(ye),"cancelAlgorithm"):oe=a(()=>p(void 0),"cancelAlgorithm"),kS(c,I,j,q,oe,m,E)}a(i$,"SetUpReadableStreamDefaultControllerFromUnderlyingSource");function zu(c){return new TypeError(`ReadableStreamDefaultController.prototype.${c} can only be used on a ReadableStreamDefaultController`)}a(zu,"defaultControllerBrandCheckException$1");function a$(c,l){return bo(c._readableStreamController)?c$(c):s$(c)}a(a$,"ReadableStreamTee");function s$(c,l){let m=M(c),E=!1,I=!1,j=!1,q=!1,oe,ye,ue,Ee,Ae,Ke=d(Mt=>{Ae=Mt});function Ur(){return E?(I=!0,p(void 0)):(E=!0,se(m,{_chunkSteps:a(Ht=>{S(()=>{I=!1;let Pr=Ht,En=Ht;j||mi(ue._readableStreamController,Pr),q||mi(Ee._readableStreamController,En),E=!1,I&&Ur()})},"_chunkSteps"),_closeSteps:a(()=>{E=!1,j||xo(ue._readableStreamController),q||xo(Ee._readableStreamController),(!j||!q)&&Ae(void 0)},"_closeSteps"),_errorSteps:a(()=>{E=!1},"_errorSteps")}),p(void 0))}a(Ur,"pullAlgorithm");function yi(Mt){if(j=!0,oe=Mt,q){let Ht=He([oe,ye]),Pr=Dr(c,Ht);Ae(Pr)}return Ke}a(yi,"cancel1Algorithm");function Vn(Mt){if(q=!0,ye=Mt,j){let Ht=He([oe,ye]),Pr=Dr(c,Ht);Ae(Pr)}return Ke}a(Vn,"cancel2Algorithm");function vn(){}return a(vn,"startAlgorithm"),ue=qa(vn,Ur,yi),Ee=qa(vn,Ur,Vn),_(m._closedPromise,Mt=>(Nr(ue._readableStreamController,Mt),Nr(Ee._readableStreamController,Mt),(!j||!q)&&Ae(void 0),null)),[ue,Ee]}a(s$,"ReadableStreamDefaultTee");function c$(c){let l=M(c),m=!1,E=!1,I=!1,j=!1,q=!1,oe,ye,ue,Ee,Ae,Ke=d(de=>{Ae=de});function Ur(de){_(de._closedPromise,Oe=>(de!==l||(Sr(ue._readableStreamController,Oe),Sr(Ee._readableStreamController,Oe),(!j||!q)&&Ae(void 0)),null))}a(Ur,"forwardReaderError");function yi(){Eo(l)&&(Me(l),l=M(c),Ur(l)),se(l,{_chunkSteps:a(Oe=>{S(()=>{E=!1,I=!1;let Xe=Oe,ir=Oe;if(!j&&!q)try{ir=JE(Oe)}catch(_i){Sr(ue._readableStreamController,_i),Sr(Ee._readableStreamController,_i),Ae(Dr(c,_i));return}j||bu(ue._readableStreamController,Xe),q||bu(Ee._readableStreamController,ir),m=!1,E?vn():I&&Mt()})},"_chunkSteps"),_closeSteps:a(()=>{m=!1,j||Ua(ue._readableStreamController),q||Ua(Ee._readableStreamController),ue._readableStreamController._pendingPullIntos.length>0&&vu(ue._readableStreamController,0),Ee._readableStreamController._pendingPullIntos.length>0&&vu(Ee._readableStreamController,0),(!j||!q)&&Ae(void 0)},"_closeSteps"),_errorSteps:a(()=>{m=!1},"_errorSteps")})}a(yi,"pullWithDefaultReader");function Vn(de,Oe){ie(l)&&(Me(l),l=cS(c),Ur(l));let Xe=Oe?Ee:ue,ir=Oe?ue:Ee;dS(l,de,1,{_chunkSteps:a(bi=>{S(()=>{E=!1,I=!1;let vi=Oe?q:j;if(Oe?j:q)vi||Eu(Xe._readableStreamController,bi);else{let GS;try{GS=JE(bi)}catch(Nm){Sr(Xe._readableStreamController,Nm),Sr(ir._readableStreamController,Nm),Ae(Dr(c,Nm));return}vi||Eu(Xe._readableStreamController,bi),bu(ir._readableStreamController,GS)}m=!1,E?vn():I&&Mt()})},"_chunkSteps"),_closeSteps:a(bi=>{m=!1;let vi=Oe?q:j,Bu=Oe?j:q;vi||Ua(Xe._readableStreamController),Bu||Ua(ir._readableStreamController),bi!==void 0&&(vi||Eu(Xe._readableStreamController,bi),!Bu&&ir._readableStreamController._pendingPullIntos.length>0&&vu(ir._readableStreamController,0)),(!vi||!Bu)&&Ae(void 0)},"_closeSteps"),_errorSteps:a(()=>{m=!1},"_errorSteps")})}a(Vn,"pullWithBYOBReader");function vn(){if(m)return E=!0,p(void 0);m=!0;let de=gm(ue._readableStreamController);return de===null?yi():Vn(de._view,!1),p(void 0)}a(vn,"pull1Algorithm");function Mt(){if(m)return I=!0,p(void 0);m=!0;let de=gm(Ee._readableStreamController);return de===null?yi():Vn(de._view,!0),p(void 0)}a(Mt,"pull2Algorithm");function Ht(de){if(j=!0,oe=de,q){let Oe=He([oe,ye]),Xe=Dr(c,Oe);Ae(Xe)}return Ke}a(Ht,"cancel1Algorithm");function Pr(de){if(q=!0,ye=de,j){let Oe=He([oe,ye]),Xe=Dr(c,Oe);Ae(Xe)}return Ke}a(Pr,"cancel2Algorithm");function En(){}return a(En,"startAlgorithm"),ue=$S(En,vn,Ht),Ee=$S(En,Mt,Pr),Ur(l),[ue,Ee]}a(c$,"ReadableByteStreamTee");function u$(c){return n(c)&&typeof c.getReader<"u"}a(u$,"isReadableStreamLike");function l$(c){return u$(c)?p$(c.getReader()):d$(c)}a(l$,"ReadableStreamFrom");function d$(c){let l,m=WE(c,"async"),E=t;function I(){let q;try{q=r0(m)}catch(ye){return f(ye)}let oe=p(q);return P(oe,ye=>{if(!n(ye))throw new TypeError("The promise returned by the iterator.next() method must fulfill with an object");if(n0(ye))xo(l._readableStreamController);else{let Ee=o0(ye);mi(l._readableStreamController,Ee)}})}a(I,"pullAlgorithm");function j(q){let oe=m.iterator,ye;try{ye=gu(oe,"return")}catch(Ae){return f(Ae)}if(ye===void 0)return p(void 0);let ue;try{ue=$(ye,oe,[q])}catch(Ae){return f(Ae)}let Ee=p(ue);return P(Ee,Ae=>{if(!n(Ae))throw new TypeError("The promise returned by the iterator.return() method must fulfill with an object")})}return a(j,"cancelAlgorithm"),l=qa(E,I,j,0),l}a(d$,"ReadableStreamFromIterable");function p$(c){let l,m=t;function E(){let j;try{j=c.read()}catch(q){return f(q)}return P(j,q=>{if(!n(q))throw new TypeError("The promise returned by the reader.read() method must fulfill with an object");if(q.done)xo(l._readableStreamController);else{let oe=q.value;mi(l._readableStreamController,oe)}})}a(E,"pullAlgorithm");function I(j){try{return p(c.cancel(j))}catch(q){return f(q)}}return a(I,"cancelAlgorithm"),l=qa(m,E,I,0),l}a(p$,"ReadableStreamFromDefaultReader");function f$(c,l){Zt(c,l);let m=c,E=m?.autoAllocateChunkSize,I=m?.cancel,j=m?.pull,q=m?.start,oe=m?.type;return{autoAllocateChunkSize:E===void 0?void 0:O(E,`${l} has member 'autoAllocateChunkSize' that`),cancel:I===void 0?void 0:m$(I,m,`${l} has member 'cancel' that`),pull:j===void 0?void 0:h$(j,m,`${l} has member 'pull' that`),start:q===void 0?void 0:g$(q,m,`${l} has member 'start' that`),type:oe===void 0?void 0:y$(oe,`${l} has member 'type' that`)}}a(f$,"convertUnderlyingDefaultOrByteSource");function m$(c,l,m){return Ut(c,m),E=>V(c,l,[E])}a(m$,"convertUnderlyingSourceCancelCallback");function h$(c,l,m){return Ut(c,m),E=>V(c,l,[E])}a(h$,"convertUnderlyingSourcePullCallback");function g$(c,l,m){return Ut(c,m),E=>$(c,l,[E])}a(g$,"convertUnderlyingSourceStartCallback");function y$(c,l){if(c=`${c}`,c!=="bytes")throw new TypeError(`${l} '${c}' is not a valid enumeration value for ReadableStreamType`);return c}a(y$,"convertReadableStreamType");function _$(c,l){return Zt(c,l),{preventCancel:!!c?.preventCancel}}a(_$,"convertIteratorOptions");function CS(c,l){Zt(c,l);let m=c?.preventAbort,E=c?.preventCancel,I=c?.preventClose,j=c?.signal;return j!==void 0&&b$(j,`${l} has member 'signal' that`),{preventAbort:!!m,preventCancel:!!E,preventClose:!!I,signal:j}}a(CS,"convertPipeOptions");function b$(c,l){if(!A0(c))throw new TypeError(`${l} is not an AbortSignal.`)}a(b$,"assertAbortSignal");function v$(c,l){Zt(c,l);let m=c?.readable;v(m,"readable","ReadableWritablePair"),z(m,`${l} has member 'readable' that`);let E=c?.writable;return v(E,"writable","ReadableWritablePair"),fS(E,`${l} has member 'writable' that`),{readable:m,writable:E}}a(v$,"convertReadableWritablePair");class $t{static{a(this,"ReadableStream")}constructor(l={},m={}){l===void 0?l=null:jt(l,"First parameter");let E=xu(m,"Second parameter"),I=f$(l,"First parameter");if(km(this),I.type==="bytes"){if(E.size!==void 0)throw new RangeError("The strategy for a byte stream cannot have a size function");let j=Ma(E,0);m0(this,I,j)}else{let j=Pu(E),q=Ma(E,1);i$(this,I,q,j)}}get locked(){if(!Fn(this))throw To("locked");return Bn(this)}cancel(l=void 0){return Fn(this)?Bn(this)?f(new TypeError("Cannot cancel a stream that already has a reader")):Dr(this,l):f(To("cancel"))}getReader(l=void 0){if(!Fn(this))throw To("getReader");return g0(l,"First parameter").mode===void 0?M(this):cS(this)}pipeThrough(l,m={}){if(!Fn(this))throw To("pipeThrough");mt(l,1,"pipeThrough");let E=v$(l,"First parameter"),I=CS(m,"Second parameter");if(Bn(this))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(pi(E.writable))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");let j=RS(this,E.writable,I.preventClose,I.preventAbort,I.preventCancel,I.signal);return x(j),E.readable}pipeTo(l,m={}){if(!Fn(this))return f(To("pipeTo"));if(l===void 0)return f("Parameter 1 is required in 'pipeTo'.");if(!di(l))return f(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));let E;try{E=CS(m,"Second parameter")}catch(I){return f(I)}return Bn(this)?f(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):pi(l)?f(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):RS(this,l,E.preventClose,E.preventAbort,E.preventCancel,E.signal)}tee(){if(!Fn(this))throw To("tee");let l=a$(this);return He(l)}values(l=void 0){if(!Fn(this))throw To("values");let m=_$(l,"First parameter");return si(this,m.preventCancel)}[um](l){return this.values(l)}static from(l){return l$(l)}}Object.defineProperties($t,{from:{enumerable:!0}}),Object.defineProperties($t.prototype,{cancel:{enumerable:!0},getReader:{enumerable:!0},pipeThrough:{enumerable:!0},pipeTo:{enumerable:!0},tee:{enumerable:!0},values:{enumerable:!0},locked:{enumerable:!0}}),r($t.from,"from"),r($t.prototype.cancel,"cancel"),r($t.prototype.getReader,"getReader"),r($t.prototype.pipeThrough,"pipeThrough"),r($t.prototype.pipeTo,"pipeTo"),r($t.prototype.tee,"tee"),r($t.prototype.values,"values"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty($t.prototype,Symbol.toStringTag,{value:"ReadableStream",configurable:!0}),Object.defineProperty($t.prototype,um,{value:$t.prototype.values,writable:!0,configurable:!0});function qa(c,l,m,E=1,I=()=>1){let j=Object.create($t.prototype);km(j);let q=Object.create(bn.prototype);return kS(j,q,c,l,m,E,I),j}a(qa,"CreateReadableStream");function $S(c,l,m){let E=Object.create($t.prototype);km(E);let I=Object.create(yn.prototype);return sS(E,I,c,l,m,0,void 0),E}a($S,"CreateReadableByteStream");function km(c){c._state="readable",c._reader=void 0,c._storedError=void 0,c._disturbed=!1}a(km,"InitializeReadableStream");function Fn(c){return!n(c)||!Object.prototype.hasOwnProperty.call(c,"_readableStreamController")?!1:c instanceof $t}a(Fn,"IsReadableStream");function Bn(c){return c._reader!==void 0}a(Bn,"IsReadableStreamLocked");function Dr(c,l){if(c._disturbed=!0,c._state==="closed")return p(void 0);if(c._state==="errored")return f(c._storedError);Va(c);let m=c._reader;if(m!==void 0&&Eo(m)){let I=m._readIntoRequests;m._readIntoRequests=new Z,I.forEach(j=>{j._closeSteps(void 0)})}let E=c._readableStreamController[ce](l);return P(E,t)}a(Dr,"ReadableStreamCancel");function Va(c){c._state="closed";let l=c._reader;if(l!==void 0&&(ai(l),ie(l))){let m=l._readRequests;l._readRequests=new Z,m.forEach(E=>{E._closeSteps()})}}a(Va,"ReadableStreamClose");function zS(c,l){c._state="errored",c._storedError=l;let m=c._reader;m!==void 0&&(nr(m,l),ie(m)?tt(m,l):pS(m,l))}a(zS,"ReadableStreamError");function To(c){return new TypeError(`ReadableStream.prototype.${c} can only be used on a ReadableStream`)}a(To,"streamBrandCheckException$1");function NS(c,l){Zt(c,l);let m=c?.highWaterMark;return v(m,"highWaterMark","QueuingStrategyInit"),{highWaterMark:T(m)}}a(NS,"convertQueuingStrategyInit");let DS=a(c=>c.byteLength,"byteLengthSizeFunction");r(DS,"size");class Nu{static{a(this,"ByteLengthQueuingStrategy")}constructor(l){mt(l,1,"ByteLengthQueuingStrategy"),l=NS(l,"First parameter"),this._byteLengthQueuingStrategyHighWaterMark=l.highWaterMark}get highWaterMark(){if(!jS(this))throw US("highWaterMark");return this._byteLengthQueuingStrategyHighWaterMark}get size(){if(!jS(this))throw US("size");return DS}}Object.defineProperties(Nu.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Nu.prototype,Symbol.toStringTag,{value:"ByteLengthQueuingStrategy",configurable:!0});function US(c){return new TypeError(`ByteLengthQueuingStrategy.prototype.${c} can only be used on a ByteLengthQueuingStrategy`)}a(US,"byteLengthBrandCheckException");function jS(c){return!n(c)||!Object.prototype.hasOwnProperty.call(c,"_byteLengthQueuingStrategyHighWaterMark")?!1:c instanceof Nu}a(jS,"IsByteLengthQueuingStrategy");let MS=a(()=>1,"countSizeFunction");r(MS,"size");class Du{static{a(this,"CountQueuingStrategy")}constructor(l){mt(l,1,"CountQueuingStrategy"),l=NS(l,"First parameter"),this._countQueuingStrategyHighWaterMark=l.highWaterMark}get highWaterMark(){if(!FS(this))throw LS("highWaterMark");return this._countQueuingStrategyHighWaterMark}get size(){if(!FS(this))throw LS("size");return MS}}Object.defineProperties(Du.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Du.prototype,Symbol.toStringTag,{value:"CountQueuingStrategy",configurable:!0});function LS(c){return new TypeError(`CountQueuingStrategy.prototype.${c} can only be used on a CountQueuingStrategy`)}a(LS,"countBrandCheckException");function FS(c){return!n(c)||!Object.prototype.hasOwnProperty.call(c,"_countQueuingStrategyHighWaterMark")?!1:c instanceof Du}a(FS,"IsCountQueuingStrategy");function E$(c,l){Zt(c,l);let m=c?.cancel,E=c?.flush,I=c?.readableType,j=c?.start,q=c?.transform,oe=c?.writableType;return{cancel:m===void 0?void 0:T$(m,c,`${l} has member 'cancel' that`),flush:E===void 0?void 0:S$(E,c,`${l} has member 'flush' that`),readableType:I,start:j===void 0?void 0:P$(j,c,`${l} has member 'start' that`),transform:q===void 0?void 0:x$(q,c,`${l} has member 'transform' that`),writableType:oe}}a(E$,"convertTransformer");function S$(c,l,m){return Ut(c,m),E=>V(c,l,[E])}a(S$,"convertTransformerFlushCallback");function P$(c,l,m){return Ut(c,m),E=>$(c,l,[E])}a(P$,"convertTransformerStartCallback");function x$(c,l,m){return Ut(c,m),(E,I)=>V(c,l,[E,I])}a(x$,"convertTransformerTransformCallback");function T$(c,l,m){return Ut(c,m),E=>V(c,l,[E])}a(T$,"convertTransformerCancelCallback");class Uu{static{a(this,"TransformStream")}constructor(l={},m={},E={}){l===void 0&&(l=null);let I=xu(m,"Second parameter"),j=xu(E,"Third parameter"),q=E$(l,"First parameter");if(q.readableType!==void 0)throw new RangeError("Invalid readableType specified");if(q.writableType!==void 0)throw new RangeError("Invalid writableType specified");let oe=Ma(j,0),ye=Pu(j),ue=Ma(I,1),Ee=Pu(I),Ae,Ke=d(Ur=>{Ae=Ur});w$(this,Ke,ue,Ee,oe,ye),I$(this,q),q.start!==void 0?Ae(q.start(this._transformStreamController)):Ae(void 0)}get readable(){if(!BS(this))throw HS("readable");return this._readable}get writable(){if(!BS(this))throw HS("writable");return this._writable}}Object.defineProperties(Uu.prototype,{readable:{enumerable:!0},writable:{enumerable:!0}}),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Uu.prototype,Symbol.toStringTag,{value:"TransformStream",configurable:!0});function w$(c,l,m,E,I,j){function q(){return l}a(q,"startAlgorithm");function oe(Ke){return k$(c,Ke)}a(oe,"writeAlgorithm");function ye(Ke){return C$(c,Ke)}a(ye,"abortAlgorithm");function ue(){return $$(c)}a(ue,"closeAlgorithm"),c._writable=O0(q,oe,ue,ye,m,E);function Ee(){return z$(c)}a(Ee,"pullAlgorithm");function Ae(Ke){return N$(c,Ke)}a(Ae,"cancelAlgorithm"),c._readable=qa(q,Ee,Ae,I,j),c._backpressure=void 0,c._backpressureChangePromise=void 0,c._backpressureChangePromise_resolve=void 0,ju(c,!0),c._transformStreamController=void 0}a(w$,"InitializeTransformStream");function BS(c){return!n(c)||!Object.prototype.hasOwnProperty.call(c,"_transformStreamController")?!1:c instanceof Uu}a(BS,"IsTransformStream");function qS(c,l){Nr(c._readable._readableStreamController,l),Cm(c,l)}a(qS,"TransformStreamError");function Cm(c,l){Lu(c._transformStreamController),La(c._writable._writableStreamController,l),$m(c)}a(Cm,"TransformStreamErrorWritableAndUnblockWrite");function $m(c){c._backpressure&&ju(c,!1)}a($m,"TransformStreamUnblockWrite");function ju(c,l){c._backpressureChangePromise!==void 0&&c._backpressureChangePromise_resolve(),c._backpressureChangePromise=d(m=>{c._backpressureChangePromise_resolve=m}),c._backpressure=l}a(ju,"TransformStreamSetBackpressure");class qn{static{a(this,"TransformStreamDefaultController")}constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!Mu(this))throw Fu("desiredSize");let l=this._controlledTransformStream._readable._readableStreamController;return Om(l)}enqueue(l=void 0){if(!Mu(this))throw Fu("enqueue");VS(this,l)}error(l=void 0){if(!Mu(this))throw Fu("error");R$(this,l)}terminate(){if(!Mu(this))throw Fu("terminate");O$(this)}}Object.defineProperties(qn.prototype,{enqueue:{enumerable:!0},error:{enumerable:!0},terminate:{enumerable:!0},desiredSize:{enumerable:!0}}),r(qn.prototype.enqueue,"enqueue"),r(qn.prototype.error,"error"),r(qn.prototype.terminate,"terminate"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(qn.prototype,Symbol.toStringTag,{value:"TransformStreamDefaultController",configurable:!0});function Mu(c){return!n(c)||!Object.prototype.hasOwnProperty.call(c,"_controlledTransformStream")?!1:c instanceof qn}a(Mu,"IsTransformStreamDefaultController");function A$(c,l,m,E,I){l._controlledTransformStream=c,c._transformStreamController=l,l._transformAlgorithm=m,l._flushAlgorithm=E,l._cancelAlgorithm=I,l._finishPromise=void 0,l._finishPromise_resolve=void 0,l._finishPromise_reject=void 0}a(A$,"SetUpTransformStreamDefaultController");function I$(c,l){let m=Object.create(qn.prototype),E,I,j;l.transform!==void 0?E=a(q=>l.transform(q,m),"transformAlgorithm"):E=a(q=>{try{return VS(m,q),p(void 0)}catch(oe){return f(oe)}},"transformAlgorithm"),l.flush!==void 0?I=a(()=>l.flush(m),"flushAlgorithm"):I=a(()=>p(void 0),"flushAlgorithm"),l.cancel!==void 0?j=a(q=>l.cancel(q),"cancelAlgorithm"):j=a(()=>p(void 0),"cancelAlgorithm"),A$(c,m,E,I,j)}a(I$,"SetUpTransformStreamDefaultControllerFromTransformer");function Lu(c){c._transformAlgorithm=void 0,c._flushAlgorithm=void 0,c._cancelAlgorithm=void 0}a(Lu,"TransformStreamDefaultControllerClearAlgorithms");function VS(c,l){let m=c._controlledTransformStream,E=m._readable._readableStreamController;if(!hi(E))throw new TypeError("Readable side is not in a state that permits enqueue");try{mi(E,l)}catch(j){throw Cm(m,j),m._readable._storedError}o$(E)!==m._backpressure&&ju(m,!0)}a(VS,"TransformStreamDefaultControllerEnqueue");function R$(c,l){qS(c._controlledTransformStream,l)}a(R$,"TransformStreamDefaultControllerError");function ZS(c,l){let m=c._transformAlgorithm(l);return P(m,void 0,E=>{throw qS(c._controlledTransformStream,E),E})}a(ZS,"TransformStreamDefaultControllerPerformTransform");function O$(c){let l=c._controlledTransformStream,m=l._readable._readableStreamController;xo(m);let E=new TypeError("TransformStream terminated");Cm(l,E)}a(O$,"TransformStreamDefaultControllerTerminate");function k$(c,l){let m=c._transformStreamController;if(c._backpressure){let E=c._backpressureChangePromise;return P(E,()=>{let I=c._writable;if(I._state==="erroring")throw I._storedError;return ZS(m,l)})}return ZS(m,l)}a(k$,"TransformStreamDefaultSinkWriteAlgorithm");function C$(c,l){let m=c._transformStreamController;if(m._finishPromise!==void 0)return m._finishPromise;let E=c._readable;m._finishPromise=d((j,q)=>{m._finishPromise_resolve=j,m._finishPromise_reject=q});let I=m._cancelAlgorithm(l);return Lu(m),y(I,()=>(E._state==="errored"?gi(m,E._storedError):(Nr(E._readableStreamController,l),zm(m)),null),j=>(Nr(E._readableStreamController,j),gi(m,j),null)),m._finishPromise}a(C$,"TransformStreamDefaultSinkAbortAlgorithm");function $$(c){let l=c._transformStreamController;if(l._finishPromise!==void 0)return l._finishPromise;let m=c._readable;l._finishPromise=d((I,j)=>{l._finishPromise_resolve=I,l._finishPromise_reject=j});let E=l._flushAlgorithm();return Lu(l),y(E,()=>(m._state==="errored"?gi(l,m._storedError):(xo(m._readableStreamController),zm(l)),null),I=>(Nr(m._readableStreamController,I),gi(l,I),null)),l._finishPromise}a($$,"TransformStreamDefaultSinkCloseAlgorithm");function z$(c){return ju(c,!1),c._backpressureChangePromise}a(z$,"TransformStreamDefaultSourcePullAlgorithm");function N$(c,l){let m=c._transformStreamController;if(m._finishPromise!==void 0)return m._finishPromise;let E=c._writable;m._finishPromise=d((j,q)=>{m._finishPromise_resolve=j,m._finishPromise_reject=q});let I=m._cancelAlgorithm(l);return Lu(m),y(I,()=>(E._state==="errored"?gi(m,E._storedError):(La(E._writableStreamController,l),$m(c),zm(m)),null),j=>(La(E._writableStreamController,j),$m(c),gi(m,j),null)),m._finishPromise}a(N$,"TransformStreamDefaultSourceCancelAlgorithm");function Fu(c){return new TypeError(`TransformStreamDefaultController.prototype.${c} can only be used on a TransformStreamDefaultController`)}a(Fu,"defaultControllerBrandCheckException");function zm(c){c._finishPromise_resolve!==void 0&&(c._finishPromise_resolve(),c._finishPromise_resolve=void 0,c._finishPromise_reject=void 0)}a(zm,"defaultControllerFinishPromiseResolve");function gi(c,l){c._finishPromise_reject!==void 0&&(x(c._finishPromise),c._finishPromise_reject(l),c._finishPromise_resolve=void 0,c._finishPromise_reject=void 0)}a(gi,"defaultControllerFinishPromiseReject");function HS(c){return new TypeError(`TransformStream.prototype.${c} can only be used on a TransformStream`)}a(HS,"streamBrandCheckException"),e.ByteLengthQueuingStrategy=Nu,e.CountQueuingStrategy=Du,e.ReadableByteStreamController=yn,e.ReadableStream=$t,e.ReadableStreamBYOBReader=Mn,e.ReadableStreamBYOBRequest=_o,e.ReadableStreamDefaultController=bn,e.ReadableStreamDefaultReader=H,e.TransformStream=Uu,e.TransformStreamDefaultController=qn,e.WritableStream=Ln,e.WritableStreamDefaultController=fi,e.WritableStreamDefaultWriter=_n}))});var TR=B(()=>{if(!globalThis.ReadableStream)try{let e=require("node:process"),{emitWarning:t}=e;try{e.emitWarning=()=>{},Object.assign(globalThis,require("node:stream/web")),e.emitWarning=t}catch(n){throw e.emitWarning=t,n}}catch{Object.assign(globalThis,xR())}try{let{Blob:e}=require("buffer");e&&!e.prototype.stream&&(e.prototype.stream=a(function(n){let o=0,r=this;return new ReadableStream({type:"bytes",async pull(i){let u=await r.slice(o,Math.min(r.size,o+65536)).arrayBuffer();o+=u.byteLength,i.enqueue(new Uint8Array(u)),o===r.size&&i.close()}})},"name"))}catch{}});async function*Ub(e,t=!0){for(let n of e)if("stream"in n)yield*n.stream();else if(ArrayBuffer.isView(n))if(t){let o=n.byteOffset,r=n.byteOffset+n.byteLength;for(;o!==r;){let i=Math.min(r-o,wR),s=n.buffer.slice(o,o+i);o+=s.byteLength,yield new Uint8Array(s)}}else yield n;else{let o=0,r=n;for(;o!==r.size;){let s=await r.slice(o,Math.min(r.size,o+wR)).arrayBuffer();o+=s.byteLength,yield new Uint8Array(s)}}}var FQ,wR,AR,P1,Vr,Fc=_t(()=>{FQ=It(TR(),1);wR=65536;a(Ub,"toIterator");AR=class jb{static{a(this,"Blob")}#e=[];#t="";#r=0;#n="transparent";constructor(t=[],n={}){if(typeof t!="object"||t===null)throw new TypeError("Failed to construct 'Blob': The provided value cannot be converted to a sequence.");if(typeof t[Symbol.iterator]!="function")throw new TypeError("Failed to construct 'Blob': The object must have a callable @@iterator property.");if(typeof n!="object"&&typeof n!="function")throw new TypeError("Failed to construct 'Blob': parameter 2 cannot convert to dictionary.");n===null&&(n={});let o=new TextEncoder;for(let i of t){let s;ArrayBuffer.isView(i)?s=new Uint8Array(i.buffer.slice(i.byteOffset,i.byteOffset+i.byteLength)):i instanceof ArrayBuffer?s=new Uint8Array(i.slice(0)):i instanceof jb?s=i:s=o.encode(`${i}`),this.#r+=ArrayBuffer.isView(s)?s.byteLength:s.size,this.#e.push(s)}this.#n=`${n.endings===void 0?"transparent":n.endings}`;let r=n.type===void 0?"":String(n.type);this.#t=/^[\x20-\x7E]*$/.test(r)?r:""}get size(){return this.#r}get type(){return this.#t}async text(){let t=new TextDecoder,n="";for await(let o of Ub(this.#e,!1))n+=t.decode(o,{stream:!0});return n+=t.decode(),n}async arrayBuffer(){let t=new Uint8Array(this.size),n=0;for await(let o of Ub(this.#e,!1))t.set(o,n),n+=o.length;return t.buffer}stream(){let t=Ub(this.#e,!0);return new globalThis.ReadableStream({type:"bytes",async pull(n){let o=await t.next();o.done?n.close():n.enqueue(o.value)},async cancel(){await t.return()}})}slice(t=0,n=this.size,o=""){let{size:r}=this,i=t<0?Math.max(r+t,0):Math.min(t,r),s=n<0?Math.max(r+n,0):Math.min(n,r),u=Math.max(s-i,0),d=this.#e,p=[],f=0;for(let y of d){if(f>=u)break;let h=ArrayBuffer.isView(y)?y.byteLength:y.size;if(i&&h<=i)i-=h,s-=h;else{let _;ArrayBuffer.isView(y)?(_=y.subarray(i,Math.min(h,s)),f+=_.byteLength):(_=y.slice(i,Math.min(h,s)),f+=_.size),s-=h,p.push(_),i=0}}let g=new jb([],{type:String(o).toLowerCase()});return g.#r=u,g.#e=p,g}get[Symbol.toStringTag](){return"Blob"}static[Symbol.hasInstance](t){return t&&typeof t=="object"&&typeof t.constructor=="function"&&(typeof t.stream=="function"||typeof t.arrayBuffer=="function")&&/^(Blob|File)$/.test(t[Symbol.toStringTag])}};Object.defineProperties(AR.prototype,{size:{enumerable:!0},type:{enumerable:!0},slice:{enumerable:!0}});P1=AR,Vr=P1});var x1,T1,lo,Mb=_t(()=>{Fc();x1=class extends Vr{static{a(this,"File")}#e=0;#t="";constructor(t,n,o={}){if(arguments.length<2)throw new TypeError(`Failed to construct 'File': 2 arguments required, but only ${arguments.length} present.`);super(t,o),o===null&&(o={});let r=o.lastModified===void 0?Date.now():Number(o.lastModified);Number.isNaN(r)||(this.#e=r),this.#t=String(n)}get name(){return this.#t}get lastModified(){return this.#e}get[Symbol.toStringTag](){return"File"}static[Symbol.hasInstance](t){return!!t&&t instanceof Vr&&/^(File)$/.test(t[Symbol.toStringTag])}},T1=x1,lo=T1});function OR(e,t=Vr){var n=`${IR()}${IR()}`.replace(/\./g,"").slice(-28).padStart(32,"-"),o=[],r=`--${n}\r
15
+ Content-Disposition: form-data; name="`;return e.forEach((i,s)=>typeof i=="string"?o.push(r+Lb(s)+`"\r
16
16
  \r
17
- ${u.replace(/\r(?!\n)|(?<!\r)\n/g,`\r
17
+ ${i.replace(/\r(?!\n)|(?<!\r)\n/g,`\r
18
18
  `)}\r
19
- `):n.push(i+Bl(c)+`"; filename="${Bl(u.name,1)}"\r
20
- Content-Type: ${u.type||"application/octet-stream"}\r
19
+ `):o.push(r+Lb(s)+`"; filename="${Lb(i.name,1)}"\r
20
+ Content-Type: ${i.type||"application/octet-stream"}\r
21
21
  \r
22
- `,u,`\r
23
- `)),n.push(`--${r}--`),new e(n,{type:"multipart/form-data; boundary="+r})}var Bi,hC,gC,Tb,yC,wb,Bl,Gn,In,Ns=ct(()=>{Fi();Fl();({toStringTag:Bi,iterator:hC,hasInstance:gC}=Symbol),Tb=Math.random,yC="append,set,get,getAll,delete,keys,values,entries,forEach,constructor".split(","),wb=o((t,e,r)=>(t+="",/^(Blob|File)$/.test(e&&e[Bi])?[(r=r!==void 0?r+"":e[Bi]=="File"?e.name:"blob",t),e.name!==r||e[Bi]=="blob"?new An([e],r,e):e]:[t,e+""]),"f"),Bl=o((t,e)=>(e?t:t.replace(/\r?\n|\r/g,`\r
24
- `)).replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22"),"e"),Gn=o((t,e,r)=>{if(e.length<r)throw new TypeError(`Failed to execute '${t}' on 'FormData': ${r} arguments required, but only ${e.length} present.`)},"x"),In=class{static{o(this,"FormData")}#e=[];constructor(...e){if(e.length)throw new TypeError("Failed to construct 'FormData': parameter 1 is not of type 'HTMLFormElement'.")}get[Bi](){return"FormData"}[hC](){return this.entries()}static[gC](e){return e&&typeof e=="object"&&e[Bi]==="FormData"&&!yC.some(r=>typeof e[r]!="function")}append(...e){Gn("append",arguments,2),this.#e.push(wb(...e))}delete(e){Gn("delete",arguments,1),e+="",this.#e=this.#e.filter(([r])=>r!==e)}get(e){Gn("get",arguments,1),e+="";for(var r=this.#e,n=r.length,i=0;i<n;i++)if(r[i][0]===e)return r[i][1];return null}getAll(e,r){return Gn("getAll",arguments,1),r=[],e+="",this.#e.forEach(n=>n[0]===e&&r.push(n[1])),r}has(e){return Gn("has",arguments,1),e+="",this.#e.some(r=>r[0]===e)}forEach(e,r){Gn("forEach",arguments,1);for(var[n,i]of this)e.call(r,i,n,this)}set(...e){Gn("set",arguments,2);var r=[],n=!0;e=wb(...e),this.#e.forEach(i=>{i[0]===e[0]?n&&(n=!r.push(e)):r.push(i)}),n&&r.push(e),this.#e=r}*entries(){yield*this.#e}*keys(){for(var[e]of this)yield e}*values(){for(var[,e]of this)yield e}};o(xb,"formDataToBlob")});var en,Ds=ct(()=>{en=class extends Error{static{o(this,"FetchBaseError")}constructor(e,r){super(e),Error.captureStackTrace(this,this.constructor),this.type=r}get name(){return this.constructor.name}get[Symbol.toStringTag](){return this.constructor.name}}});var At,ql=ct(()=>{Ds();At=class extends en{static{o(this,"FetchError")}constructor(e,r,n){super(e,r),n&&(this.code=this.errno=n.code,this.erroredSysCall=n.syscall)}}});var Us,Vl,qi,Ab,Ib,Rb,js=ct(()=>{Us=Symbol.toStringTag,Vl=o(t=>typeof t=="object"&&typeof t.append=="function"&&typeof t.delete=="function"&&typeof t.get=="function"&&typeof t.getAll=="function"&&typeof t.has=="function"&&typeof t.set=="function"&&typeof t.sort=="function"&&t[Us]==="URLSearchParams","isURLSearchParameters"),qi=o(t=>t&&typeof t=="object"&&typeof t.arrayBuffer=="function"&&typeof t.type=="string"&&typeof t.stream=="function"&&typeof t.constructor=="function"&&/^(Blob|File)$/.test(t[Us]),"isBlob"),Ab=o(t=>typeof t=="object"&&(t[Us]==="AbortSignal"||t[Us]==="EventTarget"),"isAbortSignal"),Ib=o((t,e)=>{let r=new URL(e).hostname,n=new URL(t).hostname;return r===n||r.endsWith(`.${n}`)},"isDomainOrSubdomain"),Rb=o((t,e)=>{let r=new URL(e).protocol,n=new URL(t).protocol;return r===n},"isSameProtocol")});var Ob=L((RZ,Cb)=>{if(!globalThis.DOMException)try{let{MessageChannel:t}=require("worker_threads"),e=new t().port1,r=new ArrayBuffer;e.postMessage(r,[r,r])}catch(t){t.constructor.name==="DOMException"&&(globalThis.DOMException=t.constructor)}Cb.exports=globalThis.DOMException});var Wn,kb,$b,Hl,zb,Nb,Db,Ub,jb,Mb,Ms,Gl=ct(()=>{Wn=require("node:fs"),kb=require("node:path"),$b=yt(Ob(),1);Fl();Fi();({stat:Hl}=Wn.promises),zb=o((t,e)=>jb((0,Wn.statSync)(t),t,e),"blobFromSync"),Nb=o((t,e)=>Hl(t).then(r=>jb(r,t,e)),"blobFrom"),Db=o((t,e)=>Hl(t).then(r=>Mb(r,t,e)),"fileFrom"),Ub=o((t,e)=>Mb((0,Wn.statSync)(t),t,e),"fileFromSync"),jb=o((t,e,r="")=>new gr([new Ms({path:e,size:t.size,lastModified:t.mtimeMs,start:0})],{type:r}),"fromBlob"),Mb=o((t,e,r="")=>new An([new Ms({path:e,size:t.size,lastModified:t.mtimeMs,start:0})],(0,kb.basename)(e),{type:r,lastModified:t.mtimeMs}),"fromFile"),Ms=class t{static{o(this,"BlobDataItem")}#e;#t;constructor(e){this.#e=e.path,this.#t=e.start,this.size=e.size,this.lastModified=e.lastModified}slice(e,r){return new t({path:this.#e,lastModified:this.lastModified,size:r-e,start:this.#t+e})}async*stream(){let{mtimeMs:e}=await Hl(this.#e);if(e>this.lastModified)throw new $b.default("The requested file could not be read, typically due to permission problems that have occurred after a reference to a file was acquired.","NotReadableError");yield*(0,Wn.createReadStream)(this.#e,{start:this.#t,end:this.#t+this.size-1})}get[Symbol.toStringTag](){return"Blob"}}});var Fb={};qa(Fb,{toFormData:()=>TC});function SC(t){let e=t.match(/\bfilename=("(.*?)"|([^()<>@,;:\\"/[\]?={}\s\t]+))($|;\s)/i);if(!e)return;let r=e[2]||e[3]||"",n=r.slice(r.lastIndexOf("\\")+1);return n=n.replace(/%22/g,'"'),n=n.replace(/&#(\d{4});/g,(i,u)=>String.fromCharCode(u)),n}async function TC(t,e){if(!/multipart/i.test(e))throw new TypeError("Failed to fetch");let r=e.match(/boundary=(?:"([^"]+)"|([^;]+))/i);if(!r)throw new TypeError("no or bad content-type header, no multipart boundary");let n=new Wl(r[1]||r[2]),i,u,c,l,p,f,m=[],y=new In,P=o(w=>{c+=E.decode(w,{stream:!0})},"onPartData"),h=o(w=>{m.push(w)},"appendToFile"),b=o(()=>{let w=new An(m,f,{type:p});y.append(l,w)},"appendFileToFormData"),T=o(()=>{y.append(l,c)},"appendEntryToFormData"),E=new TextDecoder("utf-8");E.decode(),n.onPartBegin=function(){n.onPartData=P,n.onPartEnd=T,i="",u="",c="",l="",p="",f=null,m.length=0},n.onHeaderField=function(w){i+=E.decode(w,{stream:!0})},n.onHeaderValue=function(w){u+=E.decode(w,{stream:!0})},n.onHeaderEnd=function(){if(u+=E.decode(),i=i.toLowerCase(),i==="content-disposition"){let w=u.match(/\bname=("([^"]*)"|([^()<>@,;:\\"/[\]?={}\s\t]+))/i);w&&(l=w[2]||w[3]||""),f=SC(u),f&&(n.onPartData=h,n.onPartEnd=b)}else i==="content-type"&&(p=u);u="",i=""};for await(let w of t)n.write(w);return n.end(),y}var Or,qe,Lb,Rn,Ls,Fs,_C,Vi,bC,vC,EC,PC,Zn,Wl,Bb=ct(()=>{Gl();Ns();Or=0,qe={START_BOUNDARY:Or++,HEADER_FIELD_START:Or++,HEADER_FIELD:Or++,HEADER_VALUE_START:Or++,HEADER_VALUE:Or++,HEADER_VALUE_ALMOST_DONE:Or++,HEADERS_ALMOST_DONE:Or++,PART_DATA_START:Or++,PART_DATA:Or++,END:Or++},Lb=1,Rn={PART_BOUNDARY:Lb,LAST_BOUNDARY:Lb*=2},Ls=10,Fs=13,_C=32,Vi=45,bC=58,vC=97,EC=122,PC=o(t=>t|32,"lower"),Zn=o(()=>{},"noop"),Wl=class{static{o(this,"MultipartParser")}constructor(e){this.index=0,this.flags=0,this.onHeaderEnd=Zn,this.onHeaderField=Zn,this.onHeadersEnd=Zn,this.onHeaderValue=Zn,this.onPartBegin=Zn,this.onPartData=Zn,this.onPartEnd=Zn,this.boundaryChars={},e=`\r
25
- --`+e;let r=new Uint8Array(e.length);for(let n=0;n<e.length;n++)r[n]=e.charCodeAt(n),this.boundaryChars[r[n]]=!0;this.boundary=r,this.lookbehind=new Uint8Array(this.boundary.length+8),this.state=qe.START_BOUNDARY}write(e){let r=0,n=e.length,i=this.index,{lookbehind:u,boundary:c,boundaryChars:l,index:p,state:f,flags:m}=this,y=this.boundary.length,P=y-1,h=e.length,b,T,E=o(W=>{this[W+"Mark"]=r},"mark"),w=o(W=>{delete this[W+"Mark"]},"clear"),k=o((W,H,V,J)=>{(H===void 0||H!==V)&&this[W](J&&J.subarray(H,V))},"callback"),q=o((W,H)=>{let V=W+"Mark";V in this&&(H?(k(W,this[V],r,e),delete this[V]):(k(W,this[V],e.length,e),this[V]=0))},"dataCallback");for(r=0;r<n;r++)switch(b=e[r],f){case qe.START_BOUNDARY:if(p===c.length-2){if(b===Vi)m|=Rn.LAST_BOUNDARY;else if(b!==Fs)return;p++;break}else if(p-1===c.length-2){if(m&Rn.LAST_BOUNDARY&&b===Vi)f=qe.END,m=0;else if(!(m&Rn.LAST_BOUNDARY)&&b===Ls)p=0,k("onPartBegin"),f=qe.HEADER_FIELD_START;else return;break}b!==c[p+2]&&(p=-2),b===c[p+2]&&p++;break;case qe.HEADER_FIELD_START:f=qe.HEADER_FIELD,E("onHeaderField"),p=0;case qe.HEADER_FIELD:if(b===Fs){w("onHeaderField"),f=qe.HEADERS_ALMOST_DONE;break}if(p++,b===Vi)break;if(b===bC){if(p===1)return;q("onHeaderField",!0),f=qe.HEADER_VALUE_START;break}if(T=PC(b),T<vC||T>EC)return;break;case qe.HEADER_VALUE_START:if(b===_C)break;E("onHeaderValue"),f=qe.HEADER_VALUE;case qe.HEADER_VALUE:b===Fs&&(q("onHeaderValue",!0),k("onHeaderEnd"),f=qe.HEADER_VALUE_ALMOST_DONE);break;case qe.HEADER_VALUE_ALMOST_DONE:if(b!==Ls)return;f=qe.HEADER_FIELD_START;break;case qe.HEADERS_ALMOST_DONE:if(b!==Ls)return;k("onHeadersEnd"),f=qe.PART_DATA_START;break;case qe.PART_DATA_START:f=qe.PART_DATA,E("onPartData");case qe.PART_DATA:if(i=p,p===0){for(r+=P;r<h&&!(e[r]in l);)r+=y;r-=P,b=e[r]}if(p<c.length)c[p]===b?(p===0&&q("onPartData",!0),p++):p=0;else if(p===c.length)p++,b===Fs?m|=Rn.PART_BOUNDARY:b===Vi?m|=Rn.LAST_BOUNDARY:p=0;else if(p-1===c.length)if(m&Rn.PART_BOUNDARY){if(p=0,b===Ls){m&=~Rn.PART_BOUNDARY,k("onPartEnd"),k("onPartBegin"),f=qe.HEADER_FIELD_START;break}}else m&Rn.LAST_BOUNDARY&&b===Vi?(k("onPartEnd"),f=qe.END,m=0):p=0;if(p>0)u[p-1]=b;else if(i>0){let W=new Uint8Array(u.buffer,u.byteOffset,u.byteLength);k("onPartData",0,i,W),i=0,E("onPartData"),r--}break;case qe.END:break;default:throw new Error(`Unexpected state entered: ${f}`)}q("onHeaderField"),q("onHeaderValue"),q("onPartData"),this.index=p,this.state=f,this.flags=m}end(){if(this.state===qe.HEADER_FIELD_START&&this.index===0||this.state===qe.PART_DATA&&this.index===this.boundary.length)this.onPartEnd();else if(this.state!==qe.END)throw new Error("MultipartParser.end(): stream ended unexpectedly")}};o(SC,"_fileName");o(TC,"toFormData")});async function Zl(t){if(t[zt].disturbed)throw new TypeError(`body used already for: ${t.url}`);if(t[zt].disturbed=!0,t[zt].error)throw t[zt].error;let{body:e}=t;if(e===null)return qt.Buffer.alloc(0);if(!(e instanceof ir.default))return qt.Buffer.alloc(0);let r=[],n=0;try{for await(let i of e){if(t.size>0&&n+i.length>t.size){let u=new At(`content size at ${t.url} over limit: ${t.size}`,"max-size");throw e.destroy(u),u}n+=i.length,r.push(i)}}catch(i){throw i instanceof en?i:new At(`Invalid response body while trying to fetch ${t.url}: ${i.message}`,"system",i)}if(e.readableEnded===!0||e._readableState.ended===!0)try{return r.every(i=>typeof i=="string")?qt.Buffer.from(r.join("")):qt.Buffer.concat(r,n)}catch(i){throw new At(`Could not create Buffer from response body for ${t.url}: ${i.message}`,"system",i)}else throw new At(`Premature close of server response while trying to fetch ${t.url}`)}var ir,tn,qt,wC,zt,kr,Do,xC,Bs,qb,Vb,qs=ct(()=>{ir=yt(require("node:stream"),1),tn=require("node:util"),qt=require("node:buffer");Fi();Ns();ql();Ds();js();wC=(0,tn.promisify)(ir.default.pipeline),zt=Symbol("Body internals"),kr=class{static{o(this,"Body")}constructor(e,{size:r=0}={}){let n=null;e===null?e=null:Vl(e)?e=qt.Buffer.from(e.toString()):qi(e)||qt.Buffer.isBuffer(e)||(tn.types.isAnyArrayBuffer(e)?e=qt.Buffer.from(e):ArrayBuffer.isView(e)?e=qt.Buffer.from(e.buffer,e.byteOffset,e.byteLength):e instanceof ir.default||(e instanceof In?(e=xb(e),n=e.type.split("=")[1]):e=qt.Buffer.from(String(e))));let i=e;qt.Buffer.isBuffer(e)?i=ir.default.Readable.from(e):qi(e)&&(i=ir.default.Readable.from(e.stream())),this[zt]={body:e,stream:i,boundary:n,disturbed:!1,error:null},this.size=r,e instanceof ir.default&&e.on("error",u=>{let c=u instanceof en?u:new At(`Invalid response body while trying to fetch ${this.url}: ${u.message}`,"system",u);this[zt].error=c})}get body(){return this[zt].stream}get bodyUsed(){return this[zt].disturbed}async arrayBuffer(){let{buffer:e,byteOffset:r,byteLength:n}=await Zl(this);return e.slice(r,r+n)}async formData(){let e=this.headers.get("content-type");if(e.startsWith("application/x-www-form-urlencoded")){let n=new In,i=new URLSearchParams(await this.text());for(let[u,c]of i)n.append(u,c);return n}let{toFormData:r}=await Promise.resolve().then(()=>(Bb(),Fb));return r(this.body,e)}async blob(){let e=this.headers&&this.headers.get("content-type")||this[zt].body&&this[zt].body.type||"",r=await this.arrayBuffer();return new gr([r],{type:e})}async json(){let e=await this.text();return JSON.parse(e)}async text(){let e=await Zl(this);return new TextDecoder().decode(e)}buffer(){return Zl(this)}};kr.prototype.buffer=(0,tn.deprecate)(kr.prototype.buffer,"Please use 'response.arrayBuffer()' instead of 'response.buffer()'","node-fetch#buffer");Object.defineProperties(kr.prototype,{body:{enumerable:!0},bodyUsed:{enumerable:!0},arrayBuffer:{enumerable:!0},blob:{enumerable:!0},json:{enumerable:!0},text:{enumerable:!0},data:{get:(0,tn.deprecate)(()=>{},"data doesn't exist, use json(), text(), arrayBuffer(), or body instead","https://github.com/node-fetch/node-fetch/issues/1000 (response)")}});o(Zl,"consumeBody");Do=o((t,e)=>{let r,n,{body:i}=t[zt];if(t.bodyUsed)throw new Error("cannot clone body after it is used");return i instanceof ir.default&&typeof i.getBoundary!="function"&&(r=new ir.PassThrough({highWaterMark:e}),n=new ir.PassThrough({highWaterMark:e}),i.pipe(r),i.pipe(n),t[zt].stream=r,i=n),i},"clone"),xC=(0,tn.deprecate)(t=>t.getBoundary(),"form-data doesn't follow the spec and requires special treatment. Use alternative package","https://github.com/node-fetch/node-fetch/issues/1167"),Bs=o((t,e)=>t===null?null:typeof t=="string"?"text/plain;charset=UTF-8":Vl(t)?"application/x-www-form-urlencoded;charset=UTF-8":qi(t)?t.type||null:qt.Buffer.isBuffer(t)||tn.types.isAnyArrayBuffer(t)||ArrayBuffer.isView(t)?null:t instanceof In?`multipart/form-data; boundary=${e[zt].boundary}`:t&&typeof t.getBoundary=="function"?`multipart/form-data;boundary=${xC(t)}`:t instanceof ir.default?null:"text/plain;charset=UTF-8","extractContentType"),qb=o(t=>{let{body:e}=t[zt];return e===null?0:qi(e)?e.size:qt.Buffer.isBuffer(e)?e.length:e&&typeof e.getLengthSync=="function"&&e.hasKnownLength&&e.hasKnownLength()?e.getLengthSync():null},"getTotalBytes"),Vb=o(async(t,{body:e})=>{e===null?t.end():await wC(e,t)},"writeToStream")});function Hb(t=[]){return new Nt(t.reduce((e,r,n,i)=>(n%2===0&&e.push(i.slice(n,n+2)),e),[]).filter(([e,r])=>{try{return Vs(e),Kl(e,String(r)),!0}catch{return!1}}))}var Jl,Hi,Vs,Kl,Nt,Hs=ct(()=>{Jl=require("node:util"),Hi=yt(require("node:http"),1),Vs=typeof Hi.default.validateHeaderName=="function"?Hi.default.validateHeaderName:t=>{if(!/^[\^`\-\w!#$%&'*+.|~]+$/.test(t)){let e=new TypeError(`Header name must be a valid HTTP token [${t}]`);throw Object.defineProperty(e,"code",{value:"ERR_INVALID_HTTP_TOKEN"}),e}},Kl=typeof Hi.default.validateHeaderValue=="function"?Hi.default.validateHeaderValue:(t,e)=>{if(/[^\t\u0020-\u007E\u0080-\u00FF]/.test(e)){let r=new TypeError(`Invalid character in header content ["${t}"]`);throw Object.defineProperty(r,"code",{value:"ERR_INVALID_CHAR"}),r}},Nt=class t extends URLSearchParams{static{o(this,"Headers")}constructor(e){let r=[];if(e instanceof t){let n=e.raw();for(let[i,u]of Object.entries(n))r.push(...u.map(c=>[i,c]))}else if(e!=null)if(typeof e=="object"&&!Jl.types.isBoxedPrimitive(e)){let n=e[Symbol.iterator];if(n==null)r.push(...Object.entries(e));else{if(typeof n!="function")throw new TypeError("Header pairs must be iterable");r=[...e].map(i=>{if(typeof i!="object"||Jl.types.isBoxedPrimitive(i))throw new TypeError("Each header pair must be an iterable object");return[...i]}).map(i=>{if(i.length!==2)throw new TypeError("Each header pair must be a name/value tuple");return[...i]})}}else throw new TypeError("Failed to construct 'Headers': The provided value is not of type '(sequence<sequence<ByteString>> or record<ByteString, ByteString>)");return r=r.length>0?r.map(([n,i])=>(Vs(n),Kl(n,String(i)),[String(n).toLowerCase(),String(i)])):void 0,super(r),new Proxy(this,{get(n,i,u){switch(i){case"append":case"set":return(c,l)=>(Vs(c),Kl(c,String(l)),URLSearchParams.prototype[i].call(n,String(c).toLowerCase(),String(l)));case"delete":case"has":case"getAll":return c=>(Vs(c),URLSearchParams.prototype[i].call(n,String(c).toLowerCase()));case"keys":return()=>(n.sort(),new Set(URLSearchParams.prototype.keys.call(n)).keys());default:return Reflect.get(n,i,u)}}})}get[Symbol.toStringTag](){return this.constructor.name}toString(){return Object.prototype.toString.call(this)}get(e){let r=this.getAll(e);if(r.length===0)return null;let n=r.join(", ");return/^content-encoding$/i.test(e)&&(n=n.toLowerCase()),n}forEach(e,r=void 0){for(let n of this.keys())Reflect.apply(e,r,[this.get(n),n,this])}*values(){for(let e of this.keys())yield this.get(e)}*entries(){for(let e of this.keys())yield[e,this.get(e)]}[Symbol.iterator](){return this.entries()}raw(){return[...this.keys()].reduce((e,r)=>(e[r]=this.getAll(r),e),{})}[Symbol.for("nodejs.util.inspect.custom")](){return[...this.keys()].reduce((e,r)=>{let n=this.getAll(r);return r==="host"?e[r]=n[0]:e[r]=n.length>1?n:n[0],e},{})}};Object.defineProperties(Nt.prototype,["get","entries","forEach","values"].reduce((t,e)=>(t[e]={enumerable:!0},t),{}));o(Hb,"fromRawHeaders")});var AC,Gi,Ql=ct(()=>{AC=new Set([301,302,303,307,308]),Gi=o(t=>AC.has(t),"isRedirect")});var yr,Vt,Gb=ct(()=>{Hs();qs();Ql();yr=Symbol("Response internals"),Vt=class t extends kr{static{o(this,"Response")}constructor(e=null,r={}){super(e,r);let n=r.status!=null?r.status:200,i=new Nt(r.headers);if(e!==null&&!i.has("Content-Type")){let u=Bs(e,this);u&&i.append("Content-Type",u)}this[yr]={type:"default",url:r.url,status:n,statusText:r.statusText||"",headers:i,counter:r.counter,highWaterMark:r.highWaterMark}}get type(){return this[yr].type}get url(){return this[yr].url||""}get status(){return this[yr].status}get ok(){return this[yr].status>=200&&this[yr].status<300}get redirected(){return this[yr].counter>0}get statusText(){return this[yr].statusText}get headers(){return this[yr].headers}get highWaterMark(){return this[yr].highWaterMark}clone(){return new t(Do(this,this.highWaterMark),{type:this.type,url:this.url,status:this.status,statusText:this.statusText,headers:this.headers,ok:this.ok,redirected:this.redirected,size:this.size,highWaterMark:this.highWaterMark})}static redirect(e,r=302){if(!Gi(r))throw new RangeError('Failed to execute "redirect" on "response": Invalid status code');return new t(null,{headers:{location:new URL(e).toString()},status:r})}static error(){let e=new t(null,{status:0,statusText:""});return e[yr].type="error",e}static json(e=void 0,r={}){let n=JSON.stringify(e);if(n===void 0)throw new TypeError("data is not JSON serializable");let i=new Nt(r&&r.headers);return i.has("content-type")||i.set("content-type","application/json"),new t(n,{...r,headers:i})}get[Symbol.toStringTag](){return"Response"}};Object.defineProperties(Vt.prototype,{type:{enumerable:!0},url:{enumerable:!0},status:{enumerable:!0},ok:{enumerable:!0},redirected:{enumerable:!0},statusText:{enumerable:!0},headers:{enumerable:!0},clone:{enumerable:!0}})});var Wb,Zb=ct(()=>{Wb=o(t=>{if(t.search)return t.search;let e=t.href.length-1,r=t.hash||(t.href[e]==="#"?"#":"");return t.href[e-r.length]==="?"?"?":""},"getSearch")});function Jb(t,e=!1){return t==null||(t=new URL(t),/^(about|blob|data):$/.test(t.protocol))?"no-referrer":(t.username="",t.password="",t.hash="",e&&(t.pathname="",t.search=""),t)}function Xb(t){if(!Qb.has(t))throw new TypeError(`Invalid referrerPolicy: ${t}`);return t}function IC(t){if(/^(http|ws)s:$/.test(t.protocol))return!0;let e=t.host.replace(/(^\[)|(]$)/g,""),r=(0,Kb.isIP)(e);return r===4&&/^127\./.test(e)||r===6&&/^(((0+:){7})|(::(0+:){0,6}))0*1$/.test(e)?!0:t.host==="localhost"||t.host.endsWith(".localhost")?!1:t.protocol==="file:"}function Uo(t){return/^about:(blank|srcdoc)$/.test(t)||t.protocol==="data:"||/^(blob|filesystem):$/.test(t.protocol)?!0:IC(t)}function ev(t,{referrerURLCallback:e,referrerOriginCallback:r}={}){if(t.referrer==="no-referrer"||t.referrerPolicy==="")return null;let n=t.referrerPolicy;if(t.referrer==="about:client")return"no-referrer";let i=t.referrer,u=Jb(i),c=Jb(i,!0);u.toString().length>4096&&(u=c),e&&(u=e(u)),r&&(c=r(c));let l=new URL(t.url);switch(n){case"no-referrer":return"no-referrer";case"origin":return c;case"unsafe-url":return u;case"strict-origin":return Uo(u)&&!Uo(l)?"no-referrer":c.toString();case"strict-origin-when-cross-origin":return u.origin===l.origin?u:Uo(u)&&!Uo(l)?"no-referrer":c;case"same-origin":return u.origin===l.origin?u:"no-referrer";case"origin-when-cross-origin":return u.origin===l.origin?u:c;case"no-referrer-when-downgrade":return Uo(u)&&!Uo(l)?"no-referrer":u;default:throw new TypeError(`Invalid referrerPolicy: ${n}`)}}function tv(t){let e=(t.get("referrer-policy")||"").split(/[,\s]+/),r="";for(let n of e)n&&Qb.has(n)&&(r=n);return r}var Kb,Qb,Yb,Yl=ct(()=>{Kb=require("node:net");o(Jb,"stripURLForUseAsAReferrer");Qb=new Set(["","no-referrer","no-referrer-when-downgrade","same-origin","origin","strict-origin","origin-when-cross-origin","strict-origin-when-cross-origin","unsafe-url"]),Yb="strict-origin-when-cross-origin";o(Xb,"validateReferrerPolicy");o(IC,"isOriginPotentiallyTrustworthy");o(Uo,"isUrlPotentiallyTrustworthy");o(ev,"determineRequestsReferrer");o(tv,"parseReferrerPolicyFromHeader")});var rv,nv,mt,Wi,RC,Cn,ov,iv=ct(()=>{rv=require("node:url"),nv=require("node:util");Hs();qs();js();Zb();Yl();mt=Symbol("Request internals"),Wi=o(t=>typeof t=="object"&&typeof t[mt]=="object","isRequest"),RC=(0,nv.deprecate)(()=>{},".data is not a valid RequestInit property, use .body instead","https://github.com/node-fetch/node-fetch/issues/1000 (request)"),Cn=class t extends kr{static{o(this,"Request")}constructor(e,r={}){let n;if(Wi(e)?n=new URL(e.url):(n=new URL(e),e={}),n.username!==""||n.password!=="")throw new TypeError(`${n} is an url with embedded credentials.`);let i=r.method||e.method||"GET";if(/^(delete|get|head|options|post|put)$/i.test(i)&&(i=i.toUpperCase()),!Wi(r)&&"data"in r&&RC(),(r.body!=null||Wi(e)&&e.body!==null)&&(i==="GET"||i==="HEAD"))throw new TypeError("Request with GET/HEAD method cannot have body");let u=r.body?r.body:Wi(e)&&e.body!==null?Do(e):null;super(u,{size:r.size||e.size||0});let c=new Nt(r.headers||e.headers||{});if(u!==null&&!c.has("Content-Type")){let f=Bs(u,this);f&&c.set("Content-Type",f)}let l=Wi(e)?e.signal:null;if("signal"in r&&(l=r.signal),l!=null&&!Ab(l))throw new TypeError("Expected signal to be an instanceof AbortSignal or EventTarget");let p=r.referrer==null?e.referrer:r.referrer;if(p==="")p="no-referrer";else if(p){let f=new URL(p);p=/^about:(\/\/)?client$/.test(f)?"client":f}else p=void 0;this[mt]={method:i,redirect:r.redirect||e.redirect||"follow",headers:c,parsedURL:n,signal:l,referrer:p},this.follow=r.follow===void 0?e.follow===void 0?20:e.follow:r.follow,this.compress=r.compress===void 0?e.compress===void 0?!0:e.compress:r.compress,this.counter=r.counter||e.counter||0,this.agent=r.agent||e.agent,this.highWaterMark=r.highWaterMark||e.highWaterMark||16384,this.insecureHTTPParser=r.insecureHTTPParser||e.insecureHTTPParser||!1,this.referrerPolicy=r.referrerPolicy||e.referrerPolicy||""}get method(){return this[mt].method}get url(){return(0,rv.format)(this[mt].parsedURL)}get headers(){return this[mt].headers}get redirect(){return this[mt].redirect}get signal(){return this[mt].signal}get referrer(){if(this[mt].referrer==="no-referrer")return"";if(this[mt].referrer==="client")return"about:client";if(this[mt].referrer)return this[mt].referrer.toString()}get referrerPolicy(){return this[mt].referrerPolicy}set referrerPolicy(e){this[mt].referrerPolicy=Xb(e)}clone(){return new t(this)}get[Symbol.toStringTag](){return"Request"}};Object.defineProperties(Cn.prototype,{method:{enumerable:!0},url:{enumerable:!0},headers:{enumerable:!0},redirect:{enumerable:!0},clone:{enumerable:!0},signal:{enumerable:!0},referrer:{enumerable:!0},referrerPolicy:{enumerable:!0}});ov=o(t=>{let{parsedURL:e}=t[mt],r=new Nt(t[mt].headers);r.has("Accept")||r.set("Accept","*/*");let n=null;if(t.body===null&&/^(post|put)$/i.test(t.method)&&(n="0"),t.body!==null){let l=qb(t);typeof l=="number"&&!Number.isNaN(l)&&(n=String(l))}n&&r.set("Content-Length",n),t.referrerPolicy===""&&(t.referrerPolicy=Yb),t.referrer&&t.referrer!=="no-referrer"?t[mt].referrer=ev(t):t[mt].referrer="no-referrer",t[mt].referrer instanceof URL&&r.set("Referer",t.referrer),r.has("User-Agent")||r.set("User-Agent","node-fetch"),t.compress&&!r.has("Accept-Encoding")&&r.set("Accept-Encoding","gzip, deflate, br");let{agent:i}=t;typeof i=="function"&&(i=i(e));let u=Wb(e),c={path:e.pathname+u,method:t.method,headers:r[Symbol.for("nodejs.util.inspect.custom")](),insecureHTTPParser:t.insecureHTTPParser,agent:i};return{parsedURL:e,options:c}},"getNodeRequestOptions")});var Zi,av=ct(()=>{Ds();Zi=class extends en{static{o(this,"AbortError")}constructor(e,r="aborted"){super(e,r)}}});var cv={};qa(cv,{AbortError:()=>Zi,Blob:()=>gr,FetchError:()=>At,File:()=>An,FormData:()=>In,Headers:()=>Nt,Request:()=>Cn,Response:()=>Vt,blobFrom:()=>Nb,blobFromSync:()=>zb,default:()=>Xl,fileFrom:()=>Db,fileFromSync:()=>Ub,isRedirect:()=>Gi});async function Xl(t,e){return new Promise((r,n)=>{let i=new Cn(t,e),{parsedURL:u,options:c}=ov(i);if(!CC.has(u.protocol))throw new TypeError(`node-fetch cannot load ${t}. URL scheme "${u.protocol.replace(/:$/,"")}" is not supported.`);if(u.protocol==="data:"){let b=yb(i.url),T=new Vt(b,{headers:{"Content-Type":b.typeFull}});r(T);return}let l=(u.protocol==="https:"?uv.default:sv.default).request,{signal:p}=i,f=null,m=o(()=>{let b=new Zi("The operation was aborted.");n(b),i.body&&i.body instanceof Ht.default.Readable&&i.body.destroy(b),!(!f||!f.body)&&f.body.emit("error",b)},"abort");if(p&&p.aborted){m();return}let y=o(()=>{m(),h()},"abortAndFinalize"),P=l(u.toString(),c);p&&p.addEventListener("abort",y);let h=o(()=>{P.abort(),p&&p.removeEventListener("abort",y)},"finalize");P.on("error",b=>{n(new At(`request to ${i.url} failed, reason: ${b.message}`,"system",b)),h()}),OC(P,b=>{f&&f.body&&f.body.destroy(b)}),process.version<"v14"&&P.on("socket",b=>{let T;b.prependListener("end",()=>{T=b._eventsCount}),b.prependListener("close",E=>{if(f&&T<b._eventsCount&&!E){let w=new Error("Premature close");w.code="ERR_STREAM_PREMATURE_CLOSE",f.body.emit("error",w)}})}),P.on("response",b=>{P.setTimeout(0);let T=Hb(b.rawHeaders);if(Gi(b.statusCode)){let W=T.get("Location"),H=null;try{H=W===null?null:new URL(W,i.url)}catch{if(i.redirect!=="manual"){n(new At(`uri requested responds with an invalid redirect URL: ${W}`,"invalid-redirect")),h();return}}switch(i.redirect){case"error":n(new At(`uri requested responds with a redirect, redirect mode is set to error: ${i.url}`,"no-redirect")),h();return;case"manual":break;case"follow":{if(H===null)break;if(i.counter>=i.follow){n(new At(`maximum redirect reached at: ${i.url}`,"max-redirect")),h();return}let V={headers:new Nt(i.headers),follow:i.follow,counter:i.counter+1,agent:i.agent,compress:i.compress,method:i.method,body:Do(i),signal:i.signal,size:i.size,referrer:i.referrer,referrerPolicy:i.referrerPolicy};if(!Ib(i.url,H)||!Rb(i.url,H))for(let re of["authorization","www-authenticate","cookie","cookie2"])V.headers.delete(re);if(b.statusCode!==303&&i.body&&e.body instanceof Ht.default.Readable){n(new At("Cannot follow redirect with body being a readable stream","unsupported-redirect")),h();return}(b.statusCode===303||(b.statusCode===301||b.statusCode===302)&&i.method==="POST")&&(V.method="GET",V.body=void 0,V.headers.delete("content-length"));let J=tv(T);J&&(V.referrerPolicy=J),r(Xl(new Cn(H,V))),h();return}default:return n(new TypeError(`Redirect option '${i.redirect}' is not a valid value of RequestRedirect`))}}p&&b.once("end",()=>{p.removeEventListener("abort",y)});let E=(0,Ht.pipeline)(b,new Ht.PassThrough,W=>{W&&n(W)});process.version<"v12.10"&&b.on("aborted",y);let w={url:i.url,status:b.statusCode,statusText:b.statusMessage,headers:T,size:i.size,counter:i.counter,highWaterMark:i.highWaterMark},k=T.get("Content-Encoding");if(!i.compress||i.method==="HEAD"||k===null||b.statusCode===204||b.statusCode===304){f=new Vt(E,w),r(f);return}let q={flush:Jn.default.Z_SYNC_FLUSH,finishFlush:Jn.default.Z_SYNC_FLUSH};if(k==="gzip"||k==="x-gzip"){E=(0,Ht.pipeline)(E,Jn.default.createGunzip(q),W=>{W&&n(W)}),f=new Vt(E,w),r(f);return}if(k==="deflate"||k==="x-deflate"){let W=(0,Ht.pipeline)(b,new Ht.PassThrough,H=>{H&&n(H)});W.once("data",H=>{(H[0]&15)===8?E=(0,Ht.pipeline)(E,Jn.default.createInflate(),V=>{V&&n(V)}):E=(0,Ht.pipeline)(E,Jn.default.createInflateRaw(),V=>{V&&n(V)}),f=new Vt(E,w),r(f)}),W.once("end",()=>{f||(f=new Vt(E,w),r(f))});return}if(k==="br"){E=(0,Ht.pipeline)(E,Jn.default.createBrotliDecompress(),W=>{W&&n(W)}),f=new Vt(E,w),r(f);return}f=new Vt(E,w),r(f)}),Vb(P,i).catch(n)})}function OC(t,e){let r=Ji.Buffer.from(`0\r
22
+ `,i,`\r
23
+ `)),o.push(`--${n}--`),new t(o,{type:"multipart/form-data; boundary="+n})}var Bc,w1,A1,IR,I1,RR,Lb,Ko,po,Xp=_t(()=>{Fc();Mb();({toStringTag:Bc,iterator:w1,hasInstance:A1}=Symbol),IR=Math.random,I1="append,set,get,getAll,delete,keys,values,entries,forEach,constructor".split(","),RR=a((e,t,n)=>(e+="",/^(Blob|File)$/.test(t&&t[Bc])?[(n=n!==void 0?n+"":t[Bc]=="File"?t.name:"blob",e),t.name!==n||t[Bc]=="blob"?new lo([t],n,t):t]:[e,t+""]),"f"),Lb=a((e,t)=>(t?e:e.replace(/\r?\n|\r/g,`\r
24
+ `)).replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22"),"e"),Ko=a((e,t,n)=>{if(t.length<n)throw new TypeError(`Failed to execute '${e}' on 'FormData': ${n} arguments required, but only ${t.length} present.`)},"x"),po=class{static{a(this,"FormData")}#e=[];constructor(...t){if(t.length)throw new TypeError("Failed to construct 'FormData': parameter 1 is not of type 'HTMLFormElement'.")}get[Bc](){return"FormData"}[w1](){return this.entries()}static[A1](t){return t&&typeof t=="object"&&t[Bc]==="FormData"&&!I1.some(n=>typeof t[n]!="function")}append(...t){Ko("append",arguments,2),this.#e.push(RR(...t))}delete(t){Ko("delete",arguments,1),t+="",this.#e=this.#e.filter(([n])=>n!==t)}get(t){Ko("get",arguments,1),t+="";for(var n=this.#e,o=n.length,r=0;r<o;r++)if(n[r][0]===t)return n[r][1];return null}getAll(t,n){return Ko("getAll",arguments,1),n=[],t+="",this.#e.forEach(o=>o[0]===t&&n.push(o[1])),n}has(t){return Ko("has",arguments,1),t+="",this.#e.some(n=>n[0]===t)}forEach(t,n){Ko("forEach",arguments,1);for(var[o,r]of this)t.call(n,r,o,this)}set(...t){Ko("set",arguments,2);var n=[],o=!0;t=RR(...t),this.#e.forEach(r=>{r[0]===t[0]?o&&(o=!n.push(t)):n.push(r)}),o&&n.push(t),this.#e=n}*entries(){yield*this.#e}*keys(){for(var[t]of this)yield t}*values(){for(var[,t]of this)yield t}};a(OR,"formDataToBlob")});var kn,Qp=_t(()=>{kn=class extends Error{static{a(this,"FetchBaseError")}constructor(t,n){super(t),Error.captureStackTrace(this,this.constructor),this.type=n}get name(){return this.constructor.name}get[Symbol.toStringTag](){return this.constructor.name}}});var qt,Fb=_t(()=>{Qp();qt=class extends kn{static{a(this,"FetchError")}constructor(t,n,o){super(t,n),o&&(this.code=this.errno=o.code,this.erroredSysCall=o.syscall)}}});var Yp,Bb,qc,kR,CR,$R,ef=_t(()=>{Yp=Symbol.toStringTag,Bb=a(e=>typeof e=="object"&&typeof e.append=="function"&&typeof e.delete=="function"&&typeof e.get=="function"&&typeof e.getAll=="function"&&typeof e.has=="function"&&typeof e.set=="function"&&typeof e.sort=="function"&&e[Yp]==="URLSearchParams","isURLSearchParameters"),qc=a(e=>e&&typeof e=="object"&&typeof e.arrayBuffer=="function"&&typeof e.type=="string"&&typeof e.stream=="function"&&typeof e.constructor=="function"&&/^(Blob|File)$/.test(e[Yp]),"isBlob"),kR=a(e=>typeof e=="object"&&(e[Yp]==="AbortSignal"||e[Yp]==="EventTarget"),"isAbortSignal"),CR=a((e,t)=>{let n=new URL(t).hostname,o=new URL(e).hostname;return n===o||n.endsWith(`.${o}`)},"isDomainOrSubdomain"),$R=a((e,t)=>{let n=new URL(t).protocol,o=new URL(e).protocol;return n===o},"isSameProtocol")});var NR=B((aY,zR)=>{if(!globalThis.DOMException)try{let{MessageChannel:e}=require("worker_threads"),t=new e().port1,n=new ArrayBuffer;t.postMessage(n,[n,n])}catch(e){e.constructor.name==="DOMException"&&(globalThis.DOMException=e.constructor)}zR.exports=globalThis.DOMException});var Xo,DR,UR,qb,jR,MR,LR,FR,BR,qR,tf,Vb=_t(()=>{Xo=require("node:fs"),DR=require("node:path"),UR=It(NR(),1);Mb();Fc();({stat:qb}=Xo.promises),jR=a((e,t)=>BR((0,Xo.statSync)(e),e,t),"blobFromSync"),MR=a((e,t)=>qb(e).then(n=>BR(n,e,t)),"blobFrom"),LR=a((e,t)=>qb(e).then(n=>qR(n,e,t)),"fileFrom"),FR=a((e,t)=>qR((0,Xo.statSync)(e),e,t),"fileFromSync"),BR=a((e,t,n="")=>new Vr([new tf({path:t,size:e.size,lastModified:e.mtimeMs,start:0})],{type:n}),"fromBlob"),qR=a((e,t,n="")=>new lo([new tf({path:t,size:e.size,lastModified:e.mtimeMs,start:0})],(0,DR.basename)(t),{type:n,lastModified:e.mtimeMs}),"fromFile"),tf=class e{static{a(this,"BlobDataItem")}#e;#t;constructor(t){this.#e=t.path,this.#t=t.start,this.size=t.size,this.lastModified=t.lastModified}slice(t,n){return new e({path:this.#e,lastModified:this.lastModified,size:n-t,start:this.#t+t})}async*stream(){let{mtimeMs:t}=await qb(this.#e);if(t>this.lastModified)throw new UR.default("The requested file could not be read, typically due to permission problems that have occurred after a reference to a file was acquired.","NotReadableError");yield*(0,Xo.createReadStream)(this.#e,{start:this.#t,end:this.#t+this.size-1})}get[Symbol.toStringTag](){return"Blob"}}});var ZR={};ar(ZR,{toFormData:()=>N1});function z1(e){let t=e.match(/\bfilename=("(.*?)"|([^()<>@,;:\\"/[\]?={}\s\t]+))($|;\s)/i);if(!t)return;let n=t[2]||t[3]||"",o=n.slice(n.lastIndexOf("\\")+1);return o=o.replace(/%22/g,'"'),o=o.replace(/&#(\d{4});/g,(r,i)=>String.fromCharCode(i)),o}async function N1(e,t){if(!/multipart/i.test(t))throw new TypeError("Failed to fetch");let n=t.match(/boundary=(?:"([^"]+)"|([^;]+))/i);if(!n)throw new TypeError("no or bad content-type header, no multipart boundary");let o=new Zb(n[1]||n[2]),r,i,s,u,d,p,f=[],g=new po,y=a(S=>{s+=x.decode(S,{stream:!0})},"onPartData"),h=a(S=>{f.push(S)},"appendToFile"),_=a(()=>{let S=new lo(f,p,{type:d});g.append(u,S)},"appendFileToFormData"),P=a(()=>{g.append(u,s)},"appendEntryToFormData"),x=new TextDecoder("utf-8");x.decode(),o.onPartBegin=function(){o.onPartData=y,o.onPartEnd=P,r="",i="",s="",u="",d="",p=null,f.length=0},o.onHeaderField=function(S){r+=x.decode(S,{stream:!0})},o.onHeaderValue=function(S){i+=x.decode(S,{stream:!0})},o.onHeaderEnd=function(){if(i+=x.decode(),r=r.toLowerCase(),r==="content-disposition"){let S=i.match(/\bname=("([^"]*)"|([^()<>@,;:\\"/[\]?={}\s\t]+))/i);S&&(u=S[2]||S[3]||""),p=z1(i),p&&(o.onPartData=h,o.onPartEnd=_)}else r==="content-type"&&(d=i);i="",r=""};for await(let S of e)o.write(S);return o.end(),g}var on,Qe,VR,fo,rf,nf,R1,Vc,O1,k1,C1,$1,Qo,Zb,HR=_t(()=>{Vb();Xp();on=0,Qe={START_BOUNDARY:on++,HEADER_FIELD_START:on++,HEADER_FIELD:on++,HEADER_VALUE_START:on++,HEADER_VALUE:on++,HEADER_VALUE_ALMOST_DONE:on++,HEADERS_ALMOST_DONE:on++,PART_DATA_START:on++,PART_DATA:on++,END:on++},VR=1,fo={PART_BOUNDARY:VR,LAST_BOUNDARY:VR*=2},rf=10,nf=13,R1=32,Vc=45,O1=58,k1=97,C1=122,$1=a(e=>e|32,"lower"),Qo=a(()=>{},"noop"),Zb=class{static{a(this,"MultipartParser")}constructor(t){this.index=0,this.flags=0,this.onHeaderEnd=Qo,this.onHeaderField=Qo,this.onHeadersEnd=Qo,this.onHeaderValue=Qo,this.onPartBegin=Qo,this.onPartData=Qo,this.onPartEnd=Qo,this.boundaryChars={},t=`\r
25
+ --`+t;let n=new Uint8Array(t.length);for(let o=0;o<t.length;o++)n[o]=t.charCodeAt(o),this.boundaryChars[n[o]]=!0;this.boundary=n,this.lookbehind=new Uint8Array(this.boundary.length+8),this.state=Qe.START_BOUNDARY}write(t){let n=0,o=t.length,r=this.index,{lookbehind:i,boundary:s,boundaryChars:u,index:d,state:p,flags:f}=this,g=this.boundary.length,y=g-1,h=t.length,_,P,x=a(W=>{this[W+"Mark"]=n},"mark"),S=a(W=>{delete this[W+"Mark"]},"clear"),$=a((W,Z,G,te)=>{(Z===void 0||Z!==G)&&this[W](te&&te.subarray(Z,G))},"callback"),V=a((W,Z)=>{let G=W+"Mark";G in this&&(Z?($(W,this[G],n,t),delete this[G]):($(W,this[G],t.length,t),this[G]=0))},"dataCallback");for(n=0;n<o;n++)switch(_=t[n],p){case Qe.START_BOUNDARY:if(d===s.length-2){if(_===Vc)f|=fo.LAST_BOUNDARY;else if(_!==nf)return;d++;break}else if(d-1===s.length-2){if(f&fo.LAST_BOUNDARY&&_===Vc)p=Qe.END,f=0;else if(!(f&fo.LAST_BOUNDARY)&&_===rf)d=0,$("onPartBegin"),p=Qe.HEADER_FIELD_START;else return;break}_!==s[d+2]&&(d=-2),_===s[d+2]&&d++;break;case Qe.HEADER_FIELD_START:p=Qe.HEADER_FIELD,x("onHeaderField"),d=0;case Qe.HEADER_FIELD:if(_===nf){S("onHeaderField"),p=Qe.HEADERS_ALMOST_DONE;break}if(d++,_===Vc)break;if(_===O1){if(d===1)return;V("onHeaderField",!0),p=Qe.HEADER_VALUE_START;break}if(P=$1(_),P<k1||P>C1)return;break;case Qe.HEADER_VALUE_START:if(_===R1)break;x("onHeaderValue"),p=Qe.HEADER_VALUE;case Qe.HEADER_VALUE:_===nf&&(V("onHeaderValue",!0),$("onHeaderEnd"),p=Qe.HEADER_VALUE_ALMOST_DONE);break;case Qe.HEADER_VALUE_ALMOST_DONE:if(_!==rf)return;p=Qe.HEADER_FIELD_START;break;case Qe.HEADERS_ALMOST_DONE:if(_!==rf)return;$("onHeadersEnd"),p=Qe.PART_DATA_START;break;case Qe.PART_DATA_START:p=Qe.PART_DATA,x("onPartData");case Qe.PART_DATA:if(r=d,d===0){for(n+=y;n<h&&!(t[n]in u);)n+=g;n-=y,_=t[n]}if(d<s.length)s[d]===_?(d===0&&V("onPartData",!0),d++):d=0;else if(d===s.length)d++,_===nf?f|=fo.PART_BOUNDARY:_===Vc?f|=fo.LAST_BOUNDARY:d=0;else if(d-1===s.length)if(f&fo.PART_BOUNDARY){if(d=0,_===rf){f&=~fo.PART_BOUNDARY,$("onPartEnd"),$("onPartBegin"),p=Qe.HEADER_FIELD_START;break}}else f&fo.LAST_BOUNDARY&&_===Vc?($("onPartEnd"),p=Qe.END,f=0):d=0;if(d>0)i[d-1]=_;else if(r>0){let W=new Uint8Array(i.buffer,i.byteOffset,i.byteLength);$("onPartData",0,r,W),r=0,x("onPartData"),n--}break;case Qe.END:break;default:throw new Error(`Unexpected state entered: ${p}`)}V("onHeaderField"),V("onHeaderValue"),V("onPartData"),this.index=d,this.state=p,this.flags=f}end(){if(this.state===Qe.HEADER_FIELD_START&&this.index===0||this.state===Qe.PART_DATA&&this.index===this.boundary.length)this.onPartEnd();else if(this.state!==Qe.END)throw new Error("MultipartParser.end(): stream ended unexpectedly")}};a(z1,"_fileName");a(N1,"toFormData")});async function Hb(e){if(e[er].disturbed)throw new TypeError(`body used already for: ${e.url}`);if(e[er].disturbed=!0,e[er].error)throw e[er].error;let{body:t}=e;if(t===null)return pr.Buffer.alloc(0);if(!(t instanceof Or.default))return pr.Buffer.alloc(0);let n=[],o=0;try{for await(let r of t){if(e.size>0&&o+r.length>e.size){let i=new qt(`content size at ${e.url} over limit: ${e.size}`,"max-size");throw t.destroy(i),i}o+=r.length,n.push(r)}}catch(r){throw r instanceof kn?r:new qt(`Invalid response body while trying to fetch ${e.url}: ${r.message}`,"system",r)}if(t.readableEnded===!0||t._readableState.ended===!0)try{return n.every(r=>typeof r=="string")?pr.Buffer.from(n.join("")):pr.Buffer.concat(n,o)}catch(r){throw new qt(`Could not create Buffer from response body for ${e.url}: ${r.message}`,"system",r)}else throw new qt(`Premature close of server response while trying to fetch ${e.url}`)}var Or,Cn,pr,D1,er,an,pa,U1,of,GR,WR,af=_t(()=>{Or=It(require("node:stream"),1),Cn=require("node:util"),pr=require("node:buffer");Fc();Xp();Fb();Qp();ef();D1=(0,Cn.promisify)(Or.default.pipeline),er=Symbol("Body internals"),an=class{static{a(this,"Body")}constructor(t,{size:n=0}={}){let o=null;t===null?t=null:Bb(t)?t=pr.Buffer.from(t.toString()):qc(t)||pr.Buffer.isBuffer(t)||(Cn.types.isAnyArrayBuffer(t)?t=pr.Buffer.from(t):ArrayBuffer.isView(t)?t=pr.Buffer.from(t.buffer,t.byteOffset,t.byteLength):t instanceof Or.default||(t instanceof po?(t=OR(t),o=t.type.split("=")[1]):t=pr.Buffer.from(String(t))));let r=t;pr.Buffer.isBuffer(t)?r=Or.default.Readable.from(t):qc(t)&&(r=Or.default.Readable.from(t.stream())),this[er]={body:t,stream:r,boundary:o,disturbed:!1,error:null},this.size=n,t instanceof Or.default&&t.on("error",i=>{let s=i instanceof kn?i:new qt(`Invalid response body while trying to fetch ${this.url}: ${i.message}`,"system",i);this[er].error=s})}get body(){return this[er].stream}get bodyUsed(){return this[er].disturbed}async arrayBuffer(){let{buffer:t,byteOffset:n,byteLength:o}=await Hb(this);return t.slice(n,n+o)}async formData(){let t=this.headers.get("content-type");if(t.startsWith("application/x-www-form-urlencoded")){let o=new po,r=new URLSearchParams(await this.text());for(let[i,s]of r)o.append(i,s);return o}let{toFormData:n}=await Promise.resolve().then(()=>(HR(),ZR));return n(this.body,t)}async blob(){let t=this.headers&&this.headers.get("content-type")||this[er].body&&this[er].body.type||"",n=await this.arrayBuffer();return new Vr([n],{type:t})}async json(){let t=await this.text();return JSON.parse(t)}async text(){let t=await Hb(this);return new TextDecoder().decode(t)}buffer(){return Hb(this)}};an.prototype.buffer=(0,Cn.deprecate)(an.prototype.buffer,"Please use 'response.arrayBuffer()' instead of 'response.buffer()'","node-fetch#buffer");Object.defineProperties(an.prototype,{body:{enumerable:!0},bodyUsed:{enumerable:!0},arrayBuffer:{enumerable:!0},blob:{enumerable:!0},json:{enumerable:!0},text:{enumerable:!0},data:{get:(0,Cn.deprecate)(()=>{},"data doesn't exist, use json(), text(), arrayBuffer(), or body instead","https://github.com/node-fetch/node-fetch/issues/1000 (response)")}});a(Hb,"consumeBody");pa=a((e,t)=>{let n,o,{body:r}=e[er];if(e.bodyUsed)throw new Error("cannot clone body after it is used");return r instanceof Or.default&&typeof r.getBoundary!="function"&&(n=new Or.PassThrough({highWaterMark:t}),o=new Or.PassThrough({highWaterMark:t}),r.pipe(n),r.pipe(o),e[er].stream=n,r=o),r},"clone"),U1=(0,Cn.deprecate)(e=>e.getBoundary(),"form-data doesn't follow the spec and requires special treatment. Use alternative package","https://github.com/node-fetch/node-fetch/issues/1167"),of=a((e,t)=>e===null?null:typeof e=="string"?"text/plain;charset=UTF-8":Bb(e)?"application/x-www-form-urlencoded;charset=UTF-8":qc(e)?e.type||null:pr.Buffer.isBuffer(e)||Cn.types.isAnyArrayBuffer(e)||ArrayBuffer.isView(e)?null:e instanceof po?`multipart/form-data; boundary=${t[er].boundary}`:e&&typeof e.getBoundary=="function"?`multipart/form-data;boundary=${U1(e)}`:e instanceof Or.default?null:"text/plain;charset=UTF-8","extractContentType"),GR=a(e=>{let{body:t}=e[er];return t===null?0:qc(t)?t.size:pr.Buffer.isBuffer(t)?t.length:t&&typeof t.getLengthSync=="function"&&t.hasKnownLength&&t.hasKnownLength()?t.getLengthSync():null},"getTotalBytes"),WR=a(async(e,{body:t})=>{t===null?e.end():await D1(t,e)},"writeToStream")});function JR(e=[]){return new tr(e.reduce((t,n,o,r)=>(o%2===0&&t.push(r.slice(o,o+2)),t),[]).filter(([t,n])=>{try{return sf(t),Wb(t,String(n)),!0}catch{return!1}}))}var Gb,Zc,sf,Wb,tr,cf=_t(()=>{Gb=require("node:util"),Zc=It(require("node:http"),1),sf=typeof Zc.default.validateHeaderName=="function"?Zc.default.validateHeaderName:e=>{if(!/^[\^`\-\w!#$%&'*+.|~]+$/.test(e)){let t=new TypeError(`Header name must be a valid HTTP token [${e}]`);throw Object.defineProperty(t,"code",{value:"ERR_INVALID_HTTP_TOKEN"}),t}},Wb=typeof Zc.default.validateHeaderValue=="function"?Zc.default.validateHeaderValue:(e,t)=>{if(/[^\t\u0020-\u007E\u0080-\u00FF]/.test(t)){let n=new TypeError(`Invalid character in header content ["${e}"]`);throw Object.defineProperty(n,"code",{value:"ERR_INVALID_CHAR"}),n}},tr=class e extends URLSearchParams{static{a(this,"Headers")}constructor(t){let n=[];if(t instanceof e){let o=t.raw();for(let[r,i]of Object.entries(o))n.push(...i.map(s=>[r,s]))}else if(t!=null)if(typeof t=="object"&&!Gb.types.isBoxedPrimitive(t)){let o=t[Symbol.iterator];if(o==null)n.push(...Object.entries(t));else{if(typeof o!="function")throw new TypeError("Header pairs must be iterable");n=[...t].map(r=>{if(typeof r!="object"||Gb.types.isBoxedPrimitive(r))throw new TypeError("Each header pair must be an iterable object");return[...r]}).map(r=>{if(r.length!==2)throw new TypeError("Each header pair must be a name/value tuple");return[...r]})}}else throw new TypeError("Failed to construct 'Headers': The provided value is not of type '(sequence<sequence<ByteString>> or record<ByteString, ByteString>)");return n=n.length>0?n.map(([o,r])=>(sf(o),Wb(o,String(r)),[String(o).toLowerCase(),String(r)])):void 0,super(n),new Proxy(this,{get(o,r,i){switch(r){case"append":case"set":return(s,u)=>(sf(s),Wb(s,String(u)),URLSearchParams.prototype[r].call(o,String(s).toLowerCase(),String(u)));case"delete":case"has":case"getAll":return s=>(sf(s),URLSearchParams.prototype[r].call(o,String(s).toLowerCase()));case"keys":return()=>(o.sort(),new Set(URLSearchParams.prototype.keys.call(o)).keys());default:return Reflect.get(o,r,i)}}})}get[Symbol.toStringTag](){return this.constructor.name}toString(){return Object.prototype.toString.call(this)}get(t){let n=this.getAll(t);if(n.length===0)return null;let o=n.join(", ");return/^content-encoding$/i.test(t)&&(o=o.toLowerCase()),o}forEach(t,n=void 0){for(let o of this.keys())Reflect.apply(t,n,[this.get(o),o,this])}*values(){for(let t of this.keys())yield this.get(t)}*entries(){for(let t of this.keys())yield[t,this.get(t)]}[Symbol.iterator](){return this.entries()}raw(){return[...this.keys()].reduce((t,n)=>(t[n]=this.getAll(n),t),{})}[Symbol.for("nodejs.util.inspect.custom")](){return[...this.keys()].reduce((t,n)=>{let o=this.getAll(n);return n==="host"?t[n]=o[0]:t[n]=o.length>1?o:o[0],t},{})}};Object.defineProperties(tr.prototype,["get","entries","forEach","values"].reduce((e,t)=>(e[t]={enumerable:!0},e),{}));a(JR,"fromRawHeaders")});var j1,Hc,Jb=_t(()=>{j1=new Set([301,302,303,307,308]),Hc=a(e=>j1.has(e),"isRedirect")});var Zr,fr,KR=_t(()=>{cf();af();Jb();Zr=Symbol("Response internals"),fr=class e extends an{static{a(this,"Response")}constructor(t=null,n={}){super(t,n);let o=n.status!=null?n.status:200,r=new tr(n.headers);if(t!==null&&!r.has("Content-Type")){let i=of(t,this);i&&r.append("Content-Type",i)}this[Zr]={type:"default",url:n.url,status:o,statusText:n.statusText||"",headers:r,counter:n.counter,highWaterMark:n.highWaterMark}}get type(){return this[Zr].type}get url(){return this[Zr].url||""}get status(){return this[Zr].status}get ok(){return this[Zr].status>=200&&this[Zr].status<300}get redirected(){return this[Zr].counter>0}get statusText(){return this[Zr].statusText}get headers(){return this[Zr].headers}get highWaterMark(){return this[Zr].highWaterMark}clone(){return new e(pa(this,this.highWaterMark),{type:this.type,url:this.url,status:this.status,statusText:this.statusText,headers:this.headers,ok:this.ok,redirected:this.redirected,size:this.size,highWaterMark:this.highWaterMark})}static redirect(t,n=302){if(!Hc(n))throw new RangeError('Failed to execute "redirect" on "response": Invalid status code');return new e(null,{headers:{location:new URL(t).toString()},status:n})}static error(){let t=new e(null,{status:0,statusText:""});return t[Zr].type="error",t}static json(t=void 0,n={}){let o=JSON.stringify(t);if(o===void 0)throw new TypeError("data is not JSON serializable");let r=new tr(n&&n.headers);return r.has("content-type")||r.set("content-type","application/json"),new e(o,{...n,headers:r})}get[Symbol.toStringTag](){return"Response"}};Object.defineProperties(fr.prototype,{type:{enumerable:!0},url:{enumerable:!0},status:{enumerable:!0},ok:{enumerable:!0},redirected:{enumerable:!0},statusText:{enumerable:!0},headers:{enumerable:!0},clone:{enumerable:!0}})});var XR,QR=_t(()=>{XR=a(e=>{if(e.search)return e.search;let t=e.href.length-1,n=e.hash||(e.href[t]==="#"?"#":"");return e.href[t-n.length]==="?"?"?":""},"getSearch")});function YR(e,t=!1){return e==null||(e=new URL(e),/^(about|blob|data):$/.test(e.protocol))?"no-referrer":(e.username="",e.password="",e.hash="",t&&(e.pathname="",e.search=""),e)}function nO(e){if(!tO.has(e))throw new TypeError(`Invalid referrerPolicy: ${e}`);return e}function M1(e){if(/^(http|ws)s:$/.test(e.protocol))return!0;let t=e.host.replace(/(^\[)|(]$)/g,""),n=(0,eO.isIP)(t);return n===4&&/^127\./.test(t)||n===6&&/^(((0+:){7})|(::(0+:){0,6}))0*1$/.test(t)?!0:e.host==="localhost"||e.host.endsWith(".localhost")?!1:e.protocol==="file:"}function fa(e){return/^about:(blank|srcdoc)$/.test(e)||e.protocol==="data:"||/^(blob|filesystem):$/.test(e.protocol)?!0:M1(e)}function oO(e,{referrerURLCallback:t,referrerOriginCallback:n}={}){if(e.referrer==="no-referrer"||e.referrerPolicy==="")return null;let o=e.referrerPolicy;if(e.referrer==="about:client")return"no-referrer";let r=e.referrer,i=YR(r),s=YR(r,!0);i.toString().length>4096&&(i=s),t&&(i=t(i)),n&&(s=n(s));let u=new URL(e.url);switch(o){case"no-referrer":return"no-referrer";case"origin":return s;case"unsafe-url":return i;case"strict-origin":return fa(i)&&!fa(u)?"no-referrer":s.toString();case"strict-origin-when-cross-origin":return i.origin===u.origin?i:fa(i)&&!fa(u)?"no-referrer":s;case"same-origin":return i.origin===u.origin?i:"no-referrer";case"origin-when-cross-origin":return i.origin===u.origin?i:s;case"no-referrer-when-downgrade":return fa(i)&&!fa(u)?"no-referrer":i;default:throw new TypeError(`Invalid referrerPolicy: ${o}`)}}function iO(e){let t=(e.get("referrer-policy")||"").split(/[,\s]+/),n="";for(let o of t)o&&tO.has(o)&&(n=o);return n}var eO,tO,rO,Kb=_t(()=>{eO=require("node:net");a(YR,"stripURLForUseAsAReferrer");tO=new Set(["","no-referrer","no-referrer-when-downgrade","same-origin","origin","strict-origin","origin-when-cross-origin","strict-origin-when-cross-origin","unsafe-url"]),rO="strict-origin-when-cross-origin";a(nO,"validateReferrerPolicy");a(M1,"isOriginPotentiallyTrustworthy");a(fa,"isUrlPotentiallyTrustworthy");a(oO,"determineRequestsReferrer");a(iO,"parseReferrerPolicyFromHeader")});var aO,sO,Tt,Gc,L1,mo,cO,uO=_t(()=>{aO=require("node:url"),sO=require("node:util");cf();af();ef();QR();Kb();Tt=Symbol("Request internals"),Gc=a(e=>typeof e=="object"&&typeof e[Tt]=="object","isRequest"),L1=(0,sO.deprecate)(()=>{},".data is not a valid RequestInit property, use .body instead","https://github.com/node-fetch/node-fetch/issues/1000 (request)"),mo=class e extends an{static{a(this,"Request")}constructor(t,n={}){let o;if(Gc(t)?o=new URL(t.url):(o=new URL(t),t={}),o.username!==""||o.password!=="")throw new TypeError(`${o} is an url with embedded credentials.`);let r=n.method||t.method||"GET";if(/^(delete|get|head|options|post|put)$/i.test(r)&&(r=r.toUpperCase()),!Gc(n)&&"data"in n&&L1(),(n.body!=null||Gc(t)&&t.body!==null)&&(r==="GET"||r==="HEAD"))throw new TypeError("Request with GET/HEAD method cannot have body");let i=n.body?n.body:Gc(t)&&t.body!==null?pa(t):null;super(i,{size:n.size||t.size||0});let s=new tr(n.headers||t.headers||{});if(i!==null&&!s.has("Content-Type")){let p=of(i,this);p&&s.set("Content-Type",p)}let u=Gc(t)?t.signal:null;if("signal"in n&&(u=n.signal),u!=null&&!kR(u))throw new TypeError("Expected signal to be an instanceof AbortSignal or EventTarget");let d=n.referrer==null?t.referrer:n.referrer;if(d==="")d="no-referrer";else if(d){let p=new URL(d);d=/^about:(\/\/)?client$/.test(p)?"client":p}else d=void 0;this[Tt]={method:r,redirect:n.redirect||t.redirect||"follow",headers:s,parsedURL:o,signal:u,referrer:d},this.follow=n.follow===void 0?t.follow===void 0?20:t.follow:n.follow,this.compress=n.compress===void 0?t.compress===void 0?!0:t.compress:n.compress,this.counter=n.counter||t.counter||0,this.agent=n.agent||t.agent,this.highWaterMark=n.highWaterMark||t.highWaterMark||16384,this.insecureHTTPParser=n.insecureHTTPParser||t.insecureHTTPParser||!1,this.referrerPolicy=n.referrerPolicy||t.referrerPolicy||""}get method(){return this[Tt].method}get url(){return(0,aO.format)(this[Tt].parsedURL)}get headers(){return this[Tt].headers}get redirect(){return this[Tt].redirect}get signal(){return this[Tt].signal}get referrer(){if(this[Tt].referrer==="no-referrer")return"";if(this[Tt].referrer==="client")return"about:client";if(this[Tt].referrer)return this[Tt].referrer.toString()}get referrerPolicy(){return this[Tt].referrerPolicy}set referrerPolicy(t){this[Tt].referrerPolicy=nO(t)}clone(){return new e(this)}get[Symbol.toStringTag](){return"Request"}};Object.defineProperties(mo.prototype,{method:{enumerable:!0},url:{enumerable:!0},headers:{enumerable:!0},redirect:{enumerable:!0},clone:{enumerable:!0},signal:{enumerable:!0},referrer:{enumerable:!0},referrerPolicy:{enumerable:!0}});cO=a(e=>{let{parsedURL:t}=e[Tt],n=new tr(e[Tt].headers);n.has("Accept")||n.set("Accept","*/*");let o=null;if(e.body===null&&/^(post|put)$/i.test(e.method)&&(o="0"),e.body!==null){let u=GR(e);typeof u=="number"&&!Number.isNaN(u)&&(o=String(u))}o&&n.set("Content-Length",o),e.referrerPolicy===""&&(e.referrerPolicy=rO),e.referrer&&e.referrer!=="no-referrer"?e[Tt].referrer=oO(e):e[Tt].referrer="no-referrer",e[Tt].referrer instanceof URL&&n.set("Referer",e.referrer),n.has("User-Agent")||n.set("User-Agent","node-fetch"),e.compress&&!n.has("Accept-Encoding")&&n.set("Accept-Encoding","gzip, deflate, br");let{agent:r}=e;typeof r=="function"&&(r=r(t));let i=XR(t),s={path:t.pathname+i,method:e.method,headers:n[Symbol.for("nodejs.util.inspect.custom")](),insecureHTTPParser:e.insecureHTTPParser,agent:r};return{parsedURL:t,options:s}},"getNodeRequestOptions")});var Wc,lO=_t(()=>{Qp();Wc=class extends kn{static{a(this,"AbortError")}constructor(t,n="aborted"){super(t,n)}}});var fO={};ar(fO,{AbortError:()=>Wc,Blob:()=>Vr,FetchError:()=>qt,File:()=>lo,FormData:()=>po,Headers:()=>tr,Request:()=>mo,Response:()=>fr,blobFrom:()=>MR,blobFromSync:()=>jR,default:()=>Xb,fileFrom:()=>LR,fileFromSync:()=>FR,isRedirect:()=>Hc});async function Xb(e,t){return new Promise((n,o)=>{let r=new mo(e,t),{parsedURL:i,options:s}=cO(r);if(!F1.has(i.protocol))throw new TypeError(`node-fetch cannot load ${e}. URL scheme "${i.protocol.replace(/:$/,"")}" is not supported.`);if(i.protocol==="data:"){let _=ER(r.url),P=new fr(_,{headers:{"Content-Type":_.typeFull}});n(P);return}let u=(i.protocol==="https:"?pO.default:dO.default).request,{signal:d}=r,p=null,f=a(()=>{let _=new Wc("The operation was aborted.");o(_),r.body&&r.body instanceof mr.default.Readable&&r.body.destroy(_),!(!p||!p.body)&&p.body.emit("error",_)},"abort");if(d&&d.aborted){f();return}let g=a(()=>{f(),h()},"abortAndFinalize"),y=u(i.toString(),s);d&&d.addEventListener("abort",g);let h=a(()=>{y.abort(),d&&d.removeEventListener("abort",g)},"finalize");y.on("error",_=>{o(new qt(`request to ${r.url} failed, reason: ${_.message}`,"system",_)),h()}),B1(y,_=>{p&&p.body&&p.body.destroy(_)}),process.version<"v14"&&y.on("socket",_=>{let P;_.prependListener("end",()=>{P=_._eventsCount}),_.prependListener("close",x=>{if(p&&P<_._eventsCount&&!x){let S=new Error("Premature close");S.code="ERR_STREAM_PREMATURE_CLOSE",p.body.emit("error",S)}})}),y.on("response",_=>{y.setTimeout(0);let P=JR(_.rawHeaders);if(Hc(_.statusCode)){let W=P.get("Location"),Z=null;try{Z=W===null?null:new URL(W,r.url)}catch{if(r.redirect!=="manual"){o(new qt(`uri requested responds with an invalid redirect URL: ${W}`,"invalid-redirect")),h();return}}switch(r.redirect){case"error":o(new qt(`uri requested responds with a redirect, redirect mode is set to error: ${r.url}`,"no-redirect")),h();return;case"manual":break;case"follow":{if(Z===null)break;if(r.counter>=r.follow){o(new qt(`maximum redirect reached at: ${r.url}`,"max-redirect")),h();return}let G={headers:new tr(r.headers),follow:r.follow,counter:r.counter+1,agent:r.agent,compress:r.compress,method:r.method,body:pa(r),signal:r.signal,size:r.size,referrer:r.referrer,referrerPolicy:r.referrerPolicy};if(!CR(r.url,Z)||!$R(r.url,Z))for(let ce of["authorization","www-authenticate","cookie","cookie2"])G.headers.delete(ce);if(_.statusCode!==303&&r.body&&t.body instanceof mr.default.Readable){o(new qt("Cannot follow redirect with body being a readable stream","unsupported-redirect")),h();return}(_.statusCode===303||(_.statusCode===301||_.statusCode===302)&&r.method==="POST")&&(G.method="GET",G.body=void 0,G.headers.delete("content-length"));let te=iO(P);te&&(G.referrerPolicy=te),n(Xb(new mo(Z,G))),h();return}default:return o(new TypeError(`Redirect option '${r.redirect}' is not a valid value of RequestRedirect`))}}d&&_.once("end",()=>{d.removeEventListener("abort",g)});let x=(0,mr.pipeline)(_,new mr.PassThrough,W=>{W&&o(W)});process.version<"v12.10"&&_.on("aborted",g);let S={url:r.url,status:_.statusCode,statusText:_.statusMessage,headers:P,size:r.size,counter:r.counter,highWaterMark:r.highWaterMark},$=P.get("Content-Encoding");if(!r.compress||r.method==="HEAD"||$===null||_.statusCode===204||_.statusCode===304){p=new fr(x,S),n(p);return}let V={flush:Yo.default.Z_SYNC_FLUSH,finishFlush:Yo.default.Z_SYNC_FLUSH};if($==="gzip"||$==="x-gzip"){x=(0,mr.pipeline)(x,Yo.default.createGunzip(V),W=>{W&&o(W)}),p=new fr(x,S),n(p);return}if($==="deflate"||$==="x-deflate"){let W=(0,mr.pipeline)(_,new mr.PassThrough,Z=>{Z&&o(Z)});W.once("data",Z=>{(Z[0]&15)===8?x=(0,mr.pipeline)(x,Yo.default.createInflate(),G=>{G&&o(G)}):x=(0,mr.pipeline)(x,Yo.default.createInflateRaw(),G=>{G&&o(G)}),p=new fr(x,S),n(p)}),W.once("end",()=>{p||(p=new fr(x,S),n(p))});return}if($==="br"){x=(0,mr.pipeline)(x,Yo.default.createBrotliDecompress(),W=>{W&&o(W)}),p=new fr(x,S),n(p);return}p=new fr(x,S),n(p)}),WR(y,r).catch(o)})}function B1(e,t){let n=Jc.Buffer.from(`0\r
26
26
  \r
27
- `),n=!1,i=!1,u;t.on("response",c=>{let{headers:l}=c;n=l["transfer-encoding"]==="chunked"&&!l["content-length"]}),t.on("socket",c=>{let l=o(()=>{if(n&&!i){let f=new Error("Premature close");f.code="ERR_STREAM_PREMATURE_CLOSE",e(f)}},"onSocketClose"),p=o(f=>{i=Ji.Buffer.compare(f.slice(-5),r)===0,!i&&u&&(i=Ji.Buffer.compare(u.slice(-3),r.slice(0,3))===0&&Ji.Buffer.compare(f.slice(-2),r.slice(3))===0),u=f},"onData");c.prependListener("close",l),c.on("data",p),t.on("close",()=>{c.removeListener("close",l),c.removeListener("data",p)})})}var sv,uv,Jn,Ht,Ji,CC,lv=ct(()=>{sv=yt(require("node:http"),1),uv=yt(require("node:https"),1),Jn=yt(require("node:zlib"),1),Ht=yt(require("node:stream"),1),Ji=require("node:buffer");_b();qs();Gb();Hs();iv();ql();av();Ql();Ns();js();Yl();Gl();CC=new Set(["data:","http:","https:"]);o(Xl,"fetch");o(OC,"fixResponseChunkedTransferBadEnding")});var fv=L(Mo=>{"use strict";var kC=Mo&&Mo.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},jo;Object.defineProperty(Mo,"__esModule",{value:!0});Mo.Gaxios=void 0;var $C=kC(xl()),zC=require("https"),Kn=Rl(),NC=H_(),dv=require("stream"),pv=kl(),DC=o(async()=>globalThis.crypto?.randomUUID()||(await import("crypto")).randomUUID(),"randomUUID"),UC=204,Gs=class{static{o(this,"Gaxios")}agentCache=new Map;defaults;interceptors;constructor(e){this.defaults=e||{},this.interceptors={request:new pv.GaxiosInterceptorManager,response:new pv.GaxiosInterceptorManager}}fetch(...e){let r=e[0],n=e[1],i,u=new Headers;return typeof r=="string"?i=new URL(r):r instanceof URL?i=r:r&&r.url&&(i=new URL(r.url)),r&&typeof r=="object"&&"headers"in r&&jo.mergeHeaders(u,r.headers),n&&jo.mergeHeaders(u,new Headers(n.headers)),typeof r=="object"&&!(r instanceof URL)?this.request({...n,...r,headers:u,url:i}):this.request({...n,headers:u,url:i})}async request(e={}){let r=await this.#n(e);return r=await this.#t(r),this.#r(this._request(r))}async _defaultAdapter(e){let r=e.fetchImplementation||this.defaults.fetchImplementation||await jo.#u(),n={...e};delete n.data;let i=await r(e.url,n),u=await this.getResponseData(e,i);return Object.getOwnPropertyDescriptor(i,"data")?.configurable||Object.defineProperties(i,{data:{configurable:!0,writable:!0,enumerable:!0,value:u}}),Object.assign(i,{config:e,data:u})}async _request(e){try{let r;if(e.adapter?r=await e.adapter(e,this._defaultAdapter.bind(this)):r=await this._defaultAdapter(e),!e.validateStatus(r.status)){if(e.responseType==="stream"){let i=[];for await(let u of r.data)i.push(u);r.data=i.toString()}let n=Kn.GaxiosError.extractAPIErrorFromResponse(r,`Request failed with status code ${r.status}`);throw new Kn.GaxiosError(n?.message,e,r,n)}return r}catch(r){let n;r instanceof Kn.GaxiosError?n=r:r instanceof Error?n=new Kn.GaxiosError(r.message,e,void 0,r):n=new Kn.GaxiosError("Unexpected Gaxios Error",e,void 0,r);let{shouldRetry:i,config:u}=await(0,NC.getRetryConfig)(n);if(i&&u)return n.config.retryConfig.currentRetryAttempt=u.retryConfig.currentRetryAttempt,e.retryConfig=n.config?.retryConfig,this.#o(e),this._request(e);throw e.errorRedactor&&e.errorRedactor(n),n}}async getResponseData(e,r){if(r.status===UC)return"";if(e.maxContentLength&&r.headers.has("content-length")&&e.maxContentLength<Number.parseInt(r.headers?.get("content-length")||""))throw new Kn.GaxiosError("Response's `Content-Length` is over the limit.",e,Object.assign(r,{config:e}));switch(e.responseType){case"stream":return r.body;case"json":{let n=await r.text();try{return JSON.parse(n)}catch{return n}}case"arraybuffer":return r.arrayBuffer();case"blob":return r.blob();case"text":return r.text();default:return this.getResponseDataFromContentType(r)}}#e(e,r=[]){let n=new URL(e),i=[...r],u=(process.env.NO_PROXY??process.env.no_proxy)?.split(",")||[];for(let c of u)i.push(c.trim());for(let c of i)if(c instanceof RegExp){if(c.test(n.toString()))return!1}else if(c instanceof URL){if(c.origin===n.origin)return!1}else if(c.startsWith("*.")||c.startsWith(".")){let l=c.replace(/^\*\./,".");if(n.hostname.endsWith(l))return!1}else if(c===n.origin||c===n.hostname||c===n.href)return!1;return!0}async#t(e){let r=Promise.resolve(e);for(let n of this.interceptors.request.values())n&&(r=r.then(n.resolved,n.rejected));return r}async#r(e){let r=Promise.resolve(e);for(let n of this.interceptors.response.values())n&&(r=r.then(n.resolved,n.rejected));return r}async#n(e){let r=new Headers(this.defaults.headers);jo.mergeHeaders(r,e.headers);let n=(0,$C.default)(!0,{},this.defaults,e);if(!n.url)throw new Error("URL is required.");if(n.baseURL&&(n.url=new URL(n.url,n.baseURL)),n.url=new URL(n.url),n.params)if(n.paramsSerializer){let c=n.paramsSerializer(n.params);c.startsWith("?")&&(c=c.slice(1));let l=n.url.toString().includes("?")?"&":"?";n.url=n.url+l+c}else{let c=n.url instanceof URL?n.url:new URL(n.url);for(let[l,p]of new URLSearchParams(n.params))c.searchParams.append(l,p);n.url=c}typeof e.maxContentLength=="number"&&(n.size=e.maxContentLength),typeof e.maxRedirects=="number"&&(n.follow=e.maxRedirects);let i=typeof n.data=="string"||n.data instanceof ArrayBuffer||n.data instanceof Blob||globalThis.File&&n.data instanceof File||n.data instanceof FormData||n.data instanceof dv.Readable||n.data instanceof ReadableStream||n.data instanceof String||n.data instanceof URLSearchParams||ArrayBuffer.isView(n.data)||["Blob","File","FormData"].includes(n.data?.constructor?.name||"");if(n.multipart?.length){let c=await DC();r.set("content-type",`multipart/related; boundary=${c}`),n.body=dv.Readable.from(this.getMultipartRequest(n.multipart,c))}else i?n.body=n.data:typeof n.data=="object"?r.get("Content-Type")==="application/x-www-form-urlencoded"?n.body=n.paramsSerializer?n.paramsSerializer(n.data):new URLSearchParams(n.data):(r.has("content-type")||r.set("content-type","application/json"),n.body=JSON.stringify(n.data)):n.data&&(n.body=n.data);n.validateStatus=n.validateStatus||this.validateStatus,n.responseType=n.responseType||"unknown",!r.has("accept")&&n.responseType==="json"&&r.set("accept","application/json");let u=n.proxy||process?.env?.HTTPS_PROXY||process?.env?.https_proxy||process?.env?.HTTP_PROXY||process?.env?.http_proxy;if(!n.agent)if(u&&this.#e(n.url,n.noProxy)){let c=await jo.#s();this.agentCache.has(u)?n.agent=this.agentCache.get(u):(n.agent=new c(u,{cert:n.cert,key:n.key}),this.agentCache.set(u,n.agent))}else n.cert&&n.key&&(this.agentCache.has(n.key)?n.agent=this.agentCache.get(n.key):(n.agent=new zC.Agent({cert:n.cert,key:n.key}),this.agentCache.set(n.key,n.agent)));return typeof n.errorRedactor!="function"&&n.errorRedactor!==!1&&(n.errorRedactor=Kn.defaultErrorRedactor),n.body&&!("duplex"in n)&&(n.duplex="half"),this.#o(n),Object.assign(n,{headers:r,url:n.url instanceof URL?n.url:new URL(n.url)})}#o(e){if(e.timeout){let r=AbortSignal.timeout(e.timeout);e.signal&&!e.signal.aborted?e.signal=AbortSignal.any([e.signal,r]):e.signal=r}}validateStatus(e){return e>=200&&e<300}async getResponseDataFromContentType(e){let r=e.headers.get("Content-Type");if(r===null)return e.text();if(r=r.toLowerCase(),r.includes("application/json")){let n=await e.text();try{n=JSON.parse(n)}catch{}return n}else return r.match(/^text\//)?e.text():e.blob()}async*getMultipartRequest(e,r){let n=`--${r}--`;for(let i of e){let u=i.headers.get("Content-Type")||"application/octet-stream";yield`--${r}\r
28
- Content-Type: ${u}\r
27
+ `),o=!1,r=!1,i;e.on("response",s=>{let{headers:u}=s;o=u["transfer-encoding"]==="chunked"&&!u["content-length"]}),e.on("socket",s=>{let u=a(()=>{if(o&&!r){let p=new Error("Premature close");p.code="ERR_STREAM_PREMATURE_CLOSE",t(p)}},"onSocketClose"),d=a(p=>{r=Jc.Buffer.compare(p.slice(-5),n)===0,!r&&i&&(r=Jc.Buffer.compare(i.slice(-3),n.slice(0,3))===0&&Jc.Buffer.compare(p.slice(-2),n.slice(3))===0),i=p},"onData");s.prependListener("close",u),s.on("data",d),e.on("close",()=>{s.removeListener("close",u),s.removeListener("data",d)})})}var dO,pO,Yo,mr,Jc,F1,mO=_t(()=>{dO=It(require("node:http"),1),pO=It(require("node:https"),1),Yo=It(require("node:zlib"),1),mr=It(require("node:stream"),1),Jc=require("node:buffer");SR();af();KR();cf();uO();Fb();lO();Jb();Xp();ef();Kb();Vb();F1=new Set(["data:","http:","https:"]);a(Xb,"fetch");a(B1,"fixResponseChunkedTransferBadEnding")});var yO=B(ha=>{"use strict";var q1=ha&&ha.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},ma;Object.defineProperty(ha,"__esModule",{value:!0});ha.Gaxios=void 0;var V1=q1(xb()),Z1=require("https"),ei=Ab(),H1=JI(),hO=require("stream"),gO=Ob(),G1=a(async()=>globalThis.crypto?.randomUUID()||(await import("crypto")).randomUUID(),"randomUUID"),W1=204,uf=class{static{a(this,"Gaxios")}agentCache=new Map;defaults;interceptors;constructor(t){this.defaults=t||{},this.interceptors={request:new gO.GaxiosInterceptorManager,response:new gO.GaxiosInterceptorManager}}fetch(...t){let n=t[0],o=t[1],r,i=new Headers;return typeof n=="string"?r=new URL(n):n instanceof URL?r=n:n&&n.url&&(r=new URL(n.url)),n&&typeof n=="object"&&"headers"in n&&ma.mergeHeaders(i,n.headers),o&&ma.mergeHeaders(i,new Headers(o.headers)),typeof n=="object"&&!(n instanceof URL)?this.request({...o,...n,headers:i,url:r}):this.request({...o,headers:i,url:r})}async request(t={}){let n=await this.#n(t);return n=await this.#t(n),this.#r(this._request(n))}async _defaultAdapter(t){let n=t.fetchImplementation||this.defaults.fetchImplementation||await ma.#c(),o={...t};delete o.data;let r=await n(t.url,o),i=await this.getResponseData(t,r);return Object.getOwnPropertyDescriptor(r,"data")?.configurable||Object.defineProperties(r,{data:{configurable:!0,writable:!0,enumerable:!0,value:i}}),Object.assign(r,{config:t,data:i})}async _request(t){try{let n;if(t.adapter?n=await t.adapter(t,this._defaultAdapter.bind(this)):n=await this._defaultAdapter(t),!t.validateStatus(n.status)){if(t.responseType==="stream"){let r=[];for await(let i of n.data)r.push(i);n.data=r.toString()}let o=ei.GaxiosError.extractAPIErrorFromResponse(n,`Request failed with status code ${n.status}`);throw new ei.GaxiosError(o?.message,t,n,o)}return n}catch(n){let o;n instanceof ei.GaxiosError?o=n:n instanceof Error?o=new ei.GaxiosError(n.message,t,void 0,n):o=new ei.GaxiosError("Unexpected Gaxios Error",t,void 0,n);let{shouldRetry:r,config:i}=await(0,H1.getRetryConfig)(o);if(r&&i)return o.config.retryConfig.currentRetryAttempt=i.retryConfig.currentRetryAttempt,t.retryConfig=o.config?.retryConfig,this.#o(t),this._request(t);throw t.errorRedactor&&t.errorRedactor(o),o}}async getResponseData(t,n){if(n.status===W1)return"";if(t.maxContentLength&&n.headers.has("content-length")&&t.maxContentLength<Number.parseInt(n.headers?.get("content-length")||""))throw new ei.GaxiosError("Response's `Content-Length` is over the limit.",t,Object.assign(n,{config:t}));switch(t.responseType){case"stream":return n.body;case"json":{let o=await n.text();try{return JSON.parse(o)}catch{return o}}case"arraybuffer":return n.arrayBuffer();case"blob":return n.blob();case"text":return n.text();default:return this.getResponseDataFromContentType(n)}}#e(t,n=[]){let o=new URL(t),r=[...n],i=(process.env.NO_PROXY??process.env.no_proxy)?.split(",")||[];for(let s of i)r.push(s.trim());for(let s of r)if(s instanceof RegExp){if(s.test(o.toString()))return!1}else if(s instanceof URL){if(s.origin===o.origin)return!1}else if(s.startsWith("*.")||s.startsWith(".")){let u=s.replace(/^\*\./,".");if(o.hostname.endsWith(u))return!1}else if(s===o.origin||s===o.hostname||s===o.href)return!1;return!0}async#t(t){let n=Promise.resolve(t);for(let o of this.interceptors.request.values())o&&(n=n.then(o.resolved,o.rejected));return n}async#r(t){let n=Promise.resolve(t);for(let o of this.interceptors.response.values())o&&(n=n.then(o.resolved,o.rejected));return n}async#n(t){let n=new Headers(this.defaults.headers);ma.mergeHeaders(n,t.headers);let o=(0,V1.default)(!0,{},this.defaults,t);if(!o.url)throw new Error("URL is required.");if(o.baseURL&&(o.url=new URL(o.url,o.baseURL)),o.url=new URL(o.url),o.params)if(o.paramsSerializer){let s=o.paramsSerializer(o.params);s.startsWith("?")&&(s=s.slice(1));let u=o.url.toString().includes("?")?"&":"?";o.url=o.url+u+s}else{let s=o.url instanceof URL?o.url:new URL(o.url);for(let[u,d]of new URLSearchParams(o.params))s.searchParams.append(u,d);o.url=s}typeof t.maxContentLength=="number"&&(o.size=t.maxContentLength),typeof t.maxRedirects=="number"&&(o.follow=t.maxRedirects);let r=typeof o.data=="string"||o.data instanceof ArrayBuffer||o.data instanceof Blob||globalThis.File&&o.data instanceof File||o.data instanceof FormData||o.data instanceof hO.Readable||o.data instanceof ReadableStream||o.data instanceof String||o.data instanceof URLSearchParams||ArrayBuffer.isView(o.data)||["Blob","File","FormData"].includes(o.data?.constructor?.name||"");if(o.multipart?.length){let s=await G1();n.set("content-type",`multipart/related; boundary=${s}`),o.body=hO.Readable.from(this.getMultipartRequest(o.multipart,s))}else r?o.body=o.data:typeof o.data=="object"?n.get("Content-Type")==="application/x-www-form-urlencoded"?o.body=o.paramsSerializer?o.paramsSerializer(o.data):new URLSearchParams(o.data):(n.has("content-type")||n.set("content-type","application/json"),o.body=JSON.stringify(o.data)):o.data&&(o.body=o.data);o.validateStatus=o.validateStatus||this.validateStatus,o.responseType=o.responseType||"unknown",!n.has("accept")&&o.responseType==="json"&&n.set("accept","application/json");let i=o.proxy||process?.env?.HTTPS_PROXY||process?.env?.https_proxy||process?.env?.HTTP_PROXY||process?.env?.http_proxy;if(!o.agent)if(i&&this.#e(o.url,o.noProxy)){let s=await ma.#s();this.agentCache.has(i)?o.agent=this.agentCache.get(i):(o.agent=new s(i,{cert:o.cert,key:o.key}),this.agentCache.set(i,o.agent))}else o.cert&&o.key&&(this.agentCache.has(o.key)?o.agent=this.agentCache.get(o.key):(o.agent=new Z1.Agent({cert:o.cert,key:o.key}),this.agentCache.set(o.key,o.agent)));return typeof o.errorRedactor!="function"&&o.errorRedactor!==!1&&(o.errorRedactor=ei.defaultErrorRedactor),o.body&&!("duplex"in o)&&(o.duplex="half"),this.#o(o),Object.assign(o,{headers:n,url:o.url instanceof URL?o.url:new URL(o.url)})}#o(t){if(t.timeout){let n=AbortSignal.timeout(t.timeout);t.signal&&!t.signal.aborted?t.signal=AbortSignal.any([t.signal,n]):t.signal=n}}validateStatus(t){return t>=200&&t<300}async getResponseDataFromContentType(t){let n=t.headers.get("Content-Type");if(n===null)return t.text();if(n=n.toLowerCase(),n.includes("application/json")){let o=await t.text();try{o=JSON.parse(o)}catch{}return o}else return n.match(/^text\//)?t.text():t.blob()}async*getMultipartRequest(t,n){let o=`--${n}--`;for(let r of t){let i=r.headers.get("Content-Type")||"application/octet-stream";yield`--${n}\r
28
+ Content-Type: ${i}\r
29
29
  \r
30
- `,typeof i.content=="string"?yield i.content:yield*i.content,yield`\r
31
- `}yield n}static#i;static#a;static async#s(){return this.#i||=(await Promise.resolve().then(()=>yt(gb()))).HttpsProxyAgent,this.#i}static async#u(){let e=typeof window<"u"&&!!window;return this.#a||=e?window.fetch:(await Promise.resolve().then(()=>(lv(),cv))).default,this.#a}static mergeHeaders(e,...r){e=e instanceof Headers?e:new Headers(e);for(let n of r)(n instanceof Headers?n:new Headers(n)).forEach((u,c)=>{c==="set-cookie"?e.append(c,u):e.set(c,u)});return e}};Mo.Gaxios=Gs;jo=Gs});var _t=L(It=>{"use strict";var jC=It&&It.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:o(function(){return e[r]},"get")}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),MC=It&&It.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&jC(e,t,r)};Object.defineProperty(It,"__esModule",{value:!0});It.instance=It.Gaxios=It.GaxiosError=void 0;It.request=FC;var mv=fv();Object.defineProperty(It,"Gaxios",{enumerable:!0,get:o(function(){return mv.Gaxios},"get")});var LC=Rl();Object.defineProperty(It,"GaxiosError",{enumerable:!0,get:o(function(){return LC.GaxiosError},"get")});MC(kl(),It);It.instance=new mv.Gaxios;async function FC(t){return It.instance.request(t)}o(FC,"request")});var ed=L((hv,Ws)=>{(function(t){"use strict";var e,r=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,n=Math.ceil,i=Math.floor,u="[BigNumber Error] ",c=u+"Number primitive has more than 15 significant digits: ",l=1e14,p=14,f=9007199254740991,m=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],y=1e7,P=1e9;function h(H){var V,J,re,G=Z.prototype={constructor:Z,toString:null,valueOf:null},je=new Z(1),Ee=20,ve=4,ze=-7,$e=21,Ue=-1e7,He=1e7,Ke=!1,Ut=1,Pt=0,ro={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:"\xA0",suffix:""},wr="0123456789abcdefghijklmnopqrstuvwxyz",ii=!0;function Z(_,S){var x,N,R,$,j,I,O,D,z=this;if(!(z instanceof Z))return new Z(_,S);if(S==null){if(_&&_._isBigNumber===!0){z.s=_.s,!_.c||_.e>He?z.c=z.e=null:_.e<Ue?z.c=[z.e=0]:(z.e=_.e,z.c=_.c.slice());return}if((I=typeof _=="number")&&_*0==0){if(z.s=1/_<0?(_=-_,-1):1,_===~~_){for($=0,j=_;j>=10;j/=10,$++);$>He?z.c=z.e=null:(z.e=$,z.c=[_]);return}D=String(_)}else{if(!r.test(D=String(_)))return re(z,D,I);z.s=D.charCodeAt(0)==45?(D=D.slice(1),-1):1}($=D.indexOf("."))>-1&&(D=D.replace(".","")),(j=D.search(/e/i))>0?($<0&&($=j),$+=+D.slice(j+1),D=D.substring(0,j)):$<0&&($=D.length)}else{if(w(S,2,wr.length,"Base"),S==10&&ii)return z=new Z(_),Tt(z,Ee+z.e+1,ve);if(D=String(_),I=typeof _=="number"){if(_*0!=0)return re(z,D,I,S);if(z.s=1/_<0?(D=D.slice(1),-1):1,Z.DEBUG&&D.replace(/^0\.0*|\./,"").length>15)throw Error(c+_)}else z.s=D.charCodeAt(0)===45?(D=D.slice(1),-1):1;for(x=wr.slice(0,S),$=j=0,O=D.length;j<O;j++)if(x.indexOf(N=D.charAt(j))<0){if(N=="."){if(j>$){$=O;continue}}else if(!R&&(D==D.toUpperCase()&&(D=D.toLowerCase())||D==D.toLowerCase()&&(D=D.toUpperCase()))){R=!0,j=-1,$=0;continue}return re(z,String(_),I,S)}I=!1,D=J(D,S,10,z.s),($=D.indexOf("."))>-1?D=D.replace(".",""):$=D.length}for(j=0;D.charCodeAt(j)===48;j++);for(O=D.length;D.charCodeAt(--O)===48;);if(D=D.slice(j,++O)){if(O-=j,I&&Z.DEBUG&&O>15&&(_>f||_!==i(_)))throw Error(c+z.s*_);if(($=$-j-1)>He)z.c=z.e=null;else if($<Ue)z.c=[z.e=0];else{if(z.e=$,z.c=[],j=($+1)%p,$<0&&(j+=p),j<O){for(j&&z.c.push(+D.slice(0,j)),O-=p;j<O;)z.c.push(+D.slice(j,j+=p));j=p-(D=D.slice(j)).length}else j-=O;for(;j--;D+="0");z.c.push(+D)}}else z.c=[z.e=0]}o(Z,"BigNumber"),Z.clone=h,Z.ROUND_UP=0,Z.ROUND_DOWN=1,Z.ROUND_CEIL=2,Z.ROUND_FLOOR=3,Z.ROUND_HALF_UP=4,Z.ROUND_HALF_DOWN=5,Z.ROUND_HALF_EVEN=6,Z.ROUND_HALF_CEIL=7,Z.ROUND_HALF_FLOOR=8,Z.EUCLID=9,Z.config=Z.set=function(_){var S,x;if(_!=null)if(typeof _=="object"){if(_.hasOwnProperty(S="DECIMAL_PLACES")&&(x=_[S],w(x,0,P,S),Ee=x),_.hasOwnProperty(S="ROUNDING_MODE")&&(x=_[S],w(x,0,8,S),ve=x),_.hasOwnProperty(S="EXPONENTIAL_AT")&&(x=_[S],x&&x.pop?(w(x[0],-P,0,S),w(x[1],0,P,S),ze=x[0],$e=x[1]):(w(x,-P,P,S),ze=-($e=x<0?-x:x))),_.hasOwnProperty(S="RANGE"))if(x=_[S],x&&x.pop)w(x[0],-P,-1,S),w(x[1],1,P,S),Ue=x[0],He=x[1];else if(w(x,-P,P,S),x)Ue=-(He=x<0?-x:x);else throw Error(u+S+" cannot be zero: "+x);if(_.hasOwnProperty(S="CRYPTO"))if(x=_[S],x===!!x)if(x)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))Ke=x;else throw Ke=!x,Error(u+"crypto unavailable");else Ke=x;else throw Error(u+S+" not true or false: "+x);if(_.hasOwnProperty(S="MODULO_MODE")&&(x=_[S],w(x,0,9,S),Ut=x),_.hasOwnProperty(S="POW_PRECISION")&&(x=_[S],w(x,0,P,S),Pt=x),_.hasOwnProperty(S="FORMAT"))if(x=_[S],typeof x=="object")ro=x;else throw Error(u+S+" not an object: "+x);if(_.hasOwnProperty(S="ALPHABET"))if(x=_[S],typeof x=="string"&&!/^.?$|[+\-.\s]|(.).*\1/.test(x))ii=x.slice(0,10)=="0123456789",wr=x;else throw Error(u+S+" invalid: "+x)}else throw Error(u+"Object expected: "+_);return{DECIMAL_PLACES:Ee,ROUNDING_MODE:ve,EXPONENTIAL_AT:[ze,$e],RANGE:[Ue,He],CRYPTO:Ke,MODULO_MODE:Ut,POW_PRECISION:Pt,FORMAT:ro,ALPHABET:wr}},Z.isBigNumber=function(_){if(!_||_._isBigNumber!==!0)return!1;if(!Z.DEBUG)return!0;var S,x,N=_.c,R=_.e,$=_.s;e:if({}.toString.call(N)=="[object Array]"){if(($===1||$===-1)&&R>=-P&&R<=P&&R===i(R)){if(N[0]===0){if(R===0&&N.length===1)return!0;break e}if(S=(R+1)%p,S<1&&(S+=p),String(N[0]).length==S){for(S=0;S<N.length;S++)if(x=N[S],x<0||x>=l||x!==i(x))break e;if(x!==0)return!0}}}else if(N===null&&R===null&&($===null||$===1||$===-1))return!0;throw Error(u+"Invalid BigNumber: "+_)},Z.maximum=Z.max=function(){return St(arguments,-1)},Z.minimum=Z.min=function(){return St(arguments,1)},Z.random=(function(){var _=9007199254740992,S=Math.random()*_&2097151?function(){return i(Math.random()*_)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(x){var N,R,$,j,I,O=0,D=[],z=new Z(je);if(x==null?x=Ee:w(x,0,P),j=n(x/p),Ke)if(crypto.getRandomValues){for(N=crypto.getRandomValues(new Uint32Array(j*=2));O<j;)I=N[O]*131072+(N[O+1]>>>11),I>=9e15?(R=crypto.getRandomValues(new Uint32Array(2)),N[O]=R[0],N[O+1]=R[1]):(D.push(I%1e14),O+=2);O=j/2}else if(crypto.randomBytes){for(N=crypto.randomBytes(j*=7);O<j;)I=(N[O]&31)*281474976710656+N[O+1]*1099511627776+N[O+2]*4294967296+N[O+3]*16777216+(N[O+4]<<16)+(N[O+5]<<8)+N[O+6],I>=9e15?crypto.randomBytes(7).copy(N,O):(D.push(I%1e14),O+=7);O=j/7}else throw Ke=!1,Error(u+"crypto unavailable");if(!Ke)for(;O<j;)I=S(),I<9e15&&(D[O++]=I%1e14);for(j=D[--O],x%=p,j&&x&&(I=m[p-x],D[O]=i(j/I)*I);D[O]===0;D.pop(),O--);if(O<0)D=[$=0];else{for($=-1;D[0]===0;D.splice(0,1),$-=p);for(O=1,I=D[0];I>=10;I/=10,O++);O<p&&($-=p-O)}return z.e=$,z.c=D,z}})(),Z.sum=function(){for(var _=1,S=arguments,x=new Z(S[0]);_<S.length;)x=x.plus(S[_++]);return x},J=(function(){var _="0123456789";function S(x,N,R,$){for(var j,I=[0],O,D=0,z=x.length;D<z;){for(O=I.length;O--;I[O]*=N);for(I[0]+=$.indexOf(x.charAt(D++)),j=0;j<I.length;j++)I[j]>R-1&&(I[j+1]==null&&(I[j+1]=0),I[j+1]+=I[j]/R|0,I[j]%=R)}return I.reverse()}return o(S,"toBaseOut"),function(x,N,R,$,j){var I,O,D,z,B,Y,te,Re,Ge=x.indexOf("."),We=Ee,Ie=ve;for(Ge>=0&&(z=Pt,Pt=0,x=x.replace(".",""),Re=new Z(N),Y=Re.pow(x.length-Ge),Pt=z,Re.c=S(W(T(Y.c),Y.e,"0"),10,R,_),Re.e=Re.c.length),te=S(x,N,R,j?(I=wr,_):(I=_,wr)),D=z=te.length;te[--z]==0;te.pop());if(!te[0])return I.charAt(0);if(Ge<0?--D:(Y.c=te,Y.e=D,Y.s=$,Y=V(Y,Re,We,Ie,R),te=Y.c,B=Y.r,D=Y.e),O=D+We+1,Ge=te[O],z=R/2,B=B||O<0||te[O+1]!=null,B=Ie<4?(Ge!=null||B)&&(Ie==0||Ie==(Y.s<0?3:2)):Ge>z||Ge==z&&(Ie==4||B||Ie==6&&te[O-1]&1||Ie==(Y.s<0?8:7)),O<1||!te[0])x=B?W(I.charAt(1),-We,I.charAt(0)):I.charAt(0);else{if(te.length=O,B)for(--R;++te[--O]>R;)te[O]=0,O||(++D,te=[1].concat(te));for(z=te.length;!te[--z];);for(Ge=0,x="";Ge<=z;x+=I.charAt(te[Ge++]));x=W(x,D,I.charAt(0))}return x}})(),V=(function(){function _(N,R,$){var j,I,O,D,z=0,B=N.length,Y=R%y,te=R/y|0;for(N=N.slice();B--;)O=N[B]%y,D=N[B]/y|0,j=te*O+D*Y,I=Y*O+j%y*y+z,z=(I/$|0)+(j/y|0)+te*D,N[B]=I%$;return z&&(N=[z].concat(N)),N}o(_,"multiply");function S(N,R,$,j){var I,O;if($!=j)O=$>j?1:-1;else for(I=O=0;I<$;I++)if(N[I]!=R[I]){O=N[I]>R[I]?1:-1;break}return O}o(S,"compare");function x(N,R,$,j){for(var I=0;$--;)N[$]-=I,I=N[$]<R[$]?1:0,N[$]=I*j+N[$]-R[$];for(;!N[0]&&N.length>1;N.splice(0,1));}return o(x,"subtract"),function(N,R,$,j,I){var O,D,z,B,Y,te,Re,Ge,We,Ie,De,st,no,oo,io,jt,Fr,bt=N.s==R.s?1:-1,ut=N.c,Me=R.c;if(!ut||!ut[0]||!Me||!Me[0])return new Z(!N.s||!R.s||(ut?Me&&ut[0]==Me[0]:!Me)?NaN:ut&&ut[0]==0||!Me?bt*0:bt/0);for(Ge=new Z(bt),We=Ge.c=[],D=N.e-R.e,bt=$+D+1,I||(I=l,D=b(N.e/p)-b(R.e/p),bt=bt/p|0),z=0;Me[z]==(ut[z]||0);z++);if(Me[z]>(ut[z]||0)&&D--,bt<0)We.push(1),B=!0;else{for(oo=ut.length,jt=Me.length,z=0,bt+=2,Y=i(I/(Me[0]+1)),Y>1&&(Me=_(Me,Y,I),ut=_(ut,Y,I),jt=Me.length,oo=ut.length),no=jt,Ie=ut.slice(0,jt),De=Ie.length;De<jt;Ie[De++]=0);Fr=Me.slice(),Fr=[0].concat(Fr),io=Me[0],Me[1]>=I/2&&io++;do{if(Y=0,O=S(Me,Ie,jt,De),O<0){if(st=Ie[0],jt!=De&&(st=st*I+(Ie[1]||0)),Y=i(st/io),Y>1)for(Y>=I&&(Y=I-1),te=_(Me,Y,I),Re=te.length,De=Ie.length;S(te,Ie,Re,De)==1;)Y--,x(te,jt<Re?Fr:Me,Re,I),Re=te.length,O=1;else Y==0&&(O=Y=1),te=Me.slice(),Re=te.length;if(Re<De&&(te=[0].concat(te)),x(Ie,te,De,I),De=Ie.length,O==-1)for(;S(Me,Ie,jt,De)<1;)Y++,x(Ie,jt<De?Fr:Me,De,I),De=Ie.length}else O===0&&(Y++,Ie=[0]);We[z++]=Y,Ie[0]?Ie[De++]=ut[no]||0:(Ie=[ut[no]],De=1)}while((no++<oo||Ie[0]!=null)&&bt--);B=Ie[0]!=null,We[0]||We.splice(0,1)}if(I==l){for(z=1,bt=We[0];bt>=10;bt/=10,z++);Tt(Ge,$+(Ge.e=z+D*p-1)+1,j,B)}else Ge.e=D,Ge.r=+B;return Ge}})();function Rt(_,S,x,N){var R,$,j,I,O;if(x==null?x=ve:w(x,0,8),!_.c)return _.toString();if(R=_.c[0],j=_.e,S==null)O=T(_.c),O=N==1||N==2&&(j<=ze||j>=$e)?q(O,j):W(O,j,"0");else if(_=Tt(new Z(_),S,x),$=_.e,O=T(_.c),I=O.length,N==1||N==2&&(S<=$||$<=ze)){for(;I<S;O+="0",I++);O=q(O,$)}else if(S-=j+(N===2&&$>j),O=W(O,$,"0"),$+1>I){if(--S>0)for(O+=".";S--;O+="0");}else if(S+=$-I,S>0)for($+1==I&&(O+=".");S--;O+="0");return _.s<0&&R?"-"+O:O}o(Rt,"format");function St(_,S){for(var x,N,R=1,$=new Z(_[0]);R<_.length;R++)N=new Z(_[R]),(!N.s||(x=E($,N))===S||x===0&&$.s===S)&&($=N);return $}o(St,"maxOrMin");function ai(_,S,x){for(var N=1,R=S.length;!S[--R];S.pop());for(R=S[0];R>=10;R/=10,N++);return(x=N+x*p-1)>He?_.c=_.e=null:x<Ue?_.c=[_.e=0]:(_.e=x,_.c=S),_}o(ai,"normalise"),re=(function(){var _=/^(-?)0([xbo])(?=\w[\w.]*$)/i,S=/^([^.]+)\.$/,x=/^\.([^.]+)$/,N=/^-?(Infinity|NaN)$/,R=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function($,j,I,O){var D,z=I?j:j.replace(R,"");if(N.test(z))$.s=isNaN(z)?null:z<0?-1:1;else{if(!I&&(z=z.replace(_,function(B,Y,te){return D=(te=te.toLowerCase())=="x"?16:te=="b"?2:8,!O||O==D?Y:B}),O&&(D=O,z=z.replace(S,"$1").replace(x,"0.$1")),j!=z))return new Z(z,D);if(Z.DEBUG)throw Error(u+"Not a"+(O?" base "+O:"")+" number: "+j);$.s=null}$.c=$.e=null}})();function Tt(_,S,x,N){var R,$,j,I,O,D,z,B=_.c,Y=m;if(B){e:{for(R=1,I=B[0];I>=10;I/=10,R++);if($=S-R,$<0)$+=p,j=S,O=B[D=0],z=i(O/Y[R-j-1]%10);else if(D=n(($+1)/p),D>=B.length)if(N){for(;B.length<=D;B.push(0));O=z=0,R=1,$%=p,j=$-p+1}else break e;else{for(O=I=B[D],R=1;I>=10;I/=10,R++);$%=p,j=$-p+R,z=j<0?0:i(O/Y[R-j-1]%10)}if(N=N||S<0||B[D+1]!=null||(j<0?O:O%Y[R-j-1]),N=x<4?(z||N)&&(x==0||x==(_.s<0?3:2)):z>5||z==5&&(x==4||N||x==6&&($>0?j>0?O/Y[R-j]:0:B[D-1])%10&1||x==(_.s<0?8:7)),S<1||!B[0])return B.length=0,N?(S-=_.e+1,B[0]=Y[(p-S%p)%p],_.e=-S||0):B[0]=_.e=0,_;if($==0?(B.length=D,I=1,D--):(B.length=D+1,I=Y[p-$],B[D]=j>0?i(O/Y[R-j]%Y[j])*I:0),N)for(;;)if(D==0){for($=1,j=B[0];j>=10;j/=10,$++);for(j=B[0]+=I,I=1;j>=10;j/=10,I++);$!=I&&(_.e++,B[0]==l&&(B[0]=1));break}else{if(B[D]+=I,B[D]!=l)break;B[D--]=0,I=1}for($=B.length;B[--$]===0;B.pop());}_.e>He?_.c=_.e=null:_.e<Ue&&(_.c=[_.e=0])}return _}o(Tt,"round");function at(_){var S,x=_.e;return x===null?_.toString():(S=T(_.c),S=x<=ze||x>=$e?q(S,x):W(S,x,"0"),_.s<0?"-"+S:S)}return o(at,"valueOf"),G.absoluteValue=G.abs=function(){var _=new Z(this);return _.s<0&&(_.s=1),_},G.comparedTo=function(_,S){return E(this,new Z(_,S))},G.decimalPlaces=G.dp=function(_,S){var x,N,R,$=this;if(_!=null)return w(_,0,P),S==null?S=ve:w(S,0,8),Tt(new Z($),_+$.e+1,S);if(!(x=$.c))return null;if(N=((R=x.length-1)-b(this.e/p))*p,R=x[R])for(;R%10==0;R/=10,N--);return N<0&&(N=0),N},G.dividedBy=G.div=function(_,S){return V(this,new Z(_,S),Ee,ve)},G.dividedToIntegerBy=G.idiv=function(_,S){return V(this,new Z(_,S),0,1)},G.exponentiatedBy=G.pow=function(_,S){var x,N,R,$,j,I,O,D,z,B=this;if(_=new Z(_),_.c&&!_.isInteger())throw Error(u+"Exponent not an integer: "+at(_));if(S!=null&&(S=new Z(S)),I=_.e>14,!B.c||!B.c[0]||B.c[0]==1&&!B.e&&B.c.length==1||!_.c||!_.c[0])return z=new Z(Math.pow(+at(B),I?_.s*(2-k(_)):+at(_))),S?z.mod(S):z;if(O=_.s<0,S){if(S.c?!S.c[0]:!S.s)return new Z(NaN);N=!O&&B.isInteger()&&S.isInteger(),N&&(B=B.mod(S))}else{if(_.e>9&&(B.e>0||B.e<-1||(B.e==0?B.c[0]>1||I&&B.c[1]>=24e7:B.c[0]<8e13||I&&B.c[0]<=9999975e7)))return $=B.s<0&&k(_)?-0:0,B.e>-1&&($=1/$),new Z(O?1/$:$);Pt&&($=n(Pt/p+2))}for(I?(x=new Z(.5),O&&(_.s=1),D=k(_)):(R=Math.abs(+at(_)),D=R%2),z=new Z(je);;){if(D){if(z=z.times(B),!z.c)break;$?z.c.length>$&&(z.c.length=$):N&&(z=z.mod(S))}if(R){if(R=i(R/2),R===0)break;D=R%2}else if(_=_.times(x),Tt(_,_.e+1,1),_.e>14)D=k(_);else{if(R=+at(_),R===0)break;D=R%2}B=B.times(B),$?B.c&&B.c.length>$&&(B.c.length=$):N&&(B=B.mod(S))}return N?z:(O&&(z=je.div(z)),S?z.mod(S):$?Tt(z,Pt,ve,j):z)},G.integerValue=function(_){var S=new Z(this);return _==null?_=ve:w(_,0,8),Tt(S,S.e+1,_)},G.isEqualTo=G.eq=function(_,S){return E(this,new Z(_,S))===0},G.isFinite=function(){return!!this.c},G.isGreaterThan=G.gt=function(_,S){return E(this,new Z(_,S))>0},G.isGreaterThanOrEqualTo=G.gte=function(_,S){return(S=E(this,new Z(_,S)))===1||S===0},G.isInteger=function(){return!!this.c&&b(this.e/p)>this.c.length-2},G.isLessThan=G.lt=function(_,S){return E(this,new Z(_,S))<0},G.isLessThanOrEqualTo=G.lte=function(_,S){return(S=E(this,new Z(_,S)))===-1||S===0},G.isNaN=function(){return!this.s},G.isNegative=function(){return this.s<0},G.isPositive=function(){return this.s>0},G.isZero=function(){return!!this.c&&this.c[0]==0},G.minus=function(_,S){var x,N,R,$,j=this,I=j.s;if(_=new Z(_,S),S=_.s,!I||!S)return new Z(NaN);if(I!=S)return _.s=-S,j.plus(_);var O=j.e/p,D=_.e/p,z=j.c,B=_.c;if(!O||!D){if(!z||!B)return z?(_.s=-S,_):new Z(B?j:NaN);if(!z[0]||!B[0])return B[0]?(_.s=-S,_):new Z(z[0]?j:ve==3?-0:0)}if(O=b(O),D=b(D),z=z.slice(),I=O-D){for(($=I<0)?(I=-I,R=z):(D=O,R=B),R.reverse(),S=I;S--;R.push(0));R.reverse()}else for(N=($=(I=z.length)<(S=B.length))?I:S,I=S=0;S<N;S++)if(z[S]!=B[S]){$=z[S]<B[S];break}if($&&(R=z,z=B,B=R,_.s=-_.s),S=(N=B.length)-(x=z.length),S>0)for(;S--;z[x++]=0);for(S=l-1;N>I;){if(z[--N]<B[N]){for(x=N;x&&!z[--x];z[x]=S);--z[x],z[N]+=l}z[N]-=B[N]}for(;z[0]==0;z.splice(0,1),--D);return z[0]?ai(_,z,D):(_.s=ve==3?-1:1,_.c=[_.e=0],_)},G.modulo=G.mod=function(_,S){var x,N,R=this;return _=new Z(_,S),!R.c||!_.s||_.c&&!_.c[0]?new Z(NaN):!_.c||R.c&&!R.c[0]?new Z(R):(Ut==9?(N=_.s,_.s=1,x=V(R,_,0,3),_.s=N,x.s*=N):x=V(R,_,0,Ut),_=R.minus(x.times(_)),!_.c[0]&&Ut==1&&(_.s=R.s),_)},G.multipliedBy=G.times=function(_,S){var x,N,R,$,j,I,O,D,z,B,Y,te,Re,Ge,We,Ie=this,De=Ie.c,st=(_=new Z(_,S)).c;if(!De||!st||!De[0]||!st[0])return!Ie.s||!_.s||De&&!De[0]&&!st||st&&!st[0]&&!De?_.c=_.e=_.s=null:(_.s*=Ie.s,!De||!st?_.c=_.e=null:(_.c=[0],_.e=0)),_;for(N=b(Ie.e/p)+b(_.e/p),_.s*=Ie.s,O=De.length,B=st.length,O<B&&(Re=De,De=st,st=Re,R=O,O=B,B=R),R=O+B,Re=[];R--;Re.push(0));for(Ge=l,We=y,R=B;--R>=0;){for(x=0,Y=st[R]%We,te=st[R]/We|0,j=O,$=R+j;$>R;)D=De[--j]%We,z=De[j]/We|0,I=te*D+z*Y,D=Y*D+I%We*We+Re[$]+x,x=(D/Ge|0)+(I/We|0)+te*z,Re[$--]=D%Ge;Re[$]=x}return x?++N:Re.splice(0,1),ai(_,Re,N)},G.negated=function(){var _=new Z(this);return _.s=-_.s||null,_},G.plus=function(_,S){var x,N=this,R=N.s;if(_=new Z(_,S),S=_.s,!R||!S)return new Z(NaN);if(R!=S)return _.s=-S,N.minus(_);var $=N.e/p,j=_.e/p,I=N.c,O=_.c;if(!$||!j){if(!I||!O)return new Z(R/0);if(!I[0]||!O[0])return O[0]?_:new Z(I[0]?N:R*0)}if($=b($),j=b(j),I=I.slice(),R=$-j){for(R>0?(j=$,x=O):(R=-R,x=I),x.reverse();R--;x.push(0));x.reverse()}for(R=I.length,S=O.length,R-S<0&&(x=O,O=I,I=x,S=R),R=0;S;)R=(I[--S]=I[S]+O[S]+R)/l|0,I[S]=l===I[S]?0:I[S]%l;return R&&(I=[R].concat(I),++j),ai(_,I,j)},G.precision=G.sd=function(_,S){var x,N,R,$=this;if(_!=null&&_!==!!_)return w(_,1,P),S==null?S=ve:w(S,0,8),Tt(new Z($),_,S);if(!(x=$.c))return null;if(R=x.length-1,N=R*p+1,R=x[R]){for(;R%10==0;R/=10,N--);for(R=x[0];R>=10;R/=10,N++);}return _&&$.e+1>N&&(N=$.e+1),N},G.shiftedBy=function(_){return w(_,-f,f),this.times("1e"+_)},G.squareRoot=G.sqrt=function(){var _,S,x,N,R,$=this,j=$.c,I=$.s,O=$.e,D=Ee+4,z=new Z("0.5");if(I!==1||!j||!j[0])return new Z(!I||I<0&&(!j||j[0])?NaN:j?$:1/0);if(I=Math.sqrt(+at($)),I==0||I==1/0?(S=T(j),(S.length+O)%2==0&&(S+="0"),I=Math.sqrt(+S),O=b((O+1)/2)-(O<0||O%2),I==1/0?S="5e"+O:(S=I.toExponential(),S=S.slice(0,S.indexOf("e")+1)+O),x=new Z(S)):x=new Z(I+""),x.c[0]){for(O=x.e,I=O+D,I<3&&(I=0);;)if(R=x,x=z.times(R.plus(V($,R,D,1))),T(R.c).slice(0,I)===(S=T(x.c)).slice(0,I))if(x.e<O&&--I,S=S.slice(I-3,I+1),S=="9999"||!N&&S=="4999"){if(!N&&(Tt(R,R.e+Ee+2,0),R.times(R).eq($))){x=R;break}D+=4,I+=4,N=1}else{(!+S||!+S.slice(1)&&S.charAt(0)=="5")&&(Tt(x,x.e+Ee+2,1),_=!x.times(x).eq($));break}}return Tt(x,x.e+Ee+1,ve,_)},G.toExponential=function(_,S){return _!=null&&(w(_,0,P),_++),Rt(this,_,S,1)},G.toFixed=function(_,S){return _!=null&&(w(_,0,P),_=_+this.e+1),Rt(this,_,S)},G.toFormat=function(_,S,x){var N,R=this;if(x==null)_!=null&&S&&typeof S=="object"?(x=S,S=null):_&&typeof _=="object"?(x=_,_=S=null):x=ro;else if(typeof x!="object")throw Error(u+"Argument not an object: "+x);if(N=R.toFixed(_,S),R.c){var $,j=N.split("."),I=+x.groupSize,O=+x.secondaryGroupSize,D=x.groupSeparator||"",z=j[0],B=j[1],Y=R.s<0,te=Y?z.slice(1):z,Re=te.length;if(O&&($=I,I=O,O=$,Re-=$),I>0&&Re>0){for($=Re%I||I,z=te.substr(0,$);$<Re;$+=I)z+=D+te.substr($,I);O>0&&(z+=D+te.slice($)),Y&&(z="-"+z)}N=B?z+(x.decimalSeparator||"")+((O=+x.fractionGroupSize)?B.replace(new RegExp("\\d{"+O+"}\\B","g"),"$&"+(x.fractionGroupSeparator||"")):B):z}return(x.prefix||"")+N+(x.suffix||"")},G.toFraction=function(_){var S,x,N,R,$,j,I,O,D,z,B,Y,te=this,Re=te.c;if(_!=null&&(I=new Z(_),!I.isInteger()&&(I.c||I.s!==1)||I.lt(je)))throw Error(u+"Argument "+(I.isInteger()?"out of range: ":"not an integer: ")+at(I));if(!Re)return new Z(te);for(S=new Z(je),D=x=new Z(je),N=O=new Z(je),Y=T(Re),$=S.e=Y.length-te.e-1,S.c[0]=m[(j=$%p)<0?p+j:j],_=!_||I.comparedTo(S)>0?$>0?S:D:I,j=He,He=1/0,I=new Z(Y),O.c[0]=0;z=V(I,S,0,1),R=x.plus(z.times(N)),R.comparedTo(_)!=1;)x=N,N=R,D=O.plus(z.times(R=D)),O=R,S=I.minus(z.times(R=S)),I=R;return R=V(_.minus(x),N,0,1),O=O.plus(R.times(D)),x=x.plus(R.times(N)),O.s=D.s=te.s,$=$*2,B=V(D,N,$,ve).minus(te).abs().comparedTo(V(O,x,$,ve).minus(te).abs())<1?[D,N]:[O,x],He=j,B},G.toNumber=function(){return+at(this)},G.toPrecision=function(_,S){return _!=null&&w(_,1,P),Rt(this,_,S,2)},G.toString=function(_){var S,x=this,N=x.s,R=x.e;return R===null?N?(S="Infinity",N<0&&(S="-"+S)):S="NaN":(_==null?S=R<=ze||R>=$e?q(T(x.c),R):W(T(x.c),R,"0"):_===10&&ii?(x=Tt(new Z(x),Ee+R+1,ve),S=W(T(x.c),x.e,"0")):(w(_,2,wr.length,"Base"),S=J(W(T(x.c),R,"0"),10,_,N,!0)),N<0&&x.c[0]&&(S="-"+S)),S},G.valueOf=G.toJSON=function(){return at(this)},G._isBigNumber=!0,H!=null&&Z.set(H),Z}o(h,"clone");function b(H){var V=H|0;return H>0||H===V?V:V-1}o(b,"bitFloor");function T(H){for(var V,J,re=1,G=H.length,je=H[0]+"";re<G;){for(V=H[re++]+"",J=p-V.length;J--;V="0"+V);je+=V}for(G=je.length;je.charCodeAt(--G)===48;);return je.slice(0,G+1||1)}o(T,"coeffToString");function E(H,V){var J,re,G=H.c,je=V.c,Ee=H.s,ve=V.s,ze=H.e,$e=V.e;if(!Ee||!ve)return null;if(J=G&&!G[0],re=je&&!je[0],J||re)return J?re?0:-ve:Ee;if(Ee!=ve)return Ee;if(J=Ee<0,re=ze==$e,!G||!je)return re?0:!G^J?1:-1;if(!re)return ze>$e^J?1:-1;for(ve=(ze=G.length)<($e=je.length)?ze:$e,Ee=0;Ee<ve;Ee++)if(G[Ee]!=je[Ee])return G[Ee]>je[Ee]^J?1:-1;return ze==$e?0:ze>$e^J?1:-1}o(E,"compare");function w(H,V,J,re){if(H<V||H>J||H!==i(H))throw Error(u+(re||"Argument")+(typeof H=="number"?H<V||H>J?" out of range: ":" not an integer: ":" not a primitive number: ")+String(H))}o(w,"intCheck");function k(H){var V=H.c.length-1;return b(H.e/p)==V&&H.c[V]%2!=0}o(k,"isOdd");function q(H,V){return(H.length>1?H.charAt(0)+"."+H.slice(1):H)+(V<0?"e":"e+")+V}o(q,"toExponential");function W(H,V,J){var re,G;if(V<0){for(G=J+".";++V;G+=J);H=G+H}else if(re=H.length,++V>re){for(G=J,V-=re;--V;G+=J);H+=G}else V<re&&(H=H.slice(0,V)+"."+H.slice(V));return H}o(W,"toFixedPoint"),e=h(),e.default=e.BigNumber=e,typeof define=="function"&&define.amd?define(function(){return e}):typeof Ws<"u"&&Ws.exports?Ws.exports=e:(t||(t=typeof self<"u"&&self?self:window),t.BigNumber=e)})(hv)});var bv=L((OJ,_v)=>{var gv=ed(),yv=_v.exports;(function(){"use strict";function t(f){return f<10?"0"+f:f}o(t,"f");var e=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,r=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,n,i,u={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},c;function l(f){return r.lastIndex=0,r.test(f)?'"'+f.replace(r,function(m){var y=u[m];return typeof y=="string"?y:"\\u"+("0000"+m.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+f+'"'}o(l,"quote");function p(f,m){var y,P,h,b,T=n,E,w=m[f],k=w!=null&&(w instanceof gv||gv.isBigNumber(w));switch(w&&typeof w=="object"&&typeof w.toJSON=="function"&&(w=w.toJSON(f)),typeof c=="function"&&(w=c.call(m,f,w)),typeof w){case"string":return k?w:l(w);case"number":return isFinite(w)?String(w):"null";case"boolean":case"null":case"bigint":return String(w);case"object":if(!w)return"null";if(n+=i,E=[],Object.prototype.toString.apply(w)==="[object Array]"){for(b=w.length,y=0;y<b;y+=1)E[y]=p(y,w)||"null";return h=E.length===0?"[]":n?`[
32
- `+n+E.join(`,
33
- `+n)+`
34
- `+T+"]":"["+E.join(",")+"]",n=T,h}if(c&&typeof c=="object")for(b=c.length,y=0;y<b;y+=1)typeof c[y]=="string"&&(P=c[y],h=p(P,w),h&&E.push(l(P)+(n?": ":":")+h));else Object.keys(w).forEach(function(q){var W=p(q,w);W&&E.push(l(q)+(n?": ":":")+W)});return h=E.length===0?"{}":n?`{
35
- `+n+E.join(`,
36
- `+n)+`
37
- `+T+"}":"{"+E.join(",")+"}",n=T,h}}o(p,"str"),typeof yv.stringify!="function"&&(yv.stringify=function(f,m,y){var P;if(n="",i="",typeof y=="number")for(P=0;P<y;P+=1)i+=" ";else typeof y=="string"&&(i=y);if(c=m,m&&typeof m!="function"&&(typeof m!="object"||typeof m.length!="number"))throw new Error("JSON.stringify");return p("",{"":f})})})()});var Ev=L(($J,vv)=>{var Zs=null,BC=/(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])/,qC=/(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)/,VC=o(function(t){"use strict";var e={strict:!1,storeAsString:!1,alwaysParseAsBig:!1,useNativeBigInt:!1,protoAction:"error",constructorAction:"error"};if(t!=null){if(t.strict===!0&&(e.strict=!0),t.storeAsString===!0&&(e.storeAsString=!0),e.alwaysParseAsBig=t.alwaysParseAsBig===!0?t.alwaysParseAsBig:!1,e.useNativeBigInt=t.useNativeBigInt===!0?t.useNativeBigInt:!1,typeof t.constructorAction<"u")if(t.constructorAction==="error"||t.constructorAction==="ignore"||t.constructorAction==="preserve")e.constructorAction=t.constructorAction;else throw new Error(`Incorrect value for constructorAction option, must be "error", "ignore" or undefined but passed ${t.constructorAction}`);if(typeof t.protoAction<"u")if(t.protoAction==="error"||t.protoAction==="ignore"||t.protoAction==="preserve")e.protoAction=t.protoAction;else throw new Error(`Incorrect value for protoAction option, must be "error", "ignore" or undefined but passed ${t.protoAction}`)}var r,n,i={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
38
- `,r:"\r",t:" "},u,c=o(function(T){throw{name:"SyntaxError",message:T,at:r,text:u}},"error"),l=o(function(T){return T&&T!==n&&c("Expected '"+T+"' instead of '"+n+"'"),n=u.charAt(r),r+=1,n},"next"),p=o(function(){var T,E="";for(n==="-"&&(E="-",l("-"));n>="0"&&n<="9";)E+=n,l();if(n===".")for(E+=".";l()&&n>="0"&&n<="9";)E+=n;if(n==="e"||n==="E")for(E+=n,l(),(n==="-"||n==="+")&&(E+=n,l());n>="0"&&n<="9";)E+=n,l();if(T=+E,!isFinite(T))c("Bad number");else return Zs==null&&(Zs=ed()),E.length>15?e.storeAsString?E:e.useNativeBigInt?BigInt(E):new Zs(E):e.alwaysParseAsBig?e.useNativeBigInt?BigInt(T):new Zs(T):T},"number"),f=o(function(){var T,E,w="",k;if(n==='"')for(var q=r;l();){if(n==='"')return r-1>q&&(w+=u.substring(q,r-1)),l(),w;if(n==="\\"){if(r-1>q&&(w+=u.substring(q,r-1)),l(),n==="u"){for(k=0,E=0;E<4&&(T=parseInt(l(),16),!!isFinite(T));E+=1)k=k*16+T;w+=String.fromCharCode(k)}else if(typeof i[n]=="string")w+=i[n];else break;q=r}}c("Bad string")},"string"),m=o(function(){for(;n&&n<=" ";)l()},"white"),y=o(function(){switch(n){case"t":return l("t"),l("r"),l("u"),l("e"),!0;case"f":return l("f"),l("a"),l("l"),l("s"),l("e"),!1;case"n":return l("n"),l("u"),l("l"),l("l"),null}c("Unexpected '"+n+"'")},"word"),P,h=o(function(){var T=[];if(n==="["){if(l("["),m(),n==="]")return l("]"),T;for(;n;){if(T.push(P()),m(),n==="]")return l("]"),T;l(","),m()}}c("Bad array")},"array"),b=o(function(){var T,E=Object.create(null);if(n==="{"){if(l("{"),m(),n==="}")return l("}"),E;for(;n;){if(T=f(),m(),l(":"),e.strict===!0&&Object.hasOwnProperty.call(E,T)&&c('Duplicate key "'+T+'"'),BC.test(T)===!0?e.protoAction==="error"?c("Object contains forbidden prototype property"):e.protoAction==="ignore"?P():E[T]=P():qC.test(T)===!0?e.constructorAction==="error"?c("Object contains forbidden constructor property"):e.constructorAction==="ignore"?P():E[T]=P():E[T]=P(),m(),n==="}")return l("}"),E;l(","),m()}}c("Bad object")},"object");return P=o(function(){switch(m(),n){case"{":return b();case"[":return h();case'"':return f();case"-":return p();default:return n>="0"&&n<="9"?p():y()}},"value"),function(T,E){var w;return u=T+"",r=0,n=" ",w=P(),m(),n&&c("Syntax error"),typeof E=="function"?o((function k(q,W){var H,V,J=q[W];return J&&typeof J=="object"&&Object.keys(J).forEach(function(re){V=k(J,re),V!==void 0?J[re]=V:delete J[re]}),E.call(q,W,J)}),"walk")({"":w},""):w}},"json_parse");vv.exports=VC});var Tv=L((NJ,Js)=>{var Pv=bv().stringify,Sv=Ev();Js.exports=function(t){return{parse:Sv(t),stringify:Pv}};Js.exports.parse=Sv();Js.exports.stringify=Pv});var td=L(_r=>{"use strict";Object.defineProperty(_r,"__esModule",{value:!0});_r.GCE_LINUX_BIOS_PATHS=void 0;_r.isGoogleCloudServerless=Av;_r.isGoogleComputeEngineLinux=Iv;_r.isGoogleComputeEngineMACAddress=Rv;_r.isGoogleComputeEngine=Cv;_r.detectGCPResidency=GC;var wv=require("fs"),xv=require("os");_r.GCE_LINUX_BIOS_PATHS={BIOS_DATE:"/sys/class/dmi/id/bios_date",BIOS_VENDOR:"/sys/class/dmi/id/bios_vendor"};var HC=/^42:01/;function Av(){return!!(process.env.CLOUD_RUN_JOB||process.env.FUNCTION_NAME||process.env.K_SERVICE)}o(Av,"isGoogleCloudServerless");function Iv(){if((0,xv.platform)()!=="linux")return!1;try{(0,wv.statSync)(_r.GCE_LINUX_BIOS_PATHS.BIOS_DATE);let t=(0,wv.readFileSync)(_r.GCE_LINUX_BIOS_PATHS.BIOS_VENDOR,"utf8");return/Google/.test(t)}catch{return!1}}o(Iv,"isGoogleComputeEngineLinux");function Rv(){let t=(0,xv.networkInterfaces)();for(let e of Object.values(t))if(e){for(let{mac:r}of e)if(HC.test(r))return!0}return!1}o(Rv,"isGoogleComputeEngineMACAddress");function Cv(){return Iv()||Rv()}o(Cv,"isGoogleComputeEngine");function GC(){return Av()||Cv()}o(GC,"detectGCPResidency")});var Ov=L(Ks=>{"use strict";Object.defineProperty(Ks,"__esModule",{value:!0});Ks.Colours=void 0;var Et=class t{static{o(this,"Colours")}static isEnabled(e){return e&&e.isTTY&&(typeof e.getColorDepth=="function"?e.getColorDepth()>2:!0)}static refresh(){t.enabled=t.isEnabled(process==null?void 0:process.stderr),this.enabled?(t.reset="\x1B[0m",t.bright="\x1B[1m",t.dim="\x1B[2m",t.red="\x1B[31m",t.green="\x1B[32m",t.yellow="\x1B[33m",t.blue="\x1B[34m",t.magenta="\x1B[35m",t.cyan="\x1B[36m",t.white="\x1B[37m",t.grey="\x1B[90m"):(t.reset="",t.bright="",t.dim="",t.red="",t.green="",t.yellow="",t.blue="",t.magenta="",t.cyan="",t.white="",t.grey="")}};Ks.Colours=Et;Et.enabled=!1;Et.reset="";Et.bright="";Et.dim="";Et.red="";Et.green="";Et.yellow="";Et.blue="";Et.magenta="";Et.cyan="";Et.white="";Et.grey="";Et.refresh()});var Nv=L(Le=>{"use strict";var WC=Le&&Le.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:o(function(){return e[r]},"get")}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),ZC=Le&&Le.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),kv=Le&&Le.__importStar||(function(){var t=o(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[n.length]=i);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),i=0;i<n.length;i++)n[i]!=="default"&&WC(r,e,n[i]);return ZC(r,e),r}})();Object.defineProperty(Le,"__esModule",{value:!0});Le.env=Le.DebugLogBackendBase=Le.placeholder=Le.AdhocDebugLogger=Le.LogSeverity=void 0;Le.getNodeBackend=nd;Le.getDebugBackend=KC;Le.getStructuredBackend=QC;Le.setBackend=YC;Le.log=zv;var JC=require("events"),Ki=kv(require("process")),$v=kv(require("util")),Gt=Ov(),br;(function(t){t.DEFAULT="DEFAULT",t.DEBUG="DEBUG",t.INFO="INFO",t.WARNING="WARNING",t.ERROR="ERROR"})(br||(Le.LogSeverity=br={}));var Qi=class extends JC.EventEmitter{static{o(this,"AdhocDebugLogger")}constructor(e,r){super(),this.namespace=e,this.upstream=r,this.func=Object.assign(this.invoke.bind(this),{instance:this,on:o((n,i)=>this.on(n,i),"on")}),this.func.debug=(...n)=>this.invokeSeverity(br.DEBUG,...n),this.func.info=(...n)=>this.invokeSeverity(br.INFO,...n),this.func.warn=(...n)=>this.invokeSeverity(br.WARNING,...n),this.func.error=(...n)=>this.invokeSeverity(br.ERROR,...n),this.func.sublog=n=>zv(n,this.func)}invoke(e,...r){if(this.upstream)try{this.upstream(e,...r)}catch{}try{this.emit("log",e,r)}catch{}}invokeSeverity(e,...r){this.invoke({severity:e},...r)}};Le.AdhocDebugLogger=Qi;Le.placeholder=new Qi("",()=>{}).func;var Lo=class{static{o(this,"DebugLogBackendBase")}constructor(){var e;this.cached=new Map,this.filters=[],this.filtersSet=!1;let r=(e=Ki.env[Le.env.nodeEnables])!==null&&e!==void 0?e:"*";r==="all"&&(r="*"),this.filters=r.split(",")}log(e,r,...n){try{this.filtersSet||(this.setFilters(),this.filtersSet=!0);let i=this.cached.get(e);i||(i=this.makeLogger(e),this.cached.set(e,i)),i(r,...n)}catch(i){console.error(i)}}};Le.DebugLogBackendBase=Lo;var rd=class extends Lo{static{o(this,"NodeBackend")}constructor(){super(...arguments),this.enabledRegexp=/.*/g}isEnabled(e){return this.enabledRegexp.test(e)}makeLogger(e){return this.enabledRegexp.test(e)?(r,...n)=>{var i;let u=`${Gt.Colours.green}${e}${Gt.Colours.reset}`,c=`${Gt.Colours.yellow}${Ki.pid}${Gt.Colours.reset}`,l;switch(r.severity){case br.ERROR:l=`${Gt.Colours.red}${r.severity}${Gt.Colours.reset}`;break;case br.INFO:l=`${Gt.Colours.magenta}${r.severity}${Gt.Colours.reset}`;break;case br.WARNING:l=`${Gt.Colours.yellow}${r.severity}${Gt.Colours.reset}`;break;default:l=(i=r.severity)!==null&&i!==void 0?i:br.DEFAULT;break}let p=$v.formatWithOptions({colors:Gt.Colours.enabled},...n),f=Object.assign({},r);delete f.severity;let m=Object.getOwnPropertyNames(f).length?JSON.stringify(f):"",y=m?`${Gt.Colours.grey}${m}${Gt.Colours.reset}`:"";console.error("%s [%s|%s] %s%s",c,u,l,p,m?` ${y}`:"")}:()=>{}}setFilters(){let r=this.filters.join(",").replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^");this.enabledRegexp=new RegExp(`^${r}$`,"i")}};function nd(){return new rd}o(nd,"getNodeBackend");var od=class extends Lo{static{o(this,"DebugBackend")}constructor(e){super(),this.debugPkg=e}makeLogger(e){let r=this.debugPkg(e);return(n,...i)=>{r(i[0],...i.slice(1))}}setFilters(){var e;let r=(e=Ki.env.NODE_DEBUG)!==null&&e!==void 0?e:"";Ki.env.NODE_DEBUG=`${r}${r?",":""}${this.filters.join(",")}`}};function KC(t){return new od(t)}o(KC,"getDebugBackend");var id=class extends Lo{static{o(this,"StructuredBackend")}constructor(e){var r;super(),this.upstream=(r=e)!==null&&r!==void 0?r:void 0}makeLogger(e){var r;let n=(r=this.upstream)===null||r===void 0?void 0:r.makeLogger(e);return(i,...u)=>{var c;let l=(c=i.severity)!==null&&c!==void 0?c:br.INFO,p=Object.assign({severity:l,message:$v.format(...u)},i),f=JSON.stringify(p);n?n(i,f):console.log("%s",f)}}setFilters(){var e;(e=this.upstream)===null||e===void 0||e.setFilters()}};function QC(t){return new id(t)}o(QC,"getStructuredBackend");Le.env={nodeEnables:"GOOGLE_SDK_NODE_LOGGING"};var ad=new Map,Wt;function YC(t){Wt=t,ad.clear()}o(YC,"setBackend");function zv(t,e){if(!Wt&&!Ki.env[Le.env.nodeEnables]||!t)return Le.placeholder;e&&(t=`${e.instance.namespace}:${t}`);let r=ad.get(t);if(r)return r.func;if(Wt===null)return Le.placeholder;Wt===void 0&&(Wt=nd());let n=(()=>{let i;return new Qi(t,(c,...l)=>{if(i!==Wt){if(Wt===null)return;Wt===void 0&&(Wt=nd()),i=Wt}Wt?.log(t,c,...l)})})();return ad.set(t,n),n.func}o(zv,"log")});var sd=L(Qn=>{"use strict";var XC=Qn&&Qn.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:o(function(){return e[r]},"get")}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),eO=Qn&&Qn.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&XC(e,t,r)};Object.defineProperty(Qn,"__esModule",{value:!0});eO(Nv(),Qn)});var Xi=L(se=>{"use strict";var Uv=se&&se.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:o(function(){return e[r]},"get")}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),tO=se&&se.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),rO=se&&se.__importStar||(function(){var t=o(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[n.length]=i);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),i=0;i<n.length;i++)n[i]!=="default"&&Uv(r,e,n[i]);return tO(r,e),r}})(),nO=se&&se.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Uv(e,t,r)};Object.defineProperty(se,"__esModule",{value:!0});se.gcpResidencyCache=se.METADATA_SERVER_DETECTION=se.HEADERS=se.HEADER_VALUE=se.HEADER_NAME=se.SECONDARY_HOST_ADDRESS=se.HOST_ADDRESS=se.BASE_PATH=void 0;se.instance=cO;se.project=lO;se.universe=dO;se.bulk=pO;se.isAvailable=mO;se.resetIsAvailableCache=hO;se.getGCPResidency=ld;se.setGCPResidency=jv;se.requestTimeout=Mv;var ud=_t(),oO=Tv(),iO=td(),aO=rO(sd());se.BASE_PATH="/computeMetadata/v1";se.HOST_ADDRESS="http://169.254.169.254";se.SECONDARY_HOST_ADDRESS="http://metadata.google.internal.";se.HEADER_NAME="Metadata-Flavor";se.HEADER_VALUE="Google";se.HEADERS=Object.freeze({[se.HEADER_NAME]:se.HEADER_VALUE});var Dv=aO.log("gcp-metadata");se.METADATA_SERVER_DETECTION=Object.freeze({"assume-present":"don't try to ping the metadata server, but assume it's present",none:"don't try to ping the metadata server, but don't try to use it either","bios-only":"treat the result of a BIOS probe as canonical (don't fall back to pinging)","ping-only":"skip the BIOS probe, and go straight to pinging"});function cd(t){return t||(t=process.env.GCE_METADATA_IP||process.env.GCE_METADATA_HOST||se.HOST_ADDRESS),/^https?:\/\//.test(t)||(t=`http://${t}`),new URL(se.BASE_PATH,t).href}o(cd,"getBaseUrl");function sO(t){Object.keys(t).forEach(e=>{switch(e){case"params":case"property":case"headers":break;case"qs":throw new Error("'qs' is not a valid configuration option. Please use 'params' instead.");default:throw new Error(`'${e}' is not a valid configuration option.`)}})}o(sO,"validate");async function Yi(t,e={},r=3,n=!1){let i=new Headers(se.HEADERS),u="",c={};if(typeof t=="object"){let y=t;new Headers(y.headers).forEach((P,h)=>i.set(h,P)),u=y.metadataKey,c=y.params||c,r=y.noResponseRetries||r,n=y.fastFail||n}else u=t;typeof e=="string"?u+=`/${e}`:(sO(e),e.property&&(u+=`/${e.property}`),new Headers(e.headers).forEach((y,P)=>i.set(P,y)),c=e.params||c);let l=n?uO:ud.request,p={url:`${cd()}/${u}`,headers:i,retryConfig:{noResponseRetries:r},params:c,responseType:"text",timeout:Mv()};Dv.info("instance request %j",p);let f=await l(p);Dv.info("instance metadata is %s",f.data);let m=f.headers.get(se.HEADER_NAME);if(m!==se.HEADER_VALUE)throw new RangeError(`Invalid response from metadata service: incorrect ${se.HEADER_NAME} header. Expected '${se.HEADER_VALUE}', got ${m?`'${m}'`:"no header"}`);if(typeof f.data=="string")try{return oO.parse(f.data)}catch{}return f.data}o(Yi,"metadataAccessor");async function uO(t){let e={...t,url:t.url?.toString().replace(cd(),cd(se.SECONDARY_HOST_ADDRESS))},r=(0,ud.request)(t),n=(0,ud.request)(e);return Promise.any([r,n])}o(uO,"fastFailMetadataRequest");function cO(t){return Yi("instance",t)}o(cO,"instance");function lO(t){return Yi("project",t)}o(lO,"project");function dO(t){return Yi("universe",t)}o(dO,"universe");async function pO(t){let e={};return await Promise.all(t.map(r=>(async()=>{let n=await Yi(r),i=r.metadataKey;e[i]=n})())),e}o(pO,"bulk");function fO(){return process.env.DETECT_GCP_RETRIES?Number(process.env.DETECT_GCP_RETRIES):0}o(fO,"detectGCPAvailableRetries");var Qs;async function mO(){if(process.env.METADATA_SERVER_DETECTION){let t=process.env.METADATA_SERVER_DETECTION.trim().toLocaleLowerCase();if(!(t in se.METADATA_SERVER_DETECTION))throw new RangeError(`Unknown \`METADATA_SERVER_DETECTION\` env variable. Got \`${t}\`, but it should be \`${Object.keys(se.METADATA_SERVER_DETECTION).join("`, `")}\`, or unset`);switch(t){case"assume-present":return!0;case"none":return!1;case"bios-only":return ld();case"ping-only":}}try{return Qs===void 0&&(Qs=Yi("instance",void 0,fO(),!(process.env.GCE_METADATA_IP||process.env.GCE_METADATA_HOST))),await Qs,!0}catch(t){let e=t;if(process.env.DEBUG_AUTH&&console.info(e),e.type==="request-timeout"||e.response&&e.response.status===404)return!1;if(!(e.response&&e.response.status===404)&&(!e.code||!["EHOSTDOWN","EHOSTUNREACH","ENETUNREACH","ENOENT","ENOTFOUND","ECONNREFUSED"].includes(e.code.toString()))){let r="UNKNOWN";e.code&&(r=e.code.toString()),process.emitWarning(`received unexpected error = ${e.message} code = ${r}`,"MetadataLookupWarning")}return!1}}o(mO,"isAvailable");function hO(){Qs=void 0}o(hO,"resetIsAvailableCache");se.gcpResidencyCache=null;function ld(){return se.gcpResidencyCache===null&&jv(),se.gcpResidencyCache}o(ld,"getGCPResidency");function jv(t=null){se.gcpResidencyCache=t!==null?t:(0,iO.detectGCPResidency)()}o(jv,"setGCPResidency");function Mv(){return ld()?0:3e3}o(Mv,"requestTimeout");nO(td(),se)});var Bv=L(Ys=>{"use strict";Ys.byteLength=yO;Ys.toByteArray=bO;Ys.fromByteArray=PO;var $r=[],ar=[],gO=typeof Uint8Array<"u"?Uint8Array:Array,dd="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(Yn=0,Lv=dd.length;Yn<Lv;++Yn)$r[Yn]=dd[Yn],ar[dd.charCodeAt(Yn)]=Yn;var Yn,Lv;ar[45]=62;ar[95]=63;function Fv(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");r===-1&&(r=e);var n=r===e?0:4-r%4;return[r,n]}o(Fv,"getLens");function yO(t){var e=Fv(t),r=e[0],n=e[1];return(r+n)*3/4-n}o(yO,"byteLength");function _O(t,e,r){return(e+r)*3/4-r}o(_O,"_byteLength");function bO(t){var e,r=Fv(t),n=r[0],i=r[1],u=new gO(_O(t,n,i)),c=0,l=i>0?n-4:n,p;for(p=0;p<l;p+=4)e=ar[t.charCodeAt(p)]<<18|ar[t.charCodeAt(p+1)]<<12|ar[t.charCodeAt(p+2)]<<6|ar[t.charCodeAt(p+3)],u[c++]=e>>16&255,u[c++]=e>>8&255,u[c++]=e&255;return i===2&&(e=ar[t.charCodeAt(p)]<<2|ar[t.charCodeAt(p+1)]>>4,u[c++]=e&255),i===1&&(e=ar[t.charCodeAt(p)]<<10|ar[t.charCodeAt(p+1)]<<4|ar[t.charCodeAt(p+2)]>>2,u[c++]=e>>8&255,u[c++]=e&255),u}o(bO,"toByteArray");function vO(t){return $r[t>>18&63]+$r[t>>12&63]+$r[t>>6&63]+$r[t&63]}o(vO,"tripletToBase64");function EO(t,e,r){for(var n,i=[],u=e;u<r;u+=3)n=(t[u]<<16&16711680)+(t[u+1]<<8&65280)+(t[u+2]&255),i.push(vO(n));return i.join("")}o(EO,"encodeChunk");function PO(t){for(var e,r=t.length,n=r%3,i=[],u=16383,c=0,l=r-n;c<l;c+=u)i.push(EO(t,c,c+u>l?l:c+u));return n===1?(e=t[r-1],i.push($r[e>>2]+$r[e<<4&63]+"==")):n===2&&(e=(t[r-2]<<8)+t[r-1],i.push($r[e>>10]+$r[e>>4&63]+$r[e<<2&63]+"=")),i.join("")}o(PO,"fromByteArray")});var fd=L(pd=>{"use strict";Object.defineProperty(pd,"__esModule",{value:!0});pd.fromArrayBufferToHex=SO;function SO(t){return Array.from(new Uint8Array(t)).map(r=>r.toString(16).padStart(2,"0")).join("")}o(SO,"fromArrayBufferToHex")});var qv=L(Xs=>{"use strict";Object.defineProperty(Xs,"__esModule",{value:!0});Xs.BrowserCrypto=void 0;var Fo=Bv(),TO=fd(),md=class t{static{o(this,"BrowserCrypto")}constructor(){if(typeof window>"u"||window.crypto===void 0||window.crypto.subtle===void 0)throw new Error("SubtleCrypto not found. Make sure it's an https:// website.")}async sha256DigestBase64(e){let r=new TextEncoder().encode(e),n=await window.crypto.subtle.digest("SHA-256",r);return Fo.fromByteArray(new Uint8Array(n))}randomBytesBase64(e){let r=new Uint8Array(e);return window.crypto.getRandomValues(r),Fo.fromByteArray(r)}static padBase64(e){for(;e.length%4!==0;)e+="=";return e}async verify(e,r,n){let i={name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},u=new TextEncoder().encode(r),c=Fo.toByteArray(t.padBase64(n)),l=await window.crypto.subtle.importKey("jwk",e,i,!0,["verify"]);return await window.crypto.subtle.verify(i,l,c,u)}async sign(e,r){let n={name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},i=new TextEncoder().encode(r),u=await window.crypto.subtle.importKey("jwk",e,n,!0,["sign"]),c=await window.crypto.subtle.sign(n,u,i);return Fo.fromByteArray(new Uint8Array(c))}decodeBase64StringUtf8(e){let r=Fo.toByteArray(t.padBase64(e));return new TextDecoder().decode(r)}encodeBase64StringUtf8(e){let r=new TextEncoder().encode(e);return Fo.fromByteArray(r)}async sha256DigestHex(e){let r=new TextEncoder().encode(e),n=await window.crypto.subtle.digest("SHA-256",r);return(0,TO.fromArrayBufferToHex)(n)}async signWithHmacSha256(e,r){let n=typeof e=="string"?e:String.fromCharCode(...new Uint16Array(e)),i=new TextEncoder,u=await window.crypto.subtle.importKey("raw",i.encode(n),{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign"]);return window.crypto.subtle.sign("HMAC",u,i.encode(r))}};Xs.BrowserCrypto=md});var Vv=L(eu=>{"use strict";Object.defineProperty(eu,"__esModule",{value:!0});eu.NodeCrypto=void 0;var Bo=require("crypto"),hd=class{static{o(this,"NodeCrypto")}async sha256DigestBase64(e){return Bo.createHash("sha256").update(e).digest("base64")}randomBytesBase64(e){return Bo.randomBytes(e).toString("base64")}async verify(e,r,n){let i=Bo.createVerify("RSA-SHA256");return i.update(r),i.end(),i.verify(e,n,"base64")}async sign(e,r){let n=Bo.createSign("RSA-SHA256");return n.update(r),n.end(),n.sign(e,"base64")}decodeBase64StringUtf8(e){return Buffer.from(e,"base64").toString("utf-8")}encodeBase64StringUtf8(e){return Buffer.from(e,"utf-8").toString("base64")}async sha256DigestHex(e){return Bo.createHash("sha256").update(e).digest("hex")}async signWithHmacSha256(e,r){let n=typeof e=="string"?e:xO(e);return wO(Bo.createHmac("sha256",n).update(r).digest())}};eu.NodeCrypto=hd;function wO(t){return t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength)}o(wO,"toArrayBuffer");function xO(t){return Buffer.from(t)}o(xO,"toBuffer")});var ea=L(rn=>{"use strict";var AO=rn&&rn.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:o(function(){return e[r]},"get")}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),IO=rn&&rn.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&AO(e,t,r)};Object.defineProperty(rn,"__esModule",{value:!0});rn.createCrypto=OO;rn.hasBrowserCrypto=Hv;var RO=qv(),CO=Vv();IO(fd(),rn);function OO(){return Hv()?new RO.BrowserCrypto:new CO.NodeCrypto}o(OO,"createCrypto");function Hv(){return typeof window<"u"&&typeof window.crypto<"u"&&typeof window.crypto.subtle<"u"}o(Hv,"hasBrowserCrypto")});var qo=L((gd,Wv)=>{var tu=require("buffer"),zr=tu.Buffer;function Gv(t,e){for(var r in t)e[r]=t[r]}o(Gv,"copyProps");zr.from&&zr.alloc&&zr.allocUnsafe&&zr.allocUnsafeSlow?Wv.exports=tu:(Gv(tu,gd),gd.Buffer=Xn);function Xn(t,e,r){return zr(t,e,r)}o(Xn,"SafeBuffer");Xn.prototype=Object.create(zr.prototype);Gv(zr,Xn);Xn.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return zr(t,e,r)};Xn.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var n=zr(t);return e!==void 0?typeof r=="string"?n.fill(e,r):n.fill(e):n.fill(0),n};Xn.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return zr(t)};Xn.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return tu.SlowBuffer(t)}});var Jv=L((n3,Zv)=>{"use strict";function yd(t){var e=(t/8|0)+(t%8===0?0:1);return e}o(yd,"getParamSize");var kO={ES256:yd(256),ES384:yd(384),ES512:yd(521)};function $O(t){var e=kO[t];if(e)return e;throw new Error('Unknown algorithm "'+t+'"')}o($O,"getParamBytesForAlg");Zv.exports=$O});var _d=L((i3,tE)=>{"use strict";var ru=qo().Buffer,Qv=Jv(),nu=128,Yv=0,zO=32,NO=16,DO=2,Xv=NO|zO|Yv<<6,ou=DO|Yv<<6;function UO(t){return t.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}o(UO,"base64Url");function eE(t){if(ru.isBuffer(t))return t;if(typeof t=="string")return ru.from(t,"base64");throw new TypeError("ECDSA signature must be a Base64 string or a Buffer")}o(eE,"signatureAsBuffer");function jO(t,e){t=eE(t);var r=Qv(e),n=r+1,i=t.length,u=0;if(t[u++]!==Xv)throw new Error('Could not find expected "seq"');var c=t[u++];if(c===(nu|1)&&(c=t[u++]),i-u<c)throw new Error('"seq" specified length of "'+c+'", only "'+(i-u)+'" remaining');if(t[u++]!==ou)throw new Error('Could not find expected "int" for "r"');var l=t[u++];if(i-u-2<l)throw new Error('"r" specified length of "'+l+'", only "'+(i-u-2)+'" available');if(n<l)throw new Error('"r" specified length of "'+l+'", max of "'+n+'" is acceptable');var p=u;if(u+=l,t[u++]!==ou)throw new Error('Could not find expected "int" for "s"');var f=t[u++];if(i-u!==f)throw new Error('"s" specified length of "'+f+'", expected "'+(i-u)+'"');if(n<f)throw new Error('"s" specified length of "'+f+'", max of "'+n+'" is acceptable');var m=u;if(u+=f,u!==i)throw new Error('Expected to consume entire buffer, but "'+(i-u)+'" bytes remain');var y=r-l,P=r-f,h=ru.allocUnsafe(y+l+P+f);for(u=0;u<y;++u)h[u]=0;t.copy(h,u,p+Math.max(-y,0),p+l),u=r;for(var b=u;u<b+P;++u)h[u]=0;return t.copy(h,u,m+Math.max(-P,0),m+f),h=h.toString("base64"),h=UO(h),h}o(jO,"derToJose");function Kv(t,e,r){for(var n=0;e+n<r&&t[e+n]===0;)++n;var i=t[e+n]>=nu;return i&&--n,n}o(Kv,"countPadding");function MO(t,e){t=eE(t);var r=Qv(e),n=t.length;if(n!==r*2)throw new TypeError('"'+e+'" signatures must be "'+r*2+'" bytes, saw "'+n+'"');var i=Kv(t,0,r),u=Kv(t,r,t.length),c=r-i,l=r-u,p=2+c+1+1+l,f=p<nu,m=ru.allocUnsafe((f?2:3)+p),y=0;return m[y++]=Xv,f?m[y++]=p:(m[y++]=nu|1,m[y++]=p&255),m[y++]=ou,m[y++]=c,i<0?(m[y++]=0,y+=t.copy(m,y,0,r)):y+=t.copy(m,y,i,r),m[y++]=ou,m[y++]=l,u<0?(m[y++]=0,t.copy(m,y,r)):t.copy(m,y,r+u),m}o(MO,"joseToDer");tE.exports={derToJose:jO,joseToDer:MO}});var vr=L(nn=>{"use strict";Object.defineProperty(nn,"__esModule",{value:!0});nn.LRUCache=void 0;nn.snakeToCamel=nE;nn.originalOrCamelOptions=qO;nn.removeUndefinedValuesInObject=VO;nn.isValidFile=HO;nn.getWellKnownCertificateConfigFileLocation=GO;var LO=require("fs"),FO=require("os"),bd=require("path"),BO="certificate_config.json",rE="gcloud";function nE(t){return t.replace(/([_][^_])/g,e=>e.slice(1).toUpperCase())}o(nE,"snakeToCamel");function qO(t){function e(r){let n=t||{};return n[r]??n[nE(r)]}return o(e,"get"),{get:e}}o(qO,"originalOrCamelOptions");var vd=class{static{o(this,"LRUCache")}capacity;#e=new Map;maxAge;constructor(e){this.capacity=e.capacity,this.maxAge=e.maxAge}#t(e,r){this.#e.delete(e),this.#e.set(e,{value:r,lastAccessed:Date.now()})}set(e,r){this.#t(e,r),this.#r()}get(e){let r=this.#e.get(e);if(r)return this.#t(e,r.value),this.#r(),r.value}#r(){let e=this.maxAge?Date.now()-this.maxAge:0,r=this.#e.entries().next();for(;!r.done&&(this.#e.size>this.capacity||r.value[1].lastAccessed<e);)this.#e.delete(r.value[0]),r=this.#e.entries().next()}};nn.LRUCache=vd;function VO(t){return Object.entries(t).forEach(([e,r])=>{(r===void 0||r==="undefined")&&delete t[e]}),t}o(VO,"removeUndefinedValuesInObject");async function HO(t){try{return(await LO.promises.lstat(t)).isFile()}catch{return!1}}o(HO,"isValidFile");function GO(){let t=process.env.CLOUDSDK_CONFIG||(WO()?bd.join(process.env.APPDATA||"",rE):bd.join(process.env.HOME||"",".config",rE));return bd.join(t,BO)}o(GO,"getWellKnownCertificateConfigFileLocation");function WO(){return FO.platform().startsWith("win")}o(WO,"_isWindows")});var oE=L((c3,ZO)=>{ZO.exports={name:"google-auth-library",version:"10.5.0",author:"Google Inc.",description:"Google APIs Authentication Client Library for Node.js",engines:{node:">=18"},main:"./build/src/index.js",types:"./build/src/index.d.ts",repository:"googleapis/google-auth-library-nodejs.git",keywords:["google","api","google apis","client","client library"],dependencies:{"base64-js":"^1.3.0","ecdsa-sig-formatter":"^1.0.11",gaxios:"^7.0.0","gcp-metadata":"^8.0.0","google-logging-utils":"^1.0.0",gtoken:"^8.0.0",jws:"^4.0.0"},devDependencies:{"@types/base64-js":"^1.2.5","@types/jws":"^3.1.0","@types/mocha":"^10.0.10","@types/mv":"^2.1.0","@types/ncp":"^2.0.1","@types/node":"^22.0.0","@types/sinon":"^17.0.0","assert-rejects":"^1.0.0",c8:"^10.0.0",codecov:"^3.0.2",gts:"^6.0.0","is-docker":"^3.0.0",jsdoc:"^4.0.0","jsdoc-fresh":"^5.0.0","jsdoc-region-tag":"^4.0.0",karma:"^6.0.0","karma-chrome-launcher":"^3.0.0","karma-coverage":"^2.0.0","karma-firefox-launcher":"^2.0.0","karma-mocha":"^2.0.0","karma-sourcemap-loader":"^0.4.0","karma-webpack":"^5.0.1",keypair:"^1.0.4",mocha:"^11.1.0",mv:"^2.1.1",ncp:"^2.0.0",nock:"^14.0.5","null-loader":"^4.0.0",puppeteer:"^24.0.0",sinon:"^21.0.0","ts-loader":"^8.0.0",typescript:"5.8.2",webpack:"^5.21.2","webpack-cli":"^4.0.0"},files:["build/src","!build/src/**/*.map"],scripts:{test:"c8 mocha build/test",clean:"gts clean",prepare:"npm run compile",lint:"gts check --no-inline-config",compile:"tsc -p .",fix:"gts fix",pretest:"npm run compile -- --sourceMap",docs:"jsdoc -c .jsdoc.js","samples-setup":"cd samples/ && npm link ../ && npm run setup && cd ../","samples-test":"cd samples/ && npm link ../ && npm test && cd ../","system-test":"mocha build/system-test --timeout 60000","presystem-test":"npm run compile -- --sourceMap",webpack:"webpack","browser-test":"karma start","docs-test":"echo 'disabled until linkinator is fixed'","predocs-test":"npm run docs",prelint:"cd samples; npm link ../; npm install"},license:"Apache-2.0"}});var Ed=L(On=>{"use strict";Object.defineProperty(On,"__esModule",{value:!0});On.USER_AGENT=On.PRODUCT_NAME=On.pkg=void 0;var iE=oE();On.pkg=iE;var aE="google-api-nodejs-client";On.PRODUCT_NAME=aE;var JO=`${aE}/${iE.version}`;On.USER_AGENT=JO});var Zt=L(Er=>{"use strict";Object.defineProperty(Er,"__esModule",{value:!0});Er.AuthClient=Er.DEFAULT_EAGER_REFRESH_THRESHOLD_MILLIS=Er.DEFAULT_UNIVERSE=void 0;var KO=require("events"),Pd=_t(),QO=vr(),YO=sd(),Sd=Ed();Er.DEFAULT_UNIVERSE="googleapis.com";Er.DEFAULT_EAGER_REFRESH_THRESHOLD_MILLIS=300*1e3;var Td=class t extends KO.EventEmitter{static{o(this,"AuthClient")}apiKey;projectId;quotaProjectId;transporter;credentials={};eagerRefreshThresholdMillis=Er.DEFAULT_EAGER_REFRESH_THRESHOLD_MILLIS;forceRefreshOnFailure=!1;universeDomain=Er.DEFAULT_UNIVERSE;static RequestMethodNameSymbol=Symbol("request method name");static RequestLogIdSymbol=Symbol("request log id");constructor(e={}){super();let r=(0,QO.originalOrCamelOptions)(e);this.apiKey=e.apiKey,this.projectId=r.get("project_id")??null,this.quotaProjectId=r.get("quota_project_id"),this.credentials=r.get("credentials")??{},this.universeDomain=r.get("universe_domain")??Er.DEFAULT_UNIVERSE,this.transporter=e.transporter??new Pd.Gaxios(e.transporterOptions),r.get("useAuthRequestParameters")!==!1&&(this.transporter.interceptors.request.add(t.DEFAULT_REQUEST_INTERCEPTOR),this.transporter.interceptors.response.add(t.DEFAULT_RESPONSE_INTERCEPTOR)),e.eagerRefreshThresholdMillis&&(this.eagerRefreshThresholdMillis=e.eagerRefreshThresholdMillis),this.forceRefreshOnFailure=e.forceRefreshOnFailure??!1}fetch(...e){let r=e[0],n=e[1],i,u=new Headers;return typeof r=="string"?i=new URL(r):r instanceof URL?i=r:r&&r.url&&(i=new URL(r.url)),r&&typeof r=="object"&&"headers"in r&&Pd.Gaxios.mergeHeaders(u,r.headers),n&&Pd.Gaxios.mergeHeaders(u,new Headers(n.headers)),typeof r=="object"&&!(r instanceof URL)?this.request({...n,...r,headers:u,url:i}):this.request({...n,headers:u,url:i})}setCredentials(e){this.credentials=e}addSharedMetadataHeaders(e){return!e.has("x-goog-user-project")&&this.quotaProjectId&&e.set("x-goog-user-project",this.quotaProjectId),e}addUserProjectAndAuthHeaders(e,r){let n=r.get("x-goog-user-project"),i=r.get("authorization");return n&&e.set("x-goog-user-project",n),i&&e.set("authorization",i),e}static log=(0,YO.log)("auth");static DEFAULT_REQUEST_INTERCEPTOR={resolved:o(async e=>{if(!e.headers.has("x-goog-api-client")){let n=process.version.replace(/^v/,"");e.headers.set("x-goog-api-client",`gl-node/${n}`)}let r=e.headers.get("User-Agent");r?r.includes(`${Sd.PRODUCT_NAME}/`)||e.headers.set("User-Agent",`${r} ${Sd.USER_AGENT}`):e.headers.set("User-Agent",Sd.USER_AGENT);try{let n=e,i=n[t.RequestMethodNameSymbol],u=`${Math.floor(Math.random()*1e3)}`;n[t.RequestLogIdSymbol]=u;let c={url:e.url,headers:e.headers};i?t.log.info("%s [%s] request %j",i,u,c):t.log.info("[%s] request %j",u,c)}catch{}return e},"resolved")};static DEFAULT_RESPONSE_INTERCEPTOR={resolved:o(async e=>{try{let r=e.config,n=r[t.RequestMethodNameSymbol],i=r[t.RequestLogIdSymbol];n?t.log.info("%s [%s] response %j",n,i,e.data):t.log.info("[%s] response %j",i,e.data)}catch{}return e},"resolved"),rejected:o(async e=>{try{let r=e.config,n=r[t.RequestMethodNameSymbol],i=r[t.RequestLogIdSymbol];n?t.log.info("%s [%s] error %j",n,i,e.response?.data):t.log.error("[%s] error %j",i,e.response?.data)}catch{}throw e},"rejected")};static setMethodName(e,r){try{let n=e;n[t.RequestMethodNameSymbol]=r}catch{}}static get RETRY_CONFIG(){return{retry:!0,retryConfig:{httpMethodsToRetry:["GET","PUT","POST","HEAD","OPTIONS","DELETE"]}}}};Er.AuthClient=Td});var xd=L(iu=>{"use strict";Object.defineProperty(iu,"__esModule",{value:!0});iu.LoginTicket=void 0;var wd=class{static{o(this,"LoginTicket")}envelope;payload;constructor(e,r){this.envelope=e,this.payload=r}getEnvelope(){return this.envelope}getPayload(){return this.payload}getUserId(){let e=this.getPayload();return e&&e.sub?e.sub:null}getAttributes(){return{envelope:this.getEnvelope(),payload:this.getPayload()}}};iu.LoginTicket=wd});var eo=L(Nr=>{"use strict";Object.defineProperty(Nr,"__esModule",{value:!0});Nr.OAuth2Client=Nr.ClientAuthentication=Nr.CertificateFormat=Nr.CodeChallengeMethod=void 0;var sE=_t(),XO=require("querystring"),ek=require("stream"),tk=_d(),uE=vr(),Ad=ea(),Vo=Zt(),rk=xd(),cE;(function(t){t.Plain="plain",t.S256="S256"})(cE||(Nr.CodeChallengeMethod=cE={}));var on;(function(t){t.PEM="PEM",t.JWK="JWK"})(on||(Nr.CertificateFormat=on={}));var ta;(function(t){t.ClientSecretPost="ClientSecretPost",t.ClientSecretBasic="ClientSecretBasic",t.None="None"})(ta||(Nr.ClientAuthentication=ta={}));var Id=class t extends Vo.AuthClient{static{o(this,"OAuth2Client")}redirectUri;certificateCache={};certificateExpiry=null;certificateCacheFormat=on.PEM;refreshTokenPromises=new Map;endpoints;issuers;clientAuthentication;_clientId;_clientSecret;refreshHandler;constructor(e={},r,n){super(typeof e=="object"?e:{}),typeof e!="object"&&(e={clientId:e,clientSecret:r,redirectUri:n}),this._clientId=e.clientId||e.client_id,this._clientSecret=e.clientSecret||e.client_secret,this.redirectUri=e.redirectUri||e.redirect_uris?.[0],this.endpoints={tokenInfoUrl:"https://oauth2.googleapis.com/tokeninfo",oauth2AuthBaseUrl:"https://accounts.google.com/o/oauth2/v2/auth",oauth2TokenUrl:"https://oauth2.googleapis.com/token",oauth2RevokeUrl:"https://oauth2.googleapis.com/revoke",oauth2FederatedSignonPemCertsUrl:"https://www.googleapis.com/oauth2/v1/certs",oauth2FederatedSignonJwkCertsUrl:"https://www.googleapis.com/oauth2/v3/certs",oauth2IapPublicKeyUrl:"https://www.gstatic.com/iap/verify/public_key",...e.endpoints},this.clientAuthentication=e.clientAuthentication||ta.ClientSecretPost,this.issuers=e.issuers||["accounts.google.com","https://accounts.google.com",this.universeDomain]}static GOOGLE_TOKEN_INFO_URL="https://oauth2.googleapis.com/tokeninfo";static CLOCK_SKEW_SECS_=300;static DEFAULT_MAX_TOKEN_LIFETIME_SECS_=86400;generateAuthUrl(e={}){if(e.code_challenge_method&&!e.code_challenge)throw new Error("If a code_challenge_method is provided, code_challenge must be included.");return e.response_type=e.response_type||"code",e.client_id=e.client_id||this._clientId,e.redirect_uri=e.redirect_uri||this.redirectUri,Array.isArray(e.scope)&&(e.scope=e.scope.join(" ")),this.endpoints.oauth2AuthBaseUrl.toString()+"?"+XO.stringify(e)}generateCodeVerifier(){throw new Error("generateCodeVerifier is removed, please use generateCodeVerifierAsync instead.")}async generateCodeVerifierAsync(){let e=(0,Ad.createCrypto)(),n=e.randomBytesBase64(96).replace(/\+/g,"~").replace(/=/g,"_").replace(/\//g,"-"),u=(await e.sha256DigestBase64(n)).split("=")[0].replace(/\+/g,"-").replace(/\//g,"_");return{codeVerifier:n,codeChallenge:u}}getToken(e,r){let n=typeof e=="string"?{code:e}:e;if(r)this.getTokenAsync(n).then(i=>r(null,i.tokens,i.res),i=>r(i,null,i.response));else return this.getTokenAsync(n)}async getTokenAsync(e){let r=this.endpoints.oauth2TokenUrl.toString(),n=new Headers,i={client_id:e.client_id||this._clientId,code_verifier:e.codeVerifier,code:e.code,grant_type:"authorization_code",redirect_uri:e.redirect_uri||this.redirectUri};if(this.clientAuthentication===ta.ClientSecretBasic){let p=Buffer.from(`${this._clientId}:${this._clientSecret}`);n.set("authorization",`Basic ${p.toString("base64")}`)}this.clientAuthentication===ta.ClientSecretPost&&(i.client_secret=this._clientSecret);let u={...t.RETRY_CONFIG,method:"POST",url:r,data:new URLSearchParams((0,uE.removeUndefinedValuesInObject)(i)),headers:n};Vo.AuthClient.setMethodName(u,"getTokenAsync");let c=await this.transporter.request(u),l=c.data;return c.data&&c.data.expires_in&&(l.expiry_date=new Date().getTime()+c.data.expires_in*1e3,delete l.expires_in),this.emit("tokens",l),{tokens:l,res:c}}async refreshToken(e){if(!e)return this.refreshTokenNoCache(e);if(this.refreshTokenPromises.has(e))return this.refreshTokenPromises.get(e);let r=this.refreshTokenNoCache(e).then(n=>(this.refreshTokenPromises.delete(e),n),n=>{throw this.refreshTokenPromises.delete(e),n});return this.refreshTokenPromises.set(e,r),r}async refreshTokenNoCache(e){if(!e)throw new Error("No refresh token is set.");let r=this.endpoints.oauth2TokenUrl.toString(),n={refresh_token:e,client_id:this._clientId,client_secret:this._clientSecret,grant_type:"refresh_token"},i;try{let c={...t.RETRY_CONFIG,method:"POST",url:r,data:new URLSearchParams((0,uE.removeUndefinedValuesInObject)(n))};Vo.AuthClient.setMethodName(c,"refreshTokenNoCache"),i=await this.transporter.request(c)}catch(c){throw c instanceof sE.GaxiosError&&c.message==="invalid_grant"&&c.response?.data&&/ReAuth/i.test(c.response.data.error_description)&&(c.message=JSON.stringify(c.response.data)),c}let u=i.data;return i.data&&i.data.expires_in&&(u.expiry_date=new Date().getTime()+i.data.expires_in*1e3,delete u.expires_in),this.emit("tokens",u),{tokens:u,res:i}}refreshAccessToken(e){if(e)this.refreshAccessTokenAsync().then(r=>e(null,r.credentials,r.res),e);else return this.refreshAccessTokenAsync()}async refreshAccessTokenAsync(){let e=await this.refreshToken(this.credentials.refresh_token),r=e.tokens;return r.refresh_token=this.credentials.refresh_token,this.credentials=r,{credentials:this.credentials,res:e.res}}getAccessToken(e){if(e)this.getAccessTokenAsync().then(r=>e(null,r.token,r.res),e);else return this.getAccessTokenAsync()}async getAccessTokenAsync(){if(!this.credentials.access_token||this.isTokenExpiring()){if(!this.credentials.refresh_token)if(this.refreshHandler){let n=await this.processAndValidateRefreshHandler();if(n?.access_token)return this.setCredentials(n),{token:this.credentials.access_token}}else throw new Error("No refresh token or refresh handler callback is set.");let r=await this.refreshAccessTokenAsync();if(!r.credentials||r.credentials&&!r.credentials.access_token)throw new Error("Could not refresh access token.");return{token:r.credentials.access_token,res:r.res}}else return{token:this.credentials.access_token}}async getRequestHeaders(e){return(await this.getRequestMetadataAsync(e)).headers}async getRequestMetadataAsync(e){let r=this.credentials;if(!r.access_token&&!r.refresh_token&&!this.apiKey&&!this.refreshHandler)throw new Error("No access, refresh token, API key or refresh handler callback is set.");if(r.access_token&&!this.isTokenExpiring()){r.token_type=r.token_type||"Bearer";let l=new Headers({authorization:r.token_type+" "+r.access_token});return{headers:this.addSharedMetadataHeaders(l)}}if(this.refreshHandler){let l=await this.processAndValidateRefreshHandler();if(l?.access_token){this.setCredentials(l);let p=new Headers({authorization:"Bearer "+this.credentials.access_token});return{headers:this.addSharedMetadataHeaders(p)}}}if(this.apiKey)return{headers:new Headers({"X-Goog-Api-Key":this.apiKey})};let n=null,i=null;try{n=await this.refreshToken(r.refresh_token),i=n.tokens}catch(l){let p=l;throw p.response&&(p.response.status===403||p.response.status===404)&&(p.message=`Could not refresh access token: ${p.message}`),p}let u=this.credentials;u.token_type=u.token_type||"Bearer",i.refresh_token=u.refresh_token,this.credentials=i;let c=new Headers({authorization:u.token_type+" "+i.access_token});return{headers:this.addSharedMetadataHeaders(c),res:n.res}}static getRevokeTokenUrl(e){return new t().getRevokeTokenURL(e).toString()}getRevokeTokenURL(e){let r=new URL(this.endpoints.oauth2RevokeUrl);return r.searchParams.append("token",e),r}revokeToken(e,r){let n={...t.RETRY_CONFIG,url:this.getRevokeTokenURL(e).toString(),method:"POST"};if(Vo.AuthClient.setMethodName(n,"revokeToken"),r)this.transporter.request(n).then(i=>r(null,i),r);else return this.transporter.request(n)}revokeCredentials(e){if(e)this.revokeCredentialsAsync().then(r=>e(null,r),e);else return this.revokeCredentialsAsync()}async revokeCredentialsAsync(){let e=this.credentials.access_token;if(this.credentials={},e)return this.revokeToken(e);throw new Error("No access token to revoke.")}request(e,r){if(r)this.requestAsync(e).then(n=>r(null,n),n=>r(n,n.response));else return this.requestAsync(e)}async requestAsync(e,r=!1){try{let n=await this.getRequestMetadataAsync();return e.headers=sE.Gaxios.mergeHeaders(e.headers),this.addUserProjectAndAuthHeaders(e.headers,n.headers),this.apiKey&&e.headers.set("X-Goog-Api-Key",this.apiKey),await this.transporter.request(e)}catch(n){let i=n.response;if(i){let u=i.status,c=this.credentials&&this.credentials.access_token&&this.credentials.refresh_token&&(!this.credentials.expiry_date||this.forceRefreshOnFailure),l=this.credentials&&this.credentials.access_token&&!this.credentials.refresh_token&&(!this.credentials.expiry_date||this.forceRefreshOnFailure)&&this.refreshHandler,p=i.config.data instanceof ek.Readable,f=u===401||u===403;if(!r&&f&&!p&&c)return await this.refreshAccessTokenAsync(),this.requestAsync(e,!0);if(!r&&f&&!p&&l){let m=await this.processAndValidateRefreshHandler();return m?.access_token&&this.setCredentials(m),this.requestAsync(e,!0)}}throw n}}verifyIdToken(e,r){if(r&&typeof r!="function")throw new Error("This method accepts an options object as the first parameter, which includes the idToken, audience, and maxExpiry.");if(r)this.verifyIdTokenAsync(e).then(n=>r(null,n),r);else return this.verifyIdTokenAsync(e)}async verifyIdTokenAsync(e){if(!e.idToken)throw new Error("The verifyIdToken method requires an ID Token");let r=await this.getFederatedSignonCertsAsync();return await this.verifySignedJwtWithCertsAsync(e.idToken,r.certs,e.audience,this.issuers,e.maxExpiry)}async getTokenInfo(e){let{data:r}=await this.transporter.request({...t.RETRY_CONFIG,method:"POST",headers:{"content-type":"application/x-www-form-urlencoded;charset=UTF-8",authorization:`Bearer ${e}`},url:this.endpoints.tokenInfoUrl.toString()}),n=Object.assign({expiry_date:new Date().getTime()+r.expires_in*1e3,scopes:r.scope.split(" ")},r);return delete n.expires_in,delete n.scope,n}getFederatedSignonCerts(e){if(e)this.getFederatedSignonCertsAsync().then(r=>e(null,r.certs,r.res),e);else return this.getFederatedSignonCertsAsync()}async getFederatedSignonCertsAsync(){let e=new Date().getTime(),r=(0,Ad.hasBrowserCrypto)()?on.JWK:on.PEM;if(this.certificateExpiry&&e<this.certificateExpiry.getTime()&&this.certificateCacheFormat===r)return{certs:this.certificateCache,format:r};let n,i;switch(r){case on.PEM:i=this.endpoints.oauth2FederatedSignonPemCertsUrl.toString();break;case on.JWK:i=this.endpoints.oauth2FederatedSignonJwkCertsUrl.toString();break;default:throw new Error(`Unsupported certificate format ${r}`)}try{let f={...t.RETRY_CONFIG,url:i};Vo.AuthClient.setMethodName(f,"getFederatedSignonCertsAsync"),n=await this.transporter.request(f)}catch(f){throw f instanceof Error&&(f.message=`Failed to retrieve verification certificates: ${f.message}`),f}let u=n?.headers.get("cache-control"),c=-1;if(u){let f=/max-age=(?<maxAge>[0-9]+)/.exec(u)?.groups?.maxAge;f&&(c=Number(f)*1e3)}let l={};switch(r){case on.PEM:l=n.data;break;case on.JWK:for(let f of n.data.keys)l[f.kid]=f;break;default:throw new Error(`Unsupported certificate format ${r}`)}let p=new Date;return this.certificateExpiry=c===-1?null:new Date(p.getTime()+c),this.certificateCache=l,this.certificateCacheFormat=r,{certs:l,format:r,res:n}}getIapPublicKeys(e){if(e)this.getIapPublicKeysAsync().then(r=>e(null,r.pubkeys,r.res),e);else return this.getIapPublicKeysAsync()}async getIapPublicKeysAsync(){let e,r=this.endpoints.oauth2IapPublicKeyUrl.toString();try{let n={...t.RETRY_CONFIG,url:r};Vo.AuthClient.setMethodName(n,"getIapPublicKeysAsync"),e=await this.transporter.request(n)}catch(n){throw n instanceof Error&&(n.message=`Failed to retrieve verification certificates: ${n.message}`),n}return{pubkeys:e.data,res:e}}verifySignedJwtWithCerts(){throw new Error("verifySignedJwtWithCerts is removed, please use verifySignedJwtWithCertsAsync instead.")}async verifySignedJwtWithCertsAsync(e,r,n,i,u){let c=(0,Ad.createCrypto)();u||(u=t.DEFAULT_MAX_TOKEN_LIFETIME_SECS_);let l=e.split(".");if(l.length!==3)throw new Error("Wrong number of segments in token: "+e);let p=l[0]+"."+l[1],f=l[2],m,y;try{m=JSON.parse(c.decodeBase64StringUtf8(l[0]))}catch(q){throw q instanceof Error&&(q.message=`Can't parse token envelope: ${l[0]}': ${q.message}`),q}if(!m)throw new Error("Can't parse token envelope: "+l[0]);try{y=JSON.parse(c.decodeBase64StringUtf8(l[1]))}catch(q){throw q instanceof Error&&(q.message=`Can't parse token payload '${l[0]}`),q}if(!y)throw new Error("Can't parse token payload: "+l[1]);if(!Object.prototype.hasOwnProperty.call(r,m.kid))throw new Error("No pem found for envelope: "+JSON.stringify(m));let P=r[m.kid];if(m.alg==="ES256"&&(f=tk.joseToDer(f,"ES256").toString("base64")),!await c.verify(P,p,f))throw new Error("Invalid token signature: "+e);if(!y.iat)throw new Error("No issue time in token: "+JSON.stringify(y));if(!y.exp)throw new Error("No expiration time in token: "+JSON.stringify(y));let b=Number(y.iat);if(isNaN(b))throw new Error("iat field using invalid format");let T=Number(y.exp);if(isNaN(T))throw new Error("exp field using invalid format");let E=new Date().getTime()/1e3;if(T>=E+u)throw new Error("Expiration time too far in future: "+JSON.stringify(y));let w=b-t.CLOCK_SKEW_SECS_,k=T+t.CLOCK_SKEW_SECS_;if(E<w)throw new Error("Token used too early, "+E+" < "+w+": "+JSON.stringify(y));if(E>k)throw new Error("Token used too late, "+E+" > "+k+": "+JSON.stringify(y));if(i&&i.indexOf(y.iss)<0)throw new Error("Invalid issuer, expected one of ["+i+"], but got "+y.iss);if(typeof n<"u"&&n!==null){let q=y.aud,W=!1;if(n.constructor===Array?W=n.indexOf(q)>-1:W=q===n,!W)throw new Error("Wrong recipient, payload audience != requiredAudience")}return new rk.LoginTicket(m,y)}async processAndValidateRefreshHandler(){if(this.refreshHandler){let e=await this.refreshHandler();if(!e.access_token)throw new Error("No access token is returned by the refreshHandler callback.");return e}}isTokenExpiring(){let e=this.credentials.expiry_date;return e?e<=new Date().getTime()+this.eagerRefreshThresholdMillis:!1}};Nr.OAuth2Client=Id});var Cd=L(au=>{"use strict";Object.defineProperty(au,"__esModule",{value:!0});au.Compute=void 0;var nk=_t(),lE=Xi(),ok=eo(),Rd=class extends ok.OAuth2Client{static{o(this,"Compute")}serviceAccountEmail;scopes;constructor(e={}){super(e),this.credentials={expiry_date:1,refresh_token:"compute-placeholder"},this.serviceAccountEmail=e.serviceAccountEmail||"default",this.scopes=Array.isArray(e.scopes)?e.scopes:e.scopes?[e.scopes]:[]}async refreshTokenNoCache(){let e=`service-accounts/${this.serviceAccountEmail}/token`,r;try{let i={property:e};this.scopes.length>0&&(i.params={scopes:this.scopes.join(",")}),r=await lE.instance(i)}catch(i){throw i instanceof nk.GaxiosError&&(i.message=`Could not refresh access token: ${i.message}`,this.wrapError(i)),i}let n=r;return r&&r.expires_in&&(n.expiry_date=new Date().getTime()+r.expires_in*1e3,delete n.expires_in),this.emit("tokens",n),{tokens:n,res:null}}async fetchIdToken(e){let r=`service-accounts/${this.serviceAccountEmail}/identity?format=full&audience=${e}`,n;try{let i={property:r};n=await lE.instance(i)}catch(i){throw i instanceof Error&&(i.message=`Could not fetch ID token: ${i.message}`),i}return n}wrapError(e){let r=e.response;r&&r.status&&(e.status=r.status,r.status===403?e.message="A Forbidden error was returned while attempting to retrieve an access token for the Compute Engine built-in service account. This may be because the Compute Engine instance does not have the correct permission scopes specified: "+e.message:r.status===404&&(e.message="A Not Found error was returned while attempting to retrieve an accesstoken for the Compute Engine built-in service account. This may be because the Compute Engine instance does not have any permission scopes specified: "+e.message))}};au.Compute=Rd});var kd=L(su=>{"use strict";Object.defineProperty(su,"__esModule",{value:!0});su.IdTokenClient=void 0;var ik=eo(),Od=class extends ik.OAuth2Client{static{o(this,"IdTokenClient")}targetAudience;idTokenProvider;constructor(e){super(e),this.targetAudience=e.targetAudience,this.idTokenProvider=e.idTokenProvider}async getRequestMetadataAsync(){if(!this.credentials.id_token||!this.credentials.expiry_date||this.isTokenExpiring()){let r=await this.idTokenProvider.fetchIdToken(this.targetAudience);this.credentials={id_token:r,expiry_date:this.getIdTokenExpiryDate(r)}}return{headers:new Headers({authorization:"Bearer "+this.credentials.id_token})}}getIdTokenExpiryDate(e){let r=e.split(".")[1];if(r)return JSON.parse(Buffer.from(r,"base64").toString("ascii")).exp*1e3}};su.IdTokenClient=Od});var $d=L(Ho=>{"use strict";Object.defineProperty(Ho,"__esModule",{value:!0});Ho.GCPEnv=void 0;Ho.clear=ak;Ho.getEnv=sk;var dE=Xi(),Dr;(function(t){t.APP_ENGINE="APP_ENGINE",t.KUBERNETES_ENGINE="KUBERNETES_ENGINE",t.CLOUD_FUNCTIONS="CLOUD_FUNCTIONS",t.COMPUTE_ENGINE="COMPUTE_ENGINE",t.CLOUD_RUN="CLOUD_RUN",t.CLOUD_RUN_JOBS="CLOUD_RUN_JOBS",t.NONE="NONE"})(Dr||(Ho.GCPEnv=Dr={}));var ra;function ak(){ra=void 0}o(ak,"clear");async function sk(){return ra||(ra=uk(),ra)}o(sk,"getEnv");async function uk(){let t=Dr.NONE;return ck()?t=Dr.APP_ENGINE:lk()?t=Dr.CLOUD_FUNCTIONS:await mk()?await fk()?t=Dr.KUBERNETES_ENGINE:dk()?t=Dr.CLOUD_RUN:pk()?t=Dr.CLOUD_RUN_JOBS:t=Dr.COMPUTE_ENGINE:t=Dr.NONE,t}o(uk,"getEnvMemoized");function ck(){return!!(process.env.GAE_SERVICE||process.env.GAE_MODULE_NAME)}o(ck,"isAppEngine");function lk(){return!!(process.env.FUNCTION_NAME||process.env.FUNCTION_TARGET)}o(lk,"isCloudFunction");function dk(){return!!process.env.K_CONFIGURATION}o(dk,"isCloudRun");function pk(){return!!process.env.CLOUD_RUN_JOB}o(pk,"isCloudRunJob");async function fk(){try{return await dE.instance("attributes/cluster-name"),!0}catch{return!1}}o(fk,"isKubernetesEngine");async function mk(){return dE.isAvailable()}o(mk,"isComputeEngine")});var zd=L((S3,pE)=>{var uu=qo().Buffer,hk=require("stream"),gk=require("util");function cu(t){if(this.buffer=null,this.writable=!0,this.readable=!0,!t)return this.buffer=uu.alloc(0),this;if(typeof t.pipe=="function")return this.buffer=uu.alloc(0),t.pipe(this),this;if(t.length||typeof t=="object")return this.buffer=t,this.writable=!1,process.nextTick(function(){this.emit("end",t),this.readable=!1,this.emit("close")}.bind(this)),this;throw new TypeError("Unexpected data type ("+typeof t+")")}o(cu,"DataStream");gk.inherits(cu,hk);cu.prototype.write=o(function(e){this.buffer=uu.concat([this.buffer,uu.from(e)]),this.emit("data",e)},"write");cu.prototype.end=o(function(e){e&&this.write(e),this.emit("end",e),this.emit("close"),this.writable=!1,this.readable=!1},"end");pE.exports=cu});var mE=L((w3,fE)=>{"use strict";var na=require("buffer").Buffer,Nd=require("buffer").SlowBuffer;fE.exports=lu;function lu(t,e){if(!na.isBuffer(t)||!na.isBuffer(e)||t.length!==e.length)return!1;for(var r=0,n=0;n<t.length;n++)r|=t[n]^e[n];return r===0}o(lu,"bufferEq");lu.install=function(){na.prototype.equal=Nd.prototype.equal=o(function(e){return lu(this,e)},"equal")};var yk=na.prototype.equal,_k=Nd.prototype.equal;lu.restore=function(){na.prototype.equal=yk,Nd.prototype.equal=_k}});var Md=L((A3,SE)=>{var Wo=qo().Buffer,sr=require("crypto"),gE=_d(),hE=require("util"),bk=`"%s" is not a valid algorithm.
30
+ `,typeof r.content=="string"?yield r.content:yield*r.content,yield`\r
31
+ `}yield o}static#i;static#a;static async#s(){return this.#i||=(await Promise.resolve().then(()=>It(vR()))).HttpsProxyAgent,this.#i}static async#c(){let t=typeof window<"u"&&!!window;return this.#a||=t?window.fetch:(await Promise.resolve().then(()=>(mO(),fO))).default,this.#a}static mergeHeaders(t,...n){t=t instanceof Headers?t:new Headers(t);for(let o of n)(o instanceof Headers?o:new Headers(o)).forEach((i,s)=>{s==="set-cookie"?t.append(s,i):t.set(s,i)});return t}};ha.Gaxios=uf;ma=uf});var kt=B(Vt=>{"use strict";var J1=Vt&&Vt.__createBinding||(Object.create?(function(e,t,n,o){o===void 0&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:a(function(){return t[n]},"get")}),Object.defineProperty(e,o,r)}):(function(e,t,n,o){o===void 0&&(o=n),e[o]=t[n]})),K1=Vt&&Vt.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&J1(t,e,n)};Object.defineProperty(Vt,"__esModule",{value:!0});Vt.instance=Vt.Gaxios=Vt.GaxiosError=void 0;Vt.request=Q1;var _O=yO();Object.defineProperty(Vt,"Gaxios",{enumerable:!0,get:a(function(){return _O.Gaxios},"get")});var X1=Ab();Object.defineProperty(Vt,"GaxiosError",{enumerable:!0,get:a(function(){return X1.GaxiosError},"get")});K1(Ob(),Vt);Vt.instance=new _O.Gaxios;async function Q1(e){return Vt.instance.request(e)}a(Q1,"request")});var Qb=B((bO,lf)=>{(function(e){"use strict";var t,n=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,o=Math.ceil,r=Math.floor,i="[BigNumber Error] ",s=i+"Number primitive has more than 15 significant digits: ",u=1e14,d=14,p=9007199254740991,f=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],g=1e7,y=1e9;function h(Z){var G,te,ce,Y=ee.prototype={constructor:ee,toString:null,valueOf:null},Ze=new ee(1),we=20,Te=4,Me=-7,je=21,Ve=-1e7,et=1e7,ot=!1,nr=1,Dt=0,ai={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:"\xA0",suffix:""},Yr="0123456789abcdefghijklmnopqrstuvwxyz",Na=!0;function ee(v,T){var w,D,O,z,M,R,C,U,N=this;if(!(N instanceof ee))return new ee(v,T);if(T==null){if(v&&v._isBigNumber===!0){N.s=v.s,!v.c||v.e>et?N.c=N.e=null:v.e<Ve?N.c=[N.e=0]:(N.e=v.e,N.c=v.c.slice());return}if((R=typeof v=="number")&&v*0==0){if(N.s=1/v<0?(v=-v,-1):1,v===~~v){for(z=0,M=v;M>=10;M/=10,z++);z>et?N.c=N.e=null:(N.e=z,N.c=[v]);return}U=String(v)}else{if(!n.test(U=String(v)))return ce(N,U,R);N.s=U.charCodeAt(0)==45?(U=U.slice(1),-1):1}(z=U.indexOf("."))>-1&&(U=U.replace(".","")),(M=U.search(/e/i))>0?(z<0&&(z=M),z+=+U.slice(M+1),U=U.substring(0,M)):z<0&&(z=U.length)}else{if(S(T,2,Yr.length,"Base"),T==10&&Na)return N=new ee(v),jt(N,we+N.e+1,Te);if(U=String(v),R=typeof v=="number"){if(v*0!=0)return ce(N,U,R,T);if(N.s=1/v<0?(U=U.slice(1),-1):1,ee.DEBUG&&U.replace(/^0\.0*|\./,"").length>15)throw Error(s+v)}else N.s=U.charCodeAt(0)===45?(U=U.slice(1),-1):1;for(w=Yr.slice(0,T),z=M=0,C=U.length;M<C;M++)if(w.indexOf(D=U.charAt(M))<0){if(D=="."){if(M>z){z=C;continue}}else if(!O&&(U==U.toUpperCase()&&(U=U.toLowerCase())||U==U.toLowerCase()&&(U=U.toUpperCase()))){O=!0,M=-1,z=0;continue}return ce(N,String(v),R,T)}R=!1,U=te(U,T,10,N.s),(z=U.indexOf("."))>-1?U=U.replace(".",""):z=U.length}for(M=0;U.charCodeAt(M)===48;M++);for(C=U.length;U.charCodeAt(--C)===48;);if(U=U.slice(M,++C)){if(C-=M,R&&ee.DEBUG&&C>15&&(v>p||v!==r(v)))throw Error(s+N.s*v);if((z=z-M-1)>et)N.c=N.e=null;else if(z<Ve)N.c=[N.e=0];else{if(N.e=z,N.c=[],M=(z+1)%d,z<0&&(M+=d),M<C){for(M&&N.c.push(+U.slice(0,M)),C-=d;M<C;)N.c.push(+U.slice(M,M+=d));M=d-(U=U.slice(M)).length}else M-=C;for(;M--;U+="0");N.c.push(+U)}}else N.c=[N.e=0]}a(ee,"BigNumber"),ee.clone=h,ee.ROUND_UP=0,ee.ROUND_DOWN=1,ee.ROUND_CEIL=2,ee.ROUND_FLOOR=3,ee.ROUND_HALF_UP=4,ee.ROUND_HALF_DOWN=5,ee.ROUND_HALF_EVEN=6,ee.ROUND_HALF_CEIL=7,ee.ROUND_HALF_FLOOR=8,ee.EUCLID=9,ee.config=ee.set=function(v){var T,w;if(v!=null)if(typeof v=="object"){if(v.hasOwnProperty(T="DECIMAL_PLACES")&&(w=v[T],S(w,0,y,T),we=w),v.hasOwnProperty(T="ROUNDING_MODE")&&(w=v[T],S(w,0,8,T),Te=w),v.hasOwnProperty(T="EXPONENTIAL_AT")&&(w=v[T],w&&w.pop?(S(w[0],-y,0,T),S(w[1],0,y,T),Me=w[0],je=w[1]):(S(w,-y,y,T),Me=-(je=w<0?-w:w))),v.hasOwnProperty(T="RANGE"))if(w=v[T],w&&w.pop)S(w[0],-y,-1,T),S(w[1],1,y,T),Ve=w[0],et=w[1];else if(S(w,-y,y,T),w)Ve=-(et=w<0?-w:w);else throw Error(i+T+" cannot be zero: "+w);if(v.hasOwnProperty(T="CRYPTO"))if(w=v[T],w===!!w)if(w)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))ot=w;else throw ot=!w,Error(i+"crypto unavailable");else ot=w;else throw Error(i+T+" not true or false: "+w);if(v.hasOwnProperty(T="MODULO_MODE")&&(w=v[T],S(w,0,9,T),nr=w),v.hasOwnProperty(T="POW_PRECISION")&&(w=v[T],S(w,0,y,T),Dt=w),v.hasOwnProperty(T="FORMAT"))if(w=v[T],typeof w=="object")ai=w;else throw Error(i+T+" not an object: "+w);if(v.hasOwnProperty(T="ALPHABET"))if(w=v[T],typeof w=="string"&&!/^.?$|[+\-.\s]|(.).*\1/.test(w))Na=w.slice(0,10)=="0123456789",Yr=w;else throw Error(i+T+" invalid: "+w)}else throw Error(i+"Object expected: "+v);return{DECIMAL_PLACES:we,ROUNDING_MODE:Te,EXPONENTIAL_AT:[Me,je],RANGE:[Ve,et],CRYPTO:ot,MODULO_MODE:nr,POW_PRECISION:Dt,FORMAT:ai,ALPHABET:Yr}},ee.isBigNumber=function(v){if(!v||v._isBigNumber!==!0)return!1;if(!ee.DEBUG)return!0;var T,w,D=v.c,O=v.e,z=v.s;e:if({}.toString.call(D)=="[object Array]"){if((z===1||z===-1)&&O>=-y&&O<=y&&O===r(O)){if(D[0]===0){if(O===0&&D.length===1)return!0;break e}if(T=(O+1)%d,T<1&&(T+=d),String(D[0]).length==T){for(T=0;T<D.length;T++)if(w=D[T],w<0||w>=u||w!==r(w))break e;if(w!==0)return!0}}}else if(D===null&&O===null&&(z===null||z===1||z===-1))return!0;throw Error(i+"Invalid BigNumber: "+v)},ee.maximum=ee.max=function(){return Ut(arguments,-1)},ee.minimum=ee.min=function(){return Ut(arguments,1)},ee.random=(function(){var v=9007199254740992,T=Math.random()*v&2097151?function(){return r(Math.random()*v)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(w){var D,O,z,M,R,C=0,U=[],N=new ee(Ze);if(w==null?w=we:S(w,0,y),M=o(w/d),ot)if(crypto.getRandomValues){for(D=crypto.getRandomValues(new Uint32Array(M*=2));C<M;)R=D[C]*131072+(D[C+1]>>>11),R>=9e15?(O=crypto.getRandomValues(new Uint32Array(2)),D[C]=O[0],D[C+1]=O[1]):(U.push(R%1e14),C+=2);C=M/2}else if(crypto.randomBytes){for(D=crypto.randomBytes(M*=7);C<M;)R=(D[C]&31)*281474976710656+D[C+1]*1099511627776+D[C+2]*4294967296+D[C+3]*16777216+(D[C+4]<<16)+(D[C+5]<<8)+D[C+6],R>=9e15?crypto.randomBytes(7).copy(D,C):(U.push(R%1e14),C+=7);C=M/7}else throw ot=!1,Error(i+"crypto unavailable");if(!ot)for(;C<M;)R=T(),R<9e15&&(U[C++]=R%1e14);for(M=U[--C],w%=d,M&&w&&(R=f[d-w],U[C]=r(M/R)*R);U[C]===0;U.pop(),C--);if(C<0)U=[z=0];else{for(z=-1;U[0]===0;U.splice(0,1),z-=d);for(C=1,R=U[0];R>=10;R/=10,C++);C<d&&(z-=d-C)}return N.e=z,N.c=U,N}})(),ee.sum=function(){for(var v=1,T=arguments,w=new ee(T[0]);v<T.length;)w=w.plus(T[v++]);return w},te=(function(){var v="0123456789";function T(w,D,O,z){for(var M,R=[0],C,U=0,N=w.length;U<N;){for(C=R.length;C--;R[C]*=D);for(R[0]+=z.indexOf(w.charAt(U++)),M=0;M<R.length;M++)R[M]>O-1&&(R[M+1]==null&&(R[M+1]=0),R[M+1]+=R[M]/O|0,R[M]%=O)}return R.reverse()}return a(T,"toBaseOut"),function(w,D,O,z,M){var R,C,U,N,H,ie,se,Ne,tt=w.indexOf("."),rt=we,$e=Te;for(tt>=0&&(N=Dt,Dt=0,w=w.replace(".",""),Ne=new ee(D),ie=Ne.pow(w.length-tt),Dt=N,Ne.c=T(W(P(ie.c),ie.e,"0"),10,O,v),Ne.e=Ne.c.length),se=T(w,D,O,M?(R=Yr,v):(R=v,Yr)),U=N=se.length;se[--N]==0;se.pop());if(!se[0])return R.charAt(0);if(tt<0?--U:(ie.c=se,ie.e=U,ie.s=z,ie=G(ie,Ne,rt,$e,O),se=ie.c,H=ie.r,U=ie.e),C=U+rt+1,tt=se[C],N=O/2,H=H||C<0||se[C+1]!=null,H=$e<4?(tt!=null||H)&&($e==0||$e==(ie.s<0?3:2)):tt>N||tt==N&&($e==4||H||$e==6&&se[C-1]&1||$e==(ie.s<0?8:7)),C<1||!se[0])w=H?W(R.charAt(1),-rt,R.charAt(0)):R.charAt(0);else{if(se.length=C,H)for(--O;++se[--C]>O;)se[C]=0,C||(++U,se=[1].concat(se));for(N=se.length;!se[--N];);for(tt=0,w="";tt<=N;w+=R.charAt(se[tt++]));w=W(w,U,R.charAt(0))}return w}})(),G=(function(){function v(D,O,z){var M,R,C,U,N=0,H=D.length,ie=O%g,se=O/g|0;for(D=D.slice();H--;)C=D[H]%g,U=D[H]/g|0,M=se*C+U*ie,R=ie*C+M%g*g+N,N=(R/z|0)+(M/g|0)+se*U,D[H]=R%z;return N&&(D=[N].concat(D)),D}a(v,"multiply");function T(D,O,z,M){var R,C;if(z!=M)C=z>M?1:-1;else for(R=C=0;R<z;R++)if(D[R]!=O[R]){C=D[R]>O[R]?1:-1;break}return C}a(T,"compare");function w(D,O,z,M){for(var R=0;z--;)D[z]-=R,R=D[z]<O[z]?1:0,D[z]=R*M+D[z]-O[z];for(;!D[0]&&D.length>1;D.splice(0,1));}return a(w,"subtract"),function(D,O,z,M,R){var C,U,N,H,ie,se,Ne,tt,rt,$e,Fe,ht,si,ci,ui,or,hn,Ct=D.s==O.s?1:-1,gt=D.c,He=O.c;if(!gt||!gt[0]||!He||!He[0])return new ee(!D.s||!O.s||(gt?He&&gt[0]==He[0]:!He)?NaN:gt&&gt[0]==0||!He?Ct*0:Ct/0);for(tt=new ee(Ct),rt=tt.c=[],U=D.e-O.e,Ct=z+U+1,R||(R=u,U=_(D.e/d)-_(O.e/d),Ct=Ct/d|0),N=0;He[N]==(gt[N]||0);N++);if(He[N]>(gt[N]||0)&&U--,Ct<0)rt.push(1),H=!0;else{for(ci=gt.length,or=He.length,N=0,Ct+=2,ie=r(R/(He[0]+1)),ie>1&&(He=v(He,ie,R),gt=v(gt,ie,R),or=He.length,ci=gt.length),si=or,$e=gt.slice(0,or),Fe=$e.length;Fe<or;$e[Fe++]=0);hn=He.slice(),hn=[0].concat(hn),ui=He[0],He[1]>=R/2&&ui++;do{if(ie=0,C=T(He,$e,or,Fe),C<0){if(ht=$e[0],or!=Fe&&(ht=ht*R+($e[1]||0)),ie=r(ht/ui),ie>1)for(ie>=R&&(ie=R-1),se=v(He,ie,R),Ne=se.length,Fe=$e.length;T(se,$e,Ne,Fe)==1;)ie--,w(se,or<Ne?hn:He,Ne,R),Ne=se.length,C=1;else ie==0&&(C=ie=1),se=He.slice(),Ne=se.length;if(Ne<Fe&&(se=[0].concat(se)),w($e,se,Fe,R),Fe=$e.length,C==-1)for(;T(He,$e,or,Fe)<1;)ie++,w($e,or<Fe?hn:He,Fe,R),Fe=$e.length}else C===0&&(ie++,$e=[0]);rt[N++]=ie,$e[0]?$e[Fe++]=gt[si]||0:($e=[gt[si]],Fe=1)}while((si++<ci||$e[0]!=null)&&Ct--);H=$e[0]!=null,rt[0]||rt.splice(0,1)}if(R==u){for(N=1,Ct=rt[0];Ct>=10;Ct/=10,N++);jt(tt,z+(tt.e=N+U*d-1)+1,M,H)}else tt.e=U,tt.r=+H;return tt}})();function Zt(v,T,w,D){var O,z,M,R,C;if(w==null?w=Te:S(w,0,8),!v.c)return v.toString();if(O=v.c[0],M=v.e,T==null)C=P(v.c),C=D==1||D==2&&(M<=Me||M>=je)?V(C,M):W(C,M,"0");else if(v=jt(new ee(v),T,w),z=v.e,C=P(v.c),R=C.length,D==1||D==2&&(T<=z||z<=Me)){for(;R<T;C+="0",R++);C=V(C,z)}else if(T-=M+(D===2&&z>M),C=W(C,z,"0"),z+1>R){if(--T>0)for(C+=".";T--;C+="0");}else if(T+=z-R,T>0)for(z+1==R&&(C+=".");T--;C+="0");return v.s<0&&O?"-"+C:C}a(Zt,"format");function Ut(v,T){for(var w,D,O=1,z=new ee(v[0]);O<v.length;O++)D=new ee(v[O]),(!D.s||(w=x(z,D))===T||w===0&&z.s===T)&&(z=D);return z}a(Ut,"maxOrMin");function Da(v,T,w){for(var D=1,O=T.length;!T[--O];T.pop());for(O=T[0];O>=10;O/=10,D++);return(w=D+w*d-1)>et?v.c=v.e=null:w<Ve?v.c=[v.e=0]:(v.e=w,v.c=T),v}a(Da,"normalise"),ce=(function(){var v=/^(-?)0([xbo])(?=\w[\w.]*$)/i,T=/^([^.]+)\.$/,w=/^\.([^.]+)$/,D=/^-?(Infinity|NaN)$/,O=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(z,M,R,C){var U,N=R?M:M.replace(O,"");if(D.test(N))z.s=isNaN(N)?null:N<0?-1:1;else{if(!R&&(N=N.replace(v,function(H,ie,se){return U=(se=se.toLowerCase())=="x"?16:se=="b"?2:8,!C||C==U?ie:H}),C&&(U=C,N=N.replace(T,"$1").replace(w,"0.$1")),M!=N))return new ee(N,U);if(ee.DEBUG)throw Error(i+"Not a"+(C?" base "+C:"")+" number: "+M);z.s=null}z.c=z.e=null}})();function jt(v,T,w,D){var O,z,M,R,C,U,N,H=v.c,ie=f;if(H){e:{for(O=1,R=H[0];R>=10;R/=10,O++);if(z=T-O,z<0)z+=d,M=T,C=H[U=0],N=r(C/ie[O-M-1]%10);else if(U=o((z+1)/d),U>=H.length)if(D){for(;H.length<=U;H.push(0));C=N=0,O=1,z%=d,M=z-d+1}else break e;else{for(C=R=H[U],O=1;R>=10;R/=10,O++);z%=d,M=z-d+O,N=M<0?0:r(C/ie[O-M-1]%10)}if(D=D||T<0||H[U+1]!=null||(M<0?C:C%ie[O-M-1]),D=w<4?(N||D)&&(w==0||w==(v.s<0?3:2)):N>5||N==5&&(w==4||D||w==6&&(z>0?M>0?C/ie[O-M]:0:H[U-1])%10&1||w==(v.s<0?8:7)),T<1||!H[0])return H.length=0,D?(T-=v.e+1,H[0]=ie[(d-T%d)%d],v.e=-T||0):H[0]=v.e=0,v;if(z==0?(H.length=U,R=1,U--):(H.length=U+1,R=ie[d-z],H[U]=M>0?r(C/ie[O-M]%ie[M])*R:0),D)for(;;)if(U==0){for(z=1,M=H[0];M>=10;M/=10,z++);for(M=H[0]+=R,R=1;M>=10;M/=10,R++);z!=R&&(v.e++,H[0]==u&&(H[0]=1));break}else{if(H[U]+=R,H[U]!=u)break;H[U--]=0,R=1}for(z=H.length;H[--z]===0;H.pop());}v.e>et?v.c=v.e=null:v.e<Ve&&(v.c=[v.e=0])}return v}a(jt,"round");function mt(v){var T,w=v.e;return w===null?v.toString():(T=P(v.c),T=w<=Me||w>=je?V(T,w):W(T,w,"0"),v.s<0?"-"+T:T)}return a(mt,"valueOf"),Y.absoluteValue=Y.abs=function(){var v=new ee(this);return v.s<0&&(v.s=1),v},Y.comparedTo=function(v,T){return x(this,new ee(v,T))},Y.decimalPlaces=Y.dp=function(v,T){var w,D,O,z=this;if(v!=null)return S(v,0,y),T==null?T=Te:S(T,0,8),jt(new ee(z),v+z.e+1,T);if(!(w=z.c))return null;if(D=((O=w.length-1)-_(this.e/d))*d,O=w[O])for(;O%10==0;O/=10,D--);return D<0&&(D=0),D},Y.dividedBy=Y.div=function(v,T){return G(this,new ee(v,T),we,Te)},Y.dividedToIntegerBy=Y.idiv=function(v,T){return G(this,new ee(v,T),0,1)},Y.exponentiatedBy=Y.pow=function(v,T){var w,D,O,z,M,R,C,U,N,H=this;if(v=new ee(v),v.c&&!v.isInteger())throw Error(i+"Exponent not an integer: "+mt(v));if(T!=null&&(T=new ee(T)),R=v.e>14,!H.c||!H.c[0]||H.c[0]==1&&!H.e&&H.c.length==1||!v.c||!v.c[0])return N=new ee(Math.pow(+mt(H),R?v.s*(2-$(v)):+mt(v))),T?N.mod(T):N;if(C=v.s<0,T){if(T.c?!T.c[0]:!T.s)return new ee(NaN);D=!C&&H.isInteger()&&T.isInteger(),D&&(H=H.mod(T))}else{if(v.e>9&&(H.e>0||H.e<-1||(H.e==0?H.c[0]>1||R&&H.c[1]>=24e7:H.c[0]<8e13||R&&H.c[0]<=9999975e7)))return z=H.s<0&&$(v)?-0:0,H.e>-1&&(z=1/z),new ee(C?1/z:z);Dt&&(z=o(Dt/d+2))}for(R?(w=new ee(.5),C&&(v.s=1),U=$(v)):(O=Math.abs(+mt(v)),U=O%2),N=new ee(Ze);;){if(U){if(N=N.times(H),!N.c)break;z?N.c.length>z&&(N.c.length=z):D&&(N=N.mod(T))}if(O){if(O=r(O/2),O===0)break;U=O%2}else if(v=v.times(w),jt(v,v.e+1,1),v.e>14)U=$(v);else{if(O=+mt(v),O===0)break;U=O%2}H=H.times(H),z?H.c&&H.c.length>z&&(H.c.length=z):D&&(H=H.mod(T))}return D?N:(C&&(N=Ze.div(N)),T?N.mod(T):z?jt(N,Dt,Te,M):N)},Y.integerValue=function(v){var T=new ee(this);return v==null?v=Te:S(v,0,8),jt(T,T.e+1,v)},Y.isEqualTo=Y.eq=function(v,T){return x(this,new ee(v,T))===0},Y.isFinite=function(){return!!this.c},Y.isGreaterThan=Y.gt=function(v,T){return x(this,new ee(v,T))>0},Y.isGreaterThanOrEqualTo=Y.gte=function(v,T){return(T=x(this,new ee(v,T)))===1||T===0},Y.isInteger=function(){return!!this.c&&_(this.e/d)>this.c.length-2},Y.isLessThan=Y.lt=function(v,T){return x(this,new ee(v,T))<0},Y.isLessThanOrEqualTo=Y.lte=function(v,T){return(T=x(this,new ee(v,T)))===-1||T===0},Y.isNaN=function(){return!this.s},Y.isNegative=function(){return this.s<0},Y.isPositive=function(){return this.s>0},Y.isZero=function(){return!!this.c&&this.c[0]==0},Y.minus=function(v,T){var w,D,O,z,M=this,R=M.s;if(v=new ee(v,T),T=v.s,!R||!T)return new ee(NaN);if(R!=T)return v.s=-T,M.plus(v);var C=M.e/d,U=v.e/d,N=M.c,H=v.c;if(!C||!U){if(!N||!H)return N?(v.s=-T,v):new ee(H?M:NaN);if(!N[0]||!H[0])return H[0]?(v.s=-T,v):new ee(N[0]?M:Te==3?-0:0)}if(C=_(C),U=_(U),N=N.slice(),R=C-U){for((z=R<0)?(R=-R,O=N):(U=C,O=H),O.reverse(),T=R;T--;O.push(0));O.reverse()}else for(D=(z=(R=N.length)<(T=H.length))?R:T,R=T=0;T<D;T++)if(N[T]!=H[T]){z=N[T]<H[T];break}if(z&&(O=N,N=H,H=O,v.s=-v.s),T=(D=H.length)-(w=N.length),T>0)for(;T--;N[w++]=0);for(T=u-1;D>R;){if(N[--D]<H[D]){for(w=D;w&&!N[--w];N[w]=T);--N[w],N[D]+=u}N[D]-=H[D]}for(;N[0]==0;N.splice(0,1),--U);return N[0]?Da(v,N,U):(v.s=Te==3?-1:1,v.c=[v.e=0],v)},Y.modulo=Y.mod=function(v,T){var w,D,O=this;return v=new ee(v,T),!O.c||!v.s||v.c&&!v.c[0]?new ee(NaN):!v.c||O.c&&!O.c[0]?new ee(O):(nr==9?(D=v.s,v.s=1,w=G(O,v,0,3),v.s=D,w.s*=D):w=G(O,v,0,nr),v=O.minus(w.times(v)),!v.c[0]&&nr==1&&(v.s=O.s),v)},Y.multipliedBy=Y.times=function(v,T){var w,D,O,z,M,R,C,U,N,H,ie,se,Ne,tt,rt,$e=this,Fe=$e.c,ht=(v=new ee(v,T)).c;if(!Fe||!ht||!Fe[0]||!ht[0])return!$e.s||!v.s||Fe&&!Fe[0]&&!ht||ht&&!ht[0]&&!Fe?v.c=v.e=v.s=null:(v.s*=$e.s,!Fe||!ht?v.c=v.e=null:(v.c=[0],v.e=0)),v;for(D=_($e.e/d)+_(v.e/d),v.s*=$e.s,C=Fe.length,H=ht.length,C<H&&(Ne=Fe,Fe=ht,ht=Ne,O=C,C=H,H=O),O=C+H,Ne=[];O--;Ne.push(0));for(tt=u,rt=g,O=H;--O>=0;){for(w=0,ie=ht[O]%rt,se=ht[O]/rt|0,M=C,z=O+M;z>O;)U=Fe[--M]%rt,N=Fe[M]/rt|0,R=se*U+N*ie,U=ie*U+R%rt*rt+Ne[z]+w,w=(U/tt|0)+(R/rt|0)+se*N,Ne[z--]=U%tt;Ne[z]=w}return w?++D:Ne.splice(0,1),Da(v,Ne,D)},Y.negated=function(){var v=new ee(this);return v.s=-v.s||null,v},Y.plus=function(v,T){var w,D=this,O=D.s;if(v=new ee(v,T),T=v.s,!O||!T)return new ee(NaN);if(O!=T)return v.s=-T,D.minus(v);var z=D.e/d,M=v.e/d,R=D.c,C=v.c;if(!z||!M){if(!R||!C)return new ee(O/0);if(!R[0]||!C[0])return C[0]?v:new ee(R[0]?D:O*0)}if(z=_(z),M=_(M),R=R.slice(),O=z-M){for(O>0?(M=z,w=C):(O=-O,w=R),w.reverse();O--;w.push(0));w.reverse()}for(O=R.length,T=C.length,O-T<0&&(w=C,C=R,R=w,T=O),O=0;T;)O=(R[--T]=R[T]+C[T]+O)/u|0,R[T]=u===R[T]?0:R[T]%u;return O&&(R=[O].concat(R),++M),Da(v,R,M)},Y.precision=Y.sd=function(v,T){var w,D,O,z=this;if(v!=null&&v!==!!v)return S(v,1,y),T==null?T=Te:S(T,0,8),jt(new ee(z),v,T);if(!(w=z.c))return null;if(O=w.length-1,D=O*d+1,O=w[O]){for(;O%10==0;O/=10,D--);for(O=w[0];O>=10;O/=10,D++);}return v&&z.e+1>D&&(D=z.e+1),D},Y.shiftedBy=function(v){return S(v,-p,p),this.times("1e"+v)},Y.squareRoot=Y.sqrt=function(){var v,T,w,D,O,z=this,M=z.c,R=z.s,C=z.e,U=we+4,N=new ee("0.5");if(R!==1||!M||!M[0])return new ee(!R||R<0&&(!M||M[0])?NaN:M?z:1/0);if(R=Math.sqrt(+mt(z)),R==0||R==1/0?(T=P(M),(T.length+C)%2==0&&(T+="0"),R=Math.sqrt(+T),C=_((C+1)/2)-(C<0||C%2),R==1/0?T="5e"+C:(T=R.toExponential(),T=T.slice(0,T.indexOf("e")+1)+C),w=new ee(T)):w=new ee(R+""),w.c[0]){for(C=w.e,R=C+U,R<3&&(R=0);;)if(O=w,w=N.times(O.plus(G(z,O,U,1))),P(O.c).slice(0,R)===(T=P(w.c)).slice(0,R))if(w.e<C&&--R,T=T.slice(R-3,R+1),T=="9999"||!D&&T=="4999"){if(!D&&(jt(O,O.e+we+2,0),O.times(O).eq(z))){w=O;break}U+=4,R+=4,D=1}else{(!+T||!+T.slice(1)&&T.charAt(0)=="5")&&(jt(w,w.e+we+2,1),v=!w.times(w).eq(z));break}}return jt(w,w.e+we+1,Te,v)},Y.toExponential=function(v,T){return v!=null&&(S(v,0,y),v++),Zt(this,v,T,1)},Y.toFixed=function(v,T){return v!=null&&(S(v,0,y),v=v+this.e+1),Zt(this,v,T)},Y.toFormat=function(v,T,w){var D,O=this;if(w==null)v!=null&&T&&typeof T=="object"?(w=T,T=null):v&&typeof v=="object"?(w=v,v=T=null):w=ai;else if(typeof w!="object")throw Error(i+"Argument not an object: "+w);if(D=O.toFixed(v,T),O.c){var z,M=D.split("."),R=+w.groupSize,C=+w.secondaryGroupSize,U=w.groupSeparator||"",N=M[0],H=M[1],ie=O.s<0,se=ie?N.slice(1):N,Ne=se.length;if(C&&(z=R,R=C,C=z,Ne-=z),R>0&&Ne>0){for(z=Ne%R||R,N=se.substr(0,z);z<Ne;z+=R)N+=U+se.substr(z,R);C>0&&(N+=U+se.slice(z)),ie&&(N="-"+N)}D=H?N+(w.decimalSeparator||"")+((C=+w.fractionGroupSize)?H.replace(new RegExp("\\d{"+C+"}\\B","g"),"$&"+(w.fractionGroupSeparator||"")):H):N}return(w.prefix||"")+D+(w.suffix||"")},Y.toFraction=function(v){var T,w,D,O,z,M,R,C,U,N,H,ie,se=this,Ne=se.c;if(v!=null&&(R=new ee(v),!R.isInteger()&&(R.c||R.s!==1)||R.lt(Ze)))throw Error(i+"Argument "+(R.isInteger()?"out of range: ":"not an integer: ")+mt(R));if(!Ne)return new ee(se);for(T=new ee(Ze),U=w=new ee(Ze),D=C=new ee(Ze),ie=P(Ne),z=T.e=ie.length-se.e-1,T.c[0]=f[(M=z%d)<0?d+M:M],v=!v||R.comparedTo(T)>0?z>0?T:U:R,M=et,et=1/0,R=new ee(ie),C.c[0]=0;N=G(R,T,0,1),O=w.plus(N.times(D)),O.comparedTo(v)!=1;)w=D,D=O,U=C.plus(N.times(O=U)),C=O,T=R.minus(N.times(O=T)),R=O;return O=G(v.minus(w),D,0,1),C=C.plus(O.times(U)),w=w.plus(O.times(D)),C.s=U.s=se.s,z=z*2,H=G(U,D,z,Te).minus(se).abs().comparedTo(G(C,w,z,Te).minus(se).abs())<1?[U,D]:[C,w],et=M,H},Y.toNumber=function(){return+mt(this)},Y.toPrecision=function(v,T){return v!=null&&S(v,1,y),Zt(this,v,T,2)},Y.toString=function(v){var T,w=this,D=w.s,O=w.e;return O===null?D?(T="Infinity",D<0&&(T="-"+T)):T="NaN":(v==null?T=O<=Me||O>=je?V(P(w.c),O):W(P(w.c),O,"0"):v===10&&Na?(w=jt(new ee(w),we+O+1,Te),T=W(P(w.c),w.e,"0")):(S(v,2,Yr.length,"Base"),T=te(W(P(w.c),O,"0"),10,v,D,!0)),D<0&&w.c[0]&&(T="-"+T)),T},Y.valueOf=Y.toJSON=function(){return mt(this)},Y._isBigNumber=!0,Z!=null&&ee.set(Z),ee}a(h,"clone");function _(Z){var G=Z|0;return Z>0||Z===G?G:G-1}a(_,"bitFloor");function P(Z){for(var G,te,ce=1,Y=Z.length,Ze=Z[0]+"";ce<Y;){for(G=Z[ce++]+"",te=d-G.length;te--;G="0"+G);Ze+=G}for(Y=Ze.length;Ze.charCodeAt(--Y)===48;);return Ze.slice(0,Y+1||1)}a(P,"coeffToString");function x(Z,G){var te,ce,Y=Z.c,Ze=G.c,we=Z.s,Te=G.s,Me=Z.e,je=G.e;if(!we||!Te)return null;if(te=Y&&!Y[0],ce=Ze&&!Ze[0],te||ce)return te?ce?0:-Te:we;if(we!=Te)return we;if(te=we<0,ce=Me==je,!Y||!Ze)return ce?0:!Y^te?1:-1;if(!ce)return Me>je^te?1:-1;for(Te=(Me=Y.length)<(je=Ze.length)?Me:je,we=0;we<Te;we++)if(Y[we]!=Ze[we])return Y[we]>Ze[we]^te?1:-1;return Me==je?0:Me>je^te?1:-1}a(x,"compare");function S(Z,G,te,ce){if(Z<G||Z>te||Z!==r(Z))throw Error(i+(ce||"Argument")+(typeof Z=="number"?Z<G||Z>te?" out of range: ":" not an integer: ":" not a primitive number: ")+String(Z))}a(S,"intCheck");function $(Z){var G=Z.c.length-1;return _(Z.e/d)==G&&Z.c[G]%2!=0}a($,"isOdd");function V(Z,G){return(Z.length>1?Z.charAt(0)+"."+Z.slice(1):Z)+(G<0?"e":"e+")+G}a(V,"toExponential");function W(Z,G,te){var ce,Y;if(G<0){for(Y=te+".";++G;Y+=te);Z=Y+Z}else if(ce=Z.length,++G>ce){for(Y=te,G-=ce;--G;Y+=te);Z+=Y}else G<ce&&(Z=Z.slice(0,G)+"."+Z.slice(G));return Z}a(W,"toFixedPoint"),t=h(),t.default=t.BigNumber=t,typeof define=="function"&&define.amd?define(function(){return t}):typeof lf<"u"&&lf.exports?lf.exports=t:(e||(e=typeof self<"u"&&self?self:window),e.BigNumber=t)})(bO)});var PO=B((c7,SO)=>{var vO=Qb(),EO=SO.exports;(function(){"use strict";function e(p){return p<10?"0"+p:p}a(e,"f");var t=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,n=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,o,r,i={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},s;function u(p){return n.lastIndex=0,n.test(p)?'"'+p.replace(n,function(f){var g=i[f];return typeof g=="string"?g:"\\u"+("0000"+f.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+p+'"'}a(u,"quote");function d(p,f){var g,y,h,_,P=o,x,S=f[p],$=S!=null&&(S instanceof vO||vO.isBigNumber(S));switch(S&&typeof S=="object"&&typeof S.toJSON=="function"&&(S=S.toJSON(p)),typeof s=="function"&&(S=s.call(f,p,S)),typeof S){case"string":return $?S:u(S);case"number":return isFinite(S)?String(S):"null";case"boolean":case"null":case"bigint":return String(S);case"object":if(!S)return"null";if(o+=r,x=[],Object.prototype.toString.apply(S)==="[object Array]"){for(_=S.length,g=0;g<_;g+=1)x[g]=d(g,S)||"null";return h=x.length===0?"[]":o?`[
32
+ `+o+x.join(`,
33
+ `+o)+`
34
+ `+P+"]":"["+x.join(",")+"]",o=P,h}if(s&&typeof s=="object")for(_=s.length,g=0;g<_;g+=1)typeof s[g]=="string"&&(y=s[g],h=d(y,S),h&&x.push(u(y)+(o?": ":":")+h));else Object.keys(S).forEach(function(V){var W=d(V,S);W&&x.push(u(V)+(o?": ":":")+W)});return h=x.length===0?"{}":o?`{
35
+ `+o+x.join(`,
36
+ `+o)+`
37
+ `+P+"}":"{"+x.join(",")+"}",o=P,h}}a(d,"str"),typeof EO.stringify!="function"&&(EO.stringify=function(p,f,g){var y;if(o="",r="",typeof g=="number")for(y=0;y<g;y+=1)r+=" ";else typeof g=="string"&&(r=g);if(s=f,f&&typeof f!="function"&&(typeof f!="object"||typeof f.length!="number"))throw new Error("JSON.stringify");return d("",{"":p})})})()});var TO=B((l7,xO)=>{var df=null,Y1=/(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])/,eF=/(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)/,tF=a(function(e){"use strict";var t={strict:!1,storeAsString:!1,alwaysParseAsBig:!1,useNativeBigInt:!1,protoAction:"error",constructorAction:"error"};if(e!=null){if(e.strict===!0&&(t.strict=!0),e.storeAsString===!0&&(t.storeAsString=!0),t.alwaysParseAsBig=e.alwaysParseAsBig===!0?e.alwaysParseAsBig:!1,t.useNativeBigInt=e.useNativeBigInt===!0?e.useNativeBigInt:!1,typeof e.constructorAction<"u")if(e.constructorAction==="error"||e.constructorAction==="ignore"||e.constructorAction==="preserve")t.constructorAction=e.constructorAction;else throw new Error(`Incorrect value for constructorAction option, must be "error", "ignore" or undefined but passed ${e.constructorAction}`);if(typeof e.protoAction<"u")if(e.protoAction==="error"||e.protoAction==="ignore"||e.protoAction==="preserve")t.protoAction=e.protoAction;else throw new Error(`Incorrect value for protoAction option, must be "error", "ignore" or undefined but passed ${e.protoAction}`)}var n,o,r={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
38
+ `,r:"\r",t:" "},i,s=a(function(P){throw{name:"SyntaxError",message:P,at:n,text:i}},"error"),u=a(function(P){return P&&P!==o&&s("Expected '"+P+"' instead of '"+o+"'"),o=i.charAt(n),n+=1,o},"next"),d=a(function(){var P,x="";for(o==="-"&&(x="-",u("-"));o>="0"&&o<="9";)x+=o,u();if(o===".")for(x+=".";u()&&o>="0"&&o<="9";)x+=o;if(o==="e"||o==="E")for(x+=o,u(),(o==="-"||o==="+")&&(x+=o,u());o>="0"&&o<="9";)x+=o,u();if(P=+x,!isFinite(P))s("Bad number");else return df==null&&(df=Qb()),x.length>15?t.storeAsString?x:t.useNativeBigInt?BigInt(x):new df(x):t.alwaysParseAsBig?t.useNativeBigInt?BigInt(P):new df(P):P},"number"),p=a(function(){var P,x,S="",$;if(o==='"')for(var V=n;u();){if(o==='"')return n-1>V&&(S+=i.substring(V,n-1)),u(),S;if(o==="\\"){if(n-1>V&&(S+=i.substring(V,n-1)),u(),o==="u"){for($=0,x=0;x<4&&(P=parseInt(u(),16),!!isFinite(P));x+=1)$=$*16+P;S+=String.fromCharCode($)}else if(typeof r[o]=="string")S+=r[o];else break;V=n}}s("Bad string")},"string"),f=a(function(){for(;o&&o<=" ";)u()},"white"),g=a(function(){switch(o){case"t":return u("t"),u("r"),u("u"),u("e"),!0;case"f":return u("f"),u("a"),u("l"),u("s"),u("e"),!1;case"n":return u("n"),u("u"),u("l"),u("l"),null}s("Unexpected '"+o+"'")},"word"),y,h=a(function(){var P=[];if(o==="["){if(u("["),f(),o==="]")return u("]"),P;for(;o;){if(P.push(y()),f(),o==="]")return u("]"),P;u(","),f()}}s("Bad array")},"array"),_=a(function(){var P,x=Object.create(null);if(o==="{"){if(u("{"),f(),o==="}")return u("}"),x;for(;o;){if(P=p(),f(),u(":"),t.strict===!0&&Object.hasOwnProperty.call(x,P)&&s('Duplicate key "'+P+'"'),Y1.test(P)===!0?t.protoAction==="error"?s("Object contains forbidden prototype property"):t.protoAction==="ignore"?y():x[P]=y():eF.test(P)===!0?t.constructorAction==="error"?s("Object contains forbidden constructor property"):t.constructorAction==="ignore"?y():x[P]=y():x[P]=y(),f(),o==="}")return u("}"),x;u(","),f()}}s("Bad object")},"object");return y=a(function(){switch(f(),o){case"{":return _();case"[":return h();case'"':return p();case"-":return d();default:return o>="0"&&o<="9"?d():g()}},"value"),function(P,x){var S;return i=P+"",n=0,o=" ",S=y(),f(),o&&s("Syntax error"),typeof x=="function"?a((function $(V,W){var Z,G,te=V[W];return te&&typeof te=="object"&&Object.keys(te).forEach(function(ce){G=$(te,ce),G!==void 0?te[ce]=G:delete te[ce]}),x.call(V,W,te)}),"walk")({"":S},""):S}},"json_parse");xO.exports=tF});var IO=B((p7,pf)=>{var wO=PO().stringify,AO=TO();pf.exports=function(e){return{parse:AO(e),stringify:wO}};pf.exports.parse=AO();pf.exports.stringify=wO});var Yb=B(Hr=>{"use strict";Object.defineProperty(Hr,"__esModule",{value:!0});Hr.GCE_LINUX_BIOS_PATHS=void 0;Hr.isGoogleCloudServerless=kO;Hr.isGoogleComputeEngineLinux=CO;Hr.isGoogleComputeEngineMACAddress=$O;Hr.isGoogleComputeEngine=zO;Hr.detectGCPResidency=nF;var RO=require("fs"),OO=require("os");Hr.GCE_LINUX_BIOS_PATHS={BIOS_DATE:"/sys/class/dmi/id/bios_date",BIOS_VENDOR:"/sys/class/dmi/id/bios_vendor"};var rF=/^42:01/;function kO(){return!!(process.env.CLOUD_RUN_JOB||process.env.FUNCTION_NAME||process.env.K_SERVICE)}a(kO,"isGoogleCloudServerless");function CO(){if((0,OO.platform)()!=="linux")return!1;try{(0,RO.statSync)(Hr.GCE_LINUX_BIOS_PATHS.BIOS_DATE);let e=(0,RO.readFileSync)(Hr.GCE_LINUX_BIOS_PATHS.BIOS_VENDOR,"utf8");return/Google/.test(e)}catch{return!1}}a(CO,"isGoogleComputeEngineLinux");function $O(){let e=(0,OO.networkInterfaces)();for(let t of Object.values(e))if(t){for(let{mac:n}of t)if(rF.test(n))return!0}return!1}a($O,"isGoogleComputeEngineMACAddress");function zO(){return CO()||$O()}a(zO,"isGoogleComputeEngine");function nF(){return kO()||zO()}a(nF,"detectGCPResidency")});var NO=B(ff=>{"use strict";Object.defineProperty(ff,"__esModule",{value:!0});ff.Colours=void 0;var Nt=class e{static{a(this,"Colours")}static isEnabled(t){return t&&t.isTTY&&(typeof t.getColorDepth=="function"?t.getColorDepth()>2:!0)}static refresh(){e.enabled=e.isEnabled(process==null?void 0:process.stderr),this.enabled?(e.reset="\x1B[0m",e.bright="\x1B[1m",e.dim="\x1B[2m",e.red="\x1B[31m",e.green="\x1B[32m",e.yellow="\x1B[33m",e.blue="\x1B[34m",e.magenta="\x1B[35m",e.cyan="\x1B[36m",e.white="\x1B[37m",e.grey="\x1B[90m"):(e.reset="",e.bright="",e.dim="",e.red="",e.green="",e.yellow="",e.blue="",e.magenta="",e.cyan="",e.white="",e.grey="")}};ff.Colours=Nt;Nt.enabled=!1;Nt.reset="";Nt.bright="";Nt.dim="";Nt.red="";Nt.green="";Nt.yellow="";Nt.blue="";Nt.magenta="";Nt.cyan="";Nt.white="";Nt.grey="";Nt.refresh()});var MO=B(Je=>{"use strict";var oF=Je&&Je.__createBinding||(Object.create?(function(e,t,n,o){o===void 0&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:a(function(){return t[n]},"get")}),Object.defineProperty(e,o,r)}):(function(e,t,n,o){o===void 0&&(o=n),e[o]=t[n]})),iF=Je&&Je.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),DO=Je&&Je.__importStar||(function(){var e=a(function(t){return e=Object.getOwnPropertyNames||function(n){var o=[];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(o[o.length]=r);return o},e(t)},"ownKeys");return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var o=e(t),r=0;r<o.length;r++)o[r]!=="default"&&oF(n,t,o[r]);return iF(n,t),n}})();Object.defineProperty(Je,"__esModule",{value:!0});Je.env=Je.DebugLogBackendBase=Je.placeholder=Je.AdhocDebugLogger=Je.LogSeverity=void 0;Je.getNodeBackend=tv;Je.getDebugBackend=sF;Je.getStructuredBackend=cF;Je.setBackend=uF;Je.log=jO;var aF=require("events"),Kc=DO(require("process")),UO=DO(require("util")),hr=NO(),Gr;(function(e){e.DEFAULT="DEFAULT",e.DEBUG="DEBUG",e.INFO="INFO",e.WARNING="WARNING",e.ERROR="ERROR"})(Gr||(Je.LogSeverity=Gr={}));var Xc=class extends aF.EventEmitter{static{a(this,"AdhocDebugLogger")}constructor(t,n){super(),this.namespace=t,this.upstream=n,this.func=Object.assign(this.invoke.bind(this),{instance:this,on:a((o,r)=>this.on(o,r),"on")}),this.func.debug=(...o)=>this.invokeSeverity(Gr.DEBUG,...o),this.func.info=(...o)=>this.invokeSeverity(Gr.INFO,...o),this.func.warn=(...o)=>this.invokeSeverity(Gr.WARNING,...o),this.func.error=(...o)=>this.invokeSeverity(Gr.ERROR,...o),this.func.sublog=o=>jO(o,this.func)}invoke(t,...n){if(this.upstream)try{this.upstream(t,...n)}catch{}try{this.emit("log",t,n)}catch{}}invokeSeverity(t,...n){this.invoke({severity:t},...n)}};Je.AdhocDebugLogger=Xc;Je.placeholder=new Xc("",()=>{}).func;var ga=class{static{a(this,"DebugLogBackendBase")}constructor(){var t;this.cached=new Map,this.filters=[],this.filtersSet=!1;let n=(t=Kc.env[Je.env.nodeEnables])!==null&&t!==void 0?t:"*";n==="all"&&(n="*"),this.filters=n.split(",")}log(t,n,...o){try{this.filtersSet||(this.setFilters(),this.filtersSet=!0);let r=this.cached.get(t);r||(r=this.makeLogger(t),this.cached.set(t,r)),r(n,...o)}catch(r){console.error(r)}}};Je.DebugLogBackendBase=ga;var ev=class extends ga{static{a(this,"NodeBackend")}constructor(){super(...arguments),this.enabledRegexp=/.*/g}isEnabled(t){return this.enabledRegexp.test(t)}makeLogger(t){return this.enabledRegexp.test(t)?(n,...o)=>{var r;let i=`${hr.Colours.green}${t}${hr.Colours.reset}`,s=`${hr.Colours.yellow}${Kc.pid}${hr.Colours.reset}`,u;switch(n.severity){case Gr.ERROR:u=`${hr.Colours.red}${n.severity}${hr.Colours.reset}`;break;case Gr.INFO:u=`${hr.Colours.magenta}${n.severity}${hr.Colours.reset}`;break;case Gr.WARNING:u=`${hr.Colours.yellow}${n.severity}${hr.Colours.reset}`;break;default:u=(r=n.severity)!==null&&r!==void 0?r:Gr.DEFAULT;break}let d=UO.formatWithOptions({colors:hr.Colours.enabled},...o),p=Object.assign({},n);delete p.severity;let f=Object.getOwnPropertyNames(p).length?JSON.stringify(p):"",g=f?`${hr.Colours.grey}${f}${hr.Colours.reset}`:"";console.error("%s [%s|%s] %s%s",s,i,u,d,f?` ${g}`:"")}:()=>{}}setFilters(){let n=this.filters.join(",").replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^");this.enabledRegexp=new RegExp(`^${n}$`,"i")}};function tv(){return new ev}a(tv,"getNodeBackend");var rv=class extends ga{static{a(this,"DebugBackend")}constructor(t){super(),this.debugPkg=t}makeLogger(t){let n=this.debugPkg(t);return(o,...r)=>{n(r[0],...r.slice(1))}}setFilters(){var t;let n=(t=Kc.env.NODE_DEBUG)!==null&&t!==void 0?t:"";Kc.env.NODE_DEBUG=`${n}${n?",":""}${this.filters.join(",")}`}};function sF(e){return new rv(e)}a(sF,"getDebugBackend");var nv=class extends ga{static{a(this,"StructuredBackend")}constructor(t){var n;super(),this.upstream=(n=t)!==null&&n!==void 0?n:void 0}makeLogger(t){var n;let o=(n=this.upstream)===null||n===void 0?void 0:n.makeLogger(t);return(r,...i)=>{var s;let u=(s=r.severity)!==null&&s!==void 0?s:Gr.INFO,d=Object.assign({severity:u,message:UO.format(...i)},r),p=JSON.stringify(d);o?o(r,p):console.log("%s",p)}}setFilters(){var t;(t=this.upstream)===null||t===void 0||t.setFilters()}};function cF(e){return new nv(e)}a(cF,"getStructuredBackend");Je.env={nodeEnables:"GOOGLE_SDK_NODE_LOGGING"};var ov=new Map,gr;function uF(e){gr=e,ov.clear()}a(uF,"setBackend");function jO(e,t){if(!gr&&!Kc.env[Je.env.nodeEnables]||!e)return Je.placeholder;t&&(e=`${t.instance.namespace}:${e}`);let n=ov.get(e);if(n)return n.func;if(gr===null)return Je.placeholder;gr===void 0&&(gr=tv());let o=(()=>{let r;return new Xc(e,(s,...u)=>{if(r!==gr){if(gr===null)return;gr===void 0&&(gr=tv()),r=gr}gr?.log(e,s,...u)})})();return ov.set(e,o),o.func}a(jO,"log")});var iv=B(ti=>{"use strict";var lF=ti&&ti.__createBinding||(Object.create?(function(e,t,n,o){o===void 0&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:a(function(){return t[n]},"get")}),Object.defineProperty(e,o,r)}):(function(e,t,n,o){o===void 0&&(o=n),e[o]=t[n]})),dF=ti&&ti.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&lF(t,e,n)};Object.defineProperty(ti,"__esModule",{value:!0});dF(MO(),ti)});var Yc=B(fe=>{"use strict";var FO=fe&&fe.__createBinding||(Object.create?(function(e,t,n,o){o===void 0&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:a(function(){return t[n]},"get")}),Object.defineProperty(e,o,r)}):(function(e,t,n,o){o===void 0&&(o=n),e[o]=t[n]})),pF=fe&&fe.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),fF=fe&&fe.__importStar||(function(){var e=a(function(t){return e=Object.getOwnPropertyNames||function(n){var o=[];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(o[o.length]=r);return o},e(t)},"ownKeys");return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var o=e(t),r=0;r<o.length;r++)o[r]!=="default"&&FO(n,t,o[r]);return pF(n,t),n}})(),mF=fe&&fe.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&FO(t,e,n)};Object.defineProperty(fe,"__esModule",{value:!0});fe.gcpResidencyCache=fe.METADATA_SERVER_DETECTION=fe.HEADERS=fe.HEADER_VALUE=fe.HEADER_NAME=fe.SECONDARY_HOST_ADDRESS=fe.HOST_ADDRESS=fe.BASE_PATH=void 0;fe.instance=vF;fe.project=EF;fe.universe=SF;fe.bulk=PF;fe.isAvailable=TF;fe.resetIsAvailableCache=wF;fe.getGCPResidency=cv;fe.setGCPResidency=BO;fe.requestTimeout=qO;var av=kt(),hF=IO(),gF=Yb(),yF=fF(iv());fe.BASE_PATH="/computeMetadata/v1";fe.HOST_ADDRESS="http://169.254.169.254";fe.SECONDARY_HOST_ADDRESS="http://metadata.google.internal.";fe.HEADER_NAME="Metadata-Flavor";fe.HEADER_VALUE="Google";fe.HEADERS=Object.freeze({[fe.HEADER_NAME]:fe.HEADER_VALUE});var LO=yF.log("gcp-metadata");fe.METADATA_SERVER_DETECTION=Object.freeze({"assume-present":"don't try to ping the metadata server, but assume it's present",none:"don't try to ping the metadata server, but don't try to use it either","bios-only":"treat the result of a BIOS probe as canonical (don't fall back to pinging)","ping-only":"skip the BIOS probe, and go straight to pinging"});function sv(e){return e||(e=process.env.GCE_METADATA_IP||process.env.GCE_METADATA_HOST||fe.HOST_ADDRESS),/^https?:\/\//.test(e)||(e=`http://${e}`),new URL(fe.BASE_PATH,e).href}a(sv,"getBaseUrl");function _F(e){Object.keys(e).forEach(t=>{switch(t){case"params":case"property":case"headers":break;case"qs":throw new Error("'qs' is not a valid configuration option. Please use 'params' instead.");default:throw new Error(`'${t}' is not a valid configuration option.`)}})}a(_F,"validate");async function Qc(e,t={},n=3,o=!1){let r=new Headers(fe.HEADERS),i="",s={};if(typeof e=="object"){let g=e;new Headers(g.headers).forEach((y,h)=>r.set(h,y)),i=g.metadataKey,s=g.params||s,n=g.noResponseRetries||n,o=g.fastFail||o}else i=e;typeof t=="string"?i+=`/${t}`:(_F(t),t.property&&(i+=`/${t.property}`),new Headers(t.headers).forEach((g,y)=>r.set(y,g)),s=t.params||s);let u=o?bF:av.request,d={url:`${sv()}/${i}`,headers:r,retryConfig:{noResponseRetries:n},params:s,responseType:"text",timeout:qO()};LO.info("instance request %j",d);let p=await u(d);LO.info("instance metadata is %s",p.data);let f=p.headers.get(fe.HEADER_NAME);if(f!==fe.HEADER_VALUE)throw new RangeError(`Invalid response from metadata service: incorrect ${fe.HEADER_NAME} header. Expected '${fe.HEADER_VALUE}', got ${f?`'${f}'`:"no header"}`);if(typeof p.data=="string")try{return hF.parse(p.data)}catch{}return p.data}a(Qc,"metadataAccessor");async function bF(e){let t={...e,url:e.url?.toString().replace(sv(),sv(fe.SECONDARY_HOST_ADDRESS))},n=(0,av.request)(e),o=(0,av.request)(t);return Promise.any([n,o])}a(bF,"fastFailMetadataRequest");function vF(e){return Qc("instance",e)}a(vF,"instance");function EF(e){return Qc("project",e)}a(EF,"project");function SF(e){return Qc("universe",e)}a(SF,"universe");async function PF(e){let t={};return await Promise.all(e.map(n=>(async()=>{let o=await Qc(n),r=n.metadataKey;t[r]=o})())),t}a(PF,"bulk");function xF(){return process.env.DETECT_GCP_RETRIES?Number(process.env.DETECT_GCP_RETRIES):0}a(xF,"detectGCPAvailableRetries");var mf;async function TF(){if(process.env.METADATA_SERVER_DETECTION){let e=process.env.METADATA_SERVER_DETECTION.trim().toLocaleLowerCase();if(!(e in fe.METADATA_SERVER_DETECTION))throw new RangeError(`Unknown \`METADATA_SERVER_DETECTION\` env variable. Got \`${e}\`, but it should be \`${Object.keys(fe.METADATA_SERVER_DETECTION).join("`, `")}\`, or unset`);switch(e){case"assume-present":return!0;case"none":return!1;case"bios-only":return cv();case"ping-only":}}try{return mf===void 0&&(mf=Qc("instance",void 0,xF(),!(process.env.GCE_METADATA_IP||process.env.GCE_METADATA_HOST))),await mf,!0}catch(e){let t=e;if(process.env.DEBUG_AUTH&&console.info(t),t.type==="request-timeout"||t.response&&t.response.status===404)return!1;if(!(t.response&&t.response.status===404)&&(!t.code||!["EHOSTDOWN","EHOSTUNREACH","ENETUNREACH","ENOENT","ENOTFOUND","ECONNREFUSED"].includes(t.code.toString()))){let n="UNKNOWN";t.code&&(n=t.code.toString()),process.emitWarning(`received unexpected error = ${t.message} code = ${n}`,"MetadataLookupWarning")}return!1}}a(TF,"isAvailable");function wF(){mf=void 0}a(wF,"resetIsAvailableCache");fe.gcpResidencyCache=null;function cv(){return fe.gcpResidencyCache===null&&BO(),fe.gcpResidencyCache}a(cv,"getGCPResidency");function BO(e=null){fe.gcpResidencyCache=e!==null?e:(0,gF.detectGCPResidency)()}a(BO,"setGCPResidency");function qO(){return cv()?0:3e3}a(qO,"requestTimeout");mF(Yb(),fe)});var HO=B(hf=>{"use strict";hf.byteLength=IF;hf.toByteArray=OF;hf.fromByteArray=$F;var sn=[],kr=[],AF=typeof Uint8Array<"u"?Uint8Array:Array,uv="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(ri=0,VO=uv.length;ri<VO;++ri)sn[ri]=uv[ri],kr[uv.charCodeAt(ri)]=ri;var ri,VO;kr[45]=62;kr[95]=63;function ZO(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");n===-1&&(n=t);var o=n===t?0:4-n%4;return[n,o]}a(ZO,"getLens");function IF(e){var t=ZO(e),n=t[0],o=t[1];return(n+o)*3/4-o}a(IF,"byteLength");function RF(e,t,n){return(t+n)*3/4-n}a(RF,"_byteLength");function OF(e){var t,n=ZO(e),o=n[0],r=n[1],i=new AF(RF(e,o,r)),s=0,u=r>0?o-4:o,d;for(d=0;d<u;d+=4)t=kr[e.charCodeAt(d)]<<18|kr[e.charCodeAt(d+1)]<<12|kr[e.charCodeAt(d+2)]<<6|kr[e.charCodeAt(d+3)],i[s++]=t>>16&255,i[s++]=t>>8&255,i[s++]=t&255;return r===2&&(t=kr[e.charCodeAt(d)]<<2|kr[e.charCodeAt(d+1)]>>4,i[s++]=t&255),r===1&&(t=kr[e.charCodeAt(d)]<<10|kr[e.charCodeAt(d+1)]<<4|kr[e.charCodeAt(d+2)]>>2,i[s++]=t>>8&255,i[s++]=t&255),i}a(OF,"toByteArray");function kF(e){return sn[e>>18&63]+sn[e>>12&63]+sn[e>>6&63]+sn[e&63]}a(kF,"tripletToBase64");function CF(e,t,n){for(var o,r=[],i=t;i<n;i+=3)o=(e[i]<<16&16711680)+(e[i+1]<<8&65280)+(e[i+2]&255),r.push(kF(o));return r.join("")}a(CF,"encodeChunk");function $F(e){for(var t,n=e.length,o=n%3,r=[],i=16383,s=0,u=n-o;s<u;s+=i)r.push(CF(e,s,s+i>u?u:s+i));return o===1?(t=e[n-1],r.push(sn[t>>2]+sn[t<<4&63]+"==")):o===2&&(t=(e[n-2]<<8)+e[n-1],r.push(sn[t>>10]+sn[t>>4&63]+sn[t<<2&63]+"=")),r.join("")}a($F,"fromByteArray")});var dv=B(lv=>{"use strict";Object.defineProperty(lv,"__esModule",{value:!0});lv.fromArrayBufferToHex=zF;function zF(e){return Array.from(new Uint8Array(e)).map(n=>n.toString(16).padStart(2,"0")).join("")}a(zF,"fromArrayBufferToHex")});var GO=B(gf=>{"use strict";Object.defineProperty(gf,"__esModule",{value:!0});gf.BrowserCrypto=void 0;var ya=HO(),NF=dv(),pv=class e{static{a(this,"BrowserCrypto")}constructor(){if(typeof window>"u"||window.crypto===void 0||window.crypto.subtle===void 0)throw new Error("SubtleCrypto not found. Make sure it's an https:// website.")}async sha256DigestBase64(t){let n=new TextEncoder().encode(t),o=await window.crypto.subtle.digest("SHA-256",n);return ya.fromByteArray(new Uint8Array(o))}randomBytesBase64(t){let n=new Uint8Array(t);return window.crypto.getRandomValues(n),ya.fromByteArray(n)}static padBase64(t){for(;t.length%4!==0;)t+="=";return t}async verify(t,n,o){let r={name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},i=new TextEncoder().encode(n),s=ya.toByteArray(e.padBase64(o)),u=await window.crypto.subtle.importKey("jwk",t,r,!0,["verify"]);return await window.crypto.subtle.verify(r,u,s,i)}async sign(t,n){let o={name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},r=new TextEncoder().encode(n),i=await window.crypto.subtle.importKey("jwk",t,o,!0,["sign"]),s=await window.crypto.subtle.sign(o,i,r);return ya.fromByteArray(new Uint8Array(s))}decodeBase64StringUtf8(t){let n=ya.toByteArray(e.padBase64(t));return new TextDecoder().decode(n)}encodeBase64StringUtf8(t){let n=new TextEncoder().encode(t);return ya.fromByteArray(n)}async sha256DigestHex(t){let n=new TextEncoder().encode(t),o=await window.crypto.subtle.digest("SHA-256",n);return(0,NF.fromArrayBufferToHex)(o)}async signWithHmacSha256(t,n){let o=typeof t=="string"?t:String.fromCharCode(...new Uint16Array(t)),r=new TextEncoder,i=await window.crypto.subtle.importKey("raw",r.encode(o),{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign"]);return window.crypto.subtle.sign("HMAC",i,r.encode(n))}};gf.BrowserCrypto=pv});var WO=B(yf=>{"use strict";Object.defineProperty(yf,"__esModule",{value:!0});yf.NodeCrypto=void 0;var _a=require("crypto"),fv=class{static{a(this,"NodeCrypto")}async sha256DigestBase64(t){return _a.createHash("sha256").update(t).digest("base64")}randomBytesBase64(t){return _a.randomBytes(t).toString("base64")}async verify(t,n,o){let r=_a.createVerify("RSA-SHA256");return r.update(n),r.end(),r.verify(t,o,"base64")}async sign(t,n){let o=_a.createSign("RSA-SHA256");return o.update(n),o.end(),o.sign(t,"base64")}decodeBase64StringUtf8(t){return Buffer.from(t,"base64").toString("utf-8")}encodeBase64StringUtf8(t){return Buffer.from(t,"utf-8").toString("base64")}async sha256DigestHex(t){return _a.createHash("sha256").update(t).digest("hex")}async signWithHmacSha256(t,n){let o=typeof t=="string"?t:UF(t);return DF(_a.createHmac("sha256",o).update(n).digest())}};yf.NodeCrypto=fv;function DF(e){return e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)}a(DF,"toArrayBuffer");function UF(e){return Buffer.from(e)}a(UF,"toBuffer")});var eu=B($n=>{"use strict";var jF=$n&&$n.__createBinding||(Object.create?(function(e,t,n,o){o===void 0&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:a(function(){return t[n]},"get")}),Object.defineProperty(e,o,r)}):(function(e,t,n,o){o===void 0&&(o=n),e[o]=t[n]})),MF=$n&&$n.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&jF(t,e,n)};Object.defineProperty($n,"__esModule",{value:!0});$n.createCrypto=BF;$n.hasBrowserCrypto=JO;var LF=GO(),FF=WO();MF(dv(),$n);function BF(){return JO()?new LF.BrowserCrypto:new FF.NodeCrypto}a(BF,"createCrypto");function JO(){return typeof window<"u"&&typeof window.crypto<"u"&&typeof window.crypto.subtle<"u"}a(JO,"hasBrowserCrypto")});var ba=B((mv,XO)=>{var _f=require("buffer"),cn=_f.Buffer;function KO(e,t){for(var n in e)t[n]=e[n]}a(KO,"copyProps");cn.from&&cn.alloc&&cn.allocUnsafe&&cn.allocUnsafeSlow?XO.exports=_f:(KO(_f,mv),mv.Buffer=ni);function ni(e,t,n){return cn(e,t,n)}a(ni,"SafeBuffer");ni.prototype=Object.create(cn.prototype);KO(cn,ni);ni.from=function(e,t,n){if(typeof e=="number")throw new TypeError("Argument must not be a number");return cn(e,t,n)};ni.alloc=function(e,t,n){if(typeof e!="number")throw new TypeError("Argument must be a number");var o=cn(e);return t!==void 0?typeof n=="string"?o.fill(t,n):o.fill(t):o.fill(0),o};ni.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return cn(e)};ni.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return _f.SlowBuffer(e)}});var YO=B((z7,QO)=>{"use strict";function hv(e){var t=(e/8|0)+(e%8===0?0:1);return t}a(hv,"getParamSize");var qF={ES256:hv(256),ES384:hv(384),ES512:hv(521)};function VF(e){var t=qF[e];if(t)return t;throw new Error('Unknown algorithm "'+e+'"')}a(VF,"getParamBytesForAlg");QO.exports=VF});var gv=B((D7,ik)=>{"use strict";var bf=ba().Buffer,tk=YO(),vf=128,rk=0,ZF=32,HF=16,GF=2,nk=HF|ZF|rk<<6,Ef=GF|rk<<6;function WF(e){return e.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}a(WF,"base64Url");function ok(e){if(bf.isBuffer(e))return e;if(typeof e=="string")return bf.from(e,"base64");throw new TypeError("ECDSA signature must be a Base64 string or a Buffer")}a(ok,"signatureAsBuffer");function JF(e,t){e=ok(e);var n=tk(t),o=n+1,r=e.length,i=0;if(e[i++]!==nk)throw new Error('Could not find expected "seq"');var s=e[i++];if(s===(vf|1)&&(s=e[i++]),r-i<s)throw new Error('"seq" specified length of "'+s+'", only "'+(r-i)+'" remaining');if(e[i++]!==Ef)throw new Error('Could not find expected "int" for "r"');var u=e[i++];if(r-i-2<u)throw new Error('"r" specified length of "'+u+'", only "'+(r-i-2)+'" available');if(o<u)throw new Error('"r" specified length of "'+u+'", max of "'+o+'" is acceptable');var d=i;if(i+=u,e[i++]!==Ef)throw new Error('Could not find expected "int" for "s"');var p=e[i++];if(r-i!==p)throw new Error('"s" specified length of "'+p+'", expected "'+(r-i)+'"');if(o<p)throw new Error('"s" specified length of "'+p+'", max of "'+o+'" is acceptable');var f=i;if(i+=p,i!==r)throw new Error('Expected to consume entire buffer, but "'+(r-i)+'" bytes remain');var g=n-u,y=n-p,h=bf.allocUnsafe(g+u+y+p);for(i=0;i<g;++i)h[i]=0;e.copy(h,i,d+Math.max(-g,0),d+u),i=n;for(var _=i;i<_+y;++i)h[i]=0;return e.copy(h,i,f+Math.max(-y,0),f+p),h=h.toString("base64"),h=WF(h),h}a(JF,"derToJose");function ek(e,t,n){for(var o=0;t+o<n&&e[t+o]===0;)++o;var r=e[t+o]>=vf;return r&&--o,o}a(ek,"countPadding");function KF(e,t){e=ok(e);var n=tk(t),o=e.length;if(o!==n*2)throw new TypeError('"'+t+'" signatures must be "'+n*2+'" bytes, saw "'+o+'"');var r=ek(e,0,n),i=ek(e,n,e.length),s=n-r,u=n-i,d=2+s+1+1+u,p=d<vf,f=bf.allocUnsafe((p?2:3)+d),g=0;return f[g++]=nk,p?f[g++]=d:(f[g++]=vf|1,f[g++]=d&255),f[g++]=Ef,f[g++]=s,r<0?(f[g++]=0,g+=e.copy(f,g,0,n)):g+=e.copy(f,g,r,n),f[g++]=Ef,f[g++]=u,i<0?(f[g++]=0,e.copy(f,g,n)):e.copy(f,g,n+i),f}a(KF,"joseToDer");ik.exports={derToJose:JF,joseToDer:KF}});var Wr=B(zn=>{"use strict";Object.defineProperty(zn,"__esModule",{value:!0});zn.LRUCache=void 0;zn.snakeToCamel=sk;zn.originalOrCamelOptions=eB;zn.removeUndefinedValuesInObject=tB;zn.isValidFile=rB;zn.getWellKnownCertificateConfigFileLocation=nB;var XF=require("fs"),QF=require("os"),yv=require("path"),YF="certificate_config.json",ak="gcloud";function sk(e){return e.replace(/([_][^_])/g,t=>t.slice(1).toUpperCase())}a(sk,"snakeToCamel");function eB(e){function t(n){let o=e||{};return o[n]??o[sk(n)]}return a(t,"get"),{get:t}}a(eB,"originalOrCamelOptions");var _v=class{static{a(this,"LRUCache")}capacity;#e=new Map;maxAge;constructor(t){this.capacity=t.capacity,this.maxAge=t.maxAge}#t(t,n){this.#e.delete(t),this.#e.set(t,{value:n,lastAccessed:Date.now()})}set(t,n){this.#t(t,n),this.#r()}get(t){let n=this.#e.get(t);if(n)return this.#t(t,n.value),this.#r(),n.value}#r(){let t=this.maxAge?Date.now()-this.maxAge:0,n=this.#e.entries().next();for(;!n.done&&(this.#e.size>this.capacity||n.value[1].lastAccessed<t);)this.#e.delete(n.value[0]),n=this.#e.entries().next()}};zn.LRUCache=_v;function tB(e){return Object.entries(e).forEach(([t,n])=>{(n===void 0||n==="undefined")&&delete e[t]}),e}a(tB,"removeUndefinedValuesInObject");async function rB(e){try{return(await XF.promises.lstat(e)).isFile()}catch{return!1}}a(rB,"isValidFile");function nB(){let e=process.env.CLOUDSDK_CONFIG||(oB()?yv.join(process.env.APPDATA||"",ak):yv.join(process.env.HOME||"",".config",ak));return yv.join(e,YF)}a(nB,"getWellKnownCertificateConfigFileLocation");function oB(){return QF.platform().startsWith("win")}a(oB,"_isWindows")});var ck=B((L7,iB)=>{iB.exports={name:"google-auth-library",version:"10.5.0",author:"Google Inc.",description:"Google APIs Authentication Client Library for Node.js",engines:{node:">=18"},main:"./build/src/index.js",types:"./build/src/index.d.ts",repository:"googleapis/google-auth-library-nodejs.git",keywords:["google","api","google apis","client","client library"],dependencies:{"base64-js":"^1.3.0","ecdsa-sig-formatter":"^1.0.11",gaxios:"^7.0.0","gcp-metadata":"^8.0.0","google-logging-utils":"^1.0.0",gtoken:"^8.0.0",jws:"^4.0.0"},devDependencies:{"@types/base64-js":"^1.2.5","@types/jws":"^3.1.0","@types/mocha":"^10.0.10","@types/mv":"^2.1.0","@types/ncp":"^2.0.1","@types/node":"^22.0.0","@types/sinon":"^17.0.0","assert-rejects":"^1.0.0",c8:"^10.0.0",codecov:"^3.0.2",gts:"^6.0.0","is-docker":"^3.0.0",jsdoc:"^4.0.0","jsdoc-fresh":"^5.0.0","jsdoc-region-tag":"^4.0.0",karma:"^6.0.0","karma-chrome-launcher":"^3.0.0","karma-coverage":"^2.0.0","karma-firefox-launcher":"^2.0.0","karma-mocha":"^2.0.0","karma-sourcemap-loader":"^0.4.0","karma-webpack":"^5.0.1",keypair:"^1.0.4",mocha:"^11.1.0",mv:"^2.1.1",ncp:"^2.0.0",nock:"^14.0.5","null-loader":"^4.0.0",puppeteer:"^24.0.0",sinon:"^21.0.0","ts-loader":"^8.0.0",typescript:"5.8.2",webpack:"^5.21.2","webpack-cli":"^4.0.0"},files:["build/src","!build/src/**/*.map"],scripts:{test:"c8 mocha build/test",clean:"gts clean",prepare:"npm run compile",lint:"gts check --no-inline-config",compile:"tsc -p .",fix:"gts fix",pretest:"npm run compile -- --sourceMap",docs:"jsdoc -c .jsdoc.js","samples-setup":"cd samples/ && npm link ../ && npm run setup && cd ../","samples-test":"cd samples/ && npm link ../ && npm test && cd ../","system-test":"mocha build/system-test --timeout 60000","presystem-test":"npm run compile -- --sourceMap",webpack:"webpack","browser-test":"karma start","docs-test":"echo 'disabled until linkinator is fixed'","predocs-test":"npm run docs",prelint:"cd samples; npm link ../; npm install"},license:"Apache-2.0"}});var bv=B(ho=>{"use strict";Object.defineProperty(ho,"__esModule",{value:!0});ho.USER_AGENT=ho.PRODUCT_NAME=ho.pkg=void 0;var uk=ck();ho.pkg=uk;var lk="google-api-nodejs-client";ho.PRODUCT_NAME=lk;var aB=`${lk}/${uk.version}`;ho.USER_AGENT=aB});var yr=B(Jr=>{"use strict";Object.defineProperty(Jr,"__esModule",{value:!0});Jr.AuthClient=Jr.DEFAULT_EAGER_REFRESH_THRESHOLD_MILLIS=Jr.DEFAULT_UNIVERSE=void 0;var sB=require("events"),vv=kt(),cB=Wr(),uB=iv(),Ev=bv();Jr.DEFAULT_UNIVERSE="googleapis.com";Jr.DEFAULT_EAGER_REFRESH_THRESHOLD_MILLIS=300*1e3;var Sv=class e extends sB.EventEmitter{static{a(this,"AuthClient")}apiKey;projectId;quotaProjectId;transporter;credentials={};eagerRefreshThresholdMillis=Jr.DEFAULT_EAGER_REFRESH_THRESHOLD_MILLIS;forceRefreshOnFailure=!1;universeDomain=Jr.DEFAULT_UNIVERSE;static RequestMethodNameSymbol=Symbol("request method name");static RequestLogIdSymbol=Symbol("request log id");constructor(t={}){super();let n=(0,cB.originalOrCamelOptions)(t);this.apiKey=t.apiKey,this.projectId=n.get("project_id")??null,this.quotaProjectId=n.get("quota_project_id"),this.credentials=n.get("credentials")??{},this.universeDomain=n.get("universe_domain")??Jr.DEFAULT_UNIVERSE,this.transporter=t.transporter??new vv.Gaxios(t.transporterOptions),n.get("useAuthRequestParameters")!==!1&&(this.transporter.interceptors.request.add(e.DEFAULT_REQUEST_INTERCEPTOR),this.transporter.interceptors.response.add(e.DEFAULT_RESPONSE_INTERCEPTOR)),t.eagerRefreshThresholdMillis&&(this.eagerRefreshThresholdMillis=t.eagerRefreshThresholdMillis),this.forceRefreshOnFailure=t.forceRefreshOnFailure??!1}fetch(...t){let n=t[0],o=t[1],r,i=new Headers;return typeof n=="string"?r=new URL(n):n instanceof URL?r=n:n&&n.url&&(r=new URL(n.url)),n&&typeof n=="object"&&"headers"in n&&vv.Gaxios.mergeHeaders(i,n.headers),o&&vv.Gaxios.mergeHeaders(i,new Headers(o.headers)),typeof n=="object"&&!(n instanceof URL)?this.request({...o,...n,headers:i,url:r}):this.request({...o,headers:i,url:r})}setCredentials(t){this.credentials=t}addSharedMetadataHeaders(t){return!t.has("x-goog-user-project")&&this.quotaProjectId&&t.set("x-goog-user-project",this.quotaProjectId),t}addUserProjectAndAuthHeaders(t,n){let o=n.get("x-goog-user-project"),r=n.get("authorization");return o&&t.set("x-goog-user-project",o),r&&t.set("authorization",r),t}static log=(0,uB.log)("auth");static DEFAULT_REQUEST_INTERCEPTOR={resolved:a(async t=>{if(!t.headers.has("x-goog-api-client")){let o=process.version.replace(/^v/,"");t.headers.set("x-goog-api-client",`gl-node/${o}`)}let n=t.headers.get("User-Agent");n?n.includes(`${Ev.PRODUCT_NAME}/`)||t.headers.set("User-Agent",`${n} ${Ev.USER_AGENT}`):t.headers.set("User-Agent",Ev.USER_AGENT);try{let o=t,r=o[e.RequestMethodNameSymbol],i=`${Math.floor(Math.random()*1e3)}`;o[e.RequestLogIdSymbol]=i;let s={url:t.url,headers:t.headers};r?e.log.info("%s [%s] request %j",r,i,s):e.log.info("[%s] request %j",i,s)}catch{}return t},"resolved")};static DEFAULT_RESPONSE_INTERCEPTOR={resolved:a(async t=>{try{let n=t.config,o=n[e.RequestMethodNameSymbol],r=n[e.RequestLogIdSymbol];o?e.log.info("%s [%s] response %j",o,r,t.data):e.log.info("[%s] response %j",r,t.data)}catch{}return t},"resolved"),rejected:a(async t=>{try{let n=t.config,o=n[e.RequestMethodNameSymbol],r=n[e.RequestLogIdSymbol];o?e.log.info("%s [%s] error %j",o,r,t.response?.data):e.log.error("[%s] error %j",r,t.response?.data)}catch{}throw t},"rejected")};static setMethodName(t,n){try{let o=t;o[e.RequestMethodNameSymbol]=n}catch{}}static get RETRY_CONFIG(){return{retry:!0,retryConfig:{httpMethodsToRetry:["GET","PUT","POST","HEAD","OPTIONS","DELETE"]}}}};Jr.AuthClient=Sv});var xv=B(Sf=>{"use strict";Object.defineProperty(Sf,"__esModule",{value:!0});Sf.LoginTicket=void 0;var Pv=class{static{a(this,"LoginTicket")}envelope;payload;constructor(t,n){this.envelope=t,this.payload=n}getEnvelope(){return this.envelope}getPayload(){return this.payload}getUserId(){let t=this.getPayload();return t&&t.sub?t.sub:null}getAttributes(){return{envelope:this.getEnvelope(),payload:this.getPayload()}}};Sf.LoginTicket=Pv});var oi=B(un=>{"use strict";Object.defineProperty(un,"__esModule",{value:!0});un.OAuth2Client=un.ClientAuthentication=un.CertificateFormat=un.CodeChallengeMethod=void 0;var dk=kt(),lB=require("querystring"),dB=require("stream"),pB=gv(),pk=Wr(),Tv=eu(),va=yr(),fB=xv(),fk;(function(e){e.Plain="plain",e.S256="S256"})(fk||(un.CodeChallengeMethod=fk={}));var Nn;(function(e){e.PEM="PEM",e.JWK="JWK"})(Nn||(un.CertificateFormat=Nn={}));var tu;(function(e){e.ClientSecretPost="ClientSecretPost",e.ClientSecretBasic="ClientSecretBasic",e.None="None"})(tu||(un.ClientAuthentication=tu={}));var wv=class e extends va.AuthClient{static{a(this,"OAuth2Client")}redirectUri;certificateCache={};certificateExpiry=null;certificateCacheFormat=Nn.PEM;refreshTokenPromises=new Map;endpoints;issuers;clientAuthentication;_clientId;_clientSecret;refreshHandler;constructor(t={},n,o){super(typeof t=="object"?t:{}),typeof t!="object"&&(t={clientId:t,clientSecret:n,redirectUri:o}),this._clientId=t.clientId||t.client_id,this._clientSecret=t.clientSecret||t.client_secret,this.redirectUri=t.redirectUri||t.redirect_uris?.[0],this.endpoints={tokenInfoUrl:"https://oauth2.googleapis.com/tokeninfo",oauth2AuthBaseUrl:"https://accounts.google.com/o/oauth2/v2/auth",oauth2TokenUrl:"https://oauth2.googleapis.com/token",oauth2RevokeUrl:"https://oauth2.googleapis.com/revoke",oauth2FederatedSignonPemCertsUrl:"https://www.googleapis.com/oauth2/v1/certs",oauth2FederatedSignonJwkCertsUrl:"https://www.googleapis.com/oauth2/v3/certs",oauth2IapPublicKeyUrl:"https://www.gstatic.com/iap/verify/public_key",...t.endpoints},this.clientAuthentication=t.clientAuthentication||tu.ClientSecretPost,this.issuers=t.issuers||["accounts.google.com","https://accounts.google.com",this.universeDomain]}static GOOGLE_TOKEN_INFO_URL="https://oauth2.googleapis.com/tokeninfo";static CLOCK_SKEW_SECS_=300;static DEFAULT_MAX_TOKEN_LIFETIME_SECS_=86400;generateAuthUrl(t={}){if(t.code_challenge_method&&!t.code_challenge)throw new Error("If a code_challenge_method is provided, code_challenge must be included.");return t.response_type=t.response_type||"code",t.client_id=t.client_id||this._clientId,t.redirect_uri=t.redirect_uri||this.redirectUri,Array.isArray(t.scope)&&(t.scope=t.scope.join(" ")),this.endpoints.oauth2AuthBaseUrl.toString()+"?"+lB.stringify(t)}generateCodeVerifier(){throw new Error("generateCodeVerifier is removed, please use generateCodeVerifierAsync instead.")}async generateCodeVerifierAsync(){let t=(0,Tv.createCrypto)(),o=t.randomBytesBase64(96).replace(/\+/g,"~").replace(/=/g,"_").replace(/\//g,"-"),i=(await t.sha256DigestBase64(o)).split("=")[0].replace(/\+/g,"-").replace(/\//g,"_");return{codeVerifier:o,codeChallenge:i}}getToken(t,n){let o=typeof t=="string"?{code:t}:t;if(n)this.getTokenAsync(o).then(r=>n(null,r.tokens,r.res),r=>n(r,null,r.response));else return this.getTokenAsync(o)}async getTokenAsync(t){let n=this.endpoints.oauth2TokenUrl.toString(),o=new Headers,r={client_id:t.client_id||this._clientId,code_verifier:t.codeVerifier,code:t.code,grant_type:"authorization_code",redirect_uri:t.redirect_uri||this.redirectUri};if(this.clientAuthentication===tu.ClientSecretBasic){let d=Buffer.from(`${this._clientId}:${this._clientSecret}`);o.set("authorization",`Basic ${d.toString("base64")}`)}this.clientAuthentication===tu.ClientSecretPost&&(r.client_secret=this._clientSecret);let i={...e.RETRY_CONFIG,method:"POST",url:n,data:new URLSearchParams((0,pk.removeUndefinedValuesInObject)(r)),headers:o};va.AuthClient.setMethodName(i,"getTokenAsync");let s=await this.transporter.request(i),u=s.data;return s.data&&s.data.expires_in&&(u.expiry_date=new Date().getTime()+s.data.expires_in*1e3,delete u.expires_in),this.emit("tokens",u),{tokens:u,res:s}}async refreshToken(t){if(!t)return this.refreshTokenNoCache(t);if(this.refreshTokenPromises.has(t))return this.refreshTokenPromises.get(t);let n=this.refreshTokenNoCache(t).then(o=>(this.refreshTokenPromises.delete(t),o),o=>{throw this.refreshTokenPromises.delete(t),o});return this.refreshTokenPromises.set(t,n),n}async refreshTokenNoCache(t){if(!t)throw new Error("No refresh token is set.");let n=this.endpoints.oauth2TokenUrl.toString(),o={refresh_token:t,client_id:this._clientId,client_secret:this._clientSecret,grant_type:"refresh_token"},r;try{let s={...e.RETRY_CONFIG,method:"POST",url:n,data:new URLSearchParams((0,pk.removeUndefinedValuesInObject)(o))};va.AuthClient.setMethodName(s,"refreshTokenNoCache"),r=await this.transporter.request(s)}catch(s){throw s instanceof dk.GaxiosError&&s.message==="invalid_grant"&&s.response?.data&&/ReAuth/i.test(s.response.data.error_description)&&(s.message=JSON.stringify(s.response.data)),s}let i=r.data;return r.data&&r.data.expires_in&&(i.expiry_date=new Date().getTime()+r.data.expires_in*1e3,delete i.expires_in),this.emit("tokens",i),{tokens:i,res:r}}refreshAccessToken(t){if(t)this.refreshAccessTokenAsync().then(n=>t(null,n.credentials,n.res),t);else return this.refreshAccessTokenAsync()}async refreshAccessTokenAsync(){let t=await this.refreshToken(this.credentials.refresh_token),n=t.tokens;return n.refresh_token=this.credentials.refresh_token,this.credentials=n,{credentials:this.credentials,res:t.res}}getAccessToken(t){if(t)this.getAccessTokenAsync().then(n=>t(null,n.token,n.res),t);else return this.getAccessTokenAsync()}async getAccessTokenAsync(){if(!this.credentials.access_token||this.isTokenExpiring()){if(!this.credentials.refresh_token)if(this.refreshHandler){let o=await this.processAndValidateRefreshHandler();if(o?.access_token)return this.setCredentials(o),{token:this.credentials.access_token}}else throw new Error("No refresh token or refresh handler callback is set.");let n=await this.refreshAccessTokenAsync();if(!n.credentials||n.credentials&&!n.credentials.access_token)throw new Error("Could not refresh access token.");return{token:n.credentials.access_token,res:n.res}}else return{token:this.credentials.access_token}}async getRequestHeaders(t){return(await this.getRequestMetadataAsync(t)).headers}async getRequestMetadataAsync(t){let n=this.credentials;if(!n.access_token&&!n.refresh_token&&!this.apiKey&&!this.refreshHandler)throw new Error("No access, refresh token, API key or refresh handler callback is set.");if(n.access_token&&!this.isTokenExpiring()){n.token_type=n.token_type||"Bearer";let u=new Headers({authorization:n.token_type+" "+n.access_token});return{headers:this.addSharedMetadataHeaders(u)}}if(this.refreshHandler){let u=await this.processAndValidateRefreshHandler();if(u?.access_token){this.setCredentials(u);let d=new Headers({authorization:"Bearer "+this.credentials.access_token});return{headers:this.addSharedMetadataHeaders(d)}}}if(this.apiKey)return{headers:new Headers({"X-Goog-Api-Key":this.apiKey})};let o=null,r=null;try{o=await this.refreshToken(n.refresh_token),r=o.tokens}catch(u){let d=u;throw d.response&&(d.response.status===403||d.response.status===404)&&(d.message=`Could not refresh access token: ${d.message}`),d}let i=this.credentials;i.token_type=i.token_type||"Bearer",r.refresh_token=i.refresh_token,this.credentials=r;let s=new Headers({authorization:i.token_type+" "+r.access_token});return{headers:this.addSharedMetadataHeaders(s),res:o.res}}static getRevokeTokenUrl(t){return new e().getRevokeTokenURL(t).toString()}getRevokeTokenURL(t){let n=new URL(this.endpoints.oauth2RevokeUrl);return n.searchParams.append("token",t),n}revokeToken(t,n){let o={...e.RETRY_CONFIG,url:this.getRevokeTokenURL(t).toString(),method:"POST"};if(va.AuthClient.setMethodName(o,"revokeToken"),n)this.transporter.request(o).then(r=>n(null,r),n);else return this.transporter.request(o)}revokeCredentials(t){if(t)this.revokeCredentialsAsync().then(n=>t(null,n),t);else return this.revokeCredentialsAsync()}async revokeCredentialsAsync(){let t=this.credentials.access_token;if(this.credentials={},t)return this.revokeToken(t);throw new Error("No access token to revoke.")}request(t,n){if(n)this.requestAsync(t).then(o=>n(null,o),o=>n(o,o.response));else return this.requestAsync(t)}async requestAsync(t,n=!1){try{let o=await this.getRequestMetadataAsync();return t.headers=dk.Gaxios.mergeHeaders(t.headers),this.addUserProjectAndAuthHeaders(t.headers,o.headers),this.apiKey&&t.headers.set("X-Goog-Api-Key",this.apiKey),await this.transporter.request(t)}catch(o){let r=o.response;if(r){let i=r.status,s=this.credentials&&this.credentials.access_token&&this.credentials.refresh_token&&(!this.credentials.expiry_date||this.forceRefreshOnFailure),u=this.credentials&&this.credentials.access_token&&!this.credentials.refresh_token&&(!this.credentials.expiry_date||this.forceRefreshOnFailure)&&this.refreshHandler,d=r.config.data instanceof dB.Readable,p=i===401||i===403;if(!n&&p&&!d&&s)return await this.refreshAccessTokenAsync(),this.requestAsync(t,!0);if(!n&&p&&!d&&u){let f=await this.processAndValidateRefreshHandler();return f?.access_token&&this.setCredentials(f),this.requestAsync(t,!0)}}throw o}}verifyIdToken(t,n){if(n&&typeof n!="function")throw new Error("This method accepts an options object as the first parameter, which includes the idToken, audience, and maxExpiry.");if(n)this.verifyIdTokenAsync(t).then(o=>n(null,o),n);else return this.verifyIdTokenAsync(t)}async verifyIdTokenAsync(t){if(!t.idToken)throw new Error("The verifyIdToken method requires an ID Token");let n=await this.getFederatedSignonCertsAsync();return await this.verifySignedJwtWithCertsAsync(t.idToken,n.certs,t.audience,this.issuers,t.maxExpiry)}async getTokenInfo(t){let{data:n}=await this.transporter.request({...e.RETRY_CONFIG,method:"POST",headers:{"content-type":"application/x-www-form-urlencoded;charset=UTF-8",authorization:`Bearer ${t}`},url:this.endpoints.tokenInfoUrl.toString()}),o=Object.assign({expiry_date:new Date().getTime()+n.expires_in*1e3,scopes:n.scope.split(" ")},n);return delete o.expires_in,delete o.scope,o}getFederatedSignonCerts(t){if(t)this.getFederatedSignonCertsAsync().then(n=>t(null,n.certs,n.res),t);else return this.getFederatedSignonCertsAsync()}async getFederatedSignonCertsAsync(){let t=new Date().getTime(),n=(0,Tv.hasBrowserCrypto)()?Nn.JWK:Nn.PEM;if(this.certificateExpiry&&t<this.certificateExpiry.getTime()&&this.certificateCacheFormat===n)return{certs:this.certificateCache,format:n};let o,r;switch(n){case Nn.PEM:r=this.endpoints.oauth2FederatedSignonPemCertsUrl.toString();break;case Nn.JWK:r=this.endpoints.oauth2FederatedSignonJwkCertsUrl.toString();break;default:throw new Error(`Unsupported certificate format ${n}`)}try{let p={...e.RETRY_CONFIG,url:r};va.AuthClient.setMethodName(p,"getFederatedSignonCertsAsync"),o=await this.transporter.request(p)}catch(p){throw p instanceof Error&&(p.message=`Failed to retrieve verification certificates: ${p.message}`),p}let i=o?.headers.get("cache-control"),s=-1;if(i){let p=/max-age=(?<maxAge>[0-9]+)/.exec(i)?.groups?.maxAge;p&&(s=Number(p)*1e3)}let u={};switch(n){case Nn.PEM:u=o.data;break;case Nn.JWK:for(let p of o.data.keys)u[p.kid]=p;break;default:throw new Error(`Unsupported certificate format ${n}`)}let d=new Date;return this.certificateExpiry=s===-1?null:new Date(d.getTime()+s),this.certificateCache=u,this.certificateCacheFormat=n,{certs:u,format:n,res:o}}getIapPublicKeys(t){if(t)this.getIapPublicKeysAsync().then(n=>t(null,n.pubkeys,n.res),t);else return this.getIapPublicKeysAsync()}async getIapPublicKeysAsync(){let t,n=this.endpoints.oauth2IapPublicKeyUrl.toString();try{let o={...e.RETRY_CONFIG,url:n};va.AuthClient.setMethodName(o,"getIapPublicKeysAsync"),t=await this.transporter.request(o)}catch(o){throw o instanceof Error&&(o.message=`Failed to retrieve verification certificates: ${o.message}`),o}return{pubkeys:t.data,res:t}}verifySignedJwtWithCerts(){throw new Error("verifySignedJwtWithCerts is removed, please use verifySignedJwtWithCertsAsync instead.")}async verifySignedJwtWithCertsAsync(t,n,o,r,i){let s=(0,Tv.createCrypto)();i||(i=e.DEFAULT_MAX_TOKEN_LIFETIME_SECS_);let u=t.split(".");if(u.length!==3)throw new Error("Wrong number of segments in token: "+t);let d=u[0]+"."+u[1],p=u[2],f,g;try{f=JSON.parse(s.decodeBase64StringUtf8(u[0]))}catch(V){throw V instanceof Error&&(V.message=`Can't parse token envelope: ${u[0]}': ${V.message}`),V}if(!f)throw new Error("Can't parse token envelope: "+u[0]);try{g=JSON.parse(s.decodeBase64StringUtf8(u[1]))}catch(V){throw V instanceof Error&&(V.message=`Can't parse token payload '${u[0]}`),V}if(!g)throw new Error("Can't parse token payload: "+u[1]);if(!Object.prototype.hasOwnProperty.call(n,f.kid))throw new Error("No pem found for envelope: "+JSON.stringify(f));let y=n[f.kid];if(f.alg==="ES256"&&(p=pB.joseToDer(p,"ES256").toString("base64")),!await s.verify(y,d,p))throw new Error("Invalid token signature: "+t);if(!g.iat)throw new Error("No issue time in token: "+JSON.stringify(g));if(!g.exp)throw new Error("No expiration time in token: "+JSON.stringify(g));let _=Number(g.iat);if(isNaN(_))throw new Error("iat field using invalid format");let P=Number(g.exp);if(isNaN(P))throw new Error("exp field using invalid format");let x=new Date().getTime()/1e3;if(P>=x+i)throw new Error("Expiration time too far in future: "+JSON.stringify(g));let S=_-e.CLOCK_SKEW_SECS_,$=P+e.CLOCK_SKEW_SECS_;if(x<S)throw new Error("Token used too early, "+x+" < "+S+": "+JSON.stringify(g));if(x>$)throw new Error("Token used too late, "+x+" > "+$+": "+JSON.stringify(g));if(r&&r.indexOf(g.iss)<0)throw new Error("Invalid issuer, expected one of ["+r+"], but got "+g.iss);if(typeof o<"u"&&o!==null){let V=g.aud,W=!1;if(o.constructor===Array?W=o.indexOf(V)>-1:W=V===o,!W)throw new Error("Wrong recipient, payload audience != requiredAudience")}return new fB.LoginTicket(f,g)}async processAndValidateRefreshHandler(){if(this.refreshHandler){let t=await this.refreshHandler();if(!t.access_token)throw new Error("No access token is returned by the refreshHandler callback.");return t}}isTokenExpiring(){let t=this.credentials.expiry_date;return t?t<=new Date().getTime()+this.eagerRefreshThresholdMillis:!1}};un.OAuth2Client=wv});var Iv=B(Pf=>{"use strict";Object.defineProperty(Pf,"__esModule",{value:!0});Pf.Compute=void 0;var mB=kt(),mk=Yc(),hB=oi(),Av=class extends hB.OAuth2Client{static{a(this,"Compute")}serviceAccountEmail;scopes;constructor(t={}){super(t),this.credentials={expiry_date:1,refresh_token:"compute-placeholder"},this.serviceAccountEmail=t.serviceAccountEmail||"default",this.scopes=Array.isArray(t.scopes)?t.scopes:t.scopes?[t.scopes]:[]}async refreshTokenNoCache(){let t=`service-accounts/${this.serviceAccountEmail}/token`,n;try{let r={property:t};this.scopes.length>0&&(r.params={scopes:this.scopes.join(",")}),n=await mk.instance(r)}catch(r){throw r instanceof mB.GaxiosError&&(r.message=`Could not refresh access token: ${r.message}`,this.wrapError(r)),r}let o=n;return n&&n.expires_in&&(o.expiry_date=new Date().getTime()+n.expires_in*1e3,delete o.expires_in),this.emit("tokens",o),{tokens:o,res:null}}async fetchIdToken(t){let n=`service-accounts/${this.serviceAccountEmail}/identity?format=full&audience=${t}`,o;try{let r={property:n};o=await mk.instance(r)}catch(r){throw r instanceof Error&&(r.message=`Could not fetch ID token: ${r.message}`),r}return o}wrapError(t){let n=t.response;n&&n.status&&(t.status=n.status,n.status===403?t.message="A Forbidden error was returned while attempting to retrieve an access token for the Compute Engine built-in service account. This may be because the Compute Engine instance does not have the correct permission scopes specified: "+t.message:n.status===404&&(t.message="A Not Found error was returned while attempting to retrieve an accesstoken for the Compute Engine built-in service account. This may be because the Compute Engine instance does not have any permission scopes specified: "+t.message))}};Pf.Compute=Av});var Ov=B(xf=>{"use strict";Object.defineProperty(xf,"__esModule",{value:!0});xf.IdTokenClient=void 0;var gB=oi(),Rv=class extends gB.OAuth2Client{static{a(this,"IdTokenClient")}targetAudience;idTokenProvider;constructor(t){super(t),this.targetAudience=t.targetAudience,this.idTokenProvider=t.idTokenProvider}async getRequestMetadataAsync(){if(!this.credentials.id_token||!this.credentials.expiry_date||this.isTokenExpiring()){let n=await this.idTokenProvider.fetchIdToken(this.targetAudience);this.credentials={id_token:n,expiry_date:this.getIdTokenExpiryDate(n)}}return{headers:new Headers({authorization:"Bearer "+this.credentials.id_token})}}getIdTokenExpiryDate(t){let n=t.split(".")[1];if(n)return JSON.parse(Buffer.from(n,"base64").toString("ascii")).exp*1e3}};xf.IdTokenClient=Rv});var kv=B(Ea=>{"use strict";Object.defineProperty(Ea,"__esModule",{value:!0});Ea.GCPEnv=void 0;Ea.clear=yB;Ea.getEnv=_B;var hk=Yc(),ln;(function(e){e.APP_ENGINE="APP_ENGINE",e.KUBERNETES_ENGINE="KUBERNETES_ENGINE",e.CLOUD_FUNCTIONS="CLOUD_FUNCTIONS",e.COMPUTE_ENGINE="COMPUTE_ENGINE",e.CLOUD_RUN="CLOUD_RUN",e.CLOUD_RUN_JOBS="CLOUD_RUN_JOBS",e.NONE="NONE"})(ln||(Ea.GCPEnv=ln={}));var ru;function yB(){ru=void 0}a(yB,"clear");async function _B(){return ru||(ru=bB(),ru)}a(_B,"getEnv");async function bB(){let e=ln.NONE;return vB()?e=ln.APP_ENGINE:EB()?e=ln.CLOUD_FUNCTIONS:await TB()?await xB()?e=ln.KUBERNETES_ENGINE:SB()?e=ln.CLOUD_RUN:PB()?e=ln.CLOUD_RUN_JOBS:e=ln.COMPUTE_ENGINE:e=ln.NONE,e}a(bB,"getEnvMemoized");function vB(){return!!(process.env.GAE_SERVICE||process.env.GAE_MODULE_NAME)}a(vB,"isAppEngine");function EB(){return!!(process.env.FUNCTION_NAME||process.env.FUNCTION_TARGET)}a(EB,"isCloudFunction");function SB(){return!!process.env.K_CONFIGURATION}a(SB,"isCloudRun");function PB(){return!!process.env.CLOUD_RUN_JOB}a(PB,"isCloudRunJob");async function xB(){try{return await hk.instance("attributes/cluster-name"),!0}catch{return!1}}a(xB,"isKubernetesEngine");async function TB(){return hk.isAvailable()}a(TB,"isComputeEngine")});var Cv=B((eee,gk)=>{var Tf=ba().Buffer,wB=require("stream"),AB=require("util");function wf(e){if(this.buffer=null,this.writable=!0,this.readable=!0,!e)return this.buffer=Tf.alloc(0),this;if(typeof e.pipe=="function")return this.buffer=Tf.alloc(0),e.pipe(this),this;if(e.length||typeof e=="object")return this.buffer=e,this.writable=!1,process.nextTick(function(){this.emit("end",e),this.readable=!1,this.emit("close")}.bind(this)),this;throw new TypeError("Unexpected data type ("+typeof e+")")}a(wf,"DataStream");AB.inherits(wf,wB);wf.prototype.write=a(function(t){this.buffer=Tf.concat([this.buffer,Tf.from(t)]),this.emit("data",t)},"write");wf.prototype.end=a(function(t){t&&this.write(t),this.emit("end",t),this.emit("close"),this.writable=!1,this.readable=!1},"end");gk.exports=wf});var _k=B((ree,yk)=>{"use strict";var nu=require("buffer").Buffer,$v=require("buffer").SlowBuffer;yk.exports=Af;function Af(e,t){if(!nu.isBuffer(e)||!nu.isBuffer(t)||e.length!==t.length)return!1;for(var n=0,o=0;o<e.length;o++)n|=e[o]^t[o];return n===0}a(Af,"bufferEq");Af.install=function(){nu.prototype.equal=$v.prototype.equal=a(function(t){return Af(this,t)},"equal")};var IB=nu.prototype.equal,RB=$v.prototype.equal;Af.restore=function(){nu.prototype.equal=IB,$v.prototype.equal=RB}});var Uv=B((oee,Ak)=>{var Pa=ba().Buffer,Cr=require("crypto"),vk=gv(),bk=require("util"),OB=`"%s" is not a valid algorithm.
39
39
  Supported algorithms are:
40
- "HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "PS256", "PS384", "PS512", "ES256", "ES384", "ES512" and "none".`,oa="secret must be a string or buffer",Go="key must be a string or a buffer",vk="key must be a string, a buffer or an object",Ud=typeof sr.createPublicKey=="function";Ud&&(Go+=" or a KeyObject",oa+="or a KeyObject");function yE(t){if(!Wo.isBuffer(t)&&typeof t!="string"&&(!Ud||typeof t!="object"||typeof t.type!="string"||typeof t.asymmetricKeyType!="string"||typeof t.export!="function"))throw Pr(Go)}o(yE,"checkIsPublicKey");function _E(t){if(!Wo.isBuffer(t)&&typeof t!="string"&&typeof t!="object")throw Pr(vk)}o(_E,"checkIsPrivateKey");function Ek(t){if(!Wo.isBuffer(t)){if(typeof t=="string")return t;if(!Ud||typeof t!="object"||t.type!=="secret"||typeof t.export!="function")throw Pr(oa)}}o(Ek,"checkIsSecretKey");function jd(t){return t.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}o(jd,"fromBase64");function bE(t){t=t.toString();var e=4-t.length%4;if(e!==4)for(var r=0;r<e;++r)t+="=";return t.replace(/\-/g,"+").replace(/_/g,"/")}o(bE,"toBase64");function Pr(t){var e=[].slice.call(arguments,1),r=hE.format.bind(hE,t).apply(null,e);return new TypeError(r)}o(Pr,"typeError");function Pk(t){return Wo.isBuffer(t)||typeof t=="string"}o(Pk,"bufferOrString");function ia(t){return Pk(t)||(t=JSON.stringify(t)),t}o(ia,"normalizeInput");function vE(t){return o(function(r,n){Ek(n),r=ia(r);var i=sr.createHmac("sha"+t,n),u=(i.update(r),i.digest("base64"));return jd(u)},"sign")}o(vE,"createHmacSigner");var Dd,Sk="timingSafeEqual"in sr?o(function(e,r){return e.byteLength!==r.byteLength?!1:sr.timingSafeEqual(e,r)},"timingSafeEqual"):o(function(e,r){return Dd||(Dd=mE()),Dd(e,r)},"timingSafeEqual");function Tk(t){return o(function(r,n,i){var u=vE(t)(r,i);return Sk(Wo.from(n),Wo.from(u))},"verify")}o(Tk,"createHmacVerifier");function EE(t){return o(function(r,n){_E(n),r=ia(r);var i=sr.createSign("RSA-SHA"+t),u=(i.update(r),i.sign(n,"base64"));return jd(u)},"sign")}o(EE,"createKeySigner");function PE(t){return o(function(r,n,i){yE(i),r=ia(r),n=bE(n);var u=sr.createVerify("RSA-SHA"+t);return u.update(r),u.verify(i,n,"base64")},"verify")}o(PE,"createKeyVerifier");function wk(t){return o(function(r,n){_E(n),r=ia(r);var i=sr.createSign("RSA-SHA"+t),u=(i.update(r),i.sign({key:n,padding:sr.constants.RSA_PKCS1_PSS_PADDING,saltLength:sr.constants.RSA_PSS_SALTLEN_DIGEST},"base64"));return jd(u)},"sign")}o(wk,"createPSSKeySigner");function xk(t){return o(function(r,n,i){yE(i),r=ia(r),n=bE(n);var u=sr.createVerify("RSA-SHA"+t);return u.update(r),u.verify({key:i,padding:sr.constants.RSA_PKCS1_PSS_PADDING,saltLength:sr.constants.RSA_PSS_SALTLEN_DIGEST},n,"base64")},"verify")}o(xk,"createPSSKeyVerifier");function Ak(t){var e=EE(t);return o(function(){var n=e.apply(null,arguments);return n=gE.derToJose(n,"ES"+t),n},"sign")}o(Ak,"createECDSASigner");function Ik(t){var e=PE(t);return o(function(n,i,u){i=gE.joseToDer(i,"ES"+t).toString("base64");var c=e(n,i,u);return c},"verify")}o(Ik,"createECDSAVerifer");function Rk(){return o(function(){return""},"sign")}o(Rk,"createNoneSigner");function Ck(){return o(function(e,r){return r===""},"verify")}o(Ck,"createNoneVerifier");SE.exports=o(function(e){var r={hs:vE,rs:EE,ps:wk,es:Ak,none:Rk},n={hs:Tk,rs:PE,ps:xk,es:Ik,none:Ck},i=e.match(/^(RS|PS|ES|HS)(256|384|512)$|^(none)$/);if(!i)throw Pr(bk,e);var u=(i[1]||i[3]).toLowerCase(),c=i[2];return{sign:r[u](c),verify:n[u](c)}},"jwa")});var Ld=L((R3,TE)=>{var Ok=require("buffer").Buffer;TE.exports=o(function(e){return typeof e=="string"?e:typeof e=="number"||Ok.isBuffer(e)?e.toString():JSON.stringify(e)},"toString")});var CE=L((O3,RE)=>{var kk=qo().Buffer,wE=zd(),$k=Md(),zk=require("stream"),xE=Ld(),Fd=require("util");function AE(t,e){return kk.from(t,e).toString("base64").replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}o(AE,"base64url");function Nk(t,e,r){r=r||"utf8";var n=AE(xE(t),"binary"),i=AE(xE(e),r);return Fd.format("%s.%s",n,i)}o(Nk,"jwsSecuredInput");function IE(t){var e=t.header,r=t.payload,n=t.secret||t.privateKey,i=t.encoding,u=$k(e.alg),c=Nk(e,r,i),l=u.sign(c,n);return Fd.format("%s.%s",c,l)}o(IE,"jwsSign");function du(t){var e=t.secret;if(e=e??t.privateKey,e=e??t.key,/^hs/i.test(t.header.alg)===!0&&e==null)throw new TypeError("secret must be a string or buffer or a KeyObject");var r=new wE(e);this.readable=!0,this.header=t.header,this.encoding=t.encoding,this.secret=this.privateKey=this.key=r,this.payload=new wE(t.payload),this.secret.once("close",function(){!this.payload.writable&&this.readable&&this.sign()}.bind(this)),this.payload.once("close",function(){!this.secret.writable&&this.readable&&this.sign()}.bind(this))}o(du,"SignStream");Fd.inherits(du,zk);du.prototype.sign=o(function(){try{var e=IE({header:this.header,payload:this.payload.buffer,secret:this.secret.buffer,encoding:this.encoding});return this.emit("done",e),this.emit("data",e),this.emit("end"),this.readable=!1,e}catch(r){this.readable=!1,this.emit("error",r),this.emit("close")}},"sign");du.sign=IE;RE.exports=du});var LE=L(($3,ME)=>{var kE=qo().Buffer,OE=zd(),Dk=Md(),Uk=require("stream"),$E=Ld(),jk=require("util"),Mk=/^[a-zA-Z0-9\-_]+?\.[a-zA-Z0-9\-_]+?\.([a-zA-Z0-9\-_]+)?$/;function Lk(t){return Object.prototype.toString.call(t)==="[object Object]"}o(Lk,"isObject");function Fk(t){if(Lk(t))return t;try{return JSON.parse(t)}catch{return}}o(Fk,"safeJsonParse");function zE(t){var e=t.split(".",1)[0];return Fk(kE.from(e,"base64").toString("binary"))}o(zE,"headerFromJWS");function Bk(t){return t.split(".",2).join(".")}o(Bk,"securedInputFromJWS");function NE(t){return t.split(".")[2]}o(NE,"signatureFromJWS");function qk(t,e){e=e||"utf8";var r=t.split(".")[1];return kE.from(r,"base64").toString(e)}o(qk,"payloadFromJWS");function DE(t){return Mk.test(t)&&!!zE(t)}o(DE,"isValidJws");function UE(t,e,r){if(!e){var n=new Error("Missing algorithm parameter for jws.verify");throw n.code="MISSING_ALGORITHM",n}t=$E(t);var i=NE(t),u=Bk(t),c=Dk(e);return c.verify(u,i,r)}o(UE,"jwsVerify");function jE(t,e){if(e=e||{},t=$E(t),!DE(t))return null;var r=zE(t);if(!r)return null;var n=qk(t);return(r.typ==="JWT"||e.json)&&(n=JSON.parse(n,e.encoding)),{header:r,payload:n,signature:NE(t)}}o(jE,"jwsDecode");function Zo(t){t=t||{};var e=t.secret;if(e=e??t.publicKey,e=e??t.key,/^hs/i.test(t.algorithm)===!0&&e==null)throw new TypeError("secret must be a string or buffer or a KeyObject");var r=new OE(e);this.readable=!0,this.algorithm=t.algorithm,this.encoding=t.encoding,this.secret=this.publicKey=this.key=r,this.signature=new OE(t.signature),this.secret.once("close",function(){!this.signature.writable&&this.readable&&this.verify()}.bind(this)),this.signature.once("close",function(){!this.secret.writable&&this.readable&&this.verify()}.bind(this))}o(Zo,"VerifyStream");jk.inherits(Zo,Uk);Zo.prototype.verify=o(function(){try{var e=UE(this.signature.buffer,this.algorithm,this.key.buffer),r=jE(this.signature.buffer,this.encoding);return this.emit("done",e,r),this.emit("data",e),this.emit("end"),this.readable=!1,e}catch(n){this.readable=!1,this.emit("error",n),this.emit("close")}},"verify");Zo.decode=jE;Zo.isValid=DE;Zo.verify=UE;ME.exports=Zo});var Bd=L(kn=>{var FE=CE(),pu=LE(),Vk=["HS256","HS384","HS512","RS256","RS384","RS512","PS256","PS384","PS512","ES256","ES384","ES512"];kn.ALGORITHMS=Vk;kn.sign=FE.sign;kn.verify=pu.verify;kn.decode=pu.decode;kn.isValid=pu.isValid;kn.createSign=o(function(e){return new FE(e)},"createSign");kn.createVerify=o(function(e){return new pu(e)},"createVerify")});var rP=L(mu=>{"use strict";Object.defineProperty(mu,"__esModule",{value:!0});mu.GoogleToken=void 0;var BE=fu(require("fs")),Hk=_t(),Gk=fu(Bd()),Wk=fu(require("path")),Zk=require("util");function fu(t,e){if(typeof WeakMap=="function")var r=new WeakMap,n=new WeakMap;return(fu=o(function(u,c){if(!c&&u&&u.__esModule)return u;var l,p,f={__proto__:null,default:u};if(u===null||an(u)!="object"&&typeof u!="function")return f;if(l=c?n:r){if(l.has(u))return l.get(u);l.set(u,f)}for(var m in u)m!=="default"&&{}.hasOwnProperty.call(u,m)&&((p=(l=Object.defineProperty)&&Object.getOwnPropertyDescriptor(u,m))&&(p.get||p.set)?l(f,m,p):f[m]=u[m]);return f},"_interopRequireWildcard"))(t,e)}o(fu,"_interopRequireWildcard");function an(t){"@babel/helpers - typeof";return an=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},an(t)}o(an,"_typeof");function Jk(t,e){QE(t,e),e.add(t)}o(Jk,"_classPrivateMethodInitSpec");function Kk(t,e,r){QE(t,e),e.set(t,r)}o(Kk,"_classPrivateFieldInitSpec");function QE(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}o(QE,"_checkPrivateRedeclaration");function qE(t,e,r){return t.set(Sr(t,e),r),r}o(qE,"_classPrivateFieldSet");function VE(t,e){return t.get(Sr(t,e))}o(VE,"_classPrivateFieldGet");function Sr(t,e,r){if(typeof t=="function"?t===e:t.has(e))return arguments.length<3?e:r;throw new TypeError("Private element is not present on this object")}o(Sr,"_assertClassBrand");function HE(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,eP(n.key),n)}}o(HE,"_defineProperties");function YE(t,e,r){return e&&HE(t.prototype,e),r&&HE(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}o(YE,"_createClass");function XE(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}o(XE,"_classCallCheck");function Qk(t,e,r){return e=ca(e),Yk(t,Zd()?Reflect.construct(e,r||[],ca(t).constructor):e.apply(t,r))}o(Qk,"_callSuper");function Yk(t,e){if(e&&(an(e)=="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Xk(t)}o(Yk,"_possibleConstructorReturn");function Xk(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}o(Xk,"_assertThisInitialized");function e0(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ua(t,e)}o(e0,"_inherits");function qd(t){var e=typeof Map=="function"?new Map:void 0;return qd=o(function(n){if(n===null||!r0(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(e!==void 0){if(e.has(n))return e.get(n);e.set(n,i)}function i(){return t0(n,arguments,ca(this).constructor)}return o(i,"Wrapper"),i.prototype=Object.create(n.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),ua(i,n)},"_wrapNativeSuper"),qd(t)}o(qd,"_wrapNativeSuper");function t0(t,e,r){if(Zd())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,e);var i=new(t.bind.apply(t,n));return r&&ua(i,r.prototype),i}o(t0,"_construct");function Zd(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Zd=o(function(){return!!t},"_isNativeReflectConstruct"))()}o(Zd,"_isNativeReflectConstruct");function r0(t){try{return Function.toString.call(t).indexOf("[native code]")!==-1}catch{return typeof t=="function"}}o(r0,"_isNativeFunction");function ua(t,e){return ua=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},ua(t,e)}o(ua,"_setPrototypeOf");function ca(t){return ca=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ca(t)}o(ca,"_getPrototypeOf");function Jt(t,e,r){return(e=eP(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}o(Jt,"_defineProperty");function eP(t){var e=n0(t,"string");return an(e)=="symbol"?e:e+""}o(eP,"_toPropertyKey");function n0(t,e){if(an(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(an(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}o(n0,"_toPrimitive");function Qt(){var t,e,r=typeof Symbol=="function"?Symbol:{},n=r.iterator||"@@iterator",i=r.toStringTag||"@@toStringTag";function u(h,b,T,E){var w=b&&b.prototype instanceof l?b:l,k=Object.create(w.prototype);return Kt(k,"_invoke",(function(q,W,H){var V,J,re,G=0,je=H||[],Ee=!1,ve={p:0,n:0,v:t,a:ze,f:ze.bind(t,4),d:o(function(Ue,He){return V=Ue,J=0,re=t,ve.n=He,c},"d")};function ze($e,Ue){for(J=$e,re=Ue,e=0;!Ee&&G&&!He&&e<je.length;e++){var He,Ke=je[e],Ut=ve.p,Pt=Ke[2];$e>3?(He=Pt===Ue)&&(re=Ke[(J=Ke[4])?5:(J=3,3)],Ke[4]=Ke[5]=t):Ke[0]<=Ut&&((He=$e<2&&Ut<Ke[1])?(J=0,ve.v=Ue,ve.n=Ke[1]):Ut<Pt&&(He=$e<3||Ke[0]>Ue||Ue>Pt)&&(Ke[4]=$e,Ke[5]=Ue,ve.n=Pt,J=0))}if(He||$e>1)return c;throw Ee=!0,Ue}return o(ze,"d"),function($e,Ue,He){if(G>1)throw TypeError("Generator is already running");for(Ee&&Ue===1&&ze(Ue,He),J=Ue,re=He;(e=J<2?t:re)||!Ee;){V||(J?J<3?(J>1&&(ve.n=-1),ze(J,re)):ve.n=re:ve.v=re);try{if(G=2,V){if(J||($e="next"),e=V[$e]){if(!(e=e.call(V,re)))throw TypeError("iterator result is not an object");if(!e.done)return e;re=e.value,J<2&&(J=0)}else J===1&&(e=V.return)&&e.call(V),J<2&&(re=TypeError("The iterator does not provide a '"+$e+"' method"),J=1);V=t}else if((e=(Ee=ve.n<0)?re:q.call(W,ve))!==c)break}catch(Ke){V=t,J=1,re=Ke}finally{G=1}}return{value:e,done:Ee}}})(h,T,E),!0),k}o(u,"i");var c={};function l(){}o(l,"Generator");function p(){}o(p,"GeneratorFunction");function f(){}o(f,"GeneratorFunctionPrototype"),e=Object.getPrototypeOf;var m=[][n]?e(e([][n]())):(Kt(e={},n,function(){return this}),e),y=f.prototype=l.prototype=Object.create(m);function P(h){return Object.setPrototypeOf?Object.setPrototypeOf(h,f):(h.__proto__=f,Kt(h,i,"GeneratorFunction")),h.prototype=Object.create(y),h}return o(P,"f"),p.prototype=f,Kt(y,"constructor",f),Kt(f,"constructor",p),p.displayName="GeneratorFunction",Kt(f,i,"GeneratorFunction"),Kt(y),Kt(y,i,"Generator"),Kt(y,n,function(){return this}),Kt(y,"toString",function(){return"[object Generator]"}),(Qt=o(function(){return{w:u,m:P}},"_regenerator"))()}o(Qt,"_regenerator");function Kt(t,e,r,n){var i=Object.defineProperty;try{i({},"",{})}catch{i=0}Kt=o(function(c,l,p,f){if(l)i?i(c,l,{value:p,enumerable:!f,configurable:!f,writable:!f}):c[l]=p;else{var m=o(function(P,h){Kt(c,P,function(b){return this._invoke(P,h,b)})},"o");m("next",0),m("throw",1),m("return",2)}},"_regeneratorDefine"),Kt(t,e,r,n)}o(Kt,"_regeneratorDefine2");function GE(t,e,r,n,i,u,c){try{var l=t[u](c),p=l.value}catch(f){return void r(f)}l.done?e(p):Promise.resolve(p).then(n,i)}o(GE,"asyncGeneratorStep");function Jo(t){return function(){var e=this,r=arguments;return new Promise(function(n,i){var u=t.apply(e,r);function c(p){GE(u,n,i,c,l,"next",p)}o(c,"_next");function l(p){GE(u,n,i,c,l,"throw",p)}o(l,"_throw"),c(void 0)})}}o(Jo,"_asyncToGenerator");var WE=BE.readFile?(0,Zk.promisify)(BE.readFile):Jo(Qt().m(o(function t(){return Qt().w(function(e){for(;;)switch(e.n){case 0:throw new sa("use key rather than keyFile.","MISSING_CREDENTIALS");case 1:return e.a(2)}},t)},"_callee"))),ZE="https://oauth2.googleapis.com/token",o0="https://oauth2.googleapis.com/revoke?token=",sa=(function(t){function e(r,n){var i;return XE(this,e),i=Qk(this,e,[r]),Jt(i,"code",void 0),i.code=n,i}return o(e,"ErrorWithCode"),e0(e,t),YE(e)})(qd(Error)),aa=new WeakMap,Ur=new WeakSet,U3=mu.GoogleToken=(function(){function t(e){XE(this,t),Jk(this,Ur),Jt(this,"expiresAt",void 0),Jt(this,"key",void 0),Jt(this,"keyFile",void 0),Jt(this,"iss",void 0),Jt(this,"sub",void 0),Jt(this,"scope",void 0),Jt(this,"rawToken",void 0),Jt(this,"tokenExpires",void 0),Jt(this,"email",void 0),Jt(this,"additionalClaims",void 0),Jt(this,"eagerRefreshThresholdMillis",void 0),Jt(this,"transporter",{request:o(function(n){return(0,Hk.request)(n)},"request")}),Kk(this,aa,void 0),Sr(Ur,this,tP).call(this,e)}return o(t,"GoogleToken"),YE(t,[{key:"accessToken",get:o(function(){return this.rawToken?this.rawToken.access_token:void 0},"get")},{key:"idToken",get:o(function(){return this.rawToken?this.rawToken.id_token:void 0},"get")},{key:"tokenType",get:o(function(){return this.rawToken?this.rawToken.token_type:void 0},"get")},{key:"refreshToken",get:o(function(){return this.rawToken?this.rawToken.refresh_token:void 0},"get")},{key:"hasExpired",value:o(function(){var r=new Date().getTime();return this.rawToken&&this.expiresAt?r>=this.expiresAt:!0},"hasExpired")},{key:"isTokenExpiring",value:o(function(){var r,n=new Date().getTime(),i=(r=this.eagerRefreshThresholdMillis)!==null&&r!==void 0?r:0;return this.rawToken&&this.expiresAt?this.expiresAt<=n+i:!0},"isTokenExpiring")},{key:"getToken",value:o(function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(an(r)==="object"&&(n=r,r=void 0),n=Object.assign({forceRefresh:!1},n),r){var i=r;Sr(Ur,this,JE).call(this,n).then(function(u){return i(null,u)},r);return}return Sr(Ur,this,JE).call(this,n)},"getToken")},{key:"getCredentials",value:(function(){var e=Jo(Qt().m(o(function n(i){var u,c,l,p,f,m,y;return Qt().w(function(P){for(;;)switch(P.n){case 0:u=Wk.extname(i),y=u,P.n=y===".json"?1:y===".der"||y===".crt"||y===".pem"?4:y===".p12"||y===".pfx"?6:7;break;case 1:return P.n=2,WE(i,"utf8");case 2:if(c=P.v,l=JSON.parse(c),p=l.private_key,f=l.client_email,!(!p||!f)){P.n=3;break}throw new sa("private_key and client_email are required.","MISSING_CREDENTIALS");case 3:return P.a(2,{privateKey:p,clientEmail:f});case 4:return P.n=5,WE(i,"utf8");case 5:return m=P.v,P.a(2,{privateKey:m});case 6:throw new sa("*.p12 certificates are not supported after v6.1.2. Consider utilizing *.json format or converting *.p12 to *.pem using the OpenSSL CLI.","UNKNOWN_CERTIFICATE_TYPE");case 7:throw new sa("Unknown certificate type. Type is determined based on file extension. Current supported extensions are *.json, and *.pem.","UNKNOWN_CERTIFICATE_TYPE");case 8:return P.a(2)}},n)},"_callee2")));function r(n){return e.apply(this,arguments)}return o(r,"getCredentials"),r})()},{key:"revokeToken",value:o(function(r){if(r){Sr(Ur,this,KE).call(this).then(function(){return r()},r);return}return Sr(Ur,this,KE).call(this)},"revokeToken")}])})();function JE(t){return Vd.apply(this,arguments)}o(JE,"_getTokenAsync");function Vd(){return Vd=Jo(Qt().m(o(function t(e){return Qt().w(function(r){for(;;)switch(r.n){case 0:if(!(VE(aa,this)&&!e.forceRefresh)){r.n=1;break}return r.a(2,VE(aa,this));case 1:return r.p=1,r.n=2,qE(aa,this,Sr(Ur,this,i0).call(this,e));case 2:return r.a(2,r.v);case 3:return r.p=3,qE(aa,this,void 0),r.f(3);case 4:return r.a(2)}},t,this,[[1,,3,4]])},"_callee3"))),Vd.apply(this,arguments)}o(Vd,"_getTokenAsync2");function i0(t){return Hd.apply(this,arguments)}o(i0,"_getTokenAsyncInner");function Hd(){return Hd=Jo(Qt().m(o(function t(e){var r;return Qt().w(function(n){for(;;)switch(n.n){case 0:if(!(this.isTokenExpiring()===!1&&e.forceRefresh===!1)){n.n=1;break}return n.a(2,Promise.resolve(this.rawToken));case 1:if(!(!this.key&&!this.keyFile)){n.n=2;break}throw new Error("No key or keyFile set.");case 2:if(!(!this.key&&this.keyFile)){n.n=4;break}return n.n=3,this.getCredentials(this.keyFile);case 3:r=n.v,this.key=r.privateKey,this.iss=r.clientEmail||this.iss,r.clientEmail||Sr(Ur,this,a0).call(this);case 4:return n.a(2,Sr(Ur,this,s0).call(this))}},t,this)},"_callee4"))),Hd.apply(this,arguments)}o(Hd,"_getTokenAsyncInner2");function a0(){if(!this.iss)throw new sa("email is required.","MISSING_CREDENTIALS")}o(a0,"_ensureEmail");function KE(){return Gd.apply(this,arguments)}o(KE,"_revokeTokenAsync");function Gd(){return Gd=Jo(Qt().m(o(function t(){var e;return Qt().w(function(r){for(;;)switch(r.n){case 0:if(this.accessToken){r.n=1;break}throw new Error("No token to revoke.");case 1:return e=o0+this.accessToken,r.n=2,this.transporter.request({url:e,retry:!0});case 2:Sr(Ur,this,tP).call(this,{email:this.iss,sub:this.sub,key:this.key,keyFile:this.keyFile,scope:this.scope,additionalClaims:this.additionalClaims});case 3:return r.a(2)}},t,this)},"_callee5"))),Gd.apply(this,arguments)}o(Gd,"_revokeTokenAsync2");function tP(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.keyFile=t.keyFile,this.key=t.key,this.rawToken=void 0,this.iss=t.email||t.iss,this.sub=t.sub,this.additionalClaims=t.additionalClaims,an(t.scope)==="object"?this.scope=t.scope.join(" "):this.scope=t.scope,this.eagerRefreshThresholdMillis=t.eagerRefreshThresholdMillis,t.transporter&&(this.transporter=t.transporter)}o(tP,"_configure");function s0(){return Wd.apply(this,arguments)}o(s0,"_requestToken");function Wd(){return Wd=Jo(Qt().m(o(function t(){var e,r,n,i,u,c,l,p,f,m;return Qt().w(function(y){for(;;)switch(y.n){case 0:return e=Math.floor(new Date().getTime()/1e3),r=this.additionalClaims||{},n=Object.assign({iss:this.iss,scope:this.scope,aud:ZE,exp:e+3600,iat:e,sub:this.sub},r),i=Gk.sign({header:{alg:"RS256"},payload:n,secret:this.key}),y.p=1,y.n=2,this.transporter.request({method:"POST",url:ZE,data:new URLSearchParams({grant_type:"urn:ietf:params:oauth:grant-type:jwt-bearer",assertion:i}),responseType:"json",retryConfig:{httpMethodsToRetry:["POST"]}});case 2:return u=y.v,this.rawToken=u.data,this.expiresAt=u.data.expires_in===null||u.data.expires_in===void 0?void 0:(e+u.data.expires_in)*1e3,y.a(2,this.rawToken);case 3:throw y.p=3,m=y.v,this.rawToken=void 0,this.tokenExpires=void 0,p=m.response&&(c=m.response)!==null&&c!==void 0&&c.data?(l=m.response)===null||l===void 0?void 0:l.data:{},p.error&&(f=p.error_description?": ".concat(p.error_description):"",m.message="".concat(p.error).concat(f)),m;case 4:return y.a(2)}},t,this,[[1,3]])},"_callee6"))),Wd.apply(this,arguments)}o(Wd,"_requestToken2")});var Kd=L(hu=>{"use strict";Object.defineProperty(hu,"__esModule",{value:!0});hu.JWTAccess=void 0;var u0=Bd(),c0=vr(),nP={alg:"RS256",typ:"JWT"},Jd=class t{static{o(this,"JWTAccess")}email;key;keyId;projectId;eagerRefreshThresholdMillis;cache=new c0.LRUCache({capacity:500,maxAge:3600*1e3});constructor(e,r,n,i){this.email=e,this.key=r,this.keyId=n,this.eagerRefreshThresholdMillis=i??300*1e3}getCachedKey(e,r){let n=e;if(r&&Array.isArray(r)&&r.length?n=e?`${e}_${r.join("_")}`:`${r.join("_")}`:typeof r=="string"&&(n=e?`${e}_${r}`:r),!n)throw Error("Scopes or url must be provided");return n}getRequestHeaders(e,r,n){let i=this.getCachedKey(e,n),u=this.cache.get(i),c=Date.now();if(u&&u.expiration-c>this.eagerRefreshThresholdMillis)return new Headers(u.headers);let l=Math.floor(Date.now()/1e3),p=t.getExpirationTime(l),f;if(Array.isArray(n)&&(n=n.join(" ")),n?f={iss:this.email,sub:this.email,scope:n,exp:p,iat:l}:f={iss:this.email,sub:this.email,aud:e,exp:p,iat:l},r){for(let b in f)if(r[b])throw new Error(`The '${b}' property is not allowed when passing additionalClaims. This claim is included in the JWT by default.`)}let m=this.keyId?{...nP,kid:this.keyId}:nP,y=Object.assign(f,r),P=u0.sign({header:m,payload:y,secret:this.key}),h=new Headers({authorization:`Bearer ${P}`});return this.cache.set(i,{expiration:p*1e3,headers:h}),h}static getExpirationTime(e){return e+3600}fromJSON(e){if(!e)throw new Error("Must pass in a JSON object containing the service account auth settings.");if(!e.client_email)throw new Error("The incoming JSON object does not contain a client_email field");if(!e.private_key)throw new Error("The incoming JSON object does not contain a private_key field");this.email=e.client_email,this.key=e.private_key,this.keyId=e.private_key_id,this.projectId=e.project_id}fromStream(e,r){if(r)this.fromStreamAsync(e).then(()=>r(),r);else return this.fromStreamAsync(e)}fromStreamAsync(e){return new Promise((r,n)=>{e||n(new Error("Must pass in a stream containing the service account auth settings."));let i="";e.setEncoding("utf8").on("data",u=>i+=u).on("error",n).on("end",()=>{try{let u=JSON.parse(i);this.fromJSON(u),r()}catch(u){n(u)}})})}};hu.JWTAccess=Jd});var Yd=L(yu=>{"use strict";Object.defineProperty(yu,"__esModule",{value:!0});yu.JWT=void 0;var oP=rP(),l0=Kd(),d0=eo(),gu=Zt(),Qd=class t extends d0.OAuth2Client{static{o(this,"JWT")}email;keyFile;key;keyId;defaultScopes;scopes;scope;subject;gtoken;additionalClaims;useJWTAccessWithScope;defaultServicePath;access;constructor(e={}){super(e),this.email=e.email,this.keyFile=e.keyFile,this.key=e.key,this.keyId=e.keyId,this.scopes=e.scopes,this.subject=e.subject,this.additionalClaims=e.additionalClaims,this.credentials={refresh_token:"jwt-placeholder",expiry_date:1}}createScoped(e){let r=new t(this);return r.scopes=e,r}async getRequestMetadataAsync(e){e=this.defaultServicePath?`https://${this.defaultServicePath}/`:e;let r=!this.hasUserScopes()&&e||this.useJWTAccessWithScope&&this.hasAnyScopes()||this.universeDomain!==gu.DEFAULT_UNIVERSE;if(this.subject&&this.universeDomain!==gu.DEFAULT_UNIVERSE)throw new RangeError(`Service Account user is configured for the credential. Domain-wide delegation is not supported in universes other than ${gu.DEFAULT_UNIVERSE}`);if(!this.apiKey&&r)if(this.additionalClaims&&this.additionalClaims.target_audience){let{tokens:n}=await this.refreshToken();return{headers:this.addSharedMetadataHeaders(new Headers({authorization:`Bearer ${n.id_token}`}))}}else{this.access||(this.access=new l0.JWTAccess(this.email,this.key,this.keyId,this.eagerRefreshThresholdMillis));let n;this.hasUserScopes()?n=this.scopes:e||(n=this.defaultScopes);let i=this.useJWTAccessWithScope||this.universeDomain!==gu.DEFAULT_UNIVERSE,u=await this.access.getRequestHeaders(e??void 0,this.additionalClaims,i?n:void 0);return{headers:this.addSharedMetadataHeaders(u)}}else return this.hasAnyScopes()||this.apiKey?super.getRequestMetadataAsync(e):{headers:new Headers}}async fetchIdToken(e){let r=new oP.GoogleToken({iss:this.email,sub:this.subject,scope:this.scopes||this.defaultScopes,keyFile:this.keyFile,key:this.key,additionalClaims:{target_audience:e},transporter:this.transporter});if(await r.getToken({forceRefresh:!0}),!r.idToken)throw new Error("Unknown error: Failed to fetch ID token");return r.idToken}hasUserScopes(){return this.scopes?this.scopes.length>0:!1}hasAnyScopes(){return!!(this.scopes&&this.scopes.length>0||this.defaultScopes&&this.defaultScopes.length>0)}authorize(e){if(e)this.authorizeAsync().then(r=>e(null,r),e);else return this.authorizeAsync()}async authorizeAsync(){let e=await this.refreshToken();if(!e)throw new Error("No result returned");return this.credentials=e.tokens,this.credentials.refresh_token="jwt-placeholder",this.key=this.gtoken.key,this.email=this.gtoken.iss,e.tokens}async refreshTokenNoCache(){let e=this.createGToken(),n={access_token:(await e.getToken({forceRefresh:this.isTokenExpiring()})).access_token,token_type:"Bearer",expiry_date:e.expiresAt,id_token:e.idToken};return this.emit("tokens",n),{res:null,tokens:n}}createGToken(){return this.gtoken||(this.gtoken=new oP.GoogleToken({iss:this.email,sub:this.subject,scope:this.scopes||this.defaultScopes,keyFile:this.keyFile,key:this.key,additionalClaims:this.additionalClaims,transporter:this.transporter})),this.gtoken}fromJSON(e){if(!e)throw new Error("Must pass in a JSON object containing the service account auth settings.");if(!e.client_email)throw new Error("The incoming JSON object does not contain a client_email field");if(!e.private_key)throw new Error("The incoming JSON object does not contain a private_key field");this.email=e.client_email,this.key=e.private_key,this.keyId=e.private_key_id,this.projectId=e.project_id,this.quotaProjectId=e.quota_project_id,this.universeDomain=e.universe_domain||this.universeDomain}fromStream(e,r){if(r)this.fromStreamAsync(e).then(()=>r(),r);else return this.fromStreamAsync(e)}fromStreamAsync(e){return new Promise((r,n)=>{if(!e)throw new Error("Must pass in a stream containing the service account auth settings.");let i="";e.setEncoding("utf8").on("error",n).on("data",u=>i+=u).on("end",()=>{try{let u=JSON.parse(i);this.fromJSON(u),r()}catch(u){n(u)}})})}fromAPIKey(e){if(typeof e!="string")throw new Error("Must provide an API Key string.");this.apiKey=e}async getCredentials(){if(this.key)return{private_key:this.key,client_email:this.email};if(this.keyFile){let r=await this.createGToken().getCredentials(this.keyFile);return{private_key:r.privateKey,client_email:r.clientEmail}}throw new Error("A key or a keyFile must be provided to getCredentials.")}};yu.JWT=Qd});var ep=L(Ko=>{"use strict";Object.defineProperty(Ko,"__esModule",{value:!0});Ko.UserRefreshClient=Ko.USER_REFRESH_ACCOUNT_TYPE=void 0;var p0=eo(),f0=Zt();Ko.USER_REFRESH_ACCOUNT_TYPE="authorized_user";var Xd=class t extends p0.OAuth2Client{static{o(this,"UserRefreshClient")}_refreshToken;constructor(e,r,n,i,u){let c=e&&typeof e=="object"?e:{clientId:e,clientSecret:r,refreshToken:n,eagerRefreshThresholdMillis:i,forceRefreshOnFailure:u};super(c),this._refreshToken=c.refreshToken,this.credentials.refresh_token=c.refreshToken}async refreshTokenNoCache(){return super.refreshTokenNoCache(this._refreshToken)}async fetchIdToken(e){let r={...t.RETRY_CONFIG,url:this.endpoints.oauth2TokenUrl,method:"POST",data:new URLSearchParams({client_id:this._clientId,client_secret:this._clientSecret,grant_type:"refresh_token",refresh_token:this._refreshToken,target_audience:e})};return f0.AuthClient.setMethodName(r,"fetchIdToken"),(await this.transporter.request(r)).data.id_token}fromJSON(e){if(!e)throw new Error("Must pass in a JSON object containing the user refresh token");if(e.type!=="authorized_user")throw new Error('The incoming JSON object does not have the "authorized_user" type');if(!e.client_id)throw new Error("The incoming JSON object does not contain a client_id field");if(!e.client_secret)throw new Error("The incoming JSON object does not contain a client_secret field");if(!e.refresh_token)throw new Error("The incoming JSON object does not contain a refresh_token field");this._clientId=e.client_id,this._clientSecret=e.client_secret,this._refreshToken=e.refresh_token,this.credentials.refresh_token=e.refresh_token,this.quotaProjectId=e.quota_project_id,this.universeDomain=e.universe_domain||this.universeDomain}fromStream(e,r){if(r)this.fromStreamAsync(e).then(()=>r(),r);else return this.fromStreamAsync(e)}async fromStreamAsync(e){return new Promise((r,n)=>{if(!e)return n(new Error("Must pass in a stream containing the user refresh token."));let i="";e.setEncoding("utf8").on("error",n).on("data",u=>i+=u).on("end",()=>{try{let u=JSON.parse(i);return this.fromJSON(u),r()}catch(u){return n(u)}})})}static fromJSON(e){let r=new t;return r.fromJSON(e),r}};Ko.UserRefreshClient=Xd});var rp=L(Qo=>{"use strict";Object.defineProperty(Qo,"__esModule",{value:!0});Qo.Impersonated=Qo.IMPERSONATED_ACCOUNT_TYPE=void 0;var iP=eo(),m0=_t(),h0=vr();Qo.IMPERSONATED_ACCOUNT_TYPE="impersonated_service_account";var tp=class t extends iP.OAuth2Client{static{o(this,"Impersonated")}sourceClient;targetPrincipal;targetScopes;delegates;lifetime;endpoint;constructor(e={}){if(super(e),this.credentials={expiry_date:1,refresh_token:"impersonated-placeholder"},this.sourceClient=e.sourceClient??new iP.OAuth2Client,this.targetPrincipal=e.targetPrincipal??"",this.delegates=e.delegates??[],this.targetScopes=e.targetScopes??[],this.lifetime=e.lifetime??3600,!!!(0,h0.originalOrCamelOptions)(e).get("universe_domain"))this.universeDomain=this.sourceClient.universeDomain;else if(this.sourceClient.universeDomain!==this.universeDomain)throw new RangeError(`Universe domain ${this.sourceClient.universeDomain} in source credentials does not match ${this.universeDomain} universe domain set for impersonated credentials.`);this.endpoint=e.endpoint??`https://iamcredentials.${this.universeDomain}`}async sign(e){await this.sourceClient.getAccessToken();let r=`projects/-/serviceAccounts/${this.targetPrincipal}`,n=`${this.endpoint}/v1/${r}:signBlob`,i={delegates:this.delegates,payload:Buffer.from(e).toString("base64")};return(await this.sourceClient.request({...t.RETRY_CONFIG,url:n,data:i,method:"POST"})).data}getTargetPrincipal(){return this.targetPrincipal}async refreshToken(){try{await this.sourceClient.getAccessToken();let e="projects/-/serviceAccounts/"+this.targetPrincipal,r=`${this.endpoint}/v1/${e}:generateAccessToken`,n={delegates:this.delegates,scope:this.targetScopes,lifetime:this.lifetime+"s"},i=await this.sourceClient.request({...t.RETRY_CONFIG,url:r,data:n,method:"POST"}),u=i.data;return this.credentials.access_token=u.accessToken,this.credentials.expiry_date=Date.parse(u.expireTime),{tokens:this.credentials,res:i}}catch(e){if(!(e instanceof Error))throw e;let r=0,n="";throw e instanceof m0.GaxiosError&&(r=e?.response?.data?.error?.status,n=e?.response?.data?.error?.message),r&&n?(e.message=`${r}: unable to impersonate: ${n}`,e):(e.message=`unable to impersonate: ${e}`,e)}}async fetchIdToken(e,r){await this.sourceClient.getAccessToken();let n=`projects/-/serviceAccounts/${this.targetPrincipal}`,i=`${this.endpoint}/v1/${n}:generateIdToken`,u={delegates:this.delegates,audience:e,includeEmail:r?.includeEmail??!0,useEmailAzp:r?.includeEmail??!0};return(await this.sourceClient.request({...t.RETRY_CONFIG,url:i,data:u,method:"POST"})).data.token}};Qo.Impersonated=tp});var op=L(la=>{"use strict";Object.defineProperty(la,"__esModule",{value:!0});la.OAuthClientAuthHandler=void 0;la.getErrorFromOAuthErrorResponse=_0;var Yo=_t(),g0=ea(),y0=["PUT","POST","PATCH"],np=class{static{o(this,"OAuthClientAuthHandler")}#e=(0,g0.createCrypto)();#t;transporter;constructor(e){e&&"clientId"in e?(this.#t=e,this.transporter=new Yo.Gaxios):(this.#t=e?.clientAuthentication,this.transporter=e?.transporter||new Yo.Gaxios)}applyClientAuthenticationOptions(e,r){e.headers=Yo.Gaxios.mergeHeaders(e.headers),this.injectAuthenticatedHeaders(e,r),r||this.injectAuthenticatedRequestBody(e)}injectAuthenticatedHeaders(e,r){if(r)e.headers=Yo.Gaxios.mergeHeaders(e.headers,{authorization:`Bearer ${r}`});else if(this.#t?.confidentialClientType==="basic"){e.headers=Yo.Gaxios.mergeHeaders(e.headers);let n=this.#t.clientId,i=this.#t.clientSecret||"",u=this.#e.encodeBase64StringUtf8(`${n}:${i}`);Yo.Gaxios.mergeHeaders(e.headers,{authorization:`Basic ${u}`})}}injectAuthenticatedRequestBody(e){if(this.#t?.confidentialClientType==="request-body"){let r=(e.method||"GET").toUpperCase();if(!y0.includes(r))throw new Error(`${r} HTTP method does not support ${this.#t.confidentialClientType} client authentication`);let i=new Headers(e.headers).get("content-type");if(i?.startsWith("application/x-www-form-urlencoded")||e.data instanceof URLSearchParams){let u=new URLSearchParams(e.data??"");u.append("client_id",this.#t.clientId),u.append("client_secret",this.#t.clientSecret||""),e.data=u}else if(i?.startsWith("application/json"))e.data=e.data||{},Object.assign(e.data,{client_id:this.#t.clientId,client_secret:this.#t.clientSecret||""});else throw new Error(`${i} content-types are not supported with ${this.#t.confidentialClientType} client authentication`)}}static get RETRY_CONFIG(){return{retry:!0,retryConfig:{httpMethodsToRetry:["GET","PUT","POST","HEAD","OPTIONS","DELETE"]}}}};la.OAuthClientAuthHandler=np;function _0(t,e){let r=t.error,n=t.error_description,i=t.error_uri,u=`Error code ${r}`;typeof n<"u"&&(u+=`: ${n}`),typeof i<"u"&&(u+=` - ${i}`);let c=new Error(u);if(e){let l=Object.keys(e);e.stack&&l.push("stack"),l.forEach(p=>{p!=="message"&&Object.defineProperty(c,p,{value:e[p],writable:!1,enumerable:!0})})}return c}o(_0,"getErrorFromOAuthErrorResponse")});var bu=L(_u=>{"use strict";Object.defineProperty(_u,"__esModule",{value:!0});_u.StsCredentials=void 0;var b0=_t(),v0=Zt(),aP=op(),E0=vr(),ip=class t extends aP.OAuthClientAuthHandler{static{o(this,"StsCredentials")}#e;constructor(e={tokenExchangeEndpoint:""},r){(typeof e!="object"||e instanceof URL)&&(e={tokenExchangeEndpoint:e,clientAuthentication:r}),super(e),this.#e=e.tokenExchangeEndpoint}async exchangeToken(e,r,n){let i={grant_type:e.grantType,resource:e.resource,audience:e.audience,scope:e.scope?.join(" "),requested_token_type:e.requestedTokenType,subject_token:e.subjectToken,subject_token_type:e.subjectTokenType,actor_token:e.actingParty?.actorToken,actor_token_type:e.actingParty?.actorTokenType,options:n&&JSON.stringify(n)},u={...t.RETRY_CONFIG,url:this.#e.toString(),method:"POST",headers:r,data:new URLSearchParams((0,E0.removeUndefinedValuesInObject)(i))};v0.AuthClient.setMethodName(u,"exchangeToken"),this.applyClientAuthenticationOptions(u);try{let c=await this.transporter.request(u),l=c.data;return l.res=c,l}catch(c){throw c instanceof b0.GaxiosError&&c.response?(0,aP.getErrorFromOAuthErrorResponse)(c.response.data,c):c}}};_u.StsCredentials=ip});var $n=L(ur=>{"use strict";Object.defineProperty(ur,"__esModule",{value:!0});ur.BaseExternalAccountClient=ur.CLOUD_RESOURCE_MANAGER=ur.EXTERNAL_ACCOUNT_TYPE=ur.EXPIRATION_TIME_OFFSET=void 0;var P0=_t(),S0=require("stream"),ap=Zt(),T0=bu(),sP=vr(),w0=Ed(),x0="urn:ietf:params:oauth:grant-type:token-exchange",A0="urn:ietf:params:oauth:token-type:access_token",sp="https://www.googleapis.com/auth/cloud-platform",I0=3600;ur.EXPIRATION_TIME_OFFSET=300*1e3;ur.EXTERNAL_ACCOUNT_TYPE="external_account";ur.CLOUD_RESOURCE_MANAGER="https://cloudresourcemanager.googleapis.com/v1/projects/";var R0="//iam\\.googleapis\\.com/locations/[^/]+/workforcePools/[^/]+/providers/.+",C0="https://sts.{universeDomain}/v1/token",up=class t extends ap.AuthClient{static{o(this,"BaseExternalAccountClient")}scopes;projectNumber;audience;subjectTokenType;stsCredential;clientAuth;credentialSourceType;cachedAccessToken;serviceAccountImpersonationUrl;serviceAccountImpersonationLifetime;workforcePoolUserProject;configLifetimeRequested;tokenUrl;cloudResourceManagerURL;supplierContext;#e=null;constructor(e){super(e);let r=(0,sP.originalOrCamelOptions)(e),n=r.get("type");if(n&&n!==ur.EXTERNAL_ACCOUNT_TYPE)throw new Error(`Expected "${ur.EXTERNAL_ACCOUNT_TYPE}" type but received "${e.type}"`);let i=r.get("client_id"),u=r.get("client_secret");this.tokenUrl=r.get("token_url")??C0.replace("{universeDomain}",this.universeDomain);let c=r.get("subject_token_type"),l=r.get("workforce_pool_user_project"),p=r.get("service_account_impersonation_url"),f=r.get("service_account_impersonation"),m=(0,sP.originalOrCamelOptions)(f).get("token_lifetime_seconds");this.cloudResourceManagerURL=new URL(r.get("cloud_resource_manager_url")||`https://cloudresourcemanager.${this.universeDomain}/v1/projects/`),i&&(this.clientAuth={confidentialClientType:"basic",clientId:i,clientSecret:u}),this.stsCredential=new T0.StsCredentials({tokenExchangeEndpoint:this.tokenUrl,clientAuthentication:this.clientAuth}),this.scopes=r.get("scopes")||[sp],this.cachedAccessToken=null,this.audience=r.get("audience"),this.subjectTokenType=c,this.workforcePoolUserProject=l;let y=new RegExp(R0);if(this.workforcePoolUserProject&&!this.audience.match(y))throw new Error("workforcePoolUserProject should not be set for non-workforce pool credentials.");this.serviceAccountImpersonationUrl=p,this.serviceAccountImpersonationLifetime=m,this.serviceAccountImpersonationLifetime?this.configLifetimeRequested=!0:(this.configLifetimeRequested=!1,this.serviceAccountImpersonationLifetime=I0),this.projectNumber=this.getProjectNumber(this.audience),this.supplierContext={audience:this.audience,subjectTokenType:this.subjectTokenType,transporter:this.transporter}}getServiceAccountEmail(){if(this.serviceAccountImpersonationUrl){if(this.serviceAccountImpersonationUrl.length>256)throw new RangeError(`URL is too long: ${this.serviceAccountImpersonationUrl}`);return/serviceAccounts\/(?<email>[^:]+):generateAccessToken$/.exec(this.serviceAccountImpersonationUrl)?.groups?.email||null}return null}setCredentials(e){super.setCredentials(e),this.cachedAccessToken=e}async getAccessToken(){return(!this.cachedAccessToken||this.isExpired(this.cachedAccessToken))&&await this.refreshAccessTokenAsync(),{token:this.cachedAccessToken.access_token,res:this.cachedAccessToken.res}}async getRequestHeaders(){let e=await this.getAccessToken(),r=new Headers({authorization:`Bearer ${e.token}`});return this.addSharedMetadataHeaders(r)}request(e,r){if(r)this.requestAsync(e).then(n=>r(null,n),n=>r(n,n.response));else return this.requestAsync(e)}async getProjectId(){let e=this.projectNumber||this.workforcePoolUserProject;if(this.projectId)return this.projectId;if(e){let r=await this.getRequestHeaders(),n={...t.RETRY_CONFIG,headers:r,url:`${this.cloudResourceManagerURL.toString()}${e}`};ap.AuthClient.setMethodName(n,"getProjectId");let i=await this.transporter.request(n);return this.projectId=i.data.projectId,this.projectId}return null}async requestAsync(e,r=!1){let n;try{let i=await this.getRequestHeaders();e.headers=P0.Gaxios.mergeHeaders(e.headers),this.addUserProjectAndAuthHeaders(e.headers,i),n=await this.transporter.request(e)}catch(i){let u=i.response;if(u){let c=u.status,l=u.config.data instanceof S0.Readable;if(!r&&(c===401||c===403)&&!l&&this.forceRefreshOnFailure)return await this.refreshAccessTokenAsync(),await this.requestAsync(e,!0)}throw i}return n}async refreshAccessTokenAsync(){this.#e=this.#e||this.#t();try{return await this.#e}finally{this.#e=null}}async#t(){let e=await this.retrieveSubjectToken(),r={grantType:x0,audience:this.audience,requestedTokenType:A0,subjectToken:e,subjectTokenType:this.subjectTokenType,scope:this.serviceAccountImpersonationUrl?[sp]:this.getScopesArray()},n=!this.clientAuth&&this.workforcePoolUserProject?{userProject:this.workforcePoolUserProject}:void 0,i=new Headers({"x-goog-api-client":this.getMetricsHeaderValue()}),u=await this.stsCredential.exchangeToken(r,i,n);return this.serviceAccountImpersonationUrl?this.cachedAccessToken=await this.getImpersonatedAccessToken(u.access_token):u.expires_in?this.cachedAccessToken={access_token:u.access_token,expiry_date:new Date().getTime()+u.expires_in*1e3,res:u.res}:this.cachedAccessToken={access_token:u.access_token,res:u.res},this.credentials={},Object.assign(this.credentials,this.cachedAccessToken),delete this.credentials.res,this.emit("tokens",{refresh_token:null,expiry_date:this.cachedAccessToken.expiry_date,access_token:this.cachedAccessToken.access_token,token_type:"Bearer",id_token:null}),this.cachedAccessToken}getProjectNumber(e){let r=e.match(/\/projects\/([^/]+)/);return r?r[1]:null}async getImpersonatedAccessToken(e){let r={...t.RETRY_CONFIG,url:this.serviceAccountImpersonationUrl,method:"POST",headers:{"content-type":"application/json",authorization:`Bearer ${e}`},data:{scope:this.getScopesArray(),lifetime:this.serviceAccountImpersonationLifetime+"s"}};ap.AuthClient.setMethodName(r,"getImpersonatedAccessToken");let n=await this.transporter.request(r),i=n.data;return{access_token:i.accessToken,expiry_date:new Date(i.expireTime).getTime(),res:n}}isExpired(e){let r=new Date().getTime();return e.expiry_date?r>=e.expiry_date-this.eagerRefreshThresholdMillis:!1}getScopesArray(){return typeof this.scopes=="string"?[this.scopes]:this.scopes||[sp]}getMetricsHeaderValue(){let e=process.version.replace(/^v/,""),r=this.serviceAccountImpersonationUrl!==void 0,n=this.credentialSourceType?this.credentialSourceType:"unknown";return`gl-node/${e} auth/${w0.pkg.version} google-byoid-sdk source/${n} sa-impersonation/${r} config-lifetime/${this.configLifetimeRequested}`}getTokenUrl(){return this.tokenUrl}};ur.BaseExternalAccountClient=up});var uP=L(vu=>{"use strict";Object.defineProperty(vu,"__esModule",{value:!0});vu.FileSubjectTokenSupplier=void 0;var lp=require("util"),dp=require("fs"),O0=(0,lp.promisify)(dp.readFile??(()=>{})),k0=(0,lp.promisify)(dp.realpath??(()=>{})),$0=(0,lp.promisify)(dp.lstat??(()=>{})),cp=class{static{o(this,"FileSubjectTokenSupplier")}filePath;formatType;subjectTokenFieldName;constructor(e){this.filePath=e.filePath,this.formatType=e.formatType,this.subjectTokenFieldName=e.subjectTokenFieldName}async getSubjectToken(){let e=this.filePath;try{if(e=await k0(e),!(await $0(e)).isFile())throw new Error}catch(i){throw i instanceof Error&&(i.message=`The file at ${e} does not exist, or it is not a file. ${i.message}`),i}let r,n=await O0(e,{encoding:"utf8"});if(this.formatType==="text"?r=n:this.formatType==="json"&&this.subjectTokenFieldName&&(r=JSON.parse(n)[this.subjectTokenFieldName]),!r)throw new Error("Unable to parse the subject_token from the credential_source file");return r}};vu.FileSubjectTokenSupplier=cp});var cP=L(Eu=>{"use strict";Object.defineProperty(Eu,"__esModule",{value:!0});Eu.UrlSubjectTokenSupplier=void 0;var z0=Zt(),pp=class{static{o(this,"UrlSubjectTokenSupplier")}url;headers;formatType;subjectTokenFieldName;additionalGaxiosOptions;constructor(e){this.url=e.url,this.formatType=e.formatType,this.subjectTokenFieldName=e.subjectTokenFieldName,this.headers=e.headers,this.additionalGaxiosOptions=e.additionalGaxiosOptions}async getSubjectToken(e){let r={...this.additionalGaxiosOptions,url:this.url,method:"GET",headers:this.headers};z0.AuthClient.setMethodName(r,"getSubjectToken");let n;if(this.formatType==="text"?n=(await e.transporter.request(r)).data:this.formatType==="json"&&this.subjectTokenFieldName&&(n=(await e.transporter.request(r)).data[this.subjectTokenFieldName]),!n)throw new Error("Unable to parse the subject_token from the credential_source URL");return n}};Eu.UrlSubjectTokenSupplier=pp});var lP=L(Yt=>{"use strict";Object.defineProperty(Yt,"__esModule",{value:!0});Yt.CertificateSubjectTokenSupplier=Yt.InvalidConfigurationError=Yt.CertificateSourceUnavailableError=Yt.CERTIFICATE_CONFIGURATION_ENV_VARIABLE=void 0;var Pu=vr(),Su=require("fs"),Tu=require("crypto"),N0=require("https");Yt.CERTIFICATE_CONFIGURATION_ENV_VARIABLE="GOOGLE_API_CERTIFICATE_CONFIG";var jr=class extends Error{static{o(this,"CertificateSourceUnavailableError")}constructor(e){super(e),this.name="CertificateSourceUnavailableError"}};Yt.CertificateSourceUnavailableError=jr;var cr=class extends Error{static{o(this,"InvalidConfigurationError")}constructor(e){super(e),this.name="InvalidConfigurationError"}};Yt.InvalidConfigurationError=cr;var fp=class{static{o(this,"CertificateSubjectTokenSupplier")}certificateConfigPath;trustChainPath;cert;key;constructor(e){if(!e.useDefaultCertificateConfig&&!e.certificateConfigLocation)throw new cr("Either `useDefaultCertificateConfig` must be true or a `certificateConfigLocation` must be provided.");if(e.useDefaultCertificateConfig&&e.certificateConfigLocation)throw new cr("Both `useDefaultCertificateConfig` and `certificateConfigLocation` cannot be provided.");this.trustChainPath=e.trustChainPath,this.certificateConfigPath=e.certificateConfigLocation??""}async createMtlsHttpsAgent(){if(!this.key||!this.cert)throw new cr("Cannot create mTLS Agent with missing certificate or key");return new N0.Agent({key:this.key,cert:this.cert})}async getSubjectToken(){this.certificateConfigPath=await this.#e();let{certPath:e,keyPath:r}=await this.#t();return{cert:this.cert,key:this.key}=await this.#r(e,r),await this.#n(this.cert)}async#e(){let e=this.certificateConfigPath;if(e){if(await(0,Pu.isValidFile)(e))return e;throw new jr(`Provided certificate config path is invalid: ${e}`)}let r=process.env[Yt.CERTIFICATE_CONFIGURATION_ENV_VARIABLE];if(r){if(await(0,Pu.isValidFile)(r))return r;throw new jr(`Path from environment variable "${Yt.CERTIFICATE_CONFIGURATION_ENV_VARIABLE}" is invalid: ${r}`)}let n=(0,Pu.getWellKnownCertificateConfigFileLocation)();if(await(0,Pu.isValidFile)(n))return n;throw new jr(`Could not find certificate configuration file. Searched override path, the "${Yt.CERTIFICATE_CONFIGURATION_ENV_VARIABLE}" env var, and the gcloud path (${n}).`)}async#t(){let e=this.certificateConfigPath,r;try{r=await Su.promises.readFile(e,"utf8")}catch{throw new jr(`Failed to read certificate config file at: ${e}`)}try{let n=JSON.parse(r),i=n?.cert_configs?.workload?.cert_path,u=n?.cert_configs?.workload?.key_path;if(!i||!u)throw new cr(`Certificate config file (${e}) is missing required "cert_path" or "key_path" in the workload config.`);return{certPath:i,keyPath:u}}catch(n){throw n instanceof cr?n:new cr(`Failed to parse certificate config from ${e}: ${n.message}`)}}async#r(e,r){let n,i;try{n=await Su.promises.readFile(e),new Tu.X509Certificate(n)}catch(u){let c=u instanceof Error?u.message:String(u);throw new jr(`Failed to read certificate file at ${e}: ${c}`)}try{i=await Su.promises.readFile(r),(0,Tu.createPrivateKey)(i)}catch(u){let c=u instanceof Error?u.message:String(u);throw new jr(`Failed to read private key file at ${r}: ${c}`)}return{cert:n,key:i}}async#n(e){let r=new Tu.X509Certificate(e);if(!this.trustChainPath)return JSON.stringify([r.raw.toString("base64")]);try{let u=((await Su.promises.readFile(this.trustChainPath,"utf8")).match(/-----BEGIN CERTIFICATE-----[^-]+-----END CERTIFICATE-----/g)??[]).map((p,f)=>{try{return new Tu.X509Certificate(p)}catch(m){let y=m instanceof Error?m.message:String(m);throw new cr(`Failed to parse certificate at index ${f} in trust chain file ${this.trustChainPath}: ${y}`)}}),c=u.findIndex(p=>r.raw.equals(p.raw)),l;if(c===-1)l=[r,...u];else if(c===0)l=u;else throw new cr(`Leaf certificate exists in the trust chain but is not the first entry (found at index ${c}).`);return JSON.stringify(l.map(p=>p.raw.toString("base64")))}catch(n){if(n instanceof cr)throw n;let i=n instanceof Error?n.message:String(n);throw new jr(`Failed to process certificate chain from ${this.trustChainPath}: ${i}`)}}};Yt.CertificateSubjectTokenSupplier=fp});var gp=L(wu=>{"use strict";Object.defineProperty(wu,"__esModule",{value:!0});wu.IdentityPoolClient=void 0;var D0=$n(),mp=vr(),U0=uP(),j0=cP(),dP=lP(),M0=bu(),pP=_t(),hp=class t extends D0.BaseExternalAccountClient{static{o(this,"IdentityPoolClient")}subjectTokenSupplier;constructor(e){super(e);let r=(0,mp.originalOrCamelOptions)(e),n=r.get("credential_source"),i=r.get("subject_token_supplier");if(!n&&!i)throw new Error("A credential source or subject token supplier must be specified.");if(n&&i)throw new Error("Only one of credential source or subject token supplier can be specified.");if(i)this.subjectTokenSupplier=i,this.credentialSourceType="programmatic";else{let u=(0,mp.originalOrCamelOptions)(n),c=(0,mp.originalOrCamelOptions)(u.get("format")),l=c.get("type")||"text",p=c.get("subject_token_field_name");if(l!=="json"&&l!=="text")throw new Error(`Invalid credential_source format "${l}"`);if(l==="json"&&!p)throw new Error("Missing subject_token_field_name for JSON credential_source format");let f=u.get("file"),m=u.get("url"),y=u.get("certificate"),P=u.get("headers");if(f&&m||m&&y||f&&y)throw new Error('No valid Identity Pool "credential_source" provided, must be either file, url, or certificate.');if(f)this.credentialSourceType="file",this.subjectTokenSupplier=new U0.FileSubjectTokenSupplier({filePath:f,formatType:l,subjectTokenFieldName:p});else if(m)this.credentialSourceType="url",this.subjectTokenSupplier=new j0.UrlSubjectTokenSupplier({url:m,formatType:l,subjectTokenFieldName:p,headers:P,additionalGaxiosOptions:t.RETRY_CONFIG});else if(y){this.credentialSourceType="certificate";let h=new dP.CertificateSubjectTokenSupplier({useDefaultCertificateConfig:y.use_default_certificate_config,certificateConfigLocation:y.certificate_config_location,trustChainPath:y.trust_chain_path});this.subjectTokenSupplier=h}else throw new Error('No valid Identity Pool "credential_source" provided, must be either file, url, or certificate.')}}async retrieveSubjectToken(){let e=await this.subjectTokenSupplier.getSubjectToken(this.supplierContext);if(this.subjectTokenSupplier instanceof dP.CertificateSubjectTokenSupplier){let r=await this.subjectTokenSupplier.createMtlsHttpsAgent();this.stsCredential=new M0.StsCredentials({tokenExchangeEndpoint:this.getTokenUrl(),clientAuthentication:this.clientAuth,transporter:new pP.Gaxios({agent:r})}),this.transporter=new pP.Gaxios({...this.transporter.defaults||{},agent:r})}return e}};wu.IdentityPoolClient=hp});var _p=L(Au=>{"use strict";Object.defineProperty(Au,"__esModule",{value:!0});Au.AwsRequestSigner=void 0;var xu=_t(),mP=ea(),fP="AWS4-HMAC-SHA256",L0="aws4_request",yp=class{static{o(this,"AwsRequestSigner")}getCredentials;region;crypto;constructor(e,r){this.getCredentials=e,this.region=r,this.crypto=(0,mP.createCrypto)()}async getRequestOptions(e){if(!e.url)throw new RangeError('"url" is required in "amzOptions"');let r=typeof e.data=="object"?JSON.stringify(e.data):e.data,n=e.url,i=e.method||"GET",u=e.body||r,c=e.headers,l=await this.getCredentials(),p=new URL(n);if(typeof u!="string"&&u!==void 0)throw new TypeError(`'requestPayload' is expected to be a string if provided. Got: ${u}`);let f=await B0({crypto:this.crypto,host:p.host,canonicalUri:p.pathname,canonicalQuerystring:p.search.slice(1),method:i,region:this.region,securityCredentials:l,requestPayload:u,additionalAmzHeaders:c}),m=xu.Gaxios.mergeHeaders(f.amzDate?{"x-amz-date":f.amzDate}:{},{authorization:f.authorizationHeader,host:p.host},c||{});l.token&&xu.Gaxios.mergeHeaders(m,{"x-amz-security-token":l.token});let y={url:n,method:i,headers:m};return u!==void 0&&(y.body=u),y}};Au.AwsRequestSigner=yp;async function da(t,e,r){return await t.signWithHmacSha256(e,r)}o(da,"sign");async function F0(t,e,r,n,i){let u=await da(t,`AWS4${e}`,r),c=await da(t,u,n),l=await da(t,c,i);return await da(t,l,"aws4_request")}o(F0,"getSigningKey");async function B0(t){let e=xu.Gaxios.mergeHeaders(t.additionalAmzHeaders),r=t.requestPayload||"",n=t.host.split(".")[0],i=new Date,u=i.toISOString().replace(/[-:]/g,"").replace(/\.[0-9]+/,""),c=i.toISOString().replace(/[-]/g,"").replace(/T.*/,"");t.securityCredentials.token&&e.set("x-amz-security-token",t.securityCredentials.token);let l=xu.Gaxios.mergeHeaders({host:t.host},e.has("date")?{}:{"x-amz-date":u},e),p="",f=[...l.keys()].sort();f.forEach(k=>{p+=`${k}:${l.get(k)}
41
- `});let m=f.join(";"),y=await t.crypto.sha256DigestHex(r),P=`${t.method.toUpperCase()}
42
- ${t.canonicalUri}
43
- ${t.canonicalQuerystring}
44
- ${p}
45
- ${m}
46
- ${y}`,h=`${c}/${t.region}/${n}/${L0}`,b=`${fP}
47
- ${u}
40
+ "HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "PS256", "PS384", "PS512", "ES256", "ES384", "ES512" and "none".`,ou="secret must be a string or buffer",Sa="key must be a string or a buffer",kB="key must be a string, a buffer or an object",Nv=typeof Cr.createPublicKey=="function";Nv&&(Sa+=" or a KeyObject",ou+="or a KeyObject");function Ek(e){if(!Pa.isBuffer(e)&&typeof e!="string"&&(!Nv||typeof e!="object"||typeof e.type!="string"||typeof e.asymmetricKeyType!="string"||typeof e.export!="function"))throw Kr(Sa)}a(Ek,"checkIsPublicKey");function Sk(e){if(!Pa.isBuffer(e)&&typeof e!="string"&&typeof e!="object")throw Kr(kB)}a(Sk,"checkIsPrivateKey");function CB(e){if(!Pa.isBuffer(e)){if(typeof e=="string")return e;if(!Nv||typeof e!="object"||e.type!=="secret"||typeof e.export!="function")throw Kr(ou)}}a(CB,"checkIsSecretKey");function Dv(e){return e.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}a(Dv,"fromBase64");function Pk(e){e=e.toString();var t=4-e.length%4;if(t!==4)for(var n=0;n<t;++n)e+="=";return e.replace(/\-/g,"+").replace(/_/g,"/")}a(Pk,"toBase64");function Kr(e){var t=[].slice.call(arguments,1),n=bk.format.bind(bk,e).apply(null,t);return new TypeError(n)}a(Kr,"typeError");function $B(e){return Pa.isBuffer(e)||typeof e=="string"}a($B,"bufferOrString");function iu(e){return $B(e)||(e=JSON.stringify(e)),e}a(iu,"normalizeInput");function xk(e){return a(function(n,o){CB(o),n=iu(n);var r=Cr.createHmac("sha"+e,o),i=(r.update(n),r.digest("base64"));return Dv(i)},"sign")}a(xk,"createHmacSigner");var zv,zB="timingSafeEqual"in Cr?a(function(t,n){return t.byteLength!==n.byteLength?!1:Cr.timingSafeEqual(t,n)},"timingSafeEqual"):a(function(t,n){return zv||(zv=_k()),zv(t,n)},"timingSafeEqual");function NB(e){return a(function(n,o,r){var i=xk(e)(n,r);return zB(Pa.from(o),Pa.from(i))},"verify")}a(NB,"createHmacVerifier");function Tk(e){return a(function(n,o){Sk(o),n=iu(n);var r=Cr.createSign("RSA-SHA"+e),i=(r.update(n),r.sign(o,"base64"));return Dv(i)},"sign")}a(Tk,"createKeySigner");function wk(e){return a(function(n,o,r){Ek(r),n=iu(n),o=Pk(o);var i=Cr.createVerify("RSA-SHA"+e);return i.update(n),i.verify(r,o,"base64")},"verify")}a(wk,"createKeyVerifier");function DB(e){return a(function(n,o){Sk(o),n=iu(n);var r=Cr.createSign("RSA-SHA"+e),i=(r.update(n),r.sign({key:o,padding:Cr.constants.RSA_PKCS1_PSS_PADDING,saltLength:Cr.constants.RSA_PSS_SALTLEN_DIGEST},"base64"));return Dv(i)},"sign")}a(DB,"createPSSKeySigner");function UB(e){return a(function(n,o,r){Ek(r),n=iu(n),o=Pk(o);var i=Cr.createVerify("RSA-SHA"+e);return i.update(n),i.verify({key:r,padding:Cr.constants.RSA_PKCS1_PSS_PADDING,saltLength:Cr.constants.RSA_PSS_SALTLEN_DIGEST},o,"base64")},"verify")}a(UB,"createPSSKeyVerifier");function jB(e){var t=Tk(e);return a(function(){var o=t.apply(null,arguments);return o=vk.derToJose(o,"ES"+e),o},"sign")}a(jB,"createECDSASigner");function MB(e){var t=wk(e);return a(function(o,r,i){r=vk.joseToDer(r,"ES"+e).toString("base64");var s=t(o,r,i);return s},"verify")}a(MB,"createECDSAVerifer");function LB(){return a(function(){return""},"sign")}a(LB,"createNoneSigner");function FB(){return a(function(t,n){return n===""},"verify")}a(FB,"createNoneVerifier");Ak.exports=a(function(t){var n={hs:xk,rs:Tk,ps:DB,es:jB,none:LB},o={hs:NB,rs:wk,ps:UB,es:MB,none:FB},r=t.match(/^(RS|PS|ES|HS)(256|384|512)$|^(none)$/);if(!r)throw Kr(OB,t);var i=(r[1]||r[3]).toLowerCase(),s=r[2];return{sign:n[i](s),verify:o[i](s)}},"jwa")});var jv=B((aee,Ik)=>{var BB=require("buffer").Buffer;Ik.exports=a(function(t){return typeof t=="string"?t:typeof t=="number"||BB.isBuffer(t)?t.toString():JSON.stringify(t)},"toString")});var zk=B((cee,$k)=>{var qB=ba().Buffer,Rk=Cv(),VB=Uv(),ZB=require("stream"),Ok=jv(),Mv=require("util");function kk(e,t){return qB.from(e,t).toString("base64").replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}a(kk,"base64url");function HB(e,t,n){n=n||"utf8";var o=kk(Ok(e),"binary"),r=kk(Ok(t),n);return Mv.format("%s.%s",o,r)}a(HB,"jwsSecuredInput");function Ck(e){var t=e.header,n=e.payload,o=e.secret||e.privateKey,r=e.encoding,i=VB(t.alg),s=HB(t,n,r),u=i.sign(s,o);return Mv.format("%s.%s",s,u)}a(Ck,"jwsSign");function If(e){var t=e.secret;if(t=t??e.privateKey,t=t??e.key,/^hs/i.test(e.header.alg)===!0&&t==null)throw new TypeError("secret must be a string or buffer or a KeyObject");var n=new Rk(t);this.readable=!0,this.header=e.header,this.encoding=e.encoding,this.secret=this.privateKey=this.key=n,this.payload=new Rk(e.payload),this.secret.once("close",function(){!this.payload.writable&&this.readable&&this.sign()}.bind(this)),this.payload.once("close",function(){!this.secret.writable&&this.readable&&this.sign()}.bind(this))}a(If,"SignStream");Mv.inherits(If,ZB);If.prototype.sign=a(function(){try{var t=Ck({header:this.header,payload:this.payload.buffer,secret:this.secret.buffer,encoding:this.encoding});return this.emit("done",t),this.emit("data",t),this.emit("end"),this.readable=!1,t}catch(n){this.readable=!1,this.emit("error",n),this.emit("close")}},"sign");If.sign=Ck;$k.exports=If});var Vk=B((lee,qk)=>{var Dk=ba().Buffer,Nk=Cv(),GB=Uv(),WB=require("stream"),Uk=jv(),JB=require("util"),KB=/^[a-zA-Z0-9\-_]+?\.[a-zA-Z0-9\-_]+?\.([a-zA-Z0-9\-_]+)?$/;function XB(e){return Object.prototype.toString.call(e)==="[object Object]"}a(XB,"isObject");function QB(e){if(XB(e))return e;try{return JSON.parse(e)}catch{return}}a(QB,"safeJsonParse");function jk(e){var t=e.split(".",1)[0];return QB(Dk.from(t,"base64").toString("binary"))}a(jk,"headerFromJWS");function YB(e){return e.split(".",2).join(".")}a(YB,"securedInputFromJWS");function Mk(e){return e.split(".")[2]}a(Mk,"signatureFromJWS");function e4(e,t){t=t||"utf8";var n=e.split(".")[1];return Dk.from(n,"base64").toString(t)}a(e4,"payloadFromJWS");function Lk(e){return KB.test(e)&&!!jk(e)}a(Lk,"isValidJws");function Fk(e,t,n){if(!t){var o=new Error("Missing algorithm parameter for jws.verify");throw o.code="MISSING_ALGORITHM",o}e=Uk(e);var r=Mk(e),i=YB(e),s=GB(t);return s.verify(i,r,n)}a(Fk,"jwsVerify");function Bk(e,t){if(t=t||{},e=Uk(e),!Lk(e))return null;var n=jk(e);if(!n)return null;var o=e4(e);return(n.typ==="JWT"||t.json)&&(o=JSON.parse(o,t.encoding)),{header:n,payload:o,signature:Mk(e)}}a(Bk,"jwsDecode");function xa(e){e=e||{};var t=e.secret;if(t=t??e.publicKey,t=t??e.key,/^hs/i.test(e.algorithm)===!0&&t==null)throw new TypeError("secret must be a string or buffer or a KeyObject");var n=new Nk(t);this.readable=!0,this.algorithm=e.algorithm,this.encoding=e.encoding,this.secret=this.publicKey=this.key=n,this.signature=new Nk(e.signature),this.secret.once("close",function(){!this.signature.writable&&this.readable&&this.verify()}.bind(this)),this.signature.once("close",function(){!this.secret.writable&&this.readable&&this.verify()}.bind(this))}a(xa,"VerifyStream");JB.inherits(xa,WB);xa.prototype.verify=a(function(){try{var t=Fk(this.signature.buffer,this.algorithm,this.key.buffer),n=Bk(this.signature.buffer,this.encoding);return this.emit("done",t,n),this.emit("data",t),this.emit("end"),this.readable=!1,t}catch(o){this.readable=!1,this.emit("error",o),this.emit("close")}},"verify");xa.decode=Bk;xa.isValid=Lk;xa.verify=Fk;qk.exports=xa});var Lv=B(go=>{var Zk=zk(),Rf=Vk(),t4=["HS256","HS384","HS512","RS256","RS384","RS512","PS256","PS384","PS512","ES256","ES384","ES512"];go.ALGORITHMS=t4;go.sign=Zk.sign;go.verify=Rf.verify;go.decode=Rf.decode;go.isValid=Rf.isValid;go.createSign=a(function(t){return new Zk(t)},"createSign");go.createVerify=a(function(t){return new Rf(t)},"createVerify")});var aC=B(kf=>{"use strict";Object.defineProperty(kf,"__esModule",{value:!0});kf.GoogleToken=void 0;var Hk=Of(require("fs")),r4=kt(),n4=Of(Lv()),o4=Of(require("path")),i4=require("util");function Of(e,t){if(typeof WeakMap=="function")var n=new WeakMap,o=new WeakMap;return(Of=a(function(i,s){if(!s&&i&&i.__esModule)return i;var u,d,p={__proto__:null,default:i};if(i===null||Dn(i)!="object"&&typeof i!="function")return p;if(u=s?o:n){if(u.has(i))return u.get(i);u.set(i,p)}for(var f in i)f!=="default"&&{}.hasOwnProperty.call(i,f)&&((d=(u=Object.defineProperty)&&Object.getOwnPropertyDescriptor(i,f))&&(d.get||d.set)?u(p,f,d):p[f]=i[f]);return p},"_interopRequireWildcard"))(e,t)}a(Of,"_interopRequireWildcard");function Dn(e){"@babel/helpers - typeof";return Dn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Dn(e)}a(Dn,"_typeof");function a4(e,t){tC(e,t),t.add(e)}a(a4,"_classPrivateMethodInitSpec");function s4(e,t,n){tC(e,t),t.set(e,n)}a(s4,"_classPrivateFieldInitSpec");function tC(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}a(tC,"_checkPrivateRedeclaration");function Gk(e,t,n){return e.set(Xr(e,t),n),n}a(Gk,"_classPrivateFieldSet");function Wk(e,t){return e.get(Xr(e,t))}a(Wk,"_classPrivateFieldGet");function Xr(e,t,n){if(typeof e=="function"?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}a(Xr,"_assertClassBrand");function Jk(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,oC(o.key),o)}}a(Jk,"_defineProperties");function rC(e,t,n){return t&&Jk(e.prototype,t),n&&Jk(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}a(rC,"_createClass");function nC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}a(nC,"_classCallCheck");function c4(e,t,n){return t=uu(t),u4(e,Hv()?Reflect.construct(t,n||[],uu(e).constructor):t.apply(e,n))}a(c4,"_callSuper");function u4(e,t){if(t&&(Dn(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return l4(e)}a(u4,"_possibleConstructorReturn");function l4(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}a(l4,"_assertThisInitialized");function d4(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&cu(e,t)}a(d4,"_inherits");function Fv(e){var t=typeof Map=="function"?new Map:void 0;return Fv=a(function(o){if(o===null||!f4(o))return o;if(typeof o!="function")throw new TypeError("Super expression must either be null or a function");if(t!==void 0){if(t.has(o))return t.get(o);t.set(o,r)}function r(){return p4(o,arguments,uu(this).constructor)}return a(r,"Wrapper"),r.prototype=Object.create(o.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),cu(r,o)},"_wrapNativeSuper"),Fv(e)}a(Fv,"_wrapNativeSuper");function p4(e,t,n){if(Hv())return Reflect.construct.apply(null,arguments);var o=[null];o.push.apply(o,t);var r=new(e.bind.apply(e,o));return n&&cu(r,n.prototype),r}a(p4,"_construct");function Hv(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Hv=a(function(){return!!e},"_isNativeReflectConstruct"))()}a(Hv,"_isNativeReflectConstruct");function f4(e){try{return Function.toString.call(e).indexOf("[native code]")!==-1}catch{return typeof e=="function"}}a(f4,"_isNativeFunction");function cu(e,t){return cu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},cu(e,t)}a(cu,"_setPrototypeOf");function uu(e){return uu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},uu(e)}a(uu,"_getPrototypeOf");function _r(e,t,n){return(t=oC(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}a(_r,"_defineProperty");function oC(e){var t=m4(e,"string");return Dn(t)=="symbol"?t:t+""}a(oC,"_toPropertyKey");function m4(e,t){if(Dn(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var o=n.call(e,t||"default");if(Dn(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}a(m4,"_toPrimitive");function vr(){var e,t,n=typeof Symbol=="function"?Symbol:{},o=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function i(h,_,P,x){var S=_&&_.prototype instanceof u?_:u,$=Object.create(S.prototype);return br($,"_invoke",(function(V,W,Z){var G,te,ce,Y=0,Ze=Z||[],we=!1,Te={p:0,n:0,v:e,a:Me,f:Me.bind(e,4),d:a(function(Ve,et){return G=Ve,te=0,ce=e,Te.n=et,s},"d")};function Me(je,Ve){for(te=je,ce=Ve,t=0;!we&&Y&&!et&&t<Ze.length;t++){var et,ot=Ze[t],nr=Te.p,Dt=ot[2];je>3?(et=Dt===Ve)&&(ce=ot[(te=ot[4])?5:(te=3,3)],ot[4]=ot[5]=e):ot[0]<=nr&&((et=je<2&&nr<ot[1])?(te=0,Te.v=Ve,Te.n=ot[1]):nr<Dt&&(et=je<3||ot[0]>Ve||Ve>Dt)&&(ot[4]=je,ot[5]=Ve,Te.n=Dt,te=0))}if(et||je>1)return s;throw we=!0,Ve}return a(Me,"d"),function(je,Ve,et){if(Y>1)throw TypeError("Generator is already running");for(we&&Ve===1&&Me(Ve,et),te=Ve,ce=et;(t=te<2?e:ce)||!we;){G||(te?te<3?(te>1&&(Te.n=-1),Me(te,ce)):Te.n=ce:Te.v=ce);try{if(Y=2,G){if(te||(je="next"),t=G[je]){if(!(t=t.call(G,ce)))throw TypeError("iterator result is not an object");if(!t.done)return t;ce=t.value,te<2&&(te=0)}else te===1&&(t=G.return)&&t.call(G),te<2&&(ce=TypeError("The iterator does not provide a '"+je+"' method"),te=1);G=e}else if((t=(we=Te.n<0)?ce:V.call(W,Te))!==s)break}catch(ot){G=e,te=1,ce=ot}finally{Y=1}}return{value:t,done:we}}})(h,P,x),!0),$}a(i,"i");var s={};function u(){}a(u,"Generator");function d(){}a(d,"GeneratorFunction");function p(){}a(p,"GeneratorFunctionPrototype"),t=Object.getPrototypeOf;var f=[][o]?t(t([][o]())):(br(t={},o,function(){return this}),t),g=p.prototype=u.prototype=Object.create(f);function y(h){return Object.setPrototypeOf?Object.setPrototypeOf(h,p):(h.__proto__=p,br(h,r,"GeneratorFunction")),h.prototype=Object.create(g),h}return a(y,"f"),d.prototype=p,br(g,"constructor",p),br(p,"constructor",d),d.displayName="GeneratorFunction",br(p,r,"GeneratorFunction"),br(g),br(g,r,"Generator"),br(g,o,function(){return this}),br(g,"toString",function(){return"[object Generator]"}),(vr=a(function(){return{w:i,m:y}},"_regenerator"))()}a(vr,"_regenerator");function br(e,t,n,o){var r=Object.defineProperty;try{r({},"",{})}catch{r=0}br=a(function(s,u,d,p){if(u)r?r(s,u,{value:d,enumerable:!p,configurable:!p,writable:!p}):s[u]=d;else{var f=a(function(y,h){br(s,y,function(_){return this._invoke(y,h,_)})},"o");f("next",0),f("throw",1),f("return",2)}},"_regeneratorDefine"),br(e,t,n,o)}a(br,"_regeneratorDefine2");function Kk(e,t,n,o,r,i,s){try{var u=e[i](s),d=u.value}catch(p){return void n(p)}u.done?t(d):Promise.resolve(d).then(o,r)}a(Kk,"asyncGeneratorStep");function Ta(e){return function(){var t=this,n=arguments;return new Promise(function(o,r){var i=e.apply(t,n);function s(d){Kk(i,o,r,s,u,"next",d)}a(s,"_next");function u(d){Kk(i,o,r,s,u,"throw",d)}a(u,"_throw"),s(void 0)})}}a(Ta,"_asyncToGenerator");var Xk=Hk.readFile?(0,i4.promisify)(Hk.readFile):Ta(vr().m(a(function e(){return vr().w(function(t){for(;;)switch(t.n){case 0:throw new su("use key rather than keyFile.","MISSING_CREDENTIALS");case 1:return t.a(2)}},e)},"_callee"))),Qk="https://oauth2.googleapis.com/token",h4="https://oauth2.googleapis.com/revoke?token=",su=(function(e){function t(n,o){var r;return nC(this,t),r=c4(this,t,[n]),_r(r,"code",void 0),r.code=o,r}return a(t,"ErrorWithCode"),d4(t,e),rC(t)})(Fv(Error)),au=new WeakMap,dn=new WeakSet,mee=kf.GoogleToken=(function(){function e(t){nC(this,e),a4(this,dn),_r(this,"expiresAt",void 0),_r(this,"key",void 0),_r(this,"keyFile",void 0),_r(this,"iss",void 0),_r(this,"sub",void 0),_r(this,"scope",void 0),_r(this,"rawToken",void 0),_r(this,"tokenExpires",void 0),_r(this,"email",void 0),_r(this,"additionalClaims",void 0),_r(this,"eagerRefreshThresholdMillis",void 0),_r(this,"transporter",{request:a(function(o){return(0,r4.request)(o)},"request")}),s4(this,au,void 0),Xr(dn,this,iC).call(this,t)}return a(e,"GoogleToken"),rC(e,[{key:"accessToken",get:a(function(){return this.rawToken?this.rawToken.access_token:void 0},"get")},{key:"idToken",get:a(function(){return this.rawToken?this.rawToken.id_token:void 0},"get")},{key:"tokenType",get:a(function(){return this.rawToken?this.rawToken.token_type:void 0},"get")},{key:"refreshToken",get:a(function(){return this.rawToken?this.rawToken.refresh_token:void 0},"get")},{key:"hasExpired",value:a(function(){var n=new Date().getTime();return this.rawToken&&this.expiresAt?n>=this.expiresAt:!0},"hasExpired")},{key:"isTokenExpiring",value:a(function(){var n,o=new Date().getTime(),r=(n=this.eagerRefreshThresholdMillis)!==null&&n!==void 0?n:0;return this.rawToken&&this.expiresAt?this.expiresAt<=o+r:!0},"isTokenExpiring")},{key:"getToken",value:a(function(n){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(Dn(n)==="object"&&(o=n,n=void 0),o=Object.assign({forceRefresh:!1},o),n){var r=n;Xr(dn,this,Yk).call(this,o).then(function(i){return r(null,i)},n);return}return Xr(dn,this,Yk).call(this,o)},"getToken")},{key:"getCredentials",value:(function(){var t=Ta(vr().m(a(function o(r){var i,s,u,d,p,f,g;return vr().w(function(y){for(;;)switch(y.n){case 0:i=o4.extname(r),g=i,y.n=g===".json"?1:g===".der"||g===".crt"||g===".pem"?4:g===".p12"||g===".pfx"?6:7;break;case 1:return y.n=2,Xk(r,"utf8");case 2:if(s=y.v,u=JSON.parse(s),d=u.private_key,p=u.client_email,!(!d||!p)){y.n=3;break}throw new su("private_key and client_email are required.","MISSING_CREDENTIALS");case 3:return y.a(2,{privateKey:d,clientEmail:p});case 4:return y.n=5,Xk(r,"utf8");case 5:return f=y.v,y.a(2,{privateKey:f});case 6:throw new su("*.p12 certificates are not supported after v6.1.2. Consider utilizing *.json format or converting *.p12 to *.pem using the OpenSSL CLI.","UNKNOWN_CERTIFICATE_TYPE");case 7:throw new su("Unknown certificate type. Type is determined based on file extension. Current supported extensions are *.json, and *.pem.","UNKNOWN_CERTIFICATE_TYPE");case 8:return y.a(2)}},o)},"_callee2")));function n(o){return t.apply(this,arguments)}return a(n,"getCredentials"),n})()},{key:"revokeToken",value:a(function(n){if(n){Xr(dn,this,eC).call(this).then(function(){return n()},n);return}return Xr(dn,this,eC).call(this)},"revokeToken")}])})();function Yk(e){return Bv.apply(this,arguments)}a(Yk,"_getTokenAsync");function Bv(){return Bv=Ta(vr().m(a(function e(t){return vr().w(function(n){for(;;)switch(n.n){case 0:if(!(Wk(au,this)&&!t.forceRefresh)){n.n=1;break}return n.a(2,Wk(au,this));case 1:return n.p=1,n.n=2,Gk(au,this,Xr(dn,this,g4).call(this,t));case 2:return n.a(2,n.v);case 3:return n.p=3,Gk(au,this,void 0),n.f(3);case 4:return n.a(2)}},e,this,[[1,,3,4]])},"_callee3"))),Bv.apply(this,arguments)}a(Bv,"_getTokenAsync2");function g4(e){return qv.apply(this,arguments)}a(g4,"_getTokenAsyncInner");function qv(){return qv=Ta(vr().m(a(function e(t){var n;return vr().w(function(o){for(;;)switch(o.n){case 0:if(!(this.isTokenExpiring()===!1&&t.forceRefresh===!1)){o.n=1;break}return o.a(2,Promise.resolve(this.rawToken));case 1:if(!(!this.key&&!this.keyFile)){o.n=2;break}throw new Error("No key or keyFile set.");case 2:if(!(!this.key&&this.keyFile)){o.n=4;break}return o.n=3,this.getCredentials(this.keyFile);case 3:n=o.v,this.key=n.privateKey,this.iss=n.clientEmail||this.iss,n.clientEmail||Xr(dn,this,y4).call(this);case 4:return o.a(2,Xr(dn,this,_4).call(this))}},e,this)},"_callee4"))),qv.apply(this,arguments)}a(qv,"_getTokenAsyncInner2");function y4(){if(!this.iss)throw new su("email is required.","MISSING_CREDENTIALS")}a(y4,"_ensureEmail");function eC(){return Vv.apply(this,arguments)}a(eC,"_revokeTokenAsync");function Vv(){return Vv=Ta(vr().m(a(function e(){var t;return vr().w(function(n){for(;;)switch(n.n){case 0:if(this.accessToken){n.n=1;break}throw new Error("No token to revoke.");case 1:return t=h4+this.accessToken,n.n=2,this.transporter.request({url:t,retry:!0});case 2:Xr(dn,this,iC).call(this,{email:this.iss,sub:this.sub,key:this.key,keyFile:this.keyFile,scope:this.scope,additionalClaims:this.additionalClaims});case 3:return n.a(2)}},e,this)},"_callee5"))),Vv.apply(this,arguments)}a(Vv,"_revokeTokenAsync2");function iC(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.keyFile=e.keyFile,this.key=e.key,this.rawToken=void 0,this.iss=e.email||e.iss,this.sub=e.sub,this.additionalClaims=e.additionalClaims,Dn(e.scope)==="object"?this.scope=e.scope.join(" "):this.scope=e.scope,this.eagerRefreshThresholdMillis=e.eagerRefreshThresholdMillis,e.transporter&&(this.transporter=e.transporter)}a(iC,"_configure");function _4(){return Zv.apply(this,arguments)}a(_4,"_requestToken");function Zv(){return Zv=Ta(vr().m(a(function e(){var t,n,o,r,i,s,u,d,p,f;return vr().w(function(g){for(;;)switch(g.n){case 0:return t=Math.floor(new Date().getTime()/1e3),n=this.additionalClaims||{},o=Object.assign({iss:this.iss,scope:this.scope,aud:Qk,exp:t+3600,iat:t,sub:this.sub},n),r=n4.sign({header:{alg:"RS256"},payload:o,secret:this.key}),g.p=1,g.n=2,this.transporter.request({method:"POST",url:Qk,data:new URLSearchParams({grant_type:"urn:ietf:params:oauth:grant-type:jwt-bearer",assertion:r}),responseType:"json",retryConfig:{httpMethodsToRetry:["POST"]}});case 2:return i=g.v,this.rawToken=i.data,this.expiresAt=i.data.expires_in===null||i.data.expires_in===void 0?void 0:(t+i.data.expires_in)*1e3,g.a(2,this.rawToken);case 3:throw g.p=3,f=g.v,this.rawToken=void 0,this.tokenExpires=void 0,d=f.response&&(s=f.response)!==null&&s!==void 0&&s.data?(u=f.response)===null||u===void 0?void 0:u.data:{},d.error&&(p=d.error_description?": ".concat(d.error_description):"",f.message="".concat(d.error).concat(p)),f;case 4:return g.a(2)}},e,this,[[1,3]])},"_callee6"))),Zv.apply(this,arguments)}a(Zv,"_requestToken2")});var Wv=B(Cf=>{"use strict";Object.defineProperty(Cf,"__esModule",{value:!0});Cf.JWTAccess=void 0;var b4=Lv(),v4=Wr(),sC={alg:"RS256",typ:"JWT"},Gv=class e{static{a(this,"JWTAccess")}email;key;keyId;projectId;eagerRefreshThresholdMillis;cache=new v4.LRUCache({capacity:500,maxAge:3600*1e3});constructor(t,n,o,r){this.email=t,this.key=n,this.keyId=o,this.eagerRefreshThresholdMillis=r??300*1e3}getCachedKey(t,n){let o=t;if(n&&Array.isArray(n)&&n.length?o=t?`${t}_${n.join("_")}`:`${n.join("_")}`:typeof n=="string"&&(o=t?`${t}_${n}`:n),!o)throw Error("Scopes or url must be provided");return o}getRequestHeaders(t,n,o){let r=this.getCachedKey(t,o),i=this.cache.get(r),s=Date.now();if(i&&i.expiration-s>this.eagerRefreshThresholdMillis)return new Headers(i.headers);let u=Math.floor(Date.now()/1e3),d=e.getExpirationTime(u),p;if(Array.isArray(o)&&(o=o.join(" ")),o?p={iss:this.email,sub:this.email,scope:o,exp:d,iat:u}:p={iss:this.email,sub:this.email,aud:t,exp:d,iat:u},n){for(let _ in p)if(n[_])throw new Error(`The '${_}' property is not allowed when passing additionalClaims. This claim is included in the JWT by default.`)}let f=this.keyId?{...sC,kid:this.keyId}:sC,g=Object.assign(p,n),y=b4.sign({header:f,payload:g,secret:this.key}),h=new Headers({authorization:`Bearer ${y}`});return this.cache.set(r,{expiration:d*1e3,headers:h}),h}static getExpirationTime(t){return t+3600}fromJSON(t){if(!t)throw new Error("Must pass in a JSON object containing the service account auth settings.");if(!t.client_email)throw new Error("The incoming JSON object does not contain a client_email field");if(!t.private_key)throw new Error("The incoming JSON object does not contain a private_key field");this.email=t.client_email,this.key=t.private_key,this.keyId=t.private_key_id,this.projectId=t.project_id}fromStream(t,n){if(n)this.fromStreamAsync(t).then(()=>n(),n);else return this.fromStreamAsync(t)}fromStreamAsync(t){return new Promise((n,o)=>{t||o(new Error("Must pass in a stream containing the service account auth settings."));let r="";t.setEncoding("utf8").on("data",i=>r+=i).on("error",o).on("end",()=>{try{let i=JSON.parse(r);this.fromJSON(i),n()}catch(i){o(i)}})})}};Cf.JWTAccess=Gv});var Kv=B(zf=>{"use strict";Object.defineProperty(zf,"__esModule",{value:!0});zf.JWT=void 0;var cC=aC(),E4=Wv(),S4=oi(),$f=yr(),Jv=class e extends S4.OAuth2Client{static{a(this,"JWT")}email;keyFile;key;keyId;defaultScopes;scopes;scope;subject;gtoken;additionalClaims;useJWTAccessWithScope;defaultServicePath;access;constructor(t={}){super(t),this.email=t.email,this.keyFile=t.keyFile,this.key=t.key,this.keyId=t.keyId,this.scopes=t.scopes,this.subject=t.subject,this.additionalClaims=t.additionalClaims,this.credentials={refresh_token:"jwt-placeholder",expiry_date:1}}createScoped(t){let n=new e(this);return n.scopes=t,n}async getRequestMetadataAsync(t){t=this.defaultServicePath?`https://${this.defaultServicePath}/`:t;let n=!this.hasUserScopes()&&t||this.useJWTAccessWithScope&&this.hasAnyScopes()||this.universeDomain!==$f.DEFAULT_UNIVERSE;if(this.subject&&this.universeDomain!==$f.DEFAULT_UNIVERSE)throw new RangeError(`Service Account user is configured for the credential. Domain-wide delegation is not supported in universes other than ${$f.DEFAULT_UNIVERSE}`);if(!this.apiKey&&n)if(this.additionalClaims&&this.additionalClaims.target_audience){let{tokens:o}=await this.refreshToken();return{headers:this.addSharedMetadataHeaders(new Headers({authorization:`Bearer ${o.id_token}`}))}}else{this.access||(this.access=new E4.JWTAccess(this.email,this.key,this.keyId,this.eagerRefreshThresholdMillis));let o;this.hasUserScopes()?o=this.scopes:t||(o=this.defaultScopes);let r=this.useJWTAccessWithScope||this.universeDomain!==$f.DEFAULT_UNIVERSE,i=await this.access.getRequestHeaders(t??void 0,this.additionalClaims,r?o:void 0);return{headers:this.addSharedMetadataHeaders(i)}}else return this.hasAnyScopes()||this.apiKey?super.getRequestMetadataAsync(t):{headers:new Headers}}async fetchIdToken(t){let n=new cC.GoogleToken({iss:this.email,sub:this.subject,scope:this.scopes||this.defaultScopes,keyFile:this.keyFile,key:this.key,additionalClaims:{target_audience:t},transporter:this.transporter});if(await n.getToken({forceRefresh:!0}),!n.idToken)throw new Error("Unknown error: Failed to fetch ID token");return n.idToken}hasUserScopes(){return this.scopes?this.scopes.length>0:!1}hasAnyScopes(){return!!(this.scopes&&this.scopes.length>0||this.defaultScopes&&this.defaultScopes.length>0)}authorize(t){if(t)this.authorizeAsync().then(n=>t(null,n),t);else return this.authorizeAsync()}async authorizeAsync(){let t=await this.refreshToken();if(!t)throw new Error("No result returned");return this.credentials=t.tokens,this.credentials.refresh_token="jwt-placeholder",this.key=this.gtoken.key,this.email=this.gtoken.iss,t.tokens}async refreshTokenNoCache(){let t=this.createGToken(),o={access_token:(await t.getToken({forceRefresh:this.isTokenExpiring()})).access_token,token_type:"Bearer",expiry_date:t.expiresAt,id_token:t.idToken};return this.emit("tokens",o),{res:null,tokens:o}}createGToken(){return this.gtoken||(this.gtoken=new cC.GoogleToken({iss:this.email,sub:this.subject,scope:this.scopes||this.defaultScopes,keyFile:this.keyFile,key:this.key,additionalClaims:this.additionalClaims,transporter:this.transporter})),this.gtoken}fromJSON(t){if(!t)throw new Error("Must pass in a JSON object containing the service account auth settings.");if(!t.client_email)throw new Error("The incoming JSON object does not contain a client_email field");if(!t.private_key)throw new Error("The incoming JSON object does not contain a private_key field");this.email=t.client_email,this.key=t.private_key,this.keyId=t.private_key_id,this.projectId=t.project_id,this.quotaProjectId=t.quota_project_id,this.universeDomain=t.universe_domain||this.universeDomain}fromStream(t,n){if(n)this.fromStreamAsync(t).then(()=>n(),n);else return this.fromStreamAsync(t)}fromStreamAsync(t){return new Promise((n,o)=>{if(!t)throw new Error("Must pass in a stream containing the service account auth settings.");let r="";t.setEncoding("utf8").on("error",o).on("data",i=>r+=i).on("end",()=>{try{let i=JSON.parse(r);this.fromJSON(i),n()}catch(i){o(i)}})})}fromAPIKey(t){if(typeof t!="string")throw new Error("Must provide an API Key string.");this.apiKey=t}async getCredentials(){if(this.key)return{private_key:this.key,client_email:this.email};if(this.keyFile){let n=await this.createGToken().getCredentials(this.keyFile);return{private_key:n.privateKey,client_email:n.clientEmail}}throw new Error("A key or a keyFile must be provided to getCredentials.")}};zf.JWT=Jv});var Qv=B(wa=>{"use strict";Object.defineProperty(wa,"__esModule",{value:!0});wa.UserRefreshClient=wa.USER_REFRESH_ACCOUNT_TYPE=void 0;var P4=oi(),x4=yr();wa.USER_REFRESH_ACCOUNT_TYPE="authorized_user";var Xv=class e extends P4.OAuth2Client{static{a(this,"UserRefreshClient")}_refreshToken;constructor(t,n,o,r,i){let s=t&&typeof t=="object"?t:{clientId:t,clientSecret:n,refreshToken:o,eagerRefreshThresholdMillis:r,forceRefreshOnFailure:i};super(s),this._refreshToken=s.refreshToken,this.credentials.refresh_token=s.refreshToken}async refreshTokenNoCache(){return super.refreshTokenNoCache(this._refreshToken)}async fetchIdToken(t){let n={...e.RETRY_CONFIG,url:this.endpoints.oauth2TokenUrl,method:"POST",data:new URLSearchParams({client_id:this._clientId,client_secret:this._clientSecret,grant_type:"refresh_token",refresh_token:this._refreshToken,target_audience:t})};return x4.AuthClient.setMethodName(n,"fetchIdToken"),(await this.transporter.request(n)).data.id_token}fromJSON(t){if(!t)throw new Error("Must pass in a JSON object containing the user refresh token");if(t.type!=="authorized_user")throw new Error('The incoming JSON object does not have the "authorized_user" type');if(!t.client_id)throw new Error("The incoming JSON object does not contain a client_id field");if(!t.client_secret)throw new Error("The incoming JSON object does not contain a client_secret field");if(!t.refresh_token)throw new Error("The incoming JSON object does not contain a refresh_token field");this._clientId=t.client_id,this._clientSecret=t.client_secret,this._refreshToken=t.refresh_token,this.credentials.refresh_token=t.refresh_token,this.quotaProjectId=t.quota_project_id,this.universeDomain=t.universe_domain||this.universeDomain}fromStream(t,n){if(n)this.fromStreamAsync(t).then(()=>n(),n);else return this.fromStreamAsync(t)}async fromStreamAsync(t){return new Promise((n,o)=>{if(!t)return o(new Error("Must pass in a stream containing the user refresh token."));let r="";t.setEncoding("utf8").on("error",o).on("data",i=>r+=i).on("end",()=>{try{let i=JSON.parse(r);return this.fromJSON(i),n()}catch(i){return o(i)}})})}static fromJSON(t){let n=new e;return n.fromJSON(t),n}};wa.UserRefreshClient=Xv});var eE=B(Aa=>{"use strict";Object.defineProperty(Aa,"__esModule",{value:!0});Aa.Impersonated=Aa.IMPERSONATED_ACCOUNT_TYPE=void 0;var uC=oi(),T4=kt(),w4=Wr();Aa.IMPERSONATED_ACCOUNT_TYPE="impersonated_service_account";var Yv=class e extends uC.OAuth2Client{static{a(this,"Impersonated")}sourceClient;targetPrincipal;targetScopes;delegates;lifetime;endpoint;constructor(t={}){if(super(t),this.credentials={expiry_date:1,refresh_token:"impersonated-placeholder"},this.sourceClient=t.sourceClient??new uC.OAuth2Client,this.targetPrincipal=t.targetPrincipal??"",this.delegates=t.delegates??[],this.targetScopes=t.targetScopes??[],this.lifetime=t.lifetime??3600,!!!(0,w4.originalOrCamelOptions)(t).get("universe_domain"))this.universeDomain=this.sourceClient.universeDomain;else if(this.sourceClient.universeDomain!==this.universeDomain)throw new RangeError(`Universe domain ${this.sourceClient.universeDomain} in source credentials does not match ${this.universeDomain} universe domain set for impersonated credentials.`);this.endpoint=t.endpoint??`https://iamcredentials.${this.universeDomain}`}async sign(t){await this.sourceClient.getAccessToken();let n=`projects/-/serviceAccounts/${this.targetPrincipal}`,o=`${this.endpoint}/v1/${n}:signBlob`,r={delegates:this.delegates,payload:Buffer.from(t).toString("base64")};return(await this.sourceClient.request({...e.RETRY_CONFIG,url:o,data:r,method:"POST"})).data}getTargetPrincipal(){return this.targetPrincipal}async refreshToken(){try{await this.sourceClient.getAccessToken();let t="projects/-/serviceAccounts/"+this.targetPrincipal,n=`${this.endpoint}/v1/${t}:generateAccessToken`,o={delegates:this.delegates,scope:this.targetScopes,lifetime:this.lifetime+"s"},r=await this.sourceClient.request({...e.RETRY_CONFIG,url:n,data:o,method:"POST"}),i=r.data;return this.credentials.access_token=i.accessToken,this.credentials.expiry_date=Date.parse(i.expireTime),{tokens:this.credentials,res:r}}catch(t){if(!(t instanceof Error))throw t;let n=0,o="";throw t instanceof T4.GaxiosError&&(n=t?.response?.data?.error?.status,o=t?.response?.data?.error?.message),n&&o?(t.message=`${n}: unable to impersonate: ${o}`,t):(t.message=`unable to impersonate: ${t}`,t)}}async fetchIdToken(t,n){await this.sourceClient.getAccessToken();let o=`projects/-/serviceAccounts/${this.targetPrincipal}`,r=`${this.endpoint}/v1/${o}:generateIdToken`,i={delegates:this.delegates,audience:t,includeEmail:n?.includeEmail??!0,useEmailAzp:n?.includeEmail??!0};return(await this.sourceClient.request({...e.RETRY_CONFIG,url:r,data:i,method:"POST"})).data.token}};Aa.Impersonated=Yv});var rE=B(lu=>{"use strict";Object.defineProperty(lu,"__esModule",{value:!0});lu.OAuthClientAuthHandler=void 0;lu.getErrorFromOAuthErrorResponse=R4;var Ia=kt(),A4=eu(),I4=["PUT","POST","PATCH"],tE=class{static{a(this,"OAuthClientAuthHandler")}#e=(0,A4.createCrypto)();#t;transporter;constructor(t){t&&"clientId"in t?(this.#t=t,this.transporter=new Ia.Gaxios):(this.#t=t?.clientAuthentication,this.transporter=t?.transporter||new Ia.Gaxios)}applyClientAuthenticationOptions(t,n){t.headers=Ia.Gaxios.mergeHeaders(t.headers),this.injectAuthenticatedHeaders(t,n),n||this.injectAuthenticatedRequestBody(t)}injectAuthenticatedHeaders(t,n){if(n)t.headers=Ia.Gaxios.mergeHeaders(t.headers,{authorization:`Bearer ${n}`});else if(this.#t?.confidentialClientType==="basic"){t.headers=Ia.Gaxios.mergeHeaders(t.headers);let o=this.#t.clientId,r=this.#t.clientSecret||"",i=this.#e.encodeBase64StringUtf8(`${o}:${r}`);Ia.Gaxios.mergeHeaders(t.headers,{authorization:`Basic ${i}`})}}injectAuthenticatedRequestBody(t){if(this.#t?.confidentialClientType==="request-body"){let n=(t.method||"GET").toUpperCase();if(!I4.includes(n))throw new Error(`${n} HTTP method does not support ${this.#t.confidentialClientType} client authentication`);let r=new Headers(t.headers).get("content-type");if(r?.startsWith("application/x-www-form-urlencoded")||t.data instanceof URLSearchParams){let i=new URLSearchParams(t.data??"");i.append("client_id",this.#t.clientId),i.append("client_secret",this.#t.clientSecret||""),t.data=i}else if(r?.startsWith("application/json"))t.data=t.data||{},Object.assign(t.data,{client_id:this.#t.clientId,client_secret:this.#t.clientSecret||""});else throw new Error(`${r} content-types are not supported with ${this.#t.confidentialClientType} client authentication`)}}static get RETRY_CONFIG(){return{retry:!0,retryConfig:{httpMethodsToRetry:["GET","PUT","POST","HEAD","OPTIONS","DELETE"]}}}};lu.OAuthClientAuthHandler=tE;function R4(e,t){let n=e.error,o=e.error_description,r=e.error_uri,i=`Error code ${n}`;typeof o<"u"&&(i+=`: ${o}`),typeof r<"u"&&(i+=` - ${r}`);let s=new Error(i);if(t){let u=Object.keys(t);t.stack&&u.push("stack"),u.forEach(d=>{d!=="message"&&Object.defineProperty(s,d,{value:t[d],writable:!1,enumerable:!0})})}return s}a(R4,"getErrorFromOAuthErrorResponse")});var Df=B(Nf=>{"use strict";Object.defineProperty(Nf,"__esModule",{value:!0});Nf.StsCredentials=void 0;var O4=kt(),k4=yr(),lC=rE(),C4=Wr(),nE=class e extends lC.OAuthClientAuthHandler{static{a(this,"StsCredentials")}#e;constructor(t={tokenExchangeEndpoint:""},n){(typeof t!="object"||t instanceof URL)&&(t={tokenExchangeEndpoint:t,clientAuthentication:n}),super(t),this.#e=t.tokenExchangeEndpoint}async exchangeToken(t,n,o){let r={grant_type:t.grantType,resource:t.resource,audience:t.audience,scope:t.scope?.join(" "),requested_token_type:t.requestedTokenType,subject_token:t.subjectToken,subject_token_type:t.subjectTokenType,actor_token:t.actingParty?.actorToken,actor_token_type:t.actingParty?.actorTokenType,options:o&&JSON.stringify(o)},i={...e.RETRY_CONFIG,url:this.#e.toString(),method:"POST",headers:n,data:new URLSearchParams((0,C4.removeUndefinedValuesInObject)(r))};k4.AuthClient.setMethodName(i,"exchangeToken"),this.applyClientAuthenticationOptions(i);try{let s=await this.transporter.request(i),u=s.data;return u.res=s,u}catch(s){throw s instanceof O4.GaxiosError&&s.response?(0,lC.getErrorFromOAuthErrorResponse)(s.response.data,s):s}}};Nf.StsCredentials=nE});var yo=B($r=>{"use strict";Object.defineProperty($r,"__esModule",{value:!0});$r.BaseExternalAccountClient=$r.CLOUD_RESOURCE_MANAGER=$r.EXTERNAL_ACCOUNT_TYPE=$r.EXPIRATION_TIME_OFFSET=void 0;var $4=kt(),z4=require("stream"),oE=yr(),N4=Df(),dC=Wr(),D4=bv(),U4="urn:ietf:params:oauth:grant-type:token-exchange",j4="urn:ietf:params:oauth:token-type:access_token",iE="https://www.googleapis.com/auth/cloud-platform",M4=3600;$r.EXPIRATION_TIME_OFFSET=300*1e3;$r.EXTERNAL_ACCOUNT_TYPE="external_account";$r.CLOUD_RESOURCE_MANAGER="https://cloudresourcemanager.googleapis.com/v1/projects/";var L4="//iam\\.googleapis\\.com/locations/[^/]+/workforcePools/[^/]+/providers/.+",F4="https://sts.{universeDomain}/v1/token",aE=class e extends oE.AuthClient{static{a(this,"BaseExternalAccountClient")}scopes;projectNumber;audience;subjectTokenType;stsCredential;clientAuth;credentialSourceType;cachedAccessToken;serviceAccountImpersonationUrl;serviceAccountImpersonationLifetime;workforcePoolUserProject;configLifetimeRequested;tokenUrl;cloudResourceManagerURL;supplierContext;#e=null;constructor(t){super(t);let n=(0,dC.originalOrCamelOptions)(t),o=n.get("type");if(o&&o!==$r.EXTERNAL_ACCOUNT_TYPE)throw new Error(`Expected "${$r.EXTERNAL_ACCOUNT_TYPE}" type but received "${t.type}"`);let r=n.get("client_id"),i=n.get("client_secret");this.tokenUrl=n.get("token_url")??F4.replace("{universeDomain}",this.universeDomain);let s=n.get("subject_token_type"),u=n.get("workforce_pool_user_project"),d=n.get("service_account_impersonation_url"),p=n.get("service_account_impersonation"),f=(0,dC.originalOrCamelOptions)(p).get("token_lifetime_seconds");this.cloudResourceManagerURL=new URL(n.get("cloud_resource_manager_url")||`https://cloudresourcemanager.${this.universeDomain}/v1/projects/`),r&&(this.clientAuth={confidentialClientType:"basic",clientId:r,clientSecret:i}),this.stsCredential=new N4.StsCredentials({tokenExchangeEndpoint:this.tokenUrl,clientAuthentication:this.clientAuth}),this.scopes=n.get("scopes")||[iE],this.cachedAccessToken=null,this.audience=n.get("audience"),this.subjectTokenType=s,this.workforcePoolUserProject=u;let g=new RegExp(L4);if(this.workforcePoolUserProject&&!this.audience.match(g))throw new Error("workforcePoolUserProject should not be set for non-workforce pool credentials.");this.serviceAccountImpersonationUrl=d,this.serviceAccountImpersonationLifetime=f,this.serviceAccountImpersonationLifetime?this.configLifetimeRequested=!0:(this.configLifetimeRequested=!1,this.serviceAccountImpersonationLifetime=M4),this.projectNumber=this.getProjectNumber(this.audience),this.supplierContext={audience:this.audience,subjectTokenType:this.subjectTokenType,transporter:this.transporter}}getServiceAccountEmail(){if(this.serviceAccountImpersonationUrl){if(this.serviceAccountImpersonationUrl.length>256)throw new RangeError(`URL is too long: ${this.serviceAccountImpersonationUrl}`);return/serviceAccounts\/(?<email>[^:]+):generateAccessToken$/.exec(this.serviceAccountImpersonationUrl)?.groups?.email||null}return null}setCredentials(t){super.setCredentials(t),this.cachedAccessToken=t}async getAccessToken(){return(!this.cachedAccessToken||this.isExpired(this.cachedAccessToken))&&await this.refreshAccessTokenAsync(),{token:this.cachedAccessToken.access_token,res:this.cachedAccessToken.res}}async getRequestHeaders(){let t=await this.getAccessToken(),n=new Headers({authorization:`Bearer ${t.token}`});return this.addSharedMetadataHeaders(n)}request(t,n){if(n)this.requestAsync(t).then(o=>n(null,o),o=>n(o,o.response));else return this.requestAsync(t)}async getProjectId(){let t=this.projectNumber||this.workforcePoolUserProject;if(this.projectId)return this.projectId;if(t){let n=await this.getRequestHeaders(),o={...e.RETRY_CONFIG,headers:n,url:`${this.cloudResourceManagerURL.toString()}${t}`};oE.AuthClient.setMethodName(o,"getProjectId");let r=await this.transporter.request(o);return this.projectId=r.data.projectId,this.projectId}return null}async requestAsync(t,n=!1){let o;try{let r=await this.getRequestHeaders();t.headers=$4.Gaxios.mergeHeaders(t.headers),this.addUserProjectAndAuthHeaders(t.headers,r),o=await this.transporter.request(t)}catch(r){let i=r.response;if(i){let s=i.status,u=i.config.data instanceof z4.Readable;if(!n&&(s===401||s===403)&&!u&&this.forceRefreshOnFailure)return await this.refreshAccessTokenAsync(),await this.requestAsync(t,!0)}throw r}return o}async refreshAccessTokenAsync(){this.#e=this.#e||this.#t();try{return await this.#e}finally{this.#e=null}}async#t(){let t=await this.retrieveSubjectToken(),n={grantType:U4,audience:this.audience,requestedTokenType:j4,subjectToken:t,subjectTokenType:this.subjectTokenType,scope:this.serviceAccountImpersonationUrl?[iE]:this.getScopesArray()},o=!this.clientAuth&&this.workforcePoolUserProject?{userProject:this.workforcePoolUserProject}:void 0,r=new Headers({"x-goog-api-client":this.getMetricsHeaderValue()}),i=await this.stsCredential.exchangeToken(n,r,o);return this.serviceAccountImpersonationUrl?this.cachedAccessToken=await this.getImpersonatedAccessToken(i.access_token):i.expires_in?this.cachedAccessToken={access_token:i.access_token,expiry_date:new Date().getTime()+i.expires_in*1e3,res:i.res}:this.cachedAccessToken={access_token:i.access_token,res:i.res},this.credentials={},Object.assign(this.credentials,this.cachedAccessToken),delete this.credentials.res,this.emit("tokens",{refresh_token:null,expiry_date:this.cachedAccessToken.expiry_date,access_token:this.cachedAccessToken.access_token,token_type:"Bearer",id_token:null}),this.cachedAccessToken}getProjectNumber(t){let n=t.match(/\/projects\/([^/]+)/);return n?n[1]:null}async getImpersonatedAccessToken(t){let n={...e.RETRY_CONFIG,url:this.serviceAccountImpersonationUrl,method:"POST",headers:{"content-type":"application/json",authorization:`Bearer ${t}`},data:{scope:this.getScopesArray(),lifetime:this.serviceAccountImpersonationLifetime+"s"}};oE.AuthClient.setMethodName(n,"getImpersonatedAccessToken");let o=await this.transporter.request(n),r=o.data;return{access_token:r.accessToken,expiry_date:new Date(r.expireTime).getTime(),res:o}}isExpired(t){let n=new Date().getTime();return t.expiry_date?n>=t.expiry_date-this.eagerRefreshThresholdMillis:!1}getScopesArray(){return typeof this.scopes=="string"?[this.scopes]:this.scopes||[iE]}getMetricsHeaderValue(){let t=process.version.replace(/^v/,""),n=this.serviceAccountImpersonationUrl!==void 0,o=this.credentialSourceType?this.credentialSourceType:"unknown";return`gl-node/${t} auth/${D4.pkg.version} google-byoid-sdk source/${o} sa-impersonation/${n} config-lifetime/${this.configLifetimeRequested}`}getTokenUrl(){return this.tokenUrl}};$r.BaseExternalAccountClient=aE});var pC=B(Uf=>{"use strict";Object.defineProperty(Uf,"__esModule",{value:!0});Uf.FileSubjectTokenSupplier=void 0;var cE=require("util"),uE=require("fs"),B4=(0,cE.promisify)(uE.readFile??(()=>{})),q4=(0,cE.promisify)(uE.realpath??(()=>{})),V4=(0,cE.promisify)(uE.lstat??(()=>{})),sE=class{static{a(this,"FileSubjectTokenSupplier")}filePath;formatType;subjectTokenFieldName;constructor(t){this.filePath=t.filePath,this.formatType=t.formatType,this.subjectTokenFieldName=t.subjectTokenFieldName}async getSubjectToken(){let t=this.filePath;try{if(t=await q4(t),!(await V4(t)).isFile())throw new Error}catch(r){throw r instanceof Error&&(r.message=`The file at ${t} does not exist, or it is not a file. ${r.message}`),r}let n,o=await B4(t,{encoding:"utf8"});if(this.formatType==="text"?n=o:this.formatType==="json"&&this.subjectTokenFieldName&&(n=JSON.parse(o)[this.subjectTokenFieldName]),!n)throw new Error("Unable to parse the subject_token from the credential_source file");return n}};Uf.FileSubjectTokenSupplier=sE});var fC=B(jf=>{"use strict";Object.defineProperty(jf,"__esModule",{value:!0});jf.UrlSubjectTokenSupplier=void 0;var Z4=yr(),lE=class{static{a(this,"UrlSubjectTokenSupplier")}url;headers;formatType;subjectTokenFieldName;additionalGaxiosOptions;constructor(t){this.url=t.url,this.formatType=t.formatType,this.subjectTokenFieldName=t.subjectTokenFieldName,this.headers=t.headers,this.additionalGaxiosOptions=t.additionalGaxiosOptions}async getSubjectToken(t){let n={...this.additionalGaxiosOptions,url:this.url,method:"GET",headers:this.headers};Z4.AuthClient.setMethodName(n,"getSubjectToken");let o;if(this.formatType==="text"?o=(await t.transporter.request(n)).data:this.formatType==="json"&&this.subjectTokenFieldName&&(o=(await t.transporter.request(n)).data[this.subjectTokenFieldName]),!o)throw new Error("Unable to parse the subject_token from the credential_source URL");return o}};jf.UrlSubjectTokenSupplier=lE});var mC=B(Er=>{"use strict";Object.defineProperty(Er,"__esModule",{value:!0});Er.CertificateSubjectTokenSupplier=Er.InvalidConfigurationError=Er.CertificateSourceUnavailableError=Er.CERTIFICATE_CONFIGURATION_ENV_VARIABLE=void 0;var Mf=Wr(),Lf=require("fs"),Ff=require("crypto"),H4=require("https");Er.CERTIFICATE_CONFIGURATION_ENV_VARIABLE="GOOGLE_API_CERTIFICATE_CONFIG";var pn=class extends Error{static{a(this,"CertificateSourceUnavailableError")}constructor(t){super(t),this.name="CertificateSourceUnavailableError"}};Er.CertificateSourceUnavailableError=pn;var zr=class extends Error{static{a(this,"InvalidConfigurationError")}constructor(t){super(t),this.name="InvalidConfigurationError"}};Er.InvalidConfigurationError=zr;var dE=class{static{a(this,"CertificateSubjectTokenSupplier")}certificateConfigPath;trustChainPath;cert;key;constructor(t){if(!t.useDefaultCertificateConfig&&!t.certificateConfigLocation)throw new zr("Either `useDefaultCertificateConfig` must be true or a `certificateConfigLocation` must be provided.");if(t.useDefaultCertificateConfig&&t.certificateConfigLocation)throw new zr("Both `useDefaultCertificateConfig` and `certificateConfigLocation` cannot be provided.");this.trustChainPath=t.trustChainPath,this.certificateConfigPath=t.certificateConfigLocation??""}async createMtlsHttpsAgent(){if(!this.key||!this.cert)throw new zr("Cannot create mTLS Agent with missing certificate or key");return new H4.Agent({key:this.key,cert:this.cert})}async getSubjectToken(){this.certificateConfigPath=await this.#e();let{certPath:t,keyPath:n}=await this.#t();return{cert:this.cert,key:this.key}=await this.#r(t,n),await this.#n(this.cert)}async#e(){let t=this.certificateConfigPath;if(t){if(await(0,Mf.isValidFile)(t))return t;throw new pn(`Provided certificate config path is invalid: ${t}`)}let n=process.env[Er.CERTIFICATE_CONFIGURATION_ENV_VARIABLE];if(n){if(await(0,Mf.isValidFile)(n))return n;throw new pn(`Path from environment variable "${Er.CERTIFICATE_CONFIGURATION_ENV_VARIABLE}" is invalid: ${n}`)}let o=(0,Mf.getWellKnownCertificateConfigFileLocation)();if(await(0,Mf.isValidFile)(o))return o;throw new pn(`Could not find certificate configuration file. Searched override path, the "${Er.CERTIFICATE_CONFIGURATION_ENV_VARIABLE}" env var, and the gcloud path (${o}).`)}async#t(){let t=this.certificateConfigPath,n;try{n=await Lf.promises.readFile(t,"utf8")}catch{throw new pn(`Failed to read certificate config file at: ${t}`)}try{let o=JSON.parse(n),r=o?.cert_configs?.workload?.cert_path,i=o?.cert_configs?.workload?.key_path;if(!r||!i)throw new zr(`Certificate config file (${t}) is missing required "cert_path" or "key_path" in the workload config.`);return{certPath:r,keyPath:i}}catch(o){throw o instanceof zr?o:new zr(`Failed to parse certificate config from ${t}: ${o.message}`)}}async#r(t,n){let o,r;try{o=await Lf.promises.readFile(t),new Ff.X509Certificate(o)}catch(i){let s=i instanceof Error?i.message:String(i);throw new pn(`Failed to read certificate file at ${t}: ${s}`)}try{r=await Lf.promises.readFile(n),(0,Ff.createPrivateKey)(r)}catch(i){let s=i instanceof Error?i.message:String(i);throw new pn(`Failed to read private key file at ${n}: ${s}`)}return{cert:o,key:r}}async#n(t){let n=new Ff.X509Certificate(t);if(!this.trustChainPath)return JSON.stringify([n.raw.toString("base64")]);try{let i=((await Lf.promises.readFile(this.trustChainPath,"utf8")).match(/-----BEGIN CERTIFICATE-----[^-]+-----END CERTIFICATE-----/g)??[]).map((d,p)=>{try{return new Ff.X509Certificate(d)}catch(f){let g=f instanceof Error?f.message:String(f);throw new zr(`Failed to parse certificate at index ${p} in trust chain file ${this.trustChainPath}: ${g}`)}}),s=i.findIndex(d=>n.raw.equals(d.raw)),u;if(s===-1)u=[n,...i];else if(s===0)u=i;else throw new zr(`Leaf certificate exists in the trust chain but is not the first entry (found at index ${s}).`);return JSON.stringify(u.map(d=>d.raw.toString("base64")))}catch(o){if(o instanceof zr)throw o;let r=o instanceof Error?o.message:String(o);throw new pn(`Failed to process certificate chain from ${this.trustChainPath}: ${r}`)}}};Er.CertificateSubjectTokenSupplier=dE});var mE=B(Bf=>{"use strict";Object.defineProperty(Bf,"__esModule",{value:!0});Bf.IdentityPoolClient=void 0;var G4=yo(),pE=Wr(),W4=pC(),J4=fC(),hC=mC(),K4=Df(),gC=kt(),fE=class e extends G4.BaseExternalAccountClient{static{a(this,"IdentityPoolClient")}subjectTokenSupplier;constructor(t){super(t);let n=(0,pE.originalOrCamelOptions)(t),o=n.get("credential_source"),r=n.get("subject_token_supplier");if(!o&&!r)throw new Error("A credential source or subject token supplier must be specified.");if(o&&r)throw new Error("Only one of credential source or subject token supplier can be specified.");if(r)this.subjectTokenSupplier=r,this.credentialSourceType="programmatic";else{let i=(0,pE.originalOrCamelOptions)(o),s=(0,pE.originalOrCamelOptions)(i.get("format")),u=s.get("type")||"text",d=s.get("subject_token_field_name");if(u!=="json"&&u!=="text")throw new Error(`Invalid credential_source format "${u}"`);if(u==="json"&&!d)throw new Error("Missing subject_token_field_name for JSON credential_source format");let p=i.get("file"),f=i.get("url"),g=i.get("certificate"),y=i.get("headers");if(p&&f||f&&g||p&&g)throw new Error('No valid Identity Pool "credential_source" provided, must be either file, url, or certificate.');if(p)this.credentialSourceType="file",this.subjectTokenSupplier=new W4.FileSubjectTokenSupplier({filePath:p,formatType:u,subjectTokenFieldName:d});else if(f)this.credentialSourceType="url",this.subjectTokenSupplier=new J4.UrlSubjectTokenSupplier({url:f,formatType:u,subjectTokenFieldName:d,headers:y,additionalGaxiosOptions:e.RETRY_CONFIG});else if(g){this.credentialSourceType="certificate";let h=new hC.CertificateSubjectTokenSupplier({useDefaultCertificateConfig:g.use_default_certificate_config,certificateConfigLocation:g.certificate_config_location,trustChainPath:g.trust_chain_path});this.subjectTokenSupplier=h}else throw new Error('No valid Identity Pool "credential_source" provided, must be either file, url, or certificate.')}}async retrieveSubjectToken(){let t=await this.subjectTokenSupplier.getSubjectToken(this.supplierContext);if(this.subjectTokenSupplier instanceof hC.CertificateSubjectTokenSupplier){let n=await this.subjectTokenSupplier.createMtlsHttpsAgent();this.stsCredential=new K4.StsCredentials({tokenExchangeEndpoint:this.getTokenUrl(),clientAuthentication:this.clientAuth,transporter:new gC.Gaxios({agent:n})}),this.transporter=new gC.Gaxios({...this.transporter.defaults||{},agent:n})}return t}};Bf.IdentityPoolClient=fE});var gE=B(Vf=>{"use strict";Object.defineProperty(Vf,"__esModule",{value:!0});Vf.AwsRequestSigner=void 0;var qf=kt(),_C=eu(),yC="AWS4-HMAC-SHA256",X4="aws4_request",hE=class{static{a(this,"AwsRequestSigner")}getCredentials;region;crypto;constructor(t,n){this.getCredentials=t,this.region=n,this.crypto=(0,_C.createCrypto)()}async getRequestOptions(t){if(!t.url)throw new RangeError('"url" is required in "amzOptions"');let n=typeof t.data=="object"?JSON.stringify(t.data):t.data,o=t.url,r=t.method||"GET",i=t.body||n,s=t.headers,u=await this.getCredentials(),d=new URL(o);if(typeof i!="string"&&i!==void 0)throw new TypeError(`'requestPayload' is expected to be a string if provided. Got: ${i}`);let p=await Y4({crypto:this.crypto,host:d.host,canonicalUri:d.pathname,canonicalQuerystring:d.search.slice(1),method:r,region:this.region,securityCredentials:u,requestPayload:i,additionalAmzHeaders:s}),f=qf.Gaxios.mergeHeaders(p.amzDate?{"x-amz-date":p.amzDate}:{},{authorization:p.authorizationHeader,host:d.host},s||{});u.token&&qf.Gaxios.mergeHeaders(f,{"x-amz-security-token":u.token});let g={url:o,method:r,headers:f};return i!==void 0&&(g.body=i),g}};Vf.AwsRequestSigner=hE;async function du(e,t,n){return await e.signWithHmacSha256(t,n)}a(du,"sign");async function Q4(e,t,n,o,r){let i=await du(e,`AWS4${t}`,n),s=await du(e,i,o),u=await du(e,s,r);return await du(e,u,"aws4_request")}a(Q4,"getSigningKey");async function Y4(e){let t=qf.Gaxios.mergeHeaders(e.additionalAmzHeaders),n=e.requestPayload||"",o=e.host.split(".")[0],r=new Date,i=r.toISOString().replace(/[-:]/g,"").replace(/\.[0-9]+/,""),s=r.toISOString().replace(/[-]/g,"").replace(/T.*/,"");e.securityCredentials.token&&t.set("x-amz-security-token",e.securityCredentials.token);let u=qf.Gaxios.mergeHeaders({host:e.host},t.has("date")?{}:{"x-amz-date":i},t),d="",p=[...u.keys()].sort();p.forEach($=>{d+=`${$}:${u.get($)}
41
+ `});let f=p.join(";"),g=await e.crypto.sha256DigestHex(n),y=`${e.method.toUpperCase()}
42
+ ${e.canonicalUri}
43
+ ${e.canonicalQuerystring}
44
+ ${d}
45
+ ${f}
46
+ ${g}`,h=`${s}/${e.region}/${o}/${X4}`,_=`${yC}
47
+ ${i}
48
48
  ${h}
49
- `+await t.crypto.sha256DigestHex(P),T=await F0(t.crypto,t.securityCredentials.secretAccessKey,c,t.region,n),E=await da(t.crypto,T,b),w=`${fP} Credential=${t.securityCredentials.accessKeyId}/${h}, SignedHeaders=${m}, Signature=${(0,mP.fromArrayBufferToHex)(E)}`;return{amzDate:e.has("date")?void 0:u,authorizationHeader:w,canonicalQuerystring:t.canonicalQuerystring}}o(B0,"generateAuthenticationHeaderMap")});var hP=L(Ru=>{"use strict";Object.defineProperty(Ru,"__esModule",{value:!0});Ru.DefaultAwsSecurityCredentialsSupplier=void 0;var Iu=Zt(),bp=class{static{o(this,"DefaultAwsSecurityCredentialsSupplier")}regionUrl;securityCredentialsUrl;imdsV2SessionTokenUrl;additionalGaxiosOptions;constructor(e){this.regionUrl=e.regionUrl,this.securityCredentialsUrl=e.securityCredentialsUrl,this.imdsV2SessionTokenUrl=e.imdsV2SessionTokenUrl,this.additionalGaxiosOptions=e.additionalGaxiosOptions}async getAwsRegion(e){if(this.#n)return this.#n;let r=new Headers;if(!this.#n&&this.imdsV2SessionTokenUrl&&r.set("x-aws-ec2-metadata-token",await this.#e(e.transporter)),!this.regionUrl)throw new RangeError('Unable to determine AWS region due to missing "options.credential_source.region_url"');let n={...this.additionalGaxiosOptions,url:this.regionUrl,method:"GET",headers:r};Iu.AuthClient.setMethodName(n,"getAwsRegion");let i=await e.transporter.request(n);return i.data.substr(0,i.data.length-1)}async getAwsSecurityCredentials(e){if(this.#o)return this.#o;let r=new Headers;this.imdsV2SessionTokenUrl&&r.set("x-aws-ec2-metadata-token",await this.#e(e.transporter));let n=await this.#t(r,e.transporter),i=await this.#r(n,r,e.transporter);return{accessKeyId:i.AccessKeyId,secretAccessKey:i.SecretAccessKey,token:i.Token}}async#e(e){let r={...this.additionalGaxiosOptions,url:this.imdsV2SessionTokenUrl,method:"PUT",headers:{"x-aws-ec2-metadata-token-ttl-seconds":"300"}};return Iu.AuthClient.setMethodName(r,"#getImdsV2SessionToken"),(await e.request(r)).data}async#t(e,r){if(!this.securityCredentialsUrl)throw new Error('Unable to determine AWS role name due to missing "options.credential_source.url"');let n={...this.additionalGaxiosOptions,url:this.securityCredentialsUrl,method:"GET",headers:e};return Iu.AuthClient.setMethodName(n,"#getAwsRoleName"),(await r.request(n)).data}async#r(e,r,n){let i={...this.additionalGaxiosOptions,url:`${this.securityCredentialsUrl}/${e}`,headers:r};return Iu.AuthClient.setMethodName(i,"#retrieveAwsSecurityCredentials"),(await n.request(i)).data}get#n(){return process.env.AWS_REGION||process.env.AWS_DEFAULT_REGION||null}get#o(){return process.env.AWS_ACCESS_KEY_ID&&process.env.AWS_SECRET_ACCESS_KEY?{accessKeyId:process.env.AWS_ACCESS_KEY_ID,secretAccessKey:process.env.AWS_SECRET_ACCESS_KEY,token:process.env.AWS_SESSION_TOKEN}:null}};Ru.DefaultAwsSecurityCredentialsSupplier=bp});var Ep=L(Cu=>{"use strict";Object.defineProperty(Cu,"__esModule",{value:!0});Cu.AwsClient=void 0;var q0=_p(),V0=$n(),H0=hP(),gP=vr(),G0=_t(),vp=class t extends V0.BaseExternalAccountClient{static{o(this,"AwsClient")}environmentId;awsSecurityCredentialsSupplier;regionalCredVerificationUrl;awsRequestSigner;region;static#e="https://sts.{region}.amazonaws.com?Action=GetCallerIdentity&Version=2011-06-15";static AWS_EC2_METADATA_IPV4_ADDRESS="169.254.169.254";static AWS_EC2_METADATA_IPV6_ADDRESS="fd00:ec2::254";constructor(e){super(e);let r=(0,gP.originalOrCamelOptions)(e),n=r.get("credential_source"),i=r.get("aws_security_credentials_supplier");if(!n&&!i)throw new Error("A credential source or AWS security credentials supplier must be specified.");if(n&&i)throw new Error("Only one of credential source or AWS security credentials supplier can be specified.");if(i)this.awsSecurityCredentialsSupplier=i,this.regionalCredVerificationUrl=t.#e,this.credentialSourceType="programmatic";else{let u=(0,gP.originalOrCamelOptions)(n);this.environmentId=u.get("environment_id");let c=u.get("region_url"),l=u.get("url"),p=u.get("imdsv2_session_token_url");this.awsSecurityCredentialsSupplier=new H0.DefaultAwsSecurityCredentialsSupplier({regionUrl:c,securityCredentialsUrl:l,imdsV2SessionTokenUrl:p}),this.regionalCredVerificationUrl=u.get("regional_cred_verification_url"),this.credentialSourceType="aws",this.validateEnvironmentId()}this.awsRequestSigner=null,this.region=""}validateEnvironmentId(){let e=this.environmentId?.match(/^(aws)(\d+)$/);if(!e||!this.regionalCredVerificationUrl)throw new Error('No valid AWS "credential_source" provided');if(parseInt(e[2],10)!==1)throw new Error(`aws version "${e[2]}" is not supported in the current build.`)}async retrieveSubjectToken(){this.awsRequestSigner||(this.region=await this.awsSecurityCredentialsSupplier.getAwsRegion(this.supplierContext),this.awsRequestSigner=new q0.AwsRequestSigner(async()=>this.awsSecurityCredentialsSupplier.getAwsSecurityCredentials(this.supplierContext),this.region));let e=await this.awsRequestSigner.getRequestOptions({...t.RETRY_CONFIG,url:this.regionalCredVerificationUrl.replace("{region}",this.region),method:"POST"}),r=[];return G0.Gaxios.mergeHeaders({"x-goog-cloud-target-resource":this.audience},e.headers).forEach((i,u)=>r.push({key:u,value:i})),encodeURIComponent(JSON.stringify({url:e.url,method:e.method,headers:r}))}};Cu.AwsClient=vp});var xp=L(it=>{"use strict";Object.defineProperty(it,"__esModule",{value:!0});it.InvalidSubjectTokenError=it.InvalidMessageFieldError=it.InvalidCodeFieldError=it.InvalidTokenTypeFieldError=it.InvalidExpirationTimeFieldError=it.InvalidSuccessFieldError=it.InvalidVersionFieldError=it.ExecutableResponseError=it.ExecutableResponse=void 0;var Ou="urn:ietf:params:oauth:token-type:saml2",Pp="urn:ietf:params:oauth:token-type:id_token",Sp="urn:ietf:params:oauth:token-type:jwt",Tp=class{static{o(this,"ExecutableResponse")}version;success;expirationTime;tokenType;errorCode;errorMessage;subjectToken;constructor(e){if(!e.version)throw new ku("Executable response must contain a 'version' field.");if(e.success===void 0)throw new $u("Executable response must contain a 'success' field.");if(this.version=e.version,this.success=e.success,this.success){if(this.expirationTime=e.expiration_time,this.tokenType=e.token_type,this.tokenType!==Ou&&this.tokenType!==Pp&&this.tokenType!==Sp)throw new zu(`Executable response must contain a 'token_type' field when successful and it must be one of ${Pp}, ${Sp}, or ${Ou}.`);if(this.tokenType===Ou){if(!e.saml_response)throw new pa(`Executable response must contain a 'saml_response' field when token_type=${Ou}.`);this.subjectToken=e.saml_response}else{if(!e.id_token)throw new pa(`Executable response must contain a 'id_token' field when token_type=${Pp} or ${Sp}.`);this.subjectToken=e.id_token}}else{if(!e.code)throw new Nu("Executable response must contain a 'code' field when unsuccessful.");if(!e.message)throw new Du("Executable response must contain a 'message' field when unsuccessful.");this.errorCode=e.code,this.errorMessage=e.message}}isValid(){return!this.isExpired()&&this.success}isExpired(){return this.expirationTime!==void 0&&this.expirationTime<Math.round(Date.now()/1e3)}};it.ExecutableResponse=Tp;var Mr=class extends Error{static{o(this,"ExecutableResponseError")}constructor(e){super(e),Object.setPrototypeOf(this,new.target.prototype)}};it.ExecutableResponseError=Mr;var ku=class extends Mr{static{o(this,"InvalidVersionFieldError")}};it.InvalidVersionFieldError=ku;var $u=class extends Mr{static{o(this,"InvalidSuccessFieldError")}};it.InvalidSuccessFieldError=$u;var wp=class extends Mr{static{o(this,"InvalidExpirationTimeFieldError")}};it.InvalidExpirationTimeFieldError=wp;var zu=class extends Mr{static{o(this,"InvalidTokenTypeFieldError")}};it.InvalidTokenTypeFieldError=zu;var Nu=class extends Mr{static{o(this,"InvalidCodeFieldError")}};it.InvalidCodeFieldError=Nu;var Du=class extends Mr{static{o(this,"InvalidMessageFieldError")}};it.InvalidMessageFieldError=Du;var pa=class extends Mr{static{o(this,"InvalidSubjectTokenError")}};it.InvalidSubjectTokenError=pa});var Rp=L(Xo=>{"use strict";Object.defineProperty(Xo,"__esModule",{value:!0});Xo.PluggableAuthHandler=Xo.ExecutableError=void 0;var to=xp(),W0=require("child_process"),Ap=require("fs"),Uu=class extends Error{static{o(this,"ExecutableError")}code;constructor(e,r){super(`The executable failed with exit code: ${r} and error message: ${e}.`),this.code=r,Object.setPrototypeOf(this,new.target.prototype)}};Xo.ExecutableError=Uu;var Ip=class t{static{o(this,"PluggableAuthHandler")}commandComponents;timeoutMillis;outputFile;constructor(e){if(!e.command)throw new Error("No command provided.");if(this.commandComponents=t.parseCommand(e.command),this.timeoutMillis=e.timeoutMillis,!this.timeoutMillis)throw new Error("No timeoutMillis provided.");this.outputFile=e.outputFile}retrieveResponseFromExecutable(e){return new Promise((r,n)=>{let i=W0.spawn(this.commandComponents[0],this.commandComponents.slice(1),{env:{...process.env,...Object.fromEntries(e)}}),u="";i.stdout.on("data",l=>{u+=l}),i.stderr.on("data",l=>{u+=l});let c=setTimeout(()=>(i.removeAllListeners(),i.kill(),n(new Error("The executable failed to finish within the timeout specified."))),this.timeoutMillis);i.on("close",l=>{if(clearTimeout(c),l===0)try{let p=JSON.parse(u),f=new to.ExecutableResponse(p);return r(f)}catch(p){return p instanceof to.ExecutableResponseError?n(p):n(new to.ExecutableResponseError(`The executable returned an invalid response: ${u}`))}else return n(new Uu(u,l.toString()))})})}async retrieveCachedResponse(){if(!this.outputFile||this.outputFile.length===0)return;let e;try{e=await Ap.promises.realpath(this.outputFile)}catch{return}if(!(await Ap.promises.lstat(e)).isFile())return;let r=await Ap.promises.readFile(e,{encoding:"utf8"});if(r!=="")try{let n=JSON.parse(r);return new to.ExecutableResponse(n).isValid()?new to.ExecutableResponse(n):void 0}catch(n){throw n instanceof to.ExecutableResponseError?n:new to.ExecutableResponseError(`The output file contained an invalid response: ${r}`)}}static parseCommand(e){let r=e.match(/(?:[^\s"]+|"[^"]*")+/g);if(!r)throw new Error(`Provided command: "${e}" could not be parsed.`);for(let n=0;n<r.length;n++)r[n][0]==='"'&&r[n].slice(-1)==='"'&&(r[n]=r[n].slice(1,-1));return r}};Xo.PluggableAuthHandler=Ip});var Op=L(ei=>{"use strict";Object.defineProperty(ei,"__esModule",{value:!0});ei.PluggableAuthClient=ei.ExecutableError=void 0;var Z0=$n(),J0=xp(),yP=Rp(),K0=Rp();Object.defineProperty(ei,"ExecutableError",{enumerable:!0,get:o(function(){return K0.ExecutableError},"get")});var Q0=30*1e3,_P=5*1e3,bP=120*1e3,Y0="GOOGLE_EXTERNAL_ACCOUNT_ALLOW_EXECUTABLES",vP=1,Cp=class extends Z0.BaseExternalAccountClient{static{o(this,"PluggableAuthClient")}command;timeoutMillis;outputFile;handler;constructor(e){if(super(e),!e.credential_source.executable)throw new Error('No valid Pluggable Auth "credential_source" provided.');if(this.command=e.credential_source.executable.command,!this.command)throw new Error('No valid Pluggable Auth "credential_source" provided.');if(e.credential_source.executable.timeout_millis===void 0)this.timeoutMillis=Q0;else if(this.timeoutMillis=e.credential_source.executable.timeout_millis,this.timeoutMillis<_P||this.timeoutMillis>bP)throw new Error(`Timeout must be between ${_P} and ${bP} milliseconds.`);this.outputFile=e.credential_source.executable.output_file,this.handler=new yP.PluggableAuthHandler({command:this.command,timeoutMillis:this.timeoutMillis,outputFile:this.outputFile}),this.credentialSourceType="executable"}async retrieveSubjectToken(){if(process.env[Y0]!=="1")throw new Error("Pluggable Auth executables need to be explicitly allowed to run by setting the GOOGLE_EXTERNAL_ACCOUNT_ALLOW_EXECUTABLES environment Variable to 1.");let e;if(this.outputFile&&(e=await this.handler.retrieveCachedResponse()),!e){let r=new Map;r.set("GOOGLE_EXTERNAL_ACCOUNT_AUDIENCE",this.audience),r.set("GOOGLE_EXTERNAL_ACCOUNT_TOKEN_TYPE",this.subjectTokenType),r.set("GOOGLE_EXTERNAL_ACCOUNT_INTERACTIVE","0"),this.outputFile&&r.set("GOOGLE_EXTERNAL_ACCOUNT_OUTPUT_FILE",this.outputFile);let n=this.getServiceAccountEmail();n&&r.set("GOOGLE_EXTERNAL_ACCOUNT_IMPERSONATED_EMAIL",n),e=await this.handler.retrieveResponseFromExecutable(r)}if(e.version>vP)throw new Error(`Version of executable is not currently supported, maximum supported version is ${vP}.`);if(!e.success)throw new yP.ExecutableError(e.errorMessage,e.errorCode);if(this.outputFile&&!e.expirationTime)throw new J0.InvalidExpirationTimeFieldError("The executable response must contain the `expiration_time` field for successful responses when an output_file has been specified in the configuration.");if(e.isExpired())throw new Error("Executable response is expired.");return e.subjectToken}};ei.PluggableAuthClient=Cp});var $p=L(ju=>{"use strict";Object.defineProperty(ju,"__esModule",{value:!0});ju.ExternalAccountClient=void 0;var X0=$n(),e$=gp(),t$=Ep(),r$=Op(),kp=class{static{o(this,"ExternalAccountClient")}constructor(){throw new Error("ExternalAccountClients should be initialized via: ExternalAccountClient.fromJSON(), directly via explicit constructors, eg. new AwsClient(options), new IdentityPoolClient(options), newPluggableAuthClientOptions, or via new GoogleAuth(options).getClient()")}static fromJSON(e){return e&&e.type===X0.EXTERNAL_ACCOUNT_TYPE?e.credential_source?.environment_id?new t$.AwsClient(e):e.credential_source?.executable?new r$.PluggableAuthClient(e):new e$.IdentityPoolClient(e):null}};ju.ExternalAccountClient=kp});var Dp=L(ti=>{"use strict";Object.defineProperty(ti,"__esModule",{value:!0});ti.ExternalAccountAuthorizedUserClient=ti.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE=void 0;var PP=Zt(),EP=op(),SP=_t(),n$=require("stream"),o$=$n();ti.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE="external_account_authorized_user";var i$="https://sts.{universeDomain}/v1/oauthtoken",zp=class t extends EP.OAuthClientAuthHandler{static{o(this,"ExternalAccountAuthorizedUserHandler")}#e;constructor(e){super(e),this.#e=e.tokenRefreshEndpoint}async refreshToken(e,r){let n={...t.RETRY_CONFIG,url:this.#e,method:"POST",headers:r,data:new URLSearchParams({grant_type:"refresh_token",refresh_token:e})};PP.AuthClient.setMethodName(n,"refreshToken"),this.applyClientAuthenticationOptions(n);try{let i=await this.transporter.request(n),u=i.data;return u.res=i,u}catch(i){throw i instanceof SP.GaxiosError&&i.response?(0,EP.getErrorFromOAuthErrorResponse)(i.response.data,i):i}}},Np=class extends PP.AuthClient{static{o(this,"ExternalAccountAuthorizedUserClient")}cachedAccessToken;externalAccountAuthorizedUserHandler;refreshToken;constructor(e){super(e),e.universe_domain&&(this.universeDomain=e.universe_domain),this.refreshToken=e.refresh_token;let r={confidentialClientType:"basic",clientId:e.client_id,clientSecret:e.client_secret};this.externalAccountAuthorizedUserHandler=new zp({tokenRefreshEndpoint:e.token_url??i$.replace("{universeDomain}",this.universeDomain),transporter:this.transporter,clientAuthentication:r}),this.cachedAccessToken=null,this.quotaProjectId=e.quota_project_id,typeof e?.eagerRefreshThresholdMillis!="number"?this.eagerRefreshThresholdMillis=o$.EXPIRATION_TIME_OFFSET:this.eagerRefreshThresholdMillis=e.eagerRefreshThresholdMillis,this.forceRefreshOnFailure=!!e?.forceRefreshOnFailure}async getAccessToken(){return(!this.cachedAccessToken||this.isExpired(this.cachedAccessToken))&&await this.refreshAccessTokenAsync(),{token:this.cachedAccessToken.access_token,res:this.cachedAccessToken.res}}async getRequestHeaders(){let e=await this.getAccessToken(),r=new Headers({authorization:`Bearer ${e.token}`});return this.addSharedMetadataHeaders(r)}request(e,r){if(r)this.requestAsync(e).then(n=>r(null,n),n=>r(n,n.response));else return this.requestAsync(e)}async requestAsync(e,r=!1){let n;try{let i=await this.getRequestHeaders();e.headers=SP.Gaxios.mergeHeaders(e.headers),this.addUserProjectAndAuthHeaders(e.headers,i),n=await this.transporter.request(e)}catch(i){let u=i.response;if(u){let c=u.status,l=u.config.data instanceof n$.Readable;if(!r&&(c===401||c===403)&&!l&&this.forceRefreshOnFailure)return await this.refreshAccessTokenAsync(),await this.requestAsync(e,!0)}throw i}return n}async refreshAccessTokenAsync(){let e=await this.externalAccountAuthorizedUserHandler.refreshToken(this.refreshToken);return this.cachedAccessToken={access_token:e.access_token,expiry_date:new Date().getTime()+e.expires_in*1e3,res:e.res},e.refresh_token!==void 0&&(this.refreshToken=e.refresh_token),this.cachedAccessToken}isExpired(e){let r=new Date().getTime();return e.expiry_date?r>=e.expiry_date-this.eagerRefreshThresholdMillis:!1}};ti.ExternalAccountAuthorizedUserClient=Np});var AP=L(Tr=>{"use strict";Object.defineProperty(Tr,"__esModule",{value:!0});Tr.GoogleAuth=Tr.GoogleAuthExceptionMessages=void 0;var a$=require("child_process"),fa=require("fs"),s$=_t(),ma=Xi(),u$=require("os"),Up=require("path"),c$=ea(),l$=Cd(),d$=kd(),p$=$d(),ri=Yd(),TP=ep(),ni=rp(),f$=$p(),ha=$n(),jp=Zt(),wP=Dp(),xP=vr();Tr.GoogleAuthExceptionMessages={API_KEY_WITH_CREDENTIALS:"API Keys and Credentials are mutually exclusive authentication methods and cannot be used together.",NO_PROJECT_ID_FOUND:`Unable to detect a Project Id in the current environment.
49
+ `+await e.crypto.sha256DigestHex(y),P=await Q4(e.crypto,e.securityCredentials.secretAccessKey,s,e.region,o),x=await du(e.crypto,P,_),S=`${yC} Credential=${e.securityCredentials.accessKeyId}/${h}, SignedHeaders=${f}, Signature=${(0,_C.fromArrayBufferToHex)(x)}`;return{amzDate:t.has("date")?void 0:i,authorizationHeader:S,canonicalQuerystring:e.canonicalQuerystring}}a(Y4,"generateAuthenticationHeaderMap")});var bC=B(Hf=>{"use strict";Object.defineProperty(Hf,"__esModule",{value:!0});Hf.DefaultAwsSecurityCredentialsSupplier=void 0;var Zf=yr(),yE=class{static{a(this,"DefaultAwsSecurityCredentialsSupplier")}regionUrl;securityCredentialsUrl;imdsV2SessionTokenUrl;additionalGaxiosOptions;constructor(t){this.regionUrl=t.regionUrl,this.securityCredentialsUrl=t.securityCredentialsUrl,this.imdsV2SessionTokenUrl=t.imdsV2SessionTokenUrl,this.additionalGaxiosOptions=t.additionalGaxiosOptions}async getAwsRegion(t){if(this.#n)return this.#n;let n=new Headers;if(!this.#n&&this.imdsV2SessionTokenUrl&&n.set("x-aws-ec2-metadata-token",await this.#e(t.transporter)),!this.regionUrl)throw new RangeError('Unable to determine AWS region due to missing "options.credential_source.region_url"');let o={...this.additionalGaxiosOptions,url:this.regionUrl,method:"GET",headers:n};Zf.AuthClient.setMethodName(o,"getAwsRegion");let r=await t.transporter.request(o);return r.data.substr(0,r.data.length-1)}async getAwsSecurityCredentials(t){if(this.#o)return this.#o;let n=new Headers;this.imdsV2SessionTokenUrl&&n.set("x-aws-ec2-metadata-token",await this.#e(t.transporter));let o=await this.#t(n,t.transporter),r=await this.#r(o,n,t.transporter);return{accessKeyId:r.AccessKeyId,secretAccessKey:r.SecretAccessKey,token:r.Token}}async#e(t){let n={...this.additionalGaxiosOptions,url:this.imdsV2SessionTokenUrl,method:"PUT",headers:{"x-aws-ec2-metadata-token-ttl-seconds":"300"}};return Zf.AuthClient.setMethodName(n,"#getImdsV2SessionToken"),(await t.request(n)).data}async#t(t,n){if(!this.securityCredentialsUrl)throw new Error('Unable to determine AWS role name due to missing "options.credential_source.url"');let o={...this.additionalGaxiosOptions,url:this.securityCredentialsUrl,method:"GET",headers:t};return Zf.AuthClient.setMethodName(o,"#getAwsRoleName"),(await n.request(o)).data}async#r(t,n,o){let r={...this.additionalGaxiosOptions,url:`${this.securityCredentialsUrl}/${t}`,headers:n};return Zf.AuthClient.setMethodName(r,"#retrieveAwsSecurityCredentials"),(await o.request(r)).data}get#n(){return process.env.AWS_REGION||process.env.AWS_DEFAULT_REGION||null}get#o(){return process.env.AWS_ACCESS_KEY_ID&&process.env.AWS_SECRET_ACCESS_KEY?{accessKeyId:process.env.AWS_ACCESS_KEY_ID,secretAccessKey:process.env.AWS_SECRET_ACCESS_KEY,token:process.env.AWS_SESSION_TOKEN}:null}};Hf.DefaultAwsSecurityCredentialsSupplier=yE});var bE=B(Gf=>{"use strict";Object.defineProperty(Gf,"__esModule",{value:!0});Gf.AwsClient=void 0;var e6=gE(),t6=yo(),r6=bC(),vC=Wr(),n6=kt(),_E=class e extends t6.BaseExternalAccountClient{static{a(this,"AwsClient")}environmentId;awsSecurityCredentialsSupplier;regionalCredVerificationUrl;awsRequestSigner;region;static#e="https://sts.{region}.amazonaws.com?Action=GetCallerIdentity&Version=2011-06-15";static AWS_EC2_METADATA_IPV4_ADDRESS="169.254.169.254";static AWS_EC2_METADATA_IPV6_ADDRESS="fd00:ec2::254";constructor(t){super(t);let n=(0,vC.originalOrCamelOptions)(t),o=n.get("credential_source"),r=n.get("aws_security_credentials_supplier");if(!o&&!r)throw new Error("A credential source or AWS security credentials supplier must be specified.");if(o&&r)throw new Error("Only one of credential source or AWS security credentials supplier can be specified.");if(r)this.awsSecurityCredentialsSupplier=r,this.regionalCredVerificationUrl=e.#e,this.credentialSourceType="programmatic";else{let i=(0,vC.originalOrCamelOptions)(o);this.environmentId=i.get("environment_id");let s=i.get("region_url"),u=i.get("url"),d=i.get("imdsv2_session_token_url");this.awsSecurityCredentialsSupplier=new r6.DefaultAwsSecurityCredentialsSupplier({regionUrl:s,securityCredentialsUrl:u,imdsV2SessionTokenUrl:d}),this.regionalCredVerificationUrl=i.get("regional_cred_verification_url"),this.credentialSourceType="aws",this.validateEnvironmentId()}this.awsRequestSigner=null,this.region=""}validateEnvironmentId(){let t=this.environmentId?.match(/^(aws)(\d+)$/);if(!t||!this.regionalCredVerificationUrl)throw new Error('No valid AWS "credential_source" provided');if(parseInt(t[2],10)!==1)throw new Error(`aws version "${t[2]}" is not supported in the current build.`)}async retrieveSubjectToken(){this.awsRequestSigner||(this.region=await this.awsSecurityCredentialsSupplier.getAwsRegion(this.supplierContext),this.awsRequestSigner=new e6.AwsRequestSigner(async()=>this.awsSecurityCredentialsSupplier.getAwsSecurityCredentials(this.supplierContext),this.region));let t=await this.awsRequestSigner.getRequestOptions({...e.RETRY_CONFIG,url:this.regionalCredVerificationUrl.replace("{region}",this.region),method:"POST"}),n=[];return n6.Gaxios.mergeHeaders({"x-goog-cloud-target-resource":this.audience},t.headers).forEach((r,i)=>n.push({key:i,value:r})),encodeURIComponent(JSON.stringify({url:t.url,method:t.method,headers:n}))}};Gf.AwsClient=_E});var xE=B(ft=>{"use strict";Object.defineProperty(ft,"__esModule",{value:!0});ft.InvalidSubjectTokenError=ft.InvalidMessageFieldError=ft.InvalidCodeFieldError=ft.InvalidTokenTypeFieldError=ft.InvalidExpirationTimeFieldError=ft.InvalidSuccessFieldError=ft.InvalidVersionFieldError=ft.ExecutableResponseError=ft.ExecutableResponse=void 0;var Wf="urn:ietf:params:oauth:token-type:saml2",vE="urn:ietf:params:oauth:token-type:id_token",EE="urn:ietf:params:oauth:token-type:jwt",SE=class{static{a(this,"ExecutableResponse")}version;success;expirationTime;tokenType;errorCode;errorMessage;subjectToken;constructor(t){if(!t.version)throw new Jf("Executable response must contain a 'version' field.");if(t.success===void 0)throw new Kf("Executable response must contain a 'success' field.");if(this.version=t.version,this.success=t.success,this.success){if(this.expirationTime=t.expiration_time,this.tokenType=t.token_type,this.tokenType!==Wf&&this.tokenType!==vE&&this.tokenType!==EE)throw new Xf(`Executable response must contain a 'token_type' field when successful and it must be one of ${vE}, ${EE}, or ${Wf}.`);if(this.tokenType===Wf){if(!t.saml_response)throw new pu(`Executable response must contain a 'saml_response' field when token_type=${Wf}.`);this.subjectToken=t.saml_response}else{if(!t.id_token)throw new pu(`Executable response must contain a 'id_token' field when token_type=${vE} or ${EE}.`);this.subjectToken=t.id_token}}else{if(!t.code)throw new Qf("Executable response must contain a 'code' field when unsuccessful.");if(!t.message)throw new Yf("Executable response must contain a 'message' field when unsuccessful.");this.errorCode=t.code,this.errorMessage=t.message}}isValid(){return!this.isExpired()&&this.success}isExpired(){return this.expirationTime!==void 0&&this.expirationTime<Math.round(Date.now()/1e3)}};ft.ExecutableResponse=SE;var fn=class extends Error{static{a(this,"ExecutableResponseError")}constructor(t){super(t),Object.setPrototypeOf(this,new.target.prototype)}};ft.ExecutableResponseError=fn;var Jf=class extends fn{static{a(this,"InvalidVersionFieldError")}};ft.InvalidVersionFieldError=Jf;var Kf=class extends fn{static{a(this,"InvalidSuccessFieldError")}};ft.InvalidSuccessFieldError=Kf;var PE=class extends fn{static{a(this,"InvalidExpirationTimeFieldError")}};ft.InvalidExpirationTimeFieldError=PE;var Xf=class extends fn{static{a(this,"InvalidTokenTypeFieldError")}};ft.InvalidTokenTypeFieldError=Xf;var Qf=class extends fn{static{a(this,"InvalidCodeFieldError")}};ft.InvalidCodeFieldError=Qf;var Yf=class extends fn{static{a(this,"InvalidMessageFieldError")}};ft.InvalidMessageFieldError=Yf;var pu=class extends fn{static{a(this,"InvalidSubjectTokenError")}};ft.InvalidSubjectTokenError=pu});var AE=B(Ra=>{"use strict";Object.defineProperty(Ra,"__esModule",{value:!0});Ra.PluggableAuthHandler=Ra.ExecutableError=void 0;var ii=xE(),o6=require("child_process"),TE=require("fs"),em=class extends Error{static{a(this,"ExecutableError")}code;constructor(t,n){super(`The executable failed with exit code: ${n} and error message: ${t}.`),this.code=n,Object.setPrototypeOf(this,new.target.prototype)}};Ra.ExecutableError=em;var wE=class e{static{a(this,"PluggableAuthHandler")}commandComponents;timeoutMillis;outputFile;constructor(t){if(!t.command)throw new Error("No command provided.");if(this.commandComponents=e.parseCommand(t.command),this.timeoutMillis=t.timeoutMillis,!this.timeoutMillis)throw new Error("No timeoutMillis provided.");this.outputFile=t.outputFile}retrieveResponseFromExecutable(t){return new Promise((n,o)=>{let r=o6.spawn(this.commandComponents[0],this.commandComponents.slice(1),{env:{...process.env,...Object.fromEntries(t)}}),i="";r.stdout.on("data",u=>{i+=u}),r.stderr.on("data",u=>{i+=u});let s=setTimeout(()=>(r.removeAllListeners(),r.kill(),o(new Error("The executable failed to finish within the timeout specified."))),this.timeoutMillis);r.on("close",u=>{if(clearTimeout(s),u===0)try{let d=JSON.parse(i),p=new ii.ExecutableResponse(d);return n(p)}catch(d){return d instanceof ii.ExecutableResponseError?o(d):o(new ii.ExecutableResponseError(`The executable returned an invalid response: ${i}`))}else return o(new em(i,u.toString()))})})}async retrieveCachedResponse(){if(!this.outputFile||this.outputFile.length===0)return;let t;try{t=await TE.promises.realpath(this.outputFile)}catch{return}if(!(await TE.promises.lstat(t)).isFile())return;let n=await TE.promises.readFile(t,{encoding:"utf8"});if(n!=="")try{let o=JSON.parse(n);return new ii.ExecutableResponse(o).isValid()?new ii.ExecutableResponse(o):void 0}catch(o){throw o instanceof ii.ExecutableResponseError?o:new ii.ExecutableResponseError(`The output file contained an invalid response: ${n}`)}}static parseCommand(t){let n=t.match(/(?:[^\s"]+|"[^"]*")+/g);if(!n)throw new Error(`Provided command: "${t}" could not be parsed.`);for(let o=0;o<n.length;o++)n[o][0]==='"'&&n[o].slice(-1)==='"'&&(n[o]=n[o].slice(1,-1));return n}};Ra.PluggableAuthHandler=wE});var RE=B(Oa=>{"use strict";Object.defineProperty(Oa,"__esModule",{value:!0});Oa.PluggableAuthClient=Oa.ExecutableError=void 0;var i6=yo(),a6=xE(),EC=AE(),s6=AE();Object.defineProperty(Oa,"ExecutableError",{enumerable:!0,get:a(function(){return s6.ExecutableError},"get")});var c6=30*1e3,SC=5*1e3,PC=120*1e3,u6="GOOGLE_EXTERNAL_ACCOUNT_ALLOW_EXECUTABLES",xC=1,IE=class extends i6.BaseExternalAccountClient{static{a(this,"PluggableAuthClient")}command;timeoutMillis;outputFile;handler;constructor(t){if(super(t),!t.credential_source.executable)throw new Error('No valid Pluggable Auth "credential_source" provided.');if(this.command=t.credential_source.executable.command,!this.command)throw new Error('No valid Pluggable Auth "credential_source" provided.');if(t.credential_source.executable.timeout_millis===void 0)this.timeoutMillis=c6;else if(this.timeoutMillis=t.credential_source.executable.timeout_millis,this.timeoutMillis<SC||this.timeoutMillis>PC)throw new Error(`Timeout must be between ${SC} and ${PC} milliseconds.`);this.outputFile=t.credential_source.executable.output_file,this.handler=new EC.PluggableAuthHandler({command:this.command,timeoutMillis:this.timeoutMillis,outputFile:this.outputFile}),this.credentialSourceType="executable"}async retrieveSubjectToken(){if(process.env[u6]!=="1")throw new Error("Pluggable Auth executables need to be explicitly allowed to run by setting the GOOGLE_EXTERNAL_ACCOUNT_ALLOW_EXECUTABLES environment Variable to 1.");let t;if(this.outputFile&&(t=await this.handler.retrieveCachedResponse()),!t){let n=new Map;n.set("GOOGLE_EXTERNAL_ACCOUNT_AUDIENCE",this.audience),n.set("GOOGLE_EXTERNAL_ACCOUNT_TOKEN_TYPE",this.subjectTokenType),n.set("GOOGLE_EXTERNAL_ACCOUNT_INTERACTIVE","0"),this.outputFile&&n.set("GOOGLE_EXTERNAL_ACCOUNT_OUTPUT_FILE",this.outputFile);let o=this.getServiceAccountEmail();o&&n.set("GOOGLE_EXTERNAL_ACCOUNT_IMPERSONATED_EMAIL",o),t=await this.handler.retrieveResponseFromExecutable(n)}if(t.version>xC)throw new Error(`Version of executable is not currently supported, maximum supported version is ${xC}.`);if(!t.success)throw new EC.ExecutableError(t.errorMessage,t.errorCode);if(this.outputFile&&!t.expirationTime)throw new a6.InvalidExpirationTimeFieldError("The executable response must contain the `expiration_time` field for successful responses when an output_file has been specified in the configuration.");if(t.isExpired())throw new Error("Executable response is expired.");return t.subjectToken}};Oa.PluggableAuthClient=IE});var kE=B(tm=>{"use strict";Object.defineProperty(tm,"__esModule",{value:!0});tm.ExternalAccountClient=void 0;var l6=yo(),d6=mE(),p6=bE(),f6=RE(),OE=class{static{a(this,"ExternalAccountClient")}constructor(){throw new Error("ExternalAccountClients should be initialized via: ExternalAccountClient.fromJSON(), directly via explicit constructors, eg. new AwsClient(options), new IdentityPoolClient(options), newPluggableAuthClientOptions, or via new GoogleAuth(options).getClient()")}static fromJSON(t){return t&&t.type===l6.EXTERNAL_ACCOUNT_TYPE?t.credential_source?.environment_id?new p6.AwsClient(t):t.credential_source?.executable?new f6.PluggableAuthClient(t):new d6.IdentityPoolClient(t):null}};tm.ExternalAccountClient=OE});var zE=B(ka=>{"use strict";Object.defineProperty(ka,"__esModule",{value:!0});ka.ExternalAccountAuthorizedUserClient=ka.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE=void 0;var wC=yr(),TC=rE(),AC=kt(),m6=require("stream"),h6=yo();ka.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE="external_account_authorized_user";var g6="https://sts.{universeDomain}/v1/oauthtoken",CE=class e extends TC.OAuthClientAuthHandler{static{a(this,"ExternalAccountAuthorizedUserHandler")}#e;constructor(t){super(t),this.#e=t.tokenRefreshEndpoint}async refreshToken(t,n){let o={...e.RETRY_CONFIG,url:this.#e,method:"POST",headers:n,data:new URLSearchParams({grant_type:"refresh_token",refresh_token:t})};wC.AuthClient.setMethodName(o,"refreshToken"),this.applyClientAuthenticationOptions(o);try{let r=await this.transporter.request(o),i=r.data;return i.res=r,i}catch(r){throw r instanceof AC.GaxiosError&&r.response?(0,TC.getErrorFromOAuthErrorResponse)(r.response.data,r):r}}},$E=class extends wC.AuthClient{static{a(this,"ExternalAccountAuthorizedUserClient")}cachedAccessToken;externalAccountAuthorizedUserHandler;refreshToken;constructor(t){super(t),t.universe_domain&&(this.universeDomain=t.universe_domain),this.refreshToken=t.refresh_token;let n={confidentialClientType:"basic",clientId:t.client_id,clientSecret:t.client_secret};this.externalAccountAuthorizedUserHandler=new CE({tokenRefreshEndpoint:t.token_url??g6.replace("{universeDomain}",this.universeDomain),transporter:this.transporter,clientAuthentication:n}),this.cachedAccessToken=null,this.quotaProjectId=t.quota_project_id,typeof t?.eagerRefreshThresholdMillis!="number"?this.eagerRefreshThresholdMillis=h6.EXPIRATION_TIME_OFFSET:this.eagerRefreshThresholdMillis=t.eagerRefreshThresholdMillis,this.forceRefreshOnFailure=!!t?.forceRefreshOnFailure}async getAccessToken(){return(!this.cachedAccessToken||this.isExpired(this.cachedAccessToken))&&await this.refreshAccessTokenAsync(),{token:this.cachedAccessToken.access_token,res:this.cachedAccessToken.res}}async getRequestHeaders(){let t=await this.getAccessToken(),n=new Headers({authorization:`Bearer ${t.token}`});return this.addSharedMetadataHeaders(n)}request(t,n){if(n)this.requestAsync(t).then(o=>n(null,o),o=>n(o,o.response));else return this.requestAsync(t)}async requestAsync(t,n=!1){let o;try{let r=await this.getRequestHeaders();t.headers=AC.Gaxios.mergeHeaders(t.headers),this.addUserProjectAndAuthHeaders(t.headers,r),o=await this.transporter.request(t)}catch(r){let i=r.response;if(i){let s=i.status,u=i.config.data instanceof m6.Readable;if(!n&&(s===401||s===403)&&!u&&this.forceRefreshOnFailure)return await this.refreshAccessTokenAsync(),await this.requestAsync(t,!0)}throw r}return o}async refreshAccessTokenAsync(){let t=await this.externalAccountAuthorizedUserHandler.refreshToken(this.refreshToken);return this.cachedAccessToken={access_token:t.access_token,expiry_date:new Date().getTime()+t.expires_in*1e3,res:t.res},t.refresh_token!==void 0&&(this.refreshToken=t.refresh_token),this.cachedAccessToken}isExpired(t){let n=new Date().getTime();return t.expiry_date?n>=t.expiry_date-this.eagerRefreshThresholdMillis:!1}};ka.ExternalAccountAuthorizedUserClient=$E});var kC=B(Qr=>{"use strict";Object.defineProperty(Qr,"__esModule",{value:!0});Qr.GoogleAuth=Qr.GoogleAuthExceptionMessages=void 0;var y6=require("child_process"),fu=require("fs"),_6=kt(),mu=Yc(),b6=require("os"),NE=require("path"),v6=eu(),E6=Iv(),S6=Ov(),P6=kv(),Ca=Kv(),IC=Qv(),$a=eE(),x6=kE(),hu=yo(),DE=yr(),RC=zE(),OC=Wr();Qr.GoogleAuthExceptionMessages={API_KEY_WITH_CREDENTIALS:"API Keys and Credentials are mutually exclusive authentication methods and cannot be used together.",NO_PROJECT_ID_FOUND:`Unable to detect a Project Id in the current environment.
50
50
  To learn more about authentication and Google APIs, visit:
51
51
  https://cloud.google.com/docs/authentication/getting-started`,NO_CREDENTIALS_FOUND:`Unable to find credentials in current environment.
52
52
  To learn more about authentication and Google APIs, visit:
53
53
  https://cloud.google.com/docs/authentication/getting-started`,NO_ADC_FOUND:"Could not load the default credentials. Browse to https://cloud.google.com/docs/authentication/getting-started for more information.",NO_UNIVERSE_DOMAIN_FOUND:`Unable to detect a Universe Domain in the current environment.
54
54
  To learn more about Universe Domain retrieval, visit:
55
- https://cloud.google.com/compute/docs/metadata/predefined-metadata-keys`};var Mp=class{static{o(this,"GoogleAuth")}checkIsGCE=void 0;useJWTAccessWithScope;defaultServicePath;get isGCE(){return this.checkIsGCE}_findProjectIdPromise;_cachedProjectId;jsonContent=null;apiKey;cachedCredential=null;#e=null;defaultScopes;keyFilename;scopes;clientOptions={};constructor(e={}){if(this._cachedProjectId=e.projectId||null,this.cachedCredential=e.authClient||null,this.keyFilename=e.keyFilename||e.keyFile,this.scopes=e.scopes,this.clientOptions=e.clientOptions||{},this.jsonContent=e.credentials||null,this.apiKey=e.apiKey||this.clientOptions.apiKey||null,this.apiKey&&(this.jsonContent||this.clientOptions.credentials))throw new RangeError(Tr.GoogleAuthExceptionMessages.API_KEY_WITH_CREDENTIALS);e.universeDomain&&(this.clientOptions.universeDomain=e.universeDomain)}setGapicJWTValues(e){e.defaultServicePath=this.defaultServicePath,e.useJWTAccessWithScope=this.useJWTAccessWithScope,e.defaultScopes=this.defaultScopes}getProjectId(e){if(e)this.getProjectIdAsync().then(r=>e(null,r),e);else return this.getProjectIdAsync()}async getProjectIdOptional(){try{return await this.getProjectId()}catch(e){if(e instanceof Error&&e.message===Tr.GoogleAuthExceptionMessages.NO_PROJECT_ID_FOUND)return null;throw e}}async findAndCacheProjectId(){let e=null;if(e||=await this.getProductionProjectId(),e||=await this.getFileProjectId(),e||=await this.getDefaultServiceProjectId(),e||=await this.getGCEProjectId(),e||=await this.getExternalAccountClientProjectId(),e)return this._cachedProjectId=e,e;throw new Error(Tr.GoogleAuthExceptionMessages.NO_PROJECT_ID_FOUND)}async getProjectIdAsync(){return this._cachedProjectId?this._cachedProjectId:(this._findProjectIdPromise||(this._findProjectIdPromise=this.findAndCacheProjectId()),this._findProjectIdPromise)}async getUniverseDomainFromMetadataServer(){let e;try{e=await ma.universe("universe-domain"),e||=jp.DEFAULT_UNIVERSE}catch(r){if(r&&r?.response?.status===404)e=jp.DEFAULT_UNIVERSE;else throw r}return e}async getUniverseDomain(){let e=(0,xP.originalOrCamelOptions)(this.clientOptions).get("universe_domain");try{e??=(await this.getClient()).universeDomain}catch{e??=jp.DEFAULT_UNIVERSE}return e}getAnyScopes(){return this.scopes||this.defaultScopes}getApplicationDefault(e={},r){let n;if(typeof e=="function"?r=e:n=e,r)this.getApplicationDefaultAsync(n).then(i=>r(null,i.credential,i.projectId),r);else return this.getApplicationDefaultAsync(n)}async getApplicationDefaultAsync(e={}){if(this.cachedCredential)return await this.#t(this.cachedCredential,null);let r;if(r=await this._tryGetApplicationCredentialsFromEnvironmentVariable(e),r)return r instanceof ri.JWT?r.scopes=this.scopes:r instanceof ha.BaseExternalAccountClient&&(r.scopes=this.getAnyScopes()),await this.#t(r);if(r=await this._tryGetApplicationCredentialsFromWellKnownFile(e),r)return r instanceof ri.JWT?r.scopes=this.scopes:r instanceof ha.BaseExternalAccountClient&&(r.scopes=this.getAnyScopes()),await this.#t(r);if(await this._checkIsGCE())return e.scopes=this.getAnyScopes(),await this.#t(new l$.Compute(e));throw new Error(Tr.GoogleAuthExceptionMessages.NO_ADC_FOUND)}async#t(e,r=process.env.GOOGLE_CLOUD_QUOTA_PROJECT||null){let n=await this.getProjectIdOptional();return r&&(e.quotaProjectId=r),this.cachedCredential=e,{credential:e,projectId:n}}async _checkIsGCE(){return this.checkIsGCE===void 0&&(this.checkIsGCE=ma.getGCPResidency()||await ma.isAvailable()),this.checkIsGCE}async _tryGetApplicationCredentialsFromEnvironmentVariable(e){let r=process.env.GOOGLE_APPLICATION_CREDENTIALS||process.env.google_application_credentials;if(!r||r.length===0)return null;try{return this._getApplicationCredentialsFromFilePath(r,e)}catch(n){throw n instanceof Error&&(n.message=`Unable to read the credential file specified by the GOOGLE_APPLICATION_CREDENTIALS environment variable: ${n.message}`),n}}async _tryGetApplicationCredentialsFromWellKnownFile(e){let r=null;if(this._isWindows())r=process.env.APPDATA;else{let i=process.env.HOME;i&&(r=Up.join(i,".config"))}return r&&(r=Up.join(r,"gcloud","application_default_credentials.json"),fa.existsSync(r)||(r=null)),r?await this._getApplicationCredentialsFromFilePath(r,e):null}async _getApplicationCredentialsFromFilePath(e,r={}){if(!e||e.length===0)throw new Error("The file path is invalid.");try{if(e=fa.realpathSync(e),!fa.lstatSync(e).isFile())throw new Error}catch(i){throw i instanceof Error&&(i.message=`The file at ${e} does not exist, or it is not a file. ${i.message}`),i}let n=fa.createReadStream(e);return this.fromStream(n,r)}fromImpersonatedJSON(e){if(!e)throw new Error("Must pass in a JSON object containing an impersonated refresh token");if(e.type!==ni.IMPERSONATED_ACCOUNT_TYPE)throw new Error(`The incoming JSON object does not have the "${ni.IMPERSONATED_ACCOUNT_TYPE}" type`);if(!e.source_credentials)throw new Error("The incoming JSON object does not contain a source_credentials field");if(!e.service_account_impersonation_url)throw new Error("The incoming JSON object does not contain a service_account_impersonation_url field");let r=this.fromJSON(e.source_credentials);if(e.service_account_impersonation_url?.length>256)throw new RangeError(`Target principal is too long: ${e.service_account_impersonation_url}`);let n=/(?<target>[^/]+):(generateAccessToken|generateIdToken)$/.exec(e.service_account_impersonation_url)?.groups?.target;if(!n)throw new RangeError(`Cannot extract target principal from ${e.service_account_impersonation_url}`);let i=(this.scopes||e.scopes||this.defaultScopes)??[];return new ni.Impersonated({...e,sourceClient:r,targetPrincipal:n,targetScopes:Array.isArray(i)?i:[i]})}fromJSON(e,r={}){let n,i=(0,xP.originalOrCamelOptions)(r).get("universe_domain");return e.type===TP.USER_REFRESH_ACCOUNT_TYPE?(n=new TP.UserRefreshClient(r),n.fromJSON(e)):e.type===ni.IMPERSONATED_ACCOUNT_TYPE?n=this.fromImpersonatedJSON(e):e.type===ha.EXTERNAL_ACCOUNT_TYPE?(n=f$.ExternalAccountClient.fromJSON({...e,...r}),n.scopes=this.getAnyScopes()):e.type===wP.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE?n=new wP.ExternalAccountAuthorizedUserClient({...e,...r}):(r.scopes=this.scopes,n=new ri.JWT(r),this.setGapicJWTValues(n),n.fromJSON(e)),i&&(n.universeDomain=i),n}_cacheClientFromJSON(e,r){let n=this.fromJSON(e,r);return this.jsonContent=e,this.cachedCredential=n,n}fromStream(e,r={},n){let i={};if(typeof r=="function"?n=r:i=r,n)this.fromStreamAsync(e,i).then(u=>n(null,u),n);else return this.fromStreamAsync(e,i)}fromStreamAsync(e,r){return new Promise((n,i)=>{if(!e)throw new Error("Must pass in a stream containing the Google auth settings.");let u=[];e.setEncoding("utf8").on("error",i).on("data",c=>u.push(c)).on("end",()=>{try{try{let c=JSON.parse(u.join("")),l=this._cacheClientFromJSON(c,r);return n(l)}catch(c){if(!this.keyFilename)throw c;let l=new ri.JWT({...this.clientOptions,keyFile:this.keyFilename});return this.cachedCredential=l,this.setGapicJWTValues(l),n(l)}}catch(c){return i(c)}})})}fromAPIKey(e,r={}){return new ri.JWT({...r,apiKey:e})}_isWindows(){let e=u$.platform();return!!(e&&e.length>=3&&e.substring(0,3).toLowerCase()==="win")}async getDefaultServiceProjectId(){return new Promise(e=>{(0,a$.exec)("gcloud config config-helper --format json",(r,n)=>{if(!r&&n)try{let i=JSON.parse(n).configuration.properties.core.project;e(i);return}catch{}e(null)})})}getProductionProjectId(){return process.env.GCLOUD_PROJECT||process.env.GOOGLE_CLOUD_PROJECT||process.env.gcloud_project||process.env.google_cloud_project}async getFileProjectId(){if(this.cachedCredential)return this.cachedCredential.projectId;if(this.keyFilename){let r=await this.getClient();if(r&&r.projectId)return r.projectId}let e=await this._tryGetApplicationCredentialsFromEnvironmentVariable();return e?e.projectId:null}async getExternalAccountClientProjectId(){return!this.jsonContent||this.jsonContent.type!==ha.EXTERNAL_ACCOUNT_TYPE?null:await(await this.getClient()).getProjectId()}async getGCEProjectId(){try{return await ma.project("project-id")}catch{return null}}getCredentials(e){if(e)this.getCredentialsAsync().then(r=>e(null,r),e);else return this.getCredentialsAsync()}async getCredentialsAsync(){let e=await this.getClient();if(e instanceof ni.Impersonated)return{client_email:e.getTargetPrincipal()};if(e instanceof ha.BaseExternalAccountClient){let r=e.getServiceAccountEmail();if(r)return{client_email:r,universe_domain:e.universeDomain}}if(this.jsonContent)return{client_email:this.jsonContent.client_email,private_key:this.jsonContent.private_key,universe_domain:this.jsonContent.universe_domain};if(await this._checkIsGCE()){let[r,n]=await Promise.all([ma.instance("service-accounts/default/email"),this.getUniverseDomain()]);return{client_email:r,universe_domain:n}}throw new Error(Tr.GoogleAuthExceptionMessages.NO_CREDENTIALS_FOUND)}async getClient(){if(this.cachedCredential)return this.cachedCredential;this.#e=this.#e||this.#r();try{return await this.#e}finally{this.#e=null}}async#r(){if(this.jsonContent)return this._cacheClientFromJSON(this.jsonContent,this.clientOptions);if(this.keyFilename){let e=Up.resolve(this.keyFilename),r=fa.createReadStream(e);return await this.fromStreamAsync(r,this.clientOptions)}else if(this.apiKey){let e=await this.fromAPIKey(this.apiKey,this.clientOptions);e.scopes=this.scopes;let{credential:r}=await this.#t(e);return r}else{let{credential:e}=await this.getApplicationDefaultAsync(this.clientOptions);return e}}async getIdTokenClient(e){let r=await this.getClient();if(!("fetchIdToken"in r))throw new Error("Cannot fetch ID token in this environment, use GCE or set the GOOGLE_APPLICATION_CREDENTIALS environment variable to a service account credentials JSON file.");return new d$.IdTokenClient({targetAudience:e,idTokenProvider:r})}async getAccessToken(){return(await(await this.getClient()).getAccessToken()).token}async getRequestHeaders(e){return(await this.getClient()).getRequestHeaders(e)}async authorizeRequest(e={}){let r=e.url,i=await(await this.getClient()).getRequestHeaders(r);return e.headers=s$.Gaxios.mergeHeaders(e.headers,i),e}async fetch(...e){return(await this.getClient()).fetch(...e)}async request(e){return(await this.getClient()).request(e)}getEnv(){return(0,p$.getEnv)()}async sign(e,r){let n=await this.getClient(),i=await this.getUniverseDomain();if(r=r||`https://iamcredentials.${i}/v1/projects/-/serviceAccounts/`,n instanceof ni.Impersonated)return(await n.sign(e)).signedBlob;let u=(0,c$.createCrypto)();if(n instanceof ri.JWT&&n.key)return await u.sign(n.key,e);let c=await this.getCredentials();if(!c.client_email)throw new Error("Cannot sign data without `client_email`.");return this.signBlob(u,c.client_email,e,r)}async signBlob(e,r,n,i){let u=new URL(i+`${r}:signBlob`);return(await this.request({method:"POST",url:u.href,data:{payload:e.encodeBase64StringUtf8(n)},retry:!0,retryConfig:{httpMethodsToRetry:["POST"]}})).data.signedBlob}};Tr.GoogleAuth=Mp});var IP=L(Mu=>{"use strict";Object.defineProperty(Mu,"__esModule",{value:!0});Mu.IAMAuth=void 0;var Lp=class{static{o(this,"IAMAuth")}selector;token;constructor(e,r){this.selector=e,this.token=r,this.selector=e,this.token=r}getRequestHeaders(){return{"x-goog-iam-authority-selector":this.selector,"x-goog-iam-authorization-token":this.token}}};Mu.IAMAuth=Lp});var RP=L(Lr=>{"use strict";Object.defineProperty(Lr,"__esModule",{value:!0});Lr.DownscopedClient=Lr.EXPIRATION_TIME_OFFSET=Lr.MAX_ACCESS_BOUNDARY_RULES_COUNT=void 0;var m$=_t(),h$=require("stream"),Fp=Zt(),g$=bu(),y$="urn:ietf:params:oauth:grant-type:token-exchange",_$="urn:ietf:params:oauth:token-type:access_token",b$="urn:ietf:params:oauth:token-type:access_token";Lr.MAX_ACCESS_BOUNDARY_RULES_COUNT=10;Lr.EXPIRATION_TIME_OFFSET=300*1e3;var Bp=class extends Fp.AuthClient{static{o(this,"DownscopedClient")}authClient;credentialAccessBoundary;cachedDownscopedAccessToken;stsCredential;constructor(e,r={accessBoundary:{accessBoundaryRules:[]}}){if(super(e instanceof Fp.AuthClient?{}:e),e instanceof Fp.AuthClient?(this.authClient=e,this.credentialAccessBoundary=r):(this.authClient=e.authClient,this.credentialAccessBoundary=e.credentialAccessBoundary),this.credentialAccessBoundary.accessBoundary.accessBoundaryRules.length===0)throw new Error("At least one access boundary rule needs to be defined.");if(this.credentialAccessBoundary.accessBoundary.accessBoundaryRules.length>Lr.MAX_ACCESS_BOUNDARY_RULES_COUNT)throw new Error(`The provided access boundary has more than ${Lr.MAX_ACCESS_BOUNDARY_RULES_COUNT} access boundary rules.`);for(let n of this.credentialAccessBoundary.accessBoundary.accessBoundaryRules)if(n.availablePermissions.length===0)throw new Error("At least one permission should be defined in access boundary rules.");this.stsCredential=new g$.StsCredentials({tokenExchangeEndpoint:`https://sts.${this.universeDomain}/v1/token`}),this.cachedDownscopedAccessToken=null}setCredentials(e){if(!e.expiry_date)throw new Error("The access token expiry_date field is missing in the provided credentials.");super.setCredentials(e),this.cachedDownscopedAccessToken=e}async getAccessToken(){return(!this.cachedDownscopedAccessToken||this.isExpired(this.cachedDownscopedAccessToken))&&await this.refreshAccessTokenAsync(),{token:this.cachedDownscopedAccessToken.access_token,expirationTime:this.cachedDownscopedAccessToken.expiry_date,res:this.cachedDownscopedAccessToken.res}}async getRequestHeaders(){let e=await this.getAccessToken(),r=new Headers({authorization:`Bearer ${e.token}`});return this.addSharedMetadataHeaders(r)}request(e,r){if(r)this.requestAsync(e).then(n=>r(null,n),n=>r(n,n.response));else return this.requestAsync(e)}async requestAsync(e,r=!1){let n;try{let i=await this.getRequestHeaders();e.headers=m$.Gaxios.mergeHeaders(e.headers),this.addUserProjectAndAuthHeaders(e.headers,i),n=await this.transporter.request(e)}catch(i){let u=i.response;if(u){let c=u.status,l=u.config.data instanceof h$.Readable;if(!r&&(c===401||c===403)&&!l&&this.forceRefreshOnFailure)return await this.refreshAccessTokenAsync(),await this.requestAsync(e,!0)}throw i}return n}async refreshAccessTokenAsync(){let e=(await this.authClient.getAccessToken()).token,r={grantType:y$,requestedTokenType:_$,subjectToken:e,subjectTokenType:b$},n=await this.stsCredential.exchangeToken(r,void 0,this.credentialAccessBoundary),i=this.authClient.credentials?.expiry_date||null,u=n.expires_in?new Date().getTime()+n.expires_in*1e3:i;return this.cachedDownscopedAccessToken={access_token:n.access_token,expiry_date:u,res:n.res},this.credentials={},Object.assign(this.credentials,this.cachedDownscopedAccessToken),delete this.credentials.res,this.emit("tokens",{refresh_token:null,expiry_date:this.cachedDownscopedAccessToken.expiry_date,access_token:this.cachedDownscopedAccessToken.access_token,token_type:"Bearer",id_token:null}),this.cachedDownscopedAccessToken}isExpired(e){let r=new Date().getTime();return e.expiry_date?r>=e.expiry_date-this.eagerRefreshThresholdMillis:!1}};Lr.DownscopedClient=Bp});var CP=L(Lu=>{"use strict";Object.defineProperty(Lu,"__esModule",{value:!0});Lu.PassThroughClient=void 0;var v$=Zt(),qp=class extends v$.AuthClient{static{o(this,"PassThroughClient")}async request(e){return this.transporter.request(e)}async getAccessToken(){return{}}async getRequestHeaders(){return new Headers}};Lu.PassThroughClient=qp});var NP=L(ee=>{"use strict";Object.defineProperty(ee,"__esModule",{value:!0});ee.GoogleAuth=ee.auth=ee.PassThroughClient=ee.ExternalAccountAuthorizedUserClient=ee.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE=ee.ExecutableError=ee.PluggableAuthClient=ee.DownscopedClient=ee.BaseExternalAccountClient=ee.ExternalAccountClient=ee.IdentityPoolClient=ee.AwsRequestSigner=ee.AwsClient=ee.UserRefreshClient=ee.LoginTicket=ee.ClientAuthentication=ee.OAuth2Client=ee.CodeChallengeMethod=ee.Impersonated=ee.JWT=ee.JWTAccess=ee.IdTokenClient=ee.IAMAuth=ee.GCPEnv=ee.Compute=ee.DEFAULT_UNIVERSE=ee.AuthClient=ee.gaxios=ee.gcpMetadata=void 0;var OP=AP();Object.defineProperty(ee,"GoogleAuth",{enumerable:!0,get:o(function(){return OP.GoogleAuth},"get")});ee.gcpMetadata=Xi();ee.gaxios=_t();var kP=Zt();Object.defineProperty(ee,"AuthClient",{enumerable:!0,get:o(function(){return kP.AuthClient},"get")});Object.defineProperty(ee,"DEFAULT_UNIVERSE",{enumerable:!0,get:o(function(){return kP.DEFAULT_UNIVERSE},"get")});var E$=Cd();Object.defineProperty(ee,"Compute",{enumerable:!0,get:o(function(){return E$.Compute},"get")});var P$=$d();Object.defineProperty(ee,"GCPEnv",{enumerable:!0,get:o(function(){return P$.GCPEnv},"get")});var S$=IP();Object.defineProperty(ee,"IAMAuth",{enumerable:!0,get:o(function(){return S$.IAMAuth},"get")});var T$=kd();Object.defineProperty(ee,"IdTokenClient",{enumerable:!0,get:o(function(){return T$.IdTokenClient},"get")});var w$=Kd();Object.defineProperty(ee,"JWTAccess",{enumerable:!0,get:o(function(){return w$.JWTAccess},"get")});var x$=Yd();Object.defineProperty(ee,"JWT",{enumerable:!0,get:o(function(){return x$.JWT},"get")});var A$=rp();Object.defineProperty(ee,"Impersonated",{enumerable:!0,get:o(function(){return A$.Impersonated},"get")});var Vp=eo();Object.defineProperty(ee,"CodeChallengeMethod",{enumerable:!0,get:o(function(){return Vp.CodeChallengeMethod},"get")});Object.defineProperty(ee,"OAuth2Client",{enumerable:!0,get:o(function(){return Vp.OAuth2Client},"get")});Object.defineProperty(ee,"ClientAuthentication",{enumerable:!0,get:o(function(){return Vp.ClientAuthentication},"get")});var I$=xd();Object.defineProperty(ee,"LoginTicket",{enumerable:!0,get:o(function(){return I$.LoginTicket},"get")});var R$=ep();Object.defineProperty(ee,"UserRefreshClient",{enumerable:!0,get:o(function(){return R$.UserRefreshClient},"get")});var C$=Ep();Object.defineProperty(ee,"AwsClient",{enumerable:!0,get:o(function(){return C$.AwsClient},"get")});var O$=_p();Object.defineProperty(ee,"AwsRequestSigner",{enumerable:!0,get:o(function(){return O$.AwsRequestSigner},"get")});var k$=gp();Object.defineProperty(ee,"IdentityPoolClient",{enumerable:!0,get:o(function(){return k$.IdentityPoolClient},"get")});var $$=$p();Object.defineProperty(ee,"ExternalAccountClient",{enumerable:!0,get:o(function(){return $$.ExternalAccountClient},"get")});var z$=$n();Object.defineProperty(ee,"BaseExternalAccountClient",{enumerable:!0,get:o(function(){return z$.BaseExternalAccountClient},"get")});var N$=RP();Object.defineProperty(ee,"DownscopedClient",{enumerable:!0,get:o(function(){return N$.DownscopedClient},"get")});var $P=Op();Object.defineProperty(ee,"PluggableAuthClient",{enumerable:!0,get:o(function(){return $P.PluggableAuthClient},"get")});Object.defineProperty(ee,"ExecutableError",{enumerable:!0,get:o(function(){return $P.ExecutableError},"get")});var zP=Dp();Object.defineProperty(ee,"EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE",{enumerable:!0,get:o(function(){return zP.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE},"get")});Object.defineProperty(ee,"ExternalAccountAuthorizedUserClient",{enumerable:!0,get:o(function(){return zP.ExternalAccountAuthorizedUserClient},"get")});var D$=CP();Object.defineProperty(ee,"PassThroughClient",{enumerable:!0,get:o(function(){return D$.PassThroughClient},"get")});var U$=new OP.GoogleAuth;ee.auth=U$});var H$={};qa(H$,{bigQueryAuth:()=>ke,googleBigQuery:()=>V$});module.exports=UT(H$);var jT=Object.freeze({status:"aborted"});function X(t,e,r){function n(l,p){if(l._zod||Object.defineProperty(l,"_zod",{value:{def:p,constr:c,traits:new Set},enumerable:!1}),l._zod.traits.has(t))return;l._zod.traits.add(t),e(l,p);let f=c.prototype,m=Object.keys(f);for(let y=0;y<m.length;y++){let P=m[y];P in l||(l[P]=f[P].bind(l))}}o(n,"init");let i=r?.Parent??Object;class u extends i{static{o(this,"Definition")}}Object.defineProperty(u,"name",{value:t});function c(l){var p;let f=r?.Parent?new u:this;n(f,l),(p=f._zod).deferred??(p.deferred=[]);for(let m of f._zod.deferred)m();return f}return o(c,"_"),Object.defineProperty(c,"init",{value:n}),Object.defineProperty(c,Symbol.hasInstance,{value:o(l=>r?.Parent&&l instanceof r.Parent?!0:l?._zod?.traits?.has(t),"value")}),Object.defineProperty(c,"name",{value:t}),c}o(X,"$constructor");var Ar=class extends Error{static{o(this,"$ZodAsyncError")}constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Va=class extends Error{static{o(this,"$ZodEncodeError")}constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}},bc={};function Zr(t){return t&&Object.assign(bc,t),bc}o(Zr,"config");function Ec(t){let e=Object.values(t).filter(n=>typeof n=="number");return Object.entries(t).filter(([n,i])=>e.indexOf(+n)===-1).map(([n,i])=>i)}o(Ec,"getEnumValues");function Xf(t,e){return typeof e=="bigint"?e.toString():e}o(Xf,"jsonStringifyReplacer");function Ga(t){return{get value(){{let r=t();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}o(Ga,"cached");function em(t){return t==null}o(em,"nullish");function Wa(t){let e=t.startsWith("^")?1:0,r=t.endsWith("$")?t.length-1:t.length;return t.slice(e,r)}o(Wa,"cleanRegex");var Yf=Symbol("evaluating");function tt(t,e,r){let n;Object.defineProperty(t,e,{get(){if(n!==Yf)return n===void 0&&(n=Yf,n=r()),n},set(i){Object.defineProperty(t,e,{value:i})},configurable:!0})}o(tt,"defineLazy");var Pc="captureStackTrace"in Error?Error.captureStackTrace:(...t)=>{};function gi(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}o(gi,"isObject");var MT=Ga(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let t=Function;return new t(""),!0}catch{return!1}});function tm(t){if(gi(t)===!1)return!1;let e=t.constructor;if(e===void 0||typeof e!="function")return!0;let r=e.prototype;return!(gi(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}o(tm,"isPlainObject");var rm=new Set(["string","number","symbol"]);function _o(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}o(_o,"escapeRegex");function Za(t,e,r){let n=new t._zod.constr(e??t._zod.def);return(!e||r?.parent)&&(n._zod.parent=t),n}o(Za,"clone");function Ze(t){let e=t;if(!e)return{};if(typeof e=="string")return{error:o(()=>e,"error")};if(e?.message!==void 0){if(e?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");e.error=e.message}return delete e.message,typeof e.error=="string"?{...e,error:o(()=>e.error,"error")}:e}o(Ze,"normalizeParams");function nm(t){return Object.keys(t).filter(e=>t[e]._zod.optin==="optional"&&t[e]._zod.optout==="optional")}o(nm,"optionalKeys");var om={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function bo(t,e=0){if(t.aborted===!0)return!0;for(let r=e;r<t.issues.length;r++)if(t.issues[r]?.continue!==!0)return!0;return!1}o(bo,"aborted");function hn(t,e){return e.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(t),r})}o(hn,"prefixIssues");function Ha(t){return typeof t=="string"?t:t?.message}o(Ha,"unwrapMessage");function gn(t,e,r){let n={...t,path:t.path??[]};if(!t.message){let i=Ha(t.inst?._zod.def?.error?.(t))??Ha(e?.error?.(t))??Ha(r.customError?.(t))??Ha(r.localeError?.(t))??"Invalid input";n.message=i}return delete n.inst,delete n.continue,e?.reportInput||delete n.input,n}o(gn,"finalizeIssue");function im(t){return Array.isArray(t)?"array":typeof t=="string"?"string":"unknown"}o(im,"getLengthableOrigin");function Sc(...t){let[e,r,n]=t;return typeof e=="string"?{message:e,code:"custom",input:r,inst:n}:{...e}}o(Sc,"issue");var am=o((t,e)=>{t.name="$ZodError",Object.defineProperty(t,"_zod",{value:t._zod,enumerable:!1}),Object.defineProperty(t,"issues",{value:e,enumerable:!1}),t.message=JSON.stringify(e,Xf,2),Object.defineProperty(t,"toString",{value:o(()=>t.message,"value"),enumerable:!1})},"initializer"),sm=X("$ZodError",am),yi=X("$ZodError",am,{Parent:Error});var FT=o(t=>(e,r,n,i)=>{let u=n?Object.assign(n,{async:!1}):{async:!1},c=e._zod.run({value:r,issues:[]},u);if(c instanceof Promise)throw new Ar;if(c.issues.length){let l=new(i?.Err??t)(c.issues.map(p=>gn(p,u,Zr())));throw Pc(l,i?.callee),l}return c.value},"_parse"),Ja=FT(yi),BT=o(t=>async(e,r,n,i)=>{let u=n?Object.assign(n,{async:!0}):{async:!0},c=e._zod.run({value:r,issues:[]},u);if(c instanceof Promise&&(c=await c),c.issues.length){let l=new(i?.Err??t)(c.issues.map(p=>gn(p,u,Zr())));throw Pc(l,i?.callee),l}return c.value},"_parseAsync"),Ka=BT(yi),qT=o(t=>(e,r,n)=>{let i=n?{...n,async:!1}:{async:!1},u=e._zod.run({value:r,issues:[]},i);if(u instanceof Promise)throw new Ar;return u.issues.length?{success:!1,error:new(t??sm)(u.issues.map(c=>gn(c,i,Zr())))}:{success:!0,data:u.value}},"_safeParse"),_i=qT(yi),VT=o(t=>async(e,r,n)=>{let i=n?Object.assign(n,{async:!0}):{async:!0},u=e._zod.run({value:r,issues:[]},i);return u instanceof Promise&&(u=await u),u.issues.length?{success:!1,error:new t(u.issues.map(c=>gn(c,i,Zr())))}:{success:!0,data:u.value}},"_safeParseAsync"),bi=VT(yi);var HT="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",GT=new RegExp(`^${HT}$`);var um=o(t=>{let e=t?`[\\s\\S]{${t?.minimum??0},${t?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${e}$`)},"string"),cm=/^-?\d+n?$/,lm=/^-?\d+$/,Tc=/^-?\d+(?:\.\d+)?$/,dm=/^(?:true|false)$/i;var yn=X("$ZodCheck",(t,e)=>{var r;t._zod??(t._zod={}),t._zod.def=e,(r=t._zod).onattach??(r.onattach=[])}),WT={number:"number",bigint:"bigint",object:"date"};var pm=X("$ZodCheckGreaterThan",(t,e)=>{yn.init(t,e);let r=WT[typeof e.value];t._zod.onattach.push(n=>{let i=n._zod.bag,u=(e.inclusive?i.minimum:i.exclusiveMinimum)??Number.NEGATIVE_INFINITY;e.value>u&&(e.inclusive?i.minimum=e.value:i.exclusiveMinimum=e.value)}),t._zod.check=n=>{(e.inclusive?n.value>=e.value:n.value>e.value)||n.issues.push({origin:r,code:"too_small",minimum:typeof e.value=="object"?e.value.getTime():e.value,input:n.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}});var fm=X("$ZodCheckNumberFormat",(t,e)=>{yn.init(t,e),e.format=e.format||"float64";let r=e.format?.includes("int"),n=r?"int":"number",[i,u]=om[e.format];t._zod.onattach.push(c=>{let l=c._zod.bag;l.format=e.format,l.minimum=i,l.maximum=u,r&&(l.pattern=lm)}),t._zod.check=c=>{let l=c.value;if(r){if(!Number.isInteger(l)){c.issues.push({expected:n,format:e.format,code:"invalid_type",continue:!1,input:l,inst:t});return}if(!Number.isSafeInteger(l)){l>0?c.issues.push({input:l,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:n,inclusive:!0,continue:!e.abort}):c.issues.push({input:l,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:n,inclusive:!0,continue:!e.abort});return}}l<i&&c.issues.push({origin:"number",input:l,code:"too_small",minimum:i,inclusive:!0,inst:t,continue:!e.abort}),l>u&&c.issues.push({origin:"number",input:l,code:"too_big",maximum:u,inclusive:!0,inst:t,continue:!e.abort})}});var mm=X("$ZodCheckMinLength",(t,e)=>{var r;yn.init(t,e),(r=t._zod.def).when??(r.when=n=>{let i=n.value;return!em(i)&&i.length!==void 0}),t._zod.onattach.push(n=>{let i=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>i&&(n._zod.bag.minimum=e.minimum)}),t._zod.check=n=>{let i=n.value;if(i.length>=e.minimum)return;let c=im(i);n.issues.push({origin:c,code:"too_small",minimum:e.minimum,inclusive:!0,input:i,inst:t,continue:!e.abort})}});var wc=X("$ZodCheckStringFormat",(t,e)=>{var r,n;yn.init(t,e),t._zod.onattach.push(i=>{let u=i._zod.bag;u.format=e.format,e.pattern&&(u.patterns??(u.patterns=new Set),u.patterns.add(e.pattern))}),e.pattern?(r=t._zod).check??(r.check=i=>{e.pattern.lastIndex=0,!e.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:e.format,input:i.value,...e.pattern?{pattern:e.pattern.toString()}:{},inst:t,continue:!e.abort})}):(n=t._zod).check??(n.check=()=>{})}),hm=X("$ZodCheckRegex",(t,e)=>{wc.init(t,e),t._zod.check=r=>{e.pattern.lastIndex=0,!e.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:e.pattern.toString(),inst:t,continue:!e.abort})}});var ym={major:4,minor:3,patch:6};var Ye=X("$ZodType",(t,e)=>{var r;t??(t={}),t._zod.def=e,t._zod.bag=t._zod.bag||{},t._zod.version=ym;let n=[...t._zod.def.checks??[]];t._zod.traits.has("$ZodCheck")&&n.unshift(t);for(let i of n)for(let u of i._zod.onattach)u(t);if(n.length===0)(r=t._zod).deferred??(r.deferred=[]),t._zod.deferred?.push(()=>{t._zod.run=t._zod.parse});else{let i=o((c,l,p)=>{let f=bo(c),m;for(let y of l){if(y._zod.def.when){if(!y._zod.def.when(c))continue}else if(f)continue;let P=c.issues.length,h=y._zod.check(c);if(h instanceof Promise&&p?.async===!1)throw new Ar;if(m||h instanceof Promise)m=(m??Promise.resolve()).then(async()=>{await h,c.issues.length!==P&&(f||(f=bo(c,P)))});else{if(c.issues.length===P)continue;f||(f=bo(c,P))}}return m?m.then(()=>c):c},"runChecks"),u=o((c,l,p)=>{if(bo(c))return c.aborted=!0,c;let f=i(l,n,p);if(f instanceof Promise){if(p.async===!1)throw new Ar;return f.then(m=>t._zod.parse(m,p))}return t._zod.parse(f,p)},"handleCanaryResult");t._zod.run=(c,l)=>{if(l.skipChecks)return t._zod.parse(c,l);if(l.direction==="backward"){let f=t._zod.parse({value:c.value,issues:[]},{...l,skipChecks:!0});return f instanceof Promise?f.then(m=>u(m,c,l)):u(f,c,l)}let p=t._zod.parse(c,l);if(p instanceof Promise){if(l.async===!1)throw new Ar;return p.then(f=>i(f,n,l))}return i(p,n,l)}}tt(t,"~standard",()=>({validate:o(i=>{try{let u=_i(t,i);return u.success?{value:u.data}:{issues:u.error?.issues}}catch{return bi(t,i).then(c=>c.success?{value:c.data}:{issues:c.error?.issues})}},"validate"),vendor:"zod",version:1}))}),Xa=X("$ZodString",(t,e)=>{Ye.init(t,e),t._zod.pattern=[...t?._zod.bag?.patterns??[]].pop()??um(t._zod.bag),t._zod.parse=(r,n)=>{if(e.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:t}),r}}),xc=X("$ZodStringFormat",(t,e)=>{wc.init(t,e),Xa.init(t,e)});var Pm=X("$ZodURL",(t,e)=>{xc.init(t,e),t._zod.check=r=>{try{let n=r.value.trim(),i=new URL(n);e.hostname&&(e.hostname.lastIndex=0,e.hostname.test(i.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:e.hostname.source,input:r.value,inst:t,continue:!e.abort})),e.protocol&&(e.protocol.lastIndex=0,e.protocol.test(i.protocol.endsWith(":")?i.protocol.slice(0,-1):i.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:e.protocol.source,input:r.value,inst:t,continue:!e.abort})),e.normalize?r.value=i.href:r.value=n;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:t,continue:!e.abort})}}});var Ac=X("$ZodNumber",(t,e)=>{Ye.init(t,e),t._zod.pattern=t._zod.bag.pattern??Tc,t._zod.parse=(r,n)=>{if(e.coerce)try{r.value=Number(r.value)}catch{}let i=r.value;if(typeof i=="number"&&!Number.isNaN(i)&&Number.isFinite(i))return r;let u=typeof i=="number"?Number.isNaN(i)?"NaN":Number.isFinite(i)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:i,inst:t,...u?{received:u}:{}}),r}}),Sm=X("$ZodNumberFormat",(t,e)=>{fm.init(t,e),Ac.init(t,e)}),Ic=X("$ZodBoolean",(t,e)=>{Ye.init(t,e),t._zod.pattern=dm,t._zod.parse=(r,n)=>{if(e.coerce)try{r.value=!!r.value}catch{}let i=r.value;return typeof i=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:i,inst:t}),r}}),Tm=X("$ZodBigInt",(t,e)=>{Ye.init(t,e),t._zod.pattern=cm,t._zod.parse=(r,n)=>{if(e.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:t}),r}});var wm=X("$ZodAny",(t,e)=>{Ye.init(t,e),t._zod.parse=r=>r}),xm=X("$ZodUnknown",(t,e)=>{Ye.init(t,e),t._zod.parse=r=>r});var Am=X("$ZodVoid",(t,e)=>{Ye.init(t,e),t._zod.parse=(r,n)=>{let i=r.value;return typeof i>"u"||r.issues.push({expected:"void",code:"invalid_type",input:i,inst:t}),r}}),Im=X("$ZodDate",(t,e)=>{Ye.init(t,e),t._zod.parse=(r,n)=>{if(e.coerce)try{r.value=new Date(r.value)}catch{}let i=r.value,u=i instanceof Date;return u&&!Number.isNaN(i.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:i,...u?{received:"Invalid Date"}:{},inst:t}),r}});function _m(t,e,r){t.issues.length&&e.issues.push(...hn(r,t.issues)),e.value[r]=t.value}o(_m,"handleArrayResult");var Rm=X("$ZodArray",(t,e)=>{Ye.init(t,e),t._zod.parse=(r,n)=>{let i=r.value;if(!Array.isArray(i))return r.issues.push({expected:"array",code:"invalid_type",input:i,inst:t}),r;r.value=Array(i.length);let u=[];for(let c=0;c<i.length;c++){let l=i[c],p=e.element._zod.run({value:l,issues:[]},n);p instanceof Promise?u.push(p.then(f=>_m(f,r,c))):_m(p,r,c)}return u.length?Promise.all(u).then(()=>r):r}});function Ya(t,e,r,n,i){if(t.issues.length){if(i&&!(r in n))return;e.issues.push(...hn(r,t.issues))}t.value===void 0?r in n&&(e.value[r]=void 0):e.value[r]=t.value}o(Ya,"handlePropertyResult");function ZT(t){let e=Object.keys(t.shape);for(let n of e)if(!t.shape?.[n]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${n}": expected a Zod schema`);let r=nm(t.shape);return{...t,keys:e,keySet:new Set(e),numKeys:e.length,optionalKeys:new Set(r)}}o(ZT,"normalizeDef");function JT(t,e,r,n,i,u){let c=[],l=i.keySet,p=i.catchall._zod,f=p.def.type,m=p.optout==="optional";for(let y in e){if(l.has(y))continue;if(f==="never"){c.push(y);continue}let P=p.run({value:e[y],issues:[]},n);P instanceof Promise?t.push(P.then(h=>Ya(h,r,y,e,m))):Ya(P,r,y,e,m)}return c.length&&r.issues.push({code:"unrecognized_keys",keys:c,input:e,inst:u}),t.length?Promise.all(t).then(()=>r):r}o(JT,"handleCatchall");var Cm=X("$ZodObject",(t,e)=>{if(Ye.init(t,e),!Object.getOwnPropertyDescriptor(e,"shape")?.get){let l=e.shape;Object.defineProperty(e,"shape",{get:o(()=>{let p={...l};return Object.defineProperty(e,"shape",{value:p}),p},"get")})}let n=Ga(()=>ZT(e));tt(t._zod,"propValues",()=>{let l=e.shape,p={};for(let f in l){let m=l[f]._zod;if(m.values){p[f]??(p[f]=new Set);for(let y of m.values)p[f].add(y)}}return p});let i=gi,u=e.catchall,c;t._zod.parse=(l,p)=>{c??(c=n.value);let f=l.value;if(!i(f))return l.issues.push({expected:"object",code:"invalid_type",input:f,inst:t}),l;l.value={};let m=[],y=c.shape;for(let P of c.keys){let h=y[P],b=h._zod.optout==="optional",T=h._zod.run({value:f[P],issues:[]},p);T instanceof Promise?m.push(T.then(E=>Ya(E,l,P,f,b))):Ya(T,l,P,f,b)}return u?JT(m,f,l,p,n.value,t):m.length?Promise.all(m).then(()=>l):l}});function bm(t,e,r,n){for(let u of t)if(u.issues.length===0)return e.value=u.value,e;let i=t.filter(u=>!bo(u));return i.length===1?(e.value=i[0].value,i[0]):(e.issues.push({code:"invalid_union",input:e.value,inst:r,errors:t.map(u=>u.issues.map(c=>gn(c,n,Zr())))}),e)}o(bm,"handleUnionResults");var Rc=X("$ZodUnion",(t,e)=>{Ye.init(t,e),tt(t._zod,"optin",()=>e.options.some(i=>i._zod.optin==="optional")?"optional":void 0),tt(t._zod,"optout",()=>e.options.some(i=>i._zod.optout==="optional")?"optional":void 0),tt(t._zod,"values",()=>{if(e.options.every(i=>i._zod.values))return new Set(e.options.flatMap(i=>Array.from(i._zod.values)))}),tt(t._zod,"pattern",()=>{if(e.options.every(i=>i._zod.pattern)){let i=e.options.map(u=>u._zod.pattern);return new RegExp(`^(${i.map(u=>Wa(u.source)).join("|")})$`)}});let r=e.options.length===1,n=e.options[0]._zod.run;t._zod.parse=(i,u)=>{if(r)return n(i,u);let c=!1,l=[];for(let p of e.options){let f=p._zod.run({value:i.value,issues:[]},u);if(f instanceof Promise)l.push(f),c=!0;else{if(f.issues.length===0)return f;l.push(f)}}return c?Promise.all(l).then(p=>bm(p,i,t,u)):bm(l,i,t,u)}});var Om=X("$ZodDiscriminatedUnion",(t,e)=>{e.inclusive=!1,Rc.init(t,e);let r=t._zod.parse;tt(t._zod,"propValues",()=>{let i={};for(let u of e.options){let c=u._zod.propValues;if(!c||Object.keys(c).length===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(u)}"`);for(let[l,p]of Object.entries(c)){i[l]||(i[l]=new Set);for(let f of p)i[l].add(f)}}return i});let n=Ga(()=>{let i=e.options,u=new Map;for(let c of i){let l=c._zod.propValues?.[e.discriminator];if(!l||l.size===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(c)}"`);for(let p of l){if(u.has(p))throw new Error(`Duplicate discriminator value "${String(p)}"`);u.set(p,c)}}return u});t._zod.parse=(i,u)=>{let c=i.value;if(!gi(c))return i.issues.push({code:"invalid_type",expected:"object",input:c,inst:t}),i;let l=n.value.get(c?.[e.discriminator]);return l?l._zod.run(i,u):e.unionFallback?r(i,u):(i.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:e.discriminator,input:c,path:[e.discriminator],inst:t}),i)}});var km=X("$ZodRecord",(t,e)=>{Ye.init(t,e),t._zod.parse=(r,n)=>{let i=r.value;if(!tm(i))return r.issues.push({expected:"record",code:"invalid_type",input:i,inst:t}),r;let u=[],c=e.keyType._zod.values;if(c){r.value={};let l=new Set;for(let f of c)if(typeof f=="string"||typeof f=="number"||typeof f=="symbol"){l.add(typeof f=="number"?f.toString():f);let m=e.valueType._zod.run({value:i[f],issues:[]},n);m instanceof Promise?u.push(m.then(y=>{y.issues.length&&r.issues.push(...hn(f,y.issues)),r.value[f]=y.value})):(m.issues.length&&r.issues.push(...hn(f,m.issues)),r.value[f]=m.value)}let p;for(let f in i)l.has(f)||(p=p??[],p.push(f));p&&p.length>0&&r.issues.push({code:"unrecognized_keys",input:i,inst:t,keys:p})}else{r.value={};for(let l of Reflect.ownKeys(i)){if(l==="__proto__")continue;let p=e.keyType._zod.run({value:l,issues:[]},n);if(p instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof l=="string"&&Tc.test(l)&&p.issues.length){let y=e.keyType._zod.run({value:Number(l),issues:[]},n);if(y instanceof Promise)throw new Error("Async schemas not supported in object keys currently");y.issues.length===0&&(p=y)}if(p.issues.length){e.mode==="loose"?r.value[l]=i[l]:r.issues.push({code:"invalid_key",origin:"record",issues:p.issues.map(y=>gn(y,n,Zr())),input:l,path:[l],inst:t});continue}let m=e.valueType._zod.run({value:i[l],issues:[]},n);m instanceof Promise?u.push(m.then(y=>{y.issues.length&&r.issues.push(...hn(l,y.issues)),r.value[p.value]=y.value})):(m.issues.length&&r.issues.push(...hn(l,m.issues)),r.value[p.value]=m.value)}}return u.length?Promise.all(u).then(()=>r):r}});var $m=X("$ZodEnum",(t,e)=>{Ye.init(t,e);let r=Ec(e.entries),n=new Set(r);t._zod.values=n,t._zod.pattern=new RegExp(`^(${r.filter(i=>rm.has(typeof i)).map(i=>typeof i=="string"?_o(i):i.toString()).join("|")})$`),t._zod.parse=(i,u)=>{let c=i.value;return n.has(c)||i.issues.push({code:"invalid_value",values:r,input:c,inst:t}),i}}),zm=X("$ZodLiteral",(t,e)=>{if(Ye.init(t,e),e.values.length===0)throw new Error("Cannot create literal schema with no valid values");let r=new Set(e.values);t._zod.values=r,t._zod.pattern=new RegExp(`^(${e.values.map(n=>typeof n=="string"?_o(n):n?_o(n.toString()):String(n)).join("|")})$`),t._zod.parse=(n,i)=>{let u=n.value;return r.has(u)||n.issues.push({code:"invalid_value",values:e.values,input:u,inst:t}),n}});var Nm=X("$ZodTransform",(t,e)=>{Ye.init(t,e),t._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Va(t.constructor.name);let i=e.transform(r.value,r);if(n.async)return(i instanceof Promise?i:Promise.resolve(i)).then(c=>(r.value=c,r));if(i instanceof Promise)throw new Ar;return r.value=i,r}});function vm(t,e){return t.issues.length&&e===void 0?{issues:[],value:void 0}:t}o(vm,"handleOptionalResult");var Dm=X("$ZodOptional",(t,e)=>{Ye.init(t,e),t._zod.optin="optional",t._zod.optout="optional",tt(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,void 0]):void 0),tt(t._zod,"pattern",()=>{let r=e.innerType._zod.pattern;return r?new RegExp(`^(${Wa(r.source)})?$`):void 0}),t._zod.parse=(r,n)=>{if(e.innerType._zod.optin==="optional"){let i=e.innerType._zod.run(r,n);return i instanceof Promise?i.then(u=>vm(u,r.value)):vm(i,r.value)}return r.value===void 0?r:e.innerType._zod.run(r,n)}});var Um=X("$ZodNullable",(t,e)=>{Ye.init(t,e),tt(t._zod,"optin",()=>e.innerType._zod.optin),tt(t._zod,"optout",()=>e.innerType._zod.optout),tt(t._zod,"pattern",()=>{let r=e.innerType._zod.pattern;return r?new RegExp(`^(${Wa(r.source)}|null)$`):void 0}),tt(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,null]):void 0),t._zod.parse=(r,n)=>r.value===null?r:e.innerType._zod.run(r,n)});var jm=X("$ZodPipe",(t,e)=>{Ye.init(t,e),tt(t._zod,"values",()=>e.in._zod.values),tt(t._zod,"optin",()=>e.in._zod.optin),tt(t._zod,"optout",()=>e.out._zod.optout),tt(t._zod,"propValues",()=>e.in._zod.propValues),t._zod.parse=(r,n)=>{if(n.direction==="backward"){let u=e.out._zod.run(r,n);return u instanceof Promise?u.then(c=>Qa(c,e.in,n)):Qa(u,e.in,n)}let i=e.in._zod.run(r,n);return i instanceof Promise?i.then(u=>Qa(u,e.out,n)):Qa(i,e.out,n)}});function Qa(t,e,r){return t.issues.length?(t.aborted=!0,t):e._zod.run({value:t.value,issues:t.issues},r)}o(Qa,"handlePipeResult");var Mm=X("$ZodCustom",(t,e)=>{yn.init(t,e),Ye.init(t,e),t._zod.parse=(r,n)=>r,t._zod.check=r=>{let n=r.value,i=e.fn(n);if(i instanceof Promise)return i.then(u=>Em(u,r,n,t));Em(i,r,n,t)}});function Em(t,e,r,n){if(!t){let i={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(i.params=n._zod.def.params),e.issues.push(Sc(i))}}o(Em,"handleRefineResult");var Fm;var Cc=class{static{o(this,"$ZodRegistry")}constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...r){let n=r[0];return this._map.set(e,n),n&&typeof n=="object"&&"id"in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let r=this._map.get(e);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(e),this}get(e){let r=e._zod.parent;if(r){let n={...this.get(r)??{}};delete n.id;let i={...n,...this._map.get(e)};return Object.keys(i).length?i:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function Bm(){return new Cc}o(Bm,"registry");(Fm=globalThis).__zod_globalRegistry??(Fm.__zod_globalRegistry=Bm());var Oc=globalThis.__zod_globalRegistry;function qm(t,e){return new t({type:"string",...Ze(e)})}o(qm,"_string");function Vm(t,e){return new t({type:"string",coerce:!0,...Ze(e)})}o(Vm,"_coercedString");function Hm(t,e){return new t({type:"string",format:"url",check:"string_format",abort:!1,...Ze(e)})}o(Hm,"_url");function Gm(t,e){return new t({type:"number",checks:[],...Ze(e)})}o(Gm,"_number");function Wm(t,e){return new t({type:"number",coerce:!0,checks:[],...Ze(e)})}o(Wm,"_coercedNumber");function Zm(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"safeint",...Ze(e)})}o(Zm,"_int");function Jm(t,e){return new t({type:"boolean",...Ze(e)})}o(Jm,"_boolean");function Km(t,e){return new t({type:"boolean",coerce:!0,...Ze(e)})}o(Km,"_coercedBoolean");function Qm(t,e){return new t({type:"bigint",coerce:!0,...Ze(e)})}o(Qm,"_coercedBigint");function Ym(t){return new t({type:"any"})}o(Ym,"_any");function Xm(t){return new t({type:"unknown"})}o(Xm,"_unknown");function eh(t,e){return new t({type:"void",...Ze(e)})}o(eh,"_void");function th(t,e){return new t({type:"date",coerce:!0,...Ze(e)})}o(th,"_coercedDate");function es(t,e){return new pm({check:"greater_than",...Ze(e),value:t,inclusive:!0})}o(es,"_gte");function fr(t,e){return new mm({check:"min_length",...Ze(e),minimum:t})}o(fr,"_minLength");function _n(t,e){return new hm({check:"string_format",format:"regex",...Ze(e),pattern:t})}o(_n,"_regex");function rh(t,e,r){let n=Ze(r);return n.abort??(n.abort=!0),new t({type:"custom",check:"custom",fn:e,...n})}o(rh,"_custom");var rt=X("ZodMiniType",(t,e)=>{if(!t._zod)throw new Error("Uninitialized schema in ZodMiniType.");Ye.init(t,e),t.def=e,t.type=e.type,t.parse=(r,n)=>Ja(t,r,n,{callee:t.parse}),t.safeParse=(r,n)=>_i(t,r,n),t.parseAsync=async(r,n)=>Ka(t,r,n,{callee:t.parseAsync}),t.safeParseAsync=async(r,n)=>bi(t,r,n),t.check=(...r)=>t.clone({...e,checks:[...e.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]},{parent:!0}),t.with=t.check,t.clone=(r,n)=>Za(t,r,n),t.brand=()=>t,t.register=((r,n)=>(r.add(t,n),t)),t.apply=r=>r(t)}),rs=X("ZodMiniString",(t,e)=>{Xa.init(t,e),rt.init(t,e)});function g(t){return qm(rs,t)}o(g,"string");var nh=X("ZodMiniStringFormat",(t,e)=>{xc.init(t,e),rs.init(t,e)});var uw=X("ZodMiniURL",(t,e)=>{Pm.init(t,e),nh.init(t,e)});function oh(t){return Hm(uw,t)}o(oh,"url");var ns=X("ZodMiniNumber",(t,e)=>{Ac.init(t,e),rt.init(t,e)});function lt(t){return Gm(ns,t)}o(lt,"number");var cw=X("ZodMiniNumberFormat",(t,e)=>{Sm.init(t,e),ns.init(t,e)});function ih(t){return Zm(cw,t)}o(ih,"int");var kc=X("ZodMiniBoolean",(t,e)=>{Ic.init(t,e),rt.init(t,e)});function Ce(t){return Jm(kc,t)}o(Ce,"boolean");var ah=X("ZodMiniBigInt",(t,e)=>{Tm.init(t,e),rt.init(t,e)});var lw=X("ZodMiniAny",(t,e)=>{wm.init(t,e),rt.init(t,e)});function Ei(){return Ym(lw)}o(Ei,"any");var dw=X("ZodMiniUnknown",(t,e)=>{xm.init(t,e),rt.init(t,e)});function he(){return Xm(dw)}o(he,"unknown");var pw=X("ZodMiniVoid",(t,e)=>{Am.init(t,e),rt.init(t,e)});function sh(t){return eh(pw,t)}o(sh,"_void");var uh=X("ZodMiniDate",(t,e)=>{Im.init(t,e),rt.init(t,e)});var fw=X("ZodMiniArray",(t,e)=>{Rm.init(t,e),rt.init(t,e)});function de(t,e){return new fw({type:"array",element:t,...Ze(e)})}o(de,"array");var mw=X("ZodMiniObject",(t,e)=>{Cm.init(t,e),rt.init(t,e),tt(t,"shape",()=>e.shape)});function C(t,e){let r={type:"object",shape:t??{},...Ze(e)};return new mw(r)}o(C,"object");var hw=X("ZodMiniUnion",(t,e)=>{Rc.init(t,e),rt.init(t,e)});function be(t,e){return new hw({type:"union",options:t,...Ze(e)})}o(be,"union");var gw=X("ZodMiniDiscriminatedUnion",(t,e)=>{Om.init(t,e),rt.init(t,e)});function bn(t,e,r){return new gw({type:"union",options:e,discriminator:t,...Ze(r)})}o(bn,"discriminatedUnion");var yw=X("ZodMiniRecord",(t,e)=>{km.init(t,e),rt.init(t,e)});function ge(t,e,r){return new yw({type:"record",keyType:t,valueType:e,...Ze(r)})}o(ge,"record");var _w=X("ZodMiniEnum",(t,e)=>{$m.init(t,e),rt.init(t,e),t.options=Object.values(e.entries)});function ue(t,e){let r=Array.isArray(t)?Object.fromEntries(t.map(n=>[n,n])):t;return new _w({type:"enum",entries:r,...Ze(e)})}o(ue,"_enum");var bw=X("ZodMiniLiteral",(t,e)=>{zm.init(t,e),rt.init(t,e)});function ie(t,e){return new bw({type:"literal",values:Array.isArray(t)?t:[t],...Ze(e)})}o(ie,"literal");var vw=X("ZodMiniTransform",(t,e)=>{Nm.init(t,e),rt.init(t,e)});function vn(t){return new vw({type:"transform",transform:t})}o(vn,"transform");var Ew=X("ZodMiniOptional",(t,e)=>{Dm.init(t,e),rt.init(t,e)});function M(t){return new Ew({type:"optional",innerType:t})}o(M,"optional");var Pw=X("ZodMiniNullable",(t,e)=>{Um.init(t,e),rt.init(t,e)});function Pi(t){return new Pw({type:"nullable",innerType:t})}o(Pi,"nullable");var Sw=X("ZodMiniPipe",(t,e)=>{jm.init(t,e),rt.init(t,e)});function En(t,e){return new Sw({type:"pipe",in:t,out:e})}o(En,"pipe");var Tw=X("ZodMiniCustom",(t,e)=>{Mm.init(t,e),rt.init(t,e)});function os(t,e){return rh(Tw,t??(()=>!0),e)}o(os,"custom");var Si={};qa(Si,{bigint:()=>Cw,boolean:()=>Rw,date:()=>Ow,number:()=>Iw,string:()=>Aw});function Aw(t){return Vm(rs,t)}o(Aw,"string");function Iw(t){return Wm(ns,t)}o(Iw,"number");function Rw(t){return Km(kc,t)}o(Rw,"boolean");function Cw(t){return Qm(ah,t)}o(Cw,"bigint");function Ow(t){return th(uh,t)}o(Ow,"date");var zc=C({retryOnFailure:C({defaultValue:M(Ce()),hide:M(Ce())}),continueOnFailure:C({defaultValue:M(Ce()),hide:M(Ce())})}),$c=class{constructor(e,r,n,i,u,c,l,p,f,m,y,P,h){this.name=e;this.displayName=r;this.description=n;this.props=i;this.propertyGroups=u;this.run=c;this.test=l;this.requireAuth=p;this.errorHandlingOptions=f;this.outputSchema=m;this.audience=y;this.aiMetadata=P;this.classification=h}static{o(this,"IAction")}},nt=o(t=>new $c(t.name,t.displayName,t.description,t.props,t.propertyGroups,t.run,t.test??t.run,t.requireAuth??!0,t.errorHandlingOptions??{continueOnFailure:{defaultValue:!1},retryOnFailure:{defaultValue:!1}},t.outputSchema,t.audience,t.aiMetadata,t.classification),"createAction");var xe=C({displayName:g(),description:M(g()),advanced:M(Ce()),width:M(ue(["half","full"])),icon:M(g()),placeholder:M(g())}),ye=o((t,e)=>C({type:ie(e),required:Ce(),defaultValue:M(Ei())}),"TPropertyValue");var Lt=C({...xe.shape,...ye(g(),"SHORT_TEXT").shape}),Jr=C({...xe.shape,...ye(g(),"LONG_TEXT").shape});var lh=C({label:g(),value:he(),description:M(g()),icon:M(g())}),is=C({disabled:M(Ce()),placeholder:M(g()),options:de(lh)});var $w=ue(["cards"]),Ft=C({...xe.shape,options:is,display:M($w),...ye(he(),"STATIC_DROPDOWN").shape}),Kr=C({...xe.shape,options:is,...ye(de(he()),"STATIC_MULTI_SELECT_DROPDOWN").shape});var Nc=C({...xe.shape,...ye(he(),"DROPDOWN").shape,refreshers:de(g())}),Ti=C({...xe.shape,...ye(de(he()),"MULTI_SELECT_DROPDOWN").shape,refreshers:de(g())});var Qr=C({...xe.shape,reveals:M(de(g())),...ye(Ce(),"CHECKBOX").shape});var Yr=C({...xe.shape,display:M(ue(["stepper"])),min:M(lt()),max:M(lt()),step:M(lt()),...ye(lt(),"NUMBER").shape});var wi=C({...xe.shape,streaming:M(Ce()),...ye(he(),"FILE").shape});var xi=C({...xe.shape,...ye(g(),"DATE_TIME").shape});var dh=ge(g(),be([Lt,Jr,Ft,Ti,Kr,Qr,Yr,wi,xi])),Ai=C({...xe.shape,properties:dh,...ye(de(he()),"ARRAY").shape});var ph=ue(["any_time","last_24_hours","last_7_days","last_30_days","last_90_days","this_month","custom"]),fh=C({preset:M(ph),after:M(g()),before:M(g())}),Dc=C({...xe.shape,display:M(ue(["dropdown"])),...ye(fh,"DATE_RANGE").shape});var Ii=C({...xe.shape,...ye(be([ge(g(),he())]),"JSON").shape});var mh=be([Lt,Ft,Ii,Ai,Kr]),zw=ge(g(),mh),Uc=C({refreshers:de(g()),...xe.shape,...ye(he(),"DYNAMIC").shape});var as=C({...xe.shape,...ye(sh(),"MARKDOWN").shape});var Ri=(r=>(r.ARCHIVE="ARCHIVE",r.REGISTRY="REGISTRY",r))(Ri||{}),vo=(r=>(r.CUSTOM="CUSTOM",r.OFFICIAL="OFFICIAL",r))(vo||{}),Eo=(w=>(w.ARTIFICIAL_INTELLIGENCE="ARTIFICIAL_INTELLIGENCE",w.COMMUNICATION="COMMUNICATION",w.COMMERCE="COMMERCE",w.CORE="CORE",w.UNIVERSAL_AI="UNIVERSAL_AI",w.FLOW_CONTROL="FLOW_CONTROL",w.BUSINESS_INTELLIGENCE="BUSINESS_INTELLIGENCE",w.ACCOUNTING="ACCOUNTING",w.PRODUCTIVITY="PRODUCTIVITY",w.CONTENT_AND_FILES="CONTENT_AND_FILES",w.DEVELOPER_TOOLS="DEVELOPER_TOOLS",w.CUSTOMER_SUPPORT="CUSTOMER_SUPPORT",w.FORMS_AND_SURVEYS="FORMS_AND_SURVEYS",w.HUMAN_RESOURCES="HUMAN_RESOURCES",w.PAYMENT_PROCESSING="PAYMENT_PROCESSING",w.MARKETING="MARKETING",w.SALES_AND_CRM="SALES_AND_CRM",w))(Eo||{});var Ci=(r=>(r.AUTHORIZATION_CODE="authorization_code",r.CLIENT_CREDENTIALS="client_credentials",r))(Ci||{}),jc="both_client_credentials_and_authorization_code";var mr=(i=>(i.POLLING="POLLING",i.WEBHOOK="WEBHOOK",i.APP_WEBHOOK="APP_WEBHOOK",i.MANUAL="MANUAL",i))(mr||{}),Oi=(u=>(u.NONE="NONE",u.HEADER_PRESENT="HEADER_PRESENT",u.QUERY_PRESENT="QUERY_PRESENT",u.BODY_PARAM_PRESENT="BODY_PARAM_PRESENT",u.HEAD_REQUEST="HEAD_REQUEST",u))(Oi||{}),Nw=C({strategy:ue(Oi),paramName:M(g())}),ki=(r=>(r.SIMULATION="SIMULATION",r.TEST_FUNCTION="TEST_FUNCTION",r))(ki||{});var ss=(r=>(r.WEBSOCKET="WEBSOCKET",r.NONE="NONE",r))(ss||{}),hh=C({status:M(lt()),body:M(he()),headers:M(ge(g(),g()))}),gh=C({type:ie("DELAY"),resumeDateTime:g(),requestIdToReply:M(g()),handlerId:M(g()),streamStepProgress:M(ue(ss))}),yh=C({type:ie("WEBHOOK"),requestId:g(),requestIdToReply:M(g()),response:hh,handlerId:M(g()),streamStepProgress:M(ue(ss))}),Dw=be([gh,yh]);var Uw=C({body:he(),rawBody:M(he()),headers:ge(g(),g()),queryParams:ge(g(),g())});function et(t){return t==null}o(et,"isNil");function $i(t){return t==null?!0:typeof t=="string"||Array.isArray(t)?t.length===0:typeof t=="object"?Object.keys(t).length===0:!1}o($i,"isEmpty");function us(t,e){if(t==null)throw new Error(`${e} is null or undefined`)}o(us,"assertNotNullOrUndefined");var Mc=yt(require("crypto"),1);var jw=128,Pn,Po,Mw=o(t=>{if(t<0)throw new RangeError("Wrong ID size");try{!Pn||Pn.length<t?(Pn=Buffer.allocUnsafe(t*jw),Mc.default.randomFillSync(Pn),Po=0):Po+t>Pn.length&&(Mc.default.randomFillSync(Pn),Po=0)}catch(e){throw Pn=void 0,e}Po+=t},"fillPool"),Lw=o(t=>(Mw(t|=0),Pn.subarray(Po-t,Po)),"random"),Fw=o((t,e,r)=>{let n=(2<<31-Math.clz32(t.length-1|1))-1,i=Math.ceil(1.6*n*e/t.length);return(u=e)=>{if(u<=0)return"";let c="";for(;;){let l=r(i),p=i;for(;p--;)if(c+=t[l[p]&n]||"",c.length===u)return c}}},"customRandom"),bh=o((t,e=21)=>Fw(t,e,Lw),"customAlphabet");var Bw="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",vh=21,RB=g().check(_n(new RegExp(`^[0-9a-zA-Z]{${vh}}$`))),qw=bh(Bw,vh);var Sn=En(vn(t=>t instanceof Date?t.toISOString():t),g()),tr={id:g(),created:Sn,updated:Sn},Qe=o(t=>M(Pi(t)),"Nullable");function Lc(t){return M(Pi(ue(t)))}o(Lc,"NullableEnum");var kB=En(vn(t=>t==="true"||t===!0?!0:t==="false"||t===!1?!1:void 0),M(Ce())),cs=o(t=>En(vn(e=>Array.isArray(e)?e:e!==void 0?[e]:void 0),M(de(t))),"OptionalArrayFromQuery");var NB=ge(g(),he());var zi=(m=>(m.OPENAI="openai",m.OPENROUTER="openrouter",m.ANTHROPIC="anthropic",m.AZURE="azure",m.GOOGLE="google",m.ACTIVEPIECES="activepieces",m.CLOUDFLARE_GATEWAY="cloudflare-gateway",m.CUSTOM="custom",m.BEDROCK="bedrock",m.MISTRAL="mistral",m))(zi||{});var WB=g().check(_n(/^#[0-9A-Fa-f]{6}$/));var JB=C({filename:g(),data:he(),type:ie("file"),mimetype:M(g())});var Vw=yt(Ph());var r4=C({...tr,name:g(),permissions:de(g()),platformId:Qe(g()),type:g(),userCount:M(lt())});var Sh=(n=>(n.AGENT_DECIDE="agent-decide",n.CHOOSE_YOURSELF="choose-yourself",n.LEAVE_EMPTY="leave-empty",n))(Sh||{}),Fc=(r=>(r.FILE="FILE",r.TABLE="TABLE",r))(Fc||{}),Bc=(n=>(n.SSE="sse",n.STREAMABLE_HTTP="streamable-http",n.SIMPLE_HTTP="http",n))(Bc||{});var qc=(n=>(n.TEXT="text",n.NUMBER="number",n.BOOLEAN="boolean",n))(qc||{});var Vc=(r=>(r.IN_PROGRESS="in-progress",r.COMPLETED="completed",r))(Vc||{});var Hw=C({mode:ue(Sh),value:he()}),Gw=C({auth:M(g()),fields:ge(g(),Hw)}),Ww=C({pieceName:g(),pieceVersion:g(),actionName:g(),predefinedInput:M(Gw)}),Zw=C({type:ie("PIECE"),toolName:g().check(fr(1)),pieceMetadata:Ww}),Jw=C({type:ie("none")}),Kw=C({type:ie("access_token"),accessToken:g()}),Qw=C({type:ie("api_key"),apiKey:g(),apiKeyHeader:g()}),Yw=C({type:ie("headers"),headers:ge(g(),g())}),Xw=bn("type",[Jw,Kw,Qw,Yw]),Th=C({type:ie("FLOW"),toolName:g().check(fr(1)),externalFlowId:g(),flowDisplayName:M(g())}),wh=C({type:ie("MCP"),toolName:g().check(fr(1)),serverUrl:oh(),protocol:ue(Bc),auth:Xw}),xh=C({type:ie("KNOWLEDGE_BASE"),toolName:g().check(fr(1)),sourceType:ue(Fc),sourceId:g(),sourceName:g()}),ex=bn("type",[Zw,Th,wh,xh]),tx=C({displayName:g(),description:M(g()),type:ue(qc)}),Ah=C({type:ie("MARKDOWN"),markdown:g()}),So={type:ie("TOOL_CALL"),input:Qe(ge(g(),he())),output:M(he()),toolName:g(),status:ue(Vc),toolCallId:g(),startTime:g(),endTime:M(g())},$4=C(So),Ih=bn("toolCallType",[C({...So,toolCallType:ie("PIECE"),pieceName:g(),pieceVersion:g(),actionName:g()}),C({...So,toolCallType:ie("FLOW"),displayName:g(),externalFlowId:g()}),C({...So,toolCallType:ie("MCP"),displayName:g(),serverUrl:g()}),C({...So,toolCallType:ie("KNOWLEDGE_BASE"),displayName:g(),sourceType:g()}),C({...So,toolCallType:ie("UNKNOWN"),displayName:g()})]),rx=be([Ah,Ih]);var Hc=(r=>(r.IMAGE="image",r.TEXT="text",r))(Hc||{}),Xr=C({apiKey:g()}),nx=Xr,ox=C({apiKey:g(),apiKeyHash:g()}),ix=Xr,ax=Xr,sx=Xr,ux=Xr,cx=Xr,lx=Xr,dx=Xr,$h=C({accessKeyId:g().check(fr(1)),secretAccessKey:g().check(fr(1))}),px=C({}),fx=C({}),mx=C({}),hx=C({}),gx=C({}),yx=C({}),zh=C({modelId:g(),modelName:g(),modelType:ue(Hc)}),Nh=C({apiKeyHeader:g(),baseUrl:g(),models:de(zh),defaultHeaders:M(ge(g(),g()))}),Dh=C({accountId:g(),gatewayId:g(),models:de(zh),vertexProject:M(g()),vertexRegion:M(g())}),Uh=C({resourceName:g(),apiVersion:En(vn(t=>typeof t=="string"&&t.trim().length===0?void 0:t),M(g()))}),jh=C({region:g().check(fr(1))}),_x=be([nx,sx,ux,cx,lx,ax,ix,ox,$h,dx]),Mh=be([Nh,Dh,Uh,jh,px,mx,hx,gx,fx,yx]),bx=C({id:g(),name:g(),type:ue(Hc)}),vx=C({id:g(),name:g(),provider:ue(zi),config:Mh,enabledForChat:Ce()}),Ex=C({provider:ue(zi),config:Mh,auth:_x,platformId:g()});var U4={openai:"openai",anthropic:"anthropic","google-ai-studio":"google","google-vertex-ai":"google"},Rh=["gpt-5.5","gpt-5.4-mini","gpt-5.4-nano","gpt-4.1","gpt-4.1-mini"],Px=["claude-sonnet-4-6","claude-opus-4-7","claude-haiku-4-5"],Sx=["claude-sonnet-4.6","claude-opus-4.7","claude-haiku-4.5"],Ch=["gemini-2.5-pro","gemini-2.5-flash","gemini-3.1-pro-preview","gemini-3-flash-preview"],Tx=["grok-4.20","grok-4.1-fast"],wx={openai:Rh,anthropic:Px,google:Ch,activepieces:[...Sx.map(t=>`anthropic/${t}`),...Rh.map(t=>`openai/${t}`),...Ch.map(t=>`google/${t}`),...Tx.map(t=>`x-ai/${t}`)]};var Oh=128e3,xx={openai:128e3,anthropic:2e5,google:1048576,bedrock:2e5,azure:128e3,openrouter:128e3,activepieces:2e5,mistral:128e3};function Ax({provider:t}){return t?xx[t]??Oh:Oh}o(Ax,"getMaxContextTokens");var kh={openai:"text-embedding-3-small",google:"text-embedding-004",azure:"text-embedding-3-small",activepieces:"text-embedding-3-small",openrouter:"openai/text-embedding-3-small"},Ix={anthropic:"native",google:"native",openrouter:"plugin",activepieces:"plugin"},Rx=new Set(["anthropic","mistral"]);function Ir(t){return{chatModels:wx[t],maxContextTokens:Ax({provider:t}),defaultEmbeddingModel:kh[t],supportsEmbedding:kh[t]!==void 0,supportsImageGeneration:!Rx.has(t),webSearch:Ix[t]}}o(Ir,"buildProviderCapabilities");var Cx={openai:Ir("openai"),anthropic:Ir("anthropic"),openrouter:Ir("openrouter"),azure:Ir("azure"),google:Ir("google"),"cloudflare-gateway":Ir("cloudflare-gateway"),custom:Ir("custom"),bedrock:Ir("bedrock"),mistral:Ir("mistral"),activepieces:Ir("activepieces")};var Ox=C({base64Url:g(),fileName:g(),extension:M(g())}),kx=C({mimeType:g(),url:g(),fileName:M(g())}),Gc=be([Ox,kx]);var $x=be([C({type:ie("file"),value:Gc}),C({type:ie("markdown"),value:g(),files:M(de(Gc))})]),zx=C({sessionId:g(),message:g(),files:M(de(g()))});var Fh=(r=>(r.ON_NEW_RECORD="ON_NEW_RECORD",r.ON_UPDATE_RECORD="ON_UPDATE_RECORD",r))(Fh||{}),Bh=(r=>(r.ENABLED="ENABLED",r.DISABLED="DISABLED",r))(Bh||{}),Wc=(n=>(n.RECORD_CREATED="RECORD_CREATED",n.RECORD_UPDATED="RECORD_UPDATED",n.RECORD_DELETED="RECORD_DELETED",n))(Wc||{});var Nx=be([C({...tr,name:g(),externalId:g(),type:ie("STATIC_DROPDOWN"),tableId:g(),projectId:g(),data:C({options:de(C({value:g()}))})}),C({...tr,name:g(),externalId:g(),type:be([ie("TEXT"),ie("NUMBER"),ie("DATE"),ie("DATETIME")]),tableId:g(),projectId:g()})]),Dx=C({...tr,name:g(),folderId:Qe(g()),projectId:g(),externalId:g(),status:Lc(Bh),trigger:Lc(Fh)}),Ux=C({...tr,tableId:g(),projectId:g(),cells:ge(g(),C({updated:g(),created:g(),value:he(),fieldName:g()}))}),jx=C({events:de(ue(Wc)),webhookUrl:g(),flowId:g()}),Mx=C({fields:de(C({id:g(),name:g()})),rows:de(ge(g(),g())),name:g()}),Lx=C({projectId:g(),limit:M(Si.number()),cursor:M(g()),name:M(g()),externalIds:cs(g()),folderId:M(g()),folderIds:cs(g())}),Fx=C({records:de(de(C({fieldId:g(),value:Vh()}))),tableId:g()}),Bx=C({cells:M(de(C({fieldId:g(),value:Vh()}))),tableId:g(),agentUpdate:M(Ce())}),qh=bn("operator",[Bn("eq"),Bn("neq"),Bn("gt"),Bn("gte"),Bn("lt"),Bn("lte"),Bn("co"),Lh("exists"),Lh("not_exists")]),qx=C({tableId:g(),limit:M(Si.number()),cursor:M(g()),filters:cs(qh)});function Vh(){return En(vn(t=>t==null?t:String(t)),Pi(g()))}o(Vh,"coerceToString");function Bn(t){return C({fieldId:g(),operator:ie(t),value:g()})}o(Bn,"valueFilter");function Lh(t){return C({fieldId:g(),operator:ie(t)})}o(Lh,"existenceFilter");var Vx=C({status:M(lt()),body:M(he()),headers:M(ge(g(),g()))}),Hx=C({...tr,deleted:Qe(Sn),ownerId:g(),displayName:g(),platformId:g(),externalId:Qe(g())});var Hh=C({name:g(),description:M(g()),type:g(),required:Ce()}),Gx=C({pieceName:g(),triggerName:g(),input:C({toolName:g(),toolDescription:g(),inputSchema:de(Hh),returnsResponse:Ce()})});var Gh="^[0-9]+\\.[0-9]+\\.[0-9]+$",rq=new RegExp(Gh),Zx="^([~^])?[0-9]+\\.[0-9]+\\.[0-9]+$",nq=g().check(_n(new RegExp(Gh))),oq=g().check(_n(new RegExp(Zx))),Jx=C({packageType:ie("ARCHIVE"),pieceType:ue(vo),pieceName:g(),pieceVersion:g(),archiveId:g(),platformId:g()}),Wh=C({packageType:ie("REGISTRY"),pieceType:ie("OFFICIAL"),pieceName:g(),pieceVersion:g()}),Zh=C({packageType:ie("REGISTRY"),pieceType:ie("CUSTOM"),pieceName:g(),pieceVersion:g(),platformId:g()}),iq=be([Wh,Zh]),aq=be([Jx,Wh,Zh]);var Kx=bn("type",[C({type:ie("CRON_EXPRESSION"),cronExpression:g(),timezone:g()}),C({type:ie("INTERVAL"),intervalMs:ih().check(es(6e4))})]),sq=C({...tr,type:ue(mr),projectId:g(),flowId:g(),triggerName:g(),schedule:Qe(Kx),flowVersionId:g(),pieceName:g(),pieceVersion:g(),deleted:Qe(g()),simulate:Ce()}),Jh=(E=>(E.UNKNOWN="UNKNOWN",E.FLOW_RUN_LOG="FLOW_RUN_LOG",E.FLOW_RUN_LOG_SLICE="FLOW_RUN_LOG_SLICE",E.PACKAGE_ARCHIVE="PACKAGE_ARCHIVE",E.FLOW_STEP_FILE="FLOW_STEP_FILE",E.SAMPLE_DATA="SAMPLE_DATA",E.TRIGGER_PAYLOAD="TRIGGER_PAYLOAD",E.SAMPLE_DATA_INPUT="SAMPLE_DATA_INPUT",E.TRIGGER_EVENT_FILE="TRIGGER_EVENT_FILE",E.PROJECT_RELEASE="PROJECT_RELEASE",E.FLOW_VERSION_BACKUP="FLOW_VERSION_BACKUP",E.PLATFORM_ASSET="PLATFORM_ASSET",E.USER_PROFILE_PICTURE="USER_PROFILE_PICTURE",E.WEBHOOK_PAYLOAD="WEBHOOK_PAYLOAD",E.KNOWLEDGE_BASE="KNOWLEDGE_BASE",E.FLOW_BUNDLE="FLOW_BUNDLE",E))(Jh||{}),Kh=(r=>(r.NONE="NONE",r.ZSTD="ZSTD",r))(Kh||{}),Qh=(r=>(r.S3="S3",r.DB="DB",r))(Qh||{}),uq=C({...tr,projectId:Qe(g()),platformId:Qe(g()),type:ue(Jh),compression:ue(Kh),data:M(he()),location:ue(Qh),size:Qe(lt()),fileName:Qe(g()),s3Key:Qe(g()),metadata:Qe(ge(g(),g()))}),Yh=(n=>(n.ADMIN="ADMIN",n.MEMBER="MEMBER",n.OPERATOR="OPERATOR",n))(Yh||{}),Xh=(r=>(r.ACTIVE="ACTIVE",r.INACTIVE="INACTIVE",r))(Xh||{}),cq=C({id:g(),email:g(),firstName:g(),status:ue(Xh),externalId:Qe(g()),platformId:Qe(g()),platformRole:ue(Yh),lastName:g(),created:Sn,updated:Sn,lastActiveDate:Qe(Sn),imageUrl:Qe(g())});var Jc=C({...xe.shape,...ye(ge(g(),he()),"OBJECT").shape});var Kc=C({...xe.shape,formatProperty:M(g()),...ye(g(),"RICH_TEXT").shape});var rg=C({...xe.shape,...ye(g(),"COLOR").shape});var Qc=be([Lt,Jr,Kc,as,Qr,Ft,Kr,Nc,Ti,Uc,Yr,Ai,Jc,Ii,xi,Dc,wi,rg]),K={ShortText(t){return{...t,valueSchema:void 0,type:"SHORT_TEXT"}},Checkbox(t){return{...t,valueSchema:void 0,type:"CHECKBOX"}},LongText(t){return{...t,valueSchema:void 0,type:"LONG_TEXT"}},RichText(t){return{...t,valueSchema:void 0,type:"RICH_TEXT"}},MarkDown(t){return{displayName:"Markdown",required:!1,description:t.value,type:"MARKDOWN",valueSchema:void 0,variant:t.variant??"INFO"}},Number(t){return{...t,valueSchema:void 0,type:"NUMBER"}},Json(t){return{...t,valueSchema:void 0,type:"JSON"}},Array(t){return{...t,valueSchema:void 0,type:"ARRAY"}},Object(t){return{...t,valueSchema:void 0,type:"OBJECT"}},Dropdown(t){return{...t,valueSchema:void 0,type:"DROPDOWN"}},StaticDropdown(t){return{...t,valueSchema:void 0,type:"STATIC_DROPDOWN"}},MultiSelectDropdown(t){return{...t,valueSchema:void 0,type:"MULTI_SELECT_DROPDOWN"}},DynamicProperties(t){return{...t,valueSchema:void 0,type:"DYNAMIC"}},StaticMultiSelectDropdown(t){return{...t,valueSchema:void 0,type:"STATIC_MULTI_SELECT_DROPDOWN"}},DateTime(t){return{...t,valueSchema:void 0,type:"DATE_TIME"}},DateRange(t){return{...t,valueSchema:void 0,type:"DATE_RANGE"}},File(t){return{...t,valueSchema:void 0,type:"FILE"}},Custom(t){let e=t.code.toString();return{...t,code:e,valueSchema:void 0,type:"CUSTOM"}},Color(t){return{...t,valueSchema:void 0,type:"COLOR"}}};var Rr=C({displayName:g(),description:M(g()),hasConnectionIdentifier:M(Ce())});var ng=C({username:g(),password:g()}),Yc=C({...Rr.shape,username:C({displayName:g(),description:M(g())}),password:C({displayName:g(),description:M(g())}),...ye(ng,"BASIC_AUTH").shape});var eA=ge(g(),be([Lt,Jr,Yr,Qr,Ft])),Xc=C({...Rr.shape,props:eA,...ye(he(),"CUSTOM_AUTH").shape});var qn=C({...Rr.shape,...ye(C({auth:g()}),"SECRET_TEXT").shape});var tA=ge(g(),be([Lt,Jr,qn,Yr,Qr,Ft,Kr,as])),og=C({...Rr.shape,props:tA,...ye(he(),"OIDC").shape});var el=(r=>(r.HEADER="HEADER",r.BODY="BODY",r))(el||{}),ig=be([Lt,qn,Ft]),ag=ge(g(),ig),rA=C({props:M(ge(g(),ig)),authUrl:g(),tokenUrl:g(),scope:de(g()),prompt:M(be([ie("none"),ie("consent"),ie("login"),ie("omit")])),pkce:M(Ce()),pkceMethod:M(be([ie("plain"),ie("S256")])),authorizationMethod:M(ue(el)),grantType:M(be([ue(Ci),ie(jc)])),extra:M(ge(g(),g()))}),sg=C({access_token:g(),props:M(ag),data:ge(g(),Ei())}),tl=C({...Rr.shape,...rA.shape,...ye(sg,"OAUTH2").shape});var To=be([Yc,Xc,og,tl,qn]),Ni="Connection",ds={SecretText(t){return{...t,valueSchema:void 0,type:"SECRET_TEXT"}},OAuth2(t){return{...t,valueSchema:void 0,type:"OAUTH2",displayName:t.displayName||Ni}},BasicAuth(t){return{...t,valueSchema:void 0,type:"BASIC_AUTH",displayName:t.displayName||Ni,required:!0}},CustomAuth(t){return{...t,valueSchema:void 0,type:"CUSTOM_AUTH",displayName:t.displayName||Ni}},OIDC(t){return{...t,valueSchema:void 0,type:"OIDC",displayName:t.displayName||Ni}},None(){}};var G6={OAUTH2:"OAUTH2",CLOUD_OAUTH2:"OAUTH2",PLATFORM_OAUTH2:"OAUTH2",BASIC_AUTH:"BASIC_AUTH",CUSTOM_AUTH:"CUSTOM_AUTH",OIDC:"OIDC",SECRET_TEXT:"SECRET_TEXT",NO_AUTH:void 0};var nA=C({...xe.shape,...ye(he(),"CUSTOM").shape,code:g()});var oA=be([Qc,To]),rl=ge(g(),oA),fV=ge(g(),Qc);var ug=be([C({strategy:ie("CRON"),cronExpression:g()}),C({strategy:ie("NONE")})]),wo=class{constructor(e,r,n,i,u,c,l,p,f,m,y,P,h,b,T,E,w,k,q,W,H){this.name=e;this.displayName=r;this.description=n;this.requireAuth=i;this.props=u;this.type=c;this.handshakeConfiguration=l;this.onHandshake=p;this.renewConfiguration=f;this.onRenew=m;this.onEnable=y;this.onDisable=P;this.onStart=h;this.run=b;this.test=T;this.sampleData=E;this.testStrategy=w;this.outputSchema=k;this.aiMetadata=q;this.classification=W;this.propertyGroups=H}static{o(this,"ITrigger")}},Tn=o(t=>{switch(t.type){case"WEBHOOK":return new wo(t.name,t.displayName,t.description,t.requireAuth??!0,t.props,t.type,t.handshakeConfiguration??{strategy:"NONE"},t.onHandshake??(async()=>({status:200})),t.renewConfiguration??{strategy:"NONE"},t.onRenew??(async()=>Promise.resolve()),t.onEnable,t.onDisable,t.onStart??(async()=>Promise.resolve()),t.run,t.test??(()=>Promise.resolve([t.sampleData])),t.sampleData,t.test?"TEST_FUNCTION":"SIMULATION",t.outputSchema,t.aiMetadata,t.classification,t.propertyGroups);case"POLLING":return new wo(t.name,t.displayName,t.description,t.requireAuth??!0,t.props,t.type,{strategy:"NONE"},async()=>({status:200}),{strategy:"NONE"},(async()=>Promise.resolve()),t.onEnable,t.onDisable,t.onStart??(async()=>Promise.resolve()),t.run,t.test??(()=>Promise.resolve([t.sampleData])),t.sampleData,"TEST_FUNCTION",t.outputSchema,t.aiMetadata,t.classification,t.propertyGroups);case"MANUAL":return new wo(t.name,t.displayName,t.description,t.requireAuth??!0,t.props,t.type,{strategy:"NONE"},async()=>({status:200}),{strategy:"NONE"},(async()=>Promise.resolve()),t.onEnable,t.onDisable,t.onStart??(async()=>Promise.resolve()),t.run,t.test??(()=>Promise.resolve([t.sampleData])),t.sampleData,"TEST_FUNCTION",t.outputSchema,t.aiMetadata,t.classification,t.propertyGroups);case"APP_WEBHOOK":return new wo(t.name,t.displayName,t.description,t.requireAuth??!0,t.props,t.type,{strategy:"NONE"},async()=>({status:200}),{strategy:"NONE"},(async()=>Promise.resolve()),t.onEnable,t.onDisable,t.onStart??(async()=>Promise.resolve()),t.run,t.test??(()=>Promise.resolve([t.sampleData])),t.sampleData,et(t.sampleData)&&et(t.test)?"SIMULATION":"TEST_FUNCTION",t.outputSchema,t.aiMetadata,t.classification,t.propertyGroups)}},"createTrigger");var cg="2",ps="0.82.0";var nl=class{constructor(e,r,n,i,u,c,l,p,f=ps,m,y="",P){this.displayName=e;this.logoUrl=r;this.authors=n;this.events=i;this.categories=l;this.auth=p;this.minimumSupportedRelease=f;this.maximumSupportedRelease=m;this.description=y;this.deprecated=P;this._actions={};this._triggers={};this.getContextInfo=o(()=>({version:cg}),"getContextInfo");(!aA(f)||sA(f,ps))&&(this.minimumSupportedRelease=ps),u.forEach(h=>this._actions[h.name]=h),c.forEach(h=>this._triggers[h.name]=h)}static{o(this,"Piece")}metadata(){return{displayName:this.displayName,logoUrl:this.logoUrl,actions:this._actions,triggers:this._triggers,categories:this.categories,description:this.description,authors:this.authors,auth:iA(this.auth),minimumSupportedRelease:this.minimumSupportedRelease,maximumSupportedRelease:this.maximumSupportedRelease,deprecated:this.deprecated,contextInfo:this.getContextInfo?.()}}getAction(e){return this._actions[e]}getTrigger(e){return this._triggers[e]}actions(){return this._actions}triggers(){return this._triggers}},dg=o(t=>{if(t.auth&&Array.isArray(t.auth)&&!t.auth.every((r,n,i)=>n===i.findIndex(u=>u.type===r.type)))throw new Error("Auth properties must be unique by type");return new nl(t.displayName,t.logoUrl,t.authors??[],t.events,t.actions,t.triggers,t.categories??[],t.auth,t.minimumSupportedRelease,t.maximumSupportedRelease,t.description,t.deprecated)},"createPiece");function iA(t){if(t!==void 0)return Array.isArray(t)?t.map(lg):lg(t)}o(iA,"withConnectionIdentifierFlag");function lg(t){return{...t,hasConnectionIdentifier:t.getConnectionIdentifier!==void 0}}o(lg,"flagConnectionIdentifier");function aA(t){return/^\d+\.\d+\.\d+$/.test(t)}o(aA,"isValidSimpleSemver");function sA(t,e){let[r,n,i]=t.split(".").map(Number),[u,c,l]=e.split(".").map(Number);return r!==u?r<u:n!==c?n<c:i<l}o(sA,"isSemverLessThan");var uA=M(ge(g(),ge(g(),g()))),pg=C({id:M(g()),name:g(),displayName:g(),logoUrl:g(),description:g(),authors:de(g()),platformId:M(g()),directoryPath:M(g()),auth:M(be([To,de(To)])),version:g(),categories:M(de(ue(Eo))),minimumSupportedRelease:M(g()),maximumSupportedRelease:M(g()),deprecated:M(Ce()),i18n:uA}),cA=ue(["human","ai","both"]),fg=C({description:M(g()),idempotent:M(Ce())}),mg=ue(["READ","SEARCH","WRITE","DESTRUCTIVE"]);var lA=ue(["tabs","section","summary","builder","footer"]),hg=C({key:g(),display:lA,label:M(g()),description:M(g()),icon:M(g()),props:de(g())}),gg=C({name:g(),displayName:g(),description:g(),props:rl,propertyGroups:M(de(hg)),requireAuth:Ce(),errorHandlingOptions:M(zc),outputSchema:M(os()),audience:M(cA),aiMetadata:M(fg),classification:M(mg)}),yg=C({name:g(),displayName:g(),description:g(),props:rl,propertyGroups:M(de(hg)),errorHandlingOptions:M(zc),type:ue(mr),sampleData:he(),handshakeConfiguration:M(os()),renewConfiguration:M(ug),testStrategy:ue(ki),outputSchema:M(os()),aiMetadata:M(fg),classification:M(mg)}),dA=C({...pg.shape,actions:ge(g(),gg),triggers:ge(g(),yg)}),pA=C({...pg.shape,actions:lt(),triggers:lt(),suggestedActions:M(de(gg)),suggestedTriggers:M(de(yg))}),_g=C({projectUsage:lt(),pieceType:ue(vo),packageType:ue(Ri),platformId:M(g()),archiveId:M(g())}),h2=C({...dA.shape,..._g.shape}),g2=C({...pA.shape,..._g.shape}),y2=C({name:g(),version:g()});var fA=yt(require("path")),mA=yt(require("fs/promises"));var xo=require("node:stream");var fs=class{constructor(e,r){this.baseUrl=e;this.authenticationConverter=r}static{o(this,"BaseHttpClient")}getUrl(e){let r=new URL(`${this.baseUrl}${e.url}`),n=`${r.origin}${r.pathname}`,i=new URLSearchParams;return r.searchParams.forEach((u,c)=>{i.append(c,u)}),{urlWithoutQueryParams:n,queryParams:i}}getHeaders(e){let r={Accept:"application/json"};return e.authentication&&this.populateAuthentication(e.authentication,r),e.body&&(e.headers?.["Content-Type"]==="text/csv"?r["Content-Type"]="text/csv":r["Content-Type"]="application/json"),e.headers&&(r={...r,...e.headers}),r}populateAuthentication(e,r){this.authenticationConverter.convert(e,r)}};var ms=class{static{o(this,"DelegatingAuthenticationConverter")}constructor(e=new ol,r=new il){this.converters={BEARER_TOKEN:e,BASIC:r}}convert(e,r){return this.converters[e.type].convert(e,r)}},ol=class{static{o(this,"BearerTokenAuthenticationConverter")}convert(e,r){return r.Authorization=`Bearer ${e.token}`,r}},il=class{static{o(this,"BasicTokenAuthenticationConverter")}convert(e,r){let n=`${e.username}:${e.password}`,i=Buffer.from(n).toString("base64");return r.Authorization=`Basic ${i}`,r}};var Di=class extends Error{constructor(r,n){let i=n.status||500,u=Buffer.isBuffer(n.responseBody)?n.responseBody.toString():n.responseBody;super(JSON.stringify({response:{status:i,body:u},request:{body:r}}));this.requestBody=r;this.status=i,this.responseBody=u}static{o(this,"HttpError")}errorMessage(){return{response:{status:this.status,body:this.responseBody},request:{body:this.requestBody}}}get response(){return{status:this.status,body:this.responseBody}}get request(){return{body:this.requestBody}}};function bg({error:t,requestBody:e}){return t instanceof Di?t.errorMessage():{response:{status:0,body:t instanceof Error?t.message:String(t)},request:{body:e}}}o(bg,"toFailsafeOutput");var xt=(c=>(c.GET="GET",c.POST="POST",c.PATCH="PATCH",c.PUT="PUT",c.DELETE="DELETE",c.HEAD="HEAD",c))(xt||{});var hs=class extends fs{static{o(this,"FetchHttpClient")}constructor(e="",r=new ms){super(e,r)}async sendRequest(e,r){process.env.NODE_TLS_REJECT_UNAUTHORIZED="0";let{urlWithoutQueryParams:n,queryParams:i}=this.getUrl(e),u=this.getHeaders(e),c=e.queryParams??{};for(let[q,W]of Object.entries(c))i.append(q,W);let l=i.toString(),p=l?`${n}?${l}`:n,f=e.responseType??"json",m=e.followRedirects??!0,y=e.retries??0,{body:P,extraHeaders:h,isStream:b}=hA(e.method)?gA(e.body,u):{body:void 0,extraHeaders:{},isStream:!1},T=_A({...u,...h}),E=await yA(async()=>{let q=new AbortController,W=e.timeout&&e.timeout>0?setTimeout(()=>q.abort(),e.timeout):void 0;try{let H={method:e.method.toString(),headers:T,body:P,redirect:m?"follow":"manual",signal:q.signal};return b&&(H.duplex="half"),r?.dispatcher!==void 0&&(H.dispatcher=r.dispatcher),await fetch(p,H)}finally{W!==void 0&&clearTimeout(W)}},b?0:y),w=m?300:400;if(E.status<200||E.status>=w){let q=await vg(E,f==="stream"?"text":f),W=new Di(e.body,{status:E.status,responseBody:q});throw console.error("[HttpClient#(sanitized error message)] Request failed:",W),W}let k=await vg(E,f);return{status:E.status,headers:bA(E.headers),body:k}}};function hA(t){return t!=="GET"&&t!=="HEAD"}o(hA,"acceptsRequestBody");function gA(t,e){if(Pg(t))return{body:void 0,extraHeaders:{},isStream:!1};if(vA(t)){let n=new xo.PassThrough;return t.on("error",i=>n.destroy(i)),t.pipe(n),{body:n,extraHeaders:t.getHeaders(),isStream:!0}}return t instanceof xo.Readable?{body:t,extraHeaders:{},isStream:!0}:typeof t=="string"||Buffer.isBuffer(t)||t instanceof URLSearchParams||t instanceof ArrayBuffer||typeof FormData<"u"&&t instanceof FormData||typeof Blob<"u"&&t instanceof Blob?{body:t,extraHeaders:{},isStream:!1}:(e["Content-Type"]??e["content-type"]??"").includes("application/x-www-form-urlencoded")?{body:new URLSearchParams(t).toString(),extraHeaders:{},isStream:!1}:{body:JSON.stringify(t),extraHeaders:{},isStream:!1}}o(gA,"serializeBody");async function vg(t,e){switch(e){case"arraybuffer":return Buffer.from(await t.arrayBuffer());case"stream":return Pg(t.body)?xo.Readable.from([]):xo.Readable.fromWeb(t.body);case"blob":return await t.blob();case"text":return await t.text();default:{let r=await t.text();if(r.length===0)return;try{return JSON.parse(r)}catch{return r}}}}o(vg,"parseResponseBody");async function yA(t,e){let r;for(let n=0;n<=e;n++)try{let i=await t();if(i.status>=500&&n<e){await Eg(n);continue}return i}catch(i){if(r=i,n<e){await Eg(n);continue}throw i}throw r}o(yA,"sendWithRetries");function Eg(t){let e=Math.min(1e3*2**t,3e4);return new Promise(r=>setTimeout(r,e))}o(Eg,"backoff");function _A(t){let e={};for(let[r,n]of Object.entries(t))n!==void 0&&(e[r.toLowerCase()]=Array.isArray(n)?n.join(", "):n);return e}o(_A,"normalizeHeaders");function bA(t){let e={};return t.forEach((r,n)=>{e[n]=r}),e}o(bA,"toHttpHeaders");function vA(t){return typeof t=="object"&&t!==null&&typeof t.getHeaders=="function"&&typeof t.pipe=="function"&&typeof t.on=="function"}o(vA,"isNodeFormData");function Pg(t){return t==null}o(Pg,"isNil");var Se=new hs;var sR=yt(require("fs")),I_=yt(A_());var uR={"application/json":"json","application/pdf":"pdf","application/xml":"xml","text/xml":"xml","application/zip":"zip","application/gzip":"gz","application/x-tar":"tar","application/octet-stream":"bin","application/msword":"doc","application/vnd.openxmlformats-officedocument.wordprocessingml.document":"docx","application/vnd.ms-excel":"xls","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":"xlsx","application/vnd.ms-powerpoint":"ppt","application/vnd.openxmlformats-officedocument.presentationml.presentation":"pptx","application/rtf":"rtf","application/javascript":"js","application/x-www-form-urlencoded":"bin","text/plain":"txt","text/html":"html","text/css":"css","text/csv":"csv","text/calendar":"ics","text/markdown":"md","image/png":"png","image/jpeg":"jpeg","image/jpg":"jpg","image/gif":"gif","image/webp":"webp","image/svg+xml":"svg","image/bmp":"bmp","image/tiff":"tiff","image/x-icon":"ico","image/vnd.microsoft.icon":"ico","image/heic":"heic","audio/mpeg":"mp3","audio/mp4":"m4a","audio/wav":"wav","audio/x-wav":"wav","audio/ogg":"ogg","audio/webm":"weba","video/mp4":"mp4","video/mpeg":"mpeg","video/webm":"webm","video/quicktime":"mov","video/x-msvideo":"avi","font/woff":"woff","font/woff2":"woff2","font/ttf":"ttf","font/otf":"otf"};function cR(t){let e=t.split(";")[0].trim().toLowerCase();return uR[e]??""}o(cR,"contentTypeToExtension");var lR=o(({baseUrl:t,relativePath:e})=>{let r=t.endsWith("/")?t:`${t}/`,n=e.startsWith("/")?e.slice(1):e;return`${r}${n}`},"joinBaseUrlWithRelativePath"),dR=o((t,e)=>{let r="https://api.example.com";try{let n=e?t(e):void 0;return(n?.endsWith("/")?n.slice(0,-1):n)??r}catch{return r}},"getBaseUrlForDescription");function R_({auth:t,baseUrl:e,authMapping:r,description:n,displayName:i,name:u,props:c,extraProps:l,authLocation:p="headers",classification:f="WRITE"}){return nt({audience:"human",name:u||"custom_api_call",classification:f,displayName:i||"Custom API Call",description:n||"Make a custom API call to a specific endpoint",auth:t,requireAuth:!!t,props:{url:K.DynamicProperties({auth:t,displayName:"",required:!0,refreshers:[],props:o(async({auth:m})=>({url:K.ShortText({displayName:"URL",description:`You can either use the full URL or the relative path to the base URL
56
- i.e ${dR(e,m)}/resource or /resource`,required:!0,defaultValue:m?e(m):"",...c?.url??{}})}),"props")}),method:K.StaticDropdown({displayName:"Method",required:!0,options:{options:Object.values(xt).map(m=>({label:m,value:m}))},...c?.method??{}}),headers:K.Object({displayName:"Headers",description:"Authorization headers are injected automatically from your connection.",required:!0,...c?.headers??{}}),queryParams:K.Object({displayName:"Query Parameters",required:!0,...c?.queryParams??{}}),body_type:K.StaticDropdown({displayName:"Body Type",required:!1,defaultValue:"none",options:{disabled:!1,options:[{label:"None",value:"none"},{label:"JSON",value:"json"},{label:"Form Data",value:"form_data"},{label:"Raw",value:"raw"}]}}),body:K.DynamicProperties({auth:t,displayName:"Body",refreshers:["body_type"],required:!1,props:o(async({body_type:m})=>{if(!m)return{};let y=m,P={};switch(y){case"none":break;case"json":P.data=K.Json({displayName:"JSON Body",required:!0,...c?.body??{}});break;case"raw":P.data=K.LongText({displayName:"Raw Body",required:!0});break;case"form_data":P.data=K.Array({displayName:"Form Data",required:!0,properties:{fieldName:K.ShortText({displayName:"Field Name",required:!0}),fieldType:K.StaticDropdown({displayName:"Field Type",required:!0,options:{disabled:!1,options:[{label:"Text",value:"text"},{label:"File",value:"file"}]}}),textFieldValue:K.LongText({displayName:"Text Field Value",required:!1}),fileFieldValue:K.File({displayName:"File Field Value",required:!1})}});break}return P},"props")}),response_is_binary:K.Checkbox({displayName:"Response is Binary ?",description:"Enable for files like PDFs, images, etc.",required:!1,defaultValue:!1}),failsafe:K.Checkbox({displayName:"No Error on Failure",required:!1,...c?.failsafe??{}}),timeout:K.Number({displayName:"Timeout (in seconds)",required:!1,...c?.timeout??{}}),followRedirects:K.Checkbox({displayName:"Follow redirects",required:!1,defaultValue:!1}),...l},run:o(async m=>{let{method:y,url:P,headers:h,queryParams:b,body:T,body_type:E,failsafe:w,timeout:k,response_is_binary:q,followRedirects:W}=m.propsValue;us(y,"Method"),us(P,"URL");let H=et(r)?{}:await r(m.auth,m.propsValue),V=P.url,J=V.startsWith("http://")||V.startsWith("https://")?V:lR({baseUrl:e(m.auth),relativePath:V}),re={method:y,url:J,headers:{...h??{},...p==="headers"||!et(p)?H:{}},queryParams:{...p==="queryParams"?H:{},...b??{}},timeout:k?k*1e3:0,followRedirects:W};if(q&&(re.responseType="arraybuffer"),T)if(E&&E!=="none"){let G=T.data;if(E==="form_data"){let je=G,Ee=new I_.default;for(let{fieldName:ve,fieldType:ze,textFieldValue:$e,fileFieldValue:Ue}of je)ze==="text"&&!$i($e)?Ee.append(ve,$e):ze==="file"&&!$i(Ue)&&Ee.append(ve,Ue.data,{filename:Ue?.filename});re.body=Ee,re.headers={...re.headers,...Ee.getHeaders()}}else re.body=G}else E||(re.body=T);try{let G=await Se.sendRequest(re);return await pR(m.files,G.body,G.status,G.headers,q)}catch(G){if(w)return bg({error:G,requestBody:re.body});throw G}},"run")})}o(R_,"createCustomApiCallAction");var pR=o(async(t,e,r,n,i)=>{let u;if(i&&fR(e)){let c=Array.isArray(n?.["content-type"])?n["content-type"][0]:n?.["content-type"],l=cR(c??"")||"txt",p;e instanceof ArrayBuffer?p=Buffer.from(new Uint8Array(e)):Buffer.isBuffer(e)?p=e:p=Buffer.from(e),u=await t.write({fileName:`output.${l}`,data:p})}else u=e;return{status:r,headers:n,body:u}},"handleBinaryResponse"),fR=o(t=>t instanceof ArrayBuffer||Buffer.isBuffer(t),"isBinaryBody");var ot={async poll(t,{store:e,auth:r,propsValue:n,maxItemsToPoll:i,files:u,server:c}){switch(t.strategy){case 0:{let l=await e.get("lastPoll");if(et(l))throw new Error("lastPoll doesn't exist in the store.");let p=await t.items({store:e,auth:r,propsValue:n,lastFetchEpochMS:l,server:c}),f=p.reduce((m,y)=>Math.max(m,y.epochMilliSeconds),l);return await e.put("lastPoll",f),p.filter(m=>m.epochMilliSeconds>l).map(m=>m.data)}case 1:{let l=await e.get("lastItem"),p=await t.items({store:e,auth:r,propsValue:n,lastItemId:l,files:u,server:c}),f=p.findIndex(P=>P.id===l),m=[];et(l)||f==-1?m=p??[]:m=p?.slice(0,f)??[],et(i)||(m=m.slice(-i));let y=m?.[0]?.id;return et(y)||await e.put("lastItem",y),m.map(P=>P.data)}}},async onEnable(t,{store:e,auth:r,propsValue:n,server:i,isRepublish:u}){switch(t.strategy){case 0:{if(u&&!et(await e.get("lastPoll")))break;await e.put("lastPoll",Date.now());break}case 1:{if(u&&!et(await e.get("lastItem")))break;let l=(await t.items({store:e,auth:r,propsValue:n,lastItemId:null,server:i}))?.[0]?.id;et(l)?await e.delete("lastItem"):await e.put("lastItem",l);break}}},async onDisable(t,e){switch(t.strategy){case 0:case 1:return}},async test(t,{auth:e,propsValue:r,store:n,files:i,server:u}){let c=[];switch(t.strategy){case 0:{c=await t.items({store:n,auth:e,propsValue:r,lastFetchEpochMS:0,server:u});break}case 1:{c=await t.items({store:n,auth:e,propsValue:r,lastItemId:null,files:i,server:u});break}}return mR(c.map(l=>l.data))}};function mR(t){return t.length<=5?t:t.slice(0,5)}o(mR,"getFirstFiveOrAll");var Gp=yt(NP());var Ae="https://bigquery.googleapis.com/bigquery/v2",Hp=["https://www.googleapis.com/auth/bigquery","email"],ke=[ds.OAuth2({description:"Sign in with your Google account. If you are using your own OAuth2 credentials, make sure to include the following scope: `https://www.googleapis.com/auth/bigquery`",authUrl:"https://accounts.google.com/o/oauth2/auth",tokenUrl:"https://oauth2.googleapis.com/token",required:!0,scope:Hp}),ds.CustomAuth({displayName:"Service Account",description:"Use a GCP service account for automated, server-to-server access \u2014 no user sign-in required. Recommended for production workflows.",required:!0,props:{instructions:K.MarkDown({value:`**How to create a service account key:**
55
+ https://cloud.google.com/compute/docs/metadata/predefined-metadata-keys`};var UE=class{static{a(this,"GoogleAuth")}checkIsGCE=void 0;useJWTAccessWithScope;defaultServicePath;get isGCE(){return this.checkIsGCE}_findProjectIdPromise;_cachedProjectId;jsonContent=null;apiKey;cachedCredential=null;#e=null;defaultScopes;keyFilename;scopes;clientOptions={};constructor(t={}){if(this._cachedProjectId=t.projectId||null,this.cachedCredential=t.authClient||null,this.keyFilename=t.keyFilename||t.keyFile,this.scopes=t.scopes,this.clientOptions=t.clientOptions||{},this.jsonContent=t.credentials||null,this.apiKey=t.apiKey||this.clientOptions.apiKey||null,this.apiKey&&(this.jsonContent||this.clientOptions.credentials))throw new RangeError(Qr.GoogleAuthExceptionMessages.API_KEY_WITH_CREDENTIALS);t.universeDomain&&(this.clientOptions.universeDomain=t.universeDomain)}setGapicJWTValues(t){t.defaultServicePath=this.defaultServicePath,t.useJWTAccessWithScope=this.useJWTAccessWithScope,t.defaultScopes=this.defaultScopes}getProjectId(t){if(t)this.getProjectIdAsync().then(n=>t(null,n),t);else return this.getProjectIdAsync()}async getProjectIdOptional(){try{return await this.getProjectId()}catch(t){if(t instanceof Error&&t.message===Qr.GoogleAuthExceptionMessages.NO_PROJECT_ID_FOUND)return null;throw t}}async findAndCacheProjectId(){let t=null;if(t||=await this.getProductionProjectId(),t||=await this.getFileProjectId(),t||=await this.getDefaultServiceProjectId(),t||=await this.getGCEProjectId(),t||=await this.getExternalAccountClientProjectId(),t)return this._cachedProjectId=t,t;throw new Error(Qr.GoogleAuthExceptionMessages.NO_PROJECT_ID_FOUND)}async getProjectIdAsync(){return this._cachedProjectId?this._cachedProjectId:(this._findProjectIdPromise||(this._findProjectIdPromise=this.findAndCacheProjectId()),this._findProjectIdPromise)}async getUniverseDomainFromMetadataServer(){let t;try{t=await mu.universe("universe-domain"),t||=DE.DEFAULT_UNIVERSE}catch(n){if(n&&n?.response?.status===404)t=DE.DEFAULT_UNIVERSE;else throw n}return t}async getUniverseDomain(){let t=(0,OC.originalOrCamelOptions)(this.clientOptions).get("universe_domain");try{t??=(await this.getClient()).universeDomain}catch{t??=DE.DEFAULT_UNIVERSE}return t}getAnyScopes(){return this.scopes||this.defaultScopes}getApplicationDefault(t={},n){let o;if(typeof t=="function"?n=t:o=t,n)this.getApplicationDefaultAsync(o).then(r=>n(null,r.credential,r.projectId),n);else return this.getApplicationDefaultAsync(o)}async getApplicationDefaultAsync(t={}){if(this.cachedCredential)return await this.#t(this.cachedCredential,null);let n;if(n=await this._tryGetApplicationCredentialsFromEnvironmentVariable(t),n)return n instanceof Ca.JWT?n.scopes=this.scopes:n instanceof hu.BaseExternalAccountClient&&(n.scopes=this.getAnyScopes()),await this.#t(n);if(n=await this._tryGetApplicationCredentialsFromWellKnownFile(t),n)return n instanceof Ca.JWT?n.scopes=this.scopes:n instanceof hu.BaseExternalAccountClient&&(n.scopes=this.getAnyScopes()),await this.#t(n);if(await this._checkIsGCE())return t.scopes=this.getAnyScopes(),await this.#t(new E6.Compute(t));throw new Error(Qr.GoogleAuthExceptionMessages.NO_ADC_FOUND)}async#t(t,n=process.env.GOOGLE_CLOUD_QUOTA_PROJECT||null){let o=await this.getProjectIdOptional();return n&&(t.quotaProjectId=n),this.cachedCredential=t,{credential:t,projectId:o}}async _checkIsGCE(){return this.checkIsGCE===void 0&&(this.checkIsGCE=mu.getGCPResidency()||await mu.isAvailable()),this.checkIsGCE}async _tryGetApplicationCredentialsFromEnvironmentVariable(t){let n=process.env.GOOGLE_APPLICATION_CREDENTIALS||process.env.google_application_credentials;if(!n||n.length===0)return null;try{return this._getApplicationCredentialsFromFilePath(n,t)}catch(o){throw o instanceof Error&&(o.message=`Unable to read the credential file specified by the GOOGLE_APPLICATION_CREDENTIALS environment variable: ${o.message}`),o}}async _tryGetApplicationCredentialsFromWellKnownFile(t){let n=null;if(this._isWindows())n=process.env.APPDATA;else{let r=process.env.HOME;r&&(n=NE.join(r,".config"))}return n&&(n=NE.join(n,"gcloud","application_default_credentials.json"),fu.existsSync(n)||(n=null)),n?await this._getApplicationCredentialsFromFilePath(n,t):null}async _getApplicationCredentialsFromFilePath(t,n={}){if(!t||t.length===0)throw new Error("The file path is invalid.");try{if(t=fu.realpathSync(t),!fu.lstatSync(t).isFile())throw new Error}catch(r){throw r instanceof Error&&(r.message=`The file at ${t} does not exist, or it is not a file. ${r.message}`),r}let o=fu.createReadStream(t);return this.fromStream(o,n)}fromImpersonatedJSON(t){if(!t)throw new Error("Must pass in a JSON object containing an impersonated refresh token");if(t.type!==$a.IMPERSONATED_ACCOUNT_TYPE)throw new Error(`The incoming JSON object does not have the "${$a.IMPERSONATED_ACCOUNT_TYPE}" type`);if(!t.source_credentials)throw new Error("The incoming JSON object does not contain a source_credentials field");if(!t.service_account_impersonation_url)throw new Error("The incoming JSON object does not contain a service_account_impersonation_url field");let n=this.fromJSON(t.source_credentials);if(t.service_account_impersonation_url?.length>256)throw new RangeError(`Target principal is too long: ${t.service_account_impersonation_url}`);let o=/(?<target>[^/]+):(generateAccessToken|generateIdToken)$/.exec(t.service_account_impersonation_url)?.groups?.target;if(!o)throw new RangeError(`Cannot extract target principal from ${t.service_account_impersonation_url}`);let r=(this.scopes||t.scopes||this.defaultScopes)??[];return new $a.Impersonated({...t,sourceClient:n,targetPrincipal:o,targetScopes:Array.isArray(r)?r:[r]})}fromJSON(t,n={}){let o,r=(0,OC.originalOrCamelOptions)(n).get("universe_domain");return t.type===IC.USER_REFRESH_ACCOUNT_TYPE?(o=new IC.UserRefreshClient(n),o.fromJSON(t)):t.type===$a.IMPERSONATED_ACCOUNT_TYPE?o=this.fromImpersonatedJSON(t):t.type===hu.EXTERNAL_ACCOUNT_TYPE?(o=x6.ExternalAccountClient.fromJSON({...t,...n}),o.scopes=this.getAnyScopes()):t.type===RC.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE?o=new RC.ExternalAccountAuthorizedUserClient({...t,...n}):(n.scopes=this.scopes,o=new Ca.JWT(n),this.setGapicJWTValues(o),o.fromJSON(t)),r&&(o.universeDomain=r),o}_cacheClientFromJSON(t,n){let o=this.fromJSON(t,n);return this.jsonContent=t,this.cachedCredential=o,o}fromStream(t,n={},o){let r={};if(typeof n=="function"?o=n:r=n,o)this.fromStreamAsync(t,r).then(i=>o(null,i),o);else return this.fromStreamAsync(t,r)}fromStreamAsync(t,n){return new Promise((o,r)=>{if(!t)throw new Error("Must pass in a stream containing the Google auth settings.");let i=[];t.setEncoding("utf8").on("error",r).on("data",s=>i.push(s)).on("end",()=>{try{try{let s=JSON.parse(i.join("")),u=this._cacheClientFromJSON(s,n);return o(u)}catch(s){if(!this.keyFilename)throw s;let u=new Ca.JWT({...this.clientOptions,keyFile:this.keyFilename});return this.cachedCredential=u,this.setGapicJWTValues(u),o(u)}}catch(s){return r(s)}})})}fromAPIKey(t,n={}){return new Ca.JWT({...n,apiKey:t})}_isWindows(){let t=b6.platform();return!!(t&&t.length>=3&&t.substring(0,3).toLowerCase()==="win")}async getDefaultServiceProjectId(){return new Promise(t=>{(0,y6.exec)("gcloud config config-helper --format json",(n,o)=>{if(!n&&o)try{let r=JSON.parse(o).configuration.properties.core.project;t(r);return}catch{}t(null)})})}getProductionProjectId(){return process.env.GCLOUD_PROJECT||process.env.GOOGLE_CLOUD_PROJECT||process.env.gcloud_project||process.env.google_cloud_project}async getFileProjectId(){if(this.cachedCredential)return this.cachedCredential.projectId;if(this.keyFilename){let n=await this.getClient();if(n&&n.projectId)return n.projectId}let t=await this._tryGetApplicationCredentialsFromEnvironmentVariable();return t?t.projectId:null}async getExternalAccountClientProjectId(){return!this.jsonContent||this.jsonContent.type!==hu.EXTERNAL_ACCOUNT_TYPE?null:await(await this.getClient()).getProjectId()}async getGCEProjectId(){try{return await mu.project("project-id")}catch{return null}}getCredentials(t){if(t)this.getCredentialsAsync().then(n=>t(null,n),t);else return this.getCredentialsAsync()}async getCredentialsAsync(){let t=await this.getClient();if(t instanceof $a.Impersonated)return{client_email:t.getTargetPrincipal()};if(t instanceof hu.BaseExternalAccountClient){let n=t.getServiceAccountEmail();if(n)return{client_email:n,universe_domain:t.universeDomain}}if(this.jsonContent)return{client_email:this.jsonContent.client_email,private_key:this.jsonContent.private_key,universe_domain:this.jsonContent.universe_domain};if(await this._checkIsGCE()){let[n,o]=await Promise.all([mu.instance("service-accounts/default/email"),this.getUniverseDomain()]);return{client_email:n,universe_domain:o}}throw new Error(Qr.GoogleAuthExceptionMessages.NO_CREDENTIALS_FOUND)}async getClient(){if(this.cachedCredential)return this.cachedCredential;this.#e=this.#e||this.#r();try{return await this.#e}finally{this.#e=null}}async#r(){if(this.jsonContent)return this._cacheClientFromJSON(this.jsonContent,this.clientOptions);if(this.keyFilename){let t=NE.resolve(this.keyFilename),n=fu.createReadStream(t);return await this.fromStreamAsync(n,this.clientOptions)}else if(this.apiKey){let t=await this.fromAPIKey(this.apiKey,this.clientOptions);t.scopes=this.scopes;let{credential:n}=await this.#t(t);return n}else{let{credential:t}=await this.getApplicationDefaultAsync(this.clientOptions);return t}}async getIdTokenClient(t){let n=await this.getClient();if(!("fetchIdToken"in n))throw new Error("Cannot fetch ID token in this environment, use GCE or set the GOOGLE_APPLICATION_CREDENTIALS environment variable to a service account credentials JSON file.");return new S6.IdTokenClient({targetAudience:t,idTokenProvider:n})}async getAccessToken(){return(await(await this.getClient()).getAccessToken()).token}async getRequestHeaders(t){return(await this.getClient()).getRequestHeaders(t)}async authorizeRequest(t={}){let n=t.url,r=await(await this.getClient()).getRequestHeaders(n);return t.headers=_6.Gaxios.mergeHeaders(t.headers,r),t}async fetch(...t){return(await this.getClient()).fetch(...t)}async request(t){return(await this.getClient()).request(t)}getEnv(){return(0,P6.getEnv)()}async sign(t,n){let o=await this.getClient(),r=await this.getUniverseDomain();if(n=n||`https://iamcredentials.${r}/v1/projects/-/serviceAccounts/`,o instanceof $a.Impersonated)return(await o.sign(t)).signedBlob;let i=(0,v6.createCrypto)();if(o instanceof Ca.JWT&&o.key)return await i.sign(o.key,t);let s=await this.getCredentials();if(!s.client_email)throw new Error("Cannot sign data without `client_email`.");return this.signBlob(i,s.client_email,t,n)}async signBlob(t,n,o,r){let i=new URL(r+`${n}:signBlob`);return(await this.request({method:"POST",url:i.href,data:{payload:t.encodeBase64StringUtf8(o)},retry:!0,retryConfig:{httpMethodsToRetry:["POST"]}})).data.signedBlob}};Qr.GoogleAuth=UE});var CC=B(rm=>{"use strict";Object.defineProperty(rm,"__esModule",{value:!0});rm.IAMAuth=void 0;var jE=class{static{a(this,"IAMAuth")}selector;token;constructor(t,n){this.selector=t,this.token=n,this.selector=t,this.token=n}getRequestHeaders(){return{"x-goog-iam-authority-selector":this.selector,"x-goog-iam-authorization-token":this.token}}};rm.IAMAuth=jE});var $C=B(mn=>{"use strict";Object.defineProperty(mn,"__esModule",{value:!0});mn.DownscopedClient=mn.EXPIRATION_TIME_OFFSET=mn.MAX_ACCESS_BOUNDARY_RULES_COUNT=void 0;var T6=kt(),w6=require("stream"),ME=yr(),A6=Df(),I6="urn:ietf:params:oauth:grant-type:token-exchange",R6="urn:ietf:params:oauth:token-type:access_token",O6="urn:ietf:params:oauth:token-type:access_token";mn.MAX_ACCESS_BOUNDARY_RULES_COUNT=10;mn.EXPIRATION_TIME_OFFSET=300*1e3;var LE=class extends ME.AuthClient{static{a(this,"DownscopedClient")}authClient;credentialAccessBoundary;cachedDownscopedAccessToken;stsCredential;constructor(t,n={accessBoundary:{accessBoundaryRules:[]}}){if(super(t instanceof ME.AuthClient?{}:t),t instanceof ME.AuthClient?(this.authClient=t,this.credentialAccessBoundary=n):(this.authClient=t.authClient,this.credentialAccessBoundary=t.credentialAccessBoundary),this.credentialAccessBoundary.accessBoundary.accessBoundaryRules.length===0)throw new Error("At least one access boundary rule needs to be defined.");if(this.credentialAccessBoundary.accessBoundary.accessBoundaryRules.length>mn.MAX_ACCESS_BOUNDARY_RULES_COUNT)throw new Error(`The provided access boundary has more than ${mn.MAX_ACCESS_BOUNDARY_RULES_COUNT} access boundary rules.`);for(let o of this.credentialAccessBoundary.accessBoundary.accessBoundaryRules)if(o.availablePermissions.length===0)throw new Error("At least one permission should be defined in access boundary rules.");this.stsCredential=new A6.StsCredentials({tokenExchangeEndpoint:`https://sts.${this.universeDomain}/v1/token`}),this.cachedDownscopedAccessToken=null}setCredentials(t){if(!t.expiry_date)throw new Error("The access token expiry_date field is missing in the provided credentials.");super.setCredentials(t),this.cachedDownscopedAccessToken=t}async getAccessToken(){return(!this.cachedDownscopedAccessToken||this.isExpired(this.cachedDownscopedAccessToken))&&await this.refreshAccessTokenAsync(),{token:this.cachedDownscopedAccessToken.access_token,expirationTime:this.cachedDownscopedAccessToken.expiry_date,res:this.cachedDownscopedAccessToken.res}}async getRequestHeaders(){let t=await this.getAccessToken(),n=new Headers({authorization:`Bearer ${t.token}`});return this.addSharedMetadataHeaders(n)}request(t,n){if(n)this.requestAsync(t).then(o=>n(null,o),o=>n(o,o.response));else return this.requestAsync(t)}async requestAsync(t,n=!1){let o;try{let r=await this.getRequestHeaders();t.headers=T6.Gaxios.mergeHeaders(t.headers),this.addUserProjectAndAuthHeaders(t.headers,r),o=await this.transporter.request(t)}catch(r){let i=r.response;if(i){let s=i.status,u=i.config.data instanceof w6.Readable;if(!n&&(s===401||s===403)&&!u&&this.forceRefreshOnFailure)return await this.refreshAccessTokenAsync(),await this.requestAsync(t,!0)}throw r}return o}async refreshAccessTokenAsync(){let t=(await this.authClient.getAccessToken()).token,n={grantType:I6,requestedTokenType:R6,subjectToken:t,subjectTokenType:O6},o=await this.stsCredential.exchangeToken(n,void 0,this.credentialAccessBoundary),r=this.authClient.credentials?.expiry_date||null,i=o.expires_in?new Date().getTime()+o.expires_in*1e3:r;return this.cachedDownscopedAccessToken={access_token:o.access_token,expiry_date:i,res:o.res},this.credentials={},Object.assign(this.credentials,this.cachedDownscopedAccessToken),delete this.credentials.res,this.emit("tokens",{refresh_token:null,expiry_date:this.cachedDownscopedAccessToken.expiry_date,access_token:this.cachedDownscopedAccessToken.access_token,token_type:"Bearer",id_token:null}),this.cachedDownscopedAccessToken}isExpired(t){let n=new Date().getTime();return t.expiry_date?n>=t.expiry_date-this.eagerRefreshThresholdMillis:!1}};mn.DownscopedClient=LE});var zC=B(nm=>{"use strict";Object.defineProperty(nm,"__esModule",{value:!0});nm.PassThroughClient=void 0;var k6=yr(),FE=class extends k6.AuthClient{static{a(this,"PassThroughClient")}async request(t){return this.transporter.request(t)}async getAccessToken(){return{}}async getRequestHeaders(){return new Headers}};nm.PassThroughClient=FE});var MC=B(ae=>{"use strict";Object.defineProperty(ae,"__esModule",{value:!0});ae.GoogleAuth=ae.auth=ae.PassThroughClient=ae.ExternalAccountAuthorizedUserClient=ae.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE=ae.ExecutableError=ae.PluggableAuthClient=ae.DownscopedClient=ae.BaseExternalAccountClient=ae.ExternalAccountClient=ae.IdentityPoolClient=ae.AwsRequestSigner=ae.AwsClient=ae.UserRefreshClient=ae.LoginTicket=ae.ClientAuthentication=ae.OAuth2Client=ae.CodeChallengeMethod=ae.Impersonated=ae.JWT=ae.JWTAccess=ae.IdTokenClient=ae.IAMAuth=ae.GCPEnv=ae.Compute=ae.DEFAULT_UNIVERSE=ae.AuthClient=ae.gaxios=ae.gcpMetadata=void 0;var NC=kC();Object.defineProperty(ae,"GoogleAuth",{enumerable:!0,get:a(function(){return NC.GoogleAuth},"get")});ae.gcpMetadata=Yc();ae.gaxios=kt();var DC=yr();Object.defineProperty(ae,"AuthClient",{enumerable:!0,get:a(function(){return DC.AuthClient},"get")});Object.defineProperty(ae,"DEFAULT_UNIVERSE",{enumerable:!0,get:a(function(){return DC.DEFAULT_UNIVERSE},"get")});var C6=Iv();Object.defineProperty(ae,"Compute",{enumerable:!0,get:a(function(){return C6.Compute},"get")});var $6=kv();Object.defineProperty(ae,"GCPEnv",{enumerable:!0,get:a(function(){return $6.GCPEnv},"get")});var z6=CC();Object.defineProperty(ae,"IAMAuth",{enumerable:!0,get:a(function(){return z6.IAMAuth},"get")});var N6=Ov();Object.defineProperty(ae,"IdTokenClient",{enumerable:!0,get:a(function(){return N6.IdTokenClient},"get")});var D6=Wv();Object.defineProperty(ae,"JWTAccess",{enumerable:!0,get:a(function(){return D6.JWTAccess},"get")});var U6=Kv();Object.defineProperty(ae,"JWT",{enumerable:!0,get:a(function(){return U6.JWT},"get")});var j6=eE();Object.defineProperty(ae,"Impersonated",{enumerable:!0,get:a(function(){return j6.Impersonated},"get")});var BE=oi();Object.defineProperty(ae,"CodeChallengeMethod",{enumerable:!0,get:a(function(){return BE.CodeChallengeMethod},"get")});Object.defineProperty(ae,"OAuth2Client",{enumerable:!0,get:a(function(){return BE.OAuth2Client},"get")});Object.defineProperty(ae,"ClientAuthentication",{enumerable:!0,get:a(function(){return BE.ClientAuthentication},"get")});var M6=xv();Object.defineProperty(ae,"LoginTicket",{enumerable:!0,get:a(function(){return M6.LoginTicket},"get")});var L6=Qv();Object.defineProperty(ae,"UserRefreshClient",{enumerable:!0,get:a(function(){return L6.UserRefreshClient},"get")});var F6=bE();Object.defineProperty(ae,"AwsClient",{enumerable:!0,get:a(function(){return F6.AwsClient},"get")});var B6=gE();Object.defineProperty(ae,"AwsRequestSigner",{enumerable:!0,get:a(function(){return B6.AwsRequestSigner},"get")});var q6=mE();Object.defineProperty(ae,"IdentityPoolClient",{enumerable:!0,get:a(function(){return q6.IdentityPoolClient},"get")});var V6=kE();Object.defineProperty(ae,"ExternalAccountClient",{enumerable:!0,get:a(function(){return V6.ExternalAccountClient},"get")});var Z6=yo();Object.defineProperty(ae,"BaseExternalAccountClient",{enumerable:!0,get:a(function(){return Z6.BaseExternalAccountClient},"get")});var H6=$C();Object.defineProperty(ae,"DownscopedClient",{enumerable:!0,get:a(function(){return H6.DownscopedClient},"get")});var UC=RE();Object.defineProperty(ae,"PluggableAuthClient",{enumerable:!0,get:a(function(){return UC.PluggableAuthClient},"get")});Object.defineProperty(ae,"ExecutableError",{enumerable:!0,get:a(function(){return UC.ExecutableError},"get")});var jC=zE();Object.defineProperty(ae,"EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE",{enumerable:!0,get:a(function(){return jC.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE},"get")});Object.defineProperty(ae,"ExternalAccountAuthorizedUserClient",{enumerable:!0,get:a(function(){return jC.ExternalAccountAuthorizedUserClient},"get")});var G6=zC();Object.defineProperty(ae,"PassThroughClient",{enumerable:!0,get:a(function(){return G6.PassThroughClient},"get")});var W6=new NC.GoogleAuth;ae.auth=W6});var rq={};ar(rq,{bigQueryAuth:()=>Ue,googleBigQuery:()=>tq});module.exports=F$(rq);var cr={};ar(cr,{$ZodAny:()=>as,$ZodArray:()=>ls,$ZodAsyncError:()=>jr,$ZodBase64:()=>kl,$ZodBase64URL:()=>Cl,$ZodBigInt:()=>zi,$ZodBigIntFormat:()=>Dl,$ZodBoolean:()=>Oo,$ZodCIDRv4:()=>Rl,$ZodCIDRv6:()=>Ol,$ZodCUID:()=>yl,$ZodCUID2:()=>_l,$ZodCatch:()=>Ql,$ZodCheck:()=>Ge,$ZodCheckBigIntFormat:()=>Eh,$ZodCheckEndsWith:()=>$h,$ZodCheckGreaterThan:()=>al,$ZodCheckIncludes:()=>kh,$ZodCheckLengthEquals:()=>Ah,$ZodCheckLessThan:()=>il,$ZodCheckLowerCase:()=>Rh,$ZodCheckMaxLength:()=>Th,$ZodCheckMaxSize:()=>Sh,$ZodCheckMimeType:()=>Nh,$ZodCheckMinLength:()=>wh,$ZodCheckMinSize:()=>Ph,$ZodCheckMultipleOf:()=>bh,$ZodCheckNumberFormat:()=>vh,$ZodCheckOverwrite:()=>Dh,$ZodCheckProperty:()=>zh,$ZodCheckRegex:()=>Ih,$ZodCheckSizeEquals:()=>xh,$ZodCheckStartsWith:()=>Ch,$ZodCheckStringFormat:()=>Ci,$ZodCheckUpperCase:()=>Oh,$ZodCodec:()=>Di,$ZodCustom:()=>bs,$ZodCustomStringFormat:()=>Nl,$ZodDate:()=>us,$ZodDefault:()=>Wl,$ZodDiscriminatedUnion:()=>ds,$ZodE164:()=>$l,$ZodEmail:()=>ml,$ZodEmoji:()=>hl,$ZodEncodeError:()=>Zn,$ZodEnum:()=>ms,$ZodError:()=>es,$ZodExactOptional:()=>Gl,$ZodFile:()=>Hl,$ZodFunction:()=>rd,$ZodGUID:()=>pl,$ZodIPv4:()=>wl,$ZodIPv6:()=>Al,$ZodISODate:()=>Pl,$ZodISODateTime:()=>Sl,$ZodISODuration:()=>Tl,$ZodISOTime:()=>xl,$ZodIntersection:()=>ql,$ZodJWT:()=>zl,$ZodKSUID:()=>El,$ZodLazy:()=>od,$ZodLiteral:()=>hs,$ZodMAC:()=>Il,$ZodMap:()=>Vl,$ZodNaN:()=>Yl,$ZodNanoID:()=>gl,$ZodNever:()=>Ll,$ZodNonOptional:()=>Kl,$ZodNull:()=>Ml,$ZodNullable:()=>ys,$ZodNumber:()=>$i,$ZodNumberFormat:()=>is,$ZodObject:()=>Fl,$ZodObjectJIT:()=>Lh,$ZodOptional:()=>Ni,$ZodPipe:()=>_s,$ZodPrefault:()=>Jl,$ZodPromise:()=>nd,$ZodReadonly:()=>ed,$ZodRealError:()=>Wt,$ZodRecord:()=>fs,$ZodRegistry:()=>id,$ZodSet:()=>Zl,$ZodString:()=>Pn,$ZodStringFormat:()=>Be,$ZodSuccess:()=>Xl,$ZodSymbol:()=>Ul,$ZodTemplateLiteral:()=>td,$ZodTransform:()=>gs,$ZodTuple:()=>ps,$ZodType:()=>he,$ZodULID:()=>bl,$ZodURL:()=>os,$ZodUUID:()=>fl,$ZodUndefined:()=>jl,$ZodUnion:()=>ko,$ZodUnknown:()=>ss,$ZodVoid:()=>cs,$ZodXID:()=>vl,$ZodXor:()=>Bl,$brand:()=>Ga,$constructor:()=>A,$input:()=>sd,$output:()=>ad,Doc:()=>ns,JSONSchema:()=>FP,JSONSchemaGenerator:()=>Dd,NEVER:()=>qu,TimePrecision:()=>ud,_any:()=>Ys,_array:()=>$g,_base64:()=>qs,_base64url:()=>Vs,_bigint:()=>_d,_boolean:()=>Ks,_catch:()=>GN,_check:()=>LP,_cidrv4:()=>Fs,_cidrv6:()=>Bs,_coercedBigint:()=>Qs,_coercedBoolean:()=>Xs,_coercedDate:()=>rc,_coercedNumber:()=>Ws,_coercedString:()=>ws,_cuid:()=>zs,_cuid2:()=>Ns,_custom:()=>cc,_date:()=>Td,_decode:()=>Ku,_decodeAsync:()=>Qu,_default:()=>VN,_discriminatedUnion:()=>CN,_e164:()=>Zs,_email:()=>As,_emoji:()=>Cs,_encode:()=>Ju,_encodeAsync:()=>Xu,_endsWith:()=>Uo,_enum:()=>jN,_file:()=>Ad,_float32:()=>md,_float64:()=>hd,_gt:()=>Lr,_gte:()=>yt,_guid:()=>Mi,_includes:()=>No,_int:()=>Js,_int32:()=>gd,_int64:()=>bd,_intersection:()=>$N,_ipv4:()=>Ms,_ipv6:()=>Ls,_isoDate:()=>dd,_isoDateTime:()=>ld,_isoDuration:()=>fd,_isoTime:()=>pd,_jwt:()=>Hs,_ksuid:()=>js,_lazy:()=>XN,_length:()=>Qn,_literal:()=>LN,_lowercase:()=>$o,_lt:()=>Mr,_lte:()=>Lt,_mac:()=>cd,_map:()=>DN,_max:()=>Lt,_maxLength:()=>Xn,_maxSize:()=>Tn,_mime:()=>jo,_min:()=>yt,_minLength:()=>ct,_minSize:()=>Fr,_multipleOf:()=>xn,_nan:()=>wd,_nanoid:()=>$s,_nativeEnum:()=>MN,_negative:()=>oc,_never:()=>xd,_nonnegative:()=>ac,_nonoptional:()=>ZN,_nonpositive:()=>ic,_normalize:()=>Mo,_null:()=>Pd,_nullable:()=>qN,_number:()=>Gs,_optional:()=>BN,_overwrite:()=>Tr,_parse:()=>wi,_parseAsync:()=>Ai,_pipe:()=>WN,_positive:()=>nc,_promise:()=>QN,_property:()=>sc,_readonly:()=>JN,_record:()=>NN,_refine:()=>Id,_regex:()=>Rt,_safeDecode:()=>el,_safeDecodeAsync:()=>rl,_safeEncode:()=>Yu,_safeEncodeAsync:()=>tl,_safeParse:()=>Ii,_safeParseAsync:()=>Oi,_set:()=>UN,_size:()=>Kn,_slugify:()=>Li,_startsWith:()=>Do,_string:()=>Ts,_stringFormat:()=>qo,_stringbool:()=>Cd,_success:()=>HN,_superRefine:()=>Rd,_symbol:()=>Ed,_templateLiteral:()=>KN,_toLowerCase:()=>Fo,_toUpperCase:()=>Bo,_transform:()=>FN,_trim:()=>Lo,_tuple:()=>zN,_uint32:()=>yd,_uint64:()=>vd,_ulid:()=>Ds,_undefined:()=>Sd,_union:()=>ON,_unknown:()=>ec,_uppercase:()=>zo,_url:()=>Co,_uuid:()=>Is,_uuidv4:()=>Rs,_uuidv6:()=>Os,_uuidv7:()=>ks,_void:()=>tc,_xid:()=>Us,_xor:()=>kN,clone:()=>bt,config:()=>it,createStandardJSONSchemaMethod:()=>Fi,createToJSONSchemaMethod:()=>zg,decode:()=>sP,decodeAsync:()=>uP,describe:()=>Od,encode:()=>aP,encodeAsync:()=>cP,extractDefs:()=>eo,finalize:()=>to,flattenError:()=>xi,formatError:()=>Ti,globalConfig:()=>Ha,globalRegistry:()=>vt,initializeContext:()=>Yn,isValidBase64:()=>Mh,isValidBase64URL:()=>kP,isValidJWT:()=>CP,locales:()=>ji,meta:()=>kd,parse:()=>Ao,parseAsync:()=>Io,prettifyError:()=>Wu,process:()=>qe,regexes:()=>Jt,registry:()=>xs,safeDecode:()=>dP,safeDecodeAsync:()=>fP,safeEncode:()=>lP,safeEncodeAsync:()=>pP,safeParse:()=>Ri,safeParseAsync:()=>ki,toDotPath:()=>iP,toJSONSchema:()=>uc,treeifyError:()=>Gu,util:()=>X,version:()=>Uh});var qu=Object.freeze({status:"aborted"});function A(e,t,n){function o(u,d){if(u._zod||Object.defineProperty(u,"_zod",{value:{def:d,constr:s,traits:new Set},enumerable:!1}),u._zod.traits.has(e))return;u._zod.traits.add(e),t(u,d);let p=s.prototype,f=Object.keys(p);for(let g=0;g<f.length;g++){let y=f[g];y in u||(u[y]=p[y].bind(u))}}a(o,"init");let r=n?.Parent??Object;class i extends r{static{a(this,"Definition")}}Object.defineProperty(i,"name",{value:e});function s(u){var d;let p=n?.Parent?new i:this;o(p,u),(d=p._zod).deferred??(d.deferred=[]);for(let f of p._zod.deferred)f();return p}return a(s,"_"),Object.defineProperty(s,"init",{value:o}),Object.defineProperty(s,Symbol.hasInstance,{value:a(u=>n?.Parent&&u instanceof n.Parent?!0:u?._zod?.traits?.has(e),"value")}),Object.defineProperty(s,"name",{value:e}),s}a(A,"$constructor");var Ga=Symbol("zod_brand"),jr=class extends Error{static{a(this,"$ZodAsyncError")}constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Zn=class extends Error{static{a(this,"$ZodEncodeError")}constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}},Ha={};function it(e){return e&&Object.assign(Ha,e),Ha}a(it,"config");var X={};ar(X,{BIGINT_FORMAT_RANGES:()=>Vm,Class:()=>Um,NUMBER_FORMAT_RANGES:()=>qm,aborted:()=>Jn,allowsEval:()=>Lm,assert:()=>H$,assertEqual:()=>B$,assertIs:()=>V$,assertNever:()=>Z$,assertNotEqual:()=>q$,assignProp:()=>Gn,base64ToUint8Array:()=>rP,base64urlToUint8Array:()=>nz,cached:()=>Si,captureStackTrace:()=>Zu,cleanEnum:()=>rz,cleanRegex:()=>Ka,clone:()=>bt,cloneDef:()=>W$,createTransparentProxy:()=>ez,defineLazy:()=>Se,esc:()=>Vu,escapeRegex:()=>xr,extend:()=>QS,finalizeIssue:()=>Gt,floatSafeRemainder:()=>jm,getElementAtPath:()=>J$,getEnumValues:()=>Ja,getLengthableOrigin:()=>Ya,getParsedType:()=>Y$,getSizableOrigin:()=>Qa,hexToUint8Array:()=>iz,isObject:()=>wo,isPlainObject:()=>Wn,issue:()=>Pi,joinValues:()=>L,jsonStringifyReplacer:()=>Ei,merge:()=>tz,mergeDefs:()=>Sn,normalizeParams:()=>J,nullish:()=>Hn,numKeys:()=>Q$,objectClone:()=>G$,omit:()=>XS,optionalKeys:()=>Bm,parsedType:()=>Q,partial:()=>eP,pick:()=>KS,prefixIssues:()=>sr,primitiveTypes:()=>Fm,promiseAllObject:()=>K$,propertyKeyTypes:()=>Xa,randomString:()=>X$,required:()=>tP,safeExtend:()=>YS,shallowClone:()=>Hu,slugify:()=>Mm,stringifyPrimitive:()=>K,uint8ArrayToBase64:()=>nP,uint8ArrayToBase64url:()=>oz,uint8ArrayToHex:()=>az,unwrapMessage:()=>Wa});function B$(e){return e}a(B$,"assertEqual");function q$(e){return e}a(q$,"assertNotEqual");function V$(e){}a(V$,"assertIs");function Z$(e){throw new Error("Unexpected value in exhaustive check")}a(Z$,"assertNever");function H$(e){}a(H$,"assert");function Ja(e){let t=Object.values(e).filter(o=>typeof o=="number");return Object.entries(e).filter(([o,r])=>t.indexOf(+o)===-1).map(([o,r])=>r)}a(Ja,"getEnumValues");function L(e,t="|"){return e.map(n=>K(n)).join(t)}a(L,"joinValues");function Ei(e,t){return typeof t=="bigint"?t.toString():t}a(Ei,"jsonStringifyReplacer");function Si(e){return{get value(){{let n=e();return Object.defineProperty(this,"value",{value:n}),n}throw new Error("cached value already set")}}}a(Si,"cached");function Hn(e){return e==null}a(Hn,"nullish");function Ka(e){let t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}a(Ka,"cleanRegex");function jm(e,t){let n=(e.toString().split(".")[1]||"").length,o=t.toString(),r=(o.split(".")[1]||"").length;if(r===0&&/\d?e-\d?/.test(o)){let d=o.match(/\d?e-(\d?)/);d?.[1]&&(r=Number.parseInt(d[1]))}let i=n>r?n:r,s=Number.parseInt(e.toFixed(i).replace(".","")),u=Number.parseInt(t.toFixed(i).replace(".",""));return s%u/10**i}a(jm,"floatSafeRemainder");var JS=Symbol("evaluating");function Se(e,t,n){let o;Object.defineProperty(e,t,{get(){if(o!==JS)return o===void 0&&(o=JS,o=n()),o},set(r){Object.defineProperty(e,t,{value:r})},configurable:!0})}a(Se,"defineLazy");function G$(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}a(G$,"objectClone");function Gn(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}a(Gn,"assignProp");function Sn(...e){let t={};for(let n of e){let o=Object.getOwnPropertyDescriptors(n);Object.assign(t,o)}return Object.defineProperties({},t)}a(Sn,"mergeDefs");function W$(e){return Sn(e._zod.def)}a(W$,"cloneDef");function J$(e,t){return t?t.reduce((n,o)=>n?.[o],e):e}a(J$,"getElementAtPath");function K$(e){let t=Object.keys(e),n=t.map(o=>e[o]);return Promise.all(n).then(o=>{let r={};for(let i=0;i<t.length;i++)r[t[i]]=o[i];return r})}a(K$,"promiseAllObject");function X$(e=10){let t="abcdefghijklmnopqrstuvwxyz",n="";for(let o=0;o<e;o++)n+=t[Math.floor(Math.random()*t.length)];return n}a(X$,"randomString");function Vu(e){return JSON.stringify(e)}a(Vu,"esc");function Mm(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}a(Mm,"slugify");var Zu="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function wo(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}a(wo,"isObject");var Lm=Si(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function Wn(e){if(wo(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let n=t.prototype;return!(wo(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}a(Wn,"isPlainObject");function Hu(e){return Wn(e)?{...e}:Array.isArray(e)?[...e]:e}a(Hu,"shallowClone");function Q$(e){let t=0;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}a(Q$,"numKeys");var Y$=a(e=>{let t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},"getParsedType"),Xa=new Set(["string","number","symbol"]),Fm=new Set(["string","number","bigint","boolean","symbol","undefined"]);function xr(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}a(xr,"escapeRegex");function bt(e,t,n){let o=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(o._zod.parent=e),o}a(bt,"clone");function J(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:a(()=>t,"error")};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:a(()=>t.error,"error")}:t}a(J,"normalizeParams");function ez(e){let t;return new Proxy({},{get(n,o,r){return t??(t=e()),Reflect.get(t,o,r)},set(n,o,r,i){return t??(t=e()),Reflect.set(t,o,r,i)},has(n,o){return t??(t=e()),Reflect.has(t,o)},deleteProperty(n,o){return t??(t=e()),Reflect.deleteProperty(t,o)},ownKeys(n){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(n,o){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,o)},defineProperty(n,o,r){return t??(t=e()),Reflect.defineProperty(t,o,r)}})}a(ez,"createTransparentProxy");function K(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}a(K,"stringifyPrimitive");function Bm(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}a(Bm,"optionalKeys");var qm={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},Vm={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function KS(e,t){let n=e._zod.def,o=n.checks;if(o&&o.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let i=Sn(e._zod.def,{get shape(){let s={};for(let u in t){if(!(u in n.shape))throw new Error(`Unrecognized key: "${u}"`);t[u]&&(s[u]=n.shape[u])}return Gn(this,"shape",s),s},checks:[]});return bt(e,i)}a(KS,"pick");function XS(e,t){let n=e._zod.def,o=n.checks;if(o&&o.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let i=Sn(e._zod.def,{get shape(){let s={...e._zod.def.shape};for(let u in t){if(!(u in n.shape))throw new Error(`Unrecognized key: "${u}"`);t[u]&&delete s[u]}return Gn(this,"shape",s),s},checks:[]});return bt(e,i)}a(XS,"omit");function QS(e,t){if(!Wn(t))throw new Error("Invalid input to extend: expected a plain object");let n=e._zod.def.checks;if(n&&n.length>0){let i=e._zod.def.shape;for(let s in t)if(Object.getOwnPropertyDescriptor(i,s)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let r=Sn(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return Gn(this,"shape",i),i}});return bt(e,r)}a(QS,"extend");function YS(e,t){if(!Wn(t))throw new Error("Invalid input to safeExtend: expected a plain object");let n=Sn(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t};return Gn(this,"shape",o),o}});return bt(e,n)}a(YS,"safeExtend");function tz(e,t){let n=Sn(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t._zod.def.shape};return Gn(this,"shape",o),o},get catchall(){return t._zod.def.catchall},checks:[]});return bt(e,n)}a(tz,"merge");function eP(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let s=Sn(t._zod.def,{get shape(){let u=t._zod.def.shape,d={...u};if(n)for(let p in n){if(!(p in u))throw new Error(`Unrecognized key: "${p}"`);n[p]&&(d[p]=e?new e({type:"optional",innerType:u[p]}):u[p])}else for(let p in u)d[p]=e?new e({type:"optional",innerType:u[p]}):u[p];return Gn(this,"shape",d),d},checks:[]});return bt(t,s)}a(eP,"partial");function tP(e,t,n){let o=Sn(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let s in n){if(!(s in i))throw new Error(`Unrecognized key: "${s}"`);n[s]&&(i[s]=new e({type:"nonoptional",innerType:r[s]}))}else for(let s in r)i[s]=new e({type:"nonoptional",innerType:r[s]});return Gn(this,"shape",i),i}});return bt(t,o)}a(tP,"required");function Jn(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}a(Jn,"aborted");function sr(e,t){return t.map(n=>{var o;return(o=n).path??(o.path=[]),n.path.unshift(e),n})}a(sr,"prefixIssues");function Wa(e){return typeof e=="string"?e:e?.message}a(Wa,"unwrapMessage");function Gt(e,t,n){let o={...e,path:e.path??[]};if(!e.message){let r=Wa(e.inst?._zod.def?.error?.(e))??Wa(t?.error?.(e))??Wa(n.customError?.(e))??Wa(n.localeError?.(e))??"Invalid input";o.message=r}return delete o.inst,delete o.continue,t?.reportInput||delete o.input,o}a(Gt,"finalizeIssue");function Qa(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}a(Qa,"getSizableOrigin");function Ya(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}a(Ya,"getLengthableOrigin");function Q(e){let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";let n=e;if(n&&Object.getPrototypeOf(n)!==Object.prototype&&"constructor"in n&&n.constructor)return n.constructor.name}}return t}a(Q,"parsedType");function Pi(...e){let[t,n,o]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:o}:{...t}}a(Pi,"issue");function rz(e){return Object.entries(e).filter(([t,n])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}a(rz,"cleanEnum");function rP(e){let t=atob(e),n=new Uint8Array(t.length);for(let o=0;o<t.length;o++)n[o]=t.charCodeAt(o);return n}a(rP,"base64ToUint8Array");function nP(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}a(nP,"uint8ArrayToBase64");function nz(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),n="=".repeat((4-t.length%4)%4);return rP(t+n)}a(nz,"base64urlToUint8Array");function oz(e){return nP(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}a(oz,"uint8ArrayToBase64url");function iz(e){let t=e.replace(/^0x/,"");if(t.length%2!==0)throw new Error("Invalid hex string length");let n=new Uint8Array(t.length/2);for(let o=0;o<t.length;o+=2)n[o/2]=Number.parseInt(t.slice(o,o+2),16);return n}a(iz,"hexToUint8Array");function az(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}a(az,"uint8ArrayToHex");var Um=class{static{a(this,"Class")}constructor(...t){}};var oP=a((e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Ei,2),Object.defineProperty(e,"toString",{value:a(()=>e.message,"value"),enumerable:!1})},"initializer"),es=A("$ZodError",oP),Wt=A("$ZodError",oP,{Parent:Error});function xi(e,t=n=>n.message){let n={},o=[];for(let r of e.issues)r.path.length>0?(n[r.path[0]]=n[r.path[0]]||[],n[r.path[0]].push(t(r))):o.push(t(r));return{formErrors:o,fieldErrors:n}}a(xi,"flattenError");function Ti(e,t=n=>n.message){let n={_errors:[]},o=a(r=>{for(let i of r.issues)if(i.code==="invalid_union"&&i.errors.length)i.errors.map(s=>o({issues:s}));else if(i.code==="invalid_key")o({issues:i.issues});else if(i.code==="invalid_element")o({issues:i.issues});else if(i.path.length===0)n._errors.push(t(i));else{let s=n,u=0;for(;u<i.path.length;){let d=i.path[u];u===i.path.length-1?(s[d]=s[d]||{_errors:[]},s[d]._errors.push(t(i))):s[d]=s[d]||{_errors:[]},s=s[d],u++}}},"processError");return o(e),n}a(Ti,"formatError");function Gu(e,t=n=>n.message){let n={errors:[]},o=a((r,i=[])=>{var s,u;for(let d of r.issues)if(d.code==="invalid_union"&&d.errors.length)d.errors.map(p=>o({issues:p},d.path));else if(d.code==="invalid_key")o({issues:d.issues},d.path);else if(d.code==="invalid_element")o({issues:d.issues},d.path);else{let p=[...i,...d.path];if(p.length===0){n.errors.push(t(d));continue}let f=n,g=0;for(;g<p.length;){let y=p[g],h=g===p.length-1;typeof y=="string"?(f.properties??(f.properties={}),(s=f.properties)[y]??(s[y]={errors:[]}),f=f.properties[y]):(f.items??(f.items=[]),(u=f.items)[y]??(u[y]={errors:[]}),f=f.items[y]),h&&f.errors.push(t(d)),g++}}},"processError");return o(e),n}a(Gu,"treeifyError");function iP(e){let t=[],n=e.map(o=>typeof o=="object"?o.key:o);for(let o of n)typeof o=="number"?t.push(`[${o}]`):typeof o=="symbol"?t.push(`[${JSON.stringify(String(o))}]`):/[^\w$]/.test(o)?t.push(`[${JSON.stringify(o)}]`):(t.length&&t.push("."),t.push(o));return t.join("")}a(iP,"toDotPath");function Wu(e){let t=[],n=[...e.issues].sort((o,r)=>(o.path??[]).length-(r.path??[]).length);for(let o of n)t.push(`\u2716 ${o.message}`),o.path?.length&&t.push(` \u2192 at ${iP(o.path)}`);return t.join(`
56
+ `)}a(Wu,"prettifyError");var wi=a(e=>(t,n,o,r)=>{let i=o?Object.assign(o,{async:!1}):{async:!1},s=t._zod.run({value:n,issues:[]},i);if(s instanceof Promise)throw new jr;if(s.issues.length){let u=new(r?.Err??e)(s.issues.map(d=>Gt(d,i,it())));throw Zu(u,r?.callee),u}return s.value},"_parse"),Ao=wi(Wt),Ai=a(e=>async(t,n,o,r)=>{let i=o?Object.assign(o,{async:!0}):{async:!0},s=t._zod.run({value:n,issues:[]},i);if(s instanceof Promise&&(s=await s),s.issues.length){let u=new(r?.Err??e)(s.issues.map(d=>Gt(d,i,it())));throw Zu(u,r?.callee),u}return s.value},"_parseAsync"),Io=Ai(Wt),Ii=a(e=>(t,n,o)=>{let r=o?{...o,async:!1}:{async:!1},i=t._zod.run({value:n,issues:[]},r);if(i instanceof Promise)throw new jr;return i.issues.length?{success:!1,error:new(e??es)(i.issues.map(s=>Gt(s,r,it())))}:{success:!0,data:i.value}},"_safeParse"),Ri=Ii(Wt),Oi=a(e=>async(t,n,o)=>{let r=o?Object.assign(o,{async:!0}):{async:!0},i=t._zod.run({value:n,issues:[]},r);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(s=>Gt(s,r,it())))}:{success:!0,data:i.value}},"_safeParseAsync"),ki=Oi(Wt),Ju=a(e=>(t,n,o)=>{let r=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return wi(e)(t,n,r)},"_encode"),aP=Ju(Wt),Ku=a(e=>(t,n,o)=>wi(e)(t,n,o),"_decode"),sP=Ku(Wt),Xu=a(e=>async(t,n,o)=>{let r=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return Ai(e)(t,n,r)},"_encodeAsync"),cP=Xu(Wt),Qu=a(e=>async(t,n,o)=>Ai(e)(t,n,o),"_decodeAsync"),uP=Qu(Wt),Yu=a(e=>(t,n,o)=>{let r=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return Ii(e)(t,n,r)},"_safeEncode"),lP=Yu(Wt),el=a(e=>(t,n,o)=>Ii(e)(t,n,o),"_safeDecode"),dP=el(Wt),tl=a(e=>async(t,n,o)=>{let r=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return Oi(e)(t,n,r)},"_safeEncodeAsync"),pP=tl(Wt),rl=a(e=>async(t,n,o)=>Oi(e)(t,n,o),"_safeDecodeAsync"),fP=rl(Wt);var Jt={};ar(Jt,{base64:()=>ah,base64url:()=>nl,bigint:()=>ph,boolean:()=>mh,browserEmail:()=>hz,cidrv4:()=>oh,cidrv6:()=>ih,cuid:()=>Zm,cuid2:()=>Hm,date:()=>ch,datetime:()=>lh,domain:()=>_z,duration:()=>Xm,e164:()=>sh,email:()=>Ym,emoji:()=>eh,extendedDuration:()=>cz,guid:()=>Qm,hex:()=>bz,hostname:()=>yz,html5Email:()=>pz,idnEmail:()=>mz,integer:()=>fh,ipv4:()=>th,ipv6:()=>rh,ksuid:()=>Jm,lowercase:()=>yh,mac:()=>nh,md5_base64:()=>Ez,md5_base64url:()=>Sz,md5_hex:()=>vz,nanoid:()=>Km,null:()=>hh,number:()=>ol,rfc5322Email:()=>fz,sha1_base64:()=>xz,sha1_base64url:()=>Tz,sha1_hex:()=>Pz,sha256_base64:()=>Az,sha256_base64url:()=>Iz,sha256_hex:()=>wz,sha384_base64:()=>Oz,sha384_base64url:()=>kz,sha384_hex:()=>Rz,sha512_base64:()=>$z,sha512_base64url:()=>zz,sha512_hex:()=>Cz,string:()=>dh,time:()=>uh,ulid:()=>Gm,undefined:()=>gh,unicodeEmail:()=>mP,uppercase:()=>_h,uuid:()=>Ro,uuid4:()=>uz,uuid6:()=>lz,uuid7:()=>dz,xid:()=>Wm});var Zm=/^[cC][^\s-]{8,}$/,Hm=/^[0-9a-z]+$/,Gm=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Wm=/^[0-9a-vA-V]{20}$/,Jm=/^[A-Za-z0-9]{27}$/,Km=/^[a-zA-Z0-9_-]{21}$/,Xm=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,cz=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Qm=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Ro=a(e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,"uuid"),uz=Ro(4),lz=Ro(6),dz=Ro(7),Ym=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,pz=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,fz=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,mP=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,mz=mP,hz=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,gz="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function eh(){return new RegExp(gz,"u")}a(eh,"emoji");var th=/^(?:(?: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])$/,rh=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,nh=a(e=>{let t=xr(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},"mac"),oh=/^((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-9]|[1-2][0-9]|3[0-2])$/,ih=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,ah=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,nl=/^[A-Za-z0-9_-]*$/,yz=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,_z=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,sh=/^\+[1-9]\d{6,14}$/,hP="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",ch=new RegExp(`^${hP}$`);function gP(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}a(gP,"timeSource");function uh(e){return new RegExp(`^${gP(e)}$`)}a(uh,"time");function lh(e){let t=gP({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let o=`${t}(?:${n.join("|")})`;return new RegExp(`^${hP}T(?:${o})$`)}a(lh,"datetime");var dh=a(e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},"string"),ph=/^-?\d+n?$/,fh=/^-?\d+$/,ol=/^-?\d+(?:\.\d+)?$/,mh=/^(?:true|false)$/i,hh=/^null$/i;var gh=/^undefined$/i;var yh=/^[^A-Z]*$/,_h=/^[^a-z]*$/,bz=/^[0-9a-fA-F]*$/;function ts(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}a(ts,"fixedBase64");function rs(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}a(rs,"fixedBase64url");var vz=/^[0-9a-fA-F]{32}$/,Ez=ts(22,"=="),Sz=rs(22),Pz=/^[0-9a-fA-F]{40}$/,xz=ts(27,"="),Tz=rs(27),wz=/^[0-9a-fA-F]{64}$/,Az=ts(43,"="),Iz=rs(43),Rz=/^[0-9a-fA-F]{96}$/,Oz=ts(64,""),kz=rs(64),Cz=/^[0-9a-fA-F]{128}$/,$z=ts(86,"=="),zz=rs(86);var Ge=A("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),_P={number:"number",bigint:"bigint",object:"date"},il=A("$ZodCheckLessThan",(e,t)=>{Ge.init(e,t);let n=_P[typeof t.value];e._zod.onattach.push(o=>{let r=o._zod.bag,i=(t.inclusive?r.maximum:r.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<i&&(t.inclusive?r.maximum=t.value:r.exclusiveMaximum=t.value)}),e._zod.check=o=>{(t.inclusive?o.value<=t.value:o.value<t.value)||o.issues.push({origin:n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),al=A("$ZodCheckGreaterThan",(e,t)=>{Ge.init(e,t);let n=_P[typeof t.value];e._zod.onattach.push(o=>{let r=o._zod.bag,i=(t.inclusive?r.minimum:r.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?r.minimum=t.value:r.exclusiveMinimum=t.value)}),e._zod.check=o=>{(t.inclusive?o.value>=t.value:o.value>t.value)||o.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),bh=A("$ZodCheckMultipleOf",(e,t)=>{Ge.init(e,t),e._zod.onattach.push(n=>{var o;(o=n._zod.bag).multipleOf??(o.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):jm(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),vh=A("$ZodCheckNumberFormat",(e,t)=>{Ge.init(e,t),t.format=t.format||"float64";let n=t.format?.includes("int"),o=n?"int":"number",[r,i]=qm[t.format];e._zod.onattach.push(s=>{let u=s._zod.bag;u.format=t.format,u.minimum=r,u.maximum=i,n&&(u.pattern=fh)}),e._zod.check=s=>{let u=s.value;if(n){if(!Number.isInteger(u)){s.issues.push({expected:o,format:t.format,code:"invalid_type",continue:!1,input:u,inst:e});return}if(!Number.isSafeInteger(u)){u>0?s.issues.push({input:u,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!t.abort}):s.issues.push({input:u,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!t.abort});return}}u<r&&s.issues.push({origin:"number",input:u,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),u>i&&s.issues.push({origin:"number",input:u,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),Eh=A("$ZodCheckBigIntFormat",(e,t)=>{Ge.init(e,t);let[n,o]=Vm[t.format];e._zod.onattach.push(r=>{let i=r._zod.bag;i.format=t.format,i.minimum=n,i.maximum=o}),e._zod.check=r=>{let i=r.value;i<n&&r.issues.push({origin:"bigint",input:i,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort}),i>o&&r.issues.push({origin:"bigint",input:i,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}}),Sh=A("$ZodCheckMaxSize",(e,t)=>{var n;Ge.init(e,t),(n=e._zod.def).when??(n.when=o=>{let r=o.value;return!Hn(r)&&r.size!==void 0}),e._zod.onattach.push(o=>{let r=o._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<r&&(o._zod.bag.maximum=t.maximum)}),e._zod.check=o=>{let r=o.value;r.size<=t.maximum||o.issues.push({origin:Qa(r),code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Ph=A("$ZodCheckMinSize",(e,t)=>{var n;Ge.init(e,t),(n=e._zod.def).when??(n.when=o=>{let r=o.value;return!Hn(r)&&r.size!==void 0}),e._zod.onattach.push(o=>{let r=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>r&&(o._zod.bag.minimum=t.minimum)}),e._zod.check=o=>{let r=o.value;r.size>=t.minimum||o.issues.push({origin:Qa(r),code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),xh=A("$ZodCheckSizeEquals",(e,t)=>{var n;Ge.init(e,t),(n=e._zod.def).when??(n.when=o=>{let r=o.value;return!Hn(r)&&r.size!==void 0}),e._zod.onattach.push(o=>{let r=o._zod.bag;r.minimum=t.size,r.maximum=t.size,r.size=t.size}),e._zod.check=o=>{let r=o.value,i=r.size;if(i===t.size)return;let s=i>t.size;o.issues.push({origin:Qa(r),...s?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!t.abort})}}),Th=A("$ZodCheckMaxLength",(e,t)=>{var n;Ge.init(e,t),(n=e._zod.def).when??(n.when=o=>{let r=o.value;return!Hn(r)&&r.length!==void 0}),e._zod.onattach.push(o=>{let r=o._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<r&&(o._zod.bag.maximum=t.maximum)}),e._zod.check=o=>{let r=o.value;if(r.length<=t.maximum)return;let s=Ya(r);o.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),wh=A("$ZodCheckMinLength",(e,t)=>{var n;Ge.init(e,t),(n=e._zod.def).when??(n.when=o=>{let r=o.value;return!Hn(r)&&r.length!==void 0}),e._zod.onattach.push(o=>{let r=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>r&&(o._zod.bag.minimum=t.minimum)}),e._zod.check=o=>{let r=o.value;if(r.length>=t.minimum)return;let s=Ya(r);o.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Ah=A("$ZodCheckLengthEquals",(e,t)=>{var n;Ge.init(e,t),(n=e._zod.def).when??(n.when=o=>{let r=o.value;return!Hn(r)&&r.length!==void 0}),e._zod.onattach.push(o=>{let r=o._zod.bag;r.minimum=t.length,r.maximum=t.length,r.length=t.length}),e._zod.check=o=>{let r=o.value,i=r.length;if(i===t.length)return;let s=Ya(r),u=i>t.length;o.issues.push({origin:s,...u?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!t.abort})}}),Ci=A("$ZodCheckStringFormat",(e,t)=>{var n,o;Ge.init(e,t),e._zod.onattach.push(r=>{let i=r._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:t.format,input:r.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(o=e._zod).check??(o.check=()=>{})}),Ih=A("$ZodCheckRegex",(e,t)=>{Ci.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Rh=A("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=yh),Ci.init(e,t)}),Oh=A("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=_h),Ci.init(e,t)}),kh=A("$ZodCheckIncludes",(e,t)=>{Ge.init(e,t);let n=xr(t.includes),o=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=o,e._zod.onattach.push(r=>{let i=r._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(o)}),e._zod.check=r=>{r.value.includes(t.includes,t.position)||r.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:r.value,inst:e,continue:!t.abort})}}),Ch=A("$ZodCheckStartsWith",(e,t)=>{Ge.init(e,t);let n=new RegExp(`^${xr(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(o=>{let r=o._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(n)}),e._zod.check=o=>{o.value.startsWith(t.prefix)||o.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:o.value,inst:e,continue:!t.abort})}}),$h=A("$ZodCheckEndsWith",(e,t)=>{Ge.init(e,t);let n=new RegExp(`.*${xr(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(o=>{let r=o._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(n)}),e._zod.check=o=>{o.value.endsWith(t.suffix)||o.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:o.value,inst:e,continue:!t.abort})}});function yP(e,t,n){e.issues.length&&t.issues.push(...sr(n,e.issues))}a(yP,"handleCheckPropertyResult");var zh=A("$ZodCheckProperty",(e,t)=>{Ge.init(e,t),e._zod.check=n=>{let o=t.schema._zod.run({value:n.value[t.property],issues:[]},{});if(o instanceof Promise)return o.then(r=>yP(r,n,t.property));yP(o,n,t.property)}}),Nh=A("$ZodCheckMimeType",(e,t)=>{Ge.init(e,t);let n=new Set(t.mime);e._zod.onattach.push(o=>{o._zod.bag.mime=t.mime}),e._zod.check=o=>{n.has(o.value.type)||o.issues.push({code:"invalid_value",values:t.mime,input:o.value.type,inst:e,continue:!t.abort})}}),Dh=A("$ZodCheckOverwrite",(e,t)=>{Ge.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});var ns=class{static{a(this,"Doc")}constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}let o=t.split(`
57
+ `).filter(s=>s),r=Math.min(...o.map(s=>s.length-s.trimStart().length)),i=o.map(s=>s.slice(r)).map(s=>" ".repeat(this.indent*2)+s);for(let s of i)this.content.push(s)}compile(){let t=Function,n=this?.args,r=[...(this?.content??[""]).map(i=>` ${i}`)];return new t(...n,r.join(`
58
+ `))}};var Uh={major:4,minor:3,patch:6};var he=A("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Uh;let o=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&o.unshift(e);for(let r of o)for(let i of r._zod.onattach)i(e);if(o.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let r=a((s,u,d)=>{let p=Jn(s),f;for(let g of u){if(g._zod.def.when){if(!g._zod.def.when(s))continue}else if(p)continue;let y=s.issues.length,h=g._zod.check(s);if(h instanceof Promise&&d?.async===!1)throw new jr;if(f||h instanceof Promise)f=(f??Promise.resolve()).then(async()=>{await h,s.issues.length!==y&&(p||(p=Jn(s,y)))});else{if(s.issues.length===y)continue;p||(p=Jn(s,y))}}return f?f.then(()=>s):s},"runChecks"),i=a((s,u,d)=>{if(Jn(s))return s.aborted=!0,s;let p=r(u,o,d);if(p instanceof Promise){if(d.async===!1)throw new jr;return p.then(f=>e._zod.parse(f,d))}return e._zod.parse(p,d)},"handleCanaryResult");e._zod.run=(s,u)=>{if(u.skipChecks)return e._zod.parse(s,u);if(u.direction==="backward"){let p=e._zod.parse({value:s.value,issues:[]},{...u,skipChecks:!0});return p instanceof Promise?p.then(f=>i(f,s,u)):i(p,s,u)}let d=e._zod.parse(s,u);if(d instanceof Promise){if(u.async===!1)throw new jr;return d.then(p=>r(p,o,u))}return r(d,o,u)}}Se(e,"~standard",()=>({validate:a(r=>{try{let i=Ri(e,r);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return ki(e,r).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},"validate"),vendor:"zod",version:1}))}),Pn=A("$ZodString",(e,t)=>{he.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??dh(e._zod.bag),e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),Be=A("$ZodStringFormat",(e,t)=>{Ci.init(e,t),Pn.init(e,t)}),pl=A("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Qm),Be.init(e,t)}),fl=A("$ZodUUID",(e,t)=>{if(t.version){let o={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(o===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Ro(o))}else t.pattern??(t.pattern=Ro());Be.init(e,t)}),ml=A("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Ym),Be.init(e,t)}),os=A("$ZodURL",(e,t)=>{Be.init(e,t),e._zod.check=n=>{try{let o=n.value.trim(),r=new URL(o);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(r.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(r.protocol.endsWith(":")?r.protocol.slice(0,-1):r.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=r.href:n.value=o;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),hl=A("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=eh()),Be.init(e,t)}),gl=A("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Km),Be.init(e,t)}),yl=A("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Zm),Be.init(e,t)}),_l=A("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Hm),Be.init(e,t)}),bl=A("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Gm),Be.init(e,t)}),vl=A("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Wm),Be.init(e,t)}),El=A("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Jm),Be.init(e,t)}),Sl=A("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=lh(t)),Be.init(e,t)}),Pl=A("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=ch),Be.init(e,t)}),xl=A("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=uh(t)),Be.init(e,t)}),Tl=A("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Xm),Be.init(e,t)}),wl=A("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=th),Be.init(e,t),e._zod.bag.format="ipv4"}),Al=A("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=rh),Be.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),Il=A("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=nh(t.delimiter)),Be.init(e,t),e._zod.bag.format="mac"}),Rl=A("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=oh),Be.init(e,t)}),Ol=A("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=ih),Be.init(e,t),e._zod.check=n=>{let o=n.value.split("/");try{if(o.length!==2)throw new Error;let[r,i]=o;if(!i)throw new Error;let s=Number(i);if(`${s}`!==i)throw new Error;if(s<0||s>128)throw new Error;new URL(`http://[${r}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function Mh(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}a(Mh,"isValidBase64");var kl=A("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=ah),Be.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{Mh(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function kP(e){if(!nl.test(e))return!1;let t=e.replace(/[-_]/g,o=>o==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return Mh(n)}a(kP,"isValidBase64URL");var Cl=A("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=nl),Be.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{kP(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),$l=A("$ZodE164",(e,t)=>{t.pattern??(t.pattern=sh),Be.init(e,t)});function CP(e,t=null){try{let n=e.split(".");if(n.length!==3)return!1;let[o]=n;if(!o)return!1;let r=JSON.parse(atob(o));return!("typ"in r&&r?.typ!=="JWT"||!r.alg||t&&(!("alg"in r)||r.alg!==t))}catch{return!1}}a(CP,"isValidJWT");var zl=A("$ZodJWT",(e,t)=>{Be.init(e,t),e._zod.check=n=>{CP(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),Nl=A("$ZodCustomStringFormat",(e,t)=>{Be.init(e,t),e._zod.check=n=>{t.fn(n.value)||n.issues.push({code:"invalid_format",format:t.format,input:n.value,inst:e,continue:!t.abort})}}),$i=A("$ZodNumber",(e,t)=>{he.init(e,t),e._zod.pattern=e._zod.bag.pattern??ol,e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let r=n.value;if(typeof r=="number"&&!Number.isNaN(r)&&Number.isFinite(r))return n;let i=typeof r=="number"?Number.isNaN(r)?"NaN":Number.isFinite(r)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:r,inst:e,...i?{received:i}:{}}),n}}),is=A("$ZodNumberFormat",(e,t)=>{vh.init(e,t),$i.init(e,t)}),Oo=A("$ZodBoolean",(e,t)=>{he.init(e,t),e._zod.pattern=mh,e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=!!n.value}catch{}let r=n.value;return typeof r=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:r,inst:e}),n}}),zi=A("$ZodBigInt",(e,t)=>{he.init(e,t),e._zod.pattern=ph,e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=BigInt(n.value)}catch{}return typeof n.value=="bigint"||n.issues.push({expected:"bigint",code:"invalid_type",input:n.value,inst:e}),n}}),Dl=A("$ZodBigIntFormat",(e,t)=>{Eh.init(e,t),zi.init(e,t)}),Ul=A("$ZodSymbol",(e,t)=>{he.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;return typeof r=="symbol"||n.issues.push({expected:"symbol",code:"invalid_type",input:r,inst:e}),n}}),jl=A("$ZodUndefined",(e,t)=>{he.init(e,t),e._zod.pattern=gh,e._zod.values=new Set([void 0]),e._zod.optin="optional",e._zod.optout="optional",e._zod.parse=(n,o)=>{let r=n.value;return typeof r>"u"||n.issues.push({expected:"undefined",code:"invalid_type",input:r,inst:e}),n}}),Ml=A("$ZodNull",(e,t)=>{he.init(e,t),e._zod.pattern=hh,e._zod.values=new Set([null]),e._zod.parse=(n,o)=>{let r=n.value;return r===null||n.issues.push({expected:"null",code:"invalid_type",input:r,inst:e}),n}}),as=A("$ZodAny",(e,t)=>{he.init(e,t),e._zod.parse=n=>n}),ss=A("$ZodUnknown",(e,t)=>{he.init(e,t),e._zod.parse=n=>n}),Ll=A("$ZodNever",(e,t)=>{he.init(e,t),e._zod.parse=(n,o)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)}),cs=A("$ZodVoid",(e,t)=>{he.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;return typeof r>"u"||n.issues.push({expected:"void",code:"invalid_type",input:r,inst:e}),n}}),us=A("$ZodDate",(e,t)=>{he.init(e,t),e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=new Date(n.value)}catch{}let r=n.value,i=r instanceof Date;return i&&!Number.isNaN(r.getTime())||n.issues.push({expected:"date",code:"invalid_type",input:r,...i?{received:"Invalid Date"}:{},inst:e}),n}});function vP(e,t,n){e.issues.length&&t.issues.push(...sr(n,e.issues)),t.value[n]=e.value}a(vP,"handleArrayResult");var ls=A("$ZodArray",(e,t)=>{he.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;if(!Array.isArray(r))return n.issues.push({expected:"array",code:"invalid_type",input:r,inst:e}),n;n.value=Array(r.length);let i=[];for(let s=0;s<r.length;s++){let u=r[s],d=t.element._zod.run({value:u,issues:[]},o);d instanceof Promise?i.push(d.then(p=>vP(p,n,s))):vP(d,n,s)}return i.length?Promise.all(i).then(()=>n):n}});function dl(e,t,n,o,r){if(e.issues.length){if(r&&!(n in o))return;t.issues.push(...sr(n,e.issues))}e.value===void 0?n in o&&(t.value[n]=void 0):t.value[n]=e.value}a(dl,"handlePropertyResult");function $P(e){let t=Object.keys(e.shape);for(let o of t)if(!e.shape?.[o]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${o}": expected a Zod schema`);let n=Bm(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}a($P,"normalizeDef");function zP(e,t,n,o,r,i){let s=[],u=r.keySet,d=r.catchall._zod,p=d.def.type,f=d.optout==="optional";for(let g in t){if(u.has(g))continue;if(p==="never"){s.push(g);continue}let y=d.run({value:t[g],issues:[]},o);y instanceof Promise?e.push(y.then(h=>dl(h,n,g,t,f))):dl(y,n,g,t,f)}return s.length&&n.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:i}),e.length?Promise.all(e).then(()=>n):n}a(zP,"handleCatchall");var Fl=A("$ZodObject",(e,t)=>{if(he.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let u=t.shape;Object.defineProperty(t,"shape",{get:a(()=>{let d={...u};return Object.defineProperty(t,"shape",{value:d}),d},"get")})}let o=Si(()=>$P(t));Se(e._zod,"propValues",()=>{let u=t.shape,d={};for(let p in u){let f=u[p]._zod;if(f.values){d[p]??(d[p]=new Set);for(let g of f.values)d[p].add(g)}}return d});let r=wo,i=t.catchall,s;e._zod.parse=(u,d)=>{s??(s=o.value);let p=u.value;if(!r(p))return u.issues.push({expected:"object",code:"invalid_type",input:p,inst:e}),u;u.value={};let f=[],g=s.shape;for(let y of s.keys){let h=g[y],_=h._zod.optout==="optional",P=h._zod.run({value:p[y],issues:[]},d);P instanceof Promise?f.push(P.then(x=>dl(x,u,y,p,_))):dl(P,u,y,p,_)}return i?zP(f,p,u,d,o.value,e):f.length?Promise.all(f).then(()=>u):u}}),Lh=A("$ZodObjectJIT",(e,t)=>{Fl.init(e,t);let n=e._zod.parse,o=Si(()=>$P(t)),r=a(y=>{let h=new ns(["shape","payload","ctx"]),_=o.value,P=a(V=>{let W=Vu(V);return`shape[${W}]._zod.run({ value: input[${W}], issues: [] }, ctx)`},"parseStr");h.write("const input = payload.value;");let x=Object.create(null),S=0;for(let V of _.keys)x[V]=`key_${S++}`;h.write("const newResult = {};");for(let V of _.keys){let W=x[V],Z=Vu(V),te=y[V]?._zod?.optout==="optional";h.write(`const ${W} = ${P(V)};`),te?h.write(`
59
+ if (${W}.issues.length) {
60
+ if (${Z} in input) {
61
+ payload.issues = payload.issues.concat(${W}.issues.map(iss => ({
62
+ ...iss,
63
+ path: iss.path ? [${Z}, ...iss.path] : [${Z}]
64
+ })));
65
+ }
66
+ }
67
+
68
+ if (${W}.value === undefined) {
69
+ if (${Z} in input) {
70
+ newResult[${Z}] = undefined;
71
+ }
72
+ } else {
73
+ newResult[${Z}] = ${W}.value;
74
+ }
75
+
76
+ `):h.write(`
77
+ if (${W}.issues.length) {
78
+ payload.issues = payload.issues.concat(${W}.issues.map(iss => ({
79
+ ...iss,
80
+ path: iss.path ? [${Z}, ...iss.path] : [${Z}]
81
+ })));
82
+ }
83
+
84
+ if (${W}.value === undefined) {
85
+ if (${Z} in input) {
86
+ newResult[${Z}] = undefined;
87
+ }
88
+ } else {
89
+ newResult[${Z}] = ${W}.value;
90
+ }
91
+
92
+ `)}h.write("payload.value = newResult;"),h.write("return payload;");let $=h.compile();return(V,W)=>$(y,V,W)},"generateFastpass"),i,s=wo,u=!Ha.jitless,p=u&&Lm.value,f=t.catchall,g;e._zod.parse=(y,h)=>{g??(g=o.value);let _=y.value;return s(_)?u&&p&&h?.async===!1&&h.jitless!==!0?(i||(i=r(t.shape)),y=i(y,h),f?zP([],_,y,h,g,e):y):n(y,h):(y.issues.push({expected:"object",code:"invalid_type",input:_,inst:e}),y)}});function EP(e,t,n,o){for(let i of e)if(i.issues.length===0)return t.value=i.value,t;let r=e.filter(i=>!Jn(i));return r.length===1?(t.value=r[0].value,r[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(i=>i.issues.map(s=>Gt(s,o,it())))}),t)}a(EP,"handleUnionResults");var ko=A("$ZodUnion",(e,t)=>{he.init(e,t),Se(e._zod,"optin",()=>t.options.some(r=>r._zod.optin==="optional")?"optional":void 0),Se(e._zod,"optout",()=>t.options.some(r=>r._zod.optout==="optional")?"optional":void 0),Se(e._zod,"values",()=>{if(t.options.every(r=>r._zod.values))return new Set(t.options.flatMap(r=>Array.from(r._zod.values)))}),Se(e._zod,"pattern",()=>{if(t.options.every(r=>r._zod.pattern)){let r=t.options.map(i=>i._zod.pattern);return new RegExp(`^(${r.map(i=>Ka(i.source)).join("|")})$`)}});let n=t.options.length===1,o=t.options[0]._zod.run;e._zod.parse=(r,i)=>{if(n)return o(r,i);let s=!1,u=[];for(let d of t.options){let p=d._zod.run({value:r.value,issues:[]},i);if(p instanceof Promise)u.push(p),s=!0;else{if(p.issues.length===0)return p;u.push(p)}}return s?Promise.all(u).then(d=>EP(d,r,e,i)):EP(u,r,e,i)}});function SP(e,t,n,o){let r=e.filter(i=>i.issues.length===0);return r.length===1?(t.value=r[0].value,t):(r.length===0?t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(i=>i.issues.map(s=>Gt(s,o,it())))}):t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:[],inclusive:!1}),t)}a(SP,"handleExclusiveUnionResults");var Bl=A("$ZodXor",(e,t)=>{ko.init(e,t),t.inclusive=!1;let n=t.options.length===1,o=t.options[0]._zod.run;e._zod.parse=(r,i)=>{if(n)return o(r,i);let s=!1,u=[];for(let d of t.options){let p=d._zod.run({value:r.value,issues:[]},i);p instanceof Promise?(u.push(p),s=!0):u.push(p)}return s?Promise.all(u).then(d=>SP(d,r,e,i)):SP(u,r,e,i)}}),ds=A("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,ko.init(e,t);let n=e._zod.parse;Se(e._zod,"propValues",()=>{let r={};for(let i of t.options){let s=i._zod.propValues;if(!s||Object.keys(s).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(let[u,d]of Object.entries(s)){r[u]||(r[u]=new Set);for(let p of d)r[u].add(p)}}return r});let o=Si(()=>{let r=t.options,i=new Map;for(let s of r){let u=s._zod.propValues?.[t.discriminator];if(!u||u.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(s)}"`);for(let d of u){if(i.has(d))throw new Error(`Duplicate discriminator value "${String(d)}"`);i.set(d,s)}}return i});e._zod.parse=(r,i)=>{let s=r.value;if(!wo(s))return r.issues.push({code:"invalid_type",expected:"object",input:s,inst:e}),r;let u=o.value.get(s?.[t.discriminator]);return u?u._zod.run(r,i):t.unionFallback?n(r,i):(r.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:s,path:[t.discriminator],inst:e}),r)}}),ql=A("$ZodIntersection",(e,t)=>{he.init(e,t),e._zod.parse=(n,o)=>{let r=n.value,i=t.left._zod.run({value:r,issues:[]},o),s=t.right._zod.run({value:r,issues:[]},o);return i instanceof Promise||s instanceof Promise?Promise.all([i,s]).then(([d,p])=>PP(n,d,p)):PP(n,i,s)}});function jh(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Wn(e)&&Wn(t)){let n=Object.keys(t),o=Object.keys(e).filter(i=>n.indexOf(i)!==-1),r={...e,...t};for(let i of o){let s=jh(e[i],t[i]);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};r[i]=s.data}return{valid:!0,data:r}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let o=0;o<e.length;o++){let r=e[o],i=t[o],s=jh(r,i);if(!s.valid)return{valid:!1,mergeErrorPath:[o,...s.mergeErrorPath]};n.push(s.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}a(jh,"mergeValues");function PP(e,t,n){let o=new Map,r;for(let u of t.issues)if(u.code==="unrecognized_keys"){r??(r=u);for(let d of u.keys)o.has(d)||o.set(d,{}),o.get(d).l=!0}else e.issues.push(u);for(let u of n.issues)if(u.code==="unrecognized_keys")for(let d of u.keys)o.has(d)||o.set(d,{}),o.get(d).r=!0;else e.issues.push(u);let i=[...o].filter(([,u])=>u.l&&u.r).map(([u])=>u);if(i.length&&r&&e.issues.push({...r,keys:i}),Jn(e))return e;let s=jh(t.value,n.value);if(!s.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(s.mergeErrorPath)}`);return e.value=s.data,e}a(PP,"handleIntersectionResults");var ps=A("$ZodTuple",(e,t)=>{he.init(e,t);let n=t.items;e._zod.parse=(o,r)=>{let i=o.value;if(!Array.isArray(i))return o.issues.push({input:i,inst:e,expected:"tuple",code:"invalid_type"}),o;o.value=[];let s=[],u=[...n].reverse().findIndex(f=>f._zod.optin!=="optional"),d=u===-1?0:n.length-u;if(!t.rest){let f=i.length>n.length,g=i.length<d-1;if(f||g)return o.issues.push({...f?{code:"too_big",maximum:n.length,inclusive:!0}:{code:"too_small",minimum:n.length},input:i,inst:e,origin:"array"}),o}let p=-1;for(let f of n){if(p++,p>=i.length&&p>=d)continue;let g=f._zod.run({value:i[p],issues:[]},r);g instanceof Promise?s.push(g.then(y=>sl(y,o,p))):sl(g,o,p)}if(t.rest){let f=i.slice(n.length);for(let g of f){p++;let y=t.rest._zod.run({value:g,issues:[]},r);y instanceof Promise?s.push(y.then(h=>sl(h,o,p))):sl(y,o,p)}}return s.length?Promise.all(s).then(()=>o):o}});function sl(e,t,n){e.issues.length&&t.issues.push(...sr(n,e.issues)),t.value[n]=e.value}a(sl,"handleTupleResult");var fs=A("$ZodRecord",(e,t)=>{he.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;if(!Wn(r))return n.issues.push({expected:"record",code:"invalid_type",input:r,inst:e}),n;let i=[],s=t.keyType._zod.values;if(s){n.value={};let u=new Set;for(let p of s)if(typeof p=="string"||typeof p=="number"||typeof p=="symbol"){u.add(typeof p=="number"?p.toString():p);let f=t.valueType._zod.run({value:r[p],issues:[]},o);f instanceof Promise?i.push(f.then(g=>{g.issues.length&&n.issues.push(...sr(p,g.issues)),n.value[p]=g.value})):(f.issues.length&&n.issues.push(...sr(p,f.issues)),n.value[p]=f.value)}let d;for(let p in r)u.has(p)||(d=d??[],d.push(p));d&&d.length>0&&n.issues.push({code:"unrecognized_keys",input:r,inst:e,keys:d})}else{n.value={};for(let u of Reflect.ownKeys(r)){if(u==="__proto__")continue;let d=t.keyType._zod.run({value:u,issues:[]},o);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof u=="string"&&ol.test(u)&&d.issues.length){let g=t.keyType._zod.run({value:Number(u),issues:[]},o);if(g instanceof Promise)throw new Error("Async schemas not supported in object keys currently");g.issues.length===0&&(d=g)}if(d.issues.length){t.mode==="loose"?n.value[u]=r[u]:n.issues.push({code:"invalid_key",origin:"record",issues:d.issues.map(g=>Gt(g,o,it())),input:u,path:[u],inst:e});continue}let f=t.valueType._zod.run({value:r[u],issues:[]},o);f instanceof Promise?i.push(f.then(g=>{g.issues.length&&n.issues.push(...sr(u,g.issues)),n.value[d.value]=g.value})):(f.issues.length&&n.issues.push(...sr(u,f.issues)),n.value[d.value]=f.value)}}return i.length?Promise.all(i).then(()=>n):n}}),Vl=A("$ZodMap",(e,t)=>{he.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;if(!(r instanceof Map))return n.issues.push({expected:"map",code:"invalid_type",input:r,inst:e}),n;let i=[];n.value=new Map;for(let[s,u]of r){let d=t.keyType._zod.run({value:s,issues:[]},o),p=t.valueType._zod.run({value:u,issues:[]},o);d instanceof Promise||p instanceof Promise?i.push(Promise.all([d,p]).then(([f,g])=>{xP(f,g,n,s,r,e,o)})):xP(d,p,n,s,r,e,o)}return i.length?Promise.all(i).then(()=>n):n}});function xP(e,t,n,o,r,i,s){e.issues.length&&(Xa.has(typeof o)?n.issues.push(...sr(o,e.issues)):n.issues.push({code:"invalid_key",origin:"map",input:r,inst:i,issues:e.issues.map(u=>Gt(u,s,it()))})),t.issues.length&&(Xa.has(typeof o)?n.issues.push(...sr(o,t.issues)):n.issues.push({origin:"map",code:"invalid_element",input:r,inst:i,key:o,issues:t.issues.map(u=>Gt(u,s,it()))})),n.value.set(e.value,t.value)}a(xP,"handleMapResult");var Zl=A("$ZodSet",(e,t)=>{he.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;if(!(r instanceof Set))return n.issues.push({input:r,inst:e,expected:"set",code:"invalid_type"}),n;let i=[];n.value=new Set;for(let s of r){let u=t.valueType._zod.run({value:s,issues:[]},o);u instanceof Promise?i.push(u.then(d=>TP(d,n))):TP(u,n)}return i.length?Promise.all(i).then(()=>n):n}});function TP(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}a(TP,"handleSetResult");var ms=A("$ZodEnum",(e,t)=>{he.init(e,t);let n=Ja(t.entries),o=new Set(n);e._zod.values=o,e._zod.pattern=new RegExp(`^(${n.filter(r=>Xa.has(typeof r)).map(r=>typeof r=="string"?xr(r):r.toString()).join("|")})$`),e._zod.parse=(r,i)=>{let s=r.value;return o.has(s)||r.issues.push({code:"invalid_value",values:n,input:s,inst:e}),r}}),hs=A("$ZodLiteral",(e,t)=>{if(he.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");let n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map(o=>typeof o=="string"?xr(o):o?xr(o.toString()):String(o)).join("|")})$`),e._zod.parse=(o,r)=>{let i=o.value;return n.has(i)||o.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),o}}),Hl=A("$ZodFile",(e,t)=>{he.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;return r instanceof File||n.issues.push({expected:"file",code:"invalid_type",input:r,inst:e}),n}}),gs=A("$ZodTransform",(e,t)=>{he.init(e,t),e._zod.parse=(n,o)=>{if(o.direction==="backward")throw new Zn(e.constructor.name);let r=t.transform(n.value,n);if(o.async)return(r instanceof Promise?r:Promise.resolve(r)).then(s=>(n.value=s,n));if(r instanceof Promise)throw new jr;return n.value=r,n}});function wP(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}a(wP,"handleOptionalResult");var Ni=A("$ZodOptional",(e,t)=>{he.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Se(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Se(e._zod,"pattern",()=>{let n=t.innerType._zod.pattern;return n?new RegExp(`^(${Ka(n.source)})?$`):void 0}),e._zod.parse=(n,o)=>{if(t.innerType._zod.optin==="optional"){let r=t.innerType._zod.run(n,o);return r instanceof Promise?r.then(i=>wP(i,n.value)):wP(r,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,o)}}),Gl=A("$ZodExactOptional",(e,t)=>{Ni.init(e,t),Se(e._zod,"values",()=>t.innerType._zod.values),Se(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,o)=>t.innerType._zod.run(n,o)}),ys=A("$ZodNullable",(e,t)=>{he.init(e,t),Se(e._zod,"optin",()=>t.innerType._zod.optin),Se(e._zod,"optout",()=>t.innerType._zod.optout),Se(e._zod,"pattern",()=>{let n=t.innerType._zod.pattern;return n?new RegExp(`^(${Ka(n.source)}|null)$`):void 0}),Se(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,o)=>n.value===null?n:t.innerType._zod.run(n,o)}),Wl=A("$ZodDefault",(e,t)=>{he.init(e,t),e._zod.optin="optional",Se(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>{if(o.direction==="backward")return t.innerType._zod.run(n,o);if(n.value===void 0)return n.value=t.defaultValue,n;let r=t.innerType._zod.run(n,o);return r instanceof Promise?r.then(i=>AP(i,t)):AP(r,t)}});function AP(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}a(AP,"handleDefaultResult");var Jl=A("$ZodPrefault",(e,t)=>{he.init(e,t),e._zod.optin="optional",Se(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>(o.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,o))}),Kl=A("$ZodNonOptional",(e,t)=>{he.init(e,t),Se(e._zod,"values",()=>{let n=t.innerType._zod.values;return n?new Set([...n].filter(o=>o!==void 0)):void 0}),e._zod.parse=(n,o)=>{let r=t.innerType._zod.run(n,o);return r instanceof Promise?r.then(i=>IP(i,e)):IP(r,e)}});function IP(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}a(IP,"handleNonOptionalResult");var Xl=A("$ZodSuccess",(e,t)=>{he.init(e,t),e._zod.parse=(n,o)=>{if(o.direction==="backward")throw new Zn("ZodSuccess");let r=t.innerType._zod.run(n,o);return r instanceof Promise?r.then(i=>(n.value=i.issues.length===0,n)):(n.value=r.issues.length===0,n)}}),Ql=A("$ZodCatch",(e,t)=>{he.init(e,t),Se(e._zod,"optin",()=>t.innerType._zod.optin),Se(e._zod,"optout",()=>t.innerType._zod.optout),Se(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>{if(o.direction==="backward")return t.innerType._zod.run(n,o);let r=t.innerType._zod.run(n,o);return r instanceof Promise?r.then(i=>(n.value=i.value,i.issues.length&&(n.value=t.catchValue({...n,error:{issues:i.issues.map(s=>Gt(s,o,it()))},input:n.value}),n.issues=[]),n)):(n.value=r.value,r.issues.length&&(n.value=t.catchValue({...n,error:{issues:r.issues.map(i=>Gt(i,o,it()))},input:n.value}),n.issues=[]),n)}}),Yl=A("$ZodNaN",(e,t)=>{he.init(e,t),e._zod.parse=(n,o)=>((typeof n.value!="number"||!Number.isNaN(n.value))&&n.issues.push({input:n.value,inst:e,expected:"nan",code:"invalid_type"}),n)}),_s=A("$ZodPipe",(e,t)=>{he.init(e,t),Se(e._zod,"values",()=>t.in._zod.values),Se(e._zod,"optin",()=>t.in._zod.optin),Se(e._zod,"optout",()=>t.out._zod.optout),Se(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,o)=>{if(o.direction==="backward"){let i=t.out._zod.run(n,o);return i instanceof Promise?i.then(s=>cl(s,t.in,o)):cl(i,t.in,o)}let r=t.in._zod.run(n,o);return r instanceof Promise?r.then(i=>cl(i,t.out,o)):cl(r,t.out,o)}});function cl(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}a(cl,"handlePipeResult");var Di=A("$ZodCodec",(e,t)=>{he.init(e,t),Se(e._zod,"values",()=>t.in._zod.values),Se(e._zod,"optin",()=>t.in._zod.optin),Se(e._zod,"optout",()=>t.out._zod.optout),Se(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,o)=>{if((o.direction||"forward")==="forward"){let i=t.in._zod.run(n,o);return i instanceof Promise?i.then(s=>ul(s,t,o)):ul(i,t,o)}else{let i=t.out._zod.run(n,o);return i instanceof Promise?i.then(s=>ul(s,t,o)):ul(i,t,o)}}});function ul(e,t,n){if(e.issues.length)return e.aborted=!0,e;if((n.direction||"forward")==="forward"){let r=t.transform(e.value,e);return r instanceof Promise?r.then(i=>ll(e,i,t.out,n)):ll(e,r,t.out,n)}else{let r=t.reverseTransform(e.value,e);return r instanceof Promise?r.then(i=>ll(e,i,t.in,n)):ll(e,r,t.in,n)}}a(ul,"handleCodecAResult");function ll(e,t,n,o){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:t,issues:e.issues},o)}a(ll,"handleCodecTxResult");var ed=A("$ZodReadonly",(e,t)=>{he.init(e,t),Se(e._zod,"propValues",()=>t.innerType._zod.propValues),Se(e._zod,"values",()=>t.innerType._zod.values),Se(e._zod,"optin",()=>t.innerType?._zod?.optin),Se(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,o)=>{if(o.direction==="backward")return t.innerType._zod.run(n,o);let r=t.innerType._zod.run(n,o);return r instanceof Promise?r.then(RP):RP(r)}});function RP(e){return e.value=Object.freeze(e.value),e}a(RP,"handleReadonlyResult");var td=A("$ZodTemplateLiteral",(e,t)=>{he.init(e,t);let n=[];for(let o of t.parts)if(typeof o=="object"&&o!==null){if(!o._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...o._zod.traits].shift()}`);let r=o._zod.pattern instanceof RegExp?o._zod.pattern.source:o._zod.pattern;if(!r)throw new Error(`Invalid template literal part: ${o._zod.traits}`);let i=r.startsWith("^")?1:0,s=r.endsWith("$")?r.length-1:r.length;n.push(r.slice(i,s))}else if(o===null||Fm.has(typeof o))n.push(xr(`${o}`));else throw new Error(`Invalid template literal part: ${o}`);e._zod.pattern=new RegExp(`^${n.join("")}$`),e._zod.parse=(o,r)=>typeof o.value!="string"?(o.issues.push({input:o.value,inst:e,expected:"string",code:"invalid_type"}),o):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(o.value)||o.issues.push({input:o.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),o)}),rd=A("$ZodFunction",(e,t)=>(he.init(e,t),e._def=t,e._zod.def=t,e.implement=n=>{if(typeof n!="function")throw new Error("implement() must be called with a function");return function(...o){let r=e._def.input?Ao(e._def.input,o):o,i=Reflect.apply(n,this,r);return e._def.output?Ao(e._def.output,i):i}},e.implementAsync=n=>{if(typeof n!="function")throw new Error("implementAsync() must be called with a function");return async function(...o){let r=e._def.input?await Io(e._def.input,o):o,i=await Reflect.apply(n,this,r);return e._def.output?await Io(e._def.output,i):i}},e._zod.parse=(n,o)=>typeof n.value!="function"?(n.issues.push({code:"invalid_type",expected:"function",input:n.value,inst:e}),n):(e._def.output&&e._def.output._zod.def.type==="promise"?n.value=e.implementAsync(n.value):n.value=e.implement(n.value),n),e.input=(...n)=>{let o=e.constructor;return Array.isArray(n[0])?new o({type:"function",input:new ps({type:"tuple",items:n[0],rest:n[1]}),output:e._def.output}):new o({type:"function",input:n[0],output:e._def.output})},e.output=n=>{let o=e.constructor;return new o({type:"function",input:e._def.input,output:n})},e)),nd=A("$ZodPromise",(e,t)=>{he.init(e,t),e._zod.parse=(n,o)=>Promise.resolve(n.value).then(r=>t.innerType._zod.run({value:r,issues:[]},o))}),od=A("$ZodLazy",(e,t)=>{he.init(e,t),Se(e._zod,"innerType",()=>t.getter()),Se(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),Se(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),Se(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),Se(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(n,o)=>e._zod.innerType._zod.run(n,o)}),bs=A("$ZodCustom",(e,t)=>{Ge.init(e,t),he.init(e,t),e._zod.parse=(n,o)=>n,e._zod.check=n=>{let o=n.value,r=t.fn(o);if(r instanceof Promise)return r.then(i=>OP(i,n,o,e));OP(r,n,o,e)}});function OP(e,t,n,o){if(!e){let r={code:"custom",input:n,inst:o,path:[...o._zod.def.path??[]],continue:!o._zod.def.abort};o._zod.def.params&&(r.params=o._zod.def.params),t.issues.push(Pi(r))}}a(OP,"handleRefineResult");var ji={};ar(ji,{ar:()=>Fh,az:()=>Bh,be:()=>qh,bg:()=>Vh,ca:()=>Zh,cs:()=>Hh,da:()=>Gh,de:()=>Wh,en:()=>vs,eo:()=>Jh,es:()=>Kh,fa:()=>Xh,fi:()=>Qh,fr:()=>Yh,frCA:()=>eg,he:()=>tg,hu:()=>rg,hy:()=>ng,id:()=>og,is:()=>ig,it:()=>ag,ja:()=>sg,ka:()=>cg,kh:()=>ug,km:()=>Es,ko:()=>lg,lt:()=>dg,mk:()=>pg,ms:()=>fg,nl:()=>mg,no:()=>hg,ota:()=>gg,pl:()=>_g,ps:()=>yg,pt:()=>bg,ru:()=>vg,sl:()=>Eg,sv:()=>Sg,ta:()=>Pg,th:()=>xg,tr:()=>Tg,ua:()=>wg,uk:()=>Ps,ur:()=>Ag,uz:()=>Ig,vi:()=>Rg,yo:()=>Cg,zhCN:()=>Og,zhTW:()=>kg});var Dz=a(()=>{let e={string:{unit:"\u062D\u0631\u0641",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},file:{unit:"\u0628\u0627\u064A\u062A",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},array:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},set:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function t(r){return e[r]??null}a(t,"getSizing");let n={regex:"\u0645\u062F\u062E\u0644",email:"\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",url:"\u0631\u0627\u0628\u0637",emoji:"\u0625\u064A\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",date:"\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO",time:"\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",duration:"\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO",ipv4:"\u0639\u0646\u0648\u0627\u0646 IPv4",ipv6:"\u0639\u0646\u0648\u0627\u0646 IPv6",cidrv4:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4",cidrv6:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6",base64:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded",base64url:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded",json_string:"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",e164:"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"},o={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=Q(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 instanceof ${r.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${u}`:`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${i}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${u}`}case"invalid_value":return r.values.length===1?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${K(r.values[0])}`:`\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${r.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${i} ${r.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631"}`:`\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${r.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${i} ${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${r.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${i} ${r.minimum.toString()} ${s.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${r.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${i} ${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${r.prefix}"`:i.format==="ends_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${i.suffix}"`:i.format==="includes"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${i.includes}"`:i.format==="regex"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${i.pattern}`:`${n[i.format]??r.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`}case"not_multiple_of":return`\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${r.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${r.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${r.keys.length>1?"\u0629":""}: ${L(r.keys,"\u060C ")}`;case"invalid_key":return`\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${r.origin}`;case"invalid_union":return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644";case"invalid_element":return`\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${r.origin}`;default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}},"error");function Fh(){return{localeError:Dz()}}a(Fh,"default");var Uz=a(()=>{let e={string:{unit:"simvol",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"element",verb:"olmal\u0131d\u0131r"},set:{unit:"element",verb:"olmal\u0131d\u0131r"}};function t(r){return e[r]??null}a(t,"getSizing");let n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},o={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=Q(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${r.expected}, daxil olan ${u}`:`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${i}, daxil olan ${u}`}case"invalid_value":return r.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${K(r.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${r.origin??"d\u0259y\u0259r"} ${i}${r.maximum.toString()} ${s.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${r.origin??"d\u0259y\u0259r"} ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${r.origin} ${i}${r.minimum.toString()} ${s.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${r.origin} ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${i.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:i.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${i.suffix}" il\u0259 bitm\u0259lidir`:i.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${i.includes}" daxil olmal\u0131d\u0131r`:i.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${i.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${n[i.format]??r.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${r.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${r.keys.length>1?"lar":""}: ${L(r.keys,", ")}`;case"invalid_key":return`${r.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${r.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}},"error");function Bh(){return{localeError:Uz()}}a(Bh,"default");function NP(e,t,n,o){let r=Math.abs(e),i=r%10,s=r%100;return s>=11&&s<=19?o:i===1?t:i>=2&&i<=4?n:o}a(NP,"getBelarusianPlural");var jz=a(()=>{let e={string:{unit:{one:"\u0441\u0456\u043C\u0432\u0430\u043B",few:"\u0441\u0456\u043C\u0432\u0430\u043B\u044B",many:"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function t(r){return e[r]??null}a(t,"getSizing");let n={regex:"\u0443\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0430\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0447\u0430\u0441",duration:"ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0430\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0430\u0441",cidrv4:"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",base64:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64",base64url:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url",json_string:"JSON \u0440\u0430\u0434\u043E\u043A",e164:"\u043D\u0443\u043C\u0430\u0440 E.164",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"},o={nan:"NaN",number:"\u043B\u0456\u043A",array:"\u043C\u0430\u0441\u0456\u045E"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=Q(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${r.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${u}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${i}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${u}`}case"invalid_value":return r.values.length===1?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${K(r.values[0])}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);if(s){let u=Number(r.maximum),d=NP(u,s.unit.one,s.unit.few,s.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${s.verb} ${i}${r.maximum.toString()} ${d}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);if(s){let u=Number(r.minimum),d=NP(u,s.unit.one,s.unit.few,s.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${s.verb} ${i}${r.minimum.toString()} ${d}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${i.includes}"`:i.format==="regex"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${n[i.format]??r.format}`}case"not_multiple_of":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${r.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${L(r.keys,", ")}`;case"invalid_key":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${r.origin}`;case"invalid_union":return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434";case"invalid_element":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${r.origin}`;default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}},"error");function qh(){return{localeError:jz()}}a(qh,"default");var Mz=a(()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},file:{unit:"\u0431\u0430\u0439\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"}};function t(r){return e[r]??null}a(t,"getSizing");let n={regex:"\u0432\u0445\u043E\u0434",email:"\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0436\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",base64url:"base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",json_string:"JSON \u043D\u0438\u0437",e164:"E.164 \u043D\u043E\u043C\u0435\u0440",jwt:"JWT",template_literal:"\u0432\u0445\u043E\u0434"},o={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=Q(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${r.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${u}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${i}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${u}`}case"invalid_value":return r.values.length===1?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${K(r.values[0])}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${i}${r.maximum.toString()} ${s.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430"}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${i}${r.minimum.toString()} ${s.unit}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 "${i.prefix}"`;if(i.format==="ends_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 "${i.suffix}"`;if(i.format==="includes")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 "${i.includes}"`;if(i.format==="regex")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${i.pattern}`;let s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return i.format==="emoji"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="datetime"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="date"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),i.format==="time"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="duration"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${s} ${n[i.format]??r.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E \u0447\u0438\u0441\u043B\u043E: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043A\u0440\u0430\u0442\u043D\u043E \u043D\u0430 ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${r.keys.length>1?"\u0438":""} \u043A\u043B\u044E\u0447${r.keys.length>1?"\u043E\u0432\u0435":""}: ${L(r.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${r.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434";case"invalid_element":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442 \u0432 ${r.origin}`;default:return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"}}},"error");function Vh(){return{localeError:Mz()}}a(Vh,"default");var Lz=a(()=>{let e={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function t(r){return e[r]??null}a(t,"getSizing");let n={regex:"entrada",email:"adre\xE7a electr\xF2nica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adre\xE7a IPv4",ipv6:"adre\xE7a IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},o={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=Q(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`Tipus inv\xE0lid: s'esperava instanceof ${r.expected}, s'ha rebut ${u}`:`Tipus inv\xE0lid: s'esperava ${i}, s'ha rebut ${u}`}case"invalid_value":return r.values.length===1?`Valor inv\xE0lid: s'esperava ${K(r.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${L(r.values," o ")}`;case"too_big":{let i=r.inclusive?"com a m\xE0xim":"menys de",s=t(r.origin);return s?`Massa gran: s'esperava que ${r.origin??"el valor"} contingu\xE9s ${i} ${r.maximum.toString()} ${s.unit??"elements"}`:`Massa gran: s'esperava que ${r.origin??"el valor"} fos ${i} ${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?"com a m\xEDnim":"m\xE9s de",s=t(r.origin);return s?`Massa petit: s'esperava que ${r.origin} contingu\xE9s ${i} ${r.minimum.toString()} ${s.unit}`:`Massa petit: s'esperava que ${r.origin} fos ${i} ${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${i.prefix}"`:i.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${i.suffix}"`:i.format==="includes"?`Format inv\xE0lid: ha d'incloure "${i.includes}"`:i.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${i.pattern}`:`Format inv\xE0lid per a ${n[i.format]??r.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${r.divisor}`;case"unrecognized_keys":return`Clau${r.keys.length>1?"s":""} no reconeguda${r.keys.length>1?"s":""}: ${L(r.keys,", ")}`;case"invalid_key":return`Clau inv\xE0lida a ${r.origin}`;case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return`Element inv\xE0lid a ${r.origin}`;default:return"Entrada inv\xE0lida"}}},"error");function Zh(){return{localeError:Lz()}}a(Zh,"default");var Fz=a(()=>{let e={string:{unit:"znak\u016F",verb:"m\xEDt"},file:{unit:"bajt\u016F",verb:"m\xEDt"},array:{unit:"prvk\u016F",verb:"m\xEDt"},set:{unit:"prvk\u016F",verb:"m\xEDt"}};function t(r){return e[r]??null}a(t,"getSizing");let n={regex:"regul\xE1rn\xED v\xFDraz",email:"e-mailov\xE1 adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a \u010Das ve form\xE1tu ISO",date:"datum ve form\xE1tu ISO",time:"\u010Das ve form\xE1tu ISO",duration:"doba trv\xE1n\xED ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64",base64url:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url",json_string:"\u0159et\u011Bzec ve form\xE1tu JSON",e164:"\u010D\xEDslo E.164",jwt:"JWT",template_literal:"vstup"},o={nan:"NaN",number:"\u010D\xEDslo",string:"\u0159et\u011Bzec",function:"funkce",array:"pole"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=Q(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${r.expected}, obdr\u017Eeno ${u}`:`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${i}, obdr\u017Eeno ${u}`}case"invalid_value":return r.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${K(r.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${r.origin??"hodnota"} mus\xED m\xEDt ${i}${r.maximum.toString()} ${s.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${r.origin??"hodnota"} mus\xED b\xFDt ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${r.origin??"hodnota"} mus\xED m\xEDt ${i}${r.minimum.toString()} ${s.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${r.origin??"hodnota"} mus\xED b\xFDt ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${i.prefix}"`:i.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${i.suffix}"`:i.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${i.includes}"`:i.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${i.pattern}`:`Neplatn\xFD form\xE1t ${n[i.format]??r.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${r.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${L(r.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xED\u010D v ${r.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${r.origin}`;default:return"Neplatn\xFD vstup"}}},"error");function Hh(){return{localeError:Fz()}}a(Hh,"default");var Bz=a(()=>{let e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function t(r){return e[r]??null}a(t,"getSizing");let n={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkesl\xE6t",date:"ISO-dato",time:"ISO-klokkesl\xE6t",duration:"ISO-varighed",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},o={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=Q(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`Ugyldigt input: forventede instanceof ${r.expected}, fik ${u}`:`Ugyldigt input: forventede ${i}, fik ${u}`}case"invalid_value":return r.values.length===1?`Ugyldig v\xE6rdi: forventede ${K(r.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin),u=o[r.origin]??r.origin;return s?`For stor: forventede ${u??"value"} ${s.verb} ${i} ${r.maximum.toString()} ${s.unit??"elementer"}`:`For stor: forventede ${u??"value"} havde ${i} ${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin),u=o[r.origin]??r.origin;return s?`For lille: forventede ${u} ${s.verb} ${i} ${r.minimum.toString()} ${s.unit}`:`For lille: forventede ${u} havde ${i} ${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Ugyldig streng: skal starte med "${i.prefix}"`:i.format==="ends_with"?`Ugyldig streng: skal ende med "${i.suffix}"`:i.format==="includes"?`Ugyldig streng: skal indeholde "${i.includes}"`:i.format==="regex"?`Ugyldig streng: skal matche m\xF8nsteret ${i.pattern}`:`Ugyldig ${n[i.format]??r.format}`}case"not_multiple_of":return`Ugyldigt tal: skal v\xE6re deleligt med ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${L(r.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8gle i ${r.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig v\xE6rdi i ${r.origin}`;default:return"Ugyldigt input"}}},"error");function Gh(){return{localeError:Bz()}}a(Gh,"default");var qz=a(()=>{let e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function t(r){return e[r]??null}a(t,"getSizing");let n={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"},o={nan:"NaN",number:"Zahl",array:"Array"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=Q(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${r.expected}, erhalten ${u}`:`Ung\xFCltige Eingabe: erwartet ${i}, erhalten ${u}`}case"invalid_value":return r.values.length===1?`Ung\xFCltige Eingabe: erwartet ${K(r.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`Zu gro\xDF: erwartet, dass ${r.origin??"Wert"} ${i}${r.maximum.toString()} ${s.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${r.origin??"Wert"} ${i}${r.maximum.toString()} ist`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`Zu klein: erwartet, dass ${r.origin} ${i}${r.minimum.toString()} ${s.unit} hat`:`Zu klein: erwartet, dass ${r.origin} ${i}${r.minimum.toString()} ist`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Ung\xFCltiger String: muss mit "${i.prefix}" beginnen`:i.format==="ends_with"?`Ung\xFCltiger String: muss mit "${i.suffix}" enden`:i.format==="includes"?`Ung\xFCltiger String: muss "${i.includes}" enthalten`:i.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${i.pattern} entsprechen`:`Ung\xFCltig: ${n[i.format]??r.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${r.divisor} sein`;case"unrecognized_keys":return`${r.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${L(r.keys,", ")}`;case"invalid_key":return`Ung\xFCltiger Schl\xFCssel in ${r.origin}`;case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return`Ung\xFCltiger Wert in ${r.origin}`;default:return"Ung\xFCltige Eingabe"}}},"error");function Wh(){return{localeError:qz()}}a(Wh,"default");var Vz=a(()=>{let e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function t(r){return e[r]??null}a(t,"getSizing");let n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},o={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=Q(r.input),u=o[s]??s;return`Invalid input: expected ${i}, received ${u}`}case"invalid_value":return r.values.length===1?`Invalid input: expected ${K(r.values[0])}`:`Invalid option: expected one of ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`Too big: expected ${r.origin??"value"} to have ${i}${r.maximum.toString()} ${s.unit??"elements"}`:`Too big: expected ${r.origin??"value"} to be ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`Too small: expected ${r.origin} to have ${i}${r.minimum.toString()} ${s.unit}`:`Too small: expected ${r.origin} to be ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Invalid string: must start with "${i.prefix}"`:i.format==="ends_with"?`Invalid string: must end with "${i.suffix}"`:i.format==="includes"?`Invalid string: must include "${i.includes}"`:i.format==="regex"?`Invalid string: must match pattern ${i.pattern}`:`Invalid ${n[i.format]??r.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${r.divisor}`;case"unrecognized_keys":return`Unrecognized key${r.keys.length>1?"s":""}: ${L(r.keys,", ")}`;case"invalid_key":return`Invalid key in ${r.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${r.origin}`;default:return"Invalid input"}}},"error");function vs(){return{localeError:Vz()}}a(vs,"default");var Zz=a(()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(r){return e[r]??null}a(t,"getSizing");let n={regex:"enigo",email:"retadreso",url:"URL",emoji:"emo\u011Dio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-da\u016Dro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"},o={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=Q(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${r.expected}, ricevi\u011Dis ${u}`:`Nevalida enigo: atendi\u011Dis ${i}, ricevi\u011Dis ${u}`}case"invalid_value":return r.values.length===1?`Nevalida enigo: atendi\u011Dis ${K(r.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`Tro granda: atendi\u011Dis ke ${r.origin??"valoro"} havu ${i}${r.maximum.toString()} ${s.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${r.origin??"valoro"} havu ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`Tro malgranda: atendi\u011Dis ke ${r.origin} havu ${i}${r.minimum.toString()} ${s.unit}`:`Tro malgranda: atendi\u011Dis ke ${r.origin} estu ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${i.prefix}"`:i.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${i.suffix}"`:i.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${i.includes}"`:i.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${i.pattern}`:`Nevalida ${n[i.format]??r.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${r.divisor}`;case"unrecognized_keys":return`Nekonata${r.keys.length>1?"j":""} \u015Dlosilo${r.keys.length>1?"j":""}: ${L(r.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${r.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${r.origin}`;default:return"Nevalida enigo"}}},"error");function Jh(){return{localeError:Zz()}}a(Jh,"default");var Hz=a(()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function t(r){return e[r]??null}a(t,"getSizing");let n={regex:"entrada",email:"direcci\xF3n de correo electr\xF3nico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duraci\xF3n ISO",ipv4:"direcci\xF3n IPv4",ipv6:"direcci\xF3n IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},o={nan:"NaN",string:"texto",number:"n\xFAmero",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"n\xFAmero grande",symbol:"s\xEDmbolo",undefined:"indefinido",null:"nulo",function:"funci\xF3n",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeraci\xF3n",union:"uni\xF3n",literal:"literal",promise:"promesa",void:"vac\xEDo",never:"nunca",unknown:"desconocido",any:"cualquiera"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=Q(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${r.expected}, recibido ${u}`:`Entrada inv\xE1lida: se esperaba ${i}, recibido ${u}`}case"invalid_value":return r.values.length===1?`Entrada inv\xE1lida: se esperaba ${K(r.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin),u=o[r.origin]??r.origin;return s?`Demasiado grande: se esperaba que ${u??"valor"} tuviera ${i}${r.maximum.toString()} ${s.unit??"elementos"}`:`Demasiado grande: se esperaba que ${u??"valor"} fuera ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin),u=o[r.origin]??r.origin;return s?`Demasiado peque\xF1o: se esperaba que ${u} tuviera ${i}${r.minimum.toString()} ${s.unit}`:`Demasiado peque\xF1o: se esperaba que ${u} fuera ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${i.prefix}"`:i.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${i.suffix}"`:i.format==="includes"?`Cadena inv\xE1lida: debe incluir "${i.includes}"`:i.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${i.pattern}`:`Inv\xE1lido ${n[i.format]??r.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${r.divisor}`;case"unrecognized_keys":return`Llave${r.keys.length>1?"s":""} desconocida${r.keys.length>1?"s":""}: ${L(r.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${o[r.origin]??r.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${o[r.origin]??r.origin}`;default:return"Entrada inv\xE1lida"}}},"error");function Kh(){return{localeError:Hz()}}a(Kh,"default");var Gz=a(()=>{let e={string:{unit:"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},array:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},set:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function t(r){return e[r]??null}a(t,"getSizing");let n={regex:"\u0648\u0631\u0648\u062F\u06CC",email:"\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644",url:"URL",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",date:"\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648",time:"\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",duration:"\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",ipv4:"IPv4 \u0622\u062F\u0631\u0633",ipv6:"IPv6 \u0622\u062F\u0631\u0633",cidrv4:"IPv4 \u062F\u0627\u0645\u0646\u0647",cidrv6:"IPv6 \u062F\u0627\u0645\u0646\u0647",base64:"base64-encoded \u0631\u0634\u062A\u0647",base64url:"base64url-encoded \u0631\u0634\u062A\u0647",json_string:"JSON \u0631\u0634\u062A\u0647",e164:"E.164 \u0639\u062F\u062F",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"},o={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0622\u0631\u0627\u06CC\u0647"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=Q(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${r.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${u} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`:`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${i} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${u} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`}case"invalid_value":return r.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${K(r.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`:`\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${L(r.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${r.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${i}${r.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${r.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${i}${r.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${r.origin} \u0628\u0627\u06CC\u062F ${i}${r.minimum.toString()} ${s.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${r.origin} \u0628\u0627\u06CC\u062F ${i}${r.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${i.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:i.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${i.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:i.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${i.includes}" \u0628\u0627\u0634\u062F`:i.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${i.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${n[i.format]??r.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`}case"not_multiple_of":return`\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${r.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${r.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${L(r.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${r.origin}`;case"invalid_union":return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631";case"invalid_element":return`\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${r.origin}`;default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}},"error");function Xh(){return{localeError:Gz()}}a(Xh,"default");var Wz=a(()=>{let e={string:{unit:"merkki\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\xE4iv\xE4m\xE4\xE4r\xE4n"}};function t(r){return e[r]??null}a(t,"getSizing");let n={regex:"s\xE4\xE4nn\xF6llinen lauseke",email:"s\xE4hk\xF6postiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-p\xE4iv\xE4m\xE4\xE4r\xE4",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"},o={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=Q(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`Virheellinen tyyppi: odotettiin instanceof ${r.expected}, oli ${u}`:`Virheellinen tyyppi: odotettiin ${i}, oli ${u}`}case"invalid_value":return r.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${K(r.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`Liian suuri: ${s.subject} t\xE4ytyy olla ${i}${r.maximum.toString()} ${s.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`Liian pieni: ${s.subject} t\xE4ytyy olla ${i}${r.minimum.toString()} ${s.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${i.prefix}"`:i.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${i.suffix}"`:i.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${i.includes}"`:i.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${i.pattern}`:`Virheellinen ${n[i.format]??r.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${r.divisor} monikerta`;case"unrecognized_keys":return`${r.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${L(r.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen sy\xF6te"}}},"error");function Qh(){return{localeError:Wz()}}a(Qh,"default");var Jz=a(()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(r){return e[r]??null}a(t,"getSizing");let n={regex:"entr\xE9e",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},o={nan:"NaN",number:"nombre",array:"tableau"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=Q(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`Entr\xE9e invalide : instanceof ${r.expected} attendu, ${u} re\xE7u`:`Entr\xE9e invalide : ${i} attendu, ${u} re\xE7u`}case"invalid_value":return r.values.length===1?`Entr\xE9e invalide : ${K(r.values[0])} attendu`:`Option invalide : une valeur parmi ${L(r.values,"|")} attendue`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`Trop grand : ${r.origin??"valeur"} doit ${s.verb} ${i}${r.maximum.toString()} ${s.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${r.origin??"valeur"} doit \xEAtre ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`Trop petit : ${r.origin} doit ${s.verb} ${i}${r.minimum.toString()} ${s.unit}`:`Trop petit : ${r.origin} doit \xEAtre ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Cha\xEEne invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Cha\xEEne invalide : doit correspondre au mod\xE8le ${i.pattern}`:`${n[i.format]??r.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${r.divisor}`;case"unrecognized_keys":return`Cl\xE9${r.keys.length>1?"s":""} non reconnue${r.keys.length>1?"s":""} : ${L(r.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${r.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${r.origin}`;default:return"Entr\xE9e invalide"}}},"error");function Yh(){return{localeError:Jz()}}a(Yh,"default");var Kz=a(()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(r){return e[r]??null}a(t,"getSizing");let n={regex:"entr\xE9e",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},o={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=Q(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`Entr\xE9e invalide : attendu instanceof ${r.expected}, re\xE7u ${u}`:`Entr\xE9e invalide : attendu ${i}, re\xE7u ${u}`}case"invalid_value":return r.values.length===1?`Entr\xE9e invalide : attendu ${K(r.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"\u2264":"<",s=t(r.origin);return s?`Trop grand : attendu que ${r.origin??"la valeur"} ait ${i}${r.maximum.toString()} ${s.unit}`:`Trop grand : attendu que ${r.origin??"la valeur"} soit ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?"\u2265":">",s=t(r.origin);return s?`Trop petit : attendu que ${r.origin} ait ${i}${r.minimum.toString()} ${s.unit}`:`Trop petit : attendu que ${r.origin} soit ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Cha\xEEne invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${i.pattern}`:`${n[i.format]??r.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${r.divisor}`;case"unrecognized_keys":return`Cl\xE9${r.keys.length>1?"s":""} non reconnue${r.keys.length>1?"s":""} : ${L(r.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${r.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${r.origin}`;default:return"Entr\xE9e invalide"}}},"error");function eg(){return{localeError:Kz()}}a(eg,"default");var Xz=a(()=>{let e={string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA",gender:"f"},number:{label:"\u05DE\u05E1\u05E4\u05E8",gender:"m"},boolean:{label:"\u05E2\u05E8\u05DA \u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA",gender:"m"},array:{label:"\u05DE\u05E2\u05E8\u05DA",gender:"m"},object:{label:"\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8",gender:"m"},null:{label:"\u05E2\u05E8\u05DA \u05E8\u05D9\u05E7 (null)",gender:"m"},undefined:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05DE\u05D5\u05D2\u05D3\u05E8 (undefined)",gender:"m"},symbol:{label:"\u05E1\u05D9\u05DE\u05D1\u05D5\u05DC (Symbol)",gender:"m"},function:{label:"\u05E4\u05D5\u05E0\u05E7\u05E6\u05D9\u05D4",gender:"f"},map:{label:"\u05DE\u05E4\u05D4 (Map)",gender:"f"},set:{label:"\u05E7\u05D1\u05D5\u05E6\u05D4 (Set)",gender:"f"},file:{label:"\u05E7\u05D5\u05D1\u05E5",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05D9\u05D3\u05D5\u05E2",gender:"m"},value:{label:"\u05E2\u05E8\u05DA",gender:"m"}},t={string:{unit:"\u05EA\u05D5\u05D5\u05D9\u05DD",shortLabel:"\u05E7\u05E6\u05E8",longLabel:"\u05D0\u05E8\u05D5\u05DA"},file:{unit:"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},array:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},set:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},number:{unit:"",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"}},n=a(p=>p?e[p]:void 0,"typeEntry"),o=a(p=>{let f=n(p);return f?f.label:p??e.unknown.label},"typeLabel"),r=a(p=>`\u05D4${o(p)}`,"withDefinite"),i=a(p=>(n(p)?.gender??"m")==="f"?"\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA":"\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA","verbFor"),s=a(p=>p?t[p]??null:null,"getSizing"),u={regex:{label:"\u05E7\u05DC\u05D8",gender:"m"},email:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",gender:"f"},url:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA",gender:"f"},emoji:{label:"\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9",gender:"m"},uuid:{label:"UUID",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA ISO",gender:"m"},time:{label:"\u05D6\u05DE\u05DF ISO",gender:"m"},duration:{label:"\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO",gender:"m"},ipv4:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv4",gender:"f"},ipv6:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv6",gender:"f"},cidrv4:{label:"\u05D8\u05D5\u05D5\u05D7 IPv4",gender:"m"},cidrv6:{label:"\u05D8\u05D5\u05D5\u05D7 IPv6",gender:"m"},base64:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64",gender:"f"},base64url:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA",gender:"f"},json_string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON",gender:"f"},e164:{label:"\u05DE\u05E1\u05E4\u05E8 E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},includes:{label:"\u05E7\u05DC\u05D8",gender:"m"},lowercase:{label:"\u05E7\u05DC\u05D8",gender:"m"},starts_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},uppercase:{label:"\u05E7\u05DC\u05D8",gender:"m"}},d={nan:"NaN"};return p=>{switch(p.code){case"invalid_type":{let f=p.expected,g=d[f??""]??o(f),y=Q(p.input),h=d[y]??e[y]?.label??y;return/^[A-Z]/.test(p.expected)?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${p.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${h}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${g}, \u05D4\u05EA\u05E7\u05D1\u05DC ${h}`}case"invalid_value":{if(p.values.length===1)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05E2\u05E8\u05DA \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA ${K(p.values[0])}`;let f=p.values.map(h=>K(h));if(p.values.length===2)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${f[0]} \u05D0\u05D5 ${f[1]}`;let g=f[f.length-1];return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${f.slice(0,-1).join(", ")} \u05D0\u05D5 ${g}`}case"too_big":{let f=s(p.origin),g=r(p.origin??"value");if(p.origin==="string")return`${f?.longLabel??"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${g} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${p.maximum.toString()} ${f?.unit??""} ${p.inclusive?"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA":"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();if(p.origin==="number"){let _=p.inclusive?`\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${p.maximum}`:`\u05E7\u05D8\u05DF \u05DE-${p.maximum}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${g} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${_}`}if(p.origin==="array"||p.origin==="set"){let _=p.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",P=p.inclusive?`${p.maximum} ${f?.unit??""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`:`\u05E4\u05D7\u05D5\u05EA \u05DE-${p.maximum} ${f?.unit??""}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${g} ${_} \u05DC\u05D4\u05DB\u05D9\u05DC ${P}`.trim()}let y=p.inclusive?"<=":"<",h=i(p.origin??"value");return f?.unit?`${f.longLabel} \u05DE\u05D3\u05D9: ${g} ${h} ${y}${p.maximum.toString()} ${f.unit}`:`${f?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${g} ${h} ${y}${p.maximum.toString()}`}case"too_small":{let f=s(p.origin),g=r(p.origin??"value");if(p.origin==="string")return`${f?.shortLabel??"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${g} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${p.minimum.toString()} ${f?.unit??""} ${p.inclusive?"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8":"\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();if(p.origin==="number"){let _=p.inclusive?`\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${p.minimum}`:`\u05D2\u05D3\u05D5\u05DC \u05DE-${p.minimum}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${g} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${_}`}if(p.origin==="array"||p.origin==="set"){let _=p.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(p.minimum===1&&p.inclusive){let x=(p.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${g} ${_} \u05DC\u05D4\u05DB\u05D9\u05DC ${x}`}let P=p.inclusive?`${p.minimum} ${f?.unit??""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`:`\u05D9\u05D5\u05EA\u05E8 \u05DE-${p.minimum} ${f?.unit??""}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${g} ${_} \u05DC\u05D4\u05DB\u05D9\u05DC ${P}`.trim()}let y=p.inclusive?">=":">",h=i(p.origin??"value");return f?.unit?`${f.shortLabel} \u05DE\u05D3\u05D9: ${g} ${h} ${y}${p.minimum.toString()} ${f.unit}`:`${f?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${g} ${h} ${y}${p.minimum.toString()}`}case"invalid_format":{let f=p;if(f.format==="starts_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${f.prefix}"`;if(f.format==="ends_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${f.suffix}"`;if(f.format==="includes")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${f.includes}"`;if(f.format==="regex")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${f.pattern}`;let g=u[f.format],y=g?.label??f.format,_=(g?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${y} \u05DC\u05D0 ${_}`}case"not_multiple_of":return`\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${p.divisor}`;case"unrecognized_keys":return`\u05DE\u05E4\u05EA\u05D7${p.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${p.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${L(p.keys,", ")}`;case"invalid_key":return"\u05E9\u05D3\u05D4 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8";case"invalid_union":return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF";case"invalid_element":return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${r(p.origin??"array")}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}},"error");function tg(){return{localeError:Xz()}}a(tg,"default");var Qz=a(()=>{let e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(r){return e[r]??null}a(t,"getSizing");let n={regex:"bemenet",email:"email c\xEDm",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO id\u0151b\xE9lyeg",date:"ISO d\xE1tum",time:"ISO id\u0151",duration:"ISO id\u0151intervallum",ipv4:"IPv4 c\xEDm",ipv6:"IPv6 c\xEDm",cidrv4:"IPv4 tartom\xE1ny",cidrv6:"IPv6 tartom\xE1ny",base64:"base64-k\xF3dolt string",base64url:"base64url-k\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\xE1m",jwt:"JWT",template_literal:"bemenet"},o={nan:"NaN",number:"sz\xE1m",array:"t\xF6mb"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=Q(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${r.expected}, a kapott \xE9rt\xE9k ${u}`:`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${i}, a kapott \xE9rt\xE9k ${u}`}case"invalid_value":return r.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${K(r.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`T\xFAl nagy: ${r.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${i}${r.maximum.toString()} ${s.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${r.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${r.origin} m\xE9rete t\xFAl kicsi ${i}${r.minimum.toString()} ${s.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${r.origin} t\xFAl kicsi ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\xC9rv\xE9nytelen string: "${i.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:i.format==="ends_with"?`\xC9rv\xE9nytelen string: "${i.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:i.format==="includes"?`\xC9rv\xE9nytelen string: "${i.includes}" \xE9rt\xE9ket kell tartalmaznia`:i.format==="regex"?`\xC9rv\xE9nytelen string: ${i.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${n[i.format]??r.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${r.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${r.keys.length>1?"s":""}: ${L(r.keys,", ")}`;case"invalid_key":return`\xC9rv\xE9nytelen kulcs ${r.origin}`;case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return`\xC9rv\xE9nytelen \xE9rt\xE9k: ${r.origin}`;default:return"\xC9rv\xE9nytelen bemenet"}}},"error");function rg(){return{localeError:Qz()}}a(rg,"default");function DP(e,t,n){return Math.abs(e)===1?t:n}a(DP,"getArmenianPlural");function Ui(e){if(!e)return"";let t=["\u0561","\u0565","\u0568","\u056B","\u0578","\u0578\u0582","\u0585"],n=e[e.length-1];return e+(t.includes(n)?"\u0576":"\u0568")}a(Ui,"withDefiniteArticle");var Yz=a(()=>{let e={string:{unit:{one:"\u0576\u0577\u0561\u0576",many:"\u0576\u0577\u0561\u0576\u0576\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},file:{unit:{one:"\u0562\u0561\u0575\u0569",many:"\u0562\u0561\u0575\u0569\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},array:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},set:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"}};function t(r){return e[r]??null}a(t,"getSizing");let n={regex:"\u0574\u0578\u0582\u057F\u0584",email:"\u0567\u056C. \u0570\u0561\u057D\u0581\u0565",url:"URL",emoji:"\u0567\u0574\u0578\u057B\u056B",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E \u0587 \u056A\u0561\u0574",date:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E",time:"ISO \u056A\u0561\u0574",duration:"ISO \u057F\u0587\u0578\u0572\u0578\u0582\u0569\u0575\u0578\u0582\u0576",ipv4:"IPv4 \u0570\u0561\u057D\u0581\u0565",ipv6:"IPv6 \u0570\u0561\u057D\u0581\u0565",cidrv4:"IPv4 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",cidrv6:"IPv6 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",base64:"base64 \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",base64url:"base64url \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",json_string:"JSON \u057F\u0578\u0572",e164:"E.164 \u0570\u0561\u0574\u0561\u0580",jwt:"JWT",template_literal:"\u0574\u0578\u0582\u057F\u0584"},o={nan:"NaN",number:"\u0569\u056B\u057E",array:"\u0566\u0561\u0576\u0563\u057E\u0561\u056E"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=Q(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 instanceof ${r.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${u}`:`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${i}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${u}`}case"invalid_value":return r.values.length===1?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${K(r.values[1])}`:`\u054D\u056D\u0561\u056C \u057F\u0561\u0580\u0562\u0565\u0580\u0561\u056F\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 \u0570\u0565\u057F\u0587\u0575\u0561\u056C\u0576\u0565\u0580\u056B\u0581 \u0574\u0565\u056F\u0568\u055D ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);if(s){let u=Number(r.maximum),d=DP(u,s.unit.one,s.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Ui(r.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${i}${r.maximum.toString()} ${d}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Ui(r.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);if(s){let u=Number(r.minimum),d=DP(u,s.unit.one,s.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Ui(r.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${i}${r.minimum.toString()} ${d}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Ui(r.origin)} \u056C\u056B\u0576\u056B ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${i.prefix}"-\u0578\u057E`:i.format==="ends_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${i.suffix}"-\u0578\u057E`:i.format==="includes"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${i.includes}"`:i.format==="regex"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0570\u0561\u0574\u0561\u057A\u0561\u057F\u0561\u057D\u056D\u0561\u0576\u056B ${i.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`:`\u054D\u056D\u0561\u056C ${n[i.format]??r.format}`}case"not_multiple_of":return`\u054D\u056D\u0561\u056C \u0569\u056B\u057E\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0562\u0561\u0566\u0574\u0561\u057A\u0561\u057F\u056B\u056F \u056C\u056B\u0576\u056B ${r.divisor}-\u056B`;case"unrecognized_keys":return`\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${r.keys.length>1?"\u0576\u0565\u0580":""}. ${L(r.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${Ui(r.origin)}-\u0578\u0582\u0574`;case"invalid_union":return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574";case"invalid_element":return`\u054D\u056D\u0561\u056C \u0561\u0580\u056A\u0565\u0584 ${Ui(r.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}},"error");function ng(){return{localeError:Yz()}}a(ng,"default");var eN=a(()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(r){return e[r]??null}a(t,"getSizing");let n={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"},o={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=Q(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`Input tidak valid: diharapkan instanceof ${r.expected}, diterima ${u}`:`Input tidak valid: diharapkan ${i}, diterima ${u}`}case"invalid_value":return r.values.length===1?`Input tidak valid: diharapkan ${K(r.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`Terlalu besar: diharapkan ${r.origin??"value"} memiliki ${i}${r.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: diharapkan ${r.origin??"value"} menjadi ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`Terlalu kecil: diharapkan ${r.origin} memiliki ${i}${r.minimum.toString()} ${s.unit}`:`Terlalu kecil: diharapkan ${r.origin} menjadi ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`String tidak valid: harus dimulai dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak valid: harus berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak valid: harus menyertakan "${i.includes}"`:i.format==="regex"?`String tidak valid: harus sesuai pola ${i.pattern}`:`${n[i.format]??r.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${r.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${r.keys.length>1?"s":""}: ${L(r.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${r.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${r.origin}`;default:return"Input tidak valid"}}},"error");function og(){return{localeError:eN()}}a(og,"default");var tN=a(()=>{let e={string:{unit:"stafi",verb:"a\xF0 hafa"},file:{unit:"b\xE6ti",verb:"a\xF0 hafa"},array:{unit:"hluti",verb:"a\xF0 hafa"},set:{unit:"hluti",verb:"a\xF0 hafa"}};function t(r){return e[r]??null}a(t,"getSizing");let n={regex:"gildi",email:"netfang",url:"vefsl\xF3\xF0",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og t\xEDmi",date:"ISO dagsetning",time:"ISO t\xEDmi",duration:"ISO t\xEDmalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 t\xF6lugildi",jwt:"JWT",template_literal:"gildi"},o={nan:"NaN",number:"n\xFAmer",array:"fylki"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=Q(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`Rangt gildi: \xDE\xFA sl\xF3st inn ${u} \xFEar sem \xE1 a\xF0 vera instanceof ${r.expected}`:`Rangt gildi: \xDE\xFA sl\xF3st inn ${u} \xFEar sem \xE1 a\xF0 vera ${i}`}case"invalid_value":return r.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${K(r.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin??"gildi"} hafi ${i}${r.maximum.toString()} ${s.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin??"gildi"} s\xE9 ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin} hafi ${i}${r.minimum.toString()} ${s.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin} s\xE9 ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${i.prefix}"`:i.format==="ends_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${i.suffix}"`:i.format==="includes"?`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${i.includes}"`:i.format==="regex"?`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${i.pattern}`:`Rangt ${n[i.format]??r.format}`}case"not_multiple_of":return`R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${r.divisor}`;case"unrecognized_keys":return`\xD3\xFEekkt ${r.keys.length>1?"ir lyklar":"ur lykill"}: ${L(r.keys,", ")}`;case"invalid_key":return`Rangur lykill \xED ${r.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi \xED ${r.origin}`;default:return"Rangt gildi"}}},"error");function ig(){return{localeError:tN()}}a(ig,"default");var rN=a(()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(r){return e[r]??null}a(t,"getSizing");let n={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"},o={nan:"NaN",number:"numero",array:"vettore"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=Q(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`Input non valido: atteso instanceof ${r.expected}, ricevuto ${u}`:`Input non valido: atteso ${i}, ricevuto ${u}`}case"invalid_value":return r.values.length===1?`Input non valido: atteso ${K(r.values[0])}`:`Opzione non valida: atteso uno tra ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`Troppo grande: ${r.origin??"valore"} deve avere ${i}${r.maximum.toString()} ${s.unit??"elementi"}`:`Troppo grande: ${r.origin??"valore"} deve essere ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`Troppo piccolo: ${r.origin} deve avere ${i}${r.minimum.toString()} ${s.unit}`:`Troppo piccolo: ${r.origin} deve essere ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Stringa non valida: deve iniziare con "${i.prefix}"`:i.format==="ends_with"?`Stringa non valida: deve terminare con "${i.suffix}"`:i.format==="includes"?`Stringa non valida: deve includere "${i.includes}"`:i.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${i.pattern}`:`Invalid ${n[i.format]??r.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${r.divisor}`;case"unrecognized_keys":return`Chiav${r.keys.length>1?"i":"e"} non riconosciut${r.keys.length>1?"e":"a"}: ${L(r.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${r.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${r.origin}`;default:return"Input non valido"}}},"error");function ag(){return{localeError:rN()}}a(ag,"default");var nN=a(()=>{let e={string:{unit:"\u6587\u5B57",verb:"\u3067\u3042\u308B"},file:{unit:"\u30D0\u30A4\u30C8",verb:"\u3067\u3042\u308B"},array:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},set:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function t(r){return e[r]??null}a(t,"getSizing");let n={regex:"\u5165\u529B\u5024",email:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",url:"URL",emoji:"\u7D75\u6587\u5B57",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u6642",date:"ISO\u65E5\u4ED8",time:"ISO\u6642\u523B",duration:"ISO\u671F\u9593",ipv4:"IPv4\u30A2\u30C9\u30EC\u30B9",ipv6:"IPv6\u30A2\u30C9\u30EC\u30B9",cidrv4:"IPv4\u7BC4\u56F2",cidrv6:"IPv6\u7BC4\u56F2",base64:"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",base64url:"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",json_string:"JSON\u6587\u5B57\u5217",e164:"E.164\u756A\u53F7",jwt:"JWT",template_literal:"\u5165\u529B\u5024"},o={nan:"NaN",number:"\u6570\u5024",array:"\u914D\u5217"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=Q(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`\u7121\u52B9\u306A\u5165\u529B: instanceof ${r.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${u}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u5165\u529B: ${i}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${u}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`}case"invalid_value":return r.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${K(r.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${L(r.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let i=r.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",s=t(r.origin);return s?`\u5927\u304D\u3059\u304E\u308B\u5024: ${r.origin??"\u5024"}\u306F${r.maximum.toString()}${s.unit??"\u8981\u7D20"}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${r.origin??"\u5024"}\u306F${r.maximum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let i=r.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",s=t(r.origin);return s?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${r.origin}\u306F${r.minimum.toString()}${s.unit}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${r.origin}\u306F${r.minimum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${i.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${n[i.format]??r.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${r.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"unrecognized_keys":return`\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${r.keys.length>1?"\u7FA4":""}: ${L(r.keys,"\u3001")}`;case"invalid_key":return`${r.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return`${r.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return"\u7121\u52B9\u306A\u5165\u529B"}}},"error");function sg(){return{localeError:nN()}}a(sg,"default");var oN=a(()=>{let e={string:{unit:"\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},file:{unit:"\u10D1\u10D0\u10D8\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},array:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},set:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"}};function t(r){return e[r]??null}a(t,"getSizing");let n={regex:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0",email:"\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",url:"URL",emoji:"\u10D4\u10DB\u10DD\u10EF\u10D8",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD",date:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8",time:"\u10D3\u10E0\u10DD",duration:"\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0",ipv4:"IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",ipv6:"IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",cidrv4:"IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",cidrv6:"IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",base64:"base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",json_string:"JSON \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",e164:"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"},o={nan:"NaN",number:"\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",string:"\u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",boolean:"\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",function:"\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0",array:"\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=Q(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 instanceof ${r.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${u}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${i}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${u}`}case"invalid_value":return r.values.length===1?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${K(r.values[0])}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${L(r.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${r.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${s.verb} ${i}${r.maximum.toString()} ${s.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${r.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${r.origin} ${s.verb} ${i}${r.minimum.toString()} ${s.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${r.origin} \u10D8\u10E7\u10DD\u10E1 ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${i.prefix}"-\u10D8\u10D7`:i.format==="ends_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${i.suffix}"-\u10D8\u10D7`:i.format==="includes"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${i.includes}"-\u10E1`:i.format==="regex"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${i.pattern}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${n[i.format]??r.format}`}case"not_multiple_of":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E0\u10D8\u10EA\u10EE\u10D5\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10E7\u10DD\u10E1 ${r.divisor}-\u10D8\u10E1 \u10EF\u10D4\u10E0\u10D0\u10D3\u10D8`;case"unrecognized_keys":return`\u10E3\u10EA\u10DC\u10DD\u10D1\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1${r.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${L(r.keys,", ")}`;case"invalid_key":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${r.origin}-\u10E8\u10D8`;case"invalid_union":return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0";case"invalid_element":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0 ${r.origin}-\u10E8\u10D8`;default:return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}},"error");function cg(){return{localeError:oN()}}a(cg,"default");var iN=a(()=>{let e={string:{unit:"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},file:{unit:"\u1794\u17C3",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},array:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},set:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function t(r){return e[r]??null}a(t,"getSizing");let n={regex:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B",email:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B",url:"URL",emoji:"\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO",date:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO",time:"\u1798\u17C9\u17C4\u1784 ISO",duration:"\u179A\u1799\u17C8\u1796\u17C1\u179B ISO",ipv4:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",ipv6:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",cidrv4:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",cidrv6:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",base64:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64",base64url:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url",json_string:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",e164:"\u179B\u17C1\u1781 E.164",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"},o={nan:"NaN",number:"\u179B\u17C1\u1781",array:"\u17A2\u17B6\u179A\u17C1 (Array)",null:"\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=Q(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A instanceof ${r.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${u}`:`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${i} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${u}`}case"invalid_value":return r.values.length===1?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${K(r.values[0])}`:`\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${i} ${r.maximum.toString()} ${s.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${i} ${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin} ${i} ${r.minimum.toString()} ${s.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin} ${i} ${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${i.prefix}"`:i.format==="ends_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${i.suffix}"`:i.format==="includes"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${i.includes}"`:i.format==="regex"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${i.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${n[i.format]??r.format}`}case"not_multiple_of":return`\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${r.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${L(r.keys,", ")}`;case"invalid_key":return`\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${r.origin}`;case"invalid_union":return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C";case"invalid_element":return`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${r.origin}`;default:return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C"}}},"error");function Es(){return{localeError:iN()}}a(Es,"default");function ug(){return Es()}a(ug,"default");var aN=a(()=>{let e={string:{unit:"\uBB38\uC790",verb:"to have"},file:{unit:"\uBC14\uC774\uD2B8",verb:"to have"},array:{unit:"\uAC1C",verb:"to have"},set:{unit:"\uAC1C",verb:"to have"}};function t(r){return e[r]??null}a(t,"getSizing");let n={regex:"\uC785\uB825",email:"\uC774\uBA54\uC77C \uC8FC\uC18C",url:"URL",emoji:"\uC774\uBAA8\uC9C0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \uB0A0\uC9DC\uC2DC\uAC04",date:"ISO \uB0A0\uC9DC",time:"ISO \uC2DC\uAC04",duration:"ISO \uAE30\uAC04",ipv4:"IPv4 \uC8FC\uC18C",ipv6:"IPv6 \uC8FC\uC18C",cidrv4:"IPv4 \uBC94\uC704",cidrv6:"IPv6 \uBC94\uC704",base64:"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",base64url:"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",json_string:"JSON \uBB38\uC790\uC5F4",e164:"E.164 \uBC88\uD638",jwt:"JWT",template_literal:"\uC785\uB825"},o={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=Q(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${r.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${u}\uC785\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${i}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${u}\uC785\uB2C8\uB2E4`}case"invalid_value":return r.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${K(r.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${L(r.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let i=r.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",s=i==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",u=t(r.origin),d=u?.unit??"\uC694\uC18C";return u?`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${r.maximum.toString()}${d} ${i}${s}`:`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${r.maximum.toString()} ${i}${s}`}case"too_small":{let i=r.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",s=i==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",u=t(r.origin),d=u?.unit??"\uC694\uC18C";return u?`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${r.minimum.toString()}${d} ${i}${s}`:`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${r.minimum.toString()} ${i}${s}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:i.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:i.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:i.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${i.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${n[i.format]??r.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${r.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${L(r.keys,", ")}`;case"invalid_key":return`\uC798\uBABB\uB41C \uD0A4: ${r.origin}`;case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return`\uC798\uBABB\uB41C \uAC12: ${r.origin}`;default:return"\uC798\uBABB\uB41C \uC785\uB825"}}},"error");function lg(){return{localeError:aN()}}a(lg,"default");var Ss=a(e=>e.charAt(0).toUpperCase()+e.slice(1),"capitalizeFirstCharacter");function UP(e){let t=Math.abs(e),n=t%10,o=t%100;return o>=11&&o<=19||n===0?"many":n===1?"one":"few"}a(UP,"getUnitTypeFromNumber");var sN=a(()=>{let e={string:{unit:{one:"simbolis",few:"simboliai",many:"simboli\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne ilgesn\u0117 kaip",notInclusive:"turi b\u016Bti trumpesn\u0117 kaip"},bigger:{inclusive:"turi b\u016Bti ne trumpesn\u0117 kaip",notInclusive:"turi b\u016Bti ilgesn\u0117 kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"bait\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne didesnis kaip",notInclusive:"turi b\u016Bti ma\u017Eesnis kaip"},bigger:{inclusive:"turi b\u016Bti ne ma\u017Eesnis kaip",notInclusive:"turi b\u016Bti didesnis kaip"}}},array:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}},set:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}}};function t(r,i,s,u){let d=e[r]??null;return d===null?d:{unit:d.unit[i],verb:d.verb[u][s?"inclusive":"notInclusive"]}}a(t,"getSizing");let n={regex:"\u012Fvestis",email:"el. pa\u0161to adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukm\u0117",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 u\u017Ekoduota eilut\u0117",base64url:"base64url u\u017Ekoduota eilut\u0117",json_string:"JSON eilut\u0117",e164:"E.164 numeris",jwt:"JWT",template_literal:"\u012Fvestis"},o={nan:"NaN",number:"skai\u010Dius",bigint:"sveikasis skai\u010Dius",string:"eilut\u0117",boolean:"login\u0117 reik\u0161m\u0117",undefined:"neapibr\u0117\u017Eta reik\u0161m\u0117",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulin\u0117 reik\u0161m\u0117"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=Q(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`Gautas tipas ${u}, o tik\u0117tasi - instanceof ${r.expected}`:`Gautas tipas ${u}, o tik\u0117tasi - ${i}`}case"invalid_value":return r.values.length===1?`Privalo b\u016Bti ${K(r.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${L(r.values,"|")} pasirinkim\u0173`;case"too_big":{let i=o[r.origin]??r.origin,s=t(r.origin,UP(Number(r.maximum)),r.inclusive??!1,"smaller");if(s?.verb)return`${Ss(i??r.origin??"reik\u0161m\u0117")} ${s.verb} ${r.maximum.toString()} ${s.unit??"element\u0173"}`;let u=r.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${Ss(i??r.origin??"reik\u0161m\u0117")} turi b\u016Bti ${u} ${r.maximum.toString()} ${s?.unit}`}case"too_small":{let i=o[r.origin]??r.origin,s=t(r.origin,UP(Number(r.minimum)),r.inclusive??!1,"bigger");if(s?.verb)return`${Ss(i??r.origin??"reik\u0161m\u0117")} ${s.verb} ${r.minimum.toString()} ${s.unit??"element\u0173"}`;let u=r.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${Ss(i??r.origin??"reik\u0161m\u0117")} turi b\u016Bti ${u} ${r.minimum.toString()} ${s?.unit}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Eilut\u0117 privalo prasid\u0117ti "${i.prefix}"`:i.format==="ends_with"?`Eilut\u0117 privalo pasibaigti "${i.suffix}"`:i.format==="includes"?`Eilut\u0117 privalo \u012Ftraukti "${i.includes}"`:i.format==="regex"?`Eilut\u0117 privalo atitikti ${i.pattern}`:`Neteisingas ${n[i.format]??r.format}`}case"not_multiple_of":return`Skai\u010Dius privalo b\u016Bti ${r.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpa\u017Eint${r.keys.length>1?"i":"as"} rakt${r.keys.length>1?"ai":"as"}: ${L(r.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{let i=o[r.origin]??r.origin;return`${Ss(i??r.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}},"error");function dg(){return{localeError:sN()}}a(dg,"default");var cN=a(()=>{let e={string:{unit:"\u0437\u043D\u0430\u0446\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},file:{unit:"\u0431\u0430\u0458\u0442\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},array:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},set:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function t(r){return e[r]??null}a(t,"getSizing");let n={regex:"\u0432\u043D\u0435\u0441",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430",url:"URL",emoji:"\u0435\u043C\u043E\u045F\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0443\u043C",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441\u0430",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441\u0430",cidrv4:"IPv4 \u043E\u043F\u0441\u0435\u0433",cidrv6:"IPv6 \u043E\u043F\u0441\u0435\u0433",base64:"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",base64url:"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",json_string:"JSON \u043D\u0438\u0437\u0430",e164:"E.164 \u0431\u0440\u043E\u0458",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"},o={nan:"NaN",number:"\u0431\u0440\u043E\u0458",array:"\u043D\u0438\u0437\u0430"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=Q(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${r.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${u}`:`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${i}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${u}`}case"invalid_value":return r.values.length===1?`Invalid input: expected ${K(r.values[0])}`:`\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${i}${r.maximum.toString()} ${s.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin} \u0434\u0430 \u0438\u043C\u0430 ${i}${r.minimum.toString()} ${s.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${i.pattern}`:`Invalid ${n[i.format]??r.format}`}case"not_multiple_of":return`\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438":"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${L(r.keys,", ")}`;case"invalid_key":return`\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${r.origin}`;case"invalid_union":return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441";case"invalid_element":return`\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${r.origin}`;default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}},"error");function pg(){return{localeError:cN()}}a(pg,"default");var uN=a(()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(r){return e[r]??null}a(t,"getSizing");let n={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"},o={nan:"NaN",number:"nombor"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=Q(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`Input tidak sah: dijangka instanceof ${r.expected}, diterima ${u}`:`Input tidak sah: dijangka ${i}, diterima ${u}`}case"invalid_value":return r.values.length===1?`Input tidak sah: dijangka ${K(r.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`Terlalu besar: dijangka ${r.origin??"nilai"} ${s.verb} ${i}${r.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: dijangka ${r.origin??"nilai"} adalah ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`Terlalu kecil: dijangka ${r.origin} ${s.verb} ${i}${r.minimum.toString()} ${s.unit}`:`Terlalu kecil: dijangka ${r.origin} adalah ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`String tidak sah: mesti bermula dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak sah: mesti mengandungi "${i.includes}"`:i.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${i.pattern}`:`${n[i.format]??r.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${r.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${L(r.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${r.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${r.origin}`;default:return"Input tidak sah"}}},"error");function fg(){return{localeError:uN()}}a(fg,"default");var lN=a(()=>{let e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function t(r){return e[r]??null}a(t,"getSizing");let n={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"},o={nan:"NaN",number:"getal"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=Q(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`Ongeldige invoer: verwacht instanceof ${r.expected}, ontving ${u}`:`Ongeldige invoer: verwacht ${i}, ontving ${u}`}case"invalid_value":return r.values.length===1?`Ongeldige invoer: verwacht ${K(r.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin),u=r.origin==="date"?"laat":r.origin==="string"?"lang":"groot";return s?`Te ${u}: verwacht dat ${r.origin??"waarde"} ${i}${r.maximum.toString()} ${s.unit??"elementen"} ${s.verb}`:`Te ${u}: verwacht dat ${r.origin??"waarde"} ${i}${r.maximum.toString()} is`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin),u=r.origin==="date"?"vroeg":r.origin==="string"?"kort":"klein";return s?`Te ${u}: verwacht dat ${r.origin} ${i}${r.minimum.toString()} ${s.unit} ${s.verb}`:`Te ${u}: verwacht dat ${r.origin} ${i}${r.minimum.toString()} is`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Ongeldige tekst: moet met "${i.prefix}" beginnen`:i.format==="ends_with"?`Ongeldige tekst: moet op "${i.suffix}" eindigen`:i.format==="includes"?`Ongeldige tekst: moet "${i.includes}" bevatten`:i.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${i.pattern}`:`Ongeldig: ${n[i.format]??r.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${r.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${r.keys.length>1?"s":""}: ${L(r.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${r.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${r.origin}`;default:return"Ongeldige invoer"}}},"error");function mg(){return{localeError:lN()}}a(mg,"default");var dN=a(()=>{let e={string:{unit:"tegn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"elementer",verb:"\xE5 inneholde"},set:{unit:"elementer",verb:"\xE5 inneholde"}};function t(r){return e[r]??null}a(t,"getSizing");let n={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},o={nan:"NaN",number:"tall",array:"liste"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=Q(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`Ugyldig input: forventet instanceof ${r.expected}, fikk ${u}`:`Ugyldig input: forventet ${i}, fikk ${u}`}case"invalid_value":return r.values.length===1?`Ugyldig verdi: forventet ${K(r.values[0])}`:`Ugyldig valg: forventet en av ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`For stor(t): forventet ${r.origin??"value"} til \xE5 ha ${i}${r.maximum.toString()} ${s.unit??"elementer"}`:`For stor(t): forventet ${r.origin??"value"} til \xE5 ha ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`For lite(n): forventet ${r.origin} til \xE5 ha ${i}${r.minimum.toString()} ${s.unit}`:`For lite(n): forventet ${r.origin} til \xE5 ha ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${i.prefix}"`:i.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${i.suffix}"`:i.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${i.includes}"`:i.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${i.pattern}`:`Ugyldig ${n[i.format]??r.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${L(r.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${r.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${r.origin}`;default:return"Ugyldig input"}}},"error");function hg(){return{localeError:dN()}}a(hg,"default");var pN=a(()=>{let e={string:{unit:"harf",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"unsur",verb:"olmal\u0131d\u0131r"},set:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function t(r){return e[r]??null}a(t,"getSizing");let n={regex:"giren",email:"epostag\xE2h",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO heng\xE2m\u0131",date:"ISO tarihi",time:"ISO zaman\u0131",duration:"ISO m\xFCddeti",ipv4:"IPv4 ni\u015F\xE2n\u0131",ipv6:"IPv6 ni\u015F\xE2n\u0131",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\u015Fifreli metin",base64url:"base64url-\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"giren"},o={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=Q(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`F\xE2sit giren: umulan instanceof ${r.expected}, al\u0131nan ${u}`:`F\xE2sit giren: umulan ${i}, al\u0131nan ${u}`}case"invalid_value":return r.values.length===1?`F\xE2sit giren: umulan ${K(r.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`Fazla b\xFCy\xFCk: ${r.origin??"value"}, ${i}${r.maximum.toString()} ${s.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${r.origin??"value"}, ${i}${r.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`Fazla k\xFC\xE7\xFCk: ${r.origin}, ${i}${r.minimum.toString()} ${s.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${r.origin}, ${i}${r.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let i=r;return i.format==="starts_with"?`F\xE2sit metin: "${i.prefix}" ile ba\u015Flamal\u0131.`:i.format==="ends_with"?`F\xE2sit metin: "${i.suffix}" ile bitmeli.`:i.format==="includes"?`F\xE2sit metin: "${i.includes}" ihtiv\xE2 etmeli.`:i.format==="regex"?`F\xE2sit metin: ${i.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${n[i.format]??r.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${r.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${r.keys.length>1?"s":""}: ${L(r.keys,", ")}`;case"invalid_key":return`${r.origin} i\xE7in tan\u0131nmayan anahtar var.`;case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return`${r.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return"K\u0131ymet tan\u0131namad\u0131."}}},"error");function gg(){return{localeError:pN()}}a(gg,"default");var fN=a(()=>{let e={string:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},file:{unit:"\u0628\u0627\u06CC\u067C\u0633",verb:"\u0648\u0644\u0631\u064A"},array:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},set:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function t(r){return e[r]??null}a(t,"getSizing");let n={regex:"\u0648\u0631\u0648\u062F\u064A",email:"\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9",url:"\u06CC\u0648 \u0622\u0631 \u0627\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A",date:"\u0646\u06D0\u067C\u0647",time:"\u0648\u062E\u062A",duration:"\u0645\u0648\u062F\u0647",ipv4:"\u062F IPv4 \u067E\u062A\u0647",ipv6:"\u062F IPv6 \u067E\u062A\u0647",cidrv4:"\u062F IPv4 \u0633\u0627\u062D\u0647",cidrv6:"\u062F IPv6 \u0633\u0627\u062D\u0647",base64:"base64-encoded \u0645\u062A\u0646",base64url:"base64url-encoded \u0645\u062A\u0646",json_string:"JSON \u0645\u062A\u0646",e164:"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"},o={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0627\u0631\u06D0"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=Q(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${r.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${u} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`:`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${i} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${u} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`}case"invalid_value":return r.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${K(r.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${L(r.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${r.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${i}${r.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${r.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${i}${r.maximum.toString()} \u0648\u064A`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${r.origin} \u0628\u0627\u06CC\u062F ${i}${r.minimum.toString()} ${s.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${r.origin} \u0628\u0627\u06CC\u062F ${i}${r.minimum.toString()} \u0648\u064A`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${i.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:i.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${i.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:i.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${i.includes}" \u0648\u0644\u0631\u064A`:i.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${i.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${n[i.format]??r.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${r.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${r.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${L(r.keys,", ")}`;case"invalid_key":return`\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${r.origin} \u06A9\u06D0`;case"invalid_union":return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A";case"invalid_element":return`\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${r.origin} \u06A9\u06D0`;default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}},"error");function yg(){return{localeError:fN()}}a(yg,"default");var mN=a(()=>{let e={string:{unit:"znak\xF3w",verb:"mie\u0107"},file:{unit:"bajt\xF3w",verb:"mie\u0107"},array:{unit:"element\xF3w",verb:"mie\u0107"},set:{unit:"element\xF3w",verb:"mie\u0107"}};function t(r){return e[r]??null}a(t,"getSizing");let n={regex:"wyra\u017Cenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ci\u0105g znak\xF3w zakodowany w formacie base64",base64url:"ci\u0105g znak\xF3w zakodowany w formacie base64url",json_string:"ci\u0105g znak\xF3w w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wej\u015Bcie"},o={nan:"NaN",number:"liczba",array:"tablica"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=Q(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${r.expected}, otrzymano ${u}`:`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${i}, otrzymano ${u}`}case"invalid_value":return r.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${K(r.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${r.maximum.toString()} ${s.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${r.minimum.toString()} ${s.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${i.prefix}"`:i.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${i.suffix}"`:i.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${i.includes}"`:i.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${i.pattern}`:`Nieprawid\u0142ow(y/a/e) ${n[i.format]??r.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${r.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${r.keys.length>1?"s":""}: ${L(r.keys,", ")}`;case"invalid_key":return`Nieprawid\u0142owy klucz w ${r.origin}`;case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return`Nieprawid\u0142owa warto\u015B\u0107 w ${r.origin}`;default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}},"error");function _g(){return{localeError:mN()}}a(_g,"default");var hN=a(()=>{let e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(r){return e[r]??null}a(t,"getSizing");let n={regex:"padr\xE3o",email:"endere\xE7o de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"dura\xE7\xE3o ISO",ipv4:"endere\xE7o IPv4",ipv6:"endere\xE7o IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},o={nan:"NaN",number:"n\xFAmero",null:"nulo"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=Q(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`Tipo inv\xE1lido: esperado instanceof ${r.expected}, recebido ${u}`:`Tipo inv\xE1lido: esperado ${i}, recebido ${u}`}case"invalid_value":return r.values.length===1?`Entrada inv\xE1lida: esperado ${K(r.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`Muito grande: esperado que ${r.origin??"valor"} tivesse ${i}${r.maximum.toString()} ${s.unit??"elementos"}`:`Muito grande: esperado que ${r.origin??"valor"} fosse ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`Muito pequeno: esperado que ${r.origin} tivesse ${i}${r.minimum.toString()} ${s.unit}`:`Muito pequeno: esperado que ${r.origin} fosse ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${i.prefix}"`:i.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${i.suffix}"`:i.format==="includes"?`Texto inv\xE1lido: deve incluir "${i.includes}"`:i.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${i.pattern}`:`${n[i.format]??r.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${r.divisor}`;case"unrecognized_keys":return`Chave${r.keys.length>1?"s":""} desconhecida${r.keys.length>1?"s":""}: ${L(r.keys,", ")}`;case"invalid_key":return`Chave inv\xE1lida em ${r.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido em ${r.origin}`;default:return"Campo inv\xE1lido"}}},"error");function bg(){return{localeError:hN()}}a(bg,"default");function jP(e,t,n,o){let r=Math.abs(e),i=r%10,s=r%100;return s>=11&&s<=19?o:i===1?t:i>=2&&i<=4?n:o}a(jP,"getRussianPlural");var gN=a(()=>{let e={string:{unit:{one:"\u0441\u0438\u043C\u0432\u043E\u043B",few:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",many:"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u0430",many:"\u0431\u0430\u0439\u0442"},verb:"\u0438\u043C\u0435\u0442\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function t(r){return e[r]??null}a(t,"getSizing");let n={regex:"\u0432\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u044F",duration:"ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64",base64url:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url",json_string:"JSON \u0441\u0442\u0440\u043E\u043A\u0430",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"},o={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0441\u0438\u0432"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=Q(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${r.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${u}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${i}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${u}`}case"invalid_value":return r.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${K(r.values[0])}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);if(s){let u=Number(r.maximum),d=jP(u,s.unit.one,s.unit.few,s.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${i}${r.maximum.toString()} ${d}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);if(s){let u=Number(r.minimum),d=jP(u,s.unit.one,s.unit.few,s.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${i}${r.minimum.toString()} ${d}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin} \u0431\u0443\u0434\u0435\u0442 ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${n[i.format]??r.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${r.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${r.keys.length>1?"\u0438":""}: ${L(r.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${r.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435";case"invalid_element":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${r.origin}`;default:return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"}}},"error");function vg(){return{localeError:gN()}}a(vg,"default");var yN=a(()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(r){return e[r]??null}a(t,"getSizing");let n={regex:"vnos",email:"e-po\u0161tni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in \u010Das",date:"ISO datum",time:"ISO \u010Das",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 \u0161tevilka",jwt:"JWT",template_literal:"vnos"},o={nan:"NaN",number:"\u0161tevilo",array:"tabela"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=Q(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${r.expected}, prejeto ${u}`:`Neveljaven vnos: pri\u010Dakovano ${i}, prejeto ${u}`}case"invalid_value":return r.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${K(r.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`Preveliko: pri\u010Dakovano, da bo ${r.origin??"vrednost"} imelo ${i}${r.maximum.toString()} ${s.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${r.origin??"vrednost"} ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`Premajhno: pri\u010Dakovano, da bo ${r.origin} imelo ${i}${r.minimum.toString()} ${s.unit}`:`Premajhno: pri\u010Dakovano, da bo ${r.origin} ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${i.prefix}"`:i.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${i.suffix}"`:i.format==="includes"?`Neveljaven niz: mora vsebovati "${i.includes}"`:i.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${i.pattern}`:`Neveljaven ${n[i.format]??r.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${r.divisor}`;case"unrecognized_keys":return`Neprepoznan${r.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${L(r.keys,", ")}`;case"invalid_key":return`Neveljaven klju\u010D v ${r.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${r.origin}`;default:return"Neveljaven vnos"}}},"error");function Eg(){return{localeError:yN()}}a(Eg,"default");var _N=a(()=>{let e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\xE5lla"},set:{unit:"objekt",verb:"att inneh\xE5lla"}};function t(r){return e[r]??null}a(t,"getSizing");let n={regex:"regulj\xE4rt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad str\xE4ng",base64url:"base64url-kodad str\xE4ng",json_string:"JSON-str\xE4ng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"},o={nan:"NaN",number:"antal",array:"lista"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=Q(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${r.expected}, fick ${u}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${i}, fick ${u}`}case"invalid_value":return r.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${K(r.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`F\xF6r stor(t): f\xF6rv\xE4ntade ${r.origin??"v\xE4rdet"} att ha ${i}${r.maximum.toString()} ${s.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${r.origin??"v\xE4rdet"} att ha ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`F\xF6r lite(t): f\xF6rv\xE4ntade ${r.origin??"v\xE4rdet"} att ha ${i}${r.minimum.toString()} ${s.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${r.origin??"v\xE4rdet"} att ha ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${i.prefix}"`:i.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${i.suffix}"`:i.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${i.includes}"`:i.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${i.pattern}"`:`Ogiltig(t) ${n[i.format]??r.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${L(r.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${r.origin??"v\xE4rdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xE4rde i ${r.origin??"v\xE4rdet"}`;default:return"Ogiltig input"}}},"error");function Sg(){return{localeError:_N()}}a(Sg,"default");var bN=a(()=>{let e={string:{unit:"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},file:{unit:"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},array:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},set:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function t(r){return e[r]??null}a(t,"getSizing");let n={regex:"\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1",email:"\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",date:"ISO \u0BA4\u0BC7\u0BA4\u0BBF",time:"ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",duration:"ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1",ipv4:"IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",ipv6:"IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",cidrv4:"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",cidrv6:"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",base64:"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD",base64url:"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD",json_string:"JSON \u0B9A\u0BB0\u0BAE\u0BCD",e164:"E.164 \u0B8E\u0BA3\u0BCD",jwt:"JWT",template_literal:"input"},o={nan:"NaN",number:"\u0B8E\u0BA3\u0BCD",array:"\u0B85\u0BA3\u0BBF",null:"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=Q(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 instanceof ${r.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${u}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${i}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${u}`}case"invalid_value":return r.values.length===1?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${K(r.values[0])}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${L(r.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${i}${r.maximum.toString()} ${s.unit??"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${i}${r.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin} ${i}${r.minimum.toString()} ${s.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin} ${i}${r.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${i.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${n[i.format]??r.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${r.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;case"unrecognized_keys":return`\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${r.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${L(r.keys,", ")}`;case"invalid_key":return`${r.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`;case"invalid_union":return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1";case"invalid_element":return`${r.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`;default:return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"}}},"error");function Pg(){return{localeError:bN()}}a(Pg,"default");var vN=a(()=>{let e={string:{unit:"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},file:{unit:"\u0E44\u0E1A\u0E15\u0E4C",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},array:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},set:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function t(r){return e[r]??null}a(t,"getSizing");let n={regex:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",email:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",url:"URL",emoji:"\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",date:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",time:"\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",duration:"\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",ipv4:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",ipv6:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",cidrv4:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",cidrv6:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",base64:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",base64url:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",json_string:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",e164:"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"},o={nan:"NaN",number:"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02",array:"\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)",null:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=Q(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 instanceof ${r.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${u}`:`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${i} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${u}`}case"invalid_value":return r.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${K(r.values[0])}`:`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",s=t(r.origin);return s?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${r.maximum.toString()} ${s.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",s=t(r.origin);return s?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${r.minimum.toString()} ${s.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${i.prefix}"`:i.format==="ends_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${i.suffix}"`:i.format==="includes"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${i.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:i.format==="regex"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${i.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${n[i.format]??r.format}`}case"not_multiple_of":return`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${r.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`;case"unrecognized_keys":return`\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${L(r.keys,", ")}`;case"invalid_key":return`\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${r.origin}`;case"invalid_union":return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49";case"invalid_element":return`\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${r.origin}`;default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}},"error");function xg(){return{localeError:vN()}}a(xg,"default");var EN=a(()=>{let e={string:{unit:"karakter",verb:"olmal\u0131"},file:{unit:"bayt",verb:"olmal\u0131"},array:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},set:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function t(r){return e[r]??null}a(t,"getSizing");let n={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO s\xFCre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aral\u0131\u011F\u0131",cidrv6:"IPv6 aral\u0131\u011F\u0131",base64:"base64 ile \u015Fifrelenmi\u015F metin",base64url:"base64url ile \u015Fifrelenmi\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"\u015Eablon dizesi"},o={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=Q(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${r.expected}, al\u0131nan ${u}`:`Ge\xE7ersiz de\u011Fer: beklenen ${i}, al\u0131nan ${u}`}case"invalid_value":return r.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${K(r.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`\xC7ok b\xFCy\xFCk: beklenen ${r.origin??"de\u011Fer"} ${i}${r.maximum.toString()} ${s.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${r.origin??"de\u011Fer"} ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`\xC7ok k\xFC\xE7\xFCk: beklenen ${r.origin} ${i}${r.minimum.toString()} ${s.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${r.origin} ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Ge\xE7ersiz metin: "${i.prefix}" ile ba\u015Flamal\u0131`:i.format==="ends_with"?`Ge\xE7ersiz metin: "${i.suffix}" ile bitmeli`:i.format==="includes"?`Ge\xE7ersiz metin: "${i.includes}" i\xE7ermeli`:i.format==="regex"?`Ge\xE7ersiz metin: ${i.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${n[i.format]??r.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${r.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${r.keys.length>1?"lar":""}: ${L(r.keys,", ")}`;case"invalid_key":return`${r.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${r.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}},"error");function Tg(){return{localeError:EN()}}a(Tg,"default");var SN=a(()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},file:{unit:"\u0431\u0430\u0439\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function t(r){return e[r]??null}a(t,"getSizing");let n={regex:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO",date:"\u0434\u0430\u0442\u0430 ISO",time:"\u0447\u0430\u0441 ISO",duration:"\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO",ipv4:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv4",ipv6:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv6",cidrv4:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4",cidrv6:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6",base64:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64",base64url:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url",json_string:"\u0440\u044F\u0434\u043E\u043A JSON",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"},o={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=Q(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F instanceof ${r.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${u}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${i}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${u}`}case"invalid_value":return r.values.length===1?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${K(r.values[0])}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${s.verb} ${i}${r.maximum.toString()} ${s.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin} ${s.verb} ${i}${r.minimum.toString()} ${s.unit}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin} \u0431\u0443\u0434\u0435 ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${n[i.format]??r.format}`}case"not_multiple_of":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${r.keys.length>1?"\u0456":""}: ${L(r.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${r.origin}`;case"invalid_union":return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456";case"invalid_element":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${r.origin}`;default:return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"}}},"error");function Ps(){return{localeError:SN()}}a(Ps,"default");function wg(){return Ps()}a(wg,"default");var PN=a(()=>{let e={string:{unit:"\u062D\u0631\u0648\u0641",verb:"\u06C1\u0648\u0646\u0627"},file:{unit:"\u0628\u0627\u0626\u0679\u0633",verb:"\u06C1\u0648\u0646\u0627"},array:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},set:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function t(r){return e[r]??null}a(t,"getSizing");let n={regex:"\u0627\u0646 \u067E\u0679",email:"\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633",url:"\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",uuidv4:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4",uuidv6:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6",nanoid:"\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC",guid:"\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid2:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2",ulid:"\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC",xid:"\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC",ksuid:"\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",datetime:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645",date:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E",time:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A",duration:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A",ipv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633",ipv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633",cidrv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C",cidrv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C",base64:"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",base64url:"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",json_string:"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",e164:"\u0627\u06CC 164 \u0646\u0645\u0628\u0631",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"},o={nan:"NaN",number:"\u0646\u0645\u0628\u0631",array:"\u0622\u0631\u06D2",null:"\u0646\u0644"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=Q(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${r.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${u} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`:`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${i} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${u} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`}case"invalid_value":return r.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${K(r.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${L(r.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${r.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${i}${r.maximum.toString()} ${s.unit??"\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0628\u0691\u0627: ${r.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${i}${r.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${r.origin} \u06A9\u06D2 ${i}${r.minimum.toString()} ${s.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${r.origin} \u06A9\u0627 ${i}${r.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${i.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${n[i.format]??r.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${r.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;case"unrecognized_keys":return`\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${r.keys.length>1?"\u0632":""}: ${L(r.keys,"\u060C ")}`;case"invalid_key":return`${r.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return`${r.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}},"error");function Ag(){return{localeError:PN()}}a(Ag,"default");var xN=a(()=>{let e={string:{unit:"belgi",verb:"bo\u2018lishi kerak"},file:{unit:"bayt",verb:"bo\u2018lishi kerak"},array:{unit:"element",verb:"bo\u2018lishi kerak"},set:{unit:"element",verb:"bo\u2018lishi kerak"}};function t(r){return e[r]??null}a(t,"getSizing");let n={regex:"kirish",email:"elektron pochta manzili",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",jwt:"JWT",template_literal:"kirish"},o={nan:"NaN",number:"raqam",array:"massiv"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=Q(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${r.expected}, qabul qilingan ${u}`:`Noto\u2018g\u2018ri kirish: kutilgan ${i}, qabul qilingan ${u}`}case"invalid_value":return r.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${K(r.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`Juda katta: kutilgan ${r.origin??"qiymat"} ${i}${r.maximum.toString()} ${s.unit} ${s.verb}`:`Juda katta: kutilgan ${r.origin??"qiymat"} ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`Juda kichik: kutilgan ${r.origin} ${i}${r.minimum.toString()} ${s.unit} ${s.verb}`:`Juda kichik: kutilgan ${r.origin} ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Noto\u2018g\u2018ri satr: "${i.prefix}" bilan boshlanishi kerak`:i.format==="ends_with"?`Noto\u2018g\u2018ri satr: "${i.suffix}" bilan tugashi kerak`:i.format==="includes"?`Noto\u2018g\u2018ri satr: "${i.includes}" ni o\u2018z ichiga olishi kerak`:i.format==="regex"?`Noto\u2018g\u2018ri satr: ${i.pattern} shabloniga mos kelishi kerak`:`Noto\u2018g\u2018ri ${n[i.format]??r.format}`}case"not_multiple_of":return`Noto\u2018g\u2018ri raqam: ${r.divisor} ning karralisi bo\u2018lishi kerak`;case"unrecognized_keys":return`Noma\u2019lum kalit${r.keys.length>1?"lar":""}: ${L(r.keys,", ")}`;case"invalid_key":return`${r.origin} dagi kalit noto\u2018g\u2018ri`;case"invalid_union":return"Noto\u2018g\u2018ri kirish";case"invalid_element":return`${r.origin} da noto\u2018g\u2018ri qiymat`;default:return"Noto\u2018g\u2018ri kirish"}}},"error");function Ig(){return{localeError:xN()}}a(Ig,"default");var TN=a(()=>{let e={string:{unit:"k\xFD t\u1EF1",verb:"c\xF3"},file:{unit:"byte",verb:"c\xF3"},array:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},set:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function t(r){return e[r]??null}a(t,"getSizing");let n={regex:"\u0111\u1EA7u v\xE0o",email:"\u0111\u1ECBa ch\u1EC9 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ng\xE0y gi\u1EDD ISO",date:"ng\xE0y ISO",time:"gi\u1EDD ISO",duration:"kho\u1EA3ng th\u1EDDi gian ISO",ipv4:"\u0111\u1ECBa ch\u1EC9 IPv4",ipv6:"\u0111\u1ECBa ch\u1EC9 IPv6",cidrv4:"d\u1EA3i IPv4",cidrv6:"d\u1EA3i IPv6",base64:"chu\u1ED7i m\xE3 h\xF3a base64",base64url:"chu\u1ED7i m\xE3 h\xF3a base64url",json_string:"chu\u1ED7i JSON",e164:"s\u1ED1 E.164",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"},o={nan:"NaN",number:"s\u1ED1",array:"m\u1EA3ng"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=Q(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${r.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${u}`:`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${i}, nh\u1EADn \u0111\u01B0\u1EE3c ${u}`}case"invalid_value":return r.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${K(r.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${r.origin??"gi\xE1 tr\u1ECB"} ${s.verb} ${i}${r.maximum.toString()} ${s.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${r.origin??"gi\xE1 tr\u1ECB"} ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${r.origin} ${s.verb} ${i}${r.minimum.toString()} ${s.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${r.origin} ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${i.prefix}"`:i.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${i.suffix}"`:i.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${i.includes}"`:i.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${i.pattern}`:`${n[i.format]??r.format} kh\xF4ng h\u1EE3p l\u1EC7`}case"not_multiple_of":return`S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${r.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${L(r.keys,", ")}`;case"invalid_key":return`Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${r.origin}`;case"invalid_union":return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7";case"invalid_element":return`Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${r.origin}`;default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}},"error");function Rg(){return{localeError:TN()}}a(Rg,"default");var wN=a(()=>{let e={string:{unit:"\u5B57\u7B26",verb:"\u5305\u542B"},file:{unit:"\u5B57\u8282",verb:"\u5305\u542B"},array:{unit:"\u9879",verb:"\u5305\u542B"},set:{unit:"\u9879",verb:"\u5305\u542B"}};function t(r){return e[r]??null}a(t,"getSizing");let n={regex:"\u8F93\u5165",email:"\u7535\u5B50\u90AE\u4EF6",url:"URL",emoji:"\u8868\u60C5\u7B26\u53F7",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u671F\u65F6\u95F4",date:"ISO\u65E5\u671F",time:"ISO\u65F6\u95F4",duration:"ISO\u65F6\u957F",ipv4:"IPv4\u5730\u5740",ipv6:"IPv6\u5730\u5740",cidrv4:"IPv4\u7F51\u6BB5",cidrv6:"IPv6\u7F51\u6BB5",base64:"base64\u7F16\u7801\u5B57\u7B26\u4E32",base64url:"base64url\u7F16\u7801\u5B57\u7B26\u4E32",json_string:"JSON\u5B57\u7B26\u4E32",e164:"E.164\u53F7\u7801",jwt:"JWT",template_literal:"\u8F93\u5165"},o={nan:"NaN",number:"\u6570\u5B57",array:"\u6570\u7EC4",null:"\u7A7A\u503C(null)"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=Q(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${r.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${u}`:`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${i}\uFF0C\u5B9E\u9645\u63A5\u6536 ${u}`}case"invalid_value":return r.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${K(r.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${r.origin??"\u503C"} ${i}${r.maximum.toString()} ${s.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${r.origin??"\u503C"} ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${r.origin} ${i}${r.minimum.toString()} ${s.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${r.origin} ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${i.prefix}" \u5F00\u5934`:i.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${i.suffix}" \u7ED3\u5C3E`:i.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${i.includes}"`:i.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${i.pattern}`:`\u65E0\u6548${n[i.format]??r.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${r.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${L(r.keys,", ")}`;case"invalid_key":return`${r.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return`${r.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return"\u65E0\u6548\u8F93\u5165"}}},"error");function Og(){return{localeError:wN()}}a(Og,"default");var AN=a(()=>{let e={string:{unit:"\u5B57\u5143",verb:"\u64C1\u6709"},file:{unit:"\u4F4D\u5143\u7D44",verb:"\u64C1\u6709"},array:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},set:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function t(r){return e[r]??null}a(t,"getSizing");let n={regex:"\u8F38\u5165",email:"\u90F5\u4EF6\u5730\u5740",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u65E5\u671F\u6642\u9593",date:"ISO \u65E5\u671F",time:"ISO \u6642\u9593",duration:"ISO \u671F\u9593",ipv4:"IPv4 \u4F4D\u5740",ipv6:"IPv6 \u4F4D\u5740",cidrv4:"IPv4 \u7BC4\u570D",cidrv6:"IPv6 \u7BC4\u570D",base64:"base64 \u7DE8\u78BC\u5B57\u4E32",base64url:"base64url \u7DE8\u78BC\u5B57\u4E32",json_string:"JSON \u5B57\u4E32",e164:"E.164 \u6578\u503C",jwt:"JWT",template_literal:"\u8F38\u5165"},o={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=Q(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${r.expected}\uFF0C\u4F46\u6536\u5230 ${u}`:`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${i}\uFF0C\u4F46\u6536\u5230 ${u}`}case"invalid_value":return r.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${K(r.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${r.origin??"\u503C"} \u61C9\u70BA ${i}${r.maximum.toString()} ${s.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${r.origin??"\u503C"} \u61C9\u70BA ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${r.origin} \u61C9\u70BA ${i}${r.minimum.toString()} ${s.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${r.origin} \u61C9\u70BA ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${i.prefix}" \u958B\u982D`:i.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${i.suffix}" \u7D50\u5C3E`:i.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${i.includes}"`:i.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${i.pattern}`:`\u7121\u6548\u7684 ${n[i.format]??r.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${r.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${r.keys.length>1?"\u5011":""}\uFF1A${L(r.keys,"\u3001")}`;case"invalid_key":return`${r.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return`${r.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}},"error");function kg(){return{localeError:AN()}}a(kg,"default");var IN=a(()=>{let e={string:{unit:"\xE0mi",verb:"n\xED"},file:{unit:"bytes",verb:"n\xED"},array:{unit:"nkan",verb:"n\xED"},set:{unit:"nkan",verb:"n\xED"}};function t(r){return e[r]??null}a(t,"getSizing");let n={regex:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9",email:"\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\xE0k\xF3k\xF2 ISO",date:"\u1ECDj\u1ECD\u0301 ISO",time:"\xE0k\xF3k\xF2 ISO",duration:"\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO",ipv4:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv4",ipv6:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv6",cidrv4:"\xE0gb\xE8gb\xE8 IPv4",cidrv6:"\xE0gb\xE8gb\xE8 IPv6",base64:"\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64",base64url:"\u1ECD\u0300r\u1ECD\u0300 base64url",json_string:"\u1ECD\u0300r\u1ECD\u0300 JSON",e164:"n\u1ECD\u0301mb\xE0 E.164",jwt:"JWT",template_literal:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"},o={nan:"NaN",number:"n\u1ECD\u0301mb\xE0",array:"akop\u1ECD"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=Q(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${r.expected}, \xE0m\u1ECD\u0300 a r\xED ${u}`:`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${i}, \xE0m\u1ECD\u0300 a r\xED ${u}`}case"invalid_value":return r.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${K(r.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${r.origin??"iye"} ${s.verb} ${i}${r.maximum} ${s.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${i}${r.maximum}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${r.origin} ${s.verb} ${i}${r.minimum} ${s.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${i}${r.minimum}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${i.prefix}"`:i.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${i.suffix}"`:i.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${i.includes}"`:i.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${i.pattern}`:`A\u1E63\xEC\u1E63e: ${n[i.format]??r.format}`}case"not_multiple_of":return`N\u1ECD\u0301mb\xE0 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \xE8y\xE0 p\xEDp\xEDn ti ${r.divisor}`;case"unrecognized_keys":return`B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${L(r.keys,", ")}`;case"invalid_key":return`B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${r.origin}`;case"invalid_union":return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e";case"invalid_element":return`Iye a\u1E63\xEC\u1E63e n\xEDn\xFA ${r.origin}`;default:return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}},"error");function Cg(){return{localeError:IN()}}a(Cg,"default");var MP,ad=Symbol("ZodOutput"),sd=Symbol("ZodInput"),id=class{static{a(this,"$ZodRegistry")}constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){let o=n[0];return this._map.set(t,o),o&&typeof o=="object"&&"id"in o&&this._idmap.set(o.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){let n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){let n=t._zod.parent;if(n){let o={...this.get(n)??{}};delete o.id;let r={...o,...this._map.get(t)};return Object.keys(r).length?r:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};function xs(){return new id}a(xs,"registry");(MP=globalThis).__zod_globalRegistry??(MP.__zod_globalRegistry=xs());var vt=globalThis.__zod_globalRegistry;function Ts(e,t){return new e({type:"string",...J(t)})}a(Ts,"_string");function ws(e,t){return new e({type:"string",coerce:!0,...J(t)})}a(ws,"_coercedString");function As(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...J(t)})}a(As,"_email");function Mi(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...J(t)})}a(Mi,"_guid");function Is(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...J(t)})}a(Is,"_uuid");function Rs(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...J(t)})}a(Rs,"_uuidv4");function Os(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...J(t)})}a(Os,"_uuidv6");function ks(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...J(t)})}a(ks,"_uuidv7");function Co(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...J(t)})}a(Co,"_url");function Cs(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...J(t)})}a(Cs,"_emoji");function $s(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...J(t)})}a($s,"_nanoid");function zs(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...J(t)})}a(zs,"_cuid");function Ns(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...J(t)})}a(Ns,"_cuid2");function Ds(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...J(t)})}a(Ds,"_ulid");function Us(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...J(t)})}a(Us,"_xid");function js(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...J(t)})}a(js,"_ksuid");function Ms(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...J(t)})}a(Ms,"_ipv4");function Ls(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...J(t)})}a(Ls,"_ipv6");function cd(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...J(t)})}a(cd,"_mac");function Fs(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...J(t)})}a(Fs,"_cidrv4");function Bs(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...J(t)})}a(Bs,"_cidrv6");function qs(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...J(t)})}a(qs,"_base64");function Vs(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...J(t)})}a(Vs,"_base64url");function Zs(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...J(t)})}a(Zs,"_e164");function Hs(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...J(t)})}a(Hs,"_jwt");var ud={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function ld(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...J(t)})}a(ld,"_isoDateTime");function dd(e,t){return new e({type:"string",format:"date",check:"string_format",...J(t)})}a(dd,"_isoDate");function pd(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...J(t)})}a(pd,"_isoTime");function fd(e,t){return new e({type:"string",format:"duration",check:"string_format",...J(t)})}a(fd,"_isoDuration");function Gs(e,t){return new e({type:"number",checks:[],...J(t)})}a(Gs,"_number");function Ws(e,t){return new e({type:"number",coerce:!0,checks:[],...J(t)})}a(Ws,"_coercedNumber");function Js(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...J(t)})}a(Js,"_int");function md(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...J(t)})}a(md,"_float32");function hd(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...J(t)})}a(hd,"_float64");function gd(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...J(t)})}a(gd,"_int32");function yd(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...J(t)})}a(yd,"_uint32");function Ks(e,t){return new e({type:"boolean",...J(t)})}a(Ks,"_boolean");function Xs(e,t){return new e({type:"boolean",coerce:!0,...J(t)})}a(Xs,"_coercedBoolean");function _d(e,t){return new e({type:"bigint",...J(t)})}a(_d,"_bigint");function Qs(e,t){return new e({type:"bigint",coerce:!0,...J(t)})}a(Qs,"_coercedBigint");function bd(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...J(t)})}a(bd,"_int64");function vd(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...J(t)})}a(vd,"_uint64");function Ed(e,t){return new e({type:"symbol",...J(t)})}a(Ed,"_symbol");function Sd(e,t){return new e({type:"undefined",...J(t)})}a(Sd,"_undefined");function Pd(e,t){return new e({type:"null",...J(t)})}a(Pd,"_null");function Ys(e){return new e({type:"any"})}a(Ys,"_any");function ec(e){return new e({type:"unknown"})}a(ec,"_unknown");function xd(e,t){return new e({type:"never",...J(t)})}a(xd,"_never");function tc(e,t){return new e({type:"void",...J(t)})}a(tc,"_void");function Td(e,t){return new e({type:"date",...J(t)})}a(Td,"_date");function rc(e,t){return new e({type:"date",coerce:!0,...J(t)})}a(rc,"_coercedDate");function wd(e,t){return new e({type:"nan",...J(t)})}a(wd,"_nan");function Mr(e,t){return new il({check:"less_than",...J(t),value:e,inclusive:!1})}a(Mr,"_lt");function Lt(e,t){return new il({check:"less_than",...J(t),value:e,inclusive:!0})}a(Lt,"_lte");function Lr(e,t){return new al({check:"greater_than",...J(t),value:e,inclusive:!1})}a(Lr,"_gt");function yt(e,t){return new al({check:"greater_than",...J(t),value:e,inclusive:!0})}a(yt,"_gte");function nc(e){return Lr(0,e)}a(nc,"_positive");function oc(e){return Mr(0,e)}a(oc,"_negative");function ic(e){return Lt(0,e)}a(ic,"_nonpositive");function ac(e){return yt(0,e)}a(ac,"_nonnegative");function xn(e,t){return new bh({check:"multiple_of",...J(t),value:e})}a(xn,"_multipleOf");function Tn(e,t){return new Sh({check:"max_size",...J(t),maximum:e})}a(Tn,"_maxSize");function Fr(e,t){return new Ph({check:"min_size",...J(t),minimum:e})}a(Fr,"_minSize");function Kn(e,t){return new xh({check:"size_equals",...J(t),size:e})}a(Kn,"_size");function Xn(e,t){return new Th({check:"max_length",...J(t),maximum:e})}a(Xn,"_maxLength");function ct(e,t){return new wh({check:"min_length",...J(t),minimum:e})}a(ct,"_minLength");function Qn(e,t){return new Ah({check:"length_equals",...J(t),length:e})}a(Qn,"_length");function Rt(e,t){return new Ih({check:"string_format",format:"regex",...J(t),pattern:e})}a(Rt,"_regex");function $o(e){return new Rh({check:"string_format",format:"lowercase",...J(e)})}a($o,"_lowercase");function zo(e){return new Oh({check:"string_format",format:"uppercase",...J(e)})}a(zo,"_uppercase");function No(e,t){return new kh({check:"string_format",format:"includes",...J(t),includes:e})}a(No,"_includes");function Do(e,t){return new Ch({check:"string_format",format:"starts_with",...J(t),prefix:e})}a(Do,"_startsWith");function Uo(e,t){return new $h({check:"string_format",format:"ends_with",...J(t),suffix:e})}a(Uo,"_endsWith");function sc(e,t,n){return new zh({check:"property",property:e,schema:t,...J(n)})}a(sc,"_property");function jo(e,t){return new Nh({check:"mime_type",mime:e,...J(t)})}a(jo,"_mime");function Tr(e){return new Dh({check:"overwrite",tx:e})}a(Tr,"_overwrite");function Mo(e){return Tr(t=>t.normalize(e))}a(Mo,"_normalize");function Lo(){return Tr(e=>e.trim())}a(Lo,"_trim");function Fo(){return Tr(e=>e.toLowerCase())}a(Fo,"_toLowerCase");function Bo(){return Tr(e=>e.toUpperCase())}a(Bo,"_toUpperCase");function Li(){return Tr(e=>Mm(e))}a(Li,"_slugify");function $g(e,t,n){return new e({type:"array",element:t,...J(n)})}a($g,"_array");function ON(e,t,n){return new e({type:"union",options:t,...J(n)})}a(ON,"_union");function kN(e,t,n){return new e({type:"union",options:t,inclusive:!1,...J(n)})}a(kN,"_xor");function CN(e,t,n,o){return new e({type:"union",options:n,discriminator:t,...J(o)})}a(CN,"_discriminatedUnion");function $N(e,t,n){return new e({type:"intersection",left:t,right:n})}a($N,"_intersection");function zN(e,t,n,o){let r=n instanceof he,i=r?o:n,s=r?n:null;return new e({type:"tuple",items:t,rest:s,...J(i)})}a(zN,"_tuple");function NN(e,t,n,o){return new e({type:"record",keyType:t,valueType:n,...J(o)})}a(NN,"_record");function DN(e,t,n,o){return new e({type:"map",keyType:t,valueType:n,...J(o)})}a(DN,"_map");function UN(e,t,n){return new e({type:"set",valueType:t,...J(n)})}a(UN,"_set");function jN(e,t,n){let o=Array.isArray(t)?Object.fromEntries(t.map(r=>[r,r])):t;return new e({type:"enum",entries:o,...J(n)})}a(jN,"_enum");function MN(e,t,n){return new e({type:"enum",entries:t,...J(n)})}a(MN,"_nativeEnum");function LN(e,t,n){return new e({type:"literal",values:Array.isArray(t)?t:[t],...J(n)})}a(LN,"_literal");function Ad(e,t){return new e({type:"file",...J(t)})}a(Ad,"_file");function FN(e,t){return new e({type:"transform",transform:t})}a(FN,"_transform");function BN(e,t){return new e({type:"optional",innerType:t})}a(BN,"_optional");function qN(e,t){return new e({type:"nullable",innerType:t})}a(qN,"_nullable");function VN(e,t,n){return new e({type:"default",innerType:t,get defaultValue(){return typeof n=="function"?n():Hu(n)}})}a(VN,"_default");function ZN(e,t,n){return new e({type:"nonoptional",innerType:t,...J(n)})}a(ZN,"_nonoptional");function HN(e,t){return new e({type:"success",innerType:t})}a(HN,"_success");function GN(e,t,n){return new e({type:"catch",innerType:t,catchValue:typeof n=="function"?n:()=>n})}a(GN,"_catch");function WN(e,t,n){return new e({type:"pipe",in:t,out:n})}a(WN,"_pipe");function JN(e,t){return new e({type:"readonly",innerType:t})}a(JN,"_readonly");function KN(e,t,n){return new e({type:"template_literal",parts:t,...J(n)})}a(KN,"_templateLiteral");function XN(e,t){return new e({type:"lazy",getter:t})}a(XN,"_lazy");function QN(e,t){return new e({type:"promise",innerType:t})}a(QN,"_promise");function cc(e,t,n){let o=J(n);return o.abort??(o.abort=!0),new e({type:"custom",check:"custom",fn:t,...o})}a(cc,"_custom");function Id(e,t,n){return new e({type:"custom",check:"custom",fn:t,...J(n)})}a(Id,"_refine");function Rd(e){let t=LP(n=>(n.addIssue=o=>{if(typeof o=="string")n.issues.push(Pi(o,n.value,t._zod.def));else{let r=o;r.fatal&&(r.continue=!1),r.code??(r.code="custom"),r.input??(r.input=n.value),r.inst??(r.inst=t),r.continue??(r.continue=!t._zod.def.abort),n.issues.push(Pi(r))}},e(n.value,n)));return t}a(Rd,"_superRefine");function LP(e,t){let n=new Ge({check:"custom",...J(t)});return n._zod.check=e,n}a(LP,"_check");function Od(e){let t=new Ge({check:"describe"});return t._zod.onattach=[n=>{let o=vt.get(n)??{};vt.add(n,{...o,description:e})}],t._zod.check=()=>{},t}a(Od,"describe");function kd(e){let t=new Ge({check:"meta"});return t._zod.onattach=[n=>{let o=vt.get(n)??{};vt.add(n,{...o,...e})}],t._zod.check=()=>{},t}a(kd,"meta");function Cd(e,t){let n=J(t),o=n.truthy??["true","1","yes","on","y","enabled"],r=n.falsy??["false","0","no","off","n","disabled"];n.case!=="sensitive"&&(o=o.map(h=>typeof h=="string"?h.toLowerCase():h),r=r.map(h=>typeof h=="string"?h.toLowerCase():h));let i=new Set(o),s=new Set(r),u=e.Codec??Di,d=e.Boolean??Oo,p=e.String??Pn,f=new p({type:"string",error:n.error}),g=new d({type:"boolean",error:n.error}),y=new u({type:"pipe",in:f,out:g,transform:a(((h,_)=>{let P=h;return n.case!=="sensitive"&&(P=P.toLowerCase()),i.has(P)?!0:s.has(P)?!1:(_.issues.push({code:"invalid_value",expected:"stringbool",values:[...i,...s],input:_.value,inst:y,continue:!1}),{})}),"transform"),reverseTransform:a(((h,_)=>h===!0?o[0]||"true":r[0]||"false"),"reverseTransform"),error:n.error});return y}a(Cd,"_stringbool");function qo(e,t,n,o={}){let r=J(o),i={...J(o),check:"string_format",type:"string",format:t,fn:typeof n=="function"?n:u=>n.test(u),...r};return n instanceof RegExp&&(i.pattern=n),new e(i)}a(qo,"_stringFormat");function Yn(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??vt,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}a(Yn,"initializeContext");function qe(e,t,n={path:[],schemaPath:[]}){var o;let r=e._zod.def,i=t.seen.get(e);if(i)return i.count++,n.schemaPath.includes(e)&&(i.cycle=n.path),i.schema;let s={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,s);let u=e._zod.toJSONSchema?.();if(u)s.schema=u;else{let f={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,s.schema,f);else{let y=s.schema,h=t.processors[r.type];if(!h)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${r.type}`);h(e,t,y,f)}let g=e._zod.parent;g&&(s.ref||(s.ref=g),qe(g,t,f),t.seen.get(g).isParent=!0)}let d=t.metadataRegistry.get(e);return d&&Object.assign(s.schema,d),t.io==="input"&&Ft(e)&&(delete s.schema.examples,delete s.schema.default),t.io==="input"&&s.schema._prefault&&((o=s.schema).default??(o.default=s.schema._prefault)),delete s.schema._prefault,t.seen.get(e).schema}a(qe,"process");function eo(e,t){let n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let o=new Map;for(let s of e.seen.entries()){let u=e.metadataRegistry.get(s[0])?.id;if(u){let d=o.get(u);if(d&&d!==s[0])throw new Error(`Duplicate schema id "${u}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);o.set(u,s[0])}}let r=a(s=>{let u=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let g=e.external.registry.get(s[0])?.id,y=e.external.uri??(_=>_);if(g)return{ref:y(g)};let h=s[1].defId??s[1].schema.id??`schema${e.counter++}`;return s[1].defId=h,{defId:h,ref:`${y("__shared")}#/${u}/${h}`}}if(s[1]===n)return{ref:"#"};let p=`#/${u}/`,f=s[1].schema.id??`__schema${e.counter++}`;return{defId:f,ref:p+f}},"makeURI"),i=a(s=>{if(s[1].schema.$ref)return;let u=s[1],{ref:d,defId:p}=r(s);u.def={...u.schema},p&&(u.defId=p);let f=u.schema;for(let g in f)delete f[g];f.$ref=d},"extractToDef");if(e.cycles==="throw")for(let s of e.seen.entries()){let u=s[1];if(u.cycle)throw new Error(`Cycle detected: #/${u.cycle?.join("/")}/<root>
93
+
94
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let s of e.seen.entries()){let u=s[1];if(t===s[0]){i(s);continue}if(e.external){let p=e.external.registry.get(s[0])?.id;if(t!==s[0]&&p){i(s);continue}}if(e.metadataRegistry.get(s[0])?.id){i(s);continue}if(u.cycle){i(s);continue}if(u.count>1&&e.reused==="ref"){i(s);continue}}}a(eo,"extractDefs");function to(e,t){let n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let o=a(s=>{let u=e.seen.get(s);if(u.ref===null)return;let d=u.def??u.schema,p={...d},f=u.ref;if(u.ref=null,f){o(f);let y=e.seen.get(f),h=y.schema;if(h.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(d.allOf=d.allOf??[],d.allOf.push(h)):Object.assign(d,h),Object.assign(d,p),s._zod.parent===f)for(let P in d)P==="$ref"||P==="allOf"||P in p||delete d[P];if(h.$ref&&y.def)for(let P in d)P==="$ref"||P==="allOf"||P in y.def&&JSON.stringify(d[P])===JSON.stringify(y.def[P])&&delete d[P]}let g=s._zod.parent;if(g&&g!==f){o(g);let y=e.seen.get(g);if(y?.schema.$ref&&(d.$ref=y.schema.$ref,y.def))for(let h in d)h==="$ref"||h==="allOf"||h in y.def&&JSON.stringify(d[h])===JSON.stringify(y.def[h])&&delete d[h]}e.override({zodSchema:s,jsonSchema:d,path:u.path??[]})},"flattenRef");for(let s of[...e.seen.entries()].reverse())o(s[0]);let r={};if(e.target==="draft-2020-12"?r.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?r.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?r.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let s=e.external.registry.get(t)?.id;if(!s)throw new Error("Schema is missing an `id` property");r.$id=e.external.uri(s)}Object.assign(r,n.def??n.schema);let i=e.external?.defs??{};for(let s of e.seen.entries()){let u=s[1];u.def&&u.defId&&(i[u.defId]=u.def)}e.external||Object.keys(i).length>0&&(e.target==="draft-2020-12"?r.$defs=i:r.definitions=i);try{let s=JSON.parse(JSON.stringify(r));return Object.defineProperty(s,"~standard",{value:{...t["~standard"],jsonSchema:{input:Fi(t,"input",e.processors),output:Fi(t,"output",e.processors)}},enumerable:!1,writable:!1}),s}catch{throw new Error("Error converting schema to JSON.")}}a(to,"finalize");function Ft(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let o=e._zod.def;if(o.type==="transform")return!0;if(o.type==="array")return Ft(o.element,n);if(o.type==="set")return Ft(o.valueType,n);if(o.type==="lazy")return Ft(o.getter(),n);if(o.type==="promise"||o.type==="optional"||o.type==="nonoptional"||o.type==="nullable"||o.type==="readonly"||o.type==="default"||o.type==="prefault")return Ft(o.innerType,n);if(o.type==="intersection")return Ft(o.left,n)||Ft(o.right,n);if(o.type==="record"||o.type==="map")return Ft(o.keyType,n)||Ft(o.valueType,n);if(o.type==="pipe")return Ft(o.in,n)||Ft(o.out,n);if(o.type==="object"){for(let r in o.shape)if(Ft(o.shape[r],n))return!0;return!1}if(o.type==="union"){for(let r of o.options)if(Ft(r,n))return!0;return!1}if(o.type==="tuple"){for(let r of o.items)if(Ft(r,n))return!0;return!!(o.rest&&Ft(o.rest,n))}return!1}a(Ft,"isTransforming");var zg=a((e,t={})=>n=>{let o=Yn({...n,processors:t});return qe(e,o),eo(o,e),to(o,e)},"createToJSONSchemaMethod"),Fi=a((e,t,n={})=>o=>{let{libraryOptions:r,target:i}=o??{},s=Yn({...r??{},target:i,io:t,processors:n});return qe(e,s),eo(s,e),to(s,e)},"createStandardJSONSchemaMethod");var YN={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Ng=a((e,t,n,o)=>{let r=n;r.type="string";let{minimum:i,maximum:s,format:u,patterns:d,contentEncoding:p}=e._zod.bag;if(typeof i=="number"&&(r.minLength=i),typeof s=="number"&&(r.maxLength=s),u&&(r.format=YN[u]??u,r.format===""&&delete r.format,u==="time"&&delete r.format),p&&(r.contentEncoding=p),d&&d.size>0){let f=[...d];f.length===1?r.pattern=f[0].source:f.length>1&&(r.allOf=[...f.map(g=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:g.source}))])}},"stringProcessor"),Dg=a((e,t,n,o)=>{let r=n,{minimum:i,maximum:s,format:u,multipleOf:d,exclusiveMaximum:p,exclusiveMinimum:f}=e._zod.bag;typeof u=="string"&&u.includes("int")?r.type="integer":r.type="number",typeof f=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(r.minimum=f,r.exclusiveMinimum=!0):r.exclusiveMinimum=f),typeof i=="number"&&(r.minimum=i,typeof f=="number"&&t.target!=="draft-04"&&(f>=i?delete r.minimum:delete r.exclusiveMinimum)),typeof p=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(r.maximum=p,r.exclusiveMaximum=!0):r.exclusiveMaximum=p),typeof s=="number"&&(r.maximum=s,typeof p=="number"&&t.target!=="draft-04"&&(p<=s?delete r.maximum:delete r.exclusiveMaximum)),typeof d=="number"&&(r.multipleOf=d)},"numberProcessor"),Ug=a((e,t,n,o)=>{n.type="boolean"},"booleanProcessor"),jg=a((e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},"bigintProcessor"),Mg=a((e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},"symbolProcessor"),Lg=a((e,t,n,o)=>{t.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},"nullProcessor"),Fg=a((e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},"undefinedProcessor"),Bg=a((e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},"voidProcessor"),qg=a((e,t,n,o)=>{n.not={}},"neverProcessor"),Vg=a((e,t,n,o)=>{},"anyProcessor"),Zg=a((e,t,n,o)=>{},"unknownProcessor"),Hg=a((e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},"dateProcessor"),Gg=a((e,t,n,o)=>{let r=e._zod.def,i=Ja(r.entries);i.every(s=>typeof s=="number")&&(n.type="number"),i.every(s=>typeof s=="string")&&(n.type="string"),n.enum=i},"enumProcessor"),Wg=a((e,t,n,o)=>{let r=e._zod.def,i=[];for(let s of r.values)if(s===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof s=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");i.push(Number(s))}else i.push(s);if(i.length!==0)if(i.length===1){let s=i[0];n.type=s===null?"null":typeof s,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[s]:n.const=s}else i.every(s=>typeof s=="number")&&(n.type="number"),i.every(s=>typeof s=="string")&&(n.type="string"),i.every(s=>typeof s=="boolean")&&(n.type="boolean"),i.every(s=>s===null)&&(n.type="null"),n.enum=i},"literalProcessor"),Jg=a((e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},"nanProcessor"),Kg=a((e,t,n,o)=>{let r=n,i=e._zod.pattern;if(!i)throw new Error("Pattern not found in template literal");r.type="string",r.pattern=i.source},"templateLiteralProcessor"),Xg=a((e,t,n,o)=>{let r=n,i={type:"string",format:"binary",contentEncoding:"binary"},{minimum:s,maximum:u,mime:d}=e._zod.bag;s!==void 0&&(i.minLength=s),u!==void 0&&(i.maxLength=u),d?d.length===1?(i.contentMediaType=d[0],Object.assign(r,i)):(Object.assign(r,i),r.anyOf=d.map(p=>({contentMediaType:p}))):Object.assign(r,i)},"fileProcessor"),Qg=a((e,t,n,o)=>{n.type="boolean"},"successProcessor"),Yg=a((e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},"customProcessor"),ey=a((e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},"functionProcessor"),ty=a((e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},"transformProcessor"),ry=a((e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},"mapProcessor"),ny=a((e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},"setProcessor"),oy=a((e,t,n,o)=>{let r=n,i=e._zod.def,{minimum:s,maximum:u}=e._zod.bag;typeof s=="number"&&(r.minItems=s),typeof u=="number"&&(r.maxItems=u),r.type="array",r.items=qe(i.element,t,{...o,path:[...o.path,"items"]})},"arrayProcessor"),iy=a((e,t,n,o)=>{let r=n,i=e._zod.def;r.type="object",r.properties={};let s=i.shape;for(let p in s)r.properties[p]=qe(s[p],t,{...o,path:[...o.path,"properties",p]});let u=new Set(Object.keys(s)),d=new Set([...u].filter(p=>{let f=i.shape[p]._zod;return t.io==="input"?f.optin===void 0:f.optout===void 0}));d.size>0&&(r.required=Array.from(d)),i.catchall?._zod.def.type==="never"?r.additionalProperties=!1:i.catchall?i.catchall&&(r.additionalProperties=qe(i.catchall,t,{...o,path:[...o.path,"additionalProperties"]})):t.io==="output"&&(r.additionalProperties=!1)},"objectProcessor"),zd=a((e,t,n,o)=>{let r=e._zod.def,i=r.inclusive===!1,s=r.options.map((u,d)=>qe(u,t,{...o,path:[...o.path,i?"oneOf":"anyOf",d]}));i?n.oneOf=s:n.anyOf=s},"unionProcessor"),ay=a((e,t,n,o)=>{let r=e._zod.def,i=qe(r.left,t,{...o,path:[...o.path,"allOf",0]}),s=qe(r.right,t,{...o,path:[...o.path,"allOf",1]}),u=a(p=>"allOf"in p&&Object.keys(p).length===1,"isSimpleIntersection"),d=[...u(i)?i.allOf:[i],...u(s)?s.allOf:[s]];n.allOf=d},"intersectionProcessor"),sy=a((e,t,n,o)=>{let r=n,i=e._zod.def;r.type="array";let s=t.target==="draft-2020-12"?"prefixItems":"items",u=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",d=i.items.map((y,h)=>qe(y,t,{...o,path:[...o.path,s,h]})),p=i.rest?qe(i.rest,t,{...o,path:[...o.path,u,...t.target==="openapi-3.0"?[i.items.length]:[]]}):null;t.target==="draft-2020-12"?(r.prefixItems=d,p&&(r.items=p)):t.target==="openapi-3.0"?(r.items={anyOf:d},p&&r.items.anyOf.push(p),r.minItems=d.length,p||(r.maxItems=d.length)):(r.items=d,p&&(r.additionalItems=p));let{minimum:f,maximum:g}=e._zod.bag;typeof f=="number"&&(r.minItems=f),typeof g=="number"&&(r.maxItems=g)},"tupleProcessor"),cy=a((e,t,n,o)=>{let r=n,i=e._zod.def;r.type="object";let s=i.keyType,d=s._zod.bag?.patterns;if(i.mode==="loose"&&d&&d.size>0){let f=qe(i.valueType,t,{...o,path:[...o.path,"patternProperties","*"]});r.patternProperties={};for(let g of d)r.patternProperties[g.source]=f}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(r.propertyNames=qe(i.keyType,t,{...o,path:[...o.path,"propertyNames"]})),r.additionalProperties=qe(i.valueType,t,{...o,path:[...o.path,"additionalProperties"]});let p=s._zod.values;if(p){let f=[...p].filter(g=>typeof g=="string"||typeof g=="number");f.length>0&&(r.required=f)}},"recordProcessor"),uy=a((e,t,n,o)=>{let r=e._zod.def,i=qe(r.innerType,t,o),s=t.seen.get(e);t.target==="openapi-3.0"?(s.ref=r.innerType,n.nullable=!0):n.anyOf=[i,{type:"null"}]},"nullableProcessor"),ly=a((e,t,n,o)=>{let r=e._zod.def;qe(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType},"nonoptionalProcessor"),dy=a((e,t,n,o)=>{let r=e._zod.def;qe(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType,n.default=JSON.parse(JSON.stringify(r.defaultValue))},"defaultProcessor"),py=a((e,t,n,o)=>{let r=e._zod.def;qe(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(r.defaultValue)))},"prefaultProcessor"),fy=a((e,t,n,o)=>{let r=e._zod.def;qe(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType;let s;try{s=r.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=s},"catchProcessor"),my=a((e,t,n,o)=>{let r=e._zod.def,i=t.io==="input"?r.in._zod.def.type==="transform"?r.out:r.in:r.out;qe(i,t,o);let s=t.seen.get(e);s.ref=i},"pipeProcessor"),hy=a((e,t,n,o)=>{let r=e._zod.def;qe(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType,n.readOnly=!0},"readonlyProcessor"),gy=a((e,t,n,o)=>{let r=e._zod.def;qe(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType},"promiseProcessor"),Nd=a((e,t,n,o)=>{let r=e._zod.def;qe(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType},"optionalProcessor"),yy=a((e,t,n,o)=>{let r=e._zod.innerType;qe(r,t,o);let i=t.seen.get(e);i.ref=r},"lazyProcessor"),$d={string:Ng,number:Dg,boolean:Ug,bigint:jg,symbol:Mg,null:Lg,undefined:Fg,void:Bg,never:qg,any:Vg,unknown:Zg,date:Hg,enum:Gg,literal:Wg,nan:Jg,template_literal:Kg,file:Xg,success:Qg,custom:Yg,function:ey,transform:ty,map:ry,set:ny,array:oy,object:iy,union:zd,intersection:ay,tuple:sy,record:cy,nullable:uy,nonoptional:ly,default:dy,prefault:py,catch:fy,pipe:my,readonly:hy,promise:gy,optional:Nd,lazy:yy};function uc(e,t){if("_idmap"in e){let o=e,r=Yn({...t,processors:$d}),i={};for(let d of o._idmap.entries()){let[p,f]=d;qe(f,r)}let s={},u={registry:o,uri:t?.uri,defs:i};r.external=u;for(let d of o._idmap.entries()){let[p,f]=d;eo(r,f),s[p]=to(r,f)}if(Object.keys(i).length>0){let d=r.target==="draft-2020-12"?"$defs":"definitions";s.__shared={[d]:i}}return{schemas:s}}let n=Yn({...t,processors:$d});return qe(e,n),eo(n,e),to(n,e)}a(uc,"toJSONSchema");var Dd=class{static{a(this,"JSONSchemaGenerator")}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(t){this.ctx.counter=t}get seen(){return this.ctx.seen}constructor(t){let n=t?.target??"draft-2020-12";n==="draft-4"&&(n="draft-04"),n==="draft-7"&&(n="draft-07"),this.ctx=Yn({processors:$d,target:n,...t?.metadata&&{metadata:t.metadata},...t?.unrepresentable&&{unrepresentable:t.unrepresentable},...t?.override&&{override:t.override},...t?.io&&{io:t.io}})}process(t,n={path:[],schemaPath:[]}){return qe(t,this.ctx,n)}emit(t,n){n&&(n.cycles&&(this.ctx.cycles=n.cycles),n.reused&&(this.ctx.reused=n.reused),n.external&&(this.ctx.external=n.external)),eo(this.ctx,t);let o=to(this.ctx,t),{"~standard":r,...i}=o;return i}};var FP={};var lt=A("ZodMiniType",(e,t)=>{if(!e._zod)throw new Error("Uninitialized schema in ZodMiniType.");he.init(e,t),e.def=t,e.type=t.type,e.parse=(n,o)=>Ao(e,n,o,{callee:e.parse}),e.safeParse=(n,o)=>Ri(e,n,o),e.parseAsync=async(n,o)=>Io(e,n,o,{callee:e.parseAsync}),e.safeParseAsync=async(n,o)=>ki(e,n,o),e.check=(...n)=>e.clone({...t,checks:[...t.checks??[],...n.map(o=>typeof o=="function"?{_zod:{check:o,def:{check:"custom"},onattach:[]}}:o)]},{parent:!0}),e.with=e.check,e.clone=(n,o)=>bt(e,n,o),e.brand=()=>e,e.register=((n,o)=>(n.add(e,o),e)),e.apply=n=>n(e)}),Ud=A("ZodMiniString",(e,t)=>{Pn.init(e,t),lt.init(e,t)});function b(e){return Ts(Ud,e)}a(b,"string");var BP=A("ZodMiniStringFormat",(e,t)=>{Be.init(e,t),Ud.init(e,t)});var rD=A("ZodMiniURL",(e,t)=>{os.init(e,t),BP.init(e,t)});function qP(e){return Co(rD,e)}a(qP,"url");var jd=A("ZodMiniNumber",(e,t)=>{$i.init(e,t),lt.init(e,t)});function Et(e){return Gs(jd,e)}a(Et,"number");var nD=A("ZodMiniNumberFormat",(e,t)=>{is.init(e,t),jd.init(e,t)});function VP(e){return Js(nD,e)}a(VP,"int");var _y=A("ZodMiniBoolean",(e,t)=>{Oo.init(e,t),lt.init(e,t)});function ze(e){return Ks(_y,e)}a(ze,"boolean");var ZP=A("ZodMiniBigInt",(e,t)=>{zi.init(e,t),lt.init(e,t)});var oD=A("ZodMiniAny",(e,t)=>{as.init(e,t),lt.init(e,t)});function lc(){return Ys(oD)}a(lc,"any");var iD=A("ZodMiniUnknown",(e,t)=>{ss.init(e,t),lt.init(e,t)});function _e(){return ec(iD)}a(_e,"unknown");var aD=A("ZodMiniVoid",(e,t)=>{cs.init(e,t),lt.init(e,t)});function HP(e){return tc(aD,e)}a(HP,"_void");var GP=A("ZodMiniDate",(e,t)=>{us.init(e,t),lt.init(e,t)});var sD=A("ZodMiniArray",(e,t)=>{ls.init(e,t),lt.init(e,t)});function me(e,t){return new sD({type:"array",element:e,...J(t)})}a(me,"array");var cD=A("ZodMiniObject",(e,t)=>{Fl.init(e,t),lt.init(e,t),Se(e,"shape",()=>t.shape)});function k(e,t){let n={type:"object",shape:e??{},...J(t)};return new cD(n)}a(k,"object");var uD=A("ZodMiniUnion",(e,t)=>{ko.init(e,t),lt.init(e,t)});function Pe(e,t){return new uD({type:"union",options:e,...J(t)})}a(Pe,"union");var lD=A("ZodMiniDiscriminatedUnion",(e,t)=>{ds.init(e,t),lt.init(e,t)});function ro(e,t,n){return new lD({type:"union",options:t,discriminator:e,...J(n)})}a(ro,"discriminatedUnion");var dD=A("ZodMiniRecord",(e,t)=>{fs.init(e,t),lt.init(e,t)});function be(e,t,n){return new dD({type:"record",keyType:e,valueType:t,...J(n)})}a(be,"record");var pD=A("ZodMiniEnum",(e,t)=>{ms.init(e,t),lt.init(e,t),e.options=Object.values(t.entries)});function pe(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(o=>[o,o])):e;return new pD({type:"enum",entries:n,...J(t)})}a(pe,"_enum");var fD=A("ZodMiniLiteral",(e,t)=>{hs.init(e,t),lt.init(e,t)});function le(e,t){return new fD({type:"literal",values:Array.isArray(e)?e:[e],...J(t)})}a(le,"literal");var mD=A("ZodMiniTransform",(e,t)=>{gs.init(e,t),lt.init(e,t)});function no(e){return new mD({type:"transform",transform:e})}a(no,"transform");var hD=A("ZodMiniOptional",(e,t)=>{Ni.init(e,t),lt.init(e,t)});function F(e){return new hD({type:"optional",innerType:e})}a(F,"optional");var gD=A("ZodMiniNullable",(e,t)=>{ys.init(e,t),lt.init(e,t)});function dc(e){return new gD({type:"nullable",innerType:e})}a(dc,"nullable");var yD=A("ZodMiniPipe",(e,t)=>{_s.init(e,t),lt.init(e,t)});function oo(e,t){return new yD({type:"pipe",in:e,out:t})}a(oo,"pipe");var _D=A("ZodMiniCustom",(e,t)=>{bs.init(e,t),lt.init(e,t)});function Md(e,t){return cc(_D,e??(()=>!0),t)}a(Md,"custom");var pc={};ar(pc,{bigint:()=>PD,boolean:()=>SD,date:()=>xD,number:()=>ED,string:()=>vD});function vD(e){return ws(Ud,e)}a(vD,"string");function ED(e){return Ws(jd,e)}a(ED,"number");function SD(e){return Xs(_y,e)}a(SD,"boolean");function PD(e){return Qs(ZP,e)}a(PD,"bigint");function xD(e){return rc(GP,e)}a(xD,"date");var vy=k({retryOnFailure:k({defaultValue:F(ze()),hide:F(ze())}),continueOnFailure:k({defaultValue:F(ze()),hide:F(ze())})}),by=class{constructor(t,n,o,r,i,s,u,d,p,f,g,y,h){this.name=t;this.displayName=n;this.description=o;this.props=r;this.propertyGroups=i;this.run=s;this.test=u;this.requireAuth=d;this.errorHandlingOptions=p;this.outputSchema=f;this.audience=g;this.aiMetadata=y;this.classification=h}static{a(this,"IAction")}},dt=a(e=>new by(e.name,e.displayName,e.description,e.props,e.propertyGroups,e.run,e.test??e.run,e.requireAuth??!0,e.errorHandlingOptions??{continueOnFailure:{defaultValue:!1},retryOnFailure:{defaultValue:!1}},e.outputSchema,e.audience,e.aiMetadata,e.classification),"createAction");var ke=k({displayName:b(),description:F(b()),advanced:F(ze()),width:F(pe(["half","full"])),icon:F(b()),placeholder:F(b())}),ve=a((e,t)=>k({type:le(t),required:ze(),defaultValue:F(lc())}),"TPropertyValue");var ur=k({...ke.shape,...ve(b(),"SHORT_TEXT").shape}),wn=k({...ke.shape,...ve(b(),"LONG_TEXT").shape});var JP=k({label:b(),value:_e(),description:F(b()),icon:F(b())}),Ld=k({disabled:F(ze()),placeholder:F(b()),options:me(JP)});var wD=pe(["cards"]),lr=k({...ke.shape,options:Ld,display:F(wD),...ve(_e(),"STATIC_DROPDOWN").shape}),An=k({...ke.shape,options:Ld,...ve(me(_e()),"STATIC_MULTI_SELECT_DROPDOWN").shape});var Ey=k({...ke.shape,...ve(_e(),"DROPDOWN").shape,refreshers:me(b())}),fc=k({...ke.shape,...ve(me(_e()),"MULTI_SELECT_DROPDOWN").shape,refreshers:me(b())});var In=k({...ke.shape,reveals:F(me(b())),...ve(ze(),"CHECKBOX").shape});var Rn=k({...ke.shape,display:F(pe(["stepper"])),min:F(Et()),max:F(Et()),step:F(Et()),...ve(Et(),"NUMBER").shape});var mc=k({...ke.shape,streaming:F(ze()),...ve(_e(),"FILE").shape});var hc=k({...ke.shape,...ve(b(),"DATE_TIME").shape});var KP=be(b(),Pe([ur,wn,lr,fc,An,In,Rn,mc,hc])),gc=k({...ke.shape,properties:KP,...ve(me(_e()),"ARRAY").shape});var XP=pe(["any_time","last_24_hours","last_7_days","last_30_days","last_90_days","this_month","custom"]),QP=k({preset:F(XP),after:F(b()),before:F(b())}),Sy=k({...ke.shape,display:F(pe(["dropdown"])),...ve(QP,"DATE_RANGE").shape});var yc=k({...ke.shape,...ve(Pe([be(b(),_e())]),"JSON").shape});var YP=Pe([ur,lr,yc,gc,An]),AD=be(b(),YP),Py=k({refreshers:me(b()),...ke.shape,...ve(_e(),"DYNAMIC").shape});var Fd=k({...ke.shape,...ve(HP(),"MARKDOWN").shape});var _c=(n=>(n.ARCHIVE="ARCHIVE",n.REGISTRY="REGISTRY",n))(_c||{}),Bi=(n=>(n.CUSTOM="CUSTOM",n.OFFICIAL="OFFICIAL",n))(Bi||{}),qi=(S=>(S.ARTIFICIAL_INTELLIGENCE="ARTIFICIAL_INTELLIGENCE",S.COMMUNICATION="COMMUNICATION",S.COMMERCE="COMMERCE",S.CORE="CORE",S.UNIVERSAL_AI="UNIVERSAL_AI",S.FLOW_CONTROL="FLOW_CONTROL",S.BUSINESS_INTELLIGENCE="BUSINESS_INTELLIGENCE",S.ACCOUNTING="ACCOUNTING",S.PRODUCTIVITY="PRODUCTIVITY",S.CONTENT_AND_FILES="CONTENT_AND_FILES",S.DEVELOPER_TOOLS="DEVELOPER_TOOLS",S.CUSTOMER_SUPPORT="CUSTOMER_SUPPORT",S.FORMS_AND_SURVEYS="FORMS_AND_SURVEYS",S.HUMAN_RESOURCES="HUMAN_RESOURCES",S.PAYMENT_PROCESSING="PAYMENT_PROCESSING",S.MARKETING="MARKETING",S.SALES_AND_CRM="SALES_AND_CRM",S))(qi||{});var bc=(n=>(n.AUTHORIZATION_CODE="authorization_code",n.CLIENT_CREDENTIALS="client_credentials",n))(bc||{}),xy="both_client_credentials_and_authorization_code";var Br=(r=>(r.POLLING="POLLING",r.WEBHOOK="WEBHOOK",r.APP_WEBHOOK="APP_WEBHOOK",r.MANUAL="MANUAL",r))(Br||{}),vc=(i=>(i.NONE="NONE",i.HEADER_PRESENT="HEADER_PRESENT",i.QUERY_PRESENT="QUERY_PRESENT",i.BODY_PARAM_PRESENT="BODY_PARAM_PRESENT",i.HEAD_REQUEST="HEAD_REQUEST",i))(vc||{}),ID=k({strategy:pe(vc),paramName:F(b())}),Ec=(n=>(n.SIMULATION="SIMULATION",n.TEST_FUNCTION="TEST_FUNCTION",n))(Ec||{});var Bd=(n=>(n.WEBSOCKET="WEBSOCKET",n.NONE="NONE",n))(Bd||{}),ex=k({status:F(Et()),body:F(_e()),headers:F(be(b(),b()))}),tx=k({type:le("DELAY"),resumeDateTime:b(),requestIdToReply:F(b()),handlerId:F(b()),streamStepProgress:F(pe(Bd))}),rx=k({type:le("WEBHOOK"),requestId:b(),requestIdToReply:F(b()),response:ex,handlerId:F(b()),streamStepProgress:F(pe(Bd))}),RD=Pe([tx,rx]);var OD=k({body:_e(),rawBody:F(_e()),headers:be(b(),b()),queryParams:be(b(),b())});function ut(e){return e==null}a(ut,"isNil");function Sc(e){return e==null?!0:typeof e=="string"||Array.isArray(e)?e.length===0:typeof e=="object"?Object.keys(e).length===0:!1}a(Sc,"isEmpty");function qd(e,t){if(e==null)throw new Error(`${t} is null or undefined`)}a(qd,"assertNotNullOrUndefined");function Ty(e){try{return{data:e(),error:null}}catch(t){return{data:null,error:t}}}a(Ty,"tryCatchSync");var wy=It(require("crypto"),1);var kD=128,io,Vi,CD=a(e=>{if(e<0)throw new RangeError("Wrong ID size");try{!io||io.length<e?(io=Buffer.allocUnsafe(e*kD),wy.default.randomFillSync(io),Vi=0):Vi+e>io.length&&(wy.default.randomFillSync(io),Vi=0)}catch(t){throw io=void 0,t}Vi+=e},"fillPool"),$D=a(e=>(CD(e|=0),io.subarray(Vi-e,Vi)),"random"),zD=a((e,t,n)=>{let o=(2<<31-Math.clz32(e.length-1|1))-1,r=Math.ceil(1.6*o*t/e.length);return(i=t)=>{if(i<=0)return"";let s="";for(;;){let u=n(r),d=r;for(;d--;)if(s+=e[u[d]&o]||"",s.length===i)return s}}},"customRandom"),ox=a((e,t=21)=>zD(e,t,$D),"customAlphabet");var ND="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",ix=21,vG=b().check(Rt(new RegExp(`^[0-9a-zA-Z]{${ix}}$`))),DD=ox(ND,ix);var ao=oo(no(e=>e instanceof Date?e.toISOString():e),b()),wr={id:b(),created:ao,updated:ao},at=a(e=>F(dc(e)),"Nullable");function Ay(e){return F(dc(pe(e)))}a(Ay,"NullableEnum");var PG=oo(no(e=>e==="true"||e===!0?!0:e==="false"||e===!1?!1:void 0),F(ze())),Vd=a(e=>oo(no(t=>Array.isArray(t)?t:t!==void 0?[t]:void 0),F(me(e))),"OptionalArrayFromQuery");var wG=be(b(),_e());var Zi=(S=>(S.OPENAI="openai",S.OPENROUTER="openrouter",S.ANTHROPIC="anthropic",S.AZURE="azure",S.GOOGLE="google",S.ACTIVEPIECES="activepieces",S.CLOUDFLARE_GATEWAY="cloudflare-gateway",S.CUSTOM="custom",S.BEDROCK="bedrock",S.VERTEX="vertex",S.MISTRAL="mistral",S.XAI="xai",S.DEEPSEEK="deepseek",S.ZAI="zai",S.QWEN="qwen",S.MINIMAX="minimax",S.MOONSHOT="moonshot",S))(Zi||{});var MG=b().check(Rt(/^#[0-9A-Fa-f]{6}$/));var FG=k({filename:b(),data:_e(),type:le("file"),mimetype:F(b())});var UD=It(sx());var WG=k({...wr,name:b(),permissions:me(b()),platformId:at(b()),type:b(),userCount:F(Et())});var Tp={};ar(Tp,{$brand:()=>Ga,$input:()=>sd,$output:()=>ad,NEVER:()=>qu,TimePrecision:()=>ud,ZodAny:()=>Xy,ZodArray:()=>t_,ZodBase64:()=>pp,ZodBase64URL:()=>fp,ZodBigInt:()=>Qi,ZodBigIntFormat:()=>gp,ZodBoolean:()=>Xi,ZodCIDRv4:()=>lp,ZodCIDRv6:()=>dp,ZodCUID:()=>np,ZodCUID2:()=>op,ZodCatch:()=>P_,ZodCodec:()=>xp,ZodCustom:()=>zc,ZodCustomStringFormat:()=>Ji,ZodDate:()=>Rc,ZodDefault:()=>y_,ZodDiscriminatedUnion:()=>n_,ZodE164:()=>mp,ZodEmail:()=>ep,ZodEmoji:()=>tp,ZodEnum:()=>Gi,ZodError:()=>jD,ZodExactOptional:()=>m_,ZodFile:()=>p_,ZodFirstPartyTypeKind:()=>N_,ZodFunction:()=>C_,ZodGUID:()=>xc,ZodIPv4:()=>cp,ZodIPv6:()=>up,ZodISODate:()=>Wd,ZodISODateTime:()=>Gd,ZodISODuration:()=>Kd,ZodISOTime:()=>Jd,ZodIntersection:()=>o_,ZodIssueCode:()=>LD,ZodJWT:()=>hp,ZodKSUID:()=>sp,ZodLazy:()=>R_,ZodLiteral:()=>d_,ZodMAC:()=>Vy,ZodMap:()=>u_,ZodNaN:()=>T_,ZodNanoID:()=>rp,ZodNever:()=>Yy,ZodNonOptional:()=>Sp,ZodNull:()=>Jy,ZodNullable:()=>g_,ZodNumber:()=>Ki,ZodNumberFormat:()=>Zo,ZodObject:()=>kc,ZodOptional:()=>Ep,ZodPipe:()=>Pp,ZodPrefault:()=>b_,ZodPromise:()=>k_,ZodReadonly:()=>w_,ZodRealError:()=>Kt,ZodRecord:()=>$c,ZodSet:()=>l_,ZodString:()=>Wi,ZodStringFormat:()=>We,ZodSuccess:()=>S_,ZodSymbol:()=>Gy,ZodTemplateLiteral:()=>I_,ZodTransform:()=>f_,ZodTuple:()=>a_,ZodType:()=>xe,ZodULID:()=>ip,ZodURL:()=>Ic,ZodUUID:()=>tn,ZodUndefined:()=>Wy,ZodUnion:()=>Cc,ZodUnknown:()=>Qy,ZodVoid:()=>e_,ZodXID:()=>ap,ZodXor:()=>r_,_ZodString:()=>Yd,_default:()=>__,_function:()=>mT,any:()=>Hx,array:()=>Oc,base64:()=>Rx,base64url:()=>Ox,bigint:()=>Fx,boolean:()=>Hy,catch:()=>x_,check:()=>hT,cidrv4:()=>Ax,cidrv6:()=>Ix,clone:()=>bt,codec:()=>dT,coerce:()=>D_,config:()=>it,core:()=>cr,cuid:()=>bx,cuid2:()=>vx,custom:()=>gT,date:()=>Wx,decode:()=>Uy,decodeAsync:()=>My,describe:()=>yT,discriminatedUnion:()=>eT,e164:()=>kx,email:()=>ux,emoji:()=>yx,encode:()=>Dy,encodeAsync:()=>jy,endsWith:()=>Uo,enum:()=>bp,exactOptional:()=>h_,file:()=>sT,flattenError:()=>xi,float32:()=>Ux,float64:()=>jx,formatError:()=>Ti,fromJSONSchema:()=>xT,function:()=>mT,getErrorMap:()=>BD,globalRegistry:()=>vt,gt:()=>Lr,gte:()=>yt,guid:()=>lx,hash:()=>Dx,hex:()=>Nx,hostname:()=>zx,httpUrl:()=>gx,includes:()=>No,instanceof:()=>bT,int:()=>Qd,int32:()=>Mx,int64:()=>Bx,intersection:()=>i_,ipv4:()=>xx,ipv6:()=>wx,iso:()=>Hi,json:()=>ET,jwt:()=>Cx,keyof:()=>Jx,ksuid:()=>Px,lazy:()=>O_,length:()=>Qn,literal:()=>aT,locales:()=>ji,looseObject:()=>Qx,looseRecord:()=>rT,lowercase:()=>$o,lt:()=>Mr,lte:()=>Lt,mac:()=>Tx,map:()=>nT,maxLength:()=>Xn,maxSize:()=>Tn,meta:()=>_T,mime:()=>jo,minLength:()=>ct,minSize:()=>Fr,multipleOf:()=>xn,nan:()=>lT,nanoid:()=>_x,nativeEnum:()=>iT,negative:()=>oc,never:()=>yp,nonnegative:()=>ac,nonoptional:()=>E_,nonpositive:()=>ic,normalize:()=>Mo,null:()=>Ky,nullable:()=>wc,nullish:()=>cT,number:()=>Zy,object:()=>Kx,optional:()=>Tc,overwrite:()=>Tr,parse:()=>Cy,parseAsync:()=>$y,partialRecord:()=>tT,pipe:()=>Ac,positive:()=>nc,prefault:()=>v_,preprocess:()=>ST,prettifyError:()=>Wu,promise:()=>fT,property:()=>sc,readonly:()=>A_,record:()=>c_,refine:()=>$_,regex:()=>Rt,regexes:()=>Jt,registry:()=>xs,safeDecode:()=>Fy,safeDecodeAsync:()=>qy,safeEncode:()=>Ly,safeEncodeAsync:()=>By,safeParse:()=>zy,safeParseAsync:()=>Ny,set:()=>oT,setErrorMap:()=>FD,size:()=>Kn,slugify:()=>Li,startsWith:()=>Do,strictObject:()=>Xx,string:()=>Xd,stringFormat:()=>$x,stringbool:()=>vT,success:()=>uT,superRefine:()=>z_,symbol:()=>Vx,templateLiteral:()=>pT,toJSONSchema:()=>uc,toLowerCase:()=>Fo,toUpperCase:()=>Bo,transform:()=>vp,treeifyError:()=>Gu,trim:()=>Lo,tuple:()=>s_,uint32:()=>Lx,uint64:()=>qx,ulid:()=>Ex,undefined:()=>Zx,union:()=>_p,unknown:()=>Vo,uppercase:()=>zo,url:()=>hx,util:()=>X,uuid:()=>dx,uuidv4:()=>px,uuidv6:()=>fx,uuidv7:()=>mx,void:()=>Gx,xid:()=>Sx,xor:()=>Yx});var Pc={};ar(Pc,{ZodAny:()=>Xy,ZodArray:()=>t_,ZodBase64:()=>pp,ZodBase64URL:()=>fp,ZodBigInt:()=>Qi,ZodBigIntFormat:()=>gp,ZodBoolean:()=>Xi,ZodCIDRv4:()=>lp,ZodCIDRv6:()=>dp,ZodCUID:()=>np,ZodCUID2:()=>op,ZodCatch:()=>P_,ZodCodec:()=>xp,ZodCustom:()=>zc,ZodCustomStringFormat:()=>Ji,ZodDate:()=>Rc,ZodDefault:()=>y_,ZodDiscriminatedUnion:()=>n_,ZodE164:()=>mp,ZodEmail:()=>ep,ZodEmoji:()=>tp,ZodEnum:()=>Gi,ZodExactOptional:()=>m_,ZodFile:()=>p_,ZodFunction:()=>C_,ZodGUID:()=>xc,ZodIPv4:()=>cp,ZodIPv6:()=>up,ZodIntersection:()=>o_,ZodJWT:()=>hp,ZodKSUID:()=>sp,ZodLazy:()=>R_,ZodLiteral:()=>d_,ZodMAC:()=>Vy,ZodMap:()=>u_,ZodNaN:()=>T_,ZodNanoID:()=>rp,ZodNever:()=>Yy,ZodNonOptional:()=>Sp,ZodNull:()=>Jy,ZodNullable:()=>g_,ZodNumber:()=>Ki,ZodNumberFormat:()=>Zo,ZodObject:()=>kc,ZodOptional:()=>Ep,ZodPipe:()=>Pp,ZodPrefault:()=>b_,ZodPromise:()=>k_,ZodReadonly:()=>w_,ZodRecord:()=>$c,ZodSet:()=>l_,ZodString:()=>Wi,ZodStringFormat:()=>We,ZodSuccess:()=>S_,ZodSymbol:()=>Gy,ZodTemplateLiteral:()=>I_,ZodTransform:()=>f_,ZodTuple:()=>a_,ZodType:()=>xe,ZodULID:()=>ip,ZodURL:()=>Ic,ZodUUID:()=>tn,ZodUndefined:()=>Wy,ZodUnion:()=>Cc,ZodUnknown:()=>Qy,ZodVoid:()=>e_,ZodXID:()=>ap,ZodXor:()=>r_,_ZodString:()=>Yd,_default:()=>__,_function:()=>mT,any:()=>Hx,array:()=>Oc,base64:()=>Rx,base64url:()=>Ox,bigint:()=>Fx,boolean:()=>Hy,catch:()=>x_,check:()=>hT,cidrv4:()=>Ax,cidrv6:()=>Ix,codec:()=>dT,cuid:()=>bx,cuid2:()=>vx,custom:()=>gT,date:()=>Wx,describe:()=>yT,discriminatedUnion:()=>eT,e164:()=>kx,email:()=>ux,emoji:()=>yx,enum:()=>bp,exactOptional:()=>h_,file:()=>sT,float32:()=>Ux,float64:()=>jx,function:()=>mT,guid:()=>lx,hash:()=>Dx,hex:()=>Nx,hostname:()=>zx,httpUrl:()=>gx,instanceof:()=>bT,int:()=>Qd,int32:()=>Mx,int64:()=>Bx,intersection:()=>i_,ipv4:()=>xx,ipv6:()=>wx,json:()=>ET,jwt:()=>Cx,keyof:()=>Jx,ksuid:()=>Px,lazy:()=>O_,literal:()=>aT,looseObject:()=>Qx,looseRecord:()=>rT,mac:()=>Tx,map:()=>nT,meta:()=>_T,nan:()=>lT,nanoid:()=>_x,nativeEnum:()=>iT,never:()=>yp,nonoptional:()=>E_,null:()=>Ky,nullable:()=>wc,nullish:()=>cT,number:()=>Zy,object:()=>Kx,optional:()=>Tc,partialRecord:()=>tT,pipe:()=>Ac,prefault:()=>v_,preprocess:()=>ST,promise:()=>fT,readonly:()=>A_,record:()=>c_,refine:()=>$_,set:()=>oT,strictObject:()=>Xx,string:()=>Xd,stringFormat:()=>$x,stringbool:()=>vT,success:()=>uT,superRefine:()=>z_,symbol:()=>Vx,templateLiteral:()=>pT,transform:()=>vp,tuple:()=>s_,uint32:()=>Lx,uint64:()=>qx,ulid:()=>Ex,undefined:()=>Zx,union:()=>_p,unknown:()=>Vo,url:()=>hx,uuid:()=>dx,uuidv4:()=>px,uuidv6:()=>fx,uuidv7:()=>mx,void:()=>Gx,xid:()=>Sx,xor:()=>Yx});var Hd={};ar(Hd,{endsWith:()=>Uo,gt:()=>Lr,gte:()=>yt,includes:()=>No,length:()=>Qn,lowercase:()=>$o,lt:()=>Mr,lte:()=>Lt,maxLength:()=>Xn,maxSize:()=>Tn,mime:()=>jo,minLength:()=>ct,minSize:()=>Fr,multipleOf:()=>xn,negative:()=>oc,nonnegative:()=>ac,nonpositive:()=>ic,normalize:()=>Mo,overwrite:()=>Tr,positive:()=>nc,property:()=>sc,regex:()=>Rt,size:()=>Kn,slugify:()=>Li,startsWith:()=>Do,toLowerCase:()=>Fo,toUpperCase:()=>Bo,trim:()=>Lo,uppercase:()=>zo});var Hi={};ar(Hi,{ZodISODate:()=>Wd,ZodISODateTime:()=>Gd,ZodISODuration:()=>Kd,ZodISOTime:()=>Jd,date:()=>Ry,datetime:()=>Iy,duration:()=>ky,time:()=>Oy});var Gd=A("ZodISODateTime",(e,t)=>{Sl.init(e,t),We.init(e,t)});function Iy(e){return ld(Gd,e)}a(Iy,"datetime");var Wd=A("ZodISODate",(e,t)=>{Pl.init(e,t),We.init(e,t)});function Ry(e){return dd(Wd,e)}a(Ry,"date");var Jd=A("ZodISOTime",(e,t)=>{xl.init(e,t),We.init(e,t)});function Oy(e){return pd(Jd,e)}a(Oy,"time");var Kd=A("ZodISODuration",(e,t)=>{Tl.init(e,t),We.init(e,t)});function ky(e){return fd(Kd,e)}a(ky,"duration");var cx=a((e,t)=>{es.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:a(n=>Ti(e,n),"value")},flatten:{value:a(n=>xi(e,n),"value")},addIssue:{value:a(n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,Ei,2)},"value")},addIssues:{value:a(n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,Ei,2)},"value")},isEmpty:{get(){return e.issues.length===0}}})},"initializer"),jD=A("ZodError",cx),Kt=A("ZodError",cx,{Parent:Error});var Cy=wi(Kt),$y=Ai(Kt),zy=Ii(Kt),Ny=Oi(Kt),Dy=Ju(Kt),Uy=Ku(Kt),jy=Xu(Kt),My=Qu(Kt),Ly=Yu(Kt),Fy=el(Kt),By=tl(Kt),qy=rl(Kt);var xe=A("ZodType",(e,t)=>(he.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Fi(e,"input"),output:Fi(e,"output")}}),e.toJSONSchema=zg(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(X.mergeDefs(t,{checks:[...t.checks??[],...n.map(o=>typeof o=="function"?{_zod:{check:o,def:{check:"custom"},onattach:[]}}:o)]}),{parent:!0}),e.with=e.check,e.clone=(n,o)=>bt(e,n,o),e.brand=()=>e,e.register=((n,o)=>(n.add(e,o),e)),e.parse=(n,o)=>Cy(e,n,o,{callee:e.parse}),e.safeParse=(n,o)=>zy(e,n,o),e.parseAsync=async(n,o)=>$y(e,n,o,{callee:e.parseAsync}),e.safeParseAsync=async(n,o)=>Ny(e,n,o),e.spa=e.safeParseAsync,e.encode=(n,o)=>Dy(e,n,o),e.decode=(n,o)=>Uy(e,n,o),e.encodeAsync=async(n,o)=>jy(e,n,o),e.decodeAsync=async(n,o)=>My(e,n,o),e.safeEncode=(n,o)=>Ly(e,n,o),e.safeDecode=(n,o)=>Fy(e,n,o),e.safeEncodeAsync=async(n,o)=>By(e,n,o),e.safeDecodeAsync=async(n,o)=>qy(e,n,o),e.refine=(n,o)=>e.check($_(n,o)),e.superRefine=n=>e.check(z_(n)),e.overwrite=n=>e.check(Tr(n)),e.optional=()=>Tc(e),e.exactOptional=()=>h_(e),e.nullable=()=>wc(e),e.nullish=()=>Tc(wc(e)),e.nonoptional=n=>E_(e,n),e.array=()=>Oc(e),e.or=n=>_p([e,n]),e.and=n=>i_(e,n),e.transform=n=>Ac(e,vp(n)),e.default=n=>__(e,n),e.prefault=n=>v_(e,n),e.catch=n=>x_(e,n),e.pipe=n=>Ac(e,n),e.readonly=()=>A_(e),e.describe=n=>{let o=e.clone();return vt.add(o,{description:n}),o},Object.defineProperty(e,"description",{get(){return vt.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return vt.get(e);let o=e.clone();return vt.add(o,n[0]),o},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),Yd=A("_ZodString",(e,t)=>{Pn.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(o,r,i)=>Ng(e,o,r,i);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...o)=>e.check(Rt(...o)),e.includes=(...o)=>e.check(No(...o)),e.startsWith=(...o)=>e.check(Do(...o)),e.endsWith=(...o)=>e.check(Uo(...o)),e.min=(...o)=>e.check(ct(...o)),e.max=(...o)=>e.check(Xn(...o)),e.length=(...o)=>e.check(Qn(...o)),e.nonempty=(...o)=>e.check(ct(1,...o)),e.lowercase=o=>e.check($o(o)),e.uppercase=o=>e.check(zo(o)),e.trim=()=>e.check(Lo()),e.normalize=(...o)=>e.check(Mo(...o)),e.toLowerCase=()=>e.check(Fo()),e.toUpperCase=()=>e.check(Bo()),e.slugify=()=>e.check(Li())}),Wi=A("ZodString",(e,t)=>{Pn.init(e,t),Yd.init(e,t),e.email=n=>e.check(As(ep,n)),e.url=n=>e.check(Co(Ic,n)),e.jwt=n=>e.check(Hs(hp,n)),e.emoji=n=>e.check(Cs(tp,n)),e.guid=n=>e.check(Mi(xc,n)),e.uuid=n=>e.check(Is(tn,n)),e.uuidv4=n=>e.check(Rs(tn,n)),e.uuidv6=n=>e.check(Os(tn,n)),e.uuidv7=n=>e.check(ks(tn,n)),e.nanoid=n=>e.check($s(rp,n)),e.guid=n=>e.check(Mi(xc,n)),e.cuid=n=>e.check(zs(np,n)),e.cuid2=n=>e.check(Ns(op,n)),e.ulid=n=>e.check(Ds(ip,n)),e.base64=n=>e.check(qs(pp,n)),e.base64url=n=>e.check(Vs(fp,n)),e.xid=n=>e.check(Us(ap,n)),e.ksuid=n=>e.check(js(sp,n)),e.ipv4=n=>e.check(Ms(cp,n)),e.ipv6=n=>e.check(Ls(up,n)),e.cidrv4=n=>e.check(Fs(lp,n)),e.cidrv6=n=>e.check(Bs(dp,n)),e.e164=n=>e.check(Zs(mp,n)),e.datetime=n=>e.check(Iy(n)),e.date=n=>e.check(Ry(n)),e.time=n=>e.check(Oy(n)),e.duration=n=>e.check(ky(n))});function Xd(e){return Ts(Wi,e)}a(Xd,"string");var We=A("ZodStringFormat",(e,t)=>{Be.init(e,t),Yd.init(e,t)}),ep=A("ZodEmail",(e,t)=>{ml.init(e,t),We.init(e,t)});function ux(e){return As(ep,e)}a(ux,"email");var xc=A("ZodGUID",(e,t)=>{pl.init(e,t),We.init(e,t)});function lx(e){return Mi(xc,e)}a(lx,"guid");var tn=A("ZodUUID",(e,t)=>{fl.init(e,t),We.init(e,t)});function dx(e){return Is(tn,e)}a(dx,"uuid");function px(e){return Rs(tn,e)}a(px,"uuidv4");function fx(e){return Os(tn,e)}a(fx,"uuidv6");function mx(e){return ks(tn,e)}a(mx,"uuidv7");var Ic=A("ZodURL",(e,t)=>{os.init(e,t),We.init(e,t)});function hx(e){return Co(Ic,e)}a(hx,"url");function gx(e){return Co(Ic,{protocol:/^https?$/,hostname:Jt.domain,...X.normalizeParams(e)})}a(gx,"httpUrl");var tp=A("ZodEmoji",(e,t)=>{hl.init(e,t),We.init(e,t)});function yx(e){return Cs(tp,e)}a(yx,"emoji");var rp=A("ZodNanoID",(e,t)=>{gl.init(e,t),We.init(e,t)});function _x(e){return $s(rp,e)}a(_x,"nanoid");var np=A("ZodCUID",(e,t)=>{yl.init(e,t),We.init(e,t)});function bx(e){return zs(np,e)}a(bx,"cuid");var op=A("ZodCUID2",(e,t)=>{_l.init(e,t),We.init(e,t)});function vx(e){return Ns(op,e)}a(vx,"cuid2");var ip=A("ZodULID",(e,t)=>{bl.init(e,t),We.init(e,t)});function Ex(e){return Ds(ip,e)}a(Ex,"ulid");var ap=A("ZodXID",(e,t)=>{vl.init(e,t),We.init(e,t)});function Sx(e){return Us(ap,e)}a(Sx,"xid");var sp=A("ZodKSUID",(e,t)=>{El.init(e,t),We.init(e,t)});function Px(e){return js(sp,e)}a(Px,"ksuid");var cp=A("ZodIPv4",(e,t)=>{wl.init(e,t),We.init(e,t)});function xx(e){return Ms(cp,e)}a(xx,"ipv4");var Vy=A("ZodMAC",(e,t)=>{Il.init(e,t),We.init(e,t)});function Tx(e){return cd(Vy,e)}a(Tx,"mac");var up=A("ZodIPv6",(e,t)=>{Al.init(e,t),We.init(e,t)});function wx(e){return Ls(up,e)}a(wx,"ipv6");var lp=A("ZodCIDRv4",(e,t)=>{Rl.init(e,t),We.init(e,t)});function Ax(e){return Fs(lp,e)}a(Ax,"cidrv4");var dp=A("ZodCIDRv6",(e,t)=>{Ol.init(e,t),We.init(e,t)});function Ix(e){return Bs(dp,e)}a(Ix,"cidrv6");var pp=A("ZodBase64",(e,t)=>{kl.init(e,t),We.init(e,t)});function Rx(e){return qs(pp,e)}a(Rx,"base64");var fp=A("ZodBase64URL",(e,t)=>{Cl.init(e,t),We.init(e,t)});function Ox(e){return Vs(fp,e)}a(Ox,"base64url");var mp=A("ZodE164",(e,t)=>{$l.init(e,t),We.init(e,t)});function kx(e){return Zs(mp,e)}a(kx,"e164");var hp=A("ZodJWT",(e,t)=>{zl.init(e,t),We.init(e,t)});function Cx(e){return Hs(hp,e)}a(Cx,"jwt");var Ji=A("ZodCustomStringFormat",(e,t)=>{Nl.init(e,t),We.init(e,t)});function $x(e,t,n={}){return qo(Ji,e,t,n)}a($x,"stringFormat");function zx(e){return qo(Ji,"hostname",Jt.hostname,e)}a(zx,"hostname");function Nx(e){return qo(Ji,"hex",Jt.hex,e)}a(Nx,"hex");function Dx(e,t){let n=t?.enc??"hex",o=`${e}_${n}`,r=Jt[o];if(!r)throw new Error(`Unrecognized hash format: ${o}`);return qo(Ji,o,r,t)}a(Dx,"hash");var Ki=A("ZodNumber",(e,t)=>{$i.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(o,r,i)=>Dg(e,o,r,i),e.gt=(o,r)=>e.check(Lr(o,r)),e.gte=(o,r)=>e.check(yt(o,r)),e.min=(o,r)=>e.check(yt(o,r)),e.lt=(o,r)=>e.check(Mr(o,r)),e.lte=(o,r)=>e.check(Lt(o,r)),e.max=(o,r)=>e.check(Lt(o,r)),e.int=o=>e.check(Qd(o)),e.safe=o=>e.check(Qd(o)),e.positive=o=>e.check(Lr(0,o)),e.nonnegative=o=>e.check(yt(0,o)),e.negative=o=>e.check(Mr(0,o)),e.nonpositive=o=>e.check(Lt(0,o)),e.multipleOf=(o,r)=>e.check(xn(o,r)),e.step=(o,r)=>e.check(xn(o,r)),e.finite=()=>e;let n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function Zy(e){return Gs(Ki,e)}a(Zy,"number");var Zo=A("ZodNumberFormat",(e,t)=>{is.init(e,t),Ki.init(e,t)});function Qd(e){return Js(Zo,e)}a(Qd,"int");function Ux(e){return md(Zo,e)}a(Ux,"float32");function jx(e){return hd(Zo,e)}a(jx,"float64");function Mx(e){return gd(Zo,e)}a(Mx,"int32");function Lx(e){return yd(Zo,e)}a(Lx,"uint32");var Xi=A("ZodBoolean",(e,t)=>{Oo.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Ug(e,n,o,r)});function Hy(e){return Ks(Xi,e)}a(Hy,"boolean");var Qi=A("ZodBigInt",(e,t)=>{zi.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(o,r,i)=>jg(e,o,r,i),e.gte=(o,r)=>e.check(yt(o,r)),e.min=(o,r)=>e.check(yt(o,r)),e.gt=(o,r)=>e.check(Lr(o,r)),e.gte=(o,r)=>e.check(yt(o,r)),e.min=(o,r)=>e.check(yt(o,r)),e.lt=(o,r)=>e.check(Mr(o,r)),e.lte=(o,r)=>e.check(Lt(o,r)),e.max=(o,r)=>e.check(Lt(o,r)),e.positive=o=>e.check(Lr(BigInt(0),o)),e.negative=o=>e.check(Mr(BigInt(0),o)),e.nonpositive=o=>e.check(Lt(BigInt(0),o)),e.nonnegative=o=>e.check(yt(BigInt(0),o)),e.multipleOf=(o,r)=>e.check(xn(o,r));let n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null});function Fx(e){return _d(Qi,e)}a(Fx,"bigint");var gp=A("ZodBigIntFormat",(e,t)=>{Dl.init(e,t),Qi.init(e,t)});function Bx(e){return bd(gp,e)}a(Bx,"int64");function qx(e){return vd(gp,e)}a(qx,"uint64");var Gy=A("ZodSymbol",(e,t)=>{Ul.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Mg(e,n,o,r)});function Vx(e){return Ed(Gy,e)}a(Vx,"symbol");var Wy=A("ZodUndefined",(e,t)=>{jl.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Fg(e,n,o,r)});function Zx(e){return Sd(Wy,e)}a(Zx,"_undefined");var Jy=A("ZodNull",(e,t)=>{Ml.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Lg(e,n,o,r)});function Ky(e){return Pd(Jy,e)}a(Ky,"_null");var Xy=A("ZodAny",(e,t)=>{as.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Vg(e,n,o,r)});function Hx(){return Ys(Xy)}a(Hx,"any");var Qy=A("ZodUnknown",(e,t)=>{ss.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Zg(e,n,o,r)});function Vo(){return ec(Qy)}a(Vo,"unknown");var Yy=A("ZodNever",(e,t)=>{Ll.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>qg(e,n,o,r)});function yp(e){return xd(Yy,e)}a(yp,"never");var e_=A("ZodVoid",(e,t)=>{cs.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Bg(e,n,o,r)});function Gx(e){return tc(e_,e)}a(Gx,"_void");var Rc=A("ZodDate",(e,t)=>{us.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(o,r,i)=>Hg(e,o,r,i),e.min=(o,r)=>e.check(yt(o,r)),e.max=(o,r)=>e.check(Lt(o,r));let n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});function Wx(e){return Td(Rc,e)}a(Wx,"date");var t_=A("ZodArray",(e,t)=>{ls.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>oy(e,n,o,r),e.element=t.element,e.min=(n,o)=>e.check(ct(n,o)),e.nonempty=n=>e.check(ct(1,n)),e.max=(n,o)=>e.check(Xn(n,o)),e.length=(n,o)=>e.check(Qn(n,o)),e.unwrap=()=>e.element});function Oc(e,t){return $g(t_,e,t)}a(Oc,"array");function Jx(e){let t=e._zod.def.shape;return bp(Object.keys(t))}a(Jx,"keyof");var kc=A("ZodObject",(e,t)=>{Lh.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>iy(e,n,o,r),X.defineLazy(e,"shape",()=>t.shape),e.keyof=()=>bp(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Vo()}),e.loose=()=>e.clone({...e._zod.def,catchall:Vo()}),e.strict=()=>e.clone({...e._zod.def,catchall:yp()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>X.extend(e,n),e.safeExtend=n=>X.safeExtend(e,n),e.merge=n=>X.merge(e,n),e.pick=n=>X.pick(e,n),e.omit=n=>X.omit(e,n),e.partial=(...n)=>X.partial(Ep,e,n[0]),e.required=(...n)=>X.required(Sp,e,n[0])});function Kx(e,t){let n={type:"object",shape:e??{},...X.normalizeParams(t)};return new kc(n)}a(Kx,"object");function Xx(e,t){return new kc({type:"object",shape:e,catchall:yp(),...X.normalizeParams(t)})}a(Xx,"strictObject");function Qx(e,t){return new kc({type:"object",shape:e,catchall:Vo(),...X.normalizeParams(t)})}a(Qx,"looseObject");var Cc=A("ZodUnion",(e,t)=>{ko.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>zd(e,n,o,r),e.options=t.options});function _p(e,t){return new Cc({type:"union",options:e,...X.normalizeParams(t)})}a(_p,"union");var r_=A("ZodXor",(e,t)=>{Cc.init(e,t),Bl.init(e,t),e._zod.processJSONSchema=(n,o,r)=>zd(e,n,o,r),e.options=t.options});function Yx(e,t){return new r_({type:"union",options:e,inclusive:!1,...X.normalizeParams(t)})}a(Yx,"xor");var n_=A("ZodDiscriminatedUnion",(e,t)=>{Cc.init(e,t),ds.init(e,t)});function eT(e,t,n){return new n_({type:"union",options:t,discriminator:e,...X.normalizeParams(n)})}a(eT,"discriminatedUnion");var o_=A("ZodIntersection",(e,t)=>{ql.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>ay(e,n,o,r)});function i_(e,t){return new o_({type:"intersection",left:e,right:t})}a(i_,"intersection");var a_=A("ZodTuple",(e,t)=>{ps.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>sy(e,n,o,r),e.rest=n=>e.clone({...e._zod.def,rest:n})});function s_(e,t,n){let o=t instanceof he,r=o?n:t,i=o?t:null;return new a_({type:"tuple",items:e,rest:i,...X.normalizeParams(r)})}a(s_,"tuple");var $c=A("ZodRecord",(e,t)=>{fs.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>cy(e,n,o,r),e.keyType=t.keyType,e.valueType=t.valueType});function c_(e,t,n){return new $c({type:"record",keyType:e,valueType:t,...X.normalizeParams(n)})}a(c_,"record");function tT(e,t,n){let o=bt(e);return o._zod.values=void 0,new $c({type:"record",keyType:o,valueType:t,...X.normalizeParams(n)})}a(tT,"partialRecord");function rT(e,t,n){return new $c({type:"record",keyType:e,valueType:t,mode:"loose",...X.normalizeParams(n)})}a(rT,"looseRecord");var u_=A("ZodMap",(e,t)=>{Vl.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>ry(e,n,o,r),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...n)=>e.check(Fr(...n)),e.nonempty=n=>e.check(Fr(1,n)),e.max=(...n)=>e.check(Tn(...n)),e.size=(...n)=>e.check(Kn(...n))});function nT(e,t,n){return new u_({type:"map",keyType:e,valueType:t,...X.normalizeParams(n)})}a(nT,"map");var l_=A("ZodSet",(e,t)=>{Zl.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>ny(e,n,o,r),e.min=(...n)=>e.check(Fr(...n)),e.nonempty=n=>e.check(Fr(1,n)),e.max=(...n)=>e.check(Tn(...n)),e.size=(...n)=>e.check(Kn(...n))});function oT(e,t){return new l_({type:"set",valueType:e,...X.normalizeParams(t)})}a(oT,"set");var Gi=A("ZodEnum",(e,t)=>{ms.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(o,r,i)=>Gg(e,o,r,i),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(o,r)=>{let i={};for(let s of o)if(n.has(s))i[s]=t.entries[s];else throw new Error(`Key ${s} not found in enum`);return new Gi({...t,checks:[],...X.normalizeParams(r),entries:i})},e.exclude=(o,r)=>{let i={...t.entries};for(let s of o)if(n.has(s))delete i[s];else throw new Error(`Key ${s} not found in enum`);return new Gi({...t,checks:[],...X.normalizeParams(r),entries:i})}});function bp(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(o=>[o,o])):e;return new Gi({type:"enum",entries:n,...X.normalizeParams(t)})}a(bp,"_enum");function iT(e,t){return new Gi({type:"enum",entries:e,...X.normalizeParams(t)})}a(iT,"nativeEnum");var d_=A("ZodLiteral",(e,t)=>{hs.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Wg(e,n,o,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function aT(e,t){return new d_({type:"literal",values:Array.isArray(e)?e:[e],...X.normalizeParams(t)})}a(aT,"literal");var p_=A("ZodFile",(e,t)=>{Hl.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Xg(e,n,o,r),e.min=(n,o)=>e.check(Fr(n,o)),e.max=(n,o)=>e.check(Tn(n,o)),e.mime=(n,o)=>e.check(jo(Array.isArray(n)?n:[n],o))});function sT(e){return Ad(p_,e)}a(sT,"file");var f_=A("ZodTransform",(e,t)=>{gs.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>ty(e,n,o,r),e._zod.parse=(n,o)=>{if(o.direction==="backward")throw new Zn(e.constructor.name);n.addIssue=i=>{if(typeof i=="string")n.issues.push(X.issue(i,n.value,t));else{let s=i;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=n.value),s.inst??(s.inst=e),n.issues.push(X.issue(s))}};let r=t.transform(n.value,n);return r instanceof Promise?r.then(i=>(n.value=i,n)):(n.value=r,n)}});function vp(e){return new f_({type:"transform",transform:e})}a(vp,"transform");var Ep=A("ZodOptional",(e,t)=>{Ni.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Nd(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function Tc(e){return new Ep({type:"optional",innerType:e})}a(Tc,"optional");var m_=A("ZodExactOptional",(e,t)=>{Gl.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Nd(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function h_(e){return new m_({type:"optional",innerType:e})}a(h_,"exactOptional");var g_=A("ZodNullable",(e,t)=>{ys.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>uy(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function wc(e){return new g_({type:"nullable",innerType:e})}a(wc,"nullable");function cT(e){return Tc(wc(e))}a(cT,"nullish");var y_=A("ZodDefault",(e,t)=>{Wl.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>dy(e,n,o,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function __(e,t){return new y_({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():X.shallowClone(t)}})}a(__,"_default");var b_=A("ZodPrefault",(e,t)=>{Jl.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>py(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function v_(e,t){return new b_({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():X.shallowClone(t)}})}a(v_,"prefault");var Sp=A("ZodNonOptional",(e,t)=>{Kl.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>ly(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function E_(e,t){return new Sp({type:"nonoptional",innerType:e,...X.normalizeParams(t)})}a(E_,"nonoptional");var S_=A("ZodSuccess",(e,t)=>{Xl.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Qg(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function uT(e){return new S_({type:"success",innerType:e})}a(uT,"success");var P_=A("ZodCatch",(e,t)=>{Ql.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>fy(e,n,o,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function x_(e,t){return new P_({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}a(x_,"_catch");var T_=A("ZodNaN",(e,t)=>{Yl.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Jg(e,n,o,r)});function lT(e){return wd(T_,e)}a(lT,"nan");var Pp=A("ZodPipe",(e,t)=>{_s.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>my(e,n,o,r),e.in=t.in,e.out=t.out});function Ac(e,t){return new Pp({type:"pipe",in:e,out:t})}a(Ac,"pipe");var xp=A("ZodCodec",(e,t)=>{Pp.init(e,t),Di.init(e,t)});function dT(e,t,n){return new xp({type:"pipe",in:e,out:t,transform:n.decode,reverseTransform:n.encode})}a(dT,"codec");var w_=A("ZodReadonly",(e,t)=>{ed.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>hy(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function A_(e){return new w_({type:"readonly",innerType:e})}a(A_,"readonly");var I_=A("ZodTemplateLiteral",(e,t)=>{td.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Kg(e,n,o,r)});function pT(e,t){return new I_({type:"template_literal",parts:e,...X.normalizeParams(t)})}a(pT,"templateLiteral");var R_=A("ZodLazy",(e,t)=>{od.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>yy(e,n,o,r),e.unwrap=()=>e._zod.def.getter()});function O_(e){return new R_({type:"lazy",getter:e})}a(O_,"lazy");var k_=A("ZodPromise",(e,t)=>{nd.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>gy(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function fT(e){return new k_({type:"promise",innerType:e})}a(fT,"promise");var C_=A("ZodFunction",(e,t)=>{rd.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>ey(e,n,o,r)});function mT(e){return new C_({type:"function",input:Array.isArray(e?.input)?s_(e?.input):e?.input??Oc(Vo()),output:e?.output??Vo()})}a(mT,"_function");var zc=A("ZodCustom",(e,t)=>{bs.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Yg(e,n,o,r)});function hT(e){let t=new Ge({check:"custom"});return t._zod.check=e,t}a(hT,"check");function gT(e,t){return cc(zc,e??(()=>!0),t)}a(gT,"custom");function $_(e,t={}){return Id(zc,e,t)}a($_,"refine");function z_(e){return Rd(e)}a(z_,"superRefine");var yT=Od,_T=kd;function bT(e,t={}){let n=new zc({type:"custom",check:"custom",fn:a(o=>o instanceof e,"fn"),abort:!0,...X.normalizeParams(t)});return n._zod.bag.Class=e,n._zod.check=o=>{o.value instanceof e||o.issues.push({code:"invalid_type",expected:e.name,input:o.value,inst:n,path:[...n._zod.def.path??[]]})},n}a(bT,"_instanceof");var vT=a((...e)=>Cd({Codec:xp,Boolean:Xi,String:Wi},...e),"stringbool");function ET(e){let t=O_(()=>_p([Xd(e),Zy(),Hy(),Ky(),Oc(t),c_(Xd(),t)]));return t}a(ET,"json");function ST(e,t){return Ac(vp(e),t)}a(ST,"preprocess");var LD={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(e){it({customError:e})}a(FD,"setErrorMap");function BD(){return it().customError}a(BD,"getErrorMap");var N_;N_||(N_={});var re={...Pc,...Hd,iso:Hi},qD=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 VD(e,t){let n=e.$schema;return n==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":n==="http://json-schema.org/draft-07/schema#"?"draft-7":n==="http://json-schema.org/draft-04/schema#"?"draft-4":t??"draft-2020-12"}a(VD,"detectVersion");function ZD(e,t){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let n=e.slice(1).split("/").filter(Boolean);if(n.length===0)return t.rootSchema;let o=t.version==="draft-2020-12"?"$defs":"definitions";if(n[0]===o){let r=n[1];if(!r||!t.defs[r])throw new Error(`Reference not found: ${e}`);return t.defs[r]}throw new Error(`Reference not found: ${e}`)}a(ZD,"resolveRef");function PT(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return re.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(e.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(e.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){let r=e.$ref;if(t.refs.has(r))return t.refs.get(r);if(t.processing.has(r))return re.lazy(()=>{if(!t.refs.has(r))throw new Error(`Circular reference not resolved: ${r}`);return t.refs.get(r)});t.processing.add(r);let i=ZD(r,t),s=zt(i,t);return t.refs.set(r,s),t.processing.delete(r),s}if(e.enum!==void 0){let r=e.enum;if(t.version==="openapi-3.0"&&e.nullable===!0&&r.length===1&&r[0]===null)return re.null();if(r.length===0)return re.never();if(r.length===1)return re.literal(r[0]);if(r.every(s=>typeof s=="string"))return re.enum(r);let i=r.map(s=>re.literal(s));return i.length<2?i[0]:re.union([i[0],i[1],...i.slice(2)])}if(e.const!==void 0)return re.literal(e.const);let n=e.type;if(Array.isArray(n)){let r=n.map(i=>{let s={...e,type:i};return PT(s,t)});return r.length===0?re.never():r.length===1?r[0]:re.union(r)}if(!n)return re.any();let o;switch(n){case"string":{let r=re.string();if(e.format){let i=e.format;i==="email"?r=r.check(re.email()):i==="uri"||i==="uri-reference"?r=r.check(re.url()):i==="uuid"||i==="guid"?r=r.check(re.uuid()):i==="date-time"?r=r.check(re.iso.datetime()):i==="date"?r=r.check(re.iso.date()):i==="time"?r=r.check(re.iso.time()):i==="duration"?r=r.check(re.iso.duration()):i==="ipv4"?r=r.check(re.ipv4()):i==="ipv6"?r=r.check(re.ipv6()):i==="mac"?r=r.check(re.mac()):i==="cidr"?r=r.check(re.cidrv4()):i==="cidr-v6"?r=r.check(re.cidrv6()):i==="base64"?r=r.check(re.base64()):i==="base64url"?r=r.check(re.base64url()):i==="e164"?r=r.check(re.e164()):i==="jwt"?r=r.check(re.jwt()):i==="emoji"?r=r.check(re.emoji()):i==="nanoid"?r=r.check(re.nanoid()):i==="cuid"?r=r.check(re.cuid()):i==="cuid2"?r=r.check(re.cuid2()):i==="ulid"?r=r.check(re.ulid()):i==="xid"?r=r.check(re.xid()):i==="ksuid"&&(r=r.check(re.ksuid()))}typeof e.minLength=="number"&&(r=r.min(e.minLength)),typeof e.maxLength=="number"&&(r=r.max(e.maxLength)),e.pattern&&(r=r.regex(new RegExp(e.pattern))),o=r;break}case"number":case"integer":{let r=n==="integer"?re.number().int():re.number();typeof e.minimum=="number"&&(r=r.min(e.minimum)),typeof e.maximum=="number"&&(r=r.max(e.maximum)),typeof e.exclusiveMinimum=="number"?r=r.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(r=r.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?r=r.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(r=r.lt(e.maximum)),typeof e.multipleOf=="number"&&(r=r.multipleOf(e.multipleOf)),o=r;break}case"boolean":{o=re.boolean();break}case"null":{o=re.null();break}case"object":{let r={},i=e.properties||{},s=new Set(e.required||[]);for(let[d,p]of Object.entries(i)){let f=zt(p,t);r[d]=s.has(d)?f:f.optional()}if(e.propertyNames){let d=zt(e.propertyNames,t),p=e.additionalProperties&&typeof e.additionalProperties=="object"?zt(e.additionalProperties,t):re.any();if(Object.keys(r).length===0){o=re.record(d,p);break}let f=re.object(r).passthrough(),g=re.looseRecord(d,p);o=re.intersection(f,g);break}if(e.patternProperties){let d=e.patternProperties,p=Object.keys(d),f=[];for(let y of p){let h=zt(d[y],t),_=re.string().regex(new RegExp(y));f.push(re.looseRecord(_,h))}let g=[];if(Object.keys(r).length>0&&g.push(re.object(r).passthrough()),g.push(...f),g.length===0)o=re.object({}).passthrough();else if(g.length===1)o=g[0];else{let y=re.intersection(g[0],g[1]);for(let h=2;h<g.length;h++)y=re.intersection(y,g[h]);o=y}break}let u=re.object(r);e.additionalProperties===!1?o=u.strict():typeof e.additionalProperties=="object"?o=u.catchall(zt(e.additionalProperties,t)):o=u.passthrough();break}case"array":{let r=e.prefixItems,i=e.items;if(r&&Array.isArray(r)){let s=r.map(d=>zt(d,t)),u=i&&typeof i=="object"&&!Array.isArray(i)?zt(i,t):void 0;u?o=re.tuple(s).rest(u):o=re.tuple(s),typeof e.minItems=="number"&&(o=o.check(re.minLength(e.minItems))),typeof e.maxItems=="number"&&(o=o.check(re.maxLength(e.maxItems)))}else if(Array.isArray(i)){let s=i.map(d=>zt(d,t)),u=e.additionalItems&&typeof e.additionalItems=="object"?zt(e.additionalItems,t):void 0;u?o=re.tuple(s).rest(u):o=re.tuple(s),typeof e.minItems=="number"&&(o=o.check(re.minLength(e.minItems))),typeof e.maxItems=="number"&&(o=o.check(re.maxLength(e.maxItems)))}else if(i!==void 0){let s=zt(i,t),u=re.array(s);typeof e.minItems=="number"&&(u=u.min(e.minItems)),typeof e.maxItems=="number"&&(u=u.max(e.maxItems)),o=u}else o=re.array(re.any());break}default:throw new Error(`Unsupported type: ${n}`)}return e.description&&(o=o.describe(e.description)),e.default!==void 0&&(o=o.default(e.default)),o}a(PT,"convertBaseSchema");function zt(e,t){if(typeof e=="boolean")return e?re.any():re.never();let n=PT(e,t),o=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let u=e.anyOf.map(p=>zt(p,t)),d=re.union(u);n=o?re.intersection(n,d):d}if(e.oneOf&&Array.isArray(e.oneOf)){let u=e.oneOf.map(p=>zt(p,t)),d=re.xor(u);n=o?re.intersection(n,d):d}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)n=o?n:re.any();else{let u=o?n:zt(e.allOf[0],t),d=o?0:1;for(let p=d;p<e.allOf.length;p++)u=re.intersection(u,zt(e.allOf[p],t));n=u}e.nullable===!0&&t.version==="openapi-3.0"&&(n=re.nullable(n)),e.readOnly===!0&&(n=re.readonly(n));let r={},i=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let u of i)u in e&&(r[u]=e[u]);let s=["contentEncoding","contentMediaType","contentSchema"];for(let u of s)u in e&&(r[u]=e[u]);for(let u of Object.keys(e))qD.has(u)||(r[u]=e[u]);return Object.keys(r).length>0&&t.registry.add(n,r),n}a(zt,"convertSchema");function xT(e,t){if(typeof e=="boolean")return e?re.any():re.never();let n=VD(e,t?.defaultTarget),o=e.$defs||e.definitions||{},r={version:n,defs:o,refs:new Map,processing:new Set,rootSchema:e,registry:t?.registry??vt};return zt(e,r)}a(xT,"fromJSONSchema");var D_={};ar(D_,{bigint:()=>JD,boolean:()=>WD,date:()=>KD,number:()=>GD,string:()=>HD});function HD(e){return ws(Wi,e)}a(HD,"string");function GD(e){return Ws(Ki,e)}a(GD,"number");function WD(e){return Xs(Xi,e)}a(WD,"boolean");function JD(e){return Qs(Qi,e)}a(JD,"bigint");function KD(e){return rc(Rc,e)}a(KD,"date");it(vs());var zW=Tp.enum(["active","out_of_credits","rejected","unreachable"]);var TT=(o=>(o.AGENT_DECIDE="agent-decide",o.CHOOSE_YOURSELF="choose-yourself",o.LEAVE_EMPTY="leave-empty",o))(TT||{}),U_=(n=>(n.FILE="FILE",n.TABLE="TABLE",n))(U_||{}),j_=(o=>(o.SSE="sse",o.STREAMABLE_HTTP="streamable-http",o.SIMPLE_HTTP="http",o))(j_||{});var M_=(o=>(o.TEXT="text",o.NUMBER="number",o.BOOLEAN="boolean",o))(M_||{});var L_=(n=>(n.IN_PROGRESS="in-progress",n.COMPLETED="completed",n))(L_||{});var XD=k({mode:pe(TT),value:_e()}),QD=k({auth:F(b()),fields:be(b(),XD)}),YD=k({pieceName:b(),pieceVersion:b(),actionName:b(),predefinedInput:F(QD)}),eU=k({type:le("PIECE"),toolName:b().check(ct(1)),pieceMetadata:YD}),tU=k({type:le("none")}),rU=k({type:le("access_token"),accessToken:b()}),nU=k({type:le("api_key"),apiKey:b(),apiKeyHeader:b()}),oU=k({type:le("headers"),headers:be(b(),b())}),iU=ro("type",[tU,rU,nU,oU]),wT=k({type:le("FLOW"),toolName:b().check(ct(1)),externalFlowId:b(),flowDisplayName:F(b())}),AT=k({type:le("MCP"),toolName:b().check(ct(1)),serverUrl:qP(),protocol:pe(j_),auth:iU}),IT=k({type:le("KNOWLEDGE_BASE"),toolName:b().check(ct(1)),sourceType:pe(U_),sourceId:b(),sourceName:b()}),aU=ro("type",[eU,wT,AT,IT]),sU=k({displayName:b(),description:F(b()),type:pe(M_)}),RT=k({type:le("MARKDOWN"),markdown:b()}),Yi={type:le("TOOL_CALL"),input:at(be(b(),_e())),output:F(_e()),toolName:b(),status:pe(L_),toolCallId:b(),startTime:b(),endTime:F(b())},cJ=k(Yi),OT=ro("toolCallType",[k({...Yi,toolCallType:le("PIECE"),pieceName:b(),pieceVersion:b(),actionName:b()}),k({...Yi,toolCallType:le("FLOW"),displayName:b(),externalFlowId:b()}),k({...Yi,toolCallType:le("MCP"),displayName:b(),serverUrl:b()}),k({...Yi,toolCallType:le("KNOWLEDGE_BASE"),displayName:b(),sourceType:b()}),k({...Yi,toolCallType:le("UNKNOWN"),displayName:b()})]),cU=Pe([RT,OT]);var uU=10800*1e3,lU=900*1e3;var B_=(n=>(n.IMAGE="image",n.TEXT="text",n))(B_||{}),On=k({apiKey:b()}),pU=On,fU=k({apiKey:b(),apiKeyHash:b()}),mU=On,hU=On,gU=On,yU=On,_U=On,bU=On,vU=On,zT=k({serviceAccountJson:b().check(ct(1))}),NT=k({accessKeyId:b().check(ct(1)),secretAccessKey:b().check(ct(1))}),EU=k({}),SU=k({}),PU=k({}),xU=k({}),TU=k({}),wU=k({}),q_=k({modelId:b(),modelName:b(),modelType:pe(B_)}),DT=k({apiKeyHeader:b(),baseUrl:b(),models:me(q_),defaultHeaders:F(be(b(),b())),apiStyle:F(pe(["chat","responses"]))}),UT=k({accountId:b(),gatewayId:b(),models:me(q_),vertexProject:F(b()),vertexRegion:F(b())}),jT=k({resourceName:b(),apiVersion:oo(no(e=>typeof e=="string"&&e.trim().length===0?void 0:e),F(b()))}),MT=k({region:b().check(ct(1))}),LT=k({project:b().check(Rt(/^[a-z0-9][a-z0-9-]{0,62}$/)),region:b().check(Rt(/^[a-z0-9][a-z0-9-]{0,62}$/)),models:me(q_)}),FT=k({}),AU=Pe([pU,gU,yU,_U,bU,hU,mU,fU,NT,zT,vU]),BT=Pe([DT,UT,jT,LT,MT,EU,PU,xU,TU,SU,wU,FT]),IU=k({id:b(),name:b(),type:pe(B_)}),RU=k({id:b(),name:b(),provider:pe(Zi),config:BT,enabledForChat:ze()}),OU=k({provider:pe(Zi),name:b(),enabledForChat:ze(),keys:me(k({id:b(),name:b()}))}),kU=k({provider:pe(Zi),configId:b(),config:BT,auth:AU,platformId:b()});var pJ={openai:"openai",anthropic:"anthropic","google-ai-studio":"google","google-vertex-ai":"google"},kT=["gpt-5.5","gpt-5.4-mini","gpt-5.4-nano","gpt-4.1","gpt-4.1-mini"],CU=["claude-sonnet-4-6","claude-opus-4-7","claude-haiku-4-5"],qT=["claude-sonnet-4.6","claude-opus-4.7","claude-opus-4.8","claude-haiku-4.5"],F_=["gemini-2.5-pro","gemini-2.5-flash","gemini-3.7-flash","gemini-3.1-pro-preview","gemini-3-flash-preview"],$U=["grok-4.20"],fJ=qT.map(e=>`anthropic/${e}`),zU={openai:kT,anthropic:CU,google:F_,vertex:F_,activepieces:[...qT.map(e=>`anthropic/${e}`),...kT.map(e=>`openai/${e}`),...F_.map(e=>`google/${e}`),...$U.map(e=>`x-ai/${e}`)]};var CT=128e3,NU={openai:128e3,anthropic:2e5,google:1048576,bedrock:2e5,vertex:1048576,azure:128e3,openrouter:128e3,activepieces:2e5,mistral:128e3};function DU({provider:e}){return e?NU[e]??CT:CT}a(DU,"getMaxContextTokens");var $T={openai:"text-embedding-3-small",google:"text-embedding-004",azure:"text-embedding-3-small",activepieces:"text-embedding-3-small",openrouter:"openai/text-embedding-3-small"},UU={anthropic:"native",google:"native",openrouter:"plugin",activepieces:"plugin"},jU=new Set(["anthropic","mistral","xai","deepseek","zai","qwen","minimax","moonshot"]),MU={xai:"https://api.x.ai/v1",deepseek:"https://api.deepseek.com/v1",zai:"https://api.z.ai/api/paas/v4",qwen:"https://dashscope-intl.aliyuncs.com/compatible-mode/v1",minimax:"https://api.minimax.io/v1",moonshot:"https://api.moonshot.ai/v1"};function Ot(e){return{chatModels:zU[e],maxContextTokens:DU({provider:e}),defaultEmbeddingModel:$T[e],supportsEmbedding:$T[e]!==void 0,supportsImageGeneration:!jU.has(e),webSearch:UU[e]}}a(Ot,"buildProviderCapabilities");var LU={openai:Ot("openai"),anthropic:Ot("anthropic"),openrouter:Ot("openrouter"),azure:Ot("azure"),google:Ot("google"),"cloudflare-gateway":Ot("cloudflare-gateway"),custom:Ot("custom"),bedrock:Ot("bedrock"),vertex:Ot("vertex"),mistral:Ot("mistral"),activepieces:Ot("activepieces"),xai:Ot("xai"),deepseek:Ot("deepseek"),zai:Ot("zai"),qwen:Ot("qwen"),minimax:Ot("minimax"),moonshot:Ot("moonshot")};var FU=k({base64Url:b(),fileName:b(),extension:F(b())}),BU=k({mimeType:b(),url:b(),fileName:F(b())}),V_=Pe([FU,BU]);var qU=Pe([k({type:le("file"),value:V_}),k({type:le("markdown"),value:b(),files:F(me(V_))})]),VU=k({sessionId:b(),message:b(),files:F(me(b()))});var ZT=(n=>(n.ON_NEW_RECORD="ON_NEW_RECORD",n.ON_UPDATE_RECORD="ON_UPDATE_RECORD",n))(ZT||{}),HT=(n=>(n.ENABLED="ENABLED",n.DISABLED="DISABLED",n))(HT||{}),Z_=(o=>(o.RECORD_CREATED="RECORD_CREATED",o.RECORD_UPDATED="RECORD_UPDATED",o.RECORD_DELETED="RECORD_DELETED",o))(Z_||{});var ZU=Pe([k({...wr,name:b(),externalId:b(),type:le("STATIC_DROPDOWN"),tableId:b(),projectId:b(),data:k({options:me(k({value:b()}))})}),k({...wr,name:b(),externalId:b(),type:Pe([le("TEXT"),le("NUMBER"),le("DATE"),le("DATETIME")]),tableId:b(),projectId:b()})]),HU=k({...wr,name:b(),folderId:at(b()),projectId:b(),externalId:b(),status:Ay(HT),trigger:Ay(ZT)}),GU=k({...wr,tableId:b(),projectId:b(),cells:be(b(),k({updated:b(),created:b(),value:_e(),fieldName:b()}))}),WU=k({events:me(pe(Z_)),webhookUrl:b(),flowId:b()}),JU=k({fields:me(k({id:b(),name:b()})),rows:me(be(b(),b())),name:b()}),KU=k({projectId:b(),limit:F(pc.number()),cursor:F(b()),name:F(b()),externalIds:Vd(b()),folderId:F(b()),folderIds:Vd(b())}),XU=k({records:me(me(k({fieldId:b(),value:WT()}))),tableId:b()}),QU=k({cells:F(me(k({fieldId:b(),value:WT()}))),tableId:b(),agentUpdate:F(ze())}),GT=ro("operator",[Ho("eq"),Ho("neq"),Ho("gt"),Ho("gte"),Ho("lt"),Ho("lte"),Ho("co"),VT("exists"),VT("not_exists")]),YU=k({tableId:b(),limit:F(pc.number()),cursor:F(b()),filters:Vd(GT)});function WT(){return oo(no(e=>e==null?e:String(e)),dc(b()))}a(WT,"coerceToString");function Ho(e){return k({fieldId:b(),operator:le(e),value:b()})}a(Ho,"valueFilter");function VT(e){return k({fieldId:b(),operator:le(e)})}a(VT,"existenceFilter");var ej=k({status:F(Et()),body:F(_e()),headers:F(be(b(),b()))}),tj=k({...wr,deleted:at(ao),ownerId:b(),displayName:b(),platformId:b(),externalId:at(b())});var JT=k({name:b(),description:F(b()),type:b(),required:ze()}),rj=k({pieceName:b(),triggerName:b(),input:k({toolName:b(),toolDescription:b(),inputSchema:me(JT),returnsResponse:ze()})});var KT="^[0-9]+\\.[0-9]+\\.[0-9]+$",CJ=new RegExp(KT),oj="^([~^])?[0-9]+\\.[0-9]+\\.[0-9]+$",$J=b().check(Rt(new RegExp(KT))),zJ=b().check(Rt(new RegExp(oj))),ij=k({packageType:le("ARCHIVE"),pieceType:pe(Bi),pieceName:b(),pieceVersion:b(),archiveId:b(),platformId:b()}),XT=k({packageType:le("REGISTRY"),pieceType:le("OFFICIAL"),pieceName:b(),pieceVersion:b()}),QT=k({packageType:le("REGISTRY"),pieceType:le("CUSTOM"),pieceName:b(),pieceVersion:b(),platformId:b()}),NJ=Pe([XT,QT]),DJ=Pe([ij,XT,QT]);var aj=ro("type",[k({type:le("CRON_EXPRESSION"),cronExpression:b(),timezone:b()}),k({type:le("INTERVAL"),intervalMs:VP().check(yt(6e4))})]),UJ=k({...wr,type:pe(Br),projectId:b(),flowId:b(),triggerName:b(),schedule:at(aj),flowVersionId:b(),pieceName:b(),pieceVersion:b(),deleted:at(b()),simulate:ze()}),YT=(S=>(S.UNKNOWN="UNKNOWN",S.FLOW_RUN_LOG="FLOW_RUN_LOG",S.FLOW_RUN_LOG_SLICE="FLOW_RUN_LOG_SLICE",S.PACKAGE_ARCHIVE="PACKAGE_ARCHIVE",S.FLOW_STEP_FILE="FLOW_STEP_FILE",S.SAMPLE_DATA="SAMPLE_DATA",S.TRIGGER_PAYLOAD="TRIGGER_PAYLOAD",S.SAMPLE_DATA_INPUT="SAMPLE_DATA_INPUT",S.TRIGGER_EVENT_FILE="TRIGGER_EVENT_FILE",S.PROJECT_RELEASE="PROJECT_RELEASE",S.FLOW_VERSION_BACKUP="FLOW_VERSION_BACKUP",S.PLATFORM_ASSET="PLATFORM_ASSET",S.USER_PROFILE_PICTURE="USER_PROFILE_PICTURE",S.WEBHOOK_PAYLOAD="WEBHOOK_PAYLOAD",S.KNOWLEDGE_BASE="KNOWLEDGE_BASE",S.FLOW_BUNDLE="FLOW_BUNDLE",S.PREWARM_SCOPE="PREWARM_SCOPE",S))(YT||{}),ew=(n=>(n.NONE="NONE",n.ZSTD="ZSTD",n))(ew||{}),tw=(n=>(n.S3="S3",n.DB="DB",n))(tw||{}),jJ=k({...wr,projectId:at(b()),platformId:at(b()),type:pe(YT),compression:pe(ew),data:F(_e()),location:pe(tw),size:at(Et()),fileName:at(b()),s3Key:at(b()),metadata:at(be(b(),b()))}),rw=(o=>(o.ADMIN="ADMIN",o.MEMBER="MEMBER",o.OPERATOR="OPERATOR",o))(rw||{}),nw=(n=>(n.ACTIVE="ACTIVE",n.INACTIVE="INACTIVE",n))(nw||{}),MJ=k({id:b(),email:b(),firstName:b(),status:pe(nw),externalId:at(b()),platformId:at(b()),platformRole:pe(rw),lastName:b(),created:ao,updated:ao,lastActiveDate:at(ao),imageUrl:at(b())});var G_=k({...ke.shape,...ve(be(b(),_e()),"OBJECT").shape});var W_=k({...ke.shape,formatProperty:F(b()),...ve(b(),"RICH_TEXT").shape});var aw=k({...ke.shape,...ve(b(),"COLOR").shape});var J_=Pe([ur,wn,W_,Fd,In,lr,An,Ey,fc,Py,Rn,gc,G_,yc,hc,Sy,mc,aw]),ne={ShortText(e){return{...e,valueSchema:void 0,type:"SHORT_TEXT"}},Checkbox(e){return{...e,valueSchema:void 0,type:"CHECKBOX"}},LongText(e){return{...e,valueSchema:void 0,type:"LONG_TEXT"}},RichText(e){return{...e,valueSchema:void 0,type:"RICH_TEXT"}},MarkDown(e){return{displayName:"Markdown",required:!1,description:e.value,type:"MARKDOWN",valueSchema:void 0,variant:e.variant??"INFO"}},Number(e){return{...e,valueSchema:void 0,type:"NUMBER"}},Json(e){return{...e,valueSchema:void 0,type:"JSON"}},Array(e){return{...e,valueSchema:void 0,type:"ARRAY"}},Object(e){return{...e,valueSchema:void 0,type:"OBJECT"}},Dropdown(e){return{...e,valueSchema:void 0,type:"DROPDOWN"}},StaticDropdown(e){return{...e,valueSchema:void 0,type:"STATIC_DROPDOWN"}},MultiSelectDropdown(e){return{...e,valueSchema:void 0,type:"MULTI_SELECT_DROPDOWN"}},DynamicProperties(e){return{...e,valueSchema:void 0,type:"DYNAMIC"}},StaticMultiSelectDropdown(e){return{...e,valueSchema:void 0,type:"STATIC_MULTI_SELECT_DROPDOWN"}},DateTime(e){return{...e,valueSchema:void 0,type:"DATE_TIME"}},DateRange(e){return{...e,valueSchema:void 0,type:"DATE_RANGE"}},File(e){return{...e,valueSchema:void 0,type:"FILE"}},Custom(e){let t=e.code.toString();return{...e,code:t,valueSchema:void 0,type:"CUSTOM"}},Color(e){return{...e,valueSchema:void 0,type:"COLOR"}}};var rn=k({displayName:b(),description:F(b()),hasConnectionIdentifier:F(ze())});var sw=k({username:b(),password:b()}),K_=k({...rn.shape,username:k({displayName:b(),description:F(b())}),password:k({displayName:b(),description:F(b())}),...ve(sw,"BASIC_AUTH").shape});var lj=be(b(),Pe([ur,wn,Rn,In,lr])),X_=k({...rn.shape,props:lj,...ve(_e(),"CUSTOM_AUTH").shape});var Go=k({...rn.shape,...ve(k({auth:b()}),"SECRET_TEXT").shape});var dj=be(b(),Pe([ur,wn,Go,Rn,In,lr,An,Fd])),cw=k({...rn.shape,props:dj,...ve(_e(),"OIDC").shape});var Q_=(n=>(n.HEADER="HEADER",n.BODY="BODY",n))(Q_||{}),uw=Pe([ur,Go,lr]),lw=be(b(),uw),pj=k({props:F(be(b(),uw)),authUrl:b(),tokenUrl:b(),scope:me(b()),prompt:F(Pe([le("none"),le("consent"),le("login"),le("omit")])),pkce:F(ze()),pkceMethod:F(Pe([le("plain"),le("S256")])),authorizationMethod:F(pe(Q_)),grantType:F(Pe([pe(bc),le(xy)])),extra:F(be(b(),b()))}),dw=k({access_token:b(),props:F(lw),data:be(b(),lc())}),Y_=k({...rn.shape,...pj.shape,...ve(dw,"OAUTH2").shape});var ea=Pe([K_,X_,cw,Y_,Go]),Nc="Connection",wp={SecretText(e){return{...e,valueSchema:void 0,type:"SECRET_TEXT"}},OAuth2(e){return{...e,valueSchema:void 0,type:"OAUTH2",displayName:e.displayName||Nc}},BasicAuth(e){return{...e,valueSchema:void 0,type:"BASIC_AUTH",displayName:e.displayName||Nc,required:!0}},CustomAuth(e){return{...e,valueSchema:void 0,type:"CUSTOM_AUTH",displayName:e.displayName||Nc}},OIDC(e){return{...e,valueSchema:void 0,type:"OIDC",displayName:e.displayName||Nc}},None(){}};var SK={OAUTH2:"OAUTH2",CLOUD_OAUTH2:"OAUTH2",PLATFORM_OAUTH2:"OAUTH2",BASIC_AUTH:"BASIC_AUTH",CUSTOM_AUTH:"CUSTOM_AUTH",OIDC:"OIDC",SECRET_TEXT:"SECRET_TEXT",NO_AUTH:void 0};var fj=k({...ke.shape,...ve(_e(),"CUSTOM").shape,code:b()});var mj=Pe([J_,ea]),eb=be(b(),mj),qK=be(b(),J_);var pw=Pe([k({strategy:le("CRON"),cronExpression:b()}),k({strategy:le("NONE")})]),ta=class{constructor(t,n,o,r,i,s,u,d,p,f,g,y,h,_,P,x,S,$,V,W,Z){this.name=t;this.displayName=n;this.description=o;this.requireAuth=r;this.props=i;this.type=s;this.handshakeConfiguration=u;this.onHandshake=d;this.renewConfiguration=p;this.onRenew=f;this.onEnable=g;this.onDisable=y;this.onStart=h;this.run=_;this.test=P;this.sampleData=x;this.testStrategy=S;this.outputSchema=$;this.aiMetadata=V;this.classification=W;this.propertyGroups=Z}static{a(this,"ITrigger")}},so=a(e=>{switch(e.type){case"WEBHOOK":return new ta(e.name,e.displayName,e.description,e.requireAuth??!0,e.props,e.type,e.handshakeConfiguration??{strategy:"NONE"},e.onHandshake??(async()=>({status:200})),e.renewConfiguration??{strategy:"NONE"},e.onRenew??(async()=>Promise.resolve()),e.onEnable,e.onDisable,e.onStart??(async()=>Promise.resolve()),e.run,e.test??(()=>Promise.resolve([e.sampleData])),e.sampleData,e.test?"TEST_FUNCTION":"SIMULATION",e.outputSchema,e.aiMetadata,e.classification,e.propertyGroups);case"POLLING":return new ta(e.name,e.displayName,e.description,e.requireAuth??!0,e.props,e.type,{strategy:"NONE"},async()=>({status:200}),{strategy:"NONE"},(async()=>Promise.resolve()),e.onEnable,e.onDisable,e.onStart??(async()=>Promise.resolve()),e.run,e.test??(()=>Promise.resolve([e.sampleData])),e.sampleData,"TEST_FUNCTION",e.outputSchema,e.aiMetadata,e.classification,e.propertyGroups);case"MANUAL":return new ta(e.name,e.displayName,e.description,e.requireAuth??!0,e.props,e.type,{strategy:"NONE"},async()=>({status:200}),{strategy:"NONE"},(async()=>Promise.resolve()),e.onEnable,e.onDisable,e.onStart??(async()=>Promise.resolve()),e.run,e.test??(()=>Promise.resolve([e.sampleData])),e.sampleData,"TEST_FUNCTION",e.outputSchema,e.aiMetadata,e.classification,e.propertyGroups);case"APP_WEBHOOK":return new ta(e.name,e.displayName,e.description,e.requireAuth??!0,e.props,e.type,{strategy:"NONE"},async()=>({status:200}),{strategy:"NONE"},(async()=>Promise.resolve()),e.onEnable,e.onDisable,e.onStart??(async()=>Promise.resolve()),e.run,e.test??(()=>Promise.resolve([e.sampleData])),e.sampleData,ut(e.sampleData)&&ut(e.test)?"SIMULATION":"TEST_FUNCTION",e.outputSchema,e.aiMetadata,e.classification,e.propertyGroups)}},"createTrigger");var fw="2",Ap="0.82.0";var tb=class{constructor(t,n,o,r,i,s,u,d,p=Ap,f,g="",y){this.displayName=t;this.logoUrl=n;this.authors=o;this.events=r;this.categories=u;this.auth=d;this.minimumSupportedRelease=p;this.maximumSupportedRelease=f;this.description=g;this.deprecated=y;this._actions={};this._triggers={};this.getContextInfo=a(()=>({version:fw}),"getContextInfo");(!gj(p)||yj(p,Ap))&&(this.minimumSupportedRelease=Ap),i.forEach(h=>this._actions[h.name]=h),s.forEach(h=>this._triggers[h.name]=h)}static{a(this,"Piece")}metadata(){return{displayName:this.displayName,logoUrl:this.logoUrl,actions:this._actions,triggers:this._triggers,categories:this.categories,description:this.description,authors:this.authors,auth:hj(this.auth),minimumSupportedRelease:this.minimumSupportedRelease,maximumSupportedRelease:this.maximumSupportedRelease,deprecated:this.deprecated,contextInfo:this.getContextInfo?.()}}getAction(t){return this._actions[t]}getTrigger(t){return this._triggers[t]}actions(){return this._actions}triggers(){return this._triggers}},hw=a(e=>{if(e.auth&&Array.isArray(e.auth)&&!e.auth.every((n,o,r)=>o===r.findIndex(i=>i.type===n.type)))throw new Error("Auth properties must be unique by type");return new tb(e.displayName,e.logoUrl,e.authors??[],e.events,e.actions,e.triggers,e.categories??[],e.auth,e.minimumSupportedRelease,e.maximumSupportedRelease,e.description,e.deprecated)},"createPiece");function hj(e){if(e!==void 0)return Array.isArray(e)?e.map(mw):mw(e)}a(hj,"withConnectionIdentifierFlag");function mw(e){return{...e,hasConnectionIdentifier:e.getConnectionIdentifier!==void 0}}a(mw,"flagConnectionIdentifier");function gj(e){return/^\d+\.\d+\.\d+$/.test(e)}a(gj,"isValidSimpleSemver");function yj(e,t){let[n,o,r]=e.split(".").map(Number),[i,s,u]=t.split(".").map(Number);return n!==i?n<i:o!==s?o<s:r<u}a(yj,"isSemverLessThan");var _j=F(be(b(),be(b(),b()))),gw=k({id:F(b()),name:b(),displayName:b(),logoUrl:b(),description:b(),authors:me(b()),platformId:F(b()),directoryPath:F(b()),auth:F(Pe([ea,me(ea)])),version:b(),categories:F(me(pe(qi))),minimumSupportedRelease:F(b()),maximumSupportedRelease:F(b()),deprecated:F(ze()),i18n:_j}),bj=pe(["human","ai","both"]),yw=k({description:F(b()),idempotent:F(ze())}),_w=pe(["READ","SEARCH","WRITE","DESTRUCTIVE"]);var vj=pe(["tabs","section","summary","builder","footer"]),bw=k({key:b(),display:vj,label:F(b()),description:F(b()),icon:F(b()),props:me(b())}),vw=k({name:b(),displayName:b(),description:b(),props:eb,propertyGroups:F(me(bw)),requireAuth:ze(),errorHandlingOptions:F(vy),outputSchema:F(Md()),audience:F(bj),aiMetadata:F(yw),classification:F(_w)}),Ew=k({name:b(),displayName:b(),description:b(),props:eb,propertyGroups:F(me(bw)),errorHandlingOptions:F(vy),type:pe(Br),sampleData:_e(),handshakeConfiguration:F(Md()),renewConfiguration:F(pw),testStrategy:pe(Ec),outputSchema:F(Md()),aiMetadata:F(yw),classification:F(_w)}),Ej=k({...gw.shape,actions:be(b(),vw),triggers:be(b(),Ew)}),Sj=k({...gw.shape,actions:Et(),triggers:Et(),suggestedActions:F(me(vw)),suggestedTriggers:F(me(Ew))}),Sw=k({projectUsage:Et(),pieceType:pe(Bi),packageType:pe(_c),platformId:F(b()),archiveId:F(b())}),H5=k({...Ej.shape,...Sw.shape}),G5=k({...Sj.shape,...Sw.shape}),W5=k({name:b(),version:b()});var Pj=It(require("path")),xj=It(require("fs/promises"));var ra=require("node:stream");var Ip=class{constructor(t,n){this.baseUrl=t;this.authenticationConverter=n}static{a(this,"BaseHttpClient")}getUrl(t){let n=new URL(`${this.baseUrl}${t.url}`),o=`${n.origin}${n.pathname}`,r=new URLSearchParams;return n.searchParams.forEach((i,s)=>{r.append(s,i)}),{urlWithoutQueryParams:o,queryParams:r}}getHeaders(t){let n={Accept:"application/json"};return t.authentication&&this.populateAuthentication(t.authentication,n),t.body&&(t.headers?.["Content-Type"]==="text/csv"?n["Content-Type"]="text/csv":n["Content-Type"]="application/json"),t.headers&&(n={...n,...t.headers}),n}populateAuthentication(t,n){this.authenticationConverter.convert(t,n)}};var Rp=class{static{a(this,"DelegatingAuthenticationConverter")}constructor(t=new rb,n=new nb){this.converters={BEARER_TOKEN:t,BASIC:n}}convert(t,n){return this.converters[t.type].convert(t,n)}},rb=class{static{a(this,"BearerTokenAuthenticationConverter")}convert(t,n){return n.Authorization=`Bearer ${t.token}`,n}},nb=class{static{a(this,"BasicTokenAuthenticationConverter")}convert(t,n){let o=`${t.username}:${t.password}`,r=Buffer.from(o).toString("base64");return n.Authorization=`Basic ${r}`,n}};var Dc=class extends Error{constructor(n,o){let r=o.status||500,i=Buffer.isBuffer(o.responseBody)?o.responseBody.toString():o.responseBody;super(JSON.stringify({response:{status:r,body:i},request:{body:n}}));this.requestBody=n;this.status=r,this.responseBody=i}static{a(this,"HttpError")}errorMessage(){return{response:{status:this.status,body:this.responseBody},request:{body:this.requestBody}}}get response(){return{status:this.status,body:this.responseBody}}get request(){return{body:this.requestBody}}};function Pw({error:e,requestBody:t}){return e instanceof Dc?e.errorMessage():{response:{status:0,body:e instanceof Error?e.message:String(e)},request:{body:t}}}a(Pw,"toFailsafeOutput");var Bt=(s=>(s.GET="GET",s.POST="POST",s.PATCH="PATCH",s.PUT="PUT",s.DELETE="DELETE",s.HEAD="HEAD",s))(Bt||{});var Op=class extends Ip{static{a(this,"FetchHttpClient")}constructor(t="",n=new Rp){super(t,n)}async sendRequest(t,n){process.env.NODE_TLS_REJECT_UNAUTHORIZED="0";let{urlWithoutQueryParams:o,queryParams:r}=this.getUrl(t),i=this.getHeaders(t),s=t.queryParams??{};for(let[V,W]of Object.entries(s))r.append(V,W);let u=r.toString(),d=u?`${o}?${u}`:o,p=t.responseType??"json",f=t.followRedirects??!0,g=t.retries??0,{body:y,extraHeaders:h,isStream:_}=kp(t.method)?Tj(t.body,i):{body:void 0,extraHeaders:{},isStream:!1},P=Aj({...i,...h}),x=await wj(async()=>{let V=new AbortController,W=t.timeout&&t.timeout>0?setTimeout(()=>V.abort(),t.timeout):void 0;try{let Z={method:t.method.toString(),headers:P,body:y,redirect:f?"follow":"manual",signal:V.signal};return _&&(Z.duplex="half"),n?.dispatcher!==void 0&&(Z.dispatcher=n.dispatcher),await fetch(d,Z)}finally{W!==void 0&&clearTimeout(W)}},_?0:g),S=f?300:400;if(x.status<200||x.status>=S){let V=await xw(x,p==="stream"?"text":p),W=new Dc(t.body,{status:x.status,responseBody:V});throw console.error("[HttpClient#(sanitized error message)] Request failed:",W),W}let $=await xw(x,p);return{status:x.status,headers:Ij(x.headers),body:$}}};function kp(e){return e!=="GET"&&e!=="HEAD"}a(kp,"acceptsRequestBody");function Tj(e,t){if(ww(e))return{body:void 0,extraHeaders:{},isStream:!1};if(Oj(e)){let o=Rj(e);if(o!==null)return{body:o,extraHeaders:e.getHeaders(),isStream:!1};let r=new ra.PassThrough;return e.on("error",i=>r.destroy(i)),e.pipe(r),{body:r,extraHeaders:e.getHeaders(),isStream:!0}}return e instanceof ra.Readable?{body:e,extraHeaders:{},isStream:!0}:typeof e=="string"||Buffer.isBuffer(e)||e instanceof URLSearchParams||e instanceof ArrayBuffer||typeof FormData<"u"&&e instanceof FormData||typeof Blob<"u"&&e instanceof Blob?{body:e,extraHeaders:{},isStream:!1}:(t["Content-Type"]??t["content-type"]??"").includes("application/x-www-form-urlencoded")?{body:new URLSearchParams(e).toString(),extraHeaders:{},isStream:!1}:{body:JSON.stringify(e),extraHeaders:{},isStream:!1}}a(Tj,"serializeBody");async function xw(e,t){switch(t){case"arraybuffer":return Buffer.from(await e.arrayBuffer());case"stream":return ww(e.body)?ra.Readable.from([]):ra.Readable.fromWeb(e.body);case"blob":return await e.blob();case"text":return await e.text();default:{let n=await e.text();if(n.length===0)return;try{return JSON.parse(n)}catch{return n}}}}a(xw,"parseResponseBody");async function wj(e,t){let n;for(let o=0;o<=t;o++)try{let r=await e();if(r.status>=500&&o<t){await Tw(o);continue}return r}catch(r){if(n=r,o<t){await Tw(o);continue}throw r}throw n}a(wj,"sendWithRetries");function Tw(e){let t=Math.min(1e3*2**e,3e4);return new Promise(n=>setTimeout(n,t))}a(Tw,"backoff");function Aj(e){let t=new Map;for(let[n,o]of Object.entries(e))o!==void 0&&t.set(n.toLowerCase(),[n,Array.isArray(o)?o.join(", "):o]);return Object.fromEntries(t.values())}a(Aj,"normalizeHeaders");function Ij(e){let t={};return e.forEach((n,o)=>{t[o]=n}),t}a(Ij,"toHttpHeaders");function Rj(e){if(!e.hasKnownLength()||e.getLengthSync()>kj)return null;let{data:t}=Ty(()=>e.getBuffer());return t}a(Rj,"bufferFormDataIfSafe");function Oj(e){return typeof e=="object"&&e!==null&&typeof e.getHeaders=="function"&&typeof e.pipe=="function"&&typeof e.on=="function"}a(Oj,"isNodeFormData");function ww(e){return e==null}a(ww,"isNil");var kj=100*1024*1024;var Ie=new Op;var _L=It(require("fs")),CI=It(kI());var bL={"application/json":"json","application/pdf":"pdf","application/xml":"xml","text/xml":"xml","application/zip":"zip","application/gzip":"gz","application/x-tar":"tar","application/octet-stream":"bin","application/msword":"doc","application/vnd.openxmlformats-officedocument.wordprocessingml.document":"docx","application/vnd.ms-excel":"xls","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":"xlsx","application/vnd.ms-powerpoint":"ppt","application/vnd.openxmlformats-officedocument.presentationml.presentation":"pptx","application/rtf":"rtf","application/javascript":"js","application/x-www-form-urlencoded":"bin","text/plain":"txt","text/html":"html","text/css":"css","text/csv":"csv","text/calendar":"ics","text/markdown":"md","image/png":"png","image/jpeg":"jpeg","image/jpg":"jpg","image/gif":"gif","image/webp":"webp","image/svg+xml":"svg","image/bmp":"bmp","image/tiff":"tiff","image/x-icon":"ico","image/vnd.microsoft.icon":"ico","image/heic":"heic","audio/mpeg":"mp3","audio/mp4":"m4a","audio/wav":"wav","audio/x-wav":"wav","audio/ogg":"ogg","audio/webm":"weba","video/mp4":"mp4","video/mpeg":"mpeg","video/webm":"webm","video/quicktime":"mov","video/x-msvideo":"avi","font/woff":"woff","font/woff2":"woff2","font/ttf":"ttf","font/otf":"otf"};function vL(e){let t=e.split(";")[0].trim().toLowerCase();return bL[t]??""}a(vL,"contentTypeToExtension");var EL=a(({baseUrl:e,relativePath:t})=>{let n=e.endsWith("/")?e:`${e}/`,o=t.startsWith("/")?t.slice(1):t;return`${n}${o}`},"joinBaseUrlWithRelativePath"),SL=a((e,t)=>{let n="https://api.example.com";try{let o=t?e(t):void 0;return(o?.endsWith("/")?o.slice(0,-1):o)??n}catch{return n}},"getBaseUrlForDescription");function $I({auth:e,baseUrl:t,authMapping:n,description:o,displayName:r,name:i,props:s,extraProps:u,authLocation:d="headers",classification:p="WRITE"}){return dt({audience:"human",name:i||"custom_api_call",classification:p,displayName:r||"Custom API Call",description:o||"Make a custom API call to a specific endpoint",auth:e,requireAuth:!!e,props:{url:ne.DynamicProperties({auth:e,displayName:"",required:!0,refreshers:[],props:a(async({auth:f})=>({url:ne.ShortText({displayName:"URL",description:`Full URL, or a path relative to ${SL(t,f)}`,required:!0,placeholder:"/resource",defaultValue:f?t(f):"",...s?.url??{}})}),"props")}),method:ne.StaticDropdown({displayName:"Method",required:!0,defaultValue:"GET",options:{options:Object.values(Bt).map(f=>({label:f,value:f}))},...s?.method??{}}),headers:ne.Object({displayName:"Headers",description:"Authorization headers are injected automatically from your connection.",required:!1,...s?.headers??{}}),queryParams:ne.Object({displayName:"Query Parameters",description:"Appended to the URL as ?key=value.",required:!1,...s?.queryParams??{}}),body_type:ne.Dropdown({auth:e,displayName:"Body Type",required:!1,defaultValue:"none",refreshers:["method"],options:a(async({method:f})=>kp(f)?{disabled:!1,options:[{label:"None",value:"none"},{label:"JSON",value:"json"},{label:"Form Data",value:"form_data"},{label:"Raw",value:"raw"}]}:{disabled:!0,placeholder:"Not available for GET or HEAD requests",options:[]},"options")}),body:ne.DynamicProperties({auth:e,displayName:"Body",refreshers:["body_type","method"],required:!1,props:a(async({body_type:f,method:g})=>{if(!f||!kp(g))return{};let y=f,h={};switch(y){case"none":break;case"json":h.data=ne.Json({displayName:"JSON Body",required:!0,...s?.body??{}});break;case"raw":h.data=ne.LongText({displayName:"Raw Body",required:!0});break;case"form_data":h.data=ne.Array({displayName:"Form Data",required:!0,properties:{fieldName:ne.ShortText({displayName:"Field Name",required:!0}),fieldType:ne.StaticDropdown({displayName:"Field Type",required:!0,options:{disabled:!1,options:[{label:"Text",value:"text"},{label:"File",value:"file"}]}}),textFieldValue:ne.LongText({displayName:"Text Field Value",required:!1}),fileFieldValue:ne.File({displayName:"File Field Value",required:!1})}});break}return h},"props")}),response_is_binary:ne.Checkbox({displayName:"Response is Binary",description:"Enable for files like PDFs, images, etc.",required:!1,defaultValue:!1,advanced:!0,...s?.response_is_binary??{}}),failsafe:ne.Checkbox({displayName:"Return Error as Output",description:"On a failed request, output the error instead of failing the step.",required:!1,advanced:!0,...s?.failsafe??{}}),timeout:ne.Number({displayName:"Timeout",description:"Seconds to wait for a response. Empty: up to the flow limit (10 min).",required:!1,advanced:!0,...s?.timeout??{}}),followRedirects:ne.Checkbox({displayName:"Follow redirects",description:"Follow 3xx redirects instead of returning them as the response.",required:!1,defaultValue:!1,advanced:!0,...s?.followRedirects??{}}),...u},run:a(async f=>{let{method:g,url:y,headers:h,queryParams:_,body:P,body_type:x,failsafe:S,timeout:$,response_is_binary:V,followRedirects:W}=f.propsValue;qd(g,"Method"),qd(y,"URL");let Z=ut(n)?{}:await n(f.auth,f.propsValue),G=y.url,te=G.startsWith("http://")||G.startsWith("https://")?G:EL({baseUrl:t(f.auth),relativePath:G}),ce={method:g,url:te,headers:{...h??{},...d==="headers"||!ut(d)?Z:{}},queryParams:{...d==="queryParams"?Z:{},..._??{}},timeout:$?$*1e3:0,followRedirects:W};if(V&&(ce.responseType="arraybuffer"),P)if(x&&x!=="none"){let Y=P.data;if(x==="form_data"){let Ze=Y,we=new CI.default;for(let{fieldName:Te,fieldType:Me,textFieldValue:je,fileFieldValue:Ve}of Ze)Me==="text"&&!Sc(je)?we.append(Te,je):Me==="file"&&!Sc(Ve)&&we.append(Te,Ve.data,{filename:Ve?.filename});ce.body=we,ce.headers={...ce.headers,...we.getHeaders()}}else ce.body=Y}else x||(ce.body=P);try{let Y=await Ie.sendRequest(ce);return await PL(f.files,Y.body,Y.status,Y.headers,V)}catch(Y){if(S)return Pw({error:Y,requestBody:ce.body});throw Y}},"run")})}a($I,"createCustomApiCallAction");var PL=a(async(e,t,n,o,r)=>{let i;if(r&&xL(t)){let s=Array.isArray(o?.["content-type"])?o["content-type"][0]:o?.["content-type"],u=vL(s??"")||"txt",d;t instanceof ArrayBuffer?d=Buffer.from(new Uint8Array(t)):Buffer.isBuffer(t)?d=t:d=Buffer.from(t),i=await e.write({fileName:`output.${u}`,data:d})}else i=t;return{status:n,headers:o,body:i}},"handleBinaryResponse"),xL=a(e=>e instanceof ArrayBuffer||Buffer.isBuffer(e),"isBinaryBody");var pt={async poll(e,{store:t,auth:n,propsValue:o,maxItemsToPoll:r,files:i,server:s}){switch(e.strategy){case 0:{let u=await t.get("lastPoll");if(ut(u))throw new Error("lastPoll doesn't exist in the store.");let d=await e.items({store:t,auth:n,propsValue:o,lastFetchEpochMS:u,server:s}),p=d.reduce((f,g)=>Math.max(f,g.epochMilliSeconds),u);return await t.put("lastPoll",p),d.filter(f=>f.epochMilliSeconds>u).map(f=>f.data)}case 1:{let u=await t.get("lastItem"),d=await e.items({store:t,auth:n,propsValue:o,lastItemId:u,files:i,server:s}),p=d.findIndex(y=>y.id===u),f=[];ut(u)||p==-1?f=d??[]:f=d?.slice(0,p)??[],ut(r)||(f=f.slice(-r));let g=f?.[0]?.id;return ut(g)||await t.put("lastItem",g),f.map(y=>y.data)}}},async onEnable(e,{store:t,auth:n,propsValue:o,server:r,isRepublish:i}){switch(e.strategy){case 0:{if(i&&!ut(await t.get("lastPoll")))break;await t.put("lastPoll",Date.now());break}case 1:{if(i&&!ut(await t.get("lastItem")))break;let u=(await e.items({store:t,auth:n,propsValue:o,lastItemId:null,server:r}))?.[0]?.id;ut(u)?await t.delete("lastItem"):await t.put("lastItem",u);break}}},async onDisable(e,t){switch(e.strategy){case 0:case 1:return}},async test(e,{auth:t,propsValue:n,store:o,files:r,server:i}){let s=[];switch(e.strategy){case 0:{s=await e.items({store:o,auth:t,propsValue:n,lastFetchEpochMS:0,server:i});break}case 1:{s=await e.items({store:o,auth:t,propsValue:n,lastItemId:null,files:r,server:i});break}}return TL(s.map(u=>u.data))}};function TL(e){return e.length<=5?e:e.slice(0,5)}a(TL,"getFirstFiveOrAll");var VE=It(MC());var Ce="https://bigquery.googleapis.com/bigquery/v2",qE=["https://www.googleapis.com/auth/bigquery","email"],Ue=[wp.OAuth2({description:"Sign in with your Google account. If you are using your own OAuth2 credentials, make sure to include the following scope: `https://www.googleapis.com/auth/bigquery`",authUrl:"https://accounts.google.com/o/oauth2/auth",tokenUrl:"https://oauth2.googleapis.com/token",required:!0,scope:qE}),wp.CustomAuth({displayName:"Service Account",description:"Use a GCP service account for automated, server-to-server access \u2014 no user sign-in required. Recommended for production workflows.",required:!0,props:{instructions:ne.MarkDown({value:`**How to create a service account key:**
57
95
 
58
96
  1. Open [Google Cloud Console](https://console.cloud.google.com/) and select your project from the top dropdown.
59
97
  2. Go to **IAM & Admin** \u2192 **Service Accounts** in the left sidebar.
@@ -62,8 +100,8 @@ i.e ${dR(e,m)}/resource or /resource`,required:!0,defaultValue:m?e(m):"",...c?.u
62
100
  5. Under **Grant this service account access**, add the **BigQuery User** role (or **BigQuery Admin** for full access). Click **Done**.
63
101
  6. Click on the service account you just created, then open the **Keys** tab.
64
102
  7. Click **Add Key** \u2192 **Create new key** \u2192 select **JSON** \u2192 click **Create**.
65
- 8. A \`.json\` file will download \u2014 open it in a text editor and paste the entire contents into the field below.`}),serviceAccountJson:K.ShortText({displayName:"Service Account JSON",description:"Paste the full contents of the downloaded .json key file here",required:!0})},validate:o(async({auth:t})=>{try{let e=JSON.parse(t.serviceAccountJson);if(!e.client_email||!e.private_key)return{valid:!1,error:'Service account JSON must contain "client_email" and "private_key" fields'};if(!(await new Gp.JWT({email:e.client_email,key:e.private_key,scopes:Hp}).getAccessToken()).token)throw new Error("Empty token returned");return{valid:!0}}catch(e){return{valid:!1,error:`Service account authentication failed: ${e.message}`}}},"validate")})];async function Ne(t){if(t.type==="CUSTOM_AUTH"){let e=JSON.parse(t.props.serviceAccountJson),n=await new Gp.JWT({email:e.client_email,key:e.private_key,scopes:Hp}).getAccessToken();if(n.token)return n.token;throw new Error("Could not retrieve access token from service account JSON")}return t.access_token}o(Ne,"getAccessToken");var Ve=K.Dropdown({auth:ke,displayName:"Project",description:"Select your Google Cloud project",refreshers:[],required:!0,options:o(async({auth:t})=>{if(!t)return{disabled:!0,options:[],placeholder:"Please connect your account first"};try{let e=await Ne(t);return{disabled:!1,options:((await Se.sendRequest({method:"GET",url:`${Ae}/projects`,headers:{Authorization:`Bearer ${e}`},queryParams:{maxResults:"200"}})).body.projects??[]).map(i=>({label:i.friendlyName?`${i.friendlyName} (${i.projectReference.projectId})`:i.projectReference.projectId,value:i.projectReference.projectId}))}}catch{return{disabled:!0,options:[],placeholder:"Failed to load projects. Check your connection."}}},"options")}),ht=K.Dropdown({auth:ke,displayName:"Dataset",description:"Select the BigQuery dataset",refreshers:["project_id"],required:!0,options:o(async({auth:t,project_id:e})=>{if(!t||!e)return{disabled:!0,options:[],placeholder:"Please select a project first"};try{let r=await Ne(t),n=[],i;do{let u=await Se.sendRequest({method:"GET",url:`${Ae}/projects/${e}/datasets`,headers:{Authorization:`Bearer ${r}`},queryParams:{maxResults:"200",...i?{pageToken:i}:{}}});for(let c of u.body.datasets??[])n.push({label:c.friendlyName??c.datasetReference.datasetId,value:c.datasetReference.datasetId});i=u.body.nextPageToken}while(i);return{disabled:!1,options:n}}catch{return{disabled:!0,options:[],placeholder:"Failed to load datasets. Check your project selection."}}},"options")}),gt=K.Dropdown({auth:ke,displayName:"Table",description:"Select the BigQuery table",refreshers:["project_id","dataset_id"],required:!0,options:o(async({auth:t,project_id:e,dataset_id:r})=>{if(!t||!e||!r)return{disabled:!0,options:[],placeholder:"Please select a project and dataset first"};try{let n=await Ne(t),i=[],u;do{let c=await Se.sendRequest({method:"GET",url:`${Ae}/projects/${e}/datasets/${r}/tables`,headers:{Authorization:`Bearer ${n}`},queryParams:{maxResults:"200",...u?{pageToken:u}:{}}});for(let l of c.body.tables??[]){let p=l.friendlyName?`${l.friendlyName} (${l.tableReference.tableId})`:l.tableReference.tableId;i.push({label:p,value:l.tableReference.tableId})}u=c.body.nextPageToken}while(u);return{disabled:!1,options:i}}catch{return{disabled:!0,options:[],placeholder:"Failed to load tables. Check your dataset selection."}}},"options")});function Dt(t,e){return e.map(r=>{let n={};return t.forEach((i,u)=>{let c=r.f[u]?.v;c==null?n[i.name]=null:Array.isArray(c)?n[i.name]=c.map(l=>typeof l.v=="object"?JSON.stringify(l.v):String(l.v??"")).join(", "):typeof c=="object"?n[i.name]=JSON.stringify(c):n[i.name]=c}),n})}o(Dt,"bigQueryRowsToFlat");async function DP(t,e,r,n){return(await Se.sendRequest({method:"GET",url:`${Ae}/projects/${e}/datasets/${r}/tables/${n}`,headers:{Authorization:`Bearer ${t}`},queryParams:{fields:"schema"}})).body.schema?.fields??[]}o(DP,"getTableSchema");async function Fu(t,e,r,n){let u=(await Se.sendRequest({method:"POST",url:`${Ae}/projects/${e}/queries`,headers:{Authorization:`Bearer ${t}`},body:{query:r,useLegacySql:!1,timeoutMs:1e4,...n?{location:n}:{}}})).body.jobReference.jobId;for(let c=0;c<60;c++){let l=await Se.sendRequest({method:"GET",url:`${Ae}/projects/${e}/jobs/${u}`,headers:{Authorization:`Bearer ${t}`},queryParams:{...n?{location:n}:{}}});if(l.body.status.state==="DONE"){if(l.body.status.errorResult)throw new Error(`Query failed: ${l.body.status.errorResult.message}`);let p=l.body.statistics?.query?.dmlStats??{},f=parseInt(p.deletedRowCount??"0",10),m=parseInt(p.updatedRowCount??"0",10),y=parseInt(p.insertedRowCount??"0",10);return{jobId:u,affectedRowCount:f+m+y,deletedRowCount:f,updatedRowCount:m,insertedRowCount:y}}await new Promise(p=>setTimeout(p,2e3))}throw new Error("DML query timed out after 2 minutes.")}o(Fu,"runDmlQuery");async function oi(t,e,r,n){for(let i=0;i<60;i++){let u=await Se.sendRequest({method:"GET",url:`${Ae}/projects/${e}/queries/${r}`,headers:{Authorization:`Bearer ${t}`},queryParams:{timeoutMs:"10000",maxResults:"1000",...n?{location:n}:{}}});if(u.body.jobComplete)return u.body}throw new Error("Query did not complete within 10 minutes. Try simplifying your query or using a smaller dataset.")}o(oi,"waitForJobResults");var UP=nt({auth:ke,name:"run_query",classification:"WRITE",displayName:"Run a Query",description:"Execute a SQL query on BigQuery and return the results as flat rows",audience:"both",aiMetadata:{description:"Runs an arbitrary standard-SQL (or legacy-SQL) statement against BigQuery in a given project and returns the result rows, paginating up to the max-rows cap. Use it for any ad-hoc read or aggregation when no purpose-built action fits, or when you need full SQL control. Note that BigQuery SQL is not limited to reads \u2014 a DML/DDL statement passed here will mutate data \u2014 so idempotency depends on the query you supply; a plain SELECT is safe to repeat.",idempotent:!1},props:{project_id:Ve,query:K.LongText({displayName:"SQL Query",description:"The SQL query to run. Uses standard SQL syntax. Example: `SELECT * FROM \\`my_dataset.my_table\\` LIMIT 100`",required:!0}),max_results:K.Number({displayName:"Max Rows",description:"Maximum number of rows to return (up to 10,000)",required:!1,defaultValue:1e3}),location:K.ShortText({displayName:"Location",description:"Geographic location of your dataset (e.g. US, EU, us-central1). Leave blank for US.",required:!1}),use_legacy_sql:K.Checkbox({displayName:"Use Legacy SQL",description:"Enable only if your query uses BigQuery Legacy SQL syntax (not recommended)",required:!1,defaultValue:!1})},async run(t){let{project_id:e,query:r,max_results:n,location:i,use_legacy_sql:u}=t.propsValue,c=Math.min(n??1e3,1e4),l=await Ne(t.auth),f=(await Se.sendRequest({method:"POST",url:`${Ae}/projects/${e}/queries`,headers:{Authorization:`Bearer ${l}`},body:{query:r,useLegacySql:u??!1,maxResults:Math.min(c,1e3),timeoutMs:1e4,...i?{location:i}:{}}})).body,m=f.schema?.fields??[];if(!f.jobComplete){let b=f.jobReference.jobId,T=await oi(l,e,b,i??void 0);f={...T,jobReference:{projectId:e,jobId:b}},m=T.schema?.fields??m}let y=[...f.rows??[]],P=f.pageToken;for(;P&&y.length<c;){let b=c-y.length,T=await Se.sendRequest({method:"GET",url:`${Ae}/projects/${e}/queries/${f.jobReference.jobId}`,headers:{Authorization:`Bearer ${l}`},queryParams:{pageToken:P,maxResults:String(Math.min(b,1e3)),...i?{location:i}:{}}});y.push(...T.body.rows??[]),P=T.body.pageToken}let h=Dt(m,y.slice(0,c));return{rows:h,row_count:h.length,total_rows:parseInt(f.totalRows??"0",10),bytes_processed:f.totalBytesProcessed??"0",job_id:f.jobReference?.jobId??null,cache_hit:f.cacheHit??!1}}});function j$(t){let e=`Type: ${t.type}${t.mode?` \xB7 Mode: ${t.mode}`:""}`;return K.ShortText({displayName:t.name,description:e,required:t.mode==="REQUIRED"})}o(j$,"fieldToProperty");var jP=nt({auth:ke,name:"create_row",classification:"WRITE",displayName:"Create Row",description:"Creates a single new row in a BigQuery table. Column fields are loaded from the table schema.",audience:"both",aiMetadata:{description:"Streams one new row into a BigQuery table via the streaming insert API, with each column supplied as a separate value (loaded from the live table schema; empty values are dropped rather than written as nulls). Choose this when an agent has a single record to append and knows the target project, dataset, and table. Not idempotent: each call appends another row, so repeating it duplicates the record.",idempotent:!1},props:{project_id:Ve,dataset_id:ht,table_id:gt,values:K.DynamicProperties({displayName:"Row Values",description:"Enter a value for each column. Fields are loaded from the table schema.",required:!0,auth:ke,refreshers:["project_id","dataset_id","table_id"],props:o(async({auth:t,project_id:e,dataset_id:r,table_id:n})=>{if(!t||!e||!r||!n)return{};try{let i=await Ne(t),u=await DP(i,e,r,n);return Object.fromEntries(u.filter(c=>c.type!=="RECORD").map(c=>[c.name,j$(c)]))}catch{return{}}},"props")})},async run(t){let{project_id:e,dataset_id:r,table_id:n,values:i}=t.propsValue,u=await Ne(t.auth),l=Object.fromEntries(Object.entries(i).filter(([,y])=>y!==""&&y!==null&&y!==void 0)),p=`${Date.now()}-${Math.random().toString(36).slice(2,9)}`,m=(await Se.sendRequest({method:"POST",url:`${Ae}/projects/${e}/datasets/${r}/tables/${n}/insertAll`,headers:{Authorization:`Bearer ${u}`},body:{kind:"bigquery#tableDataInsertAllRequest",rows:[{insertId:p,json:l}]}})).body.insertErrors??[];if(m.length>0){let y=m[0]?.errors[0];throw new Error(`Row insert failed: ${y?.message??"Unknown error"} (reason: ${y?.reason??"unknown"}, field: ${y?.location??"unknown"})`)}return{success:!0,insert_id:p,...l}}});var MP=nt({auth:ke,name:"create_rows",classification:"WRITE",displayName:"Create Rows",description:"Creates new rows of data in a BigQuery table (accepts an array of row objects). Rows are available to query within seconds.",audience:"both",aiMetadata:{description:"Streams a batch of rows into a BigQuery table in one streaming-insert call, taking a JSON array of objects whose keys match the column names. Choose this over Create Row when appending multiple records at once. Optional flags control whether the whole batch fails on a bad row or skips invalid rows / unknown fields. Not idempotent: every call appends the rows again, so repeating it duplicates them.",idempotent:!1},props:{project_id:Ve,dataset_id:ht,table_id:gt,rows:K.Json({displayName:"Rows",description:'An array of row objects to insert. Keys must match the table column names. Example: `[{"name": "Alice", "age": 30}, {"name": "Bob", "age": 25}]`',required:!0}),skip_invalid_rows:K.Checkbox({displayName:"Skip Invalid Rows",description:"If enabled, valid rows are inserted even when some rows in the batch are invalid. If disabled (default), the entire batch fails if any row is invalid.",required:!1,defaultValue:!1}),ignore_unknown_values:K.Checkbox({displayName:"Ignore Unknown Fields",description:"If enabled, fields not in the table schema are silently discarded. If disabled (default), unknown fields cause the row to fail.",required:!1,defaultValue:!1})},async run(t){let{project_id:e,dataset_id:r,table_id:n,rows:i,skip_invalid_rows:u,ignore_unknown_values:c}=t.propsValue;if(!Array.isArray(i)||i.length===0)throw new Error('Rows must be a non-empty JSON array of objects, e.g. [{"column": "value"}]');let l=await Ne(t.auth),p=Date.now(),f=i.map((h,b)=>({insertId:`${p}-${b}-${Math.random().toString(36).slice(2,9)}`,json:h})),y=(await Se.sendRequest({method:"POST",url:`${Ae}/projects/${e}/datasets/${r}/tables/${n}/insertAll`,headers:{Authorization:`Bearer ${l}`},body:{kind:"bigquery#tableDataInsertAllRequest",skipInvalidRows:u??!1,ignoreUnknownValues:c??!1,rows:f}})).body.insertErrors??[];if(y.length>0&&!(u??!1)){let h=y[0]?.errors[0];throw new Error(`Insert failed on row ${y[0]?.index}: ${h?.message??"Unknown error"} (reason: ${h?.reason??"unknown"})`)}let P=y.map(h=>({row_index:h.index,error_count:h.errors.length,first_error_reason:h.errors[0]?.reason??null,first_error_location:h.errors[0]?.location??null,first_error_message:h.errors[0]?.message??null}));return{success:y.length===0,rows_attempted:i.length,rows_inserted:i.length-y.length,error_count:y.length,errors:P}}});var LP=nt({auth:ke,name:"delete_rows",classification:"DESTRUCTIVE",displayName:"Delete Rows",description:"Deletes one or more rows from a BigQuery table using a SQL WHERE condition.",audience:"both",aiMetadata:{description:"Deletes every row matching a SQL WHERE condition from a BigQuery table by running a DELETE DML statement (supply only the condition body, without the WHERE keyword). Use it to remove records that meet a filter. Effectively idempotent on the same data \u2014 a repeat matches no remaining rows \u2014 but it is a destructive mutation, so an overly broad condition can remove far more than intended.",idempotent:!1},props:{project_id:Ve,dataset_id:ht,table_id:gt,where_clause:K.LongText({displayName:"WHERE Clause",description:'SQL condition to match the rows to delete. Do not include the WHERE keyword. Example: `status = "inactive" AND created_at < "2023-01-01"`',required:!0}),location:K.ShortText({displayName:"Location",description:"Dataset location (e.g. US, EU). Leave blank to use the default.",required:!1})},async run(t){let{project_id:e,dataset_id:r,table_id:n,where_clause:i,location:u}=t.propsValue,c=await Ne(t.auth),p=`DELETE FROM ${`\`${e}.${r}.${n}\``} WHERE ${i}`,f=await Fu(c,e,p,u??void 0);return{success:!0,rows_deleted:f.deletedRowCount,job_id:f.jobId}}});var FP=nt({auth:ke,name:"update_rows",classification:"WRITE",displayName:"Update Row(s)",description:"Updates one or more existing rows in a BigQuery table using SQL SET and WHERE expressions.",audience:"both",aiMetadata:{description:"Updates rows in a BigQuery table by running an UPDATE DML statement, applying a comma-separated SET assignment to every row matching a WHERE condition (supply both as raw SQL fragments without the SET/WHERE keywords). Use it to change column values on existing records. Mutates state on each run, so it is not safe to assume idempotency \u2014 assignments to fixed literal values repeat harmlessly, but relative expressions (e.g. incrementing a counter) compound on every call.",idempotent:!1},props:{project_id:Ve,dataset_id:ht,table_id:gt,set_expression:K.LongText({displayName:"SET Expression",description:'Comma-separated column assignments. Do not include the SET keyword. Example: `status = "active", updated_at = CURRENT_TIMESTAMP()`',required:!0}),where_clause:K.LongText({displayName:"WHERE Clause",description:'SQL condition to match the rows to update. Do not include the WHERE keyword. Example: `id = "abc123"`',required:!0}),location:K.ShortText({displayName:"Location",description:"Dataset location (e.g. US, EU). Leave blank to use the default.",required:!1})},async run(t){let{project_id:e,dataset_id:r,table_id:n,set_expression:i,where_clause:u,location:c}=t.propsValue,l=await Ne(t.auth),f=`UPDATE ${`\`${e}.${r}.${n}\``} SET ${i} WHERE ${u}`,m=await Fu(l,e,f,c??void 0);return{success:!0,rows_updated:m.updatedRowCount,job_id:m.jobId}}});var BP=nt({auth:ke,name:"find_one_row",classification:"SEARCH",displayName:"Find One Row",description:"Find a single row by specifying a WHERE clause and an optional ORDER BY. Returns the first matching row, or empty if none found.",audience:"both",aiMetadata:{description:'Looks up a single row in a BigQuery table that matches a SQL WHERE condition, with an optional ORDER BY to control which row is picked when several match. Choose this for a simple keyed lookup or "does this record exist" check rather than writing a full query. Read-only and idempotent; returns the first match (or a not-found flag) without altering data.',idempotent:!0},props:{project_id:Ve,dataset_id:ht,table_id:gt,where_clause:K.LongText({displayName:"WHERE Clause",description:'SQL condition to filter rows. Do not include the WHERE keyword. Example: `email = "user@example.com"`',required:!0}),order_by:K.ShortText({displayName:"ORDER BY",description:"Optional column(s) to sort results before picking the first row. Example: `created_at DESC`",required:!1}),location:K.ShortText({displayName:"Location",description:"Dataset location (e.g. US, EU). Leave blank to use the default.",required:!1})},async run(t){let{project_id:e,dataset_id:r,table_id:n,where_clause:i,order_by:u,location:c}=t.propsValue,l=await Ne(t.auth),p=`\`${e}.${r}.${n}\``,f=u?` ORDER BY ${u}`:"",m=`SELECT * FROM ${p} WHERE ${i}${f} LIMIT 1`,P=(await Se.sendRequest({method:"POST",url:`${Ae}/projects/${e}/queries`,headers:{Authorization:`Bearer ${l}`},body:{query:m,useLegacySql:!1,maxResults:1,timeoutMs:1e4,...c?{location:c}:{}}})).body,h=P.schema?.fields??[];if(!P.jobComplete){let E=await oi(l,e,P.jobReference.jobId,c??void 0);P={...E,jobReference:P.jobReference},h=E.schema?.fields??h}let b=Dt(h,P.rows??[]),T=b.length>0;return{found:T,...T?b[0]:{}}}});var qP=nt({auth:ke,name:"find_or_create_row",classification:"WRITE",displayName:"Find or Create Record",description:"Searches for a row matching a WHERE clause. If found, returns it. If not found, inserts the provided row data and returns that.",audience:"both",aiMetadata:{description:"Finds the first row matching a SQL WHERE condition in a BigQuery table and returns it; if none matches, streams the supplied JSON row in and returns that instead, flagging whether it was found or created. Use it as a get-or-insert to avoid duplicates when ensuring a record exists. Conditionally idempotent: it only inserts when nothing matches, but because the WHERE condition and the inserted data are independent, a poorly aligned condition can let repeated calls insert duplicate rows.",idempotent:!1},props:{project_id:Ve,dataset_id:ht,table_id:gt,where_clause:K.LongText({displayName:"WHERE Clause",description:'SQL condition to search for an existing row. Do not include WHERE. Example: `email = "user@example.com"`',required:!0}),create_data:K.Json({displayName:"Row to Create (if not found)",description:'A JSON object of column/value pairs to insert if no matching row exists. Example: `{"email": "user@example.com", "name": "Alice"}`',required:!0}),location:K.ShortText({displayName:"Location",description:"Dataset location (e.g. US, EU). Leave blank to use the default.",required:!1})},async run(t){let{project_id:e,dataset_id:r,table_id:n,where_clause:i,create_data:u,location:c}=t.propsValue,l=await Ne(t.auth),f=`SELECT * FROM ${`\`${e}.${r}.${n}\``} WHERE ${i} LIMIT 1`,y=(await Se.sendRequest({method:"POST",url:`${Ae}/projects/${e}/queries`,headers:{Authorization:`Bearer ${l}`},body:{query:f,useLegacySql:!1,maxResults:1,timeoutMs:1e4,...c?{location:c}:{}}})).body,P=y.schema?.fields??[];if(!y.jobComplete){let k=await oi(l,e,y.jobReference.jobId,c??void 0);y={...k,jobReference:y.jobReference},P=k.schema?.fields??P}let h=Dt(P,y.rows??[]);if(h.length>0)return{found:!0,created:!1,...h[0]};let b=u,T=`${Date.now()}-${Math.random().toString(36).slice(2,9)}`,w=(await Se.sendRequest({method:"POST",url:`${Ae}/projects/${e}/datasets/${r}/tables/${n}/insertAll`,headers:{Authorization:`Bearer ${l}`},body:{kind:"bigquery#tableDataInsertAllRequest",rows:[{insertId:T,json:b}]}})).body.insertErrors??[];if(w.length>0){let k=w[0]?.errors[0];throw new Error(`Row creation failed: ${k?.message??"Unknown error"} (reason: ${k?.reason??"unknown"})`)}return{found:!1,created:!0,insert_id:T,...b}}});var VP=nt({auth:ke,name:"get_rows_for_job",classification:"READ",displayName:"Get Rows for Job Completed",description:'Retrieves the result rows from a completed BigQuery query job by Job ID. Use this after a "Query Job Completed" trigger to fetch the full result set.',audience:"both",aiMetadata:{description:'Fetches the cached result rows of an already-completed BigQuery query job by its job ID, paginating up to the max-rows cap. Use it to retrieve the full result set after a "Query Job Completed" trigger or a "Run a Query" action hands you a job ID. The job must already be finished \u2014 it errors if the job is still running. Read-only and idempotent.',idempotent:!0},props:{project_id:Ve,job_id:K.ShortText({displayName:"Job ID",description:'The BigQuery job ID to fetch results for. This is returned by the "Query Job Completed" trigger or a "Run a Query" action.',required:!0}),max_results:K.Number({displayName:"Max Rows",description:"Maximum number of rows to return (up to 10,000). Default: 1,000.",required:!1,defaultValue:1e3}),location:K.ShortText({displayName:"Location",description:"Dataset location where the job ran (e.g. US, EU). Leave blank for US.",required:!1})},async run(t){let{project_id:e,job_id:r,max_results:n,location:i}=t.propsValue,u=Math.min(n??1e3,1e4),c=await Ne(t.auth),l=[],p=[],f,m="0",y="0",P=!1;do{let b=u-l.length,E=(await Se.sendRequest({method:"GET",url:`${Ae}/projects/${e}/queries/${r}`,headers:{Authorization:`Bearer ${c}`},queryParams:{maxResults:String(Math.min(b,1e3)),timeoutMs:"10000",...f?{pageToken:f}:{},...i?{location:i}:{}}})).body;if(!E.jobComplete)throw new Error(`Job ${r} has not completed yet. Wait for the job to finish before fetching results.`);E.schema?.fields&&(p=E.schema.fields),l.push(...E.rows??[]),f=E.pageToken,m=E.totalRows??m,y=E.totalBytesProcessed??y,P=E.cacheHit??P}while(f&&l.length<u);let h=Dt(p,l.slice(0,u));return{rows:h,row_count:h.length,total_rows:parseInt(m,10),bytes_processed:y,cache_hit:P,job_id:r}}});var HP=500;function M$(t){if(Array.isArray(t))return t;if(typeof t=="string"){let e=t.trim();return e.startsWith("[")?JSON.parse(e):e.split(`
66
- `).map(r=>r.trim()).filter(r=>r.length>0).map(r=>JSON.parse(r))}throw new Error("Data must be a JSON array or a newline-delimited JSON (NDJSON) string.")}o(M$,"parseInputData");var GP=nt({auth:ke,name:"import_data",classification:"WRITE",displayName:"Import Data",description:"Imports a batch of rows into a BigQuery table. Accepts a JSON array or newline-delimited JSON (NDJSON). Large datasets are automatically split into chunks.",audience:"both",aiMetadata:{description:"Bulk-imports rows into a BigQuery table via streaming inserts, accepting either a JSON array of objects or a newline-delimited JSON (NDJSON) string and automatically splitting large datasets into chunks. Choose this for ingesting a large or variably-formatted dataset in one step; optional flags control whether the batch fails on bad rows or skips invalid rows / unknown fields. Not idempotent: each call appends the rows again, duplicating data if re-run.",idempotent:!1},props:{project_id:Ve,dataset_id:ht,table_id:gt,data:K.Json({displayName:"Data",description:"The data to import. Provide a JSON array of objects (`[{...}, {...}]`) or a newline-delimited JSON string where each line is one row object.",required:!0}),skip_invalid_rows:K.Checkbox({displayName:"Skip Invalid Rows",description:"Continue importing valid rows even if some rows fail validation. Default: off (fail entire batch).",required:!1,defaultValue:!1}),ignore_unknown_values:K.Checkbox({displayName:"Ignore Unknown Fields",description:"Silently drop fields not present in the table schema. Default: off (fail on unknown fields).",required:!1,defaultValue:!1})},async run(t){let{project_id:e,dataset_id:r,table_id:n,data:i,skip_invalid_rows:u,ignore_unknown_values:c}=t.propsValue,l=M$(i);if(l.length===0)throw new Error("Data contains no rows to import.");let p=await Ne(t.auth),f=Date.now(),m=0,y=0,P=[];for(let h=0;h<l.length;h+=HP){let b=l.slice(h,h+HP),T=b.map((k,q)=>({insertId:`${f}-${h+q}-${Math.random().toString(36).slice(2,9)}`,json:k})),w=(await Se.sendRequest({method:"POST",url:`${Ae}/projects/${e}/datasets/${r}/tables/${n}/insertAll`,headers:{Authorization:`Bearer ${p}`},body:{kind:"bigquery#tableDataInsertAllRequest",skipInvalidRows:u??!1,ignoreUnknownValues:c??!1,rows:T}})).body.insertErrors??[];if(w.length>0&&!(u??!1)){let k=w[0]?.errors[0];throw new Error(`Import failed on row ${h+(w[0]?.index??0)}: ${k?.message??"Unknown error"}`)}m+=b.length-w.length,y+=w.length,P.push(...w.map(k=>({row_index:h+k.index,first_error:k.errors[0]?.message??"Unknown",reason:k.errors[0]?.reason??null})))}return{success:y===0,rows_attempted:l.length,rows_imported:m,error_count:y,errors:P}}});var L$={project_id:Ve,dataset_id:ht,table_id:gt,sort_column:K.ShortText({displayName:"Sort Column",description:"Name of the column used to detect new rows. The table is ordered by this column (DESC) and any row newer than the last check is returned. Use a TIMESTAMP or DATETIME column, e.g. `created_at`.",required:!0}),max_results:K.Number({displayName:"Max Rows per Check",description:"Maximum number of new rows to return per poll (default: 500).",required:!1,defaultValue:500})},Bu={strategy:0,items:o(async({auth:t,propsValue:e,lastFetchEpochMS:r})=>{let{project_id:n,dataset_id:i,table_id:u,sort_column:c,max_results:l}=e,p=l??500,f=await Ne(t),m=r??Date.now()-10080*60*1e3,y=`\`${n}.${i}.${u}\``,P=c,h=`SELECT * FROM ${y} WHERE \`${P}\` > TIMESTAMP_MILLIS(${m}) ORDER BY \`${P}\` ASC LIMIT ${p}`,T=(await Se.sendRequest({method:"POST",url:`${Ae}/projects/${n}/queries`,headers:{Authorization:`Bearer ${f}`},body:{query:h,useLegacySql:!1,maxResults:p,timeoutMs:3e4}})).body;if(!T.jobComplete)for(let k=0;k<30&&!T.jobComplete;k++)T=(await Se.sendRequest({method:"GET",url:`${Ae}/projects/${n}/queries/${T.jobReference.jobId}`,headers:{Authorization:`Bearer ${f}`},queryParams:{timeoutMs:"10000",maxResults:String(p)}})).body;let E=T.schema?.fields??[];return Dt(E,T.rows??[]).map(k=>{let q=k[P],W;if(typeof q=="string"){let H=parseFloat(q);W=!isNaN(H)&&H>1e9?H*1e3:new Date(q).getTime()}else typeof q=="number"?W=q>1e12?q:q*1e3:W=Date.now();return{epochMilliSeconds:W,data:k}})},"items")},WP=Tn({auth:ke,name:"new_row",classification:"READ",displayName:"New Row",description:"Triggers when a new row is added to a BigQuery table. Polls every 5 minutes by comparing the latest value in a sort column against the previous check.",aiMetadata:{description:"Fires for each new row appended to a BigQuery table, detected by polling a TIMESTAMP/DATETIME sort column for values newer than the previous check. Each event represents one newly inserted row. Detection depends entirely on the chosen sort column advancing for new rows."},props:L$,sampleData:{id:"1",created_at:"2024-01-15T10:30:00Z",name:"Example row"},type:"POLLING",async test(t){return await ot.test(Bu,t)},async onEnable(t){await ot.onEnable(Bu,t)},async onDisable(t){await ot.onDisable(Bu,t)},async run(t){return await ot.poll(Bu,t)}});var F$={project_id:Ve,dataset_id:ht,table_id:gt,updated_at_column:K.ShortText({displayName:"Updated At Column",description:"Name of the TIMESTAMP column that records when a row was last updated, e.g. `updated_at`. Rows where this column is newer than the last check are returned.",required:!0}),created_at_column:K.ShortText({displayName:"Created At Column (optional)",description:"If provided, only rows where the updated timestamp is newer than the created timestamp are returned, excluding brand-new rows from the results.",required:!1}),max_results:K.Number({displayName:"Max Rows per Check",description:"Maximum number of updated rows to return per poll (default: 500).",required:!1,defaultValue:500})},qu={strategy:0,items:o(async({auth:t,propsValue:e,lastFetchEpochMS:r})=>{let{project_id:n,dataset_id:i,table_id:u,updated_at_column:c,created_at_column:l,max_results:p}=e,f=p??500,m=await Ne(t),y=r??Date.now()-10080*60*1e3,P=`\`${n}.${i}.${u}\``,h=c,b=l?` AND \`${l}\` < TIMESTAMP_MILLIS(${y})`:"",T=[`SELECT * FROM ${P}`,`WHERE \`${h}\` > TIMESTAMP_MILLIS(${y})${b}`,`ORDER BY \`${h}\` ASC`,`LIMIT ${f}`].join(" "),w=(await Se.sendRequest({method:"POST",url:`${Ae}/projects/${n}/queries`,headers:{Authorization:`Bearer ${m}`},body:{query:T,useLegacySql:!1,maxResults:f,timeoutMs:3e4}})).body;if(!w.jobComplete)for(let W=0;W<30&&!w.jobComplete;W++)w=(await Se.sendRequest({method:"GET",url:`${Ae}/projects/${n}/queries/${w.jobReference.jobId}`,headers:{Authorization:`Bearer ${m}`},queryParams:{timeoutMs:"10000",maxResults:String(f)}})).body;let k=w.schema?.fields??[];return Dt(k,w.rows??[]).map(W=>{let H=W[h],V;if(typeof H=="string"){let J=parseFloat(H);V=!isNaN(J)&&J>1e9?J*1e3:new Date(H).getTime()}else typeof H=="number"?V=H>1e12?H:H*1e3:V=Date.now();return{epochMilliSeconds:V,data:W}})},"items")},ZP=Tn({auth:ke,name:"updated_row",classification:"READ",displayName:"Updated Row",description:"Triggers when an existing row is updated in a BigQuery table. Requires an `updated_at` TIMESTAMP column that is set whenever a row changes.",aiMetadata:{description:"Fires for each row whose updated-at TIMESTAMP column advances past the previous check, representing a modified row in a BigQuery table. Requires that column to be set whenever a row changes; supplying an optional created-at column excludes brand-new rows so only genuine updates fire."},props:F$,sampleData:{id:"1",updated_at:"2024-01-15T10:30:00Z",status:"active"},type:"POLLING",async test(t){return await ot.test(qu,t)},async onEnable(t){await ot.onEnable(qu,t)},async onDisable(t){await ot.onDisable(qu,t)},async run(t){return await ot.poll(qu,t)}});var B$={project_id:Ve,max_rows_per_job:K.Number({displayName:"Max Rows per Job",description:"Maximum number of result rows to fetch per completed job (default: 500).",required:!1,defaultValue:500})},Vu={strategy:0,items:o(async({auth:t,propsValue:e,lastFetchEpochMS:r})=>{let{project_id:n,max_rows_per_job:i}=e,u=i??500,c=await Ne(t),l=(r??Date.now()-1440*60*1e3)-3600*1e3,f=((await Se.sendRequest({method:"GET",url:`${Ae}/projects/${n}/jobs`,headers:{Authorization:`Bearer ${c}`},queryParams:{stateFilter:"done",projection:"full",minCreationTime:String(l),maxResults:"50"}})).body.jobs??[]).filter(y=>y.configuration.jobType==="QUERY"&&!y.status.errorResult&&parseInt(y.statistics.endTime??"0",10)>(r??0)),m=[];for(let y of f){let P=y.jobReference.jobId,h=y.jobReference.location,b=parseInt(y.statistics.endTime??"0",10),T=[],E=[],w;do{let q=await Se.sendRequest({method:"GET",url:`${Ae}/projects/${n}/queries/${P}`,headers:{Authorization:`Bearer ${c}`},queryParams:{maxResults:String(Math.min(u-T.length,1e3)),timeoutMs:"5000",...w?{pageToken:w}:{},...h?{location:h}:{}}});q.body.schema?.fields&&(E=q.body.schema.fields),T.push(...q.body.rows??[]),w=q.body.pageToken}while(w&&T.length<u);let k=Dt(E,T.slice(0,u));m.push({epochMilliSeconds:b,data:{job_id:P,project_id:y.jobReference.projectId,location:h??null,query:y.configuration.query?.query??null,completed_at:y.statistics.endTime?new Date(b).toISOString():null,bytes_processed:y.statistics.query?.totalBytesProcessed??null,cache_hit:y.statistics.query?.cacheHit??null,user_email:y.user_email??null,row_count:k.length,rows:k}})}return m},"items")},JP=Tn({auth:ke,name:"query_job_completed",classification:"READ",displayName:"Query Job Completed (With Row Data)",description:"Triggers when a BigQuery query job finishes successfully. Each flow run receives the job metadata and the result rows from that query.",aiMetadata:{description:"Fires when a successful (non-errored) QUERY-type job completes in the BigQuery project, detected by polling the project job history. Each event represents one finished query job and carries its metadata plus the fetched result rows. Only query jobs are surfaced; load, copy, and extract jobs are ignored."},props:B$,sampleData:{job_id:"job_abc123",project_id:"my-project",query:"SELECT * FROM my_dataset.my_table LIMIT 10",completed_at:"2024-01-15T10:30:00Z",bytes_processed:"1024",cache_hit:!1,row_count:2,rows:[{id:"1",name:"Alice"},{id:"2",name:"Bob"}]},type:"POLLING",async test(t){return await ot.test(Vu,t)},async onEnable(t){await ot.onEnable(Vu,t)},async onDisable(t){await ot.onDisable(Vu,t)},async run(t){return await ot.poll(Vu,t)}});var q$={project_id:Ve,include_failed:K.Checkbox({displayName:"Include Failed Jobs",description:"If enabled, jobs that completed with an error are also returned. Default: off (only successful jobs).",required:!1,defaultValue:!1})},Hu={strategy:0,items:o(async({auth:t,propsValue:e,lastFetchEpochMS:r})=>{let{project_id:n,include_failed:i}=e,u=await Ne(t),c=(r??Date.now()-1440*60*1e3)-3600*1e3;return((await Se.sendRequest({method:"GET",url:`${Ae}/projects/${n}/jobs`,headers:{Authorization:`Bearer ${u}`},queryParams:{stateFilter:"done",projection:"full",minCreationTime:String(c),maxResults:"100"}})).body.jobs??[]).filter(f=>!(parseInt(f.statistics.endTime??"0",10)<=(r??0)||!(i??!1)&&f.status.errorResult)).map(f=>{let m=parseInt(f.statistics.endTime??"0",10),y=f.statistics.query?.dmlStats;return{epochMilliSeconds:m,data:{job_id:f.jobReference.jobId,project_id:f.jobReference.projectId,location:f.jobReference.location??null,job_type:f.configuration.jobType,status:f.status.errorResult?"FAILED":"SUCCESS",error_message:f.status.errorResult?.message??null,error_reason:f.status.errorResult?.reason??null,query:f.configuration.query?.query??null,created_at:f.statistics.creationTime?new Date(parseInt(f.statistics.creationTime,10)).toISOString():null,started_at:f.statistics.startTime?new Date(parseInt(f.statistics.startTime,10)).toISOString():null,completed_at:m?new Date(m).toISOString():null,bytes_processed:f.statistics.query?.totalBytesProcessed??f.statistics.totalBytesProcessed??null,cache_hit:f.statistics.query?.cacheHit??null,dml_inserted_rows:y?.insertedRowCount??null,dml_deleted_rows:y?.deletedRowCount??null,dml_updated_rows:y?.updatedRowCount??null,user_email:f.user_email??null}}})},"items")},KP=Tn({auth:ke,name:"new_job_completed",classification:"READ",displayName:"New Job Completed",description:"Triggers when any BigQuery job (query, load, copy, or extract) finishes. Returns the job metadata including status, type, and timing.",aiMetadata:{description:"Fires when any BigQuery job of any type (query, load, copy, or extract) finishes in the project, detected by polling the job history. Each event represents one completed job and carries its metadata \u2014 type, status, timing, bytes processed, and DML row counts. By default only successful jobs fire; enabling the include-failed option also surfaces jobs that ended with an error."},props:q$,sampleData:{job_id:"job_xyz789",project_id:"my-project",job_type:"QUERY",status:"SUCCESS",error_message:null,query:"SELECT COUNT(*) FROM my_dataset.events",completed_at:"2024-01-15T10:30:00Z",bytes_processed:"2048",cache_hit:!1,user_email:"user@example.com"},type:"POLLING",async test(t){return await ot.test(Hu,t)},async onEnable(t){await ot.onEnable(Hu,t)},async onDisable(t){await ot.onDisable(Hu,t)},async run(t){return await ot.poll(Hu,t)}});var V$=dg({displayName:"Google BigQuery",description:"Query, analyze, and stream data into Google BigQuery \u2014 the fully managed, serverless data warehouse",minimumSupportedRelease:"0.36.1",logoUrl:"https://cdn.activepieces.com/pieces/google-bigquery.png",categories:["BUSINESS_INTELLIGENCE"],authors:["AhmadTash"],auth:ke,actions:[UP,jP,MP,LP,FP,BP,qP,VP,GP,R_({baseUrl:o(()=>Ae,"baseUrl"),auth:ke,authMapping:o(async t=>({Authorization:`Bearer ${await Ne(t)}`}),"authMapping")})],triggers:[WP,ZP,JP,KP]});0&&(module.exports={bigQueryAuth,googleBigQuery});
103
+ 8. A \`.json\` file will download \u2014 open it in a text editor and paste the entire contents into the field below.`}),serviceAccountJson:ne.ShortText({displayName:"Service Account JSON",description:"Paste the full contents of the downloaded .json key file here",required:!0})},validate:a(async({auth:e})=>{try{let t=JSON.parse(e.serviceAccountJson);if(!t.client_email||!t.private_key)return{valid:!1,error:'Service account JSON must contain "client_email" and "private_key" fields'};if(!(await new VE.JWT({email:t.client_email,key:t.private_key,scopes:qE}).getAccessToken()).token)throw new Error("Empty token returned");return{valid:!0}}catch(t){return{valid:!1,error:`Service account authentication failed: ${t.message}`}}},"validate")})];async function Le(e){if(e.type==="CUSTOM_AUTH"){let t=JSON.parse(e.props.serviceAccountJson),o=await new VE.JWT({email:t.client_email,key:t.private_key,scopes:qE}).getAccessToken();if(o.token)return o.token;throw new Error("Could not retrieve access token from service account JSON")}return e.access_token}a(Le,"getAccessToken");var Ye=ne.Dropdown({auth:Ue,displayName:"Project",description:"Select your Google Cloud project",refreshers:[],required:!0,options:a(async({auth:e})=>{if(!e)return{disabled:!0,options:[],placeholder:"Please connect your account first"};try{let t=await Le(e);return{disabled:!1,options:((await Ie.sendRequest({method:"GET",url:`${Ce}/projects`,headers:{Authorization:`Bearer ${t}`},queryParams:{maxResults:"200"}})).body.projects??[]).map(r=>({label:r.friendlyName?`${r.friendlyName} (${r.projectReference.projectId})`:r.projectReference.projectId,value:r.projectReference.projectId}))}}catch{return{disabled:!0,options:[],placeholder:"Failed to load projects. Check your connection."}}},"options")}),wt=ne.Dropdown({auth:Ue,displayName:"Dataset",description:"Select the BigQuery dataset",refreshers:["project_id"],required:!0,options:a(async({auth:e,project_id:t})=>{if(!e||!t)return{disabled:!0,options:[],placeholder:"Please select a project first"};try{let n=await Le(e),o=[],r;do{let i=await Ie.sendRequest({method:"GET",url:`${Ce}/projects/${t}/datasets`,headers:{Authorization:`Bearer ${n}`},queryParams:{maxResults:"200",...r?{pageToken:r}:{}}});for(let s of i.body.datasets??[])o.push({label:s.friendlyName??s.datasetReference.datasetId,value:s.datasetReference.datasetId});r=i.body.nextPageToken}while(r);return{disabled:!1,options:o}}catch{return{disabled:!0,options:[],placeholder:"Failed to load datasets. Check your project selection."}}},"options")}),At=ne.Dropdown({auth:Ue,displayName:"Table",description:"Select the BigQuery table",refreshers:["project_id","dataset_id"],required:!0,options:a(async({auth:e,project_id:t,dataset_id:n})=>{if(!e||!t||!n)return{disabled:!0,options:[],placeholder:"Please select a project and dataset first"};try{let o=await Le(e),r=[],i;do{let s=await Ie.sendRequest({method:"GET",url:`${Ce}/projects/${t}/datasets/${n}/tables`,headers:{Authorization:`Bearer ${o}`},queryParams:{maxResults:"200",...i?{pageToken:i}:{}}});for(let u of s.body.tables??[]){let d=u.friendlyName?`${u.friendlyName} (${u.tableReference.tableId})`:u.tableReference.tableId;r.push({label:d,value:u.tableReference.tableId})}i=s.body.nextPageToken}while(i);return{disabled:!1,options:r}}catch{return{disabled:!0,options:[],placeholder:"Failed to load tables. Check your dataset selection."}}},"options")});function rr(e,t){return t.map(n=>{let o={};return e.forEach((r,i)=>{let s=n.f[i]?.v;s==null?o[r.name]=null:Array.isArray(s)?o[r.name]=s.map(u=>typeof u.v=="object"?JSON.stringify(u.v):String(u.v??"")).join(", "):typeof s=="object"?o[r.name]=JSON.stringify(s):o[r.name]=s}),o})}a(rr,"bigQueryRowsToFlat");async function LC(e,t,n,o){return(await Ie.sendRequest({method:"GET",url:`${Ce}/projects/${t}/datasets/${n}/tables/${o}`,headers:{Authorization:`Bearer ${e}`},queryParams:{fields:"schema"}})).body.schema?.fields??[]}a(LC,"getTableSchema");async function om(e,t,n,o){let i=(await Ie.sendRequest({method:"POST",url:`${Ce}/projects/${t}/queries`,headers:{Authorization:`Bearer ${e}`},body:{query:n,useLegacySql:!1,timeoutMs:1e4,...o?{location:o}:{}}})).body.jobReference.jobId;for(let s=0;s<60;s++){let u=await Ie.sendRequest({method:"GET",url:`${Ce}/projects/${t}/jobs/${i}`,headers:{Authorization:`Bearer ${e}`},queryParams:{...o?{location:o}:{}}});if(u.body.status.state==="DONE"){if(u.body.status.errorResult)throw new Error(`Query failed: ${u.body.status.errorResult.message}`);let d=u.body.statistics?.query?.dmlStats??{},p=parseInt(d.deletedRowCount??"0",10),f=parseInt(d.updatedRowCount??"0",10),g=parseInt(d.insertedRowCount??"0",10);return{jobId:i,affectedRowCount:p+f+g,deletedRowCount:p,updatedRowCount:f,insertedRowCount:g}}await new Promise(d=>setTimeout(d,2e3))}throw new Error("DML query timed out after 2 minutes.")}a(om,"runDmlQuery");async function za(e,t,n,o){for(let r=0;r<60;r++){let i=await Ie.sendRequest({method:"GET",url:`${Ce}/projects/${t}/queries/${n}`,headers:{Authorization:`Bearer ${e}`},queryParams:{timeoutMs:"10000",maxResults:"1000",...o?{location:o}:{}}});if(i.body.jobComplete)return i.body}throw new Error("Query did not complete within 10 minutes. Try simplifying your query or using a smaller dataset.")}a(za,"waitForJobResults");var FC=dt({auth:Ue,name:"run_query",classification:"WRITE",displayName:"Run a Query",description:"Execute a SQL query on BigQuery and return the results as flat rows",audience:"both",aiMetadata:{description:"Runs an arbitrary standard-SQL (or legacy-SQL) statement against BigQuery in a given project and returns the result rows, paginating up to the max-rows cap. Use it for any ad-hoc read or aggregation when no purpose-built action fits, or when you need full SQL control. Note that BigQuery SQL is not limited to reads \u2014 a DML/DDL statement passed here will mutate data \u2014 so idempotency depends on the query you supply; a plain SELECT is safe to repeat.",idempotent:!1},props:{project_id:Ye,query:ne.LongText({displayName:"SQL Query",description:"The SQL query to run. Uses standard SQL syntax. Example: `SELECT * FROM \\`my_dataset.my_table\\` LIMIT 100`",required:!0}),max_results:ne.Number({displayName:"Max Rows",description:"Maximum number of rows to return (up to 10,000)",required:!1,defaultValue:1e3}),location:ne.ShortText({displayName:"Location",description:"Geographic location of your dataset (e.g. US, EU, us-central1). Leave blank for US.",required:!1}),use_legacy_sql:ne.Checkbox({displayName:"Use Legacy SQL",description:"Enable only if your query uses BigQuery Legacy SQL syntax (not recommended)",required:!1,defaultValue:!1})},async run(e){let{project_id:t,query:n,max_results:o,location:r,use_legacy_sql:i}=e.propsValue,s=Math.min(o??1e3,1e4),u=await Le(e.auth),p=(await Ie.sendRequest({method:"POST",url:`${Ce}/projects/${t}/queries`,headers:{Authorization:`Bearer ${u}`},body:{query:n,useLegacySql:i??!1,maxResults:Math.min(s,1e3),timeoutMs:1e4,...r?{location:r}:{}}})).body,f=p.schema?.fields??[];if(!p.jobComplete){let _=p.jobReference.jobId,P=await za(u,t,_,r??void 0);p={...P,jobReference:{projectId:t,jobId:_}},f=P.schema?.fields??f}let g=[...p.rows??[]],y=p.pageToken;for(;y&&g.length<s;){let _=s-g.length,P=await Ie.sendRequest({method:"GET",url:`${Ce}/projects/${t}/queries/${p.jobReference.jobId}`,headers:{Authorization:`Bearer ${u}`},queryParams:{pageToken:y,maxResults:String(Math.min(_,1e3)),...r?{location:r}:{}}});g.push(...P.body.rows??[]),y=P.body.pageToken}let h=rr(f,g.slice(0,s));return{rows:h,row_count:h.length,total_rows:parseInt(p.totalRows??"0",10),bytes_processed:p.totalBytesProcessed??"0",job_id:p.jobReference?.jobId??null,cache_hit:p.cacheHit??!1}}});function J6(e){let t=`Type: ${e.type}${e.mode?` \xB7 Mode: ${e.mode}`:""}`;return ne.ShortText({displayName:e.name,description:t,required:e.mode==="REQUIRED"})}a(J6,"fieldToProperty");var BC=dt({auth:Ue,name:"create_row",classification:"WRITE",displayName:"Create Row",description:"Creates a single new row in a BigQuery table. Column fields are loaded from the table schema.",audience:"both",aiMetadata:{description:"Streams one new row into a BigQuery table via the streaming insert API, with each column supplied as a separate value (loaded from the live table schema; empty values are dropped rather than written as nulls). Choose this when an agent has a single record to append and knows the target project, dataset, and table. Not idempotent: each call appends another row, so repeating it duplicates the record.",idempotent:!1},props:{project_id:Ye,dataset_id:wt,table_id:At,values:ne.DynamicProperties({displayName:"Row Values",description:"Enter a value for each column. Fields are loaded from the table schema.",required:!0,auth:Ue,refreshers:["project_id","dataset_id","table_id"],props:a(async({auth:e,project_id:t,dataset_id:n,table_id:o})=>{if(!e||!t||!n||!o)return{};try{let r=await Le(e),i=await LC(r,t,n,o);return Object.fromEntries(i.filter(s=>s.type!=="RECORD").map(s=>[s.name,J6(s)]))}catch{return{}}},"props")})},async run(e){let{project_id:t,dataset_id:n,table_id:o,values:r}=e.propsValue,i=await Le(e.auth),u=Object.fromEntries(Object.entries(r).filter(([,g])=>g!==""&&g!==null&&g!==void 0)),d=`${Date.now()}-${Math.random().toString(36).slice(2,9)}`,f=(await Ie.sendRequest({method:"POST",url:`${Ce}/projects/${t}/datasets/${n}/tables/${o}/insertAll`,headers:{Authorization:`Bearer ${i}`},body:{kind:"bigquery#tableDataInsertAllRequest",rows:[{insertId:d,json:u}]}})).body.insertErrors??[];if(f.length>0){let g=f[0]?.errors[0];throw new Error(`Row insert failed: ${g?.message??"Unknown error"} (reason: ${g?.reason??"unknown"}, field: ${g?.location??"unknown"})`)}return{success:!0,insert_id:d,...u}}});var qC=dt({auth:Ue,name:"create_rows",classification:"WRITE",displayName:"Create Rows",description:"Creates new rows of data in a BigQuery table (accepts an array of row objects). Rows are available to query within seconds.",audience:"both",aiMetadata:{description:"Streams a batch of rows into a BigQuery table in one streaming-insert call, taking a JSON array of objects whose keys match the column names. Choose this over Create Row when appending multiple records at once. Optional flags control whether the whole batch fails on a bad row or skips invalid rows / unknown fields. Not idempotent: every call appends the rows again, so repeating it duplicates them.",idempotent:!1},props:{project_id:Ye,dataset_id:wt,table_id:At,rows:ne.Json({displayName:"Rows",description:'An array of row objects to insert. Keys must match the table column names. Example: `[{"name": "Alice", "age": 30}, {"name": "Bob", "age": 25}]`',required:!0}),skip_invalid_rows:ne.Checkbox({displayName:"Skip Invalid Rows",description:"If enabled, valid rows are inserted even when some rows in the batch are invalid. If disabled (default), the entire batch fails if any row is invalid.",required:!1,defaultValue:!1}),ignore_unknown_values:ne.Checkbox({displayName:"Ignore Unknown Fields",description:"If enabled, fields not in the table schema are silently discarded. If disabled (default), unknown fields cause the row to fail.",required:!1,defaultValue:!1})},async run(e){let{project_id:t,dataset_id:n,table_id:o,rows:r,skip_invalid_rows:i,ignore_unknown_values:s}=e.propsValue;if(!Array.isArray(r)||r.length===0)throw new Error('Rows must be a non-empty JSON array of objects, e.g. [{"column": "value"}]');let u=await Le(e.auth),d=Date.now(),p=r.map((h,_)=>({insertId:`${d}-${_}-${Math.random().toString(36).slice(2,9)}`,json:h})),g=(await Ie.sendRequest({method:"POST",url:`${Ce}/projects/${t}/datasets/${n}/tables/${o}/insertAll`,headers:{Authorization:`Bearer ${u}`},body:{kind:"bigquery#tableDataInsertAllRequest",skipInvalidRows:i??!1,ignoreUnknownValues:s??!1,rows:p}})).body.insertErrors??[];if(g.length>0&&!(i??!1)){let h=g[0]?.errors[0];throw new Error(`Insert failed on row ${g[0]?.index}: ${h?.message??"Unknown error"} (reason: ${h?.reason??"unknown"})`)}let y=g.map(h=>({row_index:h.index,error_count:h.errors.length,first_error_reason:h.errors[0]?.reason??null,first_error_location:h.errors[0]?.location??null,first_error_message:h.errors[0]?.message??null}));return{success:g.length===0,rows_attempted:r.length,rows_inserted:r.length-g.length,error_count:g.length,errors:y}}});var VC=dt({auth:Ue,name:"delete_rows",classification:"DESTRUCTIVE",displayName:"Delete Rows",description:"Deletes one or more rows from a BigQuery table using a SQL WHERE condition.",audience:"both",aiMetadata:{description:"Deletes every row matching a SQL WHERE condition from a BigQuery table by running a DELETE DML statement (supply only the condition body, without the WHERE keyword). Use it to remove records that meet a filter. Effectively idempotent on the same data \u2014 a repeat matches no remaining rows \u2014 but it is a destructive mutation, so an overly broad condition can remove far more than intended.",idempotent:!1},props:{project_id:Ye,dataset_id:wt,table_id:At,where_clause:ne.LongText({displayName:"WHERE Clause",description:'SQL condition to match the rows to delete. Do not include the WHERE keyword. Example: `status = "inactive" AND created_at < "2023-01-01"`',required:!0}),location:ne.ShortText({displayName:"Location",description:"Dataset location (e.g. US, EU). Leave blank to use the default.",required:!1})},async run(e){let{project_id:t,dataset_id:n,table_id:o,where_clause:r,location:i}=e.propsValue,s=await Le(e.auth),d=`DELETE FROM ${`\`${t}.${n}.${o}\``} WHERE ${r}`,p=await om(s,t,d,i??void 0);return{success:!0,rows_deleted:p.deletedRowCount,job_id:p.jobId}}});var ZC=dt({auth:Ue,name:"update_rows",classification:"WRITE",displayName:"Update Row(s)",description:"Updates one or more existing rows in a BigQuery table using SQL SET and WHERE expressions.",audience:"both",aiMetadata:{description:"Updates rows in a BigQuery table by running an UPDATE DML statement, applying a comma-separated SET assignment to every row matching a WHERE condition (supply both as raw SQL fragments without the SET/WHERE keywords). Use it to change column values on existing records. Mutates state on each run, so it is not safe to assume idempotency \u2014 assignments to fixed literal values repeat harmlessly, but relative expressions (e.g. incrementing a counter) compound on every call.",idempotent:!1},props:{project_id:Ye,dataset_id:wt,table_id:At,set_expression:ne.LongText({displayName:"SET Expression",description:'Comma-separated column assignments. Do not include the SET keyword. Example: `status = "active", updated_at = CURRENT_TIMESTAMP()`',required:!0}),where_clause:ne.LongText({displayName:"WHERE Clause",description:'SQL condition to match the rows to update. Do not include the WHERE keyword. Example: `id = "abc123"`',required:!0}),location:ne.ShortText({displayName:"Location",description:"Dataset location (e.g. US, EU). Leave blank to use the default.",required:!1})},async run(e){let{project_id:t,dataset_id:n,table_id:o,set_expression:r,where_clause:i,location:s}=e.propsValue,u=await Le(e.auth),p=`UPDATE ${`\`${t}.${n}.${o}\``} SET ${r} WHERE ${i}`,f=await om(u,t,p,s??void 0);return{success:!0,rows_updated:f.updatedRowCount,job_id:f.jobId}}});var HC=dt({auth:Ue,name:"find_one_row",classification:"SEARCH",displayName:"Find One Row",description:"Find a single row by specifying a WHERE clause and an optional ORDER BY. Returns the first matching row, or empty if none found.",audience:"both",aiMetadata:{description:'Looks up a single row in a BigQuery table that matches a SQL WHERE condition, with an optional ORDER BY to control which row is picked when several match. Choose this for a simple keyed lookup or "does this record exist" check rather than writing a full query. Read-only and idempotent; returns the first match (or a not-found flag) without altering data.',idempotent:!0},props:{project_id:Ye,dataset_id:wt,table_id:At,where_clause:ne.LongText({displayName:"WHERE Clause",description:'SQL condition to filter rows. Do not include the WHERE keyword. Example: `email = "user@example.com"`',required:!0}),order_by:ne.ShortText({displayName:"ORDER BY",description:"Optional column(s) to sort results before picking the first row. Example: `created_at DESC`",required:!1}),location:ne.ShortText({displayName:"Location",description:"Dataset location (e.g. US, EU). Leave blank to use the default.",required:!1})},async run(e){let{project_id:t,dataset_id:n,table_id:o,where_clause:r,order_by:i,location:s}=e.propsValue,u=await Le(e.auth),d=`\`${t}.${n}.${o}\``,p=i?` ORDER BY ${i}`:"",f=`SELECT * FROM ${d} WHERE ${r}${p} LIMIT 1`,y=(await Ie.sendRequest({method:"POST",url:`${Ce}/projects/${t}/queries`,headers:{Authorization:`Bearer ${u}`},body:{query:f,useLegacySql:!1,maxResults:1,timeoutMs:1e4,...s?{location:s}:{}}})).body,h=y.schema?.fields??[];if(!y.jobComplete){let x=await za(u,t,y.jobReference.jobId,s??void 0);y={...x,jobReference:y.jobReference},h=x.schema?.fields??h}let _=rr(h,y.rows??[]),P=_.length>0;return{found:P,...P?_[0]:{}}}});var GC=dt({auth:Ue,name:"find_or_create_row",classification:"WRITE",displayName:"Find or Create Record",description:"Searches for a row matching a WHERE clause. If found, returns it. If not found, inserts the provided row data and returns that.",audience:"both",aiMetadata:{description:"Finds the first row matching a SQL WHERE condition in a BigQuery table and returns it; if none matches, streams the supplied JSON row in and returns that instead, flagging whether it was found or created. Use it as a get-or-insert to avoid duplicates when ensuring a record exists. Conditionally idempotent: it only inserts when nothing matches, but because the WHERE condition and the inserted data are independent, a poorly aligned condition can let repeated calls insert duplicate rows.",idempotent:!1},props:{project_id:Ye,dataset_id:wt,table_id:At,where_clause:ne.LongText({displayName:"WHERE Clause",description:'SQL condition to search for an existing row. Do not include WHERE. Example: `email = "user@example.com"`',required:!0}),create_data:ne.Json({displayName:"Row to Create (if not found)",description:'A JSON object of column/value pairs to insert if no matching row exists. Example: `{"email": "user@example.com", "name": "Alice"}`',required:!0}),location:ne.ShortText({displayName:"Location",description:"Dataset location (e.g. US, EU). Leave blank to use the default.",required:!1})},async run(e){let{project_id:t,dataset_id:n,table_id:o,where_clause:r,create_data:i,location:s}=e.propsValue,u=await Le(e.auth),p=`SELECT * FROM ${`\`${t}.${n}.${o}\``} WHERE ${r} LIMIT 1`,g=(await Ie.sendRequest({method:"POST",url:`${Ce}/projects/${t}/queries`,headers:{Authorization:`Bearer ${u}`},body:{query:p,useLegacySql:!1,maxResults:1,timeoutMs:1e4,...s?{location:s}:{}}})).body,y=g.schema?.fields??[];if(!g.jobComplete){let $=await za(u,t,g.jobReference.jobId,s??void 0);g={...$,jobReference:g.jobReference},y=$.schema?.fields??y}let h=rr(y,g.rows??[]);if(h.length>0)return{found:!0,created:!1,...h[0]};let _=i,P=`${Date.now()}-${Math.random().toString(36).slice(2,9)}`,S=(await Ie.sendRequest({method:"POST",url:`${Ce}/projects/${t}/datasets/${n}/tables/${o}/insertAll`,headers:{Authorization:`Bearer ${u}`},body:{kind:"bigquery#tableDataInsertAllRequest",rows:[{insertId:P,json:_}]}})).body.insertErrors??[];if(S.length>0){let $=S[0]?.errors[0];throw new Error(`Row creation failed: ${$?.message??"Unknown error"} (reason: ${$?.reason??"unknown"})`)}return{found:!1,created:!0,insert_id:P,..._}}});var WC=dt({auth:Ue,name:"get_rows_for_job",classification:"READ",displayName:"Get Rows for Job Completed",description:'Retrieves the result rows from a completed BigQuery query job by Job ID. Use this after a "Query Job Completed" trigger to fetch the full result set.',audience:"both",aiMetadata:{description:'Fetches the cached result rows of an already-completed BigQuery query job by its job ID, paginating up to the max-rows cap. Use it to retrieve the full result set after a "Query Job Completed" trigger or a "Run a Query" action hands you a job ID. The job must already be finished \u2014 it errors if the job is still running. Read-only and idempotent.',idempotent:!0},props:{project_id:Ye,job_id:ne.ShortText({displayName:"Job ID",description:'The BigQuery job ID to fetch results for. This is returned by the "Query Job Completed" trigger or a "Run a Query" action.',required:!0}),max_results:ne.Number({displayName:"Max Rows",description:"Maximum number of rows to return (up to 10,000). Default: 1,000.",required:!1,defaultValue:1e3}),location:ne.ShortText({displayName:"Location",description:"Dataset location where the job ran (e.g. US, EU). Leave blank for US.",required:!1})},async run(e){let{project_id:t,job_id:n,max_results:o,location:r}=e.propsValue,i=Math.min(o??1e3,1e4),s=await Le(e.auth),u=[],d=[],p,f="0",g="0",y=!1;do{let _=i-u.length,x=(await Ie.sendRequest({method:"GET",url:`${Ce}/projects/${t}/queries/${n}`,headers:{Authorization:`Bearer ${s}`},queryParams:{maxResults:String(Math.min(_,1e3)),timeoutMs:"10000",...p?{pageToken:p}:{},...r?{location:r}:{}}})).body;if(!x.jobComplete)throw new Error(`Job ${n} has not completed yet. Wait for the job to finish before fetching results.`);x.schema?.fields&&(d=x.schema.fields),u.push(...x.rows??[]),p=x.pageToken,f=x.totalRows??f,g=x.totalBytesProcessed??g,y=x.cacheHit??y}while(p&&u.length<i);let h=rr(d,u.slice(0,i));return{rows:h,row_count:h.length,total_rows:parseInt(f,10),bytes_processed:g,cache_hit:y,job_id:n}}});var JC=500;function K6(e){if(Array.isArray(e))return e;if(typeof e=="string"){let t=e.trim();return t.startsWith("[")?JSON.parse(t):t.split(`
104
+ `).map(n=>n.trim()).filter(n=>n.length>0).map(n=>JSON.parse(n))}throw new Error("Data must be a JSON array or a newline-delimited JSON (NDJSON) string.")}a(K6,"parseInputData");var KC=dt({auth:Ue,name:"import_data",classification:"WRITE",displayName:"Import Data",description:"Imports a batch of rows into a BigQuery table. Accepts a JSON array or newline-delimited JSON (NDJSON). Large datasets are automatically split into chunks.",audience:"both",aiMetadata:{description:"Bulk-imports rows into a BigQuery table via streaming inserts, accepting either a JSON array of objects or a newline-delimited JSON (NDJSON) string and automatically splitting large datasets into chunks. Choose this for ingesting a large or variably-formatted dataset in one step; optional flags control whether the batch fails on bad rows or skips invalid rows / unknown fields. Not idempotent: each call appends the rows again, duplicating data if re-run.",idempotent:!1},props:{project_id:Ye,dataset_id:wt,table_id:At,data:ne.Json({displayName:"Data",description:"The data to import. Provide a JSON array of objects (`[{...}, {...}]`) or a newline-delimited JSON string where each line is one row object.",required:!0}),skip_invalid_rows:ne.Checkbox({displayName:"Skip Invalid Rows",description:"Continue importing valid rows even if some rows fail validation. Default: off (fail entire batch).",required:!1,defaultValue:!1}),ignore_unknown_values:ne.Checkbox({displayName:"Ignore Unknown Fields",description:"Silently drop fields not present in the table schema. Default: off (fail on unknown fields).",required:!1,defaultValue:!1})},async run(e){let{project_id:t,dataset_id:n,table_id:o,data:r,skip_invalid_rows:i,ignore_unknown_values:s}=e.propsValue,u=K6(r);if(u.length===0)throw new Error("Data contains no rows to import.");let d=await Le(e.auth),p=Date.now(),f=0,g=0,y=[];for(let h=0;h<u.length;h+=JC){let _=u.slice(h,h+JC),P=_.map(($,V)=>({insertId:`${p}-${h+V}-${Math.random().toString(36).slice(2,9)}`,json:$})),S=(await Ie.sendRequest({method:"POST",url:`${Ce}/projects/${t}/datasets/${n}/tables/${o}/insertAll`,headers:{Authorization:`Bearer ${d}`},body:{kind:"bigquery#tableDataInsertAllRequest",skipInvalidRows:i??!1,ignoreUnknownValues:s??!1,rows:P}})).body.insertErrors??[];if(S.length>0&&!(i??!1)){let $=S[0]?.errors[0];throw new Error(`Import failed on row ${h+(S[0]?.index??0)}: ${$?.message??"Unknown error"}`)}f+=_.length-S.length,g+=S.length,y.push(...S.map($=>({row_index:h+$.index,first_error:$.errors[0]?.message??"Unknown",reason:$.errors[0]?.reason??null})))}return{success:g===0,rows_attempted:u.length,rows_imported:f,error_count:g,errors:y}}});var X6={project_id:Ye,dataset_id:wt,table_id:At,sort_column:ne.ShortText({displayName:"Sort Column",description:"Name of the column used to detect new rows. The table is ordered by this column (DESC) and any row newer than the last check is returned. Use a TIMESTAMP or DATETIME column, e.g. `created_at`.",required:!0}),max_results:ne.Number({displayName:"Max Rows per Check",description:"Maximum number of new rows to return per poll (default: 500).",required:!1,defaultValue:500})},im={strategy:0,items:a(async({auth:e,propsValue:t,lastFetchEpochMS:n})=>{let{project_id:o,dataset_id:r,table_id:i,sort_column:s,max_results:u}=t,d=u??500,p=await Le(e),f=n??Date.now()-10080*60*1e3,g=`\`${o}.${r}.${i}\``,y=s,h=`SELECT * FROM ${g} WHERE \`${y}\` > TIMESTAMP_MILLIS(${f}) ORDER BY \`${y}\` ASC LIMIT ${d}`,P=(await Ie.sendRequest({method:"POST",url:`${Ce}/projects/${o}/queries`,headers:{Authorization:`Bearer ${p}`},body:{query:h,useLegacySql:!1,maxResults:d,timeoutMs:3e4}})).body;if(!P.jobComplete)for(let $=0;$<30&&!P.jobComplete;$++)P=(await Ie.sendRequest({method:"GET",url:`${Ce}/projects/${o}/queries/${P.jobReference.jobId}`,headers:{Authorization:`Bearer ${p}`},queryParams:{timeoutMs:"10000",maxResults:String(d)}})).body;let x=P.schema?.fields??[];return rr(x,P.rows??[]).map($=>{let V=$[y],W;if(typeof V=="string"){let Z=parseFloat(V);W=!isNaN(Z)&&Z>1e9?Z*1e3:new Date(V).getTime()}else typeof V=="number"?W=V>1e12?V:V*1e3:W=Date.now();return{epochMilliSeconds:W,data:$}})},"items")},XC=so({auth:Ue,name:"new_row",classification:"READ",displayName:"New Row",description:"Triggers when a new row is added to a BigQuery table. Polls every 5 minutes by comparing the latest value in a sort column against the previous check.",aiMetadata:{description:"Fires for each new row appended to a BigQuery table, detected by polling a TIMESTAMP/DATETIME sort column for values newer than the previous check. Each event represents one newly inserted row. Detection depends entirely on the chosen sort column advancing for new rows."},props:X6,sampleData:{id:"1",created_at:"2024-01-15T10:30:00Z",name:"Example row"},type:"POLLING",async test(e){return await pt.test(im,e)},async onEnable(e){await pt.onEnable(im,e)},async onDisable(e){await pt.onDisable(im,e)},async run(e){return await pt.poll(im,e)}});var Q6={project_id:Ye,dataset_id:wt,table_id:At,updated_at_column:ne.ShortText({displayName:"Updated At Column",description:"Name of the TIMESTAMP column that records when a row was last updated, e.g. `updated_at`. Rows where this column is newer than the last check are returned.",required:!0}),created_at_column:ne.ShortText({displayName:"Created At Column (optional)",description:"If provided, only rows where the updated timestamp is newer than the created timestamp are returned, excluding brand-new rows from the results.",required:!1}),max_results:ne.Number({displayName:"Max Rows per Check",description:"Maximum number of updated rows to return per poll (default: 500).",required:!1,defaultValue:500})},am={strategy:0,items:a(async({auth:e,propsValue:t,lastFetchEpochMS:n})=>{let{project_id:o,dataset_id:r,table_id:i,updated_at_column:s,created_at_column:u,max_results:d}=t,p=d??500,f=await Le(e),g=n??Date.now()-10080*60*1e3,y=`\`${o}.${r}.${i}\``,h=s,_=u?` AND \`${u}\` < TIMESTAMP_MILLIS(${g})`:"",P=[`SELECT * FROM ${y}`,`WHERE \`${h}\` > TIMESTAMP_MILLIS(${g})${_}`,`ORDER BY \`${h}\` ASC`,`LIMIT ${p}`].join(" "),S=(await Ie.sendRequest({method:"POST",url:`${Ce}/projects/${o}/queries`,headers:{Authorization:`Bearer ${f}`},body:{query:P,useLegacySql:!1,maxResults:p,timeoutMs:3e4}})).body;if(!S.jobComplete)for(let W=0;W<30&&!S.jobComplete;W++)S=(await Ie.sendRequest({method:"GET",url:`${Ce}/projects/${o}/queries/${S.jobReference.jobId}`,headers:{Authorization:`Bearer ${f}`},queryParams:{timeoutMs:"10000",maxResults:String(p)}})).body;let $=S.schema?.fields??[];return rr($,S.rows??[]).map(W=>{let Z=W[h],G;if(typeof Z=="string"){let te=parseFloat(Z);G=!isNaN(te)&&te>1e9?te*1e3:new Date(Z).getTime()}else typeof Z=="number"?G=Z>1e12?Z:Z*1e3:G=Date.now();return{epochMilliSeconds:G,data:W}})},"items")},QC=so({auth:Ue,name:"updated_row",classification:"READ",displayName:"Updated Row",description:"Triggers when an existing row is updated in a BigQuery table. Requires an `updated_at` TIMESTAMP column that is set whenever a row changes.",aiMetadata:{description:"Fires for each row whose updated-at TIMESTAMP column advances past the previous check, representing a modified row in a BigQuery table. Requires that column to be set whenever a row changes; supplying an optional created-at column excludes brand-new rows so only genuine updates fire."},props:Q6,sampleData:{id:"1",updated_at:"2024-01-15T10:30:00Z",status:"active"},type:"POLLING",async test(e){return await pt.test(am,e)},async onEnable(e){await pt.onEnable(am,e)},async onDisable(e){await pt.onDisable(am,e)},async run(e){return await pt.poll(am,e)}});var Y6={project_id:Ye,max_rows_per_job:ne.Number({displayName:"Max Rows per Job",description:"Maximum number of result rows to fetch per completed job (default: 500).",required:!1,defaultValue:500})},sm={strategy:0,items:a(async({auth:e,propsValue:t,lastFetchEpochMS:n})=>{let{project_id:o,max_rows_per_job:r}=t,i=r??500,s=await Le(e),u=(n??Date.now()-1440*60*1e3)-3600*1e3,p=((await Ie.sendRequest({method:"GET",url:`${Ce}/projects/${o}/jobs`,headers:{Authorization:`Bearer ${s}`},queryParams:{stateFilter:"done",projection:"full",minCreationTime:String(u),maxResults:"50"}})).body.jobs??[]).filter(g=>g.configuration.jobType==="QUERY"&&!g.status.errorResult&&parseInt(g.statistics.endTime??"0",10)>(n??0)),f=[];for(let g of p){let y=g.jobReference.jobId,h=g.jobReference.location,_=parseInt(g.statistics.endTime??"0",10),P=[],x=[],S;do{let V=await Ie.sendRequest({method:"GET",url:`${Ce}/projects/${o}/queries/${y}`,headers:{Authorization:`Bearer ${s}`},queryParams:{maxResults:String(Math.min(i-P.length,1e3)),timeoutMs:"5000",...S?{pageToken:S}:{},...h?{location:h}:{}}});V.body.schema?.fields&&(x=V.body.schema.fields),P.push(...V.body.rows??[]),S=V.body.pageToken}while(S&&P.length<i);let $=rr(x,P.slice(0,i));f.push({epochMilliSeconds:_,data:{job_id:y,project_id:g.jobReference.projectId,location:h??null,query:g.configuration.query?.query??null,completed_at:g.statistics.endTime?new Date(_).toISOString():null,bytes_processed:g.statistics.query?.totalBytesProcessed??null,cache_hit:g.statistics.query?.cacheHit??null,user_email:g.user_email??null,row_count:$.length,rows:$}})}return f},"items")},YC=so({auth:Ue,name:"query_job_completed",classification:"READ",displayName:"Query Job Completed (With Row Data)",description:"Triggers when a BigQuery query job finishes successfully. Each flow run receives the job metadata and the result rows from that query.",aiMetadata:{description:"Fires when a successful (non-errored) QUERY-type job completes in the BigQuery project, detected by polling the project job history. Each event represents one finished query job and carries its metadata plus the fetched result rows. Only query jobs are surfaced; load, copy, and extract jobs are ignored."},props:Y6,sampleData:{job_id:"job_abc123",project_id:"my-project",query:"SELECT * FROM my_dataset.my_table LIMIT 10",completed_at:"2024-01-15T10:30:00Z",bytes_processed:"1024",cache_hit:!1,row_count:2,rows:[{id:"1",name:"Alice"},{id:"2",name:"Bob"}]},type:"POLLING",async test(e){return await pt.test(sm,e)},async onEnable(e){await pt.onEnable(sm,e)},async onDisable(e){await pt.onDisable(sm,e)},async run(e){return await pt.poll(sm,e)}});var eq={project_id:Ye,include_failed:ne.Checkbox({displayName:"Include Failed Jobs",description:"If enabled, jobs that completed with an error are also returned. Default: off (only successful jobs).",required:!1,defaultValue:!1})},cm={strategy:0,items:a(async({auth:e,propsValue:t,lastFetchEpochMS:n})=>{let{project_id:o,include_failed:r}=t,i=await Le(e),s=(n??Date.now()-1440*60*1e3)-3600*1e3;return((await Ie.sendRequest({method:"GET",url:`${Ce}/projects/${o}/jobs`,headers:{Authorization:`Bearer ${i}`},queryParams:{stateFilter:"done",projection:"full",minCreationTime:String(s),maxResults:"100"}})).body.jobs??[]).filter(p=>!(parseInt(p.statistics.endTime??"0",10)<=(n??0)||!(r??!1)&&p.status.errorResult)).map(p=>{let f=parseInt(p.statistics.endTime??"0",10),g=p.statistics.query?.dmlStats;return{epochMilliSeconds:f,data:{job_id:p.jobReference.jobId,project_id:p.jobReference.projectId,location:p.jobReference.location??null,job_type:p.configuration.jobType,status:p.status.errorResult?"FAILED":"SUCCESS",error_message:p.status.errorResult?.message??null,error_reason:p.status.errorResult?.reason??null,query:p.configuration.query?.query??null,created_at:p.statistics.creationTime?new Date(parseInt(p.statistics.creationTime,10)).toISOString():null,started_at:p.statistics.startTime?new Date(parseInt(p.statistics.startTime,10)).toISOString():null,completed_at:f?new Date(f).toISOString():null,bytes_processed:p.statistics.query?.totalBytesProcessed??p.statistics.totalBytesProcessed??null,cache_hit:p.statistics.query?.cacheHit??null,dml_inserted_rows:g?.insertedRowCount??null,dml_deleted_rows:g?.deletedRowCount??null,dml_updated_rows:g?.updatedRowCount??null,user_email:p.user_email??null}}})},"items")},e0=so({auth:Ue,name:"new_job_completed",classification:"READ",displayName:"New Job Completed",description:"Triggers when any BigQuery job (query, load, copy, or extract) finishes. Returns the job metadata including status, type, and timing.",aiMetadata:{description:"Fires when any BigQuery job of any type (query, load, copy, or extract) finishes in the project, detected by polling the job history. Each event represents one completed job and carries its metadata \u2014 type, status, timing, bytes processed, and DML row counts. By default only successful jobs fire; enabling the include-failed option also surfaces jobs that ended with an error."},props:eq,sampleData:{job_id:"job_xyz789",project_id:"my-project",job_type:"QUERY",status:"SUCCESS",error_message:null,query:"SELECT COUNT(*) FROM my_dataset.events",completed_at:"2024-01-15T10:30:00Z",bytes_processed:"2048",cache_hit:!1,user_email:"user@example.com"},type:"POLLING",async test(e){return await pt.test(cm,e)},async onEnable(e){await pt.onEnable(cm,e)},async onDisable(e){await pt.onDisable(cm,e)},async run(e){return await pt.poll(cm,e)}});var tq=hw({displayName:"Google BigQuery",description:"Query, analyze, and stream data into Google BigQuery \u2014 the fully managed, serverless data warehouse",minimumSupportedRelease:"0.36.1",logoUrl:"https://cdn.activepieces.com/pieces/google-bigquery.png",categories:["BUSINESS_INTELLIGENCE"],authors:["AhmadTash"],auth:Ue,actions:[FC,BC,qC,VC,ZC,HC,GC,WC,KC,$I({baseUrl:a(()=>Ce,"baseUrl"),auth:Ue,authMapping:a(async e=>({Authorization:`Bearer ${await Le(e)}`}),"authMapping")})],triggers:[XC,QC,YC,e0]});0&&(module.exports={bigQueryAuth,googleBigQuery});
67
105
  /*! Bundled license information:
68
106
 
69
107
  mime-types/index.js: