@activepieces/piece-google-bigquery 0.0.7 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/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 yN=Object.create;var Ja=Object.defineProperty;var _N=Object.getOwnPropertyDescriptor;var bN=Object.getOwnPropertyNames;var vN=Object.getPrototypeOf,EN=Object.prototype.hasOwnProperty;var a=(e,t)=>Ja(e,"name",{value:t,configurable:!0});var bt=(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}},Jt=(e,t)=>{for(var n in t)Ja(e,n,{get:t[n],enumerable:!0})},sS=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of bN(t))!EN.call(e,r)&&r!==n&&Ja(e,r,{get:()=>t[r],enumerable:!(o=_N(t,r))||o.enumerable});return e};var Rt=(e,t,n)=>(n=e!=null?yN(vN(e)):{},sS(t||!e||!e.__esModule?Ja(n,"default",{value:e,enumerable:!0}):n,e)),PN=e=>sS(Ja({},"__esModule",{value:!0}),e);var iA=B((oA,Rp)=>{(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,S=-1,T=(h.match(u.zoneIndex)||[])[0],R,V;for(T&&(T=T.substring(1),h=h.replace(/%.+$/,""));(S=h.indexOf(":",S+1))>=0;)P++;if(h.substr(0,2)==="::"&&P--,h.substr(-2,2)==="::"&&P--,P>_)return null;for(V=_-P,R=":";V--;)R+="0:";return h=h.replace("::",R),h[0]===":"&&(h=h.slice(1)),h[h.length-1]===":"&&(h=h.slice(0,-1)),_=(function(){let W=h.split(":"),H=[];for(let G=0;G<W.length;G++)H.push(parseInt(W[G],16));return H})(),{parts:_,zoneId:T}}a(d,"expandIPv6");function p(h,_,P,S){if(h.length!==_.length)throw new Error("ipaddr: cannot match CIDR for objects with different lengths");let T=0,R;for(;S>0;){if(R=P-S,R<0&&(R=0),h[T]>>R!==_[T]>>R)return!1;S-=P,T+=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,S;for(P=0;P<_.length;P++)if(S=_[P],!(0<=S&&S<=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 S;if(P===void 0&&(S=_,_=S[0],P=S[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,S={0:8,128:7,192:6,224:5,240:4,248:3,252:2,254:1,255:0},T,R,V;for(T=3;T>=0;T-=1)if(R=this.octets[T],R in S){if(V=S[R],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(),S=this.subnetMaskFromPrefixLength(_[1]).toByteArray(),T=[],R=0;for(;R<4;)T.push(parseInt(P[R],10)|parseInt(S[R],10)^255),R++;return new this(T)}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,S,T,R;try{for(_=this.parseCIDR(h),S=_[0].toByteArray(),R=this.subnetMaskFromPrefixLength(_[1]).toByteArray(),T=[],P=0;P<4;)T.push(parseInt(S[P],10)&parseInt(R[P],10)),P++;return new this(T)}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 S=[this.parse(_[1]),P];return Object.defineProperty(S,"toString",{value:a(function(){return this.join("/")},"value")}),S}}throw new Error("ipaddr: string is not formatted like an IPv4 CIDR range")},y.IPv4.parser=function(h){let _,P,S;if(_=h.match(n.fourOctet))return(function(){let T=_.slice(1,6),R=[];for(let V=0;V<T.length;V++)P=T[V],R.push(f(P));return R})();if(_=h.match(n.longValue)){if(S=f(_[1]),S>4294967295||S<0)throw new Error("ipaddr: address outside defined range");return(function(){let T=[],R;for(R=0;R<=24;R+=8)T.push(S>>R&255);return T})().reverse()}else return(_=h.match(n.twoOctet))?(function(){let T=_.slice(1,4),R=[];if(S=f(T[1]),S>16777215||S<0)throw new Error("ipaddr: address outside defined range");return R.push(f(T[0])),R.push(S>>16&255),R.push(S>>8&255),R.push(S&255),R})():(_=h.match(n.threeOctet))?(function(){let T=_.slice(1,5),R=[];if(S=f(T[2]),S>65535||S<0)throw new Error("ipaddr: address outside defined range");return R.push(f(T[0])),R.push(f(T[1])),R.push(S>>8&255),R.push(S&255),R})():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,S=Math.floor(h/8);for(;P<S;)_[P]=255,P++;return S<4&&(_[S]=Math.pow(2,h%8)-1<<8-h%8),new this(_)},y.IPv6=(function(){function h(_,P){let S,T;if(_.length===16)for(this.parts=[],S=0;S<=14;S+=2)this.parts.push(_[S]<<8|_[S+1]);else if(_.length===8)this.parts=_;else throw new Error("ipaddr: ipv6 part count should be 8 or 16");for(S=0;S<this.parts.length;S++)if(T=this.parts[S],!(0<=T&&T<=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 S;if(P===void 0&&(S=_,_=S[0],P=S[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,S={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},T,R;for(let V=7;V>=0;V-=1)if(T=this.parts[V],T in S){if(R=S[T],P&&R!==0)return null;R!==16&&(P=!0),_+=R}else return null;return 128-_},h.prototype.range=function(){return y.subnetMatch(this,this.SpecialRanges)},h.prototype.toByteArray=function(){let _,P=[],S=this.parts;for(let T=0;T<S.length;T++)_=S[T],P.push(_>>8),P.push(_&255);return P},h.prototype.toFixedLengthString=function(){let _=(function(){let S=[];for(let T=0;T<this.parts.length;T++)S.push(g(this.parts[T].toString(16),4));return S}).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],S=_[1];return new y.IPv4([P>>8,P&255,S>>8,S&255])},h.prototype.toNormalizedString=function(){let _=(function(){let S=[];for(let T=0;T<this.parts.length;T++)S.push(this.parts[T].toString(16));return S}).call(this).join(":"),P="";return this.zoneId&&(P=`%${this.zoneId}`),_+P},h.prototype.toRFC5952String=function(){let _=/((^|:)(0(:|$)){2,})/g,P=this.toNormalizedString(),S=0,T=-1,R;for(;R=_.exec(P);)R[0].length>T&&(S=R.index,T=R[0].length);return T<0?P:`${P.substring(0,S)}::${P.substring(S+T)}`},h.prototype.toString=function(){return this.toRFC5952String()},h})(),y.IPv6.broadcastAddressFromCIDR=function(h){try{let _=this.parseCIDR(h),P=_[0].toByteArray(),S=this.subnetMaskFromPrefixLength(_[1]).toByteArray(),T=[],R=0;for(;R<16;)T.push(parseInt(P[R],10)|parseInt(S[R],10)^255),R++;return new this(T)}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,S,T,R;try{for(_=this.parseCIDR(h),S=_[0].toByteArray(),R=this.subnetMaskFromPrefixLength(_[1]).toByteArray(),T=[],P=0;P<16;)T.push(parseInt(S[P],10)&parseInt(R[P],10)),P++;return new this(T)}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,S;if((P=h.match(/^(.+)\/(\d+)$/))&&(_=parseInt(P[2]),_>=0&&_<=128))return S=[this.parse(P[1]),_],Object.defineProperty(S,"toString",{value:a(function(){return this.join("/")},"value")}),S;throw new Error("ipaddr: string is not formatted like an IPv6 CIDR range")},y.IPv6.parser=function(h){let _,P,S,T,R,V;if(S=h.match(u.deprecatedTransitional))return this.parser(`::ffff:${S[1]}`);if(u.native.test(h))return d(h,8);if((S=h.match(u.transitional))&&(V=S[6]||"",_=S[1],S[1].endsWith("::")||(_=_.slice(0,-1)),_=d(_+V,6),_.parts)){for(R=[parseInt(S[2]),parseInt(S[3]),parseInt(S[4]),parseInt(S[5])],P=0;P<R.length;P++)if(T=R[P],!(0<=T&&T<=255))return null;return _.parts.push(R[0]<<8|R[1]),_.parts.push(R[2]<<8|R[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,S=Math.floor(h/8);for(;P<S;)_[P]=255,P++;return S<16&&(_[S]=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 S,T,R,V;P==null&&(P="unicast");for(T in _)if(Object.prototype.hasOwnProperty.call(_,T)){for(R=_[T],R[0]&&!(R[0]instanceof Array)&&(R=[R]),S=0;S<R.length;S++)if(V=R[S],h.kind()===V[0].kind()&&h.match.apply(h,V))return T}return P},typeof Rp<"u"&&Rp.exports?Rp.exports=y:e.ipaddr=y})(oA)});var dw=B((w8,lw)=>{var uw=require("stream").Stream,gM=require("util");lw.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=[]}a(Hr,"DelayedStream");gM.inherits(Hr,uw);Hr.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(Hr.prototype,"readable",{configurable:!0,enumerable:!0,get:a(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(e){this.emit.apply(this,e)}.bind(this)),this._bufferedEvents=[]};Hr.prototype.pipe=function(){var e=uw.prototype.pipe.apply(this,arguments);return this.resume(),e};Hr.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)};Hr.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 hw=B((R8,mw)=>{var yM=require("util"),fw=require("stream").Stream,pw=dw();mw.exports=ut;function ut(){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(ut,"CombinedStream");yM.inherits(ut,fw);ut.create=function(e){var t=new this;e=e||{};for(var n in e)t[n]=e[n];return t};ut.isStreamLike=function(e){return typeof e!="function"&&typeof e!="string"&&typeof e!="boolean"&&typeof e!="number"&&!Buffer.isBuffer(e)};ut.prototype.append=function(e){var t=ut.isStreamLike(e);if(t){if(!(e instanceof pw)){var n=pw.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};ut.prototype.pipe=function(e,t){return fw.prototype.pipe.call(this,e,t),this.resume(),e};ut.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}};ut.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=ut.isStreamLike(n);o&&(n.on("data",this._checkDataSize.bind(this)),this._handleErrors(n)),this._pipeNext(n)}.bind(this))};ut.prototype._pipeNext=function(e){this._currentStream=e;var t=ut.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()};ut.prototype._handleErrors=function(e){var t=this;e.on("error",function(n){t._emitError(n)})};ut.prototype.write=function(e){this.emit("data",e)};ut.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"))};ut.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")};ut.prototype.end=function(){this._reset(),this.emit("end")};ut.prototype.destroy=function(){this._reset(),this.emit("close")};ut.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};ut.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(e))}};ut.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)};ut.prototype._emitError=function(e){this._reset(),this.emit("error",e)}});var yw=B((O8,gw)=>{"use strict";gw.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 vw=B(er=>{"use strict";var Dp=yw(),_M=require("path").extname,_w=/^\s*([^;\s]*)(?:;|\s|$)/,bM=/^text\//i;er.charset=bw;er.charsets={lookup:bw};er.contentType=vM;er.extension=EM;er.extensions=Object.create(null);er.lookup=PM;er.types=Object.create(null);SM(er.extensions,er.types);function bw(e){if(!e||typeof e!="string")return!1;var t=_w.exec(e),n=t&&Dp[t[1].toLowerCase()];return n&&n.charset?n.charset:t&&bM.test(t[1])?"UTF-8":!1}a(bw,"charset");function vM(e){if(!e||typeof e!="string")return!1;var t=e.indexOf("/")===-1?er.lookup(e):e;if(!t)return!1;if(t.indexOf("charset")===-1){var n=er.charset(t);n&&(t+="; charset="+n.toLowerCase())}return t}a(vM,"contentType");function EM(e){if(!e||typeof e!="string")return!1;var t=_w.exec(e),n=t&&er.extensions[t[1].toLowerCase()];return!n||!n.length?!1:n[0]}a(EM,"extension");function PM(e){if(!e||typeof e!="string")return!1;var t=_M("x."+e).toLowerCase().substr(1);return t&&er.types[t]||!1}a(PM,"lookup");function SM(e,t){var n=["nginx","apache",void 0,"iana"];Object.keys(Dp).forEach(a(function(r){var i=Dp[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(Dp[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(SM,"populateMaps")});var Pw=B((N8,Ew)=>{Ew.exports=TM;function TM(e){var t=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;t?t(e):setTimeout(e,0)}a(TM,"defer")});var yb=B((D8,Tw)=>{var Sw=Pw();Tw.exports=xM;function xM(e){var t=!1;return Sw(function(){t=!0}),a(function(o,r){t?e(o,r):Sw(a(function(){e(o,r)},"nextTick_callback"))},"async_callback")}a(xM,"async")});var _b=B((j8,xw)=>{xw.exports=AM;function AM(e){Object.keys(e.jobs).forEach(wM.bind(e)),e.jobs={}}a(AM,"abort");function wM(e){typeof this.jobs[e]=="function"&&this.jobs[e]()}a(wM,"clean")});var bb=B((L8,ww)=>{var Aw=yb(),IM=_b();ww.exports=RM;function RM(e,t,n,o){var r=n.keyedList?n.keyedList[n.index]:n.index;n.jobs[r]=CM(t,r,e[r],function(i,s){r in n.jobs&&(delete n.jobs[r],i?IM(n):n.results[r]=s,o(i,n.results))})}a(RM,"iterate");function CM(e,t,n,o){var r;return e.length==2?r=e(n,Aw(o)):r=e(n,t,Aw(o)),r}a(CM,"runJob")});var vb=B((B8,Iw)=>{Iw.exports=OM;function OM(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(OM,"state")});var Eb=B((V8,Rw)=>{var kM=_b(),$M=yb();Rw.exports=NM;function NM(e){Object.keys(this.jobs).length&&(this.index=this.size,kM(this),$M(e)(null,this.results))}a(NM,"terminator")});var Ow=B((Z8,Cw)=>{var zM=bb(),DM=vb(),UM=Eb();Cw.exports=jM;function jM(e,t,n){for(var o=DM(e);o.index<(o.keyedList||e).length;)zM(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 UM.bind(o,n)}a(jM,"parallel")});var Pb=B((W8,Up)=>{var kw=bb(),MM=vb(),LM=Eb();Up.exports=FM;Up.exports.ascending=$w;Up.exports.descending=BM;function FM(e,t,n,o){var r=MM(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")),LM.bind(r,o)}a(FM,"serialOrdered");function $w(e,t){return e<t?-1:e>t?1:0}a($w,"ascending");function BM(e,t){return-1*$w(e,t)}a(BM,"descending")});var zw=B((K8,Nw)=>{var qM=Pb();Nw.exports=VM;function VM(e,t,n){return qM(e,t,null,n)}a(VM,"serial")});var Uw=B((Q8,Dw)=>{Dw.exports={parallel:Ow(),serial:zw(),serialOrdered:Pb()}});var Sb=B((Y8,jw)=>{"use strict";jw.exports=Object});var Lw=B((e9,Mw)=>{"use strict";Mw.exports=Error});var Bw=B((t9,Fw)=>{"use strict";Fw.exports=EvalError});var Vw=B((r9,qw)=>{"use strict";qw.exports=RangeError});var Zw=B((n9,Hw)=>{"use strict";Hw.exports=ReferenceError});var Ww=B((o9,Gw)=>{"use strict";Gw.exports=SyntaxError});var jp=B((i9,Jw)=>{"use strict";Jw.exports=TypeError});var Xw=B((a9,Kw)=>{"use strict";Kw.exports=URIError});var Yw=B((s9,Qw)=>{"use strict";Qw.exports=Math.abs});var tI=B((c9,eI)=>{"use strict";eI.exports=Math.floor});var nI=B((u9,rI)=>{"use strict";rI.exports=Math.max});var iI=B((l9,oI)=>{"use strict";oI.exports=Math.min});var sI=B((d9,aI)=>{"use strict";aI.exports=Math.pow});var uI=B((p9,cI)=>{"use strict";cI.exports=Math.round});var dI=B((f9,lI)=>{"use strict";lI.exports=Number.isNaN||a(function(t){return t!==t},"isNaN")});var fI=B((h9,pI)=>{"use strict";var HM=dI();pI.exports=a(function(t){return HM(t)||t===0?t:t<0?-1:1},"sign")});var hI=B((y9,mI)=>{"use strict";mI.exports=Object.getOwnPropertyDescriptor});var Tb=B((_9,gI)=>{"use strict";var Mp=hI();if(Mp)try{Mp([],"length")}catch{Mp=null}gI.exports=Mp});var _I=B((b9,yI)=>{"use strict";var Lp=Object.defineProperty||!1;if(Lp)try{Lp({},"a",{value:1})}catch{Lp=!1}yI.exports=Lp});var xb=B((v9,bI)=>{"use strict";bI.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 PI=B((P9,EI)=>{"use strict";var vI=typeof Symbol<"u"&&Symbol,ZM=xb();EI.exports=a(function(){return typeof vI!="function"||typeof Symbol!="function"||typeof vI("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:ZM()},"hasNativeSymbols")});var Ab=B((T9,SI)=>{"use strict";SI.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var wb=B((x9,TI)=>{"use strict";var GM=Sb();TI.exports=GM.getPrototypeOf||null});var wI=B((A9,AI)=>{"use strict";var WM="Function.prototype.bind called on incompatible ",JM=Object.prototype.toString,KM=Math.max,XM="[object Function]",xI=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"),QM=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"),YM=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");AI.exports=a(function(t){var n=this;if(typeof n!="function"||JM.apply(n)!==XM)throw new TypeError(WM+n);for(var o=QM(arguments,1),r,i=a(function(){if(this instanceof r){var f=n.apply(this,xI(o,arguments));return Object(f)===f?f:this}return n.apply(t,xI(o,arguments))},"binder"),s=KM(0,n.length-o.length),u=[],d=0;d<s;d++)u[d]="$"+d;if(r=Function("binder","return function ("+YM(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 sa=B((I9,II)=>{"use strict";var eL=wI();II.exports=Function.prototype.bind||eL});var Fp=B((R9,RI)=>{"use strict";RI.exports=Function.prototype.call});var Ib=B((C9,CI)=>{"use strict";CI.exports=Function.prototype.apply});var kI=B((O9,OI)=>{"use strict";OI.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var NI=B((k9,$I)=>{"use strict";var tL=sa(),rL=Ib(),nL=Fp(),oL=kI();$I.exports=oL||tL.call(nL,rL)});var DI=B(($9,zI)=>{"use strict";var iL=sa(),aL=jp(),sL=Fp(),cL=NI();zI.exports=a(function(t){if(t.length<1||typeof t[0]!="function")throw new aL("a function is required");return cL(iL,sL,t)},"callBindBasic")});var BI=B((z9,FI)=>{"use strict";var uL=DI(),UI=Tb(),MI;try{MI=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!="object"||!("code"in e)||e.code!=="ERR_PROTO_ACCESS")throw e}var Rb=!!MI&&UI&&UI(Object.prototype,"__proto__"),LI=Object,jI=LI.getPrototypeOf;FI.exports=Rb&&typeof Rb.get=="function"?uL([Rb.get]):typeof jI=="function"?a(function(t){return jI(t==null?t:LI(t))},"getDunder"):!1});var GI=B((U9,ZI)=>{"use strict";var qI=Ab(),VI=wb(),HI=BI();ZI.exports=qI?a(function(t){return qI(t)},"getProto"):VI?a(function(t){if(!t||typeof t!="object"&&typeof t!="function")throw new TypeError("getProto: not an object");return VI(t)},"getProto"):HI?a(function(t){return HI(t)},"getProto"):null});var Cb=B((M9,WI)=>{"use strict";var lL=Function.prototype.call,dL=Object.prototype.hasOwnProperty,pL=sa();WI.exports=pL.call(lL,dL)});var tR=B((L9,eR)=>{"use strict";var Re,fL=Sb(),mL=Lw(),hL=Bw(),gL=Vw(),yL=Zw(),da=Ww(),la=jp(),_L=Xw(),bL=Yw(),vL=tI(),EL=nI(),PL=iI(),SL=sI(),TL=uI(),xL=fI(),QI=Function,Ob=a(function(e){try{return QI('"use strict"; return ('+e+").constructor;")()}catch{}},"getEvalledConstructor"),Kc=Tb(),AL=_I(),kb=a(function(){throw new la},"throwTypeError"),wL=Kc?(function(){try{return arguments.callee,kb}catch{try{return Kc(arguments,"callee").get}catch{return kb}}})():kb,ca=PI()(),St=GI(),IL=wb(),RL=Ab(),YI=Ib(),Xc=Fp(),ua={},CL=typeof Uint8Array>"u"||!St?Re:St(Uint8Array),Qo={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?Re:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Re:ArrayBuffer,"%ArrayIteratorPrototype%":ca&&St?St([][Symbol.iterator]()):Re,"%AsyncFromSyncIteratorPrototype%":Re,"%AsyncFunction%":ua,"%AsyncGenerator%":ua,"%AsyncGeneratorFunction%":ua,"%AsyncIteratorPrototype%":ua,"%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%":mL,"%eval%":eval,"%EvalError%":hL,"%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%":QI,"%GeneratorFunction%":ua,"%Int8Array%":typeof Int8Array>"u"?Re:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Re:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Re:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":ca&&St?St(St([][Symbol.iterator]())):Re,"%JSON%":typeof JSON=="object"?JSON:Re,"%Map%":typeof Map>"u"?Re:Map,"%MapIteratorPrototype%":typeof Map>"u"||!ca||!St?Re:St(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":fL,"%Object.getOwnPropertyDescriptor%":Kc,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Re:Promise,"%Proxy%":typeof Proxy>"u"?Re:Proxy,"%RangeError%":gL,"%ReferenceError%":yL,"%Reflect%":typeof Reflect>"u"?Re:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Re:Set,"%SetIteratorPrototype%":typeof Set>"u"||!ca||!St?Re:St(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Re:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":ca&&St?St(""[Symbol.iterator]()):Re,"%Symbol%":ca?Symbol:Re,"%SyntaxError%":da,"%ThrowTypeError%":wL,"%TypedArray%":CL,"%TypeError%":la,"%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%":_L,"%WeakMap%":typeof WeakMap>"u"?Re:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Re:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Re:WeakSet,"%Function.prototype.call%":Xc,"%Function.prototype.apply%":YI,"%Object.defineProperty%":AL,"%Object.getPrototypeOf%":IL,"%Math.abs%":bL,"%Math.floor%":vL,"%Math.max%":EL,"%Math.min%":PL,"%Math.pow%":SL,"%Math.round%":TL,"%Math.sign%":xL,"%Reflect.getPrototypeOf%":RL};if(St)try{null.error}catch(e){JI=St(St(e)),Qo["%Error.prototype%"]=JI}var JI,OL=a(function e(t){var n;if(t==="%AsyncFunction%")n=Ob("async function () {}");else if(t==="%GeneratorFunction%")n=Ob("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=Ob("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 Qo[t]=n,n},"doEval"),KI={__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"]},Qc=sa(),Bp=Cb(),kL=Qc.call(Xc,Array.prototype.concat),$L=Qc.call(YI,Array.prototype.splice),XI=Qc.call(Xc,String.prototype.replace),qp=Qc.call(Xc,String.prototype.slice),NL=Qc.call(Xc,RegExp.prototype.exec),zL=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,DL=/\\(\\)?/g,UL=a(function(t){var n=qp(t,0,1),o=qp(t,-1);if(n==="%"&&o!=="%")throw new da("invalid intrinsic syntax, expected closing `%`");if(o==="%"&&n!=="%")throw new da("invalid intrinsic syntax, expected opening `%`");var r=[];return XI(t,zL,function(i,s,u,d){r[r.length]=u?XI(d,DL,"$1"):s||i}),r},"stringToPath"),jL=a(function(t,n){var o=t,r;if(Bp(KI,o)&&(r=KI[o],o="%"+r[0]+"%"),Bp(Qo,o)){var i=Qo[o];if(i===ua&&(i=OL(o)),typeof i>"u"&&!n)throw new la("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:r,name:o,value:i}}throw new da("intrinsic "+t+" does not exist!")},"getBaseIntrinsic");eR.exports=a(function(t,n){if(typeof t!="string"||t.length===0)throw new la("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new la('"allowMissing" argument must be a boolean');if(NL(/^%?[^%]*%?$/,t)===null)throw new da("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var o=UL(t),r=o.length>0?o[0]:"",i=jL("%"+r+"%",n),s=i.name,u=i.value,d=!1,p=i.alias;p&&(r=p[0],$L(o,kL([0,1],p)));for(var f=1,g=!0;f<o.length;f+=1){var y=o[f],h=qp(y,0,1),_=qp(y,-1);if((h==='"'||h==="'"||h==="`"||_==='"'||_==="'"||_==="`")&&h!==_)throw new da("property names with quotes must have matching quotes");if((y==="constructor"||!g)&&(d=!0),r+="."+y,s="%"+r+"%",Bp(Qo,s))u=Qo[s];else if(u!=null){if(!(y in u)){if(!n)throw new la("base intrinsic for "+t+" exists, but the property is not available.");return}if(Kc&&f+1>=o.length){var P=Kc(u,y);g=!!P,g&&"get"in P&&!("originalValue"in P.get)?u=P.get:u=u[y]}else g=Bp(u,y),u=u[y];g&&!d&&(Qo[s]=u)}}return u},"GetIntrinsic")});var nR=B((B9,rR)=>{"use strict";var ML=xb();rR.exports=a(function(){return ML()&&!!Symbol.toStringTag},"hasToStringTagShams")});var aR=B((V9,iR)=>{"use strict";var LL=tR(),oR=LL("%Object.defineProperty%",!0),FL=nR()(),BL=Cb(),qL=jp(),Vp=FL?Symbol.toStringTag:null;iR.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 qL("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");Vp&&(o||!BL(t,Vp))&&(oR?oR(t,Vp,{configurable:!r,enumerable:!1,value:n,writable:!1}):t[Vp]=n)},"setToStringTag")});var cR=B((Z9,sR)=>{"use strict";var VL=Function.prototype.call,HL=Object.prototype.hasOwnProperty,ZL=sa();sR.exports=ZL.call(VL,HL)});var lR=B((G9,uR)=>{"use strict";uR.exports=function(e,t){return Object.keys(t).forEach(function(n){e[n]=e[n]||t[n]}),e}});var fR=B((W9,pR)=>{"use strict";var Db=hw(),GL=require("util"),$b=require("path"),WL=require("http"),JL=require("https"),KL=require("url").parse,XL=require("fs"),QL=require("stream").Stream,YL=require("crypto"),Nb=vw(),e1=Uw(),t1=aR(),po=cR(),zb=lR();function dR(e){return String(e).replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/"/g,"%22")}a(dR,"escapeHeaderParam");function Ue(e){if(!(this instanceof Ue))return new Ue(e);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],Db.call(this),e=e||{};for(var t in e)this[t]=e[t]}a(Ue,"FormData");GL.inherits(Ue,Db);Ue.LINE_BREAK=`\r
2
+ `;Ue.DEFAULT_CONTENT_TYPE="application/octet-stream";Ue.prototype.append=function(e,t,n){n=n||{},typeof n=="string"&&(n={filename:n});var o=Db.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)};Ue.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)+Ue.LINE_BREAK.length,!(!t||!t.path&&!(t.readable&&po(t,"httpVersion"))&&!(t instanceof QL))&&(n.knownLength||this._valuesToMeasure.push(t))};Ue.prototype._lengthRetriever=function(e,t){po(e,"fd")?e.end!=null&&e.end!=1/0&&e.start!=null?t(null,e.end+1-(e.start?e.start:0)):XL.stat(e.path,function(n,o){if(n){t(n);return}var r=o.size-(e.start?e.start:0);t(null,r)}):po(e,"httpVersion")?t(null,Number(e.headers["content-length"])):po(e,"httpModule")?(e.on("response",function(n){e.pause(),t(null,Number(n.headers["content-length"]))}),e.resume()):t("Unknown stream")};Ue.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="'+dR(e)+'"'].concat(o||[]),"Content-Type":[].concat(r||[])};typeof n.header=="object"&&zb(s,n.header);var u;for(var d in s)if(po(s,d)){if(u=s[d],u==null)continue;Array.isArray(u)||(u=[u]),u.length&&(i+=d+": "+u.join("; ")+Ue.LINE_BREAK)}return"--"+this.getBoundary()+Ue.LINE_BREAK+i+Ue.LINE_BREAK};Ue.prototype._getContentDisposition=function(e,t){var n;if(typeof t.filepath=="string"?n=$b.normalize(t.filepath).replace(/\\/g,"/"):t.filename||e&&(e.name||e.path)?n=$b.basename(t.filename||e&&(e.name||e.path)):e&&e.readable&&po(e,"httpVersion")&&(n=$b.basename(e.client._httpMessage.path||"")),n)return'filename="'+dR(n)+'"'};Ue.prototype._getContentType=function(e,t){var n=t.contentType;return!n&&e&&e.name&&(n=Nb.lookup(e.name)),!n&&e&&e.path&&(n=Nb.lookup(e.path)),!n&&e&&e.readable&&po(e,"httpVersion")&&(n=e.headers["content-type"]),!n&&(t.filepath||t.filename)&&(n=Nb.lookup(t.filepath||t.filename)),!n&&e&&typeof e=="object"&&(n=Ue.DEFAULT_CONTENT_TYPE),n};Ue.prototype._multiPartFooter=function(){return function(e){var t=Ue.LINE_BREAK,n=this._streams.length===0;n&&(t+=this._lastBoundary()),e(t)}.bind(this)};Ue.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+Ue.LINE_BREAK};Ue.prototype.getHeaders=function(e){var t,n={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in e)po(e,t)&&(n[t.toLowerCase()]=e[t]);return n};Ue.prototype.setBoundary=function(e){if(typeof e!="string")throw new TypeError("FormData boundary must be a string");this._boundary=e};Ue.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};Ue.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(Ue.LINE_BREAK)])));return Buffer.concat([e,Buffer.from(this._lastBoundary())])};Ue.prototype._generateBoundary=function(){this._boundary="--------------------------"+YL.randomBytes(12).toString("hex")};Ue.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};Ue.prototype.hasKnownLength=function(){var e=!0;return this._valuesToMeasure.length&&(e=!1),e};Ue.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}e1.parallel(this._valuesToMeasure,this._lengthRetriever,function(n,o){if(n){e(n);return}o.forEach(function(r){t+=r}),e(null,t)})};Ue.prototype.submit=function(e,t){var n,o,r={method:"post"};return typeof e=="string"?(e=KL(e),o=zb({port:e.port,path:e.pathname,host:e.hostname,protocol:e.protocol},r)):(o=zb(e,r),o.port||(o.port=o.protocol==="https:"?443:80)),o.headers=this.getHeaders(e.headers),o.protocol==="https:"?n=JL.request(o):n=WL.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};Ue.prototype._error=function(e){this.error||(this.error=e,this.pause(),this.emit("error",e))};Ue.prototype.toString=function(){return"[object FormData]"};t1(Ue.prototype,"FormData");pR.exports=Ue});var Ub=B((yY,PR)=>{"use strict";var Hp=Object.prototype.hasOwnProperty,ER=Object.prototype.toString,hR=Object.defineProperty,gR=Object.getOwnPropertyDescriptor,yR=a(function(t){return typeof Array.isArray=="function"?Array.isArray(t):ER.call(t)==="[object Array]"},"isArray"),_R=a(function(t){if(!t||ER.call(t)!=="[object Object]")return!1;var n=Hp.call(t,"constructor"),o=t.constructor&&t.constructor.prototype&&Hp.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!o)return!1;var r;for(r in t);return typeof r>"u"||Hp.call(t,r)},"isPlainObject"),bR=a(function(t,n){hR&&n.name==="__proto__"?hR(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},"setProperty"),vR=a(function(t,n){if(n==="__proto__")if(Hp.call(t,n)){if(gR)return gR(t,n).value}else return;return t[n]},"getProperty");PR.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=vR(u,n),r=vR(t,n),u!==r&&(f&&r&&(_R(r)||(i=yR(r)))?(i?(i=!1,s=o&&yR(o)?o:[]):s=o&&_R(o)?o:{},bR(u,{name:n,newValue:e(f,s,r)})):typeof r<"u"&&bR(u,{name:n,newValue:r}));return u},"extend")});var SR=B((bY,l1)=>{l1.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 xR=B((vY,TR)=>{"use strict";var d1=SR();TR.exports={pkg:d1}});var Lb=B(Rr=>{"use strict";var wR=Rr&&Rr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Rr,"__esModule",{value:!0});Rr.GaxiosError=Rr.GAXIOS_ERROR_SYMBOL=void 0;Rr.defaultErrorRedactor=IR;var AR=wR(Ub()),p1=wR(xR()),jb=p1.default.pkg;Rr.GAXIOS_ERROR_SYMBOL=Symbol.for(`${jb.name}-gaxios-error`);var Mb=class e extends Error{static{a(this,"GaxiosError")}config;response;code;status;error;[Rr.GAXIOS_ERROR_SYMBOL]=jb.version;static[Symbol.hasInstance](t){return t&&typeof t=="object"&&Rr.GAXIOS_ERROR_SYMBOL in t&&t[Rr.GAXIOS_ERROR_SYMBOL]===jb.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,AR.default)(!0,{},n),this.response&&(this.response.config=(0,AR.default)(!0,{},this.response.config)),this.response){try{this.response.data=f1(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}}};Rr.GaxiosError=Mb;function f1(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(f1,"translateData");function IR(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&&(IR({config:e.response.config}),n(e.response.headers),e.response.bodyUsed&&(o(e.response,"data"),r(e.response.data))),e}a(IR,"defaultErrorRedactor")});var CR=B(Fb=>{"use strict";Object.defineProperty(Fb,"__esModule",{value:!0});Fb.getRetryConfig=m1;async function m1(e){let t=RR(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||h1)(e))return{shouldRetry:!1,config:e.config};let r=g1(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(m1,"getRetryConfig");function h1(e){let t=RR(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(h1,"shouldRetryRequest");function RR(e){if(e&&e.config&&e.config.retryConfig)return e.config.retryConfig}a(RR,"getConfig");function g1(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(g1,"getNextRetryDelay")});var qb=B(Zp=>{"use strict";Object.defineProperty(Zp,"__esModule",{value:!0});Zp.GaxiosInterceptorManager=void 0;var Bb=class extends Set{static{a(this,"GaxiosInterceptorManager")}};Zp.GaxiosInterceptorManager=Bb});var kR=B((wY,OR)=>{var pa=1e3,fa=pa*60,ma=fa*60,Yo=ma*24,y1=Yo*7,_1=Yo*365.25;OR.exports=function(e,t){t=t||{};var n=typeof e;if(n==="string"&&e.length>0)return b1(e);if(n==="number"&&isFinite(e))return t.long?E1(e):v1(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function b1(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*_1;case"weeks":case"week":case"w":return n*y1;case"days":case"day":case"d":return n*Yo;case"hours":case"hour":case"hrs":case"hr":case"h":return n*ma;case"minutes":case"minute":case"mins":case"min":case"m":return n*fa;case"seconds":case"second":case"secs":case"sec":case"s":return n*pa;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}a(b1,"parse");function v1(e){var t=Math.abs(e);return t>=Yo?Math.round(e/Yo)+"d":t>=ma?Math.round(e/ma)+"h":t>=fa?Math.round(e/fa)+"m":t>=pa?Math.round(e/pa)+"s":e+"ms"}a(v1,"fmtShort");function E1(e){var t=Math.abs(e);return t>=Yo?Gp(e,t,Yo,"day"):t>=ma?Gp(e,t,ma,"hour"):t>=fa?Gp(e,t,fa,"minute"):t>=pa?Gp(e,t,pa,"second"):e+" ms"}a(E1,"fmtLong");function Gp(e,t,n,o){var r=t>=n*1.5;return Math.round(e/n)+" "+o+(r?"s":"")}a(Gp,"plural")});var Vb=B((RY,$R)=>{function P1(e){n.debug=n,n.default=n,n.coerce=d,n.disable=s,n.enable=r,n.enabled=u,n.humanize=kR(),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(...S){if(!P.enabled)return;let T=P,R=Number(new Date),V=R-(g||R);T.diff=V,T.prev=g,T.curr=R,g=R,S[0]=n.coerce(S[0]),typeof S[0]!="string"&&S.unshift("%O");let W=0;S[0]=S[0].replace(/%([a-zA-Z%])/g,(G,re)=>{if(G==="%%")return"%";W++;let ue=n.formatters[re];if(typeof ue=="function"){let Y=S[W];G=ue.call(T,Y),S.splice(W,1),W--}return G}),n.formatArgs.call(T,S),(T.log||n.log).apply(T,S)}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(S=>{y=S},"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(P1,"setup");$R.exports=P1});var NR=B((tr,Wp)=>{tr.formatArgs=T1;tr.save=x1;tr.load=A1;tr.useColors=S1;tr.storage=w1();tr.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`."))}})();tr.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 S1(){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(S1,"useColors");function T1(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+Wp.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(T1,"formatArgs");tr.log=console.debug||console.log||(()=>{});function x1(e){try{e?tr.storage.setItem("debug",e):tr.storage.removeItem("debug")}catch{}}a(x1,"save");function A1(){let e;try{e=tr.storage.getItem("debug")||tr.storage.getItem("DEBUG")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}a(A1,"load");function w1(){try{return localStorage}catch{}}a(w1,"localstorage");Wp.exports=Vb()(tr);var{formatters:I1}=Wp.exports;I1.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var DR=B((kY,zR)=>{"use strict";zR.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 MR=B(($Y,jR)=>{"use strict";var R1=require("os"),UR=require("tty"),Cr=DR(),{env:Tt}=process,fo;Cr("no-color")||Cr("no-colors")||Cr("color=false")||Cr("color=never")?fo=0:(Cr("color")||Cr("colors")||Cr("color=true")||Cr("color=always"))&&(fo=1);"FORCE_COLOR"in Tt&&(Tt.FORCE_COLOR==="true"?fo=1:Tt.FORCE_COLOR==="false"?fo=0:fo=Tt.FORCE_COLOR.length===0?1:Math.min(parseInt(Tt.FORCE_COLOR,10),3));function Hb(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}a(Hb,"translateLevel");function Zb(e,t){if(fo===0)return 0;if(Cr("color=16m")||Cr("color=full")||Cr("color=truecolor"))return 3;if(Cr("color=256"))return 2;if(e&&!t&&fo===void 0)return 0;let n=fo||0;if(Tt.TERM==="dumb")return n;if(process.platform==="win32"){let o=R1.release().split(".");return Number(o[0])>=10&&Number(o[2])>=10586?Number(o[2])>=14931?3:2:1}if("CI"in Tt)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(o=>o in Tt)||Tt.CI_NAME==="codeship"?1:n;if("TEAMCITY_VERSION"in Tt)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Tt.TEAMCITY_VERSION)?1:0;if(Tt.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in Tt){let o=parseInt((Tt.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Tt.TERM_PROGRAM){case"iTerm.app":return o>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Tt.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Tt.TERM)||"COLORTERM"in Tt?1:n}a(Zb,"supportsColor");function C1(e){let t=Zb(e,e&&e.isTTY);return Hb(t)}a(C1,"getSupportLevel");jR.exports={supportsColor:C1,stdout:Hb(Zb(!0,UR.isatty(1))),stderr:Hb(Zb(!0,UR.isatty(2)))}});var FR=B((xt,Kp)=>{var O1=require("tty"),Jp=require("util");xt.init=j1;xt.log=z1;xt.formatArgs=$1;xt.save=D1;xt.load=U1;xt.useColors=k1;xt.destroy=Jp.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=MR();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 k1(){return"colors"in xt.inspectOpts?!!xt.inspectOpts.colors:O1.isatty(process.stderr.fd)}a(k1,"useColors");function $1(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+"+Kp.exports.humanize(this.diff)+"\x1B[0m")}else e[0]=N1()+t+" "+e[0]}a($1,"formatArgs");function N1(){return xt.inspectOpts.hideDate?"":new Date().toISOString()+" "}a(N1,"getDate");function z1(...e){return process.stderr.write(Jp.formatWithOptions(xt.inspectOpts,...e)+`
6
+ `)}a(z1,"log");function D1(e){e?process.env.DEBUG=e:delete process.env.DEBUG}a(D1,"save");function U1(){return process.env.DEBUG}a(U1,"load");function j1(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(j1,"init");Kp.exports=Vb()(xt);var{formatters:LR}=Kp.exports;LR.o=function(e){return this.inspectOpts.colors=this.useColors,Jp.inspect(e,this.inspectOpts).split(`
7
+ `).map(t=>t.trim()).join(" ")};LR.O=function(e){return this.inspectOpts.colors=this.useColors,Jp.inspect(e,this.inspectOpts)}});var Wb=B((DY,Gb)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?Gb.exports=NR():Gb.exports=FR()});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]})),L1=rr&&rr.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),BR=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 L1(t,e),t};Object.defineProperty(rr,"__esModule",{value:!0});rr.req=rr.json=rr.toBuffer=void 0;var F1=BR(require("http")),B1=BR(require("https"));async function qR(e){let t=0,n=[];for await(let o of e)t+=o.length,n.push(o);return Buffer.concat(n,t)}a(qR,"toBuffer");rr.toBuffer=qR;async function q1(e){let n=(await qR(e)).toString("utf8");try{return JSON.parse(n)}catch(o){let r=o;throw r.message+=` (input: ${n})`,r}}a(q1,"json");rr.json=q1;function V1(e,t={}){let o=((typeof e=="string"?e:e.href).startsWith("https:")?B1:F1).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(V1,"req");rr.req=V1});var WR=B(fr=>{"use strict";var ZR=fr&&fr.__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=fr&&fr.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),GR=fr&&fr.__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)&&ZR(t,e,n);return H1(t,e),t},Z1=fr&&fr.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&ZR(t,e,n)};Object.defineProperty(fr,"__esModule",{value:!0});fr.Agent=void 0;var G1=GR(require("net")),HR=GR(require("http")),W1=require("https");Z1(VR(),fr);var an=Symbol("AgentBaseInternalState"),Jb=class extends HR.Agent{static{a(this,"Agent")}constructor(t){super(t),this[an]={}}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 G1.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)?W1.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 HR.Agent)try{return u.addRequest(t,r)}catch(d){return o(d)}this[an].currentSocket=u,super.createSocket(t,n,o)},u=>{this.decrementSockets(i,s),o(u)})}createConnection(){let t=this[an].currentSocket;if(this[an].currentSocket=void 0,!t)throw new Error("No socket was returned in the `connect()` function");return t}get defaultPort(){return this[an].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(t){this[an]&&(this[an].defaultPort=t)}get protocol(){return this[an].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(t){this[an]&&(this[an].protocol=t)}};fr.Agent=Jb});var JR=B(ha=>{"use strict";var J1=ha&&ha.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ha,"__esModule",{value:!0});ha.parseProxyResponse=void 0;var K1=J1(Wb()),Xp=(0,K1.default)("https-proxy-agent:parse-proxy-response");function X1(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(),Xp("onend"),n(new Error("Proxy connection ended before receiving CONNECT response"))}a(u,"onend");function d(f){s(),Xp("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){Xp("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(" "),S=+P[1],T=P.slice(2).join(" "),R={};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 H=V.slice(0,W).toLowerCase(),G=V.slice(W+1).trimStart(),re=R[H];typeof re=="string"?R[H]=[re,G]:Array.isArray(re)?re.push(G):R[H]=G}Xp("got proxy server response: %o %o",_,R),s(),t({connect:{statusCode:S,statusText:T,headers:R},buffered:g})}a(p,"ondata"),e.on("error",d),e.on("end",u),i()})}a(X1,"parseProxyResponse");ha.parseProxyResponse=X1});var tC=B(Or=>{"use strict";var Q1=Or&&Or.__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]})),Y1=Or&&Or.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),YR=Or&&Or.__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)&&Q1(t,e,n);return Y1(t,e),t},eC=Or&&Or.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Or,"__esModule",{value:!0});Or.HttpsProxyAgent=void 0;var Qp=YR(require("net")),KR=YR(require("tls")),eF=eC(require("assert")),tF=eC(Wb()),rF=WR(),nF=require("url"),oF=JR(),Yc=(0,tF.default)("https-proxy-agent"),XR=a(e=>e.servername===void 0&&e.host&&!Qp.isIP(e.host)?{...e,servername:e.host}:e,"setServernameFromNonIpHost"),Yp=class extends rF.Agent{static{a(this,"HttpsProxyAgent")}constructor(t,n){super(n),this.options={path:void 0},this.proxy=typeof t=="string"?new nF.URL(t):t,this.proxyHeaders=n?.headers??{},Yc("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?QR(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:"?(Yc("Creating `tls.Socket`: %o",this.connectOpts),r=KR.connect(XR(this.connectOpts))):(Yc("Creating `net.Socket`: %o",this.connectOpts),r=Qp.connect(this.connectOpts));let i=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders},s=Qp.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,oF.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",iF),n.secureEndpoint?(Yc("Upgrading socket connection to TLS"),KR.connect({...QR(XR(n),"host","path","port"),socket:r})):r;r.destroy();let g=new Qp.Socket({writable:!1});return g.readable=!0,t.once("socket",y=>{Yc("Replaying proxy buffer for failed request"),(0,eF.default)(y.listenerCount("data")>0),y.push(f),y.push(null)}),g}};Yp.protocols=["http","https"];Or.HttpsProxyAgent=Yp;function iF(e){e.resume()}a(iF,"resume");function QR(e,...t){let n={},o;for(o in e)t.includes(o)||(n[o]=e[o]);return n}a(QR,"omit")});function aF(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 rC,nC=bt(()=>{a(aF,"dataUriToBuffer");rC=aF});var iC=B((ef,oC)=>{(function(e,t){typeof ef=="object"&&typeof oC<"u"?t(ef):typeof define=="function"&&define.amd?define(["exports"],t):(e=typeof globalThis<"u"?globalThis:e||self,t(e.WebStreamsPolyfill={}))})(ef,(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 S(c){g(c,void 0,o)}a(S,"setPromiseIsHandledToTrue");let T=a(c=>{if(typeof queueMicrotask=="function")T=queueMicrotask;else{let l=p(void 0);T=a(m=>g(l,m),"_queueMicrotask")}return T(c)},"_queueMicrotask");function R(c,l,m){if(typeof c!="function")throw new TypeError("Argument is not a function");return Function.prototype.apply.call(c,l,m)}a(R,"reflectCall");function V(c,l,m){try{return p(R(c,l,m))}catch(E){return f(E)}}a(V,"promiseCall");let W=16384;class H{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]]"),re=Symbol("[[ErrorSteps]]"),ue=Symbol("[[CancelSteps]]"),Y=Symbol("[[PullSteps]]"),Ze=Symbol("[[ReleaseSteps]]");function Ce(c,l){c._ownerReadableStream=l,l._reader=c,l._state==="readable"?Ge(c):l._state==="closed"?it(c):He(c,l._storedError)}a(Ce,"ReadableStreamReaderGenericInitialize");function Se(c,l){let m=c._ownerReadableStream;return jr(m,l)}a(Se,"ReadableStreamReaderGenericCancel");function Le(c){let l=c._ownerReadableStream;l._state==="readable"?ar(c,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):Ut(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(Le,"ReadableStreamReaderGenericRelease");function Me(c){return new TypeError("Cannot "+c+" a stream using a released reader")}a(Me,"readerLockException");function Ge(c){c._closedPromise=d((l,m)=>{c._closedPromise_resolve=l,c._closedPromise_reject=m})}a(Ge,"defaultReaderClosedPromiseInitialize");function He(c,l){Ge(c),ar(c,l)}a(He,"defaultReaderClosedPromiseInitializeAsRejected");function it(c){Ge(c),li(c)}a(it,"defaultReaderClosedPromiseInitializeAsResolved");function ar(c,l){c._closedPromise_reject!==void 0&&(S(c._closedPromise),c._closedPromise_reject(l),c._closedPromise_resolve=void 0,c._closedPromise_reject=void 0)}a(ar,"defaultReaderClosedPromiseReject");function Ut(c,l){He(c,l)}a(Ut,"defaultReaderClosedPromiseResetToRejected");function li(c){c._closedPromise_resolve!==void 0&&(c._closedPromise_resolve(void 0),c._closedPromise_resolve=void 0,c._closedPromise_reject=void 0)}a(li,"defaultReaderClosedPromiseResolve");let tn=Number.isFinite||function(c){return typeof c=="number"&&isFinite(c)},Ma=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 Gt(c,l){if(c!==void 0&&!ee(c))throw new TypeError(`${l} is not an object.`)}a(Gt,"assertDictionary");function jt(c,l){if(typeof c!="function")throw new TypeError(`${l} is not a function.`)}a(jt,"assertFunction");function La(c){return typeof c=="object"&&c!==null||typeof c=="function"}a(La,"isObject");function Mt(c,l){if(!La(c))throw new TypeError(`${l} is not an object.`)}a(Mt,"assertObject");function ht(c,l,m){if(c===void 0)throw new TypeError(`Parameter ${l} is required in '${m}'.`)}a(ht,"assertRequiredArgument");function v(c,l,m){if(c===void 0)throw new TypeError(`${l} is required in '${m}'.`)}a(v,"assertRequiredField");function x(c){return Number(c)}a(x,"convertUnrestrictedDouble");function A(c){return c===0?0:c}a(A,"censorNegativeZero");function D(c){return A(Ma(c))}a(D,"integerPart");function O(c,l){let E=Number.MAX_SAFE_INTEGER,I=Number(c);if(I=A(I),!tn(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!tn(I)||I===0?0:I}a(O,"convertUnsignedLongLongWithEnforceRange");function N(c,l){if(!qn(c))throw new TypeError(`${l} is not a ReadableStream.`)}a(N,"assertReadableStream");function M(c){return new Z(c)}a(M,"AcquireReadableStreamDefaultReader");function C(c,l){c._reader._readRequests.push(l)}a(C,"ReadableStreamAddReadRequest");function $(c,l,m){let I=c._reader._readRequests.shift();m?I._closeSteps():I._chunkSteps(l)}a($,"ReadableStreamFulfillReadRequest");function U(c){return c._reader._readRequests.length}a(U,"ReadableStreamGetNumReadRequests");function z(c){let l=c._reader;return!(l===void 0||!ae(l))}a(z,"ReadableStreamHasDefaultReader");class Z{static{a(this,"ReadableStreamDefaultReader")}constructor(l){if(ht(l,1,"ReadableStreamDefaultReader"),N(l,"First parameter"),Vn(l))throw new TypeError("This stream has already been locked for exclusive reading by another reader");Ce(this,l),this._readRequests=new H}get closed(){return ae(this)?this._closedPromise:f(nt("closed"))}cancel(l=void 0){return ae(this)?this._ownerReadableStream===void 0?f(Me("cancel")):Se(this,l):f(nt("cancel"))}read(){if(!ae(this))return f(nt("read"));if(this._ownerReadableStream===void 0)return f(Me("read from"));let l,m,E=d((j,q)=>{l=j,m=q});return ce(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(!ae(this))throw nt("releaseLock");this._ownerReadableStream!==void 0&&De(this)}}Object.defineProperties(Z.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),r(Z.prototype.cancel,"cancel"),r(Z.prototype.read,"read"),r(Z.prototype.releaseLock,"releaseLock"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Z.prototype,Symbol.toStringTag,{value:"ReadableStreamDefaultReader",configurable:!0});function ae(c){return!n(c)||!Object.prototype.hasOwnProperty.call(c,"_readRequests")?!1:c instanceof Z}a(ae,"IsReadableStreamDefaultReader");function ce(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(ce,"ReadableStreamDefaultReaderRead");function De(c){Le(c);let l=new TypeError("Reader was released");rt(c,l)}a(De,"ReadableStreamDefaultReaderRelease");function rt(c,l){let m=c._readRequests;c._readRequests=new H,m.forEach(E=>{E._errorSteps(l)})}a(rt,"ReadableStreamDefaultReaderErrorReadRequests");function nt(c){return new TypeError(`ReadableStreamDefaultReader.prototype.${c} can only be used on a ReadableStreamDefaultReader`)}a(nt,"defaultReaderBrandCheckException");let Ne=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);class Be{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,ie)=>{m=q,E=ie});return ce(l,{_chunkSteps:a(q=>{this._ongoingPromise=void 0,T(()=>m({value:q,done:!1}))},"_chunkSteps"),_closeSteps:a(()=>{this._ongoingPromise=void 0,this._isFinished=!0,Le(l),m({value:void 0,done:!0})},"_closeSteps"),_errorSteps:a(q=>{this._ongoingPromise=void 0,this._isFinished=!0,Le(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=Se(m,l);return Le(m),P(E,()=>({value:l,done:!0}))}return Le(m),p({value:l,done:!0})}}let gt={next(){return pi(this)?this._asyncIteratorImpl.next():f(fi("next"))},return(c){return pi(this)?this._asyncIteratorImpl.return(c):f(fi("return"))}};Object.setPrototypeOf(gt,Ne);function di(c,l){let m=M(c),E=new Be(m,l),I=Object.create(gt);return I._asyncIteratorImpl=E,I}a(di,"AcquireReadableStreamAsyncIterator");function pi(c){if(!n(c)||!Object.prototype.hasOwnProperty.call(c,"_asyncIteratorImpl"))return!1;try{return c._asyncIteratorImpl instanceof Be}catch{return!1}}a(pi,"IsReadableStreamAsyncIterator");function fi(c){return new TypeError(`ReadableStreamAsyncIterator.${c} can only be used on a ReadableSteamAsyncIterator`)}a(fi,"streamAsyncIteratorBrandCheckException");let sr=Number.isNaN||function(c){return c!==c};var yn,$t,yt;function We(c){return c.slice()}a(We,"CreateArrayFromList");function iP(c,l,m,E,I){new Uint8Array(c).set(new Uint8Array(m,E,I),l)}a(iP,"CopyDataBlockBytes");let _n=a(c=>(typeof c.transfer=="function"?_n=a(l=>l.transfer(),"TransferArrayBuffer"):typeof structuredClone=="function"?_n=a(l=>structuredClone(l,{transfer:[l]}),"TransferArrayBuffer"):_n=a(l=>l,"TransferArrayBuffer"),_n(c)),"TransferArrayBuffer"),Mn=a(c=>(typeof c.detached=="boolean"?Mn=a(l=>l.detached,"IsDetachedBuffer"):Mn=a(l=>l.byteLength===0,"IsDetachedBuffer"),Mn(c)),"IsDetachedBuffer");function aP(c,l,m){if(c.slice)return c.slice(l,m);let E=m-l,I=new ArrayBuffer(E);return iP(I,0,c,l,E),I}a(aP,"ArrayBufferSlice");function Ru(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(Ru,"GetMethod");function D0(c){let l={[Symbol.iterator]:()=>c.iterator},m=(async function*(){return yield*l})(),E=m.next;return{iterator:m,nextMethod:E,done:!1}}a(D0,"CreateAsyncFromSyncIterator");let fm=(yt=(yn=Symbol.asyncIterator)!==null&&yn!==void 0?yn:($t=Symbol.for)===null||$t===void 0?void 0:$t.call(Symbol,"Symbol.asyncIterator"))!==null&&yt!==void 0?yt:"@@asyncIterator";function sP(c,l="sync",m){if(m===void 0)if(l==="async"){if(m=Ru(c,fm),m===void 0){let j=Ru(c,Symbol.iterator),q=sP(c,"sync",j);return D0(q)}}else m=Ru(c,Symbol.iterator);if(m===void 0)throw new TypeError("The object is not iterable");let E=R(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(sP,"GetIterator");function U0(c){let l=R(c.nextMethod,c.iterator,[]);if(!n(l))throw new TypeError("The iterator.next() method must return an object");return l}a(U0,"IteratorNext");function j0(c){return!!c.done}a(j0,"IteratorComplete");function M0(c){return c.value}a(M0,"IteratorValue");function L0(c){return!(typeof c!="number"||sr(c)||c<0)}a(L0,"IsNonNegativeNumber");function cP(c){let l=aP(c.buffer,c.byteOffset,c.byteOffset+c.byteLength);return new Uint8Array(l)}a(cP,"CloneAsUint8Array");function mm(c){let l=c._queue.shift();return c._queueTotalSize-=l.size,c._queueTotalSize<0&&(c._queueTotalSize=0),l.value}a(mm,"DequeueValue");function hm(c,l,m){if(!L0(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(hm,"EnqueueValueWithSize");function F0(c){return c._queue.peek().value}a(F0,"PeekQueueValue");function Ln(c){c._queue=new H,c._queueTotalSize=0}a(Ln,"ResetQueue");function uP(c){return c===DataView}a(uP,"isDataViewConstructor");function B0(c){return uP(c.constructor)}a(B0,"isDataView");function q0(c){return uP(c)?1:c.BYTES_PER_ELEMENT}a(q0,"arrayBufferViewElementSize");class Eo{static{a(this,"ReadableStreamBYOBRequest")}constructor(){throw new TypeError("Illegal constructor")}get view(){if(!gm(this))throw Em("view");return this._view}respond(l){if(!gm(this))throw Em("respond");if(ht(l,1,"respond"),l=O(l,"First parameter"),this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");if(Mn(this._view.buffer))throw new TypeError("The BYOB request's buffer has been detached and so cannot be used as a response");$u(this._associatedReadableByteStreamController,l)}respondWithNewView(l){if(!gm(this))throw Em("respondWithNewView");if(ht(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(Mn(l.buffer))throw new TypeError("The given view's buffer has been detached and so cannot be used as a response");Nu(this._associatedReadableByteStreamController,l)}}Object.defineProperties(Eo.prototype,{respond:{enumerable:!0},respondWithNewView:{enumerable:!0},view:{enumerable:!0}}),r(Eo.prototype.respond,"respond"),r(Eo.prototype.respondWithNewView,"respondWithNewView"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Eo.prototype,Symbol.toStringTag,{value:"ReadableStreamBYOBRequest",configurable:!0});class bn{static{a(this,"ReadableByteStreamController")}constructor(){throw new TypeError("Illegal constructor")}get byobRequest(){if(!Po(this))throw Ba("byobRequest");return vm(this)}get desiredSize(){if(!Po(this))throw Ba("desiredSize");return bP(this)}close(){if(!Po(this))throw Ba("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`);Fa(this)}enqueue(l){if(!Po(this))throw Ba("enqueue");if(ht(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`);ku(this,l)}error(l=void 0){if(!Po(this))throw Ba("error");Tr(this,l)}[ue](l){lP(this),Ln(this);let m=this._cancelAlgorithm(l);return Ou(this),m}[Y](l){let m=this._controlledReadableByteStream;if(this._queueTotalSize>0){_P(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)}C(m,l),So(this)}[Ze](){if(this._pendingPullIntos.length>0){let l=this._pendingPullIntos.peek();l.readerType="none",this._pendingPullIntos=new H,this._pendingPullIntos.push(l)}}}Object.defineProperties(bn.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},byobRequest:{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:"ReadableByteStreamController",configurable:!0});function Po(c){return!n(c)||!Object.prototype.hasOwnProperty.call(c,"_controlledReadableByteStream")?!1:c instanceof bn}a(Po,"IsReadableByteStreamController");function gm(c){return!n(c)||!Object.prototype.hasOwnProperty.call(c,"_associatedReadableByteStreamController")?!1:c instanceof Eo}a(gm,"IsReadableStreamBYOBRequest");function So(c){if(!W0(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,So(c)),null),E=>(Tr(c,E),null))}a(So,"ReadableByteStreamControllerCallPullIfNeeded");function lP(c){_m(c),c._pendingPullIntos=new H}a(lP,"ReadableByteStreamControllerClearPendingPullIntos");function ym(c,l){let m=!1;c._state==="closed"&&(m=!0);let E=dP(l);l.readerType==="default"?$(c,E,m):e$(c,E,m)}a(ym,"ReadableByteStreamControllerCommitPullIntoDescriptor");function dP(c){let l=c.bytesFilled,m=c.elementSize;return new c.viewConstructor(c.buffer,c.byteOffset,l/m)}a(dP,"ReadableByteStreamControllerConvertPullIntoDescriptor");function Cu(c,l,m,E){c._queue.push({buffer:l,byteOffset:m,byteLength:E}),c._queueTotalSize+=E}a(Cu,"ReadableByteStreamControllerEnqueueChunkToQueue");function pP(c,l,m,E){let I;try{I=aP(l,m,m+E)}catch(j){throw Tr(c,j),j}Cu(c,I,0,E)}a(pP,"ReadableByteStreamControllerEnqueueClonedChunkToQueue");function fP(c,l){l.bytesFilled>0&&pP(c,l.buffer,l.byteOffset,l.bytesFilled),mi(c)}a(fP,"ReadableByteStreamControllerEnqueueDetachedPullIntoToQueue");function mP(c,l){let m=Math.min(c._queueTotalSize,l.byteLength-l.bytesFilled),E=l.bytesFilled+m,I=m,j=!1,q=E%l.elementSize,ie=E-q;ie>=l.minimumFill&&(I=ie-l.bytesFilled,j=!0);let _e=c._queue;for(;I>0;){let le=_e.peek(),Pe=Math.min(I,le.byteLength),we=l.byteOffset+l.bytesFilled;iP(l.buffer,we,le.buffer,le.byteOffset,Pe),le.byteLength===Pe?_e.shift():(le.byteOffset+=Pe,le.byteLength-=Pe),c._queueTotalSize-=Pe,hP(c,Pe,l),I-=Pe}return j}a(mP,"ReadableByteStreamControllerFillPullIntoDescriptorFromQueue");function hP(c,l,m){m.bytesFilled+=l}a(hP,"ReadableByteStreamControllerFillHeadPullIntoDescriptor");function gP(c){c._queueTotalSize===0&&c._closeRequested?(Ou(c),Wa(c._controlledReadableByteStream)):So(c)}a(gP,"ReadableByteStreamControllerHandleQueueDrain");function _m(c){c._byobRequest!==null&&(c._byobRequest._associatedReadableByteStreamController=void 0,c._byobRequest._view=null,c._byobRequest=null)}a(_m,"ReadableByteStreamControllerInvalidateBYOBRequest");function bm(c){for(;c._pendingPullIntos.length>0;){if(c._queueTotalSize===0)return;let l=c._pendingPullIntos.peek();mP(c,l)&&(mi(c),ym(c._controlledReadableByteStream,l))}}a(bm,"ReadableByteStreamControllerProcessPullIntoDescriptorsUsingQueue");function V0(c){let l=c._controlledReadableByteStream._reader;for(;l._readRequests.length>0;){if(c._queueTotalSize===0)return;let m=l._readRequests.shift();_P(c,m)}}a(V0,"ReadableByteStreamControllerProcessReadRequestsUsingQueue");function H0(c,l,m,E){let I=c._controlledReadableByteStream,j=l.constructor,q=q0(j),{byteOffset:ie,byteLength:_e}=l,le=m*q,Pe;try{Pe=_n(l.buffer)}catch(Qe){E._errorSteps(Qe);return}let we={buffer:Pe,bufferByteLength:Pe.byteLength,byteOffset:ie,byteLength:_e,bytesFilled:0,minimumFill:le,elementSize:q,viewConstructor:j,readerType:"byob"};if(c._pendingPullIntos.length>0){c._pendingPullIntos.push(we),PP(I,E);return}if(I._state==="closed"){let Qe=new j(we.buffer,we.byteOffset,0);E._closeSteps(Qe);return}if(c._queueTotalSize>0){if(mP(c,we)){let Qe=dP(we);gP(c),E._chunkSteps(Qe);return}if(c._closeRequested){let Qe=new TypeError("Insufficient bytes to fill elements in the given buffer");Tr(c,Qe),E._errorSteps(Qe);return}}c._pendingPullIntos.push(we),PP(I,E),So(c)}a(H0,"ReadableByteStreamControllerPullInto");function Z0(c,l){l.readerType==="none"&&mi(c);let m=c._controlledReadableByteStream;if(Pm(m))for(;SP(m)>0;){let E=mi(c);ym(m,E)}}a(Z0,"ReadableByteStreamControllerRespondInClosedState");function G0(c,l,m){if(hP(c,l,m),m.readerType==="none"){fP(c,m),bm(c);return}if(m.bytesFilled<m.minimumFill)return;mi(c);let E=m.bytesFilled%m.elementSize;if(E>0){let I=m.byteOffset+m.bytesFilled;pP(c,m.buffer,I-E,E)}m.bytesFilled-=E,ym(c._controlledReadableByteStream,m),bm(c)}a(G0,"ReadableByteStreamControllerRespondInReadableState");function yP(c,l){let m=c._pendingPullIntos.peek();_m(c),c._controlledReadableByteStream._state==="closed"?Z0(c,m):G0(c,l,m),So(c)}a(yP,"ReadableByteStreamControllerRespondInternal");function mi(c){return c._pendingPullIntos.shift()}a(mi,"ReadableByteStreamControllerShiftPendingPullInto");function W0(c){let l=c._controlledReadableByteStream;return l._state!=="readable"||c._closeRequested||!c._started?!1:!!(z(l)&&U(l)>0||Pm(l)&&SP(l)>0||bP(c)>0)}a(W0,"ReadableByteStreamControllerShouldCallPull");function Ou(c){c._pullAlgorithm=void 0,c._cancelAlgorithm=void 0}a(Ou,"ReadableByteStreamControllerClearAlgorithms");function Fa(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 Tr(c,E),E}}Ou(c),Wa(l)}}a(Fa,"ReadableByteStreamControllerClose");function ku(c,l){let m=c._controlledReadableByteStream;if(c._closeRequested||m._state!=="readable")return;let{buffer:E,byteOffset:I,byteLength:j}=l;if(Mn(E))throw new TypeError("chunk's buffer is detached and so cannot be enqueued");let q=_n(E);if(c._pendingPullIntos.length>0){let ie=c._pendingPullIntos.peek();if(Mn(ie.buffer))throw new TypeError("The BYOB request's buffer has been detached and so cannot be filled with an enqueued chunk");_m(c),ie.buffer=_n(ie.buffer),ie.readerType==="none"&&fP(c,ie)}if(z(m))if(V0(c),U(m)===0)Cu(c,q,I,j);else{c._pendingPullIntos.length>0&&mi(c);let ie=new Uint8Array(q,I,j);$(m,ie,!1)}else Pm(m)?(Cu(c,q,I,j),bm(c)):Cu(c,q,I,j);So(c)}a(ku,"ReadableByteStreamControllerEnqueue");function Tr(c,l){let m=c._controlledReadableByteStream;m._state==="readable"&&(lP(c),Ln(c),Ou(c),GP(m,l))}a(Tr,"ReadableByteStreamControllerError");function _P(c,l){let m=c._queue.shift();c._queueTotalSize-=m.byteLength,gP(c);let E=new Uint8Array(m.buffer,m.byteOffset,m.byteLength);l._chunkSteps(E)}a(_P,"ReadableByteStreamControllerFillReadRequestFromQueue");function vm(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(Eo.prototype);K0(E,c,m),c._byobRequest=E}return c._byobRequest}a(vm,"ReadableByteStreamControllerGetBYOBRequest");function bP(c){let l=c._controlledReadableByteStream._state;return l==="errored"?null:l==="closed"?0:c._strategyHWM-c._queueTotalSize}a(bP,"ReadableByteStreamControllerGetDesiredSize");function $u(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=_n(m.buffer),yP(c,l)}a($u,"ReadableByteStreamControllerRespond");function Nu(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=_n(l.buffer),yP(c,I)}a(Nu,"ReadableByteStreamControllerRespondWithNewView");function vP(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,Ln(l),l._closeRequested=!1,l._started=!1,l._strategyHWM=j,l._pullAlgorithm=E,l._cancelAlgorithm=I,l._autoAllocateChunkSize=q,l._pendingPullIntos=new H,c._readableStreamController=l;let ie=m();y(p(ie),()=>(l._started=!0,So(l),null),_e=>(Tr(l,_e),null))}a(vP,"SetUpReadableByteStreamController");function J0(c,l,m){let E=Object.create(bn.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(_e=>l.cancel(_e),"cancelAlgorithm"):q=a(()=>p(void 0),"cancelAlgorithm");let ie=l.autoAllocateChunkSize;if(ie===0)throw new TypeError("autoAllocateChunkSize must be greater than 0");vP(c,E,I,j,q,m,ie)}a(J0,"SetUpReadableByteStreamControllerFromUnderlyingSource");function K0(c,l,m){c._associatedReadableByteStreamController=l,c._view=m}a(K0,"SetUpReadableStreamBYOBRequest");function Em(c){return new TypeError(`ReadableStreamBYOBRequest.prototype.${c} can only be used on a ReadableStreamBYOBRequest`)}a(Em,"byobRequestBrandCheckException");function Ba(c){return new TypeError(`ReadableByteStreamController.prototype.${c} can only be used on a ReadableByteStreamController`)}a(Ba,"byteStreamControllerBrandCheckException");function X0(c,l){Gt(c,l);let m=c?.mode;return{mode:m===void 0?void 0:Q0(m,`${l} has member 'mode' that`)}}a(X0,"convertReaderOptions");function Q0(c,l){if(c=`${c}`,c!=="byob")throw new TypeError(`${l} '${c}' is not a valid enumeration value for ReadableStreamReaderMode`);return c}a(Q0,"convertReadableStreamReaderMode");function Y0(c,l){var m;Gt(c,l);let E=(m=c?.min)!==null&&m!==void 0?m:1;return{min:O(E,`${l} has member 'min' that`)}}a(Y0,"convertByobReadOptions");function EP(c){return new Fn(c)}a(EP,"AcquireReadableStreamBYOBReader");function PP(c,l){c._reader._readIntoRequests.push(l)}a(PP,"ReadableStreamAddReadIntoRequest");function e$(c,l,m){let I=c._reader._readIntoRequests.shift();m?I._closeSteps(l):I._chunkSteps(l)}a(e$,"ReadableStreamFulfillReadIntoRequest");function SP(c){return c._reader._readIntoRequests.length}a(SP,"ReadableStreamGetNumReadIntoRequests");function Pm(c){let l=c._reader;return!(l===void 0||!To(l))}a(Pm,"ReadableStreamHasBYOBReader");class Fn{static{a(this,"ReadableStreamBYOBReader")}constructor(l){if(ht(l,1,"ReadableStreamBYOBReader"),N(l,"First parameter"),Vn(l))throw new TypeError("This stream has already been locked for exclusive reading by another reader");if(!Po(l._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");Ce(this,l),this._readIntoRequests=new H}get closed(){return To(this)?this._closedPromise:f(zu("closed"))}cancel(l=void 0){return To(this)?this._ownerReadableStream===void 0?f(Me("cancel")):Se(this,l):f(zu("cancel"))}read(l,m={}){if(!To(this))return f(zu("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(Mn(l.buffer))return f(new TypeError("view's buffer has been detached"));let E;try{E=Y0(m,"options")}catch(le){return f(le)}let I=E.min;if(I===0)return f(new TypeError("options.min must be greater than 0"));if(B0(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(Me("read from"));let j,q,ie=d((le,Pe)=>{j=le,q=Pe});return TP(this,l,I,{_chunkSteps:a(le=>j({value:le,done:!1}),"_chunkSteps"),_closeSteps:a(le=>j({value:le,done:!0}),"_closeSteps"),_errorSteps:a(le=>q(le),"_errorSteps")}),ie}releaseLock(){if(!To(this))throw zu("releaseLock");this._ownerReadableStream!==void 0&&t$(this)}}Object.defineProperties(Fn.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),r(Fn.prototype.cancel,"cancel"),r(Fn.prototype.read,"read"),r(Fn.prototype.releaseLock,"releaseLock"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Fn.prototype,Symbol.toStringTag,{value:"ReadableStreamBYOBReader",configurable:!0});function To(c){return!n(c)||!Object.prototype.hasOwnProperty.call(c,"_readIntoRequests")?!1:c instanceof Fn}a(To,"IsReadableStreamBYOBReader");function TP(c,l,m,E){let I=c._ownerReadableStream;I._disturbed=!0,I._state==="errored"?E._errorSteps(I._storedError):H0(I._readableStreamController,l,m,E)}a(TP,"ReadableStreamBYOBReaderRead");function t$(c){Le(c);let l=new TypeError("Reader was released");xP(c,l)}a(t$,"ReadableStreamBYOBReaderRelease");function xP(c,l){let m=c._readIntoRequests;c._readIntoRequests=new H,m.forEach(E=>{E._errorSteps(l)})}a(xP,"ReadableStreamBYOBReaderErrorReadIntoRequests");function zu(c){return new TypeError(`ReadableStreamBYOBReader.prototype.${c} can only be used on a ReadableStreamBYOBReader`)}a(zu,"byobReaderBrandCheckException");function qa(c,l){let{highWaterMark:m}=c;if(m===void 0)return l;if(sr(m)||m<0)throw new RangeError("Invalid highWaterMark");return m}a(qa,"ExtractHighWaterMark");function Du(c){let{size:l}=c;return l||(()=>1)}a(Du,"ExtractSizeAlgorithm");function Uu(c,l){Gt(c,l);let m=c?.highWaterMark,E=c?.size;return{highWaterMark:m===void 0?void 0:x(m),size:E===void 0?void 0:r$(E,`${l} has member 'size' that`)}}a(Uu,"convertQueuingStrategy");function r$(c,l){return jt(c,l),m=>x(c(m))}a(r$,"convertQueuingStrategySize");function n$(c,l){Gt(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:o$(m,c,`${l} has member 'abort' that`),close:E===void 0?void 0:i$(E,c,`${l} has member 'close' that`),start:I===void 0?void 0:a$(I,c,`${l} has member 'start' that`),write:q===void 0?void 0:s$(q,c,`${l} has member 'write' that`),type:j}}a(n$,"convertUnderlyingSink");function o$(c,l,m){return jt(c,m),E=>V(c,l,[E])}a(o$,"convertUnderlyingSinkAbortCallback");function i$(c,l,m){return jt(c,m),()=>V(c,l,[])}a(i$,"convertUnderlyingSinkCloseCallback");function a$(c,l,m){return jt(c,m),E=>R(c,l,[E])}a(a$,"convertUnderlyingSinkStartCallback");function s$(c,l,m){return jt(c,m),(E,I)=>V(c,l,[E,I])}a(s$,"convertUnderlyingSinkWriteCallback");function AP(c,l){if(!hi(c))throw new TypeError(`${l} is not a WritableStream.`)}a(AP,"assertWritableStream");function c$(c){if(typeof c!="object"||c===null)return!1;try{return typeof c.aborted=="boolean"}catch{return!1}}a(c$,"isAbortSignal");let u$=typeof AbortController=="function";function l$(){if(u$)return new AbortController}a(l$,"createAbortController");class Bn{static{a(this,"WritableStream")}constructor(l={},m={}){l===void 0?l=null:Mt(l,"First parameter");let E=Uu(m,"Second parameter"),I=n$(l,"First parameter");if(IP(this),I.type!==void 0)throw new RangeError("Invalid type is specified");let q=Du(E),ie=qa(E,1);T$(this,I,ie,q)}get locked(){if(!hi(this))throw Bu("locked");return gi(this)}abort(l=void 0){return hi(this)?gi(this)?f(new TypeError("Cannot abort a stream that already has a writer")):ju(this,l):f(Bu("abort"))}close(){return hi(this)?gi(this)?f(new TypeError("Cannot close a stream that already has a writer")):rn(this)?f(new TypeError("Cannot close an already-closing stream")):RP(this):f(Bu("close"))}getWriter(){if(!hi(this))throw Bu("getWriter");return wP(this)}}Object.defineProperties(Bn.prototype,{abort:{enumerable:!0},close:{enumerable:!0},getWriter:{enumerable:!0},locked:{enumerable:!0}}),r(Bn.prototype.abort,"abort"),r(Bn.prototype.close,"close"),r(Bn.prototype.getWriter,"getWriter"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Bn.prototype,Symbol.toStringTag,{value:"WritableStream",configurable:!0});function wP(c){return new vn(c)}a(wP,"AcquireWritableStreamDefaultWriter");function d$(c,l,m,E,I=1,j=()=>1){let q=Object.create(Bn.prototype);IP(q);let ie=Object.create(yi.prototype);return zP(q,ie,c,l,m,E,I,j),q}a(d$,"CreateWritableStream");function IP(c){c._state="writable",c._storedError=void 0,c._writer=void 0,c._writableStreamController=void 0,c._writeRequests=new H,c._inFlightWriteRequest=void 0,c._closeRequest=void 0,c._inFlightCloseRequest=void 0,c._pendingAbortRequest=void 0,c._backpressure=!1}a(IP,"InitializeWritableStream");function hi(c){return!n(c)||!Object.prototype.hasOwnProperty.call(c,"_writableStreamController")?!1:c instanceof Bn}a(hi,"IsWritableStream");function gi(c){return c._writer!==void 0}a(gi,"IsWritableStreamLocked");function ju(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,ie)=>{c._pendingAbortRequest={_promise:void 0,_resolve:q,_reject:ie,_reason:l,_wasAlreadyErroring:I}});return c._pendingAbortRequest._promise=j,I||Tm(c,l),j}a(ju,"WritableStreamAbort");function RP(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"&&km(E),x$(c._writableStreamController),m}a(RP,"WritableStreamClose");function p$(c){return d((m,E)=>{let I={_resolve:m,_reject:E};c._writeRequests.push(I)})}a(p$,"WritableStreamAddWriteRequest");function Sm(c,l){if(c._state==="writable"){Tm(c,l);return}xm(c)}a(Sm,"WritableStreamDealWithRejection");function Tm(c,l){let m=c._writableStreamController;c._state="erroring",c._storedError=l;let E=c._writer;E!==void 0&&OP(E,l),!y$(c)&&m._started&&xm(c)}a(Tm,"WritableStreamStartErroring");function xm(c){c._state="errored",c._writableStreamController[re]();let l=c._storedError;if(c._writeRequests.forEach(I=>{I._reject(l)}),c._writeRequests=new H,c._pendingAbortRequest===void 0){Mu(c);return}let m=c._pendingAbortRequest;if(c._pendingAbortRequest=void 0,m._wasAlreadyErroring){m._reject(l),Mu(c);return}let E=c._writableStreamController[G](m._reason);y(E,()=>(m._resolve(),Mu(c),null),I=>(m._reject(I),Mu(c),null))}a(xm,"WritableStreamFinishErroring");function f$(c){c._inFlightWriteRequest._resolve(void 0),c._inFlightWriteRequest=void 0}a(f$,"WritableStreamFinishInFlightWrite");function m$(c,l){c._inFlightWriteRequest._reject(l),c._inFlightWriteRequest=void 0,Sm(c,l)}a(m$,"WritableStreamFinishInFlightWriteWithError");function h$(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&&MP(m)}a(h$,"WritableStreamFinishInFlightClose");function g$(c,l){c._inFlightCloseRequest._reject(l),c._inFlightCloseRequest=void 0,c._pendingAbortRequest!==void 0&&(c._pendingAbortRequest._reject(l),c._pendingAbortRequest=void 0),Sm(c,l)}a(g$,"WritableStreamFinishInFlightCloseWithError");function rn(c){return!(c._closeRequest===void 0&&c._inFlightCloseRequest===void 0)}a(rn,"WritableStreamCloseQueuedOrInFlight");function y$(c){return!(c._inFlightWriteRequest===void 0&&c._inFlightCloseRequest===void 0)}a(y$,"WritableStreamHasOperationMarkedInFlight");function _$(c){c._inFlightCloseRequest=c._closeRequest,c._closeRequest=void 0}a(_$,"WritableStreamMarkCloseRequestInFlight");function b$(c){c._inFlightWriteRequest=c._writeRequests.shift()}a(b$,"WritableStreamMarkFirstWriteRequestInFlight");function Mu(c){c._closeRequest!==void 0&&(c._closeRequest._reject(c._storedError),c._closeRequest=void 0);let l=c._writer;l!==void 0&&Cm(l,c._storedError)}a(Mu,"WritableStreamRejectCloseAndClosedPromiseIfNeeded");function Am(c,l){let m=c._writer;m!==void 0&&l!==c._backpressure&&(l?k$(m):km(m)),c._backpressure=l}a(Am,"WritableStreamUpdateBackpressure");class vn{static{a(this,"WritableStreamDefaultWriter")}constructor(l){if(ht(l,1,"WritableStreamDefaultWriter"),AP(l,"First parameter"),gi(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")!rn(l)&&l._backpressure?Vu(this):LP(this),qu(this);else if(m==="erroring")Om(this,l._storedError),qu(this);else if(m==="closed")LP(this),C$(this);else{let E=l._storedError;Om(this,E),jP(this,E)}}get closed(){return xo(this)?this._closedPromise:f(Ao("closed"))}get desiredSize(){if(!xo(this))throw Ao("desiredSize");if(this._ownerWritableStream===void 0)throw Ha("desiredSize");return S$(this)}get ready(){return xo(this)?this._readyPromise:f(Ao("ready"))}abort(l=void 0){return xo(this)?this._ownerWritableStream===void 0?f(Ha("abort")):v$(this,l):f(Ao("abort"))}close(){if(!xo(this))return f(Ao("close"));let l=this._ownerWritableStream;return l===void 0?f(Ha("close")):rn(l)?f(new TypeError("Cannot close an already-closing stream")):CP(this)}releaseLock(){if(!xo(this))throw Ao("releaseLock");this._ownerWritableStream!==void 0&&kP(this)}write(l=void 0){return xo(this)?this._ownerWritableStream===void 0?f(Ha("write to")):$P(this,l):f(Ao("write"))}}Object.defineProperties(vn.prototype,{abort:{enumerable:!0},close:{enumerable:!0},releaseLock:{enumerable:!0},write:{enumerable:!0},closed:{enumerable:!0},desiredSize:{enumerable:!0},ready:{enumerable:!0}}),r(vn.prototype.abort,"abort"),r(vn.prototype.close,"close"),r(vn.prototype.releaseLock,"releaseLock"),r(vn.prototype.write,"write"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(vn.prototype,Symbol.toStringTag,{value:"WritableStreamDefaultWriter",configurable:!0});function xo(c){return!n(c)||!Object.prototype.hasOwnProperty.call(c,"_ownerWritableStream")?!1:c instanceof vn}a(xo,"IsWritableStreamDefaultWriter");function v$(c,l){let m=c._ownerWritableStream;return ju(m,l)}a(v$,"WritableStreamDefaultWriterAbort");function CP(c){let l=c._ownerWritableStream;return RP(l)}a(CP,"WritableStreamDefaultWriterClose");function E$(c){let l=c._ownerWritableStream,m=l._state;return rn(l)||m==="closed"?p(void 0):m==="errored"?f(l._storedError):CP(c)}a(E$,"WritableStreamDefaultWriterCloseWithErrorPropagation");function P$(c,l){c._closedPromiseState==="pending"?Cm(c,l):O$(c,l)}a(P$,"WritableStreamDefaultWriterEnsureClosedPromiseRejected");function OP(c,l){c._readyPromiseState==="pending"?FP(c,l):$$(c,l)}a(OP,"WritableStreamDefaultWriterEnsureReadyPromiseRejected");function S$(c){let l=c._ownerWritableStream,m=l._state;return m==="errored"||m==="erroring"?null:m==="closed"?0:DP(l._writableStreamController)}a(S$,"WritableStreamDefaultWriterGetDesiredSize");function kP(c){let l=c._ownerWritableStream,m=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");OP(c,m),P$(c,m),l._writer=void 0,c._ownerWritableStream=void 0}a(kP,"WritableStreamDefaultWriterRelease");function $P(c,l){let m=c._ownerWritableStream,E=m._writableStreamController,I=A$(E,l);if(m!==c._ownerWritableStream)return f(Ha("write to"));let j=m._state;if(j==="errored")return f(m._storedError);if(rn(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=p$(m);return w$(E,l,I),q}a($P,"WritableStreamDefaultWriterWrite");let NP={};class yi{static{a(this,"WritableStreamDefaultController")}constructor(){throw new TypeError("Illegal constructor")}get abortReason(){if(!wm(this))throw Rm("abortReason");return this._abortReason}get signal(){if(!wm(this))throw Rm("signal");if(this._abortController===void 0)throw new TypeError("WritableStreamDefaultController.prototype.signal is not supported");return this._abortController.signal}error(l=void 0){if(!wm(this))throw Rm("error");this._controlledWritableStream._state==="writable"&&UP(this,l)}[G](l){let m=this._abortAlgorithm(l);return Lu(this),m}[re](){Ln(this)}}Object.defineProperties(yi.prototype,{abortReason:{enumerable:!0},signal:{enumerable:!0},error:{enumerable:!0}}),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(yi.prototype,Symbol.toStringTag,{value:"WritableStreamDefaultController",configurable:!0});function wm(c){return!n(c)||!Object.prototype.hasOwnProperty.call(c,"_controlledWritableStream")?!1:c instanceof yi}a(wm,"IsWritableStreamDefaultController");function zP(c,l,m,E,I,j,q,ie){l._controlledWritableStream=c,c._writableStreamController=l,l._queue=void 0,l._queueTotalSize=void 0,Ln(l),l._abortReason=void 0,l._abortController=l$(),l._started=!1,l._strategySizeAlgorithm=ie,l._strategyHWM=q,l._writeAlgorithm=E,l._closeAlgorithm=I,l._abortAlgorithm=j;let _e=Im(l);Am(c,_e);let le=m(),Pe=p(le);y(Pe,()=>(l._started=!0,Fu(l),null),we=>(l._started=!0,Sm(c,we),null))}a(zP,"SetUpWritableStreamDefaultController");function T$(c,l,m,E){let I=Object.create(yi.prototype),j,q,ie,_e;l.start!==void 0?j=a(()=>l.start(I),"startAlgorithm"):j=a(()=>{},"startAlgorithm"),l.write!==void 0?q=a(le=>l.write(le,I),"writeAlgorithm"):q=a(()=>p(void 0),"writeAlgorithm"),l.close!==void 0?ie=a(()=>l.close(),"closeAlgorithm"):ie=a(()=>p(void 0),"closeAlgorithm"),l.abort!==void 0?_e=a(le=>l.abort(le),"abortAlgorithm"):_e=a(()=>p(void 0),"abortAlgorithm"),zP(c,I,j,q,ie,_e,m,E)}a(T$,"SetUpWritableStreamDefaultControllerFromUnderlyingSink");function Lu(c){c._writeAlgorithm=void 0,c._closeAlgorithm=void 0,c._abortAlgorithm=void 0,c._strategySizeAlgorithm=void 0}a(Lu,"WritableStreamDefaultControllerClearAlgorithms");function x$(c){hm(c,NP,0),Fu(c)}a(x$,"WritableStreamDefaultControllerClose");function A$(c,l){try{return c._strategySizeAlgorithm(l)}catch(m){return Va(c,m),1}}a(A$,"WritableStreamDefaultControllerGetChunkSize");function DP(c){return c._strategyHWM-c._queueTotalSize}a(DP,"WritableStreamDefaultControllerGetDesiredSize");function w$(c,l,m){try{hm(c,l,m)}catch(I){Va(c,I);return}let E=c._controlledWritableStream;if(!rn(E)&&E._state==="writable"){let I=Im(c);Am(E,I)}Fu(c)}a(w$,"WritableStreamDefaultControllerWrite");function Fu(c){let l=c._controlledWritableStream;if(!c._started||l._inFlightWriteRequest!==void 0)return;if(l._state==="erroring"){xm(l);return}if(c._queue.length===0)return;let E=F0(c);E===NP?I$(c):R$(c,E)}a(Fu,"WritableStreamDefaultControllerAdvanceQueueIfNeeded");function Va(c,l){c._controlledWritableStream._state==="writable"&&UP(c,l)}a(Va,"WritableStreamDefaultControllerErrorIfNeeded");function I$(c){let l=c._controlledWritableStream;_$(l),mm(c);let m=c._closeAlgorithm();Lu(c),y(m,()=>(h$(l),null),E=>(g$(l,E),null))}a(I$,"WritableStreamDefaultControllerProcessClose");function R$(c,l){let m=c._controlledWritableStream;b$(m);let E=c._writeAlgorithm(l);y(E,()=>{f$(m);let I=m._state;if(mm(c),!rn(m)&&I==="writable"){let j=Im(c);Am(m,j)}return Fu(c),null},I=>(m._state==="writable"&&Lu(c),m$(m,I),null))}a(R$,"WritableStreamDefaultControllerProcessWrite");function Im(c){return DP(c)<=0}a(Im,"WritableStreamDefaultControllerGetBackpressure");function UP(c,l){let m=c._controlledWritableStream;Lu(c),Tm(m,l)}a(UP,"WritableStreamDefaultControllerError");function Bu(c){return new TypeError(`WritableStream.prototype.${c} can only be used on a WritableStream`)}a(Bu,"streamBrandCheckException$2");function Rm(c){return new TypeError(`WritableStreamDefaultController.prototype.${c} can only be used on a WritableStreamDefaultController`)}a(Rm,"defaultControllerBrandCheckException$2");function Ao(c){return new TypeError(`WritableStreamDefaultWriter.prototype.${c} can only be used on a WritableStreamDefaultWriter`)}a(Ao,"defaultWriterBrandCheckException");function Ha(c){return new TypeError("Cannot "+c+" a stream using a released writer")}a(Ha,"defaultWriterLockException");function qu(c){c._closedPromise=d((l,m)=>{c._closedPromise_resolve=l,c._closedPromise_reject=m,c._closedPromiseState="pending"})}a(qu,"defaultWriterClosedPromiseInitialize");function jP(c,l){qu(c),Cm(c,l)}a(jP,"defaultWriterClosedPromiseInitializeAsRejected");function C$(c){qu(c),MP(c)}a(C$,"defaultWriterClosedPromiseInitializeAsResolved");function Cm(c,l){c._closedPromise_reject!==void 0&&(S(c._closedPromise),c._closedPromise_reject(l),c._closedPromise_resolve=void 0,c._closedPromise_reject=void 0,c._closedPromiseState="rejected")}a(Cm,"defaultWriterClosedPromiseReject");function O$(c,l){jP(c,l)}a(O$,"defaultWriterClosedPromiseResetToRejected");function MP(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(MP,"defaultWriterClosedPromiseResolve");function Vu(c){c._readyPromise=d((l,m)=>{c._readyPromise_resolve=l,c._readyPromise_reject=m}),c._readyPromiseState="pending"}a(Vu,"defaultWriterReadyPromiseInitialize");function Om(c,l){Vu(c),FP(c,l)}a(Om,"defaultWriterReadyPromiseInitializeAsRejected");function LP(c){Vu(c),km(c)}a(LP,"defaultWriterReadyPromiseInitializeAsResolved");function FP(c,l){c._readyPromise_reject!==void 0&&(S(c._readyPromise),c._readyPromise_reject(l),c._readyPromise_resolve=void 0,c._readyPromise_reject=void 0,c._readyPromiseState="rejected")}a(FP,"defaultWriterReadyPromiseReject");function k$(c){Vu(c)}a(k$,"defaultWriterReadyPromiseReset");function $$(c,l){Om(c,l)}a($$,"defaultWriterReadyPromiseResetToRejected");function km(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(km,"defaultWriterReadyPromiseResolve");function N$(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof global<"u")return global}a(N$,"getGlobals");let $m=N$();function z$(c){if(!(typeof c=="function"||typeof c=="object")||c.name!=="DOMException")return!1;try{return new c,!0}catch{return!1}}a(z$,"isDOMExceptionConstructor");function D$(){let c=$m?.DOMException;return z$(c)?c:void 0}a(D$,"getFromGlobal");function U$(){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(U$,"createPolyfill");let j$=D$()||U$();function BP(c,l,m,E,I,j){let q=M(c),ie=wP(l);c._disturbed=!0;let _e=!1,le=p(void 0);return d((Pe,we)=>{let Qe;if(j!==void 0){if(Qe=a(()=>{let pe=j.reason!==void 0?j.reason:new j$("Aborted","AbortError"),Oe=[];E||Oe.push(()=>l._state==="writable"?ju(l,pe):p(void 0)),I||Oe.push(()=>c._state==="readable"?jr(c,pe):p(void 0)),Wt(()=>Promise.all(Oe.map(Ye=>Ye())),!0,pe)},"abortAlgorithm"),j.aborted){Qe();return}j.addEventListener("abort",Qe)}function Mr(){return d((pe,Oe)=>{function Ye(cr){cr?pe():g(Ei(),Ye,Oe)}a(Ye,"next"),Ye(!1)})}a(Mr,"pipeLoop");function Ei(){return _e?p(!0):g(ie._readyPromise,()=>d((pe,Oe)=>{ce(q,{_chunkSteps:a(Ye=>{le=g($P(ie,Ye),void 0,t),pe(!1)},"_chunkSteps"),_closeSteps:a(()=>pe(!0),"_closeSteps"),_errorSteps:Oe})}))}if(a(Ei,"pipeStep"),Pn(c,q._closedPromise,pe=>(E?xr(!0,pe):Wt(()=>ju(l,pe),!0,pe),null)),Pn(l,ie._closedPromise,pe=>(I?xr(!0,pe):Wt(()=>jr(c,pe),!0,pe),null)),Lt(c,q._closedPromise,()=>(m?xr():Wt(()=>E$(ie)),null)),rn(l)||l._state==="closed"){let pe=new TypeError("the destination writable stream closed before all data could be piped to it");I?xr(!0,pe):Wt(()=>jr(c,pe),!0,pe)}S(Mr());function Zn(){let pe=le;return g(le,()=>pe!==le?Zn():void 0)}a(Zn,"waitForWritesToFinish");function Pn(pe,Oe,Ye){pe._state==="errored"?Ye(pe._storedError):_(Oe,Ye)}a(Pn,"isOrBecomesErrored");function Lt(pe,Oe,Ye){pe._state==="closed"?Ye():h(Oe,Ye)}a(Lt,"isOrBecomesClosed");function Wt(pe,Oe,Ye){if(_e)return;_e=!0,l._state==="writable"&&!rn(l)?h(Zn(),cr):cr();function cr(){return y(pe(),()=>Sn(Oe,Ye),Pi=>Sn(!0,Pi)),null}a(cr,"doTheRest")}a(Wt,"shutdownWithAction");function xr(pe,Oe){_e||(_e=!0,l._state==="writable"&&!rn(l)?h(Zn(),()=>Sn(pe,Oe)):Sn(pe,Oe))}a(xr,"shutdown");function Sn(pe,Oe){return kP(ie),Le(q),j!==void 0&&j.removeEventListener("abort",Qe),pe?we(Oe):Pe(void 0),null}a(Sn,"finalize")})}a(BP,"ReadableStreamPipeTo");class En{static{a(this,"ReadableStreamDefaultController")}constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!Hu(this))throw Gu("desiredSize");return Nm(this)}close(){if(!Hu(this))throw Gu("close");if(!bi(this))throw new TypeError("The stream is not in a state that permits close");wo(this)}enqueue(l=void 0){if(!Hu(this))throw Gu("enqueue");if(!bi(this))throw new TypeError("The stream is not in a state that permits enqueue");return _i(this,l)}error(l=void 0){if(!Hu(this))throw Gu("error");Ur(this,l)}[ue](l){Ln(this);let m=this._cancelAlgorithm(l);return Zu(this),m}[Y](l){let m=this._controlledReadableStream;if(this._queue.length>0){let E=mm(this);this._closeRequested&&this._queue.length===0?(Zu(this),Wa(m)):Za(this),l._chunkSteps(E)}else C(m,l),Za(this)}[Ze](){}}Object.defineProperties(En.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},desiredSize:{enumerable:!0}}),r(En.prototype.close,"close"),r(En.prototype.enqueue,"enqueue"),r(En.prototype.error,"error"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(En.prototype,Symbol.toStringTag,{value:"ReadableStreamDefaultController",configurable:!0});function Hu(c){return!n(c)||!Object.prototype.hasOwnProperty.call(c,"_controlledReadableStream")?!1:c instanceof En}a(Hu,"IsReadableStreamDefaultController");function Za(c){if(!qP(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,Za(c)),null),E=>(Ur(c,E),null))}a(Za,"ReadableStreamDefaultControllerCallPullIfNeeded");function qP(c){let l=c._controlledReadableStream;return!bi(c)||!c._started?!1:!!(Vn(l)&&U(l)>0||Nm(c)>0)}a(qP,"ReadableStreamDefaultControllerShouldCallPull");function Zu(c){c._pullAlgorithm=void 0,c._cancelAlgorithm=void 0,c._strategySizeAlgorithm=void 0}a(Zu,"ReadableStreamDefaultControllerClearAlgorithms");function wo(c){if(!bi(c))return;let l=c._controlledReadableStream;c._closeRequested=!0,c._queue.length===0&&(Zu(c),Wa(l))}a(wo,"ReadableStreamDefaultControllerClose");function _i(c,l){if(!bi(c))return;let m=c._controlledReadableStream;if(Vn(m)&&U(m)>0)$(m,l,!1);else{let E;try{E=c._strategySizeAlgorithm(l)}catch(I){throw Ur(c,I),I}try{hm(c,l,E)}catch(I){throw Ur(c,I),I}}Za(c)}a(_i,"ReadableStreamDefaultControllerEnqueue");function Ur(c,l){let m=c._controlledReadableStream;m._state==="readable"&&(Ln(c),Zu(c),GP(m,l))}a(Ur,"ReadableStreamDefaultControllerError");function Nm(c){let l=c._controlledReadableStream._state;return l==="errored"?null:l==="closed"?0:c._strategyHWM-c._queueTotalSize}a(Nm,"ReadableStreamDefaultControllerGetDesiredSize");function M$(c){return!qP(c)}a(M$,"ReadableStreamDefaultControllerHasBackpressure");function bi(c){let l=c._controlledReadableStream._state;return!c._closeRequested&&l==="readable"}a(bi,"ReadableStreamDefaultControllerCanCloseOrEnqueue");function VP(c,l,m,E,I,j,q){l._controlledReadableStream=c,l._queue=void 0,l._queueTotalSize=void 0,Ln(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 ie=m();y(p(ie),()=>(l._started=!0,Za(l),null),_e=>(Ur(l,_e),null))}a(VP,"SetUpReadableStreamDefaultController");function L$(c,l,m,E){let I=Object.create(En.prototype),j,q,ie;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?ie=a(_e=>l.cancel(_e),"cancelAlgorithm"):ie=a(()=>p(void 0),"cancelAlgorithm"),VP(c,I,j,q,ie,m,E)}a(L$,"SetUpReadableStreamDefaultControllerFromUnderlyingSource");function Gu(c){return new TypeError(`ReadableStreamDefaultController.prototype.${c} can only be used on a ReadableStreamDefaultController`)}a(Gu,"defaultControllerBrandCheckException$1");function F$(c,l){return Po(c._readableStreamController)?q$(c):B$(c)}a(F$,"ReadableStreamTee");function B$(c,l){let m=M(c),E=!1,I=!1,j=!1,q=!1,ie,_e,le,Pe,we,Qe=d(Lt=>{we=Lt});function Mr(){return E?(I=!0,p(void 0)):(E=!0,ce(m,{_chunkSteps:a(Wt=>{T(()=>{I=!1;let xr=Wt,Sn=Wt;j||_i(le._readableStreamController,xr),q||_i(Pe._readableStreamController,Sn),E=!1,I&&Mr()})},"_chunkSteps"),_closeSteps:a(()=>{E=!1,j||wo(le._readableStreamController),q||wo(Pe._readableStreamController),(!j||!q)&&we(void 0)},"_closeSteps"),_errorSteps:a(()=>{E=!1},"_errorSteps")}),p(void 0))}a(Mr,"pullAlgorithm");function Ei(Lt){if(j=!0,ie=Lt,q){let Wt=We([ie,_e]),xr=jr(c,Wt);we(xr)}return Qe}a(Ei,"cancel1Algorithm");function Zn(Lt){if(q=!0,_e=Lt,j){let Wt=We([ie,_e]),xr=jr(c,Wt);we(xr)}return Qe}a(Zn,"cancel2Algorithm");function Pn(){}return a(Pn,"startAlgorithm"),le=Ga(Pn,Mr,Ei),Pe=Ga(Pn,Mr,Zn),_(m._closedPromise,Lt=>(Ur(le._readableStreamController,Lt),Ur(Pe._readableStreamController,Lt),(!j||!q)&&we(void 0),null)),[le,Pe]}a(B$,"ReadableStreamDefaultTee");function q$(c){let l=M(c),m=!1,E=!1,I=!1,j=!1,q=!1,ie,_e,le,Pe,we,Qe=d(pe=>{we=pe});function Mr(pe){_(pe._closedPromise,Oe=>(pe!==l||(Tr(le._readableStreamController,Oe),Tr(Pe._readableStreamController,Oe),(!j||!q)&&we(void 0)),null))}a(Mr,"forwardReaderError");function Ei(){To(l)&&(Le(l),l=M(c),Mr(l)),ce(l,{_chunkSteps:a(Oe=>{T(()=>{E=!1,I=!1;let Ye=Oe,cr=Oe;if(!j&&!q)try{cr=cP(Oe)}catch(Pi){Tr(le._readableStreamController,Pi),Tr(Pe._readableStreamController,Pi),we(jr(c,Pi));return}j||ku(le._readableStreamController,Ye),q||ku(Pe._readableStreamController,cr),m=!1,E?Pn():I&&Lt()})},"_chunkSteps"),_closeSteps:a(()=>{m=!1,j||Fa(le._readableStreamController),q||Fa(Pe._readableStreamController),le._readableStreamController._pendingPullIntos.length>0&&$u(le._readableStreamController,0),Pe._readableStreamController._pendingPullIntos.length>0&&$u(Pe._readableStreamController,0),(!j||!q)&&we(void 0)},"_closeSteps"),_errorSteps:a(()=>{m=!1},"_errorSteps")})}a(Ei,"pullWithDefaultReader");function Zn(pe,Oe){ae(l)&&(Le(l),l=EP(c),Mr(l));let Ye=Oe?Pe:le,cr=Oe?le:Pe;TP(l,pe,1,{_chunkSteps:a(Si=>{T(()=>{E=!1,I=!1;let Ti=Oe?q:j;if(Oe?j:q)Ti||Nu(Ye._readableStreamController,Si);else{let aS;try{aS=cP(Si)}catch(Mm){Tr(Ye._readableStreamController,Mm),Tr(cr._readableStreamController,Mm),we(jr(c,Mm));return}Ti||Nu(Ye._readableStreamController,Si),ku(cr._readableStreamController,aS)}m=!1,E?Pn():I&&Lt()})},"_chunkSteps"),_closeSteps:a(Si=>{m=!1;let Ti=Oe?q:j,tl=Oe?j:q;Ti||Fa(Ye._readableStreamController),tl||Fa(cr._readableStreamController),Si!==void 0&&(Ti||Nu(Ye._readableStreamController,Si),!tl&&cr._readableStreamController._pendingPullIntos.length>0&&$u(cr._readableStreamController,0)),(!Ti||!tl)&&we(void 0)},"_closeSteps"),_errorSteps:a(()=>{m=!1},"_errorSteps")})}a(Zn,"pullWithBYOBReader");function Pn(){if(m)return E=!0,p(void 0);m=!0;let pe=vm(le._readableStreamController);return pe===null?Ei():Zn(pe._view,!1),p(void 0)}a(Pn,"pull1Algorithm");function Lt(){if(m)return I=!0,p(void 0);m=!0;let pe=vm(Pe._readableStreamController);return pe===null?Ei():Zn(pe._view,!0),p(void 0)}a(Lt,"pull2Algorithm");function Wt(pe){if(j=!0,ie=pe,q){let Oe=We([ie,_e]),Ye=jr(c,Oe);we(Ye)}return Qe}a(Wt,"cancel1Algorithm");function xr(pe){if(q=!0,_e=pe,j){let Oe=We([ie,_e]),Ye=jr(c,Oe);we(Ye)}return Qe}a(xr,"cancel2Algorithm");function Sn(){}return a(Sn,"startAlgorithm"),le=ZP(Sn,Pn,Wt),Pe=ZP(Sn,Lt,xr),Mr(l),[le,Pe]}a(q$,"ReadableByteStreamTee");function V$(c){return n(c)&&typeof c.getReader<"u"}a(V$,"isReadableStreamLike");function H$(c){return V$(c)?G$(c.getReader()):Z$(c)}a(H$,"ReadableStreamFrom");function Z$(c){let l,m=sP(c,"async"),E=t;function I(){let q;try{q=U0(m)}catch(_e){return f(_e)}let ie=p(q);return P(ie,_e=>{if(!n(_e))throw new TypeError("The promise returned by the iterator.next() method must fulfill with an object");if(j0(_e))wo(l._readableStreamController);else{let Pe=M0(_e);_i(l._readableStreamController,Pe)}})}a(I,"pullAlgorithm");function j(q){let ie=m.iterator,_e;try{_e=Ru(ie,"return")}catch(we){return f(we)}if(_e===void 0)return p(void 0);let le;try{le=R(_e,ie,[q])}catch(we){return f(we)}let Pe=p(le);return P(Pe,we=>{if(!n(we))throw new TypeError("The promise returned by the iterator.return() method must fulfill with an object")})}return a(j,"cancelAlgorithm"),l=Ga(E,I,j,0),l}a(Z$,"ReadableStreamFromIterable");function G$(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)wo(l._readableStreamController);else{let ie=q.value;_i(l._readableStreamController,ie)}})}a(E,"pullAlgorithm");function I(j){try{return p(c.cancel(j))}catch(q){return f(q)}}return a(I,"cancelAlgorithm"),l=Ga(m,E,I,0),l}a(G$,"ReadableStreamFromDefaultReader");function W$(c,l){Gt(c,l);let m=c,E=m?.autoAllocateChunkSize,I=m?.cancel,j=m?.pull,q=m?.start,ie=m?.type;return{autoAllocateChunkSize:E===void 0?void 0:O(E,`${l} has member 'autoAllocateChunkSize' that`),cancel:I===void 0?void 0:J$(I,m,`${l} has member 'cancel' that`),pull:j===void 0?void 0:K$(j,m,`${l} has member 'pull' that`),start:q===void 0?void 0:X$(q,m,`${l} has member 'start' that`),type:ie===void 0?void 0:Q$(ie,`${l} has member 'type' that`)}}a(W$,"convertUnderlyingDefaultOrByteSource");function J$(c,l,m){return jt(c,m),E=>V(c,l,[E])}a(J$,"convertUnderlyingSourceCancelCallback");function K$(c,l,m){return jt(c,m),E=>V(c,l,[E])}a(K$,"convertUnderlyingSourcePullCallback");function X$(c,l,m){return jt(c,m),E=>R(c,l,[E])}a(X$,"convertUnderlyingSourceStartCallback");function Q$(c,l){if(c=`${c}`,c!=="bytes")throw new TypeError(`${l} '${c}' is not a valid enumeration value for ReadableStreamType`);return c}a(Q$,"convertReadableStreamType");function Y$(c,l){return Gt(c,l),{preventCancel:!!c?.preventCancel}}a(Y$,"convertIteratorOptions");function HP(c,l){Gt(c,l);let m=c?.preventAbort,E=c?.preventCancel,I=c?.preventClose,j=c?.signal;return j!==void 0&&eN(j,`${l} has member 'signal' that`),{preventAbort:!!m,preventCancel:!!E,preventClose:!!I,signal:j}}a(HP,"convertPipeOptions");function eN(c,l){if(!c$(c))throw new TypeError(`${l} is not an AbortSignal.`)}a(eN,"assertAbortSignal");function tN(c,l){Gt(c,l);let m=c?.readable;v(m,"readable","ReadableWritablePair"),N(m,`${l} has member 'readable' that`);let E=c?.writable;return v(E,"writable","ReadableWritablePair"),AP(E,`${l} has member 'writable' that`),{readable:m,writable:E}}a(tN,"convertReadableWritablePair");class Nt{static{a(this,"ReadableStream")}constructor(l={},m={}){l===void 0?l=null:Mt(l,"First parameter");let E=Uu(m,"Second parameter"),I=W$(l,"First parameter");if(zm(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=qa(E,0);J0(this,I,j)}else{let j=Du(E),q=qa(E,1);L$(this,I,q,j)}}get locked(){if(!qn(this))throw Io("locked");return Vn(this)}cancel(l=void 0){return qn(this)?Vn(this)?f(new TypeError("Cannot cancel a stream that already has a reader")):jr(this,l):f(Io("cancel"))}getReader(l=void 0){if(!qn(this))throw Io("getReader");return X0(l,"First parameter").mode===void 0?M(this):EP(this)}pipeThrough(l,m={}){if(!qn(this))throw Io("pipeThrough");ht(l,1,"pipeThrough");let E=tN(l,"First parameter"),I=HP(m,"Second parameter");if(Vn(this))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(gi(E.writable))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");let j=BP(this,E.writable,I.preventClose,I.preventAbort,I.preventCancel,I.signal);return S(j),E.readable}pipeTo(l,m={}){if(!qn(this))return f(Io("pipeTo"));if(l===void 0)return f("Parameter 1 is required in 'pipeTo'.");if(!hi(l))return f(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));let E;try{E=HP(m,"Second parameter")}catch(I){return f(I)}return Vn(this)?f(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):gi(l)?f(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):BP(this,l,E.preventClose,E.preventAbort,E.preventCancel,E.signal)}tee(){if(!qn(this))throw Io("tee");let l=F$(this);return We(l)}values(l=void 0){if(!qn(this))throw Io("values");let m=Y$(l,"First parameter");return di(this,m.preventCancel)}[fm](l){return this.values(l)}static from(l){return H$(l)}}Object.defineProperties(Nt,{from:{enumerable:!0}}),Object.defineProperties(Nt.prototype,{cancel:{enumerable:!0},getReader:{enumerable:!0},pipeThrough:{enumerable:!0},pipeTo:{enumerable:!0},tee:{enumerable:!0},values:{enumerable:!0},locked:{enumerable:!0}}),r(Nt.from,"from"),r(Nt.prototype.cancel,"cancel"),r(Nt.prototype.getReader,"getReader"),r(Nt.prototype.pipeThrough,"pipeThrough"),r(Nt.prototype.pipeTo,"pipeTo"),r(Nt.prototype.tee,"tee"),r(Nt.prototype.values,"values"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Nt.prototype,Symbol.toStringTag,{value:"ReadableStream",configurable:!0}),Object.defineProperty(Nt.prototype,fm,{value:Nt.prototype.values,writable:!0,configurable:!0});function Ga(c,l,m,E=1,I=()=>1){let j=Object.create(Nt.prototype);zm(j);let q=Object.create(En.prototype);return VP(j,q,c,l,m,E,I),j}a(Ga,"CreateReadableStream");function ZP(c,l,m){let E=Object.create(Nt.prototype);zm(E);let I=Object.create(bn.prototype);return vP(E,I,c,l,m,0,void 0),E}a(ZP,"CreateReadableByteStream");function zm(c){c._state="readable",c._reader=void 0,c._storedError=void 0,c._disturbed=!1}a(zm,"InitializeReadableStream");function qn(c){return!n(c)||!Object.prototype.hasOwnProperty.call(c,"_readableStreamController")?!1:c instanceof Nt}a(qn,"IsReadableStream");function Vn(c){return c._reader!==void 0}a(Vn,"IsReadableStreamLocked");function jr(c,l){if(c._disturbed=!0,c._state==="closed")return p(void 0);if(c._state==="errored")return f(c._storedError);Wa(c);let m=c._reader;if(m!==void 0&&To(m)){let I=m._readIntoRequests;m._readIntoRequests=new H,I.forEach(j=>{j._closeSteps(void 0)})}let E=c._readableStreamController[ue](l);return P(E,t)}a(jr,"ReadableStreamCancel");function Wa(c){c._state="closed";let l=c._reader;if(l!==void 0&&(li(l),ae(l))){let m=l._readRequests;l._readRequests=new H,m.forEach(E=>{E._closeSteps()})}}a(Wa,"ReadableStreamClose");function GP(c,l){c._state="errored",c._storedError=l;let m=c._reader;m!==void 0&&(ar(m,l),ae(m)?rt(m,l):xP(m,l))}a(GP,"ReadableStreamError");function Io(c){return new TypeError(`ReadableStream.prototype.${c} can only be used on a ReadableStream`)}a(Io,"streamBrandCheckException$1");function WP(c,l){Gt(c,l);let m=c?.highWaterMark;return v(m,"highWaterMark","QueuingStrategyInit"),{highWaterMark:x(m)}}a(WP,"convertQueuingStrategyInit");let JP=a(c=>c.byteLength,"byteLengthSizeFunction");r(JP,"size");class Wu{static{a(this,"ByteLengthQueuingStrategy")}constructor(l){ht(l,1,"ByteLengthQueuingStrategy"),l=WP(l,"First parameter"),this._byteLengthQueuingStrategyHighWaterMark=l.highWaterMark}get highWaterMark(){if(!XP(this))throw KP("highWaterMark");return this._byteLengthQueuingStrategyHighWaterMark}get size(){if(!XP(this))throw KP("size");return JP}}Object.defineProperties(Wu.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Wu.prototype,Symbol.toStringTag,{value:"ByteLengthQueuingStrategy",configurable:!0});function KP(c){return new TypeError(`ByteLengthQueuingStrategy.prototype.${c} can only be used on a ByteLengthQueuingStrategy`)}a(KP,"byteLengthBrandCheckException");function XP(c){return!n(c)||!Object.prototype.hasOwnProperty.call(c,"_byteLengthQueuingStrategyHighWaterMark")?!1:c instanceof Wu}a(XP,"IsByteLengthQueuingStrategy");let QP=a(()=>1,"countSizeFunction");r(QP,"size");class Ju{static{a(this,"CountQueuingStrategy")}constructor(l){ht(l,1,"CountQueuingStrategy"),l=WP(l,"First parameter"),this._countQueuingStrategyHighWaterMark=l.highWaterMark}get highWaterMark(){if(!eS(this))throw YP("highWaterMark");return this._countQueuingStrategyHighWaterMark}get size(){if(!eS(this))throw YP("size");return QP}}Object.defineProperties(Ju.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Ju.prototype,Symbol.toStringTag,{value:"CountQueuingStrategy",configurable:!0});function YP(c){return new TypeError(`CountQueuingStrategy.prototype.${c} can only be used on a CountQueuingStrategy`)}a(YP,"countBrandCheckException");function eS(c){return!n(c)||!Object.prototype.hasOwnProperty.call(c,"_countQueuingStrategyHighWaterMark")?!1:c instanceof Ju}a(eS,"IsCountQueuingStrategy");function rN(c,l){Gt(c,l);let m=c?.cancel,E=c?.flush,I=c?.readableType,j=c?.start,q=c?.transform,ie=c?.writableType;return{cancel:m===void 0?void 0:aN(m,c,`${l} has member 'cancel' that`),flush:E===void 0?void 0:nN(E,c,`${l} has member 'flush' that`),readableType:I,start:j===void 0?void 0:oN(j,c,`${l} has member 'start' that`),transform:q===void 0?void 0:iN(q,c,`${l} has member 'transform' that`),writableType:ie}}a(rN,"convertTransformer");function nN(c,l,m){return jt(c,m),E=>V(c,l,[E])}a(nN,"convertTransformerFlushCallback");function oN(c,l,m){return jt(c,m),E=>R(c,l,[E])}a(oN,"convertTransformerStartCallback");function iN(c,l,m){return jt(c,m),(E,I)=>V(c,l,[E,I])}a(iN,"convertTransformerTransformCallback");function aN(c,l,m){return jt(c,m),E=>V(c,l,[E])}a(aN,"convertTransformerCancelCallback");class Ku{static{a(this,"TransformStream")}constructor(l={},m={},E={}){l===void 0&&(l=null);let I=Uu(m,"Second parameter"),j=Uu(E,"Third parameter"),q=rN(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 ie=qa(j,0),_e=Du(j),le=qa(I,1),Pe=Du(I),we,Qe=d(Mr=>{we=Mr});sN(this,Qe,le,Pe,ie,_e),uN(this,q),q.start!==void 0?we(q.start(this._transformStreamController)):we(void 0)}get readable(){if(!tS(this))throw iS("readable");return this._readable}get writable(){if(!tS(this))throw iS("writable");return this._writable}}Object.defineProperties(Ku.prototype,{readable:{enumerable:!0},writable:{enumerable:!0}}),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Ku.prototype,Symbol.toStringTag,{value:"TransformStream",configurable:!0});function sN(c,l,m,E,I,j){function q(){return l}a(q,"startAlgorithm");function ie(Qe){return pN(c,Qe)}a(ie,"writeAlgorithm");function _e(Qe){return fN(c,Qe)}a(_e,"abortAlgorithm");function le(){return mN(c)}a(le,"closeAlgorithm"),c._writable=d$(q,ie,le,_e,m,E);function Pe(){return hN(c)}a(Pe,"pullAlgorithm");function we(Qe){return gN(c,Qe)}a(we,"cancelAlgorithm"),c._readable=Ga(q,Pe,we,I,j),c._backpressure=void 0,c._backpressureChangePromise=void 0,c._backpressureChangePromise_resolve=void 0,Xu(c,!0),c._transformStreamController=void 0}a(sN,"InitializeTransformStream");function tS(c){return!n(c)||!Object.prototype.hasOwnProperty.call(c,"_transformStreamController")?!1:c instanceof Ku}a(tS,"IsTransformStream");function rS(c,l){Ur(c._readable._readableStreamController,l),Dm(c,l)}a(rS,"TransformStreamError");function Dm(c,l){Yu(c._transformStreamController),Va(c._writable._writableStreamController,l),Um(c)}a(Dm,"TransformStreamErrorWritableAndUnblockWrite");function Um(c){c._backpressure&&Xu(c,!1)}a(Um,"TransformStreamUnblockWrite");function Xu(c,l){c._backpressureChangePromise!==void 0&&c._backpressureChangePromise_resolve(),c._backpressureChangePromise=d(m=>{c._backpressureChangePromise_resolve=m}),c._backpressure=l}a(Xu,"TransformStreamSetBackpressure");class Hn{static{a(this,"TransformStreamDefaultController")}constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!Qu(this))throw el("desiredSize");let l=this._controlledTransformStream._readable._readableStreamController;return Nm(l)}enqueue(l=void 0){if(!Qu(this))throw el("enqueue");nS(this,l)}error(l=void 0){if(!Qu(this))throw el("error");lN(this,l)}terminate(){if(!Qu(this))throw el("terminate");dN(this)}}Object.defineProperties(Hn.prototype,{enqueue:{enumerable:!0},error:{enumerable:!0},terminate:{enumerable:!0},desiredSize:{enumerable:!0}}),r(Hn.prototype.enqueue,"enqueue"),r(Hn.prototype.error,"error"),r(Hn.prototype.terminate,"terminate"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Hn.prototype,Symbol.toStringTag,{value:"TransformStreamDefaultController",configurable:!0});function Qu(c){return!n(c)||!Object.prototype.hasOwnProperty.call(c,"_controlledTransformStream")?!1:c instanceof Hn}a(Qu,"IsTransformStreamDefaultController");function cN(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(cN,"SetUpTransformStreamDefaultController");function uN(c,l){let m=Object.create(Hn.prototype),E,I,j;l.transform!==void 0?E=a(q=>l.transform(q,m),"transformAlgorithm"):E=a(q=>{try{return nS(m,q),p(void 0)}catch(ie){return f(ie)}},"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"),cN(c,m,E,I,j)}a(uN,"SetUpTransformStreamDefaultControllerFromTransformer");function Yu(c){c._transformAlgorithm=void 0,c._flushAlgorithm=void 0,c._cancelAlgorithm=void 0}a(Yu,"TransformStreamDefaultControllerClearAlgorithms");function nS(c,l){let m=c._controlledTransformStream,E=m._readable._readableStreamController;if(!bi(E))throw new TypeError("Readable side is not in a state that permits enqueue");try{_i(E,l)}catch(j){throw Dm(m,j),m._readable._storedError}M$(E)!==m._backpressure&&Xu(m,!0)}a(nS,"TransformStreamDefaultControllerEnqueue");function lN(c,l){rS(c._controlledTransformStream,l)}a(lN,"TransformStreamDefaultControllerError");function oS(c,l){let m=c._transformAlgorithm(l);return P(m,void 0,E=>{throw rS(c._controlledTransformStream,E),E})}a(oS,"TransformStreamDefaultControllerPerformTransform");function dN(c){let l=c._controlledTransformStream,m=l._readable._readableStreamController;wo(m);let E=new TypeError("TransformStream terminated");Dm(l,E)}a(dN,"TransformStreamDefaultControllerTerminate");function pN(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 oS(m,l)})}return oS(m,l)}a(pN,"TransformStreamDefaultSinkWriteAlgorithm");function fN(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 Yu(m),y(I,()=>(E._state==="errored"?vi(m,E._storedError):(Ur(E._readableStreamController,l),jm(m)),null),j=>(Ur(E._readableStreamController,j),vi(m,j),null)),m._finishPromise}a(fN,"TransformStreamDefaultSinkAbortAlgorithm");function mN(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 Yu(l),y(E,()=>(m._state==="errored"?vi(l,m._storedError):(wo(m._readableStreamController),jm(l)),null),I=>(Ur(m._readableStreamController,I),vi(l,I),null)),l._finishPromise}a(mN,"TransformStreamDefaultSinkCloseAlgorithm");function hN(c){return Xu(c,!1),c._backpressureChangePromise}a(hN,"TransformStreamDefaultSourcePullAlgorithm");function gN(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 Yu(m),y(I,()=>(E._state==="errored"?vi(m,E._storedError):(Va(E._writableStreamController,l),Um(c),jm(m)),null),j=>(Va(E._writableStreamController,j),Um(c),vi(m,j),null)),m._finishPromise}a(gN,"TransformStreamDefaultSourceCancelAlgorithm");function el(c){return new TypeError(`TransformStreamDefaultController.prototype.${c} can only be used on a TransformStreamDefaultController`)}a(el,"defaultControllerBrandCheckException");function jm(c){c._finishPromise_resolve!==void 0&&(c._finishPromise_resolve(),c._finishPromise_resolve=void 0,c._finishPromise_reject=void 0)}a(jm,"defaultControllerFinishPromiseResolve");function vi(c,l){c._finishPromise_reject!==void 0&&(S(c._finishPromise),c._finishPromise_reject(l),c._finishPromise_resolve=void 0,c._finishPromise_reject=void 0)}a(vi,"defaultControllerFinishPromiseReject");function iS(c){return new TypeError(`TransformStream.prototype.${c} can only be used on a TransformStream`)}a(iS,"streamBrandCheckException"),e.ByteLengthQueuingStrategy=Wu,e.CountQueuingStrategy=Ju,e.ReadableByteStreamController=bn,e.ReadableStream=Nt,e.ReadableStreamBYOBReader=Fn,e.ReadableStreamBYOBRequest=Eo,e.ReadableStreamDefaultController=En,e.ReadableStreamDefaultReader=Z,e.TransformStream=Ku,e.TransformStreamDefaultController=Hn,e.WritableStream=Bn,e.WritableStreamDefaultController=yi,e.WritableStreamDefaultWriter=vn}))});var aC=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,iC())}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*Kb(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,sC),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+sC)).arrayBuffer();o+=s.byteLength,yield new Uint8Array(s)}}}var XY,sC,cC,sF,Zr,eu=bt(()=>{XY=Rt(aC(),1);sC=65536;a(Kb,"toIterator");cC=class Xb{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 Xb?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 Kb(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 Kb(this.#e,!1))t.set(o,n),n+=o.length;return t.buffer}stream(){let t=Kb(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 Xb([],{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(cC.prototype,{size:{enumerable:!0},type:{enumerable:!0},slice:{enumerable:!0}});sF=cC,Zr=sF});var cF,uF,mo,Qb=bt(()=>{eu();cF=class extends Zr{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 Zr&&/^(File)$/.test(t[Symbol.toStringTag])}},uF=cF,mo=uF});function dC(e,t=Zr){var n=`${uC()}${uC()}`.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+Yb(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+Yb(s)+`"; filename="${Yb(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 tu,lF,dF,uC,pF,lC,Yb,ei,ho,tf=bt(()=>{eu();Qb();({toStringTag:tu,iterator:lF,hasInstance:dF}=Symbol),uC=Math.random,pF="append,set,get,getAll,delete,keys,values,entries,forEach,constructor".split(","),lC=a((e,t,n)=>(e+="",/^(Blob|File)$/.test(t&&t[tu])?[(n=n!==void 0?n+"":t[tu]=="File"?t.name:"blob",e),t.name!==n||t[tu]=="blob"?new mo([t],n,t):t]:[e,t+""]),"f"),Yb=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"),ei=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"),ho=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[tu](){return"FormData"}[lF](){return this.entries()}static[dF](t){return t&&typeof t=="object"&&t[tu]==="FormData"&&!pF.some(n=>typeof t[n]!="function")}append(...t){ei("append",arguments,2),this.#e.push(lC(...t))}delete(t){ei("delete",arguments,1),t+="",this.#e=this.#e.filter(([n])=>n!==t)}get(t){ei("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 ei("getAll",arguments,1),n=[],t+="",this.#e.forEach(o=>o[0]===t&&n.push(o[1])),n}has(t){return ei("has",arguments,1),t+="",this.#e.some(n=>n[0]===t)}forEach(t,n){ei("forEach",arguments,1);for(var[o,r]of this)t.call(n,r,o,this)}set(...t){ei("set",arguments,2);var n=[],o=!0;t=lC(...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(dC,"formDataToBlob")});var $n,rf=bt(()=>{$n=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 Ht,ev=bt(()=>{rf();Ht=class extends $n{static{a(this,"FetchError")}constructor(t,n,o){super(t,n),o&&(this.code=this.errno=o.code,this.erroredSysCall=o.syscall)}}});var nf,tv,ru,pC,fC,mC,of=bt(()=>{nf=Symbol.toStringTag,tv=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[nf]==="URLSearchParams","isURLSearchParameters"),ru=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[nf]),"isBlob"),pC=a(e=>typeof e=="object"&&(e[nf]==="AbortSignal"||e[nf]==="EventTarget"),"isAbortSignal"),fC=a((e,t)=>{let n=new URL(t).hostname,o=new URL(e).hostname;return n===o||n.endsWith(`.${o}`)},"isDomainOrSubdomain"),mC=a((e,t)=>{let n=new URL(t).protocol,o=new URL(e).protocol;return n===o},"isSameProtocol")});var gC=B((g7,hC)=>{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)}hC.exports=globalThis.DOMException});var ti,yC,_C,rv,bC,vC,EC,PC,SC,TC,af,nv=bt(()=>{ti=require("node:fs"),yC=require("node:path"),_C=Rt(gC(),1);Qb();eu();({stat:rv}=ti.promises),bC=a((e,t)=>SC((0,ti.statSync)(e),e,t),"blobFromSync"),vC=a((e,t)=>rv(e).then(n=>SC(n,e,t)),"blobFrom"),EC=a((e,t)=>rv(e).then(n=>TC(n,e,t)),"fileFrom"),PC=a((e,t)=>TC((0,ti.statSync)(e),e,t),"fileFromSync"),SC=a((e,t,n="")=>new Zr([new af({path:t,size:e.size,lastModified:e.mtimeMs,start:0})],{type:n}),"fromBlob"),TC=a((e,t,n="")=>new mo([new af({path:t,size:e.size,lastModified:e.mtimeMs,start:0})],(0,yC.basename)(t),{type:n,lastModified:e.mtimeMs}),"fromFile"),af=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 rv(this.#e);if(t>this.lastModified)throw new _C.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,ti.createReadStream)(this.#e,{start:this.#t,end:this.#t+this.size-1})}get[Symbol.toStringTag](){return"Blob"}}});var AC={};Jt(AC,{toFormData:()=>bF});function _F(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 bF(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 ov(n[1]||n[2]),r,i,s,u,d,p,f=[],g=new ho,y=a(T=>{s+=S.decode(T,{stream:!0})},"onPartData"),h=a(T=>{f.push(T)},"appendToFile"),_=a(()=>{let T=new mo(f,p,{type:d});g.append(u,T)},"appendFileToFormData"),P=a(()=>{g.append(u,s)},"appendEntryToFormData"),S=new TextDecoder("utf-8");S.decode(),o.onPartBegin=function(){o.onPartData=y,o.onPartEnd=P,r="",i="",s="",u="",d="",p=null,f.length=0},o.onHeaderField=function(T){r+=S.decode(T,{stream:!0})},o.onHeaderValue=function(T){i+=S.decode(T,{stream:!0})},o.onHeaderEnd=function(){if(i+=S.decode(),r=r.toLowerCase(),r==="content-disposition"){let T=i.match(/\bname=("([^"]*)"|([^()<>@,;:\\"/[\]?={}\s\t]+))/i);T&&(u=T[2]||T[3]||""),p=_F(i),p&&(o.onPartData=h,o.onPartEnd=_)}else r==="content-type"&&(d=i);i="",r=""};for await(let T of e)o.write(T);return o.end(),g}var sn,et,xC,go,sf,cf,fF,nu,mF,hF,gF,yF,ri,ov,wC=bt(()=>{nv();tf();sn=0,et={START_BOUNDARY:sn++,HEADER_FIELD_START:sn++,HEADER_FIELD:sn++,HEADER_VALUE_START:sn++,HEADER_VALUE:sn++,HEADER_VALUE_ALMOST_DONE:sn++,HEADERS_ALMOST_DONE:sn++,PART_DATA_START:sn++,PART_DATA:sn++,END:sn++},xC=1,go={PART_BOUNDARY:xC,LAST_BOUNDARY:xC*=2},sf=10,cf=13,fF=32,nu=45,mF=58,hF=97,gF=122,yF=a(e=>e|32,"lower"),ri=a(()=>{},"noop"),ov=class{static{a(this,"MultipartParser")}constructor(t){this.index=0,this.flags=0,this.onHeaderEnd=ri,this.onHeaderField=ri,this.onHeadersEnd=ri,this.onHeaderValue=ri,this.onPartBegin=ri,this.onPartData=ri,this.onPartEnd=ri,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=et.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,S=a(W=>{this[W+"Mark"]=n},"mark"),T=a(W=>{delete this[W+"Mark"]},"clear"),R=a((W,H,G,re)=>{(H===void 0||H!==G)&&this[W](re&&re.subarray(H,G))},"callback"),V=a((W,H)=>{let G=W+"Mark";G in this&&(H?(R(W,this[G],n,t),delete this[G]):(R(W,this[G],t.length,t),this[G]=0))},"dataCallback");for(n=0;n<o;n++)switch(_=t[n],p){case et.START_BOUNDARY:if(d===s.length-2){if(_===nu)f|=go.LAST_BOUNDARY;else if(_!==cf)return;d++;break}else if(d-1===s.length-2){if(f&go.LAST_BOUNDARY&&_===nu)p=et.END,f=0;else if(!(f&go.LAST_BOUNDARY)&&_===sf)d=0,R("onPartBegin"),p=et.HEADER_FIELD_START;else return;break}_!==s[d+2]&&(d=-2),_===s[d+2]&&d++;break;case et.HEADER_FIELD_START:p=et.HEADER_FIELD,S("onHeaderField"),d=0;case et.HEADER_FIELD:if(_===cf){T("onHeaderField"),p=et.HEADERS_ALMOST_DONE;break}if(d++,_===nu)break;if(_===mF){if(d===1)return;V("onHeaderField",!0),p=et.HEADER_VALUE_START;break}if(P=yF(_),P<hF||P>gF)return;break;case et.HEADER_VALUE_START:if(_===fF)break;S("onHeaderValue"),p=et.HEADER_VALUE;case et.HEADER_VALUE:_===cf&&(V("onHeaderValue",!0),R("onHeaderEnd"),p=et.HEADER_VALUE_ALMOST_DONE);break;case et.HEADER_VALUE_ALMOST_DONE:if(_!==sf)return;p=et.HEADER_FIELD_START;break;case et.HEADERS_ALMOST_DONE:if(_!==sf)return;R("onHeadersEnd"),p=et.PART_DATA_START;break;case et.PART_DATA_START:p=et.PART_DATA,S("onPartData");case et.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++,_===cf?f|=go.PART_BOUNDARY:_===nu?f|=go.LAST_BOUNDARY:d=0;else if(d-1===s.length)if(f&go.PART_BOUNDARY){if(d=0,_===sf){f&=~go.PART_BOUNDARY,R("onPartEnd"),R("onPartBegin"),p=et.HEADER_FIELD_START;break}}else f&go.LAST_BOUNDARY&&_===nu?(R("onPartEnd"),p=et.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);R("onPartData",0,r,W),r=0,S("onPartData"),n--}break;case et.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===et.HEADER_FIELD_START&&this.index===0||this.state===et.PART_DATA&&this.index===this.boundary.length)this.onPartEnd();else if(this.state!==et.END)throw new Error("MultipartParser.end(): stream ended unexpectedly")}};a(_F,"_fileName");a(bF,"toFormData")});async function iv(e){if(e[nr].disturbed)throw new TypeError(`body used already for: ${e.url}`);if(e[nr].disturbed=!0,e[nr].error)throw e[nr].error;let{body:t}=e;if(t===null)return mr.Buffer.alloc(0);if(!(t instanceof kr.default))return mr.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 Ht(`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 $n?r:new Ht(`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")?mr.Buffer.from(n.join("")):mr.Buffer.concat(n,o)}catch(r){throw new Ht(`Could not create Buffer from response body for ${e.url}: ${r.message}`,"system",r)}else throw new Ht(`Premature close of server response while trying to fetch ${e.url}`)}var kr,Nn,mr,vF,nr,cn,ga,EF,uf,IC,RC,lf=bt(()=>{kr=Rt(require("node:stream"),1),Nn=require("node:util"),mr=require("node:buffer");eu();tf();ev();rf();of();vF=(0,Nn.promisify)(kr.default.pipeline),nr=Symbol("Body internals"),cn=class{static{a(this,"Body")}constructor(t,{size:n=0}={}){let o=null;t===null?t=null:tv(t)?t=mr.Buffer.from(t.toString()):ru(t)||mr.Buffer.isBuffer(t)||(Nn.types.isAnyArrayBuffer(t)?t=mr.Buffer.from(t):ArrayBuffer.isView(t)?t=mr.Buffer.from(t.buffer,t.byteOffset,t.byteLength):t instanceof kr.default||(t instanceof ho?(t=dC(t),o=t.type.split("=")[1]):t=mr.Buffer.from(String(t))));let r=t;mr.Buffer.isBuffer(t)?r=kr.default.Readable.from(t):ru(t)&&(r=kr.default.Readable.from(t.stream())),this[nr]={body:t,stream:r,boundary:o,disturbed:!1,error:null},this.size=n,t instanceof kr.default&&t.on("error",i=>{let s=i instanceof $n?i:new Ht(`Invalid response body while trying to fetch ${this.url}: ${i.message}`,"system",i);this[nr].error=s})}get body(){return this[nr].stream}get bodyUsed(){return this[nr].disturbed}async arrayBuffer(){let{buffer:t,byteOffset:n,byteLength:o}=await iv(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 ho,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(()=>(wC(),AC));return n(this.body,t)}async blob(){let t=this.headers&&this.headers.get("content-type")||this[nr].body&&this[nr].body.type||"",n=await this.arrayBuffer();return new Zr([n],{type:t})}async json(){let t=await this.text();return JSON.parse(t)}async text(){let t=await iv(this);return new TextDecoder().decode(t)}buffer(){return iv(this)}};cn.prototype.buffer=(0,Nn.deprecate)(cn.prototype.buffer,"Please use 'response.arrayBuffer()' instead of 'response.buffer()'","node-fetch#buffer");Object.defineProperties(cn.prototype,{body:{enumerable:!0},bodyUsed:{enumerable:!0},arrayBuffer:{enumerable:!0},blob:{enumerable:!0},json:{enumerable:!0},text:{enumerable:!0},data:{get:(0,Nn.deprecate)(()=>{},"data doesn't exist, use json(), text(), arrayBuffer(), or body instead","https://github.com/node-fetch/node-fetch/issues/1000 (response)")}});a(iv,"consumeBody");ga=a((e,t)=>{let n,o,{body:r}=e[nr];if(e.bodyUsed)throw new Error("cannot clone body after it is used");return r instanceof kr.default&&typeof r.getBoundary!="function"&&(n=new kr.PassThrough({highWaterMark:t}),o=new kr.PassThrough({highWaterMark:t}),r.pipe(n),r.pipe(o),e[nr].stream=n,r=o),r},"clone"),EF=(0,Nn.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"),uf=a((e,t)=>e===null?null:typeof e=="string"?"text/plain;charset=UTF-8":tv(e)?"application/x-www-form-urlencoded;charset=UTF-8":ru(e)?e.type||null:mr.Buffer.isBuffer(e)||Nn.types.isAnyArrayBuffer(e)||ArrayBuffer.isView(e)?null:e instanceof ho?`multipart/form-data; boundary=${t[nr].boundary}`:e&&typeof e.getBoundary=="function"?`multipart/form-data;boundary=${EF(e)}`:e instanceof kr.default?null:"text/plain;charset=UTF-8","extractContentType"),IC=a(e=>{let{body:t}=e[nr];return t===null?0:ru(t)?t.size:mr.Buffer.isBuffer(t)?t.length:t&&typeof t.getLengthSync=="function"&&t.hasKnownLength&&t.hasKnownLength()?t.getLengthSync():null},"getTotalBytes"),RC=a(async(e,{body:t})=>{t===null?e.end():await vF(t,e)},"writeToStream")});function CC(e=[]){return new or(e.reduce((t,n,o,r)=>(o%2===0&&t.push(r.slice(o,o+2)),t),[]).filter(([t,n])=>{try{return df(t),sv(t,String(n)),!0}catch{return!1}}))}var av,ou,df,sv,or,pf=bt(()=>{av=require("node:util"),ou=Rt(require("node:http"),1),df=typeof ou.default.validateHeaderName=="function"?ou.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}},sv=typeof ou.default.validateHeaderValue=="function"?ou.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}},or=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"&&!av.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"||av.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])=>(df(o),sv(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)=>(df(s),sv(s,String(u)),URLSearchParams.prototype[r].call(o,String(s).toLowerCase(),String(u)));case"delete":case"has":case"getAll":return s=>(df(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(or.prototype,["get","entries","forEach","values"].reduce((e,t)=>(e[t]={enumerable:!0},e),{}));a(CC,"fromRawHeaders")});var PF,iu,cv=bt(()=>{PF=new Set([301,302,303,307,308]),iu=a(e=>PF.has(e),"isRedirect")});var Gr,hr,OC=bt(()=>{pf();lf();cv();Gr=Symbol("Response internals"),hr=class e extends cn{static{a(this,"Response")}constructor(t=null,n={}){super(t,n);let o=n.status!=null?n.status:200,r=new or(n.headers);if(t!==null&&!r.has("Content-Type")){let i=uf(t,this);i&&r.append("Content-Type",i)}this[Gr]={type:"default",url:n.url,status:o,statusText:n.statusText||"",headers:r,counter:n.counter,highWaterMark:n.highWaterMark}}get type(){return this[Gr].type}get url(){return this[Gr].url||""}get status(){return this[Gr].status}get ok(){return this[Gr].status>=200&&this[Gr].status<300}get redirected(){return this[Gr].counter>0}get statusText(){return this[Gr].statusText}get headers(){return this[Gr].headers}get highWaterMark(){return this[Gr].highWaterMark}clone(){return new e(ga(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(!iu(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[Gr].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 or(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(hr.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 kC,$C=bt(()=>{kC=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 NC(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 jC(e){if(!DC.has(e))throw new TypeError(`Invalid referrerPolicy: ${e}`);return e}function SF(e){if(/^(http|ws)s:$/.test(e.protocol))return!0;let t=e.host.replace(/(^\[)|(]$)/g,""),n=(0,zC.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 ya(e){return/^about:(blank|srcdoc)$/.test(e)||e.protocol==="data:"||/^(blob|filesystem):$/.test(e.protocol)?!0:SF(e)}function MC(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=NC(r),s=NC(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 ya(i)&&!ya(u)?"no-referrer":s.toString();case"strict-origin-when-cross-origin":return i.origin===u.origin?i:ya(i)&&!ya(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 ya(i)&&!ya(u)?"no-referrer":i;default:throw new TypeError(`Invalid referrerPolicy: ${o}`)}}function LC(e){let t=(e.get("referrer-policy")||"").split(/[,\s]+/),n="";for(let o of t)o&&DC.has(o)&&(n=o);return n}var zC,DC,UC,uv=bt(()=>{zC=require("node:net");a(NC,"stripURLForUseAsAReferrer");DC=new Set(["","no-referrer","no-referrer-when-downgrade","same-origin","origin","strict-origin","origin-when-cross-origin","strict-origin-when-cross-origin","unsafe-url"]),UC="strict-origin-when-cross-origin";a(jC,"validateReferrerPolicy");a(SF,"isOriginPotentiallyTrustworthy");a(ya,"isUrlPotentiallyTrustworthy");a(MC,"determineRequestsReferrer");a(LC,"parseReferrerPolicyFromHeader")});var FC,BC,At,au,TF,yo,qC,VC=bt(()=>{FC=require("node:url"),BC=require("node:util");pf();lf();of();$C();uv();At=Symbol("Request internals"),au=a(e=>typeof e=="object"&&typeof e[At]=="object","isRequest"),TF=(0,BC.deprecate)(()=>{},".data is not a valid RequestInit property, use .body instead","https://github.com/node-fetch/node-fetch/issues/1000 (request)"),yo=class e extends cn{static{a(this,"Request")}constructor(t,n={}){let o;if(au(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()),!au(n)&&"data"in n&&TF(),(n.body!=null||au(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:au(t)&&t.body!==null?ga(t):null;super(i,{size:n.size||t.size||0});let s=new or(n.headers||t.headers||{});if(i!==null&&!s.has("Content-Type")){let p=uf(i,this);p&&s.set("Content-Type",p)}let u=au(t)?t.signal:null;if("signal"in n&&(u=n.signal),u!=null&&!pC(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[At]={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[At].method}get url(){return(0,FC.format)(this[At].parsedURL)}get headers(){return this[At].headers}get redirect(){return this[At].redirect}get signal(){return this[At].signal}get referrer(){if(this[At].referrer==="no-referrer")return"";if(this[At].referrer==="client")return"about:client";if(this[At].referrer)return this[At].referrer.toString()}get referrerPolicy(){return this[At].referrerPolicy}set referrerPolicy(t){this[At].referrerPolicy=jC(t)}clone(){return new e(this)}get[Symbol.toStringTag](){return"Request"}};Object.defineProperties(yo.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}});qC=a(e=>{let{parsedURL:t}=e[At],n=new or(e[At].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=IC(e);typeof u=="number"&&!Number.isNaN(u)&&(o=String(u))}o&&n.set("Content-Length",o),e.referrerPolicy===""&&(e.referrerPolicy=UC),e.referrer&&e.referrer!=="no-referrer"?e[At].referrer=MC(e):e[At].referrer="no-referrer",e[At].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=kC(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 su,HC=bt(()=>{rf();su=class extends $n{static{a(this,"AbortError")}constructor(t,n="aborted"){super(t,n)}}});var WC={};Jt(WC,{AbortError:()=>su,Blob:()=>Zr,FetchError:()=>Ht,File:()=>mo,FormData:()=>ho,Headers:()=>or,Request:()=>yo,Response:()=>hr,blobFrom:()=>vC,blobFromSync:()=>bC,default:()=>lv,fileFrom:()=>EC,fileFromSync:()=>PC,isRedirect:()=>iu});async function lv(e,t){return new Promise((n,o)=>{let r=new yo(e,t),{parsedURL:i,options:s}=qC(r);if(!xF.has(i.protocol))throw new TypeError(`node-fetch cannot load ${e}. URL scheme "${i.protocol.replace(/:$/,"")}" is not supported.`);if(i.protocol==="data:"){let _=rC(r.url),P=new hr(_,{headers:{"Content-Type":_.typeFull}});n(P);return}let u=(i.protocol==="https:"?GC.default:ZC.default).request,{signal:d}=r,p=null,f=a(()=>{let _=new su("The operation was aborted.");o(_),r.body&&r.body instanceof gr.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 Ht(`request to ${r.url} failed, reason: ${_.message}`,"system",_)),h()}),AF(y,_=>{p&&p.body&&p.body.destroy(_)}),process.version<"v14"&&y.on("socket",_=>{let P;_.prependListener("end",()=>{P=_._eventsCount}),_.prependListener("close",S=>{if(p&&P<_._eventsCount&&!S){let T=new Error("Premature close");T.code="ERR_STREAM_PREMATURE_CLOSE",p.body.emit("error",T)}})}),y.on("response",_=>{y.setTimeout(0);let P=CC(_.rawHeaders);if(iu(_.statusCode)){let W=P.get("Location"),H=null;try{H=W===null?null:new URL(W,r.url)}catch{if(r.redirect!=="manual"){o(new Ht(`uri requested responds with an invalid redirect URL: ${W}`,"invalid-redirect")),h();return}}switch(r.redirect){case"error":o(new Ht(`uri requested responds with a redirect, redirect mode is set to error: ${r.url}`,"no-redirect")),h();return;case"manual":break;case"follow":{if(H===null)break;if(r.counter>=r.follow){o(new Ht(`maximum redirect reached at: ${r.url}`,"max-redirect")),h();return}let G={headers:new or(r.headers),follow:r.follow,counter:r.counter+1,agent:r.agent,compress:r.compress,method:r.method,body:ga(r),signal:r.signal,size:r.size,referrer:r.referrer,referrerPolicy:r.referrerPolicy};if(!fC(r.url,H)||!mC(r.url,H))for(let ue of["authorization","www-authenticate","cookie","cookie2"])G.headers.delete(ue);if(_.statusCode!==303&&r.body&&t.body instanceof gr.default.Readable){o(new Ht("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 re=LC(P);re&&(G.referrerPolicy=re),n(lv(new yo(H,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 S=(0,gr.pipeline)(_,new gr.PassThrough,W=>{W&&o(W)});process.version<"v12.10"&&_.on("aborted",g);let T={url:r.url,status:_.statusCode,statusText:_.statusMessage,headers:P,size:r.size,counter:r.counter,highWaterMark:r.highWaterMark},R=P.get("Content-Encoding");if(!r.compress||r.method==="HEAD"||R===null||_.statusCode===204||_.statusCode===304){p=new hr(S,T),n(p);return}let V={flush:ni.default.Z_SYNC_FLUSH,finishFlush:ni.default.Z_SYNC_FLUSH};if(R==="gzip"||R==="x-gzip"){S=(0,gr.pipeline)(S,ni.default.createGunzip(V),W=>{W&&o(W)}),p=new hr(S,T),n(p);return}if(R==="deflate"||R==="x-deflate"){let W=(0,gr.pipeline)(_,new gr.PassThrough,H=>{H&&o(H)});W.once("data",H=>{(H[0]&15)===8?S=(0,gr.pipeline)(S,ni.default.createInflate(),G=>{G&&o(G)}):S=(0,gr.pipeline)(S,ni.default.createInflateRaw(),G=>{G&&o(G)}),p=new hr(S,T),n(p)}),W.once("end",()=>{p||(p=new hr(S,T),n(p))});return}if(R==="br"){S=(0,gr.pipeline)(S,ni.default.createBrotliDecompress(),W=>{W&&o(W)}),p=new hr(S,T),n(p);return}p=new hr(S,T),n(p)}),RC(y,r).catch(o)})}function AF(e,t){let n=cu.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=cu.Buffer.compare(p.slice(-5),n)===0,!r&&i&&(r=cu.Buffer.compare(i.slice(-3),n.slice(0,3))===0&&cu.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 ZC,GC,ni,gr,cu,xF,JC=bt(()=>{ZC=Rt(require("node:http"),1),GC=Rt(require("node:https"),1),ni=Rt(require("node:zlib"),1),gr=Rt(require("node:stream"),1),cu=require("node:buffer");nC();lf();OC();pf();VC();ev();HC();cv();tf();of();uv();nv();xF=new Set(["data:","http:","https:"]);a(lv,"fetch");a(AF,"fixResponseChunkedTransferBadEnding")});var QC=B(ba=>{"use strict";var wF=ba&&ba.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},_a;Object.defineProperty(ba,"__esModule",{value:!0});ba.Gaxios=void 0;var IF=wF(Ub()),RF=require("https"),oi=Lb(),CF=CR(),KC=require("stream"),XC=qb(),OF=a(async()=>globalThis.crypto?.randomUUID()||(await import("crypto")).randomUUID(),"randomUUID"),kF=204,ff=class{static{a(this,"Gaxios")}agentCache=new Map;defaults;interceptors;constructor(t){this.defaults=t||{},this.interceptors={request:new XC.GaxiosInterceptorManager,response:new XC.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&&_a.mergeHeaders(i,n.headers),o&&_a.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 _a.#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=oi.GaxiosError.extractAPIErrorFromResponse(n,`Request failed with status code ${n.status}`);throw new oi.GaxiosError(o?.message,t,n,o)}return n}catch(n){let o;n instanceof oi.GaxiosError?o=n:n instanceof Error?o=new oi.GaxiosError(n.message,t,void 0,n):o=new oi.GaxiosError("Unexpected Gaxios Error",t,void 0,n);let{shouldRetry:r,config:i}=await(0,CF.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===kF)return"";if(t.maxContentLength&&n.headers.has("content-length")&&t.maxContentLength<Number.parseInt(n.headers?.get("content-length")||""))throw new oi.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);_a.mergeHeaders(n,t.headers);let o=(0,IF.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 KC.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 OF();n.set("content-type",`multipart/related; boundary=${s}`),o.body=KC.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 _a.#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 RF.Agent({cert:o.cert,key:o.key}),this.agentCache.set(o.key,o.agent)));return typeof o.errorRedactor!="function"&&o.errorRedactor!==!1&&(o.errorRedactor=oi.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(()=>Rt(tC()))).HttpsProxyAgent,this.#i}static async#c(){let t=typeof window<"u"&&!!window;return this.#a||=t?window.fetch:(await Promise.resolve().then(()=>(JC(),WC))).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}};ba.Gaxios=ff;_a=ff});var kt=B(Zt=>{"use strict";var $F=Zt&&Zt.__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]})),NF=Zt&&Zt.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&$F(t,e,n)};Object.defineProperty(Zt,"__esModule",{value:!0});Zt.instance=Zt.Gaxios=Zt.GaxiosError=void 0;Zt.request=DF;var YC=QC();Object.defineProperty(Zt,"Gaxios",{enumerable:!0,get:a(function(){return YC.Gaxios},"get")});var zF=Lb();Object.defineProperty(Zt,"GaxiosError",{enumerable:!0,get:a(function(){return zF.GaxiosError},"get")});NF(qb(),Zt);Zt.instance=new YC.Gaxios;async function DF(e){return Zt.instance.request(e)}a(DF,"request")});var dv=B((eO,mf)=>{(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(H){var G,re,ue,Y=ee.prototype={constructor:ee,toString:null,valueOf:null},Ze=new ee(1),Ce=20,Se=4,Le=-7,Me=21,Ge=-1e7,He=1e7,it=!1,ar=1,Ut=0,li={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:"\xA0",suffix:""},tn="0123456789abcdefghijklmnopqrstuvwxyz",Ma=!0;function ee(v,x){var A,D,O,N,M,C,$,U,z=this;if(!(z instanceof ee))return new ee(v,x);if(x==null){if(v&&v._isBigNumber===!0){z.s=v.s,!v.c||v.e>He?z.c=z.e=null:v.e<Ge?z.c=[z.e=0]:(z.e=v.e,z.c=v.c.slice());return}if((C=typeof v=="number")&&v*0==0){if(z.s=1/v<0?(v=-v,-1):1,v===~~v){for(N=0,M=v;M>=10;M/=10,N++);N>He?z.c=z.e=null:(z.e=N,z.c=[v]);return}U=String(v)}else{if(!n.test(U=String(v)))return ue(z,U,C);z.s=U.charCodeAt(0)==45?(U=U.slice(1),-1):1}(N=U.indexOf("."))>-1&&(U=U.replace(".","")),(M=U.search(/e/i))>0?(N<0&&(N=M),N+=+U.slice(M+1),U=U.substring(0,M)):N<0&&(N=U.length)}else{if(T(x,2,tn.length,"Base"),x==10&&Ma)return z=new ee(v),Mt(z,Ce+z.e+1,Se);if(U=String(v),C=typeof v=="number"){if(v*0!=0)return ue(z,U,C,x);if(z.s=1/v<0?(U=U.slice(1),-1):1,ee.DEBUG&&U.replace(/^0\.0*|\./,"").length>15)throw Error(s+v)}else z.s=U.charCodeAt(0)===45?(U=U.slice(1),-1):1;for(A=tn.slice(0,x),N=M=0,$=U.length;M<$;M++)if(A.indexOf(D=U.charAt(M))<0){if(D=="."){if(M>N){N=$;continue}}else if(!O&&(U==U.toUpperCase()&&(U=U.toLowerCase())||U==U.toLowerCase()&&(U=U.toUpperCase()))){O=!0,M=-1,N=0;continue}return ue(z,String(v),C,x)}C=!1,U=re(U,x,10,z.s),(N=U.indexOf("."))>-1?U=U.replace(".",""):N=U.length}for(M=0;U.charCodeAt(M)===48;M++);for($=U.length;U.charCodeAt(--$)===48;);if(U=U.slice(M,++$)){if($-=M,C&&ee.DEBUG&&$>15&&(v>p||v!==r(v)))throw Error(s+z.s*v);if((N=N-M-1)>He)z.c=z.e=null;else if(N<Ge)z.c=[z.e=0];else{if(z.e=N,z.c=[],M=(N+1)%d,N<0&&(M+=d),M<$){for(M&&z.c.push(+U.slice(0,M)),$-=d;M<$;)z.c.push(+U.slice(M,M+=d));M=d-(U=U.slice(M)).length}else M-=$;for(;M--;U+="0");z.c.push(+U)}}else z.c=[z.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 x,A;if(v!=null)if(typeof v=="object"){if(v.hasOwnProperty(x="DECIMAL_PLACES")&&(A=v[x],T(A,0,y,x),Ce=A),v.hasOwnProperty(x="ROUNDING_MODE")&&(A=v[x],T(A,0,8,x),Se=A),v.hasOwnProperty(x="EXPONENTIAL_AT")&&(A=v[x],A&&A.pop?(T(A[0],-y,0,x),T(A[1],0,y,x),Le=A[0],Me=A[1]):(T(A,-y,y,x),Le=-(Me=A<0?-A:A))),v.hasOwnProperty(x="RANGE"))if(A=v[x],A&&A.pop)T(A[0],-y,-1,x),T(A[1],1,y,x),Ge=A[0],He=A[1];else if(T(A,-y,y,x),A)Ge=-(He=A<0?-A:A);else throw Error(i+x+" cannot be zero: "+A);if(v.hasOwnProperty(x="CRYPTO"))if(A=v[x],A===!!A)if(A)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))it=A;else throw it=!A,Error(i+"crypto unavailable");else it=A;else throw Error(i+x+" not true or false: "+A);if(v.hasOwnProperty(x="MODULO_MODE")&&(A=v[x],T(A,0,9,x),ar=A),v.hasOwnProperty(x="POW_PRECISION")&&(A=v[x],T(A,0,y,x),Ut=A),v.hasOwnProperty(x="FORMAT"))if(A=v[x],typeof A=="object")li=A;else throw Error(i+x+" not an object: "+A);if(v.hasOwnProperty(x="ALPHABET"))if(A=v[x],typeof A=="string"&&!/^.?$|[+\-.\s]|(.).*\1/.test(A))Ma=A.slice(0,10)=="0123456789",tn=A;else throw Error(i+x+" invalid: "+A)}else throw Error(i+"Object expected: "+v);return{DECIMAL_PLACES:Ce,ROUNDING_MODE:Se,EXPONENTIAL_AT:[Le,Me],RANGE:[Ge,He],CRYPTO:it,MODULO_MODE:ar,POW_PRECISION:Ut,FORMAT:li,ALPHABET:tn}},ee.isBigNumber=function(v){if(!v||v._isBigNumber!==!0)return!1;if(!ee.DEBUG)return!0;var x,A,D=v.c,O=v.e,N=v.s;e:if({}.toString.call(D)=="[object Array]"){if((N===1||N===-1)&&O>=-y&&O<=y&&O===r(O)){if(D[0]===0){if(O===0&&D.length===1)return!0;break e}if(x=(O+1)%d,x<1&&(x+=d),String(D[0]).length==x){for(x=0;x<D.length;x++)if(A=D[x],A<0||A>=u||A!==r(A))break e;if(A!==0)return!0}}}else if(D===null&&O===null&&(N===null||N===1||N===-1))return!0;throw Error(i+"Invalid BigNumber: "+v)},ee.maximum=ee.max=function(){return jt(arguments,-1)},ee.minimum=ee.min=function(){return jt(arguments,1)},ee.random=(function(){var v=9007199254740992,x=Math.random()*v&2097151?function(){return r(Math.random()*v)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(A){var D,O,N,M,C,$=0,U=[],z=new ee(Ze);if(A==null?A=Ce:T(A,0,y),M=o(A/d),it)if(crypto.getRandomValues){for(D=crypto.getRandomValues(new Uint32Array(M*=2));$<M;)C=D[$]*131072+(D[$+1]>>>11),C>=9e15?(O=crypto.getRandomValues(new Uint32Array(2)),D[$]=O[0],D[$+1]=O[1]):(U.push(C%1e14),$+=2);$=M/2}else if(crypto.randomBytes){for(D=crypto.randomBytes(M*=7);$<M;)C=(D[$]&31)*281474976710656+D[$+1]*1099511627776+D[$+2]*4294967296+D[$+3]*16777216+(D[$+4]<<16)+(D[$+5]<<8)+D[$+6],C>=9e15?crypto.randomBytes(7).copy(D,$):(U.push(C%1e14),$+=7);$=M/7}else throw it=!1,Error(i+"crypto unavailable");if(!it)for(;$<M;)C=x(),C<9e15&&(U[$++]=C%1e14);for(M=U[--$],A%=d,M&&A&&(C=f[d-A],U[$]=r(M/C)*C);U[$]===0;U.pop(),$--);if($<0)U=[N=0];else{for(N=-1;U[0]===0;U.splice(0,1),N-=d);for($=1,C=U[0];C>=10;C/=10,$++);$<d&&(N-=d-$)}return z.e=N,z.c=U,z}})(),ee.sum=function(){for(var v=1,x=arguments,A=new ee(x[0]);v<x.length;)A=A.plus(x[v++]);return A},re=(function(){var v="0123456789";function x(A,D,O,N){for(var M,C=[0],$,U=0,z=A.length;U<z;){for($=C.length;$--;C[$]*=D);for(C[0]+=N.indexOf(A.charAt(U++)),M=0;M<C.length;M++)C[M]>O-1&&(C[M+1]==null&&(C[M+1]=0),C[M+1]+=C[M]/O|0,C[M]%=O)}return C.reverse()}return a(x,"toBaseOut"),function(A,D,O,N,M){var C,$,U,z,Z,ae,ce,De,rt=A.indexOf("."),nt=Ce,Ne=Se;for(rt>=0&&(z=Ut,Ut=0,A=A.replace(".",""),De=new ee(D),ae=De.pow(A.length-rt),Ut=z,De.c=x(W(P(ae.c),ae.e,"0"),10,O,v),De.e=De.c.length),ce=x(A,D,O,M?(C=tn,v):(C=v,tn)),U=z=ce.length;ce[--z]==0;ce.pop());if(!ce[0])return C.charAt(0);if(rt<0?--U:(ae.c=ce,ae.e=U,ae.s=N,ae=G(ae,De,nt,Ne,O),ce=ae.c,Z=ae.r,U=ae.e),$=U+nt+1,rt=ce[$],z=O/2,Z=Z||$<0||ce[$+1]!=null,Z=Ne<4?(rt!=null||Z)&&(Ne==0||Ne==(ae.s<0?3:2)):rt>z||rt==z&&(Ne==4||Z||Ne==6&&ce[$-1]&1||Ne==(ae.s<0?8:7)),$<1||!ce[0])A=Z?W(C.charAt(1),-nt,C.charAt(0)):C.charAt(0);else{if(ce.length=$,Z)for(--O;++ce[--$]>O;)ce[$]=0,$||(++U,ce=[1].concat(ce));for(z=ce.length;!ce[--z];);for(rt=0,A="";rt<=z;A+=C.charAt(ce[rt++]));A=W(A,U,C.charAt(0))}return A}})(),G=(function(){function v(D,O,N){var M,C,$,U,z=0,Z=D.length,ae=O%g,ce=O/g|0;for(D=D.slice();Z--;)$=D[Z]%g,U=D[Z]/g|0,M=ce*$+U*ae,C=ae*$+M%g*g+z,z=(C/N|0)+(M/g|0)+ce*U,D[Z]=C%N;return z&&(D=[z].concat(D)),D}a(v,"multiply");function x(D,O,N,M){var C,$;if(N!=M)$=N>M?1:-1;else for(C=$=0;C<N;C++)if(D[C]!=O[C]){$=D[C]>O[C]?1:-1;break}return $}a(x,"compare");function A(D,O,N,M){for(var C=0;N--;)D[N]-=C,C=D[N]<O[N]?1:0,D[N]=C*M+D[N]-O[N];for(;!D[0]&&D.length>1;D.splice(0,1));}return a(A,"subtract"),function(D,O,N,M,C){var $,U,z,Z,ae,ce,De,rt,nt,Ne,Be,gt,di,pi,fi,sr,yn,$t=D.s==O.s?1:-1,yt=D.c,We=O.c;if(!yt||!yt[0]||!We||!We[0])return new ee(!D.s||!O.s||(yt?We&&yt[0]==We[0]:!We)?NaN:yt&&yt[0]==0||!We?$t*0:$t/0);for(rt=new ee($t),nt=rt.c=[],U=D.e-O.e,$t=N+U+1,C||(C=u,U=_(D.e/d)-_(O.e/d),$t=$t/d|0),z=0;We[z]==(yt[z]||0);z++);if(We[z]>(yt[z]||0)&&U--,$t<0)nt.push(1),Z=!0;else{for(pi=yt.length,sr=We.length,z=0,$t+=2,ae=r(C/(We[0]+1)),ae>1&&(We=v(We,ae,C),yt=v(yt,ae,C),sr=We.length,pi=yt.length),di=sr,Ne=yt.slice(0,sr),Be=Ne.length;Be<sr;Ne[Be++]=0);yn=We.slice(),yn=[0].concat(yn),fi=We[0],We[1]>=C/2&&fi++;do{if(ae=0,$=x(We,Ne,sr,Be),$<0){if(gt=Ne[0],sr!=Be&&(gt=gt*C+(Ne[1]||0)),ae=r(gt/fi),ae>1)for(ae>=C&&(ae=C-1),ce=v(We,ae,C),De=ce.length,Be=Ne.length;x(ce,Ne,De,Be)==1;)ae--,A(ce,sr<De?yn:We,De,C),De=ce.length,$=1;else ae==0&&($=ae=1),ce=We.slice(),De=ce.length;if(De<Be&&(ce=[0].concat(ce)),A(Ne,ce,Be,C),Be=Ne.length,$==-1)for(;x(We,Ne,sr,Be)<1;)ae++,A(Ne,sr<Be?yn:We,Be,C),Be=Ne.length}else $===0&&(ae++,Ne=[0]);nt[z++]=ae,Ne[0]?Ne[Be++]=yt[di]||0:(Ne=[yt[di]],Be=1)}while((di++<pi||Ne[0]!=null)&&$t--);Z=Ne[0]!=null,nt[0]||nt.splice(0,1)}if(C==u){for(z=1,$t=nt[0];$t>=10;$t/=10,z++);Mt(rt,N+(rt.e=z+U*d-1)+1,M,Z)}else rt.e=U,rt.r=+Z;return rt}})();function Gt(v,x,A,D){var O,N,M,C,$;if(A==null?A=Se:T(A,0,8),!v.c)return v.toString();if(O=v.c[0],M=v.e,x==null)$=P(v.c),$=D==1||D==2&&(M<=Le||M>=Me)?V($,M):W($,M,"0");else if(v=Mt(new ee(v),x,A),N=v.e,$=P(v.c),C=$.length,D==1||D==2&&(x<=N||N<=Le)){for(;C<x;$+="0",C++);$=V($,N)}else if(x-=M+(D===2&&N>M),$=W($,N,"0"),N+1>C){if(--x>0)for($+=".";x--;$+="0");}else if(x+=N-C,x>0)for(N+1==C&&($+=".");x--;$+="0");return v.s<0&&O?"-"+$:$}a(Gt,"format");function jt(v,x){for(var A,D,O=1,N=new ee(v[0]);O<v.length;O++)D=new ee(v[O]),(!D.s||(A=S(N,D))===x||A===0&&N.s===x)&&(N=D);return N}a(jt,"maxOrMin");function La(v,x,A){for(var D=1,O=x.length;!x[--O];x.pop());for(O=x[0];O>=10;O/=10,D++);return(A=D+A*d-1)>He?v.c=v.e=null:A<Ge?v.c=[v.e=0]:(v.e=A,v.c=x),v}a(La,"normalise"),ue=(function(){var v=/^(-?)0([xbo])(?=\w[\w.]*$)/i,x=/^([^.]+)\.$/,A=/^\.([^.]+)$/,D=/^-?(Infinity|NaN)$/,O=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(N,M,C,$){var U,z=C?M:M.replace(O,"");if(D.test(z))N.s=isNaN(z)?null:z<0?-1:1;else{if(!C&&(z=z.replace(v,function(Z,ae,ce){return U=(ce=ce.toLowerCase())=="x"?16:ce=="b"?2:8,!$||$==U?ae:Z}),$&&(U=$,z=z.replace(x,"$1").replace(A,"0.$1")),M!=z))return new ee(z,U);if(ee.DEBUG)throw Error(i+"Not a"+($?" base "+$:"")+" number: "+M);N.s=null}N.c=N.e=null}})();function Mt(v,x,A,D){var O,N,M,C,$,U,z,Z=v.c,ae=f;if(Z){e:{for(O=1,C=Z[0];C>=10;C/=10,O++);if(N=x-O,N<0)N+=d,M=x,$=Z[U=0],z=r($/ae[O-M-1]%10);else if(U=o((N+1)/d),U>=Z.length)if(D){for(;Z.length<=U;Z.push(0));$=z=0,O=1,N%=d,M=N-d+1}else break e;else{for($=C=Z[U],O=1;C>=10;C/=10,O++);N%=d,M=N-d+O,z=M<0?0:r($/ae[O-M-1]%10)}if(D=D||x<0||Z[U+1]!=null||(M<0?$:$%ae[O-M-1]),D=A<4?(z||D)&&(A==0||A==(v.s<0?3:2)):z>5||z==5&&(A==4||D||A==6&&(N>0?M>0?$/ae[O-M]:0:Z[U-1])%10&1||A==(v.s<0?8:7)),x<1||!Z[0])return Z.length=0,D?(x-=v.e+1,Z[0]=ae[(d-x%d)%d],v.e=-x||0):Z[0]=v.e=0,v;if(N==0?(Z.length=U,C=1,U--):(Z.length=U+1,C=ae[d-N],Z[U]=M>0?r($/ae[O-M]%ae[M])*C:0),D)for(;;)if(U==0){for(N=1,M=Z[0];M>=10;M/=10,N++);for(M=Z[0]+=C,C=1;M>=10;M/=10,C++);N!=C&&(v.e++,Z[0]==u&&(Z[0]=1));break}else{if(Z[U]+=C,Z[U]!=u)break;Z[U--]=0,C=1}for(N=Z.length;Z[--N]===0;Z.pop());}v.e>He?v.c=v.e=null:v.e<Ge&&(v.c=[v.e=0])}return v}a(Mt,"round");function ht(v){var x,A=v.e;return A===null?v.toString():(x=P(v.c),x=A<=Le||A>=Me?V(x,A):W(x,A,"0"),v.s<0?"-"+x:x)}return a(ht,"valueOf"),Y.absoluteValue=Y.abs=function(){var v=new ee(this);return v.s<0&&(v.s=1),v},Y.comparedTo=function(v,x){return S(this,new ee(v,x))},Y.decimalPlaces=Y.dp=function(v,x){var A,D,O,N=this;if(v!=null)return T(v,0,y),x==null?x=Se:T(x,0,8),Mt(new ee(N),v+N.e+1,x);if(!(A=N.c))return null;if(D=((O=A.length-1)-_(this.e/d))*d,O=A[O])for(;O%10==0;O/=10,D--);return D<0&&(D=0),D},Y.dividedBy=Y.div=function(v,x){return G(this,new ee(v,x),Ce,Se)},Y.dividedToIntegerBy=Y.idiv=function(v,x){return G(this,new ee(v,x),0,1)},Y.exponentiatedBy=Y.pow=function(v,x){var A,D,O,N,M,C,$,U,z,Z=this;if(v=new ee(v),v.c&&!v.isInteger())throw Error(i+"Exponent not an integer: "+ht(v));if(x!=null&&(x=new ee(x)),C=v.e>14,!Z.c||!Z.c[0]||Z.c[0]==1&&!Z.e&&Z.c.length==1||!v.c||!v.c[0])return z=new ee(Math.pow(+ht(Z),C?v.s*(2-R(v)):+ht(v))),x?z.mod(x):z;if($=v.s<0,x){if(x.c?!x.c[0]:!x.s)return new ee(NaN);D=!$&&Z.isInteger()&&x.isInteger(),D&&(Z=Z.mod(x))}else{if(v.e>9&&(Z.e>0||Z.e<-1||(Z.e==0?Z.c[0]>1||C&&Z.c[1]>=24e7:Z.c[0]<8e13||C&&Z.c[0]<=9999975e7)))return N=Z.s<0&&R(v)?-0:0,Z.e>-1&&(N=1/N),new ee($?1/N:N);Ut&&(N=o(Ut/d+2))}for(C?(A=new ee(.5),$&&(v.s=1),U=R(v)):(O=Math.abs(+ht(v)),U=O%2),z=new ee(Ze);;){if(U){if(z=z.times(Z),!z.c)break;N?z.c.length>N&&(z.c.length=N):D&&(z=z.mod(x))}if(O){if(O=r(O/2),O===0)break;U=O%2}else if(v=v.times(A),Mt(v,v.e+1,1),v.e>14)U=R(v);else{if(O=+ht(v),O===0)break;U=O%2}Z=Z.times(Z),N?Z.c&&Z.c.length>N&&(Z.c.length=N):D&&(Z=Z.mod(x))}return D?z:($&&(z=Ze.div(z)),x?z.mod(x):N?Mt(z,Ut,Se,M):z)},Y.integerValue=function(v){var x=new ee(this);return v==null?v=Se:T(v,0,8),Mt(x,x.e+1,v)},Y.isEqualTo=Y.eq=function(v,x){return S(this,new ee(v,x))===0},Y.isFinite=function(){return!!this.c},Y.isGreaterThan=Y.gt=function(v,x){return S(this,new ee(v,x))>0},Y.isGreaterThanOrEqualTo=Y.gte=function(v,x){return(x=S(this,new ee(v,x)))===1||x===0},Y.isInteger=function(){return!!this.c&&_(this.e/d)>this.c.length-2},Y.isLessThan=Y.lt=function(v,x){return S(this,new ee(v,x))<0},Y.isLessThanOrEqualTo=Y.lte=function(v,x){return(x=S(this,new ee(v,x)))===-1||x===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,x){var A,D,O,N,M=this,C=M.s;if(v=new ee(v,x),x=v.s,!C||!x)return new ee(NaN);if(C!=x)return v.s=-x,M.plus(v);var $=M.e/d,U=v.e/d,z=M.c,Z=v.c;if(!$||!U){if(!z||!Z)return z?(v.s=-x,v):new ee(Z?M:NaN);if(!z[0]||!Z[0])return Z[0]?(v.s=-x,v):new ee(z[0]?M:Se==3?-0:0)}if($=_($),U=_(U),z=z.slice(),C=$-U){for((N=C<0)?(C=-C,O=z):(U=$,O=Z),O.reverse(),x=C;x--;O.push(0));O.reverse()}else for(D=(N=(C=z.length)<(x=Z.length))?C:x,C=x=0;x<D;x++)if(z[x]!=Z[x]){N=z[x]<Z[x];break}if(N&&(O=z,z=Z,Z=O,v.s=-v.s),x=(D=Z.length)-(A=z.length),x>0)for(;x--;z[A++]=0);for(x=u-1;D>C;){if(z[--D]<Z[D]){for(A=D;A&&!z[--A];z[A]=x);--z[A],z[D]+=u}z[D]-=Z[D]}for(;z[0]==0;z.splice(0,1),--U);return z[0]?La(v,z,U):(v.s=Se==3?-1:1,v.c=[v.e=0],v)},Y.modulo=Y.mod=function(v,x){var A,D,O=this;return v=new ee(v,x),!O.c||!v.s||v.c&&!v.c[0]?new ee(NaN):!v.c||O.c&&!O.c[0]?new ee(O):(ar==9?(D=v.s,v.s=1,A=G(O,v,0,3),v.s=D,A.s*=D):A=G(O,v,0,ar),v=O.minus(A.times(v)),!v.c[0]&&ar==1&&(v.s=O.s),v)},Y.multipliedBy=Y.times=function(v,x){var A,D,O,N,M,C,$,U,z,Z,ae,ce,De,rt,nt,Ne=this,Be=Ne.c,gt=(v=new ee(v,x)).c;if(!Be||!gt||!Be[0]||!gt[0])return!Ne.s||!v.s||Be&&!Be[0]&&!gt||gt&&!gt[0]&&!Be?v.c=v.e=v.s=null:(v.s*=Ne.s,!Be||!gt?v.c=v.e=null:(v.c=[0],v.e=0)),v;for(D=_(Ne.e/d)+_(v.e/d),v.s*=Ne.s,$=Be.length,Z=gt.length,$<Z&&(De=Be,Be=gt,gt=De,O=$,$=Z,Z=O),O=$+Z,De=[];O--;De.push(0));for(rt=u,nt=g,O=Z;--O>=0;){for(A=0,ae=gt[O]%nt,ce=gt[O]/nt|0,M=$,N=O+M;N>O;)U=Be[--M]%nt,z=Be[M]/nt|0,C=ce*U+z*ae,U=ae*U+C%nt*nt+De[N]+A,A=(U/rt|0)+(C/nt|0)+ce*z,De[N--]=U%rt;De[N]=A}return A?++D:De.splice(0,1),La(v,De,D)},Y.negated=function(){var v=new ee(this);return v.s=-v.s||null,v},Y.plus=function(v,x){var A,D=this,O=D.s;if(v=new ee(v,x),x=v.s,!O||!x)return new ee(NaN);if(O!=x)return v.s=-x,D.minus(v);var N=D.e/d,M=v.e/d,C=D.c,$=v.c;if(!N||!M){if(!C||!$)return new ee(O/0);if(!C[0]||!$[0])return $[0]?v:new ee(C[0]?D:O*0)}if(N=_(N),M=_(M),C=C.slice(),O=N-M){for(O>0?(M=N,A=$):(O=-O,A=C),A.reverse();O--;A.push(0));A.reverse()}for(O=C.length,x=$.length,O-x<0&&(A=$,$=C,C=A,x=O),O=0;x;)O=(C[--x]=C[x]+$[x]+O)/u|0,C[x]=u===C[x]?0:C[x]%u;return O&&(C=[O].concat(C),++M),La(v,C,M)},Y.precision=Y.sd=function(v,x){var A,D,O,N=this;if(v!=null&&v!==!!v)return T(v,1,y),x==null?x=Se:T(x,0,8),Mt(new ee(N),v,x);if(!(A=N.c))return null;if(O=A.length-1,D=O*d+1,O=A[O]){for(;O%10==0;O/=10,D--);for(O=A[0];O>=10;O/=10,D++);}return v&&N.e+1>D&&(D=N.e+1),D},Y.shiftedBy=function(v){return T(v,-p,p),this.times("1e"+v)},Y.squareRoot=Y.sqrt=function(){var v,x,A,D,O,N=this,M=N.c,C=N.s,$=N.e,U=Ce+4,z=new ee("0.5");if(C!==1||!M||!M[0])return new ee(!C||C<0&&(!M||M[0])?NaN:M?N:1/0);if(C=Math.sqrt(+ht(N)),C==0||C==1/0?(x=P(M),(x.length+$)%2==0&&(x+="0"),C=Math.sqrt(+x),$=_(($+1)/2)-($<0||$%2),C==1/0?x="5e"+$:(x=C.toExponential(),x=x.slice(0,x.indexOf("e")+1)+$),A=new ee(x)):A=new ee(C+""),A.c[0]){for($=A.e,C=$+U,C<3&&(C=0);;)if(O=A,A=z.times(O.plus(G(N,O,U,1))),P(O.c).slice(0,C)===(x=P(A.c)).slice(0,C))if(A.e<$&&--C,x=x.slice(C-3,C+1),x=="9999"||!D&&x=="4999"){if(!D&&(Mt(O,O.e+Ce+2,0),O.times(O).eq(N))){A=O;break}U+=4,C+=4,D=1}else{(!+x||!+x.slice(1)&&x.charAt(0)=="5")&&(Mt(A,A.e+Ce+2,1),v=!A.times(A).eq(N));break}}return Mt(A,A.e+Ce+1,Se,v)},Y.toExponential=function(v,x){return v!=null&&(T(v,0,y),v++),Gt(this,v,x,1)},Y.toFixed=function(v,x){return v!=null&&(T(v,0,y),v=v+this.e+1),Gt(this,v,x)},Y.toFormat=function(v,x,A){var D,O=this;if(A==null)v!=null&&x&&typeof x=="object"?(A=x,x=null):v&&typeof v=="object"?(A=v,v=x=null):A=li;else if(typeof A!="object")throw Error(i+"Argument not an object: "+A);if(D=O.toFixed(v,x),O.c){var N,M=D.split("."),C=+A.groupSize,$=+A.secondaryGroupSize,U=A.groupSeparator||"",z=M[0],Z=M[1],ae=O.s<0,ce=ae?z.slice(1):z,De=ce.length;if($&&(N=C,C=$,$=N,De-=N),C>0&&De>0){for(N=De%C||C,z=ce.substr(0,N);N<De;N+=C)z+=U+ce.substr(N,C);$>0&&(z+=U+ce.slice(N)),ae&&(z="-"+z)}D=Z?z+(A.decimalSeparator||"")+(($=+A.fractionGroupSize)?Z.replace(new RegExp("\\d{"+$+"}\\B","g"),"$&"+(A.fractionGroupSeparator||"")):Z):z}return(A.prefix||"")+D+(A.suffix||"")},Y.toFraction=function(v){var x,A,D,O,N,M,C,$,U,z,Z,ae,ce=this,De=ce.c;if(v!=null&&(C=new ee(v),!C.isInteger()&&(C.c||C.s!==1)||C.lt(Ze)))throw Error(i+"Argument "+(C.isInteger()?"out of range: ":"not an integer: ")+ht(C));if(!De)return new ee(ce);for(x=new ee(Ze),U=A=new ee(Ze),D=$=new ee(Ze),ae=P(De),N=x.e=ae.length-ce.e-1,x.c[0]=f[(M=N%d)<0?d+M:M],v=!v||C.comparedTo(x)>0?N>0?x:U:C,M=He,He=1/0,C=new ee(ae),$.c[0]=0;z=G(C,x,0,1),O=A.plus(z.times(D)),O.comparedTo(v)!=1;)A=D,D=O,U=$.plus(z.times(O=U)),$=O,x=C.minus(z.times(O=x)),C=O;return O=G(v.minus(A),D,0,1),$=$.plus(O.times(U)),A=A.plus(O.times(D)),$.s=U.s=ce.s,N=N*2,Z=G(U,D,N,Se).minus(ce).abs().comparedTo(G($,A,N,Se).minus(ce).abs())<1?[U,D]:[$,A],He=M,Z},Y.toNumber=function(){return+ht(this)},Y.toPrecision=function(v,x){return v!=null&&T(v,1,y),Gt(this,v,x,2)},Y.toString=function(v){var x,A=this,D=A.s,O=A.e;return O===null?D?(x="Infinity",D<0&&(x="-"+x)):x="NaN":(v==null?x=O<=Le||O>=Me?V(P(A.c),O):W(P(A.c),O,"0"):v===10&&Ma?(A=Mt(new ee(A),Ce+O+1,Se),x=W(P(A.c),A.e,"0")):(T(v,2,tn.length,"Base"),x=re(W(P(A.c),O,"0"),10,v,D,!0)),D<0&&A.c[0]&&(x="-"+x)),x},Y.valueOf=Y.toJSON=function(){return ht(this)},Y._isBigNumber=!0,H!=null&&ee.set(H),ee}a(h,"clone");function _(H){var G=H|0;return H>0||H===G?G:G-1}a(_,"bitFloor");function P(H){for(var G,re,ue=1,Y=H.length,Ze=H[0]+"";ue<Y;){for(G=H[ue++]+"",re=d-G.length;re--;G="0"+G);Ze+=G}for(Y=Ze.length;Ze.charCodeAt(--Y)===48;);return Ze.slice(0,Y+1||1)}a(P,"coeffToString");function S(H,G){var re,ue,Y=H.c,Ze=G.c,Ce=H.s,Se=G.s,Le=H.e,Me=G.e;if(!Ce||!Se)return null;if(re=Y&&!Y[0],ue=Ze&&!Ze[0],re||ue)return re?ue?0:-Se:Ce;if(Ce!=Se)return Ce;if(re=Ce<0,ue=Le==Me,!Y||!Ze)return ue?0:!Y^re?1:-1;if(!ue)return Le>Me^re?1:-1;for(Se=(Le=Y.length)<(Me=Ze.length)?Le:Me,Ce=0;Ce<Se;Ce++)if(Y[Ce]!=Ze[Ce])return Y[Ce]>Ze[Ce]^re?1:-1;return Le==Me?0:Le>Me^re?1:-1}a(S,"compare");function T(H,G,re,ue){if(H<G||H>re||H!==r(H))throw Error(i+(ue||"Argument")+(typeof H=="number"?H<G||H>re?" out of range: ":" not an integer: ":" not a primitive number: ")+String(H))}a(T,"intCheck");function R(H){var G=H.c.length-1;return _(H.e/d)==G&&H.c[G]%2!=0}a(R,"isOdd");function V(H,G){return(H.length>1?H.charAt(0)+"."+H.slice(1):H)+(G<0?"e":"e+")+G}a(V,"toExponential");function W(H,G,re){var ue,Y;if(G<0){for(Y=re+".";++G;Y+=re);H=Y+H}else if(ue=H.length,++G>ue){for(Y=re,G-=ue;--G;Y+=re);H+=Y}else G<ue&&(H=H.slice(0,G)+"."+H.slice(G));return H}a(W,"toFixedPoint"),t=h(),t.default=t.BigNumber=t,typeof define=="function"&&define.amd?define(function(){return t}):typeof mf<"u"&&mf.exports?mf.exports=t:(e||(e=typeof self<"u"&&self?self:window),e.BigNumber=t)})(eO)});var oO=B((_ee,nO)=>{var tO=dv(),rO=nO.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,S,T=f[p],R=T!=null&&(T instanceof tO||tO.isBigNumber(T));switch(T&&typeof T=="object"&&typeof T.toJSON=="function"&&(T=T.toJSON(p)),typeof s=="function"&&(T=s.call(f,p,T)),typeof T){case"string":return R?T:u(T);case"number":return isFinite(T)?String(T):"null";case"boolean":case"null":case"bigint":return String(T);case"object":if(!T)return"null";if(o+=r,S=[],Object.prototype.toString.apply(T)==="[object Array]"){for(_=T.length,g=0;g<_;g+=1)S[g]=d(g,T)||"null";return h=S.length===0?"[]":o?`[
32
+ `+o+S.join(`,
33
+ `+o)+`
34
+ `+P+"]":"["+S.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,T),h&&S.push(u(y)+(o?": ":":")+h));else Object.keys(T).forEach(function(V){var W=d(V,T);W&&S.push(u(V)+(o?": ":":")+W)});return h=S.length===0?"{}":o?`{
35
+ `+o+S.join(`,
36
+ `+o)+`
37
+ `+P+"}":"{"+S.join(",")+"}",o=P,h}}a(d,"str"),typeof rO.stringify!="function"&&(rO.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 aO=B((vee,iO)=>{var hf=null,UF=/(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])/,jF=/(?: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)/,MF=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,S="";for(o==="-"&&(S="-",u("-"));o>="0"&&o<="9";)S+=o,u();if(o===".")for(S+=".";u()&&o>="0"&&o<="9";)S+=o;if(o==="e"||o==="E")for(S+=o,u(),(o==="-"||o==="+")&&(S+=o,u());o>="0"&&o<="9";)S+=o,u();if(P=+S,!isFinite(P))s("Bad number");else return hf==null&&(hf=dv()),S.length>15?t.storeAsString?S:t.useNativeBigInt?BigInt(S):new hf(S):t.alwaysParseAsBig?t.useNativeBigInt?BigInt(P):new hf(P):P},"number"),p=a(function(){var P,S,T="",R;if(o==='"')for(var V=n;u();){if(o==='"')return n-1>V&&(T+=i.substring(V,n-1)),u(),T;if(o==="\\"){if(n-1>V&&(T+=i.substring(V,n-1)),u(),o==="u"){for(R=0,S=0;S<4&&(P=parseInt(u(),16),!!isFinite(P));S+=1)R=R*16+P;T+=String.fromCharCode(R)}else if(typeof r[o]=="string")T+=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,S=Object.create(null);if(o==="{"){if(u("{"),f(),o==="}")return u("}"),S;for(;o;){if(P=p(),f(),u(":"),t.strict===!0&&Object.hasOwnProperty.call(S,P)&&s('Duplicate key "'+P+'"'),UF.test(P)===!0?t.protoAction==="error"?s("Object contains forbidden prototype property"):t.protoAction==="ignore"?y():S[P]=y():jF.test(P)===!0?t.constructorAction==="error"?s("Object contains forbidden constructor property"):t.constructorAction==="ignore"?y():S[P]=y():S[P]=y(),f(),o==="}")return u("}"),S;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,S){var T;return i=P+"",n=0,o=" ",T=y(),f(),o&&s("Syntax error"),typeof S=="function"?a((function R(V,W){var H,G,re=V[W];return re&&typeof re=="object"&&Object.keys(re).forEach(function(ue){G=R(re,ue),G!==void 0?re[ue]=G:delete re[ue]}),S.call(V,W,re)}),"walk")({"":T},""):T}},"json_parse");iO.exports=MF});var uO=B((Pee,gf)=>{var sO=oO().stringify,cO=aO();gf.exports=function(e){return{parse:cO(e),stringify:sO}};gf.exports.parse=cO();gf.exports.stringify=sO});var pv=B(Wr=>{"use strict";Object.defineProperty(Wr,"__esModule",{value:!0});Wr.GCE_LINUX_BIOS_PATHS=void 0;Wr.isGoogleCloudServerless=pO;Wr.isGoogleComputeEngineLinux=fO;Wr.isGoogleComputeEngineMACAddress=mO;Wr.isGoogleComputeEngine=hO;Wr.detectGCPResidency=FF;var lO=require("fs"),dO=require("os");Wr.GCE_LINUX_BIOS_PATHS={BIOS_DATE:"/sys/class/dmi/id/bios_date",BIOS_VENDOR:"/sys/class/dmi/id/bios_vendor"};var LF=/^42:01/;function pO(){return!!(process.env.CLOUD_RUN_JOB||process.env.FUNCTION_NAME||process.env.K_SERVICE)}a(pO,"isGoogleCloudServerless");function fO(){if((0,dO.platform)()!=="linux")return!1;try{(0,lO.statSync)(Wr.GCE_LINUX_BIOS_PATHS.BIOS_DATE);let e=(0,lO.readFileSync)(Wr.GCE_LINUX_BIOS_PATHS.BIOS_VENDOR,"utf8");return/Google/.test(e)}catch{return!1}}a(fO,"isGoogleComputeEngineLinux");function mO(){let e=(0,dO.networkInterfaces)();for(let t of Object.values(e))if(t){for(let{mac:n}of t)if(LF.test(n))return!0}return!1}a(mO,"isGoogleComputeEngineMACAddress");function hO(){return fO()||mO()}a(hO,"isGoogleComputeEngine");function FF(){return pO()||hO()}a(FF,"detectGCPResidency")});var gO=B(yf=>{"use strict";Object.defineProperty(yf,"__esModule",{value:!0});yf.Colours=void 0;var Dt=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="")}};yf.Colours=Dt;Dt.enabled=!1;Dt.reset="";Dt.bright="";Dt.dim="";Dt.red="";Dt.green="";Dt.yellow="";Dt.blue="";Dt.magenta="";Dt.cyan="";Dt.white="";Dt.grey="";Dt.refresh()});var vO=B(Xe=>{"use strict";var BF=Xe&&Xe.__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]})),qF=Xe&&Xe.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),yO=Xe&&Xe.__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"&&BF(n,t,o[r]);return qF(n,t),n}})();Object.defineProperty(Xe,"__esModule",{value:!0});Xe.env=Xe.DebugLogBackendBase=Xe.placeholder=Xe.AdhocDebugLogger=Xe.LogSeverity=void 0;Xe.getNodeBackend=mv;Xe.getDebugBackend=HF;Xe.getStructuredBackend=ZF;Xe.setBackend=GF;Xe.log=bO;var VF=require("events"),uu=yO(require("process")),_O=yO(require("util")),yr=gO(),Jr;(function(e){e.DEFAULT="DEFAULT",e.DEBUG="DEBUG",e.INFO="INFO",e.WARNING="WARNING",e.ERROR="ERROR"})(Jr||(Xe.LogSeverity=Jr={}));var lu=class extends VF.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(Jr.DEBUG,...o),this.func.info=(...o)=>this.invokeSeverity(Jr.INFO,...o),this.func.warn=(...o)=>this.invokeSeverity(Jr.WARNING,...o),this.func.error=(...o)=>this.invokeSeverity(Jr.ERROR,...o),this.func.sublog=o=>bO(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)}};Xe.AdhocDebugLogger=lu;Xe.placeholder=new lu("",()=>{}).func;var va=class{static{a(this,"DebugLogBackendBase")}constructor(){var t;this.cached=new Map,this.filters=[],this.filtersSet=!1;let n=(t=uu.env[Xe.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)}}};Xe.DebugLogBackendBase=va;var fv=class extends va{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=`${yr.Colours.green}${t}${yr.Colours.reset}`,s=`${yr.Colours.yellow}${uu.pid}${yr.Colours.reset}`,u;switch(n.severity){case Jr.ERROR:u=`${yr.Colours.red}${n.severity}${yr.Colours.reset}`;break;case Jr.INFO:u=`${yr.Colours.magenta}${n.severity}${yr.Colours.reset}`;break;case Jr.WARNING:u=`${yr.Colours.yellow}${n.severity}${yr.Colours.reset}`;break;default:u=(r=n.severity)!==null&&r!==void 0?r:Jr.DEFAULT;break}let d=_O.formatWithOptions({colors:yr.Colours.enabled},...o),p=Object.assign({},n);delete p.severity;let f=Object.getOwnPropertyNames(p).length?JSON.stringify(p):"",g=f?`${yr.Colours.grey}${f}${yr.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 mv(){return new fv}a(mv,"getNodeBackend");var hv=class extends va{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=uu.env.NODE_DEBUG)!==null&&t!==void 0?t:"";uu.env.NODE_DEBUG=`${n}${n?",":""}${this.filters.join(",")}`}};function HF(e){return new hv(e)}a(HF,"getDebugBackend");var gv=class extends va{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:Jr.INFO,d=Object.assign({severity:u,message:_O.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 ZF(e){return new gv(e)}a(ZF,"getStructuredBackend");Xe.env={nodeEnables:"GOOGLE_SDK_NODE_LOGGING"};var yv=new Map,_r;function GF(e){_r=e,yv.clear()}a(GF,"setBackend");function bO(e,t){if(!_r&&!uu.env[Xe.env.nodeEnables]||!e)return Xe.placeholder;t&&(e=`${t.instance.namespace}:${e}`);let n=yv.get(e);if(n)return n.func;if(_r===null)return Xe.placeholder;_r===void 0&&(_r=mv());let o=(()=>{let r;return new lu(e,(s,...u)=>{if(r!==_r){if(_r===null)return;_r===void 0&&(_r=mv()),r=_r}_r?.log(e,s,...u)})})();return yv.set(e,o),o.func}a(bO,"log")});var _v=B(ii=>{"use strict";var WF=ii&&ii.__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]})),JF=ii&&ii.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&WF(t,e,n)};Object.defineProperty(ii,"__esModule",{value:!0});JF(vO(),ii)});var pu=B(me=>{"use strict";var PO=me&&me.__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]})),KF=me&&me.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),XF=me&&me.__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"&&PO(n,t,o[r]);return KF(n,t),n}})(),QF=me&&me.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&PO(t,e,n)};Object.defineProperty(me,"__esModule",{value:!0});me.gcpResidencyCache=me.METADATA_SERVER_DETECTION=me.HEADERS=me.HEADER_VALUE=me.HEADER_NAME=me.SECONDARY_HOST_ADDRESS=me.HOST_ADDRESS=me.BASE_PATH=void 0;me.instance=oB;me.project=iB;me.universe=aB;me.bulk=sB;me.isAvailable=uB;me.resetIsAvailableCache=lB;me.getGCPResidency=Ev;me.setGCPResidency=SO;me.requestTimeout=TO;var bv=kt(),YF=uO(),eB=pv(),tB=XF(_v());me.BASE_PATH="/computeMetadata/v1";me.HOST_ADDRESS="http://169.254.169.254";me.SECONDARY_HOST_ADDRESS="http://metadata.google.internal.";me.HEADER_NAME="Metadata-Flavor";me.HEADER_VALUE="Google";me.HEADERS=Object.freeze({[me.HEADER_NAME]:me.HEADER_VALUE});var EO=tB.log("gcp-metadata");me.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 vv(e){return e||(e=process.env.GCE_METADATA_IP||process.env.GCE_METADATA_HOST||me.HOST_ADDRESS),/^https?:\/\//.test(e)||(e=`http://${e}`),new URL(me.BASE_PATH,e).href}a(vv,"getBaseUrl");function rB(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(rB,"validate");async function du(e,t={},n=3,o=!1){let r=new Headers(me.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}`:(rB(t),t.property&&(i+=`/${t.property}`),new Headers(t.headers).forEach((g,y)=>r.set(y,g)),s=t.params||s);let u=o?nB:bv.request,d={url:`${vv()}/${i}`,headers:r,retryConfig:{noResponseRetries:n},params:s,responseType:"text",timeout:TO()};EO.info("instance request %j",d);let p=await u(d);EO.info("instance metadata is %s",p.data);let f=p.headers.get(me.HEADER_NAME);if(f!==me.HEADER_VALUE)throw new RangeError(`Invalid response from metadata service: incorrect ${me.HEADER_NAME} header. Expected '${me.HEADER_VALUE}', got ${f?`'${f}'`:"no header"}`);if(typeof p.data=="string")try{return YF.parse(p.data)}catch{}return p.data}a(du,"metadataAccessor");async function nB(e){let t={...e,url:e.url?.toString().replace(vv(),vv(me.SECONDARY_HOST_ADDRESS))},n=(0,bv.request)(e),o=(0,bv.request)(t);return Promise.any([n,o])}a(nB,"fastFailMetadataRequest");function oB(e){return du("instance",e)}a(oB,"instance");function iB(e){return du("project",e)}a(iB,"project");function aB(e){return du("universe",e)}a(aB,"universe");async function sB(e){let t={};return await Promise.all(e.map(n=>(async()=>{let o=await du(n),r=n.metadataKey;t[r]=o})())),t}a(sB,"bulk");function cB(){return process.env.DETECT_GCP_RETRIES?Number(process.env.DETECT_GCP_RETRIES):0}a(cB,"detectGCPAvailableRetries");var _f;async function uB(){if(process.env.METADATA_SERVER_DETECTION){let e=process.env.METADATA_SERVER_DETECTION.trim().toLocaleLowerCase();if(!(e in me.METADATA_SERVER_DETECTION))throw new RangeError(`Unknown \`METADATA_SERVER_DETECTION\` env variable. Got \`${e}\`, but it should be \`${Object.keys(me.METADATA_SERVER_DETECTION).join("`, `")}\`, or unset`);switch(e){case"assume-present":return!0;case"none":return!1;case"bios-only":return Ev();case"ping-only":}}try{return _f===void 0&&(_f=du("instance",void 0,cB(),!(process.env.GCE_METADATA_IP||process.env.GCE_METADATA_HOST))),await _f,!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(uB,"isAvailable");function lB(){_f=void 0}a(lB,"resetIsAvailableCache");me.gcpResidencyCache=null;function Ev(){return me.gcpResidencyCache===null&&SO(),me.gcpResidencyCache}a(Ev,"getGCPResidency");function SO(e=null){me.gcpResidencyCache=e!==null?e:(0,eB.detectGCPResidency)()}a(SO,"setGCPResidency");function TO(){return Ev()?0:3e3}a(TO,"requestTimeout");QF(pv(),me)});var wO=B(bf=>{"use strict";bf.byteLength=pB;bf.toByteArray=mB;bf.fromByteArray=yB;var un=[],$r=[],dB=typeof Uint8Array<"u"?Uint8Array:Array,Pv="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(ai=0,xO=Pv.length;ai<xO;++ai)un[ai]=Pv[ai],$r[Pv.charCodeAt(ai)]=ai;var ai,xO;$r[45]=62;$r[95]=63;function AO(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(AO,"getLens");function pB(e){var t=AO(e),n=t[0],o=t[1];return(n+o)*3/4-o}a(pB,"byteLength");function fB(e,t,n){return(t+n)*3/4-n}a(fB,"_byteLength");function mB(e){var t,n=AO(e),o=n[0],r=n[1],i=new dB(fB(e,o,r)),s=0,u=r>0?o-4:o,d;for(d=0;d<u;d+=4)t=$r[e.charCodeAt(d)]<<18|$r[e.charCodeAt(d+1)]<<12|$r[e.charCodeAt(d+2)]<<6|$r[e.charCodeAt(d+3)],i[s++]=t>>16&255,i[s++]=t>>8&255,i[s++]=t&255;return r===2&&(t=$r[e.charCodeAt(d)]<<2|$r[e.charCodeAt(d+1)]>>4,i[s++]=t&255),r===1&&(t=$r[e.charCodeAt(d)]<<10|$r[e.charCodeAt(d+1)]<<4|$r[e.charCodeAt(d+2)]>>2,i[s++]=t>>8&255,i[s++]=t&255),i}a(mB,"toByteArray");function hB(e){return un[e>>18&63]+un[e>>12&63]+un[e>>6&63]+un[e&63]}a(hB,"tripletToBase64");function gB(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(hB(o));return r.join("")}a(gB,"encodeChunk");function yB(e){for(var t,n=e.length,o=n%3,r=[],i=16383,s=0,u=n-o;s<u;s+=i)r.push(gB(e,s,s+i>u?u:s+i));return o===1?(t=e[n-1],r.push(un[t>>2]+un[t<<4&63]+"==")):o===2&&(t=(e[n-2]<<8)+e[n-1],r.push(un[t>>10]+un[t>>4&63]+un[t<<2&63]+"=")),r.join("")}a(yB,"fromByteArray")});var Tv=B(Sv=>{"use strict";Object.defineProperty(Sv,"__esModule",{value:!0});Sv.fromArrayBufferToHex=_B;function _B(e){return Array.from(new Uint8Array(e)).map(n=>n.toString(16).padStart(2,"0")).join("")}a(_B,"fromArrayBufferToHex")});var IO=B(vf=>{"use strict";Object.defineProperty(vf,"__esModule",{value:!0});vf.BrowserCrypto=void 0;var Ea=wO(),bB=Tv(),xv=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 Ea.fromByteArray(new Uint8Array(o))}randomBytesBase64(t){let n=new Uint8Array(t);return window.crypto.getRandomValues(n),Ea.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=Ea.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 Ea.fromByteArray(new Uint8Array(s))}decodeBase64StringUtf8(t){let n=Ea.toByteArray(e.padBase64(t));return new TextDecoder().decode(n)}encodeBase64StringUtf8(t){let n=new TextEncoder().encode(t);return Ea.fromByteArray(n)}async sha256DigestHex(t){let n=new TextEncoder().encode(t),o=await window.crypto.subtle.digest("SHA-256",n);return(0,bB.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))}};vf.BrowserCrypto=xv});var RO=B(Ef=>{"use strict";Object.defineProperty(Ef,"__esModule",{value:!0});Ef.NodeCrypto=void 0;var Pa=require("crypto"),Av=class{static{a(this,"NodeCrypto")}async sha256DigestBase64(t){return Pa.createHash("sha256").update(t).digest("base64")}randomBytesBase64(t){return Pa.randomBytes(t).toString("base64")}async verify(t,n,o){let r=Pa.createVerify("RSA-SHA256");return r.update(n),r.end(),r.verify(t,o,"base64")}async sign(t,n){let o=Pa.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 Pa.createHash("sha256").update(t).digest("hex")}async signWithHmacSha256(t,n){let o=typeof t=="string"?t:EB(t);return vB(Pa.createHmac("sha256",o).update(n).digest())}};Ef.NodeCrypto=Av;function vB(e){return e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)}a(vB,"toArrayBuffer");function EB(e){return Buffer.from(e)}a(EB,"toBuffer")});var fu=B(zn=>{"use strict";var PB=zn&&zn.__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]})),SB=zn&&zn.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&PB(t,e,n)};Object.defineProperty(zn,"__esModule",{value:!0});zn.createCrypto=AB;zn.hasBrowserCrypto=CO;var TB=IO(),xB=RO();SB(Tv(),zn);function AB(){return CO()?new TB.BrowserCrypto:new xB.NodeCrypto}a(AB,"createCrypto");function CO(){return typeof window<"u"&&typeof window.crypto<"u"&&typeof window.crypto.subtle<"u"}a(CO,"hasBrowserCrypto")});var Sa=B((wv,kO)=>{var Pf=require("buffer"),ln=Pf.Buffer;function OO(e,t){for(var n in e)t[n]=e[n]}a(OO,"copyProps");ln.from&&ln.alloc&&ln.allocUnsafe&&ln.allocUnsafeSlow?kO.exports=Pf:(OO(Pf,wv),wv.Buffer=si);function si(e,t,n){return ln(e,t,n)}a(si,"SafeBuffer");si.prototype=Object.create(ln.prototype);OO(ln,si);si.from=function(e,t,n){if(typeof e=="number")throw new TypeError("Argument must not be a number");return ln(e,t,n)};si.alloc=function(e,t,n){if(typeof e!="number")throw new TypeError("Argument must be a number");var o=ln(e);return t!==void 0?typeof n=="string"?o.fill(t,n):o.fill(t):o.fill(0),o};si.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return ln(e)};si.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return Pf.SlowBuffer(e)}});var NO=B((Vee,$O)=>{"use strict";function Iv(e){var t=(e/8|0)+(e%8===0?0:1);return t}a(Iv,"getParamSize");var wB={ES256:Iv(256),ES384:Iv(384),ES512:Iv(521)};function IB(e){var t=wB[e];if(t)return t;throw new Error('Unknown algorithm "'+e+'"')}a(IB,"getParamBytesForAlg");$O.exports=IB});var Rv=B((Zee,LO)=>{"use strict";var Sf=Sa().Buffer,DO=NO(),Tf=128,UO=0,RB=32,CB=16,OB=2,jO=CB|RB|UO<<6,xf=OB|UO<<6;function kB(e){return e.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}a(kB,"base64Url");function MO(e){if(Sf.isBuffer(e))return e;if(typeof e=="string")return Sf.from(e,"base64");throw new TypeError("ECDSA signature must be a Base64 string or a Buffer")}a(MO,"signatureAsBuffer");function $B(e,t){e=MO(e);var n=DO(t),o=n+1,r=e.length,i=0;if(e[i++]!==jO)throw new Error('Could not find expected "seq"');var s=e[i++];if(s===(Tf|1)&&(s=e[i++]),r-i<s)throw new Error('"seq" specified length of "'+s+'", only "'+(r-i)+'" remaining');if(e[i++]!==xf)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++]!==xf)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=Sf.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=kB(h),h}a($B,"derToJose");function zO(e,t,n){for(var o=0;t+o<n&&e[t+o]===0;)++o;var r=e[t+o]>=Tf;return r&&--o,o}a(zO,"countPadding");function NB(e,t){e=MO(e);var n=DO(t),o=e.length;if(o!==n*2)throw new TypeError('"'+t+'" signatures must be "'+n*2+'" bytes, saw "'+o+'"');var r=zO(e,0,n),i=zO(e,n,e.length),s=n-r,u=n-i,d=2+s+1+1+u,p=d<Tf,f=Sf.allocUnsafe((p?2:3)+d),g=0;return f[g++]=jO,p?f[g++]=d:(f[g++]=Tf|1,f[g++]=d&255),f[g++]=xf,f[g++]=s,r<0?(f[g++]=0,g+=e.copy(f,g,0,n)):g+=e.copy(f,g,r,n),f[g++]=xf,f[g++]=u,i<0?(f[g++]=0,e.copy(f,g,n)):e.copy(f,g,n+i),f}a(NB,"joseToDer");LO.exports={derToJose:$B,joseToDer:NB}});var Kr=B(Dn=>{"use strict";Object.defineProperty(Dn,"__esModule",{value:!0});Dn.LRUCache=void 0;Dn.snakeToCamel=BO;Dn.originalOrCamelOptions=jB;Dn.removeUndefinedValuesInObject=MB;Dn.isValidFile=LB;Dn.getWellKnownCertificateConfigFileLocation=FB;var zB=require("fs"),DB=require("os"),Cv=require("path"),UB="certificate_config.json",FO="gcloud";function BO(e){return e.replace(/([_][^_])/g,t=>t.slice(1).toUpperCase())}a(BO,"snakeToCamel");function jB(e){function t(n){let o=e||{};return o[n]??o[BO(n)]}return a(t,"get"),{get:t}}a(jB,"originalOrCamelOptions");var Ov=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()}};Dn.LRUCache=Ov;function MB(e){return Object.entries(e).forEach(([t,n])=>{(n===void 0||n==="undefined")&&delete e[t]}),e}a(MB,"removeUndefinedValuesInObject");async function LB(e){try{return(await zB.promises.lstat(e)).isFile()}catch{return!1}}a(LB,"isValidFile");function FB(){let e=process.env.CLOUDSDK_CONFIG||(BB()?Cv.join(process.env.APPDATA||"",FO):Cv.join(process.env.HOME||"",".config",FO));return Cv.join(e,UB)}a(FB,"getWellKnownCertificateConfigFileLocation");function BB(){return DB.platform().startsWith("win")}a(BB,"_isWindows")});var qO=B((Kee,qB)=>{qB.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 kv=B(_o=>{"use strict";Object.defineProperty(_o,"__esModule",{value:!0});_o.USER_AGENT=_o.PRODUCT_NAME=_o.pkg=void 0;var VO=qO();_o.pkg=VO;var HO="google-api-nodejs-client";_o.PRODUCT_NAME=HO;var VB=`${HO}/${VO.version}`;_o.USER_AGENT=VB});var br=B(Xr=>{"use strict";Object.defineProperty(Xr,"__esModule",{value:!0});Xr.AuthClient=Xr.DEFAULT_EAGER_REFRESH_THRESHOLD_MILLIS=Xr.DEFAULT_UNIVERSE=void 0;var HB=require("events"),$v=kt(),ZB=Kr(),GB=_v(),Nv=kv();Xr.DEFAULT_UNIVERSE="googleapis.com";Xr.DEFAULT_EAGER_REFRESH_THRESHOLD_MILLIS=300*1e3;var zv=class e extends HB.EventEmitter{static{a(this,"AuthClient")}apiKey;projectId;quotaProjectId;transporter;credentials={};eagerRefreshThresholdMillis=Xr.DEFAULT_EAGER_REFRESH_THRESHOLD_MILLIS;forceRefreshOnFailure=!1;universeDomain=Xr.DEFAULT_UNIVERSE;static RequestMethodNameSymbol=Symbol("request method name");static RequestLogIdSymbol=Symbol("request log id");constructor(t={}){super();let n=(0,ZB.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")??Xr.DEFAULT_UNIVERSE,this.transporter=t.transporter??new $v.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&&$v.Gaxios.mergeHeaders(i,n.headers),o&&$v.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,GB.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(`${Nv.PRODUCT_NAME}/`)||t.headers.set("User-Agent",`${n} ${Nv.USER_AGENT}`):t.headers.set("User-Agent",Nv.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"]}}}};Xr.AuthClient=zv});var Uv=B(Af=>{"use strict";Object.defineProperty(Af,"__esModule",{value:!0});Af.LoginTicket=void 0;var Dv=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()}}};Af.LoginTicket=Dv});var ci=B(dn=>{"use strict";Object.defineProperty(dn,"__esModule",{value:!0});dn.OAuth2Client=dn.ClientAuthentication=dn.CertificateFormat=dn.CodeChallengeMethod=void 0;var ZO=kt(),WB=require("querystring"),JB=require("stream"),KB=Rv(),GO=Kr(),jv=fu(),Ta=br(),XB=Uv(),WO;(function(e){e.Plain="plain",e.S256="S256"})(WO||(dn.CodeChallengeMethod=WO={}));var Un;(function(e){e.PEM="PEM",e.JWK="JWK"})(Un||(dn.CertificateFormat=Un={}));var mu;(function(e){e.ClientSecretPost="ClientSecretPost",e.ClientSecretBasic="ClientSecretBasic",e.None="None"})(mu||(dn.ClientAuthentication=mu={}));var Mv=class e extends Ta.AuthClient{static{a(this,"OAuth2Client")}redirectUri;certificateCache={};certificateExpiry=null;certificateCacheFormat=Un.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||mu.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()+"?"+WB.stringify(t)}generateCodeVerifier(){throw new Error("generateCodeVerifier is removed, please use generateCodeVerifierAsync instead.")}async generateCodeVerifierAsync(){let t=(0,jv.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===mu.ClientSecretBasic){let d=Buffer.from(`${this._clientId}:${this._clientSecret}`);o.set("authorization",`Basic ${d.toString("base64")}`)}this.clientAuthentication===mu.ClientSecretPost&&(r.client_secret=this._clientSecret);let i={...e.RETRY_CONFIG,method:"POST",url:n,data:new URLSearchParams((0,GO.removeUndefinedValuesInObject)(r)),headers:o};Ta.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,GO.removeUndefinedValuesInObject)(o))};Ta.AuthClient.setMethodName(s,"refreshTokenNoCache"),r=await this.transporter.request(s)}catch(s){throw s instanceof ZO.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(Ta.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=ZO.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 JB.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,jv.hasBrowserCrypto)()?Un.JWK:Un.PEM;if(this.certificateExpiry&&t<this.certificateExpiry.getTime()&&this.certificateCacheFormat===n)return{certs:this.certificateCache,format:n};let o,r;switch(n){case Un.PEM:r=this.endpoints.oauth2FederatedSignonPemCertsUrl.toString();break;case Un.JWK:r=this.endpoints.oauth2FederatedSignonJwkCertsUrl.toString();break;default:throw new Error(`Unsupported certificate format ${n}`)}try{let p={...e.RETRY_CONFIG,url:r};Ta.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 Un.PEM:u=o.data;break;case Un.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};Ta.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,jv.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=KB.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 S=new Date().getTime()/1e3;if(P>=S+i)throw new Error("Expiration time too far in future: "+JSON.stringify(g));let T=_-e.CLOCK_SKEW_SECS_,R=P+e.CLOCK_SKEW_SECS_;if(S<T)throw new Error("Token used too early, "+S+" < "+T+": "+JSON.stringify(g));if(S>R)throw new Error("Token used too late, "+S+" > "+R+": "+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 XB.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}};dn.OAuth2Client=Mv});var Fv=B(wf=>{"use strict";Object.defineProperty(wf,"__esModule",{value:!0});wf.Compute=void 0;var QB=kt(),JO=pu(),YB=ci(),Lv=class extends YB.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 JO.instance(r)}catch(r){throw r instanceof QB.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 JO.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))}};wf.Compute=Lv});var qv=B(If=>{"use strict";Object.defineProperty(If,"__esModule",{value:!0});If.IdTokenClient=void 0;var e4=ci(),Bv=class extends e4.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}};If.IdTokenClient=Bv});var Vv=B(xa=>{"use strict";Object.defineProperty(xa,"__esModule",{value:!0});xa.GCPEnv=void 0;xa.clear=t4;xa.getEnv=r4;var KO=pu(),pn;(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"})(pn||(xa.GCPEnv=pn={}));var hu;function t4(){hu=void 0}a(t4,"clear");async function r4(){return hu||(hu=n4(),hu)}a(r4,"getEnv");async function n4(){let e=pn.NONE;return o4()?e=pn.APP_ENGINE:i4()?e=pn.CLOUD_FUNCTIONS:await u4()?await c4()?e=pn.KUBERNETES_ENGINE:a4()?e=pn.CLOUD_RUN:s4()?e=pn.CLOUD_RUN_JOBS:e=pn.COMPUTE_ENGINE:e=pn.NONE,e}a(n4,"getEnvMemoized");function o4(){return!!(process.env.GAE_SERVICE||process.env.GAE_MODULE_NAME)}a(o4,"isAppEngine");function i4(){return!!(process.env.FUNCTION_NAME||process.env.FUNCTION_TARGET)}a(i4,"isCloudFunction");function a4(){return!!process.env.K_CONFIGURATION}a(a4,"isCloudRun");function s4(){return!!process.env.CLOUD_RUN_JOB}a(s4,"isCloudRunJob");async function c4(){try{return await KO.instance("attributes/cluster-name"),!0}catch{return!1}}a(c4,"isKubernetesEngine");async function u4(){return KO.isAvailable()}a(u4,"isComputeEngine")});var Hv=B((lte,XO)=>{var Rf=Sa().Buffer,l4=require("stream"),d4=require("util");function Cf(e){if(this.buffer=null,this.writable=!0,this.readable=!0,!e)return this.buffer=Rf.alloc(0),this;if(typeof e.pipe=="function")return this.buffer=Rf.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(Cf,"DataStream");d4.inherits(Cf,l4);Cf.prototype.write=a(function(t){this.buffer=Rf.concat([this.buffer,Rf.from(t)]),this.emit("data",t)},"write");Cf.prototype.end=a(function(t){t&&this.write(t),this.emit("end",t),this.emit("close"),this.writable=!1,this.readable=!1},"end");XO.exports=Cf});var YO=B((pte,QO)=>{"use strict";var gu=require("buffer").Buffer,Zv=require("buffer").SlowBuffer;QO.exports=Of;function Of(e,t){if(!gu.isBuffer(e)||!gu.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(Of,"bufferEq");Of.install=function(){gu.prototype.equal=Zv.prototype.equal=a(function(t){return Of(this,t)},"equal")};var p4=gu.prototype.equal,f4=Zv.prototype.equal;Of.restore=function(){gu.prototype.equal=p4,Zv.prototype.equal=f4}});var Kv=B((mte,ck)=>{var wa=Sa().Buffer,Nr=require("crypto"),tk=Rv(),ek=require("util"),m4=`"%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".`,yu="secret must be a string or buffer",Aa="key must be a string or a buffer",h4="key must be a string, a buffer or an object",Wv=typeof Nr.createPublicKey=="function";Wv&&(Aa+=" or a KeyObject",yu+="or a KeyObject");function rk(e){if(!wa.isBuffer(e)&&typeof e!="string"&&(!Wv||typeof e!="object"||typeof e.type!="string"||typeof e.asymmetricKeyType!="string"||typeof e.export!="function"))throw Qr(Aa)}a(rk,"checkIsPublicKey");function nk(e){if(!wa.isBuffer(e)&&typeof e!="string"&&typeof e!="object")throw Qr(h4)}a(nk,"checkIsPrivateKey");function g4(e){if(!wa.isBuffer(e)){if(typeof e=="string")return e;if(!Wv||typeof e!="object"||e.type!=="secret"||typeof e.export!="function")throw Qr(yu)}}a(g4,"checkIsSecretKey");function Jv(e){return e.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}a(Jv,"fromBase64");function ok(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(ok,"toBase64");function Qr(e){var t=[].slice.call(arguments,1),n=ek.format.bind(ek,e).apply(null,t);return new TypeError(n)}a(Qr,"typeError");function y4(e){return wa.isBuffer(e)||typeof e=="string"}a(y4,"bufferOrString");function _u(e){return y4(e)||(e=JSON.stringify(e)),e}a(_u,"normalizeInput");function ik(e){return a(function(n,o){g4(o),n=_u(n);var r=Nr.createHmac("sha"+e,o),i=(r.update(n),r.digest("base64"));return Jv(i)},"sign")}a(ik,"createHmacSigner");var Gv,_4="timingSafeEqual"in Nr?a(function(t,n){return t.byteLength!==n.byteLength?!1:Nr.timingSafeEqual(t,n)},"timingSafeEqual"):a(function(t,n){return Gv||(Gv=YO()),Gv(t,n)},"timingSafeEqual");function b4(e){return a(function(n,o,r){var i=ik(e)(n,r);return _4(wa.from(o),wa.from(i))},"verify")}a(b4,"createHmacVerifier");function ak(e){return a(function(n,o){nk(o),n=_u(n);var r=Nr.createSign("RSA-SHA"+e),i=(r.update(n),r.sign(o,"base64"));return Jv(i)},"sign")}a(ak,"createKeySigner");function sk(e){return a(function(n,o,r){rk(r),n=_u(n),o=ok(o);var i=Nr.createVerify("RSA-SHA"+e);return i.update(n),i.verify(r,o,"base64")},"verify")}a(sk,"createKeyVerifier");function v4(e){return a(function(n,o){nk(o),n=_u(n);var r=Nr.createSign("RSA-SHA"+e),i=(r.update(n),r.sign({key:o,padding:Nr.constants.RSA_PKCS1_PSS_PADDING,saltLength:Nr.constants.RSA_PSS_SALTLEN_DIGEST},"base64"));return Jv(i)},"sign")}a(v4,"createPSSKeySigner");function E4(e){return a(function(n,o,r){rk(r),n=_u(n),o=ok(o);var i=Nr.createVerify("RSA-SHA"+e);return i.update(n),i.verify({key:r,padding:Nr.constants.RSA_PKCS1_PSS_PADDING,saltLength:Nr.constants.RSA_PSS_SALTLEN_DIGEST},o,"base64")},"verify")}a(E4,"createPSSKeyVerifier");function P4(e){var t=ak(e);return a(function(){var o=t.apply(null,arguments);return o=tk.derToJose(o,"ES"+e),o},"sign")}a(P4,"createECDSASigner");function S4(e){var t=sk(e);return a(function(o,r,i){r=tk.joseToDer(r,"ES"+e).toString("base64");var s=t(o,r,i);return s},"verify")}a(S4,"createECDSAVerifer");function T4(){return a(function(){return""},"sign")}a(T4,"createNoneSigner");function x4(){return a(function(t,n){return n===""},"verify")}a(x4,"createNoneVerifier");ck.exports=a(function(t){var n={hs:ik,rs:ak,ps:v4,es:P4,none:T4},o={hs:b4,rs:sk,ps:E4,es:S4,none:x4},r=t.match(/^(RS|PS|ES|HS)(256|384|512)$|^(none)$/);if(!r)throw Qr(m4,t);var i=(r[1]||r[3]).toLowerCase(),s=r[2];return{sign:n[i](s),verify:o[i](s)}},"jwa")});var Xv=B((gte,uk)=>{var A4=require("buffer").Buffer;uk.exports=a(function(t){return typeof t=="string"?t:typeof t=="number"||A4.isBuffer(t)?t.toString():JSON.stringify(t)},"toString")});var hk=B((_te,mk)=>{var w4=Sa().Buffer,lk=Hv(),I4=Kv(),R4=require("stream"),dk=Xv(),Qv=require("util");function pk(e,t){return w4.from(e,t).toString("base64").replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}a(pk,"base64url");function C4(e,t,n){n=n||"utf8";var o=pk(dk(e),"binary"),r=pk(dk(t),n);return Qv.format("%s.%s",o,r)}a(C4,"jwsSecuredInput");function fk(e){var t=e.header,n=e.payload,o=e.secret||e.privateKey,r=e.encoding,i=I4(t.alg),s=C4(t,n,r),u=i.sign(s,o);return Qv.format("%s.%s",s,u)}a(fk,"jwsSign");function kf(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 lk(t);this.readable=!0,this.header=e.header,this.encoding=e.encoding,this.secret=this.privateKey=this.key=n,this.payload=new lk(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(kf,"SignStream");Qv.inherits(kf,R4);kf.prototype.sign=a(function(){try{var t=fk({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");kf.sign=fk;mk.exports=kf});var xk=B((vte,Tk)=>{var yk=Sa().Buffer,gk=Hv(),O4=Kv(),k4=require("stream"),_k=Xv(),$4=require("util"),N4=/^[a-zA-Z0-9\-_]+?\.[a-zA-Z0-9\-_]+?\.([a-zA-Z0-9\-_]+)?$/;function z4(e){return Object.prototype.toString.call(e)==="[object Object]"}a(z4,"isObject");function D4(e){if(z4(e))return e;try{return JSON.parse(e)}catch{return}}a(D4,"safeJsonParse");function bk(e){var t=e.split(".",1)[0];return D4(yk.from(t,"base64").toString("binary"))}a(bk,"headerFromJWS");function U4(e){return e.split(".",2).join(".")}a(U4,"securedInputFromJWS");function vk(e){return e.split(".")[2]}a(vk,"signatureFromJWS");function j4(e,t){t=t||"utf8";var n=e.split(".")[1];return yk.from(n,"base64").toString(t)}a(j4,"payloadFromJWS");function Ek(e){return N4.test(e)&&!!bk(e)}a(Ek,"isValidJws");function Pk(e,t,n){if(!t){var o=new Error("Missing algorithm parameter for jws.verify");throw o.code="MISSING_ALGORITHM",o}e=_k(e);var r=vk(e),i=U4(e),s=O4(t);return s.verify(i,r,n)}a(Pk,"jwsVerify");function Sk(e,t){if(t=t||{},e=_k(e),!Ek(e))return null;var n=bk(e);if(!n)return null;var o=j4(e);return(n.typ==="JWT"||t.json)&&(o=JSON.parse(o,t.encoding)),{header:n,payload:o,signature:vk(e)}}a(Sk,"jwsDecode");function Ia(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 gk(t);this.readable=!0,this.algorithm=e.algorithm,this.encoding=e.encoding,this.secret=this.publicKey=this.key=n,this.signature=new gk(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(Ia,"VerifyStream");$4.inherits(Ia,k4);Ia.prototype.verify=a(function(){try{var t=Pk(this.signature.buffer,this.algorithm,this.key.buffer),n=Sk(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");Ia.decode=Sk;Ia.isValid=Ek;Ia.verify=Pk;Tk.exports=Ia});var Yv=B(bo=>{var Ak=hk(),$f=xk(),M4=["HS256","HS384","HS512","RS256","RS384","RS512","PS256","PS384","PS512","ES256","ES384","ES512"];bo.ALGORITHMS=M4;bo.sign=Ak.sign;bo.verify=$f.verify;bo.decode=$f.decode;bo.isValid=$f.isValid;bo.createSign=a(function(t){return new Ak(t)},"createSign");bo.createVerify=a(function(t){return new $f(t)},"createVerify")});var Fk=B(zf=>{"use strict";Object.defineProperty(zf,"__esModule",{value:!0});zf.GoogleToken=void 0;var wk=Nf(require("fs")),L4=kt(),F4=Nf(Yv()),B4=Nf(require("path")),q4=require("util");function Nf(e,t){if(typeof WeakMap=="function")var n=new WeakMap,o=new WeakMap;return(Nf=a(function(i,s){if(!s&&i&&i.__esModule)return i;var u,d,p={__proto__:null,default:i};if(i===null||jn(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(Nf,"_interopRequireWildcard");function jn(e){"@babel/helpers - typeof";return jn=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},jn(e)}a(jn,"_typeof");function V4(e,t){Dk(e,t),t.add(e)}a(V4,"_classPrivateMethodInitSpec");function H4(e,t,n){Dk(e,t),t.set(e,n)}a(H4,"_classPrivateFieldInitSpec");function Dk(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}a(Dk,"_checkPrivateRedeclaration");function Ik(e,t,n){return e.set(Yr(e,t),n),n}a(Ik,"_classPrivateFieldSet");function Rk(e,t){return e.get(Yr(e,t))}a(Rk,"_classPrivateFieldGet");function Yr(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(Yr,"_assertClassBrand");function Ck(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,Mk(o.key),o)}}a(Ck,"_defineProperties");function Uk(e,t,n){return t&&Ck(e.prototype,t),n&&Ck(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}a(Uk,"_createClass");function jk(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}a(jk,"_classCallCheck");function Z4(e,t,n){return t=Pu(t),G4(e,iE()?Reflect.construct(t,n||[],Pu(e).constructor):t.apply(e,n))}a(Z4,"_callSuper");function G4(e,t){if(t&&(jn(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return W4(e)}a(G4,"_possibleConstructorReturn");function W4(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}a(W4,"_assertThisInitialized");function J4(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&&Eu(e,t)}a(J4,"_inherits");function eE(e){var t=typeof Map=="function"?new Map:void 0;return eE=a(function(o){if(o===null||!X4(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 K4(o,arguments,Pu(this).constructor)}return a(r,"Wrapper"),r.prototype=Object.create(o.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),Eu(r,o)},"_wrapNativeSuper"),eE(e)}a(eE,"_wrapNativeSuper");function K4(e,t,n){if(iE())return Reflect.construct.apply(null,arguments);var o=[null];o.push.apply(o,t);var r=new(e.bind.apply(e,o));return n&&Eu(r,n.prototype),r}a(K4,"_construct");function iE(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(iE=a(function(){return!!e},"_isNativeReflectConstruct"))()}a(iE,"_isNativeReflectConstruct");function X4(e){try{return Function.toString.call(e).indexOf("[native code]")!==-1}catch{return typeof e=="function"}}a(X4,"_isNativeFunction");function Eu(e,t){return Eu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},Eu(e,t)}a(Eu,"_setPrototypeOf");function Pu(e){return Pu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Pu(e)}a(Pu,"_getPrototypeOf");function vr(e,t,n){return(t=Mk(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}a(vr,"_defineProperty");function Mk(e){var t=Q4(e,"string");return jn(t)=="symbol"?t:t+""}a(Mk,"_toPropertyKey");function Q4(e,t){if(jn(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var o=n.call(e,t||"default");if(jn(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}a(Q4,"_toPrimitive");function Pr(){var e,t,n=typeof Symbol=="function"?Symbol:{},o=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function i(h,_,P,S){var T=_&&_.prototype instanceof u?_:u,R=Object.create(T.prototype);return Er(R,"_invoke",(function(V,W,H){var G,re,ue,Y=0,Ze=H||[],Ce=!1,Se={p:0,n:0,v:e,a:Le,f:Le.bind(e,4),d:a(function(Ge,He){return G=Ge,re=0,ue=e,Se.n=He,s},"d")};function Le(Me,Ge){for(re=Me,ue=Ge,t=0;!Ce&&Y&&!He&&t<Ze.length;t++){var He,it=Ze[t],ar=Se.p,Ut=it[2];Me>3?(He=Ut===Ge)&&(ue=it[(re=it[4])?5:(re=3,3)],it[4]=it[5]=e):it[0]<=ar&&((He=Me<2&&ar<it[1])?(re=0,Se.v=Ge,Se.n=it[1]):ar<Ut&&(He=Me<3||it[0]>Ge||Ge>Ut)&&(it[4]=Me,it[5]=Ge,Se.n=Ut,re=0))}if(He||Me>1)return s;throw Ce=!0,Ge}return a(Le,"d"),function(Me,Ge,He){if(Y>1)throw TypeError("Generator is already running");for(Ce&&Ge===1&&Le(Ge,He),re=Ge,ue=He;(t=re<2?e:ue)||!Ce;){G||(re?re<3?(re>1&&(Se.n=-1),Le(re,ue)):Se.n=ue:Se.v=ue);try{if(Y=2,G){if(re||(Me="next"),t=G[Me]){if(!(t=t.call(G,ue)))throw TypeError("iterator result is not an object");if(!t.done)return t;ue=t.value,re<2&&(re=0)}else re===1&&(t=G.return)&&t.call(G),re<2&&(ue=TypeError("The iterator does not provide a '"+Me+"' method"),re=1);G=e}else if((t=(Ce=Se.n<0)?ue:V.call(W,Se))!==s)break}catch(it){G=e,re=1,ue=it}finally{Y=1}}return{value:t,done:Ce}}})(h,P,S),!0),R}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]())):(Er(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,Er(h,r,"GeneratorFunction")),h.prototype=Object.create(g),h}return a(y,"f"),d.prototype=p,Er(g,"constructor",p),Er(p,"constructor",d),d.displayName="GeneratorFunction",Er(p,r,"GeneratorFunction"),Er(g),Er(g,r,"Generator"),Er(g,o,function(){return this}),Er(g,"toString",function(){return"[object Generator]"}),(Pr=a(function(){return{w:i,m:y}},"_regenerator"))()}a(Pr,"_regenerator");function Er(e,t,n,o){var r=Object.defineProperty;try{r({},"",{})}catch{r=0}Er=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){Er(s,y,function(_){return this._invoke(y,h,_)})},"o");f("next",0),f("throw",1),f("return",2)}},"_regeneratorDefine"),Er(e,t,n,o)}a(Er,"_regeneratorDefine2");function Ok(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(Ok,"asyncGeneratorStep");function Ra(e){return function(){var t=this,n=arguments;return new Promise(function(o,r){var i=e.apply(t,n);function s(d){Ok(i,o,r,s,u,"next",d)}a(s,"_next");function u(d){Ok(i,o,r,s,u,"throw",d)}a(u,"_throw"),s(void 0)})}}a(Ra,"_asyncToGenerator");var kk=wk.readFile?(0,q4.promisify)(wk.readFile):Ra(Pr().m(a(function e(){return Pr().w(function(t){for(;;)switch(t.n){case 0:throw new vu("use key rather than keyFile.","MISSING_CREDENTIALS");case 1:return t.a(2)}},e)},"_callee"))),$k="https://oauth2.googleapis.com/token",Y4="https://oauth2.googleapis.com/revoke?token=",vu=(function(e){function t(n,o){var r;return jk(this,t),r=Z4(this,t,[n]),vr(r,"code",void 0),r.code=o,r}return a(t,"ErrorWithCode"),J4(t,e),Uk(t)})(eE(Error)),bu=new WeakMap,fn=new WeakSet,Tte=zf.GoogleToken=(function(){function e(t){jk(this,e),V4(this,fn),vr(this,"expiresAt",void 0),vr(this,"key",void 0),vr(this,"keyFile",void 0),vr(this,"iss",void 0),vr(this,"sub",void 0),vr(this,"scope",void 0),vr(this,"rawToken",void 0),vr(this,"tokenExpires",void 0),vr(this,"email",void 0),vr(this,"additionalClaims",void 0),vr(this,"eagerRefreshThresholdMillis",void 0),vr(this,"transporter",{request:a(function(o){return(0,L4.request)(o)},"request")}),H4(this,bu,void 0),Yr(fn,this,Lk).call(this,t)}return a(e,"GoogleToken"),Uk(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(jn(n)==="object"&&(o=n,n=void 0),o=Object.assign({forceRefresh:!1},o),n){var r=n;Yr(fn,this,Nk).call(this,o).then(function(i){return r(null,i)},n);return}return Yr(fn,this,Nk).call(this,o)},"getToken")},{key:"getCredentials",value:(function(){var t=Ra(Pr().m(a(function o(r){var i,s,u,d,p,f,g;return Pr().w(function(y){for(;;)switch(y.n){case 0:i=B4.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,kk(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 vu("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,kk(r,"utf8");case 5:return f=y.v,y.a(2,{privateKey:f});case 6:throw new vu("*.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 vu("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){Yr(fn,this,zk).call(this).then(function(){return n()},n);return}return Yr(fn,this,zk).call(this)},"revokeToken")}])})();function Nk(e){return tE.apply(this,arguments)}a(Nk,"_getTokenAsync");function tE(){return tE=Ra(Pr().m(a(function e(t){return Pr().w(function(n){for(;;)switch(n.n){case 0:if(!(Rk(bu,this)&&!t.forceRefresh)){n.n=1;break}return n.a(2,Rk(bu,this));case 1:return n.p=1,n.n=2,Ik(bu,this,Yr(fn,this,e6).call(this,t));case 2:return n.a(2,n.v);case 3:return n.p=3,Ik(bu,this,void 0),n.f(3);case 4:return n.a(2)}},e,this,[[1,,3,4]])},"_callee3"))),tE.apply(this,arguments)}a(tE,"_getTokenAsync2");function e6(e){return rE.apply(this,arguments)}a(e6,"_getTokenAsyncInner");function rE(){return rE=Ra(Pr().m(a(function e(t){var n;return Pr().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||Yr(fn,this,t6).call(this);case 4:return o.a(2,Yr(fn,this,r6).call(this))}},e,this)},"_callee4"))),rE.apply(this,arguments)}a(rE,"_getTokenAsyncInner2");function t6(){if(!this.iss)throw new vu("email is required.","MISSING_CREDENTIALS")}a(t6,"_ensureEmail");function zk(){return nE.apply(this,arguments)}a(zk,"_revokeTokenAsync");function nE(){return nE=Ra(Pr().m(a(function e(){var t;return Pr().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=Y4+this.accessToken,n.n=2,this.transporter.request({url:t,retry:!0});case 2:Yr(fn,this,Lk).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"))),nE.apply(this,arguments)}a(nE,"_revokeTokenAsync2");function Lk(){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,jn(e.scope)==="object"?this.scope=e.scope.join(" "):this.scope=e.scope,this.eagerRefreshThresholdMillis=e.eagerRefreshThresholdMillis,e.transporter&&(this.transporter=e.transporter)}a(Lk,"_configure");function r6(){return oE.apply(this,arguments)}a(r6,"_requestToken");function oE(){return oE=Ra(Pr().m(a(function e(){var t,n,o,r,i,s,u,d,p,f;return Pr().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:$k,exp:t+3600,iat:t,sub:this.sub},n),r=F4.sign({header:{alg:"RS256"},payload:o,secret:this.key}),g.p=1,g.n=2,this.transporter.request({method:"POST",url:$k,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"))),oE.apply(this,arguments)}a(oE,"_requestToken2")});var sE=B(Df=>{"use strict";Object.defineProperty(Df,"__esModule",{value:!0});Df.JWTAccess=void 0;var n6=Yv(),o6=Kr(),Bk={alg:"RS256",typ:"JWT"},aE=class e{static{a(this,"JWTAccess")}email;key;keyId;projectId;eagerRefreshThresholdMillis;cache=new o6.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?{...Bk,kid:this.keyId}:Bk,g=Object.assign(p,n),y=n6.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)}})})}};Df.JWTAccess=aE});var uE=B(jf=>{"use strict";Object.defineProperty(jf,"__esModule",{value:!0});jf.JWT=void 0;var qk=Fk(),i6=sE(),a6=ci(),Uf=br(),cE=class e extends a6.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!==Uf.DEFAULT_UNIVERSE;if(this.subject&&this.universeDomain!==Uf.DEFAULT_UNIVERSE)throw new RangeError(`Service Account user is configured for the credential. Domain-wide delegation is not supported in universes other than ${Uf.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 i6.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!==Uf.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 qk.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 qk.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.")}};jf.JWT=cE});var dE=B(Ca=>{"use strict";Object.defineProperty(Ca,"__esModule",{value:!0});Ca.UserRefreshClient=Ca.USER_REFRESH_ACCOUNT_TYPE=void 0;var s6=ci(),c6=br();Ca.USER_REFRESH_ACCOUNT_TYPE="authorized_user";var lE=class e extends s6.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 c6.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}};Ca.UserRefreshClient=lE});var fE=B(Oa=>{"use strict";Object.defineProperty(Oa,"__esModule",{value:!0});Oa.Impersonated=Oa.IMPERSONATED_ACCOUNT_TYPE=void 0;var Vk=ci(),u6=kt(),l6=Kr();Oa.IMPERSONATED_ACCOUNT_TYPE="impersonated_service_account";var pE=class e extends Vk.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 Vk.OAuth2Client,this.targetPrincipal=t.targetPrincipal??"",this.delegates=t.delegates??[],this.targetScopes=t.targetScopes??[],this.lifetime=t.lifetime??3600,!!!(0,l6.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 u6.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}};Oa.Impersonated=pE});var hE=B(Su=>{"use strict";Object.defineProperty(Su,"__esModule",{value:!0});Su.OAuthClientAuthHandler=void 0;Su.getErrorFromOAuthErrorResponse=f6;var ka=kt(),d6=fu(),p6=["PUT","POST","PATCH"],mE=class{static{a(this,"OAuthClientAuthHandler")}#e=(0,d6.createCrypto)();#t;transporter;constructor(t){t&&"clientId"in t?(this.#t=t,this.transporter=new ka.Gaxios):(this.#t=t?.clientAuthentication,this.transporter=t?.transporter||new ka.Gaxios)}applyClientAuthenticationOptions(t,n){t.headers=ka.Gaxios.mergeHeaders(t.headers),this.injectAuthenticatedHeaders(t,n),n||this.injectAuthenticatedRequestBody(t)}injectAuthenticatedHeaders(t,n){if(n)t.headers=ka.Gaxios.mergeHeaders(t.headers,{authorization:`Bearer ${n}`});else if(this.#t?.confidentialClientType==="basic"){t.headers=ka.Gaxios.mergeHeaders(t.headers);let o=this.#t.clientId,r=this.#t.clientSecret||"",i=this.#e.encodeBase64StringUtf8(`${o}:${r}`);ka.Gaxios.mergeHeaders(t.headers,{authorization:`Basic ${i}`})}}injectAuthenticatedRequestBody(t){if(this.#t?.confidentialClientType==="request-body"){let n=(t.method||"GET").toUpperCase();if(!p6.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"]}}}};Su.OAuthClientAuthHandler=mE;function f6(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(f6,"getErrorFromOAuthErrorResponse")});var Lf=B(Mf=>{"use strict";Object.defineProperty(Mf,"__esModule",{value:!0});Mf.StsCredentials=void 0;var m6=kt(),h6=br(),Hk=hE(),g6=Kr(),gE=class e extends Hk.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,g6.removeUndefinedValuesInObject)(r))};h6.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 m6.GaxiosError&&s.response?(0,Hk.getErrorFromOAuthErrorResponse)(s.response.data,s):s}}};Mf.StsCredentials=gE});var vo=B(zr=>{"use strict";Object.defineProperty(zr,"__esModule",{value:!0});zr.BaseExternalAccountClient=zr.CLOUD_RESOURCE_MANAGER=zr.EXTERNAL_ACCOUNT_TYPE=zr.EXPIRATION_TIME_OFFSET=void 0;var y6=kt(),_6=require("stream"),yE=br(),b6=Lf(),Zk=Kr(),v6=kv(),E6="urn:ietf:params:oauth:grant-type:token-exchange",P6="urn:ietf:params:oauth:token-type:access_token",_E="https://www.googleapis.com/auth/cloud-platform",S6=3600;zr.EXPIRATION_TIME_OFFSET=300*1e3;zr.EXTERNAL_ACCOUNT_TYPE="external_account";zr.CLOUD_RESOURCE_MANAGER="https://cloudresourcemanager.googleapis.com/v1/projects/";var T6="//iam\\.googleapis\\.com/locations/[^/]+/workforcePools/[^/]+/providers/.+",x6="https://sts.{universeDomain}/v1/token",bE=class e extends yE.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,Zk.originalOrCamelOptions)(t),o=n.get("type");if(o&&o!==zr.EXTERNAL_ACCOUNT_TYPE)throw new Error(`Expected "${zr.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")??x6.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,Zk.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 b6.StsCredentials({tokenExchangeEndpoint:this.tokenUrl,clientAuthentication:this.clientAuth}),this.scopes=n.get("scopes")||[_E],this.cachedAccessToken=null,this.audience=n.get("audience"),this.subjectTokenType=s,this.workforcePoolUserProject=u;let g=new RegExp(T6);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=S6),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}`};yE.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=y6.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 _6.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:E6,audience:this.audience,requestedTokenType:P6,subjectToken:t,subjectTokenType:this.subjectTokenType,scope:this.serviceAccountImpersonationUrl?[_E]: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"}};yE.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||[_E]}getMetricsHeaderValue(){let t=process.version.replace(/^v/,""),n=this.serviceAccountImpersonationUrl!==void 0,o=this.credentialSourceType?this.credentialSourceType:"unknown";return`gl-node/${t} auth/${v6.pkg.version} google-byoid-sdk source/${o} sa-impersonation/${n} config-lifetime/${this.configLifetimeRequested}`}getTokenUrl(){return this.tokenUrl}};zr.BaseExternalAccountClient=bE});var Gk=B(Ff=>{"use strict";Object.defineProperty(Ff,"__esModule",{value:!0});Ff.FileSubjectTokenSupplier=void 0;var EE=require("util"),PE=require("fs"),A6=(0,EE.promisify)(PE.readFile??(()=>{})),w6=(0,EE.promisify)(PE.realpath??(()=>{})),I6=(0,EE.promisify)(PE.lstat??(()=>{})),vE=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 w6(t),!(await I6(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 A6(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}};Ff.FileSubjectTokenSupplier=vE});var Wk=B(Bf=>{"use strict";Object.defineProperty(Bf,"__esModule",{value:!0});Bf.UrlSubjectTokenSupplier=void 0;var R6=br(),SE=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};R6.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}};Bf.UrlSubjectTokenSupplier=SE});var Jk=B(Sr=>{"use strict";Object.defineProperty(Sr,"__esModule",{value:!0});Sr.CertificateSubjectTokenSupplier=Sr.InvalidConfigurationError=Sr.CertificateSourceUnavailableError=Sr.CERTIFICATE_CONFIGURATION_ENV_VARIABLE=void 0;var qf=Kr(),Vf=require("fs"),Hf=require("crypto"),C6=require("https");Sr.CERTIFICATE_CONFIGURATION_ENV_VARIABLE="GOOGLE_API_CERTIFICATE_CONFIG";var mn=class extends Error{static{a(this,"CertificateSourceUnavailableError")}constructor(t){super(t),this.name="CertificateSourceUnavailableError"}};Sr.CertificateSourceUnavailableError=mn;var Dr=class extends Error{static{a(this,"InvalidConfigurationError")}constructor(t){super(t),this.name="InvalidConfigurationError"}};Sr.InvalidConfigurationError=Dr;var TE=class{static{a(this,"CertificateSubjectTokenSupplier")}certificateConfigPath;trustChainPath;cert;key;constructor(t){if(!t.useDefaultCertificateConfig&&!t.certificateConfigLocation)throw new Dr("Either `useDefaultCertificateConfig` must be true or a `certificateConfigLocation` must be provided.");if(t.useDefaultCertificateConfig&&t.certificateConfigLocation)throw new Dr("Both `useDefaultCertificateConfig` and `certificateConfigLocation` cannot be provided.");this.trustChainPath=t.trustChainPath,this.certificateConfigPath=t.certificateConfigLocation??""}async createMtlsHttpsAgent(){if(!this.key||!this.cert)throw new Dr("Cannot create mTLS Agent with missing certificate or key");return new C6.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,qf.isValidFile)(t))return t;throw new mn(`Provided certificate config path is invalid: ${t}`)}let n=process.env[Sr.CERTIFICATE_CONFIGURATION_ENV_VARIABLE];if(n){if(await(0,qf.isValidFile)(n))return n;throw new mn(`Path from environment variable "${Sr.CERTIFICATE_CONFIGURATION_ENV_VARIABLE}" is invalid: ${n}`)}let o=(0,qf.getWellKnownCertificateConfigFileLocation)();if(await(0,qf.isValidFile)(o))return o;throw new mn(`Could not find certificate configuration file. Searched override path, the "${Sr.CERTIFICATE_CONFIGURATION_ENV_VARIABLE}" env var, and the gcloud path (${o}).`)}async#t(){let t=this.certificateConfigPath,n;try{n=await Vf.promises.readFile(t,"utf8")}catch{throw new mn(`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 Dr(`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 Dr?o:new Dr(`Failed to parse certificate config from ${t}: ${o.message}`)}}async#r(t,n){let o,r;try{o=await Vf.promises.readFile(t),new Hf.X509Certificate(o)}catch(i){let s=i instanceof Error?i.message:String(i);throw new mn(`Failed to read certificate file at ${t}: ${s}`)}try{r=await Vf.promises.readFile(n),(0,Hf.createPrivateKey)(r)}catch(i){let s=i instanceof Error?i.message:String(i);throw new mn(`Failed to read private key file at ${n}: ${s}`)}return{cert:o,key:r}}async#n(t){let n=new Hf.X509Certificate(t);if(!this.trustChainPath)return JSON.stringify([n.raw.toString("base64")]);try{let i=((await Vf.promises.readFile(this.trustChainPath,"utf8")).match(/-----BEGIN CERTIFICATE-----[^-]+-----END CERTIFICATE-----/g)??[]).map((d,p)=>{try{return new Hf.X509Certificate(d)}catch(f){let g=f instanceof Error?f.message:String(f);throw new Dr(`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 Dr(`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 Dr)throw o;let r=o instanceof Error?o.message:String(o);throw new mn(`Failed to process certificate chain from ${this.trustChainPath}: ${r}`)}}};Sr.CertificateSubjectTokenSupplier=TE});var wE=B(Zf=>{"use strict";Object.defineProperty(Zf,"__esModule",{value:!0});Zf.IdentityPoolClient=void 0;var O6=vo(),xE=Kr(),k6=Gk(),$6=Wk(),Kk=Jk(),N6=Lf(),Xk=kt(),AE=class e extends O6.BaseExternalAccountClient{static{a(this,"IdentityPoolClient")}subjectTokenSupplier;constructor(t){super(t);let n=(0,xE.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,xE.originalOrCamelOptions)(o),s=(0,xE.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 k6.FileSubjectTokenSupplier({filePath:p,formatType:u,subjectTokenFieldName:d});else if(f)this.credentialSourceType="url",this.subjectTokenSupplier=new $6.UrlSubjectTokenSupplier({url:f,formatType:u,subjectTokenFieldName:d,headers:y,additionalGaxiosOptions:e.RETRY_CONFIG});else if(g){this.credentialSourceType="certificate";let h=new Kk.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 Kk.CertificateSubjectTokenSupplier){let n=await this.subjectTokenSupplier.createMtlsHttpsAgent();this.stsCredential=new N6.StsCredentials({tokenExchangeEndpoint:this.getTokenUrl(),clientAuthentication:this.clientAuth,transporter:new Xk.Gaxios({agent:n})}),this.transporter=new Xk.Gaxios({...this.transporter.defaults||{},agent:n})}return t}};Zf.IdentityPoolClient=AE});var RE=B(Wf=>{"use strict";Object.defineProperty(Wf,"__esModule",{value:!0});Wf.AwsRequestSigner=void 0;var Gf=kt(),Yk=fu(),Qk="AWS4-HMAC-SHA256",z6="aws4_request",IE=class{static{a(this,"AwsRequestSigner")}getCredentials;region;crypto;constructor(t,n){this.getCredentials=t,this.region=n,this.crypto=(0,Yk.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 U6({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=Gf.Gaxios.mergeHeaders(p.amzDate?{"x-amz-date":p.amzDate}:{},{authorization:p.authorizationHeader,host:d.host},s||{});u.token&&Gf.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}};Wf.AwsRequestSigner=IE;async function Tu(e,t,n){return await e.signWithHmacSha256(t,n)}a(Tu,"sign");async function D6(e,t,n,o,r){let i=await Tu(e,`AWS4${t}`,n),s=await Tu(e,i,o),u=await Tu(e,s,r);return await Tu(e,u,"aws4_request")}a(D6,"getSigningKey");async function U6(e){let t=Gf.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=Gf.Gaxios.mergeHeaders({host:e.host},t.has("date")?{}:{"x-amz-date":i},t),d="",p=[...u.keys()].sort();p.forEach(R=>{d+=`${R}:${u.get(R)}
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}/${z6}`,_=`${Qk}
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 D6(e.crypto,e.securityCredentials.secretAccessKey,s,e.region,o),S=await Tu(e.crypto,P,_),T=`${Qk} Credential=${e.securityCredentials.accessKeyId}/${h}, SignedHeaders=${f}, Signature=${(0,Yk.fromArrayBufferToHex)(S)}`;return{amzDate:t.has("date")?void 0:i,authorizationHeader:T,canonicalQuerystring:e.canonicalQuerystring}}a(U6,"generateAuthenticationHeaderMap")});var e0=B(Kf=>{"use strict";Object.defineProperty(Kf,"__esModule",{value:!0});Kf.DefaultAwsSecurityCredentialsSupplier=void 0;var Jf=br(),CE=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};Jf.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 Jf.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 Jf.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 Jf.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}};Kf.DefaultAwsSecurityCredentialsSupplier=CE});var kE=B(Xf=>{"use strict";Object.defineProperty(Xf,"__esModule",{value:!0});Xf.AwsClient=void 0;var j6=RE(),M6=vo(),L6=e0(),t0=Kr(),F6=kt(),OE=class e extends M6.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,t0.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,t0.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 L6.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 j6.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 F6.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}))}};Xf.AwsClient=OE});var UE=B(mt=>{"use strict";Object.defineProperty(mt,"__esModule",{value:!0});mt.InvalidSubjectTokenError=mt.InvalidMessageFieldError=mt.InvalidCodeFieldError=mt.InvalidTokenTypeFieldError=mt.InvalidExpirationTimeFieldError=mt.InvalidSuccessFieldError=mt.InvalidVersionFieldError=mt.ExecutableResponseError=mt.ExecutableResponse=void 0;var Qf="urn:ietf:params:oauth:token-type:saml2",$E="urn:ietf:params:oauth:token-type:id_token",NE="urn:ietf:params:oauth:token-type:jwt",zE=class{static{a(this,"ExecutableResponse")}version;success;expirationTime;tokenType;errorCode;errorMessage;subjectToken;constructor(t){if(!t.version)throw new Yf("Executable response must contain a 'version' field.");if(t.success===void 0)throw new em("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!==Qf&&this.tokenType!==$E&&this.tokenType!==NE)throw new tm(`Executable response must contain a 'token_type' field when successful and it must be one of ${$E}, ${NE}, or ${Qf}.`);if(this.tokenType===Qf){if(!t.saml_response)throw new xu(`Executable response must contain a 'saml_response' field when token_type=${Qf}.`);this.subjectToken=t.saml_response}else{if(!t.id_token)throw new xu(`Executable response must contain a 'id_token' field when token_type=${$E} or ${NE}.`);this.subjectToken=t.id_token}}else{if(!t.code)throw new rm("Executable response must contain a 'code' field when unsuccessful.");if(!t.message)throw new nm("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)}};mt.ExecutableResponse=zE;var hn=class extends Error{static{a(this,"ExecutableResponseError")}constructor(t){super(t),Object.setPrototypeOf(this,new.target.prototype)}};mt.ExecutableResponseError=hn;var Yf=class extends hn{static{a(this,"InvalidVersionFieldError")}};mt.InvalidVersionFieldError=Yf;var em=class extends hn{static{a(this,"InvalidSuccessFieldError")}};mt.InvalidSuccessFieldError=em;var DE=class extends hn{static{a(this,"InvalidExpirationTimeFieldError")}};mt.InvalidExpirationTimeFieldError=DE;var tm=class extends hn{static{a(this,"InvalidTokenTypeFieldError")}};mt.InvalidTokenTypeFieldError=tm;var rm=class extends hn{static{a(this,"InvalidCodeFieldError")}};mt.InvalidCodeFieldError=rm;var nm=class extends hn{static{a(this,"InvalidMessageFieldError")}};mt.InvalidMessageFieldError=nm;var xu=class extends hn{static{a(this,"InvalidSubjectTokenError")}};mt.InvalidSubjectTokenError=xu});var LE=B($a=>{"use strict";Object.defineProperty($a,"__esModule",{value:!0});$a.PluggableAuthHandler=$a.ExecutableError=void 0;var ui=UE(),B6=require("child_process"),jE=require("fs"),om=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)}};$a.ExecutableError=om;var ME=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=B6.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 ui.ExecutableResponse(d);return n(p)}catch(d){return d instanceof ui.ExecutableResponseError?o(d):o(new ui.ExecutableResponseError(`The executable returned an invalid response: ${i}`))}else return o(new om(i,u.toString()))})})}async retrieveCachedResponse(){if(!this.outputFile||this.outputFile.length===0)return;let t;try{t=await jE.promises.realpath(this.outputFile)}catch{return}if(!(await jE.promises.lstat(t)).isFile())return;let n=await jE.promises.readFile(t,{encoding:"utf8"});if(n!=="")try{let o=JSON.parse(n);return new ui.ExecutableResponse(o).isValid()?new ui.ExecutableResponse(o):void 0}catch(o){throw o instanceof ui.ExecutableResponseError?o:new ui.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}};$a.PluggableAuthHandler=ME});var BE=B(Na=>{"use strict";Object.defineProperty(Na,"__esModule",{value:!0});Na.PluggableAuthClient=Na.ExecutableError=void 0;var q6=vo(),V6=UE(),r0=LE(),H6=LE();Object.defineProperty(Na,"ExecutableError",{enumerable:!0,get:a(function(){return H6.ExecutableError},"get")});var Z6=30*1e3,n0=5*1e3,o0=120*1e3,G6="GOOGLE_EXTERNAL_ACCOUNT_ALLOW_EXECUTABLES",i0=1,FE=class extends q6.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=Z6;else if(this.timeoutMillis=t.credential_source.executable.timeout_millis,this.timeoutMillis<n0||this.timeoutMillis>o0)throw new Error(`Timeout must be between ${n0} and ${o0} milliseconds.`);this.outputFile=t.credential_source.executable.output_file,this.handler=new r0.PluggableAuthHandler({command:this.command,timeoutMillis:this.timeoutMillis,outputFile:this.outputFile}),this.credentialSourceType="executable"}async retrieveSubjectToken(){if(process.env[G6]!=="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>i0)throw new Error(`Version of executable is not currently supported, maximum supported version is ${i0}.`);if(!t.success)throw new r0.ExecutableError(t.errorMessage,t.errorCode);if(this.outputFile&&!t.expirationTime)throw new V6.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}};Na.PluggableAuthClient=FE});var VE=B(im=>{"use strict";Object.defineProperty(im,"__esModule",{value:!0});im.ExternalAccountClient=void 0;var W6=vo(),J6=wE(),K6=kE(),X6=BE(),qE=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===W6.EXTERNAL_ACCOUNT_TYPE?t.credential_source?.environment_id?new K6.AwsClient(t):t.credential_source?.executable?new X6.PluggableAuthClient(t):new J6.IdentityPoolClient(t):null}};im.ExternalAccountClient=qE});var GE=B(za=>{"use strict";Object.defineProperty(za,"__esModule",{value:!0});za.ExternalAccountAuthorizedUserClient=za.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE=void 0;var s0=br(),a0=hE(),c0=kt(),Q6=require("stream"),Y6=vo();za.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE="external_account_authorized_user";var eq="https://sts.{universeDomain}/v1/oauthtoken",HE=class e extends a0.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})};s0.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 c0.GaxiosError&&r.response?(0,a0.getErrorFromOAuthErrorResponse)(r.response.data,r):r}}},ZE=class extends s0.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 HE({tokenRefreshEndpoint:t.token_url??eq.replace("{universeDomain}",this.universeDomain),transporter:this.transporter,clientAuthentication:n}),this.cachedAccessToken=null,this.quotaProjectId=t.quota_project_id,typeof t?.eagerRefreshThresholdMillis!="number"?this.eagerRefreshThresholdMillis=Y6.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=c0.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 Q6.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}};za.ExternalAccountAuthorizedUserClient=ZE});var p0=B(en=>{"use strict";Object.defineProperty(en,"__esModule",{value:!0});en.GoogleAuth=en.GoogleAuthExceptionMessages=void 0;var tq=require("child_process"),Au=require("fs"),rq=kt(),wu=pu(),nq=require("os"),WE=require("path"),oq=fu(),iq=Fv(),aq=qv(),sq=Vv(),Da=uE(),u0=dE(),Ua=fE(),cq=VE(),Iu=vo(),JE=br(),l0=GE(),d0=Kr();en.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 KE=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(en.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===en.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(en.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 wu.universe("universe-domain"),t||=JE.DEFAULT_UNIVERSE}catch(n){if(n&&n?.response?.status===404)t=JE.DEFAULT_UNIVERSE;else throw n}return t}async getUniverseDomain(){let t=(0,d0.originalOrCamelOptions)(this.clientOptions).get("universe_domain");try{t??=(await this.getClient()).universeDomain}catch{t??=JE.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 Da.JWT?n.scopes=this.scopes:n instanceof Iu.BaseExternalAccountClient&&(n.scopes=this.getAnyScopes()),await this.#t(n);if(n=await this._tryGetApplicationCredentialsFromWellKnownFile(t),n)return n instanceof Da.JWT?n.scopes=this.scopes:n instanceof Iu.BaseExternalAccountClient&&(n.scopes=this.getAnyScopes()),await this.#t(n);if(await this._checkIsGCE())return t.scopes=this.getAnyScopes(),await this.#t(new iq.Compute(t));throw new Error(en.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=wu.getGCPResidency()||await wu.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=WE.join(r,".config"))}return n&&(n=WE.join(n,"gcloud","application_default_credentials.json"),Au.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=Au.realpathSync(t),!Au.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=Au.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!==Ua.IMPERSONATED_ACCOUNT_TYPE)throw new Error(`The incoming JSON object does not have the "${Ua.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 Ua.Impersonated({...t,sourceClient:n,targetPrincipal:o,targetScopes:Array.isArray(r)?r:[r]})}fromJSON(t,n={}){let o,r=(0,d0.originalOrCamelOptions)(n).get("universe_domain");return t.type===u0.USER_REFRESH_ACCOUNT_TYPE?(o=new u0.UserRefreshClient(n),o.fromJSON(t)):t.type===Ua.IMPERSONATED_ACCOUNT_TYPE?o=this.fromImpersonatedJSON(t):t.type===Iu.EXTERNAL_ACCOUNT_TYPE?(o=cq.ExternalAccountClient.fromJSON({...t,...n}),o.scopes=this.getAnyScopes()):t.type===l0.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE?o=new l0.ExternalAccountAuthorizedUserClient({...t,...n}):(n.scopes=this.scopes,o=new Da.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 Da.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 Da.JWT({...n,apiKey:t})}_isWindows(){let t=nq.platform();return!!(t&&t.length>=3&&t.substring(0,3).toLowerCase()==="win")}async getDefaultServiceProjectId(){return new Promise(t=>{(0,tq.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!==Iu.EXTERNAL_ACCOUNT_TYPE?null:await(await this.getClient()).getProjectId()}async getGCEProjectId(){try{return await wu.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 Ua.Impersonated)return{client_email:t.getTargetPrincipal()};if(t instanceof Iu.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([wu.instance("service-accounts/default/email"),this.getUniverseDomain()]);return{client_email:n,universe_domain:o}}throw new Error(en.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=WE.resolve(this.keyFilename),n=Au.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 aq.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=rq.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,sq.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 Ua.Impersonated)return(await o.sign(t)).signedBlob;let i=(0,oq.createCrypto)();if(o instanceof Da.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}};en.GoogleAuth=KE});var f0=B(am=>{"use strict";Object.defineProperty(am,"__esModule",{value:!0});am.IAMAuth=void 0;var XE=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}}};am.IAMAuth=XE});var m0=B(gn=>{"use strict";Object.defineProperty(gn,"__esModule",{value:!0});gn.DownscopedClient=gn.EXPIRATION_TIME_OFFSET=gn.MAX_ACCESS_BOUNDARY_RULES_COUNT=void 0;var uq=kt(),lq=require("stream"),QE=br(),dq=Lf(),pq="urn:ietf:params:oauth:grant-type:token-exchange",fq="urn:ietf:params:oauth:token-type:access_token",mq="urn:ietf:params:oauth:token-type:access_token";gn.MAX_ACCESS_BOUNDARY_RULES_COUNT=10;gn.EXPIRATION_TIME_OFFSET=300*1e3;var YE=class extends QE.AuthClient{static{a(this,"DownscopedClient")}authClient;credentialAccessBoundary;cachedDownscopedAccessToken;stsCredential;constructor(t,n={accessBoundary:{accessBoundaryRules:[]}}){if(super(t instanceof QE.AuthClient?{}:t),t instanceof QE.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>gn.MAX_ACCESS_BOUNDARY_RULES_COUNT)throw new Error(`The provided access boundary has more than ${gn.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 dq.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=uq.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 lq.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:pq,requestedTokenType:fq,subjectToken:t,subjectTokenType:mq},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}};gn.DownscopedClient=YE});var h0=B(sm=>{"use strict";Object.defineProperty(sm,"__esModule",{value:!0});sm.PassThroughClient=void 0;var hq=br(),eP=class extends hq.AuthClient{static{a(this,"PassThroughClient")}async request(t){return this.transporter.request(t)}async getAccessToken(){return{}}async getRequestHeaders(){return new Headers}};sm.PassThroughClient=eP});var v0=B(se=>{"use strict";Object.defineProperty(se,"__esModule",{value:!0});se.GoogleAuth=se.auth=se.PassThroughClient=se.ExternalAccountAuthorizedUserClient=se.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE=se.ExecutableError=se.PluggableAuthClient=se.DownscopedClient=se.BaseExternalAccountClient=se.ExternalAccountClient=se.IdentityPoolClient=se.AwsRequestSigner=se.AwsClient=se.UserRefreshClient=se.LoginTicket=se.ClientAuthentication=se.OAuth2Client=se.CodeChallengeMethod=se.Impersonated=se.JWT=se.JWTAccess=se.IdTokenClient=se.IAMAuth=se.GCPEnv=se.Compute=se.DEFAULT_UNIVERSE=se.AuthClient=se.gaxios=se.gcpMetadata=void 0;var g0=p0();Object.defineProperty(se,"GoogleAuth",{enumerable:!0,get:a(function(){return g0.GoogleAuth},"get")});se.gcpMetadata=pu();se.gaxios=kt();var y0=br();Object.defineProperty(se,"AuthClient",{enumerable:!0,get:a(function(){return y0.AuthClient},"get")});Object.defineProperty(se,"DEFAULT_UNIVERSE",{enumerable:!0,get:a(function(){return y0.DEFAULT_UNIVERSE},"get")});var gq=Fv();Object.defineProperty(se,"Compute",{enumerable:!0,get:a(function(){return gq.Compute},"get")});var yq=Vv();Object.defineProperty(se,"GCPEnv",{enumerable:!0,get:a(function(){return yq.GCPEnv},"get")});var _q=f0();Object.defineProperty(se,"IAMAuth",{enumerable:!0,get:a(function(){return _q.IAMAuth},"get")});var bq=qv();Object.defineProperty(se,"IdTokenClient",{enumerable:!0,get:a(function(){return bq.IdTokenClient},"get")});var vq=sE();Object.defineProperty(se,"JWTAccess",{enumerable:!0,get:a(function(){return vq.JWTAccess},"get")});var Eq=uE();Object.defineProperty(se,"JWT",{enumerable:!0,get:a(function(){return Eq.JWT},"get")});var Pq=fE();Object.defineProperty(se,"Impersonated",{enumerable:!0,get:a(function(){return Pq.Impersonated},"get")});var tP=ci();Object.defineProperty(se,"CodeChallengeMethod",{enumerable:!0,get:a(function(){return tP.CodeChallengeMethod},"get")});Object.defineProperty(se,"OAuth2Client",{enumerable:!0,get:a(function(){return tP.OAuth2Client},"get")});Object.defineProperty(se,"ClientAuthentication",{enumerable:!0,get:a(function(){return tP.ClientAuthentication},"get")});var Sq=Uv();Object.defineProperty(se,"LoginTicket",{enumerable:!0,get:a(function(){return Sq.LoginTicket},"get")});var Tq=dE();Object.defineProperty(se,"UserRefreshClient",{enumerable:!0,get:a(function(){return Tq.UserRefreshClient},"get")});var xq=kE();Object.defineProperty(se,"AwsClient",{enumerable:!0,get:a(function(){return xq.AwsClient},"get")});var Aq=RE();Object.defineProperty(se,"AwsRequestSigner",{enumerable:!0,get:a(function(){return Aq.AwsRequestSigner},"get")});var wq=wE();Object.defineProperty(se,"IdentityPoolClient",{enumerable:!0,get:a(function(){return wq.IdentityPoolClient},"get")});var Iq=VE();Object.defineProperty(se,"ExternalAccountClient",{enumerable:!0,get:a(function(){return Iq.ExternalAccountClient},"get")});var Rq=vo();Object.defineProperty(se,"BaseExternalAccountClient",{enumerable:!0,get:a(function(){return Rq.BaseExternalAccountClient},"get")});var Cq=m0();Object.defineProperty(se,"DownscopedClient",{enumerable:!0,get:a(function(){return Cq.DownscopedClient},"get")});var _0=BE();Object.defineProperty(se,"PluggableAuthClient",{enumerable:!0,get:a(function(){return _0.PluggableAuthClient},"get")});Object.defineProperty(se,"ExecutableError",{enumerable:!0,get:a(function(){return _0.ExecutableError},"get")});var b0=GE();Object.defineProperty(se,"EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE",{enumerable:!0,get:a(function(){return b0.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE},"get")});Object.defineProperty(se,"ExternalAccountAuthorizedUserClient",{enumerable:!0,get:a(function(){return b0.ExternalAccountAuthorizedUserClient},"get")});var Oq=h0();Object.defineProperty(se,"PassThroughClient",{enumerable:!0,get:a(function(){return Oq.PassThroughClient},"get")});var kq=new g0.GoogleAuth;se.auth=kq});var Lq={};Jt(Lq,{bigQueryAuth:()=>je,googleBigQuery:()=>Mq});module.exports=PN(Lq);var lr={};Jt(lr,{$ZodAny:()=>ms,$ZodArray:()=>_s,$ZodAsyncError:()=>Lr,$ZodBase64:()=>Ll,$ZodBase64URL:()=>Fl,$ZodBigInt:()=>ji,$ZodBigIntFormat:()=>Hl,$ZodBoolean:()=>$o,$ZodCIDRv4:()=>jl,$ZodCIDRv6:()=>Ml,$ZodCUID:()=>Cl,$ZodCUID2:()=>Ol,$ZodCatch:()=>sd,$ZodCheck:()=>Je,$ZodCheckBigIntFormat:()=>xh,$ZodCheckEndsWith:()=>Uh,$ZodCheckGreaterThan:()=>bl,$ZodCheckIncludes:()=>zh,$ZodCheckLengthEquals:()=>Oh,$ZodCheckLessThan:()=>_l,$ZodCheckLowerCase:()=>$h,$ZodCheckMaxLength:()=>Rh,$ZodCheckMaxSize:()=>Ah,$ZodCheckMimeType:()=>Mh,$ZodCheckMinLength:()=>Ch,$ZodCheckMinSize:()=>wh,$ZodCheckMultipleOf:()=>Sh,$ZodCheckNumberFormat:()=>Th,$ZodCheckOverwrite:()=>Lh,$ZodCheckProperty:()=>jh,$ZodCheckRegex:()=>kh,$ZodCheckSizeEquals:()=>Ih,$ZodCheckStartsWith:()=>Dh,$ZodCheckStringFormat:()=>Di,$ZodCheckUpperCase:()=>Nh,$ZodCodec:()=>Li,$ZodCustom:()=>ws,$ZodCustomStringFormat:()=>Vl,$ZodDate:()=>ys,$ZodDefault:()=>nd,$ZodDiscriminatedUnion:()=>bs,$ZodE164:()=>Bl,$ZodEmail:()=>wl,$ZodEmoji:()=>Il,$ZodEncodeError:()=>Gn,$ZodEnum:()=>Ps,$ZodError:()=>os,$ZodExactOptional:()=>rd,$ZodFile:()=>td,$ZodFunction:()=>dd,$ZodGUID:()=>xl,$ZodIPv4:()=>zl,$ZodIPv6:()=>Dl,$ZodISODate:()=>ls,$ZodISODateTime:()=>us,$ZodISODuration:()=>ps,$ZodISOTime:()=>ds,$ZodIntersection:()=>Ql,$ZodJWT:()=>ql,$ZodKSUID:()=>Nl,$ZodLazy:()=>fd,$ZodLiteral:()=>Ss,$ZodMAC:()=>Ul,$ZodMap:()=>Yl,$ZodNaN:()=>cd,$ZodNanoID:()=>Rl,$ZodNever:()=>Jl,$ZodNonOptional:()=>id,$ZodNull:()=>Wl,$ZodNullable:()=>xs,$ZodNumber:()=>Ui,$ZodNumberFormat:()=>fs,$ZodObject:()=>Kl,$ZodObjectJIT:()=>Vh,$ZodOptional:()=>Mi,$ZodPipe:()=>As,$ZodPrefault:()=>od,$ZodPromise:()=>pd,$ZodReadonly:()=>ud,$ZodRealError:()=>Xt,$ZodRecord:()=>Es,$ZodRegistry:()=>md,$ZodSet:()=>ed,$ZodString:()=>xn,$ZodStringFormat:()=>qe,$ZodSuccess:()=>ad,$ZodSymbol:()=>Zl,$ZodTemplateLiteral:()=>ld,$ZodTransform:()=>Ts,$ZodTuple:()=>vs,$ZodType:()=>ge,$ZodULID:()=>kl,$ZodURL:()=>cs,$ZodUUID:()=>Al,$ZodUndefined:()=>Gl,$ZodUnion:()=>No,$ZodUnknown:()=>hs,$ZodVoid:()=>gs,$ZodXID:()=>$l,$ZodXor:()=>Xl,$brand:()=>Xa,$constructor:()=>w,$input:()=>gd,$output:()=>hd,Doc:()=>ss,JSONSchema:()=>eT,JSONSchemaGenerator:()=>Ld,NEVER:()=>rl,TimePrecision:()=>_d,_any:()=>dc,_array:()=>Ug,_base64:()=>Xs,_base64url:()=>Qs,_bigint:()=>Sd,_boolean:()=>cc,_catch:()=>ID,_check:()=>YS,_cidrv4:()=>Js,_cidrv6:()=>Ks,_coercedBigint:()=>lc,_coercedBoolean:()=>uc,_coercedDate:()=>mc,_coercedNumber:()=>ac,_coercedString:()=>Ns,_cuid:()=>Bs,_cuid2:()=>qs,_custom:()=>vc,_date:()=>Cd,_decode:()=>ul,_decodeAsync:()=>dl,_default:()=>xD,_discriminatedUnion:()=>fD,_e164:()=>Ys,_email:()=>zs,_emoji:()=>Ls,_encode:()=>cl,_encodeAsync:()=>ll,_endsWith:()=>Lo,_enum:()=>bD,_file:()=>kd,_float32:()=>bd,_float64:()=>vd,_gt:()=>Br,_gte:()=>_t,_guid:()=>qi,_includes:()=>jo,_int:()=>sc,_int32:()=>Ed,_int64:()=>Td,_intersection:()=>mD,_ipv4:()=>Gs,_ipv6:()=>Ws,_isoDate:()=>rc,_isoDateTime:()=>tc,_isoDuration:()=>oc,_isoTime:()=>nc,_jwt:()=>ec,_ksuid:()=>Zs,_lazy:()=>kD,_length:()=>eo,_literal:()=>ED,_lowercase:()=>Do,_lt:()=>Fr,_lte:()=>Ft,_mac:()=>yd,_map:()=>yD,_max:()=>Ft,_maxLength:()=>Yn,_maxSize:()=>wn,_mime:()=>Fo,_min:()=>_t,_minLength:()=>lt,_minSize:()=>qr,_multipleOf:()=>An,_nan:()=>Od,_nanoid:()=>Fs,_nativeEnum:()=>vD,_negative:()=>gc,_never:()=>Rd,_nonnegative:()=>_c,_nonoptional:()=>AD,_nonpositive:()=>yc,_normalize:()=>Bo,_null:()=>Id,_nullable:()=>TD,_number:()=>ic,_optional:()=>SD,_overwrite:()=>wr,_parse:()=>Ci,_parseAsync:()=>Oi,_pipe:()=>RD,_positive:()=>hc,_promise:()=>$D,_property:()=>bc,_readonly:()=>CD,_record:()=>gD,_refine:()=>Ec,_regex:()=>Ct,_safeDecode:()=>fl,_safeDecodeAsync:()=>hl,_safeEncode:()=>pl,_safeEncodeAsync:()=>ml,_safeParse:()=>ki,_safeParseAsync:()=>Ni,_set:()=>_D,_size:()=>Qn,_slugify:()=>Vi,_startsWith:()=>Mo,_string:()=>$s,_stringFormat:()=>Zo,_stringbool:()=>Dd,_success:()=>wD,_superRefine:()=>$d,_symbol:()=>Ad,_templateLiteral:()=>OD,_toLowerCase:()=>Vo,_toUpperCase:()=>Ho,_transform:()=>PD,_trim:()=>qo,_tuple:()=>hD,_uint32:()=>Pd,_uint64:()=>xd,_ulid:()=>Vs,_undefined:()=>wd,_union:()=>dD,_unknown:()=>pc,_uppercase:()=>Uo,_url:()=>zo,_uuid:()=>Ds,_uuidv4:()=>Us,_uuidv6:()=>js,_uuidv7:()=>Ms,_void:()=>fc,_xid:()=>Hs,_xor:()=>pD,clone:()=>vt,config:()=>at,createStandardJSONSchemaMethod:()=>Hi,createToJSONSchemaMethod:()=>jg,decode:()=>vS,decodeAsync:()=>PS,describe:()=>Nd,encode:()=>bS,encodeAsync:()=>ES,extractDefs:()=>ro,finalize:()=>no,flattenError:()=>Ii,formatError:()=>Ri,globalConfig:()=>Ka,globalRegistry:()=>Et,initializeContext:()=>to,isValidBase64:()=>qh,isValidBase64URL:()=>VS,isValidJWT:()=>HS,locales:()=>Bi,meta:()=>zd,parse:()=>Co,parseAsync:()=>Oo,prettifyError:()=>sl,process:()=>Ve,regexes:()=>Qt,registry:()=>ks,safeDecode:()=>TS,safeDecodeAsync:()=>AS,safeEncode:()=>SS,safeEncodeAsync:()=>xS,safeParse:()=>$i,safeParseAsync:()=>zi,toDotPath:()=>_S,toJSONSchema:()=>Pc,treeifyError:()=>al,util:()=>X,version:()=>Fh});var rl=Object.freeze({status:"aborted"});function w(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(w,"$constructor");var Xa=Symbol("zod_brand"),Lr=class extends Error{static{a(this,"$ZodAsyncError")}constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Gn=class extends Error{static{a(this,"$ZodEncodeError")}constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}},Ka={};function at(e){return e&&Object.assign(Ka,e),Ka}a(at,"config");var X={};Jt(X,{BIGINT_FORMAT_RANGES:()=>Wm,Class:()=>Fm,NUMBER_FORMAT_RANGES:()=>Gm,aborted:()=>Xn,allowsEval:()=>Vm,assert:()=>wN,assertEqual:()=>SN,assertIs:()=>xN,assertNever:()=>AN,assertNotEqual:()=>TN,assignProp:()=>Jn,base64ToUint8Array:()=>hS,base64urlToUint8Array:()=>jN,cached:()=>Ai,captureStackTrace:()=>ol,cleanEnum:()=>UN,cleanRegex:()=>es,clone:()=>vt,cloneDef:()=>RN,createTransparentProxy:()=>zN,defineLazy:()=>Te,esc:()=>nl,escapeRegex:()=>Ar,extend:()=>dS,finalizeIssue:()=>Kt,floatSafeRemainder:()=>Bm,getElementAtPath:()=>CN,getEnumValues:()=>Ya,getLengthableOrigin:()=>ns,getParsedType:()=>NN,getSizableOrigin:()=>rs,hexToUint8Array:()=>LN,isObject:()=>Ro,isPlainObject:()=>Kn,issue:()=>wi,joinValues:()=>F,jsonStringifyReplacer:()=>xi,merge:()=>DN,mergeDefs:()=>Tn,normalizeParams:()=>J,nullish:()=>Wn,numKeys:()=>$N,objectClone:()=>IN,omit:()=>lS,optionalKeys:()=>Zm,parsedType:()=>Q,partial:()=>fS,pick:()=>uS,prefixIssues:()=>ur,primitiveTypes:()=>Hm,promiseAllObject:()=>ON,propertyKeyTypes:()=>ts,randomString:()=>kN,required:()=>mS,safeExtend:()=>pS,shallowClone:()=>il,slugify:()=>qm,stringifyPrimitive:()=>K,uint8ArrayToBase64:()=>gS,uint8ArrayToBase64url:()=>MN,uint8ArrayToHex:()=>FN,unwrapMessage:()=>Qa});function SN(e){return e}a(SN,"assertEqual");function TN(e){return e}a(TN,"assertNotEqual");function xN(e){}a(xN,"assertIs");function AN(e){throw new Error("Unexpected value in exhaustive check")}a(AN,"assertNever");function wN(e){}a(wN,"assert");function Ya(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(Ya,"getEnumValues");function F(e,t="|"){return e.map(n=>K(n)).join(t)}a(F,"joinValues");function xi(e,t){return typeof t=="bigint"?t.toString():t}a(xi,"jsonStringifyReplacer");function Ai(e){return{get value(){{let n=e();return Object.defineProperty(this,"value",{value:n}),n}throw new Error("cached value already set")}}}a(Ai,"cached");function Wn(e){return e==null}a(Wn,"nullish");function es(e){let t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}a(es,"cleanRegex");function Bm(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(Bm,"floatSafeRemainder");var cS=Symbol("evaluating");function Te(e,t,n){let o;Object.defineProperty(e,t,{get(){if(o!==cS)return o===void 0&&(o=cS,o=n()),o},set(r){Object.defineProperty(e,t,{value:r})},configurable:!0})}a(Te,"defineLazy");function IN(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}a(IN,"objectClone");function Jn(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}a(Jn,"assignProp");function Tn(...e){let t={};for(let n of e){let o=Object.getOwnPropertyDescriptors(n);Object.assign(t,o)}return Object.defineProperties({},t)}a(Tn,"mergeDefs");function RN(e){return Tn(e._zod.def)}a(RN,"cloneDef");function CN(e,t){return t?t.reduce((n,o)=>n?.[o],e):e}a(CN,"getElementAtPath");function ON(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(ON,"promiseAllObject");function kN(e=10){let t="abcdefghijklmnopqrstuvwxyz",n="";for(let o=0;o<e;o++)n+=t[Math.floor(Math.random()*t.length)];return n}a(kN,"randomString");function nl(e){return JSON.stringify(e)}a(nl,"esc");function qm(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}a(qm,"slugify");var ol="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Ro(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}a(Ro,"isObject");var Vm=Ai(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function Kn(e){if(Ro(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let n=t.prototype;return!(Ro(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}a(Kn,"isPlainObject");function il(e){return Kn(e)?{...e}:Array.isArray(e)?[...e]:e}a(il,"shallowClone");function $N(e){let t=0;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}a($N,"numKeys");var NN=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"),ts=new Set(["string","number","symbol"]),Hm=new Set(["string","number","bigint","boolean","symbol","undefined"]);function Ar(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}a(Ar,"escapeRegex");function vt(e,t,n){let o=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(o._zod.parent=e),o}a(vt,"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 zN(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(zN,"createTransparentProxy");function K(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}a(K,"stringifyPrimitive");function Zm(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}a(Zm,"optionalKeys");var Gm={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]},Wm={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function uS(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=Tn(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 Jn(this,"shape",s),s},checks:[]});return vt(e,i)}a(uS,"pick");function lS(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=Tn(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 Jn(this,"shape",s),s},checks:[]});return vt(e,i)}a(lS,"omit");function dS(e,t){if(!Kn(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=Tn(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return Jn(this,"shape",i),i}});return vt(e,r)}a(dS,"extend");function pS(e,t){if(!Kn(t))throw new Error("Invalid input to safeExtend: expected a plain object");let n=Tn(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t};return Jn(this,"shape",o),o}});return vt(e,n)}a(pS,"safeExtend");function DN(e,t){let n=Tn(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t._zod.def.shape};return Jn(this,"shape",o),o},get catchall(){return t._zod.def.catchall},checks:[]});return vt(e,n)}a(DN,"merge");function fS(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=Tn(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 Jn(this,"shape",d),d},checks:[]});return vt(t,s)}a(fS,"partial");function mS(e,t,n){let o=Tn(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 Jn(this,"shape",i),i}});return vt(t,o)}a(mS,"required");function Xn(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(Xn,"aborted");function ur(e,t){return t.map(n=>{var o;return(o=n).path??(o.path=[]),n.path.unshift(e),n})}a(ur,"prefixIssues");function Qa(e){return typeof e=="string"?e:e?.message}a(Qa,"unwrapMessage");function Kt(e,t,n){let o={...e,path:e.path??[]};if(!e.message){let r=Qa(e.inst?._zod.def?.error?.(e))??Qa(t?.error?.(e))??Qa(n.customError?.(e))??Qa(n.localeError?.(e))??"Invalid input";o.message=r}return delete o.inst,delete o.continue,t?.reportInput||delete o.input,o}a(Kt,"finalizeIssue");function rs(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}a(rs,"getSizableOrigin");function ns(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}a(ns,"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 wi(...e){let[t,n,o]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:o}:{...t}}a(wi,"issue");function UN(e){return Object.entries(e).filter(([t,n])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}a(UN,"cleanEnum");function hS(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(hS,"base64ToUint8Array");function gS(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}a(gS,"uint8ArrayToBase64");function jN(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),n="=".repeat((4-t.length%4)%4);return hS(t+n)}a(jN,"base64urlToUint8Array");function MN(e){return gS(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}a(MN,"uint8ArrayToBase64url");function LN(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(LN,"hexToUint8Array");function FN(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}a(FN,"uint8ArrayToHex");var Fm=class{static{a(this,"Class")}constructor(...t){}};var yS=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,xi,2),Object.defineProperty(e,"toString",{value:a(()=>e.message,"value"),enumerable:!1})},"initializer"),os=w("$ZodError",yS),Xt=w("$ZodError",yS,{Parent:Error});function Ii(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(Ii,"flattenError");function Ri(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(Ri,"formatError");function al(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(al,"treeifyError");function _S(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(_S,"toDotPath");function sl(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 ${_S(o.path)}`);return t.join(`
56
+ `)}a(sl,"prettifyError");var Ci=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 Lr;if(s.issues.length){let u=new(r?.Err??e)(s.issues.map(d=>Kt(d,i,at())));throw ol(u,r?.callee),u}return s.value},"_parse"),Co=Ci(Xt),Oi=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=>Kt(d,i,at())));throw ol(u,r?.callee),u}return s.value},"_parseAsync"),Oo=Oi(Xt),ki=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 Lr;return i.issues.length?{success:!1,error:new(e??os)(i.issues.map(s=>Kt(s,r,at())))}:{success:!0,data:i.value}},"_safeParse"),$i=ki(Xt),Ni=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=>Kt(s,r,at())))}:{success:!0,data:i.value}},"_safeParseAsync"),zi=Ni(Xt),cl=a(e=>(t,n,o)=>{let r=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return Ci(e)(t,n,r)},"_encode"),bS=cl(Xt),ul=a(e=>(t,n,o)=>Ci(e)(t,n,o),"_decode"),vS=ul(Xt),ll=a(e=>async(t,n,o)=>{let r=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return Oi(e)(t,n,r)},"_encodeAsync"),ES=ll(Xt),dl=a(e=>async(t,n,o)=>Oi(e)(t,n,o),"_decodeAsync"),PS=dl(Xt),pl=a(e=>(t,n,o)=>{let r=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return ki(e)(t,n,r)},"_safeEncode"),SS=pl(Xt),fl=a(e=>(t,n,o)=>ki(e)(t,n,o),"_safeDecode"),TS=fl(Xt),ml=a(e=>async(t,n,o)=>{let r=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return Ni(e)(t,n,r)},"_safeEncodeAsync"),xS=ml(Xt),hl=a(e=>async(t,n,o)=>Ni(e)(t,n,o),"_safeDecodeAsync"),AS=hl(Xt);var Qt={};Jt(Qt,{base64:()=>lh,base64url:()=>gl,bigint:()=>gh,boolean:()=>_h,browserEmail:()=>KN,cidrv4:()=>ch,cidrv6:()=>uh,cuid:()=>Jm,cuid2:()=>Km,date:()=>ph,datetime:()=>mh,domain:()=>YN,duration:()=>th,e164:()=>dh,email:()=>nh,emoji:()=>oh,extendedDuration:()=>qN,guid:()=>rh,hex:()=>ez,hostname:()=>QN,html5Email:()=>GN,idnEmail:()=>JN,integer:()=>yh,ipv4:()=>ih,ipv6:()=>ah,ksuid:()=>Ym,lowercase:()=>Eh,mac:()=>sh,md5_base64:()=>rz,md5_base64url:()=>nz,md5_hex:()=>tz,nanoid:()=>eh,null:()=>bh,number:()=>yl,rfc5322Email:()=>WN,sha1_base64:()=>iz,sha1_base64url:()=>az,sha1_hex:()=>oz,sha256_base64:()=>cz,sha256_base64url:()=>uz,sha256_hex:()=>sz,sha384_base64:()=>dz,sha384_base64url:()=>pz,sha384_hex:()=>lz,sha512_base64:()=>mz,sha512_base64url:()=>hz,sha512_hex:()=>fz,string:()=>hh,time:()=>fh,ulid:()=>Xm,undefined:()=>vh,unicodeEmail:()=>wS,uppercase:()=>Ph,uuid:()=>ko,uuid4:()=>VN,uuid6:()=>HN,uuid7:()=>ZN,xid:()=>Qm});var Jm=/^[cC][^\s-]{8,}$/,Km=/^[0-9a-z]+$/,Xm=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Qm=/^[0-9a-vA-V]{20}$/,Ym=/^[A-Za-z0-9]{27}$/,eh=/^[a-zA-Z0-9_-]{21}$/,th=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,qN=/^[-+]?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)?)??$/,rh=/^([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})$/,ko=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"),VN=ko(4),HN=ko(6),ZN=ko(7),nh=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,GN=/^[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])?)*$/,WN=/^(([^<>()\[\]\\.,;:\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,}))$/,wS=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,JN=wS,KN=/^[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])?)*$/,XN="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function oh(){return new RegExp(XN,"u")}a(oh,"emoji");var ih=/^(?:(?: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])$/,ah=/^(([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}|:))$/,sh=a(e=>{let t=Ar(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"),ch=/^((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])$/,uh=/^(([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])$/,lh=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,gl=/^[A-Za-z0-9_-]*$/,QN=/^(?=.{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])?)*\.?$/,YN=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,dh=/^\+[1-9]\d{6,14}$/,IS="(?:(?:\\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])))",ph=new RegExp(`^${IS}$`);function RS(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(RS,"timeSource");function fh(e){return new RegExp(`^${RS(e)}$`)}a(fh,"time");function mh(e){let t=RS({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(`^${IS}T(?:${o})$`)}a(mh,"datetime");var hh=a(e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},"string"),gh=/^-?\d+n?$/,yh=/^-?\d+$/,yl=/^-?\d+(?:\.\d+)?$/,_h=/^(?:true|false)$/i,bh=/^null$/i;var vh=/^undefined$/i;var Eh=/^[^A-Z]*$/,Ph=/^[^a-z]*$/,ez=/^[0-9a-fA-F]*$/;function is(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}a(is,"fixedBase64");function as(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}a(as,"fixedBase64url");var tz=/^[0-9a-fA-F]{32}$/,rz=is(22,"=="),nz=as(22),oz=/^[0-9a-fA-F]{40}$/,iz=is(27,"="),az=as(27),sz=/^[0-9a-fA-F]{64}$/,cz=is(43,"="),uz=as(43),lz=/^[0-9a-fA-F]{96}$/,dz=is(64,""),pz=as(64),fz=/^[0-9a-fA-F]{128}$/,mz=is(86,"=="),hz=as(86);var Je=w("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),OS={number:"number",bigint:"bigint",object:"date"},_l=w("$ZodCheckLessThan",(e,t)=>{Je.init(e,t);let n=OS[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})}}),bl=w("$ZodCheckGreaterThan",(e,t)=>{Je.init(e,t);let n=OS[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})}}),Sh=w("$ZodCheckMultipleOf",(e,t)=>{Je.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):Bm(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})}}),Th=w("$ZodCheckNumberFormat",(e,t)=>{Je.init(e,t),t.format=t.format||"float64";let n=t.format?.includes("int"),o=n?"int":"number",[r,i]=Gm[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=yh)}),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})}}),xh=w("$ZodCheckBigIntFormat",(e,t)=>{Je.init(e,t);let[n,o]=Wm[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})}}),Ah=w("$ZodCheckMaxSize",(e,t)=>{var n;Je.init(e,t),(n=e._zod.def).when??(n.when=o=>{let r=o.value;return!Wn(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:rs(r),code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),wh=w("$ZodCheckMinSize",(e,t)=>{var n;Je.init(e,t),(n=e._zod.def).when??(n.when=o=>{let r=o.value;return!Wn(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:rs(r),code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Ih=w("$ZodCheckSizeEquals",(e,t)=>{var n;Je.init(e,t),(n=e._zod.def).when??(n.when=o=>{let r=o.value;return!Wn(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:rs(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})}}),Rh=w("$ZodCheckMaxLength",(e,t)=>{var n;Je.init(e,t),(n=e._zod.def).when??(n.when=o=>{let r=o.value;return!Wn(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=ns(r);o.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Ch=w("$ZodCheckMinLength",(e,t)=>{var n;Je.init(e,t),(n=e._zod.def).when??(n.when=o=>{let r=o.value;return!Wn(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=ns(r);o.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Oh=w("$ZodCheckLengthEquals",(e,t)=>{var n;Je.init(e,t),(n=e._zod.def).when??(n.when=o=>{let r=o.value;return!Wn(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=ns(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})}}),Di=w("$ZodCheckStringFormat",(e,t)=>{var n,o;Je.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=()=>{})}),kh=w("$ZodCheckRegex",(e,t)=>{Di.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})}}),$h=w("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Eh),Di.init(e,t)}),Nh=w("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Ph),Di.init(e,t)}),zh=w("$ZodCheckIncludes",(e,t)=>{Je.init(e,t);let n=Ar(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})}}),Dh=w("$ZodCheckStartsWith",(e,t)=>{Je.init(e,t);let n=new RegExp(`^${Ar(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})}}),Uh=w("$ZodCheckEndsWith",(e,t)=>{Je.init(e,t);let n=new RegExp(`.*${Ar(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 CS(e,t,n){e.issues.length&&t.issues.push(...ur(n,e.issues))}a(CS,"handleCheckPropertyResult");var jh=w("$ZodCheckProperty",(e,t)=>{Je.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=>CS(r,n,t.property));CS(o,n,t.property)}}),Mh=w("$ZodCheckMimeType",(e,t)=>{Je.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})}}),Lh=w("$ZodCheckOverwrite",(e,t)=>{Je.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});var ss=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 Fh={major:4,minor:3,patch:6};var ge=w("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Fh;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=Xn(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 Lr;if(f||h instanceof Promise)f=(f??Promise.resolve()).then(async()=>{await h,s.issues.length!==y&&(p||(p=Xn(s,y)))});else{if(s.issues.length===y)continue;p||(p=Xn(s,y))}}return f?f.then(()=>s):s},"runChecks"),i=a((s,u,d)=>{if(Xn(s))return s.aborted=!0,s;let p=r(u,o,d);if(p instanceof Promise){if(d.async===!1)throw new Lr;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 Lr;return d.then(p=>r(p,o,u))}return r(d,o,u)}}Te(e,"~standard",()=>({validate:a(r=>{try{let i=$i(e,r);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return zi(e,r).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},"validate"),vendor:"zod",version:1}))}),xn=w("$ZodString",(e,t)=>{ge.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??hh(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}}),qe=w("$ZodStringFormat",(e,t)=>{Di.init(e,t),xn.init(e,t)}),xl=w("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=rh),qe.init(e,t)}),Al=w("$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=ko(o))}else t.pattern??(t.pattern=ko());qe.init(e,t)}),wl=w("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=nh),qe.init(e,t)}),cs=w("$ZodURL",(e,t)=>{qe.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})}}}),Il=w("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=oh()),qe.init(e,t)}),Rl=w("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=eh),qe.init(e,t)}),Cl=w("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Jm),qe.init(e,t)}),Ol=w("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Km),qe.init(e,t)}),kl=w("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Xm),qe.init(e,t)}),$l=w("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Qm),qe.init(e,t)}),Nl=w("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Ym),qe.init(e,t)}),us=w("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=mh(t)),qe.init(e,t)}),ls=w("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=ph),qe.init(e,t)}),ds=w("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=fh(t)),qe.init(e,t)}),ps=w("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=th),qe.init(e,t)}),zl=w("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=ih),qe.init(e,t),e._zod.bag.format="ipv4"}),Dl=w("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=ah),qe.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})}}}),Ul=w("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=sh(t.delimiter)),qe.init(e,t),e._zod.bag.format="mac"}),jl=w("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=ch),qe.init(e,t)}),Ml=w("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=uh),qe.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 qh(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}a(qh,"isValidBase64");var Ll=w("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=lh),qe.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{qh(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function VS(e){if(!gl.test(e))return!1;let t=e.replace(/[-_]/g,o=>o==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return qh(n)}a(VS,"isValidBase64URL");var Fl=w("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=gl),qe.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{VS(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),Bl=w("$ZodE164",(e,t)=>{t.pattern??(t.pattern=dh),qe.init(e,t)});function HS(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(HS,"isValidJWT");var ql=w("$ZodJWT",(e,t)=>{qe.init(e,t),e._zod.check=n=>{HS(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),Vl=w("$ZodCustomStringFormat",(e,t)=>{qe.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})}}),Ui=w("$ZodNumber",(e,t)=>{ge.init(e,t),e._zod.pattern=e._zod.bag.pattern??yl,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}}),fs=w("$ZodNumberFormat",(e,t)=>{Th.init(e,t),Ui.init(e,t)}),$o=w("$ZodBoolean",(e,t)=>{ge.init(e,t),e._zod.pattern=_h,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}}),ji=w("$ZodBigInt",(e,t)=>{ge.init(e,t),e._zod.pattern=gh,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}}),Hl=w("$ZodBigIntFormat",(e,t)=>{xh.init(e,t),ji.init(e,t)}),Zl=w("$ZodSymbol",(e,t)=>{ge.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}}),Gl=w("$ZodUndefined",(e,t)=>{ge.init(e,t),e._zod.pattern=vh,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}}),Wl=w("$ZodNull",(e,t)=>{ge.init(e,t),e._zod.pattern=bh,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}}),ms=w("$ZodAny",(e,t)=>{ge.init(e,t),e._zod.parse=n=>n}),hs=w("$ZodUnknown",(e,t)=>{ge.init(e,t),e._zod.parse=n=>n}),Jl=w("$ZodNever",(e,t)=>{ge.init(e,t),e._zod.parse=(n,o)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)}),gs=w("$ZodVoid",(e,t)=>{ge.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}}),ys=w("$ZodDate",(e,t)=>{ge.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 $S(e,t,n){e.issues.length&&t.issues.push(...ur(n,e.issues)),t.value[n]=e.value}a($S,"handleArrayResult");var _s=w("$ZodArray",(e,t)=>{ge.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=>$S(p,n,s))):$S(d,n,s)}return i.length?Promise.all(i).then(()=>n):n}});function Tl(e,t,n,o,r){if(e.issues.length){if(r&&!(n in o))return;t.issues.push(...ur(n,e.issues))}e.value===void 0?n in o&&(t.value[n]=void 0):t.value[n]=e.value}a(Tl,"handlePropertyResult");function ZS(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=Zm(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}a(ZS,"normalizeDef");function GS(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=>Tl(h,n,g,t,f))):Tl(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(GS,"handleCatchall");var Kl=w("$ZodObject",(e,t)=>{if(ge.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=Ai(()=>ZS(t));Te(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=Ro,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(S=>Tl(S,u,y,p,_))):Tl(P,u,y,p,_)}return i?GS(f,p,u,d,o.value,e):f.length?Promise.all(f).then(()=>u):u}}),Vh=w("$ZodObjectJIT",(e,t)=>{Kl.init(e,t);let n=e._zod.parse,o=Ai(()=>ZS(t)),r=a(y=>{let h=new ss(["shape","payload","ctx"]),_=o.value,P=a(V=>{let W=nl(V);return`shape[${W}]._zod.run({ value: input[${W}], issues: [] }, ctx)`},"parseStr");h.write("const input = payload.value;");let S=Object.create(null),T=0;for(let V of _.keys)S[V]=`key_${T++}`;h.write("const newResult = {};");for(let V of _.keys){let W=S[V],H=nl(V),re=y[V]?._zod?.optout==="optional";h.write(`const ${W} = ${P(V)};`),re?h.write(`
59
+ if (${W}.issues.length) {
60
+ if (${H} in input) {
61
+ payload.issues = payload.issues.concat(${W}.issues.map(iss => ({
62
+ ...iss,
63
+ path: iss.path ? [${H}, ...iss.path] : [${H}]
64
+ })));
65
+ }
66
+ }
67
+
68
+ if (${W}.value === undefined) {
69
+ if (${H} in input) {
70
+ newResult[${H}] = undefined;
71
+ }
72
+ } else {
73
+ newResult[${H}] = ${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 ? [${H}, ...iss.path] : [${H}]
81
+ })));
82
+ }
83
+
84
+ if (${W}.value === undefined) {
85
+ if (${H} in input) {
86
+ newResult[${H}] = undefined;
87
+ }
88
+ } else {
89
+ newResult[${H}] = ${W}.value;
90
+ }
91
+
92
+ `)}h.write("payload.value = newResult;"),h.write("return payload;");let R=h.compile();return(V,W)=>R(y,V,W)},"generateFastpass"),i,s=Ro,u=!Ka.jitless,p=u&&Vm.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?GS([],_,y,h,g,e):y):n(y,h):(y.issues.push({expected:"object",code:"invalid_type",input:_,inst:e}),y)}});function NS(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=>!Xn(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=>Kt(s,o,at())))}),t)}a(NS,"handleUnionResults");var No=w("$ZodUnion",(e,t)=>{ge.init(e,t),Te(e._zod,"optin",()=>t.options.some(r=>r._zod.optin==="optional")?"optional":void 0),Te(e._zod,"optout",()=>t.options.some(r=>r._zod.optout==="optional")?"optional":void 0),Te(e._zod,"values",()=>{if(t.options.every(r=>r._zod.values))return new Set(t.options.flatMap(r=>Array.from(r._zod.values)))}),Te(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=>es(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=>NS(d,r,e,i)):NS(u,r,e,i)}});function zS(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=>Kt(s,o,at())))}):t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:[],inclusive:!1}),t)}a(zS,"handleExclusiveUnionResults");var Xl=w("$ZodXor",(e,t)=>{No.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=>zS(d,r,e,i)):zS(u,r,e,i)}}),bs=w("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,No.init(e,t);let n=e._zod.parse;Te(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=Ai(()=>{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(!Ro(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=w("$ZodIntersection",(e,t)=>{ge.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])=>DS(n,d,p)):DS(n,i,s)}});function Bh(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(Kn(e)&&Kn(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=Bh(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=Bh(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(Bh,"mergeValues");function DS(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}),Xn(e))return e;let s=Bh(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(DS,"handleIntersectionResults");var vs=w("$ZodTuple",(e,t)=>{ge.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=>vl(y,o,p))):vl(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=>vl(h,o,p))):vl(y,o,p)}}return s.length?Promise.all(s).then(()=>o):o}});function vl(e,t,n){e.issues.length&&t.issues.push(...ur(n,e.issues)),t.value[n]=e.value}a(vl,"handleTupleResult");var Es=w("$ZodRecord",(e,t)=>{ge.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;if(!Kn(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(...ur(p,g.issues)),n.value[p]=g.value})):(f.issues.length&&n.issues.push(...ur(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"&&yl.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=>Kt(g,o,at())),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(...ur(u,g.issues)),n.value[d.value]=g.value})):(f.issues.length&&n.issues.push(...ur(u,f.issues)),n.value[d.value]=f.value)}}return i.length?Promise.all(i).then(()=>n):n}}),Yl=w("$ZodMap",(e,t)=>{ge.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])=>{US(f,g,n,s,r,e,o)})):US(d,p,n,s,r,e,o)}return i.length?Promise.all(i).then(()=>n):n}});function US(e,t,n,o,r,i,s){e.issues.length&&(ts.has(typeof o)?n.issues.push(...ur(o,e.issues)):n.issues.push({code:"invalid_key",origin:"map",input:r,inst:i,issues:e.issues.map(u=>Kt(u,s,at()))})),t.issues.length&&(ts.has(typeof o)?n.issues.push(...ur(o,t.issues)):n.issues.push({origin:"map",code:"invalid_element",input:r,inst:i,key:o,issues:t.issues.map(u=>Kt(u,s,at()))})),n.value.set(e.value,t.value)}a(US,"handleMapResult");var ed=w("$ZodSet",(e,t)=>{ge.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=>jS(d,n))):jS(u,n)}return i.length?Promise.all(i).then(()=>n):n}});function jS(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}a(jS,"handleSetResult");var Ps=w("$ZodEnum",(e,t)=>{ge.init(e,t);let n=Ya(t.entries),o=new Set(n);e._zod.values=o,e._zod.pattern=new RegExp(`^(${n.filter(r=>ts.has(typeof r)).map(r=>typeof r=="string"?Ar(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}}),Ss=w("$ZodLiteral",(e,t)=>{if(ge.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"?Ar(o):o?Ar(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}}),td=w("$ZodFile",(e,t)=>{ge.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}}),Ts=w("$ZodTransform",(e,t)=>{ge.init(e,t),e._zod.parse=(n,o)=>{if(o.direction==="backward")throw new Gn(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 Lr;return n.value=r,n}});function MS(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}a(MS,"handleOptionalResult");var Mi=w("$ZodOptional",(e,t)=>{ge.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Te(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Te(e._zod,"pattern",()=>{let n=t.innerType._zod.pattern;return n?new RegExp(`^(${es(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=>MS(i,n.value)):MS(r,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,o)}}),rd=w("$ZodExactOptional",(e,t)=>{Mi.init(e,t),Te(e._zod,"values",()=>t.innerType._zod.values),Te(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,o)=>t.innerType._zod.run(n,o)}),xs=w("$ZodNullable",(e,t)=>{ge.init(e,t),Te(e._zod,"optin",()=>t.innerType._zod.optin),Te(e._zod,"optout",()=>t.innerType._zod.optout),Te(e._zod,"pattern",()=>{let n=t.innerType._zod.pattern;return n?new RegExp(`^(${es(n.source)}|null)$`):void 0}),Te(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)}),nd=w("$ZodDefault",(e,t)=>{ge.init(e,t),e._zod.optin="optional",Te(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=>LS(i,t)):LS(r,t)}});function LS(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}a(LS,"handleDefaultResult");var od=w("$ZodPrefault",(e,t)=>{ge.init(e,t),e._zod.optin="optional",Te(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))}),id=w("$ZodNonOptional",(e,t)=>{ge.init(e,t),Te(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=>FS(i,e)):FS(r,e)}});function FS(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(FS,"handleNonOptionalResult");var ad=w("$ZodSuccess",(e,t)=>{ge.init(e,t),e._zod.parse=(n,o)=>{if(o.direction==="backward")throw new Gn("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)}}),sd=w("$ZodCatch",(e,t)=>{ge.init(e,t),Te(e._zod,"optin",()=>t.innerType._zod.optin),Te(e._zod,"optout",()=>t.innerType._zod.optout),Te(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=>Kt(s,o,at()))},input:n.value}),n.issues=[]),n)):(n.value=r.value,r.issues.length&&(n.value=t.catchValue({...n,error:{issues:r.issues.map(i=>Kt(i,o,at()))},input:n.value}),n.issues=[]),n)}}),cd=w("$ZodNaN",(e,t)=>{ge.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)}),As=w("$ZodPipe",(e,t)=>{ge.init(e,t),Te(e._zod,"values",()=>t.in._zod.values),Te(e._zod,"optin",()=>t.in._zod.optin),Te(e._zod,"optout",()=>t.out._zod.optout),Te(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=>El(s,t.in,o)):El(i,t.in,o)}let r=t.in._zod.run(n,o);return r instanceof Promise?r.then(i=>El(i,t.out,o)):El(r,t.out,o)}});function El(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}a(El,"handlePipeResult");var Li=w("$ZodCodec",(e,t)=>{ge.init(e,t),Te(e._zod,"values",()=>t.in._zod.values),Te(e._zod,"optin",()=>t.in._zod.optin),Te(e._zod,"optout",()=>t.out._zod.optout),Te(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=>Pl(s,t,o)):Pl(i,t,o)}else{let i=t.out._zod.run(n,o);return i instanceof Promise?i.then(s=>Pl(s,t,o)):Pl(i,t,o)}}});function Pl(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=>Sl(e,i,t.out,n)):Sl(e,r,t.out,n)}else{let r=t.reverseTransform(e.value,e);return r instanceof Promise?r.then(i=>Sl(e,i,t.in,n)):Sl(e,r,t.in,n)}}a(Pl,"handleCodecAResult");function Sl(e,t,n,o){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:t,issues:e.issues},o)}a(Sl,"handleCodecTxResult");var ud=w("$ZodReadonly",(e,t)=>{ge.init(e,t),Te(e._zod,"propValues",()=>t.innerType._zod.propValues),Te(e._zod,"values",()=>t.innerType._zod.values),Te(e._zod,"optin",()=>t.innerType?._zod?.optin),Te(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(BS):BS(r)}});function BS(e){return e.value=Object.freeze(e.value),e}a(BS,"handleReadonlyResult");var ld=w("$ZodTemplateLiteral",(e,t)=>{ge.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||Hm.has(typeof o))n.push(Ar(`${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)}),dd=w("$ZodFunction",(e,t)=>(ge.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?Co(e._def.input,o):o,i=Reflect.apply(n,this,r);return e._def.output?Co(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 Oo(e._def.input,o):o,i=await Reflect.apply(n,this,r);return e._def.output?await Oo(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 vs({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)),pd=w("$ZodPromise",(e,t)=>{ge.init(e,t),e._zod.parse=(n,o)=>Promise.resolve(n.value).then(r=>t.innerType._zod.run({value:r,issues:[]},o))}),fd=w("$ZodLazy",(e,t)=>{ge.init(e,t),Te(e._zod,"innerType",()=>t.getter()),Te(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),Te(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),Te(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),Te(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(n,o)=>e._zod.innerType._zod.run(n,o)}),ws=w("$ZodCustom",(e,t)=>{Je.init(e,t),ge.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=>qS(i,n,o,e));qS(r,n,o,e)}});function qS(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(wi(r))}}a(qS,"handleRefineResult");var Bi={};Jt(Bi,{ar:()=>Hh,az:()=>Zh,be:()=>Gh,bg:()=>Wh,ca:()=>Jh,cs:()=>Kh,da:()=>Xh,de:()=>Qh,en:()=>Is,eo:()=>Yh,es:()=>eg,fa:()=>tg,fi:()=>rg,fr:()=>ng,frCA:()=>og,he:()=>ig,hu:()=>ag,hy:()=>sg,id:()=>cg,is:()=>ug,it:()=>lg,ja:()=>dg,ka:()=>pg,kh:()=>fg,km:()=>Rs,ko:()=>mg,lt:()=>hg,mk:()=>gg,ms:()=>yg,nl:()=>_g,no:()=>bg,ota:()=>vg,pl:()=>Pg,ps:()=>Eg,pt:()=>Sg,ru:()=>Tg,sl:()=>xg,sv:()=>Ag,ta:()=>wg,th:()=>Ig,tr:()=>Rg,ua:()=>Cg,uk:()=>Os,ur:()=>Og,uz:()=>kg,vi:()=>$g,yo:()=>Dg,zhCN:()=>Ng,zhTW:()=>zg});var yz=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: ${F(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":""}: ${F(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 Hh(){return{localeError:yz()}}a(Hh,"default");var _z=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: ${F(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":""}: ${F(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 Zh(){return{localeError:_z()}}a(Zh,"default");function WS(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(WS,"getBelarusianPlural");var bz=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 ${F(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);if(s){let u=Number(r.maximum),d=WS(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=WS(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"}: ${F(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 Gh(){return{localeError:bz()}}a(Gh,"default");var vz=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 ${F(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":""}: ${F(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 Wh(){return{localeError:vz()}}a(Wh,"default");var Ez=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 ${F(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":""}: ${F(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 Jh(){return{localeError:Ez()}}a(Jh,"default");var Pz=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 ${F(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: ${F(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 Kh(){return{localeError:Pz()}}a(Kh,"default");var Sz=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 ${F(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"}: ${F(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 Xh(){return{localeError:Sz()}}a(Xh,"default");var Tz=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 ${F(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"}: ${F(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 Qh(){return{localeError:Tz()}}a(Qh,"default");var xz=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 ${F(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":""}: ${F(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 Is(){return{localeError:xz()}}a(Is,"default");var Az=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 ${F(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":""}: ${F(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 Yh(){return{localeError:Az()}}a(Yh,"default");var wz=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 ${F(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":""}: ${F(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 eg(){return{localeError:wz()}}a(eg,"default");var Iz=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 ${F(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: ${F(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 tg(){return{localeError:Iz()}}a(tg,"default");var Rz=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: ${F(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"}: ${F(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 rg(){return{localeError:Rz()}}a(rg,"default");var Cz=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 ${F(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":""} : ${F(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 ng(){return{localeError:Cz()}}a(ng,"default");var Oz=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 ${F(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":""} : ${F(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 og(){return{localeError:Oz()}}a(og,"default");var kz=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 S=(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 ${S}`}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"}: ${F(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 ig(){return{localeError:kz()}}a(ig,"default");var $z=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 ${F(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":""}: ${F(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 ag(){return{localeError:$z()}}a(ag,"default");function JS(e,t,n){return Math.abs(e)===1?t:n}a(JS,"getArmenianPlural");function Fi(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(Fi,"withDefiniteArticle");var Nz=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 ${F(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);if(s){let u=Number(r.maximum),d=JS(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 ${Fi(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 ${Fi(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=JS(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 ${Fi(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 ${Fi(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":""}. ${F(r.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${Fi(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 ${Fi(r.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}},"error");function sg(){return{localeError:Nz()}}a(sg,"default");var zz=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 ${F(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":""}: ${F(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 cg(){return{localeError:zz()}}a(cg,"default");var Dz=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 ${F(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"}: ${F(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 ug(){return{localeError:Dz()}}a(ug,"default");var Uz=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 ${F(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"}: ${F(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 lg(){return{localeError:Uz()}}a(lg,"default");var jz=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: ${F(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":""}: ${F(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 dg(){return{localeError:jz()}}a(dg,"default");var Mz=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 ${F(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"}: ${F(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 pg(){return{localeError:Mz()}}a(pg,"default");var Lz=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 ${F(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 ${F(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 Rs(){return{localeError:Lz()}}a(Rs,"default");function fg(){return Rs()}a(fg,"default");var Fz=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: ${F(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: ${F(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 mg(){return{localeError:Fz()}}a(mg,"default");var Cs=a(e=>e.charAt(0).toUpperCase()+e.slice(1),"capitalizeFirstCharacter");function KS(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(KS,"getUnitTypeFromNumber");var Bz=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 ${F(r.values,"|")} pasirinkim\u0173`;case"too_big":{let i=o[r.origin]??r.origin,s=t(r.origin,KS(Number(r.maximum)),r.inclusive??!1,"smaller");if(s?.verb)return`${Cs(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`${Cs(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,KS(Number(r.minimum)),r.inclusive??!1,"bigger");if(s?.verb)return`${Cs(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`${Cs(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"}: ${F(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`${Cs(i??r.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}},"error");function hg(){return{localeError:Bz()}}a(hg,"default");var qz=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 ${F(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"}: ${F(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 gg(){return{localeError:qz()}}a(gg,"default");var Vz=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 ${F(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: ${F(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 yg(){return{localeError:Vz()}}a(yg,"default");var Hz=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 ${F(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":""}: ${F(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 _g(){return{localeError:Hz()}}a(_g,"default");var Zz=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 ${F(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"}: ${F(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 bg(){return{localeError:Zz()}}a(bg,"default");var Gz=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 ${F(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":""}: ${F(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 vg(){return{localeError:Gz()}}a(vg,"default");var Wz=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 ${F(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"}: ${F(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 Eg(){return{localeError:Wz()}}a(Eg,"default");var Jz=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 ${F(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":""}: ${F(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 Pg(){return{localeError:Jz()}}a(Pg,"default");var Kz=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 ${F(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":""}: ${F(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 Sg(){return{localeError:Kz()}}a(Sg,"default");function XS(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(XS,"getRussianPlural");var Xz=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 ${F(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);if(s){let u=Number(r.maximum),d=XS(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=XS(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":""}: ${F(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 Tg(){return{localeError:Xz()}}a(Tg,"default");var Qz=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 ${F(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"}: ${F(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 xg(){return{localeError:Qz()}}a(xg,"default");var Yz=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 ${F(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"}: ${F(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 Ag(){return{localeError:Yz()}}a(Ag,"default");var eD=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 ${F(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":""}: ${F(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 wg(){return{localeError:eD()}}a(wg,"default");var tD=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 ${F(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: ${F(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 Ig(){return{localeError:tD()}}a(Ig,"default");var rD=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: ${F(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":""}: ${F(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 Rg(){return{localeError:rD()}}a(Rg,"default");var nD=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 ${F(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":""}: ${F(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 Os(){return{localeError:nD()}}a(Os,"default");function Cg(){return Os()}a(Cg,"default");var oD=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: ${F(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":""}: ${F(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 Og(){return{localeError:oD()}}a(Og,"default");var iD=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 ${F(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":""}: ${F(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 kg(){return{localeError:iD()}}a(kg,"default");var aD=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 ${F(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: ${F(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 $g(){return{localeError:aD()}}a($g,"default");var sD=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 ${F(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): ${F(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 Ng(){return{localeError:sD()}}a(Ng,"default");var cD=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 ${F(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${F(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 zg(){return{localeError:cD()}}a(zg,"default");var uD=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 ${F(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: ${F(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 Dg(){return{localeError:uD()}}a(Dg,"default");var QS,hd=Symbol("ZodOutput"),gd=Symbol("ZodInput"),md=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 ks(){return new md}a(ks,"registry");(QS=globalThis).__zod_globalRegistry??(QS.__zod_globalRegistry=ks());var Et=globalThis.__zod_globalRegistry;function $s(e,t){return new e({type:"string",...J(t)})}a($s,"_string");function Ns(e,t){return new e({type:"string",coerce:!0,...J(t)})}a(Ns,"_coercedString");function zs(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...J(t)})}a(zs,"_email");function qi(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...J(t)})}a(qi,"_guid");function Ds(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...J(t)})}a(Ds,"_uuid");function Us(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...J(t)})}a(Us,"_uuidv4");function js(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...J(t)})}a(js,"_uuidv6");function Ms(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...J(t)})}a(Ms,"_uuidv7");function zo(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...J(t)})}a(zo,"_url");function Ls(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...J(t)})}a(Ls,"_emoji");function Fs(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...J(t)})}a(Fs,"_nanoid");function Bs(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...J(t)})}a(Bs,"_cuid");function qs(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...J(t)})}a(qs,"_cuid2");function Vs(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...J(t)})}a(Vs,"_ulid");function Hs(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...J(t)})}a(Hs,"_xid");function Zs(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...J(t)})}a(Zs,"_ksuid");function Gs(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...J(t)})}a(Gs,"_ipv4");function Ws(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...J(t)})}a(Ws,"_ipv6");function yd(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...J(t)})}a(yd,"_mac");function Js(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...J(t)})}a(Js,"_cidrv4");function Ks(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...J(t)})}a(Ks,"_cidrv6");function Xs(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...J(t)})}a(Xs,"_base64");function Qs(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...J(t)})}a(Qs,"_base64url");function Ys(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...J(t)})}a(Ys,"_e164");function ec(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...J(t)})}a(ec,"_jwt");var _d={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function tc(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...J(t)})}a(tc,"_isoDateTime");function rc(e,t){return new e({type:"string",format:"date",check:"string_format",...J(t)})}a(rc,"_isoDate");function nc(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...J(t)})}a(nc,"_isoTime");function oc(e,t){return new e({type:"string",format:"duration",check:"string_format",...J(t)})}a(oc,"_isoDuration");function ic(e,t){return new e({type:"number",checks:[],...J(t)})}a(ic,"_number");function ac(e,t){return new e({type:"number",coerce:!0,checks:[],...J(t)})}a(ac,"_coercedNumber");function sc(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...J(t)})}a(sc,"_int");function bd(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...J(t)})}a(bd,"_float32");function vd(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...J(t)})}a(vd,"_float64");function Ed(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...J(t)})}a(Ed,"_int32");function Pd(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...J(t)})}a(Pd,"_uint32");function cc(e,t){return new e({type:"boolean",...J(t)})}a(cc,"_boolean");function uc(e,t){return new e({type:"boolean",coerce:!0,...J(t)})}a(uc,"_coercedBoolean");function Sd(e,t){return new e({type:"bigint",...J(t)})}a(Sd,"_bigint");function lc(e,t){return new e({type:"bigint",coerce:!0,...J(t)})}a(lc,"_coercedBigint");function Td(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...J(t)})}a(Td,"_int64");function xd(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...J(t)})}a(xd,"_uint64");function Ad(e,t){return new e({type:"symbol",...J(t)})}a(Ad,"_symbol");function wd(e,t){return new e({type:"undefined",...J(t)})}a(wd,"_undefined");function Id(e,t){return new e({type:"null",...J(t)})}a(Id,"_null");function dc(e){return new e({type:"any"})}a(dc,"_any");function pc(e){return new e({type:"unknown"})}a(pc,"_unknown");function Rd(e,t){return new e({type:"never",...J(t)})}a(Rd,"_never");function fc(e,t){return new e({type:"void",...J(t)})}a(fc,"_void");function Cd(e,t){return new e({type:"date",...J(t)})}a(Cd,"_date");function mc(e,t){return new e({type:"date",coerce:!0,...J(t)})}a(mc,"_coercedDate");function Od(e,t){return new e({type:"nan",...J(t)})}a(Od,"_nan");function Fr(e,t){return new _l({check:"less_than",...J(t),value:e,inclusive:!1})}a(Fr,"_lt");function Ft(e,t){return new _l({check:"less_than",...J(t),value:e,inclusive:!0})}a(Ft,"_lte");function Br(e,t){return new bl({check:"greater_than",...J(t),value:e,inclusive:!1})}a(Br,"_gt");function _t(e,t){return new bl({check:"greater_than",...J(t),value:e,inclusive:!0})}a(_t,"_gte");function hc(e){return Br(0,e)}a(hc,"_positive");function gc(e){return Fr(0,e)}a(gc,"_negative");function yc(e){return Ft(0,e)}a(yc,"_nonpositive");function _c(e){return _t(0,e)}a(_c,"_nonnegative");function An(e,t){return new Sh({check:"multiple_of",...J(t),value:e})}a(An,"_multipleOf");function wn(e,t){return new Ah({check:"max_size",...J(t),maximum:e})}a(wn,"_maxSize");function qr(e,t){return new wh({check:"min_size",...J(t),minimum:e})}a(qr,"_minSize");function Qn(e,t){return new Ih({check:"size_equals",...J(t),size:e})}a(Qn,"_size");function Yn(e,t){return new Rh({check:"max_length",...J(t),maximum:e})}a(Yn,"_maxLength");function lt(e,t){return new Ch({check:"min_length",...J(t),minimum:e})}a(lt,"_minLength");function eo(e,t){return new Oh({check:"length_equals",...J(t),length:e})}a(eo,"_length");function Ct(e,t){return new kh({check:"string_format",format:"regex",...J(t),pattern:e})}a(Ct,"_regex");function Do(e){return new $h({check:"string_format",format:"lowercase",...J(e)})}a(Do,"_lowercase");function Uo(e){return new Nh({check:"string_format",format:"uppercase",...J(e)})}a(Uo,"_uppercase");function jo(e,t){return new zh({check:"string_format",format:"includes",...J(t),includes:e})}a(jo,"_includes");function Mo(e,t){return new Dh({check:"string_format",format:"starts_with",...J(t),prefix:e})}a(Mo,"_startsWith");function Lo(e,t){return new Uh({check:"string_format",format:"ends_with",...J(t),suffix:e})}a(Lo,"_endsWith");function bc(e,t,n){return new jh({check:"property",property:e,schema:t,...J(n)})}a(bc,"_property");function Fo(e,t){return new Mh({check:"mime_type",mime:e,...J(t)})}a(Fo,"_mime");function wr(e){return new Lh({check:"overwrite",tx:e})}a(wr,"_overwrite");function Bo(e){return wr(t=>t.normalize(e))}a(Bo,"_normalize");function qo(){return wr(e=>e.trim())}a(qo,"_trim");function Vo(){return wr(e=>e.toLowerCase())}a(Vo,"_toLowerCase");function Ho(){return wr(e=>e.toUpperCase())}a(Ho,"_toUpperCase");function Vi(){return wr(e=>qm(e))}a(Vi,"_slugify");function Ug(e,t,n){return new e({type:"array",element:t,...J(n)})}a(Ug,"_array");function dD(e,t,n){return new e({type:"union",options:t,...J(n)})}a(dD,"_union");function pD(e,t,n){return new e({type:"union",options:t,inclusive:!1,...J(n)})}a(pD,"_xor");function fD(e,t,n,o){return new e({type:"union",options:n,discriminator:t,...J(o)})}a(fD,"_discriminatedUnion");function mD(e,t,n){return new e({type:"intersection",left:t,right:n})}a(mD,"_intersection");function hD(e,t,n,o){let r=n instanceof ge,i=r?o:n,s=r?n:null;return new e({type:"tuple",items:t,rest:s,...J(i)})}a(hD,"_tuple");function gD(e,t,n,o){return new e({type:"record",keyType:t,valueType:n,...J(o)})}a(gD,"_record");function yD(e,t,n,o){return new e({type:"map",keyType:t,valueType:n,...J(o)})}a(yD,"_map");function _D(e,t,n){return new e({type:"set",valueType:t,...J(n)})}a(_D,"_set");function bD(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(bD,"_enum");function vD(e,t,n){return new e({type:"enum",entries:t,...J(n)})}a(vD,"_nativeEnum");function ED(e,t,n){return new e({type:"literal",values:Array.isArray(t)?t:[t],...J(n)})}a(ED,"_literal");function kd(e,t){return new e({type:"file",...J(t)})}a(kd,"_file");function PD(e,t){return new e({type:"transform",transform:t})}a(PD,"_transform");function SD(e,t){return new e({type:"optional",innerType:t})}a(SD,"_optional");function TD(e,t){return new e({type:"nullable",innerType:t})}a(TD,"_nullable");function xD(e,t,n){return new e({type:"default",innerType:t,get defaultValue(){return typeof n=="function"?n():il(n)}})}a(xD,"_default");function AD(e,t,n){return new e({type:"nonoptional",innerType:t,...J(n)})}a(AD,"_nonoptional");function wD(e,t){return new e({type:"success",innerType:t})}a(wD,"_success");function ID(e,t,n){return new e({type:"catch",innerType:t,catchValue:typeof n=="function"?n:()=>n})}a(ID,"_catch");function RD(e,t,n){return new e({type:"pipe",in:t,out:n})}a(RD,"_pipe");function CD(e,t){return new e({type:"readonly",innerType:t})}a(CD,"_readonly");function OD(e,t,n){return new e({type:"template_literal",parts:t,...J(n)})}a(OD,"_templateLiteral");function kD(e,t){return new e({type:"lazy",getter:t})}a(kD,"_lazy");function $D(e,t){return new e({type:"promise",innerType:t})}a($D,"_promise");function vc(e,t,n){let o=J(n);return o.abort??(o.abort=!0),new e({type:"custom",check:"custom",fn:t,...o})}a(vc,"_custom");function Ec(e,t,n){return new e({type:"custom",check:"custom",fn:t,...J(n)})}a(Ec,"_refine");function $d(e){let t=YS(n=>(n.addIssue=o=>{if(typeof o=="string")n.issues.push(wi(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(wi(r))}},e(n.value,n)));return t}a($d,"_superRefine");function YS(e,t){let n=new Je({check:"custom",...J(t)});return n._zod.check=e,n}a(YS,"_check");function Nd(e){let t=new Je({check:"describe"});return t._zod.onattach=[n=>{let o=Et.get(n)??{};Et.add(n,{...o,description:e})}],t._zod.check=()=>{},t}a(Nd,"describe");function zd(e){let t=new Je({check:"meta"});return t._zod.onattach=[n=>{let o=Et.get(n)??{};Et.add(n,{...o,...e})}],t._zod.check=()=>{},t}a(zd,"meta");function Dd(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??Li,d=e.Boolean??$o,p=e.String??xn,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(Dd,"_stringbool");function Zo(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(Zo,"_stringFormat");function to(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??Et,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(to,"initializeContext");function Ve(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),Ve(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"&&Bt(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(Ve,"process");function ro(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(ro,"extractDefs");function no(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:Hi(t,"input",e.processors),output:Hi(t,"output",e.processors)}},enumerable:!1,writable:!1}),s}catch{throw new Error("Error converting schema to JSON.")}}a(no,"finalize");function Bt(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 Bt(o.element,n);if(o.type==="set")return Bt(o.valueType,n);if(o.type==="lazy")return Bt(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 Bt(o.innerType,n);if(o.type==="intersection")return Bt(o.left,n)||Bt(o.right,n);if(o.type==="record"||o.type==="map")return Bt(o.keyType,n)||Bt(o.valueType,n);if(o.type==="pipe")return Bt(o.in,n)||Bt(o.out,n);if(o.type==="object"){for(let r in o.shape)if(Bt(o.shape[r],n))return!0;return!1}if(o.type==="union"){for(let r of o.options)if(Bt(r,n))return!0;return!1}if(o.type==="tuple"){for(let r of o.items)if(Bt(r,n))return!0;return!!(o.rest&&Bt(o.rest,n))}return!1}a(Bt,"isTransforming");var jg=a((e,t={})=>n=>{let o=to({...n,processors:t});return Ve(e,o),ro(o,e),no(o,e)},"createToJSONSchemaMethod"),Hi=a((e,t,n={})=>o=>{let{libraryOptions:r,target:i}=o??{},s=to({...r??{},target:i,io:t,processors:n});return Ve(e,s),ro(s,e),no(s,e)},"createStandardJSONSchemaMethod");var ND={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Mg=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=ND[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"),Lg=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"),Fg=a((e,t,n,o)=>{n.type="boolean"},"booleanProcessor"),Bg=a((e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},"bigintProcessor"),qg=a((e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},"symbolProcessor"),Vg=a((e,t,n,o)=>{t.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},"nullProcessor"),Hg=a((e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},"undefinedProcessor"),Zg=a((e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},"voidProcessor"),Gg=a((e,t,n,o)=>{n.not={}},"neverProcessor"),Wg=a((e,t,n,o)=>{},"anyProcessor"),Jg=a((e,t,n,o)=>{},"unknownProcessor"),Kg=a((e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},"dateProcessor"),Xg=a((e,t,n,o)=>{let r=e._zod.def,i=Ya(r.entries);i.every(s=>typeof s=="number")&&(n.type="number"),i.every(s=>typeof s=="string")&&(n.type="string"),n.enum=i},"enumProcessor"),Qg=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"),Yg=a((e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},"nanProcessor"),ey=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"),ty=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"),ry=a((e,t,n,o)=>{n.type="boolean"},"successProcessor"),ny=a((e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},"customProcessor"),oy=a((e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},"functionProcessor"),iy=a((e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},"transformProcessor"),ay=a((e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},"mapProcessor"),sy=a((e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},"setProcessor"),cy=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=Ve(i.element,t,{...o,path:[...o.path,"items"]})},"arrayProcessor"),uy=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]=Ve(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=Ve(i.catchall,t,{...o,path:[...o.path,"additionalProperties"]})):t.io==="output"&&(r.additionalProperties=!1)},"objectProcessor"),jd=a((e,t,n,o)=>{let r=e._zod.def,i=r.inclusive===!1,s=r.options.map((u,d)=>Ve(u,t,{...o,path:[...o.path,i?"oneOf":"anyOf",d]}));i?n.oneOf=s:n.anyOf=s},"unionProcessor"),ly=a((e,t,n,o)=>{let r=e._zod.def,i=Ve(r.left,t,{...o,path:[...o.path,"allOf",0]}),s=Ve(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"),dy=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)=>Ve(y,t,{...o,path:[...o.path,s,h]})),p=i.rest?Ve(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"),py=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=Ve(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=Ve(i.keyType,t,{...o,path:[...o.path,"propertyNames"]})),r.additionalProperties=Ve(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"),fy=a((e,t,n,o)=>{let r=e._zod.def,i=Ve(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"),my=a((e,t,n,o)=>{let r=e._zod.def;Ve(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType},"nonoptionalProcessor"),hy=a((e,t,n,o)=>{let r=e._zod.def;Ve(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType,n.default=JSON.parse(JSON.stringify(r.defaultValue))},"defaultProcessor"),gy=a((e,t,n,o)=>{let r=e._zod.def;Ve(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"),yy=a((e,t,n,o)=>{let r=e._zod.def;Ve(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"),_y=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;Ve(i,t,o);let s=t.seen.get(e);s.ref=i},"pipeProcessor"),by=a((e,t,n,o)=>{let r=e._zod.def;Ve(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType,n.readOnly=!0},"readonlyProcessor"),vy=a((e,t,n,o)=>{let r=e._zod.def;Ve(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType},"promiseProcessor"),Md=a((e,t,n,o)=>{let r=e._zod.def;Ve(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType},"optionalProcessor"),Ey=a((e,t,n,o)=>{let r=e._zod.innerType;Ve(r,t,o);let i=t.seen.get(e);i.ref=r},"lazyProcessor"),Ud={string:Mg,number:Lg,boolean:Fg,bigint:Bg,symbol:qg,null:Vg,undefined:Hg,void:Zg,never:Gg,any:Wg,unknown:Jg,date:Kg,enum:Xg,literal:Qg,nan:Yg,template_literal:ey,file:ty,success:ry,custom:ny,function:oy,transform:iy,map:ay,set:sy,array:cy,object:uy,union:jd,intersection:ly,tuple:dy,record:py,nullable:fy,nonoptional:my,default:hy,prefault:gy,catch:yy,pipe:_y,readonly:by,promise:vy,optional:Md,lazy:Ey};function Pc(e,t){if("_idmap"in e){let o=e,r=to({...t,processors:Ud}),i={};for(let d of o._idmap.entries()){let[p,f]=d;Ve(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;ro(r,f),s[p]=no(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=to({...t,processors:Ud});return Ve(e,n),ro(n,e),no(n,e)}a(Pc,"toJSONSchema");var Ld=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=to({processors:Ud,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 Ve(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)),ro(this.ctx,t);let o=no(this.ctx,t),{"~standard":r,...i}=o;return i}};var eT={};var dt=w("ZodMiniType",(e,t)=>{if(!e._zod)throw new Error("Uninitialized schema in ZodMiniType.");ge.init(e,t),e.def=t,e.type=t.type,e.parse=(n,o)=>Co(e,n,o,{callee:e.parse}),e.safeParse=(n,o)=>$i(e,n,o),e.parseAsync=async(n,o)=>Oo(e,n,o,{callee:e.parseAsync}),e.safeParseAsync=async(n,o)=>zi(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)=>vt(e,n,o),e.brand=()=>e,e.register=((n,o)=>(n.add(e,o),e)),e.apply=n=>n(e)}),Fd=w("ZodMiniString",(e,t)=>{xn.init(e,t),dt.init(e,t)});function b(e){return $s(Fd,e)}a(b,"string");var Zi=w("ZodMiniStringFormat",(e,t)=>{qe.init(e,t),Fd.init(e,t)});var UD=w("ZodMiniURL",(e,t)=>{cs.init(e,t),Zi.init(e,t)});function tT(e){return zo(UD,e)}a(tT,"url");var Bd=w("ZodMiniNumber",(e,t)=>{Ui.init(e,t),dt.init(e,t)});function Pt(e){return ic(Bd,e)}a(Pt,"number");var jD=w("ZodMiniNumberFormat",(e,t)=>{fs.init(e,t),Bd.init(e,t)});function rT(e){return sc(jD,e)}a(rT,"int");var Py=w("ZodMiniBoolean",(e,t)=>{$o.init(e,t),dt.init(e,t)});function ze(e){return cc(Py,e)}a(ze,"boolean");var nT=w("ZodMiniBigInt",(e,t)=>{ji.init(e,t),dt.init(e,t)});var MD=w("ZodMiniAny",(e,t)=>{ms.init(e,t),dt.init(e,t)});function Sc(){return dc(MD)}a(Sc,"any");var LD=w("ZodMiniUnknown",(e,t)=>{hs.init(e,t),dt.init(e,t)});function be(){return pc(LD)}a(be,"unknown");var FD=w("ZodMiniVoid",(e,t)=>{gs.init(e,t),dt.init(e,t)});function oT(e){return fc(FD,e)}a(oT,"_void");var iT=w("ZodMiniDate",(e,t)=>{ys.init(e,t),dt.init(e,t)});var BD=w("ZodMiniArray",(e,t)=>{_s.init(e,t),dt.init(e,t)});function he(e,t){return new BD({type:"array",element:e,...J(t)})}a(he,"array");var qD=w("ZodMiniObject",(e,t)=>{Kl.init(e,t),dt.init(e,t),Te(e,"shape",()=>t.shape)});function k(e,t){let n={type:"object",shape:e??{},...J(t)};return new qD(n)}a(k,"object");var VD=w("ZodMiniUnion",(e,t)=>{No.init(e,t),dt.init(e,t)});function xe(e,t){return new VD({type:"union",options:e,...J(t)})}a(xe,"union");var HD=w("ZodMiniDiscriminatedUnion",(e,t)=>{bs.init(e,t),dt.init(e,t)});function oo(e,t,n){return new HD({type:"union",options:t,discriminator:e,...J(n)})}a(oo,"discriminatedUnion");var ZD=w("ZodMiniRecord",(e,t)=>{Es.init(e,t),dt.init(e,t)});function ve(e,t,n){return new ZD({type:"record",keyType:e,valueType:t,...J(n)})}a(ve,"record");var GD=w("ZodMiniEnum",(e,t)=>{Ps.init(e,t),dt.init(e,t),e.options=Object.values(t.entries)});function fe(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(o=>[o,o])):e;return new GD({type:"enum",entries:n,...J(t)})}a(fe,"_enum");var WD=w("ZodMiniLiteral",(e,t)=>{Ss.init(e,t),dt.init(e,t)});function de(e,t){return new WD({type:"literal",values:Array.isArray(e)?e:[e],...J(t)})}a(de,"literal");var JD=w("ZodMiniTransform",(e,t)=>{Ts.init(e,t),dt.init(e,t)});function io(e){return new JD({type:"transform",transform:e})}a(io,"transform");var KD=w("ZodMiniOptional",(e,t)=>{Mi.init(e,t),dt.init(e,t)});function L(e){return new KD({type:"optional",innerType:e})}a(L,"optional");var XD=w("ZodMiniNullable",(e,t)=>{xs.init(e,t),dt.init(e,t)});function Tc(e){return new XD({type:"nullable",innerType:e})}a(Tc,"nullable");var QD=w("ZodMiniPipe",(e,t)=>{As.init(e,t),dt.init(e,t)});function ao(e,t){return new QD({type:"pipe",in:e,out:t})}a(ao,"pipe");var aT=w("ZodMiniCustom",(e,t)=>{ws.init(e,t),dt.init(e,t)});function qd(e,t){return vc(aT,e??(()=>!0),t)}a(qd,"custom");function Sy(e,t={}){return Ec(aT,e,t)}a(Sy,"refine");var Vd={};Jt(Vd,{ZodMiniISODate:()=>xy,ZodMiniISODateTime:()=>Ty,ZodMiniISODuration:()=>wy,ZodMiniISOTime:()=>Ay,date:()=>eU,datetime:()=>YD,duration:()=>rU,time:()=>tU});var Ty=w("ZodMiniISODateTime",(e,t)=>{us.init(e,t),Zi.init(e,t)});function YD(e){return tc(Ty,e)}a(YD,"datetime");var xy=w("ZodMiniISODate",(e,t)=>{ls.init(e,t),Zi.init(e,t)});function eU(e){return rc(xy,e)}a(eU,"date");var Ay=w("ZodMiniISOTime",(e,t)=>{ds.init(e,t),Zi.init(e,t)});function tU(e){return nc(Ay,e)}a(tU,"time");var wy=w("ZodMiniISODuration",(e,t)=>{ps.init(e,t),Zi.init(e,t)});function rU(e){return oc(wy,e)}a(rU,"duration");var xc={};Jt(xc,{bigint:()=>aU,boolean:()=>iU,date:()=>sU,number:()=>oU,string:()=>nU});function nU(e){return Ns(Fd,e)}a(nU,"string");function oU(e){return ac(Bd,e)}a(oU,"number");function iU(e){return uc(Py,e)}a(iU,"boolean");function aU(e){return lc(nT,e)}a(aU,"bigint");function sU(e){return mc(iT,e)}a(sU,"date");var Ry=k({retryOnFailure:k({defaultValue:L(ze()),hide:L(ze())}),continueOnFailure:k({defaultValue:L(ze()),hide:L(ze())})}),Iy=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")}},pt=a(e=>new Iy(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:L(b()),advanced:L(ze()),width:L(fe(["half","full"])),icon:L(b()),placeholder:L(b())}),Ee=a((e,t)=>k({type:de(t),required:ze(),defaultValue:L(Sc())}),"TPropertyValue");var dr=k({...ke.shape,...Ee(b(),"SHORT_TEXT").shape}),In=k({...ke.shape,...Ee(b(),"LONG_TEXT").shape});var cT=k({label:b(),value:be(),description:L(b()),icon:L(b())}),Hd=k({disabled:L(ze()),placeholder:L(b()),options:he(cT)});var uU=fe(["cards"]),pr=k({...ke.shape,options:Hd,display:L(uU),...Ee(be(),"STATIC_DROPDOWN").shape}),Rn=k({...ke.shape,options:Hd,...Ee(he(be()),"STATIC_MULTI_SELECT_DROPDOWN").shape});var Cy=k({...ke.shape,...Ee(be(),"DROPDOWN").shape,refreshers:he(b())}),Ac=k({...ke.shape,...Ee(he(be()),"MULTI_SELECT_DROPDOWN").shape,refreshers:he(b())});var Cn=k({...ke.shape,reveals:L(he(b())),...Ee(ze(),"CHECKBOX").shape});var On=k({...ke.shape,display:L(fe(["stepper"])),min:L(Pt()),max:L(Pt()),step:L(Pt()),...Ee(Pt(),"NUMBER").shape});var wc=k({...ke.shape,streaming:L(ze()),...Ee(be(),"FILE").shape});var Ic=k({...ke.shape,...Ee(b(),"DATE_TIME").shape});var uT=ve(b(),xe([dr,In,pr,Ac,Rn,Cn,On,wc,Ic])),Rc=k({...ke.shape,properties:uT,...Ee(he(be()),"ARRAY").shape});var lT=fe(["any_time","last_24_hours","last_7_days","last_30_days","last_90_days","this_month","custom"]),dT=k({preset:L(lT),after:L(b()),before:L(b())}),Oy=k({...ke.shape,display:L(fe(["dropdown"])),...Ee(dT,"DATE_RANGE").shape});var Cc=k({...ke.shape,...Ee(xe([ve(b(),be())]),"JSON").shape});var pT=xe([dr,pr,Cc,Rc,Rn]),lU=ve(b(),pT),ky=k({refreshers:he(b()),...ke.shape,...Ee(be(),"DYNAMIC").shape});var Zd=k({...ke.shape,...Ee(oT(),"MARKDOWN").shape});var Oc=(n=>(n.ARCHIVE="ARCHIVE",n.REGISTRY="REGISTRY",n))(Oc||{}),Gi=(n=>(n.CUSTOM="CUSTOM",n.OFFICIAL="OFFICIAL",n))(Gi||{}),Wi=(T=>(T.ARTIFICIAL_INTELLIGENCE="ARTIFICIAL_INTELLIGENCE",T.COMMUNICATION="COMMUNICATION",T.COMMERCE="COMMERCE",T.CORE="CORE",T.UNIVERSAL_AI="UNIVERSAL_AI",T.FLOW_CONTROL="FLOW_CONTROL",T.BUSINESS_INTELLIGENCE="BUSINESS_INTELLIGENCE",T.ACCOUNTING="ACCOUNTING",T.PRODUCTIVITY="PRODUCTIVITY",T.CONTENT_AND_FILES="CONTENT_AND_FILES",T.DEVELOPER_TOOLS="DEVELOPER_TOOLS",T.CUSTOMER_SUPPORT="CUSTOMER_SUPPORT",T.FORMS_AND_SURVEYS="FORMS_AND_SURVEYS",T.HUMAN_RESOURCES="HUMAN_RESOURCES",T.PAYMENT_PROCESSING="PAYMENT_PROCESSING",T.MARKETING="MARKETING",T.SALES_AND_CRM="SALES_AND_CRM",T))(Wi||{});var kc=(n=>(n.AUTHORIZATION_CODE="authorization_code",n.CLIENT_CREDENTIALS="client_credentials",n))(kc||{}),$y="both_client_credentials_and_authorization_code";var Vr=(r=>(r.POLLING="POLLING",r.WEBHOOK="WEBHOOK",r.APP_WEBHOOK="APP_WEBHOOK",r.MANUAL="MANUAL",r))(Vr||{}),$c=(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))($c||{}),dU=k({strategy:fe($c),paramName:L(b())}),Nc=(n=>(n.SIMULATION="SIMULATION",n.TEST_FUNCTION="TEST_FUNCTION",n))(Nc||{});var Gd=(n=>(n.WEBSOCKET="WEBSOCKET",n.NONE="NONE",n))(Gd||{}),fT=k({status:L(Pt()),body:L(be()),headers:L(ve(b(),b()))}),mT=k({type:de("DELAY"),resumeDateTime:b(),requestIdToReply:L(b()),handlerId:L(b()),streamStepProgress:L(fe(Gd))}),hT=k({type:de("WEBHOOK"),requestId:b(),requestIdToReply:L(b()),response:fT,handlerId:L(b()),streamStepProgress:L(fe(Gd))}),pU=xe([mT,hT]);var fU=k({body:be(),rawBody:L(be()),headers:ve(b(),b()),queryParams:ve(b(),b())});function st(e){return e==null}a(st,"isNil");function zc(e){return e==null?!0:typeof e=="string"||Array.isArray(e)?e.length===0:typeof e=="object"?Object.keys(e).length===0:!1}a(zc,"isEmpty");function Wd(e,t){if(e==null)throw new Error(`${t} is null or undefined`)}a(Wd,"assertNotNullOrUndefined");function zy(e){try{return{data:e(),error:null}}catch(t){return{data:null,error:t}}}a(zy,"tryCatchSync");var Dy=Rt(require("crypto"),1);var mU=128,so,Ji,hU=a(e=>{if(e<0)throw new RangeError("Wrong ID size");try{!so||so.length<e?(so=Buffer.allocUnsafe(e*mU),Dy.default.randomFillSync(so),Ji=0):Ji+e>so.length&&(Dy.default.randomFillSync(so),Ji=0)}catch(t){throw so=void 0,t}Ji+=e},"fillPool"),gU=a(e=>(hU(e|=0),so.subarray(Ji-e,Ji)),"random"),yU=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"),gT=a((e,t=21)=>yU(e,t,gU),"customAlphabet");var _U="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",yT=21,eW=b().check(Ct(new RegExp(`^[0-9a-zA-Z]{${yT}}$`))),bU=gT(_U,yT);var co=ao(io(e=>e instanceof Date?e.toISOString():e),b()),Ir={id:b(),created:co,updated:co},ct=a(e=>L(Tc(e)),"Nullable");function Uy(e){return L(Tc(fe(e)))}a(Uy,"NullableEnum");var nW=ao(io(e=>e==="true"||e===!0?!0:e==="false"||e===!1?!1:void 0),L(ze())),oW=L(Vd.datetime({offset:!0}).check(Sy(e=>e.slice(0,4)!=="0000"))),Jd=a(e=>ao(io(t=>Array.isArray(t)?t:t!==void 0?[t]:void 0),L(he(e))),"OptionalArrayFromQuery");var sW=ve(b(),be());var uo=(T=>(T.OPENAI="openai",T.OPENROUTER="openrouter",T.ANTHROPIC="anthropic",T.AZURE="azure",T.GOOGLE="google",T.ACTIVEPIECES="activepieces",T.CLOUDFLARE_GATEWAY="cloudflare-gateway",T.CUSTOM="custom",T.BEDROCK="bedrock",T.VERTEX="vertex",T.MISTRAL="mistral",T.XAI="xai",T.DEEPSEEK="deepseek",T.ZAI="zai",T.QWEN="qwen",T.MINIMAX="minimax",T.MOONSHOT="moonshot",T))(uo||{});var te={};Jt(te,{$brand:()=>Xa,$input:()=>gd,$output:()=>hd,NEVER:()=>rl,TimePrecision:()=>_d,ZodAny:()=>s_,ZodArray:()=>d_,ZodBase64:()=>gp,ZodBase64URL:()=>yp,ZodBigInt:()=>ra,ZodBigIntFormat:()=>vp,ZodBoolean:()=>ta,ZodCIDRv4:()=>mp,ZodCIDRv6:()=>hp,ZodCUID:()=>sp,ZodCUID2:()=>cp,ZodCatch:()=>$_,ZodCodec:()=>Ip,ZodCustom:()=>Gc,ZodCustomStringFormat:()=>Yi,ZodDate:()=>Bc,ZodDefault:()=>w_,ZodDiscriminatedUnion:()=>f_,ZodE164:()=>_p,ZodEmail:()=>op,ZodEmoji:()=>ip,ZodEnum:()=>Xi,ZodError:()=>vU,ZodExactOptional:()=>T_,ZodFile:()=>P_,ZodFirstPartyTypeKind:()=>H_,ZodFunction:()=>B_,ZodGUID:()=>Uc,ZodIPv4:()=>pp,ZodIPv6:()=>fp,ZodISODate:()=>Qd,ZodISODateTime:()=>Xd,ZodISODuration:()=>ep,ZodISOTime:()=>Yd,ZodIntersection:()=>m_,ZodIssueCode:()=>PU,ZodJWT:()=>bp,ZodKSUID:()=>dp,ZodLazy:()=>M_,ZodLiteral:()=>E_,ZodMAC:()=>e_,ZodMap:()=>b_,ZodNaN:()=>z_,ZodNanoID:()=>ap,ZodNever:()=>u_,ZodNonOptional:()=>Ap,ZodNull:()=>i_,ZodNullable:()=>A_,ZodNumber:()=>ea,ZodNumberFormat:()=>Wo,ZodObject:()=>Vc,ZodOptional:()=>xp,ZodPipe:()=>wp,ZodPrefault:()=>R_,ZodPromise:()=>F_,ZodReadonly:()=>D_,ZodRealError:()=>Yt,ZodRecord:()=>Zc,ZodSet:()=>v_,ZodString:()=>Qi,ZodStringFormat:()=>Ke,ZodSuccess:()=>k_,ZodSymbol:()=>n_,ZodTemplateLiteral:()=>j_,ZodTransform:()=>S_,ZodTuple:()=>g_,ZodType:()=>Ae,ZodULID:()=>up,ZodURL:()=>Fc,ZodUUID:()=>nn,ZodUndefined:()=>o_,ZodUnion:()=>Hc,ZodUnknown:()=>c_,ZodVoid:()=>l_,ZodXID:()=>lp,ZodXor:()=>p_,_ZodString:()=>np,_default:()=>I_,_function:()=>Tx,any:()=>rx,array:()=>qc,base64:()=>MT,base64url:()=>LT,bigint:()=>XT,boolean:()=>r_,catch:()=>N_,check:()=>xx,cidrv4:()=>UT,cidrv6:()=>jT,clone:()=>vt,codec:()=>Ex,coerce:()=>Z_,config:()=>at,core:()=>lr,cuid:()=>RT,cuid2:()=>CT,custom:()=>Ax,date:()=>ox,decode:()=>Gy,decodeAsync:()=>Jy,describe:()=>wx,discriminatedUnion:()=>lx,e164:()=>FT,email:()=>bT,emoji:()=>wT,encode:()=>Zy,encodeAsync:()=>Wy,endsWith:()=>Lo,enum:()=>Sp,exactOptional:()=>x_,file:()=>yx,flattenError:()=>Ii,float32:()=>GT,float64:()=>WT,formatError:()=>Ri,fromJSONSchema:()=>Nx,function:()=>Tx,getErrorMap:()=>TU,globalRegistry:()=>Et,gt:()=>Br,gte:()=>_t,guid:()=>vT,hash:()=>ZT,hex:()=>HT,hostname:()=>VT,httpUrl:()=>AT,includes:()=>jo,instanceof:()=>Rx,int:()=>rp,int32:()=>JT,int64:()=>QT,intersection:()=>h_,ipv4:()=>NT,ipv6:()=>DT,iso:()=>Ki,json:()=>Ox,jwt:()=>BT,keyof:()=>ix,ksuid:()=>$T,lazy:()=>L_,length:()=>eo,literal:()=>gx,locales:()=>Bi,looseObject:()=>cx,looseRecord:()=>px,lowercase:()=>Do,lt:()=>Fr,lte:()=>Ft,mac:()=>zT,map:()=>fx,maxLength:()=>Yn,maxSize:()=>wn,meta:()=>Ix,mime:()=>Fo,minLength:()=>lt,minSize:()=>qr,multipleOf:()=>An,nan:()=>vx,nanoid:()=>IT,nativeEnum:()=>hx,negative:()=>gc,never:()=>Ep,nonnegative:()=>_c,nonoptional:()=>O_,nonpositive:()=>yc,normalize:()=>Bo,null:()=>a_,nullable:()=>Mc,nullish:()=>_x,number:()=>t_,object:()=>ax,optional:()=>jc,overwrite:()=>wr,parse:()=>By,parseAsync:()=>qy,partialRecord:()=>dx,pipe:()=>Lc,positive:()=>hc,prefault:()=>C_,preprocess:()=>kx,prettifyError:()=>sl,promise:()=>Sx,property:()=>bc,readonly:()=>U_,record:()=>__,refine:()=>q_,regex:()=>Ct,regexes:()=>Qt,registry:()=>ks,safeDecode:()=>Xy,safeDecodeAsync:()=>Yy,safeEncode:()=>Ky,safeEncodeAsync:()=>Qy,safeParse:()=>Vy,safeParseAsync:()=>Hy,set:()=>mx,setErrorMap:()=>SU,size:()=>Qn,slugify:()=>Vi,startsWith:()=>Mo,strictObject:()=>sx,string:()=>tp,stringFormat:()=>qT,stringbool:()=>Cx,success:()=>bx,superRefine:()=>V_,symbol:()=>ex,templateLiteral:()=>Px,toJSONSchema:()=>Pc,toLowerCase:()=>Vo,toUpperCase:()=>Ho,transform:()=>Tp,treeifyError:()=>al,trim:()=>qo,tuple:()=>y_,uint32:()=>KT,uint64:()=>YT,ulid:()=>OT,undefined:()=>tx,union:()=>Pp,unknown:()=>Go,uppercase:()=>Uo,url:()=>xT,util:()=>X,uuid:()=>ET,uuidv4:()=>PT,uuidv6:()=>ST,uuidv7:()=>TT,void:()=>nx,xid:()=>kT,xor:()=>ux});var Dc={};Jt(Dc,{ZodAny:()=>s_,ZodArray:()=>d_,ZodBase64:()=>gp,ZodBase64URL:()=>yp,ZodBigInt:()=>ra,ZodBigIntFormat:()=>vp,ZodBoolean:()=>ta,ZodCIDRv4:()=>mp,ZodCIDRv6:()=>hp,ZodCUID:()=>sp,ZodCUID2:()=>cp,ZodCatch:()=>$_,ZodCodec:()=>Ip,ZodCustom:()=>Gc,ZodCustomStringFormat:()=>Yi,ZodDate:()=>Bc,ZodDefault:()=>w_,ZodDiscriminatedUnion:()=>f_,ZodE164:()=>_p,ZodEmail:()=>op,ZodEmoji:()=>ip,ZodEnum:()=>Xi,ZodExactOptional:()=>T_,ZodFile:()=>P_,ZodFunction:()=>B_,ZodGUID:()=>Uc,ZodIPv4:()=>pp,ZodIPv6:()=>fp,ZodIntersection:()=>m_,ZodJWT:()=>bp,ZodKSUID:()=>dp,ZodLazy:()=>M_,ZodLiteral:()=>E_,ZodMAC:()=>e_,ZodMap:()=>b_,ZodNaN:()=>z_,ZodNanoID:()=>ap,ZodNever:()=>u_,ZodNonOptional:()=>Ap,ZodNull:()=>i_,ZodNullable:()=>A_,ZodNumber:()=>ea,ZodNumberFormat:()=>Wo,ZodObject:()=>Vc,ZodOptional:()=>xp,ZodPipe:()=>wp,ZodPrefault:()=>R_,ZodPromise:()=>F_,ZodReadonly:()=>D_,ZodRecord:()=>Zc,ZodSet:()=>v_,ZodString:()=>Qi,ZodStringFormat:()=>Ke,ZodSuccess:()=>k_,ZodSymbol:()=>n_,ZodTemplateLiteral:()=>j_,ZodTransform:()=>S_,ZodTuple:()=>g_,ZodType:()=>Ae,ZodULID:()=>up,ZodURL:()=>Fc,ZodUUID:()=>nn,ZodUndefined:()=>o_,ZodUnion:()=>Hc,ZodUnknown:()=>c_,ZodVoid:()=>l_,ZodXID:()=>lp,ZodXor:()=>p_,_ZodString:()=>np,_default:()=>I_,_function:()=>Tx,any:()=>rx,array:()=>qc,base64:()=>MT,base64url:()=>LT,bigint:()=>XT,boolean:()=>r_,catch:()=>N_,check:()=>xx,cidrv4:()=>UT,cidrv6:()=>jT,codec:()=>Ex,cuid:()=>RT,cuid2:()=>CT,custom:()=>Ax,date:()=>ox,describe:()=>wx,discriminatedUnion:()=>lx,e164:()=>FT,email:()=>bT,emoji:()=>wT,enum:()=>Sp,exactOptional:()=>x_,file:()=>yx,float32:()=>GT,float64:()=>WT,function:()=>Tx,guid:()=>vT,hash:()=>ZT,hex:()=>HT,hostname:()=>VT,httpUrl:()=>AT,instanceof:()=>Rx,int:()=>rp,int32:()=>JT,int64:()=>QT,intersection:()=>h_,ipv4:()=>NT,ipv6:()=>DT,json:()=>Ox,jwt:()=>BT,keyof:()=>ix,ksuid:()=>$T,lazy:()=>L_,literal:()=>gx,looseObject:()=>cx,looseRecord:()=>px,mac:()=>zT,map:()=>fx,meta:()=>Ix,nan:()=>vx,nanoid:()=>IT,nativeEnum:()=>hx,never:()=>Ep,nonoptional:()=>O_,null:()=>a_,nullable:()=>Mc,nullish:()=>_x,number:()=>t_,object:()=>ax,optional:()=>jc,partialRecord:()=>dx,pipe:()=>Lc,prefault:()=>C_,preprocess:()=>kx,promise:()=>Sx,readonly:()=>U_,record:()=>__,refine:()=>q_,set:()=>mx,strictObject:()=>sx,string:()=>tp,stringFormat:()=>qT,stringbool:()=>Cx,success:()=>bx,superRefine:()=>V_,symbol:()=>ex,templateLiteral:()=>Px,transform:()=>Tp,tuple:()=>y_,uint32:()=>KT,uint64:()=>YT,ulid:()=>OT,undefined:()=>tx,union:()=>Pp,unknown:()=>Go,url:()=>xT,uuid:()=>ET,uuidv4:()=>PT,uuidv6:()=>ST,uuidv7:()=>TT,void:()=>nx,xid:()=>kT,xor:()=>ux});var Kd={};Jt(Kd,{endsWith:()=>Lo,gt:()=>Br,gte:()=>_t,includes:()=>jo,length:()=>eo,lowercase:()=>Do,lt:()=>Fr,lte:()=>Ft,maxLength:()=>Yn,maxSize:()=>wn,mime:()=>Fo,minLength:()=>lt,minSize:()=>qr,multipleOf:()=>An,negative:()=>gc,nonnegative:()=>_c,nonpositive:()=>yc,normalize:()=>Bo,overwrite:()=>wr,positive:()=>hc,property:()=>bc,regex:()=>Ct,size:()=>Qn,slugify:()=>Vi,startsWith:()=>Mo,toLowerCase:()=>Vo,toUpperCase:()=>Ho,trim:()=>qo,uppercase:()=>Uo});var Ki={};Jt(Ki,{ZodISODate:()=>Qd,ZodISODateTime:()=>Xd,ZodISODuration:()=>ep,ZodISOTime:()=>Yd,date:()=>My,datetime:()=>jy,duration:()=>Fy,time:()=>Ly});var Xd=w("ZodISODateTime",(e,t)=>{us.init(e,t),Ke.init(e,t)});function jy(e){return tc(Xd,e)}a(jy,"datetime");var Qd=w("ZodISODate",(e,t)=>{ls.init(e,t),Ke.init(e,t)});function My(e){return rc(Qd,e)}a(My,"date");var Yd=w("ZodISOTime",(e,t)=>{ds.init(e,t),Ke.init(e,t)});function Ly(e){return nc(Yd,e)}a(Ly,"time");var ep=w("ZodISODuration",(e,t)=>{ps.init(e,t),Ke.init(e,t)});function Fy(e){return oc(ep,e)}a(Fy,"duration");var _T=a((e,t)=>{os.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:a(n=>Ri(e,n),"value")},flatten:{value:a(n=>Ii(e,n),"value")},addIssue:{value:a(n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,xi,2)},"value")},addIssues:{value:a(n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,xi,2)},"value")},isEmpty:{get(){return e.issues.length===0}}})},"initializer"),vU=w("ZodError",_T),Yt=w("ZodError",_T,{Parent:Error});var By=Ci(Yt),qy=Oi(Yt),Vy=ki(Yt),Hy=Ni(Yt),Zy=cl(Yt),Gy=ul(Yt),Wy=ll(Yt),Jy=dl(Yt),Ky=pl(Yt),Xy=fl(Yt),Qy=ml(Yt),Yy=hl(Yt);var Ae=w("ZodType",(e,t)=>(ge.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Hi(e,"input"),output:Hi(e,"output")}}),e.toJSONSchema=jg(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)=>vt(e,n,o),e.brand=()=>e,e.register=((n,o)=>(n.add(e,o),e)),e.parse=(n,o)=>By(e,n,o,{callee:e.parse}),e.safeParse=(n,o)=>Vy(e,n,o),e.parseAsync=async(n,o)=>qy(e,n,o,{callee:e.parseAsync}),e.safeParseAsync=async(n,o)=>Hy(e,n,o),e.spa=e.safeParseAsync,e.encode=(n,o)=>Zy(e,n,o),e.decode=(n,o)=>Gy(e,n,o),e.encodeAsync=async(n,o)=>Wy(e,n,o),e.decodeAsync=async(n,o)=>Jy(e,n,o),e.safeEncode=(n,o)=>Ky(e,n,o),e.safeDecode=(n,o)=>Xy(e,n,o),e.safeEncodeAsync=async(n,o)=>Qy(e,n,o),e.safeDecodeAsync=async(n,o)=>Yy(e,n,o),e.refine=(n,o)=>e.check(q_(n,o)),e.superRefine=n=>e.check(V_(n)),e.overwrite=n=>e.check(wr(n)),e.optional=()=>jc(e),e.exactOptional=()=>x_(e),e.nullable=()=>Mc(e),e.nullish=()=>jc(Mc(e)),e.nonoptional=n=>O_(e,n),e.array=()=>qc(e),e.or=n=>Pp([e,n]),e.and=n=>h_(e,n),e.transform=n=>Lc(e,Tp(n)),e.default=n=>I_(e,n),e.prefault=n=>C_(e,n),e.catch=n=>N_(e,n),e.pipe=n=>Lc(e,n),e.readonly=()=>U_(e),e.describe=n=>{let o=e.clone();return Et.add(o,{description:n}),o},Object.defineProperty(e,"description",{get(){return Et.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return Et.get(e);let o=e.clone();return Et.add(o,n[0]),o},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),np=w("_ZodString",(e,t)=>{xn.init(e,t),Ae.init(e,t),e._zod.processJSONSchema=(o,r,i)=>Mg(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(Ct(...o)),e.includes=(...o)=>e.check(jo(...o)),e.startsWith=(...o)=>e.check(Mo(...o)),e.endsWith=(...o)=>e.check(Lo(...o)),e.min=(...o)=>e.check(lt(...o)),e.max=(...o)=>e.check(Yn(...o)),e.length=(...o)=>e.check(eo(...o)),e.nonempty=(...o)=>e.check(lt(1,...o)),e.lowercase=o=>e.check(Do(o)),e.uppercase=o=>e.check(Uo(o)),e.trim=()=>e.check(qo()),e.normalize=(...o)=>e.check(Bo(...o)),e.toLowerCase=()=>e.check(Vo()),e.toUpperCase=()=>e.check(Ho()),e.slugify=()=>e.check(Vi())}),Qi=w("ZodString",(e,t)=>{xn.init(e,t),np.init(e,t),e.email=n=>e.check(zs(op,n)),e.url=n=>e.check(zo(Fc,n)),e.jwt=n=>e.check(ec(bp,n)),e.emoji=n=>e.check(Ls(ip,n)),e.guid=n=>e.check(qi(Uc,n)),e.uuid=n=>e.check(Ds(nn,n)),e.uuidv4=n=>e.check(Us(nn,n)),e.uuidv6=n=>e.check(js(nn,n)),e.uuidv7=n=>e.check(Ms(nn,n)),e.nanoid=n=>e.check(Fs(ap,n)),e.guid=n=>e.check(qi(Uc,n)),e.cuid=n=>e.check(Bs(sp,n)),e.cuid2=n=>e.check(qs(cp,n)),e.ulid=n=>e.check(Vs(up,n)),e.base64=n=>e.check(Xs(gp,n)),e.base64url=n=>e.check(Qs(yp,n)),e.xid=n=>e.check(Hs(lp,n)),e.ksuid=n=>e.check(Zs(dp,n)),e.ipv4=n=>e.check(Gs(pp,n)),e.ipv6=n=>e.check(Ws(fp,n)),e.cidrv4=n=>e.check(Js(mp,n)),e.cidrv6=n=>e.check(Ks(hp,n)),e.e164=n=>e.check(Ys(_p,n)),e.datetime=n=>e.check(jy(n)),e.date=n=>e.check(My(n)),e.time=n=>e.check(Ly(n)),e.duration=n=>e.check(Fy(n))});function tp(e){return $s(Qi,e)}a(tp,"string");var Ke=w("ZodStringFormat",(e,t)=>{qe.init(e,t),np.init(e,t)}),op=w("ZodEmail",(e,t)=>{wl.init(e,t),Ke.init(e,t)});function bT(e){return zs(op,e)}a(bT,"email");var Uc=w("ZodGUID",(e,t)=>{xl.init(e,t),Ke.init(e,t)});function vT(e){return qi(Uc,e)}a(vT,"guid");var nn=w("ZodUUID",(e,t)=>{Al.init(e,t),Ke.init(e,t)});function ET(e){return Ds(nn,e)}a(ET,"uuid");function PT(e){return Us(nn,e)}a(PT,"uuidv4");function ST(e){return js(nn,e)}a(ST,"uuidv6");function TT(e){return Ms(nn,e)}a(TT,"uuidv7");var Fc=w("ZodURL",(e,t)=>{cs.init(e,t),Ke.init(e,t)});function xT(e){return zo(Fc,e)}a(xT,"url");function AT(e){return zo(Fc,{protocol:/^https?$/,hostname:Qt.domain,...X.normalizeParams(e)})}a(AT,"httpUrl");var ip=w("ZodEmoji",(e,t)=>{Il.init(e,t),Ke.init(e,t)});function wT(e){return Ls(ip,e)}a(wT,"emoji");var ap=w("ZodNanoID",(e,t)=>{Rl.init(e,t),Ke.init(e,t)});function IT(e){return Fs(ap,e)}a(IT,"nanoid");var sp=w("ZodCUID",(e,t)=>{Cl.init(e,t),Ke.init(e,t)});function RT(e){return Bs(sp,e)}a(RT,"cuid");var cp=w("ZodCUID2",(e,t)=>{Ol.init(e,t),Ke.init(e,t)});function CT(e){return qs(cp,e)}a(CT,"cuid2");var up=w("ZodULID",(e,t)=>{kl.init(e,t),Ke.init(e,t)});function OT(e){return Vs(up,e)}a(OT,"ulid");var lp=w("ZodXID",(e,t)=>{$l.init(e,t),Ke.init(e,t)});function kT(e){return Hs(lp,e)}a(kT,"xid");var dp=w("ZodKSUID",(e,t)=>{Nl.init(e,t),Ke.init(e,t)});function $T(e){return Zs(dp,e)}a($T,"ksuid");var pp=w("ZodIPv4",(e,t)=>{zl.init(e,t),Ke.init(e,t)});function NT(e){return Gs(pp,e)}a(NT,"ipv4");var e_=w("ZodMAC",(e,t)=>{Ul.init(e,t),Ke.init(e,t)});function zT(e){return yd(e_,e)}a(zT,"mac");var fp=w("ZodIPv6",(e,t)=>{Dl.init(e,t),Ke.init(e,t)});function DT(e){return Ws(fp,e)}a(DT,"ipv6");var mp=w("ZodCIDRv4",(e,t)=>{jl.init(e,t),Ke.init(e,t)});function UT(e){return Js(mp,e)}a(UT,"cidrv4");var hp=w("ZodCIDRv6",(e,t)=>{Ml.init(e,t),Ke.init(e,t)});function jT(e){return Ks(hp,e)}a(jT,"cidrv6");var gp=w("ZodBase64",(e,t)=>{Ll.init(e,t),Ke.init(e,t)});function MT(e){return Xs(gp,e)}a(MT,"base64");var yp=w("ZodBase64URL",(e,t)=>{Fl.init(e,t),Ke.init(e,t)});function LT(e){return Qs(yp,e)}a(LT,"base64url");var _p=w("ZodE164",(e,t)=>{Bl.init(e,t),Ke.init(e,t)});function FT(e){return Ys(_p,e)}a(FT,"e164");var bp=w("ZodJWT",(e,t)=>{ql.init(e,t),Ke.init(e,t)});function BT(e){return ec(bp,e)}a(BT,"jwt");var Yi=w("ZodCustomStringFormat",(e,t)=>{Vl.init(e,t),Ke.init(e,t)});function qT(e,t,n={}){return Zo(Yi,e,t,n)}a(qT,"stringFormat");function VT(e){return Zo(Yi,"hostname",Qt.hostname,e)}a(VT,"hostname");function HT(e){return Zo(Yi,"hex",Qt.hex,e)}a(HT,"hex");function ZT(e,t){let n=t?.enc??"hex",o=`${e}_${n}`,r=Qt[o];if(!r)throw new Error(`Unrecognized hash format: ${o}`);return Zo(Yi,o,r,t)}a(ZT,"hash");var ea=w("ZodNumber",(e,t)=>{Ui.init(e,t),Ae.init(e,t),e._zod.processJSONSchema=(o,r,i)=>Lg(e,o,r,i),e.gt=(o,r)=>e.check(Br(o,r)),e.gte=(o,r)=>e.check(_t(o,r)),e.min=(o,r)=>e.check(_t(o,r)),e.lt=(o,r)=>e.check(Fr(o,r)),e.lte=(o,r)=>e.check(Ft(o,r)),e.max=(o,r)=>e.check(Ft(o,r)),e.int=o=>e.check(rp(o)),e.safe=o=>e.check(rp(o)),e.positive=o=>e.check(Br(0,o)),e.nonnegative=o=>e.check(_t(0,o)),e.negative=o=>e.check(Fr(0,o)),e.nonpositive=o=>e.check(Ft(0,o)),e.multipleOf=(o,r)=>e.check(An(o,r)),e.step=(o,r)=>e.check(An(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 t_(e){return ic(ea,e)}a(t_,"number");var Wo=w("ZodNumberFormat",(e,t)=>{fs.init(e,t),ea.init(e,t)});function rp(e){return sc(Wo,e)}a(rp,"int");function GT(e){return bd(Wo,e)}a(GT,"float32");function WT(e){return vd(Wo,e)}a(WT,"float64");function JT(e){return Ed(Wo,e)}a(JT,"int32");function KT(e){return Pd(Wo,e)}a(KT,"uint32");var ta=w("ZodBoolean",(e,t)=>{$o.init(e,t),Ae.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Fg(e,n,o,r)});function r_(e){return cc(ta,e)}a(r_,"boolean");var ra=w("ZodBigInt",(e,t)=>{ji.init(e,t),Ae.init(e,t),e._zod.processJSONSchema=(o,r,i)=>Bg(e,o,r,i),e.gte=(o,r)=>e.check(_t(o,r)),e.min=(o,r)=>e.check(_t(o,r)),e.gt=(o,r)=>e.check(Br(o,r)),e.gte=(o,r)=>e.check(_t(o,r)),e.min=(o,r)=>e.check(_t(o,r)),e.lt=(o,r)=>e.check(Fr(o,r)),e.lte=(o,r)=>e.check(Ft(o,r)),e.max=(o,r)=>e.check(Ft(o,r)),e.positive=o=>e.check(Br(BigInt(0),o)),e.negative=o=>e.check(Fr(BigInt(0),o)),e.nonpositive=o=>e.check(Ft(BigInt(0),o)),e.nonnegative=o=>e.check(_t(BigInt(0),o)),e.multipleOf=(o,r)=>e.check(An(o,r));let n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null});function XT(e){return Sd(ra,e)}a(XT,"bigint");var vp=w("ZodBigIntFormat",(e,t)=>{Hl.init(e,t),ra.init(e,t)});function QT(e){return Td(vp,e)}a(QT,"int64");function YT(e){return xd(vp,e)}a(YT,"uint64");var n_=w("ZodSymbol",(e,t)=>{Zl.init(e,t),Ae.init(e,t),e._zod.processJSONSchema=(n,o,r)=>qg(e,n,o,r)});function ex(e){return Ad(n_,e)}a(ex,"symbol");var o_=w("ZodUndefined",(e,t)=>{Gl.init(e,t),Ae.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Hg(e,n,o,r)});function tx(e){return wd(o_,e)}a(tx,"_undefined");var i_=w("ZodNull",(e,t)=>{Wl.init(e,t),Ae.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Vg(e,n,o,r)});function a_(e){return Id(i_,e)}a(a_,"_null");var s_=w("ZodAny",(e,t)=>{ms.init(e,t),Ae.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Wg(e,n,o,r)});function rx(){return dc(s_)}a(rx,"any");var c_=w("ZodUnknown",(e,t)=>{hs.init(e,t),Ae.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Jg(e,n,o,r)});function Go(){return pc(c_)}a(Go,"unknown");var u_=w("ZodNever",(e,t)=>{Jl.init(e,t),Ae.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Gg(e,n,o,r)});function Ep(e){return Rd(u_,e)}a(Ep,"never");var l_=w("ZodVoid",(e,t)=>{gs.init(e,t),Ae.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Zg(e,n,o,r)});function nx(e){return fc(l_,e)}a(nx,"_void");var Bc=w("ZodDate",(e,t)=>{ys.init(e,t),Ae.init(e,t),e._zod.processJSONSchema=(o,r,i)=>Kg(e,o,r,i),e.min=(o,r)=>e.check(_t(o,r)),e.max=(o,r)=>e.check(Ft(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 ox(e){return Cd(Bc,e)}a(ox,"date");var d_=w("ZodArray",(e,t)=>{_s.init(e,t),Ae.init(e,t),e._zod.processJSONSchema=(n,o,r)=>cy(e,n,o,r),e.element=t.element,e.min=(n,o)=>e.check(lt(n,o)),e.nonempty=n=>e.check(lt(1,n)),e.max=(n,o)=>e.check(Yn(n,o)),e.length=(n,o)=>e.check(eo(n,o)),e.unwrap=()=>e.element});function qc(e,t){return Ug(d_,e,t)}a(qc,"array");function ix(e){let t=e._zod.def.shape;return Sp(Object.keys(t))}a(ix,"keyof");var Vc=w("ZodObject",(e,t)=>{Vh.init(e,t),Ae.init(e,t),e._zod.processJSONSchema=(n,o,r)=>uy(e,n,o,r),X.defineLazy(e,"shape",()=>t.shape),e.keyof=()=>Sp(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Go()}),e.loose=()=>e.clone({...e._zod.def,catchall:Go()}),e.strict=()=>e.clone({...e._zod.def,catchall:Ep()}),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(xp,e,n[0]),e.required=(...n)=>X.required(Ap,e,n[0])});function ax(e,t){let n={type:"object",shape:e??{},...X.normalizeParams(t)};return new Vc(n)}a(ax,"object");function sx(e,t){return new Vc({type:"object",shape:e,catchall:Ep(),...X.normalizeParams(t)})}a(sx,"strictObject");function cx(e,t){return new Vc({type:"object",shape:e,catchall:Go(),...X.normalizeParams(t)})}a(cx,"looseObject");var Hc=w("ZodUnion",(e,t)=>{No.init(e,t),Ae.init(e,t),e._zod.processJSONSchema=(n,o,r)=>jd(e,n,o,r),e.options=t.options});function Pp(e,t){return new Hc({type:"union",options:e,...X.normalizeParams(t)})}a(Pp,"union");var p_=w("ZodXor",(e,t)=>{Hc.init(e,t),Xl.init(e,t),e._zod.processJSONSchema=(n,o,r)=>jd(e,n,o,r),e.options=t.options});function ux(e,t){return new p_({type:"union",options:e,inclusive:!1,...X.normalizeParams(t)})}a(ux,"xor");var f_=w("ZodDiscriminatedUnion",(e,t)=>{Hc.init(e,t),bs.init(e,t)});function lx(e,t,n){return new f_({type:"union",options:t,discriminator:e,...X.normalizeParams(n)})}a(lx,"discriminatedUnion");var m_=w("ZodIntersection",(e,t)=>{Ql.init(e,t),Ae.init(e,t),e._zod.processJSONSchema=(n,o,r)=>ly(e,n,o,r)});function h_(e,t){return new m_({type:"intersection",left:e,right:t})}a(h_,"intersection");var g_=w("ZodTuple",(e,t)=>{vs.init(e,t),Ae.init(e,t),e._zod.processJSONSchema=(n,o,r)=>dy(e,n,o,r),e.rest=n=>e.clone({...e._zod.def,rest:n})});function y_(e,t,n){let o=t instanceof ge,r=o?n:t,i=o?t:null;return new g_({type:"tuple",items:e,rest:i,...X.normalizeParams(r)})}a(y_,"tuple");var Zc=w("ZodRecord",(e,t)=>{Es.init(e,t),Ae.init(e,t),e._zod.processJSONSchema=(n,o,r)=>py(e,n,o,r),e.keyType=t.keyType,e.valueType=t.valueType});function __(e,t,n){return new Zc({type:"record",keyType:e,valueType:t,...X.normalizeParams(n)})}a(__,"record");function dx(e,t,n){let o=vt(e);return o._zod.values=void 0,new Zc({type:"record",keyType:o,valueType:t,...X.normalizeParams(n)})}a(dx,"partialRecord");function px(e,t,n){return new Zc({type:"record",keyType:e,valueType:t,mode:"loose",...X.normalizeParams(n)})}a(px,"looseRecord");var b_=w("ZodMap",(e,t)=>{Yl.init(e,t),Ae.init(e,t),e._zod.processJSONSchema=(n,o,r)=>ay(e,n,o,r),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...n)=>e.check(qr(...n)),e.nonempty=n=>e.check(qr(1,n)),e.max=(...n)=>e.check(wn(...n)),e.size=(...n)=>e.check(Qn(...n))});function fx(e,t,n){return new b_({type:"map",keyType:e,valueType:t,...X.normalizeParams(n)})}a(fx,"map");var v_=w("ZodSet",(e,t)=>{ed.init(e,t),Ae.init(e,t),e._zod.processJSONSchema=(n,o,r)=>sy(e,n,o,r),e.min=(...n)=>e.check(qr(...n)),e.nonempty=n=>e.check(qr(1,n)),e.max=(...n)=>e.check(wn(...n)),e.size=(...n)=>e.check(Qn(...n))});function mx(e,t){return new v_({type:"set",valueType:e,...X.normalizeParams(t)})}a(mx,"set");var Xi=w("ZodEnum",(e,t)=>{Ps.init(e,t),Ae.init(e,t),e._zod.processJSONSchema=(o,r,i)=>Xg(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 Xi({...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 Xi({...t,checks:[],...X.normalizeParams(r),entries:i})}});function Sp(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(o=>[o,o])):e;return new Xi({type:"enum",entries:n,...X.normalizeParams(t)})}a(Sp,"_enum");function hx(e,t){return new Xi({type:"enum",entries:e,...X.normalizeParams(t)})}a(hx,"nativeEnum");var E_=w("ZodLiteral",(e,t)=>{Ss.init(e,t),Ae.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Qg(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 gx(e,t){return new E_({type:"literal",values:Array.isArray(e)?e:[e],...X.normalizeParams(t)})}a(gx,"literal");var P_=w("ZodFile",(e,t)=>{td.init(e,t),Ae.init(e,t),e._zod.processJSONSchema=(n,o,r)=>ty(e,n,o,r),e.min=(n,o)=>e.check(qr(n,o)),e.max=(n,o)=>e.check(wn(n,o)),e.mime=(n,o)=>e.check(Fo(Array.isArray(n)?n:[n],o))});function yx(e){return kd(P_,e)}a(yx,"file");var S_=w("ZodTransform",(e,t)=>{Ts.init(e,t),Ae.init(e,t),e._zod.processJSONSchema=(n,o,r)=>iy(e,n,o,r),e._zod.parse=(n,o)=>{if(o.direction==="backward")throw new Gn(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 Tp(e){return new S_({type:"transform",transform:e})}a(Tp,"transform");var xp=w("ZodOptional",(e,t)=>{Mi.init(e,t),Ae.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Md(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function jc(e){return new xp({type:"optional",innerType:e})}a(jc,"optional");var T_=w("ZodExactOptional",(e,t)=>{rd.init(e,t),Ae.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Md(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function x_(e){return new T_({type:"optional",innerType:e})}a(x_,"exactOptional");var A_=w("ZodNullable",(e,t)=>{xs.init(e,t),Ae.init(e,t),e._zod.processJSONSchema=(n,o,r)=>fy(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function Mc(e){return new A_({type:"nullable",innerType:e})}a(Mc,"nullable");function _x(e){return jc(Mc(e))}a(_x,"nullish");var w_=w("ZodDefault",(e,t)=>{nd.init(e,t),Ae.init(e,t),e._zod.processJSONSchema=(n,o,r)=>hy(e,n,o,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function I_(e,t){return new w_({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():X.shallowClone(t)}})}a(I_,"_default");var R_=w("ZodPrefault",(e,t)=>{od.init(e,t),Ae.init(e,t),e._zod.processJSONSchema=(n,o,r)=>gy(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function C_(e,t){return new R_({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():X.shallowClone(t)}})}a(C_,"prefault");var Ap=w("ZodNonOptional",(e,t)=>{id.init(e,t),Ae.init(e,t),e._zod.processJSONSchema=(n,o,r)=>my(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function O_(e,t){return new Ap({type:"nonoptional",innerType:e,...X.normalizeParams(t)})}a(O_,"nonoptional");var k_=w("ZodSuccess",(e,t)=>{ad.init(e,t),Ae.init(e,t),e._zod.processJSONSchema=(n,o,r)=>ry(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function bx(e){return new k_({type:"success",innerType:e})}a(bx,"success");var $_=w("ZodCatch",(e,t)=>{sd.init(e,t),Ae.init(e,t),e._zod.processJSONSchema=(n,o,r)=>yy(e,n,o,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function N_(e,t){return new $_({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}a(N_,"_catch");var z_=w("ZodNaN",(e,t)=>{cd.init(e,t),Ae.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Yg(e,n,o,r)});function vx(e){return Od(z_,e)}a(vx,"nan");var wp=w("ZodPipe",(e,t)=>{As.init(e,t),Ae.init(e,t),e._zod.processJSONSchema=(n,o,r)=>_y(e,n,o,r),e.in=t.in,e.out=t.out});function Lc(e,t){return new wp({type:"pipe",in:e,out:t})}a(Lc,"pipe");var Ip=w("ZodCodec",(e,t)=>{wp.init(e,t),Li.init(e,t)});function Ex(e,t,n){return new Ip({type:"pipe",in:e,out:t,transform:n.decode,reverseTransform:n.encode})}a(Ex,"codec");var D_=w("ZodReadonly",(e,t)=>{ud.init(e,t),Ae.init(e,t),e._zod.processJSONSchema=(n,o,r)=>by(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function U_(e){return new D_({type:"readonly",innerType:e})}a(U_,"readonly");var j_=w("ZodTemplateLiteral",(e,t)=>{ld.init(e,t),Ae.init(e,t),e._zod.processJSONSchema=(n,o,r)=>ey(e,n,o,r)});function Px(e,t){return new j_({type:"template_literal",parts:e,...X.normalizeParams(t)})}a(Px,"templateLiteral");var M_=w("ZodLazy",(e,t)=>{fd.init(e,t),Ae.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Ey(e,n,o,r),e.unwrap=()=>e._zod.def.getter()});function L_(e){return new M_({type:"lazy",getter:e})}a(L_,"lazy");var F_=w("ZodPromise",(e,t)=>{pd.init(e,t),Ae.init(e,t),e._zod.processJSONSchema=(n,o,r)=>vy(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function Sx(e){return new F_({type:"promise",innerType:e})}a(Sx,"promise");var B_=w("ZodFunction",(e,t)=>{dd.init(e,t),Ae.init(e,t),e._zod.processJSONSchema=(n,o,r)=>oy(e,n,o,r)});function Tx(e){return new B_({type:"function",input:Array.isArray(e?.input)?y_(e?.input):e?.input??qc(Go()),output:e?.output??Go()})}a(Tx,"_function");var Gc=w("ZodCustom",(e,t)=>{ws.init(e,t),Ae.init(e,t),e._zod.processJSONSchema=(n,o,r)=>ny(e,n,o,r)});function xx(e){let t=new Je({check:"custom"});return t._zod.check=e,t}a(xx,"check");function Ax(e,t){return vc(Gc,e??(()=>!0),t)}a(Ax,"custom");function q_(e,t={}){return Ec(Gc,e,t)}a(q_,"refine");function V_(e){return $d(e)}a(V_,"superRefine");var wx=Nd,Ix=zd;function Rx(e,t={}){let n=new Gc({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(Rx,"_instanceof");var Cx=a((...e)=>Dd({Codec:Ip,Boolean:ta,String:Qi},...e),"stringbool");function Ox(e){let t=L_(()=>Pp([tp(e),t_(),r_(),a_(),qc(t),__(tp(),t)]));return t}a(Ox,"json");function kx(e,t){return Lc(Tp(e),t)}a(kx,"preprocess");var PU={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 SU(e){at({customError:e})}a(SU,"setErrorMap");function TU(){return at().customError}a(TU,"getErrorMap");var H_;H_||(H_={});var ne={...Dc,...Kd,iso:Ki},xU=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 AU(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(AU,"detectVersion");function wU(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(wU,"resolveRef");function $x(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return ne.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 ne.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=wU(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 ne.null();if(r.length===0)return ne.never();if(r.length===1)return ne.literal(r[0]);if(r.every(s=>typeof s=="string"))return ne.enum(r);let i=r.map(s=>ne.literal(s));return i.length<2?i[0]:ne.union([i[0],i[1],...i.slice(2)])}if(e.const!==void 0)return ne.literal(e.const);let n=e.type;if(Array.isArray(n)){let r=n.map(i=>{let s={...e,type:i};return $x(s,t)});return r.length===0?ne.never():r.length===1?r[0]:ne.union(r)}if(!n)return ne.any();let o;switch(n){case"string":{let r=ne.string();if(e.format){let i=e.format;i==="email"?r=r.check(ne.email()):i==="uri"||i==="uri-reference"?r=r.check(ne.url()):i==="uuid"||i==="guid"?r=r.check(ne.uuid()):i==="date-time"?r=r.check(ne.iso.datetime()):i==="date"?r=r.check(ne.iso.date()):i==="time"?r=r.check(ne.iso.time()):i==="duration"?r=r.check(ne.iso.duration()):i==="ipv4"?r=r.check(ne.ipv4()):i==="ipv6"?r=r.check(ne.ipv6()):i==="mac"?r=r.check(ne.mac()):i==="cidr"?r=r.check(ne.cidrv4()):i==="cidr-v6"?r=r.check(ne.cidrv6()):i==="base64"?r=r.check(ne.base64()):i==="base64url"?r=r.check(ne.base64url()):i==="e164"?r=r.check(ne.e164()):i==="jwt"?r=r.check(ne.jwt()):i==="emoji"?r=r.check(ne.emoji()):i==="nanoid"?r=r.check(ne.nanoid()):i==="cuid"?r=r.check(ne.cuid()):i==="cuid2"?r=r.check(ne.cuid2()):i==="ulid"?r=r.check(ne.ulid()):i==="xid"?r=r.check(ne.xid()):i==="ksuid"&&(r=r.check(ne.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"?ne.number().int():ne.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=ne.boolean();break}case"null":{o=ne.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):ne.any();if(Object.keys(r).length===0){o=ne.record(d,p);break}let f=ne.object(r).passthrough(),g=ne.looseRecord(d,p);o=ne.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),_=ne.string().regex(new RegExp(y));f.push(ne.looseRecord(_,h))}let g=[];if(Object.keys(r).length>0&&g.push(ne.object(r).passthrough()),g.push(...f),g.length===0)o=ne.object({}).passthrough();else if(g.length===1)o=g[0];else{let y=ne.intersection(g[0],g[1]);for(let h=2;h<g.length;h++)y=ne.intersection(y,g[h]);o=y}break}let u=ne.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=ne.tuple(s).rest(u):o=ne.tuple(s),typeof e.minItems=="number"&&(o=o.check(ne.minLength(e.minItems))),typeof e.maxItems=="number"&&(o=o.check(ne.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=ne.tuple(s).rest(u):o=ne.tuple(s),typeof e.minItems=="number"&&(o=o.check(ne.minLength(e.minItems))),typeof e.maxItems=="number"&&(o=o.check(ne.maxLength(e.maxItems)))}else if(i!==void 0){let s=zt(i,t),u=ne.array(s);typeof e.minItems=="number"&&(u=u.min(e.minItems)),typeof e.maxItems=="number"&&(u=u.max(e.maxItems)),o=u}else o=ne.array(ne.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($x,"convertBaseSchema");function zt(e,t){if(typeof e=="boolean")return e?ne.any():ne.never();let n=$x(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=ne.union(u);n=o?ne.intersection(n,d):d}if(e.oneOf&&Array.isArray(e.oneOf)){let u=e.oneOf.map(p=>zt(p,t)),d=ne.xor(u);n=o?ne.intersection(n,d):d}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)n=o?n:ne.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=ne.intersection(u,zt(e.allOf[p],t));n=u}e.nullable===!0&&t.version==="openapi-3.0"&&(n=ne.nullable(n)),e.readOnly===!0&&(n=ne.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))xU.has(u)||(r[u]=e[u]);return Object.keys(r).length>0&&t.registry.add(n,r),n}a(zt,"convertSchema");function Nx(e,t){if(typeof e=="boolean")return e?ne.any():ne.never();let n=AU(e,t?.defaultTarget),o=e.$defs||e.definitions||{},r={version:n,defs:o,refs:new Map,processing:new Set,rootSchema:e,registry:t?.registry??Et};return zt(e,r)}a(Nx,"fromJSONSchema");var Z_={};Jt(Z_,{bigint:()=>OU,boolean:()=>CU,date:()=>kU,number:()=>RU,string:()=>IU});function IU(e){return Ns(Qi,e)}a(IU,"string");function RU(e){return ac(ea,e)}a(RU,"number");function CU(e){return uc(ta,e)}a(CU,"boolean");function OU(e){return lc(ra,e)}a(OU,"bigint");function kU(e){return mc(Bc,e)}a(kU,"date");at(Is());var G_={required:"required",invalidGitRepoSlug:"invalidGitRepoSlug",invalidGitRepoBranch:"invalidGitRepoBranch",invalidGitRepoRemoteUrl:"invalidGitRepoRemoteUrl",invalidExternalId:"invalidExternalId",invalidFileName:"invalidFileName",messageRequiresContentOrFiles:"messageRequiresContentOrFiles",agentConfigTooLarge:"agentConfigTooLarge",invalidGcpResourceId:"invalidGcpResourceId",duplicateRouteName:"duplicateRouteName",atLeastOne:"atLeastOne",wholeNumber:"wholeNumber",atMostTenThousand:"atMostTenThousand",tierNameTooLong:"tierNameTooLong",tierDescriptionTooLong:"tierDescriptionTooLong",invalidEmoji:"invalidEmoji",tierTooManyModels:"tierTooManyModels",tierDuplicateModel:"tierDuplicateModel",tierThinkingBudgetInvalid:"tierThinkingBudgetInvalid",invalidHeaderName:"invalidHeaderName",reservedHeaderName:"reservedHeaderName",duplicateHeaderName:"duplicateHeaderName",invalidHeaderValue:"invalidHeaderValue"};var zx=(n=>(n.IMAGE="image",n.TEXT="text",n))(zx||{}),qt=te.object({apiKey:te.string()}),Dx=te.object({serviceAccountJson:te.string().min(1)}),Ux=qt,jx=qt.extend({apiKeyHash:te.string()}),Mx=qt,Lx=qt,Fx=qt,Bx=qt,qx=qt,Vx=qt,Hx=te.object({accessKeyId:te.string().min(1),secretAccessKey:te.string().min(1),sessionToken:te.string().optional()}),Zx=qt,Gx=te.object({}),Wx=te.object({}),W_=te.object({modelId:te.string(),modelName:te.string(),modelType:te.enum(zx)}),Jx=te.object({apiKeyHeader:te.string(),baseUrl:te.string(),models:te.array(W_),defaultHeaders:te.record(te.string(),te.string()).optional(),apiStyle:te.enum(["chat","responses"]).optional()}),Kx=te.object({accountId:te.string(),gatewayId:te.string(),models:te.array(W_),vertexProject:te.string().optional(),vertexRegion:te.string().optional()}),Xx=te.object({resourceName:te.string(),apiVersion:te.preprocess(e=>typeof e=="string"&&e.trim().length===0?void 0:e,te.string().optional())}),Qx=te.object({}),Yx=te.object({}),eA=te.object({}),tA=te.object({region:te.string().min(1)}),rA=te.object({project:te.string().regex(/^[a-z0-9][a-z0-9-]{0,62}$/,G_.invalidGcpResourceId),region:te.string().regex(/^[a-z0-9][a-z0-9-]{0,62}$/,G_.invalidGcpResourceId),models:te.array(W_)}),nA=te.object({}),Jo=te.object({}),XW=te.union([Ux,Fx,Bx,qx,Vx,Lx,Mx,jx,Hx,Dx,Zx]),QW=te.union([Jx,Kx,Xx,rA,tA,Gx,Qx,Yx,eA,Wx,nA,Jo]),YW=te.discriminatedUnion("provider",[te.object({provider:te.literal("openai"),config:Yx.partial(),auth:qx.partial()}),te.object({provider:te.literal("openrouter"),config:eA.partial(),auth:Vx.partial()}),te.object({provider:te.literal("anthropic"),config:Gx.partial(),auth:Ux.partial()}),te.object({provider:te.literal("azure"),config:Xx.partial(),auth:Fx.partial()}),te.object({provider:te.literal("google"),config:Qx.partial(),auth:Bx.partial()}),te.object({provider:te.literal("cloudflare-gateway"),config:Kx.partial(),auth:Lx.partial()}),te.object({provider:te.literal("custom"),config:Jx.partial(),auth:Mx.partial()}),te.object({provider:te.literal("activepieces"),config:Wx.partial(),auth:jx.partial()}),te.object({provider:te.literal("bedrock"),config:tA.partial(),auth:Hx.partial()}),te.object({provider:te.literal("vertex"),config:rA.partial(),auth:Dx.partial()}),te.object({provider:te.literal("mistral"),config:nA.partial(),auth:Zx.partial()}),te.object({provider:te.literal("xai"),config:Jo.partial(),auth:qt.partial()}),te.object({provider:te.literal("deepseek"),config:Jo.partial(),auth:qt.partial()}),te.object({provider:te.literal("zai"),config:Jo.partial(),auth:qt.partial()}),te.object({provider:te.literal("qwen"),config:Jo.partial(),auth:qt.partial()}),te.object({provider:te.literal("minimax"),config:Jo.partial(),auth:qt.partial()}),te.object({provider:te.literal("moonshot"),config:Jo.partial(),auth:qt.partial()})]);var uJ=b().check(Ct(/^#[0-9A-Fa-f]{6}$/));var dJ=k({filename:b(),data:be(),type:de("file"),mimetype:L(b())});var $U=Rt(iA());var _J=k({...Ir,name:b(),permissions:he(b()),platformId:ct(b()),type:b(),userCount:L(Pt())});var IJ=te.enum(["active","out_of_credits","rejected","unreachable"]);var aA=(o=>(o.AGENT_DECIDE="agent-decide",o.CHOOSE_YOURSELF="choose-yourself",o.LEAVE_EMPTY="leave-empty",o))(aA||{}),J_=(n=>(n.FILE="FILE",n.TABLE="TABLE",n))(J_||{}),K_=(o=>(o.SSE="sse",o.STREAMABLE_HTTP="streamable-http",o.SIMPLE_HTTP="http",o))(K_||{});var X_=(o=>(o.TEXT="text",o.NUMBER="number",o.BOOLEAN="boolean",o))(X_||{});var Q_=(n=>(n.IN_PROGRESS="in-progress",n.COMPLETED="completed",n))(Q_||{});var NU=k({mode:fe(aA),value:be()}),zU=k({auth:L(b()),fields:ve(b(),NU)}),DU=k({pieceName:b(),pieceVersion:b(),actionName:b(),predefinedInput:L(zU)}),UU=k({type:de("PIECE"),toolName:b().check(lt(1)),pieceMetadata:DU}),jU=k({type:de("none")}),MU=k({type:de("access_token"),accessToken:b()}),LU=k({type:de("api_key"),apiKey:b(),apiKeyHeader:b()}),FU=k({type:de("headers"),headers:ve(b(),b())}),BU=oo("type",[jU,MU,LU,FU]),sA=k({type:de("FLOW"),toolName:b().check(lt(1)),externalFlowId:b(),flowDisplayName:L(b())}),cA=k({type:de("MCP"),toolName:b().check(lt(1)),serverUrl:tT(),protocol:fe(K_),auth:BU}),uA=k({type:de("KNOWLEDGE_BASE"),toolName:b().check(lt(1)),sourceType:fe(J_),sourceId:b(),sourceName:b()}),qU=oo("type",[UU,sA,cA,uA]),VU=k({displayName:b(),description:L(b()),type:fe(X_)}),lA=k({type:de("MARKDOWN"),markdown:b()}),na={type:de("TOOL_CALL"),input:ct(ve(b(),be())),output:L(be()),toolName:b(),status:fe(Q_),toolCallId:b(),startTime:b(),endTime:L(b())},h3=k(na),dA=oo("toolCallType",[k({...na,toolCallType:de("PIECE"),pieceName:b(),pieceVersion:b(),actionName:b()}),k({...na,toolCallType:de("FLOW"),displayName:b(),externalFlowId:b()}),k({...na,toolCallType:de("MCP"),displayName:b(),serverUrl:b()}),k({...na,toolCallType:de("KNOWLEDGE_BASE"),displayName:b(),sourceType:b()}),k({...na,toolCallType:de("UNKNOWN"),displayName:b()})]),HU=xe([lA,dA]);var ZU=10800*1e3,GU=900*1e3;var tb=(n=>(n.IMAGE="image",n.TEXT="text",n))(tb||{}),kn=k({apiKey:b()}),JU=kn,KU=k({apiKey:b(),apiKeyHash:b()}),XU=kn,QU=kn,YU=kn,ej=kn,tj=kn,rj=kn,nj=kn,hA=k({serviceAccountJson:b().check(lt(1))}),gA=k({accessKeyId:b().check(lt(1)),secretAccessKey:b().check(lt(1)),sessionToken:L(b())}),oj=k({}),ij=k({}),aj=k({}),sj=k({}),cj=k({}),uj=k({}),rb=k({modelId:b(),modelName:b(),modelType:fe(tb)}),yA=k({apiKeyHeader:b(),baseUrl:b(),models:he(rb),defaultHeaders:L(ve(b(),b())),apiStyle:L(fe(["chat","responses"]))}),_A=k({accountId:b(),gatewayId:b(),models:he(rb),vertexProject:L(b()),vertexRegion:L(b())}),bA=k({resourceName:b(),apiVersion:ao(io(e=>typeof e=="string"&&e.trim().length===0?void 0:e),L(b()))}),vA=k({region:b().check(lt(1))}),EA=k({project:b().check(Ct(/^[a-z0-9][a-z0-9-]{0,62}$/)),region:b().check(Ct(/^[a-z0-9][a-z0-9-]{0,62}$/)),models:he(rb)}),PA=k({}),lj=xe([JU,YU,ej,tj,rj,QU,XU,KU,gA,hA,nj]),SA=xe([yA,_A,bA,EA,vA,oj,aj,sj,cj,ij,uj,PA]),dj=k({id:b(),name:b(),type:fe(tb)}),pj=k({id:b(),name:b(),provider:fe(uo),config:SA,enabledForChat:ze()}),fj=k({provider:fe(uo),name:b(),enabledForChat:ze(),keys:he(k({id:b(),name:b()}))}),mj=k({provider:fe(uo),configId:b(),config:SA,auth:lj,platformId:b()});var b3={openai:"openai",anthropic:"anthropic","google-ai-studio":"google","google-vertex-ai":"google"},pA=["gpt-5.5","gpt-5.4-mini","gpt-5.4-nano","gpt-4.1","gpt-4.1-mini"],hj=["claude-sonnet-4-6","claude-opus-4-7","claude-haiku-4-5"],TA=["claude-sonnet-4.6","claude-opus-4.7","claude-opus-4.8","claude-haiku-4.5"],Y_=["gemini-3.7-flash","gemini-3.1-pro-preview","gemini-3-flash-preview"],eb=["gemini-2.5-pro","gemini-2.5-flash"],gj=["grok-4.20"],v3={google:eb,vertex:eb},E3=TA.map(e=>`anthropic/${e}`),yj={openai:pA,anthropic:hj,google:Y_,vertex:Y_,activepieces:[...TA.map(e=>`anthropic/${e}`),...pA.map(e=>`openai/${e}`),...[...Y_,...eb].map(e=>`google/${e}`),...gj.map(e=>`x-ai/${e}`)]};var fA=128e3,_j={openai:128e3,anthropic:2e5,google:1048576,bedrock:2e5,vertex:1048576,azure:128e3,openrouter:128e3,activepieces:2e5,mistral:128e3};function bj({provider:e}){return e?_j[e]??fA:fA}a(bj,"getMaxContextTokens");var mA={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"},vj={anthropic:"native",google:"native",openrouter:"plugin",activepieces:"plugin"},Ej=new Set(["anthropic","mistral","xai","deepseek","zai","qwen","minimax","moonshot"]),Pj={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:yj[e],maxContextTokens:bj({provider:e}),defaultEmbeddingModel:mA[e],supportsEmbedding:mA[e]!==void 0,supportsImageGeneration:!Ej.has(e),defaultImageModel:Sj[e],webSearch:vj[e]}}a(Ot,"buildProviderCapabilities");var xA=[{id:"fast",label:"Fast",modelId:"google/gemini-3.1-flash-lite-image"},{id:"smart",label:"Expert",modelId:"google/gemini-3.1-flash-image"},{id:"premium",label:"Heavy",modelId:"google/gemini-3-pro-image"}],Sj={activepieces:xA[0].modelId,openrouter:"google/gemini-3.1-flash-lite-image",openai:"gpt-image-1.5",google:"gemini-3.1-flash-image"},Tj={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 xj=k({base64Url:b(),fileName:b(),extension:L(b())}),Aj=k({mimeType:b(),url:b(),fileName:L(b())}),nb=xe([xj,Aj]);var wj=xe([k({type:de("file"),value:nb}),k({type:de("markdown"),value:b(),files:L(he(nb))})]),Ij=k({sessionId:b(),message:b(),files:L(he(b()))});var wA=(n=>(n.ON_NEW_RECORD="ON_NEW_RECORD",n.ON_UPDATE_RECORD="ON_UPDATE_RECORD",n))(wA||{}),IA=(n=>(n.ENABLED="ENABLED",n.DISABLED="DISABLED",n))(IA||{}),ob=(o=>(o.RECORD_CREATED="RECORD_CREATED",o.RECORD_UPDATED="RECORD_UPDATED",o.RECORD_DELETED="RECORD_DELETED",o))(ob||{});var Rj=xe([k({...Ir,name:b(),externalId:b(),type:de("STATIC_DROPDOWN"),tableId:b(),projectId:b(),data:k({options:he(k({value:b()}))})}),k({...Ir,name:b(),externalId:b(),type:xe([de("TEXT"),de("NUMBER"),de("DATE"),de("DATETIME")]),tableId:b(),projectId:b()})]),Cj=k({...Ir,name:b(),folderId:ct(b()),projectId:b(),externalId:b(),status:Uy(IA),trigger:Uy(wA)}),Oj=k({...Ir,tableId:b(),projectId:b(),cells:ve(b(),k({updated:b(),created:b(),value:be(),fieldName:b()}))}),kj=k({events:he(fe(ob)),webhookUrl:b(),flowId:b()}),$j=k({fields:he(k({id:b(),name:b()})),rows:he(ve(b(),b())),name:b()}),Nj=k({projectId:b(),limit:L(xc.number()),cursor:L(b()),name:L(b()),externalIds:Jd(b()),folderId:L(b()),folderIds:Jd(b())}),zj=k({records:he(he(k({fieldId:b(),value:CA()}))),tableId:b()}),Dj=k({cells:L(he(k({fieldId:b(),value:CA()}))),tableId:b(),agentUpdate:L(ze())}),RA=oo("operator",[Ko("eq"),Ko("neq"),Ko("gt"),Ko("gte"),Ko("lt"),Ko("lte"),Ko("co"),AA("exists"),AA("not_exists")]),Uj=k({tableId:b(),limit:L(xc.number()),cursor:L(b()),filters:Jd(RA)});function CA(){return ao(io(e=>e==null?e:String(e)),Tc(b()))}a(CA,"coerceToString");function Ko(e){return k({fieldId:b(),operator:de(e),value:b()})}a(Ko,"valueFilter");function AA(e){return k({fieldId:b(),operator:de(e)})}a(AA,"existenceFilter");var jj=k({status:L(Pt()),body:L(be()),headers:L(ve(b(),b()))}),Mj=k({...Ir,deleted:ct(co),ownerId:b(),displayName:b(),platformId:b(),externalId:ct(b())});var OA=k({name:b(),description:L(b()),type:b(),required:ze()}),Lj=k({pieceName:b(),triggerName:b(),input:k({toolName:b(),toolDescription:b(),inputSchema:he(OA),returnsResponse:ze()})});var kA="^[0-9]+\\.[0-9]+\\.[0-9]+$",L3=new RegExp(kA),Bj="^([~^])?[0-9]+\\.[0-9]+\\.[0-9]+$",F3=b().check(Ct(new RegExp(kA))),B3=b().check(Ct(new RegExp(Bj))),qj=k({packageType:de("ARCHIVE"),pieceType:fe(Gi),pieceName:b(),pieceVersion:b(),archiveId:b(),platformId:b()}),$A=k({packageType:de("REGISTRY"),pieceType:de("OFFICIAL"),pieceName:b(),pieceVersion:b()}),NA=k({packageType:de("REGISTRY"),pieceType:de("CUSTOM"),pieceName:b(),pieceVersion:b(),platformId:b()}),q3=xe([$A,NA]),V3=xe([qj,$A,NA]);var Vj=oo("type",[k({type:de("CRON_EXPRESSION"),cronExpression:b(),timezone:b()}),k({type:de("INTERVAL"),intervalMs:rT().check(_t(6e4))})]),H3=k({...Ir,type:fe(Vr),projectId:b(),flowId:b(),triggerName:b(),schedule:ct(Vj),flowVersionId:b(),pieceName:b(),pieceVersion:b(),deleted:ct(b()),simulate:ze()}),zA=(R=>(R.UNKNOWN="UNKNOWN",R.FLOW_RUN_LOG="FLOW_RUN_LOG",R.FLOW_RUN_LOG_SLICE="FLOW_RUN_LOG_SLICE",R.PACKAGE_ARCHIVE="PACKAGE_ARCHIVE",R.FLOW_STEP_FILE="FLOW_STEP_FILE",R.SAMPLE_DATA="SAMPLE_DATA",R.TRIGGER_PAYLOAD="TRIGGER_PAYLOAD",R.SAMPLE_DATA_INPUT="SAMPLE_DATA_INPUT",R.TRIGGER_EVENT_FILE="TRIGGER_EVENT_FILE",R.PROJECT_RELEASE="PROJECT_RELEASE",R.FLOW_VERSION_BACKUP="FLOW_VERSION_BACKUP",R.PLATFORM_ASSET="PLATFORM_ASSET",R.USER_PROFILE_PICTURE="USER_PROFILE_PICTURE",R.WEBHOOK_PAYLOAD="WEBHOOK_PAYLOAD",R.MCP_CALL_PAYLOAD="MCP_CALL_PAYLOAD",R.KNOWLEDGE_BASE="KNOWLEDGE_BASE",R.FLOW_BUNDLE="FLOW_BUNDLE",R.PREWARM_SCOPE="PREWARM_SCOPE",R))(zA||{}),DA=(n=>(n.NONE="NONE",n.ZSTD="ZSTD",n))(DA||{}),UA=(n=>(n.S3="S3",n.DB="DB",n))(UA||{}),Z3=k({...Ir,projectId:ct(b()),platformId:ct(b()),type:fe(zA),compression:fe(DA),data:L(be()),location:fe(UA),size:ct(Pt()),fileName:ct(b()),s3Key:ct(b()),metadata:ct(ve(b(),b()))}),jA=(o=>(o.ADMIN="ADMIN",o.MEMBER="MEMBER",o.OPERATOR="OPERATOR",o))(jA||{}),MA=(n=>(n.ACTIVE="ACTIVE",n.INACTIVE="INACTIVE",n))(MA||{}),G3=k({id:b(),email:b(),firstName:b(),status:fe(MA),externalId:ct(b()),platformId:ct(b()),platformRole:fe(jA),lastName:b(),created:co,updated:co,lastActiveDate:ct(co),imageUrl:ct(b())});var ab=k({...ke.shape,...Ee(ve(b(),be()),"OBJECT").shape});var sb=k({...ke.shape,formatProperty:L(b()),...Ee(b(),"RICH_TEXT").shape});var BA=k({...ke.shape,...Ee(b(),"COLOR").shape});var cb=xe([dr,In,sb,Zd,Cn,pr,Rn,Cy,Ac,ky,On,Rc,ab,Cc,Ic,Oy,wc,BA]),oe={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 on=k({displayName:b(),description:L(b()),hasConnectionIdentifier:L(ze())});var qA=k({username:b(),password:b()}),ub=k({...on.shape,username:k({displayName:b(),description:L(b())}),password:k({displayName:b(),description:L(b())}),...Ee(qA,"BASIC_AUTH").shape});var Wj=ve(b(),xe([dr,In,On,Cn,pr])),lb=k({...on.shape,props:Wj,...Ee(be(),"CUSTOM_AUTH").shape});var Xo=k({...on.shape,...Ee(k({auth:b()}),"SECRET_TEXT").shape});var Jj=ve(b(),xe([dr,In,Xo,On,Cn,pr,Rn,Zd])),VA=k({...on.shape,props:Jj,...Ee(be(),"OIDC").shape});var db=(n=>(n.HEADER="HEADER",n.BODY="BODY",n))(db||{}),HA=xe([dr,Xo,pr]),ZA=ve(b(),HA),Kj=k({props:L(ve(b(),HA)),authUrl:b(),tokenUrl:b(),scope:he(b()),prompt:L(xe([de("none"),de("consent"),de("login"),de("omit")])),pkce:L(ze()),pkceMethod:L(xe([de("plain"),de("S256")])),authorizationMethod:L(fe(db)),grantType:L(xe([fe(kc),de($y)])),extra:L(ve(b(),b()))}),GA=k({access_token:b(),props:L(ZA),data:ve(b(),Sc())}),pb=k({...on.shape,...Kj.shape,...Ee(GA,"OAUTH2").shape});var oa=xe([ub,lb,VA,pb,Xo]),Wc="Connection",Cp={SecretText(e){return{...e,valueSchema:void 0,type:"SECRET_TEXT"}},OAuth2(e){return{...e,valueSchema:void 0,type:"OAUTH2",displayName:e.displayName||Wc}},BasicAuth(e){return{...e,valueSchema:void 0,type:"BASIC_AUTH",displayName:e.displayName||Wc,required:!0}},CustomAuth(e){return{...e,valueSchema:void 0,type:"CUSTOM_AUTH",displayName:e.displayName||Wc}},OIDC(e){return{...e,valueSchema:void 0,type:"OIDC",displayName:e.displayName||Wc}},None(){}};var CX={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 Xj=k({...ke.shape,...Ee(be(),"CUSTOM").shape,code:b()});var Qj=xe([cb,oa]),fb=ve(b(),Qj),KX=ve(b(),cb);var WA=xe([k({strategy:de("CRON"),cronExpression:b()}),k({strategy:de("NONE")})]),ia=class{constructor(t,n,o,r,i,s,u,d,p,f,g,y,h,_,P,S,T,R,V,W,H){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=S;this.testStrategy=T;this.outputSchema=R;this.aiMetadata=V;this.classification=W;this.propertyGroups=H}static{a(this,"ITrigger")}},lo=a(e=>{switch(e.type){case"WEBHOOK":return new ia(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 ia(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 ia(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 ia(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,st(e.sampleData)&&st(e.test)?"SIMULATION":"TEST_FUNCTION",e.outputSchema,e.aiMetadata,e.classification,e.propertyGroups)}},"createTrigger");var JA="2",Op="0.82.0";var mb=class{constructor(t,n,o,r,i,s,u,d,p=Op,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:JA}),"getContextInfo");(!eM(p)||tM(p,Op))&&(this.minimumSupportedRelease=Op),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:Yj(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}},XA=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 mb(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 Yj(e){if(e!==void 0)return Array.isArray(e)?e.map(KA):KA(e)}a(Yj,"withConnectionIdentifierFlag");function KA(e){return{...e,hasConnectionIdentifier:e.getConnectionIdentifier!==void 0}}a(KA,"flagConnectionIdentifier");function eM(e){return/^\d+\.\d+\.\d+$/.test(e)}a(eM,"isValidSimpleSemver");function tM(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(tM,"isSemverLessThan");var rM=L(ve(b(),ve(b(),b()))),QA=k({id:L(b()),name:b(),displayName:b(),logoUrl:b(),description:b(),authors:he(b()),platformId:L(b()),directoryPath:L(b()),auth:L(xe([oa,he(oa)])),version:b(),categories:L(he(fe(Wi))),minimumSupportedRelease:L(b()),maximumSupportedRelease:L(b()),deprecated:L(ze()),i18n:rM}),nM=fe(["human","ai","both"]),YA=k({description:L(b()),idempotent:L(ze())}),ew=fe(["READ","SEARCH","WRITE","DESTRUCTIVE"]);var oM=fe(["tabs","section","summary","builder","footer"]),tw=k({key:b(),display:oM,label:L(b()),description:L(b()),icon:L(b()),props:he(b())}),rw=k({name:b(),displayName:b(),description:b(),props:fb,propertyGroups:L(he(tw)),requireAuth:ze(),errorHandlingOptions:L(Ry),outputSchema:L(qd()),audience:L(nM),aiMetadata:L(YA),classification:L(ew)}),nw=k({name:b(),displayName:b(),description:b(),props:fb,propertyGroups:L(he(tw)),errorHandlingOptions:L(Ry),type:fe(Vr),sampleData:be(),handshakeConfiguration:L(qd()),renewConfiguration:L(WA),testStrategy:fe(Nc),outputSchema:L(qd()),aiMetadata:L(YA),classification:L(ew)}),iM=k({...QA.shape,actions:ve(b(),rw),triggers:ve(b(),nw)}),aM=k({...QA.shape,actions:Pt(),triggers:Pt(),suggestedActions:L(he(rw)),suggestedTriggers:L(he(nw))}),ow=k({projectUsage:Pt(),pieceType:fe(Gi),packageType:fe(Oc),platformId:L(b()),archiveId:L(b())}),YQ=k({...iM.shape,...ow.shape}),e5=k({...aM.shape,...ow.shape}),t5=k({name:b(),version:b()});var sM=Rt(require("path")),cM=Rt(require("fs/promises"));var aa=require("node:stream");var kp=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 $p=class{static{a(this,"DelegatingAuthenticationConverter")}constructor(t=new hb,n=new gb){this.converters={BEARER_TOKEN:t,BASIC:n}}convert(t,n){return this.converters[t.type].convert(t,n)}},hb=class{static{a(this,"BearerTokenAuthenticationConverter")}convert(t,n){return n.Authorization=`Bearer ${t.token}`,n}},gb=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 Jc=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 iw({error:e,requestBody:t}){return e instanceof Jc?e.errorMessage():{response:{status:0,body:e instanceof Error?e.message:String(e)},request:{body:t}}}a(iw,"toFailsafeOutput");var Vt=(s=>(s.GET="GET",s.POST="POST",s.PATCH="PATCH",s.PUT="PUT",s.DELETE="DELETE",s.HEAD="HEAD",s))(Vt||{});var Np=class extends kp{static{a(this,"FetchHttpClient")}constructor(t="",n=new $p){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:_}=zp(t.method)?uM(t.body,i):{body:void 0,extraHeaders:{},isStream:!1},P=dM({...i,...h}),S=await lM(async()=>{let V=new AbortController,W=t.timeout&&t.timeout>0?setTimeout(()=>V.abort(),t.timeout):void 0;try{let H={method:t.method.toString(),headers:P,body:y,redirect:f?"follow":"manual",signal:V.signal};return _&&(H.duplex="half"),n?.dispatcher!==void 0&&(H.dispatcher=n.dispatcher),await fetch(d,H)}finally{W!==void 0&&clearTimeout(W)}},_?0:g),T=f?300:400;if(S.status<200||S.status>=T){let V=await aw(S,p==="stream"?"text":p),W=new Jc(t.body,{status:S.status,responseBody:V});throw console.error("[HttpClient#(sanitized error message)] Request failed:",W),W}let R=await aw(S,p);return{status:S.status,headers:pM(S.headers),body:R}}};function zp(e){return e!=="GET"&&e!=="HEAD"}a(zp,"acceptsRequestBody");function uM(e,t){if(cw(e))return{body:void 0,extraHeaders:{},isStream:!1};if(mM(e)){let o=fM(e);if(o!==null)return{body:o,extraHeaders:e.getHeaders(),isStream:!1};let r=new aa.PassThrough;return e.on("error",i=>r.destroy(i)),e.pipe(r),{body:r,extraHeaders:e.getHeaders(),isStream:!0}}return e instanceof aa.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(uM,"serializeBody");async function aw(e,t){switch(t){case"arraybuffer":return Buffer.from(await e.arrayBuffer());case"stream":return cw(e.body)?aa.Readable.from([]):aa.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(aw,"parseResponseBody");async function lM(e,t){let n;for(let o=0;o<=t;o++)try{let r=await e();if(r.status>=500&&o<t){await sw(o);continue}return r}catch(r){if(n=r,o<t){await sw(o);continue}throw r}throw n}a(lM,"sendWithRetries");function sw(e){let t=Math.min(1e3*2**e,3e4);return new Promise(n=>setTimeout(n,t))}a(sw,"backoff");function dM(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(dM,"normalizeHeaders");function pM(e){let t={};return e.forEach((n,o)=>{t[o]=n}),t}a(pM,"toHttpHeaders");function fM(e){if(!e.hasKnownLength()||e.getLengthSync()>hM)return null;let{data:t}=zy(()=>e.getBuffer());return t}a(fM,"bufferFormDataIfSafe");function mM(e){return typeof e=="object"&&e!==null&&typeof e.getHeaders=="function"&&typeof e.pipe=="function"&&typeof e.on=="function"}a(mM,"isNodeFormData");function cw(e){return e==null}a(cw,"isNil");var hM=100*1024*1024;var Ie=new Np;var r1=Rt(require("fs"));var n1={"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 o1(e){let t=e.split(";")[0].trim().toLowerCase();return n1[t]??""}a(o1,"contentTypeToExtension");var i1=a(({baseUrl:e,relativePath:t})=>{let n=e.endsWith("/")?e:`${e}/`,o=t.startsWith("/")?t.slice(1):t;return`${n}${o}`},"joinBaseUrlWithRelativePath"),a1=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 mR({auth:e,baseUrl:t,authMapping:n,description:o,displayName:r,name:i,props:s,extraProps:u,authLocation:d="headers",classification:p="WRITE"}){return pt({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:oe.DynamicProperties({auth:e,displayName:"",required:!0,refreshers:[],props:a(async({auth:f})=>({url:oe.ShortText({displayName:"URL",description:`Full URL, or a path relative to ${a1(t,f)}`,required:!0,placeholder:"/resource",defaultValue:f?t(f):"",...s?.url??{}})}),"props")}),method:oe.StaticDropdown({displayName:"Method",required:!0,defaultValue:"GET",options:{options:Object.values(Vt).map(f=>({label:f,value:f}))},...s?.method??{}}),headers:oe.Object({displayName:"Headers",description:"Authorization headers are injected automatically from your connection.",required:!1,...s?.headers??{}}),queryParams:oe.Object({displayName:"Query Parameters",description:"Appended to the URL as ?key=value.",required:!1,...s?.queryParams??{}}),body_type:oe.Dropdown({auth:e,displayName:"Body Type",required:!1,defaultValue:"none",refreshers:["method"],options:a(async({method:f})=>zp(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:oe.DynamicProperties({auth:e,displayName:"Body",refreshers:["body_type","method"],required:!1,props:a(async({body_type:f,method:g})=>{if(!f||!zp(g))return{};let y=f,h={};switch(y){case"none":break;case"json":h.data=oe.Json({displayName:"JSON Body",required:!0,...s?.body??{}});break;case"raw":h.data=oe.LongText({displayName:"Raw Body",required:!0});break;case"form_data":h.data=oe.Array({displayName:"Form Data",required:!0,properties:{fieldName:oe.ShortText({displayName:"Field Name",required:!0}),fieldType:oe.StaticDropdown({displayName:"Field Type",required:!0,options:{disabled:!1,options:[{label:"Text",value:"text"},{label:"File",value:"file"}]}}),textFieldValue:oe.LongText({displayName:"Text Field Value",required:!1}),fileFieldValue:oe.File({displayName:"File Field Value",required:!1})}});break}return h},"props")}),response_is_binary:oe.Checkbox({displayName:"Response is Binary",description:"Enable for files like PDFs, images, etc.",required:!1,defaultValue:!1,advanced:!0,...s?.response_is_binary??{}}),failsafe:oe.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:oe.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:oe.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:S,failsafe:T,timeout:R,response_is_binary:V,followRedirects:W}=f.propsValue;Wd(g,"Method"),Wd(y,"URL");let H=st(n)?{}:await n(f.auth,f.propsValue),G=y.url,re=G.startsWith("http://")||G.startsWith("https://")?G:i1({baseUrl:t(f.auth),relativePath:G}),ue={method:g,url:re,headers:{...h??{},...d==="headers"||!st(d)?H:{}},queryParams:{...d==="queryParams"?H:{},..._??{}},timeout:R?R*1e3:0,followRedirects:W};if(V&&(ue.responseType="arraybuffer"),P)if(S&&S!=="none"){let Y=P.data;if(S==="form_data"){let Ze=Y,{default:Ce}=await Promise.resolve().then(()=>Rt(fR())),Se=new Ce;for(let{fieldName:Le,fieldType:Me,textFieldValue:Ge,fileFieldValue:He}of Ze)Me==="text"&&!zc(Ge)?Se.append(Le,Ge):Me==="file"&&!zc(He)&&Se.append(Le,He.data,{filename:He?.filename});ue.body=Se,ue.headers={...ue.headers,...Se.getHeaders()}}else ue.body=Y}else S||(ue.body=P);try{let Y=await Ie.sendRequest(ue);return await s1(f.files,Y.body,Y.status,Y.headers,V)}catch(Y){if(T)return iw({error:Y,requestBody:ue.body});throw Y}},"run")})}a(mR,"createCustomApiCallAction");var s1=a(async(e,t,n,o,r)=>{let i;if(r&&c1(t)){let s=Array.isArray(o?.["content-type"])?o["content-type"][0]:o?.["content-type"],u=o1(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"),c1=a(e=>e instanceof ArrayBuffer||Buffer.isBuffer(e),"isBinaryBody");var ft={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(st(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=[];st(u)||p==-1?f=d??[]:f=d?.slice(0,p)??[],st(r)||(f=f.slice(-r));let g=f?.[0]?.id;return st(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&&!st(await t.get("lastPoll")))break;await t.put("lastPoll",Date.now());break}case 1:{if(i&&!st(await t.get("lastItem")))break;let u=(await e.items({store:t,auth:n,propsValue:o,lastItemId:null,server:r}))?.[0]?.id;st(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 u1(s.map(u=>u.data))}};function u1(e){return e.length<=5?e:e.slice(0,5)}a(u1,"getFirstFiveOrAll");var nP=Rt(v0());var $e="https://bigquery.googleapis.com/bigquery/v2",rP=["https://www.googleapis.com/auth/bigquery","email"],je=[Cp.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:rP}),Cp.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:oe.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:oe.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 nP.JWT({email:t.client_email,key:t.private_key,scopes:rP}).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 Fe(e){if(e.type==="CUSTOM_AUTH"){let t=JSON.parse(e.props.serviceAccountJson),o=await new nP.JWT({email:t.client_email,key:t.private_key,scopes:rP}).getAccessToken();if(o.token)return o.token;throw new Error("Could not retrieve access token from service account JSON")}return e.access_token}a(Fe,"getAccessToken");var tt=oe.Dropdown({auth:je,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 Fe(e);return{disabled:!1,options:((await Ie.sendRequest({method:"GET",url:`${$e}/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=oe.Dropdown({auth:je,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 Fe(e),o=[],r;do{let i=await Ie.sendRequest({method:"GET",url:`${$e}/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")}),It=oe.Dropdown({auth:je,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 Fe(e),r=[],i;do{let s=await Ie.sendRequest({method:"GET",url:`${$e}/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 ir(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(ir,"bigQueryRowsToFlat");async function E0(e,t,n,o){return(await Ie.sendRequest({method:"GET",url:`${$e}/projects/${t}/datasets/${n}/tables/${o}`,headers:{Authorization:`Bearer ${e}`},queryParams:{fields:"schema"}})).body.schema?.fields??[]}a(E0,"getTableSchema");async function cm(e,t,n,o){let i=(await Ie.sendRequest({method:"POST",url:`${$e}/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:`${$e}/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(cm,"runDmlQuery");async function ja(e,t,n,o){for(let r=0;r<60;r++){let i=await Ie.sendRequest({method:"GET",url:`${$e}/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(ja,"waitForJobResults");var P0=pt({auth:je,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:tt,query:oe.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:oe.Number({displayName:"Max Rows",description:"Maximum number of rows to return (up to 10,000)",required:!1,defaultValue:1e3}),location:oe.ShortText({displayName:"Location",description:"Geographic location of your dataset (e.g. US, EU, us-central1). Leave blank for US.",required:!1}),use_legacy_sql:oe.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 Fe(e.auth),p=(await Ie.sendRequest({method:"POST",url:`${$e}/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 ja(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:`${$e}/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=ir(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 $q(e){let t=`Type: ${e.type}${e.mode?` \xB7 Mode: ${e.mode}`:""}`;return oe.ShortText({displayName:e.name,description:t,required:e.mode==="REQUIRED"})}a($q,"fieldToProperty");var S0=pt({auth:je,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:tt,dataset_id:wt,table_id:It,values:oe.DynamicProperties({displayName:"Row Values",description:"Enter a value for each column. Fields are loaded from the table schema.",required:!0,auth:je,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 Fe(e),i=await E0(r,t,n,o);return Object.fromEntries(i.filter(s=>s.type!=="RECORD").map(s=>[s.name,$q(s)]))}catch{return{}}},"props")})},async run(e){let{project_id:t,dataset_id:n,table_id:o,values:r}=e.propsValue,i=await Fe(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:`${$e}/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 T0=pt({auth:je,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:tt,dataset_id:wt,table_id:It,rows:oe.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:oe.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:oe.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 Fe(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:`${$e}/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 x0=pt({auth:je,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:tt,dataset_id:wt,table_id:It,where_clause:oe.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:oe.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 Fe(e.auth),d=`DELETE FROM ${`\`${t}.${n}.${o}\``} WHERE ${r}`,p=await cm(s,t,d,i??void 0);return{success:!0,rows_deleted:p.deletedRowCount,job_id:p.jobId}}});var A0=pt({auth:je,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:tt,dataset_id:wt,table_id:It,set_expression:oe.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:oe.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:oe.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 Fe(e.auth),p=`UPDATE ${`\`${t}.${n}.${o}\``} SET ${r} WHERE ${i}`,f=await cm(u,t,p,s??void 0);return{success:!0,rows_updated:f.updatedRowCount,job_id:f.jobId}}});var w0=pt({auth:je,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:tt,dataset_id:wt,table_id:It,where_clause:oe.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:oe.ShortText({displayName:"ORDER BY",description:"Optional column(s) to sort results before picking the first row. Example: `created_at DESC`",required:!1}),location:oe.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 Fe(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:`${$e}/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 S=await ja(u,t,y.jobReference.jobId,s??void 0);y={...S,jobReference:y.jobReference},h=S.schema?.fields??h}let _=ir(h,y.rows??[]),P=_.length>0;return{found:P,...P?_[0]:{}}}});var I0=pt({auth:je,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:tt,dataset_id:wt,table_id:It,where_clause:oe.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:oe.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:oe.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 Fe(e.auth),p=`SELECT * FROM ${`\`${t}.${n}.${o}\``} WHERE ${r} LIMIT 1`,g=(await Ie.sendRequest({method:"POST",url:`${$e}/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 R=await ja(u,t,g.jobReference.jobId,s??void 0);g={...R,jobReference:g.jobReference},y=R.schema?.fields??y}let h=ir(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)}`,T=(await Ie.sendRequest({method:"POST",url:`${$e}/projects/${t}/datasets/${n}/tables/${o}/insertAll`,headers:{Authorization:`Bearer ${u}`},body:{kind:"bigquery#tableDataInsertAllRequest",rows:[{insertId:P,json:_}]}})).body.insertErrors??[];if(T.length>0){let R=T[0]?.errors[0];throw new Error(`Row creation failed: ${R?.message??"Unknown error"} (reason: ${R?.reason??"unknown"})`)}return{found:!1,created:!0,insert_id:P,..._}}});var R0=pt({auth:je,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:tt,job_id:oe.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:oe.Number({displayName:"Max Rows",description:"Maximum number of rows to return (up to 10,000). Default: 1,000.",required:!1,defaultValue:1e3}),location:oe.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 Fe(e.auth),u=[],d=[],p,f="0",g="0",y=!1;do{let _=i-u.length,S=(await Ie.sendRequest({method:"GET",url:`${$e}/projects/${t}/queries/${n}`,headers:{Authorization:`Bearer ${s}`},queryParams:{maxResults:String(Math.min(_,1e3)),timeoutMs:"10000",...p?{pageToken:p}:{},...r?{location:r}:{}}})).body;if(!S.jobComplete)throw new Error(`Job ${n} has not completed yet. Wait for the job to finish before fetching results.`);S.schema?.fields&&(d=S.schema.fields),u.push(...S.rows??[]),p=S.pageToken,f=S.totalRows??f,g=S.totalBytesProcessed??g,y=S.cacheHit??y}while(p&&u.length<i);let h=ir(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 C0=500;function Nq(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(Nq,"parseInputData");var O0=pt({auth:je,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:tt,dataset_id:wt,table_id:It,data:oe.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:oe.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:oe.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=Nq(r);if(u.length===0)throw new Error("Data contains no rows to import.");let d=await Fe(e.auth),p=Date.now(),f=0,g=0,y=[];for(let h=0;h<u.length;h+=C0){let _=u.slice(h,h+C0),P=_.map((R,V)=>({insertId:`${p}-${h+V}-${Math.random().toString(36).slice(2,9)}`,json:R})),T=(await Ie.sendRequest({method:"POST",url:`${$e}/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(T.length>0&&!(i??!1)){let R=T[0]?.errors[0];throw new Error(`Import failed on row ${h+(T[0]?.index??0)}: ${R?.message??"Unknown error"}`)}f+=_.length-T.length,g+=T.length,y.push(...T.map(R=>({row_index:h+R.index,first_error:R.errors[0]?.message??"Unknown",reason:R.errors[0]?.reason??null})))}return{success:g===0,rows_attempted:u.length,rows_imported:f,error_count:g,errors:y}}});var zq={project_id:tt,dataset_id:wt,table_id:It,sort_column:oe.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:oe.Number({displayName:"Max Rows per Check",description:"Maximum number of new rows to return per poll (default: 500).",required:!1,defaultValue:500})},um={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 Fe(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:`${$e}/projects/${o}/queries`,headers:{Authorization:`Bearer ${p}`},body:{query:h,useLegacySql:!1,maxResults:d,timeoutMs:3e4}})).body;if(!P.jobComplete)for(let R=0;R<30&&!P.jobComplete;R++)P=(await Ie.sendRequest({method:"GET",url:`${$e}/projects/${o}/queries/${P.jobReference.jobId}`,headers:{Authorization:`Bearer ${p}`},queryParams:{timeoutMs:"10000",maxResults:String(d)}})).body;let S=P.schema?.fields??[];return ir(S,P.rows??[]).map(R=>{let V=R[y],W;if(typeof V=="string"){let H=parseFloat(V);W=!isNaN(H)&&H>1e9?H*1e3:new Date(V).getTime()}else typeof V=="number"?W=V>1e12?V:V*1e3:W=Date.now();return{epochMilliSeconds:W,data:R}})},"items")},k0=lo({auth:je,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:zq,sampleData:{id:"1",created_at:"2024-01-15T10:30:00Z",name:"Example row"},type:"POLLING",async test(e){return await ft.test(um,e)},async onEnable(e){await ft.onEnable(um,e)},async onDisable(e){await ft.onDisable(um,e)},async run(e){return await ft.poll(um,e)}});var Dq={project_id:tt,dataset_id:wt,table_id:It,updated_at_column:oe.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:oe.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:oe.Number({displayName:"Max Rows per Check",description:"Maximum number of updated rows to return per poll (default: 500).",required:!1,defaultValue:500})},lm={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 Fe(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(" "),T=(await Ie.sendRequest({method:"POST",url:`${$e}/projects/${o}/queries`,headers:{Authorization:`Bearer ${f}`},body:{query:P,useLegacySql:!1,maxResults:p,timeoutMs:3e4}})).body;if(!T.jobComplete)for(let W=0;W<30&&!T.jobComplete;W++)T=(await Ie.sendRequest({method:"GET",url:`${$e}/projects/${o}/queries/${T.jobReference.jobId}`,headers:{Authorization:`Bearer ${f}`},queryParams:{timeoutMs:"10000",maxResults:String(p)}})).body;let R=T.schema?.fields??[];return ir(R,T.rows??[]).map(W=>{let H=W[h],G;if(typeof H=="string"){let re=parseFloat(H);G=!isNaN(re)&&re>1e9?re*1e3:new Date(H).getTime()}else typeof H=="number"?G=H>1e12?H:H*1e3:G=Date.now();return{epochMilliSeconds:G,data:W}})},"items")},$0=lo({auth:je,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:Dq,sampleData:{id:"1",updated_at:"2024-01-15T10:30:00Z",status:"active"},type:"POLLING",async test(e){return await ft.test(lm,e)},async onEnable(e){await ft.onEnable(lm,e)},async onDisable(e){await ft.onDisable(lm,e)},async run(e){return await ft.poll(lm,e)}});var Uq={project_id:tt,max_rows_per_job:oe.Number({displayName:"Max Rows per Job",description:"Maximum number of result rows to fetch per completed job (default: 500).",required:!1,defaultValue:500})},dm={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 Fe(e),u=(n??Date.now()-1440*60*1e3)-3600*1e3,p=((await Ie.sendRequest({method:"GET",url:`${$e}/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=[],S=[],T;do{let V=await Ie.sendRequest({method:"GET",url:`${$e}/projects/${o}/queries/${y}`,headers:{Authorization:`Bearer ${s}`},queryParams:{maxResults:String(Math.min(i-P.length,1e3)),timeoutMs:"5000",...T?{pageToken:T}:{},...h?{location:h}:{}}});V.body.schema?.fields&&(S=V.body.schema.fields),P.push(...V.body.rows??[]),T=V.body.pageToken}while(T&&P.length<i);let R=ir(S,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:R.length,rows:R}})}return f},"items")},N0=lo({auth:je,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:Uq,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 ft.test(dm,e)},async onEnable(e){await ft.onEnable(dm,e)},async onDisable(e){await ft.onDisable(dm,e)},async run(e){return await ft.poll(dm,e)}});var jq={project_id:tt,include_failed:oe.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})},pm={strategy:0,items:a(async({auth:e,propsValue:t,lastFetchEpochMS:n})=>{let{project_id:o,include_failed:r}=t,i=await Fe(e),s=(n??Date.now()-1440*60*1e3)-3600*1e3;return((await Ie.sendRequest({method:"GET",url:`${$e}/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")},z0=lo({auth:je,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:jq,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 ft.test(pm,e)},async onEnable(e){await ft.onEnable(pm,e)},async onDisable(e){await ft.onDisable(pm,e)},async run(e){return await ft.poll(pm,e)}});var Mq=XA({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:je,actions:[P0,S0,T0,x0,A0,w0,I0,R0,O0,mR({baseUrl:a(()=>$e,"baseUrl"),auth:je,authMapping:a(async e=>({Authorization:`Bearer ${await Fe(e)}`}),"authMapping")})],triggers:[k0,$0,N0,z0]});0&&(module.exports={bigQueryAuth,googleBigQuery});
67
105
  /*! Bundled license information:
68
106
 
69
107
  mime-types/index.js: