@activepieces/piece-google-drive 0.11.2 → 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/index.js CHANGED
@@ -1,17 +1,17 @@
1
- "use strict";var NL=Object.create;var vs=Object.defineProperty;var kL=Object.getOwnPropertyDescriptor;var zL=Object.getOwnPropertyNames;var UL=Object.getPrototypeOf,ML=Object.prototype.hasOwnProperty;var a=(e,t)=>vs(e,"name",{value:t,configurable:!0});var Ct=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(o){throw n=[o],o}};var j=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(n){throw t=0,n}},nr=(e,t)=>{for(var n in t)vs(e,n,{get:t[n],enumerable:!0})},tS=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of zL(t))!ML.call(e,r)&&r!==n&&vs(e,r,{get:()=>t[r],enumerable:!(o=kL(t,r))||o.enumerable});return e};var he=(e,t,n)=>(n=e!=null?NL(UL(e)):{},tS(t||!e||!e.__esModule?vs(n,"default",{value:e,enumerable:!0}):n,e)),FL=e=>tS(vs({},"__esModule",{value:!0}),e);var QI=j((YI,yf)=>{(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 h(P,S){if(P.indexOf("::")!==P.lastIndexOf("::"))return null;let R=0,I=-1,l=(P.match(u.zoneIndex)||[])[0],m,d;for(l&&(l=l.substring(1),P=P.replace(/%.+$/,""));(I=P.indexOf(":",I+1))>=0;)R++;if(P.substr(0,2)==="::"&&R--,P.substr(-2,2)==="::"&&R--,R>S)return null;for(d=S-R,m=":";d--;)m+="0:";return P=P.replace("::",m),P[0]===":"&&(P=P.slice(1)),P[P.length-1]===":"&&(P=P.slice(0,-1)),S=(function(){let v=P.split(":"),p=[];for(let E=0;E<v.length;E++)p.push(parseInt(v[E],16));return p})(),{parts:S,zoneId:l}}a(h,"expandIPv6");function g(P,S,R,I){if(P.length!==S.length)throw new Error("ipaddr: cannot match CIDR for objects with different lengths");let l=0,m;for(;I>0;){if(m=R-I,m<0&&(m=0),P[l]>>m!==S[l]>>m)return!1;I-=R,l+=1}return!0}a(g,"matchCIDR");function y(P){if(r.test(P))return parseInt(P,16);if(P[0]==="0"&&!isNaN(parseInt(P[1],10))){if(o.test(P))return parseInt(P,8);throw new Error(`ipaddr: cannot parse ${P} as octal`)}return parseInt(P,10)}a(y,"parseIntAuto");function T(P,S){for(;P.length<S;)P=`0${P}`;return P}a(T,"padPart");let b={};b.IPv4=(function(){function P(S){if(S.length!==4)throw new Error("ipaddr: ipv4 octet count should be 4");let R,I;for(R=0;R<S.length;R++)if(I=S[R],!(0<=I&&I<=255))throw new Error("ipaddr: ipv4 octet should fit in 8 bits");this.octets=S}return a(P,"IPv4"),P.prototype.SpecialRanges={unspecified:[[new P([0,0,0,0]),8]],broadcast:[[new P([255,255,255,255]),32]],multicast:[[new P([224,0,0,0]),4]],linkLocal:[[new P([169,254,0,0]),16]],loopback:[[new P([127,0,0,0]),8]],carrierGradeNat:[[new P([100,64,0,0]),10]],private:[[new P([10,0,0,0]),8],[new P([172,16,0,0]),12],[new P([192,168,0,0]),16]],reserved:[[new P([192,0,0,0]),24],[new P([192,0,2,0]),24],[new P([192,88,99,0]),24],[new P([198,18,0,0]),15],[new P([198,51,100,0]),24],[new P([203,0,113,0]),24],[new P([240,0,0,0]),4]],as112:[[new P([192,175,48,0]),24],[new P([192,31,196,0]),24]],amt:[[new P([192,52,193,0]),24]]},P.prototype.kind=function(){return"ipv4"},P.prototype.match=function(S,R){let I;if(R===void 0&&(I=S,S=I[0],R=I[1]),S.kind()!=="ipv4")throw new Error("ipaddr: cannot match ipv4 address with non-ipv4 one");return g(this.octets,S.octets,8,R)},P.prototype.prefixLengthFromSubnetMask=function(){let S=0,R=!1,I={0:8,128:7,192:6,224:5,240:4,248:3,252:2,254:1,255:0},l,m,d;for(l=3;l>=0;l-=1)if(m=this.octets[l],m in I){if(d=I[m],R&&d!==0)return null;d!==8&&(R=!0),S+=d}else return null;return 32-S},P.prototype.range=function(){return b.subnetMatch(this,this.SpecialRanges)},P.prototype.toByteArray=function(){return this.octets.slice(0)},P.prototype.toIPv4MappedAddress=function(){return b.IPv6.parse(`::ffff:${this.toString()}`)},P.prototype.toNormalizedString=function(){return this.toString()},P.prototype.toString=function(){return this.octets.join(".")},P})(),b.IPv4.broadcastAddressFromCIDR=function(P){try{let S=this.parseCIDR(P),R=S[0].toByteArray(),I=this.subnetMaskFromPrefixLength(S[1]).toByteArray(),l=[],m=0;for(;m<4;)l.push(parseInt(R[m],10)|parseInt(I[m],10)^255),m++;return new this(l)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},b.IPv4.isIPv4=function(P){return this.parser(P)!==null},b.IPv4.isValid=function(P){try{return new this(this.parser(P)),!0}catch{return!1}},b.IPv4.isValidCIDR=function(P){try{return this.parseCIDR(P),!0}catch{return!1}},b.IPv4.isValidFourPartDecimal=function(P){return!!(b.IPv4.isValid(P)&&P.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/))},b.IPv4.isValidCIDRFourPartDecimal=function(P){let S=P.match(/^(.+)\/(\d+)$/);return!b.IPv4.isValidCIDR(P)||!S?!1:b.IPv4.isValidFourPartDecimal(S[1])},b.IPv4.networkAddressFromCIDR=function(P){let S,R,I,l,m;try{for(S=this.parseCIDR(P),I=S[0].toByteArray(),m=this.subnetMaskFromPrefixLength(S[1]).toByteArray(),l=[],R=0;R<4;)l.push(parseInt(I[R],10)&parseInt(m[R],10)),R++;return new this(l)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},b.IPv4.parse=function(P){let S=this.parser(P);if(S===null)throw new Error("ipaddr: string is not formatted like an IPv4 Address");return new this(S)},b.IPv4.parseCIDR=function(P){let S;if(S=P.match(/^(.+)\/(\d+)$/)){let R=parseInt(S[2]);if(R>=0&&R<=32){let I=[this.parse(S[1]),R];return Object.defineProperty(I,"toString",{value:a(function(){return this.join("/")},"value")}),I}}throw new Error("ipaddr: string is not formatted like an IPv4 CIDR range")},b.IPv4.parser=function(P){let S,R,I;if(S=P.match(n.fourOctet))return(function(){let l=S.slice(1,6),m=[];for(let d=0;d<l.length;d++)R=l[d],m.push(y(R));return m})();if(S=P.match(n.longValue)){if(I=y(S[1]),I>4294967295||I<0)throw new Error("ipaddr: address outside defined range");return(function(){let l=[],m;for(m=0;m<=24;m+=8)l.push(I>>m&255);return l})().reverse()}else return(S=P.match(n.twoOctet))?(function(){let l=S.slice(1,4),m=[];if(I=y(l[1]),I>16777215||I<0)throw new Error("ipaddr: address outside defined range");return m.push(y(l[0])),m.push(I>>16&255),m.push(I>>8&255),m.push(I&255),m})():(S=P.match(n.threeOctet))?(function(){let l=S.slice(1,5),m=[];if(I=y(l[2]),I>65535||I<0)throw new Error("ipaddr: address outside defined range");return m.push(y(l[0])),m.push(y(l[1])),m.push(I>>8&255),m.push(I&255),m})():null},b.IPv4.subnetMaskFromPrefixLength=function(P){if(P=parseInt(P),P<0||P>32)throw new Error("ipaddr: invalid IPv4 prefix length");let S=[0,0,0,0],R=0,I=Math.floor(P/8);for(;R<I;)S[R]=255,R++;return I<4&&(S[I]=Math.pow(2,P%8)-1<<8-P%8),new this(S)},b.IPv6=(function(){function P(S,R){let I,l;if(S.length===16)for(this.parts=[],I=0;I<=14;I+=2)this.parts.push(S[I]<<8|S[I+1]);else if(S.length===8)this.parts=S;else throw new Error("ipaddr: ipv6 part count should be 8 or 16");for(I=0;I<this.parts.length;I++)if(l=this.parts[I],!(0<=l&&l<=65535))throw new Error("ipaddr: ipv6 part should fit in 16 bits");R&&(this.zoneId=R)}return a(P,"IPv6"),P.prototype.SpecialRanges={unspecified:[new P([0,0,0,0,0,0,0,0]),128],linkLocal:[new P([65152,0,0,0,0,0,0,0]),10],multicast:[new P([65280,0,0,0,0,0,0,0]),8],loopback:[new P([0,0,0,0,0,0,0,1]),128],uniqueLocal:[new P([64512,0,0,0,0,0,0,0]),7],ipv4Mapped:[new P([0,0,0,0,0,65535,0,0]),96],discard:[new P([256,0,0,0,0,0,0,0]),64],rfc6145:[new P([0,0,0,0,65535,0,0,0]),96],rfc6052:[new P([100,65435,0,0,0,0,0,0]),96],"6to4":[new P([8194,0,0,0,0,0,0,0]),16],teredo:[new P([8193,0,0,0,0,0,0,0]),32],benchmarking:[new P([8193,2,0,0,0,0,0,0]),48],amt:[new P([8193,3,0,0,0,0,0,0]),32],as112v6:[[new P([8193,4,274,0,0,0,0,0]),48],[new P([9760,79,32768,0,0,0,0,0]),48]],deprecated:[new P([8193,16,0,0,0,0,0,0]),28],orchid2:[new P([8193,32,0,0,0,0,0,0]),28],droneRemoteIdProtocolEntityTags:[new P([8193,48,0,0,0,0,0,0]),28],reserved:[[new P([8193,0,0,0,0,0,0,0]),23],[new P([8193,3512,0,0,0,0,0,0]),32]]},P.prototype.isIPv4MappedAddress=function(){return this.range()==="ipv4Mapped"},P.prototype.kind=function(){return"ipv6"},P.prototype.match=function(S,R){let I;if(R===void 0&&(I=S,S=I[0],R=I[1]),S.kind()!=="ipv6")throw new Error("ipaddr: cannot match ipv6 address with non-ipv6 one");return g(this.parts,S.parts,16,R)},P.prototype.prefixLengthFromSubnetMask=function(){let S=0,R=!1,I={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},l,m;for(let d=7;d>=0;d-=1)if(l=this.parts[d],l in I){if(m=I[l],R&&m!==0)return null;m!==16&&(R=!0),S+=m}else return null;return 128-S},P.prototype.range=function(){return b.subnetMatch(this,this.SpecialRanges)},P.prototype.toByteArray=function(){let S,R=[],I=this.parts;for(let l=0;l<I.length;l++)S=I[l],R.push(S>>8),R.push(S&255);return R},P.prototype.toFixedLengthString=function(){let S=(function(){let I=[];for(let l=0;l<this.parts.length;l++)I.push(T(this.parts[l].toString(16),4));return I}).call(this).join(":"),R="";return this.zoneId&&(R=`%${this.zoneId}`),S+R},P.prototype.toIPv4Address=function(){if(!this.isIPv4MappedAddress())throw new Error("ipaddr: trying to convert a generic ipv6 address to ipv4");let S=this.parts.slice(-2),R=S[0],I=S[1];return new b.IPv4([R>>8,R&255,I>>8,I&255])},P.prototype.toNormalizedString=function(){let S=(function(){let I=[];for(let l=0;l<this.parts.length;l++)I.push(this.parts[l].toString(16));return I}).call(this).join(":"),R="";return this.zoneId&&(R=`%${this.zoneId}`),S+R},P.prototype.toRFC5952String=function(){let S=/((^|:)(0(:|$)){2,})/g,R=this.toNormalizedString(),I=0,l=-1,m;for(;m=S.exec(R);)m[0].length>l&&(I=m.index,l=m[0].length);return l<0?R:`${R.substring(0,I)}::${R.substring(I+l)}`},P.prototype.toString=function(){return this.toRFC5952String()},P})(),b.IPv6.broadcastAddressFromCIDR=function(P){try{let S=this.parseCIDR(P),R=S[0].toByteArray(),I=this.subnetMaskFromPrefixLength(S[1]).toByteArray(),l=[],m=0;for(;m<16;)l.push(parseInt(R[m],10)|parseInt(I[m],10)^255),m++;return new this(l)}catch(S){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${S})`)}},b.IPv6.isIPv6=function(P){return this.parser(P)!==null},b.IPv6.isValid=function(P){if(typeof P=="string"&&P.indexOf(":")===-1)return!1;try{let S=this.parser(P);return new this(S.parts,S.zoneId),!0}catch{return!1}},b.IPv6.isValidCIDR=function(P){if(typeof P=="string"&&P.indexOf(":")===-1)return!1;try{return this.parseCIDR(P),!0}catch{return!1}},b.IPv6.networkAddressFromCIDR=function(P){let S,R,I,l,m;try{for(S=this.parseCIDR(P),I=S[0].toByteArray(),m=this.subnetMaskFromPrefixLength(S[1]).toByteArray(),l=[],R=0;R<16;)l.push(parseInt(I[R],10)&parseInt(m[R],10)),R++;return new this(l)}catch(d){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${d})`)}},b.IPv6.parse=function(P){let S=this.parser(P);if(S.parts===null)throw new Error("ipaddr: string is not formatted like an IPv6 Address");return new this(S.parts,S.zoneId)},b.IPv6.parseCIDR=function(P){let S,R,I;if((R=P.match(/^(.+)\/(\d+)$/))&&(S=parseInt(R[2]),S>=0&&S<=128))return I=[this.parse(R[1]),S],Object.defineProperty(I,"toString",{value:a(function(){return this.join("/")},"value")}),I;throw new Error("ipaddr: string is not formatted like an IPv6 CIDR range")},b.IPv6.parser=function(P){let S,R,I,l,m,d;if(I=P.match(u.deprecatedTransitional))return this.parser(`::ffff:${I[1]}`);if(u.native.test(P))return h(P,8);if((I=P.match(u.transitional))&&(d=I[6]||"",S=I[1],I[1].endsWith("::")||(S=S.slice(0,-1)),S=h(S+d,6),S.parts)){for(m=[parseInt(I[2]),parseInt(I[3]),parseInt(I[4]),parseInt(I[5])],R=0;R<m.length;R++)if(l=m[R],!(0<=l&&l<=255))return null;return S.parts.push(m[0]<<8|m[1]),S.parts.push(m[2]<<8|m[3]),{parts:S.parts,zoneId:S.zoneId}}return null},b.IPv6.subnetMaskFromPrefixLength=function(P){if(P=parseInt(P),P<0||P>128)throw new Error("ipaddr: invalid IPv6 prefix length");let S=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],R=0,I=Math.floor(P/8);for(;R<I;)S[R]=255,R++;return I<16&&(S[I]=Math.pow(2,P%8)-1<<8-P%8),new this(S)},b.fromByteArray=function(P){let S=P.length;if(S===4)return new b.IPv4(P);if(S===16)return new b.IPv6(P);throw new Error("ipaddr: the binary input is neither an IPv6 nor IPv4 address")},b.isValid=function(P){return b.IPv6.isValid(P)||b.IPv4.isValid(P)},b.isValidCIDR=function(P){return b.IPv6.isValidCIDR(P)||b.IPv4.isValidCIDR(P)},b.parse=function(P){if(b.IPv6.isValid(P))return b.IPv6.parse(P);if(b.IPv4.isValid(P))return b.IPv4.parse(P);throw new Error("ipaddr: the address has neither IPv6 nor IPv4 format")},b.parseCIDR=function(P){try{return b.IPv6.parseCIDR(P)}catch{try{return b.IPv4.parseCIDR(P)}catch{throw new Error("ipaddr: the address has neither IPv6 nor IPv4 CIDR format")}}},b.process=function(P){let S=this.parse(P);return S.kind()==="ipv6"&&S.isIPv4MappedAddress()?S.toIPv4Address():S},b.subnetMatch=function(P,S,R){let I,l,m,d;R==null&&(R="unicast");for(l in S)if(Object.prototype.hasOwnProperty.call(S,l)){for(m=S[l],m[0]&&!(m[0]instanceof Array)&&(m=[m]),I=0;I<m.length;I++)if(d=m[I],P.kind()===d[0].kind()&&P.match.apply(P,d))return l}return R},typeof yf<"u"&&yf.exports?yf.exports=b:e.ipaddr=b})(YI)});var oR=j((Iie,nR)=>{var rR=require("stream").Stream,CV=require("util");nR.exports=Qr;function Qr(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}a(Qr,"DelayedStream");CV.inherits(Qr,rR);Qr.create=function(e,t){var n=new this;t=t||{};for(var o in t)n[o]=t[o];n.source=e;var r=e.emit;return e.emit=function(){return n._handleEmit(arguments),r.apply(e,arguments)},e.on("error",function(){}),n.pauseStream&&e.pause(),n};Object.defineProperty(Qr.prototype,"readable",{configurable:!0,enumerable:!0,get:a(function(){return this.source.readable},"get")});Qr.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};Qr.prototype.resume=function(){this._released||this.release(),this.source.resume()};Qr.prototype.pause=function(){this.source.pause()};Qr.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(e){this.emit.apply(this,e)}.bind(this)),this._bufferedEvents=[]};Qr.prototype.pipe=function(){var e=rR.prototype.pipe.apply(this,arguments);return this.resume(),e};Qr.prototype._handleEmit=function(e){if(this._released){this.emit.apply(this,e);return}e[0]==="data"&&(this.dataSize+=e[1].length,this._checkIfMaxDataSizeExceeded()),this._bufferedEvents.push(e)};Qr.prototype._checkIfMaxDataSizeExceeded=function(){if(!this._maxDataSizeExceeded&&!(this.dataSize<=this.maxDataSize)){this._maxDataSizeExceeded=!0;var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(e))}}});var cR=j((Rie,sR)=>{var NV=require("util"),aR=require("stream").Stream,iR=oR();sR.exports=wt;function wt(){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(wt,"CombinedStream");NV.inherits(wt,aR);wt.create=function(e){var t=new this;e=e||{};for(var n in e)t[n]=e[n];return t};wt.isStreamLike=function(e){return typeof e!="function"&&typeof e!="string"&&typeof e!="boolean"&&typeof e!="number"&&!Buffer.isBuffer(e)};wt.prototype.append=function(e){var t=wt.isStreamLike(e);if(t){if(!(e instanceof iR)){var n=iR.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};wt.prototype.pipe=function(e,t){return aR.prototype.pipe.call(this,e,t),this.resume(),e};wt.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}};wt.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=wt.isStreamLike(n);o&&(n.on("data",this._checkDataSize.bind(this)),this._handleErrors(n)),this._pipeNext(n)}.bind(this))};wt.prototype._pipeNext=function(e){this._currentStream=e;var t=wt.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()};wt.prototype._handleErrors=function(e){var t=this;e.on("error",function(n){t._emitError(n)})};wt.prototype.write=function(e){this.emit("data",e)};wt.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"))};wt.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")};wt.prototype.end=function(){this._reset(),this.emit("end")};wt.prototype.destroy=function(){this._reset(),this.emit("close")};wt.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};wt.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(e))}};wt.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)};wt.prototype._emitError=function(e){this._reset(),this.emit("error",e)}});var lR=j((Oie,uR)=>{"use strict";uR.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 en=j(cr=>{"use strict";var Ef=lR(),kV=require("path").extname,dR=/^\s*([^;\s]*)(?:;|\s|$)/,zV=/^text\//i;cr.charset=pR;cr.charsets={lookup:pR};cr.contentType=UV;cr.extension=MV;cr.extensions=Object.create(null);cr.lookup=FV;cr.types=Object.create(null);LV(cr.extensions,cr.types);function pR(e){if(!e||typeof e!="string")return!1;var t=dR.exec(e),n=t&&Ef[t[1].toLowerCase()];return n&&n.charset?n.charset:t&&zV.test(t[1])?"UTF-8":!1}a(pR,"charset");function UV(e){if(!e||typeof e!="string")return!1;var t=e.indexOf("/")===-1?cr.lookup(e):e;if(!t)return!1;if(t.indexOf("charset")===-1){var n=cr.charset(t);n&&(t+="; charset="+n.toLowerCase())}return t}a(UV,"contentType");function MV(e){if(!e||typeof e!="string")return!1;var t=dR.exec(e),n=t&&cr.extensions[t[1].toLowerCase()];return!n||!n.length?!1:n[0]}a(MV,"extension");function FV(e){if(!e||typeof e!="string")return!1;var t=kV("x."+e).toLowerCase().substr(1);return t&&cr.types[t]||!1}a(FV,"lookup");function LV(e,t){var n=["nginx","apache",void 0,"iana"];Object.keys(Ef).forEach(a(function(r){var i=Ef[r],s=i.extensions;if(!(!s||!s.length)){e[r]=s;for(var u=0;u<s.length;u++){var h=s[u];if(t[h]){var g=n.indexOf(Ef[t[h]].source),y=n.indexOf(i.source);if(t[h]!=="application/octet-stream"&&(g>y||g===y&&t[h].substr(0,12)==="application/"))continue}t[h]=r}}},"forEachMimeType"))}a(LV,"populateMaps")});var mR=j((Nie,fR)=>{fR.exports=jV;function jV(e){var t=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;t?t(e):setTimeout(e,0)}a(jV,"defer")});var IP=j((zie,gR)=>{var hR=mR();gR.exports=qV;function qV(e){var t=!1;return hR(function(){t=!0}),a(function(o,r){t?e(o,r):hR(a(function(){e(o,r)},"nextTick_callback"))},"async_callback")}a(qV,"async")});var AP=j((Mie,yR)=>{yR.exports=BV;function BV(e){Object.keys(e.jobs).forEach(VV.bind(e)),e.jobs={}}a(BV,"abort");function VV(e){typeof this.jobs[e]=="function"&&this.jobs[e]()}a(VV,"clean")});var RP=j((Lie,_R)=>{var vR=IP(),GV=AP();_R.exports=HV;function HV(e,t,n,o){var r=n.keyedList?n.keyedList[n.index]:n.index;n.jobs[r]=ZV(t,r,e[r],function(i,s){r in n.jobs&&(delete n.jobs[r],i?GV(n):n.results[r]=s,o(i,n.results))})}a(HV,"iterate");function ZV(e,t,n,o){var r;return e.length==2?r=e(n,vR(o)):r=e(n,t,vR(o)),r}a(ZV,"runJob")});var DP=j((qie,PR)=>{PR.exports=WV;function WV(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(WV,"state")});var OP=j((Vie,wR)=>{var KV=AP(),JV=IP();wR.exports=XV;function XV(e){Object.keys(this.jobs).length&&(this.index=this.size,KV(this),JV(e)(null,this.results))}a(XV,"terminator")});var TR=j((Hie,bR)=>{var YV=RP(),QV=DP(),e4=OP();bR.exports=t4;function t4(e,t,n){for(var o=QV(e);o.index<(o.keyedList||e).length;)YV(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 e4.bind(o,n)}a(t4,"parallel")});var $P=j((Wie,Sf)=>{var ER=RP(),r4=DP(),n4=OP();Sf.exports=o4;Sf.exports.ascending=SR;Sf.exports.descending=i4;function o4(e,t,n,o){var r=r4(e,n);return ER(e,t,r,a(function i(s,u){if(s){o(s,u);return}if(r.index++,r.index<(r.keyedList||e).length){ER(e,t,r,i);return}o(null,r.results)},"iteratorHandler")),n4.bind(r,o)}a(o4,"serialOrdered");function SR(e,t){return e<t?-1:e>t?1:0}a(SR,"ascending");function i4(e,t){return-1*SR(e,t)}a(i4,"descending")});var IR=j((Jie,xR)=>{var a4=$P();xR.exports=s4;function s4(e,t,n){return a4(e,t,null,n)}a(s4,"serial")});var RR=j((Yie,AR)=>{AR.exports={parallel:TR(),serial:IR(),serialOrdered:$P()}});var CP=j((Qie,DR)=>{"use strict";DR.exports=Object});var $R=j((eae,OR)=>{"use strict";OR.exports=Error});var NR=j((tae,CR)=>{"use strict";CR.exports=EvalError});var zR=j((rae,kR)=>{"use strict";kR.exports=RangeError});var MR=j((nae,UR)=>{"use strict";UR.exports=ReferenceError});var LR=j((oae,FR)=>{"use strict";FR.exports=SyntaxError});var Ao=j((iae,jR)=>{"use strict";jR.exports=TypeError});var BR=j((aae,qR)=>{"use strict";qR.exports=URIError});var GR=j((sae,VR)=>{"use strict";VR.exports=Math.abs});var ZR=j((cae,HR)=>{"use strict";HR.exports=Math.floor});var KR=j((uae,WR)=>{"use strict";WR.exports=Math.max});var XR=j((lae,JR)=>{"use strict";JR.exports=Math.min});var QR=j((dae,YR)=>{"use strict";YR.exports=Math.pow});var tD=j((pae,eD)=>{"use strict";eD.exports=Math.round});var nD=j((fae,rD)=>{"use strict";rD.exports=Number.isNaN||a(function(t){return t!==t},"isNaN")});var iD=j((hae,oD)=>{"use strict";var c4=nD();oD.exports=a(function(t){return c4(t)||t===0?t:t<0?-1:1},"sign")});var sD=j((yae,aD)=>{"use strict";aD.exports=Object.getOwnPropertyDescriptor});var NP=j((vae,cD)=>{"use strict";var xf=sD();if(xf)try{xf([],"length")}catch{xf=null}cD.exports=xf});var lD=j((_ae,uD)=>{"use strict";var If=Object.defineProperty||!1;if(If)try{If({},"a",{value:1})}catch{If=!1}uD.exports=If});var kP=j((Pae,dD)=>{"use strict";dD.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 mD=j((bae,fD)=>{"use strict";var pD=typeof Symbol<"u"&&Symbol,u4=kP();fD.exports=a(function(){return typeof pD!="function"||typeof Symbol!="function"||typeof pD("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:u4()},"hasNativeSymbols")});var zP=j((Eae,hD)=>{"use strict";hD.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var UP=j((Sae,gD)=>{"use strict";var l4=CP();gD.exports=l4.getPrototypeOf||null});var _D=j((xae,vD)=>{"use strict";var d4="Function.prototype.bind called on incompatible ",p4=Object.prototype.toString,f4=Math.max,m4="[object Function]",yD=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"),h4=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"),g4=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");vD.exports=a(function(t){var n=this;if(typeof n!="function"||p4.apply(n)!==m4)throw new TypeError(d4+n);for(var o=h4(arguments,1),r,i=a(function(){if(this instanceof r){var y=n.apply(this,yD(o,arguments));return Object(y)===y?y:this}return n.apply(t,yD(o,arguments))},"binder"),s=f4(0,n.length-o.length),u=[],h=0;h<s;h++)u[h]="$"+h;if(r=Function("binder","return function ("+g4(u,",")+"){ return binder.apply(this,arguments); }")(i),n.prototype){var g=a(function(){},"Empty");g.prototype=n.prototype,r.prototype=new g,g.prototype=null}return r},"bind")});var Da=j((Aae,PD)=>{"use strict";var y4=_D();PD.exports=Function.prototype.bind||y4});var Af=j((Rae,wD)=>{"use strict";wD.exports=Function.prototype.call});var MP=j((Dae,bD)=>{"use strict";bD.exports=Function.prototype.apply});var ED=j((Oae,TD)=>{"use strict";TD.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var xD=j(($ae,SD)=>{"use strict";var v4=Da(),_4=MP(),P4=Af(),w4=ED();SD.exports=w4||v4.call(P4,_4)});var FP=j((Cae,ID)=>{"use strict";var b4=Da(),T4=Ao(),E4=Af(),S4=xD();ID.exports=a(function(t){if(t.length<1||typeof t[0]!="function")throw new T4("a function is required");return S4(b4,E4,t)},"callBindBasic")});var CD=j((kae,$D)=>{"use strict";var x4=FP(),AD=NP(),DD;try{DD=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!="object"||!("code"in e)||e.code!=="ERR_PROTO_ACCESS")throw e}var LP=!!DD&&AD&&AD(Object.prototype,"__proto__"),OD=Object,RD=OD.getPrototypeOf;$D.exports=LP&&typeof LP.get=="function"?x4([LP.get]):typeof RD=="function"?a(function(t){return RD(t==null?t:OD(t))},"getDunder"):!1});var MD=j((Uae,UD)=>{"use strict";var ND=zP(),kD=UP(),zD=CD();UD.exports=ND?a(function(t){return ND(t)},"getProto"):kD?a(function(t){if(!t||typeof t!="object"&&typeof t!="function")throw new TypeError("getProto: not an object");return kD(t)},"getProto"):zD?a(function(t){return zD(t)},"getProto"):null});var jP=j((Fae,FD)=>{"use strict";var I4=Function.prototype.call,A4=Object.prototype.hasOwnProperty,R4=Da();FD.exports=R4.call(I4,A4)});var bu=j((Lae,GD)=>{"use strict";var He,D4=CP(),O4=$R(),$4=NR(),C4=zR(),N4=MR(),Na=LR(),Ca=Ao(),k4=BR(),z4=GR(),U4=ZR(),M4=KR(),F4=XR(),L4=QR(),j4=tD(),q4=iD(),BD=Function,qP=a(function(e){try{return BD('"use strict"; return ('+e+").constructor;")()}catch{}},"getEvalledConstructor"),_u=NP(),B4=lD(),BP=a(function(){throw new Ca},"throwTypeError"),V4=_u?(function(){try{return arguments.callee,BP}catch{try{return _u(arguments,"callee").get}catch{return BP}}})():BP,Oa=mD()(),Ut=MD(),G4=UP(),H4=zP(),VD=MP(),Pu=Af(),$a={},Z4=typeof Uint8Array>"u"||!Ut?He:Ut(Uint8Array),yi={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?He:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?He:ArrayBuffer,"%ArrayIteratorPrototype%":Oa&&Ut?Ut([][Symbol.iterator]()):He,"%AsyncFromSyncIteratorPrototype%":He,"%AsyncFunction%":$a,"%AsyncGenerator%":$a,"%AsyncGeneratorFunction%":$a,"%AsyncIteratorPrototype%":$a,"%Atomics%":typeof Atomics>"u"?He:Atomics,"%BigInt%":typeof BigInt>"u"?He:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?He:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?He:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?He:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":O4,"%eval%":eval,"%EvalError%":$4,"%Float16Array%":typeof Float16Array>"u"?He:Float16Array,"%Float32Array%":typeof Float32Array>"u"?He:Float32Array,"%Float64Array%":typeof Float64Array>"u"?He:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?He:FinalizationRegistry,"%Function%":BD,"%GeneratorFunction%":$a,"%Int8Array%":typeof Int8Array>"u"?He:Int8Array,"%Int16Array%":typeof Int16Array>"u"?He:Int16Array,"%Int32Array%":typeof Int32Array>"u"?He:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Oa&&Ut?Ut(Ut([][Symbol.iterator]())):He,"%JSON%":typeof JSON=="object"?JSON:He,"%Map%":typeof Map>"u"?He:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Oa||!Ut?He:Ut(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":D4,"%Object.getOwnPropertyDescriptor%":_u,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?He:Promise,"%Proxy%":typeof Proxy>"u"?He:Proxy,"%RangeError%":C4,"%ReferenceError%":N4,"%Reflect%":typeof Reflect>"u"?He:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?He:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Oa||!Ut?He:Ut(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?He:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Oa&&Ut?Ut(""[Symbol.iterator]()):He,"%Symbol%":Oa?Symbol:He,"%SyntaxError%":Na,"%ThrowTypeError%":V4,"%TypedArray%":Z4,"%TypeError%":Ca,"%Uint8Array%":typeof Uint8Array>"u"?He:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?He:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?He:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?He:Uint32Array,"%URIError%":k4,"%WeakMap%":typeof WeakMap>"u"?He:WeakMap,"%WeakRef%":typeof WeakRef>"u"?He:WeakRef,"%WeakSet%":typeof WeakSet>"u"?He:WeakSet,"%Function.prototype.call%":Pu,"%Function.prototype.apply%":VD,"%Object.defineProperty%":B4,"%Object.getPrototypeOf%":G4,"%Math.abs%":z4,"%Math.floor%":U4,"%Math.max%":M4,"%Math.min%":F4,"%Math.pow%":L4,"%Math.round%":j4,"%Math.sign%":q4,"%Reflect.getPrototypeOf%":H4};if(Ut)try{null.error}catch(e){LD=Ut(Ut(e)),yi["%Error.prototype%"]=LD}var LD,W4=a(function e(t){var n;if(t==="%AsyncFunction%")n=qP("async function () {}");else if(t==="%GeneratorFunction%")n=qP("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=qP("async function* () {}");else if(t==="%AsyncGenerator%"){var o=e("%AsyncGeneratorFunction%");o&&(n=o.prototype)}else if(t==="%AsyncIteratorPrototype%"){var r=e("%AsyncGenerator%");r&&Ut&&(n=Ut(r.prototype))}return yi[t]=n,n},"doEval"),jD={__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"]},wu=Da(),Rf=jP(),K4=wu.call(Pu,Array.prototype.concat),J4=wu.call(VD,Array.prototype.splice),qD=wu.call(Pu,String.prototype.replace),Df=wu.call(Pu,String.prototype.slice),X4=wu.call(Pu,RegExp.prototype.exec),Y4=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Q4=/\\(\\)?/g,e6=a(function(t){var n=Df(t,0,1),o=Df(t,-1);if(n==="%"&&o!=="%")throw new Na("invalid intrinsic syntax, expected closing `%`");if(o==="%"&&n!=="%")throw new Na("invalid intrinsic syntax, expected opening `%`");var r=[];return qD(t,Y4,function(i,s,u,h){r[r.length]=u?qD(h,Q4,"$1"):s||i}),r},"stringToPath"),t6=a(function(t,n){var o=t,r;if(Rf(jD,o)&&(r=jD[o],o="%"+r[0]+"%"),Rf(yi,o)){var i=yi[o];if(i===$a&&(i=W4(o)),typeof i>"u"&&!n)throw new Ca("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:r,name:o,value:i}}throw new Na("intrinsic "+t+" does not exist!")},"getBaseIntrinsic");GD.exports=a(function(t,n){if(typeof t!="string"||t.length===0)throw new Ca("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new Ca('"allowMissing" argument must be a boolean');if(X4(/^%?[^%]*%?$/,t)===null)throw new Na("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var o=e6(t),r=o.length>0?o[0]:"",i=t6("%"+r+"%",n),s=i.name,u=i.value,h=!1,g=i.alias;g&&(r=g[0],J4(o,K4([0,1],g)));for(var y=1,T=!0;y<o.length;y+=1){var b=o[y],P=Df(b,0,1),S=Df(b,-1);if((P==='"'||P==="'"||P==="`"||S==='"'||S==="'"||S==="`")&&P!==S)throw new Na("property names with quotes must have matching quotes");if((b==="constructor"||!T)&&(h=!0),r+="."+b,s="%"+r+"%",Rf(yi,s))u=yi[s];else if(u!=null){if(!(b in u)){if(!n)throw new Ca("base intrinsic for "+t+" exists, but the property is not available.");return}if(_u&&y+1>=o.length){var R=_u(u,b);T=!!R,T&&"get"in R&&!("originalValue"in R.get)?u=R.get:u=u[b]}else T=Rf(u,b),u=u[b];T&&!h&&(yi[s]=u)}}return u},"GetIntrinsic")});var ZD=j((qae,HD)=>{"use strict";var r6=kP();HD.exports=a(function(){return r6()&&!!Symbol.toStringTag},"hasToStringTagShams")});var JD=j((Vae,KD)=>{"use strict";var n6=bu(),WD=n6("%Object.defineProperty%",!0),o6=ZD()(),i6=jP(),a6=Ao(),Of=o6?Symbol.toStringTag:null;KD.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 a6("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");Of&&(o||!i6(t,Of))&&(WD?WD(t,Of,{configurable:!r,enumerable:!1,value:n,writable:!1}):t[Of]=n)},"setToStringTag")});var YD=j((Hae,XD)=>{"use strict";var s6=Function.prototype.call,c6=Object.prototype.hasOwnProperty,u6=Da();XD.exports=u6.call(s6,c6)});var e0=j((Zae,QD)=>{"use strict";QD.exports=function(e,t){return Object.keys(t).forEach(function(n){e[n]=e[n]||t[n]}),e}});var Tu=j((Wae,r0)=>{"use strict";var ZP=cR(),l6=require("util"),VP=require("path"),d6=require("http"),p6=require("https"),f6=require("url").parse,m6=require("fs"),h6=require("stream").Stream,g6=require("crypto"),GP=en(),y6=RR(),v6=JD(),Ro=YD(),HP=e0();function t0(e){return String(e).replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/"/g,"%22")}a(t0,"escapeHeaderParam");function Ye(e){if(!(this instanceof Ye))return new Ye(e);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],ZP.call(this),e=e||{};for(var t in e)this[t]=e[t]}a(Ye,"FormData");l6.inherits(Ye,ZP);Ye.LINE_BREAK=`\r
2
- `;Ye.DEFAULT_CONTENT_TYPE="application/octet-stream";Ye.prototype.append=function(e,t,n){n=n||{},typeof n=="string"&&(n={filename:n});var o=ZP.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)};Ye.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)+Ye.LINE_BREAK.length,!(!t||!t.path&&!(t.readable&&Ro(t,"httpVersion"))&&!(t instanceof h6))&&(n.knownLength||this._valuesToMeasure.push(t))};Ye.prototype._lengthRetriever=function(e,t){Ro(e,"fd")?e.end!=null&&e.end!=1/0&&e.start!=null?t(null,e.end+1-(e.start?e.start:0)):m6.stat(e.path,function(n,o){if(n){t(n);return}var r=o.size-(e.start?e.start:0);t(null,r)}):Ro(e,"httpVersion")?t(null,Number(e.headers["content-length"])):Ro(e,"httpModule")?(e.on("response",function(n){e.pause(),t(null,Number(n.headers["content-length"]))}),e.resume()):t("Unknown stream")};Ye.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="'+t0(e)+'"'].concat(o||[]),"Content-Type":[].concat(r||[])};typeof n.header=="object"&&HP(s,n.header);var u;for(var h in s)if(Ro(s,h)){if(u=s[h],u==null)continue;Array.isArray(u)||(u=[u]),u.length&&(i+=h+": "+u.join("; ")+Ye.LINE_BREAK)}return"--"+this.getBoundary()+Ye.LINE_BREAK+i+Ye.LINE_BREAK};Ye.prototype._getContentDisposition=function(e,t){var n;if(typeof t.filepath=="string"?n=VP.normalize(t.filepath).replace(/\\/g,"/"):t.filename||e&&(e.name||e.path)?n=VP.basename(t.filename||e&&(e.name||e.path)):e&&e.readable&&Ro(e,"httpVersion")&&(n=VP.basename(e.client._httpMessage.path||"")),n)return'filename="'+t0(n)+'"'};Ye.prototype._getContentType=function(e,t){var n=t.contentType;return!n&&e&&e.name&&(n=GP.lookup(e.name)),!n&&e&&e.path&&(n=GP.lookup(e.path)),!n&&e&&e.readable&&Ro(e,"httpVersion")&&(n=e.headers["content-type"]),!n&&(t.filepath||t.filename)&&(n=GP.lookup(t.filepath||t.filename)),!n&&e&&typeof e=="object"&&(n=Ye.DEFAULT_CONTENT_TYPE),n};Ye.prototype._multiPartFooter=function(){return function(e){var t=Ye.LINE_BREAK,n=this._streams.length===0;n&&(t+=this._lastBoundary()),e(t)}.bind(this)};Ye.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+Ye.LINE_BREAK};Ye.prototype.getHeaders=function(e){var t,n={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in e)Ro(e,t)&&(n[t.toLowerCase()]=e[t]);return n};Ye.prototype.setBoundary=function(e){if(typeof e!="string")throw new TypeError("FormData boundary must be a string");this._boundary=e};Ye.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};Ye.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(Ye.LINE_BREAK)])));return Buffer.concat([e,Buffer.from(this._lastBoundary())])};Ye.prototype._generateBoundary=function(){this._boundary="--------------------------"+g6.randomBytes(12).toString("hex")};Ye.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};Ye.prototype.hasKnownLength=function(){var e=!0;return this._valuesToMeasure.length&&(e=!1),e};Ye.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}y6.parallel(this._valuesToMeasure,this._lengthRetriever,function(n,o){if(n){e(n);return}o.forEach(function(r){t+=r}),e(null,t)})};Ye.prototype.submit=function(e,t){var n,o,r={method:"post"};return typeof e=="string"?(e=f6(e),o=HP({port:e.port,path:e.pathname,host:e.hostname,protocol:e.protocol},r)):(o=HP(e,r),o.port||(o.port=o.protocol==="https:"?443:80)),o.headers=this.getHeaders(e.headers),o.protocol==="https:"?n=p6.request(o):n=d6.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,h=a(function(g,y){return n.removeListener("error",h),n.removeListener("response",u),t.call(this,g,y)},"callback");u=h.bind(this,null),n.on("error",h),n.on("response",u)}}.bind(this)),n};Ye.prototype._error=function(e){this.error||(this.error=e,this.pause(),this.emit("error",e))};Ye.prototype.toString=function(){return"[object FormData]"};v6(Ye.prototype,"FormData");r0.exports=Ye});var Eu=j((_se,f0)=>{"use strict";var $f=Object.prototype.hasOwnProperty,p0=Object.prototype.toString,a0=Object.defineProperty,s0=Object.getOwnPropertyDescriptor,c0=a(function(t){return typeof Array.isArray=="function"?Array.isArray(t):p0.call(t)==="[object Array]"},"isArray"),u0=a(function(t){if(!t||p0.call(t)!=="[object Object]")return!1;var n=$f.call(t,"constructor"),o=t.constructor&&t.constructor.prototype&&$f.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!o)return!1;var r;for(r in t);return typeof r>"u"||$f.call(t,r)},"isPlainObject"),l0=a(function(t,n){a0&&n.name==="__proto__"?a0(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},"setProperty"),d0=a(function(t,n){if(n==="__proto__")if($f.call(t,n)){if(s0)return s0(t,n).value}else return;return t[n]},"getProperty");f0.exports=a(function e(){var t,n,o,r,i,s,u=arguments[0],h=1,g=arguments.length,y=!1;for(typeof u=="boolean"&&(y=u,u=arguments[1]||{},h=2),(u==null||typeof u!="object"&&typeof u!="function")&&(u={});h<g;++h)if(t=arguments[h],t!=null)for(n in t)o=d0(u,n),r=d0(t,n),u!==r&&(y&&r&&(u0(r)||(i=c0(r)))?(i?(i=!1,s=o&&c0(o)?o:[]):s=o&&u0(o)?o:{},l0(u,{name:n,newValue:e(y,s,r)})):typeof r<"u"&&l0(u,{name:n,newValue:r}));return u},"extend")});var m0=j((wse,R6)=>{R6.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 g0=j((bse,h0)=>{"use strict";var D6=m0();h0.exports={pkg:D6}});var JP=j(Mr=>{"use strict";var v0=Mr&&Mr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Mr,"__esModule",{value:!0});Mr.GaxiosError=Mr.GAXIOS_ERROR_SYMBOL=void 0;Mr.defaultErrorRedactor=_0;var y0=v0(Eu()),O6=v0(g0()),WP=O6.default.pkg;Mr.GAXIOS_ERROR_SYMBOL=Symbol.for(`${WP.name}-gaxios-error`);var KP=class e extends Error{static{a(this,"GaxiosError")}config;response;code;status;error;[Mr.GAXIOS_ERROR_SYMBOL]=WP.version;static[Symbol.hasInstance](t){return t&&typeof t=="object"&&Mr.GAXIOS_ERROR_SYMBOL in t&&t[Mr.GAXIOS_ERROR_SYMBOL]===WP.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,y0.default)(!0,{},n),this.response&&(this.response.config=(0,y0.default)(!0,{},this.response.config)),this.response){try{this.response.data=$6(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}}};Mr.GaxiosError=KP;function $6(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($6,"translateData");function _0(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&&(_0({config:e.response.config}),n(e.response.headers),e.response.bodyUsed&&(o(e.response,"data"),r(e.response.data))),e}a(_0,"defaultErrorRedactor")});var w0=j(XP=>{"use strict";Object.defineProperty(XP,"__esModule",{value:!0});XP.getRetryConfig=C6;async function C6(e){let t=P0(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||N6)(e))return{shouldRetry:!1,config:e.config};let r=k6(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(C6,"getRetryConfig");function N6(e){let t=P0(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(N6,"shouldRetryRequest");function P0(e){if(e&&e.config&&e.config.retryConfig)return e.config.retryConfig}a(P0,"getConfig");function k6(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(k6,"getNextRetryDelay")});var QP=j(Cf=>{"use strict";Object.defineProperty(Cf,"__esModule",{value:!0});Cf.GaxiosInterceptorManager=void 0;var YP=class extends Set{static{a(this,"GaxiosInterceptorManager")}};Cf.GaxiosInterceptorManager=YP});var T0=j((Rse,b0)=>{var ka=1e3,za=ka*60,Ua=za*60,vi=Ua*24,z6=vi*7,U6=vi*365.25;b0.exports=function(e,t){t=t||{};var n=typeof e;if(n==="string"&&e.length>0)return M6(e);if(n==="number"&&isFinite(e))return t.long?L6(e):F6(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function M6(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*U6;case"weeks":case"week":case"w":return n*z6;case"days":case"day":case"d":return n*vi;case"hours":case"hour":case"hrs":case"hr":case"h":return n*Ua;case"minutes":case"minute":case"mins":case"min":case"m":return n*za;case"seconds":case"second":case"secs":case"sec":case"s":return n*ka;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}a(M6,"parse");function F6(e){var t=Math.abs(e);return t>=vi?Math.round(e/vi)+"d":t>=Ua?Math.round(e/Ua)+"h":t>=za?Math.round(e/za)+"m":t>=ka?Math.round(e/ka)+"s":e+"ms"}a(F6,"fmtShort");function L6(e){var t=Math.abs(e);return t>=vi?Nf(e,t,vi,"day"):t>=Ua?Nf(e,t,Ua,"hour"):t>=za?Nf(e,t,za,"minute"):t>=ka?Nf(e,t,ka,"second"):e+" ms"}a(L6,"fmtLong");function Nf(e,t,n,o){var r=t>=n*1.5;return Math.round(e/n)+" "+o+(r?"s":"")}a(Nf,"plural")});var ew=j((Ose,E0)=>{function j6(e){n.debug=n,n.default=n,n.coerce=h,n.disable=s,n.enable=r,n.enabled=u,n.humanize=T0(),n.destroy=g,Object.keys(e).forEach(y=>{n[y]=e[y]}),n.names=[],n.skips=[],n.formatters={};function t(y){let T=0;for(let b=0;b<y.length;b++)T=(T<<5)-T+y.charCodeAt(b),T|=0;return n.colors[Math.abs(T)%n.colors.length]}a(t,"selectColor"),n.selectColor=t;function n(y){let T,b=null,P,S;function R(...I){if(!R.enabled)return;let l=R,m=Number(new Date),d=m-(T||m);l.diff=d,l.prev=T,l.curr=m,T=m,I[0]=n.coerce(I[0]),typeof I[0]!="string"&&I.unshift("%O");let v=0;I[0]=I[0].replace(/%([a-zA-Z%])/g,(E,_)=>{if(E==="%%")return"%";v++;let pe=n.formatters[_];if(typeof pe=="function"){let oe=I[v];E=pe.call(l,oe),I.splice(v,1),v--}return E}),n.formatArgs.call(l,I),(l.log||n.log).apply(l,I)}return a(R,"debug"),R.namespace=y,R.useColors=n.useColors(),R.color=n.selectColor(y),R.extend=o,R.destroy=n.destroy,Object.defineProperty(R,"enabled",{enumerable:!0,configurable:!1,get:a(()=>b!==null?b:(P!==n.namespaces&&(P=n.namespaces,S=n.enabled(y)),S),"get"),set:a(I=>{b=I},"set")}),typeof n.init=="function"&&n.init(R),R}a(n,"createDebug");function o(y,T){let b=n(this.namespace+(typeof T>"u"?":":T)+y);return b.log=this.log,b}a(o,"extend");function r(y){n.save(y),n.namespaces=y,n.names=[],n.skips=[];let T=(typeof y=="string"?y:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let b of T)b[0]==="-"?n.skips.push(b.slice(1)):n.names.push(b)}a(r,"enable");function i(y,T){let b=0,P=0,S=-1,R=0;for(;b<y.length;)if(P<T.length&&(T[P]===y[b]||T[P]==="*"))T[P]==="*"?(S=P,R=b,P++):(b++,P++);else if(S!==-1)P=S+1,R++,b=R;else return!1;for(;P<T.length&&T[P]==="*";)P++;return P===T.length}a(i,"matchesTemplate");function s(){let y=[...n.names,...n.skips.map(T=>"-"+T)].join(",");return n.enable(""),y}a(s,"disable");function u(y){for(let T of n.skips)if(i(y,T))return!1;for(let T of n.names)if(i(y,T))return!0;return!1}a(u,"enabled");function h(y){return y instanceof Error?y.stack||y.message:y}a(h,"coerce");function g(){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(g,"destroy"),n.enable(n.load()),n}a(j6,"setup");E0.exports=j6});var S0=j((ur,kf)=>{ur.formatArgs=B6;ur.save=V6;ur.load=G6;ur.useColors=q6;ur.storage=H6();ur.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`."))}})();ur.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 q6(){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(q6,"useColors");function B6(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+kf.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(B6,"formatArgs");ur.log=console.debug||console.log||(()=>{});function V6(e){try{e?ur.storage.setItem("debug",e):ur.storage.removeItem("debug")}catch{}}a(V6,"save");function G6(){let e;try{e=ur.storage.getItem("debug")||ur.storage.getItem("DEBUG")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}a(G6,"load");function H6(){try{return localStorage}catch{}}a(H6,"localstorage");kf.exports=ew()(ur);var{formatters:Z6}=kf.exports;Z6.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var I0=j((Nse,x0)=>{"use strict";x0.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 D0=j((kse,R0)=>{"use strict";var W6=require("os"),A0=require("tty"),Fr=I0(),{env:Mt}=process,Do;Fr("no-color")||Fr("no-colors")||Fr("color=false")||Fr("color=never")?Do=0:(Fr("color")||Fr("colors")||Fr("color=true")||Fr("color=always"))&&(Do=1);"FORCE_COLOR"in Mt&&(Mt.FORCE_COLOR==="true"?Do=1:Mt.FORCE_COLOR==="false"?Do=0:Do=Mt.FORCE_COLOR.length===0?1:Math.min(parseInt(Mt.FORCE_COLOR,10),3));function tw(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}a(tw,"translateLevel");function rw(e,t){if(Do===0)return 0;if(Fr("color=16m")||Fr("color=full")||Fr("color=truecolor"))return 3;if(Fr("color=256"))return 2;if(e&&!t&&Do===void 0)return 0;let n=Do||0;if(Mt.TERM==="dumb")return n;if(process.platform==="win32"){let o=W6.release().split(".");return Number(o[0])>=10&&Number(o[2])>=10586?Number(o[2])>=14931?3:2:1}if("CI"in Mt)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(o=>o in Mt)||Mt.CI_NAME==="codeship"?1:n;if("TEAMCITY_VERSION"in Mt)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Mt.TEAMCITY_VERSION)?1:0;if(Mt.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in Mt){let o=parseInt((Mt.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Mt.TERM_PROGRAM){case"iTerm.app":return o>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Mt.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Mt.TERM)||"COLORTERM"in Mt?1:n}a(rw,"supportsColor");function K6(e){let t=rw(e,e&&e.isTTY);return tw(t)}a(K6,"getSupportLevel");R0.exports={supportsColor:K6,stdout:tw(rw(!0,A0.isatty(1))),stderr:tw(rw(!0,A0.isatty(2)))}});var $0=j((Ft,Uf)=>{var J6=require("tty"),zf=require("util");Ft.init=n2;Ft.log=e2;Ft.formatArgs=Y6;Ft.save=t2;Ft.load=r2;Ft.useColors=X6;Ft.destroy=zf.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 e=D0();e&&(e.stderr||e).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(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 X6(){return"colors"in Ft.inspectOpts?!!Ft.inspectOpts.colors:J6.isatty(process.stderr.fd)}a(X6,"useColors");function Y6(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(`
1
+ "use strict";var NL=Object.create;var vs=Object.defineProperty;var kL=Object.getOwnPropertyDescriptor;var zL=Object.getOwnPropertyNames;var UL=Object.getPrototypeOf,ML=Object.prototype.hasOwnProperty;var a=(e,t)=>vs(e,"name",{value:t,configurable:!0});var Ct=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(o){throw n=[o],o}};var j=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(n){throw t=0,n}},nr=(e,t)=>{for(var n in t)vs(e,n,{get:t[n],enumerable:!0})},tS=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of zL(t))!ML.call(e,r)&&r!==n&&vs(e,r,{get:()=>t[r],enumerable:!(o=kL(t,r))||o.enumerable});return e};var he=(e,t,n)=>(n=e!=null?NL(UL(e)):{},tS(t||!e||!e.__esModule?vs(n,"default",{value:e,enumerable:!0}):n,e)),FL=e=>tS(vs({},"__esModule",{value:!0}),e);var QI=j((YI,yf)=>{(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 h(P,S){if(P.indexOf("::")!==P.lastIndexOf("::"))return null;let R=0,I=-1,l=(P.match(u.zoneIndex)||[])[0],m,d;for(l&&(l=l.substring(1),P=P.replace(/%.+$/,""));(I=P.indexOf(":",I+1))>=0;)R++;if(P.substr(0,2)==="::"&&R--,P.substr(-2,2)==="::"&&R--,R>S)return null;for(d=S-R,m=":";d--;)m+="0:";return P=P.replace("::",m),P[0]===":"&&(P=P.slice(1)),P[P.length-1]===":"&&(P=P.slice(0,-1)),S=(function(){let v=P.split(":"),p=[];for(let E=0;E<v.length;E++)p.push(parseInt(v[E],16));return p})(),{parts:S,zoneId:l}}a(h,"expandIPv6");function g(P,S,R,I){if(P.length!==S.length)throw new Error("ipaddr: cannot match CIDR for objects with different lengths");let l=0,m;for(;I>0;){if(m=R-I,m<0&&(m=0),P[l]>>m!==S[l]>>m)return!1;I-=R,l+=1}return!0}a(g,"matchCIDR");function y(P){if(r.test(P))return parseInt(P,16);if(P[0]==="0"&&!isNaN(parseInt(P[1],10))){if(o.test(P))return parseInt(P,8);throw new Error(`ipaddr: cannot parse ${P} as octal`)}return parseInt(P,10)}a(y,"parseIntAuto");function T(P,S){for(;P.length<S;)P=`0${P}`;return P}a(T,"padPart");let b={};b.IPv4=(function(){function P(S){if(S.length!==4)throw new Error("ipaddr: ipv4 octet count should be 4");let R,I;for(R=0;R<S.length;R++)if(I=S[R],!(0<=I&&I<=255))throw new Error("ipaddr: ipv4 octet should fit in 8 bits");this.octets=S}return a(P,"IPv4"),P.prototype.SpecialRanges={unspecified:[[new P([0,0,0,0]),8]],broadcast:[[new P([255,255,255,255]),32]],multicast:[[new P([224,0,0,0]),4]],linkLocal:[[new P([169,254,0,0]),16]],loopback:[[new P([127,0,0,0]),8]],carrierGradeNat:[[new P([100,64,0,0]),10]],private:[[new P([10,0,0,0]),8],[new P([172,16,0,0]),12],[new P([192,168,0,0]),16]],reserved:[[new P([192,0,0,0]),24],[new P([192,0,2,0]),24],[new P([192,88,99,0]),24],[new P([198,18,0,0]),15],[new P([198,51,100,0]),24],[new P([203,0,113,0]),24],[new P([240,0,0,0]),4]],as112:[[new P([192,175,48,0]),24],[new P([192,31,196,0]),24]],amt:[[new P([192,52,193,0]),24]]},P.prototype.kind=function(){return"ipv4"},P.prototype.match=function(S,R){let I;if(R===void 0&&(I=S,S=I[0],R=I[1]),S.kind()!=="ipv4")throw new Error("ipaddr: cannot match ipv4 address with non-ipv4 one");return g(this.octets,S.octets,8,R)},P.prototype.prefixLengthFromSubnetMask=function(){let S=0,R=!1,I={0:8,128:7,192:6,224:5,240:4,248:3,252:2,254:1,255:0},l,m,d;for(l=3;l>=0;l-=1)if(m=this.octets[l],m in I){if(d=I[m],R&&d!==0)return null;d!==8&&(R=!0),S+=d}else return null;return 32-S},P.prototype.range=function(){return b.subnetMatch(this,this.SpecialRanges)},P.prototype.toByteArray=function(){return this.octets.slice(0)},P.prototype.toIPv4MappedAddress=function(){return b.IPv6.parse(`::ffff:${this.toString()}`)},P.prototype.toNormalizedString=function(){return this.toString()},P.prototype.toString=function(){return this.octets.join(".")},P})(),b.IPv4.broadcastAddressFromCIDR=function(P){try{let S=this.parseCIDR(P),R=S[0].toByteArray(),I=this.subnetMaskFromPrefixLength(S[1]).toByteArray(),l=[],m=0;for(;m<4;)l.push(parseInt(R[m],10)|parseInt(I[m],10)^255),m++;return new this(l)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},b.IPv4.isIPv4=function(P){return this.parser(P)!==null},b.IPv4.isValid=function(P){try{return new this(this.parser(P)),!0}catch{return!1}},b.IPv4.isValidCIDR=function(P){try{return this.parseCIDR(P),!0}catch{return!1}},b.IPv4.isValidFourPartDecimal=function(P){return!!(b.IPv4.isValid(P)&&P.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/))},b.IPv4.isValidCIDRFourPartDecimal=function(P){let S=P.match(/^(.+)\/(\d+)$/);return!b.IPv4.isValidCIDR(P)||!S?!1:b.IPv4.isValidFourPartDecimal(S[1])},b.IPv4.networkAddressFromCIDR=function(P){let S,R,I,l,m;try{for(S=this.parseCIDR(P),I=S[0].toByteArray(),m=this.subnetMaskFromPrefixLength(S[1]).toByteArray(),l=[],R=0;R<4;)l.push(parseInt(I[R],10)&parseInt(m[R],10)),R++;return new this(l)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},b.IPv4.parse=function(P){let S=this.parser(P);if(S===null)throw new Error("ipaddr: string is not formatted like an IPv4 Address");return new this(S)},b.IPv4.parseCIDR=function(P){let S;if(S=P.match(/^(.+)\/(\d+)$/)){let R=parseInt(S[2]);if(R>=0&&R<=32){let I=[this.parse(S[1]),R];return Object.defineProperty(I,"toString",{value:a(function(){return this.join("/")},"value")}),I}}throw new Error("ipaddr: string is not formatted like an IPv4 CIDR range")},b.IPv4.parser=function(P){let S,R,I;if(S=P.match(n.fourOctet))return(function(){let l=S.slice(1,6),m=[];for(let d=0;d<l.length;d++)R=l[d],m.push(y(R));return m})();if(S=P.match(n.longValue)){if(I=y(S[1]),I>4294967295||I<0)throw new Error("ipaddr: address outside defined range");return(function(){let l=[],m;for(m=0;m<=24;m+=8)l.push(I>>m&255);return l})().reverse()}else return(S=P.match(n.twoOctet))?(function(){let l=S.slice(1,4),m=[];if(I=y(l[1]),I>16777215||I<0)throw new Error("ipaddr: address outside defined range");return m.push(y(l[0])),m.push(I>>16&255),m.push(I>>8&255),m.push(I&255),m})():(S=P.match(n.threeOctet))?(function(){let l=S.slice(1,5),m=[];if(I=y(l[2]),I>65535||I<0)throw new Error("ipaddr: address outside defined range");return m.push(y(l[0])),m.push(y(l[1])),m.push(I>>8&255),m.push(I&255),m})():null},b.IPv4.subnetMaskFromPrefixLength=function(P){if(P=parseInt(P),P<0||P>32)throw new Error("ipaddr: invalid IPv4 prefix length");let S=[0,0,0,0],R=0,I=Math.floor(P/8);for(;R<I;)S[R]=255,R++;return I<4&&(S[I]=Math.pow(2,P%8)-1<<8-P%8),new this(S)},b.IPv6=(function(){function P(S,R){let I,l;if(S.length===16)for(this.parts=[],I=0;I<=14;I+=2)this.parts.push(S[I]<<8|S[I+1]);else if(S.length===8)this.parts=S;else throw new Error("ipaddr: ipv6 part count should be 8 or 16");for(I=0;I<this.parts.length;I++)if(l=this.parts[I],!(0<=l&&l<=65535))throw new Error("ipaddr: ipv6 part should fit in 16 bits");R&&(this.zoneId=R)}return a(P,"IPv6"),P.prototype.SpecialRanges={unspecified:[new P([0,0,0,0,0,0,0,0]),128],linkLocal:[new P([65152,0,0,0,0,0,0,0]),10],multicast:[new P([65280,0,0,0,0,0,0,0]),8],loopback:[new P([0,0,0,0,0,0,0,1]),128],uniqueLocal:[new P([64512,0,0,0,0,0,0,0]),7],ipv4Mapped:[new P([0,0,0,0,0,65535,0,0]),96],discard:[new P([256,0,0,0,0,0,0,0]),64],rfc6145:[new P([0,0,0,0,65535,0,0,0]),96],rfc6052:[new P([100,65435,0,0,0,0,0,0]),96],"6to4":[new P([8194,0,0,0,0,0,0,0]),16],teredo:[new P([8193,0,0,0,0,0,0,0]),32],benchmarking:[new P([8193,2,0,0,0,0,0,0]),48],amt:[new P([8193,3,0,0,0,0,0,0]),32],as112v6:[[new P([8193,4,274,0,0,0,0,0]),48],[new P([9760,79,32768,0,0,0,0,0]),48]],deprecated:[new P([8193,16,0,0,0,0,0,0]),28],orchid2:[new P([8193,32,0,0,0,0,0,0]),28],droneRemoteIdProtocolEntityTags:[new P([8193,48,0,0,0,0,0,0]),28],reserved:[[new P([8193,0,0,0,0,0,0,0]),23],[new P([8193,3512,0,0,0,0,0,0]),32]]},P.prototype.isIPv4MappedAddress=function(){return this.range()==="ipv4Mapped"},P.prototype.kind=function(){return"ipv6"},P.prototype.match=function(S,R){let I;if(R===void 0&&(I=S,S=I[0],R=I[1]),S.kind()!=="ipv6")throw new Error("ipaddr: cannot match ipv6 address with non-ipv6 one");return g(this.parts,S.parts,16,R)},P.prototype.prefixLengthFromSubnetMask=function(){let S=0,R=!1,I={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},l,m;for(let d=7;d>=0;d-=1)if(l=this.parts[d],l in I){if(m=I[l],R&&m!==0)return null;m!==16&&(R=!0),S+=m}else return null;return 128-S},P.prototype.range=function(){return b.subnetMatch(this,this.SpecialRanges)},P.prototype.toByteArray=function(){let S,R=[],I=this.parts;for(let l=0;l<I.length;l++)S=I[l],R.push(S>>8),R.push(S&255);return R},P.prototype.toFixedLengthString=function(){let S=(function(){let I=[];for(let l=0;l<this.parts.length;l++)I.push(T(this.parts[l].toString(16),4));return I}).call(this).join(":"),R="";return this.zoneId&&(R=`%${this.zoneId}`),S+R},P.prototype.toIPv4Address=function(){if(!this.isIPv4MappedAddress())throw new Error("ipaddr: trying to convert a generic ipv6 address to ipv4");let S=this.parts.slice(-2),R=S[0],I=S[1];return new b.IPv4([R>>8,R&255,I>>8,I&255])},P.prototype.toNormalizedString=function(){let S=(function(){let I=[];for(let l=0;l<this.parts.length;l++)I.push(this.parts[l].toString(16));return I}).call(this).join(":"),R="";return this.zoneId&&(R=`%${this.zoneId}`),S+R},P.prototype.toRFC5952String=function(){let S=/((^|:)(0(:|$)){2,})/g,R=this.toNormalizedString(),I=0,l=-1,m;for(;m=S.exec(R);)m[0].length>l&&(I=m.index,l=m[0].length);return l<0?R:`${R.substring(0,I)}::${R.substring(I+l)}`},P.prototype.toString=function(){return this.toRFC5952String()},P})(),b.IPv6.broadcastAddressFromCIDR=function(P){try{let S=this.parseCIDR(P),R=S[0].toByteArray(),I=this.subnetMaskFromPrefixLength(S[1]).toByteArray(),l=[],m=0;for(;m<16;)l.push(parseInt(R[m],10)|parseInt(I[m],10)^255),m++;return new this(l)}catch(S){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${S})`)}},b.IPv6.isIPv6=function(P){return this.parser(P)!==null},b.IPv6.isValid=function(P){if(typeof P=="string"&&P.indexOf(":")===-1)return!1;try{let S=this.parser(P);return new this(S.parts,S.zoneId),!0}catch{return!1}},b.IPv6.isValidCIDR=function(P){if(typeof P=="string"&&P.indexOf(":")===-1)return!1;try{return this.parseCIDR(P),!0}catch{return!1}},b.IPv6.networkAddressFromCIDR=function(P){let S,R,I,l,m;try{for(S=this.parseCIDR(P),I=S[0].toByteArray(),m=this.subnetMaskFromPrefixLength(S[1]).toByteArray(),l=[],R=0;R<16;)l.push(parseInt(I[R],10)&parseInt(m[R],10)),R++;return new this(l)}catch(d){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${d})`)}},b.IPv6.parse=function(P){let S=this.parser(P);if(S.parts===null)throw new Error("ipaddr: string is not formatted like an IPv6 Address");return new this(S.parts,S.zoneId)},b.IPv6.parseCIDR=function(P){let S,R,I;if((R=P.match(/^(.+)\/(\d+)$/))&&(S=parseInt(R[2]),S>=0&&S<=128))return I=[this.parse(R[1]),S],Object.defineProperty(I,"toString",{value:a(function(){return this.join("/")},"value")}),I;throw new Error("ipaddr: string is not formatted like an IPv6 CIDR range")},b.IPv6.parser=function(P){let S,R,I,l,m,d;if(I=P.match(u.deprecatedTransitional))return this.parser(`::ffff:${I[1]}`);if(u.native.test(P))return h(P,8);if((I=P.match(u.transitional))&&(d=I[6]||"",S=I[1],I[1].endsWith("::")||(S=S.slice(0,-1)),S=h(S+d,6),S.parts)){for(m=[parseInt(I[2]),parseInt(I[3]),parseInt(I[4]),parseInt(I[5])],R=0;R<m.length;R++)if(l=m[R],!(0<=l&&l<=255))return null;return S.parts.push(m[0]<<8|m[1]),S.parts.push(m[2]<<8|m[3]),{parts:S.parts,zoneId:S.zoneId}}return null},b.IPv6.subnetMaskFromPrefixLength=function(P){if(P=parseInt(P),P<0||P>128)throw new Error("ipaddr: invalid IPv6 prefix length");let S=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],R=0,I=Math.floor(P/8);for(;R<I;)S[R]=255,R++;return I<16&&(S[I]=Math.pow(2,P%8)-1<<8-P%8),new this(S)},b.fromByteArray=function(P){let S=P.length;if(S===4)return new b.IPv4(P);if(S===16)return new b.IPv6(P);throw new Error("ipaddr: the binary input is neither an IPv6 nor IPv4 address")},b.isValid=function(P){return b.IPv6.isValid(P)||b.IPv4.isValid(P)},b.isValidCIDR=function(P){return b.IPv6.isValidCIDR(P)||b.IPv4.isValidCIDR(P)},b.parse=function(P){if(b.IPv6.isValid(P))return b.IPv6.parse(P);if(b.IPv4.isValid(P))return b.IPv4.parse(P);throw new Error("ipaddr: the address has neither IPv6 nor IPv4 format")},b.parseCIDR=function(P){try{return b.IPv6.parseCIDR(P)}catch{try{return b.IPv4.parseCIDR(P)}catch{throw new Error("ipaddr: the address has neither IPv6 nor IPv4 CIDR format")}}},b.process=function(P){let S=this.parse(P);return S.kind()==="ipv6"&&S.isIPv4MappedAddress()?S.toIPv4Address():S},b.subnetMatch=function(P,S,R){let I,l,m,d;R==null&&(R="unicast");for(l in S)if(Object.prototype.hasOwnProperty.call(S,l)){for(m=S[l],m[0]&&!(m[0]instanceof Array)&&(m=[m]),I=0;I<m.length;I++)if(d=m[I],P.kind()===d[0].kind()&&P.match.apply(P,d))return l}return R},typeof yf<"u"&&yf.exports?yf.exports=b:e.ipaddr=b})(YI)});var oR=j((Rie,nR)=>{var rR=require("stream").Stream,NV=require("util");nR.exports=Qr;function Qr(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}a(Qr,"DelayedStream");NV.inherits(Qr,rR);Qr.create=function(e,t){var n=new this;t=t||{};for(var o in t)n[o]=t[o];n.source=e;var r=e.emit;return e.emit=function(){return n._handleEmit(arguments),r.apply(e,arguments)},e.on("error",function(){}),n.pauseStream&&e.pause(),n};Object.defineProperty(Qr.prototype,"readable",{configurable:!0,enumerable:!0,get:a(function(){return this.source.readable},"get")});Qr.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};Qr.prototype.resume=function(){this._released||this.release(),this.source.resume()};Qr.prototype.pause=function(){this.source.pause()};Qr.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(e){this.emit.apply(this,e)}.bind(this)),this._bufferedEvents=[]};Qr.prototype.pipe=function(){var e=rR.prototype.pipe.apply(this,arguments);return this.resume(),e};Qr.prototype._handleEmit=function(e){if(this._released){this.emit.apply(this,e);return}e[0]==="data"&&(this.dataSize+=e[1].length,this._checkIfMaxDataSizeExceeded()),this._bufferedEvents.push(e)};Qr.prototype._checkIfMaxDataSizeExceeded=function(){if(!this._maxDataSizeExceeded&&!(this.dataSize<=this.maxDataSize)){this._maxDataSizeExceeded=!0;var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(e))}}});var cR=j((Oie,sR)=>{var kV=require("util"),aR=require("stream").Stream,iR=oR();sR.exports=wt;function wt(){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(wt,"CombinedStream");kV.inherits(wt,aR);wt.create=function(e){var t=new this;e=e||{};for(var n in e)t[n]=e[n];return t};wt.isStreamLike=function(e){return typeof e!="function"&&typeof e!="string"&&typeof e!="boolean"&&typeof e!="number"&&!Buffer.isBuffer(e)};wt.prototype.append=function(e){var t=wt.isStreamLike(e);if(t){if(!(e instanceof iR)){var n=iR.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};wt.prototype.pipe=function(e,t){return aR.prototype.pipe.call(this,e,t),this.resume(),e};wt.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}};wt.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=wt.isStreamLike(n);o&&(n.on("data",this._checkDataSize.bind(this)),this._handleErrors(n)),this._pipeNext(n)}.bind(this))};wt.prototype._pipeNext=function(e){this._currentStream=e;var t=wt.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()};wt.prototype._handleErrors=function(e){var t=this;e.on("error",function(n){t._emitError(n)})};wt.prototype.write=function(e){this.emit("data",e)};wt.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"))};wt.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")};wt.prototype.end=function(){this._reset(),this.emit("end")};wt.prototype.destroy=function(){this._reset(),this.emit("close")};wt.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};wt.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(e))}};wt.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)};wt.prototype._emitError=function(e){this._reset(),this.emit("error",e)}});var lR=j((Cie,uR)=>{"use strict";uR.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 en=j(cr=>{"use strict";var Ef=lR(),zV=require("path").extname,dR=/^\s*([^;\s]*)(?:;|\s|$)/,UV=/^text\//i;cr.charset=pR;cr.charsets={lookup:pR};cr.contentType=MV;cr.extension=FV;cr.extensions=Object.create(null);cr.lookup=LV;cr.types=Object.create(null);jV(cr.extensions,cr.types);function pR(e){if(!e||typeof e!="string")return!1;var t=dR.exec(e),n=t&&Ef[t[1].toLowerCase()];return n&&n.charset?n.charset:t&&UV.test(t[1])?"UTF-8":!1}a(pR,"charset");function MV(e){if(!e||typeof e!="string")return!1;var t=e.indexOf("/")===-1?cr.lookup(e):e;if(!t)return!1;if(t.indexOf("charset")===-1){var n=cr.charset(t);n&&(t+="; charset="+n.toLowerCase())}return t}a(MV,"contentType");function FV(e){if(!e||typeof e!="string")return!1;var t=dR.exec(e),n=t&&cr.extensions[t[1].toLowerCase()];return!n||!n.length?!1:n[0]}a(FV,"extension");function LV(e){if(!e||typeof e!="string")return!1;var t=zV("x."+e).toLowerCase().substr(1);return t&&cr.types[t]||!1}a(LV,"lookup");function jV(e,t){var n=["nginx","apache",void 0,"iana"];Object.keys(Ef).forEach(a(function(r){var i=Ef[r],s=i.extensions;if(!(!s||!s.length)){e[r]=s;for(var u=0;u<s.length;u++){var h=s[u];if(t[h]){var g=n.indexOf(Ef[t[h]].source),y=n.indexOf(i.source);if(t[h]!=="application/octet-stream"&&(g>y||g===y&&t[h].substr(0,12)==="application/"))continue}t[h]=r}}},"forEachMimeType"))}a(jV,"populateMaps")});var mR=j((zie,fR)=>{fR.exports=qV;function qV(e){var t=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;t?t(e):setTimeout(e,0)}a(qV,"defer")});var IP=j((Mie,gR)=>{var hR=mR();gR.exports=BV;function BV(e){var t=!1;return hR(function(){t=!0}),a(function(o,r){t?e(o,r):hR(a(function(){e(o,r)},"nextTick_callback"))},"async_callback")}a(BV,"async")});var AP=j((Lie,yR)=>{yR.exports=VV;function VV(e){Object.keys(e.jobs).forEach(GV.bind(e)),e.jobs={}}a(VV,"abort");function GV(e){typeof this.jobs[e]=="function"&&this.jobs[e]()}a(GV,"clean")});var RP=j((qie,_R)=>{var vR=IP(),HV=AP();_R.exports=ZV;function ZV(e,t,n,o){var r=n.keyedList?n.keyedList[n.index]:n.index;n.jobs[r]=WV(t,r,e[r],function(i,s){r in n.jobs&&(delete n.jobs[r],i?HV(n):n.results[r]=s,o(i,n.results))})}a(ZV,"iterate");function WV(e,t,n,o){var r;return e.length==2?r=e(n,vR(o)):r=e(n,t,vR(o)),r}a(WV,"runJob")});var DP=j((Vie,PR)=>{PR.exports=KV;function KV(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(KV,"state")});var OP=j((Hie,wR)=>{var JV=AP(),XV=IP();wR.exports=YV;function YV(e){Object.keys(this.jobs).length&&(this.index=this.size,JV(this),XV(e)(null,this.results))}a(YV,"terminator")});var TR=j((Wie,bR)=>{var QV=RP(),e4=DP(),t4=OP();bR.exports=r4;function r4(e,t,n){for(var o=e4(e);o.index<(o.keyedList||e).length;)QV(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 t4.bind(o,n)}a(r4,"parallel")});var $P=j((Jie,Sf)=>{var ER=RP(),n4=DP(),o4=OP();Sf.exports=i4;Sf.exports.ascending=SR;Sf.exports.descending=a4;function i4(e,t,n,o){var r=n4(e,n);return ER(e,t,r,a(function i(s,u){if(s){o(s,u);return}if(r.index++,r.index<(r.keyedList||e).length){ER(e,t,r,i);return}o(null,r.results)},"iteratorHandler")),o4.bind(r,o)}a(i4,"serialOrdered");function SR(e,t){return e<t?-1:e>t?1:0}a(SR,"ascending");function a4(e,t){return-1*SR(e,t)}a(a4,"descending")});var IR=j((Yie,xR)=>{var s4=$P();xR.exports=c4;function c4(e,t,n){return s4(e,t,null,n)}a(c4,"serial")});var RR=j((eae,AR)=>{AR.exports={parallel:TR(),serial:IR(),serialOrdered:$P()}});var CP=j((tae,DR)=>{"use strict";DR.exports=Object});var $R=j((rae,OR)=>{"use strict";OR.exports=Error});var NR=j((nae,CR)=>{"use strict";CR.exports=EvalError});var zR=j((oae,kR)=>{"use strict";kR.exports=RangeError});var MR=j((iae,UR)=>{"use strict";UR.exports=ReferenceError});var LR=j((aae,FR)=>{"use strict";FR.exports=SyntaxError});var Ao=j((sae,jR)=>{"use strict";jR.exports=TypeError});var BR=j((cae,qR)=>{"use strict";qR.exports=URIError});var GR=j((uae,VR)=>{"use strict";VR.exports=Math.abs});var ZR=j((lae,HR)=>{"use strict";HR.exports=Math.floor});var KR=j((dae,WR)=>{"use strict";WR.exports=Math.max});var XR=j((pae,JR)=>{"use strict";JR.exports=Math.min});var QR=j((fae,YR)=>{"use strict";YR.exports=Math.pow});var tD=j((mae,eD)=>{"use strict";eD.exports=Math.round});var nD=j((hae,rD)=>{"use strict";rD.exports=Number.isNaN||a(function(t){return t!==t},"isNaN")});var iD=j((yae,oD)=>{"use strict";var u4=nD();oD.exports=a(function(t){return u4(t)||t===0?t:t<0?-1:1},"sign")});var sD=j((_ae,aD)=>{"use strict";aD.exports=Object.getOwnPropertyDescriptor});var NP=j((Pae,cD)=>{"use strict";var xf=sD();if(xf)try{xf([],"length")}catch{xf=null}cD.exports=xf});var lD=j((wae,uD)=>{"use strict";var If=Object.defineProperty||!1;if(If)try{If({},"a",{value:1})}catch{If=!1}uD.exports=If});var kP=j((bae,dD)=>{"use strict";dD.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 mD=j((Eae,fD)=>{"use strict";var pD=typeof Symbol<"u"&&Symbol,l4=kP();fD.exports=a(function(){return typeof pD!="function"||typeof Symbol!="function"||typeof pD("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:l4()},"hasNativeSymbols")});var zP=j((xae,hD)=>{"use strict";hD.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var UP=j((Iae,gD)=>{"use strict";var d4=CP();gD.exports=d4.getPrototypeOf||null});var _D=j((Aae,vD)=>{"use strict";var p4="Function.prototype.bind called on incompatible ",f4=Object.prototype.toString,m4=Math.max,h4="[object Function]",yD=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"),g4=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"),y4=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");vD.exports=a(function(t){var n=this;if(typeof n!="function"||f4.apply(n)!==h4)throw new TypeError(p4+n);for(var o=g4(arguments,1),r,i=a(function(){if(this instanceof r){var y=n.apply(this,yD(o,arguments));return Object(y)===y?y:this}return n.apply(t,yD(o,arguments))},"binder"),s=m4(0,n.length-o.length),u=[],h=0;h<s;h++)u[h]="$"+h;if(r=Function("binder","return function ("+y4(u,",")+"){ return binder.apply(this,arguments); }")(i),n.prototype){var g=a(function(){},"Empty");g.prototype=n.prototype,r.prototype=new g,g.prototype=null}return r},"bind")});var Da=j((Dae,PD)=>{"use strict";var v4=_D();PD.exports=Function.prototype.bind||v4});var Af=j((Oae,wD)=>{"use strict";wD.exports=Function.prototype.call});var MP=j(($ae,bD)=>{"use strict";bD.exports=Function.prototype.apply});var ED=j((Cae,TD)=>{"use strict";TD.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var xD=j((Nae,SD)=>{"use strict";var _4=Da(),P4=MP(),w4=Af(),b4=ED();SD.exports=b4||_4.call(w4,P4)});var FP=j((kae,ID)=>{"use strict";var T4=Da(),E4=Ao(),S4=Af(),x4=xD();ID.exports=a(function(t){if(t.length<1||typeof t[0]!="function")throw new E4("a function is required");return x4(T4,S4,t)},"callBindBasic")});var CD=j((Uae,$D)=>{"use strict";var I4=FP(),AD=NP(),DD;try{DD=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!="object"||!("code"in e)||e.code!=="ERR_PROTO_ACCESS")throw e}var LP=!!DD&&AD&&AD(Object.prototype,"__proto__"),OD=Object,RD=OD.getPrototypeOf;$D.exports=LP&&typeof LP.get=="function"?I4([LP.get]):typeof RD=="function"?a(function(t){return RD(t==null?t:OD(t))},"getDunder"):!1});var MD=j((Fae,UD)=>{"use strict";var ND=zP(),kD=UP(),zD=CD();UD.exports=ND?a(function(t){return ND(t)},"getProto"):kD?a(function(t){if(!t||typeof t!="object"&&typeof t!="function")throw new TypeError("getProto: not an object");return kD(t)},"getProto"):zD?a(function(t){return zD(t)},"getProto"):null});var jP=j((jae,FD)=>{"use strict";var A4=Function.prototype.call,R4=Object.prototype.hasOwnProperty,D4=Da();FD.exports=D4.call(A4,R4)});var bu=j((qae,GD)=>{"use strict";var He,O4=CP(),$4=$R(),C4=NR(),N4=zR(),k4=MR(),Na=LR(),Ca=Ao(),z4=BR(),U4=GR(),M4=ZR(),F4=KR(),L4=XR(),j4=QR(),q4=tD(),B4=iD(),BD=Function,qP=a(function(e){try{return BD('"use strict"; return ('+e+").constructor;")()}catch{}},"getEvalledConstructor"),_u=NP(),V4=lD(),BP=a(function(){throw new Ca},"throwTypeError"),G4=_u?(function(){try{return arguments.callee,BP}catch{try{return _u(arguments,"callee").get}catch{return BP}}})():BP,Oa=mD()(),Ut=MD(),H4=UP(),Z4=zP(),VD=MP(),Pu=Af(),$a={},W4=typeof Uint8Array>"u"||!Ut?He:Ut(Uint8Array),yi={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?He:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?He:ArrayBuffer,"%ArrayIteratorPrototype%":Oa&&Ut?Ut([][Symbol.iterator]()):He,"%AsyncFromSyncIteratorPrototype%":He,"%AsyncFunction%":$a,"%AsyncGenerator%":$a,"%AsyncGeneratorFunction%":$a,"%AsyncIteratorPrototype%":$a,"%Atomics%":typeof Atomics>"u"?He:Atomics,"%BigInt%":typeof BigInt>"u"?He:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?He:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?He:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?He:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":$4,"%eval%":eval,"%EvalError%":C4,"%Float16Array%":typeof Float16Array>"u"?He:Float16Array,"%Float32Array%":typeof Float32Array>"u"?He:Float32Array,"%Float64Array%":typeof Float64Array>"u"?He:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?He:FinalizationRegistry,"%Function%":BD,"%GeneratorFunction%":$a,"%Int8Array%":typeof Int8Array>"u"?He:Int8Array,"%Int16Array%":typeof Int16Array>"u"?He:Int16Array,"%Int32Array%":typeof Int32Array>"u"?He:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Oa&&Ut?Ut(Ut([][Symbol.iterator]())):He,"%JSON%":typeof JSON=="object"?JSON:He,"%Map%":typeof Map>"u"?He:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Oa||!Ut?He:Ut(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":O4,"%Object.getOwnPropertyDescriptor%":_u,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?He:Promise,"%Proxy%":typeof Proxy>"u"?He:Proxy,"%RangeError%":N4,"%ReferenceError%":k4,"%Reflect%":typeof Reflect>"u"?He:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?He:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Oa||!Ut?He:Ut(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?He:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Oa&&Ut?Ut(""[Symbol.iterator]()):He,"%Symbol%":Oa?Symbol:He,"%SyntaxError%":Na,"%ThrowTypeError%":G4,"%TypedArray%":W4,"%TypeError%":Ca,"%Uint8Array%":typeof Uint8Array>"u"?He:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?He:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?He:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?He:Uint32Array,"%URIError%":z4,"%WeakMap%":typeof WeakMap>"u"?He:WeakMap,"%WeakRef%":typeof WeakRef>"u"?He:WeakRef,"%WeakSet%":typeof WeakSet>"u"?He:WeakSet,"%Function.prototype.call%":Pu,"%Function.prototype.apply%":VD,"%Object.defineProperty%":V4,"%Object.getPrototypeOf%":H4,"%Math.abs%":U4,"%Math.floor%":M4,"%Math.max%":F4,"%Math.min%":L4,"%Math.pow%":j4,"%Math.round%":q4,"%Math.sign%":B4,"%Reflect.getPrototypeOf%":Z4};if(Ut)try{null.error}catch(e){LD=Ut(Ut(e)),yi["%Error.prototype%"]=LD}var LD,K4=a(function e(t){var n;if(t==="%AsyncFunction%")n=qP("async function () {}");else if(t==="%GeneratorFunction%")n=qP("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=qP("async function* () {}");else if(t==="%AsyncGenerator%"){var o=e("%AsyncGeneratorFunction%");o&&(n=o.prototype)}else if(t==="%AsyncIteratorPrototype%"){var r=e("%AsyncGenerator%");r&&Ut&&(n=Ut(r.prototype))}return yi[t]=n,n},"doEval"),jD={__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"]},wu=Da(),Rf=jP(),J4=wu.call(Pu,Array.prototype.concat),X4=wu.call(VD,Array.prototype.splice),qD=wu.call(Pu,String.prototype.replace),Df=wu.call(Pu,String.prototype.slice),Y4=wu.call(Pu,RegExp.prototype.exec),Q4=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,e6=/\\(\\)?/g,t6=a(function(t){var n=Df(t,0,1),o=Df(t,-1);if(n==="%"&&o!=="%")throw new Na("invalid intrinsic syntax, expected closing `%`");if(o==="%"&&n!=="%")throw new Na("invalid intrinsic syntax, expected opening `%`");var r=[];return qD(t,Q4,function(i,s,u,h){r[r.length]=u?qD(h,e6,"$1"):s||i}),r},"stringToPath"),r6=a(function(t,n){var o=t,r;if(Rf(jD,o)&&(r=jD[o],o="%"+r[0]+"%"),Rf(yi,o)){var i=yi[o];if(i===$a&&(i=K4(o)),typeof i>"u"&&!n)throw new Ca("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:r,name:o,value:i}}throw new Na("intrinsic "+t+" does not exist!")},"getBaseIntrinsic");GD.exports=a(function(t,n){if(typeof t!="string"||t.length===0)throw new Ca("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new Ca('"allowMissing" argument must be a boolean');if(Y4(/^%?[^%]*%?$/,t)===null)throw new Na("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var o=t6(t),r=o.length>0?o[0]:"",i=r6("%"+r+"%",n),s=i.name,u=i.value,h=!1,g=i.alias;g&&(r=g[0],X4(o,J4([0,1],g)));for(var y=1,T=!0;y<o.length;y+=1){var b=o[y],P=Df(b,0,1),S=Df(b,-1);if((P==='"'||P==="'"||P==="`"||S==='"'||S==="'"||S==="`")&&P!==S)throw new Na("property names with quotes must have matching quotes");if((b==="constructor"||!T)&&(h=!0),r+="."+b,s="%"+r+"%",Rf(yi,s))u=yi[s];else if(u!=null){if(!(b in u)){if(!n)throw new Ca("base intrinsic for "+t+" exists, but the property is not available.");return}if(_u&&y+1>=o.length){var R=_u(u,b);T=!!R,T&&"get"in R&&!("originalValue"in R.get)?u=R.get:u=u[b]}else T=Rf(u,b),u=u[b];T&&!h&&(yi[s]=u)}}return u},"GetIntrinsic")});var ZD=j((Vae,HD)=>{"use strict";var n6=kP();HD.exports=a(function(){return n6()&&!!Symbol.toStringTag},"hasToStringTagShams")});var JD=j((Hae,KD)=>{"use strict";var o6=bu(),WD=o6("%Object.defineProperty%",!0),i6=ZD()(),a6=jP(),s6=Ao(),Of=i6?Symbol.toStringTag:null;KD.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 s6("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");Of&&(o||!a6(t,Of))&&(WD?WD(t,Of,{configurable:!r,enumerable:!1,value:n,writable:!1}):t[Of]=n)},"setToStringTag")});var YD=j((Wae,XD)=>{"use strict";var c6=Function.prototype.call,u6=Object.prototype.hasOwnProperty,l6=Da();XD.exports=l6.call(c6,u6)});var e0=j((Kae,QD)=>{"use strict";QD.exports=function(e,t){return Object.keys(t).forEach(function(n){e[n]=e[n]||t[n]}),e}});var Tu=j((Jae,r0)=>{"use strict";var ZP=cR(),d6=require("util"),VP=require("path"),p6=require("http"),f6=require("https"),m6=require("url").parse,h6=require("fs"),g6=require("stream").Stream,y6=require("crypto"),GP=en(),v6=RR(),_6=JD(),Ro=YD(),HP=e0();function t0(e){return String(e).replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/"/g,"%22")}a(t0,"escapeHeaderParam");function Ye(e){if(!(this instanceof Ye))return new Ye(e);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],ZP.call(this),e=e||{};for(var t in e)this[t]=e[t]}a(Ye,"FormData");d6.inherits(Ye,ZP);Ye.LINE_BREAK=`\r
2
+ `;Ye.DEFAULT_CONTENT_TYPE="application/octet-stream";Ye.prototype.append=function(e,t,n){n=n||{},typeof n=="string"&&(n={filename:n});var o=ZP.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)};Ye.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)+Ye.LINE_BREAK.length,!(!t||!t.path&&!(t.readable&&Ro(t,"httpVersion"))&&!(t instanceof g6))&&(n.knownLength||this._valuesToMeasure.push(t))};Ye.prototype._lengthRetriever=function(e,t){Ro(e,"fd")?e.end!=null&&e.end!=1/0&&e.start!=null?t(null,e.end+1-(e.start?e.start:0)):h6.stat(e.path,function(n,o){if(n){t(n);return}var r=o.size-(e.start?e.start:0);t(null,r)}):Ro(e,"httpVersion")?t(null,Number(e.headers["content-length"])):Ro(e,"httpModule")?(e.on("response",function(n){e.pause(),t(null,Number(n.headers["content-length"]))}),e.resume()):t("Unknown stream")};Ye.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="'+t0(e)+'"'].concat(o||[]),"Content-Type":[].concat(r||[])};typeof n.header=="object"&&HP(s,n.header);var u;for(var h in s)if(Ro(s,h)){if(u=s[h],u==null)continue;Array.isArray(u)||(u=[u]),u.length&&(i+=h+": "+u.join("; ")+Ye.LINE_BREAK)}return"--"+this.getBoundary()+Ye.LINE_BREAK+i+Ye.LINE_BREAK};Ye.prototype._getContentDisposition=function(e,t){var n;if(typeof t.filepath=="string"?n=VP.normalize(t.filepath).replace(/\\/g,"/"):t.filename||e&&(e.name||e.path)?n=VP.basename(t.filename||e&&(e.name||e.path)):e&&e.readable&&Ro(e,"httpVersion")&&(n=VP.basename(e.client._httpMessage.path||"")),n)return'filename="'+t0(n)+'"'};Ye.prototype._getContentType=function(e,t){var n=t.contentType;return!n&&e&&e.name&&(n=GP.lookup(e.name)),!n&&e&&e.path&&(n=GP.lookup(e.path)),!n&&e&&e.readable&&Ro(e,"httpVersion")&&(n=e.headers["content-type"]),!n&&(t.filepath||t.filename)&&(n=GP.lookup(t.filepath||t.filename)),!n&&e&&typeof e=="object"&&(n=Ye.DEFAULT_CONTENT_TYPE),n};Ye.prototype._multiPartFooter=function(){return function(e){var t=Ye.LINE_BREAK,n=this._streams.length===0;n&&(t+=this._lastBoundary()),e(t)}.bind(this)};Ye.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+Ye.LINE_BREAK};Ye.prototype.getHeaders=function(e){var t,n={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in e)Ro(e,t)&&(n[t.toLowerCase()]=e[t]);return n};Ye.prototype.setBoundary=function(e){if(typeof e!="string")throw new TypeError("FormData boundary must be a string");this._boundary=e};Ye.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};Ye.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(Ye.LINE_BREAK)])));return Buffer.concat([e,Buffer.from(this._lastBoundary())])};Ye.prototype._generateBoundary=function(){this._boundary="--------------------------"+y6.randomBytes(12).toString("hex")};Ye.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};Ye.prototype.hasKnownLength=function(){var e=!0;return this._valuesToMeasure.length&&(e=!1),e};Ye.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}v6.parallel(this._valuesToMeasure,this._lengthRetriever,function(n,o){if(n){e(n);return}o.forEach(function(r){t+=r}),e(null,t)})};Ye.prototype.submit=function(e,t){var n,o,r={method:"post"};return typeof e=="string"?(e=m6(e),o=HP({port:e.port,path:e.pathname,host:e.hostname,protocol:e.protocol},r)):(o=HP(e,r),o.port||(o.port=o.protocol==="https:"?443:80)),o.headers=this.getHeaders(e.headers),o.protocol==="https:"?n=f6.request(o):n=p6.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,h=a(function(g,y){return n.removeListener("error",h),n.removeListener("response",u),t.call(this,g,y)},"callback");u=h.bind(this,null),n.on("error",h),n.on("response",u)}}.bind(this)),n};Ye.prototype._error=function(e){this.error||(this.error=e,this.pause(),this.emit("error",e))};Ye.prototype.toString=function(){return"[object FormData]"};_6(Ye.prototype,"FormData");r0.exports=Ye});var Eu=j((wse,f0)=>{"use strict";var $f=Object.prototype.hasOwnProperty,p0=Object.prototype.toString,a0=Object.defineProperty,s0=Object.getOwnPropertyDescriptor,c0=a(function(t){return typeof Array.isArray=="function"?Array.isArray(t):p0.call(t)==="[object Array]"},"isArray"),u0=a(function(t){if(!t||p0.call(t)!=="[object Object]")return!1;var n=$f.call(t,"constructor"),o=t.constructor&&t.constructor.prototype&&$f.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!o)return!1;var r;for(r in t);return typeof r>"u"||$f.call(t,r)},"isPlainObject"),l0=a(function(t,n){a0&&n.name==="__proto__"?a0(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},"setProperty"),d0=a(function(t,n){if(n==="__proto__")if($f.call(t,n)){if(s0)return s0(t,n).value}else return;return t[n]},"getProperty");f0.exports=a(function e(){var t,n,o,r,i,s,u=arguments[0],h=1,g=arguments.length,y=!1;for(typeof u=="boolean"&&(y=u,u=arguments[1]||{},h=2),(u==null||typeof u!="object"&&typeof u!="function")&&(u={});h<g;++h)if(t=arguments[h],t!=null)for(n in t)o=d0(u,n),r=d0(t,n),u!==r&&(y&&r&&(u0(r)||(i=c0(r)))?(i?(i=!1,s=o&&c0(o)?o:[]):s=o&&u0(o)?o:{},l0(u,{name:n,newValue:e(y,s,r)})):typeof r<"u"&&l0(u,{name:n,newValue:r}));return u},"extend")});var m0=j((Tse,D6)=>{D6.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 g0=j((Ese,h0)=>{"use strict";var O6=m0();h0.exports={pkg:O6}});var JP=j(Mr=>{"use strict";var v0=Mr&&Mr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Mr,"__esModule",{value:!0});Mr.GaxiosError=Mr.GAXIOS_ERROR_SYMBOL=void 0;Mr.defaultErrorRedactor=_0;var y0=v0(Eu()),$6=v0(g0()),WP=$6.default.pkg;Mr.GAXIOS_ERROR_SYMBOL=Symbol.for(`${WP.name}-gaxios-error`);var KP=class e extends Error{static{a(this,"GaxiosError")}config;response;code;status;error;[Mr.GAXIOS_ERROR_SYMBOL]=WP.version;static[Symbol.hasInstance](t){return t&&typeof t=="object"&&Mr.GAXIOS_ERROR_SYMBOL in t&&t[Mr.GAXIOS_ERROR_SYMBOL]===WP.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,y0.default)(!0,{},n),this.response&&(this.response.config=(0,y0.default)(!0,{},this.response.config)),this.response){try{this.response.data=C6(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}}};Mr.GaxiosError=KP;function C6(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(C6,"translateData");function _0(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&&(_0({config:e.response.config}),n(e.response.headers),e.response.bodyUsed&&(o(e.response,"data"),r(e.response.data))),e}a(_0,"defaultErrorRedactor")});var w0=j(XP=>{"use strict";Object.defineProperty(XP,"__esModule",{value:!0});XP.getRetryConfig=N6;async function N6(e){let t=P0(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||k6)(e))return{shouldRetry:!1,config:e.config};let r=z6(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(N6,"getRetryConfig");function k6(e){let t=P0(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(k6,"shouldRetryRequest");function P0(e){if(e&&e.config&&e.config.retryConfig)return e.config.retryConfig}a(P0,"getConfig");function z6(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(z6,"getNextRetryDelay")});var QP=j(Cf=>{"use strict";Object.defineProperty(Cf,"__esModule",{value:!0});Cf.GaxiosInterceptorManager=void 0;var YP=class extends Set{static{a(this,"GaxiosInterceptorManager")}};Cf.GaxiosInterceptorManager=YP});var T0=j((Ose,b0)=>{var ka=1e3,za=ka*60,Ua=za*60,vi=Ua*24,U6=vi*7,M6=vi*365.25;b0.exports=function(e,t){t=t||{};var n=typeof e;if(n==="string"&&e.length>0)return F6(e);if(n==="number"&&isFinite(e))return t.long?j6(e):L6(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function F6(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*M6;case"weeks":case"week":case"w":return n*U6;case"days":case"day":case"d":return n*vi;case"hours":case"hour":case"hrs":case"hr":case"h":return n*Ua;case"minutes":case"minute":case"mins":case"min":case"m":return n*za;case"seconds":case"second":case"secs":case"sec":case"s":return n*ka;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}a(F6,"parse");function L6(e){var t=Math.abs(e);return t>=vi?Math.round(e/vi)+"d":t>=Ua?Math.round(e/Ua)+"h":t>=za?Math.round(e/za)+"m":t>=ka?Math.round(e/ka)+"s":e+"ms"}a(L6,"fmtShort");function j6(e){var t=Math.abs(e);return t>=vi?Nf(e,t,vi,"day"):t>=Ua?Nf(e,t,Ua,"hour"):t>=za?Nf(e,t,za,"minute"):t>=ka?Nf(e,t,ka,"second"):e+" ms"}a(j6,"fmtLong");function Nf(e,t,n,o){var r=t>=n*1.5;return Math.round(e/n)+" "+o+(r?"s":"")}a(Nf,"plural")});var ew=j((Cse,E0)=>{function q6(e){n.debug=n,n.default=n,n.coerce=h,n.disable=s,n.enable=r,n.enabled=u,n.humanize=T0(),n.destroy=g,Object.keys(e).forEach(y=>{n[y]=e[y]}),n.names=[],n.skips=[],n.formatters={};function t(y){let T=0;for(let b=0;b<y.length;b++)T=(T<<5)-T+y.charCodeAt(b),T|=0;return n.colors[Math.abs(T)%n.colors.length]}a(t,"selectColor"),n.selectColor=t;function n(y){let T,b=null,P,S;function R(...I){if(!R.enabled)return;let l=R,m=Number(new Date),d=m-(T||m);l.diff=d,l.prev=T,l.curr=m,T=m,I[0]=n.coerce(I[0]),typeof I[0]!="string"&&I.unshift("%O");let v=0;I[0]=I[0].replace(/%([a-zA-Z%])/g,(E,_)=>{if(E==="%%")return"%";v++;let pe=n.formatters[_];if(typeof pe=="function"){let oe=I[v];E=pe.call(l,oe),I.splice(v,1),v--}return E}),n.formatArgs.call(l,I),(l.log||n.log).apply(l,I)}return a(R,"debug"),R.namespace=y,R.useColors=n.useColors(),R.color=n.selectColor(y),R.extend=o,R.destroy=n.destroy,Object.defineProperty(R,"enabled",{enumerable:!0,configurable:!1,get:a(()=>b!==null?b:(P!==n.namespaces&&(P=n.namespaces,S=n.enabled(y)),S),"get"),set:a(I=>{b=I},"set")}),typeof n.init=="function"&&n.init(R),R}a(n,"createDebug");function o(y,T){let b=n(this.namespace+(typeof T>"u"?":":T)+y);return b.log=this.log,b}a(o,"extend");function r(y){n.save(y),n.namespaces=y,n.names=[],n.skips=[];let T=(typeof y=="string"?y:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let b of T)b[0]==="-"?n.skips.push(b.slice(1)):n.names.push(b)}a(r,"enable");function i(y,T){let b=0,P=0,S=-1,R=0;for(;b<y.length;)if(P<T.length&&(T[P]===y[b]||T[P]==="*"))T[P]==="*"?(S=P,R=b,P++):(b++,P++);else if(S!==-1)P=S+1,R++,b=R;else return!1;for(;P<T.length&&T[P]==="*";)P++;return P===T.length}a(i,"matchesTemplate");function s(){let y=[...n.names,...n.skips.map(T=>"-"+T)].join(",");return n.enable(""),y}a(s,"disable");function u(y){for(let T of n.skips)if(i(y,T))return!1;for(let T of n.names)if(i(y,T))return!0;return!1}a(u,"enabled");function h(y){return y instanceof Error?y.stack||y.message:y}a(h,"coerce");function g(){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(g,"destroy"),n.enable(n.load()),n}a(q6,"setup");E0.exports=q6});var S0=j((ur,kf)=>{ur.formatArgs=V6;ur.save=G6;ur.load=H6;ur.useColors=B6;ur.storage=Z6();ur.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`."))}})();ur.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 B6(){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(B6,"useColors");function V6(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+kf.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(V6,"formatArgs");ur.log=console.debug||console.log||(()=>{});function G6(e){try{e?ur.storage.setItem("debug",e):ur.storage.removeItem("debug")}catch{}}a(G6,"save");function H6(){let e;try{e=ur.storage.getItem("debug")||ur.storage.getItem("DEBUG")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}a(H6,"load");function Z6(){try{return localStorage}catch{}}a(Z6,"localstorage");kf.exports=ew()(ur);var{formatters:W6}=kf.exports;W6.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var I0=j((zse,x0)=>{"use strict";x0.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 D0=j((Use,R0)=>{"use strict";var K6=require("os"),A0=require("tty"),Fr=I0(),{env:Mt}=process,Do;Fr("no-color")||Fr("no-colors")||Fr("color=false")||Fr("color=never")?Do=0:(Fr("color")||Fr("colors")||Fr("color=true")||Fr("color=always"))&&(Do=1);"FORCE_COLOR"in Mt&&(Mt.FORCE_COLOR==="true"?Do=1:Mt.FORCE_COLOR==="false"?Do=0:Do=Mt.FORCE_COLOR.length===0?1:Math.min(parseInt(Mt.FORCE_COLOR,10),3));function tw(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}a(tw,"translateLevel");function rw(e,t){if(Do===0)return 0;if(Fr("color=16m")||Fr("color=full")||Fr("color=truecolor"))return 3;if(Fr("color=256"))return 2;if(e&&!t&&Do===void 0)return 0;let n=Do||0;if(Mt.TERM==="dumb")return n;if(process.platform==="win32"){let o=K6.release().split(".");return Number(o[0])>=10&&Number(o[2])>=10586?Number(o[2])>=14931?3:2:1}if("CI"in Mt)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(o=>o in Mt)||Mt.CI_NAME==="codeship"?1:n;if("TEAMCITY_VERSION"in Mt)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Mt.TEAMCITY_VERSION)?1:0;if(Mt.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in Mt){let o=parseInt((Mt.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Mt.TERM_PROGRAM){case"iTerm.app":return o>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Mt.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Mt.TERM)||"COLORTERM"in Mt?1:n}a(rw,"supportsColor");function J6(e){let t=rw(e,e&&e.isTTY);return tw(t)}a(J6,"getSupportLevel");R0.exports={supportsColor:J6,stdout:tw(rw(!0,A0.isatty(1))),stderr:tw(rw(!0,A0.isatty(2)))}});var $0=j((Ft,Uf)=>{var X6=require("tty"),zf=require("util");Ft.init=o2;Ft.log=t2;Ft.formatArgs=Q6;Ft.save=r2;Ft.load=n2;Ft.useColors=Y6;Ft.destroy=zf.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 e=D0();e&&(e.stderr||e).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(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 Y6(){return"colors"in Ft.inspectOpts?!!Ft.inspectOpts.colors:X6.isatty(process.stderr.fd)}a(Y6,"useColors");function Q6(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
- `+i),e.push(r+"m+"+Uf.exports.humanize(this.diff)+"\x1B[0m")}else e[0]=Q6()+t+" "+e[0]}a(Y6,"formatArgs");function Q6(){return Ft.inspectOpts.hideDate?"":new Date().toISOString()+" "}a(Q6,"getDate");function e2(...e){return process.stderr.write(zf.formatWithOptions(Ft.inspectOpts,...e)+`
6
- `)}a(e2,"log");function t2(e){e?process.env.DEBUG=e:delete process.env.DEBUG}a(t2,"save");function r2(){return process.env.DEBUG}a(r2,"load");function n2(e){e.inspectOpts={};let t=Object.keys(Ft.inspectOpts);for(let n=0;n<t.length;n++)e.inspectOpts[t[n]]=Ft.inspectOpts[t[n]]}a(n2,"init");Uf.exports=ew()(Ft);var{formatters:O0}=Uf.exports;O0.o=function(e){return this.inspectOpts.colors=this.useColors,zf.inspect(e,this.inspectOpts).split(`
7
- `).map(t=>t.trim()).join(" ")};O0.O=function(e){return this.inspectOpts.colors=this.useColors,zf.inspect(e,this.inspectOpts)}});var ow=j((Mse,nw)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?nw.exports=S0():nw.exports=$0()});var k0=j(lr=>{"use strict";var o2=lr&&lr.__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]})),i2=lr&&lr.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),C0=lr&&lr.__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)&&o2(t,e,n);return i2(t,e),t};Object.defineProperty(lr,"__esModule",{value:!0});lr.req=lr.json=lr.toBuffer=void 0;var a2=C0(require("http")),s2=C0(require("https"));async function N0(e){let t=0,n=[];for await(let o of e)t+=o.length,n.push(o);return Buffer.concat(n,t)}a(N0,"toBuffer");lr.toBuffer=N0;async function c2(e){let n=(await N0(e)).toString("utf8");try{return JSON.parse(n)}catch(o){let r=o;throw r.message+=` (input: ${n})`,r}}a(c2,"json");lr.json=c2;function u2(e,t={}){let o=((typeof e=="string"?e:e.href).startsWith("https:")?s2:a2).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(u2,"req");lr.req=u2});var F0=j(wr=>{"use strict";var U0=wr&&wr.__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]})),l2=wr&&wr.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),M0=wr&&wr.__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)&&U0(t,e,n);return l2(t,e),t},d2=wr&&wr.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&U0(t,e,n)};Object.defineProperty(wr,"__esModule",{value:!0});wr.Agent=void 0;var p2=M0(require("net")),z0=M0(require("http")),f2=require("https");d2(k0(),wr);var hn=Symbol("AgentBaseInternalState"),iw=class extends z0.Agent{static{a(this,"Agent")}constructor(t){super(t),this[hn]={}}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 p2.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)?f2.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 z0.Agent)try{return u.addRequest(t,r)}catch(h){return o(h)}this[hn].currentSocket=u,super.createSocket(t,n,o)},u=>{this.decrementSockets(i,s),o(u)})}createConnection(){let t=this[hn].currentSocket;if(this[hn].currentSocket=void 0,!t)throw new Error("No socket was returned in the `connect()` function");return t}get defaultPort(){return this[hn].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(t){this[hn]&&(this[hn].defaultPort=t)}get protocol(){return this[hn].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(t){this[hn]&&(this[hn].protocol=t)}};wr.Agent=iw});var L0=j(Ma=>{"use strict";var m2=Ma&&Ma.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ma,"__esModule",{value:!0});Ma.parseProxyResponse=void 0;var h2=m2(ow()),Mf=(0,h2.default)("https-proxy-agent:parse-proxy-response");function g2(e){return new Promise((t,n)=>{let o=0,r=[];function i(){let y=e.read();y?g(y):e.once("readable",i)}a(i,"read");function s(){e.removeListener("end",u),e.removeListener("error",h),e.removeListener("readable",i)}a(s,"cleanup");function u(){s(),Mf("onend"),n(new Error("Proxy connection ended before receiving CONNECT response"))}a(u,"onend");function h(y){s(),Mf("onerror %o",y),n(y)}a(h,"onerror");function g(y){r.push(y),o+=y.length;let T=Buffer.concat(r,o),b=T.indexOf(`\r
5
+ `+i),e.push(r+"m+"+Uf.exports.humanize(this.diff)+"\x1B[0m")}else e[0]=e2()+t+" "+e[0]}a(Q6,"formatArgs");function e2(){return Ft.inspectOpts.hideDate?"":new Date().toISOString()+" "}a(e2,"getDate");function t2(...e){return process.stderr.write(zf.formatWithOptions(Ft.inspectOpts,...e)+`
6
+ `)}a(t2,"log");function r2(e){e?process.env.DEBUG=e:delete process.env.DEBUG}a(r2,"save");function n2(){return process.env.DEBUG}a(n2,"load");function o2(e){e.inspectOpts={};let t=Object.keys(Ft.inspectOpts);for(let n=0;n<t.length;n++)e.inspectOpts[t[n]]=Ft.inspectOpts[t[n]]}a(o2,"init");Uf.exports=ew()(Ft);var{formatters:O0}=Uf.exports;O0.o=function(e){return this.inspectOpts.colors=this.useColors,zf.inspect(e,this.inspectOpts).split(`
7
+ `).map(t=>t.trim()).join(" ")};O0.O=function(e){return this.inspectOpts.colors=this.useColors,zf.inspect(e,this.inspectOpts)}});var ow=j((Lse,nw)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?nw.exports=S0():nw.exports=$0()});var k0=j(lr=>{"use strict";var i2=lr&&lr.__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]})),a2=lr&&lr.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),C0=lr&&lr.__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)&&i2(t,e,n);return a2(t,e),t};Object.defineProperty(lr,"__esModule",{value:!0});lr.req=lr.json=lr.toBuffer=void 0;var s2=C0(require("http")),c2=C0(require("https"));async function N0(e){let t=0,n=[];for await(let o of e)t+=o.length,n.push(o);return Buffer.concat(n,t)}a(N0,"toBuffer");lr.toBuffer=N0;async function u2(e){let n=(await N0(e)).toString("utf8");try{return JSON.parse(n)}catch(o){let r=o;throw r.message+=` (input: ${n})`,r}}a(u2,"json");lr.json=u2;function l2(e,t={}){let o=((typeof e=="string"?e:e.href).startsWith("https:")?c2:s2).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(l2,"req");lr.req=l2});var F0=j(wr=>{"use strict";var U0=wr&&wr.__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]})),d2=wr&&wr.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),M0=wr&&wr.__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)&&U0(t,e,n);return d2(t,e),t},p2=wr&&wr.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&U0(t,e,n)};Object.defineProperty(wr,"__esModule",{value:!0});wr.Agent=void 0;var f2=M0(require("net")),z0=M0(require("http")),m2=require("https");p2(k0(),wr);var hn=Symbol("AgentBaseInternalState"),iw=class extends z0.Agent{static{a(this,"Agent")}constructor(t){super(t),this[hn]={}}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 f2.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)?m2.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 z0.Agent)try{return u.addRequest(t,r)}catch(h){return o(h)}this[hn].currentSocket=u,super.createSocket(t,n,o)},u=>{this.decrementSockets(i,s),o(u)})}createConnection(){let t=this[hn].currentSocket;if(this[hn].currentSocket=void 0,!t)throw new Error("No socket was returned in the `connect()` function");return t}get defaultPort(){return this[hn].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(t){this[hn]&&(this[hn].defaultPort=t)}get protocol(){return this[hn].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(t){this[hn]&&(this[hn].protocol=t)}};wr.Agent=iw});var L0=j(Ma=>{"use strict";var h2=Ma&&Ma.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ma,"__esModule",{value:!0});Ma.parseProxyResponse=void 0;var g2=h2(ow()),Mf=(0,g2.default)("https-proxy-agent:parse-proxy-response");function y2(e){return new Promise((t,n)=>{let o=0,r=[];function i(){let y=e.read();y?g(y):e.once("readable",i)}a(i,"read");function s(){e.removeListener("end",u),e.removeListener("error",h),e.removeListener("readable",i)}a(s,"cleanup");function u(){s(),Mf("onend"),n(new Error("Proxy connection ended before receiving CONNECT response"))}a(u,"onend");function h(y){s(),Mf("onerror %o",y),n(y)}a(h,"onerror");function g(y){r.push(y),o+=y.length;let T=Buffer.concat(r,o),b=T.indexOf(`\r
9
9
  \r
10
10
  `);if(b===-1){Mf("have not received end of HTTP headers yet..."),i();return}let P=T.slice(0,b).toString("ascii").split(`\r
11
- `),S=P.shift();if(!S)return e.destroy(),n(new Error("No header received from proxy CONNECT response"));let R=S.split(" "),I=+R[1],l=R.slice(2).join(" "),m={};for(let d of P){if(!d)continue;let v=d.indexOf(":");if(v===-1)return e.destroy(),n(new Error(`Invalid header from proxy CONNECT response: "${d}"`));let p=d.slice(0,v).toLowerCase(),E=d.slice(v+1).trimStart(),_=m[p];typeof _=="string"?m[p]=[_,E]:Array.isArray(_)?_.push(E):m[p]=E}Mf("got proxy server response: %o %o",S,m),s(),t({connect:{statusCode:I,statusText:l,headers:m},buffered:T})}a(g,"ondata"),e.on("error",h),e.on("end",u),i()})}a(g2,"parseProxyResponse");Ma.parseProxyResponse=g2});var H0=j(Lr=>{"use strict";var y2=Lr&&Lr.__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]})),v2=Lr&&Lr.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),V0=Lr&&Lr.__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)&&y2(t,e,n);return v2(t,e),t},G0=Lr&&Lr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Lr,"__esModule",{value:!0});Lr.HttpsProxyAgent=void 0;var Ff=V0(require("net")),j0=V0(require("tls")),_2=G0(require("assert")),P2=G0(ow()),w2=F0(),b2=require("url"),T2=L0(),Su=(0,P2.default)("https-proxy-agent"),q0=a(e=>e.servername===void 0&&e.host&&!Ff.isIP(e.host)?{...e,servername:e.host}:e,"setServernameFromNonIpHost"),Lf=class extends w2.Agent{static{a(this,"HttpsProxyAgent")}constructor(t,n){super(n),this.options={path:void 0},this.proxy=typeof t=="string"?new b2.URL(t):t,this.proxyHeaders=n?.headers??{},Su("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?B0(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:"?(Su("Creating `tls.Socket`: %o",this.connectOpts),r=j0.connect(q0(this.connectOpts))):(Su("Creating `net.Socket`: %o",this.connectOpts),r=Ff.connect(this.connectOpts));let i=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders},s=Ff.isIPv6(n.host)?`[${n.host}]`:n.host,u=`CONNECT ${s}:${n.port} HTTP/1.1\r
11
+ `),S=P.shift();if(!S)return e.destroy(),n(new Error("No header received from proxy CONNECT response"));let R=S.split(" "),I=+R[1],l=R.slice(2).join(" "),m={};for(let d of P){if(!d)continue;let v=d.indexOf(":");if(v===-1)return e.destroy(),n(new Error(`Invalid header from proxy CONNECT response: "${d}"`));let p=d.slice(0,v).toLowerCase(),E=d.slice(v+1).trimStart(),_=m[p];typeof _=="string"?m[p]=[_,E]:Array.isArray(_)?_.push(E):m[p]=E}Mf("got proxy server response: %o %o",S,m),s(),t({connect:{statusCode:I,statusText:l,headers:m},buffered:T})}a(g,"ondata"),e.on("error",h),e.on("end",u),i()})}a(y2,"parseProxyResponse");Ma.parseProxyResponse=y2});var H0=j(Lr=>{"use strict";var v2=Lr&&Lr.__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]})),_2=Lr&&Lr.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),V0=Lr&&Lr.__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)&&v2(t,e,n);return _2(t,e),t},G0=Lr&&Lr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Lr,"__esModule",{value:!0});Lr.HttpsProxyAgent=void 0;var Ff=V0(require("net")),j0=V0(require("tls")),P2=G0(require("assert")),w2=G0(ow()),b2=F0(),T2=require("url"),E2=L0(),Su=(0,w2.default)("https-proxy-agent"),q0=a(e=>e.servername===void 0&&e.host&&!Ff.isIP(e.host)?{...e,servername:e.host}:e,"setServernameFromNonIpHost"),Lf=class extends b2.Agent{static{a(this,"HttpsProxyAgent")}constructor(t,n){super(n),this.options={path:void 0},this.proxy=typeof t=="string"?new T2.URL(t):t,this.proxyHeaders=n?.headers??{},Su("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?B0(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:"?(Su("Creating `tls.Socket`: %o",this.connectOpts),r=j0.connect(q0(this.connectOpts))):(Su("Creating `net.Socket`: %o",this.connectOpts),r=Ff.connect(this.connectOpts));let i=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders},s=Ff.isIPv6(n.host)?`[${n.host}]`:n.host,u=`CONNECT ${s}:${n.port} HTTP/1.1\r
12
12
  `;if(o.username||o.password){let b=`${decodeURIComponent(o.username)}:${decodeURIComponent(o.password)}`;i["Proxy-Authorization"]=`Basic ${Buffer.from(b).toString("base64")}`}i.Host=`${s}:${n.port}`,i["Proxy-Connection"]||(i["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let b of Object.keys(i))u+=`${b}: ${i[b]}\r
13
- `;let h=(0,T2.parseProxyResponse)(r);r.write(`${u}\r
14
- `);let{connect:g,buffered:y}=await h;if(t.emit("proxyConnect",g),this.emit("proxyConnect",g,t),g.statusCode===200)return t.once("socket",E2),n.secureEndpoint?(Su("Upgrading socket connection to TLS"),j0.connect({...B0(q0(n),"host","path","port"),socket:r})):r;r.destroy();let T=new Ff.Socket({writable:!1});return T.readable=!0,t.once("socket",b=>{Su("Replaying proxy buffer for failed request"),(0,_2.default)(b.listenerCount("data")>0),b.push(y),b.push(null)}),T}};Lf.protocols=["http","https"];Lr.HttpsProxyAgent=Lf;function E2(e){e.resume()}a(E2,"resume");function B0(e,...t){let n={},o;for(o in e)t.includes(o)||(n[o]=e[o]);return n}a(B0,"omit")});function S2(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 y=1;y<n.length;y++)n[y]==="base64"?r=!0:n[y]&&(s+=`;${n[y]}`,n[y].indexOf("charset=")===0&&(o=n[y].substring(8)));!n[0]&&!o.length&&(s+=";charset=US-ASCII",o="US-ASCII");let u=r?"base64":"ascii",h=unescape(e.substring(t+1)),g=Buffer.from(h,u);return g.type=i,g.typeFull=s,g.charset=o,g}var Z0,W0=Ct(()=>{a(S2,"dataUriToBuffer");Z0=S2});var J0=j((jf,K0)=>{(function(e,t){typeof jf=="object"&&typeof K0<"u"?t(jf):typeof define=="function"&&define.amd?define(["exports"],t):(e=typeof globalThis<"u"?globalThis:e||self,t(e.WebStreamsPolyfill={}))})(jf,(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,f){try{Object.defineProperty(c,"name",{value:f,configurable:!0})}catch{}}a(r,"setFunctionName");let i=Promise,s=Promise.prototype.then,u=Promise.reject.bind(i);function h(c){return new i(c)}a(h,"newPromise");function g(c){return h(f=>f(c))}a(g,"promiseResolvedWith");function y(c){return u(c)}a(y,"promiseRejectedWith");function T(c,f,w){return s.call(c,f,w)}a(T,"PerformPromiseThen");function b(c,f,w){T(T(c,f,w),void 0,o)}a(b,"uponPromise");function P(c,f){b(c,f)}a(P,"uponFulfillment");function S(c,f){b(c,void 0,f)}a(S,"uponRejection");function R(c,f,w){return T(c,f,w)}a(R,"transformPromiseWith");function I(c){T(c,void 0,o)}a(I,"setPromiseIsHandledToTrue");let l=a(c=>{if(typeof queueMicrotask=="function")l=queueMicrotask;else{let f=g(void 0);l=a(w=>T(f,w),"_queueMicrotask")}return l(c)},"_queueMicrotask");function m(c,f,w){if(typeof c!="function")throw new TypeError("Argument is not a function");return Function.prototype.apply.call(c,f,w)}a(m,"reflectCall");function d(c,f,w){try{return g(m(c,f,w))}catch(D){return y(D)}}a(d,"promiseCall");let v=16384;class p{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(f){let w=this._back,D=w;w._elements.length===v-1&&(D={_elements:[],_next:void 0}),w._elements.push(f),D!==w&&(this._back=D,w._next=D),++this._size}shift(){let f=this._front,w=f,D=this._cursor,k=D+1,H=f._elements,X=H[D];return k===v&&(w=f._next,k=0),--this._size,this._cursor=k,f!==w&&(this._front=w),H[D]=void 0,X}forEach(f){let w=this._cursor,D=this._front,k=D._elements;for(;(w!==k.length||D._next!==void 0)&&!(w===k.length&&(D=D._next,k=D._elements,w=0,k.length===0));)f(k[w]),++w}peek(){let f=this._front,w=this._cursor;return f._elements[w]}}let E=Symbol("[[AbortSteps]]"),_=Symbol("[[ErrorSteps]]"),pe=Symbol("[[CancelSteps]]"),oe=Symbol("[[PullSteps]]"),Be=Symbol("[[ReleaseSteps]]");function me(c,f){c._ownerReadableStream=f,f._reader=c,f._state==="readable"?ne(c):f._state==="closed"?_e(c):ge(c,f._storedError)}a(me,"ReadableStreamReaderGenericInitialize");function ee(c,f){let w=c._ownerReadableStream;return Zr(w,f)}a(ee,"ReadableStreamReaderGenericCancel");function Q(c){let f=c._ownerReadableStream;f._state==="readable"?Fe(c,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):Ve(c,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")),f._readableStreamController[Be](),f._reader=void 0,c._ownerReadableStream=void 0}a(Q,"ReadableStreamReaderGenericRelease");function se(c){return new TypeError("Cannot "+c+" a stream using a released reader")}a(se,"readerLockException");function ne(c){c._closedPromise=h((f,w)=>{c._closedPromise_resolve=f,c._closedPromise_reject=w})}a(ne,"defaultReaderClosedPromiseInitialize");function ge(c,f){ne(c),Fe(c,f)}a(ge,"defaultReaderClosedPromiseInitializeAsRejected");function _e(c){ne(c),nt(c)}a(_e,"defaultReaderClosedPromiseInitializeAsResolved");function Fe(c,f){c._closedPromise_reject!==void 0&&(I(c._closedPromise),c._closedPromise_reject(f),c._closedPromise_resolve=void 0,c._closedPromise_reject=void 0)}a(Fe,"defaultReaderClosedPromiseReject");function Ve(c,f){ge(c,f)}a(Ve,"defaultReaderClosedPromiseResetToRejected");function nt(c){c._closedPromise_resolve!==void 0&&(c._closedPromise_resolve(void 0),c._closedPromise_resolve=void 0,c._closedPromise_reject=void 0)}a(nt,"defaultReaderClosedPromiseResolve");let ut=Number.isFinite||function(c){return typeof c=="number"&&isFinite(c)},$t=Math.trunc||function(c){return c<0?Math.ceil(c):Math.floor(c)};function le(c){return typeof c=="object"||typeof c=="function"}a(le,"isDictionary");function Pt(c,f){if(c!==void 0&&!le(c))throw new TypeError(`${f} is not an object.`)}a(Pt,"assertDictionary");function Tt(c,f){if(typeof c!="function")throw new TypeError(`${f} is not a function.`)}a(Tt,"assertFunction");function mr(c){return typeof c=="object"&&c!==null||typeof c=="function"}a(mr,"isObject");function et(c,f){if(!mr(c))throw new TypeError(`${f} is not an object.`)}a(et,"assertObject");function ot(c,f,w){if(c===void 0)throw new TypeError(`Parameter ${f} is required in '${w}'.`)}a(ot,"assertRequiredArgument");function A(c,f,w){if(c===void 0)throw new TypeError(`${f} is required in '${w}'.`)}a(A,"assertRequiredField");function O(c){return Number(c)}a(O,"convertUnrestrictedDouble");function C(c){return c===0?0:c}a(C,"censorNegativeZero");function B(c){return C($t(c))}a(B,"integerPart");function U(c,f){let D=Number.MAX_SAFE_INTEGER,k=Number(c);if(k=C(k),!ut(k))throw new TypeError(`${f} is not a finite number`);if(k=B(k),k<0||k>D)throw new TypeError(`${f} is outside the accepted range of 0 to ${D}, inclusive`);return!ut(k)||k===0?0:k}a(U,"convertUnsignedLongLongWithEnforceRange");function L(c,f){if(!ao(c))throw new TypeError(`${f} is not a ReadableStream.`)}a(L,"assertReadableStream");function Z(c){return new te(c)}a(Z,"AcquireReadableStreamDefaultReader");function z(c,f){c._reader._readRequests.push(f)}a(z,"ReadableStreamAddReadRequest");function F(c,f,w){let k=c._reader._readRequests.shift();w?k._closeSteps():k._chunkSteps(f)}a(F,"ReadableStreamFulfillReadRequest");function G(c){return c._reader._readRequests.length}a(G,"ReadableStreamGetNumReadRequests");function q(c){let f=c._reader;return!(f===void 0||!Pe(f))}a(q,"ReadableStreamHasDefaultReader");class te{static{a(this,"ReadableStreamDefaultReader")}constructor(f){if(ot(f,1,"ReadableStreamDefaultReader"),L(f,"First parameter"),so(f))throw new TypeError("This stream has already been locked for exclusive reading by another reader");me(this,f),this._readRequests=new p}get closed(){return Pe(this)?this._closedPromise:y(mt("closed"))}cancel(f=void 0){return Pe(this)?this._ownerReadableStream===void 0?y(se("cancel")):ee(this,f):y(mt("cancel"))}read(){if(!Pe(this))return y(mt("read"));if(this._ownerReadableStream===void 0)return y(se("read from"));let f,w,D=h((H,X)=>{f=H,w=X});return be(this,{_chunkSteps:a(H=>f({value:H,done:!1}),"_chunkSteps"),_closeSteps:a(()=>f({value:void 0,done:!0}),"_closeSteps"),_errorSteps:a(H=>w(H),"_errorSteps")}),D}releaseLock(){if(!Pe(this))throw mt("releaseLock");this._ownerReadableStream!==void 0&&Xe(this)}}Object.defineProperties(te.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),r(te.prototype.cancel,"cancel"),r(te.prototype.read,"read"),r(te.prototype.releaseLock,"releaseLock"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(te.prototype,Symbol.toStringTag,{value:"ReadableStreamDefaultReader",configurable:!0});function Pe(c){return!n(c)||!Object.prototype.hasOwnProperty.call(c,"_readRequests")?!1:c instanceof te}a(Pe,"IsReadableStreamDefaultReader");function be(c,f){let w=c._ownerReadableStream;w._disturbed=!0,w._state==="closed"?f._closeSteps():w._state==="errored"?f._errorSteps(w._storedError):w._readableStreamController[oe](f)}a(be,"ReadableStreamDefaultReaderRead");function Xe(c){Q(c);let f=new TypeError("Reader was released");ft(c,f)}a(Xe,"ReadableStreamDefaultReaderRelease");function ft(c,f){let w=c._readRequests;c._readRequests=new p,w.forEach(D=>{D._errorSteps(f)})}a(ft,"ReadableStreamDefaultReaderErrorReadRequests");function mt(c){return new TypeError(`ReadableStreamDefaultReader.prototype.${c} can only be used on a ReadableStreamDefaultReader`)}a(mt,"defaultReaderBrandCheckException");let Ke=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);class Qe{static{a(this,"ReadableStreamAsyncIteratorImpl")}constructor(f,w){this._ongoingPromise=void 0,this._isFinished=!1,this._reader=f,this._preventCancel=w}next(){let f=a(()=>this._nextSteps(),"nextSteps");return this._ongoingPromise=this._ongoingPromise?R(this._ongoingPromise,f,f):f(),this._ongoingPromise}return(f){let w=a(()=>this._returnSteps(f),"returnSteps");return this._ongoingPromise?R(this._ongoingPromise,w,w):w()}_nextSteps(){if(this._isFinished)return Promise.resolve({value:void 0,done:!0});let f=this._reader,w,D,k=h((X,ve)=>{w=X,D=ve});return be(f,{_chunkSteps:a(X=>{this._ongoingPromise=void 0,l(()=>w({value:X,done:!1}))},"_chunkSteps"),_closeSteps:a(()=>{this._ongoingPromise=void 0,this._isFinished=!0,Q(f),w({value:void 0,done:!0})},"_closeSteps"),_errorSteps:a(X=>{this._ongoingPromise=void 0,this._isFinished=!0,Q(f),D(X)},"_errorSteps")}),k}_returnSteps(f){if(this._isFinished)return Promise.resolve({value:f,done:!0});this._isFinished=!0;let w=this._reader;if(!this._preventCancel){let D=ee(w,f);return Q(w),R(D,()=>({value:f,done:!0}))}return Q(w),g({value:f,done:!0})}}let At={next(){return Ci(this)?this._asyncIteratorImpl.next():y(Ni("next"))},return(c){return Ci(this)?this._asyncIteratorImpl.return(c):y(Ni("return"))}};Object.setPrototypeOf(At,Ke);function $i(c,f){let w=Z(c),D=new Qe(w,f),k=Object.create(At);return k._asyncIteratorImpl=D,k}a($i,"AcquireReadableStreamAsyncIterator");function Ci(c){if(!n(c)||!Object.prototype.hasOwnProperty.call(c,"_asyncIteratorImpl"))return!1;try{return c._asyncIteratorImpl instanceof Qe}catch{return!1}}a(Ci,"IsReadableStreamAsyncIterator");function Ni(c){return new TypeError(`ReadableStreamAsyncIterator.${c} can only be used on a ReadableSteamAsyncIterator`)}a(Ni,"streamAsyncIteratorBrandCheckException");let hr=Number.isNaN||function(c){return c!==c};var Dn,Bt,Rt;function it(c){return c.slice()}a(it,"CreateArrayFromList");function QT(c,f,w,D,k){new Uint8Array(c).set(new Uint8Array(w,D,k),f)}a(QT,"CopyDataBlockBytes");let On=a(c=>(typeof c.transfer=="function"?On=a(f=>f.transfer(),"TransferArrayBuffer"):typeof structuredClone=="function"?On=a(f=>structuredClone(f,{transfer:[f]}),"TransferArrayBuffer"):On=a(f=>f,"TransferArrayBuffer"),On(c)),"TransferArrayBuffer"),ro=a(c=>(typeof c.detached=="boolean"?ro=a(f=>f.detached,"IsDetachedBuffer"):ro=a(f=>f.byteLength===0,"IsDetachedBuffer"),ro(c)),"IsDetachedBuffer");function eE(c,f,w){if(c.slice)return c.slice(f,w);let D=w-f,k=new ArrayBuffer(D);return QT(k,0,c,f,D),k}a(eE,"ArrayBufferSlice");function gl(c,f){let w=c[f];if(w!=null){if(typeof w!="function")throw new TypeError(`${String(f)} is not a function`);return w}}a(gl,"GetMethod");function QM(c){let f={[Symbol.iterator]:()=>c.iterator},w=(async function*(){return yield*f})(),D=w.next;return{iterator:w,nextMethod:D,done:!1}}a(QM,"CreateAsyncFromSyncIterator");let wh=(Rt=(Dn=Symbol.asyncIterator)!==null&&Dn!==void 0?Dn:(Bt=Symbol.for)===null||Bt===void 0?void 0:Bt.call(Symbol,"Symbol.asyncIterator"))!==null&&Rt!==void 0?Rt:"@@asyncIterator";function tE(c,f="sync",w){if(w===void 0)if(f==="async"){if(w=gl(c,wh),w===void 0){let H=gl(c,Symbol.iterator),X=tE(c,"sync",H);return QM(X)}}else w=gl(c,Symbol.iterator);if(w===void 0)throw new TypeError("The object is not iterable");let D=m(w,c,[]);if(!n(D))throw new TypeError("The iterator method must return an object");let k=D.next;return{iterator:D,nextMethod:k,done:!1}}a(tE,"GetIterator");function eF(c){let f=m(c.nextMethod,c.iterator,[]);if(!n(f))throw new TypeError("The iterator.next() method must return an object");return f}a(eF,"IteratorNext");function tF(c){return!!c.done}a(tF,"IteratorComplete");function rF(c){return c.value}a(rF,"IteratorValue");function nF(c){return!(typeof c!="number"||hr(c)||c<0)}a(nF,"IsNonNegativeNumber");function rE(c){let f=eE(c.buffer,c.byteOffset,c.byteOffset+c.byteLength);return new Uint8Array(f)}a(rE,"CloneAsUint8Array");function bh(c){let f=c._queue.shift();return c._queueTotalSize-=f.size,c._queueTotalSize<0&&(c._queueTotalSize=0),f.value}a(bh,"DequeueValue");function Th(c,f,w){if(!nF(w)||w===1/0)throw new RangeError("Size must be a finite, non-NaN, non-negative number.");c._queue.push({value:f,size:w}),c._queueTotalSize+=w}a(Th,"EnqueueValueWithSize");function oF(c){return c._queue.peek().value}a(oF,"PeekQueueValue");function no(c){c._queue=new p,c._queueTotalSize=0}a(no,"ResetQueue");function nE(c){return c===DataView}a(nE,"isDataViewConstructor");function iF(c){return nE(c.constructor)}a(iF,"isDataView");function aF(c){return nE(c)?1:c.BYTES_PER_ELEMENT}a(aF,"arrayBufferViewElementSize");class Lo{static{a(this,"ReadableStreamBYOBRequest")}constructor(){throw new TypeError("Illegal constructor")}get view(){if(!Eh(this))throw Rh("view");return this._view}respond(f){if(!Eh(this))throw Rh("respond");if(ot(f,1,"respond"),f=U(f,"First parameter"),this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");if(ro(this._view.buffer))throw new TypeError("The BYOB request's buffer has been detached and so cannot be used as a response");Pl(this._associatedReadableByteStreamController,f)}respondWithNewView(f){if(!Eh(this))throw Rh("respondWithNewView");if(ot(f,1,"respondWithNewView"),!ArrayBuffer.isView(f))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(ro(f.buffer))throw new TypeError("The given view's buffer has been detached and so cannot be used as a response");wl(this._associatedReadableByteStreamController,f)}}Object.defineProperties(Lo.prototype,{respond:{enumerable:!0},respondWithNewView:{enumerable:!0},view:{enumerable:!0}}),r(Lo.prototype.respond,"respond"),r(Lo.prototype.respondWithNewView,"respondWithNewView"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Lo.prototype,Symbol.toStringTag,{value:"ReadableStreamBYOBRequest",configurable:!0});class $n{static{a(this,"ReadableByteStreamController")}constructor(){throw new TypeError("Illegal constructor")}get byobRequest(){if(!jo(this))throw ds("byobRequest");return Ah(this)}get desiredSize(){if(!jo(this))throw ds("desiredSize");return fE(this)}close(){if(!jo(this))throw ds("close");if(this._closeRequested)throw new TypeError("The stream has already been closed; do not close it again!");let f=this._controlledReadableByteStream._state;if(f!=="readable")throw new TypeError(`The stream (in ${f} state) is not in the readable state and cannot be closed`);ls(this)}enqueue(f){if(!jo(this))throw ds("enqueue");if(ot(f,1,"enqueue"),!ArrayBuffer.isView(f))throw new TypeError("chunk must be an array buffer view");if(f.byteLength===0)throw new TypeError("chunk must have non-zero byteLength");if(f.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 w=this._controlledReadableByteStream._state;if(w!=="readable")throw new TypeError(`The stream (in ${w} state) is not in the readable state and cannot be enqueued to`);_l(this,f)}error(f=void 0){if(!jo(this))throw ds("error");Cr(this,f)}[pe](f){oE(this),no(this);let w=this._cancelAlgorithm(f);return vl(this),w}[oe](f){let w=this._controlledReadableByteStream;if(this._queueTotalSize>0){pE(this,f);return}let D=this._autoAllocateChunkSize;if(D!==void 0){let k;try{k=new ArrayBuffer(D)}catch(X){f._errorSteps(X);return}let H={buffer:k,bufferByteLength:D,byteOffset:0,byteLength:D,bytesFilled:0,minimumFill:1,elementSize:1,viewConstructor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(H)}z(w,f),qo(this)}[Be](){if(this._pendingPullIntos.length>0){let f=this._pendingPullIntos.peek();f.readerType="none",this._pendingPullIntos=new p,this._pendingPullIntos.push(f)}}}Object.defineProperties($n.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},byobRequest:{enumerable:!0},desiredSize:{enumerable:!0}}),r($n.prototype.close,"close"),r($n.prototype.enqueue,"enqueue"),r($n.prototype.error,"error"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty($n.prototype,Symbol.toStringTag,{value:"ReadableByteStreamController",configurable:!0});function jo(c){return!n(c)||!Object.prototype.hasOwnProperty.call(c,"_controlledReadableByteStream")?!1:c instanceof $n}a(jo,"IsReadableByteStreamController");function Eh(c){return!n(c)||!Object.prototype.hasOwnProperty.call(c,"_associatedReadableByteStreamController")?!1:c instanceof Lo}a(Eh,"IsReadableStreamBYOBRequest");function qo(c){if(!dF(c))return;if(c._pulling){c._pullAgain=!0;return}c._pulling=!0;let w=c._pullAlgorithm();b(w,()=>(c._pulling=!1,c._pullAgain&&(c._pullAgain=!1,qo(c)),null),D=>(Cr(c,D),null))}a(qo,"ReadableByteStreamControllerCallPullIfNeeded");function oE(c){xh(c),c._pendingPullIntos=new p}a(oE,"ReadableByteStreamControllerClearPendingPullIntos");function Sh(c,f){let w=!1;c._state==="closed"&&(w=!0);let D=iE(f);f.readerType==="default"?F(c,D,w):yF(c,D,w)}a(Sh,"ReadableByteStreamControllerCommitPullIntoDescriptor");function iE(c){let f=c.bytesFilled,w=c.elementSize;return new c.viewConstructor(c.buffer,c.byteOffset,f/w)}a(iE,"ReadableByteStreamControllerConvertPullIntoDescriptor");function yl(c,f,w,D){c._queue.push({buffer:f,byteOffset:w,byteLength:D}),c._queueTotalSize+=D}a(yl,"ReadableByteStreamControllerEnqueueChunkToQueue");function aE(c,f,w,D){let k;try{k=eE(f,w,w+D)}catch(H){throw Cr(c,H),H}yl(c,k,0,D)}a(aE,"ReadableByteStreamControllerEnqueueClonedChunkToQueue");function sE(c,f){f.bytesFilled>0&&aE(c,f.buffer,f.byteOffset,f.bytesFilled),ki(c)}a(sE,"ReadableByteStreamControllerEnqueueDetachedPullIntoToQueue");function cE(c,f){let w=Math.min(c._queueTotalSize,f.byteLength-f.bytesFilled),D=f.bytesFilled+w,k=w,H=!1,X=D%f.elementSize,ve=D-X;ve>=f.minimumFill&&(k=ve-f.bytesFilled,H=!0);let Oe=c._queue;for(;k>0;){let Te=Oe.peek(),Ue=Math.min(k,Te.byteLength),Ge=f.byteOffset+f.bytesFilled;QT(f.buffer,Ge,Te.buffer,Te.byteOffset,Ue),Te.byteLength===Ue?Oe.shift():(Te.byteOffset+=Ue,Te.byteLength-=Ue),c._queueTotalSize-=Ue,uE(c,Ue,f),k-=Ue}return H}a(cE,"ReadableByteStreamControllerFillPullIntoDescriptorFromQueue");function uE(c,f,w){w.bytesFilled+=f}a(uE,"ReadableByteStreamControllerFillHeadPullIntoDescriptor");function lE(c){c._queueTotalSize===0&&c._closeRequested?(vl(c),ys(c._controlledReadableByteStream)):qo(c)}a(lE,"ReadableByteStreamControllerHandleQueueDrain");function xh(c){c._byobRequest!==null&&(c._byobRequest._associatedReadableByteStreamController=void 0,c._byobRequest._view=null,c._byobRequest=null)}a(xh,"ReadableByteStreamControllerInvalidateBYOBRequest");function Ih(c){for(;c._pendingPullIntos.length>0;){if(c._queueTotalSize===0)return;let f=c._pendingPullIntos.peek();cE(c,f)&&(ki(c),Sh(c._controlledReadableByteStream,f))}}a(Ih,"ReadableByteStreamControllerProcessPullIntoDescriptorsUsingQueue");function sF(c){let f=c._controlledReadableByteStream._reader;for(;f._readRequests.length>0;){if(c._queueTotalSize===0)return;let w=f._readRequests.shift();pE(c,w)}}a(sF,"ReadableByteStreamControllerProcessReadRequestsUsingQueue");function cF(c,f,w,D){let k=c._controlledReadableByteStream,H=f.constructor,X=aF(H),{byteOffset:ve,byteLength:Oe}=f,Te=w*X,Ue;try{Ue=On(f.buffer)}catch(lt){D._errorSteps(lt);return}let Ge={buffer:Ue,bufferByteLength:Ue.byteLength,byteOffset:ve,byteLength:Oe,bytesFilled:0,minimumFill:Te,elementSize:X,viewConstructor:H,readerType:"byob"};if(c._pendingPullIntos.length>0){c._pendingPullIntos.push(Ge),gE(k,D);return}if(k._state==="closed"){let lt=new H(Ge.buffer,Ge.byteOffset,0);D._closeSteps(lt);return}if(c._queueTotalSize>0){if(cE(c,Ge)){let lt=iE(Ge);lE(c),D._chunkSteps(lt);return}if(c._closeRequested){let lt=new TypeError("Insufficient bytes to fill elements in the given buffer");Cr(c,lt),D._errorSteps(lt);return}}c._pendingPullIntos.push(Ge),gE(k,D),qo(c)}a(cF,"ReadableByteStreamControllerPullInto");function uF(c,f){f.readerType==="none"&&ki(c);let w=c._controlledReadableByteStream;if(Dh(w))for(;yE(w)>0;){let D=ki(c);Sh(w,D)}}a(uF,"ReadableByteStreamControllerRespondInClosedState");function lF(c,f,w){if(uE(c,f,w),w.readerType==="none"){sE(c,w),Ih(c);return}if(w.bytesFilled<w.minimumFill)return;ki(c);let D=w.bytesFilled%w.elementSize;if(D>0){let k=w.byteOffset+w.bytesFilled;aE(c,w.buffer,k-D,D)}w.bytesFilled-=D,Sh(c._controlledReadableByteStream,w),Ih(c)}a(lF,"ReadableByteStreamControllerRespondInReadableState");function dE(c,f){let w=c._pendingPullIntos.peek();xh(c),c._controlledReadableByteStream._state==="closed"?uF(c,w):lF(c,f,w),qo(c)}a(dE,"ReadableByteStreamControllerRespondInternal");function ki(c){return c._pendingPullIntos.shift()}a(ki,"ReadableByteStreamControllerShiftPendingPullInto");function dF(c){let f=c._controlledReadableByteStream;return f._state!=="readable"||c._closeRequested||!c._started?!1:!!(q(f)&&G(f)>0||Dh(f)&&yE(f)>0||fE(c)>0)}a(dF,"ReadableByteStreamControllerShouldCallPull");function vl(c){c._pullAlgorithm=void 0,c._cancelAlgorithm=void 0}a(vl,"ReadableByteStreamControllerClearAlgorithms");function ls(c){let f=c._controlledReadableByteStream;if(!(c._closeRequested||f._state!=="readable")){if(c._queueTotalSize>0){c._closeRequested=!0;return}if(c._pendingPullIntos.length>0){let w=c._pendingPullIntos.peek();if(w.bytesFilled%w.elementSize!==0){let D=new TypeError("Insufficient bytes to fill elements in the given buffer");throw Cr(c,D),D}}vl(c),ys(f)}}a(ls,"ReadableByteStreamControllerClose");function _l(c,f){let w=c._controlledReadableByteStream;if(c._closeRequested||w._state!=="readable")return;let{buffer:D,byteOffset:k,byteLength:H}=f;if(ro(D))throw new TypeError("chunk's buffer is detached and so cannot be enqueued");let X=On(D);if(c._pendingPullIntos.length>0){let ve=c._pendingPullIntos.peek();if(ro(ve.buffer))throw new TypeError("The BYOB request's buffer has been detached and so cannot be filled with an enqueued chunk");xh(c),ve.buffer=On(ve.buffer),ve.readerType==="none"&&sE(c,ve)}if(q(w))if(sF(c),G(w)===0)yl(c,X,k,H);else{c._pendingPullIntos.length>0&&ki(c);let ve=new Uint8Array(X,k,H);F(w,ve,!1)}else Dh(w)?(yl(c,X,k,H),Ih(c)):yl(c,X,k,H);qo(c)}a(_l,"ReadableByteStreamControllerEnqueue");function Cr(c,f){let w=c._controlledReadableByteStream;w._state==="readable"&&(oE(c),no(c),vl(c),jE(w,f))}a(Cr,"ReadableByteStreamControllerError");function pE(c,f){let w=c._queue.shift();c._queueTotalSize-=w.byteLength,lE(c);let D=new Uint8Array(w.buffer,w.byteOffset,w.byteLength);f._chunkSteps(D)}a(pE,"ReadableByteStreamControllerFillReadRequestFromQueue");function Ah(c){if(c._byobRequest===null&&c._pendingPullIntos.length>0){let f=c._pendingPullIntos.peek(),w=new Uint8Array(f.buffer,f.byteOffset+f.bytesFilled,f.byteLength-f.bytesFilled),D=Object.create(Lo.prototype);fF(D,c,w),c._byobRequest=D}return c._byobRequest}a(Ah,"ReadableByteStreamControllerGetBYOBRequest");function fE(c){let f=c._controlledReadableByteStream._state;return f==="errored"?null:f==="closed"?0:c._strategyHWM-c._queueTotalSize}a(fE,"ReadableByteStreamControllerGetDesiredSize");function Pl(c,f){let w=c._pendingPullIntos.peek();if(c._controlledReadableByteStream._state==="closed"){if(f!==0)throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream")}else{if(f===0)throw new TypeError("bytesWritten must be greater than 0 when calling respond() on a readable stream");if(w.bytesFilled+f>w.byteLength)throw new RangeError("bytesWritten out of range")}w.buffer=On(w.buffer),dE(c,f)}a(Pl,"ReadableByteStreamControllerRespond");function wl(c,f){let w=c._pendingPullIntos.peek();if(c._controlledReadableByteStream._state==="closed"){if(f.byteLength!==0)throw new TypeError("The view's length must be 0 when calling respondWithNewView() on a closed stream")}else if(f.byteLength===0)throw new TypeError("The view's length must be greater than 0 when calling respondWithNewView() on a readable stream");if(w.byteOffset+w.bytesFilled!==f.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(w.bufferByteLength!==f.buffer.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");if(w.bytesFilled+f.byteLength>w.byteLength)throw new RangeError("The region specified by view is larger than byobRequest");let k=f.byteLength;w.buffer=On(f.buffer),dE(c,k)}a(wl,"ReadableByteStreamControllerRespondWithNewView");function mE(c,f,w,D,k,H,X){f._controlledReadableByteStream=c,f._pullAgain=!1,f._pulling=!1,f._byobRequest=null,f._queue=f._queueTotalSize=void 0,no(f),f._closeRequested=!1,f._started=!1,f._strategyHWM=H,f._pullAlgorithm=D,f._cancelAlgorithm=k,f._autoAllocateChunkSize=X,f._pendingPullIntos=new p,c._readableStreamController=f;let ve=w();b(g(ve),()=>(f._started=!0,qo(f),null),Oe=>(Cr(f,Oe),null))}a(mE,"SetUpReadableByteStreamController");function pF(c,f,w){let D=Object.create($n.prototype),k,H,X;f.start!==void 0?k=a(()=>f.start(D),"startAlgorithm"):k=a(()=>{},"startAlgorithm"),f.pull!==void 0?H=a(()=>f.pull(D),"pullAlgorithm"):H=a(()=>g(void 0),"pullAlgorithm"),f.cancel!==void 0?X=a(Oe=>f.cancel(Oe),"cancelAlgorithm"):X=a(()=>g(void 0),"cancelAlgorithm");let ve=f.autoAllocateChunkSize;if(ve===0)throw new TypeError("autoAllocateChunkSize must be greater than 0");mE(c,D,k,H,X,w,ve)}a(pF,"SetUpReadableByteStreamControllerFromUnderlyingSource");function fF(c,f,w){c._associatedReadableByteStreamController=f,c._view=w}a(fF,"SetUpReadableStreamBYOBRequest");function Rh(c){return new TypeError(`ReadableStreamBYOBRequest.prototype.${c} can only be used on a ReadableStreamBYOBRequest`)}a(Rh,"byobRequestBrandCheckException");function ds(c){return new TypeError(`ReadableByteStreamController.prototype.${c} can only be used on a ReadableByteStreamController`)}a(ds,"byteStreamControllerBrandCheckException");function mF(c,f){Pt(c,f);let w=c?.mode;return{mode:w===void 0?void 0:hF(w,`${f} has member 'mode' that`)}}a(mF,"convertReaderOptions");function hF(c,f){if(c=`${c}`,c!=="byob")throw new TypeError(`${f} '${c}' is not a valid enumeration value for ReadableStreamReaderMode`);return c}a(hF,"convertReadableStreamReaderMode");function gF(c,f){var w;Pt(c,f);let D=(w=c?.min)!==null&&w!==void 0?w:1;return{min:U(D,`${f} has member 'min' that`)}}a(gF,"convertByobReadOptions");function hE(c){return new oo(c)}a(hE,"AcquireReadableStreamBYOBReader");function gE(c,f){c._reader._readIntoRequests.push(f)}a(gE,"ReadableStreamAddReadIntoRequest");function yF(c,f,w){let k=c._reader._readIntoRequests.shift();w?k._closeSteps(f):k._chunkSteps(f)}a(yF,"ReadableStreamFulfillReadIntoRequest");function yE(c){return c._reader._readIntoRequests.length}a(yE,"ReadableStreamGetNumReadIntoRequests");function Dh(c){let f=c._reader;return!(f===void 0||!Bo(f))}a(Dh,"ReadableStreamHasBYOBReader");class oo{static{a(this,"ReadableStreamBYOBReader")}constructor(f){if(ot(f,1,"ReadableStreamBYOBReader"),L(f,"First parameter"),so(f))throw new TypeError("This stream has already been locked for exclusive reading by another reader");if(!jo(f._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");me(this,f),this._readIntoRequests=new p}get closed(){return Bo(this)?this._closedPromise:y(bl("closed"))}cancel(f=void 0){return Bo(this)?this._ownerReadableStream===void 0?y(se("cancel")):ee(this,f):y(bl("cancel"))}read(f,w={}){if(!Bo(this))return y(bl("read"));if(!ArrayBuffer.isView(f))return y(new TypeError("view must be an array buffer view"));if(f.byteLength===0)return y(new TypeError("view must have non-zero byteLength"));if(f.buffer.byteLength===0)return y(new TypeError("view's buffer must have non-zero byteLength"));if(ro(f.buffer))return y(new TypeError("view's buffer has been detached"));let D;try{D=gF(w,"options")}catch(Te){return y(Te)}let k=D.min;if(k===0)return y(new TypeError("options.min must be greater than 0"));if(iF(f)){if(k>f.byteLength)return y(new RangeError("options.min must be less than or equal to view's byteLength"))}else if(k>f.length)return y(new RangeError("options.min must be less than or equal to view's length"));if(this._ownerReadableStream===void 0)return y(se("read from"));let H,X,ve=h((Te,Ue)=>{H=Te,X=Ue});return vE(this,f,k,{_chunkSteps:a(Te=>H({value:Te,done:!1}),"_chunkSteps"),_closeSteps:a(Te=>H({value:Te,done:!0}),"_closeSteps"),_errorSteps:a(Te=>X(Te),"_errorSteps")}),ve}releaseLock(){if(!Bo(this))throw bl("releaseLock");this._ownerReadableStream!==void 0&&vF(this)}}Object.defineProperties(oo.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),r(oo.prototype.cancel,"cancel"),r(oo.prototype.read,"read"),r(oo.prototype.releaseLock,"releaseLock"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(oo.prototype,Symbol.toStringTag,{value:"ReadableStreamBYOBReader",configurable:!0});function Bo(c){return!n(c)||!Object.prototype.hasOwnProperty.call(c,"_readIntoRequests")?!1:c instanceof oo}a(Bo,"IsReadableStreamBYOBReader");function vE(c,f,w,D){let k=c._ownerReadableStream;k._disturbed=!0,k._state==="errored"?D._errorSteps(k._storedError):cF(k._readableStreamController,f,w,D)}a(vE,"ReadableStreamBYOBReaderRead");function vF(c){Q(c);let f=new TypeError("Reader was released");_E(c,f)}a(vF,"ReadableStreamBYOBReaderRelease");function _E(c,f){let w=c._readIntoRequests;c._readIntoRequests=new p,w.forEach(D=>{D._errorSteps(f)})}a(_E,"ReadableStreamBYOBReaderErrorReadIntoRequests");function bl(c){return new TypeError(`ReadableStreamBYOBReader.prototype.${c} can only be used on a ReadableStreamBYOBReader`)}a(bl,"byobReaderBrandCheckException");function ps(c,f){let{highWaterMark:w}=c;if(w===void 0)return f;if(hr(w)||w<0)throw new RangeError("Invalid highWaterMark");return w}a(ps,"ExtractHighWaterMark");function Tl(c){let{size:f}=c;return f||(()=>1)}a(Tl,"ExtractSizeAlgorithm");function El(c,f){Pt(c,f);let w=c?.highWaterMark,D=c?.size;return{highWaterMark:w===void 0?void 0:O(w),size:D===void 0?void 0:_F(D,`${f} has member 'size' that`)}}a(El,"convertQueuingStrategy");function _F(c,f){return Tt(c,f),w=>O(c(w))}a(_F,"convertQueuingStrategySize");function PF(c,f){Pt(c,f);let w=c?.abort,D=c?.close,k=c?.start,H=c?.type,X=c?.write;return{abort:w===void 0?void 0:wF(w,c,`${f} has member 'abort' that`),close:D===void 0?void 0:bF(D,c,`${f} has member 'close' that`),start:k===void 0?void 0:TF(k,c,`${f} has member 'start' that`),write:X===void 0?void 0:EF(X,c,`${f} has member 'write' that`),type:H}}a(PF,"convertUnderlyingSink");function wF(c,f,w){return Tt(c,w),D=>d(c,f,[D])}a(wF,"convertUnderlyingSinkAbortCallback");function bF(c,f,w){return Tt(c,w),()=>d(c,f,[])}a(bF,"convertUnderlyingSinkCloseCallback");function TF(c,f,w){return Tt(c,w),D=>m(c,f,[D])}a(TF,"convertUnderlyingSinkStartCallback");function EF(c,f,w){return Tt(c,w),(D,k)=>d(c,f,[D,k])}a(EF,"convertUnderlyingSinkWriteCallback");function PE(c,f){if(!zi(c))throw new TypeError(`${f} is not a WritableStream.`)}a(PE,"assertWritableStream");function SF(c){if(typeof c!="object"||c===null)return!1;try{return typeof c.aborted=="boolean"}catch{return!1}}a(SF,"isAbortSignal");let xF=typeof AbortController=="function";function IF(){if(xF)return new AbortController}a(IF,"createAbortController");class io{static{a(this,"WritableStream")}constructor(f={},w={}){f===void 0?f=null:et(f,"First parameter");let D=El(w,"Second parameter"),k=PF(f,"First parameter");if(bE(this),k.type!==void 0)throw new RangeError("Invalid type is specified");let X=Tl(D),ve=ps(D,1);jF(this,k,ve,X)}get locked(){if(!zi(this))throw Rl("locked");return Ui(this)}abort(f=void 0){return zi(this)?Ui(this)?y(new TypeError("Cannot abort a stream that already has a writer")):Sl(this,f):y(Rl("abort"))}close(){return zi(this)?Ui(this)?y(new TypeError("Cannot close a stream that already has a writer")):dn(this)?y(new TypeError("Cannot close an already-closing stream")):TE(this):y(Rl("close"))}getWriter(){if(!zi(this))throw Rl("getWriter");return wE(this)}}Object.defineProperties(io.prototype,{abort:{enumerable:!0},close:{enumerable:!0},getWriter:{enumerable:!0},locked:{enumerable:!0}}),r(io.prototype.abort,"abort"),r(io.prototype.close,"close"),r(io.prototype.getWriter,"getWriter"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(io.prototype,Symbol.toStringTag,{value:"WritableStream",configurable:!0});function wE(c){return new Cn(c)}a(wE,"AcquireWritableStreamDefaultWriter");function AF(c,f,w,D,k=1,H=()=>1){let X=Object.create(io.prototype);bE(X);let ve=Object.create(Mi.prototype);return RE(X,ve,c,f,w,D,k,H),X}a(AF,"CreateWritableStream");function bE(c){c._state="writable",c._storedError=void 0,c._writer=void 0,c._writableStreamController=void 0,c._writeRequests=new p,c._inFlightWriteRequest=void 0,c._closeRequest=void 0,c._inFlightCloseRequest=void 0,c._pendingAbortRequest=void 0,c._backpressure=!1}a(bE,"InitializeWritableStream");function zi(c){return!n(c)||!Object.prototype.hasOwnProperty.call(c,"_writableStreamController")?!1:c instanceof io}a(zi,"IsWritableStream");function Ui(c){return c._writer!==void 0}a(Ui,"IsWritableStreamLocked");function Sl(c,f){var w;if(c._state==="closed"||c._state==="errored")return g(void 0);c._writableStreamController._abortReason=f,(w=c._writableStreamController._abortController)===null||w===void 0||w.abort(f);let D=c._state;if(D==="closed"||D==="errored")return g(void 0);if(c._pendingAbortRequest!==void 0)return c._pendingAbortRequest._promise;let k=!1;D==="erroring"&&(k=!0,f=void 0);let H=h((X,ve)=>{c._pendingAbortRequest={_promise:void 0,_resolve:X,_reject:ve,_reason:f,_wasAlreadyErroring:k}});return c._pendingAbortRequest._promise=H,k||$h(c,f),H}a(Sl,"WritableStreamAbort");function TE(c){let f=c._state;if(f==="closed"||f==="errored")return y(new TypeError(`The stream (in ${f} state) is not in the writable state and cannot be closed`));let w=h((k,H)=>{let X={_resolve:k,_reject:H};c._closeRequest=X}),D=c._writer;return D!==void 0&&c._backpressure&&f==="writable"&&Lh(D),qF(c._writableStreamController),w}a(TE,"WritableStreamClose");function RF(c){return h((w,D)=>{let k={_resolve:w,_reject:D};c._writeRequests.push(k)})}a(RF,"WritableStreamAddWriteRequest");function Oh(c,f){if(c._state==="writable"){$h(c,f);return}Ch(c)}a(Oh,"WritableStreamDealWithRejection");function $h(c,f){let w=c._writableStreamController;c._state="erroring",c._storedError=f;let D=c._writer;D!==void 0&&SE(D,f),!NF(c)&&w._started&&Ch(c)}a($h,"WritableStreamStartErroring");function Ch(c){c._state="errored",c._writableStreamController[_]();let f=c._storedError;if(c._writeRequests.forEach(k=>{k._reject(f)}),c._writeRequests=new p,c._pendingAbortRequest===void 0){xl(c);return}let w=c._pendingAbortRequest;if(c._pendingAbortRequest=void 0,w._wasAlreadyErroring){w._reject(f),xl(c);return}let D=c._writableStreamController[E](w._reason);b(D,()=>(w._resolve(),xl(c),null),k=>(w._reject(k),xl(c),null))}a(Ch,"WritableStreamFinishErroring");function DF(c){c._inFlightWriteRequest._resolve(void 0),c._inFlightWriteRequest=void 0}a(DF,"WritableStreamFinishInFlightWrite");function OF(c,f){c._inFlightWriteRequest._reject(f),c._inFlightWriteRequest=void 0,Oh(c,f)}a(OF,"WritableStreamFinishInFlightWriteWithError");function $F(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 w=c._writer;w!==void 0&&CE(w)}a($F,"WritableStreamFinishInFlightClose");function CF(c,f){c._inFlightCloseRequest._reject(f),c._inFlightCloseRequest=void 0,c._pendingAbortRequest!==void 0&&(c._pendingAbortRequest._reject(f),c._pendingAbortRequest=void 0),Oh(c,f)}a(CF,"WritableStreamFinishInFlightCloseWithError");function dn(c){return!(c._closeRequest===void 0&&c._inFlightCloseRequest===void 0)}a(dn,"WritableStreamCloseQueuedOrInFlight");function NF(c){return!(c._inFlightWriteRequest===void 0&&c._inFlightCloseRequest===void 0)}a(NF,"WritableStreamHasOperationMarkedInFlight");function kF(c){c._inFlightCloseRequest=c._closeRequest,c._closeRequest=void 0}a(kF,"WritableStreamMarkCloseRequestInFlight");function zF(c){c._inFlightWriteRequest=c._writeRequests.shift()}a(zF,"WritableStreamMarkFirstWriteRequestInFlight");function xl(c){c._closeRequest!==void 0&&(c._closeRequest._reject(c._storedError),c._closeRequest=void 0);let f=c._writer;f!==void 0&&Mh(f,c._storedError)}a(xl,"WritableStreamRejectCloseAndClosedPromiseIfNeeded");function Nh(c,f){let w=c._writer;w!==void 0&&f!==c._backpressure&&(f?KF(w):Lh(w)),c._backpressure=f}a(Nh,"WritableStreamUpdateBackpressure");class Cn{static{a(this,"WritableStreamDefaultWriter")}constructor(f){if(ot(f,1,"WritableStreamDefaultWriter"),PE(f,"First parameter"),Ui(f))throw new TypeError("This stream has already been locked for exclusive writing by another writer");this._ownerWritableStream=f,f._writer=this;let w=f._state;if(w==="writable")!dn(f)&&f._backpressure?Ol(this):NE(this),Dl(this);else if(w==="erroring")Fh(this,f._storedError),Dl(this);else if(w==="closed")NE(this),ZF(this);else{let D=f._storedError;Fh(this,D),$E(this,D)}}get closed(){return Vo(this)?this._closedPromise:y(Go("closed"))}get desiredSize(){if(!Vo(this))throw Go("desiredSize");if(this._ownerWritableStream===void 0)throw ms("desiredSize");return LF(this)}get ready(){return Vo(this)?this._readyPromise:y(Go("ready"))}abort(f=void 0){return Vo(this)?this._ownerWritableStream===void 0?y(ms("abort")):UF(this,f):y(Go("abort"))}close(){if(!Vo(this))return y(Go("close"));let f=this._ownerWritableStream;return f===void 0?y(ms("close")):dn(f)?y(new TypeError("Cannot close an already-closing stream")):EE(this)}releaseLock(){if(!Vo(this))throw Go("releaseLock");this._ownerWritableStream!==void 0&&xE(this)}write(f=void 0){return Vo(this)?this._ownerWritableStream===void 0?y(ms("write to")):IE(this,f):y(Go("write"))}}Object.defineProperties(Cn.prototype,{abort:{enumerable:!0},close:{enumerable:!0},releaseLock:{enumerable:!0},write:{enumerable:!0},closed:{enumerable:!0},desiredSize:{enumerable:!0},ready:{enumerable:!0}}),r(Cn.prototype.abort,"abort"),r(Cn.prototype.close,"close"),r(Cn.prototype.releaseLock,"releaseLock"),r(Cn.prototype.write,"write"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Cn.prototype,Symbol.toStringTag,{value:"WritableStreamDefaultWriter",configurable:!0});function Vo(c){return!n(c)||!Object.prototype.hasOwnProperty.call(c,"_ownerWritableStream")?!1:c instanceof Cn}a(Vo,"IsWritableStreamDefaultWriter");function UF(c,f){let w=c._ownerWritableStream;return Sl(w,f)}a(UF,"WritableStreamDefaultWriterAbort");function EE(c){let f=c._ownerWritableStream;return TE(f)}a(EE,"WritableStreamDefaultWriterClose");function MF(c){let f=c._ownerWritableStream,w=f._state;return dn(f)||w==="closed"?g(void 0):w==="errored"?y(f._storedError):EE(c)}a(MF,"WritableStreamDefaultWriterCloseWithErrorPropagation");function FF(c,f){c._closedPromiseState==="pending"?Mh(c,f):WF(c,f)}a(FF,"WritableStreamDefaultWriterEnsureClosedPromiseRejected");function SE(c,f){c._readyPromiseState==="pending"?kE(c,f):JF(c,f)}a(SE,"WritableStreamDefaultWriterEnsureReadyPromiseRejected");function LF(c){let f=c._ownerWritableStream,w=f._state;return w==="errored"||w==="erroring"?null:w==="closed"?0:DE(f._writableStreamController)}a(LF,"WritableStreamDefaultWriterGetDesiredSize");function xE(c){let f=c._ownerWritableStream,w=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");SE(c,w),FF(c,w),f._writer=void 0,c._ownerWritableStream=void 0}a(xE,"WritableStreamDefaultWriterRelease");function IE(c,f){let w=c._ownerWritableStream,D=w._writableStreamController,k=BF(D,f);if(w!==c._ownerWritableStream)return y(ms("write to"));let H=w._state;if(H==="errored")return y(w._storedError);if(dn(w)||H==="closed")return y(new TypeError("The stream is closing or closed and cannot be written to"));if(H==="erroring")return y(w._storedError);let X=RF(w);return VF(D,f,k),X}a(IE,"WritableStreamDefaultWriterWrite");let AE={};class Mi{static{a(this,"WritableStreamDefaultController")}constructor(){throw new TypeError("Illegal constructor")}get abortReason(){if(!kh(this))throw Uh("abortReason");return this._abortReason}get signal(){if(!kh(this))throw Uh("signal");if(this._abortController===void 0)throw new TypeError("WritableStreamDefaultController.prototype.signal is not supported");return this._abortController.signal}error(f=void 0){if(!kh(this))throw Uh("error");this._controlledWritableStream._state==="writable"&&OE(this,f)}[E](f){let w=this._abortAlgorithm(f);return Il(this),w}[_](){no(this)}}Object.defineProperties(Mi.prototype,{abortReason:{enumerable:!0},signal:{enumerable:!0},error:{enumerable:!0}}),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Mi.prototype,Symbol.toStringTag,{value:"WritableStreamDefaultController",configurable:!0});function kh(c){return!n(c)||!Object.prototype.hasOwnProperty.call(c,"_controlledWritableStream")?!1:c instanceof Mi}a(kh,"IsWritableStreamDefaultController");function RE(c,f,w,D,k,H,X,ve){f._controlledWritableStream=c,c._writableStreamController=f,f._queue=void 0,f._queueTotalSize=void 0,no(f),f._abortReason=void 0,f._abortController=IF(),f._started=!1,f._strategySizeAlgorithm=ve,f._strategyHWM=X,f._writeAlgorithm=D,f._closeAlgorithm=k,f._abortAlgorithm=H;let Oe=zh(f);Nh(c,Oe);let Te=w(),Ue=g(Te);b(Ue,()=>(f._started=!0,Al(f),null),Ge=>(f._started=!0,Oh(c,Ge),null))}a(RE,"SetUpWritableStreamDefaultController");function jF(c,f,w,D){let k=Object.create(Mi.prototype),H,X,ve,Oe;f.start!==void 0?H=a(()=>f.start(k),"startAlgorithm"):H=a(()=>{},"startAlgorithm"),f.write!==void 0?X=a(Te=>f.write(Te,k),"writeAlgorithm"):X=a(()=>g(void 0),"writeAlgorithm"),f.close!==void 0?ve=a(()=>f.close(),"closeAlgorithm"):ve=a(()=>g(void 0),"closeAlgorithm"),f.abort!==void 0?Oe=a(Te=>f.abort(Te),"abortAlgorithm"):Oe=a(()=>g(void 0),"abortAlgorithm"),RE(c,k,H,X,ve,Oe,w,D)}a(jF,"SetUpWritableStreamDefaultControllerFromUnderlyingSink");function Il(c){c._writeAlgorithm=void 0,c._closeAlgorithm=void 0,c._abortAlgorithm=void 0,c._strategySizeAlgorithm=void 0}a(Il,"WritableStreamDefaultControllerClearAlgorithms");function qF(c){Th(c,AE,0),Al(c)}a(qF,"WritableStreamDefaultControllerClose");function BF(c,f){try{return c._strategySizeAlgorithm(f)}catch(w){return fs(c,w),1}}a(BF,"WritableStreamDefaultControllerGetChunkSize");function DE(c){return c._strategyHWM-c._queueTotalSize}a(DE,"WritableStreamDefaultControllerGetDesiredSize");function VF(c,f,w){try{Th(c,f,w)}catch(k){fs(c,k);return}let D=c._controlledWritableStream;if(!dn(D)&&D._state==="writable"){let k=zh(c);Nh(D,k)}Al(c)}a(VF,"WritableStreamDefaultControllerWrite");function Al(c){let f=c._controlledWritableStream;if(!c._started||f._inFlightWriteRequest!==void 0)return;if(f._state==="erroring"){Ch(f);return}if(c._queue.length===0)return;let D=oF(c);D===AE?GF(c):HF(c,D)}a(Al,"WritableStreamDefaultControllerAdvanceQueueIfNeeded");function fs(c,f){c._controlledWritableStream._state==="writable"&&OE(c,f)}a(fs,"WritableStreamDefaultControllerErrorIfNeeded");function GF(c){let f=c._controlledWritableStream;kF(f),bh(c);let w=c._closeAlgorithm();Il(c),b(w,()=>($F(f),null),D=>(CF(f,D),null))}a(GF,"WritableStreamDefaultControllerProcessClose");function HF(c,f){let w=c._controlledWritableStream;zF(w);let D=c._writeAlgorithm(f);b(D,()=>{DF(w);let k=w._state;if(bh(c),!dn(w)&&k==="writable"){let H=zh(c);Nh(w,H)}return Al(c),null},k=>(w._state==="writable"&&Il(c),OF(w,k),null))}a(HF,"WritableStreamDefaultControllerProcessWrite");function zh(c){return DE(c)<=0}a(zh,"WritableStreamDefaultControllerGetBackpressure");function OE(c,f){let w=c._controlledWritableStream;Il(c),$h(w,f)}a(OE,"WritableStreamDefaultControllerError");function Rl(c){return new TypeError(`WritableStream.prototype.${c} can only be used on a WritableStream`)}a(Rl,"streamBrandCheckException$2");function Uh(c){return new TypeError(`WritableStreamDefaultController.prototype.${c} can only be used on a WritableStreamDefaultController`)}a(Uh,"defaultControllerBrandCheckException$2");function Go(c){return new TypeError(`WritableStreamDefaultWriter.prototype.${c} can only be used on a WritableStreamDefaultWriter`)}a(Go,"defaultWriterBrandCheckException");function ms(c){return new TypeError("Cannot "+c+" a stream using a released writer")}a(ms,"defaultWriterLockException");function Dl(c){c._closedPromise=h((f,w)=>{c._closedPromise_resolve=f,c._closedPromise_reject=w,c._closedPromiseState="pending"})}a(Dl,"defaultWriterClosedPromiseInitialize");function $E(c,f){Dl(c),Mh(c,f)}a($E,"defaultWriterClosedPromiseInitializeAsRejected");function ZF(c){Dl(c),CE(c)}a(ZF,"defaultWriterClosedPromiseInitializeAsResolved");function Mh(c,f){c._closedPromise_reject!==void 0&&(I(c._closedPromise),c._closedPromise_reject(f),c._closedPromise_resolve=void 0,c._closedPromise_reject=void 0,c._closedPromiseState="rejected")}a(Mh,"defaultWriterClosedPromiseReject");function WF(c,f){$E(c,f)}a(WF,"defaultWriterClosedPromiseResetToRejected");function CE(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(CE,"defaultWriterClosedPromiseResolve");function Ol(c){c._readyPromise=h((f,w)=>{c._readyPromise_resolve=f,c._readyPromise_reject=w}),c._readyPromiseState="pending"}a(Ol,"defaultWriterReadyPromiseInitialize");function Fh(c,f){Ol(c),kE(c,f)}a(Fh,"defaultWriterReadyPromiseInitializeAsRejected");function NE(c){Ol(c),Lh(c)}a(NE,"defaultWriterReadyPromiseInitializeAsResolved");function kE(c,f){c._readyPromise_reject!==void 0&&(I(c._readyPromise),c._readyPromise_reject(f),c._readyPromise_resolve=void 0,c._readyPromise_reject=void 0,c._readyPromiseState="rejected")}a(kE,"defaultWriterReadyPromiseReject");function KF(c){Ol(c)}a(KF,"defaultWriterReadyPromiseReset");function JF(c,f){Fh(c,f)}a(JF,"defaultWriterReadyPromiseResetToRejected");function Lh(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(Lh,"defaultWriterReadyPromiseResolve");function XF(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof global<"u")return global}a(XF,"getGlobals");let jh=XF();function YF(c){if(!(typeof c=="function"||typeof c=="object")||c.name!=="DOMException")return!1;try{return new c,!0}catch{return!1}}a(YF,"isDOMExceptionConstructor");function QF(){let c=jh?.DOMException;return YF(c)?c:void 0}a(QF,"getFromGlobal");function eL(){let c=a(function(w,D){this.message=w||"",this.name=D||"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(eL,"createPolyfill");let tL=QF()||eL();function zE(c,f,w,D,k,H){let X=Z(c),ve=wE(f);c._disturbed=!0;let Oe=!1,Te=g(void 0);return h((Ue,Ge)=>{let lt;if(H!==void 0){if(lt=a(()=>{let Se=H.reason!==void 0?H.reason:new tL("Aborted","AbortError"),Ze=[];D||Ze.push(()=>f._state==="writable"?Sl(f,Se):g(void 0)),k||Ze.push(()=>c._state==="readable"?Zr(c,Se):g(void 0)),rr(()=>Promise.all(Ze.map(dt=>dt())),!0,Se)},"abortAlgorithm"),H.aborted){lt();return}H.addEventListener("abort",lt)}function Wr(){return h((Se,Ze)=>{function dt(gr){gr?Se():T(qi(),dt,Ze)}a(dt,"next"),dt(!1)})}a(Wr,"pipeLoop");function qi(){return Oe?g(!0):T(ve._readyPromise,()=>h((Se,Ze)=>{be(X,{_chunkSteps:a(dt=>{Te=T(IE(ve,dt),void 0,t),Se(!1)},"_chunkSteps"),_closeSteps:a(()=>Se(!0),"_closeSteps"),_errorSteps:Ze})}))}if(a(qi,"pipeStep"),kn(c,X._closedPromise,Se=>(D?Nr(!0,Se):rr(()=>Sl(f,Se),!0,Se),null)),kn(f,ve._closedPromise,Se=>(k?Nr(!0,Se):rr(()=>Zr(c,Se),!0,Se),null)),Wt(c,X._closedPromise,()=>(w?Nr():rr(()=>MF(ve)),null)),dn(f)||f._state==="closed"){let Se=new TypeError("the destination writable stream closed before all data could be piped to it");k?Nr(!0,Se):rr(()=>Zr(c,Se),!0,Se)}I(Wr());function uo(){let Se=Te;return T(Te,()=>Se!==Te?uo():void 0)}a(uo,"waitForWritesToFinish");function kn(Se,Ze,dt){Se._state==="errored"?dt(Se._storedError):S(Ze,dt)}a(kn,"isOrBecomesErrored");function Wt(Se,Ze,dt){Se._state==="closed"?dt():P(Ze,dt)}a(Wt,"isOrBecomesClosed");function rr(Se,Ze,dt){if(Oe)return;Oe=!0,f._state==="writable"&&!dn(f)?P(uo(),gr):gr();function gr(){return b(Se(),()=>zn(Ze,dt),Bi=>zn(!0,Bi)),null}a(gr,"doTheRest")}a(rr,"shutdownWithAction");function Nr(Se,Ze){Oe||(Oe=!0,f._state==="writable"&&!dn(f)?P(uo(),()=>zn(Se,Ze)):zn(Se,Ze))}a(Nr,"shutdown");function zn(Se,Ze){return xE(ve),Q(X),H!==void 0&&H.removeEventListener("abort",lt),Se?Ge(Ze):Ue(void 0),null}a(zn,"finalize")})}a(zE,"ReadableStreamPipeTo");class Nn{static{a(this,"ReadableStreamDefaultController")}constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!$l(this))throw Nl("desiredSize");return qh(this)}close(){if(!$l(this))throw Nl("close");if(!Li(this))throw new TypeError("The stream is not in a state that permits close");Ho(this)}enqueue(f=void 0){if(!$l(this))throw Nl("enqueue");if(!Li(this))throw new TypeError("The stream is not in a state that permits enqueue");return Fi(this,f)}error(f=void 0){if(!$l(this))throw Nl("error");Hr(this,f)}[pe](f){no(this);let w=this._cancelAlgorithm(f);return Cl(this),w}[oe](f){let w=this._controlledReadableStream;if(this._queue.length>0){let D=bh(this);this._closeRequested&&this._queue.length===0?(Cl(this),ys(w)):hs(this),f._chunkSteps(D)}else z(w,f),hs(this)}[Be](){}}Object.defineProperties(Nn.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},desiredSize:{enumerable:!0}}),r(Nn.prototype.close,"close"),r(Nn.prototype.enqueue,"enqueue"),r(Nn.prototype.error,"error"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Nn.prototype,Symbol.toStringTag,{value:"ReadableStreamDefaultController",configurable:!0});function $l(c){return!n(c)||!Object.prototype.hasOwnProperty.call(c,"_controlledReadableStream")?!1:c instanceof Nn}a($l,"IsReadableStreamDefaultController");function hs(c){if(!UE(c))return;if(c._pulling){c._pullAgain=!0;return}c._pulling=!0;let w=c._pullAlgorithm();b(w,()=>(c._pulling=!1,c._pullAgain&&(c._pullAgain=!1,hs(c)),null),D=>(Hr(c,D),null))}a(hs,"ReadableStreamDefaultControllerCallPullIfNeeded");function UE(c){let f=c._controlledReadableStream;return!Li(c)||!c._started?!1:!!(so(f)&&G(f)>0||qh(c)>0)}a(UE,"ReadableStreamDefaultControllerShouldCallPull");function Cl(c){c._pullAlgorithm=void 0,c._cancelAlgorithm=void 0,c._strategySizeAlgorithm=void 0}a(Cl,"ReadableStreamDefaultControllerClearAlgorithms");function Ho(c){if(!Li(c))return;let f=c._controlledReadableStream;c._closeRequested=!0,c._queue.length===0&&(Cl(c),ys(f))}a(Ho,"ReadableStreamDefaultControllerClose");function Fi(c,f){if(!Li(c))return;let w=c._controlledReadableStream;if(so(w)&&G(w)>0)F(w,f,!1);else{let D;try{D=c._strategySizeAlgorithm(f)}catch(k){throw Hr(c,k),k}try{Th(c,f,D)}catch(k){throw Hr(c,k),k}}hs(c)}a(Fi,"ReadableStreamDefaultControllerEnqueue");function Hr(c,f){let w=c._controlledReadableStream;w._state==="readable"&&(no(c),Cl(c),jE(w,f))}a(Hr,"ReadableStreamDefaultControllerError");function qh(c){let f=c._controlledReadableStream._state;return f==="errored"?null:f==="closed"?0:c._strategyHWM-c._queueTotalSize}a(qh,"ReadableStreamDefaultControllerGetDesiredSize");function rL(c){return!UE(c)}a(rL,"ReadableStreamDefaultControllerHasBackpressure");function Li(c){let f=c._controlledReadableStream._state;return!c._closeRequested&&f==="readable"}a(Li,"ReadableStreamDefaultControllerCanCloseOrEnqueue");function ME(c,f,w,D,k,H,X){f._controlledReadableStream=c,f._queue=void 0,f._queueTotalSize=void 0,no(f),f._started=!1,f._closeRequested=!1,f._pullAgain=!1,f._pulling=!1,f._strategySizeAlgorithm=X,f._strategyHWM=H,f._pullAlgorithm=D,f._cancelAlgorithm=k,c._readableStreamController=f;let ve=w();b(g(ve),()=>(f._started=!0,hs(f),null),Oe=>(Hr(f,Oe),null))}a(ME,"SetUpReadableStreamDefaultController");function nL(c,f,w,D){let k=Object.create(Nn.prototype),H,X,ve;f.start!==void 0?H=a(()=>f.start(k),"startAlgorithm"):H=a(()=>{},"startAlgorithm"),f.pull!==void 0?X=a(()=>f.pull(k),"pullAlgorithm"):X=a(()=>g(void 0),"pullAlgorithm"),f.cancel!==void 0?ve=a(Oe=>f.cancel(Oe),"cancelAlgorithm"):ve=a(()=>g(void 0),"cancelAlgorithm"),ME(c,k,H,X,ve,w,D)}a(nL,"SetUpReadableStreamDefaultControllerFromUnderlyingSource");function Nl(c){return new TypeError(`ReadableStreamDefaultController.prototype.${c} can only be used on a ReadableStreamDefaultController`)}a(Nl,"defaultControllerBrandCheckException$1");function oL(c,f){return jo(c._readableStreamController)?aL(c):iL(c)}a(oL,"ReadableStreamTee");function iL(c,f){let w=Z(c),D=!1,k=!1,H=!1,X=!1,ve,Oe,Te,Ue,Ge,lt=h(Wt=>{Ge=Wt});function Wr(){return D?(k=!0,g(void 0)):(D=!0,be(w,{_chunkSteps:a(rr=>{l(()=>{k=!1;let Nr=rr,zn=rr;H||Fi(Te._readableStreamController,Nr),X||Fi(Ue._readableStreamController,zn),D=!1,k&&Wr()})},"_chunkSteps"),_closeSteps:a(()=>{D=!1,H||Ho(Te._readableStreamController),X||Ho(Ue._readableStreamController),(!H||!X)&&Ge(void 0)},"_closeSteps"),_errorSteps:a(()=>{D=!1},"_errorSteps")}),g(void 0))}a(Wr,"pullAlgorithm");function qi(Wt){if(H=!0,ve=Wt,X){let rr=it([ve,Oe]),Nr=Zr(c,rr);Ge(Nr)}return lt}a(qi,"cancel1Algorithm");function uo(Wt){if(X=!0,Oe=Wt,H){let rr=it([ve,Oe]),Nr=Zr(c,rr);Ge(Nr)}return lt}a(uo,"cancel2Algorithm");function kn(){}return a(kn,"startAlgorithm"),Te=gs(kn,Wr,qi),Ue=gs(kn,Wr,uo),S(w._closedPromise,Wt=>(Hr(Te._readableStreamController,Wt),Hr(Ue._readableStreamController,Wt),(!H||!X)&&Ge(void 0),null)),[Te,Ue]}a(iL,"ReadableStreamDefaultTee");function aL(c){let f=Z(c),w=!1,D=!1,k=!1,H=!1,X=!1,ve,Oe,Te,Ue,Ge,lt=h(Se=>{Ge=Se});function Wr(Se){S(Se._closedPromise,Ze=>(Se!==f||(Cr(Te._readableStreamController,Ze),Cr(Ue._readableStreamController,Ze),(!H||!X)&&Ge(void 0)),null))}a(Wr,"forwardReaderError");function qi(){Bo(f)&&(Q(f),f=Z(c),Wr(f)),be(f,{_chunkSteps:a(Ze=>{l(()=>{D=!1,k=!1;let dt=Ze,gr=Ze;if(!H&&!X)try{gr=rE(Ze)}catch(Bi){Cr(Te._readableStreamController,Bi),Cr(Ue._readableStreamController,Bi),Ge(Zr(c,Bi));return}H||_l(Te._readableStreamController,dt),X||_l(Ue._readableStreamController,gr),w=!1,D?kn():k&&Wt()})},"_chunkSteps"),_closeSteps:a(()=>{w=!1,H||ls(Te._readableStreamController),X||ls(Ue._readableStreamController),Te._readableStreamController._pendingPullIntos.length>0&&Pl(Te._readableStreamController,0),Ue._readableStreamController._pendingPullIntos.length>0&&Pl(Ue._readableStreamController,0),(!H||!X)&&Ge(void 0)},"_closeSteps"),_errorSteps:a(()=>{w=!1},"_errorSteps")})}a(qi,"pullWithDefaultReader");function uo(Se,Ze){Pe(f)&&(Q(f),f=hE(c),Wr(f));let dt=Ze?Ue:Te,gr=Ze?Te:Ue;vE(f,Se,1,{_chunkSteps:a(Vi=>{l(()=>{D=!1,k=!1;let Gi=Ze?X:H;if(Ze?H:X)Gi||wl(dt._readableStreamController,Vi);else{let eS;try{eS=rE(Vi)}catch(Zh){Cr(dt._readableStreamController,Zh),Cr(gr._readableStreamController,Zh),Ge(Zr(c,Zh));return}Gi||wl(dt._readableStreamController,Vi),_l(gr._readableStreamController,eS)}w=!1,D?kn():k&&Wt()})},"_chunkSteps"),_closeSteps:a(Vi=>{w=!1;let Gi=Ze?X:H,ql=Ze?H:X;Gi||ls(dt._readableStreamController),ql||ls(gr._readableStreamController),Vi!==void 0&&(Gi||wl(dt._readableStreamController,Vi),!ql&&gr._readableStreamController._pendingPullIntos.length>0&&Pl(gr._readableStreamController,0)),(!Gi||!ql)&&Ge(void 0)},"_closeSteps"),_errorSteps:a(()=>{w=!1},"_errorSteps")})}a(uo,"pullWithBYOBReader");function kn(){if(w)return D=!0,g(void 0);w=!0;let Se=Ah(Te._readableStreamController);return Se===null?qi():uo(Se._view,!1),g(void 0)}a(kn,"pull1Algorithm");function Wt(){if(w)return k=!0,g(void 0);w=!0;let Se=Ah(Ue._readableStreamController);return Se===null?qi():uo(Se._view,!0),g(void 0)}a(Wt,"pull2Algorithm");function rr(Se){if(H=!0,ve=Se,X){let Ze=it([ve,Oe]),dt=Zr(c,Ze);Ge(dt)}return lt}a(rr,"cancel1Algorithm");function Nr(Se){if(X=!0,Oe=Se,H){let Ze=it([ve,Oe]),dt=Zr(c,Ze);Ge(dt)}return lt}a(Nr,"cancel2Algorithm");function zn(){}return a(zn,"startAlgorithm"),Te=LE(zn,kn,rr),Ue=LE(zn,Wt,Nr),Wr(f),[Te,Ue]}a(aL,"ReadableByteStreamTee");function sL(c){return n(c)&&typeof c.getReader<"u"}a(sL,"isReadableStreamLike");function cL(c){return sL(c)?lL(c.getReader()):uL(c)}a(cL,"ReadableStreamFrom");function uL(c){let f,w=tE(c,"async"),D=t;function k(){let X;try{X=eF(w)}catch(Oe){return y(Oe)}let ve=g(X);return R(ve,Oe=>{if(!n(Oe))throw new TypeError("The promise returned by the iterator.next() method must fulfill with an object");if(tF(Oe))Ho(f._readableStreamController);else{let Ue=rF(Oe);Fi(f._readableStreamController,Ue)}})}a(k,"pullAlgorithm");function H(X){let ve=w.iterator,Oe;try{Oe=gl(ve,"return")}catch(Ge){return y(Ge)}if(Oe===void 0)return g(void 0);let Te;try{Te=m(Oe,ve,[X])}catch(Ge){return y(Ge)}let Ue=g(Te);return R(Ue,Ge=>{if(!n(Ge))throw new TypeError("The promise returned by the iterator.return() method must fulfill with an object")})}return a(H,"cancelAlgorithm"),f=gs(D,k,H,0),f}a(uL,"ReadableStreamFromIterable");function lL(c){let f,w=t;function D(){let H;try{H=c.read()}catch(X){return y(X)}return R(H,X=>{if(!n(X))throw new TypeError("The promise returned by the reader.read() method must fulfill with an object");if(X.done)Ho(f._readableStreamController);else{let ve=X.value;Fi(f._readableStreamController,ve)}})}a(D,"pullAlgorithm");function k(H){try{return g(c.cancel(H))}catch(X){return y(X)}}return a(k,"cancelAlgorithm"),f=gs(w,D,k,0),f}a(lL,"ReadableStreamFromDefaultReader");function dL(c,f){Pt(c,f);let w=c,D=w?.autoAllocateChunkSize,k=w?.cancel,H=w?.pull,X=w?.start,ve=w?.type;return{autoAllocateChunkSize:D===void 0?void 0:U(D,`${f} has member 'autoAllocateChunkSize' that`),cancel:k===void 0?void 0:pL(k,w,`${f} has member 'cancel' that`),pull:H===void 0?void 0:fL(H,w,`${f} has member 'pull' that`),start:X===void 0?void 0:mL(X,w,`${f} has member 'start' that`),type:ve===void 0?void 0:hL(ve,`${f} has member 'type' that`)}}a(dL,"convertUnderlyingDefaultOrByteSource");function pL(c,f,w){return Tt(c,w),D=>d(c,f,[D])}a(pL,"convertUnderlyingSourceCancelCallback");function fL(c,f,w){return Tt(c,w),D=>d(c,f,[D])}a(fL,"convertUnderlyingSourcePullCallback");function mL(c,f,w){return Tt(c,w),D=>m(c,f,[D])}a(mL,"convertUnderlyingSourceStartCallback");function hL(c,f){if(c=`${c}`,c!=="bytes")throw new TypeError(`${f} '${c}' is not a valid enumeration value for ReadableStreamType`);return c}a(hL,"convertReadableStreamType");function gL(c,f){return Pt(c,f),{preventCancel:!!c?.preventCancel}}a(gL,"convertIteratorOptions");function FE(c,f){Pt(c,f);let w=c?.preventAbort,D=c?.preventCancel,k=c?.preventClose,H=c?.signal;return H!==void 0&&yL(H,`${f} has member 'signal' that`),{preventAbort:!!w,preventCancel:!!D,preventClose:!!k,signal:H}}a(FE,"convertPipeOptions");function yL(c,f){if(!SF(c))throw new TypeError(`${f} is not an AbortSignal.`)}a(yL,"assertAbortSignal");function vL(c,f){Pt(c,f);let w=c?.readable;A(w,"readable","ReadableWritablePair"),L(w,`${f} has member 'readable' that`);let D=c?.writable;return A(D,"writable","ReadableWritablePair"),PE(D,`${f} has member 'writable' that`),{readable:w,writable:D}}a(vL,"convertReadableWritablePair");class Vt{static{a(this,"ReadableStream")}constructor(f={},w={}){f===void 0?f=null:et(f,"First parameter");let D=El(w,"Second parameter"),k=dL(f,"First parameter");if(Bh(this),k.type==="bytes"){if(D.size!==void 0)throw new RangeError("The strategy for a byte stream cannot have a size function");let H=ps(D,0);pF(this,k,H)}else{let H=Tl(D),X=ps(D,1);nL(this,k,X,H)}}get locked(){if(!ao(this))throw Zo("locked");return so(this)}cancel(f=void 0){return ao(this)?so(this)?y(new TypeError("Cannot cancel a stream that already has a reader")):Zr(this,f):y(Zo("cancel"))}getReader(f=void 0){if(!ao(this))throw Zo("getReader");return mF(f,"First parameter").mode===void 0?Z(this):hE(this)}pipeThrough(f,w={}){if(!ao(this))throw Zo("pipeThrough");ot(f,1,"pipeThrough");let D=vL(f,"First parameter"),k=FE(w,"Second parameter");if(so(this))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(Ui(D.writable))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");let H=zE(this,D.writable,k.preventClose,k.preventAbort,k.preventCancel,k.signal);return I(H),D.readable}pipeTo(f,w={}){if(!ao(this))return y(Zo("pipeTo"));if(f===void 0)return y("Parameter 1 is required in 'pipeTo'.");if(!zi(f))return y(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));let D;try{D=FE(w,"Second parameter")}catch(k){return y(k)}return so(this)?y(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):Ui(f)?y(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):zE(this,f,D.preventClose,D.preventAbort,D.preventCancel,D.signal)}tee(){if(!ao(this))throw Zo("tee");let f=oL(this);return it(f)}values(f=void 0){if(!ao(this))throw Zo("values");let w=gL(f,"First parameter");return $i(this,w.preventCancel)}[wh](f){return this.values(f)}static from(f){return cL(f)}}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}}),r(Vt.from,"from"),r(Vt.prototype.cancel,"cancel"),r(Vt.prototype.getReader,"getReader"),r(Vt.prototype.pipeThrough,"pipeThrough"),r(Vt.prototype.pipeTo,"pipeTo"),r(Vt.prototype.tee,"tee"),r(Vt.prototype.values,"values"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Vt.prototype,Symbol.toStringTag,{value:"ReadableStream",configurable:!0}),Object.defineProperty(Vt.prototype,wh,{value:Vt.prototype.values,writable:!0,configurable:!0});function gs(c,f,w,D=1,k=()=>1){let H=Object.create(Vt.prototype);Bh(H);let X=Object.create(Nn.prototype);return ME(H,X,c,f,w,D,k),H}a(gs,"CreateReadableStream");function LE(c,f,w){let D=Object.create(Vt.prototype);Bh(D);let k=Object.create($n.prototype);return mE(D,k,c,f,w,0,void 0),D}a(LE,"CreateReadableByteStream");function Bh(c){c._state="readable",c._reader=void 0,c._storedError=void 0,c._disturbed=!1}a(Bh,"InitializeReadableStream");function ao(c){return!n(c)||!Object.prototype.hasOwnProperty.call(c,"_readableStreamController")?!1:c instanceof Vt}a(ao,"IsReadableStream");function so(c){return c._reader!==void 0}a(so,"IsReadableStreamLocked");function Zr(c,f){if(c._disturbed=!0,c._state==="closed")return g(void 0);if(c._state==="errored")return y(c._storedError);ys(c);let w=c._reader;if(w!==void 0&&Bo(w)){let k=w._readIntoRequests;w._readIntoRequests=new p,k.forEach(H=>{H._closeSteps(void 0)})}let D=c._readableStreamController[pe](f);return R(D,t)}a(Zr,"ReadableStreamCancel");function ys(c){c._state="closed";let f=c._reader;if(f!==void 0&&(nt(f),Pe(f))){let w=f._readRequests;f._readRequests=new p,w.forEach(D=>{D._closeSteps()})}}a(ys,"ReadableStreamClose");function jE(c,f){c._state="errored",c._storedError=f;let w=c._reader;w!==void 0&&(Fe(w,f),Pe(w)?ft(w,f):_E(w,f))}a(jE,"ReadableStreamError");function Zo(c){return new TypeError(`ReadableStream.prototype.${c} can only be used on a ReadableStream`)}a(Zo,"streamBrandCheckException$1");function qE(c,f){Pt(c,f);let w=c?.highWaterMark;return A(w,"highWaterMark","QueuingStrategyInit"),{highWaterMark:O(w)}}a(qE,"convertQueuingStrategyInit");let BE=a(c=>c.byteLength,"byteLengthSizeFunction");r(BE,"size");class kl{static{a(this,"ByteLengthQueuingStrategy")}constructor(f){ot(f,1,"ByteLengthQueuingStrategy"),f=qE(f,"First parameter"),this._byteLengthQueuingStrategyHighWaterMark=f.highWaterMark}get highWaterMark(){if(!GE(this))throw VE("highWaterMark");return this._byteLengthQueuingStrategyHighWaterMark}get size(){if(!GE(this))throw VE("size");return BE}}Object.defineProperties(kl.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(kl.prototype,Symbol.toStringTag,{value:"ByteLengthQueuingStrategy",configurable:!0});function VE(c){return new TypeError(`ByteLengthQueuingStrategy.prototype.${c} can only be used on a ByteLengthQueuingStrategy`)}a(VE,"byteLengthBrandCheckException");function GE(c){return!n(c)||!Object.prototype.hasOwnProperty.call(c,"_byteLengthQueuingStrategyHighWaterMark")?!1:c instanceof kl}a(GE,"IsByteLengthQueuingStrategy");let HE=a(()=>1,"countSizeFunction");r(HE,"size");class zl{static{a(this,"CountQueuingStrategy")}constructor(f){ot(f,1,"CountQueuingStrategy"),f=qE(f,"First parameter"),this._countQueuingStrategyHighWaterMark=f.highWaterMark}get highWaterMark(){if(!WE(this))throw ZE("highWaterMark");return this._countQueuingStrategyHighWaterMark}get size(){if(!WE(this))throw ZE("size");return HE}}Object.defineProperties(zl.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(zl.prototype,Symbol.toStringTag,{value:"CountQueuingStrategy",configurable:!0});function ZE(c){return new TypeError(`CountQueuingStrategy.prototype.${c} can only be used on a CountQueuingStrategy`)}a(ZE,"countBrandCheckException");function WE(c){return!n(c)||!Object.prototype.hasOwnProperty.call(c,"_countQueuingStrategyHighWaterMark")?!1:c instanceof zl}a(WE,"IsCountQueuingStrategy");function _L(c,f){Pt(c,f);let w=c?.cancel,D=c?.flush,k=c?.readableType,H=c?.start,X=c?.transform,ve=c?.writableType;return{cancel:w===void 0?void 0:TL(w,c,`${f} has member 'cancel' that`),flush:D===void 0?void 0:PL(D,c,`${f} has member 'flush' that`),readableType:k,start:H===void 0?void 0:wL(H,c,`${f} has member 'start' that`),transform:X===void 0?void 0:bL(X,c,`${f} has member 'transform' that`),writableType:ve}}a(_L,"convertTransformer");function PL(c,f,w){return Tt(c,w),D=>d(c,f,[D])}a(PL,"convertTransformerFlushCallback");function wL(c,f,w){return Tt(c,w),D=>m(c,f,[D])}a(wL,"convertTransformerStartCallback");function bL(c,f,w){return Tt(c,w),(D,k)=>d(c,f,[D,k])}a(bL,"convertTransformerTransformCallback");function TL(c,f,w){return Tt(c,w),D=>d(c,f,[D])}a(TL,"convertTransformerCancelCallback");class Ul{static{a(this,"TransformStream")}constructor(f={},w={},D={}){f===void 0&&(f=null);let k=El(w,"Second parameter"),H=El(D,"Third parameter"),X=_L(f,"First parameter");if(X.readableType!==void 0)throw new RangeError("Invalid readableType specified");if(X.writableType!==void 0)throw new RangeError("Invalid writableType specified");let ve=ps(H,0),Oe=Tl(H),Te=ps(k,1),Ue=Tl(k),Ge,lt=h(Wr=>{Ge=Wr});EL(this,lt,Te,Ue,ve,Oe),xL(this,X),X.start!==void 0?Ge(X.start(this._transformStreamController)):Ge(void 0)}get readable(){if(!KE(this))throw QE("readable");return this._readable}get writable(){if(!KE(this))throw QE("writable");return this._writable}}Object.defineProperties(Ul.prototype,{readable:{enumerable:!0},writable:{enumerable:!0}}),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Ul.prototype,Symbol.toStringTag,{value:"TransformStream",configurable:!0});function EL(c,f,w,D,k,H){function X(){return f}a(X,"startAlgorithm");function ve(lt){return RL(c,lt)}a(ve,"writeAlgorithm");function Oe(lt){return DL(c,lt)}a(Oe,"abortAlgorithm");function Te(){return OL(c)}a(Te,"closeAlgorithm"),c._writable=AF(X,ve,Te,Oe,w,D);function Ue(){return $L(c)}a(Ue,"pullAlgorithm");function Ge(lt){return CL(c,lt)}a(Ge,"cancelAlgorithm"),c._readable=gs(X,Ue,Ge,k,H),c._backpressure=void 0,c._backpressureChangePromise=void 0,c._backpressureChangePromise_resolve=void 0,Ml(c,!0),c._transformStreamController=void 0}a(EL,"InitializeTransformStream");function KE(c){return!n(c)||!Object.prototype.hasOwnProperty.call(c,"_transformStreamController")?!1:c instanceof Ul}a(KE,"IsTransformStream");function JE(c,f){Hr(c._readable._readableStreamController,f),Vh(c,f)}a(JE,"TransformStreamError");function Vh(c,f){Ll(c._transformStreamController),fs(c._writable._writableStreamController,f),Gh(c)}a(Vh,"TransformStreamErrorWritableAndUnblockWrite");function Gh(c){c._backpressure&&Ml(c,!1)}a(Gh,"TransformStreamUnblockWrite");function Ml(c,f){c._backpressureChangePromise!==void 0&&c._backpressureChangePromise_resolve(),c._backpressureChangePromise=h(w=>{c._backpressureChangePromise_resolve=w}),c._backpressure=f}a(Ml,"TransformStreamSetBackpressure");class co{static{a(this,"TransformStreamDefaultController")}constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!Fl(this))throw jl("desiredSize");let f=this._controlledTransformStream._readable._readableStreamController;return qh(f)}enqueue(f=void 0){if(!Fl(this))throw jl("enqueue");XE(this,f)}error(f=void 0){if(!Fl(this))throw jl("error");IL(this,f)}terminate(){if(!Fl(this))throw jl("terminate");AL(this)}}Object.defineProperties(co.prototype,{enqueue:{enumerable:!0},error:{enumerable:!0},terminate:{enumerable:!0},desiredSize:{enumerable:!0}}),r(co.prototype.enqueue,"enqueue"),r(co.prototype.error,"error"),r(co.prototype.terminate,"terminate"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(co.prototype,Symbol.toStringTag,{value:"TransformStreamDefaultController",configurable:!0});function Fl(c){return!n(c)||!Object.prototype.hasOwnProperty.call(c,"_controlledTransformStream")?!1:c instanceof co}a(Fl,"IsTransformStreamDefaultController");function SL(c,f,w,D,k){f._controlledTransformStream=c,c._transformStreamController=f,f._transformAlgorithm=w,f._flushAlgorithm=D,f._cancelAlgorithm=k,f._finishPromise=void 0,f._finishPromise_resolve=void 0,f._finishPromise_reject=void 0}a(SL,"SetUpTransformStreamDefaultController");function xL(c,f){let w=Object.create(co.prototype),D,k,H;f.transform!==void 0?D=a(X=>f.transform(X,w),"transformAlgorithm"):D=a(X=>{try{return XE(w,X),g(void 0)}catch(ve){return y(ve)}},"transformAlgorithm"),f.flush!==void 0?k=a(()=>f.flush(w),"flushAlgorithm"):k=a(()=>g(void 0),"flushAlgorithm"),f.cancel!==void 0?H=a(X=>f.cancel(X),"cancelAlgorithm"):H=a(()=>g(void 0),"cancelAlgorithm"),SL(c,w,D,k,H)}a(xL,"SetUpTransformStreamDefaultControllerFromTransformer");function Ll(c){c._transformAlgorithm=void 0,c._flushAlgorithm=void 0,c._cancelAlgorithm=void 0}a(Ll,"TransformStreamDefaultControllerClearAlgorithms");function XE(c,f){let w=c._controlledTransformStream,D=w._readable._readableStreamController;if(!Li(D))throw new TypeError("Readable side is not in a state that permits enqueue");try{Fi(D,f)}catch(H){throw Vh(w,H),w._readable._storedError}rL(D)!==w._backpressure&&Ml(w,!0)}a(XE,"TransformStreamDefaultControllerEnqueue");function IL(c,f){JE(c._controlledTransformStream,f)}a(IL,"TransformStreamDefaultControllerError");function YE(c,f){let w=c._transformAlgorithm(f);return R(w,void 0,D=>{throw JE(c._controlledTransformStream,D),D})}a(YE,"TransformStreamDefaultControllerPerformTransform");function AL(c){let f=c._controlledTransformStream,w=f._readable._readableStreamController;Ho(w);let D=new TypeError("TransformStream terminated");Vh(f,D)}a(AL,"TransformStreamDefaultControllerTerminate");function RL(c,f){let w=c._transformStreamController;if(c._backpressure){let D=c._backpressureChangePromise;return R(D,()=>{let k=c._writable;if(k._state==="erroring")throw k._storedError;return YE(w,f)})}return YE(w,f)}a(RL,"TransformStreamDefaultSinkWriteAlgorithm");function DL(c,f){let w=c._transformStreamController;if(w._finishPromise!==void 0)return w._finishPromise;let D=c._readable;w._finishPromise=h((H,X)=>{w._finishPromise_resolve=H,w._finishPromise_reject=X});let k=w._cancelAlgorithm(f);return Ll(w),b(k,()=>(D._state==="errored"?ji(w,D._storedError):(Hr(D._readableStreamController,f),Hh(w)),null),H=>(Hr(D._readableStreamController,H),ji(w,H),null)),w._finishPromise}a(DL,"TransformStreamDefaultSinkAbortAlgorithm");function OL(c){let f=c._transformStreamController;if(f._finishPromise!==void 0)return f._finishPromise;let w=c._readable;f._finishPromise=h((k,H)=>{f._finishPromise_resolve=k,f._finishPromise_reject=H});let D=f._flushAlgorithm();return Ll(f),b(D,()=>(w._state==="errored"?ji(f,w._storedError):(Ho(w._readableStreamController),Hh(f)),null),k=>(Hr(w._readableStreamController,k),ji(f,k),null)),f._finishPromise}a(OL,"TransformStreamDefaultSinkCloseAlgorithm");function $L(c){return Ml(c,!1),c._backpressureChangePromise}a($L,"TransformStreamDefaultSourcePullAlgorithm");function CL(c,f){let w=c._transformStreamController;if(w._finishPromise!==void 0)return w._finishPromise;let D=c._writable;w._finishPromise=h((H,X)=>{w._finishPromise_resolve=H,w._finishPromise_reject=X});let k=w._cancelAlgorithm(f);return Ll(w),b(k,()=>(D._state==="errored"?ji(w,D._storedError):(fs(D._writableStreamController,f),Gh(c),Hh(w)),null),H=>(fs(D._writableStreamController,H),Gh(c),ji(w,H),null)),w._finishPromise}a(CL,"TransformStreamDefaultSourceCancelAlgorithm");function jl(c){return new TypeError(`TransformStreamDefaultController.prototype.${c} can only be used on a TransformStreamDefaultController`)}a(jl,"defaultControllerBrandCheckException");function Hh(c){c._finishPromise_resolve!==void 0&&(c._finishPromise_resolve(),c._finishPromise_resolve=void 0,c._finishPromise_reject=void 0)}a(Hh,"defaultControllerFinishPromiseResolve");function ji(c,f){c._finishPromise_reject!==void 0&&(I(c._finishPromise),c._finishPromise_reject(f),c._finishPromise_resolve=void 0,c._finishPromise_reject=void 0)}a(ji,"defaultControllerFinishPromiseReject");function QE(c){return new TypeError(`TransformStream.prototype.${c} can only be used on a TransformStream`)}a(QE,"streamBrandCheckException"),e.ByteLengthQueuingStrategy=kl,e.CountQueuingStrategy=zl,e.ReadableByteStreamController=$n,e.ReadableStream=Vt,e.ReadableStreamBYOBReader=oo,e.ReadableStreamBYOBRequest=Lo,e.ReadableStreamDefaultController=Nn,e.ReadableStreamDefaultReader=te,e.TransformStream=Ul,e.TransformStreamDefaultController=co,e.WritableStream=io,e.WritableStreamDefaultController=Mi,e.WritableStreamDefaultWriter=Cn}))});var X0=j(()=>{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,J0())}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*aw(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,Y0),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+Y0)).arrayBuffer();o+=s.byteLength,yield new Uint8Array(s)}}}var Qse,Y0,Q0,x2,tn,xu=Ct(()=>{Qse=he(X0(),1);Y0=65536;a(aw,"toIterator");Q0=class sw{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 sw?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 aw(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 aw(this.#e,!1))t.set(o,n),n+=o.length;return t.buffer}stream(){let t=aw(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),h=this.#e,g=[],y=0;for(let b of h){if(y>=u)break;let P=ArrayBuffer.isView(b)?b.byteLength:b.size;if(i&&P<=i)i-=P,s-=P;else{let S;ArrayBuffer.isView(b)?(S=b.subarray(i,Math.min(P,s)),y+=S.byteLength):(S=b.slice(i,Math.min(P,s)),y+=S.size),s-=P,g.push(S),i=0}}let T=new sw([],{type:String(o).toLowerCase()});return T.#r=u,T.#e=g,T}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(Q0.prototype,{size:{enumerable:!0},type:{enumerable:!0},slice:{enumerable:!0}});x2=Q0,tn=x2});var I2,A2,Oo,cw=Ct(()=>{xu();I2=class extends tn{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 tn&&/^(File)$/.test(t[Symbol.toStringTag])}},A2=I2,Oo=A2});function rO(e,t=tn){var n=`${eO()}${eO()}`.replace(/\./g,"").slice(-28).padStart(32,"-"),o=[],r=`--${n}\r
13
+ `;let h=(0,E2.parseProxyResponse)(r);r.write(`${u}\r
14
+ `);let{connect:g,buffered:y}=await h;if(t.emit("proxyConnect",g),this.emit("proxyConnect",g,t),g.statusCode===200)return t.once("socket",S2),n.secureEndpoint?(Su("Upgrading socket connection to TLS"),j0.connect({...B0(q0(n),"host","path","port"),socket:r})):r;r.destroy();let T=new Ff.Socket({writable:!1});return T.readable=!0,t.once("socket",b=>{Su("Replaying proxy buffer for failed request"),(0,P2.default)(b.listenerCount("data")>0),b.push(y),b.push(null)}),T}};Lf.protocols=["http","https"];Lr.HttpsProxyAgent=Lf;function S2(e){e.resume()}a(S2,"resume");function B0(e,...t){let n={},o;for(o in e)t.includes(o)||(n[o]=e[o]);return n}a(B0,"omit")});function x2(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 y=1;y<n.length;y++)n[y]==="base64"?r=!0:n[y]&&(s+=`;${n[y]}`,n[y].indexOf("charset=")===0&&(o=n[y].substring(8)));!n[0]&&!o.length&&(s+=";charset=US-ASCII",o="US-ASCII");let u=r?"base64":"ascii",h=unescape(e.substring(t+1)),g=Buffer.from(h,u);return g.type=i,g.typeFull=s,g.charset=o,g}var Z0,W0=Ct(()=>{a(x2,"dataUriToBuffer");Z0=x2});var J0=j((jf,K0)=>{(function(e,t){typeof jf=="object"&&typeof K0<"u"?t(jf):typeof define=="function"&&define.amd?define(["exports"],t):(e=typeof globalThis<"u"?globalThis:e||self,t(e.WebStreamsPolyfill={}))})(jf,(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,f){try{Object.defineProperty(c,"name",{value:f,configurable:!0})}catch{}}a(r,"setFunctionName");let i=Promise,s=Promise.prototype.then,u=Promise.reject.bind(i);function h(c){return new i(c)}a(h,"newPromise");function g(c){return h(f=>f(c))}a(g,"promiseResolvedWith");function y(c){return u(c)}a(y,"promiseRejectedWith");function T(c,f,w){return s.call(c,f,w)}a(T,"PerformPromiseThen");function b(c,f,w){T(T(c,f,w),void 0,o)}a(b,"uponPromise");function P(c,f){b(c,f)}a(P,"uponFulfillment");function S(c,f){b(c,void 0,f)}a(S,"uponRejection");function R(c,f,w){return T(c,f,w)}a(R,"transformPromiseWith");function I(c){T(c,void 0,o)}a(I,"setPromiseIsHandledToTrue");let l=a(c=>{if(typeof queueMicrotask=="function")l=queueMicrotask;else{let f=g(void 0);l=a(w=>T(f,w),"_queueMicrotask")}return l(c)},"_queueMicrotask");function m(c,f,w){if(typeof c!="function")throw new TypeError("Argument is not a function");return Function.prototype.apply.call(c,f,w)}a(m,"reflectCall");function d(c,f,w){try{return g(m(c,f,w))}catch(D){return y(D)}}a(d,"promiseCall");let v=16384;class p{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(f){let w=this._back,D=w;w._elements.length===v-1&&(D={_elements:[],_next:void 0}),w._elements.push(f),D!==w&&(this._back=D,w._next=D),++this._size}shift(){let f=this._front,w=f,D=this._cursor,k=D+1,H=f._elements,X=H[D];return k===v&&(w=f._next,k=0),--this._size,this._cursor=k,f!==w&&(this._front=w),H[D]=void 0,X}forEach(f){let w=this._cursor,D=this._front,k=D._elements;for(;(w!==k.length||D._next!==void 0)&&!(w===k.length&&(D=D._next,k=D._elements,w=0,k.length===0));)f(k[w]),++w}peek(){let f=this._front,w=this._cursor;return f._elements[w]}}let E=Symbol("[[AbortSteps]]"),_=Symbol("[[ErrorSteps]]"),pe=Symbol("[[CancelSteps]]"),oe=Symbol("[[PullSteps]]"),Be=Symbol("[[ReleaseSteps]]");function me(c,f){c._ownerReadableStream=f,f._reader=c,f._state==="readable"?ne(c):f._state==="closed"?_e(c):ge(c,f._storedError)}a(me,"ReadableStreamReaderGenericInitialize");function ee(c,f){let w=c._ownerReadableStream;return Zr(w,f)}a(ee,"ReadableStreamReaderGenericCancel");function Q(c){let f=c._ownerReadableStream;f._state==="readable"?Fe(c,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):Ve(c,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")),f._readableStreamController[Be](),f._reader=void 0,c._ownerReadableStream=void 0}a(Q,"ReadableStreamReaderGenericRelease");function se(c){return new TypeError("Cannot "+c+" a stream using a released reader")}a(se,"readerLockException");function ne(c){c._closedPromise=h((f,w)=>{c._closedPromise_resolve=f,c._closedPromise_reject=w})}a(ne,"defaultReaderClosedPromiseInitialize");function ge(c,f){ne(c),Fe(c,f)}a(ge,"defaultReaderClosedPromiseInitializeAsRejected");function _e(c){ne(c),nt(c)}a(_e,"defaultReaderClosedPromiseInitializeAsResolved");function Fe(c,f){c._closedPromise_reject!==void 0&&(I(c._closedPromise),c._closedPromise_reject(f),c._closedPromise_resolve=void 0,c._closedPromise_reject=void 0)}a(Fe,"defaultReaderClosedPromiseReject");function Ve(c,f){ge(c,f)}a(Ve,"defaultReaderClosedPromiseResetToRejected");function nt(c){c._closedPromise_resolve!==void 0&&(c._closedPromise_resolve(void 0),c._closedPromise_resolve=void 0,c._closedPromise_reject=void 0)}a(nt,"defaultReaderClosedPromiseResolve");let ut=Number.isFinite||function(c){return typeof c=="number"&&isFinite(c)},$t=Math.trunc||function(c){return c<0?Math.ceil(c):Math.floor(c)};function le(c){return typeof c=="object"||typeof c=="function"}a(le,"isDictionary");function Pt(c,f){if(c!==void 0&&!le(c))throw new TypeError(`${f} is not an object.`)}a(Pt,"assertDictionary");function Tt(c,f){if(typeof c!="function")throw new TypeError(`${f} is not a function.`)}a(Tt,"assertFunction");function mr(c){return typeof c=="object"&&c!==null||typeof c=="function"}a(mr,"isObject");function et(c,f){if(!mr(c))throw new TypeError(`${f} is not an object.`)}a(et,"assertObject");function ot(c,f,w){if(c===void 0)throw new TypeError(`Parameter ${f} is required in '${w}'.`)}a(ot,"assertRequiredArgument");function A(c,f,w){if(c===void 0)throw new TypeError(`${f} is required in '${w}'.`)}a(A,"assertRequiredField");function O(c){return Number(c)}a(O,"convertUnrestrictedDouble");function C(c){return c===0?0:c}a(C,"censorNegativeZero");function B(c){return C($t(c))}a(B,"integerPart");function U(c,f){let D=Number.MAX_SAFE_INTEGER,k=Number(c);if(k=C(k),!ut(k))throw new TypeError(`${f} is not a finite number`);if(k=B(k),k<0||k>D)throw new TypeError(`${f} is outside the accepted range of 0 to ${D}, inclusive`);return!ut(k)||k===0?0:k}a(U,"convertUnsignedLongLongWithEnforceRange");function L(c,f){if(!ao(c))throw new TypeError(`${f} is not a ReadableStream.`)}a(L,"assertReadableStream");function Z(c){return new te(c)}a(Z,"AcquireReadableStreamDefaultReader");function z(c,f){c._reader._readRequests.push(f)}a(z,"ReadableStreamAddReadRequest");function F(c,f,w){let k=c._reader._readRequests.shift();w?k._closeSteps():k._chunkSteps(f)}a(F,"ReadableStreamFulfillReadRequest");function G(c){return c._reader._readRequests.length}a(G,"ReadableStreamGetNumReadRequests");function q(c){let f=c._reader;return!(f===void 0||!Pe(f))}a(q,"ReadableStreamHasDefaultReader");class te{static{a(this,"ReadableStreamDefaultReader")}constructor(f){if(ot(f,1,"ReadableStreamDefaultReader"),L(f,"First parameter"),so(f))throw new TypeError("This stream has already been locked for exclusive reading by another reader");me(this,f),this._readRequests=new p}get closed(){return Pe(this)?this._closedPromise:y(mt("closed"))}cancel(f=void 0){return Pe(this)?this._ownerReadableStream===void 0?y(se("cancel")):ee(this,f):y(mt("cancel"))}read(){if(!Pe(this))return y(mt("read"));if(this._ownerReadableStream===void 0)return y(se("read from"));let f,w,D=h((H,X)=>{f=H,w=X});return be(this,{_chunkSteps:a(H=>f({value:H,done:!1}),"_chunkSteps"),_closeSteps:a(()=>f({value:void 0,done:!0}),"_closeSteps"),_errorSteps:a(H=>w(H),"_errorSteps")}),D}releaseLock(){if(!Pe(this))throw mt("releaseLock");this._ownerReadableStream!==void 0&&Xe(this)}}Object.defineProperties(te.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),r(te.prototype.cancel,"cancel"),r(te.prototype.read,"read"),r(te.prototype.releaseLock,"releaseLock"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(te.prototype,Symbol.toStringTag,{value:"ReadableStreamDefaultReader",configurable:!0});function Pe(c){return!n(c)||!Object.prototype.hasOwnProperty.call(c,"_readRequests")?!1:c instanceof te}a(Pe,"IsReadableStreamDefaultReader");function be(c,f){let w=c._ownerReadableStream;w._disturbed=!0,w._state==="closed"?f._closeSteps():w._state==="errored"?f._errorSteps(w._storedError):w._readableStreamController[oe](f)}a(be,"ReadableStreamDefaultReaderRead");function Xe(c){Q(c);let f=new TypeError("Reader was released");ft(c,f)}a(Xe,"ReadableStreamDefaultReaderRelease");function ft(c,f){let w=c._readRequests;c._readRequests=new p,w.forEach(D=>{D._errorSteps(f)})}a(ft,"ReadableStreamDefaultReaderErrorReadRequests");function mt(c){return new TypeError(`ReadableStreamDefaultReader.prototype.${c} can only be used on a ReadableStreamDefaultReader`)}a(mt,"defaultReaderBrandCheckException");let Ke=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);class Qe{static{a(this,"ReadableStreamAsyncIteratorImpl")}constructor(f,w){this._ongoingPromise=void 0,this._isFinished=!1,this._reader=f,this._preventCancel=w}next(){let f=a(()=>this._nextSteps(),"nextSteps");return this._ongoingPromise=this._ongoingPromise?R(this._ongoingPromise,f,f):f(),this._ongoingPromise}return(f){let w=a(()=>this._returnSteps(f),"returnSteps");return this._ongoingPromise?R(this._ongoingPromise,w,w):w()}_nextSteps(){if(this._isFinished)return Promise.resolve({value:void 0,done:!0});let f=this._reader,w,D,k=h((X,ve)=>{w=X,D=ve});return be(f,{_chunkSteps:a(X=>{this._ongoingPromise=void 0,l(()=>w({value:X,done:!1}))},"_chunkSteps"),_closeSteps:a(()=>{this._ongoingPromise=void 0,this._isFinished=!0,Q(f),w({value:void 0,done:!0})},"_closeSteps"),_errorSteps:a(X=>{this._ongoingPromise=void 0,this._isFinished=!0,Q(f),D(X)},"_errorSteps")}),k}_returnSteps(f){if(this._isFinished)return Promise.resolve({value:f,done:!0});this._isFinished=!0;let w=this._reader;if(!this._preventCancel){let D=ee(w,f);return Q(w),R(D,()=>({value:f,done:!0}))}return Q(w),g({value:f,done:!0})}}let At={next(){return Ci(this)?this._asyncIteratorImpl.next():y(Ni("next"))},return(c){return Ci(this)?this._asyncIteratorImpl.return(c):y(Ni("return"))}};Object.setPrototypeOf(At,Ke);function $i(c,f){let w=Z(c),D=new Qe(w,f),k=Object.create(At);return k._asyncIteratorImpl=D,k}a($i,"AcquireReadableStreamAsyncIterator");function Ci(c){if(!n(c)||!Object.prototype.hasOwnProperty.call(c,"_asyncIteratorImpl"))return!1;try{return c._asyncIteratorImpl instanceof Qe}catch{return!1}}a(Ci,"IsReadableStreamAsyncIterator");function Ni(c){return new TypeError(`ReadableStreamAsyncIterator.${c} can only be used on a ReadableSteamAsyncIterator`)}a(Ni,"streamAsyncIteratorBrandCheckException");let hr=Number.isNaN||function(c){return c!==c};var Dn,Bt,Rt;function it(c){return c.slice()}a(it,"CreateArrayFromList");function QT(c,f,w,D,k){new Uint8Array(c).set(new Uint8Array(w,D,k),f)}a(QT,"CopyDataBlockBytes");let On=a(c=>(typeof c.transfer=="function"?On=a(f=>f.transfer(),"TransferArrayBuffer"):typeof structuredClone=="function"?On=a(f=>structuredClone(f,{transfer:[f]}),"TransferArrayBuffer"):On=a(f=>f,"TransferArrayBuffer"),On(c)),"TransferArrayBuffer"),ro=a(c=>(typeof c.detached=="boolean"?ro=a(f=>f.detached,"IsDetachedBuffer"):ro=a(f=>f.byteLength===0,"IsDetachedBuffer"),ro(c)),"IsDetachedBuffer");function eE(c,f,w){if(c.slice)return c.slice(f,w);let D=w-f,k=new ArrayBuffer(D);return QT(k,0,c,f,D),k}a(eE,"ArrayBufferSlice");function gl(c,f){let w=c[f];if(w!=null){if(typeof w!="function")throw new TypeError(`${String(f)} is not a function`);return w}}a(gl,"GetMethod");function QM(c){let f={[Symbol.iterator]:()=>c.iterator},w=(async function*(){return yield*f})(),D=w.next;return{iterator:w,nextMethod:D,done:!1}}a(QM,"CreateAsyncFromSyncIterator");let wh=(Rt=(Dn=Symbol.asyncIterator)!==null&&Dn!==void 0?Dn:(Bt=Symbol.for)===null||Bt===void 0?void 0:Bt.call(Symbol,"Symbol.asyncIterator"))!==null&&Rt!==void 0?Rt:"@@asyncIterator";function tE(c,f="sync",w){if(w===void 0)if(f==="async"){if(w=gl(c,wh),w===void 0){let H=gl(c,Symbol.iterator),X=tE(c,"sync",H);return QM(X)}}else w=gl(c,Symbol.iterator);if(w===void 0)throw new TypeError("The object is not iterable");let D=m(w,c,[]);if(!n(D))throw new TypeError("The iterator method must return an object");let k=D.next;return{iterator:D,nextMethod:k,done:!1}}a(tE,"GetIterator");function eF(c){let f=m(c.nextMethod,c.iterator,[]);if(!n(f))throw new TypeError("The iterator.next() method must return an object");return f}a(eF,"IteratorNext");function tF(c){return!!c.done}a(tF,"IteratorComplete");function rF(c){return c.value}a(rF,"IteratorValue");function nF(c){return!(typeof c!="number"||hr(c)||c<0)}a(nF,"IsNonNegativeNumber");function rE(c){let f=eE(c.buffer,c.byteOffset,c.byteOffset+c.byteLength);return new Uint8Array(f)}a(rE,"CloneAsUint8Array");function bh(c){let f=c._queue.shift();return c._queueTotalSize-=f.size,c._queueTotalSize<0&&(c._queueTotalSize=0),f.value}a(bh,"DequeueValue");function Th(c,f,w){if(!nF(w)||w===1/0)throw new RangeError("Size must be a finite, non-NaN, non-negative number.");c._queue.push({value:f,size:w}),c._queueTotalSize+=w}a(Th,"EnqueueValueWithSize");function oF(c){return c._queue.peek().value}a(oF,"PeekQueueValue");function no(c){c._queue=new p,c._queueTotalSize=0}a(no,"ResetQueue");function nE(c){return c===DataView}a(nE,"isDataViewConstructor");function iF(c){return nE(c.constructor)}a(iF,"isDataView");function aF(c){return nE(c)?1:c.BYTES_PER_ELEMENT}a(aF,"arrayBufferViewElementSize");class Lo{static{a(this,"ReadableStreamBYOBRequest")}constructor(){throw new TypeError("Illegal constructor")}get view(){if(!Eh(this))throw Rh("view");return this._view}respond(f){if(!Eh(this))throw Rh("respond");if(ot(f,1,"respond"),f=U(f,"First parameter"),this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");if(ro(this._view.buffer))throw new TypeError("The BYOB request's buffer has been detached and so cannot be used as a response");Pl(this._associatedReadableByteStreamController,f)}respondWithNewView(f){if(!Eh(this))throw Rh("respondWithNewView");if(ot(f,1,"respondWithNewView"),!ArrayBuffer.isView(f))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(ro(f.buffer))throw new TypeError("The given view's buffer has been detached and so cannot be used as a response");wl(this._associatedReadableByteStreamController,f)}}Object.defineProperties(Lo.prototype,{respond:{enumerable:!0},respondWithNewView:{enumerable:!0},view:{enumerable:!0}}),r(Lo.prototype.respond,"respond"),r(Lo.prototype.respondWithNewView,"respondWithNewView"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Lo.prototype,Symbol.toStringTag,{value:"ReadableStreamBYOBRequest",configurable:!0});class $n{static{a(this,"ReadableByteStreamController")}constructor(){throw new TypeError("Illegal constructor")}get byobRequest(){if(!jo(this))throw ds("byobRequest");return Ah(this)}get desiredSize(){if(!jo(this))throw ds("desiredSize");return fE(this)}close(){if(!jo(this))throw ds("close");if(this._closeRequested)throw new TypeError("The stream has already been closed; do not close it again!");let f=this._controlledReadableByteStream._state;if(f!=="readable")throw new TypeError(`The stream (in ${f} state) is not in the readable state and cannot be closed`);ls(this)}enqueue(f){if(!jo(this))throw ds("enqueue");if(ot(f,1,"enqueue"),!ArrayBuffer.isView(f))throw new TypeError("chunk must be an array buffer view");if(f.byteLength===0)throw new TypeError("chunk must have non-zero byteLength");if(f.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 w=this._controlledReadableByteStream._state;if(w!=="readable")throw new TypeError(`The stream (in ${w} state) is not in the readable state and cannot be enqueued to`);_l(this,f)}error(f=void 0){if(!jo(this))throw ds("error");Cr(this,f)}[pe](f){oE(this),no(this);let w=this._cancelAlgorithm(f);return vl(this),w}[oe](f){let w=this._controlledReadableByteStream;if(this._queueTotalSize>0){pE(this,f);return}let D=this._autoAllocateChunkSize;if(D!==void 0){let k;try{k=new ArrayBuffer(D)}catch(X){f._errorSteps(X);return}let H={buffer:k,bufferByteLength:D,byteOffset:0,byteLength:D,bytesFilled:0,minimumFill:1,elementSize:1,viewConstructor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(H)}z(w,f),qo(this)}[Be](){if(this._pendingPullIntos.length>0){let f=this._pendingPullIntos.peek();f.readerType="none",this._pendingPullIntos=new p,this._pendingPullIntos.push(f)}}}Object.defineProperties($n.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},byobRequest:{enumerable:!0},desiredSize:{enumerable:!0}}),r($n.prototype.close,"close"),r($n.prototype.enqueue,"enqueue"),r($n.prototype.error,"error"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty($n.prototype,Symbol.toStringTag,{value:"ReadableByteStreamController",configurable:!0});function jo(c){return!n(c)||!Object.prototype.hasOwnProperty.call(c,"_controlledReadableByteStream")?!1:c instanceof $n}a(jo,"IsReadableByteStreamController");function Eh(c){return!n(c)||!Object.prototype.hasOwnProperty.call(c,"_associatedReadableByteStreamController")?!1:c instanceof Lo}a(Eh,"IsReadableStreamBYOBRequest");function qo(c){if(!dF(c))return;if(c._pulling){c._pullAgain=!0;return}c._pulling=!0;let w=c._pullAlgorithm();b(w,()=>(c._pulling=!1,c._pullAgain&&(c._pullAgain=!1,qo(c)),null),D=>(Cr(c,D),null))}a(qo,"ReadableByteStreamControllerCallPullIfNeeded");function oE(c){xh(c),c._pendingPullIntos=new p}a(oE,"ReadableByteStreamControllerClearPendingPullIntos");function Sh(c,f){let w=!1;c._state==="closed"&&(w=!0);let D=iE(f);f.readerType==="default"?F(c,D,w):yF(c,D,w)}a(Sh,"ReadableByteStreamControllerCommitPullIntoDescriptor");function iE(c){let f=c.bytesFilled,w=c.elementSize;return new c.viewConstructor(c.buffer,c.byteOffset,f/w)}a(iE,"ReadableByteStreamControllerConvertPullIntoDescriptor");function yl(c,f,w,D){c._queue.push({buffer:f,byteOffset:w,byteLength:D}),c._queueTotalSize+=D}a(yl,"ReadableByteStreamControllerEnqueueChunkToQueue");function aE(c,f,w,D){let k;try{k=eE(f,w,w+D)}catch(H){throw Cr(c,H),H}yl(c,k,0,D)}a(aE,"ReadableByteStreamControllerEnqueueClonedChunkToQueue");function sE(c,f){f.bytesFilled>0&&aE(c,f.buffer,f.byteOffset,f.bytesFilled),ki(c)}a(sE,"ReadableByteStreamControllerEnqueueDetachedPullIntoToQueue");function cE(c,f){let w=Math.min(c._queueTotalSize,f.byteLength-f.bytesFilled),D=f.bytesFilled+w,k=w,H=!1,X=D%f.elementSize,ve=D-X;ve>=f.minimumFill&&(k=ve-f.bytesFilled,H=!0);let Oe=c._queue;for(;k>0;){let Te=Oe.peek(),Ue=Math.min(k,Te.byteLength),Ge=f.byteOffset+f.bytesFilled;QT(f.buffer,Ge,Te.buffer,Te.byteOffset,Ue),Te.byteLength===Ue?Oe.shift():(Te.byteOffset+=Ue,Te.byteLength-=Ue),c._queueTotalSize-=Ue,uE(c,Ue,f),k-=Ue}return H}a(cE,"ReadableByteStreamControllerFillPullIntoDescriptorFromQueue");function uE(c,f,w){w.bytesFilled+=f}a(uE,"ReadableByteStreamControllerFillHeadPullIntoDescriptor");function lE(c){c._queueTotalSize===0&&c._closeRequested?(vl(c),ys(c._controlledReadableByteStream)):qo(c)}a(lE,"ReadableByteStreamControllerHandleQueueDrain");function xh(c){c._byobRequest!==null&&(c._byobRequest._associatedReadableByteStreamController=void 0,c._byobRequest._view=null,c._byobRequest=null)}a(xh,"ReadableByteStreamControllerInvalidateBYOBRequest");function Ih(c){for(;c._pendingPullIntos.length>0;){if(c._queueTotalSize===0)return;let f=c._pendingPullIntos.peek();cE(c,f)&&(ki(c),Sh(c._controlledReadableByteStream,f))}}a(Ih,"ReadableByteStreamControllerProcessPullIntoDescriptorsUsingQueue");function sF(c){let f=c._controlledReadableByteStream._reader;for(;f._readRequests.length>0;){if(c._queueTotalSize===0)return;let w=f._readRequests.shift();pE(c,w)}}a(sF,"ReadableByteStreamControllerProcessReadRequestsUsingQueue");function cF(c,f,w,D){let k=c._controlledReadableByteStream,H=f.constructor,X=aF(H),{byteOffset:ve,byteLength:Oe}=f,Te=w*X,Ue;try{Ue=On(f.buffer)}catch(lt){D._errorSteps(lt);return}let Ge={buffer:Ue,bufferByteLength:Ue.byteLength,byteOffset:ve,byteLength:Oe,bytesFilled:0,minimumFill:Te,elementSize:X,viewConstructor:H,readerType:"byob"};if(c._pendingPullIntos.length>0){c._pendingPullIntos.push(Ge),gE(k,D);return}if(k._state==="closed"){let lt=new H(Ge.buffer,Ge.byteOffset,0);D._closeSteps(lt);return}if(c._queueTotalSize>0){if(cE(c,Ge)){let lt=iE(Ge);lE(c),D._chunkSteps(lt);return}if(c._closeRequested){let lt=new TypeError("Insufficient bytes to fill elements in the given buffer");Cr(c,lt),D._errorSteps(lt);return}}c._pendingPullIntos.push(Ge),gE(k,D),qo(c)}a(cF,"ReadableByteStreamControllerPullInto");function uF(c,f){f.readerType==="none"&&ki(c);let w=c._controlledReadableByteStream;if(Dh(w))for(;yE(w)>0;){let D=ki(c);Sh(w,D)}}a(uF,"ReadableByteStreamControllerRespondInClosedState");function lF(c,f,w){if(uE(c,f,w),w.readerType==="none"){sE(c,w),Ih(c);return}if(w.bytesFilled<w.minimumFill)return;ki(c);let D=w.bytesFilled%w.elementSize;if(D>0){let k=w.byteOffset+w.bytesFilled;aE(c,w.buffer,k-D,D)}w.bytesFilled-=D,Sh(c._controlledReadableByteStream,w),Ih(c)}a(lF,"ReadableByteStreamControllerRespondInReadableState");function dE(c,f){let w=c._pendingPullIntos.peek();xh(c),c._controlledReadableByteStream._state==="closed"?uF(c,w):lF(c,f,w),qo(c)}a(dE,"ReadableByteStreamControllerRespondInternal");function ki(c){return c._pendingPullIntos.shift()}a(ki,"ReadableByteStreamControllerShiftPendingPullInto");function dF(c){let f=c._controlledReadableByteStream;return f._state!=="readable"||c._closeRequested||!c._started?!1:!!(q(f)&&G(f)>0||Dh(f)&&yE(f)>0||fE(c)>0)}a(dF,"ReadableByteStreamControllerShouldCallPull");function vl(c){c._pullAlgorithm=void 0,c._cancelAlgorithm=void 0}a(vl,"ReadableByteStreamControllerClearAlgorithms");function ls(c){let f=c._controlledReadableByteStream;if(!(c._closeRequested||f._state!=="readable")){if(c._queueTotalSize>0){c._closeRequested=!0;return}if(c._pendingPullIntos.length>0){let w=c._pendingPullIntos.peek();if(w.bytesFilled%w.elementSize!==0){let D=new TypeError("Insufficient bytes to fill elements in the given buffer");throw Cr(c,D),D}}vl(c),ys(f)}}a(ls,"ReadableByteStreamControllerClose");function _l(c,f){let w=c._controlledReadableByteStream;if(c._closeRequested||w._state!=="readable")return;let{buffer:D,byteOffset:k,byteLength:H}=f;if(ro(D))throw new TypeError("chunk's buffer is detached and so cannot be enqueued");let X=On(D);if(c._pendingPullIntos.length>0){let ve=c._pendingPullIntos.peek();if(ro(ve.buffer))throw new TypeError("The BYOB request's buffer has been detached and so cannot be filled with an enqueued chunk");xh(c),ve.buffer=On(ve.buffer),ve.readerType==="none"&&sE(c,ve)}if(q(w))if(sF(c),G(w)===0)yl(c,X,k,H);else{c._pendingPullIntos.length>0&&ki(c);let ve=new Uint8Array(X,k,H);F(w,ve,!1)}else Dh(w)?(yl(c,X,k,H),Ih(c)):yl(c,X,k,H);qo(c)}a(_l,"ReadableByteStreamControllerEnqueue");function Cr(c,f){let w=c._controlledReadableByteStream;w._state==="readable"&&(oE(c),no(c),vl(c),jE(w,f))}a(Cr,"ReadableByteStreamControllerError");function pE(c,f){let w=c._queue.shift();c._queueTotalSize-=w.byteLength,lE(c);let D=new Uint8Array(w.buffer,w.byteOffset,w.byteLength);f._chunkSteps(D)}a(pE,"ReadableByteStreamControllerFillReadRequestFromQueue");function Ah(c){if(c._byobRequest===null&&c._pendingPullIntos.length>0){let f=c._pendingPullIntos.peek(),w=new Uint8Array(f.buffer,f.byteOffset+f.bytesFilled,f.byteLength-f.bytesFilled),D=Object.create(Lo.prototype);fF(D,c,w),c._byobRequest=D}return c._byobRequest}a(Ah,"ReadableByteStreamControllerGetBYOBRequest");function fE(c){let f=c._controlledReadableByteStream._state;return f==="errored"?null:f==="closed"?0:c._strategyHWM-c._queueTotalSize}a(fE,"ReadableByteStreamControllerGetDesiredSize");function Pl(c,f){let w=c._pendingPullIntos.peek();if(c._controlledReadableByteStream._state==="closed"){if(f!==0)throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream")}else{if(f===0)throw new TypeError("bytesWritten must be greater than 0 when calling respond() on a readable stream");if(w.bytesFilled+f>w.byteLength)throw new RangeError("bytesWritten out of range")}w.buffer=On(w.buffer),dE(c,f)}a(Pl,"ReadableByteStreamControllerRespond");function wl(c,f){let w=c._pendingPullIntos.peek();if(c._controlledReadableByteStream._state==="closed"){if(f.byteLength!==0)throw new TypeError("The view's length must be 0 when calling respondWithNewView() on a closed stream")}else if(f.byteLength===0)throw new TypeError("The view's length must be greater than 0 when calling respondWithNewView() on a readable stream");if(w.byteOffset+w.bytesFilled!==f.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(w.bufferByteLength!==f.buffer.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");if(w.bytesFilled+f.byteLength>w.byteLength)throw new RangeError("The region specified by view is larger than byobRequest");let k=f.byteLength;w.buffer=On(f.buffer),dE(c,k)}a(wl,"ReadableByteStreamControllerRespondWithNewView");function mE(c,f,w,D,k,H,X){f._controlledReadableByteStream=c,f._pullAgain=!1,f._pulling=!1,f._byobRequest=null,f._queue=f._queueTotalSize=void 0,no(f),f._closeRequested=!1,f._started=!1,f._strategyHWM=H,f._pullAlgorithm=D,f._cancelAlgorithm=k,f._autoAllocateChunkSize=X,f._pendingPullIntos=new p,c._readableStreamController=f;let ve=w();b(g(ve),()=>(f._started=!0,qo(f),null),Oe=>(Cr(f,Oe),null))}a(mE,"SetUpReadableByteStreamController");function pF(c,f,w){let D=Object.create($n.prototype),k,H,X;f.start!==void 0?k=a(()=>f.start(D),"startAlgorithm"):k=a(()=>{},"startAlgorithm"),f.pull!==void 0?H=a(()=>f.pull(D),"pullAlgorithm"):H=a(()=>g(void 0),"pullAlgorithm"),f.cancel!==void 0?X=a(Oe=>f.cancel(Oe),"cancelAlgorithm"):X=a(()=>g(void 0),"cancelAlgorithm");let ve=f.autoAllocateChunkSize;if(ve===0)throw new TypeError("autoAllocateChunkSize must be greater than 0");mE(c,D,k,H,X,w,ve)}a(pF,"SetUpReadableByteStreamControllerFromUnderlyingSource");function fF(c,f,w){c._associatedReadableByteStreamController=f,c._view=w}a(fF,"SetUpReadableStreamBYOBRequest");function Rh(c){return new TypeError(`ReadableStreamBYOBRequest.prototype.${c} can only be used on a ReadableStreamBYOBRequest`)}a(Rh,"byobRequestBrandCheckException");function ds(c){return new TypeError(`ReadableByteStreamController.prototype.${c} can only be used on a ReadableByteStreamController`)}a(ds,"byteStreamControllerBrandCheckException");function mF(c,f){Pt(c,f);let w=c?.mode;return{mode:w===void 0?void 0:hF(w,`${f} has member 'mode' that`)}}a(mF,"convertReaderOptions");function hF(c,f){if(c=`${c}`,c!=="byob")throw new TypeError(`${f} '${c}' is not a valid enumeration value for ReadableStreamReaderMode`);return c}a(hF,"convertReadableStreamReaderMode");function gF(c,f){var w;Pt(c,f);let D=(w=c?.min)!==null&&w!==void 0?w:1;return{min:U(D,`${f} has member 'min' that`)}}a(gF,"convertByobReadOptions");function hE(c){return new oo(c)}a(hE,"AcquireReadableStreamBYOBReader");function gE(c,f){c._reader._readIntoRequests.push(f)}a(gE,"ReadableStreamAddReadIntoRequest");function yF(c,f,w){let k=c._reader._readIntoRequests.shift();w?k._closeSteps(f):k._chunkSteps(f)}a(yF,"ReadableStreamFulfillReadIntoRequest");function yE(c){return c._reader._readIntoRequests.length}a(yE,"ReadableStreamGetNumReadIntoRequests");function Dh(c){let f=c._reader;return!(f===void 0||!Bo(f))}a(Dh,"ReadableStreamHasBYOBReader");class oo{static{a(this,"ReadableStreamBYOBReader")}constructor(f){if(ot(f,1,"ReadableStreamBYOBReader"),L(f,"First parameter"),so(f))throw new TypeError("This stream has already been locked for exclusive reading by another reader");if(!jo(f._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");me(this,f),this._readIntoRequests=new p}get closed(){return Bo(this)?this._closedPromise:y(bl("closed"))}cancel(f=void 0){return Bo(this)?this._ownerReadableStream===void 0?y(se("cancel")):ee(this,f):y(bl("cancel"))}read(f,w={}){if(!Bo(this))return y(bl("read"));if(!ArrayBuffer.isView(f))return y(new TypeError("view must be an array buffer view"));if(f.byteLength===0)return y(new TypeError("view must have non-zero byteLength"));if(f.buffer.byteLength===0)return y(new TypeError("view's buffer must have non-zero byteLength"));if(ro(f.buffer))return y(new TypeError("view's buffer has been detached"));let D;try{D=gF(w,"options")}catch(Te){return y(Te)}let k=D.min;if(k===0)return y(new TypeError("options.min must be greater than 0"));if(iF(f)){if(k>f.byteLength)return y(new RangeError("options.min must be less than or equal to view's byteLength"))}else if(k>f.length)return y(new RangeError("options.min must be less than or equal to view's length"));if(this._ownerReadableStream===void 0)return y(se("read from"));let H,X,ve=h((Te,Ue)=>{H=Te,X=Ue});return vE(this,f,k,{_chunkSteps:a(Te=>H({value:Te,done:!1}),"_chunkSteps"),_closeSteps:a(Te=>H({value:Te,done:!0}),"_closeSteps"),_errorSteps:a(Te=>X(Te),"_errorSteps")}),ve}releaseLock(){if(!Bo(this))throw bl("releaseLock");this._ownerReadableStream!==void 0&&vF(this)}}Object.defineProperties(oo.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),r(oo.prototype.cancel,"cancel"),r(oo.prototype.read,"read"),r(oo.prototype.releaseLock,"releaseLock"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(oo.prototype,Symbol.toStringTag,{value:"ReadableStreamBYOBReader",configurable:!0});function Bo(c){return!n(c)||!Object.prototype.hasOwnProperty.call(c,"_readIntoRequests")?!1:c instanceof oo}a(Bo,"IsReadableStreamBYOBReader");function vE(c,f,w,D){let k=c._ownerReadableStream;k._disturbed=!0,k._state==="errored"?D._errorSteps(k._storedError):cF(k._readableStreamController,f,w,D)}a(vE,"ReadableStreamBYOBReaderRead");function vF(c){Q(c);let f=new TypeError("Reader was released");_E(c,f)}a(vF,"ReadableStreamBYOBReaderRelease");function _E(c,f){let w=c._readIntoRequests;c._readIntoRequests=new p,w.forEach(D=>{D._errorSteps(f)})}a(_E,"ReadableStreamBYOBReaderErrorReadIntoRequests");function bl(c){return new TypeError(`ReadableStreamBYOBReader.prototype.${c} can only be used on a ReadableStreamBYOBReader`)}a(bl,"byobReaderBrandCheckException");function ps(c,f){let{highWaterMark:w}=c;if(w===void 0)return f;if(hr(w)||w<0)throw new RangeError("Invalid highWaterMark");return w}a(ps,"ExtractHighWaterMark");function Tl(c){let{size:f}=c;return f||(()=>1)}a(Tl,"ExtractSizeAlgorithm");function El(c,f){Pt(c,f);let w=c?.highWaterMark,D=c?.size;return{highWaterMark:w===void 0?void 0:O(w),size:D===void 0?void 0:_F(D,`${f} has member 'size' that`)}}a(El,"convertQueuingStrategy");function _F(c,f){return Tt(c,f),w=>O(c(w))}a(_F,"convertQueuingStrategySize");function PF(c,f){Pt(c,f);let w=c?.abort,D=c?.close,k=c?.start,H=c?.type,X=c?.write;return{abort:w===void 0?void 0:wF(w,c,`${f} has member 'abort' that`),close:D===void 0?void 0:bF(D,c,`${f} has member 'close' that`),start:k===void 0?void 0:TF(k,c,`${f} has member 'start' that`),write:X===void 0?void 0:EF(X,c,`${f} has member 'write' that`),type:H}}a(PF,"convertUnderlyingSink");function wF(c,f,w){return Tt(c,w),D=>d(c,f,[D])}a(wF,"convertUnderlyingSinkAbortCallback");function bF(c,f,w){return Tt(c,w),()=>d(c,f,[])}a(bF,"convertUnderlyingSinkCloseCallback");function TF(c,f,w){return Tt(c,w),D=>m(c,f,[D])}a(TF,"convertUnderlyingSinkStartCallback");function EF(c,f,w){return Tt(c,w),(D,k)=>d(c,f,[D,k])}a(EF,"convertUnderlyingSinkWriteCallback");function PE(c,f){if(!zi(c))throw new TypeError(`${f} is not a WritableStream.`)}a(PE,"assertWritableStream");function SF(c){if(typeof c!="object"||c===null)return!1;try{return typeof c.aborted=="boolean"}catch{return!1}}a(SF,"isAbortSignal");let xF=typeof AbortController=="function";function IF(){if(xF)return new AbortController}a(IF,"createAbortController");class io{static{a(this,"WritableStream")}constructor(f={},w={}){f===void 0?f=null:et(f,"First parameter");let D=El(w,"Second parameter"),k=PF(f,"First parameter");if(bE(this),k.type!==void 0)throw new RangeError("Invalid type is specified");let X=Tl(D),ve=ps(D,1);jF(this,k,ve,X)}get locked(){if(!zi(this))throw Rl("locked");return Ui(this)}abort(f=void 0){return zi(this)?Ui(this)?y(new TypeError("Cannot abort a stream that already has a writer")):Sl(this,f):y(Rl("abort"))}close(){return zi(this)?Ui(this)?y(new TypeError("Cannot close a stream that already has a writer")):dn(this)?y(new TypeError("Cannot close an already-closing stream")):TE(this):y(Rl("close"))}getWriter(){if(!zi(this))throw Rl("getWriter");return wE(this)}}Object.defineProperties(io.prototype,{abort:{enumerable:!0},close:{enumerable:!0},getWriter:{enumerable:!0},locked:{enumerable:!0}}),r(io.prototype.abort,"abort"),r(io.prototype.close,"close"),r(io.prototype.getWriter,"getWriter"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(io.prototype,Symbol.toStringTag,{value:"WritableStream",configurable:!0});function wE(c){return new Cn(c)}a(wE,"AcquireWritableStreamDefaultWriter");function AF(c,f,w,D,k=1,H=()=>1){let X=Object.create(io.prototype);bE(X);let ve=Object.create(Mi.prototype);return RE(X,ve,c,f,w,D,k,H),X}a(AF,"CreateWritableStream");function bE(c){c._state="writable",c._storedError=void 0,c._writer=void 0,c._writableStreamController=void 0,c._writeRequests=new p,c._inFlightWriteRequest=void 0,c._closeRequest=void 0,c._inFlightCloseRequest=void 0,c._pendingAbortRequest=void 0,c._backpressure=!1}a(bE,"InitializeWritableStream");function zi(c){return!n(c)||!Object.prototype.hasOwnProperty.call(c,"_writableStreamController")?!1:c instanceof io}a(zi,"IsWritableStream");function Ui(c){return c._writer!==void 0}a(Ui,"IsWritableStreamLocked");function Sl(c,f){var w;if(c._state==="closed"||c._state==="errored")return g(void 0);c._writableStreamController._abortReason=f,(w=c._writableStreamController._abortController)===null||w===void 0||w.abort(f);let D=c._state;if(D==="closed"||D==="errored")return g(void 0);if(c._pendingAbortRequest!==void 0)return c._pendingAbortRequest._promise;let k=!1;D==="erroring"&&(k=!0,f=void 0);let H=h((X,ve)=>{c._pendingAbortRequest={_promise:void 0,_resolve:X,_reject:ve,_reason:f,_wasAlreadyErroring:k}});return c._pendingAbortRequest._promise=H,k||$h(c,f),H}a(Sl,"WritableStreamAbort");function TE(c){let f=c._state;if(f==="closed"||f==="errored")return y(new TypeError(`The stream (in ${f} state) is not in the writable state and cannot be closed`));let w=h((k,H)=>{let X={_resolve:k,_reject:H};c._closeRequest=X}),D=c._writer;return D!==void 0&&c._backpressure&&f==="writable"&&Lh(D),qF(c._writableStreamController),w}a(TE,"WritableStreamClose");function RF(c){return h((w,D)=>{let k={_resolve:w,_reject:D};c._writeRequests.push(k)})}a(RF,"WritableStreamAddWriteRequest");function Oh(c,f){if(c._state==="writable"){$h(c,f);return}Ch(c)}a(Oh,"WritableStreamDealWithRejection");function $h(c,f){let w=c._writableStreamController;c._state="erroring",c._storedError=f;let D=c._writer;D!==void 0&&SE(D,f),!NF(c)&&w._started&&Ch(c)}a($h,"WritableStreamStartErroring");function Ch(c){c._state="errored",c._writableStreamController[_]();let f=c._storedError;if(c._writeRequests.forEach(k=>{k._reject(f)}),c._writeRequests=new p,c._pendingAbortRequest===void 0){xl(c);return}let w=c._pendingAbortRequest;if(c._pendingAbortRequest=void 0,w._wasAlreadyErroring){w._reject(f),xl(c);return}let D=c._writableStreamController[E](w._reason);b(D,()=>(w._resolve(),xl(c),null),k=>(w._reject(k),xl(c),null))}a(Ch,"WritableStreamFinishErroring");function DF(c){c._inFlightWriteRequest._resolve(void 0),c._inFlightWriteRequest=void 0}a(DF,"WritableStreamFinishInFlightWrite");function OF(c,f){c._inFlightWriteRequest._reject(f),c._inFlightWriteRequest=void 0,Oh(c,f)}a(OF,"WritableStreamFinishInFlightWriteWithError");function $F(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 w=c._writer;w!==void 0&&CE(w)}a($F,"WritableStreamFinishInFlightClose");function CF(c,f){c._inFlightCloseRequest._reject(f),c._inFlightCloseRequest=void 0,c._pendingAbortRequest!==void 0&&(c._pendingAbortRequest._reject(f),c._pendingAbortRequest=void 0),Oh(c,f)}a(CF,"WritableStreamFinishInFlightCloseWithError");function dn(c){return!(c._closeRequest===void 0&&c._inFlightCloseRequest===void 0)}a(dn,"WritableStreamCloseQueuedOrInFlight");function NF(c){return!(c._inFlightWriteRequest===void 0&&c._inFlightCloseRequest===void 0)}a(NF,"WritableStreamHasOperationMarkedInFlight");function kF(c){c._inFlightCloseRequest=c._closeRequest,c._closeRequest=void 0}a(kF,"WritableStreamMarkCloseRequestInFlight");function zF(c){c._inFlightWriteRequest=c._writeRequests.shift()}a(zF,"WritableStreamMarkFirstWriteRequestInFlight");function xl(c){c._closeRequest!==void 0&&(c._closeRequest._reject(c._storedError),c._closeRequest=void 0);let f=c._writer;f!==void 0&&Mh(f,c._storedError)}a(xl,"WritableStreamRejectCloseAndClosedPromiseIfNeeded");function Nh(c,f){let w=c._writer;w!==void 0&&f!==c._backpressure&&(f?KF(w):Lh(w)),c._backpressure=f}a(Nh,"WritableStreamUpdateBackpressure");class Cn{static{a(this,"WritableStreamDefaultWriter")}constructor(f){if(ot(f,1,"WritableStreamDefaultWriter"),PE(f,"First parameter"),Ui(f))throw new TypeError("This stream has already been locked for exclusive writing by another writer");this._ownerWritableStream=f,f._writer=this;let w=f._state;if(w==="writable")!dn(f)&&f._backpressure?Ol(this):NE(this),Dl(this);else if(w==="erroring")Fh(this,f._storedError),Dl(this);else if(w==="closed")NE(this),ZF(this);else{let D=f._storedError;Fh(this,D),$E(this,D)}}get closed(){return Vo(this)?this._closedPromise:y(Go("closed"))}get desiredSize(){if(!Vo(this))throw Go("desiredSize");if(this._ownerWritableStream===void 0)throw ms("desiredSize");return LF(this)}get ready(){return Vo(this)?this._readyPromise:y(Go("ready"))}abort(f=void 0){return Vo(this)?this._ownerWritableStream===void 0?y(ms("abort")):UF(this,f):y(Go("abort"))}close(){if(!Vo(this))return y(Go("close"));let f=this._ownerWritableStream;return f===void 0?y(ms("close")):dn(f)?y(new TypeError("Cannot close an already-closing stream")):EE(this)}releaseLock(){if(!Vo(this))throw Go("releaseLock");this._ownerWritableStream!==void 0&&xE(this)}write(f=void 0){return Vo(this)?this._ownerWritableStream===void 0?y(ms("write to")):IE(this,f):y(Go("write"))}}Object.defineProperties(Cn.prototype,{abort:{enumerable:!0},close:{enumerable:!0},releaseLock:{enumerable:!0},write:{enumerable:!0},closed:{enumerable:!0},desiredSize:{enumerable:!0},ready:{enumerable:!0}}),r(Cn.prototype.abort,"abort"),r(Cn.prototype.close,"close"),r(Cn.prototype.releaseLock,"releaseLock"),r(Cn.prototype.write,"write"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Cn.prototype,Symbol.toStringTag,{value:"WritableStreamDefaultWriter",configurable:!0});function Vo(c){return!n(c)||!Object.prototype.hasOwnProperty.call(c,"_ownerWritableStream")?!1:c instanceof Cn}a(Vo,"IsWritableStreamDefaultWriter");function UF(c,f){let w=c._ownerWritableStream;return Sl(w,f)}a(UF,"WritableStreamDefaultWriterAbort");function EE(c){let f=c._ownerWritableStream;return TE(f)}a(EE,"WritableStreamDefaultWriterClose");function MF(c){let f=c._ownerWritableStream,w=f._state;return dn(f)||w==="closed"?g(void 0):w==="errored"?y(f._storedError):EE(c)}a(MF,"WritableStreamDefaultWriterCloseWithErrorPropagation");function FF(c,f){c._closedPromiseState==="pending"?Mh(c,f):WF(c,f)}a(FF,"WritableStreamDefaultWriterEnsureClosedPromiseRejected");function SE(c,f){c._readyPromiseState==="pending"?kE(c,f):JF(c,f)}a(SE,"WritableStreamDefaultWriterEnsureReadyPromiseRejected");function LF(c){let f=c._ownerWritableStream,w=f._state;return w==="errored"||w==="erroring"?null:w==="closed"?0:DE(f._writableStreamController)}a(LF,"WritableStreamDefaultWriterGetDesiredSize");function xE(c){let f=c._ownerWritableStream,w=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");SE(c,w),FF(c,w),f._writer=void 0,c._ownerWritableStream=void 0}a(xE,"WritableStreamDefaultWriterRelease");function IE(c,f){let w=c._ownerWritableStream,D=w._writableStreamController,k=BF(D,f);if(w!==c._ownerWritableStream)return y(ms("write to"));let H=w._state;if(H==="errored")return y(w._storedError);if(dn(w)||H==="closed")return y(new TypeError("The stream is closing or closed and cannot be written to"));if(H==="erroring")return y(w._storedError);let X=RF(w);return VF(D,f,k),X}a(IE,"WritableStreamDefaultWriterWrite");let AE={};class Mi{static{a(this,"WritableStreamDefaultController")}constructor(){throw new TypeError("Illegal constructor")}get abortReason(){if(!kh(this))throw Uh("abortReason");return this._abortReason}get signal(){if(!kh(this))throw Uh("signal");if(this._abortController===void 0)throw new TypeError("WritableStreamDefaultController.prototype.signal is not supported");return this._abortController.signal}error(f=void 0){if(!kh(this))throw Uh("error");this._controlledWritableStream._state==="writable"&&OE(this,f)}[E](f){let w=this._abortAlgorithm(f);return Il(this),w}[_](){no(this)}}Object.defineProperties(Mi.prototype,{abortReason:{enumerable:!0},signal:{enumerable:!0},error:{enumerable:!0}}),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Mi.prototype,Symbol.toStringTag,{value:"WritableStreamDefaultController",configurable:!0});function kh(c){return!n(c)||!Object.prototype.hasOwnProperty.call(c,"_controlledWritableStream")?!1:c instanceof Mi}a(kh,"IsWritableStreamDefaultController");function RE(c,f,w,D,k,H,X,ve){f._controlledWritableStream=c,c._writableStreamController=f,f._queue=void 0,f._queueTotalSize=void 0,no(f),f._abortReason=void 0,f._abortController=IF(),f._started=!1,f._strategySizeAlgorithm=ve,f._strategyHWM=X,f._writeAlgorithm=D,f._closeAlgorithm=k,f._abortAlgorithm=H;let Oe=zh(f);Nh(c,Oe);let Te=w(),Ue=g(Te);b(Ue,()=>(f._started=!0,Al(f),null),Ge=>(f._started=!0,Oh(c,Ge),null))}a(RE,"SetUpWritableStreamDefaultController");function jF(c,f,w,D){let k=Object.create(Mi.prototype),H,X,ve,Oe;f.start!==void 0?H=a(()=>f.start(k),"startAlgorithm"):H=a(()=>{},"startAlgorithm"),f.write!==void 0?X=a(Te=>f.write(Te,k),"writeAlgorithm"):X=a(()=>g(void 0),"writeAlgorithm"),f.close!==void 0?ve=a(()=>f.close(),"closeAlgorithm"):ve=a(()=>g(void 0),"closeAlgorithm"),f.abort!==void 0?Oe=a(Te=>f.abort(Te),"abortAlgorithm"):Oe=a(()=>g(void 0),"abortAlgorithm"),RE(c,k,H,X,ve,Oe,w,D)}a(jF,"SetUpWritableStreamDefaultControllerFromUnderlyingSink");function Il(c){c._writeAlgorithm=void 0,c._closeAlgorithm=void 0,c._abortAlgorithm=void 0,c._strategySizeAlgorithm=void 0}a(Il,"WritableStreamDefaultControllerClearAlgorithms");function qF(c){Th(c,AE,0),Al(c)}a(qF,"WritableStreamDefaultControllerClose");function BF(c,f){try{return c._strategySizeAlgorithm(f)}catch(w){return fs(c,w),1}}a(BF,"WritableStreamDefaultControllerGetChunkSize");function DE(c){return c._strategyHWM-c._queueTotalSize}a(DE,"WritableStreamDefaultControllerGetDesiredSize");function VF(c,f,w){try{Th(c,f,w)}catch(k){fs(c,k);return}let D=c._controlledWritableStream;if(!dn(D)&&D._state==="writable"){let k=zh(c);Nh(D,k)}Al(c)}a(VF,"WritableStreamDefaultControllerWrite");function Al(c){let f=c._controlledWritableStream;if(!c._started||f._inFlightWriteRequest!==void 0)return;if(f._state==="erroring"){Ch(f);return}if(c._queue.length===0)return;let D=oF(c);D===AE?GF(c):HF(c,D)}a(Al,"WritableStreamDefaultControllerAdvanceQueueIfNeeded");function fs(c,f){c._controlledWritableStream._state==="writable"&&OE(c,f)}a(fs,"WritableStreamDefaultControllerErrorIfNeeded");function GF(c){let f=c._controlledWritableStream;kF(f),bh(c);let w=c._closeAlgorithm();Il(c),b(w,()=>($F(f),null),D=>(CF(f,D),null))}a(GF,"WritableStreamDefaultControllerProcessClose");function HF(c,f){let w=c._controlledWritableStream;zF(w);let D=c._writeAlgorithm(f);b(D,()=>{DF(w);let k=w._state;if(bh(c),!dn(w)&&k==="writable"){let H=zh(c);Nh(w,H)}return Al(c),null},k=>(w._state==="writable"&&Il(c),OF(w,k),null))}a(HF,"WritableStreamDefaultControllerProcessWrite");function zh(c){return DE(c)<=0}a(zh,"WritableStreamDefaultControllerGetBackpressure");function OE(c,f){let w=c._controlledWritableStream;Il(c),$h(w,f)}a(OE,"WritableStreamDefaultControllerError");function Rl(c){return new TypeError(`WritableStream.prototype.${c} can only be used on a WritableStream`)}a(Rl,"streamBrandCheckException$2");function Uh(c){return new TypeError(`WritableStreamDefaultController.prototype.${c} can only be used on a WritableStreamDefaultController`)}a(Uh,"defaultControllerBrandCheckException$2");function Go(c){return new TypeError(`WritableStreamDefaultWriter.prototype.${c} can only be used on a WritableStreamDefaultWriter`)}a(Go,"defaultWriterBrandCheckException");function ms(c){return new TypeError("Cannot "+c+" a stream using a released writer")}a(ms,"defaultWriterLockException");function Dl(c){c._closedPromise=h((f,w)=>{c._closedPromise_resolve=f,c._closedPromise_reject=w,c._closedPromiseState="pending"})}a(Dl,"defaultWriterClosedPromiseInitialize");function $E(c,f){Dl(c),Mh(c,f)}a($E,"defaultWriterClosedPromiseInitializeAsRejected");function ZF(c){Dl(c),CE(c)}a(ZF,"defaultWriterClosedPromiseInitializeAsResolved");function Mh(c,f){c._closedPromise_reject!==void 0&&(I(c._closedPromise),c._closedPromise_reject(f),c._closedPromise_resolve=void 0,c._closedPromise_reject=void 0,c._closedPromiseState="rejected")}a(Mh,"defaultWriterClosedPromiseReject");function WF(c,f){$E(c,f)}a(WF,"defaultWriterClosedPromiseResetToRejected");function CE(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(CE,"defaultWriterClosedPromiseResolve");function Ol(c){c._readyPromise=h((f,w)=>{c._readyPromise_resolve=f,c._readyPromise_reject=w}),c._readyPromiseState="pending"}a(Ol,"defaultWriterReadyPromiseInitialize");function Fh(c,f){Ol(c),kE(c,f)}a(Fh,"defaultWriterReadyPromiseInitializeAsRejected");function NE(c){Ol(c),Lh(c)}a(NE,"defaultWriterReadyPromiseInitializeAsResolved");function kE(c,f){c._readyPromise_reject!==void 0&&(I(c._readyPromise),c._readyPromise_reject(f),c._readyPromise_resolve=void 0,c._readyPromise_reject=void 0,c._readyPromiseState="rejected")}a(kE,"defaultWriterReadyPromiseReject");function KF(c){Ol(c)}a(KF,"defaultWriterReadyPromiseReset");function JF(c,f){Fh(c,f)}a(JF,"defaultWriterReadyPromiseResetToRejected");function Lh(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(Lh,"defaultWriterReadyPromiseResolve");function XF(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof global<"u")return global}a(XF,"getGlobals");let jh=XF();function YF(c){if(!(typeof c=="function"||typeof c=="object")||c.name!=="DOMException")return!1;try{return new c,!0}catch{return!1}}a(YF,"isDOMExceptionConstructor");function QF(){let c=jh?.DOMException;return YF(c)?c:void 0}a(QF,"getFromGlobal");function eL(){let c=a(function(w,D){this.message=w||"",this.name=D||"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(eL,"createPolyfill");let tL=QF()||eL();function zE(c,f,w,D,k,H){let X=Z(c),ve=wE(f);c._disturbed=!0;let Oe=!1,Te=g(void 0);return h((Ue,Ge)=>{let lt;if(H!==void 0){if(lt=a(()=>{let Se=H.reason!==void 0?H.reason:new tL("Aborted","AbortError"),Ze=[];D||Ze.push(()=>f._state==="writable"?Sl(f,Se):g(void 0)),k||Ze.push(()=>c._state==="readable"?Zr(c,Se):g(void 0)),rr(()=>Promise.all(Ze.map(dt=>dt())),!0,Se)},"abortAlgorithm"),H.aborted){lt();return}H.addEventListener("abort",lt)}function Wr(){return h((Se,Ze)=>{function dt(gr){gr?Se():T(qi(),dt,Ze)}a(dt,"next"),dt(!1)})}a(Wr,"pipeLoop");function qi(){return Oe?g(!0):T(ve._readyPromise,()=>h((Se,Ze)=>{be(X,{_chunkSteps:a(dt=>{Te=T(IE(ve,dt),void 0,t),Se(!1)},"_chunkSteps"),_closeSteps:a(()=>Se(!0),"_closeSteps"),_errorSteps:Ze})}))}if(a(qi,"pipeStep"),kn(c,X._closedPromise,Se=>(D?Nr(!0,Se):rr(()=>Sl(f,Se),!0,Se),null)),kn(f,ve._closedPromise,Se=>(k?Nr(!0,Se):rr(()=>Zr(c,Se),!0,Se),null)),Wt(c,X._closedPromise,()=>(w?Nr():rr(()=>MF(ve)),null)),dn(f)||f._state==="closed"){let Se=new TypeError("the destination writable stream closed before all data could be piped to it");k?Nr(!0,Se):rr(()=>Zr(c,Se),!0,Se)}I(Wr());function uo(){let Se=Te;return T(Te,()=>Se!==Te?uo():void 0)}a(uo,"waitForWritesToFinish");function kn(Se,Ze,dt){Se._state==="errored"?dt(Se._storedError):S(Ze,dt)}a(kn,"isOrBecomesErrored");function Wt(Se,Ze,dt){Se._state==="closed"?dt():P(Ze,dt)}a(Wt,"isOrBecomesClosed");function rr(Se,Ze,dt){if(Oe)return;Oe=!0,f._state==="writable"&&!dn(f)?P(uo(),gr):gr();function gr(){return b(Se(),()=>zn(Ze,dt),Bi=>zn(!0,Bi)),null}a(gr,"doTheRest")}a(rr,"shutdownWithAction");function Nr(Se,Ze){Oe||(Oe=!0,f._state==="writable"&&!dn(f)?P(uo(),()=>zn(Se,Ze)):zn(Se,Ze))}a(Nr,"shutdown");function zn(Se,Ze){return xE(ve),Q(X),H!==void 0&&H.removeEventListener("abort",lt),Se?Ge(Ze):Ue(void 0),null}a(zn,"finalize")})}a(zE,"ReadableStreamPipeTo");class Nn{static{a(this,"ReadableStreamDefaultController")}constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!$l(this))throw Nl("desiredSize");return qh(this)}close(){if(!$l(this))throw Nl("close");if(!Li(this))throw new TypeError("The stream is not in a state that permits close");Ho(this)}enqueue(f=void 0){if(!$l(this))throw Nl("enqueue");if(!Li(this))throw new TypeError("The stream is not in a state that permits enqueue");return Fi(this,f)}error(f=void 0){if(!$l(this))throw Nl("error");Hr(this,f)}[pe](f){no(this);let w=this._cancelAlgorithm(f);return Cl(this),w}[oe](f){let w=this._controlledReadableStream;if(this._queue.length>0){let D=bh(this);this._closeRequested&&this._queue.length===0?(Cl(this),ys(w)):hs(this),f._chunkSteps(D)}else z(w,f),hs(this)}[Be](){}}Object.defineProperties(Nn.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},desiredSize:{enumerable:!0}}),r(Nn.prototype.close,"close"),r(Nn.prototype.enqueue,"enqueue"),r(Nn.prototype.error,"error"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Nn.prototype,Symbol.toStringTag,{value:"ReadableStreamDefaultController",configurable:!0});function $l(c){return!n(c)||!Object.prototype.hasOwnProperty.call(c,"_controlledReadableStream")?!1:c instanceof Nn}a($l,"IsReadableStreamDefaultController");function hs(c){if(!UE(c))return;if(c._pulling){c._pullAgain=!0;return}c._pulling=!0;let w=c._pullAlgorithm();b(w,()=>(c._pulling=!1,c._pullAgain&&(c._pullAgain=!1,hs(c)),null),D=>(Hr(c,D),null))}a(hs,"ReadableStreamDefaultControllerCallPullIfNeeded");function UE(c){let f=c._controlledReadableStream;return!Li(c)||!c._started?!1:!!(so(f)&&G(f)>0||qh(c)>0)}a(UE,"ReadableStreamDefaultControllerShouldCallPull");function Cl(c){c._pullAlgorithm=void 0,c._cancelAlgorithm=void 0,c._strategySizeAlgorithm=void 0}a(Cl,"ReadableStreamDefaultControllerClearAlgorithms");function Ho(c){if(!Li(c))return;let f=c._controlledReadableStream;c._closeRequested=!0,c._queue.length===0&&(Cl(c),ys(f))}a(Ho,"ReadableStreamDefaultControllerClose");function Fi(c,f){if(!Li(c))return;let w=c._controlledReadableStream;if(so(w)&&G(w)>0)F(w,f,!1);else{let D;try{D=c._strategySizeAlgorithm(f)}catch(k){throw Hr(c,k),k}try{Th(c,f,D)}catch(k){throw Hr(c,k),k}}hs(c)}a(Fi,"ReadableStreamDefaultControllerEnqueue");function Hr(c,f){let w=c._controlledReadableStream;w._state==="readable"&&(no(c),Cl(c),jE(w,f))}a(Hr,"ReadableStreamDefaultControllerError");function qh(c){let f=c._controlledReadableStream._state;return f==="errored"?null:f==="closed"?0:c._strategyHWM-c._queueTotalSize}a(qh,"ReadableStreamDefaultControllerGetDesiredSize");function rL(c){return!UE(c)}a(rL,"ReadableStreamDefaultControllerHasBackpressure");function Li(c){let f=c._controlledReadableStream._state;return!c._closeRequested&&f==="readable"}a(Li,"ReadableStreamDefaultControllerCanCloseOrEnqueue");function ME(c,f,w,D,k,H,X){f._controlledReadableStream=c,f._queue=void 0,f._queueTotalSize=void 0,no(f),f._started=!1,f._closeRequested=!1,f._pullAgain=!1,f._pulling=!1,f._strategySizeAlgorithm=X,f._strategyHWM=H,f._pullAlgorithm=D,f._cancelAlgorithm=k,c._readableStreamController=f;let ve=w();b(g(ve),()=>(f._started=!0,hs(f),null),Oe=>(Hr(f,Oe),null))}a(ME,"SetUpReadableStreamDefaultController");function nL(c,f,w,D){let k=Object.create(Nn.prototype),H,X,ve;f.start!==void 0?H=a(()=>f.start(k),"startAlgorithm"):H=a(()=>{},"startAlgorithm"),f.pull!==void 0?X=a(()=>f.pull(k),"pullAlgorithm"):X=a(()=>g(void 0),"pullAlgorithm"),f.cancel!==void 0?ve=a(Oe=>f.cancel(Oe),"cancelAlgorithm"):ve=a(()=>g(void 0),"cancelAlgorithm"),ME(c,k,H,X,ve,w,D)}a(nL,"SetUpReadableStreamDefaultControllerFromUnderlyingSource");function Nl(c){return new TypeError(`ReadableStreamDefaultController.prototype.${c} can only be used on a ReadableStreamDefaultController`)}a(Nl,"defaultControllerBrandCheckException$1");function oL(c,f){return jo(c._readableStreamController)?aL(c):iL(c)}a(oL,"ReadableStreamTee");function iL(c,f){let w=Z(c),D=!1,k=!1,H=!1,X=!1,ve,Oe,Te,Ue,Ge,lt=h(Wt=>{Ge=Wt});function Wr(){return D?(k=!0,g(void 0)):(D=!0,be(w,{_chunkSteps:a(rr=>{l(()=>{k=!1;let Nr=rr,zn=rr;H||Fi(Te._readableStreamController,Nr),X||Fi(Ue._readableStreamController,zn),D=!1,k&&Wr()})},"_chunkSteps"),_closeSteps:a(()=>{D=!1,H||Ho(Te._readableStreamController),X||Ho(Ue._readableStreamController),(!H||!X)&&Ge(void 0)},"_closeSteps"),_errorSteps:a(()=>{D=!1},"_errorSteps")}),g(void 0))}a(Wr,"pullAlgorithm");function qi(Wt){if(H=!0,ve=Wt,X){let rr=it([ve,Oe]),Nr=Zr(c,rr);Ge(Nr)}return lt}a(qi,"cancel1Algorithm");function uo(Wt){if(X=!0,Oe=Wt,H){let rr=it([ve,Oe]),Nr=Zr(c,rr);Ge(Nr)}return lt}a(uo,"cancel2Algorithm");function kn(){}return a(kn,"startAlgorithm"),Te=gs(kn,Wr,qi),Ue=gs(kn,Wr,uo),S(w._closedPromise,Wt=>(Hr(Te._readableStreamController,Wt),Hr(Ue._readableStreamController,Wt),(!H||!X)&&Ge(void 0),null)),[Te,Ue]}a(iL,"ReadableStreamDefaultTee");function aL(c){let f=Z(c),w=!1,D=!1,k=!1,H=!1,X=!1,ve,Oe,Te,Ue,Ge,lt=h(Se=>{Ge=Se});function Wr(Se){S(Se._closedPromise,Ze=>(Se!==f||(Cr(Te._readableStreamController,Ze),Cr(Ue._readableStreamController,Ze),(!H||!X)&&Ge(void 0)),null))}a(Wr,"forwardReaderError");function qi(){Bo(f)&&(Q(f),f=Z(c),Wr(f)),be(f,{_chunkSteps:a(Ze=>{l(()=>{D=!1,k=!1;let dt=Ze,gr=Ze;if(!H&&!X)try{gr=rE(Ze)}catch(Bi){Cr(Te._readableStreamController,Bi),Cr(Ue._readableStreamController,Bi),Ge(Zr(c,Bi));return}H||_l(Te._readableStreamController,dt),X||_l(Ue._readableStreamController,gr),w=!1,D?kn():k&&Wt()})},"_chunkSteps"),_closeSteps:a(()=>{w=!1,H||ls(Te._readableStreamController),X||ls(Ue._readableStreamController),Te._readableStreamController._pendingPullIntos.length>0&&Pl(Te._readableStreamController,0),Ue._readableStreamController._pendingPullIntos.length>0&&Pl(Ue._readableStreamController,0),(!H||!X)&&Ge(void 0)},"_closeSteps"),_errorSteps:a(()=>{w=!1},"_errorSteps")})}a(qi,"pullWithDefaultReader");function uo(Se,Ze){Pe(f)&&(Q(f),f=hE(c),Wr(f));let dt=Ze?Ue:Te,gr=Ze?Te:Ue;vE(f,Se,1,{_chunkSteps:a(Vi=>{l(()=>{D=!1,k=!1;let Gi=Ze?X:H;if(Ze?H:X)Gi||wl(dt._readableStreamController,Vi);else{let eS;try{eS=rE(Vi)}catch(Zh){Cr(dt._readableStreamController,Zh),Cr(gr._readableStreamController,Zh),Ge(Zr(c,Zh));return}Gi||wl(dt._readableStreamController,Vi),_l(gr._readableStreamController,eS)}w=!1,D?kn():k&&Wt()})},"_chunkSteps"),_closeSteps:a(Vi=>{w=!1;let Gi=Ze?X:H,ql=Ze?H:X;Gi||ls(dt._readableStreamController),ql||ls(gr._readableStreamController),Vi!==void 0&&(Gi||wl(dt._readableStreamController,Vi),!ql&&gr._readableStreamController._pendingPullIntos.length>0&&Pl(gr._readableStreamController,0)),(!Gi||!ql)&&Ge(void 0)},"_closeSteps"),_errorSteps:a(()=>{w=!1},"_errorSteps")})}a(uo,"pullWithBYOBReader");function kn(){if(w)return D=!0,g(void 0);w=!0;let Se=Ah(Te._readableStreamController);return Se===null?qi():uo(Se._view,!1),g(void 0)}a(kn,"pull1Algorithm");function Wt(){if(w)return k=!0,g(void 0);w=!0;let Se=Ah(Ue._readableStreamController);return Se===null?qi():uo(Se._view,!0),g(void 0)}a(Wt,"pull2Algorithm");function rr(Se){if(H=!0,ve=Se,X){let Ze=it([ve,Oe]),dt=Zr(c,Ze);Ge(dt)}return lt}a(rr,"cancel1Algorithm");function Nr(Se){if(X=!0,Oe=Se,H){let Ze=it([ve,Oe]),dt=Zr(c,Ze);Ge(dt)}return lt}a(Nr,"cancel2Algorithm");function zn(){}return a(zn,"startAlgorithm"),Te=LE(zn,kn,rr),Ue=LE(zn,Wt,Nr),Wr(f),[Te,Ue]}a(aL,"ReadableByteStreamTee");function sL(c){return n(c)&&typeof c.getReader<"u"}a(sL,"isReadableStreamLike");function cL(c){return sL(c)?lL(c.getReader()):uL(c)}a(cL,"ReadableStreamFrom");function uL(c){let f,w=tE(c,"async"),D=t;function k(){let X;try{X=eF(w)}catch(Oe){return y(Oe)}let ve=g(X);return R(ve,Oe=>{if(!n(Oe))throw new TypeError("The promise returned by the iterator.next() method must fulfill with an object");if(tF(Oe))Ho(f._readableStreamController);else{let Ue=rF(Oe);Fi(f._readableStreamController,Ue)}})}a(k,"pullAlgorithm");function H(X){let ve=w.iterator,Oe;try{Oe=gl(ve,"return")}catch(Ge){return y(Ge)}if(Oe===void 0)return g(void 0);let Te;try{Te=m(Oe,ve,[X])}catch(Ge){return y(Ge)}let Ue=g(Te);return R(Ue,Ge=>{if(!n(Ge))throw new TypeError("The promise returned by the iterator.return() method must fulfill with an object")})}return a(H,"cancelAlgorithm"),f=gs(D,k,H,0),f}a(uL,"ReadableStreamFromIterable");function lL(c){let f,w=t;function D(){let H;try{H=c.read()}catch(X){return y(X)}return R(H,X=>{if(!n(X))throw new TypeError("The promise returned by the reader.read() method must fulfill with an object");if(X.done)Ho(f._readableStreamController);else{let ve=X.value;Fi(f._readableStreamController,ve)}})}a(D,"pullAlgorithm");function k(H){try{return g(c.cancel(H))}catch(X){return y(X)}}return a(k,"cancelAlgorithm"),f=gs(w,D,k,0),f}a(lL,"ReadableStreamFromDefaultReader");function dL(c,f){Pt(c,f);let w=c,D=w?.autoAllocateChunkSize,k=w?.cancel,H=w?.pull,X=w?.start,ve=w?.type;return{autoAllocateChunkSize:D===void 0?void 0:U(D,`${f} has member 'autoAllocateChunkSize' that`),cancel:k===void 0?void 0:pL(k,w,`${f} has member 'cancel' that`),pull:H===void 0?void 0:fL(H,w,`${f} has member 'pull' that`),start:X===void 0?void 0:mL(X,w,`${f} has member 'start' that`),type:ve===void 0?void 0:hL(ve,`${f} has member 'type' that`)}}a(dL,"convertUnderlyingDefaultOrByteSource");function pL(c,f,w){return Tt(c,w),D=>d(c,f,[D])}a(pL,"convertUnderlyingSourceCancelCallback");function fL(c,f,w){return Tt(c,w),D=>d(c,f,[D])}a(fL,"convertUnderlyingSourcePullCallback");function mL(c,f,w){return Tt(c,w),D=>m(c,f,[D])}a(mL,"convertUnderlyingSourceStartCallback");function hL(c,f){if(c=`${c}`,c!=="bytes")throw new TypeError(`${f} '${c}' is not a valid enumeration value for ReadableStreamType`);return c}a(hL,"convertReadableStreamType");function gL(c,f){return Pt(c,f),{preventCancel:!!c?.preventCancel}}a(gL,"convertIteratorOptions");function FE(c,f){Pt(c,f);let w=c?.preventAbort,D=c?.preventCancel,k=c?.preventClose,H=c?.signal;return H!==void 0&&yL(H,`${f} has member 'signal' that`),{preventAbort:!!w,preventCancel:!!D,preventClose:!!k,signal:H}}a(FE,"convertPipeOptions");function yL(c,f){if(!SF(c))throw new TypeError(`${f} is not an AbortSignal.`)}a(yL,"assertAbortSignal");function vL(c,f){Pt(c,f);let w=c?.readable;A(w,"readable","ReadableWritablePair"),L(w,`${f} has member 'readable' that`);let D=c?.writable;return A(D,"writable","ReadableWritablePair"),PE(D,`${f} has member 'writable' that`),{readable:w,writable:D}}a(vL,"convertReadableWritablePair");class Vt{static{a(this,"ReadableStream")}constructor(f={},w={}){f===void 0?f=null:et(f,"First parameter");let D=El(w,"Second parameter"),k=dL(f,"First parameter");if(Bh(this),k.type==="bytes"){if(D.size!==void 0)throw new RangeError("The strategy for a byte stream cannot have a size function");let H=ps(D,0);pF(this,k,H)}else{let H=Tl(D),X=ps(D,1);nL(this,k,X,H)}}get locked(){if(!ao(this))throw Zo("locked");return so(this)}cancel(f=void 0){return ao(this)?so(this)?y(new TypeError("Cannot cancel a stream that already has a reader")):Zr(this,f):y(Zo("cancel"))}getReader(f=void 0){if(!ao(this))throw Zo("getReader");return mF(f,"First parameter").mode===void 0?Z(this):hE(this)}pipeThrough(f,w={}){if(!ao(this))throw Zo("pipeThrough");ot(f,1,"pipeThrough");let D=vL(f,"First parameter"),k=FE(w,"Second parameter");if(so(this))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(Ui(D.writable))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");let H=zE(this,D.writable,k.preventClose,k.preventAbort,k.preventCancel,k.signal);return I(H),D.readable}pipeTo(f,w={}){if(!ao(this))return y(Zo("pipeTo"));if(f===void 0)return y("Parameter 1 is required in 'pipeTo'.");if(!zi(f))return y(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));let D;try{D=FE(w,"Second parameter")}catch(k){return y(k)}return so(this)?y(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):Ui(f)?y(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):zE(this,f,D.preventClose,D.preventAbort,D.preventCancel,D.signal)}tee(){if(!ao(this))throw Zo("tee");let f=oL(this);return it(f)}values(f=void 0){if(!ao(this))throw Zo("values");let w=gL(f,"First parameter");return $i(this,w.preventCancel)}[wh](f){return this.values(f)}static from(f){return cL(f)}}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}}),r(Vt.from,"from"),r(Vt.prototype.cancel,"cancel"),r(Vt.prototype.getReader,"getReader"),r(Vt.prototype.pipeThrough,"pipeThrough"),r(Vt.prototype.pipeTo,"pipeTo"),r(Vt.prototype.tee,"tee"),r(Vt.prototype.values,"values"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Vt.prototype,Symbol.toStringTag,{value:"ReadableStream",configurable:!0}),Object.defineProperty(Vt.prototype,wh,{value:Vt.prototype.values,writable:!0,configurable:!0});function gs(c,f,w,D=1,k=()=>1){let H=Object.create(Vt.prototype);Bh(H);let X=Object.create(Nn.prototype);return ME(H,X,c,f,w,D,k),H}a(gs,"CreateReadableStream");function LE(c,f,w){let D=Object.create(Vt.prototype);Bh(D);let k=Object.create($n.prototype);return mE(D,k,c,f,w,0,void 0),D}a(LE,"CreateReadableByteStream");function Bh(c){c._state="readable",c._reader=void 0,c._storedError=void 0,c._disturbed=!1}a(Bh,"InitializeReadableStream");function ao(c){return!n(c)||!Object.prototype.hasOwnProperty.call(c,"_readableStreamController")?!1:c instanceof Vt}a(ao,"IsReadableStream");function so(c){return c._reader!==void 0}a(so,"IsReadableStreamLocked");function Zr(c,f){if(c._disturbed=!0,c._state==="closed")return g(void 0);if(c._state==="errored")return y(c._storedError);ys(c);let w=c._reader;if(w!==void 0&&Bo(w)){let k=w._readIntoRequests;w._readIntoRequests=new p,k.forEach(H=>{H._closeSteps(void 0)})}let D=c._readableStreamController[pe](f);return R(D,t)}a(Zr,"ReadableStreamCancel");function ys(c){c._state="closed";let f=c._reader;if(f!==void 0&&(nt(f),Pe(f))){let w=f._readRequests;f._readRequests=new p,w.forEach(D=>{D._closeSteps()})}}a(ys,"ReadableStreamClose");function jE(c,f){c._state="errored",c._storedError=f;let w=c._reader;w!==void 0&&(Fe(w,f),Pe(w)?ft(w,f):_E(w,f))}a(jE,"ReadableStreamError");function Zo(c){return new TypeError(`ReadableStream.prototype.${c} can only be used on a ReadableStream`)}a(Zo,"streamBrandCheckException$1");function qE(c,f){Pt(c,f);let w=c?.highWaterMark;return A(w,"highWaterMark","QueuingStrategyInit"),{highWaterMark:O(w)}}a(qE,"convertQueuingStrategyInit");let BE=a(c=>c.byteLength,"byteLengthSizeFunction");r(BE,"size");class kl{static{a(this,"ByteLengthQueuingStrategy")}constructor(f){ot(f,1,"ByteLengthQueuingStrategy"),f=qE(f,"First parameter"),this._byteLengthQueuingStrategyHighWaterMark=f.highWaterMark}get highWaterMark(){if(!GE(this))throw VE("highWaterMark");return this._byteLengthQueuingStrategyHighWaterMark}get size(){if(!GE(this))throw VE("size");return BE}}Object.defineProperties(kl.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(kl.prototype,Symbol.toStringTag,{value:"ByteLengthQueuingStrategy",configurable:!0});function VE(c){return new TypeError(`ByteLengthQueuingStrategy.prototype.${c} can only be used on a ByteLengthQueuingStrategy`)}a(VE,"byteLengthBrandCheckException");function GE(c){return!n(c)||!Object.prototype.hasOwnProperty.call(c,"_byteLengthQueuingStrategyHighWaterMark")?!1:c instanceof kl}a(GE,"IsByteLengthQueuingStrategy");let HE=a(()=>1,"countSizeFunction");r(HE,"size");class zl{static{a(this,"CountQueuingStrategy")}constructor(f){ot(f,1,"CountQueuingStrategy"),f=qE(f,"First parameter"),this._countQueuingStrategyHighWaterMark=f.highWaterMark}get highWaterMark(){if(!WE(this))throw ZE("highWaterMark");return this._countQueuingStrategyHighWaterMark}get size(){if(!WE(this))throw ZE("size");return HE}}Object.defineProperties(zl.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(zl.prototype,Symbol.toStringTag,{value:"CountQueuingStrategy",configurable:!0});function ZE(c){return new TypeError(`CountQueuingStrategy.prototype.${c} can only be used on a CountQueuingStrategy`)}a(ZE,"countBrandCheckException");function WE(c){return!n(c)||!Object.prototype.hasOwnProperty.call(c,"_countQueuingStrategyHighWaterMark")?!1:c instanceof zl}a(WE,"IsCountQueuingStrategy");function _L(c,f){Pt(c,f);let w=c?.cancel,D=c?.flush,k=c?.readableType,H=c?.start,X=c?.transform,ve=c?.writableType;return{cancel:w===void 0?void 0:TL(w,c,`${f} has member 'cancel' that`),flush:D===void 0?void 0:PL(D,c,`${f} has member 'flush' that`),readableType:k,start:H===void 0?void 0:wL(H,c,`${f} has member 'start' that`),transform:X===void 0?void 0:bL(X,c,`${f} has member 'transform' that`),writableType:ve}}a(_L,"convertTransformer");function PL(c,f,w){return Tt(c,w),D=>d(c,f,[D])}a(PL,"convertTransformerFlushCallback");function wL(c,f,w){return Tt(c,w),D=>m(c,f,[D])}a(wL,"convertTransformerStartCallback");function bL(c,f,w){return Tt(c,w),(D,k)=>d(c,f,[D,k])}a(bL,"convertTransformerTransformCallback");function TL(c,f,w){return Tt(c,w),D=>d(c,f,[D])}a(TL,"convertTransformerCancelCallback");class Ul{static{a(this,"TransformStream")}constructor(f={},w={},D={}){f===void 0&&(f=null);let k=El(w,"Second parameter"),H=El(D,"Third parameter"),X=_L(f,"First parameter");if(X.readableType!==void 0)throw new RangeError("Invalid readableType specified");if(X.writableType!==void 0)throw new RangeError("Invalid writableType specified");let ve=ps(H,0),Oe=Tl(H),Te=ps(k,1),Ue=Tl(k),Ge,lt=h(Wr=>{Ge=Wr});EL(this,lt,Te,Ue,ve,Oe),xL(this,X),X.start!==void 0?Ge(X.start(this._transformStreamController)):Ge(void 0)}get readable(){if(!KE(this))throw QE("readable");return this._readable}get writable(){if(!KE(this))throw QE("writable");return this._writable}}Object.defineProperties(Ul.prototype,{readable:{enumerable:!0},writable:{enumerable:!0}}),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Ul.prototype,Symbol.toStringTag,{value:"TransformStream",configurable:!0});function EL(c,f,w,D,k,H){function X(){return f}a(X,"startAlgorithm");function ve(lt){return RL(c,lt)}a(ve,"writeAlgorithm");function Oe(lt){return DL(c,lt)}a(Oe,"abortAlgorithm");function Te(){return OL(c)}a(Te,"closeAlgorithm"),c._writable=AF(X,ve,Te,Oe,w,D);function Ue(){return $L(c)}a(Ue,"pullAlgorithm");function Ge(lt){return CL(c,lt)}a(Ge,"cancelAlgorithm"),c._readable=gs(X,Ue,Ge,k,H),c._backpressure=void 0,c._backpressureChangePromise=void 0,c._backpressureChangePromise_resolve=void 0,Ml(c,!0),c._transformStreamController=void 0}a(EL,"InitializeTransformStream");function KE(c){return!n(c)||!Object.prototype.hasOwnProperty.call(c,"_transformStreamController")?!1:c instanceof Ul}a(KE,"IsTransformStream");function JE(c,f){Hr(c._readable._readableStreamController,f),Vh(c,f)}a(JE,"TransformStreamError");function Vh(c,f){Ll(c._transformStreamController),fs(c._writable._writableStreamController,f),Gh(c)}a(Vh,"TransformStreamErrorWritableAndUnblockWrite");function Gh(c){c._backpressure&&Ml(c,!1)}a(Gh,"TransformStreamUnblockWrite");function Ml(c,f){c._backpressureChangePromise!==void 0&&c._backpressureChangePromise_resolve(),c._backpressureChangePromise=h(w=>{c._backpressureChangePromise_resolve=w}),c._backpressure=f}a(Ml,"TransformStreamSetBackpressure");class co{static{a(this,"TransformStreamDefaultController")}constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!Fl(this))throw jl("desiredSize");let f=this._controlledTransformStream._readable._readableStreamController;return qh(f)}enqueue(f=void 0){if(!Fl(this))throw jl("enqueue");XE(this,f)}error(f=void 0){if(!Fl(this))throw jl("error");IL(this,f)}terminate(){if(!Fl(this))throw jl("terminate");AL(this)}}Object.defineProperties(co.prototype,{enqueue:{enumerable:!0},error:{enumerable:!0},terminate:{enumerable:!0},desiredSize:{enumerable:!0}}),r(co.prototype.enqueue,"enqueue"),r(co.prototype.error,"error"),r(co.prototype.terminate,"terminate"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(co.prototype,Symbol.toStringTag,{value:"TransformStreamDefaultController",configurable:!0});function Fl(c){return!n(c)||!Object.prototype.hasOwnProperty.call(c,"_controlledTransformStream")?!1:c instanceof co}a(Fl,"IsTransformStreamDefaultController");function SL(c,f,w,D,k){f._controlledTransformStream=c,c._transformStreamController=f,f._transformAlgorithm=w,f._flushAlgorithm=D,f._cancelAlgorithm=k,f._finishPromise=void 0,f._finishPromise_resolve=void 0,f._finishPromise_reject=void 0}a(SL,"SetUpTransformStreamDefaultController");function xL(c,f){let w=Object.create(co.prototype),D,k,H;f.transform!==void 0?D=a(X=>f.transform(X,w),"transformAlgorithm"):D=a(X=>{try{return XE(w,X),g(void 0)}catch(ve){return y(ve)}},"transformAlgorithm"),f.flush!==void 0?k=a(()=>f.flush(w),"flushAlgorithm"):k=a(()=>g(void 0),"flushAlgorithm"),f.cancel!==void 0?H=a(X=>f.cancel(X),"cancelAlgorithm"):H=a(()=>g(void 0),"cancelAlgorithm"),SL(c,w,D,k,H)}a(xL,"SetUpTransformStreamDefaultControllerFromTransformer");function Ll(c){c._transformAlgorithm=void 0,c._flushAlgorithm=void 0,c._cancelAlgorithm=void 0}a(Ll,"TransformStreamDefaultControllerClearAlgorithms");function XE(c,f){let w=c._controlledTransformStream,D=w._readable._readableStreamController;if(!Li(D))throw new TypeError("Readable side is not in a state that permits enqueue");try{Fi(D,f)}catch(H){throw Vh(w,H),w._readable._storedError}rL(D)!==w._backpressure&&Ml(w,!0)}a(XE,"TransformStreamDefaultControllerEnqueue");function IL(c,f){JE(c._controlledTransformStream,f)}a(IL,"TransformStreamDefaultControllerError");function YE(c,f){let w=c._transformAlgorithm(f);return R(w,void 0,D=>{throw JE(c._controlledTransformStream,D),D})}a(YE,"TransformStreamDefaultControllerPerformTransform");function AL(c){let f=c._controlledTransformStream,w=f._readable._readableStreamController;Ho(w);let D=new TypeError("TransformStream terminated");Vh(f,D)}a(AL,"TransformStreamDefaultControllerTerminate");function RL(c,f){let w=c._transformStreamController;if(c._backpressure){let D=c._backpressureChangePromise;return R(D,()=>{let k=c._writable;if(k._state==="erroring")throw k._storedError;return YE(w,f)})}return YE(w,f)}a(RL,"TransformStreamDefaultSinkWriteAlgorithm");function DL(c,f){let w=c._transformStreamController;if(w._finishPromise!==void 0)return w._finishPromise;let D=c._readable;w._finishPromise=h((H,X)=>{w._finishPromise_resolve=H,w._finishPromise_reject=X});let k=w._cancelAlgorithm(f);return Ll(w),b(k,()=>(D._state==="errored"?ji(w,D._storedError):(Hr(D._readableStreamController,f),Hh(w)),null),H=>(Hr(D._readableStreamController,H),ji(w,H),null)),w._finishPromise}a(DL,"TransformStreamDefaultSinkAbortAlgorithm");function OL(c){let f=c._transformStreamController;if(f._finishPromise!==void 0)return f._finishPromise;let w=c._readable;f._finishPromise=h((k,H)=>{f._finishPromise_resolve=k,f._finishPromise_reject=H});let D=f._flushAlgorithm();return Ll(f),b(D,()=>(w._state==="errored"?ji(f,w._storedError):(Ho(w._readableStreamController),Hh(f)),null),k=>(Hr(w._readableStreamController,k),ji(f,k),null)),f._finishPromise}a(OL,"TransformStreamDefaultSinkCloseAlgorithm");function $L(c){return Ml(c,!1),c._backpressureChangePromise}a($L,"TransformStreamDefaultSourcePullAlgorithm");function CL(c,f){let w=c._transformStreamController;if(w._finishPromise!==void 0)return w._finishPromise;let D=c._writable;w._finishPromise=h((H,X)=>{w._finishPromise_resolve=H,w._finishPromise_reject=X});let k=w._cancelAlgorithm(f);return Ll(w),b(k,()=>(D._state==="errored"?ji(w,D._storedError):(fs(D._writableStreamController,f),Gh(c),Hh(w)),null),H=>(fs(D._writableStreamController,H),Gh(c),ji(w,H),null)),w._finishPromise}a(CL,"TransformStreamDefaultSourceCancelAlgorithm");function jl(c){return new TypeError(`TransformStreamDefaultController.prototype.${c} can only be used on a TransformStreamDefaultController`)}a(jl,"defaultControllerBrandCheckException");function Hh(c){c._finishPromise_resolve!==void 0&&(c._finishPromise_resolve(),c._finishPromise_resolve=void 0,c._finishPromise_reject=void 0)}a(Hh,"defaultControllerFinishPromiseResolve");function ji(c,f){c._finishPromise_reject!==void 0&&(I(c._finishPromise),c._finishPromise_reject(f),c._finishPromise_resolve=void 0,c._finishPromise_reject=void 0)}a(ji,"defaultControllerFinishPromiseReject");function QE(c){return new TypeError(`TransformStream.prototype.${c} can only be used on a TransformStream`)}a(QE,"streamBrandCheckException"),e.ByteLengthQueuingStrategy=kl,e.CountQueuingStrategy=zl,e.ReadableByteStreamController=$n,e.ReadableStream=Vt,e.ReadableStreamBYOBReader=oo,e.ReadableStreamBYOBRequest=Lo,e.ReadableStreamDefaultController=Nn,e.ReadableStreamDefaultReader=te,e.TransformStream=Ul,e.TransformStreamDefaultController=co,e.WritableStream=io,e.WritableStreamDefaultController=Mi,e.WritableStreamDefaultWriter=Cn}))});var X0=j(()=>{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,J0())}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*aw(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,Y0),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+Y0)).arrayBuffer();o+=s.byteLength,yield new Uint8Array(s)}}}var tce,Y0,Q0,I2,tn,xu=Ct(()=>{tce=he(X0(),1);Y0=65536;a(aw,"toIterator");Q0=class sw{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 sw?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 aw(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 aw(this.#e,!1))t.set(o,n),n+=o.length;return t.buffer}stream(){let t=aw(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),h=this.#e,g=[],y=0;for(let b of h){if(y>=u)break;let P=ArrayBuffer.isView(b)?b.byteLength:b.size;if(i&&P<=i)i-=P,s-=P;else{let S;ArrayBuffer.isView(b)?(S=b.subarray(i,Math.min(P,s)),y+=S.byteLength):(S=b.slice(i,Math.min(P,s)),y+=S.size),s-=P,g.push(S),i=0}}let T=new sw([],{type:String(o).toLowerCase()});return T.#r=u,T.#e=g,T}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(Q0.prototype,{size:{enumerable:!0},type:{enumerable:!0},slice:{enumerable:!0}});I2=Q0,tn=I2});var A2,R2,Oo,cw=Ct(()=>{xu();A2=class extends tn{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 tn&&/^(File)$/.test(t[Symbol.toStringTag])}},R2=A2,Oo=R2});function rO(e,t=tn){var n=`${eO()}${eO()}`.replace(/\./g,"").slice(-28).padStart(32,"-"),o=[],r=`--${n}\r
15
15
  Content-Disposition: form-data; name="`;return e.forEach((i,s)=>typeof i=="string"?o.push(r+uw(s)+`"\r
16
16
  \r
17
17
  ${i.replace(/\r(?!\n)|(?<!\r)\n/g,`\r
@@ -20,44 +20,44 @@ ${i.replace(/\r(?!\n)|(?<!\r)\n/g,`\r
20
20
  Content-Type: ${i.type||"application/octet-stream"}\r
21
21
  \r
22
22
  `,i,`\r
23
- `)),o.push(`--${n}--`),new t(o,{type:"multipart/form-data; boundary="+n})}var Iu,R2,D2,eO,O2,tO,uw,_i,$o,qf=Ct(()=>{xu();cw();({toStringTag:Iu,iterator:R2,hasInstance:D2}=Symbol),eO=Math.random,O2="append,set,get,getAll,delete,keys,values,entries,forEach,constructor".split(","),tO=a((e,t,n)=>(e+="",/^(Blob|File)$/.test(t&&t[Iu])?[(n=n!==void 0?n+"":t[Iu]=="File"?t.name:"blob",e),t.name!==n||t[Iu]=="blob"?new Oo([t],n,t):t]:[e,t+""]),"f"),uw=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"),_i=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"),$o=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[Iu](){return"FormData"}[R2](){return this.entries()}static[D2](t){return t&&typeof t=="object"&&t[Iu]==="FormData"&&!O2.some(n=>typeof t[n]!="function")}append(...t){_i("append",arguments,2),this.#e.push(tO(...t))}delete(t){_i("delete",arguments,1),t+="",this.#e=this.#e.filter(([n])=>n!==t)}get(t){_i("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 _i("getAll",arguments,1),n=[],t+="",this.#e.forEach(o=>o[0]===t&&n.push(o[1])),n}has(t){return _i("has",arguments,1),t+="",this.#e.some(n=>n[0]===t)}forEach(t,n){_i("forEach",arguments,1);for(var[o,r]of this)t.call(n,r,o,this)}set(...t){_i("set",arguments,2);var n=[],o=!0;t=tO(...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(rO,"formDataToBlob")});var Zn,Bf=Ct(()=>{Zn=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 er,lw=Ct(()=>{Bf();er=class extends Zn{static{a(this,"FetchError")}constructor(t,n,o){super(t,n),o&&(this.code=this.errno=o.code,this.erroredSysCall=o.syscall)}}});var Vf,dw,Au,nO,oO,iO,Gf=Ct(()=>{Vf=Symbol.toStringTag,dw=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[Vf]==="URLSearchParams","isURLSearchParameters"),Au=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[Vf]),"isBlob"),nO=a(e=>typeof e=="object"&&(e[Vf]==="AbortSignal"||e[Vf]==="EventTarget"),"isAbortSignal"),oO=a((e,t)=>{let n=new URL(t).hostname,o=new URL(e).hostname;return n===o||n.endsWith(`.${o}`)},"isDomainOrSubdomain"),iO=a((e,t)=>{let n=new URL(t).protocol,o=new URL(e).protocol;return n===o},"isSameProtocol")});var sO=j((vce,aO)=>{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)}aO.exports=globalThis.DOMException});var Pi,cO,uO,pw,lO,dO,pO,fO,mO,hO,Hf,fw=Ct(()=>{Pi=require("node:fs"),cO=require("node:path"),uO=he(sO(),1);cw();xu();({stat:pw}=Pi.promises),lO=a((e,t)=>mO((0,Pi.statSync)(e),e,t),"blobFromSync"),dO=a((e,t)=>pw(e).then(n=>mO(n,e,t)),"blobFrom"),pO=a((e,t)=>pw(e).then(n=>hO(n,e,t)),"fileFrom"),fO=a((e,t)=>hO((0,Pi.statSync)(e),e,t),"fileFromSync"),mO=a((e,t,n="")=>new tn([new Hf({path:t,size:e.size,lastModified:e.mtimeMs,start:0})],{type:n}),"fromBlob"),hO=a((e,t,n="")=>new Oo([new Hf({path:t,size:e.size,lastModified:e.mtimeMs,start:0})],(0,cO.basename)(t),{type:n,lastModified:e.mtimeMs}),"fromFile"),Hf=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 pw(this.#e);if(t>this.lastModified)throw new uO.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,Pi.createReadStream)(this.#e,{start:this.#t,end:this.#t+this.size-1})}get[Symbol.toStringTag](){return"Blob"}}});var yO={};nr(yO,{toFormData:()=>M2});function U2(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 M2(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 mw(n[1]||n[2]),r,i,s,u,h,g,y=[],T=new $o,b=a(l=>{s+=I.decode(l,{stream:!0})},"onPartData"),P=a(l=>{y.push(l)},"appendToFile"),S=a(()=>{let l=new Oo(y,g,{type:h});T.append(u,l)},"appendFileToFormData"),R=a(()=>{T.append(u,s)},"appendEntryToFormData"),I=new TextDecoder("utf-8");I.decode(),o.onPartBegin=function(){o.onPartData=b,o.onPartEnd=R,r="",i="",s="",u="",h="",g=null,y.length=0},o.onHeaderField=function(l){r+=I.decode(l,{stream:!0})},o.onHeaderValue=function(l){i+=I.decode(l,{stream:!0})},o.onHeaderEnd=function(){if(i+=I.decode(),r=r.toLowerCase(),r==="content-disposition"){let l=i.match(/\bname=("([^"]*)"|([^()<>@,;:\\"/[\]?={}\s\t]+))/i);l&&(u=l[2]||l[3]||""),g=U2(i),g&&(o.onPartData=P,o.onPartEnd=S)}else r==="content-type"&&(h=i);i="",r=""};for await(let l of e)o.write(l);return o.end(),T}var gn,pt,gO,Co,Zf,Wf,$2,Ru,C2,N2,k2,z2,wi,mw,vO=Ct(()=>{fw();qf();gn=0,pt={START_BOUNDARY:gn++,HEADER_FIELD_START:gn++,HEADER_FIELD:gn++,HEADER_VALUE_START:gn++,HEADER_VALUE:gn++,HEADER_VALUE_ALMOST_DONE:gn++,HEADERS_ALMOST_DONE:gn++,PART_DATA_START:gn++,PART_DATA:gn++,END:gn++},gO=1,Co={PART_BOUNDARY:gO,LAST_BOUNDARY:gO*=2},Zf=10,Wf=13,$2=32,Ru=45,C2=58,N2=97,k2=122,z2=a(e=>e|32,"lower"),wi=a(()=>{},"noop"),mw=class{static{a(this,"MultipartParser")}constructor(t){this.index=0,this.flags=0,this.onHeaderEnd=wi,this.onHeaderField=wi,this.onHeadersEnd=wi,this.onHeaderValue=wi,this.onPartBegin=wi,this.onPartData=wi,this.onPartEnd=wi,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=pt.START_BOUNDARY}write(t){let n=0,o=t.length,r=this.index,{lookbehind:i,boundary:s,boundaryChars:u,index:h,state:g,flags:y}=this,T=this.boundary.length,b=T-1,P=t.length,S,R,I=a(v=>{this[v+"Mark"]=n},"mark"),l=a(v=>{delete this[v+"Mark"]},"clear"),m=a((v,p,E,_)=>{(p===void 0||p!==E)&&this[v](_&&_.subarray(p,E))},"callback"),d=a((v,p)=>{let E=v+"Mark";E in this&&(p?(m(v,this[E],n,t),delete this[E]):(m(v,this[E],t.length,t),this[E]=0))},"dataCallback");for(n=0;n<o;n++)switch(S=t[n],g){case pt.START_BOUNDARY:if(h===s.length-2){if(S===Ru)y|=Co.LAST_BOUNDARY;else if(S!==Wf)return;h++;break}else if(h-1===s.length-2){if(y&Co.LAST_BOUNDARY&&S===Ru)g=pt.END,y=0;else if(!(y&Co.LAST_BOUNDARY)&&S===Zf)h=0,m("onPartBegin"),g=pt.HEADER_FIELD_START;else return;break}S!==s[h+2]&&(h=-2),S===s[h+2]&&h++;break;case pt.HEADER_FIELD_START:g=pt.HEADER_FIELD,I("onHeaderField"),h=0;case pt.HEADER_FIELD:if(S===Wf){l("onHeaderField"),g=pt.HEADERS_ALMOST_DONE;break}if(h++,S===Ru)break;if(S===C2){if(h===1)return;d("onHeaderField",!0),g=pt.HEADER_VALUE_START;break}if(R=z2(S),R<N2||R>k2)return;break;case pt.HEADER_VALUE_START:if(S===$2)break;I("onHeaderValue"),g=pt.HEADER_VALUE;case pt.HEADER_VALUE:S===Wf&&(d("onHeaderValue",!0),m("onHeaderEnd"),g=pt.HEADER_VALUE_ALMOST_DONE);break;case pt.HEADER_VALUE_ALMOST_DONE:if(S!==Zf)return;g=pt.HEADER_FIELD_START;break;case pt.HEADERS_ALMOST_DONE:if(S!==Zf)return;m("onHeadersEnd"),g=pt.PART_DATA_START;break;case pt.PART_DATA_START:g=pt.PART_DATA,I("onPartData");case pt.PART_DATA:if(r=h,h===0){for(n+=b;n<P&&!(t[n]in u);)n+=T;n-=b,S=t[n]}if(h<s.length)s[h]===S?(h===0&&d("onPartData",!0),h++):h=0;else if(h===s.length)h++,S===Wf?y|=Co.PART_BOUNDARY:S===Ru?y|=Co.LAST_BOUNDARY:h=0;else if(h-1===s.length)if(y&Co.PART_BOUNDARY){if(h=0,S===Zf){y&=~Co.PART_BOUNDARY,m("onPartEnd"),m("onPartBegin"),g=pt.HEADER_FIELD_START;break}}else y&Co.LAST_BOUNDARY&&S===Ru?(m("onPartEnd"),g=pt.END,y=0):h=0;if(h>0)i[h-1]=S;else if(r>0){let v=new Uint8Array(i.buffer,i.byteOffset,i.byteLength);m("onPartData",0,r,v),r=0,I("onPartData"),n--}break;case pt.END:break;default:throw new Error(`Unexpected state entered: ${g}`)}d("onHeaderField"),d("onHeaderValue"),d("onPartData"),this.index=h,this.state=g,this.flags=y}end(){if(this.state===pt.HEADER_FIELD_START&&this.index===0||this.state===pt.PART_DATA&&this.index===this.boundary.length)this.onPartEnd();else if(this.state!==pt.END)throw new Error("MultipartParser.end(): stream ended unexpectedly")}};a(U2,"_fileName");a(M2,"toFormData")});async function hw(e){if(e[dr].disturbed)throw new TypeError(`body used already for: ${e.url}`);if(e[dr].disturbed=!0,e[dr].error)throw e[dr].error;let{body:t}=e;if(t===null)return br.Buffer.alloc(0);if(!(t instanceof jr.default))return br.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 er(`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 Zn?r:new er(`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")?br.Buffer.from(n.join("")):br.Buffer.concat(n,o)}catch(r){throw new er(`Could not create Buffer from response body for ${e.url}: ${r.message}`,"system",r)}else throw new er(`Premature close of server response while trying to fetch ${e.url}`)}var jr,Wn,br,F2,dr,yn,Fa,L2,Kf,_O,PO,Jf=Ct(()=>{jr=he(require("node:stream"),1),Wn=require("node:util"),br=require("node:buffer");xu();qf();lw();Bf();Gf();F2=(0,Wn.promisify)(jr.default.pipeline),dr=Symbol("Body internals"),yn=class{static{a(this,"Body")}constructor(t,{size:n=0}={}){let o=null;t===null?t=null:dw(t)?t=br.Buffer.from(t.toString()):Au(t)||br.Buffer.isBuffer(t)||(Wn.types.isAnyArrayBuffer(t)?t=br.Buffer.from(t):ArrayBuffer.isView(t)?t=br.Buffer.from(t.buffer,t.byteOffset,t.byteLength):t instanceof jr.default||(t instanceof $o?(t=rO(t),o=t.type.split("=")[1]):t=br.Buffer.from(String(t))));let r=t;br.Buffer.isBuffer(t)?r=jr.default.Readable.from(t):Au(t)&&(r=jr.default.Readable.from(t.stream())),this[dr]={body:t,stream:r,boundary:o,disturbed:!1,error:null},this.size=n,t instanceof jr.default&&t.on("error",i=>{let s=i instanceof Zn?i:new er(`Invalid response body while trying to fetch ${this.url}: ${i.message}`,"system",i);this[dr].error=s})}get body(){return this[dr].stream}get bodyUsed(){return this[dr].disturbed}async arrayBuffer(){let{buffer:t,byteOffset:n,byteLength:o}=await hw(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 $o,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(()=>(vO(),yO));return n(this.body,t)}async blob(){let t=this.headers&&this.headers.get("content-type")||this[dr].body&&this[dr].body.type||"",n=await this.arrayBuffer();return new tn([n],{type:t})}async json(){let t=await this.text();return JSON.parse(t)}async text(){let t=await hw(this);return new TextDecoder().decode(t)}buffer(){return hw(this)}};yn.prototype.buffer=(0,Wn.deprecate)(yn.prototype.buffer,"Please use 'response.arrayBuffer()' instead of 'response.buffer()'","node-fetch#buffer");Object.defineProperties(yn.prototype,{body:{enumerable:!0},bodyUsed:{enumerable:!0},arrayBuffer:{enumerable:!0},blob:{enumerable:!0},json:{enumerable:!0},text:{enumerable:!0},data:{get:(0,Wn.deprecate)(()=>{},"data doesn't exist, use json(), text(), arrayBuffer(), or body instead","https://github.com/node-fetch/node-fetch/issues/1000 (response)")}});a(hw,"consumeBody");Fa=a((e,t)=>{let n,o,{body:r}=e[dr];if(e.bodyUsed)throw new Error("cannot clone body after it is used");return r instanceof jr.default&&typeof r.getBoundary!="function"&&(n=new jr.PassThrough({highWaterMark:t}),o=new jr.PassThrough({highWaterMark:t}),r.pipe(n),r.pipe(o),e[dr].stream=n,r=o),r},"clone"),L2=(0,Wn.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"),Kf=a((e,t)=>e===null?null:typeof e=="string"?"text/plain;charset=UTF-8":dw(e)?"application/x-www-form-urlencoded;charset=UTF-8":Au(e)?e.type||null:br.Buffer.isBuffer(e)||Wn.types.isAnyArrayBuffer(e)||ArrayBuffer.isView(e)?null:e instanceof $o?`multipart/form-data; boundary=${t[dr].boundary}`:e&&typeof e.getBoundary=="function"?`multipart/form-data;boundary=${L2(e)}`:e instanceof jr.default?null:"text/plain;charset=UTF-8","extractContentType"),_O=a(e=>{let{body:t}=e[dr];return t===null?0:Au(t)?t.size:br.Buffer.isBuffer(t)?t.length:t&&typeof t.getLengthSync=="function"&&t.hasKnownLength&&t.hasKnownLength()?t.getLengthSync():null},"getTotalBytes"),PO=a(async(e,{body:t})=>{t===null?e.end():await F2(t,e)},"writeToStream")});function wO(e=[]){return new pr(e.reduce((t,n,o,r)=>(o%2===0&&t.push(r.slice(o,o+2)),t),[]).filter(([t,n])=>{try{return Xf(t),yw(t,String(n)),!0}catch{return!1}}))}var gw,Du,Xf,yw,pr,Yf=Ct(()=>{gw=require("node:util"),Du=he(require("node:http"),1),Xf=typeof Du.default.validateHeaderName=="function"?Du.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}},yw=typeof Du.default.validateHeaderValue=="function"?Du.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}},pr=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"&&!gw.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"||gw.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])=>(Xf(o),yw(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)=>(Xf(s),yw(s,String(u)),URLSearchParams.prototype[r].call(o,String(s).toLowerCase(),String(u)));case"delete":case"has":case"getAll":return s=>(Xf(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(pr.prototype,["get","entries","forEach","values"].reduce((e,t)=>(e[t]={enumerable:!0},e),{}));a(wO,"fromRawHeaders")});var j2,Ou,vw=Ct(()=>{j2=new Set([301,302,303,307,308]),Ou=a(e=>j2.has(e),"isRedirect")});var rn,Tr,bO=Ct(()=>{Yf();Jf();vw();rn=Symbol("Response internals"),Tr=class e extends yn{static{a(this,"Response")}constructor(t=null,n={}){super(t,n);let o=n.status!=null?n.status:200,r=new pr(n.headers);if(t!==null&&!r.has("Content-Type")){let i=Kf(t,this);i&&r.append("Content-Type",i)}this[rn]={type:"default",url:n.url,status:o,statusText:n.statusText||"",headers:r,counter:n.counter,highWaterMark:n.highWaterMark}}get type(){return this[rn].type}get url(){return this[rn].url||""}get status(){return this[rn].status}get ok(){return this[rn].status>=200&&this[rn].status<300}get redirected(){return this[rn].counter>0}get statusText(){return this[rn].statusText}get headers(){return this[rn].headers}get highWaterMark(){return this[rn].highWaterMark}clone(){return new e(Fa(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(!Ou(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[rn].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 pr(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(Tr.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 TO,EO=Ct(()=>{TO=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 SO(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 RO(e){if(!IO.has(e))throw new TypeError(`Invalid referrerPolicy: ${e}`);return e}function q2(e){if(/^(http|ws)s:$/.test(e.protocol))return!0;let t=e.host.replace(/(^\[)|(]$)/g,""),n=(0,xO.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 La(e){return/^about:(blank|srcdoc)$/.test(e)||e.protocol==="data:"||/^(blob|filesystem):$/.test(e.protocol)?!0:q2(e)}function DO(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=SO(r),s=SO(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 La(i)&&!La(u)?"no-referrer":s.toString();case"strict-origin-when-cross-origin":return i.origin===u.origin?i:La(i)&&!La(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 La(i)&&!La(u)?"no-referrer":i;default:throw new TypeError(`Invalid referrerPolicy: ${o}`)}}function OO(e){let t=(e.get("referrer-policy")||"").split(/[,\s]+/),n="";for(let o of t)o&&IO.has(o)&&(n=o);return n}var xO,IO,AO,_w=Ct(()=>{xO=require("node:net");a(SO,"stripURLForUseAsAReferrer");IO=new Set(["","no-referrer","no-referrer-when-downgrade","same-origin","origin","strict-origin","origin-when-cross-origin","strict-origin-when-cross-origin","unsafe-url"]),AO="strict-origin-when-cross-origin";a(RO,"validateReferrerPolicy");a(q2,"isOriginPotentiallyTrustworthy");a(La,"isUrlPotentiallyTrustworthy");a(DO,"determineRequestsReferrer");a(OO,"parseReferrerPolicyFromHeader")});var $O,CO,Lt,$u,B2,No,NO,kO=Ct(()=>{$O=require("node:url"),CO=require("node:util");Yf();Jf();Gf();EO();_w();Lt=Symbol("Request internals"),$u=a(e=>typeof e=="object"&&typeof e[Lt]=="object","isRequest"),B2=(0,CO.deprecate)(()=>{},".data is not a valid RequestInit property, use .body instead","https://github.com/node-fetch/node-fetch/issues/1000 (request)"),No=class e extends yn{static{a(this,"Request")}constructor(t,n={}){let o;if($u(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()),!$u(n)&&"data"in n&&B2(),(n.body!=null||$u(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:$u(t)&&t.body!==null?Fa(t):null;super(i,{size:n.size||t.size||0});let s=new pr(n.headers||t.headers||{});if(i!==null&&!s.has("Content-Type")){let g=Kf(i,this);g&&s.set("Content-Type",g)}let u=$u(t)?t.signal:null;if("signal"in n&&(u=n.signal),u!=null&&!nO(u))throw new TypeError("Expected signal to be an instanceof AbortSignal or EventTarget");let h=n.referrer==null?t.referrer:n.referrer;if(h==="")h="no-referrer";else if(h){let g=new URL(h);h=/^about:(\/\/)?client$/.test(g)?"client":g}else h=void 0;this[Lt]={method:r,redirect:n.redirect||t.redirect||"follow",headers:s,parsedURL:o,signal:u,referrer:h},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[Lt].method}get url(){return(0,$O.format)(this[Lt].parsedURL)}get headers(){return this[Lt].headers}get redirect(){return this[Lt].redirect}get signal(){return this[Lt].signal}get referrer(){if(this[Lt].referrer==="no-referrer")return"";if(this[Lt].referrer==="client")return"about:client";if(this[Lt].referrer)return this[Lt].referrer.toString()}get referrerPolicy(){return this[Lt].referrerPolicy}set referrerPolicy(t){this[Lt].referrerPolicy=RO(t)}clone(){return new e(this)}get[Symbol.toStringTag](){return"Request"}};Object.defineProperties(No.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}});NO=a(e=>{let{parsedURL:t}=e[Lt],n=new pr(e[Lt].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=_O(e);typeof u=="number"&&!Number.isNaN(u)&&(o=String(u))}o&&n.set("Content-Length",o),e.referrerPolicy===""&&(e.referrerPolicy=AO),e.referrer&&e.referrer!=="no-referrer"?e[Lt].referrer=DO(e):e[Lt].referrer="no-referrer",e[Lt].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=TO(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 Cu,zO=Ct(()=>{Bf();Cu=class extends Zn{static{a(this,"AbortError")}constructor(t,n="aborted"){super(t,n)}}});var FO={};nr(FO,{AbortError:()=>Cu,Blob:()=>tn,FetchError:()=>er,File:()=>Oo,FormData:()=>$o,Headers:()=>pr,Request:()=>No,Response:()=>Tr,blobFrom:()=>dO,blobFromSync:()=>lO,default:()=>Pw,fileFrom:()=>pO,fileFromSync:()=>fO,isRedirect:()=>Ou});async function Pw(e,t){return new Promise((n,o)=>{let r=new No(e,t),{parsedURL:i,options:s}=NO(r);if(!V2.has(i.protocol))throw new TypeError(`node-fetch cannot load ${e}. URL scheme "${i.protocol.replace(/:$/,"")}" is not supported.`);if(i.protocol==="data:"){let S=Z0(r.url),R=new Tr(S,{headers:{"Content-Type":S.typeFull}});n(R);return}let u=(i.protocol==="https:"?MO.default:UO.default).request,{signal:h}=r,g=null,y=a(()=>{let S=new Cu("The operation was aborted.");o(S),r.body&&r.body instanceof Er.default.Readable&&r.body.destroy(S),!(!g||!g.body)&&g.body.emit("error",S)},"abort");if(h&&h.aborted){y();return}let T=a(()=>{y(),P()},"abortAndFinalize"),b=u(i.toString(),s);h&&h.addEventListener("abort",T);let P=a(()=>{b.abort(),h&&h.removeEventListener("abort",T)},"finalize");b.on("error",S=>{o(new er(`request to ${r.url} failed, reason: ${S.message}`,"system",S)),P()}),G2(b,S=>{g&&g.body&&g.body.destroy(S)}),process.version<"v14"&&b.on("socket",S=>{let R;S.prependListener("end",()=>{R=S._eventsCount}),S.prependListener("close",I=>{if(g&&R<S._eventsCount&&!I){let l=new Error("Premature close");l.code="ERR_STREAM_PREMATURE_CLOSE",g.body.emit("error",l)}})}),b.on("response",S=>{b.setTimeout(0);let R=wO(S.rawHeaders);if(Ou(S.statusCode)){let v=R.get("Location"),p=null;try{p=v===null?null:new URL(v,r.url)}catch{if(r.redirect!=="manual"){o(new er(`uri requested responds with an invalid redirect URL: ${v}`,"invalid-redirect")),P();return}}switch(r.redirect){case"error":o(new er(`uri requested responds with a redirect, redirect mode is set to error: ${r.url}`,"no-redirect")),P();return;case"manual":break;case"follow":{if(p===null)break;if(r.counter>=r.follow){o(new er(`maximum redirect reached at: ${r.url}`,"max-redirect")),P();return}let E={headers:new pr(r.headers),follow:r.follow,counter:r.counter+1,agent:r.agent,compress:r.compress,method:r.method,body:Fa(r),signal:r.signal,size:r.size,referrer:r.referrer,referrerPolicy:r.referrerPolicy};if(!oO(r.url,p)||!iO(r.url,p))for(let pe of["authorization","www-authenticate","cookie","cookie2"])E.headers.delete(pe);if(S.statusCode!==303&&r.body&&t.body instanceof Er.default.Readable){o(new er("Cannot follow redirect with body being a readable stream","unsupported-redirect")),P();return}(S.statusCode===303||(S.statusCode===301||S.statusCode===302)&&r.method==="POST")&&(E.method="GET",E.body=void 0,E.headers.delete("content-length"));let _=OO(R);_&&(E.referrerPolicy=_),n(Pw(new No(p,E))),P();return}default:return o(new TypeError(`Redirect option '${r.redirect}' is not a valid value of RequestRedirect`))}}h&&S.once("end",()=>{h.removeEventListener("abort",T)});let I=(0,Er.pipeline)(S,new Er.PassThrough,v=>{v&&o(v)});process.version<"v12.10"&&S.on("aborted",T);let l={url:r.url,status:S.statusCode,statusText:S.statusMessage,headers:R,size:r.size,counter:r.counter,highWaterMark:r.highWaterMark},m=R.get("Content-Encoding");if(!r.compress||r.method==="HEAD"||m===null||S.statusCode===204||S.statusCode===304){g=new Tr(I,l),n(g);return}let d={flush:bi.default.Z_SYNC_FLUSH,finishFlush:bi.default.Z_SYNC_FLUSH};if(m==="gzip"||m==="x-gzip"){I=(0,Er.pipeline)(I,bi.default.createGunzip(d),v=>{v&&o(v)}),g=new Tr(I,l),n(g);return}if(m==="deflate"||m==="x-deflate"){let v=(0,Er.pipeline)(S,new Er.PassThrough,p=>{p&&o(p)});v.once("data",p=>{(p[0]&15)===8?I=(0,Er.pipeline)(I,bi.default.createInflate(),E=>{E&&o(E)}):I=(0,Er.pipeline)(I,bi.default.createInflateRaw(),E=>{E&&o(E)}),g=new Tr(I,l),n(g)}),v.once("end",()=>{g||(g=new Tr(I,l),n(g))});return}if(m==="br"){I=(0,Er.pipeline)(I,bi.default.createBrotliDecompress(),v=>{v&&o(v)}),g=new Tr(I,l),n(g);return}g=new Tr(I,l),n(g)}),PO(b,r).catch(o)})}function G2(e,t){let n=Nu.Buffer.from(`0\r
23
+ `)),o.push(`--${n}--`),new t(o,{type:"multipart/form-data; boundary="+n})}var Iu,D2,O2,eO,$2,tO,uw,_i,$o,qf=Ct(()=>{xu();cw();({toStringTag:Iu,iterator:D2,hasInstance:O2}=Symbol),eO=Math.random,$2="append,set,get,getAll,delete,keys,values,entries,forEach,constructor".split(","),tO=a((e,t,n)=>(e+="",/^(Blob|File)$/.test(t&&t[Iu])?[(n=n!==void 0?n+"":t[Iu]=="File"?t.name:"blob",e),t.name!==n||t[Iu]=="blob"?new Oo([t],n,t):t]:[e,t+""]),"f"),uw=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"),_i=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"),$o=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[Iu](){return"FormData"}[D2](){return this.entries()}static[O2](t){return t&&typeof t=="object"&&t[Iu]==="FormData"&&!$2.some(n=>typeof t[n]!="function")}append(...t){_i("append",arguments,2),this.#e.push(tO(...t))}delete(t){_i("delete",arguments,1),t+="",this.#e=this.#e.filter(([n])=>n!==t)}get(t){_i("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 _i("getAll",arguments,1),n=[],t+="",this.#e.forEach(o=>o[0]===t&&n.push(o[1])),n}has(t){return _i("has",arguments,1),t+="",this.#e.some(n=>n[0]===t)}forEach(t,n){_i("forEach",arguments,1);for(var[o,r]of this)t.call(n,r,o,this)}set(...t){_i("set",arguments,2);var n=[],o=!0;t=tO(...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(rO,"formDataToBlob")});var Zn,Bf=Ct(()=>{Zn=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 er,lw=Ct(()=>{Bf();er=class extends Zn{static{a(this,"FetchError")}constructor(t,n,o){super(t,n),o&&(this.code=this.errno=o.code,this.erroredSysCall=o.syscall)}}});var Vf,dw,Au,nO,oO,iO,Gf=Ct(()=>{Vf=Symbol.toStringTag,dw=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[Vf]==="URLSearchParams","isURLSearchParameters"),Au=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[Vf]),"isBlob"),nO=a(e=>typeof e=="object"&&(e[Vf]==="AbortSignal"||e[Vf]==="EventTarget"),"isAbortSignal"),oO=a((e,t)=>{let n=new URL(t).hostname,o=new URL(e).hostname;return n===o||n.endsWith(`.${o}`)},"isDomainOrSubdomain"),iO=a((e,t)=>{let n=new URL(t).protocol,o=new URL(e).protocol;return n===o},"isSameProtocol")});var sO=j((Pce,aO)=>{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)}aO.exports=globalThis.DOMException});var Pi,cO,uO,pw,lO,dO,pO,fO,mO,hO,Hf,fw=Ct(()=>{Pi=require("node:fs"),cO=require("node:path"),uO=he(sO(),1);cw();xu();({stat:pw}=Pi.promises),lO=a((e,t)=>mO((0,Pi.statSync)(e),e,t),"blobFromSync"),dO=a((e,t)=>pw(e).then(n=>mO(n,e,t)),"blobFrom"),pO=a((e,t)=>pw(e).then(n=>hO(n,e,t)),"fileFrom"),fO=a((e,t)=>hO((0,Pi.statSync)(e),e,t),"fileFromSync"),mO=a((e,t,n="")=>new tn([new Hf({path:t,size:e.size,lastModified:e.mtimeMs,start:0})],{type:n}),"fromBlob"),hO=a((e,t,n="")=>new Oo([new Hf({path:t,size:e.size,lastModified:e.mtimeMs,start:0})],(0,cO.basename)(t),{type:n,lastModified:e.mtimeMs}),"fromFile"),Hf=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 pw(this.#e);if(t>this.lastModified)throw new uO.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,Pi.createReadStream)(this.#e,{start:this.#t,end:this.#t+this.size-1})}get[Symbol.toStringTag](){return"Blob"}}});var yO={};nr(yO,{toFormData:()=>F2});function M2(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 F2(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 mw(n[1]||n[2]),r,i,s,u,h,g,y=[],T=new $o,b=a(l=>{s+=I.decode(l,{stream:!0})},"onPartData"),P=a(l=>{y.push(l)},"appendToFile"),S=a(()=>{let l=new Oo(y,g,{type:h});T.append(u,l)},"appendFileToFormData"),R=a(()=>{T.append(u,s)},"appendEntryToFormData"),I=new TextDecoder("utf-8");I.decode(),o.onPartBegin=function(){o.onPartData=b,o.onPartEnd=R,r="",i="",s="",u="",h="",g=null,y.length=0},o.onHeaderField=function(l){r+=I.decode(l,{stream:!0})},o.onHeaderValue=function(l){i+=I.decode(l,{stream:!0})},o.onHeaderEnd=function(){if(i+=I.decode(),r=r.toLowerCase(),r==="content-disposition"){let l=i.match(/\bname=("([^"]*)"|([^()<>@,;:\\"/[\]?={}\s\t]+))/i);l&&(u=l[2]||l[3]||""),g=M2(i),g&&(o.onPartData=P,o.onPartEnd=S)}else r==="content-type"&&(h=i);i="",r=""};for await(let l of e)o.write(l);return o.end(),T}var gn,pt,gO,Co,Zf,Wf,C2,Ru,N2,k2,z2,U2,wi,mw,vO=Ct(()=>{fw();qf();gn=0,pt={START_BOUNDARY:gn++,HEADER_FIELD_START:gn++,HEADER_FIELD:gn++,HEADER_VALUE_START:gn++,HEADER_VALUE:gn++,HEADER_VALUE_ALMOST_DONE:gn++,HEADERS_ALMOST_DONE:gn++,PART_DATA_START:gn++,PART_DATA:gn++,END:gn++},gO=1,Co={PART_BOUNDARY:gO,LAST_BOUNDARY:gO*=2},Zf=10,Wf=13,C2=32,Ru=45,N2=58,k2=97,z2=122,U2=a(e=>e|32,"lower"),wi=a(()=>{},"noop"),mw=class{static{a(this,"MultipartParser")}constructor(t){this.index=0,this.flags=0,this.onHeaderEnd=wi,this.onHeaderField=wi,this.onHeadersEnd=wi,this.onHeaderValue=wi,this.onPartBegin=wi,this.onPartData=wi,this.onPartEnd=wi,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=pt.START_BOUNDARY}write(t){let n=0,o=t.length,r=this.index,{lookbehind:i,boundary:s,boundaryChars:u,index:h,state:g,flags:y}=this,T=this.boundary.length,b=T-1,P=t.length,S,R,I=a(v=>{this[v+"Mark"]=n},"mark"),l=a(v=>{delete this[v+"Mark"]},"clear"),m=a((v,p,E,_)=>{(p===void 0||p!==E)&&this[v](_&&_.subarray(p,E))},"callback"),d=a((v,p)=>{let E=v+"Mark";E in this&&(p?(m(v,this[E],n,t),delete this[E]):(m(v,this[E],t.length,t),this[E]=0))},"dataCallback");for(n=0;n<o;n++)switch(S=t[n],g){case pt.START_BOUNDARY:if(h===s.length-2){if(S===Ru)y|=Co.LAST_BOUNDARY;else if(S!==Wf)return;h++;break}else if(h-1===s.length-2){if(y&Co.LAST_BOUNDARY&&S===Ru)g=pt.END,y=0;else if(!(y&Co.LAST_BOUNDARY)&&S===Zf)h=0,m("onPartBegin"),g=pt.HEADER_FIELD_START;else return;break}S!==s[h+2]&&(h=-2),S===s[h+2]&&h++;break;case pt.HEADER_FIELD_START:g=pt.HEADER_FIELD,I("onHeaderField"),h=0;case pt.HEADER_FIELD:if(S===Wf){l("onHeaderField"),g=pt.HEADERS_ALMOST_DONE;break}if(h++,S===Ru)break;if(S===N2){if(h===1)return;d("onHeaderField",!0),g=pt.HEADER_VALUE_START;break}if(R=U2(S),R<k2||R>z2)return;break;case pt.HEADER_VALUE_START:if(S===C2)break;I("onHeaderValue"),g=pt.HEADER_VALUE;case pt.HEADER_VALUE:S===Wf&&(d("onHeaderValue",!0),m("onHeaderEnd"),g=pt.HEADER_VALUE_ALMOST_DONE);break;case pt.HEADER_VALUE_ALMOST_DONE:if(S!==Zf)return;g=pt.HEADER_FIELD_START;break;case pt.HEADERS_ALMOST_DONE:if(S!==Zf)return;m("onHeadersEnd"),g=pt.PART_DATA_START;break;case pt.PART_DATA_START:g=pt.PART_DATA,I("onPartData");case pt.PART_DATA:if(r=h,h===0){for(n+=b;n<P&&!(t[n]in u);)n+=T;n-=b,S=t[n]}if(h<s.length)s[h]===S?(h===0&&d("onPartData",!0),h++):h=0;else if(h===s.length)h++,S===Wf?y|=Co.PART_BOUNDARY:S===Ru?y|=Co.LAST_BOUNDARY:h=0;else if(h-1===s.length)if(y&Co.PART_BOUNDARY){if(h=0,S===Zf){y&=~Co.PART_BOUNDARY,m("onPartEnd"),m("onPartBegin"),g=pt.HEADER_FIELD_START;break}}else y&Co.LAST_BOUNDARY&&S===Ru?(m("onPartEnd"),g=pt.END,y=0):h=0;if(h>0)i[h-1]=S;else if(r>0){let v=new Uint8Array(i.buffer,i.byteOffset,i.byteLength);m("onPartData",0,r,v),r=0,I("onPartData"),n--}break;case pt.END:break;default:throw new Error(`Unexpected state entered: ${g}`)}d("onHeaderField"),d("onHeaderValue"),d("onPartData"),this.index=h,this.state=g,this.flags=y}end(){if(this.state===pt.HEADER_FIELD_START&&this.index===0||this.state===pt.PART_DATA&&this.index===this.boundary.length)this.onPartEnd();else if(this.state!==pt.END)throw new Error("MultipartParser.end(): stream ended unexpectedly")}};a(M2,"_fileName");a(F2,"toFormData")});async function hw(e){if(e[dr].disturbed)throw new TypeError(`body used already for: ${e.url}`);if(e[dr].disturbed=!0,e[dr].error)throw e[dr].error;let{body:t}=e;if(t===null)return br.Buffer.alloc(0);if(!(t instanceof jr.default))return br.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 er(`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 Zn?r:new er(`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")?br.Buffer.from(n.join("")):br.Buffer.concat(n,o)}catch(r){throw new er(`Could not create Buffer from response body for ${e.url}: ${r.message}`,"system",r)}else throw new er(`Premature close of server response while trying to fetch ${e.url}`)}var jr,Wn,br,L2,dr,yn,Fa,j2,Kf,_O,PO,Jf=Ct(()=>{jr=he(require("node:stream"),1),Wn=require("node:util"),br=require("node:buffer");xu();qf();lw();Bf();Gf();L2=(0,Wn.promisify)(jr.default.pipeline),dr=Symbol("Body internals"),yn=class{static{a(this,"Body")}constructor(t,{size:n=0}={}){let o=null;t===null?t=null:dw(t)?t=br.Buffer.from(t.toString()):Au(t)||br.Buffer.isBuffer(t)||(Wn.types.isAnyArrayBuffer(t)?t=br.Buffer.from(t):ArrayBuffer.isView(t)?t=br.Buffer.from(t.buffer,t.byteOffset,t.byteLength):t instanceof jr.default||(t instanceof $o?(t=rO(t),o=t.type.split("=")[1]):t=br.Buffer.from(String(t))));let r=t;br.Buffer.isBuffer(t)?r=jr.default.Readable.from(t):Au(t)&&(r=jr.default.Readable.from(t.stream())),this[dr]={body:t,stream:r,boundary:o,disturbed:!1,error:null},this.size=n,t instanceof jr.default&&t.on("error",i=>{let s=i instanceof Zn?i:new er(`Invalid response body while trying to fetch ${this.url}: ${i.message}`,"system",i);this[dr].error=s})}get body(){return this[dr].stream}get bodyUsed(){return this[dr].disturbed}async arrayBuffer(){let{buffer:t,byteOffset:n,byteLength:o}=await hw(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 $o,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(()=>(vO(),yO));return n(this.body,t)}async blob(){let t=this.headers&&this.headers.get("content-type")||this[dr].body&&this[dr].body.type||"",n=await this.arrayBuffer();return new tn([n],{type:t})}async json(){let t=await this.text();return JSON.parse(t)}async text(){let t=await hw(this);return new TextDecoder().decode(t)}buffer(){return hw(this)}};yn.prototype.buffer=(0,Wn.deprecate)(yn.prototype.buffer,"Please use 'response.arrayBuffer()' instead of 'response.buffer()'","node-fetch#buffer");Object.defineProperties(yn.prototype,{body:{enumerable:!0},bodyUsed:{enumerable:!0},arrayBuffer:{enumerable:!0},blob:{enumerable:!0},json:{enumerable:!0},text:{enumerable:!0},data:{get:(0,Wn.deprecate)(()=>{},"data doesn't exist, use json(), text(), arrayBuffer(), or body instead","https://github.com/node-fetch/node-fetch/issues/1000 (response)")}});a(hw,"consumeBody");Fa=a((e,t)=>{let n,o,{body:r}=e[dr];if(e.bodyUsed)throw new Error("cannot clone body after it is used");return r instanceof jr.default&&typeof r.getBoundary!="function"&&(n=new jr.PassThrough({highWaterMark:t}),o=new jr.PassThrough({highWaterMark:t}),r.pipe(n),r.pipe(o),e[dr].stream=n,r=o),r},"clone"),j2=(0,Wn.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"),Kf=a((e,t)=>e===null?null:typeof e=="string"?"text/plain;charset=UTF-8":dw(e)?"application/x-www-form-urlencoded;charset=UTF-8":Au(e)?e.type||null:br.Buffer.isBuffer(e)||Wn.types.isAnyArrayBuffer(e)||ArrayBuffer.isView(e)?null:e instanceof $o?`multipart/form-data; boundary=${t[dr].boundary}`:e&&typeof e.getBoundary=="function"?`multipart/form-data;boundary=${j2(e)}`:e instanceof jr.default?null:"text/plain;charset=UTF-8","extractContentType"),_O=a(e=>{let{body:t}=e[dr];return t===null?0:Au(t)?t.size:br.Buffer.isBuffer(t)?t.length:t&&typeof t.getLengthSync=="function"&&t.hasKnownLength&&t.hasKnownLength()?t.getLengthSync():null},"getTotalBytes"),PO=a(async(e,{body:t})=>{t===null?e.end():await L2(t,e)},"writeToStream")});function wO(e=[]){return new pr(e.reduce((t,n,o,r)=>(o%2===0&&t.push(r.slice(o,o+2)),t),[]).filter(([t,n])=>{try{return Xf(t),yw(t,String(n)),!0}catch{return!1}}))}var gw,Du,Xf,yw,pr,Yf=Ct(()=>{gw=require("node:util"),Du=he(require("node:http"),1),Xf=typeof Du.default.validateHeaderName=="function"?Du.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}},yw=typeof Du.default.validateHeaderValue=="function"?Du.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}},pr=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"&&!gw.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"||gw.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])=>(Xf(o),yw(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)=>(Xf(s),yw(s,String(u)),URLSearchParams.prototype[r].call(o,String(s).toLowerCase(),String(u)));case"delete":case"has":case"getAll":return s=>(Xf(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(pr.prototype,["get","entries","forEach","values"].reduce((e,t)=>(e[t]={enumerable:!0},e),{}));a(wO,"fromRawHeaders")});var q2,Ou,vw=Ct(()=>{q2=new Set([301,302,303,307,308]),Ou=a(e=>q2.has(e),"isRedirect")});var rn,Tr,bO=Ct(()=>{Yf();Jf();vw();rn=Symbol("Response internals"),Tr=class e extends yn{static{a(this,"Response")}constructor(t=null,n={}){super(t,n);let o=n.status!=null?n.status:200,r=new pr(n.headers);if(t!==null&&!r.has("Content-Type")){let i=Kf(t,this);i&&r.append("Content-Type",i)}this[rn]={type:"default",url:n.url,status:o,statusText:n.statusText||"",headers:r,counter:n.counter,highWaterMark:n.highWaterMark}}get type(){return this[rn].type}get url(){return this[rn].url||""}get status(){return this[rn].status}get ok(){return this[rn].status>=200&&this[rn].status<300}get redirected(){return this[rn].counter>0}get statusText(){return this[rn].statusText}get headers(){return this[rn].headers}get highWaterMark(){return this[rn].highWaterMark}clone(){return new e(Fa(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(!Ou(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[rn].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 pr(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(Tr.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 TO,EO=Ct(()=>{TO=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 SO(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 RO(e){if(!IO.has(e))throw new TypeError(`Invalid referrerPolicy: ${e}`);return e}function B2(e){if(/^(http|ws)s:$/.test(e.protocol))return!0;let t=e.host.replace(/(^\[)|(]$)/g,""),n=(0,xO.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 La(e){return/^about:(blank|srcdoc)$/.test(e)||e.protocol==="data:"||/^(blob|filesystem):$/.test(e.protocol)?!0:B2(e)}function DO(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=SO(r),s=SO(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 La(i)&&!La(u)?"no-referrer":s.toString();case"strict-origin-when-cross-origin":return i.origin===u.origin?i:La(i)&&!La(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 La(i)&&!La(u)?"no-referrer":i;default:throw new TypeError(`Invalid referrerPolicy: ${o}`)}}function OO(e){let t=(e.get("referrer-policy")||"").split(/[,\s]+/),n="";for(let o of t)o&&IO.has(o)&&(n=o);return n}var xO,IO,AO,_w=Ct(()=>{xO=require("node:net");a(SO,"stripURLForUseAsAReferrer");IO=new Set(["","no-referrer","no-referrer-when-downgrade","same-origin","origin","strict-origin","origin-when-cross-origin","strict-origin-when-cross-origin","unsafe-url"]),AO="strict-origin-when-cross-origin";a(RO,"validateReferrerPolicy");a(B2,"isOriginPotentiallyTrustworthy");a(La,"isUrlPotentiallyTrustworthy");a(DO,"determineRequestsReferrer");a(OO,"parseReferrerPolicyFromHeader")});var $O,CO,Lt,$u,V2,No,NO,kO=Ct(()=>{$O=require("node:url"),CO=require("node:util");Yf();Jf();Gf();EO();_w();Lt=Symbol("Request internals"),$u=a(e=>typeof e=="object"&&typeof e[Lt]=="object","isRequest"),V2=(0,CO.deprecate)(()=>{},".data is not a valid RequestInit property, use .body instead","https://github.com/node-fetch/node-fetch/issues/1000 (request)"),No=class e extends yn{static{a(this,"Request")}constructor(t,n={}){let o;if($u(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()),!$u(n)&&"data"in n&&V2(),(n.body!=null||$u(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:$u(t)&&t.body!==null?Fa(t):null;super(i,{size:n.size||t.size||0});let s=new pr(n.headers||t.headers||{});if(i!==null&&!s.has("Content-Type")){let g=Kf(i,this);g&&s.set("Content-Type",g)}let u=$u(t)?t.signal:null;if("signal"in n&&(u=n.signal),u!=null&&!nO(u))throw new TypeError("Expected signal to be an instanceof AbortSignal or EventTarget");let h=n.referrer==null?t.referrer:n.referrer;if(h==="")h="no-referrer";else if(h){let g=new URL(h);h=/^about:(\/\/)?client$/.test(g)?"client":g}else h=void 0;this[Lt]={method:r,redirect:n.redirect||t.redirect||"follow",headers:s,parsedURL:o,signal:u,referrer:h},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[Lt].method}get url(){return(0,$O.format)(this[Lt].parsedURL)}get headers(){return this[Lt].headers}get redirect(){return this[Lt].redirect}get signal(){return this[Lt].signal}get referrer(){if(this[Lt].referrer==="no-referrer")return"";if(this[Lt].referrer==="client")return"about:client";if(this[Lt].referrer)return this[Lt].referrer.toString()}get referrerPolicy(){return this[Lt].referrerPolicy}set referrerPolicy(t){this[Lt].referrerPolicy=RO(t)}clone(){return new e(this)}get[Symbol.toStringTag](){return"Request"}};Object.defineProperties(No.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}});NO=a(e=>{let{parsedURL:t}=e[Lt],n=new pr(e[Lt].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=_O(e);typeof u=="number"&&!Number.isNaN(u)&&(o=String(u))}o&&n.set("Content-Length",o),e.referrerPolicy===""&&(e.referrerPolicy=AO),e.referrer&&e.referrer!=="no-referrer"?e[Lt].referrer=DO(e):e[Lt].referrer="no-referrer",e[Lt].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=TO(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 Cu,zO=Ct(()=>{Bf();Cu=class extends Zn{static{a(this,"AbortError")}constructor(t,n="aborted"){super(t,n)}}});var FO={};nr(FO,{AbortError:()=>Cu,Blob:()=>tn,FetchError:()=>er,File:()=>Oo,FormData:()=>$o,Headers:()=>pr,Request:()=>No,Response:()=>Tr,blobFrom:()=>dO,blobFromSync:()=>lO,default:()=>Pw,fileFrom:()=>pO,fileFromSync:()=>fO,isRedirect:()=>Ou});async function Pw(e,t){return new Promise((n,o)=>{let r=new No(e,t),{parsedURL:i,options:s}=NO(r);if(!G2.has(i.protocol))throw new TypeError(`node-fetch cannot load ${e}. URL scheme "${i.protocol.replace(/:$/,"")}" is not supported.`);if(i.protocol==="data:"){let S=Z0(r.url),R=new Tr(S,{headers:{"Content-Type":S.typeFull}});n(R);return}let u=(i.protocol==="https:"?MO.default:UO.default).request,{signal:h}=r,g=null,y=a(()=>{let S=new Cu("The operation was aborted.");o(S),r.body&&r.body instanceof Er.default.Readable&&r.body.destroy(S),!(!g||!g.body)&&g.body.emit("error",S)},"abort");if(h&&h.aborted){y();return}let T=a(()=>{y(),P()},"abortAndFinalize"),b=u(i.toString(),s);h&&h.addEventListener("abort",T);let P=a(()=>{b.abort(),h&&h.removeEventListener("abort",T)},"finalize");b.on("error",S=>{o(new er(`request to ${r.url} failed, reason: ${S.message}`,"system",S)),P()}),H2(b,S=>{g&&g.body&&g.body.destroy(S)}),process.version<"v14"&&b.on("socket",S=>{let R;S.prependListener("end",()=>{R=S._eventsCount}),S.prependListener("close",I=>{if(g&&R<S._eventsCount&&!I){let l=new Error("Premature close");l.code="ERR_STREAM_PREMATURE_CLOSE",g.body.emit("error",l)}})}),b.on("response",S=>{b.setTimeout(0);let R=wO(S.rawHeaders);if(Ou(S.statusCode)){let v=R.get("Location"),p=null;try{p=v===null?null:new URL(v,r.url)}catch{if(r.redirect!=="manual"){o(new er(`uri requested responds with an invalid redirect URL: ${v}`,"invalid-redirect")),P();return}}switch(r.redirect){case"error":o(new er(`uri requested responds with a redirect, redirect mode is set to error: ${r.url}`,"no-redirect")),P();return;case"manual":break;case"follow":{if(p===null)break;if(r.counter>=r.follow){o(new er(`maximum redirect reached at: ${r.url}`,"max-redirect")),P();return}let E={headers:new pr(r.headers),follow:r.follow,counter:r.counter+1,agent:r.agent,compress:r.compress,method:r.method,body:Fa(r),signal:r.signal,size:r.size,referrer:r.referrer,referrerPolicy:r.referrerPolicy};if(!oO(r.url,p)||!iO(r.url,p))for(let pe of["authorization","www-authenticate","cookie","cookie2"])E.headers.delete(pe);if(S.statusCode!==303&&r.body&&t.body instanceof Er.default.Readable){o(new er("Cannot follow redirect with body being a readable stream","unsupported-redirect")),P();return}(S.statusCode===303||(S.statusCode===301||S.statusCode===302)&&r.method==="POST")&&(E.method="GET",E.body=void 0,E.headers.delete("content-length"));let _=OO(R);_&&(E.referrerPolicy=_),n(Pw(new No(p,E))),P();return}default:return o(new TypeError(`Redirect option '${r.redirect}' is not a valid value of RequestRedirect`))}}h&&S.once("end",()=>{h.removeEventListener("abort",T)});let I=(0,Er.pipeline)(S,new Er.PassThrough,v=>{v&&o(v)});process.version<"v12.10"&&S.on("aborted",T);let l={url:r.url,status:S.statusCode,statusText:S.statusMessage,headers:R,size:r.size,counter:r.counter,highWaterMark:r.highWaterMark},m=R.get("Content-Encoding");if(!r.compress||r.method==="HEAD"||m===null||S.statusCode===204||S.statusCode===304){g=new Tr(I,l),n(g);return}let d={flush:bi.default.Z_SYNC_FLUSH,finishFlush:bi.default.Z_SYNC_FLUSH};if(m==="gzip"||m==="x-gzip"){I=(0,Er.pipeline)(I,bi.default.createGunzip(d),v=>{v&&o(v)}),g=new Tr(I,l),n(g);return}if(m==="deflate"||m==="x-deflate"){let v=(0,Er.pipeline)(S,new Er.PassThrough,p=>{p&&o(p)});v.once("data",p=>{(p[0]&15)===8?I=(0,Er.pipeline)(I,bi.default.createInflate(),E=>{E&&o(E)}):I=(0,Er.pipeline)(I,bi.default.createInflateRaw(),E=>{E&&o(E)}),g=new Tr(I,l),n(g)}),v.once("end",()=>{g||(g=new Tr(I,l),n(g))});return}if(m==="br"){I=(0,Er.pipeline)(I,bi.default.createBrotliDecompress(),v=>{v&&o(v)}),g=new Tr(I,l),n(g);return}g=new Tr(I,l),n(g)}),PO(b,r).catch(o)})}function H2(e,t){let n=Nu.Buffer.from(`0\r
26
26
  \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 g=new Error("Premature close");g.code="ERR_STREAM_PREMATURE_CLOSE",t(g)}},"onSocketClose"),h=a(g=>{r=Nu.Buffer.compare(g.slice(-5),n)===0,!r&&i&&(r=Nu.Buffer.compare(i.slice(-3),n.slice(0,3))===0&&Nu.Buffer.compare(g.slice(-2),n.slice(3))===0),i=g},"onData");s.prependListener("close",u),s.on("data",h),e.on("close",()=>{s.removeListener("close",u),s.removeListener("data",h)})})}var UO,MO,bi,Er,Nu,V2,LO=Ct(()=>{UO=he(require("node:http"),1),MO=he(require("node:https"),1),bi=he(require("node:zlib"),1),Er=he(require("node:stream"),1),Nu=require("node:buffer");W0();Jf();bO();Yf();kO();lw();zO();vw();qf();Gf();_w();fw();V2=new Set(["data:","http:","https:"]);a(Pw,"fetch");a(G2,"fixResponseChunkedTransferBadEnding")});var BO=j(qa=>{"use strict";var H2=qa&&qa.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},ja;Object.defineProperty(qa,"__esModule",{value:!0});qa.Gaxios=void 0;var Z2=H2(Eu()),W2=require("https"),Ti=JP(),K2=w0(),jO=require("stream"),qO=QP(),J2=a(async()=>globalThis.crypto?.randomUUID()||(await import("crypto")).randomUUID(),"randomUUID"),X2=204,Qf=class{static{a(this,"Gaxios")}agentCache=new Map;defaults;interceptors;constructor(t){this.defaults=t||{},this.interceptors={request:new qO.GaxiosInterceptorManager,response:new qO.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&&ja.mergeHeaders(i,n.headers),o&&ja.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 ja.#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=Ti.GaxiosError.extractAPIErrorFromResponse(n,`Request failed with status code ${n.status}`);throw new Ti.GaxiosError(o?.message,t,n,o)}return n}catch(n){let o;n instanceof Ti.GaxiosError?o=n:n instanceof Error?o=new Ti.GaxiosError(n.message,t,void 0,n):o=new Ti.GaxiosError("Unexpected Gaxios Error",t,void 0,n);let{shouldRetry:r,config:i}=await(0,K2.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===X2)return"";if(t.maxContentLength&&n.headers.has("content-length")&&t.maxContentLength<Number.parseInt(n.headers?.get("content-length")||""))throw new Ti.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);ja.mergeHeaders(n,t.headers);let o=(0,Z2.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,h]of new URLSearchParams(o.params))s.searchParams.append(u,h);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 jO.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 J2();n.set("content-type",`multipart/related; boundary=${s}`),o.body=jO.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 ja.#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 W2.Agent({cert:o.cert,key:o.key}),this.agentCache.set(o.key,o.agent)));return typeof o.errorRedactor!="function"&&o.errorRedactor!==!1&&(o.errorRedactor=Ti.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
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 g=new Error("Premature close");g.code="ERR_STREAM_PREMATURE_CLOSE",t(g)}},"onSocketClose"),h=a(g=>{r=Nu.Buffer.compare(g.slice(-5),n)===0,!r&&i&&(r=Nu.Buffer.compare(i.slice(-3),n.slice(0,3))===0&&Nu.Buffer.compare(g.slice(-2),n.slice(3))===0),i=g},"onData");s.prependListener("close",u),s.on("data",h),e.on("close",()=>{s.removeListener("close",u),s.removeListener("data",h)})})}var UO,MO,bi,Er,Nu,G2,LO=Ct(()=>{UO=he(require("node:http"),1),MO=he(require("node:https"),1),bi=he(require("node:zlib"),1),Er=he(require("node:stream"),1),Nu=require("node:buffer");W0();Jf();bO();Yf();kO();lw();zO();vw();qf();Gf();_w();fw();G2=new Set(["data:","http:","https:"]);a(Pw,"fetch");a(H2,"fixResponseChunkedTransferBadEnding")});var BO=j(qa=>{"use strict";var Z2=qa&&qa.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},ja;Object.defineProperty(qa,"__esModule",{value:!0});qa.Gaxios=void 0;var W2=Z2(Eu()),K2=require("https"),Ti=JP(),J2=w0(),jO=require("stream"),qO=QP(),X2=a(async()=>globalThis.crypto?.randomUUID()||(await import("crypto")).randomUUID(),"randomUUID"),Y2=204,Qf=class{static{a(this,"Gaxios")}agentCache=new Map;defaults;interceptors;constructor(t){this.defaults=t||{},this.interceptors={request:new qO.GaxiosInterceptorManager,response:new qO.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&&ja.mergeHeaders(i,n.headers),o&&ja.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 ja.#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=Ti.GaxiosError.extractAPIErrorFromResponse(n,`Request failed with status code ${n.status}`);throw new Ti.GaxiosError(o?.message,t,n,o)}return n}catch(n){let o;n instanceof Ti.GaxiosError?o=n:n instanceof Error?o=new Ti.GaxiosError(n.message,t,void 0,n):o=new Ti.GaxiosError("Unexpected Gaxios Error",t,void 0,n);let{shouldRetry:r,config:i}=await(0,J2.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===Y2)return"";if(t.maxContentLength&&n.headers.has("content-length")&&t.maxContentLength<Number.parseInt(n.headers?.get("content-length")||""))throw new Ti.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);ja.mergeHeaders(n,t.headers);let o=(0,W2.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,h]of new URLSearchParams(o.params))s.searchParams.append(u,h);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 jO.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 X2();n.set("content-type",`multipart/related; boundary=${s}`),o.body=jO.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 ja.#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 K2.Agent({cert:o.cert,key:o.key}),this.agentCache.set(o.key,o.agent)));return typeof o.errorRedactor!="function"&&o.errorRedactor!==!1&&(o.errorRedactor=Ti.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
28
  Content-Type: ${i}\r
29
29
  \r
30
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(()=>he(H0()))).HttpsProxyAgent,this.#i}static async#c(){let t=typeof window<"u"&&!!window;return this.#a||=t?window.fetch:(await Promise.resolve().then(()=>(LO(),FO))).default,this.#a}static mergeHeaders(t,...n){t=t instanceof Headers?t:new Headers(t);for(let o of n)(o instanceof Headers?o:new Headers(o)).forEach((i,s)=>{s==="set-cookie"?t.append(s,i):t.set(s,i)});return t}};qa.Gaxios=Qf;ja=Qf});var St=j(tr=>{"use strict";var Y2=tr&&tr.__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]})),Q2=tr&&tr.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&Y2(t,e,n)};Object.defineProperty(tr,"__esModule",{value:!0});tr.instance=tr.Gaxios=tr.GaxiosError=void 0;tr.request=tG;var VO=BO();Object.defineProperty(tr,"Gaxios",{enumerable:!0,get:a(function(){return VO.Gaxios},"get")});var eG=JP();Object.defineProperty(tr,"GaxiosError",{enumerable:!0,get:a(function(){return eG.GaxiosError},"get")});Q2(QP(),tr);tr.instance=new VO.Gaxios;async function tG(e){return tr.instance.request(e)}a(tG,"request")});var ww=j((GO,em)=>{(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,h=14,g=9007199254740991,y=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],T=1e7,b=1e9;function P(p){var E,_,pe,oe=le.prototype={constructor:le,toString:null,valueOf:null},Be=new le(1),me=20,ee=4,Q=-7,se=21,ne=-1e7,ge=1e7,_e=!1,Fe=1,Ve=0,nt={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:"\xA0",suffix:""},ut="0123456789abcdefghijklmnopqrstuvwxyz",$t=!0;function le(A,O){var C,B,U,L,Z,z,F,G,q=this;if(!(q instanceof le))return new le(A,O);if(O==null){if(A&&A._isBigNumber===!0){q.s=A.s,!A.c||A.e>ge?q.c=q.e=null:A.e<ne?q.c=[q.e=0]:(q.e=A.e,q.c=A.c.slice());return}if((z=typeof A=="number")&&A*0==0){if(q.s=1/A<0?(A=-A,-1):1,A===~~A){for(L=0,Z=A;Z>=10;Z/=10,L++);L>ge?q.c=q.e=null:(q.e=L,q.c=[A]);return}G=String(A)}else{if(!n.test(G=String(A)))return pe(q,G,z);q.s=G.charCodeAt(0)==45?(G=G.slice(1),-1):1}(L=G.indexOf("."))>-1&&(G=G.replace(".","")),(Z=G.search(/e/i))>0?(L<0&&(L=Z),L+=+G.slice(Z+1),G=G.substring(0,Z)):L<0&&(L=G.length)}else{if(l(O,2,ut.length,"Base"),O==10&&$t)return q=new le(A),et(q,me+q.e+1,ee);if(G=String(A),z=typeof A=="number"){if(A*0!=0)return pe(q,G,z,O);if(q.s=1/A<0?(G=G.slice(1),-1):1,le.DEBUG&&G.replace(/^0\.0*|\./,"").length>15)throw Error(s+A)}else q.s=G.charCodeAt(0)===45?(G=G.slice(1),-1):1;for(C=ut.slice(0,O),L=Z=0,F=G.length;Z<F;Z++)if(C.indexOf(B=G.charAt(Z))<0){if(B=="."){if(Z>L){L=F;continue}}else if(!U&&(G==G.toUpperCase()&&(G=G.toLowerCase())||G==G.toLowerCase()&&(G=G.toUpperCase()))){U=!0,Z=-1,L=0;continue}return pe(q,String(A),z,O)}z=!1,G=_(G,O,10,q.s),(L=G.indexOf("."))>-1?G=G.replace(".",""):L=G.length}for(Z=0;G.charCodeAt(Z)===48;Z++);for(F=G.length;G.charCodeAt(--F)===48;);if(G=G.slice(Z,++F)){if(F-=Z,z&&le.DEBUG&&F>15&&(A>g||A!==r(A)))throw Error(s+q.s*A);if((L=L-Z-1)>ge)q.c=q.e=null;else if(L<ne)q.c=[q.e=0];else{if(q.e=L,q.c=[],Z=(L+1)%h,L<0&&(Z+=h),Z<F){for(Z&&q.c.push(+G.slice(0,Z)),F-=h;Z<F;)q.c.push(+G.slice(Z,Z+=h));Z=h-(G=G.slice(Z)).length}else Z-=F;for(;Z--;G+="0");q.c.push(+G)}}else q.c=[q.e=0]}a(le,"BigNumber"),le.clone=P,le.ROUND_UP=0,le.ROUND_DOWN=1,le.ROUND_CEIL=2,le.ROUND_FLOOR=3,le.ROUND_HALF_UP=4,le.ROUND_HALF_DOWN=5,le.ROUND_HALF_EVEN=6,le.ROUND_HALF_CEIL=7,le.ROUND_HALF_FLOOR=8,le.EUCLID=9,le.config=le.set=function(A){var O,C;if(A!=null)if(typeof A=="object"){if(A.hasOwnProperty(O="DECIMAL_PLACES")&&(C=A[O],l(C,0,b,O),me=C),A.hasOwnProperty(O="ROUNDING_MODE")&&(C=A[O],l(C,0,8,O),ee=C),A.hasOwnProperty(O="EXPONENTIAL_AT")&&(C=A[O],C&&C.pop?(l(C[0],-b,0,O),l(C[1],0,b,O),Q=C[0],se=C[1]):(l(C,-b,b,O),Q=-(se=C<0?-C:C))),A.hasOwnProperty(O="RANGE"))if(C=A[O],C&&C.pop)l(C[0],-b,-1,O),l(C[1],1,b,O),ne=C[0],ge=C[1];else if(l(C,-b,b,O),C)ne=-(ge=C<0?-C:C);else throw Error(i+O+" cannot be zero: "+C);if(A.hasOwnProperty(O="CRYPTO"))if(C=A[O],C===!!C)if(C)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))_e=C;else throw _e=!C,Error(i+"crypto unavailable");else _e=C;else throw Error(i+O+" not true or false: "+C);if(A.hasOwnProperty(O="MODULO_MODE")&&(C=A[O],l(C,0,9,O),Fe=C),A.hasOwnProperty(O="POW_PRECISION")&&(C=A[O],l(C,0,b,O),Ve=C),A.hasOwnProperty(O="FORMAT"))if(C=A[O],typeof C=="object")nt=C;else throw Error(i+O+" not an object: "+C);if(A.hasOwnProperty(O="ALPHABET"))if(C=A[O],typeof C=="string"&&!/^.?$|[+\-.\s]|(.).*\1/.test(C))$t=C.slice(0,10)=="0123456789",ut=C;else throw Error(i+O+" invalid: "+C)}else throw Error(i+"Object expected: "+A);return{DECIMAL_PLACES:me,ROUNDING_MODE:ee,EXPONENTIAL_AT:[Q,se],RANGE:[ne,ge],CRYPTO:_e,MODULO_MODE:Fe,POW_PRECISION:Ve,FORMAT:nt,ALPHABET:ut}},le.isBigNumber=function(A){if(!A||A._isBigNumber!==!0)return!1;if(!le.DEBUG)return!0;var O,C,B=A.c,U=A.e,L=A.s;e:if({}.toString.call(B)=="[object Array]"){if((L===1||L===-1)&&U>=-b&&U<=b&&U===r(U)){if(B[0]===0){if(U===0&&B.length===1)return!0;break e}if(O=(U+1)%h,O<1&&(O+=h),String(B[0]).length==O){for(O=0;O<B.length;O++)if(C=B[O],C<0||C>=u||C!==r(C))break e;if(C!==0)return!0}}}else if(B===null&&U===null&&(L===null||L===1||L===-1))return!0;throw Error(i+"Invalid BigNumber: "+A)},le.maximum=le.max=function(){return Tt(arguments,-1)},le.minimum=le.min=function(){return Tt(arguments,1)},le.random=(function(){var A=9007199254740992,O=Math.random()*A&2097151?function(){return r(Math.random()*A)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(C){var B,U,L,Z,z,F=0,G=[],q=new le(Be);if(C==null?C=me:l(C,0,b),Z=o(C/h),_e)if(crypto.getRandomValues){for(B=crypto.getRandomValues(new Uint32Array(Z*=2));F<Z;)z=B[F]*131072+(B[F+1]>>>11),z>=9e15?(U=crypto.getRandomValues(new Uint32Array(2)),B[F]=U[0],B[F+1]=U[1]):(G.push(z%1e14),F+=2);F=Z/2}else if(crypto.randomBytes){for(B=crypto.randomBytes(Z*=7);F<Z;)z=(B[F]&31)*281474976710656+B[F+1]*1099511627776+B[F+2]*4294967296+B[F+3]*16777216+(B[F+4]<<16)+(B[F+5]<<8)+B[F+6],z>=9e15?crypto.randomBytes(7).copy(B,F):(G.push(z%1e14),F+=7);F=Z/7}else throw _e=!1,Error(i+"crypto unavailable");if(!_e)for(;F<Z;)z=O(),z<9e15&&(G[F++]=z%1e14);for(Z=G[--F],C%=h,Z&&C&&(z=y[h-C],G[F]=r(Z/z)*z);G[F]===0;G.pop(),F--);if(F<0)G=[L=0];else{for(L=-1;G[0]===0;G.splice(0,1),L-=h);for(F=1,z=G[0];z>=10;z/=10,F++);F<h&&(L-=h-F)}return q.e=L,q.c=G,q}})(),le.sum=function(){for(var A=1,O=arguments,C=new le(O[0]);A<O.length;)C=C.plus(O[A++]);return C},_=(function(){var A="0123456789";function O(C,B,U,L){for(var Z,z=[0],F,G=0,q=C.length;G<q;){for(F=z.length;F--;z[F]*=B);for(z[0]+=L.indexOf(C.charAt(G++)),Z=0;Z<z.length;Z++)z[Z]>U-1&&(z[Z+1]==null&&(z[Z+1]=0),z[Z+1]+=z[Z]/U|0,z[Z]%=U)}return z.reverse()}return a(O,"toBaseOut"),function(C,B,U,L,Z){var z,F,G,q,te,Pe,be,Xe,ft=C.indexOf("."),mt=me,Ke=ee;for(ft>=0&&(q=Ve,Ve=0,C=C.replace(".",""),Xe=new le(B),Pe=Xe.pow(C.length-ft),Ve=q,Xe.c=O(v(R(Pe.c),Pe.e,"0"),10,U,A),Xe.e=Xe.c.length),be=O(C,B,U,Z?(z=ut,A):(z=A,ut)),G=q=be.length;be[--q]==0;be.pop());if(!be[0])return z.charAt(0);if(ft<0?--G:(Pe.c=be,Pe.e=G,Pe.s=L,Pe=E(Pe,Xe,mt,Ke,U),be=Pe.c,te=Pe.r,G=Pe.e),F=G+mt+1,ft=be[F],q=U/2,te=te||F<0||be[F+1]!=null,te=Ke<4?(ft!=null||te)&&(Ke==0||Ke==(Pe.s<0?3:2)):ft>q||ft==q&&(Ke==4||te||Ke==6&&be[F-1]&1||Ke==(Pe.s<0?8:7)),F<1||!be[0])C=te?v(z.charAt(1),-mt,z.charAt(0)):z.charAt(0);else{if(be.length=F,te)for(--U;++be[--F]>U;)be[F]=0,F||(++G,be=[1].concat(be));for(q=be.length;!be[--q];);for(ft=0,C="";ft<=q;C+=z.charAt(be[ft++]));C=v(C,G,z.charAt(0))}return C}})(),E=(function(){function A(B,U,L){var Z,z,F,G,q=0,te=B.length,Pe=U%T,be=U/T|0;for(B=B.slice();te--;)F=B[te]%T,G=B[te]/T|0,Z=be*F+G*Pe,z=Pe*F+Z%T*T+q,q=(z/L|0)+(Z/T|0)+be*G,B[te]=z%L;return q&&(B=[q].concat(B)),B}a(A,"multiply");function O(B,U,L,Z){var z,F;if(L!=Z)F=L>Z?1:-1;else for(z=F=0;z<L;z++)if(B[z]!=U[z]){F=B[z]>U[z]?1:-1;break}return F}a(O,"compare");function C(B,U,L,Z){for(var z=0;L--;)B[L]-=z,z=B[L]<U[L]?1:0,B[L]=z*Z+B[L]-U[L];for(;!B[0]&&B.length>1;B.splice(0,1));}return a(C,"subtract"),function(B,U,L,Z,z){var F,G,q,te,Pe,be,Xe,ft,mt,Ke,Qe,At,$i,Ci,Ni,hr,Dn,Bt=B.s==U.s?1:-1,Rt=B.c,it=U.c;if(!Rt||!Rt[0]||!it||!it[0])return new le(!B.s||!U.s||(Rt?it&&Rt[0]==it[0]:!it)?NaN:Rt&&Rt[0]==0||!it?Bt*0:Bt/0);for(ft=new le(Bt),mt=ft.c=[],G=B.e-U.e,Bt=L+G+1,z||(z=u,G=S(B.e/h)-S(U.e/h),Bt=Bt/h|0),q=0;it[q]==(Rt[q]||0);q++);if(it[q]>(Rt[q]||0)&&G--,Bt<0)mt.push(1),te=!0;else{for(Ci=Rt.length,hr=it.length,q=0,Bt+=2,Pe=r(z/(it[0]+1)),Pe>1&&(it=A(it,Pe,z),Rt=A(Rt,Pe,z),hr=it.length,Ci=Rt.length),$i=hr,Ke=Rt.slice(0,hr),Qe=Ke.length;Qe<hr;Ke[Qe++]=0);Dn=it.slice(),Dn=[0].concat(Dn),Ni=it[0],it[1]>=z/2&&Ni++;do{if(Pe=0,F=O(it,Ke,hr,Qe),F<0){if(At=Ke[0],hr!=Qe&&(At=At*z+(Ke[1]||0)),Pe=r(At/Ni),Pe>1)for(Pe>=z&&(Pe=z-1),be=A(it,Pe,z),Xe=be.length,Qe=Ke.length;O(be,Ke,Xe,Qe)==1;)Pe--,C(be,hr<Xe?Dn:it,Xe,z),Xe=be.length,F=1;else Pe==0&&(F=Pe=1),be=it.slice(),Xe=be.length;if(Xe<Qe&&(be=[0].concat(be)),C(Ke,be,Qe,z),Qe=Ke.length,F==-1)for(;O(it,Ke,hr,Qe)<1;)Pe++,C(Ke,hr<Qe?Dn:it,Qe,z),Qe=Ke.length}else F===0&&(Pe++,Ke=[0]);mt[q++]=Pe,Ke[0]?Ke[Qe++]=Rt[$i]||0:(Ke=[Rt[$i]],Qe=1)}while(($i++<Ci||Ke[0]!=null)&&Bt--);te=Ke[0]!=null,mt[0]||mt.splice(0,1)}if(z==u){for(q=1,Bt=mt[0];Bt>=10;Bt/=10,q++);et(ft,L+(ft.e=q+G*h-1)+1,Z,te)}else ft.e=G,ft.r=+te;return ft}})();function Pt(A,O,C,B){var U,L,Z,z,F;if(C==null?C=ee:l(C,0,8),!A.c)return A.toString();if(U=A.c[0],Z=A.e,O==null)F=R(A.c),F=B==1||B==2&&(Z<=Q||Z>=se)?d(F,Z):v(F,Z,"0");else if(A=et(new le(A),O,C),L=A.e,F=R(A.c),z=F.length,B==1||B==2&&(O<=L||L<=Q)){for(;z<O;F+="0",z++);F=d(F,L)}else if(O-=Z+(B===2&&L>Z),F=v(F,L,"0"),L+1>z){if(--O>0)for(F+=".";O--;F+="0");}else if(O+=L-z,O>0)for(L+1==z&&(F+=".");O--;F+="0");return A.s<0&&U?"-"+F:F}a(Pt,"format");function Tt(A,O){for(var C,B,U=1,L=new le(A[0]);U<A.length;U++)B=new le(A[U]),(!B.s||(C=I(L,B))===O||C===0&&L.s===O)&&(L=B);return L}a(Tt,"maxOrMin");function mr(A,O,C){for(var B=1,U=O.length;!O[--U];O.pop());for(U=O[0];U>=10;U/=10,B++);return(C=B+C*h-1)>ge?A.c=A.e=null:C<ne?A.c=[A.e=0]:(A.e=C,A.c=O),A}a(mr,"normalise"),pe=(function(){var A=/^(-?)0([xbo])(?=\w[\w.]*$)/i,O=/^([^.]+)\.$/,C=/^\.([^.]+)$/,B=/^-?(Infinity|NaN)$/,U=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(L,Z,z,F){var G,q=z?Z:Z.replace(U,"");if(B.test(q))L.s=isNaN(q)?null:q<0?-1:1;else{if(!z&&(q=q.replace(A,function(te,Pe,be){return G=(be=be.toLowerCase())=="x"?16:be=="b"?2:8,!F||F==G?Pe:te}),F&&(G=F,q=q.replace(O,"$1").replace(C,"0.$1")),Z!=q))return new le(q,G);if(le.DEBUG)throw Error(i+"Not a"+(F?" base "+F:"")+" number: "+Z);L.s=null}L.c=L.e=null}})();function et(A,O,C,B){var U,L,Z,z,F,G,q,te=A.c,Pe=y;if(te){e:{for(U=1,z=te[0];z>=10;z/=10,U++);if(L=O-U,L<0)L+=h,Z=O,F=te[G=0],q=r(F/Pe[U-Z-1]%10);else if(G=o((L+1)/h),G>=te.length)if(B){for(;te.length<=G;te.push(0));F=q=0,U=1,L%=h,Z=L-h+1}else break e;else{for(F=z=te[G],U=1;z>=10;z/=10,U++);L%=h,Z=L-h+U,q=Z<0?0:r(F/Pe[U-Z-1]%10)}if(B=B||O<0||te[G+1]!=null||(Z<0?F:F%Pe[U-Z-1]),B=C<4?(q||B)&&(C==0||C==(A.s<0?3:2)):q>5||q==5&&(C==4||B||C==6&&(L>0?Z>0?F/Pe[U-Z]:0:te[G-1])%10&1||C==(A.s<0?8:7)),O<1||!te[0])return te.length=0,B?(O-=A.e+1,te[0]=Pe[(h-O%h)%h],A.e=-O||0):te[0]=A.e=0,A;if(L==0?(te.length=G,z=1,G--):(te.length=G+1,z=Pe[h-L],te[G]=Z>0?r(F/Pe[U-Z]%Pe[Z])*z:0),B)for(;;)if(G==0){for(L=1,Z=te[0];Z>=10;Z/=10,L++);for(Z=te[0]+=z,z=1;Z>=10;Z/=10,z++);L!=z&&(A.e++,te[0]==u&&(te[0]=1));break}else{if(te[G]+=z,te[G]!=u)break;te[G--]=0,z=1}for(L=te.length;te[--L]===0;te.pop());}A.e>ge?A.c=A.e=null:A.e<ne&&(A.c=[A.e=0])}return A}a(et,"round");function ot(A){var O,C=A.e;return C===null?A.toString():(O=R(A.c),O=C<=Q||C>=se?d(O,C):v(O,C,"0"),A.s<0?"-"+O:O)}return a(ot,"valueOf"),oe.absoluteValue=oe.abs=function(){var A=new le(this);return A.s<0&&(A.s=1),A},oe.comparedTo=function(A,O){return I(this,new le(A,O))},oe.decimalPlaces=oe.dp=function(A,O){var C,B,U,L=this;if(A!=null)return l(A,0,b),O==null?O=ee:l(O,0,8),et(new le(L),A+L.e+1,O);if(!(C=L.c))return null;if(B=((U=C.length-1)-S(this.e/h))*h,U=C[U])for(;U%10==0;U/=10,B--);return B<0&&(B=0),B},oe.dividedBy=oe.div=function(A,O){return E(this,new le(A,O),me,ee)},oe.dividedToIntegerBy=oe.idiv=function(A,O){return E(this,new le(A,O),0,1)},oe.exponentiatedBy=oe.pow=function(A,O){var C,B,U,L,Z,z,F,G,q,te=this;if(A=new le(A),A.c&&!A.isInteger())throw Error(i+"Exponent not an integer: "+ot(A));if(O!=null&&(O=new le(O)),z=A.e>14,!te.c||!te.c[0]||te.c[0]==1&&!te.e&&te.c.length==1||!A.c||!A.c[0])return q=new le(Math.pow(+ot(te),z?A.s*(2-m(A)):+ot(A))),O?q.mod(O):q;if(F=A.s<0,O){if(O.c?!O.c[0]:!O.s)return new le(NaN);B=!F&&te.isInteger()&&O.isInteger(),B&&(te=te.mod(O))}else{if(A.e>9&&(te.e>0||te.e<-1||(te.e==0?te.c[0]>1||z&&te.c[1]>=24e7:te.c[0]<8e13||z&&te.c[0]<=9999975e7)))return L=te.s<0&&m(A)?-0:0,te.e>-1&&(L=1/L),new le(F?1/L:L);Ve&&(L=o(Ve/h+2))}for(z?(C=new le(.5),F&&(A.s=1),G=m(A)):(U=Math.abs(+ot(A)),G=U%2),q=new le(Be);;){if(G){if(q=q.times(te),!q.c)break;L?q.c.length>L&&(q.c.length=L):B&&(q=q.mod(O))}if(U){if(U=r(U/2),U===0)break;G=U%2}else if(A=A.times(C),et(A,A.e+1,1),A.e>14)G=m(A);else{if(U=+ot(A),U===0)break;G=U%2}te=te.times(te),L?te.c&&te.c.length>L&&(te.c.length=L):B&&(te=te.mod(O))}return B?q:(F&&(q=Be.div(q)),O?q.mod(O):L?et(q,Ve,ee,Z):q)},oe.integerValue=function(A){var O=new le(this);return A==null?A=ee:l(A,0,8),et(O,O.e+1,A)},oe.isEqualTo=oe.eq=function(A,O){return I(this,new le(A,O))===0},oe.isFinite=function(){return!!this.c},oe.isGreaterThan=oe.gt=function(A,O){return I(this,new le(A,O))>0},oe.isGreaterThanOrEqualTo=oe.gte=function(A,O){return(O=I(this,new le(A,O)))===1||O===0},oe.isInteger=function(){return!!this.c&&S(this.e/h)>this.c.length-2},oe.isLessThan=oe.lt=function(A,O){return I(this,new le(A,O))<0},oe.isLessThanOrEqualTo=oe.lte=function(A,O){return(O=I(this,new le(A,O)))===-1||O===0},oe.isNaN=function(){return!this.s},oe.isNegative=function(){return this.s<0},oe.isPositive=function(){return this.s>0},oe.isZero=function(){return!!this.c&&this.c[0]==0},oe.minus=function(A,O){var C,B,U,L,Z=this,z=Z.s;if(A=new le(A,O),O=A.s,!z||!O)return new le(NaN);if(z!=O)return A.s=-O,Z.plus(A);var F=Z.e/h,G=A.e/h,q=Z.c,te=A.c;if(!F||!G){if(!q||!te)return q?(A.s=-O,A):new le(te?Z:NaN);if(!q[0]||!te[0])return te[0]?(A.s=-O,A):new le(q[0]?Z:ee==3?-0:0)}if(F=S(F),G=S(G),q=q.slice(),z=F-G){for((L=z<0)?(z=-z,U=q):(G=F,U=te),U.reverse(),O=z;O--;U.push(0));U.reverse()}else for(B=(L=(z=q.length)<(O=te.length))?z:O,z=O=0;O<B;O++)if(q[O]!=te[O]){L=q[O]<te[O];break}if(L&&(U=q,q=te,te=U,A.s=-A.s),O=(B=te.length)-(C=q.length),O>0)for(;O--;q[C++]=0);for(O=u-1;B>z;){if(q[--B]<te[B]){for(C=B;C&&!q[--C];q[C]=O);--q[C],q[B]+=u}q[B]-=te[B]}for(;q[0]==0;q.splice(0,1),--G);return q[0]?mr(A,q,G):(A.s=ee==3?-1:1,A.c=[A.e=0],A)},oe.modulo=oe.mod=function(A,O){var C,B,U=this;return A=new le(A,O),!U.c||!A.s||A.c&&!A.c[0]?new le(NaN):!A.c||U.c&&!U.c[0]?new le(U):(Fe==9?(B=A.s,A.s=1,C=E(U,A,0,3),A.s=B,C.s*=B):C=E(U,A,0,Fe),A=U.minus(C.times(A)),!A.c[0]&&Fe==1&&(A.s=U.s),A)},oe.multipliedBy=oe.times=function(A,O){var C,B,U,L,Z,z,F,G,q,te,Pe,be,Xe,ft,mt,Ke=this,Qe=Ke.c,At=(A=new le(A,O)).c;if(!Qe||!At||!Qe[0]||!At[0])return!Ke.s||!A.s||Qe&&!Qe[0]&&!At||At&&!At[0]&&!Qe?A.c=A.e=A.s=null:(A.s*=Ke.s,!Qe||!At?A.c=A.e=null:(A.c=[0],A.e=0)),A;for(B=S(Ke.e/h)+S(A.e/h),A.s*=Ke.s,F=Qe.length,te=At.length,F<te&&(Xe=Qe,Qe=At,At=Xe,U=F,F=te,te=U),U=F+te,Xe=[];U--;Xe.push(0));for(ft=u,mt=T,U=te;--U>=0;){for(C=0,Pe=At[U]%mt,be=At[U]/mt|0,Z=F,L=U+Z;L>U;)G=Qe[--Z]%mt,q=Qe[Z]/mt|0,z=be*G+q*Pe,G=Pe*G+z%mt*mt+Xe[L]+C,C=(G/ft|0)+(z/mt|0)+be*q,Xe[L--]=G%ft;Xe[L]=C}return C?++B:Xe.splice(0,1),mr(A,Xe,B)},oe.negated=function(){var A=new le(this);return A.s=-A.s||null,A},oe.plus=function(A,O){var C,B=this,U=B.s;if(A=new le(A,O),O=A.s,!U||!O)return new le(NaN);if(U!=O)return A.s=-O,B.minus(A);var L=B.e/h,Z=A.e/h,z=B.c,F=A.c;if(!L||!Z){if(!z||!F)return new le(U/0);if(!z[0]||!F[0])return F[0]?A:new le(z[0]?B:U*0)}if(L=S(L),Z=S(Z),z=z.slice(),U=L-Z){for(U>0?(Z=L,C=F):(U=-U,C=z),C.reverse();U--;C.push(0));C.reverse()}for(U=z.length,O=F.length,U-O<0&&(C=F,F=z,z=C,O=U),U=0;O;)U=(z[--O]=z[O]+F[O]+U)/u|0,z[O]=u===z[O]?0:z[O]%u;return U&&(z=[U].concat(z),++Z),mr(A,z,Z)},oe.precision=oe.sd=function(A,O){var C,B,U,L=this;if(A!=null&&A!==!!A)return l(A,1,b),O==null?O=ee:l(O,0,8),et(new le(L),A,O);if(!(C=L.c))return null;if(U=C.length-1,B=U*h+1,U=C[U]){for(;U%10==0;U/=10,B--);for(U=C[0];U>=10;U/=10,B++);}return A&&L.e+1>B&&(B=L.e+1),B},oe.shiftedBy=function(A){return l(A,-g,g),this.times("1e"+A)},oe.squareRoot=oe.sqrt=function(){var A,O,C,B,U,L=this,Z=L.c,z=L.s,F=L.e,G=me+4,q=new le("0.5");if(z!==1||!Z||!Z[0])return new le(!z||z<0&&(!Z||Z[0])?NaN:Z?L:1/0);if(z=Math.sqrt(+ot(L)),z==0||z==1/0?(O=R(Z),(O.length+F)%2==0&&(O+="0"),z=Math.sqrt(+O),F=S((F+1)/2)-(F<0||F%2),z==1/0?O="5e"+F:(O=z.toExponential(),O=O.slice(0,O.indexOf("e")+1)+F),C=new le(O)):C=new le(z+""),C.c[0]){for(F=C.e,z=F+G,z<3&&(z=0);;)if(U=C,C=q.times(U.plus(E(L,U,G,1))),R(U.c).slice(0,z)===(O=R(C.c)).slice(0,z))if(C.e<F&&--z,O=O.slice(z-3,z+1),O=="9999"||!B&&O=="4999"){if(!B&&(et(U,U.e+me+2,0),U.times(U).eq(L))){C=U;break}G+=4,z+=4,B=1}else{(!+O||!+O.slice(1)&&O.charAt(0)=="5")&&(et(C,C.e+me+2,1),A=!C.times(C).eq(L));break}}return et(C,C.e+me+1,ee,A)},oe.toExponential=function(A,O){return A!=null&&(l(A,0,b),A++),Pt(this,A,O,1)},oe.toFixed=function(A,O){return A!=null&&(l(A,0,b),A=A+this.e+1),Pt(this,A,O)},oe.toFormat=function(A,O,C){var B,U=this;if(C==null)A!=null&&O&&typeof O=="object"?(C=O,O=null):A&&typeof A=="object"?(C=A,A=O=null):C=nt;else if(typeof C!="object")throw Error(i+"Argument not an object: "+C);if(B=U.toFixed(A,O),U.c){var L,Z=B.split("."),z=+C.groupSize,F=+C.secondaryGroupSize,G=C.groupSeparator||"",q=Z[0],te=Z[1],Pe=U.s<0,be=Pe?q.slice(1):q,Xe=be.length;if(F&&(L=z,z=F,F=L,Xe-=L),z>0&&Xe>0){for(L=Xe%z||z,q=be.substr(0,L);L<Xe;L+=z)q+=G+be.substr(L,z);F>0&&(q+=G+be.slice(L)),Pe&&(q="-"+q)}B=te?q+(C.decimalSeparator||"")+((F=+C.fractionGroupSize)?te.replace(new RegExp("\\d{"+F+"}\\B","g"),"$&"+(C.fractionGroupSeparator||"")):te):q}return(C.prefix||"")+B+(C.suffix||"")},oe.toFraction=function(A){var O,C,B,U,L,Z,z,F,G,q,te,Pe,be=this,Xe=be.c;if(A!=null&&(z=new le(A),!z.isInteger()&&(z.c||z.s!==1)||z.lt(Be)))throw Error(i+"Argument "+(z.isInteger()?"out of range: ":"not an integer: ")+ot(z));if(!Xe)return new le(be);for(O=new le(Be),G=C=new le(Be),B=F=new le(Be),Pe=R(Xe),L=O.e=Pe.length-be.e-1,O.c[0]=y[(Z=L%h)<0?h+Z:Z],A=!A||z.comparedTo(O)>0?L>0?O:G:z,Z=ge,ge=1/0,z=new le(Pe),F.c[0]=0;q=E(z,O,0,1),U=C.plus(q.times(B)),U.comparedTo(A)!=1;)C=B,B=U,G=F.plus(q.times(U=G)),F=U,O=z.minus(q.times(U=O)),z=U;return U=E(A.minus(C),B,0,1),F=F.plus(U.times(G)),C=C.plus(U.times(B)),F.s=G.s=be.s,L=L*2,te=E(G,B,L,ee).minus(be).abs().comparedTo(E(F,C,L,ee).minus(be).abs())<1?[G,B]:[F,C],ge=Z,te},oe.toNumber=function(){return+ot(this)},oe.toPrecision=function(A,O){return A!=null&&l(A,1,b),Pt(this,A,O,2)},oe.toString=function(A){var O,C=this,B=C.s,U=C.e;return U===null?B?(O="Infinity",B<0&&(O="-"+O)):O="NaN":(A==null?O=U<=Q||U>=se?d(R(C.c),U):v(R(C.c),U,"0"):A===10&&$t?(C=et(new le(C),me+U+1,ee),O=v(R(C.c),C.e,"0")):(l(A,2,ut.length,"Base"),O=_(v(R(C.c),U,"0"),10,A,B,!0)),B<0&&C.c[0]&&(O="-"+O)),O},oe.valueOf=oe.toJSON=function(){return ot(this)},oe._isBigNumber=!0,p!=null&&le.set(p),le}a(P,"clone");function S(p){var E=p|0;return p>0||p===E?E:E-1}a(S,"bitFloor");function R(p){for(var E,_,pe=1,oe=p.length,Be=p[0]+"";pe<oe;){for(E=p[pe++]+"",_=h-E.length;_--;E="0"+E);Be+=E}for(oe=Be.length;Be.charCodeAt(--oe)===48;);return Be.slice(0,oe+1||1)}a(R,"coeffToString");function I(p,E){var _,pe,oe=p.c,Be=E.c,me=p.s,ee=E.s,Q=p.e,se=E.e;if(!me||!ee)return null;if(_=oe&&!oe[0],pe=Be&&!Be[0],_||pe)return _?pe?0:-ee:me;if(me!=ee)return me;if(_=me<0,pe=Q==se,!oe||!Be)return pe?0:!oe^_?1:-1;if(!pe)return Q>se^_?1:-1;for(ee=(Q=oe.length)<(se=Be.length)?Q:se,me=0;me<ee;me++)if(oe[me]!=Be[me])return oe[me]>Be[me]^_?1:-1;return Q==se?0:Q>se^_?1:-1}a(I,"compare");function l(p,E,_,pe){if(p<E||p>_||p!==r(p))throw Error(i+(pe||"Argument")+(typeof p=="number"?p<E||p>_?" out of range: ":" not an integer: ":" not a primitive number: ")+String(p))}a(l,"intCheck");function m(p){var E=p.c.length-1;return S(p.e/h)==E&&p.c[E]%2!=0}a(m,"isOdd");function d(p,E){return(p.length>1?p.charAt(0)+"."+p.slice(1):p)+(E<0?"e":"e+")+E}a(d,"toExponential");function v(p,E,_){var pe,oe;if(E<0){for(oe=_+".";++E;oe+=_);p=oe+p}else if(pe=p.length,++E>pe){for(oe=_,E-=pe;--E;oe+=_);p+=oe}else E<pe&&(p=p.slice(0,E)+"."+p.slice(E));return p}a(v,"toFixedPoint"),t=P(),t.default=t.BigNumber=t,typeof define=="function"&&define.amd?define(function(){return t}):typeof em<"u"&&em.exports?em.exports=t:(e||(e=typeof self<"u"&&self?self:window),e.BigNumber=t)})(GO)});var KO=j((Pue,WO)=>{var HO=ww(),ZO=WO.exports;(function(){"use strict";function e(g){return g<10?"0"+g:g}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(g){return n.lastIndex=0,n.test(g)?'"'+g.replace(n,function(y){var T=i[y];return typeof T=="string"?T:"\\u"+("0000"+y.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+g+'"'}a(u,"quote");function h(g,y){var T,b,P,S,R=o,I,l=y[g],m=l!=null&&(l instanceof HO||HO.isBigNumber(l));switch(l&&typeof l=="object"&&typeof l.toJSON=="function"&&(l=l.toJSON(g)),typeof s=="function"&&(l=s.call(y,g,l)),typeof l){case"string":return m?l:u(l);case"number":return isFinite(l)?String(l):"null";case"boolean":case"null":case"bigint":return String(l);case"object":if(!l)return"null";if(o+=r,I=[],Object.prototype.toString.apply(l)==="[object Array]"){for(S=l.length,T=0;T<S;T+=1)I[T]=h(T,l)||"null";return P=I.length===0?"[]":o?`[
31
+ `}yield o}static#i;static#a;static async#s(){return this.#i||=(await Promise.resolve().then(()=>he(H0()))).HttpsProxyAgent,this.#i}static async#c(){let t=typeof window<"u"&&!!window;return this.#a||=t?window.fetch:(await Promise.resolve().then(()=>(LO(),FO))).default,this.#a}static mergeHeaders(t,...n){t=t instanceof Headers?t:new Headers(t);for(let o of n)(o instanceof Headers?o:new Headers(o)).forEach((i,s)=>{s==="set-cookie"?t.append(s,i):t.set(s,i)});return t}};qa.Gaxios=Qf;ja=Qf});var St=j(tr=>{"use strict";var Q2=tr&&tr.__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]})),eG=tr&&tr.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&Q2(t,e,n)};Object.defineProperty(tr,"__esModule",{value:!0});tr.instance=tr.Gaxios=tr.GaxiosError=void 0;tr.request=rG;var VO=BO();Object.defineProperty(tr,"Gaxios",{enumerable:!0,get:a(function(){return VO.Gaxios},"get")});var tG=JP();Object.defineProperty(tr,"GaxiosError",{enumerable:!0,get:a(function(){return tG.GaxiosError},"get")});eG(QP(),tr);tr.instance=new VO.Gaxios;async function rG(e){return tr.instance.request(e)}a(rG,"request")});var ww=j((GO,em)=>{(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,h=14,g=9007199254740991,y=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],T=1e7,b=1e9;function P(p){var E,_,pe,oe=le.prototype={constructor:le,toString:null,valueOf:null},Be=new le(1),me=20,ee=4,Q=-7,se=21,ne=-1e7,ge=1e7,_e=!1,Fe=1,Ve=0,nt={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:"\xA0",suffix:""},ut="0123456789abcdefghijklmnopqrstuvwxyz",$t=!0;function le(A,O){var C,B,U,L,Z,z,F,G,q=this;if(!(q instanceof le))return new le(A,O);if(O==null){if(A&&A._isBigNumber===!0){q.s=A.s,!A.c||A.e>ge?q.c=q.e=null:A.e<ne?q.c=[q.e=0]:(q.e=A.e,q.c=A.c.slice());return}if((z=typeof A=="number")&&A*0==0){if(q.s=1/A<0?(A=-A,-1):1,A===~~A){for(L=0,Z=A;Z>=10;Z/=10,L++);L>ge?q.c=q.e=null:(q.e=L,q.c=[A]);return}G=String(A)}else{if(!n.test(G=String(A)))return pe(q,G,z);q.s=G.charCodeAt(0)==45?(G=G.slice(1),-1):1}(L=G.indexOf("."))>-1&&(G=G.replace(".","")),(Z=G.search(/e/i))>0?(L<0&&(L=Z),L+=+G.slice(Z+1),G=G.substring(0,Z)):L<0&&(L=G.length)}else{if(l(O,2,ut.length,"Base"),O==10&&$t)return q=new le(A),et(q,me+q.e+1,ee);if(G=String(A),z=typeof A=="number"){if(A*0!=0)return pe(q,G,z,O);if(q.s=1/A<0?(G=G.slice(1),-1):1,le.DEBUG&&G.replace(/^0\.0*|\./,"").length>15)throw Error(s+A)}else q.s=G.charCodeAt(0)===45?(G=G.slice(1),-1):1;for(C=ut.slice(0,O),L=Z=0,F=G.length;Z<F;Z++)if(C.indexOf(B=G.charAt(Z))<0){if(B=="."){if(Z>L){L=F;continue}}else if(!U&&(G==G.toUpperCase()&&(G=G.toLowerCase())||G==G.toLowerCase()&&(G=G.toUpperCase()))){U=!0,Z=-1,L=0;continue}return pe(q,String(A),z,O)}z=!1,G=_(G,O,10,q.s),(L=G.indexOf("."))>-1?G=G.replace(".",""):L=G.length}for(Z=0;G.charCodeAt(Z)===48;Z++);for(F=G.length;G.charCodeAt(--F)===48;);if(G=G.slice(Z,++F)){if(F-=Z,z&&le.DEBUG&&F>15&&(A>g||A!==r(A)))throw Error(s+q.s*A);if((L=L-Z-1)>ge)q.c=q.e=null;else if(L<ne)q.c=[q.e=0];else{if(q.e=L,q.c=[],Z=(L+1)%h,L<0&&(Z+=h),Z<F){for(Z&&q.c.push(+G.slice(0,Z)),F-=h;Z<F;)q.c.push(+G.slice(Z,Z+=h));Z=h-(G=G.slice(Z)).length}else Z-=F;for(;Z--;G+="0");q.c.push(+G)}}else q.c=[q.e=0]}a(le,"BigNumber"),le.clone=P,le.ROUND_UP=0,le.ROUND_DOWN=1,le.ROUND_CEIL=2,le.ROUND_FLOOR=3,le.ROUND_HALF_UP=4,le.ROUND_HALF_DOWN=5,le.ROUND_HALF_EVEN=6,le.ROUND_HALF_CEIL=7,le.ROUND_HALF_FLOOR=8,le.EUCLID=9,le.config=le.set=function(A){var O,C;if(A!=null)if(typeof A=="object"){if(A.hasOwnProperty(O="DECIMAL_PLACES")&&(C=A[O],l(C,0,b,O),me=C),A.hasOwnProperty(O="ROUNDING_MODE")&&(C=A[O],l(C,0,8,O),ee=C),A.hasOwnProperty(O="EXPONENTIAL_AT")&&(C=A[O],C&&C.pop?(l(C[0],-b,0,O),l(C[1],0,b,O),Q=C[0],se=C[1]):(l(C,-b,b,O),Q=-(se=C<0?-C:C))),A.hasOwnProperty(O="RANGE"))if(C=A[O],C&&C.pop)l(C[0],-b,-1,O),l(C[1],1,b,O),ne=C[0],ge=C[1];else if(l(C,-b,b,O),C)ne=-(ge=C<0?-C:C);else throw Error(i+O+" cannot be zero: "+C);if(A.hasOwnProperty(O="CRYPTO"))if(C=A[O],C===!!C)if(C)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))_e=C;else throw _e=!C,Error(i+"crypto unavailable");else _e=C;else throw Error(i+O+" not true or false: "+C);if(A.hasOwnProperty(O="MODULO_MODE")&&(C=A[O],l(C,0,9,O),Fe=C),A.hasOwnProperty(O="POW_PRECISION")&&(C=A[O],l(C,0,b,O),Ve=C),A.hasOwnProperty(O="FORMAT"))if(C=A[O],typeof C=="object")nt=C;else throw Error(i+O+" not an object: "+C);if(A.hasOwnProperty(O="ALPHABET"))if(C=A[O],typeof C=="string"&&!/^.?$|[+\-.\s]|(.).*\1/.test(C))$t=C.slice(0,10)=="0123456789",ut=C;else throw Error(i+O+" invalid: "+C)}else throw Error(i+"Object expected: "+A);return{DECIMAL_PLACES:me,ROUNDING_MODE:ee,EXPONENTIAL_AT:[Q,se],RANGE:[ne,ge],CRYPTO:_e,MODULO_MODE:Fe,POW_PRECISION:Ve,FORMAT:nt,ALPHABET:ut}},le.isBigNumber=function(A){if(!A||A._isBigNumber!==!0)return!1;if(!le.DEBUG)return!0;var O,C,B=A.c,U=A.e,L=A.s;e:if({}.toString.call(B)=="[object Array]"){if((L===1||L===-1)&&U>=-b&&U<=b&&U===r(U)){if(B[0]===0){if(U===0&&B.length===1)return!0;break e}if(O=(U+1)%h,O<1&&(O+=h),String(B[0]).length==O){for(O=0;O<B.length;O++)if(C=B[O],C<0||C>=u||C!==r(C))break e;if(C!==0)return!0}}}else if(B===null&&U===null&&(L===null||L===1||L===-1))return!0;throw Error(i+"Invalid BigNumber: "+A)},le.maximum=le.max=function(){return Tt(arguments,-1)},le.minimum=le.min=function(){return Tt(arguments,1)},le.random=(function(){var A=9007199254740992,O=Math.random()*A&2097151?function(){return r(Math.random()*A)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(C){var B,U,L,Z,z,F=0,G=[],q=new le(Be);if(C==null?C=me:l(C,0,b),Z=o(C/h),_e)if(crypto.getRandomValues){for(B=crypto.getRandomValues(new Uint32Array(Z*=2));F<Z;)z=B[F]*131072+(B[F+1]>>>11),z>=9e15?(U=crypto.getRandomValues(new Uint32Array(2)),B[F]=U[0],B[F+1]=U[1]):(G.push(z%1e14),F+=2);F=Z/2}else if(crypto.randomBytes){for(B=crypto.randomBytes(Z*=7);F<Z;)z=(B[F]&31)*281474976710656+B[F+1]*1099511627776+B[F+2]*4294967296+B[F+3]*16777216+(B[F+4]<<16)+(B[F+5]<<8)+B[F+6],z>=9e15?crypto.randomBytes(7).copy(B,F):(G.push(z%1e14),F+=7);F=Z/7}else throw _e=!1,Error(i+"crypto unavailable");if(!_e)for(;F<Z;)z=O(),z<9e15&&(G[F++]=z%1e14);for(Z=G[--F],C%=h,Z&&C&&(z=y[h-C],G[F]=r(Z/z)*z);G[F]===0;G.pop(),F--);if(F<0)G=[L=0];else{for(L=-1;G[0]===0;G.splice(0,1),L-=h);for(F=1,z=G[0];z>=10;z/=10,F++);F<h&&(L-=h-F)}return q.e=L,q.c=G,q}})(),le.sum=function(){for(var A=1,O=arguments,C=new le(O[0]);A<O.length;)C=C.plus(O[A++]);return C},_=(function(){var A="0123456789";function O(C,B,U,L){for(var Z,z=[0],F,G=0,q=C.length;G<q;){for(F=z.length;F--;z[F]*=B);for(z[0]+=L.indexOf(C.charAt(G++)),Z=0;Z<z.length;Z++)z[Z]>U-1&&(z[Z+1]==null&&(z[Z+1]=0),z[Z+1]+=z[Z]/U|0,z[Z]%=U)}return z.reverse()}return a(O,"toBaseOut"),function(C,B,U,L,Z){var z,F,G,q,te,Pe,be,Xe,ft=C.indexOf("."),mt=me,Ke=ee;for(ft>=0&&(q=Ve,Ve=0,C=C.replace(".",""),Xe=new le(B),Pe=Xe.pow(C.length-ft),Ve=q,Xe.c=O(v(R(Pe.c),Pe.e,"0"),10,U,A),Xe.e=Xe.c.length),be=O(C,B,U,Z?(z=ut,A):(z=A,ut)),G=q=be.length;be[--q]==0;be.pop());if(!be[0])return z.charAt(0);if(ft<0?--G:(Pe.c=be,Pe.e=G,Pe.s=L,Pe=E(Pe,Xe,mt,Ke,U),be=Pe.c,te=Pe.r,G=Pe.e),F=G+mt+1,ft=be[F],q=U/2,te=te||F<0||be[F+1]!=null,te=Ke<4?(ft!=null||te)&&(Ke==0||Ke==(Pe.s<0?3:2)):ft>q||ft==q&&(Ke==4||te||Ke==6&&be[F-1]&1||Ke==(Pe.s<0?8:7)),F<1||!be[0])C=te?v(z.charAt(1),-mt,z.charAt(0)):z.charAt(0);else{if(be.length=F,te)for(--U;++be[--F]>U;)be[F]=0,F||(++G,be=[1].concat(be));for(q=be.length;!be[--q];);for(ft=0,C="";ft<=q;C+=z.charAt(be[ft++]));C=v(C,G,z.charAt(0))}return C}})(),E=(function(){function A(B,U,L){var Z,z,F,G,q=0,te=B.length,Pe=U%T,be=U/T|0;for(B=B.slice();te--;)F=B[te]%T,G=B[te]/T|0,Z=be*F+G*Pe,z=Pe*F+Z%T*T+q,q=(z/L|0)+(Z/T|0)+be*G,B[te]=z%L;return q&&(B=[q].concat(B)),B}a(A,"multiply");function O(B,U,L,Z){var z,F;if(L!=Z)F=L>Z?1:-1;else for(z=F=0;z<L;z++)if(B[z]!=U[z]){F=B[z]>U[z]?1:-1;break}return F}a(O,"compare");function C(B,U,L,Z){for(var z=0;L--;)B[L]-=z,z=B[L]<U[L]?1:0,B[L]=z*Z+B[L]-U[L];for(;!B[0]&&B.length>1;B.splice(0,1));}return a(C,"subtract"),function(B,U,L,Z,z){var F,G,q,te,Pe,be,Xe,ft,mt,Ke,Qe,At,$i,Ci,Ni,hr,Dn,Bt=B.s==U.s?1:-1,Rt=B.c,it=U.c;if(!Rt||!Rt[0]||!it||!it[0])return new le(!B.s||!U.s||(Rt?it&&Rt[0]==it[0]:!it)?NaN:Rt&&Rt[0]==0||!it?Bt*0:Bt/0);for(ft=new le(Bt),mt=ft.c=[],G=B.e-U.e,Bt=L+G+1,z||(z=u,G=S(B.e/h)-S(U.e/h),Bt=Bt/h|0),q=0;it[q]==(Rt[q]||0);q++);if(it[q]>(Rt[q]||0)&&G--,Bt<0)mt.push(1),te=!0;else{for(Ci=Rt.length,hr=it.length,q=0,Bt+=2,Pe=r(z/(it[0]+1)),Pe>1&&(it=A(it,Pe,z),Rt=A(Rt,Pe,z),hr=it.length,Ci=Rt.length),$i=hr,Ke=Rt.slice(0,hr),Qe=Ke.length;Qe<hr;Ke[Qe++]=0);Dn=it.slice(),Dn=[0].concat(Dn),Ni=it[0],it[1]>=z/2&&Ni++;do{if(Pe=0,F=O(it,Ke,hr,Qe),F<0){if(At=Ke[0],hr!=Qe&&(At=At*z+(Ke[1]||0)),Pe=r(At/Ni),Pe>1)for(Pe>=z&&(Pe=z-1),be=A(it,Pe,z),Xe=be.length,Qe=Ke.length;O(be,Ke,Xe,Qe)==1;)Pe--,C(be,hr<Xe?Dn:it,Xe,z),Xe=be.length,F=1;else Pe==0&&(F=Pe=1),be=it.slice(),Xe=be.length;if(Xe<Qe&&(be=[0].concat(be)),C(Ke,be,Qe,z),Qe=Ke.length,F==-1)for(;O(it,Ke,hr,Qe)<1;)Pe++,C(Ke,hr<Qe?Dn:it,Qe,z),Qe=Ke.length}else F===0&&(Pe++,Ke=[0]);mt[q++]=Pe,Ke[0]?Ke[Qe++]=Rt[$i]||0:(Ke=[Rt[$i]],Qe=1)}while(($i++<Ci||Ke[0]!=null)&&Bt--);te=Ke[0]!=null,mt[0]||mt.splice(0,1)}if(z==u){for(q=1,Bt=mt[0];Bt>=10;Bt/=10,q++);et(ft,L+(ft.e=q+G*h-1)+1,Z,te)}else ft.e=G,ft.r=+te;return ft}})();function Pt(A,O,C,B){var U,L,Z,z,F;if(C==null?C=ee:l(C,0,8),!A.c)return A.toString();if(U=A.c[0],Z=A.e,O==null)F=R(A.c),F=B==1||B==2&&(Z<=Q||Z>=se)?d(F,Z):v(F,Z,"0");else if(A=et(new le(A),O,C),L=A.e,F=R(A.c),z=F.length,B==1||B==2&&(O<=L||L<=Q)){for(;z<O;F+="0",z++);F=d(F,L)}else if(O-=Z+(B===2&&L>Z),F=v(F,L,"0"),L+1>z){if(--O>0)for(F+=".";O--;F+="0");}else if(O+=L-z,O>0)for(L+1==z&&(F+=".");O--;F+="0");return A.s<0&&U?"-"+F:F}a(Pt,"format");function Tt(A,O){for(var C,B,U=1,L=new le(A[0]);U<A.length;U++)B=new le(A[U]),(!B.s||(C=I(L,B))===O||C===0&&L.s===O)&&(L=B);return L}a(Tt,"maxOrMin");function mr(A,O,C){for(var B=1,U=O.length;!O[--U];O.pop());for(U=O[0];U>=10;U/=10,B++);return(C=B+C*h-1)>ge?A.c=A.e=null:C<ne?A.c=[A.e=0]:(A.e=C,A.c=O),A}a(mr,"normalise"),pe=(function(){var A=/^(-?)0([xbo])(?=\w[\w.]*$)/i,O=/^([^.]+)\.$/,C=/^\.([^.]+)$/,B=/^-?(Infinity|NaN)$/,U=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(L,Z,z,F){var G,q=z?Z:Z.replace(U,"");if(B.test(q))L.s=isNaN(q)?null:q<0?-1:1;else{if(!z&&(q=q.replace(A,function(te,Pe,be){return G=(be=be.toLowerCase())=="x"?16:be=="b"?2:8,!F||F==G?Pe:te}),F&&(G=F,q=q.replace(O,"$1").replace(C,"0.$1")),Z!=q))return new le(q,G);if(le.DEBUG)throw Error(i+"Not a"+(F?" base "+F:"")+" number: "+Z);L.s=null}L.c=L.e=null}})();function et(A,O,C,B){var U,L,Z,z,F,G,q,te=A.c,Pe=y;if(te){e:{for(U=1,z=te[0];z>=10;z/=10,U++);if(L=O-U,L<0)L+=h,Z=O,F=te[G=0],q=r(F/Pe[U-Z-1]%10);else if(G=o((L+1)/h),G>=te.length)if(B){for(;te.length<=G;te.push(0));F=q=0,U=1,L%=h,Z=L-h+1}else break e;else{for(F=z=te[G],U=1;z>=10;z/=10,U++);L%=h,Z=L-h+U,q=Z<0?0:r(F/Pe[U-Z-1]%10)}if(B=B||O<0||te[G+1]!=null||(Z<0?F:F%Pe[U-Z-1]),B=C<4?(q||B)&&(C==0||C==(A.s<0?3:2)):q>5||q==5&&(C==4||B||C==6&&(L>0?Z>0?F/Pe[U-Z]:0:te[G-1])%10&1||C==(A.s<0?8:7)),O<1||!te[0])return te.length=0,B?(O-=A.e+1,te[0]=Pe[(h-O%h)%h],A.e=-O||0):te[0]=A.e=0,A;if(L==0?(te.length=G,z=1,G--):(te.length=G+1,z=Pe[h-L],te[G]=Z>0?r(F/Pe[U-Z]%Pe[Z])*z:0),B)for(;;)if(G==0){for(L=1,Z=te[0];Z>=10;Z/=10,L++);for(Z=te[0]+=z,z=1;Z>=10;Z/=10,z++);L!=z&&(A.e++,te[0]==u&&(te[0]=1));break}else{if(te[G]+=z,te[G]!=u)break;te[G--]=0,z=1}for(L=te.length;te[--L]===0;te.pop());}A.e>ge?A.c=A.e=null:A.e<ne&&(A.c=[A.e=0])}return A}a(et,"round");function ot(A){var O,C=A.e;return C===null?A.toString():(O=R(A.c),O=C<=Q||C>=se?d(O,C):v(O,C,"0"),A.s<0?"-"+O:O)}return a(ot,"valueOf"),oe.absoluteValue=oe.abs=function(){var A=new le(this);return A.s<0&&(A.s=1),A},oe.comparedTo=function(A,O){return I(this,new le(A,O))},oe.decimalPlaces=oe.dp=function(A,O){var C,B,U,L=this;if(A!=null)return l(A,0,b),O==null?O=ee:l(O,0,8),et(new le(L),A+L.e+1,O);if(!(C=L.c))return null;if(B=((U=C.length-1)-S(this.e/h))*h,U=C[U])for(;U%10==0;U/=10,B--);return B<0&&(B=0),B},oe.dividedBy=oe.div=function(A,O){return E(this,new le(A,O),me,ee)},oe.dividedToIntegerBy=oe.idiv=function(A,O){return E(this,new le(A,O),0,1)},oe.exponentiatedBy=oe.pow=function(A,O){var C,B,U,L,Z,z,F,G,q,te=this;if(A=new le(A),A.c&&!A.isInteger())throw Error(i+"Exponent not an integer: "+ot(A));if(O!=null&&(O=new le(O)),z=A.e>14,!te.c||!te.c[0]||te.c[0]==1&&!te.e&&te.c.length==1||!A.c||!A.c[0])return q=new le(Math.pow(+ot(te),z?A.s*(2-m(A)):+ot(A))),O?q.mod(O):q;if(F=A.s<0,O){if(O.c?!O.c[0]:!O.s)return new le(NaN);B=!F&&te.isInteger()&&O.isInteger(),B&&(te=te.mod(O))}else{if(A.e>9&&(te.e>0||te.e<-1||(te.e==0?te.c[0]>1||z&&te.c[1]>=24e7:te.c[0]<8e13||z&&te.c[0]<=9999975e7)))return L=te.s<0&&m(A)?-0:0,te.e>-1&&(L=1/L),new le(F?1/L:L);Ve&&(L=o(Ve/h+2))}for(z?(C=new le(.5),F&&(A.s=1),G=m(A)):(U=Math.abs(+ot(A)),G=U%2),q=new le(Be);;){if(G){if(q=q.times(te),!q.c)break;L?q.c.length>L&&(q.c.length=L):B&&(q=q.mod(O))}if(U){if(U=r(U/2),U===0)break;G=U%2}else if(A=A.times(C),et(A,A.e+1,1),A.e>14)G=m(A);else{if(U=+ot(A),U===0)break;G=U%2}te=te.times(te),L?te.c&&te.c.length>L&&(te.c.length=L):B&&(te=te.mod(O))}return B?q:(F&&(q=Be.div(q)),O?q.mod(O):L?et(q,Ve,ee,Z):q)},oe.integerValue=function(A){var O=new le(this);return A==null?A=ee:l(A,0,8),et(O,O.e+1,A)},oe.isEqualTo=oe.eq=function(A,O){return I(this,new le(A,O))===0},oe.isFinite=function(){return!!this.c},oe.isGreaterThan=oe.gt=function(A,O){return I(this,new le(A,O))>0},oe.isGreaterThanOrEqualTo=oe.gte=function(A,O){return(O=I(this,new le(A,O)))===1||O===0},oe.isInteger=function(){return!!this.c&&S(this.e/h)>this.c.length-2},oe.isLessThan=oe.lt=function(A,O){return I(this,new le(A,O))<0},oe.isLessThanOrEqualTo=oe.lte=function(A,O){return(O=I(this,new le(A,O)))===-1||O===0},oe.isNaN=function(){return!this.s},oe.isNegative=function(){return this.s<0},oe.isPositive=function(){return this.s>0},oe.isZero=function(){return!!this.c&&this.c[0]==0},oe.minus=function(A,O){var C,B,U,L,Z=this,z=Z.s;if(A=new le(A,O),O=A.s,!z||!O)return new le(NaN);if(z!=O)return A.s=-O,Z.plus(A);var F=Z.e/h,G=A.e/h,q=Z.c,te=A.c;if(!F||!G){if(!q||!te)return q?(A.s=-O,A):new le(te?Z:NaN);if(!q[0]||!te[0])return te[0]?(A.s=-O,A):new le(q[0]?Z:ee==3?-0:0)}if(F=S(F),G=S(G),q=q.slice(),z=F-G){for((L=z<0)?(z=-z,U=q):(G=F,U=te),U.reverse(),O=z;O--;U.push(0));U.reverse()}else for(B=(L=(z=q.length)<(O=te.length))?z:O,z=O=0;O<B;O++)if(q[O]!=te[O]){L=q[O]<te[O];break}if(L&&(U=q,q=te,te=U,A.s=-A.s),O=(B=te.length)-(C=q.length),O>0)for(;O--;q[C++]=0);for(O=u-1;B>z;){if(q[--B]<te[B]){for(C=B;C&&!q[--C];q[C]=O);--q[C],q[B]+=u}q[B]-=te[B]}for(;q[0]==0;q.splice(0,1),--G);return q[0]?mr(A,q,G):(A.s=ee==3?-1:1,A.c=[A.e=0],A)},oe.modulo=oe.mod=function(A,O){var C,B,U=this;return A=new le(A,O),!U.c||!A.s||A.c&&!A.c[0]?new le(NaN):!A.c||U.c&&!U.c[0]?new le(U):(Fe==9?(B=A.s,A.s=1,C=E(U,A,0,3),A.s=B,C.s*=B):C=E(U,A,0,Fe),A=U.minus(C.times(A)),!A.c[0]&&Fe==1&&(A.s=U.s),A)},oe.multipliedBy=oe.times=function(A,O){var C,B,U,L,Z,z,F,G,q,te,Pe,be,Xe,ft,mt,Ke=this,Qe=Ke.c,At=(A=new le(A,O)).c;if(!Qe||!At||!Qe[0]||!At[0])return!Ke.s||!A.s||Qe&&!Qe[0]&&!At||At&&!At[0]&&!Qe?A.c=A.e=A.s=null:(A.s*=Ke.s,!Qe||!At?A.c=A.e=null:(A.c=[0],A.e=0)),A;for(B=S(Ke.e/h)+S(A.e/h),A.s*=Ke.s,F=Qe.length,te=At.length,F<te&&(Xe=Qe,Qe=At,At=Xe,U=F,F=te,te=U),U=F+te,Xe=[];U--;Xe.push(0));for(ft=u,mt=T,U=te;--U>=0;){for(C=0,Pe=At[U]%mt,be=At[U]/mt|0,Z=F,L=U+Z;L>U;)G=Qe[--Z]%mt,q=Qe[Z]/mt|0,z=be*G+q*Pe,G=Pe*G+z%mt*mt+Xe[L]+C,C=(G/ft|0)+(z/mt|0)+be*q,Xe[L--]=G%ft;Xe[L]=C}return C?++B:Xe.splice(0,1),mr(A,Xe,B)},oe.negated=function(){var A=new le(this);return A.s=-A.s||null,A},oe.plus=function(A,O){var C,B=this,U=B.s;if(A=new le(A,O),O=A.s,!U||!O)return new le(NaN);if(U!=O)return A.s=-O,B.minus(A);var L=B.e/h,Z=A.e/h,z=B.c,F=A.c;if(!L||!Z){if(!z||!F)return new le(U/0);if(!z[0]||!F[0])return F[0]?A:new le(z[0]?B:U*0)}if(L=S(L),Z=S(Z),z=z.slice(),U=L-Z){for(U>0?(Z=L,C=F):(U=-U,C=z),C.reverse();U--;C.push(0));C.reverse()}for(U=z.length,O=F.length,U-O<0&&(C=F,F=z,z=C,O=U),U=0;O;)U=(z[--O]=z[O]+F[O]+U)/u|0,z[O]=u===z[O]?0:z[O]%u;return U&&(z=[U].concat(z),++Z),mr(A,z,Z)},oe.precision=oe.sd=function(A,O){var C,B,U,L=this;if(A!=null&&A!==!!A)return l(A,1,b),O==null?O=ee:l(O,0,8),et(new le(L),A,O);if(!(C=L.c))return null;if(U=C.length-1,B=U*h+1,U=C[U]){for(;U%10==0;U/=10,B--);for(U=C[0];U>=10;U/=10,B++);}return A&&L.e+1>B&&(B=L.e+1),B},oe.shiftedBy=function(A){return l(A,-g,g),this.times("1e"+A)},oe.squareRoot=oe.sqrt=function(){var A,O,C,B,U,L=this,Z=L.c,z=L.s,F=L.e,G=me+4,q=new le("0.5");if(z!==1||!Z||!Z[0])return new le(!z||z<0&&(!Z||Z[0])?NaN:Z?L:1/0);if(z=Math.sqrt(+ot(L)),z==0||z==1/0?(O=R(Z),(O.length+F)%2==0&&(O+="0"),z=Math.sqrt(+O),F=S((F+1)/2)-(F<0||F%2),z==1/0?O="5e"+F:(O=z.toExponential(),O=O.slice(0,O.indexOf("e")+1)+F),C=new le(O)):C=new le(z+""),C.c[0]){for(F=C.e,z=F+G,z<3&&(z=0);;)if(U=C,C=q.times(U.plus(E(L,U,G,1))),R(U.c).slice(0,z)===(O=R(C.c)).slice(0,z))if(C.e<F&&--z,O=O.slice(z-3,z+1),O=="9999"||!B&&O=="4999"){if(!B&&(et(U,U.e+me+2,0),U.times(U).eq(L))){C=U;break}G+=4,z+=4,B=1}else{(!+O||!+O.slice(1)&&O.charAt(0)=="5")&&(et(C,C.e+me+2,1),A=!C.times(C).eq(L));break}}return et(C,C.e+me+1,ee,A)},oe.toExponential=function(A,O){return A!=null&&(l(A,0,b),A++),Pt(this,A,O,1)},oe.toFixed=function(A,O){return A!=null&&(l(A,0,b),A=A+this.e+1),Pt(this,A,O)},oe.toFormat=function(A,O,C){var B,U=this;if(C==null)A!=null&&O&&typeof O=="object"?(C=O,O=null):A&&typeof A=="object"?(C=A,A=O=null):C=nt;else if(typeof C!="object")throw Error(i+"Argument not an object: "+C);if(B=U.toFixed(A,O),U.c){var L,Z=B.split("."),z=+C.groupSize,F=+C.secondaryGroupSize,G=C.groupSeparator||"",q=Z[0],te=Z[1],Pe=U.s<0,be=Pe?q.slice(1):q,Xe=be.length;if(F&&(L=z,z=F,F=L,Xe-=L),z>0&&Xe>0){for(L=Xe%z||z,q=be.substr(0,L);L<Xe;L+=z)q+=G+be.substr(L,z);F>0&&(q+=G+be.slice(L)),Pe&&(q="-"+q)}B=te?q+(C.decimalSeparator||"")+((F=+C.fractionGroupSize)?te.replace(new RegExp("\\d{"+F+"}\\B","g"),"$&"+(C.fractionGroupSeparator||"")):te):q}return(C.prefix||"")+B+(C.suffix||"")},oe.toFraction=function(A){var O,C,B,U,L,Z,z,F,G,q,te,Pe,be=this,Xe=be.c;if(A!=null&&(z=new le(A),!z.isInteger()&&(z.c||z.s!==1)||z.lt(Be)))throw Error(i+"Argument "+(z.isInteger()?"out of range: ":"not an integer: ")+ot(z));if(!Xe)return new le(be);for(O=new le(Be),G=C=new le(Be),B=F=new le(Be),Pe=R(Xe),L=O.e=Pe.length-be.e-1,O.c[0]=y[(Z=L%h)<0?h+Z:Z],A=!A||z.comparedTo(O)>0?L>0?O:G:z,Z=ge,ge=1/0,z=new le(Pe),F.c[0]=0;q=E(z,O,0,1),U=C.plus(q.times(B)),U.comparedTo(A)!=1;)C=B,B=U,G=F.plus(q.times(U=G)),F=U,O=z.minus(q.times(U=O)),z=U;return U=E(A.minus(C),B,0,1),F=F.plus(U.times(G)),C=C.plus(U.times(B)),F.s=G.s=be.s,L=L*2,te=E(G,B,L,ee).minus(be).abs().comparedTo(E(F,C,L,ee).minus(be).abs())<1?[G,B]:[F,C],ge=Z,te},oe.toNumber=function(){return+ot(this)},oe.toPrecision=function(A,O){return A!=null&&l(A,1,b),Pt(this,A,O,2)},oe.toString=function(A){var O,C=this,B=C.s,U=C.e;return U===null?B?(O="Infinity",B<0&&(O="-"+O)):O="NaN":(A==null?O=U<=Q||U>=se?d(R(C.c),U):v(R(C.c),U,"0"):A===10&&$t?(C=et(new le(C),me+U+1,ee),O=v(R(C.c),C.e,"0")):(l(A,2,ut.length,"Base"),O=_(v(R(C.c),U,"0"),10,A,B,!0)),B<0&&C.c[0]&&(O="-"+O)),O},oe.valueOf=oe.toJSON=function(){return ot(this)},oe._isBigNumber=!0,p!=null&&le.set(p),le}a(P,"clone");function S(p){var E=p|0;return p>0||p===E?E:E-1}a(S,"bitFloor");function R(p){for(var E,_,pe=1,oe=p.length,Be=p[0]+"";pe<oe;){for(E=p[pe++]+"",_=h-E.length;_--;E="0"+E);Be+=E}for(oe=Be.length;Be.charCodeAt(--oe)===48;);return Be.slice(0,oe+1||1)}a(R,"coeffToString");function I(p,E){var _,pe,oe=p.c,Be=E.c,me=p.s,ee=E.s,Q=p.e,se=E.e;if(!me||!ee)return null;if(_=oe&&!oe[0],pe=Be&&!Be[0],_||pe)return _?pe?0:-ee:me;if(me!=ee)return me;if(_=me<0,pe=Q==se,!oe||!Be)return pe?0:!oe^_?1:-1;if(!pe)return Q>se^_?1:-1;for(ee=(Q=oe.length)<(se=Be.length)?Q:se,me=0;me<ee;me++)if(oe[me]!=Be[me])return oe[me]>Be[me]^_?1:-1;return Q==se?0:Q>se^_?1:-1}a(I,"compare");function l(p,E,_,pe){if(p<E||p>_||p!==r(p))throw Error(i+(pe||"Argument")+(typeof p=="number"?p<E||p>_?" out of range: ":" not an integer: ":" not a primitive number: ")+String(p))}a(l,"intCheck");function m(p){var E=p.c.length-1;return S(p.e/h)==E&&p.c[E]%2!=0}a(m,"isOdd");function d(p,E){return(p.length>1?p.charAt(0)+"."+p.slice(1):p)+(E<0?"e":"e+")+E}a(d,"toExponential");function v(p,E,_){var pe,oe;if(E<0){for(oe=_+".";++E;oe+=_);p=oe+p}else if(pe=p.length,++E>pe){for(oe=_,E-=pe;--E;oe+=_);p+=oe}else E<pe&&(p=p.slice(0,E)+"."+p.slice(E));return p}a(v,"toFixedPoint"),t=P(),t.default=t.BigNumber=t,typeof define=="function"&&define.amd?define(function(){return t}):typeof em<"u"&&em.exports?em.exports=t:(e||(e=typeof self<"u"&&self?self:window),e.BigNumber=t)})(GO)});var KO=j((bue,WO)=>{var HO=ww(),ZO=WO.exports;(function(){"use strict";function e(g){return g<10?"0"+g:g}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(g){return n.lastIndex=0,n.test(g)?'"'+g.replace(n,function(y){var T=i[y];return typeof T=="string"?T:"\\u"+("0000"+y.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+g+'"'}a(u,"quote");function h(g,y){var T,b,P,S,R=o,I,l=y[g],m=l!=null&&(l instanceof HO||HO.isBigNumber(l));switch(l&&typeof l=="object"&&typeof l.toJSON=="function"&&(l=l.toJSON(g)),typeof s=="function"&&(l=s.call(y,g,l)),typeof l){case"string":return m?l:u(l);case"number":return isFinite(l)?String(l):"null";case"boolean":case"null":case"bigint":return String(l);case"object":if(!l)return"null";if(o+=r,I=[],Object.prototype.toString.apply(l)==="[object Array]"){for(S=l.length,T=0;T<S;T+=1)I[T]=h(T,l)||"null";return P=I.length===0?"[]":o?`[
32
32
  `+o+I.join(`,
33
33
  `+o)+`
34
34
  `+R+"]":"["+I.join(",")+"]",o=R,P}if(s&&typeof s=="object")for(S=s.length,T=0;T<S;T+=1)typeof s[T]=="string"&&(b=s[T],P=h(b,l),P&&I.push(u(b)+(o?": ":":")+P));else Object.keys(l).forEach(function(d){var v=h(d,l);v&&I.push(u(d)+(o?": ":":")+v)});return P=I.length===0?"{}":o?`{
35
35
  `+o+I.join(`,
36
36
  `+o)+`
37
- `+R+"}":"{"+I.join(",")+"}",o=R,P}}a(h,"str"),typeof ZO.stringify!="function"&&(ZO.stringify=function(g,y,T){var b;if(o="",r="",typeof T=="number")for(b=0;b<T;b+=1)r+=" ";else typeof T=="string"&&(r=T);if(s=y,y&&typeof y!="function"&&(typeof y!="object"||typeof y.length!="number"))throw new Error("JSON.stringify");return h("",{"":g})})})()});var XO=j((bue,JO)=>{var tm=null,rG=/(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])/,nG=/(?: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)/,oG=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(R){throw{name:"SyntaxError",message:R,at:n,text:i}},"error"),u=a(function(R){return R&&R!==o&&s("Expected '"+R+"' instead of '"+o+"'"),o=i.charAt(n),n+=1,o},"next"),h=a(function(){var R,I="";for(o==="-"&&(I="-",u("-"));o>="0"&&o<="9";)I+=o,u();if(o===".")for(I+=".";u()&&o>="0"&&o<="9";)I+=o;if(o==="e"||o==="E")for(I+=o,u(),(o==="-"||o==="+")&&(I+=o,u());o>="0"&&o<="9";)I+=o,u();if(R=+I,!isFinite(R))s("Bad number");else return tm==null&&(tm=ww()),I.length>15?t.storeAsString?I:t.useNativeBigInt?BigInt(I):new tm(I):t.alwaysParseAsBig?t.useNativeBigInt?BigInt(R):new tm(R):R},"number"),g=a(function(){var R,I,l="",m;if(o==='"')for(var d=n;u();){if(o==='"')return n-1>d&&(l+=i.substring(d,n-1)),u(),l;if(o==="\\"){if(n-1>d&&(l+=i.substring(d,n-1)),u(),o==="u"){for(m=0,I=0;I<4&&(R=parseInt(u(),16),!!isFinite(R));I+=1)m=m*16+R;l+=String.fromCharCode(m)}else if(typeof r[o]=="string")l+=r[o];else break;d=n}}s("Bad string")},"string"),y=a(function(){for(;o&&o<=" ";)u()},"white"),T=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"),b,P=a(function(){var R=[];if(o==="["){if(u("["),y(),o==="]")return u("]"),R;for(;o;){if(R.push(b()),y(),o==="]")return u("]"),R;u(","),y()}}s("Bad array")},"array"),S=a(function(){var R,I=Object.create(null);if(o==="{"){if(u("{"),y(),o==="}")return u("}"),I;for(;o;){if(R=g(),y(),u(":"),t.strict===!0&&Object.hasOwnProperty.call(I,R)&&s('Duplicate key "'+R+'"'),rG.test(R)===!0?t.protoAction==="error"?s("Object contains forbidden prototype property"):t.protoAction==="ignore"?b():I[R]=b():nG.test(R)===!0?t.constructorAction==="error"?s("Object contains forbidden constructor property"):t.constructorAction==="ignore"?b():I[R]=b():I[R]=b(),y(),o==="}")return u("}"),I;u(","),y()}}s("Bad object")},"object");return b=a(function(){switch(y(),o){case"{":return S();case"[":return P();case'"':return g();case"-":return h();default:return o>="0"&&o<="9"?h():T()}},"value"),function(R,I){var l;return i=R+"",n=0,o=" ",l=b(),y(),o&&s("Syntax error"),typeof I=="function"?a((function m(d,v){var p,E,_=d[v];return _&&typeof _=="object"&&Object.keys(_).forEach(function(pe){E=m(_,pe),E!==void 0?_[pe]=E:delete _[pe]}),I.call(d,v,_)}),"walk")({"":l},""):l}},"json_parse");JO.exports=oG});var e$=j((Eue,rm)=>{var YO=KO().stringify,QO=XO();rm.exports=function(e){return{parse:QO(e),stringify:YO}};rm.exports.parse=QO();rm.exports.stringify=YO});var bw=j(nn=>{"use strict";Object.defineProperty(nn,"__esModule",{value:!0});nn.GCE_LINUX_BIOS_PATHS=void 0;nn.isGoogleCloudServerless=n$;nn.isGoogleComputeEngineLinux=o$;nn.isGoogleComputeEngineMACAddress=i$;nn.isGoogleComputeEngine=a$;nn.detectGCPResidency=aG;var t$=require("fs"),r$=require("os");nn.GCE_LINUX_BIOS_PATHS={BIOS_DATE:"/sys/class/dmi/id/bios_date",BIOS_VENDOR:"/sys/class/dmi/id/bios_vendor"};var iG=/^42:01/;function n$(){return!!(process.env.CLOUD_RUN_JOB||process.env.FUNCTION_NAME||process.env.K_SERVICE)}a(n$,"isGoogleCloudServerless");function o$(){if((0,r$.platform)()!=="linux")return!1;try{(0,t$.statSync)(nn.GCE_LINUX_BIOS_PATHS.BIOS_DATE);let e=(0,t$.readFileSync)(nn.GCE_LINUX_BIOS_PATHS.BIOS_VENDOR,"utf8");return/Google/.test(e)}catch{return!1}}a(o$,"isGoogleComputeEngineLinux");function i$(){let e=(0,r$.networkInterfaces)();for(let t of Object.values(e))if(t){for(let{mac:n}of t)if(iG.test(n))return!0}return!1}a(i$,"isGoogleComputeEngineMACAddress");function a$(){return o$()||i$()}a(a$,"isGoogleComputeEngine");function aG(){return n$()||a$()}a(aG,"detectGCPResidency")});var s$=j(nm=>{"use strict";Object.defineProperty(nm,"__esModule",{value:!0});nm.Colours=void 0;var Ht=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="")}};nm.Colours=Ht;Ht.enabled=!1;Ht.reset="";Ht.bright="";Ht.dim="";Ht.red="";Ht.green="";Ht.yellow="";Ht.blue="";Ht.magenta="";Ht.cyan="";Ht.white="";Ht.grey="";Ht.refresh()});var d$=j(ct=>{"use strict";var sG=ct&&ct.__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]})),cG=ct&&ct.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),c$=ct&&ct.__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"&&sG(n,t,o[r]);return cG(n,t),n}})();Object.defineProperty(ct,"__esModule",{value:!0});ct.env=ct.DebugLogBackendBase=ct.placeholder=ct.AdhocDebugLogger=ct.LogSeverity=void 0;ct.getNodeBackend=Ew;ct.getDebugBackend=lG;ct.getStructuredBackend=dG;ct.setBackend=pG;ct.log=l$;var uG=require("events"),ku=c$(require("process")),u$=c$(require("util")),Sr=s$(),on;(function(e){e.DEFAULT="DEFAULT",e.DEBUG="DEBUG",e.INFO="INFO",e.WARNING="WARNING",e.ERROR="ERROR"})(on||(ct.LogSeverity=on={}));var zu=class extends uG.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(on.DEBUG,...o),this.func.info=(...o)=>this.invokeSeverity(on.INFO,...o),this.func.warn=(...o)=>this.invokeSeverity(on.WARNING,...o),this.func.error=(...o)=>this.invokeSeverity(on.ERROR,...o),this.func.sublog=o=>l$(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)}};ct.AdhocDebugLogger=zu;ct.placeholder=new zu("",()=>{}).func;var Ba=class{static{a(this,"DebugLogBackendBase")}constructor(){var t;this.cached=new Map,this.filters=[],this.filtersSet=!1;let n=(t=ku.env[ct.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)}}};ct.DebugLogBackendBase=Ba;var Tw=class extends Ba{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=`${Sr.Colours.green}${t}${Sr.Colours.reset}`,s=`${Sr.Colours.yellow}${ku.pid}${Sr.Colours.reset}`,u;switch(n.severity){case on.ERROR:u=`${Sr.Colours.red}${n.severity}${Sr.Colours.reset}`;break;case on.INFO:u=`${Sr.Colours.magenta}${n.severity}${Sr.Colours.reset}`;break;case on.WARNING:u=`${Sr.Colours.yellow}${n.severity}${Sr.Colours.reset}`;break;default:u=(r=n.severity)!==null&&r!==void 0?r:on.DEFAULT;break}let h=u$.formatWithOptions({colors:Sr.Colours.enabled},...o),g=Object.assign({},n);delete g.severity;let y=Object.getOwnPropertyNames(g).length?JSON.stringify(g):"",T=y?`${Sr.Colours.grey}${y}${Sr.Colours.reset}`:"";console.error("%s [%s|%s] %s%s",s,i,u,h,y?` ${T}`:"")}:()=>{}}setFilters(){let n=this.filters.join(",").replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^");this.enabledRegexp=new RegExp(`^${n}$`,"i")}};function Ew(){return new Tw}a(Ew,"getNodeBackend");var Sw=class extends Ba{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=ku.env.NODE_DEBUG)!==null&&t!==void 0?t:"";ku.env.NODE_DEBUG=`${n}${n?",":""}${this.filters.join(",")}`}};function lG(e){return new Sw(e)}a(lG,"getDebugBackend");var xw=class extends Ba{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:on.INFO,h=Object.assign({severity:u,message:u$.format(...i)},r),g=JSON.stringify(h);o?o(r,g):console.log("%s",g)}}setFilters(){var t;(t=this.upstream)===null||t===void 0||t.setFilters()}};function dG(e){return new xw(e)}a(dG,"getStructuredBackend");ct.env={nodeEnables:"GOOGLE_SDK_NODE_LOGGING"};var Iw=new Map,xr;function pG(e){xr=e,Iw.clear()}a(pG,"setBackend");function l$(e,t){if(!xr&&!ku.env[ct.env.nodeEnables]||!e)return ct.placeholder;t&&(e=`${t.instance.namespace}:${e}`);let n=Iw.get(e);if(n)return n.func;if(xr===null)return ct.placeholder;xr===void 0&&(xr=Ew());let o=(()=>{let r;return new zu(e,(s,...u)=>{if(r!==xr){if(xr===null)return;xr===void 0&&(xr=Ew()),r=xr}xr?.log(e,s,...u)})})();return Iw.set(e,o),o.func}a(l$,"log")});var Aw=j(Ei=>{"use strict";var fG=Ei&&Ei.__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]})),mG=Ei&&Ei.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&fG(t,e,n)};Object.defineProperty(Ei,"__esModule",{value:!0});mG(d$(),Ei)});var Mu=j(Ie=>{"use strict";var f$=Ie&&Ie.__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]})),hG=Ie&&Ie.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),gG=Ie&&Ie.__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"&&f$(n,t,o[r]);return hG(n,t),n}})(),yG=Ie&&Ie.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&f$(t,e,n)};Object.defineProperty(Ie,"__esModule",{value:!0});Ie.gcpResidencyCache=Ie.METADATA_SERVER_DETECTION=Ie.HEADERS=Ie.HEADER_VALUE=Ie.HEADER_NAME=Ie.SECONDARY_HOST_ADDRESS=Ie.HOST_ADDRESS=Ie.BASE_PATH=void 0;Ie.instance=TG;Ie.project=EG;Ie.universe=SG;Ie.bulk=xG;Ie.isAvailable=AG;Ie.resetIsAvailableCache=RG;Ie.getGCPResidency=Ow;Ie.setGCPResidency=m$;Ie.requestTimeout=h$;var Rw=St(),vG=e$(),_G=bw(),PG=gG(Aw());Ie.BASE_PATH="/computeMetadata/v1";Ie.HOST_ADDRESS="http://169.254.169.254";Ie.SECONDARY_HOST_ADDRESS="http://metadata.google.internal.";Ie.HEADER_NAME="Metadata-Flavor";Ie.HEADER_VALUE="Google";Ie.HEADERS=Object.freeze({[Ie.HEADER_NAME]:Ie.HEADER_VALUE});var p$=PG.log("gcp-metadata");Ie.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 Dw(e){return e||(e=process.env.GCE_METADATA_IP||process.env.GCE_METADATA_HOST||Ie.HOST_ADDRESS),/^https?:\/\//.test(e)||(e=`http://${e}`),new URL(Ie.BASE_PATH,e).href}a(Dw,"getBaseUrl");function wG(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(wG,"validate");async function Uu(e,t={},n=3,o=!1){let r=new Headers(Ie.HEADERS),i="",s={};if(typeof e=="object"){let T=e;new Headers(T.headers).forEach((b,P)=>r.set(P,b)),i=T.metadataKey,s=T.params||s,n=T.noResponseRetries||n,o=T.fastFail||o}else i=e;typeof t=="string"?i+=`/${t}`:(wG(t),t.property&&(i+=`/${t.property}`),new Headers(t.headers).forEach((T,b)=>r.set(b,T)),s=t.params||s);let u=o?bG:Rw.request,h={url:`${Dw()}/${i}`,headers:r,retryConfig:{noResponseRetries:n},params:s,responseType:"text",timeout:h$()};p$.info("instance request %j",h);let g=await u(h);p$.info("instance metadata is %s",g.data);let y=g.headers.get(Ie.HEADER_NAME);if(y!==Ie.HEADER_VALUE)throw new RangeError(`Invalid response from metadata service: incorrect ${Ie.HEADER_NAME} header. Expected '${Ie.HEADER_VALUE}', got ${y?`'${y}'`:"no header"}`);if(typeof g.data=="string")try{return vG.parse(g.data)}catch{}return g.data}a(Uu,"metadataAccessor");async function bG(e){let t={...e,url:e.url?.toString().replace(Dw(),Dw(Ie.SECONDARY_HOST_ADDRESS))},n=(0,Rw.request)(e),o=(0,Rw.request)(t);return Promise.any([n,o])}a(bG,"fastFailMetadataRequest");function TG(e){return Uu("instance",e)}a(TG,"instance");function EG(e){return Uu("project",e)}a(EG,"project");function SG(e){return Uu("universe",e)}a(SG,"universe");async function xG(e){let t={};return await Promise.all(e.map(n=>(async()=>{let o=await Uu(n),r=n.metadataKey;t[r]=o})())),t}a(xG,"bulk");function IG(){return process.env.DETECT_GCP_RETRIES?Number(process.env.DETECT_GCP_RETRIES):0}a(IG,"detectGCPAvailableRetries");var om;async function AG(){if(process.env.METADATA_SERVER_DETECTION){let e=process.env.METADATA_SERVER_DETECTION.trim().toLocaleLowerCase();if(!(e in Ie.METADATA_SERVER_DETECTION))throw new RangeError(`Unknown \`METADATA_SERVER_DETECTION\` env variable. Got \`${e}\`, but it should be \`${Object.keys(Ie.METADATA_SERVER_DETECTION).join("`, `")}\`, or unset`);switch(e){case"assume-present":return!0;case"none":return!1;case"bios-only":return Ow();case"ping-only":}}try{return om===void 0&&(om=Uu("instance",void 0,IG(),!(process.env.GCE_METADATA_IP||process.env.GCE_METADATA_HOST))),await om,!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(AG,"isAvailable");function RG(){om=void 0}a(RG,"resetIsAvailableCache");Ie.gcpResidencyCache=null;function Ow(){return Ie.gcpResidencyCache===null&&m$(),Ie.gcpResidencyCache}a(Ow,"getGCPResidency");function m$(e=null){Ie.gcpResidencyCache=e!==null?e:(0,_G.detectGCPResidency)()}a(m$,"setGCPResidency");function h$(){return Ow()?0:3e3}a(h$,"requestTimeout");yG(bw(),Ie)});var v$=j(im=>{"use strict";im.byteLength=OG;im.toByteArray=CG;im.fromByteArray=zG;var vn=[],qr=[],DG=typeof Uint8Array<"u"?Uint8Array:Array,$w="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(Si=0,g$=$w.length;Si<g$;++Si)vn[Si]=$w[Si],qr[$w.charCodeAt(Si)]=Si;var Si,g$;qr[45]=62;qr[95]=63;function y$(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(y$,"getLens");function OG(e){var t=y$(e),n=t[0],o=t[1];return(n+o)*3/4-o}a(OG,"byteLength");function $G(e,t,n){return(t+n)*3/4-n}a($G,"_byteLength");function CG(e){var t,n=y$(e),o=n[0],r=n[1],i=new DG($G(e,o,r)),s=0,u=r>0?o-4:o,h;for(h=0;h<u;h+=4)t=qr[e.charCodeAt(h)]<<18|qr[e.charCodeAt(h+1)]<<12|qr[e.charCodeAt(h+2)]<<6|qr[e.charCodeAt(h+3)],i[s++]=t>>16&255,i[s++]=t>>8&255,i[s++]=t&255;return r===2&&(t=qr[e.charCodeAt(h)]<<2|qr[e.charCodeAt(h+1)]>>4,i[s++]=t&255),r===1&&(t=qr[e.charCodeAt(h)]<<10|qr[e.charCodeAt(h+1)]<<4|qr[e.charCodeAt(h+2)]>>2,i[s++]=t>>8&255,i[s++]=t&255),i}a(CG,"toByteArray");function NG(e){return vn[e>>18&63]+vn[e>>12&63]+vn[e>>6&63]+vn[e&63]}a(NG,"tripletToBase64");function kG(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(NG(o));return r.join("")}a(kG,"encodeChunk");function zG(e){for(var t,n=e.length,o=n%3,r=[],i=16383,s=0,u=n-o;s<u;s+=i)r.push(kG(e,s,s+i>u?u:s+i));return o===1?(t=e[n-1],r.push(vn[t>>2]+vn[t<<4&63]+"==")):o===2&&(t=(e[n-2]<<8)+e[n-1],r.push(vn[t>>10]+vn[t>>4&63]+vn[t<<2&63]+"=")),r.join("")}a(zG,"fromByteArray")});var Nw=j(Cw=>{"use strict";Object.defineProperty(Cw,"__esModule",{value:!0});Cw.fromArrayBufferToHex=UG;function UG(e){return Array.from(new Uint8Array(e)).map(n=>n.toString(16).padStart(2,"0")).join("")}a(UG,"fromArrayBufferToHex")});var _$=j(am=>{"use strict";Object.defineProperty(am,"__esModule",{value:!0});am.BrowserCrypto=void 0;var Va=v$(),MG=Nw(),kw=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 Va.fromByteArray(new Uint8Array(o))}randomBytesBase64(t){let n=new Uint8Array(t);return window.crypto.getRandomValues(n),Va.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=Va.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 Va.fromByteArray(new Uint8Array(s))}decodeBase64StringUtf8(t){let n=Va.toByteArray(e.padBase64(t));return new TextDecoder().decode(n)}encodeBase64StringUtf8(t){let n=new TextEncoder().encode(t);return Va.fromByteArray(n)}async sha256DigestHex(t){let n=new TextEncoder().encode(t),o=await window.crypto.subtle.digest("SHA-256",n);return(0,MG.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))}};am.BrowserCrypto=kw});var P$=j(sm=>{"use strict";Object.defineProperty(sm,"__esModule",{value:!0});sm.NodeCrypto=void 0;var Ga=require("crypto"),zw=class{static{a(this,"NodeCrypto")}async sha256DigestBase64(t){return Ga.createHash("sha256").update(t).digest("base64")}randomBytesBase64(t){return Ga.randomBytes(t).toString("base64")}async verify(t,n,o){let r=Ga.createVerify("RSA-SHA256");return r.update(n),r.end(),r.verify(t,o,"base64")}async sign(t,n){let o=Ga.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 Ga.createHash("sha256").update(t).digest("hex")}async signWithHmacSha256(t,n){let o=typeof t=="string"?t:LG(t);return FG(Ga.createHmac("sha256",o).update(n).digest())}};sm.NodeCrypto=zw;function FG(e){return e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)}a(FG,"toArrayBuffer");function LG(e){return Buffer.from(e)}a(LG,"toBuffer")});var Fu=j(Kn=>{"use strict";var jG=Kn&&Kn.__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]})),qG=Kn&&Kn.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&jG(t,e,n)};Object.defineProperty(Kn,"__esModule",{value:!0});Kn.createCrypto=GG;Kn.hasBrowserCrypto=w$;var BG=_$(),VG=P$();qG(Nw(),Kn);function GG(){return w$()?new BG.BrowserCrypto:new VG.NodeCrypto}a(GG,"createCrypto");function w$(){return typeof window<"u"&&typeof window.crypto<"u"&&typeof window.crypto.subtle<"u"}a(w$,"hasBrowserCrypto")});var Ha=j((Uw,T$)=>{var cm=require("buffer"),_n=cm.Buffer;function b$(e,t){for(var n in e)t[n]=e[n]}a(b$,"copyProps");_n.from&&_n.alloc&&_n.allocUnsafe&&_n.allocUnsafeSlow?T$.exports=cm:(b$(cm,Uw),Uw.Buffer=xi);function xi(e,t,n){return _n(e,t,n)}a(xi,"SafeBuffer");xi.prototype=Object.create(_n.prototype);b$(_n,xi);xi.from=function(e,t,n){if(typeof e=="number")throw new TypeError("Argument must not be a number");return _n(e,t,n)};xi.alloc=function(e,t,n){if(typeof e!="number")throw new TypeError("Argument must be a number");var o=_n(e);return t!==void 0?typeof n=="string"?o.fill(t,n):o.fill(t):o.fill(0),o};xi.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return _n(e)};xi.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return cm.SlowBuffer(e)}});var S$=j((Hue,E$)=>{"use strict";function Mw(e){var t=(e/8|0)+(e%8===0?0:1);return t}a(Mw,"getParamSize");var HG={ES256:Mw(256),ES384:Mw(384),ES512:Mw(521)};function ZG(e){var t=HG[e];if(t)return t;throw new Error('Unknown algorithm "'+e+'"')}a(ZG,"getParamBytesForAlg");E$.exports=ZG});var Fw=j((Wue,O$)=>{"use strict";var um=Ha().Buffer,I$=S$(),lm=128,A$=0,WG=32,KG=16,JG=2,R$=KG|WG|A$<<6,dm=JG|A$<<6;function XG(e){return e.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}a(XG,"base64Url");function D$(e){if(um.isBuffer(e))return e;if(typeof e=="string")return um.from(e,"base64");throw new TypeError("ECDSA signature must be a Base64 string or a Buffer")}a(D$,"signatureAsBuffer");function YG(e,t){e=D$(e);var n=I$(t),o=n+1,r=e.length,i=0;if(e[i++]!==R$)throw new Error('Could not find expected "seq"');var s=e[i++];if(s===(lm|1)&&(s=e[i++]),r-i<s)throw new Error('"seq" specified length of "'+s+'", only "'+(r-i)+'" remaining');if(e[i++]!==dm)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 h=i;if(i+=u,e[i++]!==dm)throw new Error('Could not find expected "int" for "s"');var g=e[i++];if(r-i!==g)throw new Error('"s" specified length of "'+g+'", expected "'+(r-i)+'"');if(o<g)throw new Error('"s" specified length of "'+g+'", max of "'+o+'" is acceptable');var y=i;if(i+=g,i!==r)throw new Error('Expected to consume entire buffer, but "'+(r-i)+'" bytes remain');var T=n-u,b=n-g,P=um.allocUnsafe(T+u+b+g);for(i=0;i<T;++i)P[i]=0;e.copy(P,i,h+Math.max(-T,0),h+u),i=n;for(var S=i;i<S+b;++i)P[i]=0;return e.copy(P,i,y+Math.max(-b,0),y+g),P=P.toString("base64"),P=XG(P),P}a(YG,"derToJose");function x$(e,t,n){for(var o=0;t+o<n&&e[t+o]===0;)++o;var r=e[t+o]>=lm;return r&&--o,o}a(x$,"countPadding");function QG(e,t){e=D$(e);var n=I$(t),o=e.length;if(o!==n*2)throw new TypeError('"'+t+'" signatures must be "'+n*2+'" bytes, saw "'+o+'"');var r=x$(e,0,n),i=x$(e,n,e.length),s=n-r,u=n-i,h=2+s+1+1+u,g=h<lm,y=um.allocUnsafe((g?2:3)+h),T=0;return y[T++]=R$,g?y[T++]=h:(y[T++]=lm|1,y[T++]=h&255),y[T++]=dm,y[T++]=s,r<0?(y[T++]=0,T+=e.copy(y,T,0,n)):T+=e.copy(y,T,r,n),y[T++]=dm,y[T++]=u,i<0?(y[T++]=0,e.copy(y,T,n)):e.copy(y,T,n+i),y}a(QG,"joseToDer");O$.exports={derToJose:YG,joseToDer:QG}});var an=j(Jn=>{"use strict";Object.defineProperty(Jn,"__esModule",{value:!0});Jn.LRUCache=void 0;Jn.snakeToCamel=C$;Jn.originalOrCamelOptions=nH;Jn.removeUndefinedValuesInObject=oH;Jn.isValidFile=iH;Jn.getWellKnownCertificateConfigFileLocation=aH;var eH=require("fs"),tH=require("os"),Lw=require("path"),rH="certificate_config.json",$$="gcloud";function C$(e){return e.replace(/([_][^_])/g,t=>t.slice(1).toUpperCase())}a(C$,"snakeToCamel");function nH(e){function t(n){let o=e||{};return o[n]??o[C$(n)]}return a(t,"get"),{get:t}}a(nH,"originalOrCamelOptions");var jw=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()}};Jn.LRUCache=jw;function oH(e){return Object.entries(e).forEach(([t,n])=>{(n===void 0||n==="undefined")&&delete e[t]}),e}a(oH,"removeUndefinedValuesInObject");async function iH(e){try{return(await eH.promises.lstat(e)).isFile()}catch{return!1}}a(iH,"isValidFile");function aH(){let e=process.env.CLOUDSDK_CONFIG||(sH()?Lw.join(process.env.APPDATA||"",$$):Lw.join(process.env.HOME||"",".config",$$));return Lw.join(e,rH)}a(aH,"getWellKnownCertificateConfigFileLocation");function sH(){return tH.platform().startsWith("win")}a(sH,"_isWindows")});var N$=j((Yue,cH)=>{cH.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 qw=j(ko=>{"use strict";Object.defineProperty(ko,"__esModule",{value:!0});ko.USER_AGENT=ko.PRODUCT_NAME=ko.pkg=void 0;var k$=N$();ko.pkg=k$;var z$="google-api-nodejs-client";ko.PRODUCT_NAME=z$;var uH=`${z$}/${k$.version}`;ko.USER_AGENT=uH});var Ir=j(sn=>{"use strict";Object.defineProperty(sn,"__esModule",{value:!0});sn.AuthClient=sn.DEFAULT_EAGER_REFRESH_THRESHOLD_MILLIS=sn.DEFAULT_UNIVERSE=void 0;var lH=require("events"),Bw=St(),dH=an(),pH=Aw(),Vw=qw();sn.DEFAULT_UNIVERSE="googleapis.com";sn.DEFAULT_EAGER_REFRESH_THRESHOLD_MILLIS=300*1e3;var Gw=class e extends lH.EventEmitter{static{a(this,"AuthClient")}apiKey;projectId;quotaProjectId;transporter;credentials={};eagerRefreshThresholdMillis=sn.DEFAULT_EAGER_REFRESH_THRESHOLD_MILLIS;forceRefreshOnFailure=!1;universeDomain=sn.DEFAULT_UNIVERSE;static RequestMethodNameSymbol=Symbol("request method name");static RequestLogIdSymbol=Symbol("request log id");constructor(t={}){super();let n=(0,dH.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")??sn.DEFAULT_UNIVERSE,this.transporter=t.transporter??new Bw.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&&Bw.Gaxios.mergeHeaders(i,n.headers),o&&Bw.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,pH.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(`${Vw.PRODUCT_NAME}/`)||t.headers.set("User-Agent",`${n} ${Vw.USER_AGENT}`):t.headers.set("User-Agent",Vw.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"]}}}};sn.AuthClient=Gw});var Zw=j(pm=>{"use strict";Object.defineProperty(pm,"__esModule",{value:!0});pm.LoginTicket=void 0;var Hw=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()}}};pm.LoginTicket=Hw});var Ii=j(Pn=>{"use strict";Object.defineProperty(Pn,"__esModule",{value:!0});Pn.OAuth2Client=Pn.ClientAuthentication=Pn.CertificateFormat=Pn.CodeChallengeMethod=void 0;var U$=St(),fH=require("querystring"),mH=require("stream"),hH=Fw(),M$=an(),Ww=Fu(),Za=Ir(),gH=Zw(),F$;(function(e){e.Plain="plain",e.S256="S256"})(F$||(Pn.CodeChallengeMethod=F$={}));var Xn;(function(e){e.PEM="PEM",e.JWK="JWK"})(Xn||(Pn.CertificateFormat=Xn={}));var Lu;(function(e){e.ClientSecretPost="ClientSecretPost",e.ClientSecretBasic="ClientSecretBasic",e.None="None"})(Lu||(Pn.ClientAuthentication=Lu={}));var Kw=class e extends Za.AuthClient{static{a(this,"OAuth2Client")}redirectUri;certificateCache={};certificateExpiry=null;certificateCacheFormat=Xn.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||Lu.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()+"?"+fH.stringify(t)}generateCodeVerifier(){throw new Error("generateCodeVerifier is removed, please use generateCodeVerifierAsync instead.")}async generateCodeVerifierAsync(){let t=(0,Ww.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===Lu.ClientSecretBasic){let h=Buffer.from(`${this._clientId}:${this._clientSecret}`);o.set("authorization",`Basic ${h.toString("base64")}`)}this.clientAuthentication===Lu.ClientSecretPost&&(r.client_secret=this._clientSecret);let i={...e.RETRY_CONFIG,method:"POST",url:n,data:new URLSearchParams((0,M$.removeUndefinedValuesInObject)(r)),headers:o};Za.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,M$.removeUndefinedValuesInObject)(o))};Za.AuthClient.setMethodName(s,"refreshTokenNoCache"),r=await this.transporter.request(s)}catch(s){throw s instanceof U$.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 h=new Headers({authorization:"Bearer "+this.credentials.access_token});return{headers:this.addSharedMetadataHeaders(h)}}}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 h=u;throw h.response&&(h.response.status===403||h.response.status===404)&&(h.message=`Could not refresh access token: ${h.message}`),h}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(Za.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=U$.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,h=r.config.data instanceof mH.Readable,g=i===401||i===403;if(!n&&g&&!h&&s)return await this.refreshAccessTokenAsync(),this.requestAsync(t,!0);if(!n&&g&&!h&&u){let y=await this.processAndValidateRefreshHandler();return y?.access_token&&this.setCredentials(y),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,Ww.hasBrowserCrypto)()?Xn.JWK:Xn.PEM;if(this.certificateExpiry&&t<this.certificateExpiry.getTime()&&this.certificateCacheFormat===n)return{certs:this.certificateCache,format:n};let o,r;switch(n){case Xn.PEM:r=this.endpoints.oauth2FederatedSignonPemCertsUrl.toString();break;case Xn.JWK:r=this.endpoints.oauth2FederatedSignonJwkCertsUrl.toString();break;default:throw new Error(`Unsupported certificate format ${n}`)}try{let g={...e.RETRY_CONFIG,url:r};Za.AuthClient.setMethodName(g,"getFederatedSignonCertsAsync"),o=await this.transporter.request(g)}catch(g){throw g instanceof Error&&(g.message=`Failed to retrieve verification certificates: ${g.message}`),g}let i=o?.headers.get("cache-control"),s=-1;if(i){let g=/max-age=(?<maxAge>[0-9]+)/.exec(i)?.groups?.maxAge;g&&(s=Number(g)*1e3)}let u={};switch(n){case Xn.PEM:u=o.data;break;case Xn.JWK:for(let g of o.data.keys)u[g.kid]=g;break;default:throw new Error(`Unsupported certificate format ${n}`)}let h=new Date;return this.certificateExpiry=s===-1?null:new Date(h.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};Za.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,Ww.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 h=u[0]+"."+u[1],g=u[2],y,T;try{y=JSON.parse(s.decodeBase64StringUtf8(u[0]))}catch(d){throw d instanceof Error&&(d.message=`Can't parse token envelope: ${u[0]}': ${d.message}`),d}if(!y)throw new Error("Can't parse token envelope: "+u[0]);try{T=JSON.parse(s.decodeBase64StringUtf8(u[1]))}catch(d){throw d instanceof Error&&(d.message=`Can't parse token payload '${u[0]}`),d}if(!T)throw new Error("Can't parse token payload: "+u[1]);if(!Object.prototype.hasOwnProperty.call(n,y.kid))throw new Error("No pem found for envelope: "+JSON.stringify(y));let b=n[y.kid];if(y.alg==="ES256"&&(g=hH.joseToDer(g,"ES256").toString("base64")),!await s.verify(b,h,g))throw new Error("Invalid token signature: "+t);if(!T.iat)throw new Error("No issue time in token: "+JSON.stringify(T));if(!T.exp)throw new Error("No expiration time in token: "+JSON.stringify(T));let S=Number(T.iat);if(isNaN(S))throw new Error("iat field using invalid format");let R=Number(T.exp);if(isNaN(R))throw new Error("exp field using invalid format");let I=new Date().getTime()/1e3;if(R>=I+i)throw new Error("Expiration time too far in future: "+JSON.stringify(T));let l=S-e.CLOCK_SKEW_SECS_,m=R+e.CLOCK_SKEW_SECS_;if(I<l)throw new Error("Token used too early, "+I+" < "+l+": "+JSON.stringify(T));if(I>m)throw new Error("Token used too late, "+I+" > "+m+": "+JSON.stringify(T));if(r&&r.indexOf(T.iss)<0)throw new Error("Invalid issuer, expected one of ["+r+"], but got "+T.iss);if(typeof o<"u"&&o!==null){let d=T.aud,v=!1;if(o.constructor===Array?v=o.indexOf(d)>-1:v=d===o,!v)throw new Error("Wrong recipient, payload audience != requiredAudience")}return new gH.LoginTicket(y,T)}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}};Pn.OAuth2Client=Kw});var Xw=j(fm=>{"use strict";Object.defineProperty(fm,"__esModule",{value:!0});fm.Compute=void 0;var yH=St(),L$=Mu(),vH=Ii(),Jw=class extends vH.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 L$.instance(r)}catch(r){throw r instanceof yH.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 L$.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))}};fm.Compute=Jw});var Qw=j(mm=>{"use strict";Object.defineProperty(mm,"__esModule",{value:!0});mm.IdTokenClient=void 0;var _H=Ii(),Yw=class extends _H.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}};mm.IdTokenClient=Yw});var eb=j(Wa=>{"use strict";Object.defineProperty(Wa,"__esModule",{value:!0});Wa.GCPEnv=void 0;Wa.clear=PH;Wa.getEnv=wH;var j$=Mu(),wn;(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"})(wn||(Wa.GCPEnv=wn={}));var ju;function PH(){ju=void 0}a(PH,"clear");async function wH(){return ju||(ju=bH(),ju)}a(wH,"getEnv");async function bH(){let e=wn.NONE;return TH()?e=wn.APP_ENGINE:EH()?e=wn.CLOUD_FUNCTIONS:await AH()?await IH()?e=wn.KUBERNETES_ENGINE:SH()?e=wn.CLOUD_RUN:xH()?e=wn.CLOUD_RUN_JOBS:e=wn.COMPUTE_ENGINE:e=wn.NONE,e}a(bH,"getEnvMemoized");function TH(){return!!(process.env.GAE_SERVICE||process.env.GAE_MODULE_NAME)}a(TH,"isAppEngine");function EH(){return!!(process.env.FUNCTION_NAME||process.env.FUNCTION_TARGET)}a(EH,"isCloudFunction");function SH(){return!!process.env.K_CONFIGURATION}a(SH,"isCloudRun");function xH(){return!!process.env.CLOUD_RUN_JOB}a(xH,"isCloudRunJob");async function IH(){try{return await j$.instance("attributes/cluster-name"),!0}catch{return!1}}a(IH,"isKubernetesEngine");async function AH(){return j$.isAvailable()}a(AH,"isComputeEngine")});var tb=j((ple,q$)=>{var hm=Ha().Buffer,RH=require("stream"),DH=require("util");function gm(e){if(this.buffer=null,this.writable=!0,this.readable=!0,!e)return this.buffer=hm.alloc(0),this;if(typeof e.pipe=="function")return this.buffer=hm.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(gm,"DataStream");DH.inherits(gm,RH);gm.prototype.write=a(function(t){this.buffer=hm.concat([this.buffer,hm.from(t)]),this.emit("data",t)},"write");gm.prototype.end=a(function(t){t&&this.write(t),this.emit("end",t),this.emit("close"),this.writable=!1,this.readable=!1},"end");q$.exports=gm});var V$=j((mle,B$)=>{"use strict";var qu=require("buffer").Buffer,rb=require("buffer").SlowBuffer;B$.exports=ym;function ym(e,t){if(!qu.isBuffer(e)||!qu.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(ym,"bufferEq");ym.install=function(){qu.prototype.equal=rb.prototype.equal=a(function(t){return ym(this,t)},"equal")};var OH=qu.prototype.equal,$H=rb.prototype.equal;ym.restore=function(){qu.prototype.equal=OH,rb.prototype.equal=$H}});var ab=j((gle,Q$)=>{var Ja=Ha().Buffer,Br=require("crypto"),H$=Fw(),G$=require("util"),CH=`"%s" is not a valid algorithm.
37
+ `+R+"}":"{"+I.join(",")+"}",o=R,P}}a(h,"str"),typeof ZO.stringify!="function"&&(ZO.stringify=function(g,y,T){var b;if(o="",r="",typeof T=="number")for(b=0;b<T;b+=1)r+=" ";else typeof T=="string"&&(r=T);if(s=y,y&&typeof y!="function"&&(typeof y!="object"||typeof y.length!="number"))throw new Error("JSON.stringify");return h("",{"":g})})})()});var XO=j((Eue,JO)=>{var tm=null,nG=/(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])/,oG=/(?: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)/,iG=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(R){throw{name:"SyntaxError",message:R,at:n,text:i}},"error"),u=a(function(R){return R&&R!==o&&s("Expected '"+R+"' instead of '"+o+"'"),o=i.charAt(n),n+=1,o},"next"),h=a(function(){var R,I="";for(o==="-"&&(I="-",u("-"));o>="0"&&o<="9";)I+=o,u();if(o===".")for(I+=".";u()&&o>="0"&&o<="9";)I+=o;if(o==="e"||o==="E")for(I+=o,u(),(o==="-"||o==="+")&&(I+=o,u());o>="0"&&o<="9";)I+=o,u();if(R=+I,!isFinite(R))s("Bad number");else return tm==null&&(tm=ww()),I.length>15?t.storeAsString?I:t.useNativeBigInt?BigInt(I):new tm(I):t.alwaysParseAsBig?t.useNativeBigInt?BigInt(R):new tm(R):R},"number"),g=a(function(){var R,I,l="",m;if(o==='"')for(var d=n;u();){if(o==='"')return n-1>d&&(l+=i.substring(d,n-1)),u(),l;if(o==="\\"){if(n-1>d&&(l+=i.substring(d,n-1)),u(),o==="u"){for(m=0,I=0;I<4&&(R=parseInt(u(),16),!!isFinite(R));I+=1)m=m*16+R;l+=String.fromCharCode(m)}else if(typeof r[o]=="string")l+=r[o];else break;d=n}}s("Bad string")},"string"),y=a(function(){for(;o&&o<=" ";)u()},"white"),T=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"),b,P=a(function(){var R=[];if(o==="["){if(u("["),y(),o==="]")return u("]"),R;for(;o;){if(R.push(b()),y(),o==="]")return u("]"),R;u(","),y()}}s("Bad array")},"array"),S=a(function(){var R,I=Object.create(null);if(o==="{"){if(u("{"),y(),o==="}")return u("}"),I;for(;o;){if(R=g(),y(),u(":"),t.strict===!0&&Object.hasOwnProperty.call(I,R)&&s('Duplicate key "'+R+'"'),nG.test(R)===!0?t.protoAction==="error"?s("Object contains forbidden prototype property"):t.protoAction==="ignore"?b():I[R]=b():oG.test(R)===!0?t.constructorAction==="error"?s("Object contains forbidden constructor property"):t.constructorAction==="ignore"?b():I[R]=b():I[R]=b(),y(),o==="}")return u("}"),I;u(","),y()}}s("Bad object")},"object");return b=a(function(){switch(y(),o){case"{":return S();case"[":return P();case'"':return g();case"-":return h();default:return o>="0"&&o<="9"?h():T()}},"value"),function(R,I){var l;return i=R+"",n=0,o=" ",l=b(),y(),o&&s("Syntax error"),typeof I=="function"?a((function m(d,v){var p,E,_=d[v];return _&&typeof _=="object"&&Object.keys(_).forEach(function(pe){E=m(_,pe),E!==void 0?_[pe]=E:delete _[pe]}),I.call(d,v,_)}),"walk")({"":l},""):l}},"json_parse");JO.exports=iG});var e$=j((xue,rm)=>{var YO=KO().stringify,QO=XO();rm.exports=function(e){return{parse:QO(e),stringify:YO}};rm.exports.parse=QO();rm.exports.stringify=YO});var bw=j(nn=>{"use strict";Object.defineProperty(nn,"__esModule",{value:!0});nn.GCE_LINUX_BIOS_PATHS=void 0;nn.isGoogleCloudServerless=n$;nn.isGoogleComputeEngineLinux=o$;nn.isGoogleComputeEngineMACAddress=i$;nn.isGoogleComputeEngine=a$;nn.detectGCPResidency=sG;var t$=require("fs"),r$=require("os");nn.GCE_LINUX_BIOS_PATHS={BIOS_DATE:"/sys/class/dmi/id/bios_date",BIOS_VENDOR:"/sys/class/dmi/id/bios_vendor"};var aG=/^42:01/;function n$(){return!!(process.env.CLOUD_RUN_JOB||process.env.FUNCTION_NAME||process.env.K_SERVICE)}a(n$,"isGoogleCloudServerless");function o$(){if((0,r$.platform)()!=="linux")return!1;try{(0,t$.statSync)(nn.GCE_LINUX_BIOS_PATHS.BIOS_DATE);let e=(0,t$.readFileSync)(nn.GCE_LINUX_BIOS_PATHS.BIOS_VENDOR,"utf8");return/Google/.test(e)}catch{return!1}}a(o$,"isGoogleComputeEngineLinux");function i$(){let e=(0,r$.networkInterfaces)();for(let t of Object.values(e))if(t){for(let{mac:n}of t)if(aG.test(n))return!0}return!1}a(i$,"isGoogleComputeEngineMACAddress");function a$(){return o$()||i$()}a(a$,"isGoogleComputeEngine");function sG(){return n$()||a$()}a(sG,"detectGCPResidency")});var s$=j(nm=>{"use strict";Object.defineProperty(nm,"__esModule",{value:!0});nm.Colours=void 0;var Ht=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="")}};nm.Colours=Ht;Ht.enabled=!1;Ht.reset="";Ht.bright="";Ht.dim="";Ht.red="";Ht.green="";Ht.yellow="";Ht.blue="";Ht.magenta="";Ht.cyan="";Ht.white="";Ht.grey="";Ht.refresh()});var d$=j(ct=>{"use strict";var cG=ct&&ct.__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]})),uG=ct&&ct.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),c$=ct&&ct.__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"&&cG(n,t,o[r]);return uG(n,t),n}})();Object.defineProperty(ct,"__esModule",{value:!0});ct.env=ct.DebugLogBackendBase=ct.placeholder=ct.AdhocDebugLogger=ct.LogSeverity=void 0;ct.getNodeBackend=Ew;ct.getDebugBackend=dG;ct.getStructuredBackend=pG;ct.setBackend=fG;ct.log=l$;var lG=require("events"),ku=c$(require("process")),u$=c$(require("util")),Sr=s$(),on;(function(e){e.DEFAULT="DEFAULT",e.DEBUG="DEBUG",e.INFO="INFO",e.WARNING="WARNING",e.ERROR="ERROR"})(on||(ct.LogSeverity=on={}));var zu=class extends lG.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(on.DEBUG,...o),this.func.info=(...o)=>this.invokeSeverity(on.INFO,...o),this.func.warn=(...o)=>this.invokeSeverity(on.WARNING,...o),this.func.error=(...o)=>this.invokeSeverity(on.ERROR,...o),this.func.sublog=o=>l$(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)}};ct.AdhocDebugLogger=zu;ct.placeholder=new zu("",()=>{}).func;var Ba=class{static{a(this,"DebugLogBackendBase")}constructor(){var t;this.cached=new Map,this.filters=[],this.filtersSet=!1;let n=(t=ku.env[ct.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)}}};ct.DebugLogBackendBase=Ba;var Tw=class extends Ba{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=`${Sr.Colours.green}${t}${Sr.Colours.reset}`,s=`${Sr.Colours.yellow}${ku.pid}${Sr.Colours.reset}`,u;switch(n.severity){case on.ERROR:u=`${Sr.Colours.red}${n.severity}${Sr.Colours.reset}`;break;case on.INFO:u=`${Sr.Colours.magenta}${n.severity}${Sr.Colours.reset}`;break;case on.WARNING:u=`${Sr.Colours.yellow}${n.severity}${Sr.Colours.reset}`;break;default:u=(r=n.severity)!==null&&r!==void 0?r:on.DEFAULT;break}let h=u$.formatWithOptions({colors:Sr.Colours.enabled},...o),g=Object.assign({},n);delete g.severity;let y=Object.getOwnPropertyNames(g).length?JSON.stringify(g):"",T=y?`${Sr.Colours.grey}${y}${Sr.Colours.reset}`:"";console.error("%s [%s|%s] %s%s",s,i,u,h,y?` ${T}`:"")}:()=>{}}setFilters(){let n=this.filters.join(",").replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^");this.enabledRegexp=new RegExp(`^${n}$`,"i")}};function Ew(){return new Tw}a(Ew,"getNodeBackend");var Sw=class extends Ba{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=ku.env.NODE_DEBUG)!==null&&t!==void 0?t:"";ku.env.NODE_DEBUG=`${n}${n?",":""}${this.filters.join(",")}`}};function dG(e){return new Sw(e)}a(dG,"getDebugBackend");var xw=class extends Ba{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:on.INFO,h=Object.assign({severity:u,message:u$.format(...i)},r),g=JSON.stringify(h);o?o(r,g):console.log("%s",g)}}setFilters(){var t;(t=this.upstream)===null||t===void 0||t.setFilters()}};function pG(e){return new xw(e)}a(pG,"getStructuredBackend");ct.env={nodeEnables:"GOOGLE_SDK_NODE_LOGGING"};var Iw=new Map,xr;function fG(e){xr=e,Iw.clear()}a(fG,"setBackend");function l$(e,t){if(!xr&&!ku.env[ct.env.nodeEnables]||!e)return ct.placeholder;t&&(e=`${t.instance.namespace}:${e}`);let n=Iw.get(e);if(n)return n.func;if(xr===null)return ct.placeholder;xr===void 0&&(xr=Ew());let o=(()=>{let r;return new zu(e,(s,...u)=>{if(r!==xr){if(xr===null)return;xr===void 0&&(xr=Ew()),r=xr}xr?.log(e,s,...u)})})();return Iw.set(e,o),o.func}a(l$,"log")});var Aw=j(Ei=>{"use strict";var mG=Ei&&Ei.__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]})),hG=Ei&&Ei.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&mG(t,e,n)};Object.defineProperty(Ei,"__esModule",{value:!0});hG(d$(),Ei)});var Mu=j(Ie=>{"use strict";var f$=Ie&&Ie.__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]})),gG=Ie&&Ie.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),yG=Ie&&Ie.__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"&&f$(n,t,o[r]);return gG(n,t),n}})(),vG=Ie&&Ie.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&f$(t,e,n)};Object.defineProperty(Ie,"__esModule",{value:!0});Ie.gcpResidencyCache=Ie.METADATA_SERVER_DETECTION=Ie.HEADERS=Ie.HEADER_VALUE=Ie.HEADER_NAME=Ie.SECONDARY_HOST_ADDRESS=Ie.HOST_ADDRESS=Ie.BASE_PATH=void 0;Ie.instance=EG;Ie.project=SG;Ie.universe=xG;Ie.bulk=IG;Ie.isAvailable=RG;Ie.resetIsAvailableCache=DG;Ie.getGCPResidency=Ow;Ie.setGCPResidency=m$;Ie.requestTimeout=h$;var Rw=St(),_G=e$(),PG=bw(),wG=yG(Aw());Ie.BASE_PATH="/computeMetadata/v1";Ie.HOST_ADDRESS="http://169.254.169.254";Ie.SECONDARY_HOST_ADDRESS="http://metadata.google.internal.";Ie.HEADER_NAME="Metadata-Flavor";Ie.HEADER_VALUE="Google";Ie.HEADERS=Object.freeze({[Ie.HEADER_NAME]:Ie.HEADER_VALUE});var p$=wG.log("gcp-metadata");Ie.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 Dw(e){return e||(e=process.env.GCE_METADATA_IP||process.env.GCE_METADATA_HOST||Ie.HOST_ADDRESS),/^https?:\/\//.test(e)||(e=`http://${e}`),new URL(Ie.BASE_PATH,e).href}a(Dw,"getBaseUrl");function bG(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(bG,"validate");async function Uu(e,t={},n=3,o=!1){let r=new Headers(Ie.HEADERS),i="",s={};if(typeof e=="object"){let T=e;new Headers(T.headers).forEach((b,P)=>r.set(P,b)),i=T.metadataKey,s=T.params||s,n=T.noResponseRetries||n,o=T.fastFail||o}else i=e;typeof t=="string"?i+=`/${t}`:(bG(t),t.property&&(i+=`/${t.property}`),new Headers(t.headers).forEach((T,b)=>r.set(b,T)),s=t.params||s);let u=o?TG:Rw.request,h={url:`${Dw()}/${i}`,headers:r,retryConfig:{noResponseRetries:n},params:s,responseType:"text",timeout:h$()};p$.info("instance request %j",h);let g=await u(h);p$.info("instance metadata is %s",g.data);let y=g.headers.get(Ie.HEADER_NAME);if(y!==Ie.HEADER_VALUE)throw new RangeError(`Invalid response from metadata service: incorrect ${Ie.HEADER_NAME} header. Expected '${Ie.HEADER_VALUE}', got ${y?`'${y}'`:"no header"}`);if(typeof g.data=="string")try{return _G.parse(g.data)}catch{}return g.data}a(Uu,"metadataAccessor");async function TG(e){let t={...e,url:e.url?.toString().replace(Dw(),Dw(Ie.SECONDARY_HOST_ADDRESS))},n=(0,Rw.request)(e),o=(0,Rw.request)(t);return Promise.any([n,o])}a(TG,"fastFailMetadataRequest");function EG(e){return Uu("instance",e)}a(EG,"instance");function SG(e){return Uu("project",e)}a(SG,"project");function xG(e){return Uu("universe",e)}a(xG,"universe");async function IG(e){let t={};return await Promise.all(e.map(n=>(async()=>{let o=await Uu(n),r=n.metadataKey;t[r]=o})())),t}a(IG,"bulk");function AG(){return process.env.DETECT_GCP_RETRIES?Number(process.env.DETECT_GCP_RETRIES):0}a(AG,"detectGCPAvailableRetries");var om;async function RG(){if(process.env.METADATA_SERVER_DETECTION){let e=process.env.METADATA_SERVER_DETECTION.trim().toLocaleLowerCase();if(!(e in Ie.METADATA_SERVER_DETECTION))throw new RangeError(`Unknown \`METADATA_SERVER_DETECTION\` env variable. Got \`${e}\`, but it should be \`${Object.keys(Ie.METADATA_SERVER_DETECTION).join("`, `")}\`, or unset`);switch(e){case"assume-present":return!0;case"none":return!1;case"bios-only":return Ow();case"ping-only":}}try{return om===void 0&&(om=Uu("instance",void 0,AG(),!(process.env.GCE_METADATA_IP||process.env.GCE_METADATA_HOST))),await om,!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(RG,"isAvailable");function DG(){om=void 0}a(DG,"resetIsAvailableCache");Ie.gcpResidencyCache=null;function Ow(){return Ie.gcpResidencyCache===null&&m$(),Ie.gcpResidencyCache}a(Ow,"getGCPResidency");function m$(e=null){Ie.gcpResidencyCache=e!==null?e:(0,PG.detectGCPResidency)()}a(m$,"setGCPResidency");function h$(){return Ow()?0:3e3}a(h$,"requestTimeout");vG(bw(),Ie)});var v$=j(im=>{"use strict";im.byteLength=$G;im.toByteArray=NG;im.fromByteArray=UG;var vn=[],qr=[],OG=typeof Uint8Array<"u"?Uint8Array:Array,$w="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(Si=0,g$=$w.length;Si<g$;++Si)vn[Si]=$w[Si],qr[$w.charCodeAt(Si)]=Si;var Si,g$;qr[45]=62;qr[95]=63;function y$(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(y$,"getLens");function $G(e){var t=y$(e),n=t[0],o=t[1];return(n+o)*3/4-o}a($G,"byteLength");function CG(e,t,n){return(t+n)*3/4-n}a(CG,"_byteLength");function NG(e){var t,n=y$(e),o=n[0],r=n[1],i=new OG(CG(e,o,r)),s=0,u=r>0?o-4:o,h;for(h=0;h<u;h+=4)t=qr[e.charCodeAt(h)]<<18|qr[e.charCodeAt(h+1)]<<12|qr[e.charCodeAt(h+2)]<<6|qr[e.charCodeAt(h+3)],i[s++]=t>>16&255,i[s++]=t>>8&255,i[s++]=t&255;return r===2&&(t=qr[e.charCodeAt(h)]<<2|qr[e.charCodeAt(h+1)]>>4,i[s++]=t&255),r===1&&(t=qr[e.charCodeAt(h)]<<10|qr[e.charCodeAt(h+1)]<<4|qr[e.charCodeAt(h+2)]>>2,i[s++]=t>>8&255,i[s++]=t&255),i}a(NG,"toByteArray");function kG(e){return vn[e>>18&63]+vn[e>>12&63]+vn[e>>6&63]+vn[e&63]}a(kG,"tripletToBase64");function zG(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(kG(o));return r.join("")}a(zG,"encodeChunk");function UG(e){for(var t,n=e.length,o=n%3,r=[],i=16383,s=0,u=n-o;s<u;s+=i)r.push(zG(e,s,s+i>u?u:s+i));return o===1?(t=e[n-1],r.push(vn[t>>2]+vn[t<<4&63]+"==")):o===2&&(t=(e[n-2]<<8)+e[n-1],r.push(vn[t>>10]+vn[t>>4&63]+vn[t<<2&63]+"=")),r.join("")}a(UG,"fromByteArray")});var Nw=j(Cw=>{"use strict";Object.defineProperty(Cw,"__esModule",{value:!0});Cw.fromArrayBufferToHex=MG;function MG(e){return Array.from(new Uint8Array(e)).map(n=>n.toString(16).padStart(2,"0")).join("")}a(MG,"fromArrayBufferToHex")});var _$=j(am=>{"use strict";Object.defineProperty(am,"__esModule",{value:!0});am.BrowserCrypto=void 0;var Va=v$(),FG=Nw(),kw=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 Va.fromByteArray(new Uint8Array(o))}randomBytesBase64(t){let n=new Uint8Array(t);return window.crypto.getRandomValues(n),Va.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=Va.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 Va.fromByteArray(new Uint8Array(s))}decodeBase64StringUtf8(t){let n=Va.toByteArray(e.padBase64(t));return new TextDecoder().decode(n)}encodeBase64StringUtf8(t){let n=new TextEncoder().encode(t);return Va.fromByteArray(n)}async sha256DigestHex(t){let n=new TextEncoder().encode(t),o=await window.crypto.subtle.digest("SHA-256",n);return(0,FG.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))}};am.BrowserCrypto=kw});var P$=j(sm=>{"use strict";Object.defineProperty(sm,"__esModule",{value:!0});sm.NodeCrypto=void 0;var Ga=require("crypto"),zw=class{static{a(this,"NodeCrypto")}async sha256DigestBase64(t){return Ga.createHash("sha256").update(t).digest("base64")}randomBytesBase64(t){return Ga.randomBytes(t).toString("base64")}async verify(t,n,o){let r=Ga.createVerify("RSA-SHA256");return r.update(n),r.end(),r.verify(t,o,"base64")}async sign(t,n){let o=Ga.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 Ga.createHash("sha256").update(t).digest("hex")}async signWithHmacSha256(t,n){let o=typeof t=="string"?t:jG(t);return LG(Ga.createHmac("sha256",o).update(n).digest())}};sm.NodeCrypto=zw;function LG(e){return e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)}a(LG,"toArrayBuffer");function jG(e){return Buffer.from(e)}a(jG,"toBuffer")});var Fu=j(Kn=>{"use strict";var qG=Kn&&Kn.__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]})),BG=Kn&&Kn.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&qG(t,e,n)};Object.defineProperty(Kn,"__esModule",{value:!0});Kn.createCrypto=HG;Kn.hasBrowserCrypto=w$;var VG=_$(),GG=P$();BG(Nw(),Kn);function HG(){return w$()?new VG.BrowserCrypto:new GG.NodeCrypto}a(HG,"createCrypto");function w$(){return typeof window<"u"&&typeof window.crypto<"u"&&typeof window.crypto.subtle<"u"}a(w$,"hasBrowserCrypto")});var Ha=j((Uw,T$)=>{var cm=require("buffer"),_n=cm.Buffer;function b$(e,t){for(var n in e)t[n]=e[n]}a(b$,"copyProps");_n.from&&_n.alloc&&_n.allocUnsafe&&_n.allocUnsafeSlow?T$.exports=cm:(b$(cm,Uw),Uw.Buffer=xi);function xi(e,t,n){return _n(e,t,n)}a(xi,"SafeBuffer");xi.prototype=Object.create(_n.prototype);b$(_n,xi);xi.from=function(e,t,n){if(typeof e=="number")throw new TypeError("Argument must not be a number");return _n(e,t,n)};xi.alloc=function(e,t,n){if(typeof e!="number")throw new TypeError("Argument must be a number");var o=_n(e);return t!==void 0?typeof n=="string"?o.fill(t,n):o.fill(t):o.fill(0),o};xi.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return _n(e)};xi.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return cm.SlowBuffer(e)}});var S$=j((Wue,E$)=>{"use strict";function Mw(e){var t=(e/8|0)+(e%8===0?0:1);return t}a(Mw,"getParamSize");var ZG={ES256:Mw(256),ES384:Mw(384),ES512:Mw(521)};function WG(e){var t=ZG[e];if(t)return t;throw new Error('Unknown algorithm "'+e+'"')}a(WG,"getParamBytesForAlg");E$.exports=WG});var Fw=j((Jue,O$)=>{"use strict";var um=Ha().Buffer,I$=S$(),lm=128,A$=0,KG=32,JG=16,XG=2,R$=JG|KG|A$<<6,dm=XG|A$<<6;function YG(e){return e.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}a(YG,"base64Url");function D$(e){if(um.isBuffer(e))return e;if(typeof e=="string")return um.from(e,"base64");throw new TypeError("ECDSA signature must be a Base64 string or a Buffer")}a(D$,"signatureAsBuffer");function QG(e,t){e=D$(e);var n=I$(t),o=n+1,r=e.length,i=0;if(e[i++]!==R$)throw new Error('Could not find expected "seq"');var s=e[i++];if(s===(lm|1)&&(s=e[i++]),r-i<s)throw new Error('"seq" specified length of "'+s+'", only "'+(r-i)+'" remaining');if(e[i++]!==dm)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 h=i;if(i+=u,e[i++]!==dm)throw new Error('Could not find expected "int" for "s"');var g=e[i++];if(r-i!==g)throw new Error('"s" specified length of "'+g+'", expected "'+(r-i)+'"');if(o<g)throw new Error('"s" specified length of "'+g+'", max of "'+o+'" is acceptable');var y=i;if(i+=g,i!==r)throw new Error('Expected to consume entire buffer, but "'+(r-i)+'" bytes remain');var T=n-u,b=n-g,P=um.allocUnsafe(T+u+b+g);for(i=0;i<T;++i)P[i]=0;e.copy(P,i,h+Math.max(-T,0),h+u),i=n;for(var S=i;i<S+b;++i)P[i]=0;return e.copy(P,i,y+Math.max(-b,0),y+g),P=P.toString("base64"),P=YG(P),P}a(QG,"derToJose");function x$(e,t,n){for(var o=0;t+o<n&&e[t+o]===0;)++o;var r=e[t+o]>=lm;return r&&--o,o}a(x$,"countPadding");function eH(e,t){e=D$(e);var n=I$(t),o=e.length;if(o!==n*2)throw new TypeError('"'+t+'" signatures must be "'+n*2+'" bytes, saw "'+o+'"');var r=x$(e,0,n),i=x$(e,n,e.length),s=n-r,u=n-i,h=2+s+1+1+u,g=h<lm,y=um.allocUnsafe((g?2:3)+h),T=0;return y[T++]=R$,g?y[T++]=h:(y[T++]=lm|1,y[T++]=h&255),y[T++]=dm,y[T++]=s,r<0?(y[T++]=0,T+=e.copy(y,T,0,n)):T+=e.copy(y,T,r,n),y[T++]=dm,y[T++]=u,i<0?(y[T++]=0,e.copy(y,T,n)):e.copy(y,T,n+i),y}a(eH,"joseToDer");O$.exports={derToJose:QG,joseToDer:eH}});var an=j(Jn=>{"use strict";Object.defineProperty(Jn,"__esModule",{value:!0});Jn.LRUCache=void 0;Jn.snakeToCamel=C$;Jn.originalOrCamelOptions=oH;Jn.removeUndefinedValuesInObject=iH;Jn.isValidFile=aH;Jn.getWellKnownCertificateConfigFileLocation=sH;var tH=require("fs"),rH=require("os"),Lw=require("path"),nH="certificate_config.json",$$="gcloud";function C$(e){return e.replace(/([_][^_])/g,t=>t.slice(1).toUpperCase())}a(C$,"snakeToCamel");function oH(e){function t(n){let o=e||{};return o[n]??o[C$(n)]}return a(t,"get"),{get:t}}a(oH,"originalOrCamelOptions");var jw=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()}};Jn.LRUCache=jw;function iH(e){return Object.entries(e).forEach(([t,n])=>{(n===void 0||n==="undefined")&&delete e[t]}),e}a(iH,"removeUndefinedValuesInObject");async function aH(e){try{return(await tH.promises.lstat(e)).isFile()}catch{return!1}}a(aH,"isValidFile");function sH(){let e=process.env.CLOUDSDK_CONFIG||(cH()?Lw.join(process.env.APPDATA||"",$$):Lw.join(process.env.HOME||"",".config",$$));return Lw.join(e,nH)}a(sH,"getWellKnownCertificateConfigFileLocation");function cH(){return rH.platform().startsWith("win")}a(cH,"_isWindows")});var N$=j((ele,uH)=>{uH.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 qw=j(ko=>{"use strict";Object.defineProperty(ko,"__esModule",{value:!0});ko.USER_AGENT=ko.PRODUCT_NAME=ko.pkg=void 0;var k$=N$();ko.pkg=k$;var z$="google-api-nodejs-client";ko.PRODUCT_NAME=z$;var lH=`${z$}/${k$.version}`;ko.USER_AGENT=lH});var Ir=j(sn=>{"use strict";Object.defineProperty(sn,"__esModule",{value:!0});sn.AuthClient=sn.DEFAULT_EAGER_REFRESH_THRESHOLD_MILLIS=sn.DEFAULT_UNIVERSE=void 0;var dH=require("events"),Bw=St(),pH=an(),fH=Aw(),Vw=qw();sn.DEFAULT_UNIVERSE="googleapis.com";sn.DEFAULT_EAGER_REFRESH_THRESHOLD_MILLIS=300*1e3;var Gw=class e extends dH.EventEmitter{static{a(this,"AuthClient")}apiKey;projectId;quotaProjectId;transporter;credentials={};eagerRefreshThresholdMillis=sn.DEFAULT_EAGER_REFRESH_THRESHOLD_MILLIS;forceRefreshOnFailure=!1;universeDomain=sn.DEFAULT_UNIVERSE;static RequestMethodNameSymbol=Symbol("request method name");static RequestLogIdSymbol=Symbol("request log id");constructor(t={}){super();let n=(0,pH.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")??sn.DEFAULT_UNIVERSE,this.transporter=t.transporter??new Bw.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&&Bw.Gaxios.mergeHeaders(i,n.headers),o&&Bw.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,fH.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(`${Vw.PRODUCT_NAME}/`)||t.headers.set("User-Agent",`${n} ${Vw.USER_AGENT}`):t.headers.set("User-Agent",Vw.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"]}}}};sn.AuthClient=Gw});var Zw=j(pm=>{"use strict";Object.defineProperty(pm,"__esModule",{value:!0});pm.LoginTicket=void 0;var Hw=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()}}};pm.LoginTicket=Hw});var Ii=j(Pn=>{"use strict";Object.defineProperty(Pn,"__esModule",{value:!0});Pn.OAuth2Client=Pn.ClientAuthentication=Pn.CertificateFormat=Pn.CodeChallengeMethod=void 0;var U$=St(),mH=require("querystring"),hH=require("stream"),gH=Fw(),M$=an(),Ww=Fu(),Za=Ir(),yH=Zw(),F$;(function(e){e.Plain="plain",e.S256="S256"})(F$||(Pn.CodeChallengeMethod=F$={}));var Xn;(function(e){e.PEM="PEM",e.JWK="JWK"})(Xn||(Pn.CertificateFormat=Xn={}));var Lu;(function(e){e.ClientSecretPost="ClientSecretPost",e.ClientSecretBasic="ClientSecretBasic",e.None="None"})(Lu||(Pn.ClientAuthentication=Lu={}));var Kw=class e extends Za.AuthClient{static{a(this,"OAuth2Client")}redirectUri;certificateCache={};certificateExpiry=null;certificateCacheFormat=Xn.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||Lu.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()+"?"+mH.stringify(t)}generateCodeVerifier(){throw new Error("generateCodeVerifier is removed, please use generateCodeVerifierAsync instead.")}async generateCodeVerifierAsync(){let t=(0,Ww.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===Lu.ClientSecretBasic){let h=Buffer.from(`${this._clientId}:${this._clientSecret}`);o.set("authorization",`Basic ${h.toString("base64")}`)}this.clientAuthentication===Lu.ClientSecretPost&&(r.client_secret=this._clientSecret);let i={...e.RETRY_CONFIG,method:"POST",url:n,data:new URLSearchParams((0,M$.removeUndefinedValuesInObject)(r)),headers:o};Za.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,M$.removeUndefinedValuesInObject)(o))};Za.AuthClient.setMethodName(s,"refreshTokenNoCache"),r=await this.transporter.request(s)}catch(s){throw s instanceof U$.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 h=new Headers({authorization:"Bearer "+this.credentials.access_token});return{headers:this.addSharedMetadataHeaders(h)}}}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 h=u;throw h.response&&(h.response.status===403||h.response.status===404)&&(h.message=`Could not refresh access token: ${h.message}`),h}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(Za.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=U$.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,h=r.config.data instanceof hH.Readable,g=i===401||i===403;if(!n&&g&&!h&&s)return await this.refreshAccessTokenAsync(),this.requestAsync(t,!0);if(!n&&g&&!h&&u){let y=await this.processAndValidateRefreshHandler();return y?.access_token&&this.setCredentials(y),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,Ww.hasBrowserCrypto)()?Xn.JWK:Xn.PEM;if(this.certificateExpiry&&t<this.certificateExpiry.getTime()&&this.certificateCacheFormat===n)return{certs:this.certificateCache,format:n};let o,r;switch(n){case Xn.PEM:r=this.endpoints.oauth2FederatedSignonPemCertsUrl.toString();break;case Xn.JWK:r=this.endpoints.oauth2FederatedSignonJwkCertsUrl.toString();break;default:throw new Error(`Unsupported certificate format ${n}`)}try{let g={...e.RETRY_CONFIG,url:r};Za.AuthClient.setMethodName(g,"getFederatedSignonCertsAsync"),o=await this.transporter.request(g)}catch(g){throw g instanceof Error&&(g.message=`Failed to retrieve verification certificates: ${g.message}`),g}let i=o?.headers.get("cache-control"),s=-1;if(i){let g=/max-age=(?<maxAge>[0-9]+)/.exec(i)?.groups?.maxAge;g&&(s=Number(g)*1e3)}let u={};switch(n){case Xn.PEM:u=o.data;break;case Xn.JWK:for(let g of o.data.keys)u[g.kid]=g;break;default:throw new Error(`Unsupported certificate format ${n}`)}let h=new Date;return this.certificateExpiry=s===-1?null:new Date(h.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};Za.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,Ww.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 h=u[0]+"."+u[1],g=u[2],y,T;try{y=JSON.parse(s.decodeBase64StringUtf8(u[0]))}catch(d){throw d instanceof Error&&(d.message=`Can't parse token envelope: ${u[0]}': ${d.message}`),d}if(!y)throw new Error("Can't parse token envelope: "+u[0]);try{T=JSON.parse(s.decodeBase64StringUtf8(u[1]))}catch(d){throw d instanceof Error&&(d.message=`Can't parse token payload '${u[0]}`),d}if(!T)throw new Error("Can't parse token payload: "+u[1]);if(!Object.prototype.hasOwnProperty.call(n,y.kid))throw new Error("No pem found for envelope: "+JSON.stringify(y));let b=n[y.kid];if(y.alg==="ES256"&&(g=gH.joseToDer(g,"ES256").toString("base64")),!await s.verify(b,h,g))throw new Error("Invalid token signature: "+t);if(!T.iat)throw new Error("No issue time in token: "+JSON.stringify(T));if(!T.exp)throw new Error("No expiration time in token: "+JSON.stringify(T));let S=Number(T.iat);if(isNaN(S))throw new Error("iat field using invalid format");let R=Number(T.exp);if(isNaN(R))throw new Error("exp field using invalid format");let I=new Date().getTime()/1e3;if(R>=I+i)throw new Error("Expiration time too far in future: "+JSON.stringify(T));let l=S-e.CLOCK_SKEW_SECS_,m=R+e.CLOCK_SKEW_SECS_;if(I<l)throw new Error("Token used too early, "+I+" < "+l+": "+JSON.stringify(T));if(I>m)throw new Error("Token used too late, "+I+" > "+m+": "+JSON.stringify(T));if(r&&r.indexOf(T.iss)<0)throw new Error("Invalid issuer, expected one of ["+r+"], but got "+T.iss);if(typeof o<"u"&&o!==null){let d=T.aud,v=!1;if(o.constructor===Array?v=o.indexOf(d)>-1:v=d===o,!v)throw new Error("Wrong recipient, payload audience != requiredAudience")}return new yH.LoginTicket(y,T)}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}};Pn.OAuth2Client=Kw});var Xw=j(fm=>{"use strict";Object.defineProperty(fm,"__esModule",{value:!0});fm.Compute=void 0;var vH=St(),L$=Mu(),_H=Ii(),Jw=class extends _H.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 L$.instance(r)}catch(r){throw r instanceof vH.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 L$.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))}};fm.Compute=Jw});var Qw=j(mm=>{"use strict";Object.defineProperty(mm,"__esModule",{value:!0});mm.IdTokenClient=void 0;var PH=Ii(),Yw=class extends PH.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}};mm.IdTokenClient=Yw});var eb=j(Wa=>{"use strict";Object.defineProperty(Wa,"__esModule",{value:!0});Wa.GCPEnv=void 0;Wa.clear=wH;Wa.getEnv=bH;var j$=Mu(),wn;(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"})(wn||(Wa.GCPEnv=wn={}));var ju;function wH(){ju=void 0}a(wH,"clear");async function bH(){return ju||(ju=TH(),ju)}a(bH,"getEnv");async function TH(){let e=wn.NONE;return EH()?e=wn.APP_ENGINE:SH()?e=wn.CLOUD_FUNCTIONS:await RH()?await AH()?e=wn.KUBERNETES_ENGINE:xH()?e=wn.CLOUD_RUN:IH()?e=wn.CLOUD_RUN_JOBS:e=wn.COMPUTE_ENGINE:e=wn.NONE,e}a(TH,"getEnvMemoized");function EH(){return!!(process.env.GAE_SERVICE||process.env.GAE_MODULE_NAME)}a(EH,"isAppEngine");function SH(){return!!(process.env.FUNCTION_NAME||process.env.FUNCTION_TARGET)}a(SH,"isCloudFunction");function xH(){return!!process.env.K_CONFIGURATION}a(xH,"isCloudRun");function IH(){return!!process.env.CLOUD_RUN_JOB}a(IH,"isCloudRunJob");async function AH(){try{return await j$.instance("attributes/cluster-name"),!0}catch{return!1}}a(AH,"isKubernetesEngine");async function RH(){return j$.isAvailable()}a(RH,"isComputeEngine")});var tb=j((mle,q$)=>{var hm=Ha().Buffer,DH=require("stream"),OH=require("util");function gm(e){if(this.buffer=null,this.writable=!0,this.readable=!0,!e)return this.buffer=hm.alloc(0),this;if(typeof e.pipe=="function")return this.buffer=hm.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(gm,"DataStream");OH.inherits(gm,DH);gm.prototype.write=a(function(t){this.buffer=hm.concat([this.buffer,hm.from(t)]),this.emit("data",t)},"write");gm.prototype.end=a(function(t){t&&this.write(t),this.emit("end",t),this.emit("close"),this.writable=!1,this.readable=!1},"end");q$.exports=gm});var V$=j((gle,B$)=>{"use strict";var qu=require("buffer").Buffer,rb=require("buffer").SlowBuffer;B$.exports=ym;function ym(e,t){if(!qu.isBuffer(e)||!qu.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(ym,"bufferEq");ym.install=function(){qu.prototype.equal=rb.prototype.equal=a(function(t){return ym(this,t)},"equal")};var $H=qu.prototype.equal,CH=rb.prototype.equal;ym.restore=function(){qu.prototype.equal=$H,rb.prototype.equal=CH}});var ab=j((vle,Q$)=>{var Ja=Ha().Buffer,Br=require("crypto"),H$=Fw(),G$=require("util"),NH=`"%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".`,Bu="secret must be a string or buffer",Ka="key must be a string or a buffer",NH="key must be a string, a buffer or an object",ob=typeof Br.createPublicKey=="function";ob&&(Ka+=" or a KeyObject",Bu+="or a KeyObject");function Z$(e){if(!Ja.isBuffer(e)&&typeof e!="string"&&(!ob||typeof e!="object"||typeof e.type!="string"||typeof e.asymmetricKeyType!="string"||typeof e.export!="function"))throw cn(Ka)}a(Z$,"checkIsPublicKey");function W$(e){if(!Ja.isBuffer(e)&&typeof e!="string"&&typeof e!="object")throw cn(NH)}a(W$,"checkIsPrivateKey");function kH(e){if(!Ja.isBuffer(e)){if(typeof e=="string")return e;if(!ob||typeof e!="object"||e.type!=="secret"||typeof e.export!="function")throw cn(Bu)}}a(kH,"checkIsSecretKey");function ib(e){return e.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}a(ib,"fromBase64");function K$(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(K$,"toBase64");function cn(e){var t=[].slice.call(arguments,1),n=G$.format.bind(G$,e).apply(null,t);return new TypeError(n)}a(cn,"typeError");function zH(e){return Ja.isBuffer(e)||typeof e=="string"}a(zH,"bufferOrString");function Vu(e){return zH(e)||(e=JSON.stringify(e)),e}a(Vu,"normalizeInput");function J$(e){return a(function(n,o){kH(o),n=Vu(n);var r=Br.createHmac("sha"+e,o),i=(r.update(n),r.digest("base64"));return ib(i)},"sign")}a(J$,"createHmacSigner");var nb,UH="timingSafeEqual"in Br?a(function(t,n){return t.byteLength!==n.byteLength?!1:Br.timingSafeEqual(t,n)},"timingSafeEqual"):a(function(t,n){return nb||(nb=V$()),nb(t,n)},"timingSafeEqual");function MH(e){return a(function(n,o,r){var i=J$(e)(n,r);return UH(Ja.from(o),Ja.from(i))},"verify")}a(MH,"createHmacVerifier");function X$(e){return a(function(n,o){W$(o),n=Vu(n);var r=Br.createSign("RSA-SHA"+e),i=(r.update(n),r.sign(o,"base64"));return ib(i)},"sign")}a(X$,"createKeySigner");function Y$(e){return a(function(n,o,r){Z$(r),n=Vu(n),o=K$(o);var i=Br.createVerify("RSA-SHA"+e);return i.update(n),i.verify(r,o,"base64")},"verify")}a(Y$,"createKeyVerifier");function FH(e){return a(function(n,o){W$(o),n=Vu(n);var r=Br.createSign("RSA-SHA"+e),i=(r.update(n),r.sign({key:o,padding:Br.constants.RSA_PKCS1_PSS_PADDING,saltLength:Br.constants.RSA_PSS_SALTLEN_DIGEST},"base64"));return ib(i)},"sign")}a(FH,"createPSSKeySigner");function LH(e){return a(function(n,o,r){Z$(r),n=Vu(n),o=K$(o);var i=Br.createVerify("RSA-SHA"+e);return i.update(n),i.verify({key:r,padding:Br.constants.RSA_PKCS1_PSS_PADDING,saltLength:Br.constants.RSA_PSS_SALTLEN_DIGEST},o,"base64")},"verify")}a(LH,"createPSSKeyVerifier");function jH(e){var t=X$(e);return a(function(){var o=t.apply(null,arguments);return o=H$.derToJose(o,"ES"+e),o},"sign")}a(jH,"createECDSASigner");function qH(e){var t=Y$(e);return a(function(o,r,i){r=H$.joseToDer(r,"ES"+e).toString("base64");var s=t(o,r,i);return s},"verify")}a(qH,"createECDSAVerifer");function BH(){return a(function(){return""},"sign")}a(BH,"createNoneSigner");function VH(){return a(function(t,n){return n===""},"verify")}a(VH,"createNoneVerifier");Q$.exports=a(function(t){var n={hs:J$,rs:X$,ps:FH,es:jH,none:BH},o={hs:MH,rs:Y$,ps:LH,es:qH,none:VH},r=t.match(/^(RS|PS|ES|HS)(256|384|512)$|^(none)$/);if(!r)throw cn(CH,t);var i=(r[1]||r[3]).toLowerCase(),s=r[2];return{sign:n[i](s),verify:o[i](s)}},"jwa")});var sb=j((vle,eC)=>{var GH=require("buffer").Buffer;eC.exports=a(function(t){return typeof t=="string"?t:typeof t=="number"||GH.isBuffer(t)?t.toString():JSON.stringify(t)},"toString")});var aC=j((Ple,iC)=>{var HH=Ha().Buffer,tC=tb(),ZH=ab(),WH=require("stream"),rC=sb(),cb=require("util");function nC(e,t){return HH.from(e,t).toString("base64").replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}a(nC,"base64url");function KH(e,t,n){n=n||"utf8";var o=nC(rC(e),"binary"),r=nC(rC(t),n);return cb.format("%s.%s",o,r)}a(KH,"jwsSecuredInput");function oC(e){var t=e.header,n=e.payload,o=e.secret||e.privateKey,r=e.encoding,i=ZH(t.alg),s=KH(t,n,r),u=i.sign(s,o);return cb.format("%s.%s",s,u)}a(oC,"jwsSign");function vm(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 tC(t);this.readable=!0,this.header=e.header,this.encoding=e.encoding,this.secret=this.privateKey=this.key=n,this.payload=new tC(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(vm,"SignStream");cb.inherits(vm,WH);vm.prototype.sign=a(function(){try{var t=oC({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");vm.sign=oC;iC.exports=vm});var gC=j((ble,hC)=>{var cC=Ha().Buffer,sC=tb(),JH=ab(),XH=require("stream"),uC=sb(),YH=require("util"),QH=/^[a-zA-Z0-9\-_]+?\.[a-zA-Z0-9\-_]+?\.([a-zA-Z0-9\-_]+)?$/;function eZ(e){return Object.prototype.toString.call(e)==="[object Object]"}a(eZ,"isObject");function tZ(e){if(eZ(e))return e;try{return JSON.parse(e)}catch{return}}a(tZ,"safeJsonParse");function lC(e){var t=e.split(".",1)[0];return tZ(cC.from(t,"base64").toString("binary"))}a(lC,"headerFromJWS");function rZ(e){return e.split(".",2).join(".")}a(rZ,"securedInputFromJWS");function dC(e){return e.split(".")[2]}a(dC,"signatureFromJWS");function nZ(e,t){t=t||"utf8";var n=e.split(".")[1];return cC.from(n,"base64").toString(t)}a(nZ,"payloadFromJWS");function pC(e){return QH.test(e)&&!!lC(e)}a(pC,"isValidJws");function fC(e,t,n){if(!t){var o=new Error("Missing algorithm parameter for jws.verify");throw o.code="MISSING_ALGORITHM",o}e=uC(e);var r=dC(e),i=rZ(e),s=JH(t);return s.verify(i,r,n)}a(fC,"jwsVerify");function mC(e,t){if(t=t||{},e=uC(e),!pC(e))return null;var n=lC(e);if(!n)return null;var o=nZ(e);return(n.typ==="JWT"||t.json)&&(o=JSON.parse(o,t.encoding)),{header:n,payload:o,signature:dC(e)}}a(mC,"jwsDecode");function Xa(e){e=e||{};var t=e.secret;if(t=t??e.publicKey,t=t??e.key,/^hs/i.test(e.algorithm)===!0&&t==null)throw new TypeError("secret must be a string or buffer or a KeyObject");var n=new sC(t);this.readable=!0,this.algorithm=e.algorithm,this.encoding=e.encoding,this.secret=this.publicKey=this.key=n,this.signature=new sC(e.signature),this.secret.once("close",function(){!this.signature.writable&&this.readable&&this.verify()}.bind(this)),this.signature.once("close",function(){!this.secret.writable&&this.readable&&this.verify()}.bind(this))}a(Xa,"VerifyStream");YH.inherits(Xa,XH);Xa.prototype.verify=a(function(){try{var t=fC(this.signature.buffer,this.algorithm,this.key.buffer),n=mC(this.signature.buffer,this.encoding);return this.emit("done",t,n),this.emit("data",t),this.emit("end"),this.readable=!1,t}catch(o){this.readable=!1,this.emit("error",o),this.emit("close")}},"verify");Xa.decode=mC;Xa.isValid=pC;Xa.verify=fC;hC.exports=Xa});var ub=j(zo=>{var yC=aC(),_m=gC(),oZ=["HS256","HS384","HS512","RS256","RS384","RS512","PS256","PS384","PS512","ES256","ES384","ES512"];zo.ALGORITHMS=oZ;zo.sign=yC.sign;zo.verify=_m.verify;zo.decode=_m.decode;zo.isValid=_m.isValid;zo.createSign=a(function(t){return new yC(t)},"createSign");zo.createVerify=a(function(t){return new _m(t)},"createVerify")});var $C=j(wm=>{"use strict";Object.defineProperty(wm,"__esModule",{value:!0});wm.GoogleToken=void 0;var vC=Pm(require("fs")),iZ=St(),aZ=Pm(ub()),sZ=Pm(require("path")),cZ=require("util");function Pm(e,t){if(typeof WeakMap=="function")var n=new WeakMap,o=new WeakMap;return(Pm=a(function(i,s){if(!s&&i&&i.__esModule)return i;var u,h,g={__proto__:null,default:i};if(i===null||Yn(i)!="object"&&typeof i!="function")return g;if(u=s?o:n){if(u.has(i))return u.get(i);u.set(i,g)}for(var y in i)y!=="default"&&{}.hasOwnProperty.call(i,y)&&((h=(u=Object.defineProperty)&&Object.getOwnPropertyDescriptor(i,y))&&(h.get||h.set)?u(g,y,h):g[y]=i[y]);return g},"_interopRequireWildcard"))(e,t)}a(Pm,"_interopRequireWildcard");function Yn(e){"@babel/helpers - typeof";return Yn=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},Yn(e)}a(Yn,"_typeof");function uZ(e,t){IC(e,t),t.add(e)}a(uZ,"_classPrivateMethodInitSpec");function lZ(e,t,n){IC(e,t),t.set(e,n)}a(lZ,"_classPrivateFieldInitSpec");function IC(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}a(IC,"_checkPrivateRedeclaration");function _C(e,t,n){return e.set(un(e,t),n),n}a(_C,"_classPrivateFieldSet");function PC(e,t){return e.get(un(e,t))}a(PC,"_classPrivateFieldGet");function un(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(un,"_assertClassBrand");function wC(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,DC(o.key),o)}}a(wC,"_defineProperties");function AC(e,t,n){return t&&wC(e.prototype,t),n&&wC(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}a(AC,"_createClass");function RC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}a(RC,"_classCallCheck");function dZ(e,t,n){return t=Wu(t),pZ(e,hb()?Reflect.construct(t,n||[],Wu(e).constructor):t.apply(e,n))}a(dZ,"_callSuper");function pZ(e,t){if(t&&(Yn(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return fZ(e)}a(pZ,"_possibleConstructorReturn");function fZ(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}a(fZ,"_assertThisInitialized");function mZ(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&&Zu(e,t)}a(mZ,"_inherits");function lb(e){var t=typeof Map=="function"?new Map:void 0;return lb=a(function(o){if(o===null||!gZ(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 hZ(o,arguments,Wu(this).constructor)}return a(r,"Wrapper"),r.prototype=Object.create(o.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),Zu(r,o)},"_wrapNativeSuper"),lb(e)}a(lb,"_wrapNativeSuper");function hZ(e,t,n){if(hb())return Reflect.construct.apply(null,arguments);var o=[null];o.push.apply(o,t);var r=new(e.bind.apply(e,o));return n&&Zu(r,n.prototype),r}a(hZ,"_construct");function hb(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(hb=a(function(){return!!e},"_isNativeReflectConstruct"))()}a(hb,"_isNativeReflectConstruct");function gZ(e){try{return Function.toString.call(e).indexOf("[native code]")!==-1}catch{return typeof e=="function"}}a(gZ,"_isNativeFunction");function Zu(e,t){return Zu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},Zu(e,t)}a(Zu,"_setPrototypeOf");function Wu(e){return Wu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Wu(e)}a(Wu,"_getPrototypeOf");function Ar(e,t,n){return(t=DC(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}a(Ar,"_defineProperty");function DC(e){var t=yZ(e,"string");return Yn(t)=="symbol"?t:t+""}a(DC,"_toPropertyKey");function yZ(e,t){if(Yn(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var o=n.call(e,t||"default");if(Yn(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}a(yZ,"_toPrimitive");function Dr(){var e,t,n=typeof Symbol=="function"?Symbol:{},o=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function i(P,S,R,I){var l=S&&S.prototype instanceof u?S:u,m=Object.create(l.prototype);return Rr(m,"_invoke",(function(d,v,p){var E,_,pe,oe=0,Be=p||[],me=!1,ee={p:0,n:0,v:e,a:Q,f:Q.bind(e,4),d:a(function(ne,ge){return E=ne,_=0,pe=e,ee.n=ge,s},"d")};function Q(se,ne){for(_=se,pe=ne,t=0;!me&&oe&&!ge&&t<Be.length;t++){var ge,_e=Be[t],Fe=ee.p,Ve=_e[2];se>3?(ge=Ve===ne)&&(pe=_e[(_=_e[4])?5:(_=3,3)],_e[4]=_e[5]=e):_e[0]<=Fe&&((ge=se<2&&Fe<_e[1])?(_=0,ee.v=ne,ee.n=_e[1]):Fe<Ve&&(ge=se<3||_e[0]>ne||ne>Ve)&&(_e[4]=se,_e[5]=ne,ee.n=Ve,_=0))}if(ge||se>1)return s;throw me=!0,ne}return a(Q,"d"),function(se,ne,ge){if(oe>1)throw TypeError("Generator is already running");for(me&&ne===1&&Q(ne,ge),_=ne,pe=ge;(t=_<2?e:pe)||!me;){E||(_?_<3?(_>1&&(ee.n=-1),Q(_,pe)):ee.n=pe:ee.v=pe);try{if(oe=2,E){if(_||(se="next"),t=E[se]){if(!(t=t.call(E,pe)))throw TypeError("iterator result is not an object");if(!t.done)return t;pe=t.value,_<2&&(_=0)}else _===1&&(t=E.return)&&t.call(E),_<2&&(pe=TypeError("The iterator does not provide a '"+se+"' method"),_=1);E=e}else if((t=(me=ee.n<0)?pe:d.call(v,ee))!==s)break}catch(_e){E=e,_=1,pe=_e}finally{oe=1}}return{value:t,done:me}}})(P,R,I),!0),m}a(i,"i");var s={};function u(){}a(u,"Generator");function h(){}a(h,"GeneratorFunction");function g(){}a(g,"GeneratorFunctionPrototype"),t=Object.getPrototypeOf;var y=[][o]?t(t([][o]())):(Rr(t={},o,function(){return this}),t),T=g.prototype=u.prototype=Object.create(y);function b(P){return Object.setPrototypeOf?Object.setPrototypeOf(P,g):(P.__proto__=g,Rr(P,r,"GeneratorFunction")),P.prototype=Object.create(T),P}return a(b,"f"),h.prototype=g,Rr(T,"constructor",g),Rr(g,"constructor",h),h.displayName="GeneratorFunction",Rr(g,r,"GeneratorFunction"),Rr(T),Rr(T,r,"Generator"),Rr(T,o,function(){return this}),Rr(T,"toString",function(){return"[object Generator]"}),(Dr=a(function(){return{w:i,m:b}},"_regenerator"))()}a(Dr,"_regenerator");function Rr(e,t,n,o){var r=Object.defineProperty;try{r({},"",{})}catch{r=0}Rr=a(function(s,u,h,g){if(u)r?r(s,u,{value:h,enumerable:!g,configurable:!g,writable:!g}):s[u]=h;else{var y=a(function(b,P){Rr(s,b,function(S){return this._invoke(b,P,S)})},"o");y("next",0),y("throw",1),y("return",2)}},"_regeneratorDefine"),Rr(e,t,n,o)}a(Rr,"_regeneratorDefine2");function bC(e,t,n,o,r,i,s){try{var u=e[i](s),h=u.value}catch(g){return void n(g)}u.done?t(h):Promise.resolve(h).then(o,r)}a(bC,"asyncGeneratorStep");function Ya(e){return function(){var t=this,n=arguments;return new Promise(function(o,r){var i=e.apply(t,n);function s(h){bC(i,o,r,s,u,"next",h)}a(s,"_next");function u(h){bC(i,o,r,s,u,"throw",h)}a(u,"_throw"),s(void 0)})}}a(Ya,"_asyncToGenerator");var TC=vC.readFile?(0,cZ.promisify)(vC.readFile):Ya(Dr().m(a(function e(){return Dr().w(function(t){for(;;)switch(t.n){case 0:throw new Hu("use key rather than keyFile.","MISSING_CREDENTIALS");case 1:return t.a(2)}},e)},"_callee"))),EC="https://oauth2.googleapis.com/token",vZ="https://oauth2.googleapis.com/revoke?token=",Hu=(function(e){function t(n,o){var r;return RC(this,t),r=dZ(this,t,[n]),Ar(r,"code",void 0),r.code=o,r}return a(t,"ErrorWithCode"),mZ(t,e),AC(t)})(lb(Error)),Gu=new WeakMap,bn=new WeakSet,xle=wm.GoogleToken=(function(){function e(t){RC(this,e),uZ(this,bn),Ar(this,"expiresAt",void 0),Ar(this,"key",void 0),Ar(this,"keyFile",void 0),Ar(this,"iss",void 0),Ar(this,"sub",void 0),Ar(this,"scope",void 0),Ar(this,"rawToken",void 0),Ar(this,"tokenExpires",void 0),Ar(this,"email",void 0),Ar(this,"additionalClaims",void 0),Ar(this,"eagerRefreshThresholdMillis",void 0),Ar(this,"transporter",{request:a(function(o){return(0,iZ.request)(o)},"request")}),lZ(this,Gu,void 0),un(bn,this,OC).call(this,t)}return a(e,"GoogleToken"),AC(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(Yn(n)==="object"&&(o=n,n=void 0),o=Object.assign({forceRefresh:!1},o),n){var r=n;un(bn,this,SC).call(this,o).then(function(i){return r(null,i)},n);return}return un(bn,this,SC).call(this,o)},"getToken")},{key:"getCredentials",value:(function(){var t=Ya(Dr().m(a(function o(r){var i,s,u,h,g,y,T;return Dr().w(function(b){for(;;)switch(b.n){case 0:i=sZ.extname(r),T=i,b.n=T===".json"?1:T===".der"||T===".crt"||T===".pem"?4:T===".p12"||T===".pfx"?6:7;break;case 1:return b.n=2,TC(r,"utf8");case 2:if(s=b.v,u=JSON.parse(s),h=u.private_key,g=u.client_email,!(!h||!g)){b.n=3;break}throw new Hu("private_key and client_email are required.","MISSING_CREDENTIALS");case 3:return b.a(2,{privateKey:h,clientEmail:g});case 4:return b.n=5,TC(r,"utf8");case 5:return y=b.v,b.a(2,{privateKey:y});case 6:throw new Hu("*.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 Hu("Unknown certificate type. Type is determined based on file extension. Current supported extensions are *.json, and *.pem.","UNKNOWN_CERTIFICATE_TYPE");case 8:return b.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){un(bn,this,xC).call(this).then(function(){return n()},n);return}return un(bn,this,xC).call(this)},"revokeToken")}])})();function SC(e){return db.apply(this,arguments)}a(SC,"_getTokenAsync");function db(){return db=Ya(Dr().m(a(function e(t){return Dr().w(function(n){for(;;)switch(n.n){case 0:if(!(PC(Gu,this)&&!t.forceRefresh)){n.n=1;break}return n.a(2,PC(Gu,this));case 1:return n.p=1,n.n=2,_C(Gu,this,un(bn,this,_Z).call(this,t));case 2:return n.a(2,n.v);case 3:return n.p=3,_C(Gu,this,void 0),n.f(3);case 4:return n.a(2)}},e,this,[[1,,3,4]])},"_callee3"))),db.apply(this,arguments)}a(db,"_getTokenAsync2");function _Z(e){return pb.apply(this,arguments)}a(_Z,"_getTokenAsyncInner");function pb(){return pb=Ya(Dr().m(a(function e(t){var n;return Dr().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||un(bn,this,PZ).call(this);case 4:return o.a(2,un(bn,this,wZ).call(this))}},e,this)},"_callee4"))),pb.apply(this,arguments)}a(pb,"_getTokenAsyncInner2");function PZ(){if(!this.iss)throw new Hu("email is required.","MISSING_CREDENTIALS")}a(PZ,"_ensureEmail");function xC(){return fb.apply(this,arguments)}a(xC,"_revokeTokenAsync");function fb(){return fb=Ya(Dr().m(a(function e(){var t;return Dr().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=vZ+this.accessToken,n.n=2,this.transporter.request({url:t,retry:!0});case 2:un(bn,this,OC).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"))),fb.apply(this,arguments)}a(fb,"_revokeTokenAsync2");function OC(){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,Yn(e.scope)==="object"?this.scope=e.scope.join(" "):this.scope=e.scope,this.eagerRefreshThresholdMillis=e.eagerRefreshThresholdMillis,e.transporter&&(this.transporter=e.transporter)}a(OC,"_configure");function wZ(){return mb.apply(this,arguments)}a(wZ,"_requestToken");function mb(){return mb=Ya(Dr().m(a(function e(){var t,n,o,r,i,s,u,h,g,y;return Dr().w(function(T){for(;;)switch(T.n){case 0:return t=Math.floor(new Date().getTime()/1e3),n=this.additionalClaims||{},o=Object.assign({iss:this.iss,scope:this.scope,aud:EC,exp:t+3600,iat:t,sub:this.sub},n),r=aZ.sign({header:{alg:"RS256"},payload:o,secret:this.key}),T.p=1,T.n=2,this.transporter.request({method:"POST",url:EC,data:new URLSearchParams({grant_type:"urn:ietf:params:oauth:grant-type:jwt-bearer",assertion:r}),responseType:"json",retryConfig:{httpMethodsToRetry:["POST"]}});case 2:return i=T.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,T.a(2,this.rawToken);case 3:throw T.p=3,y=T.v,this.rawToken=void 0,this.tokenExpires=void 0,h=y.response&&(s=y.response)!==null&&s!==void 0&&s.data?(u=y.response)===null||u===void 0?void 0:u.data:{},h.error&&(g=h.error_description?": ".concat(h.error_description):"",y.message="".concat(h.error).concat(g)),y;case 4:return T.a(2)}},e,this,[[1,3]])},"_callee6"))),mb.apply(this,arguments)}a(mb,"_requestToken2")});var yb=j(bm=>{"use strict";Object.defineProperty(bm,"__esModule",{value:!0});bm.JWTAccess=void 0;var bZ=ub(),TZ=an(),CC={alg:"RS256",typ:"JWT"},gb=class e{static{a(this,"JWTAccess")}email;key;keyId;projectId;eagerRefreshThresholdMillis;cache=new TZ.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),h=e.getExpirationTime(u),g;if(Array.isArray(o)&&(o=o.join(" ")),o?g={iss:this.email,sub:this.email,scope:o,exp:h,iat:u}:g={iss:this.email,sub:this.email,aud:t,exp:h,iat:u},n){for(let S in g)if(n[S])throw new Error(`The '${S}' property is not allowed when passing additionalClaims. This claim is included in the JWT by default.`)}let y=this.keyId?{...CC,kid:this.keyId}:CC,T=Object.assign(g,n),b=bZ.sign({header:y,payload:T,secret:this.key}),P=new Headers({authorization:`Bearer ${b}`});return this.cache.set(r,{expiration:h*1e3,headers:P}),P}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)}})})}};bm.JWTAccess=gb});var _b=j(Em=>{"use strict";Object.defineProperty(Em,"__esModule",{value:!0});Em.JWT=void 0;var NC=$C(),EZ=yb(),SZ=Ii(),Tm=Ir(),vb=class e extends SZ.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!==Tm.DEFAULT_UNIVERSE;if(this.subject&&this.universeDomain!==Tm.DEFAULT_UNIVERSE)throw new RangeError(`Service Account user is configured for the credential. Domain-wide delegation is not supported in universes other than ${Tm.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 EZ.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!==Tm.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 NC.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 NC.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.")}};Em.JWT=vb});var wb=j(Qa=>{"use strict";Object.defineProperty(Qa,"__esModule",{value:!0});Qa.UserRefreshClient=Qa.USER_REFRESH_ACCOUNT_TYPE=void 0;var xZ=Ii(),IZ=Ir();Qa.USER_REFRESH_ACCOUNT_TYPE="authorized_user";var Pb=class e extends xZ.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 IZ.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}};Qa.UserRefreshClient=Pb});var Tb=j(es=>{"use strict";Object.defineProperty(es,"__esModule",{value:!0});es.Impersonated=es.IMPERSONATED_ACCOUNT_TYPE=void 0;var kC=Ii(),AZ=St(),RZ=an();es.IMPERSONATED_ACCOUNT_TYPE="impersonated_service_account";var bb=class e extends kC.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 kC.OAuth2Client,this.targetPrincipal=t.targetPrincipal??"",this.delegates=t.delegates??[],this.targetScopes=t.targetScopes??[],this.lifetime=t.lifetime??3600,!!!(0,RZ.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 AZ.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}};es.Impersonated=bb});var Sb=j(Ku=>{"use strict";Object.defineProperty(Ku,"__esModule",{value:!0});Ku.OAuthClientAuthHandler=void 0;Ku.getErrorFromOAuthErrorResponse=$Z;var ts=St(),DZ=Fu(),OZ=["PUT","POST","PATCH"],Eb=class{static{a(this,"OAuthClientAuthHandler")}#e=(0,DZ.createCrypto)();#t;transporter;constructor(t){t&&"clientId"in t?(this.#t=t,this.transporter=new ts.Gaxios):(this.#t=t?.clientAuthentication,this.transporter=t?.transporter||new ts.Gaxios)}applyClientAuthenticationOptions(t,n){t.headers=ts.Gaxios.mergeHeaders(t.headers),this.injectAuthenticatedHeaders(t,n),n||this.injectAuthenticatedRequestBody(t)}injectAuthenticatedHeaders(t,n){if(n)t.headers=ts.Gaxios.mergeHeaders(t.headers,{authorization:`Bearer ${n}`});else if(this.#t?.confidentialClientType==="basic"){t.headers=ts.Gaxios.mergeHeaders(t.headers);let o=this.#t.clientId,r=this.#t.clientSecret||"",i=this.#e.encodeBase64StringUtf8(`${o}:${r}`);ts.Gaxios.mergeHeaders(t.headers,{authorization:`Basic ${i}`})}}injectAuthenticatedRequestBody(t){if(this.#t?.confidentialClientType==="request-body"){let n=(t.method||"GET").toUpperCase();if(!OZ.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"]}}}};Ku.OAuthClientAuthHandler=Eb;function $Z(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(h=>{h!=="message"&&Object.defineProperty(s,h,{value:t[h],writable:!1,enumerable:!0})})}return s}a($Z,"getErrorFromOAuthErrorResponse")});var xm=j(Sm=>{"use strict";Object.defineProperty(Sm,"__esModule",{value:!0});Sm.StsCredentials=void 0;var CZ=St(),NZ=Ir(),zC=Sb(),kZ=an(),xb=class e extends zC.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,kZ.removeUndefinedValuesInObject)(r))};NZ.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 CZ.GaxiosError&&s.response?(0,zC.getErrorFromOAuthErrorResponse)(s.response.data,s):s}}};Sm.StsCredentials=xb});var Uo=j(Vr=>{"use strict";Object.defineProperty(Vr,"__esModule",{value:!0});Vr.BaseExternalAccountClient=Vr.CLOUD_RESOURCE_MANAGER=Vr.EXTERNAL_ACCOUNT_TYPE=Vr.EXPIRATION_TIME_OFFSET=void 0;var zZ=St(),UZ=require("stream"),Ib=Ir(),MZ=xm(),UC=an(),FZ=qw(),LZ="urn:ietf:params:oauth:grant-type:token-exchange",jZ="urn:ietf:params:oauth:token-type:access_token",Ab="https://www.googleapis.com/auth/cloud-platform",qZ=3600;Vr.EXPIRATION_TIME_OFFSET=300*1e3;Vr.EXTERNAL_ACCOUNT_TYPE="external_account";Vr.CLOUD_RESOURCE_MANAGER="https://cloudresourcemanager.googleapis.com/v1/projects/";var BZ="//iam\\.googleapis\\.com/locations/[^/]+/workforcePools/[^/]+/providers/.+",VZ="https://sts.{universeDomain}/v1/token",Rb=class e extends Ib.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,UC.originalOrCamelOptions)(t),o=n.get("type");if(o&&o!==Vr.EXTERNAL_ACCOUNT_TYPE)throw new Error(`Expected "${Vr.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")??VZ.replace("{universeDomain}",this.universeDomain);let s=n.get("subject_token_type"),u=n.get("workforce_pool_user_project"),h=n.get("service_account_impersonation_url"),g=n.get("service_account_impersonation"),y=(0,UC.originalOrCamelOptions)(g).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 MZ.StsCredentials({tokenExchangeEndpoint:this.tokenUrl,clientAuthentication:this.clientAuth}),this.scopes=n.get("scopes")||[Ab],this.cachedAccessToken=null,this.audience=n.get("audience"),this.subjectTokenType=s,this.workforcePoolUserProject=u;let T=new RegExp(BZ);if(this.workforcePoolUserProject&&!this.audience.match(T))throw new Error("workforcePoolUserProject should not be set for non-workforce pool credentials.");this.serviceAccountImpersonationUrl=h,this.serviceAccountImpersonationLifetime=y,this.serviceAccountImpersonationLifetime?this.configLifetimeRequested=!0:(this.configLifetimeRequested=!1,this.serviceAccountImpersonationLifetime=qZ),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}`};Ib.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=zZ.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 UZ.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:LZ,audience:this.audience,requestedTokenType:jZ,subjectToken:t,subjectTokenType:this.subjectTokenType,scope:this.serviceAccountImpersonationUrl?[Ab]: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"}};Ib.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||[Ab]}getMetricsHeaderValue(){let t=process.version.replace(/^v/,""),n=this.serviceAccountImpersonationUrl!==void 0,o=this.credentialSourceType?this.credentialSourceType:"unknown";return`gl-node/${t} auth/${FZ.pkg.version} google-byoid-sdk source/${o} sa-impersonation/${n} config-lifetime/${this.configLifetimeRequested}`}getTokenUrl(){return this.tokenUrl}};Vr.BaseExternalAccountClient=Rb});var MC=j(Im=>{"use strict";Object.defineProperty(Im,"__esModule",{value:!0});Im.FileSubjectTokenSupplier=void 0;var Ob=require("util"),$b=require("fs"),GZ=(0,Ob.promisify)($b.readFile??(()=>{})),HZ=(0,Ob.promisify)($b.realpath??(()=>{})),ZZ=(0,Ob.promisify)($b.lstat??(()=>{})),Db=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 HZ(t),!(await ZZ(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 GZ(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}};Im.FileSubjectTokenSupplier=Db});var FC=j(Am=>{"use strict";Object.defineProperty(Am,"__esModule",{value:!0});Am.UrlSubjectTokenSupplier=void 0;var WZ=Ir(),Cb=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};WZ.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}};Am.UrlSubjectTokenSupplier=Cb});var LC=j(Or=>{"use strict";Object.defineProperty(Or,"__esModule",{value:!0});Or.CertificateSubjectTokenSupplier=Or.InvalidConfigurationError=Or.CertificateSourceUnavailableError=Or.CERTIFICATE_CONFIGURATION_ENV_VARIABLE=void 0;var Rm=an(),Dm=require("fs"),Om=require("crypto"),KZ=require("https");Or.CERTIFICATE_CONFIGURATION_ENV_VARIABLE="GOOGLE_API_CERTIFICATE_CONFIG";var Tn=class extends Error{static{a(this,"CertificateSourceUnavailableError")}constructor(t){super(t),this.name="CertificateSourceUnavailableError"}};Or.CertificateSourceUnavailableError=Tn;var Gr=class extends Error{static{a(this,"InvalidConfigurationError")}constructor(t){super(t),this.name="InvalidConfigurationError"}};Or.InvalidConfigurationError=Gr;var Nb=class{static{a(this,"CertificateSubjectTokenSupplier")}certificateConfigPath;trustChainPath;cert;key;constructor(t){if(!t.useDefaultCertificateConfig&&!t.certificateConfigLocation)throw new Gr("Either `useDefaultCertificateConfig` must be true or a `certificateConfigLocation` must be provided.");if(t.useDefaultCertificateConfig&&t.certificateConfigLocation)throw new Gr("Both `useDefaultCertificateConfig` and `certificateConfigLocation` cannot be provided.");this.trustChainPath=t.trustChainPath,this.certificateConfigPath=t.certificateConfigLocation??""}async createMtlsHttpsAgent(){if(!this.key||!this.cert)throw new Gr("Cannot create mTLS Agent with missing certificate or key");return new KZ.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,Rm.isValidFile)(t))return t;throw new Tn(`Provided certificate config path is invalid: ${t}`)}let n=process.env[Or.CERTIFICATE_CONFIGURATION_ENV_VARIABLE];if(n){if(await(0,Rm.isValidFile)(n))return n;throw new Tn(`Path from environment variable "${Or.CERTIFICATE_CONFIGURATION_ENV_VARIABLE}" is invalid: ${n}`)}let o=(0,Rm.getWellKnownCertificateConfigFileLocation)();if(await(0,Rm.isValidFile)(o))return o;throw new Tn(`Could not find certificate configuration file. Searched override path, the "${Or.CERTIFICATE_CONFIGURATION_ENV_VARIABLE}" env var, and the gcloud path (${o}).`)}async#t(){let t=this.certificateConfigPath,n;try{n=await Dm.promises.readFile(t,"utf8")}catch{throw new Tn(`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 Gr(`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 Gr?o:new Gr(`Failed to parse certificate config from ${t}: ${o.message}`)}}async#r(t,n){let o,r;try{o=await Dm.promises.readFile(t),new Om.X509Certificate(o)}catch(i){let s=i instanceof Error?i.message:String(i);throw new Tn(`Failed to read certificate file at ${t}: ${s}`)}try{r=await Dm.promises.readFile(n),(0,Om.createPrivateKey)(r)}catch(i){let s=i instanceof Error?i.message:String(i);throw new Tn(`Failed to read private key file at ${n}: ${s}`)}return{cert:o,key:r}}async#n(t){let n=new Om.X509Certificate(t);if(!this.trustChainPath)return JSON.stringify([n.raw.toString("base64")]);try{let i=((await Dm.promises.readFile(this.trustChainPath,"utf8")).match(/-----BEGIN CERTIFICATE-----[^-]+-----END CERTIFICATE-----/g)??[]).map((h,g)=>{try{return new Om.X509Certificate(h)}catch(y){let T=y instanceof Error?y.message:String(y);throw new Gr(`Failed to parse certificate at index ${g} in trust chain file ${this.trustChainPath}: ${T}`)}}),s=i.findIndex(h=>n.raw.equals(h.raw)),u;if(s===-1)u=[n,...i];else if(s===0)u=i;else throw new Gr(`Leaf certificate exists in the trust chain but is not the first entry (found at index ${s}).`);return JSON.stringify(u.map(h=>h.raw.toString("base64")))}catch(o){if(o instanceof Gr)throw o;let r=o instanceof Error?o.message:String(o);throw new Tn(`Failed to process certificate chain from ${this.trustChainPath}: ${r}`)}}};Or.CertificateSubjectTokenSupplier=Nb});var Ub=j($m=>{"use strict";Object.defineProperty($m,"__esModule",{value:!0});$m.IdentityPoolClient=void 0;var JZ=Uo(),kb=an(),XZ=MC(),YZ=FC(),jC=LC(),QZ=xm(),qC=St(),zb=class e extends JZ.BaseExternalAccountClient{static{a(this,"IdentityPoolClient")}subjectTokenSupplier;constructor(t){super(t);let n=(0,kb.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,kb.originalOrCamelOptions)(o),s=(0,kb.originalOrCamelOptions)(i.get("format")),u=s.get("type")||"text",h=s.get("subject_token_field_name");if(u!=="json"&&u!=="text")throw new Error(`Invalid credential_source format "${u}"`);if(u==="json"&&!h)throw new Error("Missing subject_token_field_name for JSON credential_source format");let g=i.get("file"),y=i.get("url"),T=i.get("certificate"),b=i.get("headers");if(g&&y||y&&T||g&&T)throw new Error('No valid Identity Pool "credential_source" provided, must be either file, url, or certificate.');if(g)this.credentialSourceType="file",this.subjectTokenSupplier=new XZ.FileSubjectTokenSupplier({filePath:g,formatType:u,subjectTokenFieldName:h});else if(y)this.credentialSourceType="url",this.subjectTokenSupplier=new YZ.UrlSubjectTokenSupplier({url:y,formatType:u,subjectTokenFieldName:h,headers:b,additionalGaxiosOptions:e.RETRY_CONFIG});else if(T){this.credentialSourceType="certificate";let P=new jC.CertificateSubjectTokenSupplier({useDefaultCertificateConfig:T.use_default_certificate_config,certificateConfigLocation:T.certificate_config_location,trustChainPath:T.trust_chain_path});this.subjectTokenSupplier=P}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 jC.CertificateSubjectTokenSupplier){let n=await this.subjectTokenSupplier.createMtlsHttpsAgent();this.stsCredential=new QZ.StsCredentials({tokenExchangeEndpoint:this.getTokenUrl(),clientAuthentication:this.clientAuth,transporter:new qC.Gaxios({agent:n})}),this.transporter=new qC.Gaxios({...this.transporter.defaults||{},agent:n})}return t}};$m.IdentityPoolClient=zb});var Fb=j(Nm=>{"use strict";Object.defineProperty(Nm,"__esModule",{value:!0});Nm.AwsRequestSigner=void 0;var Cm=St(),VC=Fu(),BC="AWS4-HMAC-SHA256",eW="aws4_request",Mb=class{static{a(this,"AwsRequestSigner")}getCredentials;region;crypto;constructor(t,n){this.getCredentials=t,this.region=n,this.crypto=(0,VC.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(),h=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 g=await rW({crypto:this.crypto,host:h.host,canonicalUri:h.pathname,canonicalQuerystring:h.search.slice(1),method:r,region:this.region,securityCredentials:u,requestPayload:i,additionalAmzHeaders:s}),y=Cm.Gaxios.mergeHeaders(g.amzDate?{"x-amz-date":g.amzDate}:{},{authorization:g.authorizationHeader,host:h.host},s||{});u.token&&Cm.Gaxios.mergeHeaders(y,{"x-amz-security-token":u.token});let T={url:o,method:r,headers:y};return i!==void 0&&(T.body=i),T}};Nm.AwsRequestSigner=Mb;async function Ju(e,t,n){return await e.signWithHmacSha256(t,n)}a(Ju,"sign");async function tW(e,t,n,o,r){let i=await Ju(e,`AWS4${t}`,n),s=await Ju(e,i,o),u=await Ju(e,s,r);return await Ju(e,u,"aws4_request")}a(tW,"getSigningKey");async function rW(e){let t=Cm.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=Cm.Gaxios.mergeHeaders({host:e.host},t.has("date")?{}:{"x-amz-date":i},t),h="",g=[...u.keys()].sort();g.forEach(m=>{h+=`${m}:${u.get(m)}
40
+ "HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "PS256", "PS384", "PS512", "ES256", "ES384", "ES512" and "none".`,Bu="secret must be a string or buffer",Ka="key must be a string or a buffer",kH="key must be a string, a buffer or an object",ob=typeof Br.createPublicKey=="function";ob&&(Ka+=" or a KeyObject",Bu+="or a KeyObject");function Z$(e){if(!Ja.isBuffer(e)&&typeof e!="string"&&(!ob||typeof e!="object"||typeof e.type!="string"||typeof e.asymmetricKeyType!="string"||typeof e.export!="function"))throw cn(Ka)}a(Z$,"checkIsPublicKey");function W$(e){if(!Ja.isBuffer(e)&&typeof e!="string"&&typeof e!="object")throw cn(kH)}a(W$,"checkIsPrivateKey");function zH(e){if(!Ja.isBuffer(e)){if(typeof e=="string")return e;if(!ob||typeof e!="object"||e.type!=="secret"||typeof e.export!="function")throw cn(Bu)}}a(zH,"checkIsSecretKey");function ib(e){return e.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}a(ib,"fromBase64");function K$(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(K$,"toBase64");function cn(e){var t=[].slice.call(arguments,1),n=G$.format.bind(G$,e).apply(null,t);return new TypeError(n)}a(cn,"typeError");function UH(e){return Ja.isBuffer(e)||typeof e=="string"}a(UH,"bufferOrString");function Vu(e){return UH(e)||(e=JSON.stringify(e)),e}a(Vu,"normalizeInput");function J$(e){return a(function(n,o){zH(o),n=Vu(n);var r=Br.createHmac("sha"+e,o),i=(r.update(n),r.digest("base64"));return ib(i)},"sign")}a(J$,"createHmacSigner");var nb,MH="timingSafeEqual"in Br?a(function(t,n){return t.byteLength!==n.byteLength?!1:Br.timingSafeEqual(t,n)},"timingSafeEqual"):a(function(t,n){return nb||(nb=V$()),nb(t,n)},"timingSafeEqual");function FH(e){return a(function(n,o,r){var i=J$(e)(n,r);return MH(Ja.from(o),Ja.from(i))},"verify")}a(FH,"createHmacVerifier");function X$(e){return a(function(n,o){W$(o),n=Vu(n);var r=Br.createSign("RSA-SHA"+e),i=(r.update(n),r.sign(o,"base64"));return ib(i)},"sign")}a(X$,"createKeySigner");function Y$(e){return a(function(n,o,r){Z$(r),n=Vu(n),o=K$(o);var i=Br.createVerify("RSA-SHA"+e);return i.update(n),i.verify(r,o,"base64")},"verify")}a(Y$,"createKeyVerifier");function LH(e){return a(function(n,o){W$(o),n=Vu(n);var r=Br.createSign("RSA-SHA"+e),i=(r.update(n),r.sign({key:o,padding:Br.constants.RSA_PKCS1_PSS_PADDING,saltLength:Br.constants.RSA_PSS_SALTLEN_DIGEST},"base64"));return ib(i)},"sign")}a(LH,"createPSSKeySigner");function jH(e){return a(function(n,o,r){Z$(r),n=Vu(n),o=K$(o);var i=Br.createVerify("RSA-SHA"+e);return i.update(n),i.verify({key:r,padding:Br.constants.RSA_PKCS1_PSS_PADDING,saltLength:Br.constants.RSA_PSS_SALTLEN_DIGEST},o,"base64")},"verify")}a(jH,"createPSSKeyVerifier");function qH(e){var t=X$(e);return a(function(){var o=t.apply(null,arguments);return o=H$.derToJose(o,"ES"+e),o},"sign")}a(qH,"createECDSASigner");function BH(e){var t=Y$(e);return a(function(o,r,i){r=H$.joseToDer(r,"ES"+e).toString("base64");var s=t(o,r,i);return s},"verify")}a(BH,"createECDSAVerifer");function VH(){return a(function(){return""},"sign")}a(VH,"createNoneSigner");function GH(){return a(function(t,n){return n===""},"verify")}a(GH,"createNoneVerifier");Q$.exports=a(function(t){var n={hs:J$,rs:X$,ps:LH,es:qH,none:VH},o={hs:FH,rs:Y$,ps:jH,es:BH,none:GH},r=t.match(/^(RS|PS|ES|HS)(256|384|512)$|^(none)$/);if(!r)throw cn(NH,t);var i=(r[1]||r[3]).toLowerCase(),s=r[2];return{sign:n[i](s),verify:o[i](s)}},"jwa")});var sb=j((Ple,eC)=>{var HH=require("buffer").Buffer;eC.exports=a(function(t){return typeof t=="string"?t:typeof t=="number"||HH.isBuffer(t)?t.toString():JSON.stringify(t)},"toString")});var aC=j((ble,iC)=>{var ZH=Ha().Buffer,tC=tb(),WH=ab(),KH=require("stream"),rC=sb(),cb=require("util");function nC(e,t){return ZH.from(e,t).toString("base64").replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}a(nC,"base64url");function JH(e,t,n){n=n||"utf8";var o=nC(rC(e),"binary"),r=nC(rC(t),n);return cb.format("%s.%s",o,r)}a(JH,"jwsSecuredInput");function oC(e){var t=e.header,n=e.payload,o=e.secret||e.privateKey,r=e.encoding,i=WH(t.alg),s=JH(t,n,r),u=i.sign(s,o);return cb.format("%s.%s",s,u)}a(oC,"jwsSign");function vm(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 tC(t);this.readable=!0,this.header=e.header,this.encoding=e.encoding,this.secret=this.privateKey=this.key=n,this.payload=new tC(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(vm,"SignStream");cb.inherits(vm,KH);vm.prototype.sign=a(function(){try{var t=oC({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");vm.sign=oC;iC.exports=vm});var gC=j((Ele,hC)=>{var cC=Ha().Buffer,sC=tb(),XH=ab(),YH=require("stream"),uC=sb(),QH=require("util"),eZ=/^[a-zA-Z0-9\-_]+?\.[a-zA-Z0-9\-_]+?\.([a-zA-Z0-9\-_]+)?$/;function tZ(e){return Object.prototype.toString.call(e)==="[object Object]"}a(tZ,"isObject");function rZ(e){if(tZ(e))return e;try{return JSON.parse(e)}catch{return}}a(rZ,"safeJsonParse");function lC(e){var t=e.split(".",1)[0];return rZ(cC.from(t,"base64").toString("binary"))}a(lC,"headerFromJWS");function nZ(e){return e.split(".",2).join(".")}a(nZ,"securedInputFromJWS");function dC(e){return e.split(".")[2]}a(dC,"signatureFromJWS");function oZ(e,t){t=t||"utf8";var n=e.split(".")[1];return cC.from(n,"base64").toString(t)}a(oZ,"payloadFromJWS");function pC(e){return eZ.test(e)&&!!lC(e)}a(pC,"isValidJws");function fC(e,t,n){if(!t){var o=new Error("Missing algorithm parameter for jws.verify");throw o.code="MISSING_ALGORITHM",o}e=uC(e);var r=dC(e),i=nZ(e),s=XH(t);return s.verify(i,r,n)}a(fC,"jwsVerify");function mC(e,t){if(t=t||{},e=uC(e),!pC(e))return null;var n=lC(e);if(!n)return null;var o=oZ(e);return(n.typ==="JWT"||t.json)&&(o=JSON.parse(o,t.encoding)),{header:n,payload:o,signature:dC(e)}}a(mC,"jwsDecode");function Xa(e){e=e||{};var t=e.secret;if(t=t??e.publicKey,t=t??e.key,/^hs/i.test(e.algorithm)===!0&&t==null)throw new TypeError("secret must be a string or buffer or a KeyObject");var n=new sC(t);this.readable=!0,this.algorithm=e.algorithm,this.encoding=e.encoding,this.secret=this.publicKey=this.key=n,this.signature=new sC(e.signature),this.secret.once("close",function(){!this.signature.writable&&this.readable&&this.verify()}.bind(this)),this.signature.once("close",function(){!this.secret.writable&&this.readable&&this.verify()}.bind(this))}a(Xa,"VerifyStream");QH.inherits(Xa,YH);Xa.prototype.verify=a(function(){try{var t=fC(this.signature.buffer,this.algorithm,this.key.buffer),n=mC(this.signature.buffer,this.encoding);return this.emit("done",t,n),this.emit("data",t),this.emit("end"),this.readable=!1,t}catch(o){this.readable=!1,this.emit("error",o),this.emit("close")}},"verify");Xa.decode=mC;Xa.isValid=pC;Xa.verify=fC;hC.exports=Xa});var ub=j(zo=>{var yC=aC(),_m=gC(),iZ=["HS256","HS384","HS512","RS256","RS384","RS512","PS256","PS384","PS512","ES256","ES384","ES512"];zo.ALGORITHMS=iZ;zo.sign=yC.sign;zo.verify=_m.verify;zo.decode=_m.decode;zo.isValid=_m.isValid;zo.createSign=a(function(t){return new yC(t)},"createSign");zo.createVerify=a(function(t){return new _m(t)},"createVerify")});var $C=j(wm=>{"use strict";Object.defineProperty(wm,"__esModule",{value:!0});wm.GoogleToken=void 0;var vC=Pm(require("fs")),aZ=St(),sZ=Pm(ub()),cZ=Pm(require("path")),uZ=require("util");function Pm(e,t){if(typeof WeakMap=="function")var n=new WeakMap,o=new WeakMap;return(Pm=a(function(i,s){if(!s&&i&&i.__esModule)return i;var u,h,g={__proto__:null,default:i};if(i===null||Yn(i)!="object"&&typeof i!="function")return g;if(u=s?o:n){if(u.has(i))return u.get(i);u.set(i,g)}for(var y in i)y!=="default"&&{}.hasOwnProperty.call(i,y)&&((h=(u=Object.defineProperty)&&Object.getOwnPropertyDescriptor(i,y))&&(h.get||h.set)?u(g,y,h):g[y]=i[y]);return g},"_interopRequireWildcard"))(e,t)}a(Pm,"_interopRequireWildcard");function Yn(e){"@babel/helpers - typeof";return Yn=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},Yn(e)}a(Yn,"_typeof");function lZ(e,t){IC(e,t),t.add(e)}a(lZ,"_classPrivateMethodInitSpec");function dZ(e,t,n){IC(e,t),t.set(e,n)}a(dZ,"_classPrivateFieldInitSpec");function IC(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}a(IC,"_checkPrivateRedeclaration");function _C(e,t,n){return e.set(un(e,t),n),n}a(_C,"_classPrivateFieldSet");function PC(e,t){return e.get(un(e,t))}a(PC,"_classPrivateFieldGet");function un(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(un,"_assertClassBrand");function wC(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,DC(o.key),o)}}a(wC,"_defineProperties");function AC(e,t,n){return t&&wC(e.prototype,t),n&&wC(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}a(AC,"_createClass");function RC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}a(RC,"_classCallCheck");function pZ(e,t,n){return t=Wu(t),fZ(e,hb()?Reflect.construct(t,n||[],Wu(e).constructor):t.apply(e,n))}a(pZ,"_callSuper");function fZ(e,t){if(t&&(Yn(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return mZ(e)}a(fZ,"_possibleConstructorReturn");function mZ(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}a(mZ,"_assertThisInitialized");function hZ(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&&Zu(e,t)}a(hZ,"_inherits");function lb(e){var t=typeof Map=="function"?new Map:void 0;return lb=a(function(o){if(o===null||!yZ(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 gZ(o,arguments,Wu(this).constructor)}return a(r,"Wrapper"),r.prototype=Object.create(o.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),Zu(r,o)},"_wrapNativeSuper"),lb(e)}a(lb,"_wrapNativeSuper");function gZ(e,t,n){if(hb())return Reflect.construct.apply(null,arguments);var o=[null];o.push.apply(o,t);var r=new(e.bind.apply(e,o));return n&&Zu(r,n.prototype),r}a(gZ,"_construct");function hb(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(hb=a(function(){return!!e},"_isNativeReflectConstruct"))()}a(hb,"_isNativeReflectConstruct");function yZ(e){try{return Function.toString.call(e).indexOf("[native code]")!==-1}catch{return typeof e=="function"}}a(yZ,"_isNativeFunction");function Zu(e,t){return Zu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},Zu(e,t)}a(Zu,"_setPrototypeOf");function Wu(e){return Wu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Wu(e)}a(Wu,"_getPrototypeOf");function Ar(e,t,n){return(t=DC(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}a(Ar,"_defineProperty");function DC(e){var t=vZ(e,"string");return Yn(t)=="symbol"?t:t+""}a(DC,"_toPropertyKey");function vZ(e,t){if(Yn(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var o=n.call(e,t||"default");if(Yn(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}a(vZ,"_toPrimitive");function Dr(){var e,t,n=typeof Symbol=="function"?Symbol:{},o=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function i(P,S,R,I){var l=S&&S.prototype instanceof u?S:u,m=Object.create(l.prototype);return Rr(m,"_invoke",(function(d,v,p){var E,_,pe,oe=0,Be=p||[],me=!1,ee={p:0,n:0,v:e,a:Q,f:Q.bind(e,4),d:a(function(ne,ge){return E=ne,_=0,pe=e,ee.n=ge,s},"d")};function Q(se,ne){for(_=se,pe=ne,t=0;!me&&oe&&!ge&&t<Be.length;t++){var ge,_e=Be[t],Fe=ee.p,Ve=_e[2];se>3?(ge=Ve===ne)&&(pe=_e[(_=_e[4])?5:(_=3,3)],_e[4]=_e[5]=e):_e[0]<=Fe&&((ge=se<2&&Fe<_e[1])?(_=0,ee.v=ne,ee.n=_e[1]):Fe<Ve&&(ge=se<3||_e[0]>ne||ne>Ve)&&(_e[4]=se,_e[5]=ne,ee.n=Ve,_=0))}if(ge||se>1)return s;throw me=!0,ne}return a(Q,"d"),function(se,ne,ge){if(oe>1)throw TypeError("Generator is already running");for(me&&ne===1&&Q(ne,ge),_=ne,pe=ge;(t=_<2?e:pe)||!me;){E||(_?_<3?(_>1&&(ee.n=-1),Q(_,pe)):ee.n=pe:ee.v=pe);try{if(oe=2,E){if(_||(se="next"),t=E[se]){if(!(t=t.call(E,pe)))throw TypeError("iterator result is not an object");if(!t.done)return t;pe=t.value,_<2&&(_=0)}else _===1&&(t=E.return)&&t.call(E),_<2&&(pe=TypeError("The iterator does not provide a '"+se+"' method"),_=1);E=e}else if((t=(me=ee.n<0)?pe:d.call(v,ee))!==s)break}catch(_e){E=e,_=1,pe=_e}finally{oe=1}}return{value:t,done:me}}})(P,R,I),!0),m}a(i,"i");var s={};function u(){}a(u,"Generator");function h(){}a(h,"GeneratorFunction");function g(){}a(g,"GeneratorFunctionPrototype"),t=Object.getPrototypeOf;var y=[][o]?t(t([][o]())):(Rr(t={},o,function(){return this}),t),T=g.prototype=u.prototype=Object.create(y);function b(P){return Object.setPrototypeOf?Object.setPrototypeOf(P,g):(P.__proto__=g,Rr(P,r,"GeneratorFunction")),P.prototype=Object.create(T),P}return a(b,"f"),h.prototype=g,Rr(T,"constructor",g),Rr(g,"constructor",h),h.displayName="GeneratorFunction",Rr(g,r,"GeneratorFunction"),Rr(T),Rr(T,r,"Generator"),Rr(T,o,function(){return this}),Rr(T,"toString",function(){return"[object Generator]"}),(Dr=a(function(){return{w:i,m:b}},"_regenerator"))()}a(Dr,"_regenerator");function Rr(e,t,n,o){var r=Object.defineProperty;try{r({},"",{})}catch{r=0}Rr=a(function(s,u,h,g){if(u)r?r(s,u,{value:h,enumerable:!g,configurable:!g,writable:!g}):s[u]=h;else{var y=a(function(b,P){Rr(s,b,function(S){return this._invoke(b,P,S)})},"o");y("next",0),y("throw",1),y("return",2)}},"_regeneratorDefine"),Rr(e,t,n,o)}a(Rr,"_regeneratorDefine2");function bC(e,t,n,o,r,i,s){try{var u=e[i](s),h=u.value}catch(g){return void n(g)}u.done?t(h):Promise.resolve(h).then(o,r)}a(bC,"asyncGeneratorStep");function Ya(e){return function(){var t=this,n=arguments;return new Promise(function(o,r){var i=e.apply(t,n);function s(h){bC(i,o,r,s,u,"next",h)}a(s,"_next");function u(h){bC(i,o,r,s,u,"throw",h)}a(u,"_throw"),s(void 0)})}}a(Ya,"_asyncToGenerator");var TC=vC.readFile?(0,uZ.promisify)(vC.readFile):Ya(Dr().m(a(function e(){return Dr().w(function(t){for(;;)switch(t.n){case 0:throw new Hu("use key rather than keyFile.","MISSING_CREDENTIALS");case 1:return t.a(2)}},e)},"_callee"))),EC="https://oauth2.googleapis.com/token",_Z="https://oauth2.googleapis.com/revoke?token=",Hu=(function(e){function t(n,o){var r;return RC(this,t),r=pZ(this,t,[n]),Ar(r,"code",void 0),r.code=o,r}return a(t,"ErrorWithCode"),hZ(t,e),AC(t)})(lb(Error)),Gu=new WeakMap,bn=new WeakSet,Ale=wm.GoogleToken=(function(){function e(t){RC(this,e),lZ(this,bn),Ar(this,"expiresAt",void 0),Ar(this,"key",void 0),Ar(this,"keyFile",void 0),Ar(this,"iss",void 0),Ar(this,"sub",void 0),Ar(this,"scope",void 0),Ar(this,"rawToken",void 0),Ar(this,"tokenExpires",void 0),Ar(this,"email",void 0),Ar(this,"additionalClaims",void 0),Ar(this,"eagerRefreshThresholdMillis",void 0),Ar(this,"transporter",{request:a(function(o){return(0,aZ.request)(o)},"request")}),dZ(this,Gu,void 0),un(bn,this,OC).call(this,t)}return a(e,"GoogleToken"),AC(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(Yn(n)==="object"&&(o=n,n=void 0),o=Object.assign({forceRefresh:!1},o),n){var r=n;un(bn,this,SC).call(this,o).then(function(i){return r(null,i)},n);return}return un(bn,this,SC).call(this,o)},"getToken")},{key:"getCredentials",value:(function(){var t=Ya(Dr().m(a(function o(r){var i,s,u,h,g,y,T;return Dr().w(function(b){for(;;)switch(b.n){case 0:i=cZ.extname(r),T=i,b.n=T===".json"?1:T===".der"||T===".crt"||T===".pem"?4:T===".p12"||T===".pfx"?6:7;break;case 1:return b.n=2,TC(r,"utf8");case 2:if(s=b.v,u=JSON.parse(s),h=u.private_key,g=u.client_email,!(!h||!g)){b.n=3;break}throw new Hu("private_key and client_email are required.","MISSING_CREDENTIALS");case 3:return b.a(2,{privateKey:h,clientEmail:g});case 4:return b.n=5,TC(r,"utf8");case 5:return y=b.v,b.a(2,{privateKey:y});case 6:throw new Hu("*.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 Hu("Unknown certificate type. Type is determined based on file extension. Current supported extensions are *.json, and *.pem.","UNKNOWN_CERTIFICATE_TYPE");case 8:return b.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){un(bn,this,xC).call(this).then(function(){return n()},n);return}return un(bn,this,xC).call(this)},"revokeToken")}])})();function SC(e){return db.apply(this,arguments)}a(SC,"_getTokenAsync");function db(){return db=Ya(Dr().m(a(function e(t){return Dr().w(function(n){for(;;)switch(n.n){case 0:if(!(PC(Gu,this)&&!t.forceRefresh)){n.n=1;break}return n.a(2,PC(Gu,this));case 1:return n.p=1,n.n=2,_C(Gu,this,un(bn,this,PZ).call(this,t));case 2:return n.a(2,n.v);case 3:return n.p=3,_C(Gu,this,void 0),n.f(3);case 4:return n.a(2)}},e,this,[[1,,3,4]])},"_callee3"))),db.apply(this,arguments)}a(db,"_getTokenAsync2");function PZ(e){return pb.apply(this,arguments)}a(PZ,"_getTokenAsyncInner");function pb(){return pb=Ya(Dr().m(a(function e(t){var n;return Dr().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||un(bn,this,wZ).call(this);case 4:return o.a(2,un(bn,this,bZ).call(this))}},e,this)},"_callee4"))),pb.apply(this,arguments)}a(pb,"_getTokenAsyncInner2");function wZ(){if(!this.iss)throw new Hu("email is required.","MISSING_CREDENTIALS")}a(wZ,"_ensureEmail");function xC(){return fb.apply(this,arguments)}a(xC,"_revokeTokenAsync");function fb(){return fb=Ya(Dr().m(a(function e(){var t;return Dr().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=_Z+this.accessToken,n.n=2,this.transporter.request({url:t,retry:!0});case 2:un(bn,this,OC).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"))),fb.apply(this,arguments)}a(fb,"_revokeTokenAsync2");function OC(){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,Yn(e.scope)==="object"?this.scope=e.scope.join(" "):this.scope=e.scope,this.eagerRefreshThresholdMillis=e.eagerRefreshThresholdMillis,e.transporter&&(this.transporter=e.transporter)}a(OC,"_configure");function bZ(){return mb.apply(this,arguments)}a(bZ,"_requestToken");function mb(){return mb=Ya(Dr().m(a(function e(){var t,n,o,r,i,s,u,h,g,y;return Dr().w(function(T){for(;;)switch(T.n){case 0:return t=Math.floor(new Date().getTime()/1e3),n=this.additionalClaims||{},o=Object.assign({iss:this.iss,scope:this.scope,aud:EC,exp:t+3600,iat:t,sub:this.sub},n),r=sZ.sign({header:{alg:"RS256"},payload:o,secret:this.key}),T.p=1,T.n=2,this.transporter.request({method:"POST",url:EC,data:new URLSearchParams({grant_type:"urn:ietf:params:oauth:grant-type:jwt-bearer",assertion:r}),responseType:"json",retryConfig:{httpMethodsToRetry:["POST"]}});case 2:return i=T.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,T.a(2,this.rawToken);case 3:throw T.p=3,y=T.v,this.rawToken=void 0,this.tokenExpires=void 0,h=y.response&&(s=y.response)!==null&&s!==void 0&&s.data?(u=y.response)===null||u===void 0?void 0:u.data:{},h.error&&(g=h.error_description?": ".concat(h.error_description):"",y.message="".concat(h.error).concat(g)),y;case 4:return T.a(2)}},e,this,[[1,3]])},"_callee6"))),mb.apply(this,arguments)}a(mb,"_requestToken2")});var yb=j(bm=>{"use strict";Object.defineProperty(bm,"__esModule",{value:!0});bm.JWTAccess=void 0;var TZ=ub(),EZ=an(),CC={alg:"RS256",typ:"JWT"},gb=class e{static{a(this,"JWTAccess")}email;key;keyId;projectId;eagerRefreshThresholdMillis;cache=new EZ.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),h=e.getExpirationTime(u),g;if(Array.isArray(o)&&(o=o.join(" ")),o?g={iss:this.email,sub:this.email,scope:o,exp:h,iat:u}:g={iss:this.email,sub:this.email,aud:t,exp:h,iat:u},n){for(let S in g)if(n[S])throw new Error(`The '${S}' property is not allowed when passing additionalClaims. This claim is included in the JWT by default.`)}let y=this.keyId?{...CC,kid:this.keyId}:CC,T=Object.assign(g,n),b=TZ.sign({header:y,payload:T,secret:this.key}),P=new Headers({authorization:`Bearer ${b}`});return this.cache.set(r,{expiration:h*1e3,headers:P}),P}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)}})})}};bm.JWTAccess=gb});var _b=j(Em=>{"use strict";Object.defineProperty(Em,"__esModule",{value:!0});Em.JWT=void 0;var NC=$C(),SZ=yb(),xZ=Ii(),Tm=Ir(),vb=class e extends xZ.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!==Tm.DEFAULT_UNIVERSE;if(this.subject&&this.universeDomain!==Tm.DEFAULT_UNIVERSE)throw new RangeError(`Service Account user is configured for the credential. Domain-wide delegation is not supported in universes other than ${Tm.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 SZ.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!==Tm.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 NC.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 NC.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.")}};Em.JWT=vb});var wb=j(Qa=>{"use strict";Object.defineProperty(Qa,"__esModule",{value:!0});Qa.UserRefreshClient=Qa.USER_REFRESH_ACCOUNT_TYPE=void 0;var IZ=Ii(),AZ=Ir();Qa.USER_REFRESH_ACCOUNT_TYPE="authorized_user";var Pb=class e extends IZ.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 AZ.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}};Qa.UserRefreshClient=Pb});var Tb=j(es=>{"use strict";Object.defineProperty(es,"__esModule",{value:!0});es.Impersonated=es.IMPERSONATED_ACCOUNT_TYPE=void 0;var kC=Ii(),RZ=St(),DZ=an();es.IMPERSONATED_ACCOUNT_TYPE="impersonated_service_account";var bb=class e extends kC.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 kC.OAuth2Client,this.targetPrincipal=t.targetPrincipal??"",this.delegates=t.delegates??[],this.targetScopes=t.targetScopes??[],this.lifetime=t.lifetime??3600,!!!(0,DZ.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 RZ.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}};es.Impersonated=bb});var Sb=j(Ku=>{"use strict";Object.defineProperty(Ku,"__esModule",{value:!0});Ku.OAuthClientAuthHandler=void 0;Ku.getErrorFromOAuthErrorResponse=CZ;var ts=St(),OZ=Fu(),$Z=["PUT","POST","PATCH"],Eb=class{static{a(this,"OAuthClientAuthHandler")}#e=(0,OZ.createCrypto)();#t;transporter;constructor(t){t&&"clientId"in t?(this.#t=t,this.transporter=new ts.Gaxios):(this.#t=t?.clientAuthentication,this.transporter=t?.transporter||new ts.Gaxios)}applyClientAuthenticationOptions(t,n){t.headers=ts.Gaxios.mergeHeaders(t.headers),this.injectAuthenticatedHeaders(t,n),n||this.injectAuthenticatedRequestBody(t)}injectAuthenticatedHeaders(t,n){if(n)t.headers=ts.Gaxios.mergeHeaders(t.headers,{authorization:`Bearer ${n}`});else if(this.#t?.confidentialClientType==="basic"){t.headers=ts.Gaxios.mergeHeaders(t.headers);let o=this.#t.clientId,r=this.#t.clientSecret||"",i=this.#e.encodeBase64StringUtf8(`${o}:${r}`);ts.Gaxios.mergeHeaders(t.headers,{authorization:`Basic ${i}`})}}injectAuthenticatedRequestBody(t){if(this.#t?.confidentialClientType==="request-body"){let n=(t.method||"GET").toUpperCase();if(!$Z.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"]}}}};Ku.OAuthClientAuthHandler=Eb;function CZ(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(h=>{h!=="message"&&Object.defineProperty(s,h,{value:t[h],writable:!1,enumerable:!0})})}return s}a(CZ,"getErrorFromOAuthErrorResponse")});var xm=j(Sm=>{"use strict";Object.defineProperty(Sm,"__esModule",{value:!0});Sm.StsCredentials=void 0;var NZ=St(),kZ=Ir(),zC=Sb(),zZ=an(),xb=class e extends zC.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,zZ.removeUndefinedValuesInObject)(r))};kZ.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 NZ.GaxiosError&&s.response?(0,zC.getErrorFromOAuthErrorResponse)(s.response.data,s):s}}};Sm.StsCredentials=xb});var Uo=j(Vr=>{"use strict";Object.defineProperty(Vr,"__esModule",{value:!0});Vr.BaseExternalAccountClient=Vr.CLOUD_RESOURCE_MANAGER=Vr.EXTERNAL_ACCOUNT_TYPE=Vr.EXPIRATION_TIME_OFFSET=void 0;var UZ=St(),MZ=require("stream"),Ib=Ir(),FZ=xm(),UC=an(),LZ=qw(),jZ="urn:ietf:params:oauth:grant-type:token-exchange",qZ="urn:ietf:params:oauth:token-type:access_token",Ab="https://www.googleapis.com/auth/cloud-platform",BZ=3600;Vr.EXPIRATION_TIME_OFFSET=300*1e3;Vr.EXTERNAL_ACCOUNT_TYPE="external_account";Vr.CLOUD_RESOURCE_MANAGER="https://cloudresourcemanager.googleapis.com/v1/projects/";var VZ="//iam\\.googleapis\\.com/locations/[^/]+/workforcePools/[^/]+/providers/.+",GZ="https://sts.{universeDomain}/v1/token",Rb=class e extends Ib.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,UC.originalOrCamelOptions)(t),o=n.get("type");if(o&&o!==Vr.EXTERNAL_ACCOUNT_TYPE)throw new Error(`Expected "${Vr.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")??GZ.replace("{universeDomain}",this.universeDomain);let s=n.get("subject_token_type"),u=n.get("workforce_pool_user_project"),h=n.get("service_account_impersonation_url"),g=n.get("service_account_impersonation"),y=(0,UC.originalOrCamelOptions)(g).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 FZ.StsCredentials({tokenExchangeEndpoint:this.tokenUrl,clientAuthentication:this.clientAuth}),this.scopes=n.get("scopes")||[Ab],this.cachedAccessToken=null,this.audience=n.get("audience"),this.subjectTokenType=s,this.workforcePoolUserProject=u;let T=new RegExp(VZ);if(this.workforcePoolUserProject&&!this.audience.match(T))throw new Error("workforcePoolUserProject should not be set for non-workforce pool credentials.");this.serviceAccountImpersonationUrl=h,this.serviceAccountImpersonationLifetime=y,this.serviceAccountImpersonationLifetime?this.configLifetimeRequested=!0:(this.configLifetimeRequested=!1,this.serviceAccountImpersonationLifetime=BZ),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}`};Ib.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=UZ.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 MZ.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:jZ,audience:this.audience,requestedTokenType:qZ,subjectToken:t,subjectTokenType:this.subjectTokenType,scope:this.serviceAccountImpersonationUrl?[Ab]: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"}};Ib.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||[Ab]}getMetricsHeaderValue(){let t=process.version.replace(/^v/,""),n=this.serviceAccountImpersonationUrl!==void 0,o=this.credentialSourceType?this.credentialSourceType:"unknown";return`gl-node/${t} auth/${LZ.pkg.version} google-byoid-sdk source/${o} sa-impersonation/${n} config-lifetime/${this.configLifetimeRequested}`}getTokenUrl(){return this.tokenUrl}};Vr.BaseExternalAccountClient=Rb});var MC=j(Im=>{"use strict";Object.defineProperty(Im,"__esModule",{value:!0});Im.FileSubjectTokenSupplier=void 0;var Ob=require("util"),$b=require("fs"),HZ=(0,Ob.promisify)($b.readFile??(()=>{})),ZZ=(0,Ob.promisify)($b.realpath??(()=>{})),WZ=(0,Ob.promisify)($b.lstat??(()=>{})),Db=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 ZZ(t),!(await WZ(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 HZ(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}};Im.FileSubjectTokenSupplier=Db});var FC=j(Am=>{"use strict";Object.defineProperty(Am,"__esModule",{value:!0});Am.UrlSubjectTokenSupplier=void 0;var KZ=Ir(),Cb=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};KZ.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}};Am.UrlSubjectTokenSupplier=Cb});var LC=j(Or=>{"use strict";Object.defineProperty(Or,"__esModule",{value:!0});Or.CertificateSubjectTokenSupplier=Or.InvalidConfigurationError=Or.CertificateSourceUnavailableError=Or.CERTIFICATE_CONFIGURATION_ENV_VARIABLE=void 0;var Rm=an(),Dm=require("fs"),Om=require("crypto"),JZ=require("https");Or.CERTIFICATE_CONFIGURATION_ENV_VARIABLE="GOOGLE_API_CERTIFICATE_CONFIG";var Tn=class extends Error{static{a(this,"CertificateSourceUnavailableError")}constructor(t){super(t),this.name="CertificateSourceUnavailableError"}};Or.CertificateSourceUnavailableError=Tn;var Gr=class extends Error{static{a(this,"InvalidConfigurationError")}constructor(t){super(t),this.name="InvalidConfigurationError"}};Or.InvalidConfigurationError=Gr;var Nb=class{static{a(this,"CertificateSubjectTokenSupplier")}certificateConfigPath;trustChainPath;cert;key;constructor(t){if(!t.useDefaultCertificateConfig&&!t.certificateConfigLocation)throw new Gr("Either `useDefaultCertificateConfig` must be true or a `certificateConfigLocation` must be provided.");if(t.useDefaultCertificateConfig&&t.certificateConfigLocation)throw new Gr("Both `useDefaultCertificateConfig` and `certificateConfigLocation` cannot be provided.");this.trustChainPath=t.trustChainPath,this.certificateConfigPath=t.certificateConfigLocation??""}async createMtlsHttpsAgent(){if(!this.key||!this.cert)throw new Gr("Cannot create mTLS Agent with missing certificate or key");return new JZ.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,Rm.isValidFile)(t))return t;throw new Tn(`Provided certificate config path is invalid: ${t}`)}let n=process.env[Or.CERTIFICATE_CONFIGURATION_ENV_VARIABLE];if(n){if(await(0,Rm.isValidFile)(n))return n;throw new Tn(`Path from environment variable "${Or.CERTIFICATE_CONFIGURATION_ENV_VARIABLE}" is invalid: ${n}`)}let o=(0,Rm.getWellKnownCertificateConfigFileLocation)();if(await(0,Rm.isValidFile)(o))return o;throw new Tn(`Could not find certificate configuration file. Searched override path, the "${Or.CERTIFICATE_CONFIGURATION_ENV_VARIABLE}" env var, and the gcloud path (${o}).`)}async#t(){let t=this.certificateConfigPath,n;try{n=await Dm.promises.readFile(t,"utf8")}catch{throw new Tn(`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 Gr(`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 Gr?o:new Gr(`Failed to parse certificate config from ${t}: ${o.message}`)}}async#r(t,n){let o,r;try{o=await Dm.promises.readFile(t),new Om.X509Certificate(o)}catch(i){let s=i instanceof Error?i.message:String(i);throw new Tn(`Failed to read certificate file at ${t}: ${s}`)}try{r=await Dm.promises.readFile(n),(0,Om.createPrivateKey)(r)}catch(i){let s=i instanceof Error?i.message:String(i);throw new Tn(`Failed to read private key file at ${n}: ${s}`)}return{cert:o,key:r}}async#n(t){let n=new Om.X509Certificate(t);if(!this.trustChainPath)return JSON.stringify([n.raw.toString("base64")]);try{let i=((await Dm.promises.readFile(this.trustChainPath,"utf8")).match(/-----BEGIN CERTIFICATE-----[^-]+-----END CERTIFICATE-----/g)??[]).map((h,g)=>{try{return new Om.X509Certificate(h)}catch(y){let T=y instanceof Error?y.message:String(y);throw new Gr(`Failed to parse certificate at index ${g} in trust chain file ${this.trustChainPath}: ${T}`)}}),s=i.findIndex(h=>n.raw.equals(h.raw)),u;if(s===-1)u=[n,...i];else if(s===0)u=i;else throw new Gr(`Leaf certificate exists in the trust chain but is not the first entry (found at index ${s}).`);return JSON.stringify(u.map(h=>h.raw.toString("base64")))}catch(o){if(o instanceof Gr)throw o;let r=o instanceof Error?o.message:String(o);throw new Tn(`Failed to process certificate chain from ${this.trustChainPath}: ${r}`)}}};Or.CertificateSubjectTokenSupplier=Nb});var Ub=j($m=>{"use strict";Object.defineProperty($m,"__esModule",{value:!0});$m.IdentityPoolClient=void 0;var XZ=Uo(),kb=an(),YZ=MC(),QZ=FC(),jC=LC(),eW=xm(),qC=St(),zb=class e extends XZ.BaseExternalAccountClient{static{a(this,"IdentityPoolClient")}subjectTokenSupplier;constructor(t){super(t);let n=(0,kb.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,kb.originalOrCamelOptions)(o),s=(0,kb.originalOrCamelOptions)(i.get("format")),u=s.get("type")||"text",h=s.get("subject_token_field_name");if(u!=="json"&&u!=="text")throw new Error(`Invalid credential_source format "${u}"`);if(u==="json"&&!h)throw new Error("Missing subject_token_field_name for JSON credential_source format");let g=i.get("file"),y=i.get("url"),T=i.get("certificate"),b=i.get("headers");if(g&&y||y&&T||g&&T)throw new Error('No valid Identity Pool "credential_source" provided, must be either file, url, or certificate.');if(g)this.credentialSourceType="file",this.subjectTokenSupplier=new YZ.FileSubjectTokenSupplier({filePath:g,formatType:u,subjectTokenFieldName:h});else if(y)this.credentialSourceType="url",this.subjectTokenSupplier=new QZ.UrlSubjectTokenSupplier({url:y,formatType:u,subjectTokenFieldName:h,headers:b,additionalGaxiosOptions:e.RETRY_CONFIG});else if(T){this.credentialSourceType="certificate";let P=new jC.CertificateSubjectTokenSupplier({useDefaultCertificateConfig:T.use_default_certificate_config,certificateConfigLocation:T.certificate_config_location,trustChainPath:T.trust_chain_path});this.subjectTokenSupplier=P}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 jC.CertificateSubjectTokenSupplier){let n=await this.subjectTokenSupplier.createMtlsHttpsAgent();this.stsCredential=new eW.StsCredentials({tokenExchangeEndpoint:this.getTokenUrl(),clientAuthentication:this.clientAuth,transporter:new qC.Gaxios({agent:n})}),this.transporter=new qC.Gaxios({...this.transporter.defaults||{},agent:n})}return t}};$m.IdentityPoolClient=zb});var Fb=j(Nm=>{"use strict";Object.defineProperty(Nm,"__esModule",{value:!0});Nm.AwsRequestSigner=void 0;var Cm=St(),VC=Fu(),BC="AWS4-HMAC-SHA256",tW="aws4_request",Mb=class{static{a(this,"AwsRequestSigner")}getCredentials;region;crypto;constructor(t,n){this.getCredentials=t,this.region=n,this.crypto=(0,VC.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(),h=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 g=await nW({crypto:this.crypto,host:h.host,canonicalUri:h.pathname,canonicalQuerystring:h.search.slice(1),method:r,region:this.region,securityCredentials:u,requestPayload:i,additionalAmzHeaders:s}),y=Cm.Gaxios.mergeHeaders(g.amzDate?{"x-amz-date":g.amzDate}:{},{authorization:g.authorizationHeader,host:h.host},s||{});u.token&&Cm.Gaxios.mergeHeaders(y,{"x-amz-security-token":u.token});let T={url:o,method:r,headers:y};return i!==void 0&&(T.body=i),T}};Nm.AwsRequestSigner=Mb;async function Ju(e,t,n){return await e.signWithHmacSha256(t,n)}a(Ju,"sign");async function rW(e,t,n,o,r){let i=await Ju(e,`AWS4${t}`,n),s=await Ju(e,i,o),u=await Ju(e,s,r);return await Ju(e,u,"aws4_request")}a(rW,"getSigningKey");async function nW(e){let t=Cm.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=Cm.Gaxios.mergeHeaders({host:e.host},t.has("date")?{}:{"x-amz-date":i},t),h="",g=[...u.keys()].sort();g.forEach(m=>{h+=`${m}:${u.get(m)}
41
41
  `});let y=g.join(";"),T=await e.crypto.sha256DigestHex(n),b=`${e.method.toUpperCase()}
42
42
  ${e.canonicalUri}
43
43
  ${e.canonicalQuerystring}
44
44
  ${h}
45
45
  ${y}
46
- ${T}`,P=`${s}/${e.region}/${o}/${eW}`,S=`${BC}
46
+ ${T}`,P=`${s}/${e.region}/${o}/${tW}`,S=`${BC}
47
47
  ${i}
48
48
  ${P}
49
- `+await e.crypto.sha256DigestHex(b),R=await tW(e.crypto,e.securityCredentials.secretAccessKey,s,e.region,o),I=await Ju(e.crypto,R,S),l=`${BC} Credential=${e.securityCredentials.accessKeyId}/${P}, SignedHeaders=${y}, Signature=${(0,VC.fromArrayBufferToHex)(I)}`;return{amzDate:t.has("date")?void 0:i,authorizationHeader:l,canonicalQuerystring:e.canonicalQuerystring}}a(rW,"generateAuthenticationHeaderMap")});var GC=j(zm=>{"use strict";Object.defineProperty(zm,"__esModule",{value:!0});zm.DefaultAwsSecurityCredentialsSupplier=void 0;var km=Ir(),Lb=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};km.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 km.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 km.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 km.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}};zm.DefaultAwsSecurityCredentialsSupplier=Lb});var qb=j(Um=>{"use strict";Object.defineProperty(Um,"__esModule",{value:!0});Um.AwsClient=void 0;var nW=Fb(),oW=Uo(),iW=GC(),HC=an(),aW=St(),jb=class e extends oW.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,HC.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,HC.originalOrCamelOptions)(o);this.environmentId=i.get("environment_id");let s=i.get("region_url"),u=i.get("url"),h=i.get("imdsv2_session_token_url");this.awsSecurityCredentialsSupplier=new iW.DefaultAwsSecurityCredentialsSupplier({regionUrl:s,securityCredentialsUrl:u,imdsV2SessionTokenUrl:h}),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 nW.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 aW.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}))}};Um.AwsClient=jb});var Zb=j(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 Mm="urn:ietf:params:oauth:token-type:saml2",Bb="urn:ietf:params:oauth:token-type:id_token",Vb="urn:ietf:params:oauth:token-type:jwt",Gb=class{static{a(this,"ExecutableResponse")}version;success;expirationTime;tokenType;errorCode;errorMessage;subjectToken;constructor(t){if(!t.version)throw new Fm("Executable response must contain a 'version' field.");if(t.success===void 0)throw new Lm("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!==Mm&&this.tokenType!==Bb&&this.tokenType!==Vb)throw new jm(`Executable response must contain a 'token_type' field when successful and it must be one of ${Bb}, ${Vb}, or ${Mm}.`);if(this.tokenType===Mm){if(!t.saml_response)throw new Xu(`Executable response must contain a 'saml_response' field when token_type=${Mm}.`);this.subjectToken=t.saml_response}else{if(!t.id_token)throw new Xu(`Executable response must contain a 'id_token' field when token_type=${Bb} or ${Vb}.`);this.subjectToken=t.id_token}}else{if(!t.code)throw new qm("Executable response must contain a 'code' field when unsuccessful.");if(!t.message)throw new Bm("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)}};It.ExecutableResponse=Gb;var En=class extends Error{static{a(this,"ExecutableResponseError")}constructor(t){super(t),Object.setPrototypeOf(this,new.target.prototype)}};It.ExecutableResponseError=En;var Fm=class extends En{static{a(this,"InvalidVersionFieldError")}};It.InvalidVersionFieldError=Fm;var Lm=class extends En{static{a(this,"InvalidSuccessFieldError")}};It.InvalidSuccessFieldError=Lm;var Hb=class extends En{static{a(this,"InvalidExpirationTimeFieldError")}};It.InvalidExpirationTimeFieldError=Hb;var jm=class extends En{static{a(this,"InvalidTokenTypeFieldError")}};It.InvalidTokenTypeFieldError=jm;var qm=class extends En{static{a(this,"InvalidCodeFieldError")}};It.InvalidCodeFieldError=qm;var Bm=class extends En{static{a(this,"InvalidMessageFieldError")}};It.InvalidMessageFieldError=Bm;var Xu=class extends En{static{a(this,"InvalidSubjectTokenError")}};It.InvalidSubjectTokenError=Xu});var Jb=j(rs=>{"use strict";Object.defineProperty(rs,"__esModule",{value:!0});rs.PluggableAuthHandler=rs.ExecutableError=void 0;var Ai=Zb(),sW=require("child_process"),Wb=require("fs"),Vm=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)}};rs.ExecutableError=Vm;var Kb=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=sW.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 h=JSON.parse(i),g=new Ai.ExecutableResponse(h);return n(g)}catch(h){return h instanceof Ai.ExecutableResponseError?o(h):o(new Ai.ExecutableResponseError(`The executable returned an invalid response: ${i}`))}else return o(new Vm(i,u.toString()))})})}async retrieveCachedResponse(){if(!this.outputFile||this.outputFile.length===0)return;let t;try{t=await Wb.promises.realpath(this.outputFile)}catch{return}if(!(await Wb.promises.lstat(t)).isFile())return;let n=await Wb.promises.readFile(t,{encoding:"utf8"});if(n!=="")try{let o=JSON.parse(n);return new Ai.ExecutableResponse(o).isValid()?new Ai.ExecutableResponse(o):void 0}catch(o){throw o instanceof Ai.ExecutableResponseError?o:new Ai.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}};rs.PluggableAuthHandler=Kb});var Yb=j(ns=>{"use strict";Object.defineProperty(ns,"__esModule",{value:!0});ns.PluggableAuthClient=ns.ExecutableError=void 0;var cW=Uo(),uW=Zb(),ZC=Jb(),lW=Jb();Object.defineProperty(ns,"ExecutableError",{enumerable:!0,get:a(function(){return lW.ExecutableError},"get")});var dW=30*1e3,WC=5*1e3,KC=120*1e3,pW="GOOGLE_EXTERNAL_ACCOUNT_ALLOW_EXECUTABLES",JC=1,Xb=class extends cW.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=dW;else if(this.timeoutMillis=t.credential_source.executable.timeout_millis,this.timeoutMillis<WC||this.timeoutMillis>KC)throw new Error(`Timeout must be between ${WC} and ${KC} milliseconds.`);this.outputFile=t.credential_source.executable.output_file,this.handler=new ZC.PluggableAuthHandler({command:this.command,timeoutMillis:this.timeoutMillis,outputFile:this.outputFile}),this.credentialSourceType="executable"}async retrieveSubjectToken(){if(process.env[pW]!=="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>JC)throw new Error(`Version of executable is not currently supported, maximum supported version is ${JC}.`);if(!t.success)throw new ZC.ExecutableError(t.errorMessage,t.errorCode);if(this.outputFile&&!t.expirationTime)throw new uW.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}};ns.PluggableAuthClient=Xb});var eT=j(Gm=>{"use strict";Object.defineProperty(Gm,"__esModule",{value:!0});Gm.ExternalAccountClient=void 0;var fW=Uo(),mW=Ub(),hW=qb(),gW=Yb(),Qb=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===fW.EXTERNAL_ACCOUNT_TYPE?t.credential_source?.environment_id?new hW.AwsClient(t):t.credential_source?.executable?new gW.PluggableAuthClient(t):new mW.IdentityPoolClient(t):null}};Gm.ExternalAccountClient=Qb});var nT=j(os=>{"use strict";Object.defineProperty(os,"__esModule",{value:!0});os.ExternalAccountAuthorizedUserClient=os.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE=void 0;var YC=Ir(),XC=Sb(),QC=St(),yW=require("stream"),vW=Uo();os.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE="external_account_authorized_user";var _W="https://sts.{universeDomain}/v1/oauthtoken",tT=class e extends XC.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})};YC.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 QC.GaxiosError&&r.response?(0,XC.getErrorFromOAuthErrorResponse)(r.response.data,r):r}}},rT=class extends YC.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 tT({tokenRefreshEndpoint:t.token_url??_W.replace("{universeDomain}",this.universeDomain),transporter:this.transporter,clientAuthentication:n}),this.cachedAccessToken=null,this.quotaProjectId=t.quota_project_id,typeof t?.eagerRefreshThresholdMillis!="number"?this.eagerRefreshThresholdMillis=vW.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=QC.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 yW.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}};os.ExternalAccountAuthorizedUserClient=rT});var nN=j(ln=>{"use strict";Object.defineProperty(ln,"__esModule",{value:!0});ln.GoogleAuth=ln.GoogleAuthExceptionMessages=void 0;var PW=require("child_process"),Yu=require("fs"),wW=St(),Qu=Mu(),bW=require("os"),oT=require("path"),TW=Fu(),EW=Xw(),SW=Qw(),xW=eb(),is=_b(),eN=wb(),as=Tb(),IW=eT(),el=Uo(),iT=Ir(),tN=nT(),rN=an();ln.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(b),R=await rW(e.crypto,e.securityCredentials.secretAccessKey,s,e.region,o),I=await Ju(e.crypto,R,S),l=`${BC} Credential=${e.securityCredentials.accessKeyId}/${P}, SignedHeaders=${y}, Signature=${(0,VC.fromArrayBufferToHex)(I)}`;return{amzDate:t.has("date")?void 0:i,authorizationHeader:l,canonicalQuerystring:e.canonicalQuerystring}}a(nW,"generateAuthenticationHeaderMap")});var GC=j(zm=>{"use strict";Object.defineProperty(zm,"__esModule",{value:!0});zm.DefaultAwsSecurityCredentialsSupplier=void 0;var km=Ir(),Lb=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};km.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 km.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 km.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 km.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}};zm.DefaultAwsSecurityCredentialsSupplier=Lb});var qb=j(Um=>{"use strict";Object.defineProperty(Um,"__esModule",{value:!0});Um.AwsClient=void 0;var oW=Fb(),iW=Uo(),aW=GC(),HC=an(),sW=St(),jb=class e extends iW.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,HC.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,HC.originalOrCamelOptions)(o);this.environmentId=i.get("environment_id");let s=i.get("region_url"),u=i.get("url"),h=i.get("imdsv2_session_token_url");this.awsSecurityCredentialsSupplier=new aW.DefaultAwsSecurityCredentialsSupplier({regionUrl:s,securityCredentialsUrl:u,imdsV2SessionTokenUrl:h}),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 oW.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 sW.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}))}};Um.AwsClient=jb});var Zb=j(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 Mm="urn:ietf:params:oauth:token-type:saml2",Bb="urn:ietf:params:oauth:token-type:id_token",Vb="urn:ietf:params:oauth:token-type:jwt",Gb=class{static{a(this,"ExecutableResponse")}version;success;expirationTime;tokenType;errorCode;errorMessage;subjectToken;constructor(t){if(!t.version)throw new Fm("Executable response must contain a 'version' field.");if(t.success===void 0)throw new Lm("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!==Mm&&this.tokenType!==Bb&&this.tokenType!==Vb)throw new jm(`Executable response must contain a 'token_type' field when successful and it must be one of ${Bb}, ${Vb}, or ${Mm}.`);if(this.tokenType===Mm){if(!t.saml_response)throw new Xu(`Executable response must contain a 'saml_response' field when token_type=${Mm}.`);this.subjectToken=t.saml_response}else{if(!t.id_token)throw new Xu(`Executable response must contain a 'id_token' field when token_type=${Bb} or ${Vb}.`);this.subjectToken=t.id_token}}else{if(!t.code)throw new qm("Executable response must contain a 'code' field when unsuccessful.");if(!t.message)throw new Bm("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)}};It.ExecutableResponse=Gb;var En=class extends Error{static{a(this,"ExecutableResponseError")}constructor(t){super(t),Object.setPrototypeOf(this,new.target.prototype)}};It.ExecutableResponseError=En;var Fm=class extends En{static{a(this,"InvalidVersionFieldError")}};It.InvalidVersionFieldError=Fm;var Lm=class extends En{static{a(this,"InvalidSuccessFieldError")}};It.InvalidSuccessFieldError=Lm;var Hb=class extends En{static{a(this,"InvalidExpirationTimeFieldError")}};It.InvalidExpirationTimeFieldError=Hb;var jm=class extends En{static{a(this,"InvalidTokenTypeFieldError")}};It.InvalidTokenTypeFieldError=jm;var qm=class extends En{static{a(this,"InvalidCodeFieldError")}};It.InvalidCodeFieldError=qm;var Bm=class extends En{static{a(this,"InvalidMessageFieldError")}};It.InvalidMessageFieldError=Bm;var Xu=class extends En{static{a(this,"InvalidSubjectTokenError")}};It.InvalidSubjectTokenError=Xu});var Jb=j(rs=>{"use strict";Object.defineProperty(rs,"__esModule",{value:!0});rs.PluggableAuthHandler=rs.ExecutableError=void 0;var Ai=Zb(),cW=require("child_process"),Wb=require("fs"),Vm=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)}};rs.ExecutableError=Vm;var Kb=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=cW.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 h=JSON.parse(i),g=new Ai.ExecutableResponse(h);return n(g)}catch(h){return h instanceof Ai.ExecutableResponseError?o(h):o(new Ai.ExecutableResponseError(`The executable returned an invalid response: ${i}`))}else return o(new Vm(i,u.toString()))})})}async retrieveCachedResponse(){if(!this.outputFile||this.outputFile.length===0)return;let t;try{t=await Wb.promises.realpath(this.outputFile)}catch{return}if(!(await Wb.promises.lstat(t)).isFile())return;let n=await Wb.promises.readFile(t,{encoding:"utf8"});if(n!=="")try{let o=JSON.parse(n);return new Ai.ExecutableResponse(o).isValid()?new Ai.ExecutableResponse(o):void 0}catch(o){throw o instanceof Ai.ExecutableResponseError?o:new Ai.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}};rs.PluggableAuthHandler=Kb});var Yb=j(ns=>{"use strict";Object.defineProperty(ns,"__esModule",{value:!0});ns.PluggableAuthClient=ns.ExecutableError=void 0;var uW=Uo(),lW=Zb(),ZC=Jb(),dW=Jb();Object.defineProperty(ns,"ExecutableError",{enumerable:!0,get:a(function(){return dW.ExecutableError},"get")});var pW=30*1e3,WC=5*1e3,KC=120*1e3,fW="GOOGLE_EXTERNAL_ACCOUNT_ALLOW_EXECUTABLES",JC=1,Xb=class extends uW.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=pW;else if(this.timeoutMillis=t.credential_source.executable.timeout_millis,this.timeoutMillis<WC||this.timeoutMillis>KC)throw new Error(`Timeout must be between ${WC} and ${KC} milliseconds.`);this.outputFile=t.credential_source.executable.output_file,this.handler=new ZC.PluggableAuthHandler({command:this.command,timeoutMillis:this.timeoutMillis,outputFile:this.outputFile}),this.credentialSourceType="executable"}async retrieveSubjectToken(){if(process.env[fW]!=="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>JC)throw new Error(`Version of executable is not currently supported, maximum supported version is ${JC}.`);if(!t.success)throw new ZC.ExecutableError(t.errorMessage,t.errorCode);if(this.outputFile&&!t.expirationTime)throw new lW.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}};ns.PluggableAuthClient=Xb});var eT=j(Gm=>{"use strict";Object.defineProperty(Gm,"__esModule",{value:!0});Gm.ExternalAccountClient=void 0;var mW=Uo(),hW=Ub(),gW=qb(),yW=Yb(),Qb=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===mW.EXTERNAL_ACCOUNT_TYPE?t.credential_source?.environment_id?new gW.AwsClient(t):t.credential_source?.executable?new yW.PluggableAuthClient(t):new hW.IdentityPoolClient(t):null}};Gm.ExternalAccountClient=Qb});var nT=j(os=>{"use strict";Object.defineProperty(os,"__esModule",{value:!0});os.ExternalAccountAuthorizedUserClient=os.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE=void 0;var YC=Ir(),XC=Sb(),QC=St(),vW=require("stream"),_W=Uo();os.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE="external_account_authorized_user";var PW="https://sts.{universeDomain}/v1/oauthtoken",tT=class e extends XC.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})};YC.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 QC.GaxiosError&&r.response?(0,XC.getErrorFromOAuthErrorResponse)(r.response.data,r):r}}},rT=class extends YC.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 tT({tokenRefreshEndpoint:t.token_url??PW.replace("{universeDomain}",this.universeDomain),transporter:this.transporter,clientAuthentication:n}),this.cachedAccessToken=null,this.quotaProjectId=t.quota_project_id,typeof t?.eagerRefreshThresholdMillis!="number"?this.eagerRefreshThresholdMillis=_W.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=QC.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 vW.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}};os.ExternalAccountAuthorizedUserClient=rT});var nN=j(ln=>{"use strict";Object.defineProperty(ln,"__esModule",{value:!0});ln.GoogleAuth=ln.GoogleAuthExceptionMessages=void 0;var wW=require("child_process"),Yu=require("fs"),bW=St(),Qu=Mu(),TW=require("os"),oT=require("path"),EW=Fu(),SW=Xw(),xW=Qw(),IW=eb(),is=_b(),eN=wb(),as=Tb(),AW=eT(),el=Uo(),iT=Ir(),tN=nT(),rN=an();ln.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 aT=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(ln.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===ln.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(ln.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 Qu.universe("universe-domain"),t||=iT.DEFAULT_UNIVERSE}catch(n){if(n&&n?.response?.status===404)t=iT.DEFAULT_UNIVERSE;else throw n}return t}async getUniverseDomain(){let t=(0,rN.originalOrCamelOptions)(this.clientOptions).get("universe_domain");try{t??=(await this.getClient()).universeDomain}catch{t??=iT.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 is.JWT?n.scopes=this.scopes:n instanceof el.BaseExternalAccountClient&&(n.scopes=this.getAnyScopes()),await this.#t(n);if(n=await this._tryGetApplicationCredentialsFromWellKnownFile(t),n)return n instanceof is.JWT?n.scopes=this.scopes:n instanceof el.BaseExternalAccountClient&&(n.scopes=this.getAnyScopes()),await this.#t(n);if(await this._checkIsGCE())return t.scopes=this.getAnyScopes(),await this.#t(new EW.Compute(t));throw new Error(ln.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=Qu.getGCPResidency()||await Qu.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=oT.join(r,".config"))}return n&&(n=oT.join(n,"gcloud","application_default_credentials.json"),Yu.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=Yu.realpathSync(t),!Yu.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=Yu.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!==as.IMPERSONATED_ACCOUNT_TYPE)throw new Error(`The incoming JSON object does not have the "${as.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 as.Impersonated({...t,sourceClient:n,targetPrincipal:o,targetScopes:Array.isArray(r)?r:[r]})}fromJSON(t,n={}){let o,r=(0,rN.originalOrCamelOptions)(n).get("universe_domain");return t.type===eN.USER_REFRESH_ACCOUNT_TYPE?(o=new eN.UserRefreshClient(n),o.fromJSON(t)):t.type===as.IMPERSONATED_ACCOUNT_TYPE?o=this.fromImpersonatedJSON(t):t.type===el.EXTERNAL_ACCOUNT_TYPE?(o=IW.ExternalAccountClient.fromJSON({...t,...n}),o.scopes=this.getAnyScopes()):t.type===tN.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE?o=new tN.ExternalAccountAuthorizedUserClient({...t,...n}):(n.scopes=this.scopes,o=new is.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 is.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 is.JWT({...n,apiKey:t})}_isWindows(){let t=bW.platform();return!!(t&&t.length>=3&&t.substring(0,3).toLowerCase()==="win")}async getDefaultServiceProjectId(){return new Promise(t=>{(0,PW.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!==el.EXTERNAL_ACCOUNT_TYPE?null:await(await this.getClient()).getProjectId()}async getGCEProjectId(){try{return await Qu.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 as.Impersonated)return{client_email:t.getTargetPrincipal()};if(t instanceof el.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([Qu.instance("service-accounts/default/email"),this.getUniverseDomain()]);return{client_email:n,universe_domain:o}}throw new Error(ln.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=oT.resolve(this.keyFilename),n=Yu.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 SW.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=wW.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,xW.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 as.Impersonated)return(await o.sign(t)).signedBlob;let i=(0,TW.createCrypto)();if(o instanceof is.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}};ln.GoogleAuth=aT});var oN=j(Hm=>{"use strict";Object.defineProperty(Hm,"__esModule",{value:!0});Hm.IAMAuth=void 0;var sT=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}}};Hm.IAMAuth=sT});var iN=j(Sn=>{"use strict";Object.defineProperty(Sn,"__esModule",{value:!0});Sn.DownscopedClient=Sn.EXPIRATION_TIME_OFFSET=Sn.MAX_ACCESS_BOUNDARY_RULES_COUNT=void 0;var AW=St(),RW=require("stream"),cT=Ir(),DW=xm(),OW="urn:ietf:params:oauth:grant-type:token-exchange",$W="urn:ietf:params:oauth:token-type:access_token",CW="urn:ietf:params:oauth:token-type:access_token";Sn.MAX_ACCESS_BOUNDARY_RULES_COUNT=10;Sn.EXPIRATION_TIME_OFFSET=300*1e3;var uT=class extends cT.AuthClient{static{a(this,"DownscopedClient")}authClient;credentialAccessBoundary;cachedDownscopedAccessToken;stsCredential;constructor(t,n={accessBoundary:{accessBoundaryRules:[]}}){if(super(t instanceof cT.AuthClient?{}:t),t instanceof cT.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>Sn.MAX_ACCESS_BOUNDARY_RULES_COUNT)throw new Error(`The provided access boundary has more than ${Sn.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 DW.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=AW.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 RW.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:OW,requestedTokenType:$W,subjectToken:t,subjectTokenType:CW},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}};Sn.DownscopedClient=uT});var aN=j(Zm=>{"use strict";Object.defineProperty(Zm,"__esModule",{value:!0});Zm.PassThroughClient=void 0;var NW=Ir(),lT=class extends NW.AuthClient{static{a(this,"PassThroughClient")}async request(t){return this.transporter.request(t)}async getAccessToken(){return{}}async getRequestHeaders(){return new Headers}};Zm.PassThroughClient=lT});var tl=j(we=>{"use strict";Object.defineProperty(we,"__esModule",{value:!0});we.GoogleAuth=we.auth=we.PassThroughClient=we.ExternalAccountAuthorizedUserClient=we.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE=we.ExecutableError=we.PluggableAuthClient=we.DownscopedClient=we.BaseExternalAccountClient=we.ExternalAccountClient=we.IdentityPoolClient=we.AwsRequestSigner=we.AwsClient=we.UserRefreshClient=we.LoginTicket=we.ClientAuthentication=we.OAuth2Client=we.CodeChallengeMethod=we.Impersonated=we.JWT=we.JWTAccess=we.IdTokenClient=we.IAMAuth=we.GCPEnv=we.Compute=we.DEFAULT_UNIVERSE=we.AuthClient=we.gaxios=we.gcpMetadata=void 0;var sN=nN();Object.defineProperty(we,"GoogleAuth",{enumerable:!0,get:a(function(){return sN.GoogleAuth},"get")});we.gcpMetadata=Mu();we.gaxios=St();var cN=Ir();Object.defineProperty(we,"AuthClient",{enumerable:!0,get:a(function(){return cN.AuthClient},"get")});Object.defineProperty(we,"DEFAULT_UNIVERSE",{enumerable:!0,get:a(function(){return cN.DEFAULT_UNIVERSE},"get")});var kW=Xw();Object.defineProperty(we,"Compute",{enumerable:!0,get:a(function(){return kW.Compute},"get")});var zW=eb();Object.defineProperty(we,"GCPEnv",{enumerable:!0,get:a(function(){return zW.GCPEnv},"get")});var UW=oN();Object.defineProperty(we,"IAMAuth",{enumerable:!0,get:a(function(){return UW.IAMAuth},"get")});var MW=Qw();Object.defineProperty(we,"IdTokenClient",{enumerable:!0,get:a(function(){return MW.IdTokenClient},"get")});var FW=yb();Object.defineProperty(we,"JWTAccess",{enumerable:!0,get:a(function(){return FW.JWTAccess},"get")});var LW=_b();Object.defineProperty(we,"JWT",{enumerable:!0,get:a(function(){return LW.JWT},"get")});var jW=Tb();Object.defineProperty(we,"Impersonated",{enumerable:!0,get:a(function(){return jW.Impersonated},"get")});var dT=Ii();Object.defineProperty(we,"CodeChallengeMethod",{enumerable:!0,get:a(function(){return dT.CodeChallengeMethod},"get")});Object.defineProperty(we,"OAuth2Client",{enumerable:!0,get:a(function(){return dT.OAuth2Client},"get")});Object.defineProperty(we,"ClientAuthentication",{enumerable:!0,get:a(function(){return dT.ClientAuthentication},"get")});var qW=Zw();Object.defineProperty(we,"LoginTicket",{enumerable:!0,get:a(function(){return qW.LoginTicket},"get")});var BW=wb();Object.defineProperty(we,"UserRefreshClient",{enumerable:!0,get:a(function(){return BW.UserRefreshClient},"get")});var VW=qb();Object.defineProperty(we,"AwsClient",{enumerable:!0,get:a(function(){return VW.AwsClient},"get")});var GW=Fb();Object.defineProperty(we,"AwsRequestSigner",{enumerable:!0,get:a(function(){return GW.AwsRequestSigner},"get")});var HW=Ub();Object.defineProperty(we,"IdentityPoolClient",{enumerable:!0,get:a(function(){return HW.IdentityPoolClient},"get")});var ZW=eT();Object.defineProperty(we,"ExternalAccountClient",{enumerable:!0,get:a(function(){return ZW.ExternalAccountClient},"get")});var WW=Uo();Object.defineProperty(we,"BaseExternalAccountClient",{enumerable:!0,get:a(function(){return WW.BaseExternalAccountClient},"get")});var KW=iN();Object.defineProperty(we,"DownscopedClient",{enumerable:!0,get:a(function(){return KW.DownscopedClient},"get")});var uN=Yb();Object.defineProperty(we,"PluggableAuthClient",{enumerable:!0,get:a(function(){return uN.PluggableAuthClient},"get")});Object.defineProperty(we,"ExecutableError",{enumerable:!0,get:a(function(){return uN.ExecutableError},"get")});var lN=nT();Object.defineProperty(we,"EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE",{enumerable:!0,get:a(function(){return lN.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE},"get")});Object.defineProperty(we,"ExternalAccountAuthorizedUserClient",{enumerable:!0,get:a(function(){return lN.ExternalAccountAuthorizedUserClient},"get")});var JW=aN();Object.defineProperty(we,"PassThroughClient",{enumerable:!0,get:a(function(){return JW.PassThroughClient},"get")});var XW=new sN.GoogleAuth;we.auth=XW});var pN=j(pT=>{"use strict";Object.defineProperty(pT,"__esModule",{value:!0});pT.getAPI=YW;function YW(e,t,n,o){let r;if(typeof t=="string")r=t,t={};else if(typeof t=="object")r=t.version,delete t.version;else throw new Error("Argument error: Accepts only string or object");try{let i=n[r],s=new i(t,o);return Object.freeze(s)}catch(i){throw new Error(`Unable to load endpoint ${e}("${r}"): ${i.message}`)}}a(YW,"getAPI")});var mN=j((Dde,fN)=>{fN.exports=require("util").inspect});var al=j((Ode,NN)=>{var bT=typeof Map=="function"&&Map.prototype,fT=Object.getOwnPropertyDescriptor&&bT?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Jm=bT&&fT&&typeof fT.get=="function"?fT.get:null,hN=bT&&Map.prototype.forEach,TT=typeof Set=="function"&&Set.prototype,mT=Object.getOwnPropertyDescriptor&&TT?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Xm=TT&&mT&&typeof mT.get=="function"?mT.get:null,gN=TT&&Set.prototype.forEach,QW=typeof WeakMap=="function"&&WeakMap.prototype,nl=QW?WeakMap.prototype.has:null,e3=typeof WeakSet=="function"&&WeakSet.prototype,ol=e3?WeakSet.prototype.has:null,t3=typeof WeakRef=="function"&&WeakRef.prototype,yN=t3?WeakRef.prototype.deref:null,r3=Boolean.prototype.valueOf,n3=Object.prototype.toString,o3=Function.prototype.toString,i3=String.prototype.match,ET=String.prototype.slice,Mo=String.prototype.replace,a3=String.prototype.toUpperCase,vN=String.prototype.toLowerCase,IN=RegExp.prototype.test,_N=Array.prototype.concat,xn=Array.prototype.join,s3=Array.prototype.slice,PN=Math.floor,yT=typeof BigInt=="function"?BigInt.prototype.valueOf:null,hT=Object.getOwnPropertySymbols,vT=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,ss=typeof Symbol=="function"&&typeof Symbol.iterator=="object",il=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===ss||!0)?Symbol.toStringTag:null,AN=Object.prototype.propertyIsEnumerable,wN=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function bN(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||IN.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var o=e<0?-PN(-e):PN(e);if(o!==e){var r=String(o),i=ET.call(t,r.length+1);return Mo.call(r,n,"$&_")+"."+Mo.call(Mo.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Mo.call(t,n,"$&_")}a(bN,"addNumericSeparator");var _T=mN(),TN=_T.custom,EN=ON(TN)?TN:null,RN={__proto__:null,double:'"',single:"'"},c3={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};NN.exports=a(function e(t,n,o,r){var i=n||{};if(Qn(i,"quoteStyle")&&!Qn(RN,i.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Qn(i,"maxStringLength")&&(typeof i.maxStringLength=="number"?i.maxStringLength<0&&i.maxStringLength!==1/0:i.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var s=Qn(i,"customInspect")?i.customInspect:!0;if(typeof s!="boolean"&&s!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Qn(i,"indent")&&i.indent!==null&&i.indent!==" "&&!(parseInt(i.indent,10)===i.indent&&i.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Qn(i,"numericSeparator")&&typeof i.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var u=i.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return CN(t,i);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var h=String(t);return u?bN(t,h):h}if(typeof t=="bigint"){var g=String(t)+"n";return u?bN(t,g):g}var y=typeof i.depth>"u"?5:i.depth;if(typeof o>"u"&&(o=0),o>=y&&y>0&&typeof t=="object")return PT(t)?"[Array]":"[Object]";var T=x3(i,o);if(typeof r>"u")r=[];else if($N(r,t)>=0)return"[Circular]";function b(Q,se,ne){if(se&&(r=s3.call(r),r.push(se)),ne){var ge={depth:i.depth};return Qn(i,"quoteStyle")&&(ge.quoteStyle=i.quoteStyle),e(Q,ge,o+1,r)}return e(Q,i,o+1,r)}if(a(b,"inspect"),typeof t=="function"&&!SN(t)){var P=y3(t),S=Km(t,b);return"[Function"+(P?": "+P:" (anonymous)")+"]"+(S.length>0?" { "+xn.call(S,", ")+" }":"")}if(ON(t)){var R=ss?Mo.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):vT.call(t);return typeof t=="object"&&!ss?rl(R):R}if(T3(t)){for(var I="<"+vN.call(String(t.nodeName)),l=t.attributes||[],m=0;m<l.length;m++)I+=" "+l[m].name+"="+DN(u3(l[m].value),"double",i);return I+=">",t.childNodes&&t.childNodes.length&&(I+="..."),I+="</"+vN.call(String(t.nodeName))+">",I}if(PT(t)){if(t.length===0)return"[]";var d=Km(t,b);return T&&!S3(d)?"["+wT(d,T)+"]":"[ "+xn.call(d,", ")+" ]"}if(d3(t)){var v=Km(t,b);return!("cause"in Error.prototype)&&"cause"in t&&!AN.call(t,"cause")?"{ ["+String(t)+"] "+xn.call(_N.call("[cause]: "+b(t.cause),v),", ")+" }":v.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+xn.call(v,", ")+" }"}if(typeof t=="object"&&s){if(EN&&typeof t[EN]=="function"&&_T)return _T(t,{depth:y-o});if(s!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(v3(t)){var p=[];return hN&&hN.call(t,function(Q,se){p.push(b(se,t,!0)+" => "+b(Q,t))}),xN("Map",Jm.call(t),p,T)}if(w3(t)){var E=[];return gN&&gN.call(t,function(Q){E.push(b(Q,t))}),xN("Set",Xm.call(t),E,T)}if(_3(t))return gT("WeakMap");if(b3(t))return gT("WeakSet");if(P3(t))return gT("WeakRef");if(f3(t))return rl(b(Number(t)));if(h3(t))return rl(b(yT.call(t)));if(m3(t))return rl(r3.call(t));if(p3(t))return rl(b(String(t)));if(typeof window<"u"&&t===window)return"{ [object Window] }";if(typeof globalThis<"u"&&t===globalThis||typeof global<"u"&&t===global)return"{ [object globalThis] }";if(!l3(t)&&!SN(t)){var _=Km(t,b),pe=wN?wN(t)===Object.prototype:t instanceof Object||t.constructor===Object,oe=t instanceof Object?"":"null prototype",Be=!pe&&il&&Object(t)===t&&il in t?ET.call(Fo(t),8,-1):oe?"Object":"",me=pe||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",ee=me+(Be||oe?"["+xn.call(_N.call([],Be||[],oe||[]),": ")+"] ":"");return _.length===0?ee+"{}":T?ee+"{"+wT(_,T)+"}":ee+"{ "+xn.call(_,", ")+" }"}return String(t)},"inspect_");function DN(e,t,n){var o=n.quoteStyle||t,r=RN[o];return r+e+r}a(DN,"wrapQuotes");function u3(e){return Mo.call(String(e),/"/g,"&quot;")}a(u3,"quote");function Ri(e){return!il||!(typeof e=="object"&&(il in e||typeof e[il]<"u"))}a(Ri,"canTrustToString");function PT(e){return Fo(e)==="[object Array]"&&Ri(e)}a(PT,"isArray");function l3(e){return Fo(e)==="[object Date]"&&Ri(e)}a(l3,"isDate");function SN(e){return Fo(e)==="[object RegExp]"&&Ri(e)}a(SN,"isRegExp");function d3(e){return Fo(e)==="[object Error]"&&Ri(e)}a(d3,"isError");function p3(e){return Fo(e)==="[object String]"&&Ri(e)}a(p3,"isString");function f3(e){return Fo(e)==="[object Number]"&&Ri(e)}a(f3,"isNumber");function m3(e){return Fo(e)==="[object Boolean]"&&Ri(e)}a(m3,"isBoolean");function ON(e){if(ss)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!vT)return!1;try{return vT.call(e),!0}catch{}return!1}a(ON,"isSymbol");function h3(e){if(!e||typeof e!="object"||!yT)return!1;try{return yT.call(e),!0}catch{}return!1}a(h3,"isBigInt");var g3=Object.prototype.hasOwnProperty||function(e){return e in this};function Qn(e,t){return g3.call(e,t)}a(Qn,"has");function Fo(e){return n3.call(e)}a(Fo,"toStr");function y3(e){if(e.name)return e.name;var t=i3.call(o3.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}a(y3,"nameOf");function $N(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,o=e.length;n<o;n++)if(e[n]===t)return n;return-1}a($N,"indexOf");function v3(e){if(!Jm||!e||typeof e!="object")return!1;try{Jm.call(e);try{Xm.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}a(v3,"isMap");function _3(e){if(!nl||!e||typeof e!="object")return!1;try{nl.call(e,nl);try{ol.call(e,ol)}catch{return!0}return e instanceof WeakMap}catch{}return!1}a(_3,"isWeakMap");function P3(e){if(!yN||!e||typeof e!="object")return!1;try{return yN.call(e),!0}catch{}return!1}a(P3,"isWeakRef");function w3(e){if(!Xm||!e||typeof e!="object")return!1;try{Xm.call(e);try{Jm.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}a(w3,"isSet");function b3(e){if(!ol||!e||typeof e!="object")return!1;try{ol.call(e,ol);try{nl.call(e,nl)}catch{return!0}return e instanceof WeakSet}catch{}return!1}a(b3,"isWeakSet");function T3(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}a(T3,"isElement");function CN(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,o="... "+n+" more character"+(n>1?"s":"");return CN(ET.call(e,0,t.maxStringLength),t)+o}var r=c3[t.quoteStyle||"single"];r.lastIndex=0;var i=Mo.call(Mo.call(e,r,"\\$1"),/[\x00-\x1f]/g,E3);return DN(i,"single",t)}a(CN,"inspectString");function E3(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+a3.call(t.toString(16))}a(E3,"lowbyte");function rl(e){return"Object("+e+")"}a(rl,"markBoxed");function gT(e){return e+" { ? }"}a(gT,"weakCollectionOf");function xN(e,t,n,o){var r=o?wT(n,o):xn.call(n,", ");return e+" ("+t+") {"+r+"}"}a(xN,"collectionOf");function S3(e){for(var t=0;t<e.length;t++)if($N(e[t],`
56
- `)>=0)return!1;return!0}a(S3,"singleLineValues");function x3(e,t){var n;if(e.indent===" ")n=" ";else if(typeof e.indent=="number"&&e.indent>0)n=xn.call(Array(e.indent+1)," ");else return null;return{base:n,prev:xn.call(Array(t+1),n)}}a(x3,"getIndent");function wT(e,t){if(e.length===0)return"";var n=`
55
+ https://cloud.google.com/compute/docs/metadata/predefined-metadata-keys`};var aT=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(ln.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===ln.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(ln.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 Qu.universe("universe-domain"),t||=iT.DEFAULT_UNIVERSE}catch(n){if(n&&n?.response?.status===404)t=iT.DEFAULT_UNIVERSE;else throw n}return t}async getUniverseDomain(){let t=(0,rN.originalOrCamelOptions)(this.clientOptions).get("universe_domain");try{t??=(await this.getClient()).universeDomain}catch{t??=iT.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 is.JWT?n.scopes=this.scopes:n instanceof el.BaseExternalAccountClient&&(n.scopes=this.getAnyScopes()),await this.#t(n);if(n=await this._tryGetApplicationCredentialsFromWellKnownFile(t),n)return n instanceof is.JWT?n.scopes=this.scopes:n instanceof el.BaseExternalAccountClient&&(n.scopes=this.getAnyScopes()),await this.#t(n);if(await this._checkIsGCE())return t.scopes=this.getAnyScopes(),await this.#t(new SW.Compute(t));throw new Error(ln.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=Qu.getGCPResidency()||await Qu.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=oT.join(r,".config"))}return n&&(n=oT.join(n,"gcloud","application_default_credentials.json"),Yu.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=Yu.realpathSync(t),!Yu.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=Yu.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!==as.IMPERSONATED_ACCOUNT_TYPE)throw new Error(`The incoming JSON object does not have the "${as.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 as.Impersonated({...t,sourceClient:n,targetPrincipal:o,targetScopes:Array.isArray(r)?r:[r]})}fromJSON(t,n={}){let o,r=(0,rN.originalOrCamelOptions)(n).get("universe_domain");return t.type===eN.USER_REFRESH_ACCOUNT_TYPE?(o=new eN.UserRefreshClient(n),o.fromJSON(t)):t.type===as.IMPERSONATED_ACCOUNT_TYPE?o=this.fromImpersonatedJSON(t):t.type===el.EXTERNAL_ACCOUNT_TYPE?(o=AW.ExternalAccountClient.fromJSON({...t,...n}),o.scopes=this.getAnyScopes()):t.type===tN.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE?o=new tN.ExternalAccountAuthorizedUserClient({...t,...n}):(n.scopes=this.scopes,o=new is.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 is.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 is.JWT({...n,apiKey:t})}_isWindows(){let t=TW.platform();return!!(t&&t.length>=3&&t.substring(0,3).toLowerCase()==="win")}async getDefaultServiceProjectId(){return new Promise(t=>{(0,wW.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!==el.EXTERNAL_ACCOUNT_TYPE?null:await(await this.getClient()).getProjectId()}async getGCEProjectId(){try{return await Qu.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 as.Impersonated)return{client_email:t.getTargetPrincipal()};if(t instanceof el.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([Qu.instance("service-accounts/default/email"),this.getUniverseDomain()]);return{client_email:n,universe_domain:o}}throw new Error(ln.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=oT.resolve(this.keyFilename),n=Yu.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 xW.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=bW.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,IW.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 as.Impersonated)return(await o.sign(t)).signedBlob;let i=(0,EW.createCrypto)();if(o instanceof is.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}};ln.GoogleAuth=aT});var oN=j(Hm=>{"use strict";Object.defineProperty(Hm,"__esModule",{value:!0});Hm.IAMAuth=void 0;var sT=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}}};Hm.IAMAuth=sT});var iN=j(Sn=>{"use strict";Object.defineProperty(Sn,"__esModule",{value:!0});Sn.DownscopedClient=Sn.EXPIRATION_TIME_OFFSET=Sn.MAX_ACCESS_BOUNDARY_RULES_COUNT=void 0;var RW=St(),DW=require("stream"),cT=Ir(),OW=xm(),$W="urn:ietf:params:oauth:grant-type:token-exchange",CW="urn:ietf:params:oauth:token-type:access_token",NW="urn:ietf:params:oauth:token-type:access_token";Sn.MAX_ACCESS_BOUNDARY_RULES_COUNT=10;Sn.EXPIRATION_TIME_OFFSET=300*1e3;var uT=class extends cT.AuthClient{static{a(this,"DownscopedClient")}authClient;credentialAccessBoundary;cachedDownscopedAccessToken;stsCredential;constructor(t,n={accessBoundary:{accessBoundaryRules:[]}}){if(super(t instanceof cT.AuthClient?{}:t),t instanceof cT.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>Sn.MAX_ACCESS_BOUNDARY_RULES_COUNT)throw new Error(`The provided access boundary has more than ${Sn.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 OW.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=RW.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 DW.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:$W,requestedTokenType:CW,subjectToken:t,subjectTokenType:NW},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}};Sn.DownscopedClient=uT});var aN=j(Zm=>{"use strict";Object.defineProperty(Zm,"__esModule",{value:!0});Zm.PassThroughClient=void 0;var kW=Ir(),lT=class extends kW.AuthClient{static{a(this,"PassThroughClient")}async request(t){return this.transporter.request(t)}async getAccessToken(){return{}}async getRequestHeaders(){return new Headers}};Zm.PassThroughClient=lT});var tl=j(we=>{"use strict";Object.defineProperty(we,"__esModule",{value:!0});we.GoogleAuth=we.auth=we.PassThroughClient=we.ExternalAccountAuthorizedUserClient=we.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE=we.ExecutableError=we.PluggableAuthClient=we.DownscopedClient=we.BaseExternalAccountClient=we.ExternalAccountClient=we.IdentityPoolClient=we.AwsRequestSigner=we.AwsClient=we.UserRefreshClient=we.LoginTicket=we.ClientAuthentication=we.OAuth2Client=we.CodeChallengeMethod=we.Impersonated=we.JWT=we.JWTAccess=we.IdTokenClient=we.IAMAuth=we.GCPEnv=we.Compute=we.DEFAULT_UNIVERSE=we.AuthClient=we.gaxios=we.gcpMetadata=void 0;var sN=nN();Object.defineProperty(we,"GoogleAuth",{enumerable:!0,get:a(function(){return sN.GoogleAuth},"get")});we.gcpMetadata=Mu();we.gaxios=St();var cN=Ir();Object.defineProperty(we,"AuthClient",{enumerable:!0,get:a(function(){return cN.AuthClient},"get")});Object.defineProperty(we,"DEFAULT_UNIVERSE",{enumerable:!0,get:a(function(){return cN.DEFAULT_UNIVERSE},"get")});var zW=Xw();Object.defineProperty(we,"Compute",{enumerable:!0,get:a(function(){return zW.Compute},"get")});var UW=eb();Object.defineProperty(we,"GCPEnv",{enumerable:!0,get:a(function(){return UW.GCPEnv},"get")});var MW=oN();Object.defineProperty(we,"IAMAuth",{enumerable:!0,get:a(function(){return MW.IAMAuth},"get")});var FW=Qw();Object.defineProperty(we,"IdTokenClient",{enumerable:!0,get:a(function(){return FW.IdTokenClient},"get")});var LW=yb();Object.defineProperty(we,"JWTAccess",{enumerable:!0,get:a(function(){return LW.JWTAccess},"get")});var jW=_b();Object.defineProperty(we,"JWT",{enumerable:!0,get:a(function(){return jW.JWT},"get")});var qW=Tb();Object.defineProperty(we,"Impersonated",{enumerable:!0,get:a(function(){return qW.Impersonated},"get")});var dT=Ii();Object.defineProperty(we,"CodeChallengeMethod",{enumerable:!0,get:a(function(){return dT.CodeChallengeMethod},"get")});Object.defineProperty(we,"OAuth2Client",{enumerable:!0,get:a(function(){return dT.OAuth2Client},"get")});Object.defineProperty(we,"ClientAuthentication",{enumerable:!0,get:a(function(){return dT.ClientAuthentication},"get")});var BW=Zw();Object.defineProperty(we,"LoginTicket",{enumerable:!0,get:a(function(){return BW.LoginTicket},"get")});var VW=wb();Object.defineProperty(we,"UserRefreshClient",{enumerable:!0,get:a(function(){return VW.UserRefreshClient},"get")});var GW=qb();Object.defineProperty(we,"AwsClient",{enumerable:!0,get:a(function(){return GW.AwsClient},"get")});var HW=Fb();Object.defineProperty(we,"AwsRequestSigner",{enumerable:!0,get:a(function(){return HW.AwsRequestSigner},"get")});var ZW=Ub();Object.defineProperty(we,"IdentityPoolClient",{enumerable:!0,get:a(function(){return ZW.IdentityPoolClient},"get")});var WW=eT();Object.defineProperty(we,"ExternalAccountClient",{enumerable:!0,get:a(function(){return WW.ExternalAccountClient},"get")});var KW=Uo();Object.defineProperty(we,"BaseExternalAccountClient",{enumerable:!0,get:a(function(){return KW.BaseExternalAccountClient},"get")});var JW=iN();Object.defineProperty(we,"DownscopedClient",{enumerable:!0,get:a(function(){return JW.DownscopedClient},"get")});var uN=Yb();Object.defineProperty(we,"PluggableAuthClient",{enumerable:!0,get:a(function(){return uN.PluggableAuthClient},"get")});Object.defineProperty(we,"ExecutableError",{enumerable:!0,get:a(function(){return uN.ExecutableError},"get")});var lN=nT();Object.defineProperty(we,"EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE",{enumerable:!0,get:a(function(){return lN.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE},"get")});Object.defineProperty(we,"ExternalAccountAuthorizedUserClient",{enumerable:!0,get:a(function(){return lN.ExternalAccountAuthorizedUserClient},"get")});var XW=aN();Object.defineProperty(we,"PassThroughClient",{enumerable:!0,get:a(function(){return XW.PassThroughClient},"get")});var YW=new sN.GoogleAuth;we.auth=YW});var pN=j(pT=>{"use strict";Object.defineProperty(pT,"__esModule",{value:!0});pT.getAPI=QW;function QW(e,t,n,o){let r;if(typeof t=="string")r=t,t={};else if(typeof t=="object")r=t.version,delete t.version;else throw new Error("Argument error: Accepts only string or object");try{let i=n[r],s=new i(t,o);return Object.freeze(s)}catch(i){throw new Error(`Unable to load endpoint ${e}("${r}"): ${i.message}`)}}a(QW,"getAPI")});var mN=j(($de,fN)=>{fN.exports=require("util").inspect});var al=j((Cde,NN)=>{var bT=typeof Map=="function"&&Map.prototype,fT=Object.getOwnPropertyDescriptor&&bT?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Jm=bT&&fT&&typeof fT.get=="function"?fT.get:null,hN=bT&&Map.prototype.forEach,TT=typeof Set=="function"&&Set.prototype,mT=Object.getOwnPropertyDescriptor&&TT?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Xm=TT&&mT&&typeof mT.get=="function"?mT.get:null,gN=TT&&Set.prototype.forEach,e3=typeof WeakMap=="function"&&WeakMap.prototype,nl=e3?WeakMap.prototype.has:null,t3=typeof WeakSet=="function"&&WeakSet.prototype,ol=t3?WeakSet.prototype.has:null,r3=typeof WeakRef=="function"&&WeakRef.prototype,yN=r3?WeakRef.prototype.deref:null,n3=Boolean.prototype.valueOf,o3=Object.prototype.toString,i3=Function.prototype.toString,a3=String.prototype.match,ET=String.prototype.slice,Mo=String.prototype.replace,s3=String.prototype.toUpperCase,vN=String.prototype.toLowerCase,IN=RegExp.prototype.test,_N=Array.prototype.concat,xn=Array.prototype.join,c3=Array.prototype.slice,PN=Math.floor,yT=typeof BigInt=="function"?BigInt.prototype.valueOf:null,hT=Object.getOwnPropertySymbols,vT=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,ss=typeof Symbol=="function"&&typeof Symbol.iterator=="object",il=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===ss||!0)?Symbol.toStringTag:null,AN=Object.prototype.propertyIsEnumerable,wN=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function bN(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||IN.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var o=e<0?-PN(-e):PN(e);if(o!==e){var r=String(o),i=ET.call(t,r.length+1);return Mo.call(r,n,"$&_")+"."+Mo.call(Mo.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Mo.call(t,n,"$&_")}a(bN,"addNumericSeparator");var _T=mN(),TN=_T.custom,EN=ON(TN)?TN:null,RN={__proto__:null,double:'"',single:"'"},u3={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};NN.exports=a(function e(t,n,o,r){var i=n||{};if(Qn(i,"quoteStyle")&&!Qn(RN,i.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Qn(i,"maxStringLength")&&(typeof i.maxStringLength=="number"?i.maxStringLength<0&&i.maxStringLength!==1/0:i.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var s=Qn(i,"customInspect")?i.customInspect:!0;if(typeof s!="boolean"&&s!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Qn(i,"indent")&&i.indent!==null&&i.indent!==" "&&!(parseInt(i.indent,10)===i.indent&&i.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Qn(i,"numericSeparator")&&typeof i.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var u=i.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return CN(t,i);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var h=String(t);return u?bN(t,h):h}if(typeof t=="bigint"){var g=String(t)+"n";return u?bN(t,g):g}var y=typeof i.depth>"u"?5:i.depth;if(typeof o>"u"&&(o=0),o>=y&&y>0&&typeof t=="object")return PT(t)?"[Array]":"[Object]";var T=I3(i,o);if(typeof r>"u")r=[];else if($N(r,t)>=0)return"[Circular]";function b(Q,se,ne){if(se&&(r=c3.call(r),r.push(se)),ne){var ge={depth:i.depth};return Qn(i,"quoteStyle")&&(ge.quoteStyle=i.quoteStyle),e(Q,ge,o+1,r)}return e(Q,i,o+1,r)}if(a(b,"inspect"),typeof t=="function"&&!SN(t)){var P=v3(t),S=Km(t,b);return"[Function"+(P?": "+P:" (anonymous)")+"]"+(S.length>0?" { "+xn.call(S,", ")+" }":"")}if(ON(t)){var R=ss?Mo.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):vT.call(t);return typeof t=="object"&&!ss?rl(R):R}if(E3(t)){for(var I="<"+vN.call(String(t.nodeName)),l=t.attributes||[],m=0;m<l.length;m++)I+=" "+l[m].name+"="+DN(l3(l[m].value),"double",i);return I+=">",t.childNodes&&t.childNodes.length&&(I+="..."),I+="</"+vN.call(String(t.nodeName))+">",I}if(PT(t)){if(t.length===0)return"[]";var d=Km(t,b);return T&&!x3(d)?"["+wT(d,T)+"]":"[ "+xn.call(d,", ")+" ]"}if(p3(t)){var v=Km(t,b);return!("cause"in Error.prototype)&&"cause"in t&&!AN.call(t,"cause")?"{ ["+String(t)+"] "+xn.call(_N.call("[cause]: "+b(t.cause),v),", ")+" }":v.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+xn.call(v,", ")+" }"}if(typeof t=="object"&&s){if(EN&&typeof t[EN]=="function"&&_T)return _T(t,{depth:y-o});if(s!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(_3(t)){var p=[];return hN&&hN.call(t,function(Q,se){p.push(b(se,t,!0)+" => "+b(Q,t))}),xN("Map",Jm.call(t),p,T)}if(b3(t)){var E=[];return gN&&gN.call(t,function(Q){E.push(b(Q,t))}),xN("Set",Xm.call(t),E,T)}if(P3(t))return gT("WeakMap");if(T3(t))return gT("WeakSet");if(w3(t))return gT("WeakRef");if(m3(t))return rl(b(Number(t)));if(g3(t))return rl(b(yT.call(t)));if(h3(t))return rl(n3.call(t));if(f3(t))return rl(b(String(t)));if(typeof window<"u"&&t===window)return"{ [object Window] }";if(typeof globalThis<"u"&&t===globalThis||typeof global<"u"&&t===global)return"{ [object globalThis] }";if(!d3(t)&&!SN(t)){var _=Km(t,b),pe=wN?wN(t)===Object.prototype:t instanceof Object||t.constructor===Object,oe=t instanceof Object?"":"null prototype",Be=!pe&&il&&Object(t)===t&&il in t?ET.call(Fo(t),8,-1):oe?"Object":"",me=pe||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",ee=me+(Be||oe?"["+xn.call(_N.call([],Be||[],oe||[]),": ")+"] ":"");return _.length===0?ee+"{}":T?ee+"{"+wT(_,T)+"}":ee+"{ "+xn.call(_,", ")+" }"}return String(t)},"inspect_");function DN(e,t,n){var o=n.quoteStyle||t,r=RN[o];return r+e+r}a(DN,"wrapQuotes");function l3(e){return Mo.call(String(e),/"/g,"&quot;")}a(l3,"quote");function Ri(e){return!il||!(typeof e=="object"&&(il in e||typeof e[il]<"u"))}a(Ri,"canTrustToString");function PT(e){return Fo(e)==="[object Array]"&&Ri(e)}a(PT,"isArray");function d3(e){return Fo(e)==="[object Date]"&&Ri(e)}a(d3,"isDate");function SN(e){return Fo(e)==="[object RegExp]"&&Ri(e)}a(SN,"isRegExp");function p3(e){return Fo(e)==="[object Error]"&&Ri(e)}a(p3,"isError");function f3(e){return Fo(e)==="[object String]"&&Ri(e)}a(f3,"isString");function m3(e){return Fo(e)==="[object Number]"&&Ri(e)}a(m3,"isNumber");function h3(e){return Fo(e)==="[object Boolean]"&&Ri(e)}a(h3,"isBoolean");function ON(e){if(ss)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!vT)return!1;try{return vT.call(e),!0}catch{}return!1}a(ON,"isSymbol");function g3(e){if(!e||typeof e!="object"||!yT)return!1;try{return yT.call(e),!0}catch{}return!1}a(g3,"isBigInt");var y3=Object.prototype.hasOwnProperty||function(e){return e in this};function Qn(e,t){return y3.call(e,t)}a(Qn,"has");function Fo(e){return o3.call(e)}a(Fo,"toStr");function v3(e){if(e.name)return e.name;var t=a3.call(i3.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}a(v3,"nameOf");function $N(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,o=e.length;n<o;n++)if(e[n]===t)return n;return-1}a($N,"indexOf");function _3(e){if(!Jm||!e||typeof e!="object")return!1;try{Jm.call(e);try{Xm.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}a(_3,"isMap");function P3(e){if(!nl||!e||typeof e!="object")return!1;try{nl.call(e,nl);try{ol.call(e,ol)}catch{return!0}return e instanceof WeakMap}catch{}return!1}a(P3,"isWeakMap");function w3(e){if(!yN||!e||typeof e!="object")return!1;try{return yN.call(e),!0}catch{}return!1}a(w3,"isWeakRef");function b3(e){if(!Xm||!e||typeof e!="object")return!1;try{Xm.call(e);try{Jm.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}a(b3,"isSet");function T3(e){if(!ol||!e||typeof e!="object")return!1;try{ol.call(e,ol);try{nl.call(e,nl)}catch{return!0}return e instanceof WeakSet}catch{}return!1}a(T3,"isWeakSet");function E3(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}a(E3,"isElement");function CN(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,o="... "+n+" more character"+(n>1?"s":"");return CN(ET.call(e,0,t.maxStringLength),t)+o}var r=u3[t.quoteStyle||"single"];r.lastIndex=0;var i=Mo.call(Mo.call(e,r,"\\$1"),/[\x00-\x1f]/g,S3);return DN(i,"single",t)}a(CN,"inspectString");function S3(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+s3.call(t.toString(16))}a(S3,"lowbyte");function rl(e){return"Object("+e+")"}a(rl,"markBoxed");function gT(e){return e+" { ? }"}a(gT,"weakCollectionOf");function xN(e,t,n,o){var r=o?wT(n,o):xn.call(n,", ");return e+" ("+t+") {"+r+"}"}a(xN,"collectionOf");function x3(e){for(var t=0;t<e.length;t++)if($N(e[t],`
56
+ `)>=0)return!1;return!0}a(x3,"singleLineValues");function I3(e,t){var n;if(e.indent===" ")n=" ";else if(typeof e.indent=="number"&&e.indent>0)n=xn.call(Array(e.indent+1)," ");else return null;return{base:n,prev:xn.call(Array(t+1),n)}}a(I3,"getIndent");function wT(e,t){if(e.length===0)return"";var n=`
57
57
  `+t.prev+t.base;return n+xn.call(e,","+n)+`
58
- `+t.prev}a(wT,"indentedJoin");function Km(e,t){var n=PT(e),o=[];if(n){o.length=e.length;for(var r=0;r<e.length;r++)o[r]=Qn(e,r)?t(e[r],e):""}var i=typeof hT=="function"?hT(e):[],s;if(ss){s={};for(var u=0;u<i.length;u++)s["$"+i[u]]=i[u]}for(var h in e)Qn(e,h)&&(n&&String(Number(h))===h&&h<e.length||ss&&s["$"+h]instanceof Symbol||(IN.call(/[^\w$]/,h)?o.push(t(h,e)+": "+t(e[h],e)):o.push(h+": "+t(e[h],e))));if(typeof hT=="function")for(var g=0;g<i.length;g++)AN.call(e,i[g])&&o.push("["+t(i[g])+"]: "+t(e[i[g]],e));return o}a(Km,"arrObjKeys")});var zN=j((Cde,kN)=>{"use strict";var I3=al(),A3=Ao(),Ym=a(function(e,t,n){for(var o=e,r;(r=o.next)!=null;o=r)if(r.key===t)return o.next=r.next,n||(r.next=e.next,e.next=r),r},"listGetNode"),R3=a(function(e,t){if(e){var n=Ym(e,t);return n&&n.value}},"listGet"),D3=a(function(e,t,n){var o=Ym(e,t);o?o.value=n:e.next={key:t,next:e.next,value:n}},"listSet"),O3=a(function(e,t){return e?!!Ym(e,t):!1},"listHas"),$3=a(function(e,t){if(e)return Ym(e,t,!0)},"listDelete");kN.exports=a(function(){var t,n={assert:a(function(o){if(!n.has(o))throw new A3("Side channel does not contain "+I3(o))},"assert"),delete:a(function(o){var r=$3(t,o);return r&&t&&!t.next&&(t=void 0),!!r},"delete"),get:a(function(o){return R3(t,o)},"get"),has:a(function(o){return O3(t,o)},"has"),set:a(function(o,r){t||(t={next:void 0}),D3(t,o,r)},"set")};return n},"getSideChannelList")});var ST=j((kde,FN)=>{"use strict";var UN=bu(),MN=FP(),C3=MN([UN("%String.prototype.indexOf%")]);FN.exports=a(function(t,n){var o=UN(t,!!n);return typeof o=="function"&&C3(t,".prototype.")>-1?MN([o]):o},"callBoundIntrinsic")});var xT=j((Ude,jN)=>{"use strict";var N3=bu(),sl=ST(),k3=al(),z3=Ao(),LN=N3("%Map%",!0),U3=sl("Map.prototype.get",!0),M3=sl("Map.prototype.set",!0),F3=sl("Map.prototype.has",!0),L3=sl("Map.prototype.delete",!0),j3=sl("Map.prototype.size",!0);jN.exports=!!LN&&a(function(){var t,n={assert:a(function(o){if(!n.has(o))throw new z3("Side channel does not contain "+k3(o))},"assert"),delete:a(function(o){if(t){var r=L3(t,o);return j3(t)===0&&(t=void 0),r}return!1},"delete"),get:a(function(o){if(t)return U3(t,o)},"get"),has:a(function(o){return t?F3(t,o):!1},"has"),set:a(function(o,r){t||(t=new LN),M3(t,o,r)},"set")};return n},"getSideChannelMap")});var BN=j((Fde,qN)=>{"use strict";var q3=bu(),eh=ST(),B3=al(),Qm=xT(),V3=Ao(),cs=q3("%WeakMap%",!0),G3=eh("WeakMap.prototype.get",!0),H3=eh("WeakMap.prototype.set",!0),Z3=eh("WeakMap.prototype.has",!0),W3=eh("WeakMap.prototype.delete",!0);qN.exports=cs?a(function(){var t,n,o={assert:a(function(r){if(!o.has(r))throw new V3("Side channel does not contain "+B3(r))},"assert"),delete:a(function(r){if(cs&&r&&(typeof r=="object"||typeof r=="function")){if(t)return W3(t,r)}else if(Qm&&n)return n.delete(r);return!1},"delete"),get:a(function(r){return cs&&r&&(typeof r=="object"||typeof r=="function")&&t?G3(t,r):n&&n.get(r)},"get"),has:a(function(r){return cs&&r&&(typeof r=="object"||typeof r=="function")&&t?Z3(t,r):!!n&&n.has(r)},"has"),set:a(function(r,i){cs&&r&&(typeof r=="object"||typeof r=="function")?(t||(t=new cs),H3(t,r,i)):Qm&&(n||(n=Qm()),n.set(r,i))},"set")};return o},"getSideChannelWeakMap"):Qm});var IT=j((jde,VN)=>{"use strict";var K3=Ao(),J3=al(),X3=zN(),Y3=xT(),Q3=BN(),eK=Q3||Y3||X3;VN.exports=a(function(){var t,n={assert:a(function(o){if(!n.has(o))throw new K3("Side channel does not contain "+J3(o))},"assert"),delete:a(function(o){return!!t&&t.delete(o)},"delete"),get:a(function(o){return t&&t.get(o)},"get"),has:a(function(o){return!!t&&t.has(o)},"has"),set:a(function(o,r){t||(t=eK()),t.set(o,r)},"set")};return n},"getSideChannel")});var th=j((Bde,GN)=>{"use strict";var tK=String.prototype.replace,rK=/%20/g,AT={RFC1738:"RFC1738",RFC3986:"RFC3986"};GN.exports={default:AT.RFC3986,formatters:{RFC1738:a(function(e){return tK.call(e,rK,"+")},"RFC1738"),RFC3986:a(function(e){return String(e)},"RFC3986")},RFC1738:AT.RFC1738,RFC3986:AT.RFC3986}});var $T=j((Gde,HN)=>{"use strict";var nK=th(),oK=IT(),RT=Object.prototype.hasOwnProperty,Di=Array.isArray,rh=oK(),us=a(function(t,n){return rh.set(t,n),t},"markOverflow"),Oi=a(function(t){return rh.has(t)},"isOverflow"),cl=a(function(t){return rh.get(t)},"getMaxIndex"),OT=a(function(t,n){rh.set(t,n)},"setMaxIndex"),In=(function(){for(var e=[],t=0;t<256;++t)e[e.length]="%"+((t<16?"0":"")+t.toString(16)).toUpperCase();return e})(),iK=a(function(t){for(;t.length>1;){var n=t.pop(),o=n.obj[n.prop];if(Di(o)){for(var r=[],i=0;i<o.length;++i)typeof o[i]<"u"&&(r[r.length]=o[i]);n.obj[n.prop]=r}}},"compactQueue"),ul=a(function(t,n){for(var o=n&&n.plainObjects?{__proto__:null}:{},r=0;r<t.length;++r)typeof t[r]<"u"&&(o[r]=t[r]);return o},"arrayToObject"),aK=a(function e(t,n,o){if(!n)return t;if(typeof n!="object"&&typeof n!="function"){if(Di(t)){var r=t.length;if(o&&typeof o.arrayLimit=="number"&&r>o.arrayLimit)return us(ul(t.concat(n),o),r);t[r]=n}else if(t&&typeof t=="object")if(Oi(t)){var i=cl(t)+1;t[i]=n,OT(t,i)}else{if(o&&o.strictMerge)return[t,n];(o&&(o.plainObjects||o.allowPrototypes)||!RT.call(Object.prototype,n))&&(t[n]=!0)}else return[t,n];return t}if(!t||typeof t!="object"){if(Oi(n)){for(var s=Object.keys(n),u=o&&o.plainObjects?{__proto__:null,0:t}:{0:t},h=0;h<s.length;h++){var g=parseInt(s[h],10);u[g+1]=n[s[h]]}return us(u,cl(n)+1)}var y=[t].concat(n);return o&&typeof o.arrayLimit=="number"&&y.length>o.arrayLimit?us(ul(y,o),y.length-1):y}var T=t;return Di(t)&&!Di(n)&&(T=ul(t,o)),Di(t)&&Di(n)?(n.forEach(function(b,P){if(RT.call(t,P)){var S=t[P];S&&typeof S=="object"&&b&&typeof b=="object"?t[P]=e(S,b,o):t[t.length]=b}else t[P]=b}),t):Object.keys(n).reduce(function(b,P){var S=n[P];if(RT.call(b,P)?b[P]=e(b[P],S,o):b[P]=S,Oi(n)&&!Oi(b)&&us(b,cl(n)),Oi(b)){var R=parseInt(P,10);String(R)===P&&R>=0&&R>cl(b)&&OT(b,R)}return b},T)},"merge"),sK=a(function(t,n){return Object.keys(n).reduce(function(o,r){return o[r]=n[r],o},t)},"assignSingleSource"),cK=a(function(e,t,n){var o=e.replace(/\+/g," ");if(n==="iso-8859-1")return o.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(o)}catch{return o}},"decode"),DT=1024,uK=a(function(t,n,o,r,i){if(t.length===0)return t;var s=t;if(typeof t=="symbol"?s=Symbol.prototype.toString.call(t):typeof t!="string"&&(s=String(t)),o==="iso-8859-1")return escape(s).replace(/%u[0-9a-f]{4}/gi,function(P){return"%26%23"+parseInt(P.slice(2),16)+"%3B"});for(var u="",h=0;h<s.length;h+=DT){for(var g=s.length>=DT?s.slice(h,h+DT):s,y=[],T=0;T<g.length;++T){var b=g.charCodeAt(T);if(b===45||b===46||b===95||b===126||b>=48&&b<=57||b>=65&&b<=90||b>=97&&b<=122||i===nK.RFC1738&&(b===40||b===41)){y[y.length]=g.charAt(T);continue}if(b<128){y[y.length]=In[b];continue}if(b<2048){y[y.length]=In[192|b>>6]+In[128|b&63];continue}if(b<55296||b>=57344){y[y.length]=In[224|b>>12]+In[128|b>>6&63]+In[128|b&63];continue}T+=1,b=65536+((b&1023)<<10|g.charCodeAt(T)&1023),y[y.length]=In[240|b>>18]+In[128|b>>12&63]+In[128|b>>6&63]+In[128|b&63]}u+=y.join("")}return u},"encode"),lK=a(function(t){for(var n=[{obj:{o:t},prop:"o"}],o=[],r=0;r<n.length;++r)for(var i=n[r],s=i.obj[i.prop],u=Object.keys(s),h=0;h<u.length;++h){var g=u[h],y=s[g];typeof y=="object"&&y!==null&&o.indexOf(y)===-1&&(n[n.length]={obj:s,prop:g},o[o.length]=y)}return iK(n),t},"compact"),dK=a(function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},"isRegExp"),pK=a(function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},"isBuffer"),fK=a(function(t,n,o,r){if(Oi(t)){var i=cl(t)+1;return t[i]=n,OT(t,i),t}var s=[].concat(t,n);return s.length>o?us(ul(s,{plainObjects:r}),s.length-1):s},"combine"),mK=a(function(t,n){if(Di(t)){for(var o=[],r=0;r<t.length;r+=1)o[o.length]=n(t[r]);return o}return n(t)},"maybeMap");HN.exports={arrayToObject:ul,assign:sK,combine:fK,compact:lK,decode:cK,encode:uK,isBuffer:pK,isOverflow:Oi,isRegExp:dK,markOverflow:us,maybeMap:mK,merge:aK}});var YN=j((Zde,XN)=>{"use strict";var WN=IT(),nh=$T(),ll=th(),hK=Object.prototype.hasOwnProperty,KN={brackets:a(function(t){return t+"[]"},"brackets"),comma:"comma",indices:a(function(t,n){return t+"["+n+"]"},"indices"),repeat:a(function(t){return t},"repeat")},An=Array.isArray,gK=Array.prototype.push,JN=a(function(e,t){gK.apply(e,An(t)?t:[t])},"pushToArray"),yK=Date.prototype.toISOString,ZN=ll.default,Ot={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:nh.encode,encodeValuesOnly:!1,filter:void 0,format:ZN,formatter:ll.formatters[ZN],indices:!1,serializeDate:a(function(t){return yK.call(t)},"serializeDate"),skipNulls:!1,strictNullHandling:!1},vK=a(function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},"isNonNullishPrimitive"),CT={},_K=a(function e(t,n,o,r,i,s,u,h,g,y,T,b,P,S,R,I,l,m){for(var d=t,v=m,p=0,E=!1;(v=v.get(CT))!==void 0&&!E;){var _=v.get(t);if(p+=1,typeof _<"u"){if(_===p)throw new RangeError("Cyclic object value");E=!0}typeof v.get(CT)>"u"&&(p=0)}if(typeof y=="function"?d=y(n,d):d instanceof Date?d=P(d):o==="comma"&&An(d)&&(d=nh.maybeMap(d,function(nt){return nt instanceof Date?P(nt):nt})),d===null){if(s)return g&&!I?g(n,Ot.encoder,l,"key",S):n;d=""}if(vK(d)||nh.isBuffer(d)){if(g){var pe=I?n:g(n,Ot.encoder,l,"key",S);return[R(pe)+"="+R(g(d,Ot.encoder,l,"value",S))]}return[R(n)+"="+R(String(d))]}var oe=[];if(typeof d>"u")return oe;var Be;if(o==="comma"&&An(d))I&&g&&(d=nh.maybeMap(d,g)),Be=[{value:d.length>0?d.join(",")||null:void 0}];else if(An(y))Be=y;else{var me=Object.keys(d);Be=T?me.sort(T):me}var ee=h?String(n).replace(/\./g,"%2E"):String(n),Q=r&&An(d)&&d.length===1?ee+"[]":ee;if(i&&An(d)&&d.length===0)return Q+"[]";for(var se=0;se<Be.length;++se){var ne=Be[se],ge=typeof ne=="object"&&ne&&typeof ne.value<"u"?ne.value:d[ne];if(!(u&&ge===null)){var _e=b&&h?String(ne).replace(/\./g,"%2E"):String(ne),Fe=An(d)?typeof o=="function"?o(Q,_e):Q:Q+(b?"."+_e:"["+_e+"]");m.set(t,p);var Ve=WN();Ve.set(CT,m),JN(oe,e(ge,Fe,o,r,i,s,u,h,o==="comma"&&I&&An(d)?null:g,y,T,b,P,S,R,I,l,Ve))}}return oe},"stringify"),PK=a(function(t){if(!t)return Ot;if(typeof t.allowEmptyArrays<"u"&&typeof t.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof t.encodeDotInKeys<"u"&&typeof t.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(t.encoder!==null&&typeof t.encoder<"u"&&typeof t.encoder!="function")throw new TypeError("Encoder has to be a function.");var n=t.charset||Ot.charset;if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var o=ll.default;if(typeof t.format<"u"){if(!hK.call(ll.formatters,t.format))throw new TypeError("Unknown format option provided.");o=t.format}var r=ll.formatters[o],i=Ot.filter;(typeof t.filter=="function"||An(t.filter))&&(i=t.filter);var s;if(t.arrayFormat in KN?s=t.arrayFormat:"indices"in t?s=t.indices?"indices":"repeat":s=Ot.arrayFormat,"commaRoundTrip"in t&&typeof t.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var u=typeof t.allowDots>"u"?t.encodeDotInKeys===!0?!0:Ot.allowDots:!!t.allowDots;return{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:Ot.addQueryPrefix,allowDots:u,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:Ot.allowEmptyArrays,arrayFormat:s,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Ot.charsetSentinel,commaRoundTrip:!!t.commaRoundTrip,delimiter:typeof t.delimiter>"u"?Ot.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:Ot.encode,encodeDotInKeys:typeof t.encodeDotInKeys=="boolean"?t.encodeDotInKeys:Ot.encodeDotInKeys,encoder:typeof t.encoder=="function"?t.encoder:Ot.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:Ot.encodeValuesOnly,filter:i,format:o,formatter:r,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:Ot.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:Ot.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Ot.strictNullHandling}},"normalizeStringifyOptions");XN.exports=function(e,t){var n=e,o=PK(t),r,i;typeof o.filter=="function"?(i=o.filter,n=i("",n)):An(o.filter)&&(i=o.filter,r=i);var s=[];if(typeof n!="object"||n===null)return"";var u=KN[o.arrayFormat],h=u==="comma"&&o.commaRoundTrip;r||(r=Object.keys(n)),o.sort&&r.sort(o.sort);for(var g=WN(),y=0;y<r.length;++y){var T=r[y],b=n[T];o.skipNulls&&b===null||JN(s,_K(b,T,u,h,o.allowEmptyArrays,o.strictNullHandling,o.skipNulls,o.encodeDotInKeys,o.encode?o.encoder:null,o.filter,o.sort,o.allowDots,o.serializeDate,o.format,o.formatter,o.encodeValuesOnly,o.charset,g))}var P=s.join(o.delimiter),S=o.addQueryPrefix===!0?"?":"";return o.charsetSentinel&&(o.charset==="iso-8859-1"?S+="utf8=%26%2310003%3B&":S+="utf8=%E2%9C%93&"),P.length>0?S+P:""}});var tk=j((Kde,ek)=>{"use strict";var Rn=$T(),oh=Object.prototype.hasOwnProperty,NT=Array.isArray,_t={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:Rn.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictMerge:!0,strictNullHandling:!1,throwOnLimitExceeded:!1},wK=a(function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},"interpretNumericEntities"),QN=a(function(e,t,n){if(e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1)return e.split(",");if(t.throwOnLimitExceeded&&n>=t.arrayLimit)throw new RangeError("Array limit exceeded. Only "+t.arrayLimit+" element"+(t.arrayLimit===1?"":"s")+" allowed in an array.");return e},"parseArrayValue"),bK="utf8=%26%2310003%3B",TK="utf8=%E2%9C%93",EK=a(function(t,n){var o={__proto__:null},r=n.ignoreQueryPrefix?t.replace(/^\?/,""):t;r=r.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var i=n.parameterLimit===1/0?void 0:n.parameterLimit,s=r.split(n.delimiter,n.throwOnLimitExceeded&&typeof i<"u"?i+1:i);if(n.throwOnLimitExceeded&&typeof i<"u"&&s.length>i)throw new RangeError("Parameter limit exceeded. Only "+i+" parameter"+(i===1?"":"s")+" allowed.");var u=-1,h,g=n.charset;if(n.charsetSentinel)for(h=0;h<s.length;++h)s[h].indexOf("utf8=")===0&&(s[h]===TK?g="utf-8":s[h]===bK&&(g="iso-8859-1"),u=h,h=s.length);for(h=0;h<s.length;++h)if(h!==u){var y=s[h],T=y.indexOf("]="),b=T===-1?y.indexOf("="):T+1,P,S;if(b===-1?(P=n.decoder(y,_t.decoder,g,"key"),S=n.strictNullHandling?null:""):(P=n.decoder(y.slice(0,b),_t.decoder,g,"key"),P!==null&&(S=Rn.maybeMap(QN(y.slice(b+1),n,NT(o[P])?o[P].length:0),function(I){return n.decoder(I,_t.decoder,g,"value")}))),S&&n.interpretNumericEntities&&g==="iso-8859-1"&&(S=wK(String(S))),y.indexOf("[]=")>-1&&(S=NT(S)?[S]:S),n.comma&&NT(S)&&S.length>n.arrayLimit){if(n.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+n.arrayLimit+" element"+(n.arrayLimit===1?"":"s")+" allowed in an array.");S=Rn.combine([],S,n.arrayLimit,n.plainObjects)}if(P!==null){var R=oh.call(o,P);R&&(n.duplicates==="combine"||y.indexOf("[]=")>-1)?o[P]=Rn.combine(o[P],S,n.arrayLimit,n.plainObjects):(!R||n.duplicates==="last")&&(o[P]=S)}}return o},"parseQueryStringValues"),SK=a(function(e,t,n,o){var r=0;if(e.length>0&&e[e.length-1]==="[]"){var i=e.slice(0,-1).join("");r=Array.isArray(t)&&t[i]?t[i].length:0}for(var s=o?t:QN(t,n,r),u=e.length-1;u>=0;--u){var h,g=e[u];if(g==="[]"&&n.parseArrays)Rn.isOverflow(s)?h=s:h=n.allowEmptyArrays&&(s===""||n.strictNullHandling&&s===null)?[]:Rn.combine([],s,n.arrayLimit,n.plainObjects);else{h=n.plainObjects?{__proto__:null}:{};var y=g.charAt(0)==="["&&g.charAt(g.length-1)==="]"?g.slice(1,-1):g,T=n.decodeDotInKeys?y.replace(/%2E/g,"."):y,b=parseInt(T,10),P=!isNaN(b)&&g!==T&&String(b)===T&&b>=0&&n.parseArrays;if(!n.parseArrays&&T==="")h={0:s};else if(P&&b<n.arrayLimit)h=[],h[b]=s;else{if(P&&n.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+n.arrayLimit+" element"+(n.arrayLimit===1?"":"s")+" allowed in an array.");P?(h[b]=s,Rn.markOverflow(h,b)):T!=="__proto__"&&(h[T]=s)}}s=h}return s},"parseObject"),xK=a(function(t,n){var o=n.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t;if(n.depth<=0)return!n.plainObjects&&oh.call(Object.prototype,o)&&!n.allowPrototypes?void 0:[o];var r=/(\[[^[\]]*])/,i=/(\[[^[\]]*])/g,s=r.exec(o),u=s?o.slice(0,s.index):o,h=[];if(u){if(!n.plainObjects&&oh.call(Object.prototype,u)&&!n.allowPrototypes)return;h[h.length]=u}for(var g=0;(s=i.exec(o))!==null&&g<n.depth;){g+=1;var y=s[1].slice(1,-1);if(!n.plainObjects&&oh.call(Object.prototype,y)&&!n.allowPrototypes)return;h[h.length]=s[1]}if(s){if(n.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+n.depth+" and strictDepth is true");h[h.length]="["+o.slice(s.index)+"]"}return h},"splitKeyIntoSegments"),IK=a(function(t,n,o,r){if(t){var i=xK(t,o);if(i)return SK(i,n,o,r)}},"parseQueryStringKeys"),AK=a(function(t){if(!t)return _t;if(typeof t.allowEmptyArrays<"u"&&typeof t.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof t.decodeDotInKeys<"u"&&typeof t.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(t.decoder!==null&&typeof t.decoder<"u"&&typeof t.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof t.throwOnLimitExceeded<"u"&&typeof t.throwOnLimitExceeded!="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var n=typeof t.charset>"u"?_t.charset:t.charset,o=typeof t.duplicates>"u"?_t.duplicates:t.duplicates;if(o!=="combine"&&o!=="first"&&o!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var r=typeof t.allowDots>"u"?t.decodeDotInKeys===!0?!0:_t.allowDots:!!t.allowDots;return{allowDots:r,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:_t.allowEmptyArrays,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:_t.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:_t.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:_t.arrayLimit,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:_t.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:_t.comma,decodeDotInKeys:typeof t.decodeDotInKeys=="boolean"?t.decodeDotInKeys:_t.decodeDotInKeys,decoder:typeof t.decoder=="function"?t.decoder:_t.decoder,delimiter:typeof t.delimiter=="string"||Rn.isRegExp(t.delimiter)?t.delimiter:_t.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:_t.depth,duplicates:o,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:_t.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:_t.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:_t.plainObjects,strictDepth:typeof t.strictDepth=="boolean"?!!t.strictDepth:_t.strictDepth,strictMerge:typeof t.strictMerge=="boolean"?!!t.strictMerge:_t.strictMerge,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:_t.strictNullHandling,throwOnLimitExceeded:typeof t.throwOnLimitExceeded=="boolean"?t.throwOnLimitExceeded:!1}},"normalizeParseOptions");ek.exports=function(e,t){var n=AK(t);if(e===""||e===null||typeof e>"u")return n.plainObjects?{__proto__:null}:{};for(var o=typeof e=="string"?EK(e,n):e,r=n.plainObjects?{__proto__:null}:{},i=Object.keys(o),s=0;s<i.length;++s){var u=i[s],h=IK(u,o[u],n,typeof e=="string");r=Rn.merge(r,h,n)}return n.allowSparse===!0?r:Rn.compact(r)}});var kT=j((Xde,rk)=>{"use strict";var RK=YN(),DK=tk(),OK=th();rk.exports={formats:OK,parse:DK,stringify:RK}});var ok=j((zT,nk)=>{(function(e,t){typeof zT=="object"?nk.exports=t():typeof define=="function"&&define.amd?define([],t):e.urltemplate=t()})(zT,function(){function e(){}return a(e,"UrlTemplate"),e.prototype.encodeReserved=function(t){return t.split(/(%[0-9A-Fa-f]{2})/g).map(function(n){return/%[0-9A-Fa-f]/.test(n)||(n=encodeURI(n).replace(/%5B/g,"[").replace(/%5D/g,"]")),n}).join("")},e.prototype.encodeUnreserved=function(t){return encodeURIComponent(t).replace(/[!'()*]/g,function(n){return"%"+n.charCodeAt(0).toString(16).toUpperCase()})},e.prototype.encodeValue=function(t,n,o){return n=t==="+"||t==="#"?this.encodeReserved(n):this.encodeUnreserved(n),o?this.encodeUnreserved(o)+"="+n:n},e.prototype.isDefined=function(t){return t!=null},e.prototype.isKeyOperator=function(t){return t===";"||t==="&"||t==="?"},e.prototype.getValues=function(t,n,o,r){var i=t[o],s=[];if(this.isDefined(i)&&i!=="")if(typeof i=="string"||typeof i=="number"||typeof i=="boolean")i=i.toString(),r&&r!=="*"&&(i=i.substring(0,parseInt(r,10))),s.push(this.encodeValue(n,i,this.isKeyOperator(n)?o:null));else if(r==="*")Array.isArray(i)?i.filter(this.isDefined).forEach(function(h){s.push(this.encodeValue(n,h,this.isKeyOperator(n)?o:null))},this):Object.keys(i).forEach(function(h){this.isDefined(i[h])&&s.push(this.encodeValue(n,i[h],h))},this);else{var u=[];Array.isArray(i)?i.filter(this.isDefined).forEach(function(h){u.push(this.encodeValue(n,h))},this):Object.keys(i).forEach(function(h){this.isDefined(i[h])&&(u.push(this.encodeUnreserved(h)),u.push(this.encodeValue(n,i[h].toString())))},this),this.isKeyOperator(n)?s.push(this.encodeUnreserved(o)+"="+u.join(",")):u.length!==0&&s.push(u.join(","))}else n===";"?this.isDefined(i)&&s.push(this.encodeUnreserved(o)):i===""&&(n==="&"||n==="?")?s.push(this.encodeUnreserved(o)+"="):i===""&&s.push("");return s},e.prototype.parse=function(t){var n=this,o=["+","#",".","/",";","?","&"];return{expand:a(function(r){return t.replace(/\{([^\{\}]+)\}|([^\{\}]+)/g,function(i,s,u){if(s){var h=null,g=[];if(o.indexOf(s.charAt(0))!==-1&&(h=s.charAt(0),s=s.substr(1)),s.split(/,/g).forEach(function(T){var b=/([^:\*]*)(?::(\d+)|(\*))?/.exec(T);g.push.apply(g,n.getValues(r,h,b[1],b[2]||b[3]))}),h&&h!=="+"){var y=",";return h==="?"?y="&":h!=="#"&&(y=h),(g.length!==0?h:"")+g.join(y)}else return g.join(",")}else return n.encodeReserved(u)})},"expand")}},new e})});var ik=j(UT=>{"use strict";Object.defineProperty(UT,"__esModule",{value:!0});UT.isBrowser=$K;function $K(){return typeof window<"u"}a($K,"isBrowser")});var ah=j(ih=>{"use strict";Object.defineProperty(ih,"__esModule",{value:!0});ih.headersToClassicHeaders=ak;ih.marshallGaxiosResponse=CK;function ak(e){let t={};if(e instanceof Headers)e.forEach((n,o)=>{t[o]=n});else if(Array.isArray(e))for(let[n,o]of e)t[n]=o;else t=e||{};return t}a(ak,"headersToClassicHeaders");function CK(e){return Object.defineProperties(e||{},{headers:{configurable:!0,writable:!0,enumerable:!0,value:ak(e?.headers)}})}a(CK,"marshallGaxiosResponse")});var uk=j($r=>{"use strict";Object.defineProperty($r,"__esModule",{value:!0});$r.sessions=void 0;$r.request=HK;$r.closeSession=MT;var ck=require("http2"),NK=require("zlib"),kK=require("url"),zK=kT(),UK=Eu(),MK=require("stream"),FK=require("util"),LK=require("process"),jK=ah(),{HTTP2_HEADER_CONTENT_ENCODING:qK,HTTP2_HEADER_CONTENT_TYPE:sk,HTTP2_HEADER_METHOD:BK,HTTP2_HEADER_PATH:VK,HTTP2_HEADER_STATUS:GK}=ck.constants,dl=!!LK.env.HTTP2_DEBUG;$r.sessions={};async function HK(e){let t=UK(!0,{},e);t.validateStatus=t.validateStatus||ZK,t.responseType=t.responseType||"json";let n=new kK.URL(t.url),o=WK(n.host);o.timeoutHandle!==void 0&&clearTimeout(o.timeoutHandle);let r=n.pathname;if(e.params&&Object.keys(e.params).length>0){let T=(e.paramsSerializer||zK.stringify)(t.params);r+=`?${T}`}let i=(0,jK.headersToClassicHeaders)(t.headers);i[VK]=r,i[BK]=e.method||"GET",t.headers=i,i[sk]||t.responseType!=="text"&&(i[sk]="application/json");let s={config:e,headers:{},status:0,data:{},statusText:""},u=[],h=o.session,g;return new Promise((y,T)=>{try{g=h.request(i).on("response",b=>{Object.assign(s,{headers:b,status:b[GK]});let P=g;if(b[qK]==="gzip"&&(P=g.pipe(NK.createGunzip())),t.responseType==="stream"){s.data=P,y(s);return}P.on("data",S=>{u.push(S)}).on("error",S=>{T(S)}).on("end",()=>{let S=Buffer.concat(u),R=S;if(S){if(t.responseType==="json")try{R=JSON.parse(S.toString("utf8"))}catch{R=S.toString("utf8")}else t.responseType==="text"?R=S.toString("utf8"):t.responseType==="arraybuffer"&&(R=S.buffer);s.data=R}if(!t.validateStatus(s.status)){let I=`Request failed with status code ${s.status}. `;if(s.data&&typeof s.data=="object"){let l=FK.inspect(s.data,{depth:5});I=`${I}
59
- '${l}`}T(new Error(I,{cause:s}))}y(s)})}).on("error",b=>{T(b)})}catch(b){MT(n).then(()=>T(b)).catch(T);return}if(s.request=g,e.data){if(e.data instanceof MK.Stream)e.data.pipe(g);else if(typeof e.data=="string"){let b=Buffer.from(e.data);g.end(b)}else if(typeof e.data=="object"){let b=JSON.stringify(e.data);g.end(b)}}o.timeoutHandle=setTimeout(()=>MT(n),500)})}a(HK,"request");function ZK(e){return e>=200&&e<300}a(ZK,"validateStatus");function WK(e){if($r.sessions[e])dl&&console.log(`Used cached client for ${e}`);else{dl&&console.log(`Creating client for ${e}`);let t=ck.connect(`https://${e}`);t.on("error",n=>{console.error(`*ERROR*: ${n}`),delete $r.sessions[e]}).on("goaway",(n,o)=>{console.error(`*GOAWAY*: ${n} : ${o}`),delete $r.sessions[e]}),$r.sessions[e]={session:t}}return $r.sessions[e]}a(WK,"_getClient");async function MT(e){let t=$r.sessions[e.host];if(!t)return;let{session:n}=t;delete $r.sessions[e.host],dl&&console.error(`Closing ${e.host}`),n.close(()=>{dl&&console.error(`Closed ${e.host}`)}),setTimeout(()=>{n&&!n.destroyed&&(dl&&console.log(`Forcing close ${e.host}`),n&&n.destroy())},1e3)}a(MT,"closeSession")});var lk=j((ipe,KK)=>{KK.exports={name:"googleapis-common",version:"8.0.2",description:"A common tooling library used by the googleapis npm module. You probably don't want to use this directly.",repository:{type:"git",directory:"packages/nodejs-googleapis-common",url:"https://github.com/googleapis/google-cloud-node-core.git"},main:"build/src/index.js",types:"build/src/index.d.ts",files:["build/src","!build/src/**/*.map"],scripts:{prebenchmark:"npm run compile",benchmark:"node build/benchmark/bench.js",compile:"tsc -p .",test:"c8 mocha build/test","system-test":"c8 mocha build/system-test --timeout 600000","presystem-test":"npm run compile",fix:"gts fix",prepare:"npm run compile",pretest:"npm run compile",lint:"gts check","samples-test":"mocha build/samples-test",docs:"jsdoc -c .jsdoc.js",webpack:"webpack","browser-test":"karma start",prelint:"cd samples; npm link ../; npm install",clean:"gts clean",precompile:"gts clean"},keywords:[],author:"Google LLC",license:"Apache-2.0",dependencies:{extend:"^3.0.2",gaxios:"7.1.3","google-auth-library":"10.5.0","google-logging-utils":"1.1.3",qs:"^6.7.0","url-template":"^2.0.8"},devDependencies:{"@babel/plugin-proposal-private-methods":"^7.18.6","@types/extend":"^3.0.1","@types/mocha":"^10.0.10","@types/mv":"^2.1.0","@types/ncp":"^2.0.8","@types/nock":"^11.0.0","@types/proxyquire":"^1.3.31","@types/qs":"^6.5.3","@types/sinon":"^21.0.0","@types/tmp":"^0.2.6","@types/url-template":"^2.0.28",c8:"^10.1.3",codecov:"^3.8.3",gts:"^6.0.2",http2spy:"^2.0.0","is-docker":"^3.0.0",jsdoc:"^4.0.4","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",mocha:"^11.1.0",mv:"^2.1.1",ncp:"^2.0.0",nock:"^14.0.5","null-loader":"^4.0.1","path-to-regexp":"^6.0.0",proxyquire:"^2.1.3",puppeteer:"^24.0.0",sinon:"21.0.3",tmp:"0.2.5","ts-loader":"^9.5.2",typescript:"5.8.3",webpack:"^5.97.1","webpack-cli":"^6.0.1"},engines:{node:">=18.0.0"},homepage:"https://github.com/googleapis/google-cloud-node-core/tree/main/packages/nodejs-googleapis-common"}});var sh=j(BT=>{"use strict";Object.defineProperty(BT,"__esModule",{value:!0});BT.createAPIRequest=eJ;var FT=St(),JK=kT(),hk=require("stream"),dk=ok(),pk=Eu(),jT=ik(),XK=uk(),LT=ah(),gk=lk(),fk=a(()=>globalThis.crypto?.randomUUID()||require("crypto").randomUUID(),"randomUUID");function YK(e){return e!==null&&typeof e=="object"&&typeof e.pipe=="function"&&e.readable!==!1&&typeof e._read=="function"&&typeof e._readableState=="object"}a(YK,"isReadableStream");function QK(e,t){let n=new Array;return t.forEach(o=>{e[o]===void 0&&n.push(o)}),n.length>0?n:null}a(QK,"getMissingParams");function eJ(e,t){if(t)mk(e).then(n=>t(null,n),t);else return mk(e)}a(eJ,"createAPIRequest");async function mk(e){let t=pk(!0,{},e.context.google?._options||{},e.context._options||{},e.options),n=pk(!0,{},t.params,e.params);t.userAgentDirectives=t.userAgentDirectives||[];let o=n.media||{},r=n.requestBody;!n.requestBody&&n.resource&&(!e.requiredParams.includes("resource")||typeof n.resource!="string")&&(r=n.resource,delete n.resource),delete n.requestBody;let i=n.auth||t.auth,s=typeof o.body=="string"?"text/plain":"application/octet-stream";delete n.media,delete n.auth;let u=(0,LT.headersToClassicHeaders)(n.headers||{});tJ(u,t.apiVersion),delete n.headers,Object.keys(n).forEach(P=>{if(P.slice(-1)==="_"){let S=P.slice(0,-1);n[S]=n[P],delete n[P]}});let h=QK(n,e.requiredParams);if(h)throw new Error("Missing required parameters: "+h.join(", "));if(t.url){let P=t.url;typeof P=="object"&&(P=P.toString()),t.url=dk.parse(P).expand(n)}if(e.mediaUrl&&(e.mediaUrl=dk.parse(e.mediaUrl).expand(n)),e.context._options.rootUrl!==void 0&&t.url!==void 0){let P=new URL(t.url),S=P.href.substr(P.origin.length);t.url=new URL(S,e.context._options.rootUrl).href}t.paramsSerializer=P=>JK.stringify(P,{arrayFormat:"repeat"}),e.pathParams.forEach(P=>delete n[P]),typeof i=="string"&&(n.key=n.key||i,i=void 0);function g(P){let S=fk(),R=`--${S}--`,I=new hk.PassThrough({flush(d){this.push(`\r
60
- `),this.push(R),d()}}),l=new qT,m=YK(P[1].body);u["content-type"]=`multipart/related; boundary=${S}`;for(let d of P){let v=`--${S}\r
58
+ `+t.prev}a(wT,"indentedJoin");function Km(e,t){var n=PT(e),o=[];if(n){o.length=e.length;for(var r=0;r<e.length;r++)o[r]=Qn(e,r)?t(e[r],e):""}var i=typeof hT=="function"?hT(e):[],s;if(ss){s={};for(var u=0;u<i.length;u++)s["$"+i[u]]=i[u]}for(var h in e)Qn(e,h)&&(n&&String(Number(h))===h&&h<e.length||ss&&s["$"+h]instanceof Symbol||(IN.call(/[^\w$]/,h)?o.push(t(h,e)+": "+t(e[h],e)):o.push(h+": "+t(e[h],e))));if(typeof hT=="function")for(var g=0;g<i.length;g++)AN.call(e,i[g])&&o.push("["+t(i[g])+"]: "+t(e[i[g]],e));return o}a(Km,"arrObjKeys")});var zN=j((kde,kN)=>{"use strict";var A3=al(),R3=Ao(),Ym=a(function(e,t,n){for(var o=e,r;(r=o.next)!=null;o=r)if(r.key===t)return o.next=r.next,n||(r.next=e.next,e.next=r),r},"listGetNode"),D3=a(function(e,t){if(e){var n=Ym(e,t);return n&&n.value}},"listGet"),O3=a(function(e,t,n){var o=Ym(e,t);o?o.value=n:e.next={key:t,next:e.next,value:n}},"listSet"),$3=a(function(e,t){return e?!!Ym(e,t):!1},"listHas"),C3=a(function(e,t){if(e)return Ym(e,t,!0)},"listDelete");kN.exports=a(function(){var t,n={assert:a(function(o){if(!n.has(o))throw new R3("Side channel does not contain "+A3(o))},"assert"),delete:a(function(o){var r=C3(t,o);return r&&t&&!t.next&&(t=void 0),!!r},"delete"),get:a(function(o){return D3(t,o)},"get"),has:a(function(o){return $3(t,o)},"has"),set:a(function(o,r){t||(t={next:void 0}),O3(t,o,r)},"set")};return n},"getSideChannelList")});var ST=j((Ude,FN)=>{"use strict";var UN=bu(),MN=FP(),N3=MN([UN("%String.prototype.indexOf%")]);FN.exports=a(function(t,n){var o=UN(t,!!n);return typeof o=="function"&&N3(t,".prototype.")>-1?MN([o]):o},"callBoundIntrinsic")});var xT=j((Fde,jN)=>{"use strict";var k3=bu(),sl=ST(),z3=al(),U3=Ao(),LN=k3("%Map%",!0),M3=sl("Map.prototype.get",!0),F3=sl("Map.prototype.set",!0),L3=sl("Map.prototype.has",!0),j3=sl("Map.prototype.delete",!0),q3=sl("Map.prototype.size",!0);jN.exports=!!LN&&a(function(){var t,n={assert:a(function(o){if(!n.has(o))throw new U3("Side channel does not contain "+z3(o))},"assert"),delete:a(function(o){if(t){var r=j3(t,o);return q3(t)===0&&(t=void 0),r}return!1},"delete"),get:a(function(o){if(t)return M3(t,o)},"get"),has:a(function(o){return t?L3(t,o):!1},"has"),set:a(function(o,r){t||(t=new LN),F3(t,o,r)},"set")};return n},"getSideChannelMap")});var BN=j((jde,qN)=>{"use strict";var B3=bu(),eh=ST(),V3=al(),Qm=xT(),G3=Ao(),cs=B3("%WeakMap%",!0),H3=eh("WeakMap.prototype.get",!0),Z3=eh("WeakMap.prototype.set",!0),W3=eh("WeakMap.prototype.has",!0),K3=eh("WeakMap.prototype.delete",!0);qN.exports=cs?a(function(){var t,n,o={assert:a(function(r){if(!o.has(r))throw new G3("Side channel does not contain "+V3(r))},"assert"),delete:a(function(r){if(cs&&r&&(typeof r=="object"||typeof r=="function")){if(t)return K3(t,r)}else if(Qm&&n)return n.delete(r);return!1},"delete"),get:a(function(r){return cs&&r&&(typeof r=="object"||typeof r=="function")&&t?H3(t,r):n&&n.get(r)},"get"),has:a(function(r){return cs&&r&&(typeof r=="object"||typeof r=="function")&&t?W3(t,r):!!n&&n.has(r)},"has"),set:a(function(r,i){cs&&r&&(typeof r=="object"||typeof r=="function")?(t||(t=new cs),Z3(t,r,i)):Qm&&(n||(n=Qm()),n.set(r,i))},"set")};return o},"getSideChannelWeakMap"):Qm});var IT=j((Bde,VN)=>{"use strict";var J3=Ao(),X3=al(),Y3=zN(),Q3=xT(),eK=BN(),tK=eK||Q3||Y3;VN.exports=a(function(){var t,n={assert:a(function(o){if(!n.has(o))throw new J3("Side channel does not contain "+X3(o))},"assert"),delete:a(function(o){return!!t&&t.delete(o)},"delete"),get:a(function(o){return t&&t.get(o)},"get"),has:a(function(o){return!!t&&t.has(o)},"has"),set:a(function(o,r){t||(t=tK()),t.set(o,r)},"set")};return n},"getSideChannel")});var th=j((Gde,GN)=>{"use strict";var rK=String.prototype.replace,nK=/%20/g,AT={RFC1738:"RFC1738",RFC3986:"RFC3986"};GN.exports={default:AT.RFC3986,formatters:{RFC1738:a(function(e){return rK.call(e,nK,"+")},"RFC1738"),RFC3986:a(function(e){return String(e)},"RFC3986")},RFC1738:AT.RFC1738,RFC3986:AT.RFC3986}});var $T=j((Zde,HN)=>{"use strict";var oK=th(),iK=IT(),RT=Object.prototype.hasOwnProperty,Di=Array.isArray,rh=iK(),us=a(function(t,n){return rh.set(t,n),t},"markOverflow"),Oi=a(function(t){return rh.has(t)},"isOverflow"),cl=a(function(t){return rh.get(t)},"getMaxIndex"),OT=a(function(t,n){rh.set(t,n)},"setMaxIndex"),In=(function(){for(var e=[],t=0;t<256;++t)e[e.length]="%"+((t<16?"0":"")+t.toString(16)).toUpperCase();return e})(),aK=a(function(t){for(;t.length>1;){var n=t.pop(),o=n.obj[n.prop];if(Di(o)){for(var r=[],i=0;i<o.length;++i)typeof o[i]<"u"&&(r[r.length]=o[i]);n.obj[n.prop]=r}}},"compactQueue"),ul=a(function(t,n){for(var o=n&&n.plainObjects?{__proto__:null}:{},r=0;r<t.length;++r)typeof t[r]<"u"&&(o[r]=t[r]);return o},"arrayToObject"),sK=a(function e(t,n,o){if(!n)return t;if(typeof n!="object"&&typeof n!="function"){if(Di(t)){var r=t.length;if(o&&typeof o.arrayLimit=="number"&&r>o.arrayLimit)return us(ul(t.concat(n),o),r);t[r]=n}else if(t&&typeof t=="object")if(Oi(t)){var i=cl(t)+1;t[i]=n,OT(t,i)}else{if(o&&o.strictMerge)return[t,n];(o&&(o.plainObjects||o.allowPrototypes)||!RT.call(Object.prototype,n))&&(t[n]=!0)}else return[t,n];return t}if(!t||typeof t!="object"){if(Oi(n)){for(var s=Object.keys(n),u=o&&o.plainObjects?{__proto__:null,0:t}:{0:t},h=0;h<s.length;h++){var g=parseInt(s[h],10);u[g+1]=n[s[h]]}return us(u,cl(n)+1)}var y=[t].concat(n);return o&&typeof o.arrayLimit=="number"&&y.length>o.arrayLimit?us(ul(y,o),y.length-1):y}var T=t;return Di(t)&&!Di(n)&&(T=ul(t,o)),Di(t)&&Di(n)?(n.forEach(function(b,P){if(RT.call(t,P)){var S=t[P];S&&typeof S=="object"&&b&&typeof b=="object"?t[P]=e(S,b,o):t[t.length]=b}else t[P]=b}),t):Object.keys(n).reduce(function(b,P){var S=n[P];if(RT.call(b,P)?b[P]=e(b[P],S,o):b[P]=S,Oi(n)&&!Oi(b)&&us(b,cl(n)),Oi(b)){var R=parseInt(P,10);String(R)===P&&R>=0&&R>cl(b)&&OT(b,R)}return b},T)},"merge"),cK=a(function(t,n){return Object.keys(n).reduce(function(o,r){return o[r]=n[r],o},t)},"assignSingleSource"),uK=a(function(e,t,n){var o=e.replace(/\+/g," ");if(n==="iso-8859-1")return o.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(o)}catch{return o}},"decode"),DT=1024,lK=a(function(t,n,o,r,i){if(t.length===0)return t;var s=t;if(typeof t=="symbol"?s=Symbol.prototype.toString.call(t):typeof t!="string"&&(s=String(t)),o==="iso-8859-1")return escape(s).replace(/%u[0-9a-f]{4}/gi,function(P){return"%26%23"+parseInt(P.slice(2),16)+"%3B"});for(var u="",h=0;h<s.length;h+=DT){for(var g=s.length>=DT?s.slice(h,h+DT):s,y=[],T=0;T<g.length;++T){var b=g.charCodeAt(T);if(b===45||b===46||b===95||b===126||b>=48&&b<=57||b>=65&&b<=90||b>=97&&b<=122||i===oK.RFC1738&&(b===40||b===41)){y[y.length]=g.charAt(T);continue}if(b<128){y[y.length]=In[b];continue}if(b<2048){y[y.length]=In[192|b>>6]+In[128|b&63];continue}if(b<55296||b>=57344){y[y.length]=In[224|b>>12]+In[128|b>>6&63]+In[128|b&63];continue}T+=1,b=65536+((b&1023)<<10|g.charCodeAt(T)&1023),y[y.length]=In[240|b>>18]+In[128|b>>12&63]+In[128|b>>6&63]+In[128|b&63]}u+=y.join("")}return u},"encode"),dK=a(function(t){for(var n=[{obj:{o:t},prop:"o"}],o=[],r=0;r<n.length;++r)for(var i=n[r],s=i.obj[i.prop],u=Object.keys(s),h=0;h<u.length;++h){var g=u[h],y=s[g];typeof y=="object"&&y!==null&&o.indexOf(y)===-1&&(n[n.length]={obj:s,prop:g},o[o.length]=y)}return aK(n),t},"compact"),pK=a(function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},"isRegExp"),fK=a(function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},"isBuffer"),mK=a(function(t,n,o,r){if(Oi(t)){var i=cl(t)+1;return t[i]=n,OT(t,i),t}var s=[].concat(t,n);return s.length>o?us(ul(s,{plainObjects:r}),s.length-1):s},"combine"),hK=a(function(t,n){if(Di(t)){for(var o=[],r=0;r<t.length;r+=1)o[o.length]=n(t[r]);return o}return n(t)},"maybeMap");HN.exports={arrayToObject:ul,assign:cK,combine:mK,compact:dK,decode:uK,encode:lK,isBuffer:fK,isOverflow:Oi,isRegExp:pK,markOverflow:us,maybeMap:hK,merge:sK}});var YN=j((Kde,XN)=>{"use strict";var WN=IT(),nh=$T(),ll=th(),gK=Object.prototype.hasOwnProperty,KN={brackets:a(function(t){return t+"[]"},"brackets"),comma:"comma",indices:a(function(t,n){return t+"["+n+"]"},"indices"),repeat:a(function(t){return t},"repeat")},An=Array.isArray,yK=Array.prototype.push,JN=a(function(e,t){yK.apply(e,An(t)?t:[t])},"pushToArray"),vK=Date.prototype.toISOString,ZN=ll.default,Ot={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:nh.encode,encodeValuesOnly:!1,filter:void 0,format:ZN,formatter:ll.formatters[ZN],indices:!1,serializeDate:a(function(t){return vK.call(t)},"serializeDate"),skipNulls:!1,strictNullHandling:!1},_K=a(function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},"isNonNullishPrimitive"),CT={},PK=a(function e(t,n,o,r,i,s,u,h,g,y,T,b,P,S,R,I,l,m){for(var d=t,v=m,p=0,E=!1;(v=v.get(CT))!==void 0&&!E;){var _=v.get(t);if(p+=1,typeof _<"u"){if(_===p)throw new RangeError("Cyclic object value");E=!0}typeof v.get(CT)>"u"&&(p=0)}if(typeof y=="function"?d=y(n,d):d instanceof Date?d=P(d):o==="comma"&&An(d)&&(d=nh.maybeMap(d,function(nt){return nt instanceof Date?P(nt):nt})),d===null){if(s)return g&&!I?g(n,Ot.encoder,l,"key",S):n;d=""}if(_K(d)||nh.isBuffer(d)){if(g){var pe=I?n:g(n,Ot.encoder,l,"key",S);return[R(pe)+"="+R(g(d,Ot.encoder,l,"value",S))]}return[R(n)+"="+R(String(d))]}var oe=[];if(typeof d>"u")return oe;var Be;if(o==="comma"&&An(d))I&&g&&(d=nh.maybeMap(d,g)),Be=[{value:d.length>0?d.join(",")||null:void 0}];else if(An(y))Be=y;else{var me=Object.keys(d);Be=T?me.sort(T):me}var ee=h?String(n).replace(/\./g,"%2E"):String(n),Q=r&&An(d)&&d.length===1?ee+"[]":ee;if(i&&An(d)&&d.length===0)return Q+"[]";for(var se=0;se<Be.length;++se){var ne=Be[se],ge=typeof ne=="object"&&ne&&typeof ne.value<"u"?ne.value:d[ne];if(!(u&&ge===null)){var _e=b&&h?String(ne).replace(/\./g,"%2E"):String(ne),Fe=An(d)?typeof o=="function"?o(Q,_e):Q:Q+(b?"."+_e:"["+_e+"]");m.set(t,p);var Ve=WN();Ve.set(CT,m),JN(oe,e(ge,Fe,o,r,i,s,u,h,o==="comma"&&I&&An(d)?null:g,y,T,b,P,S,R,I,l,Ve))}}return oe},"stringify"),wK=a(function(t){if(!t)return Ot;if(typeof t.allowEmptyArrays<"u"&&typeof t.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof t.encodeDotInKeys<"u"&&typeof t.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(t.encoder!==null&&typeof t.encoder<"u"&&typeof t.encoder!="function")throw new TypeError("Encoder has to be a function.");var n=t.charset||Ot.charset;if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var o=ll.default;if(typeof t.format<"u"){if(!gK.call(ll.formatters,t.format))throw new TypeError("Unknown format option provided.");o=t.format}var r=ll.formatters[o],i=Ot.filter;(typeof t.filter=="function"||An(t.filter))&&(i=t.filter);var s;if(t.arrayFormat in KN?s=t.arrayFormat:"indices"in t?s=t.indices?"indices":"repeat":s=Ot.arrayFormat,"commaRoundTrip"in t&&typeof t.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var u=typeof t.allowDots>"u"?t.encodeDotInKeys===!0?!0:Ot.allowDots:!!t.allowDots;return{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:Ot.addQueryPrefix,allowDots:u,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:Ot.allowEmptyArrays,arrayFormat:s,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Ot.charsetSentinel,commaRoundTrip:!!t.commaRoundTrip,delimiter:typeof t.delimiter>"u"?Ot.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:Ot.encode,encodeDotInKeys:typeof t.encodeDotInKeys=="boolean"?t.encodeDotInKeys:Ot.encodeDotInKeys,encoder:typeof t.encoder=="function"?t.encoder:Ot.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:Ot.encodeValuesOnly,filter:i,format:o,formatter:r,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:Ot.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:Ot.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Ot.strictNullHandling}},"normalizeStringifyOptions");XN.exports=function(e,t){var n=e,o=wK(t),r,i;typeof o.filter=="function"?(i=o.filter,n=i("",n)):An(o.filter)&&(i=o.filter,r=i);var s=[];if(typeof n!="object"||n===null)return"";var u=KN[o.arrayFormat],h=u==="comma"&&o.commaRoundTrip;r||(r=Object.keys(n)),o.sort&&r.sort(o.sort);for(var g=WN(),y=0;y<r.length;++y){var T=r[y],b=n[T];o.skipNulls&&b===null||JN(s,PK(b,T,u,h,o.allowEmptyArrays,o.strictNullHandling,o.skipNulls,o.encodeDotInKeys,o.encode?o.encoder:null,o.filter,o.sort,o.allowDots,o.serializeDate,o.format,o.formatter,o.encodeValuesOnly,o.charset,g))}var P=s.join(o.delimiter),S=o.addQueryPrefix===!0?"?":"";return o.charsetSentinel&&(o.charset==="iso-8859-1"?S+="utf8=%26%2310003%3B&":S+="utf8=%E2%9C%93&"),P.length>0?S+P:""}});var tk=j((Xde,ek)=>{"use strict";var Rn=$T(),oh=Object.prototype.hasOwnProperty,NT=Array.isArray,_t={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:Rn.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictMerge:!0,strictNullHandling:!1,throwOnLimitExceeded:!1},bK=a(function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},"interpretNumericEntities"),QN=a(function(e,t,n){if(e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1)return e.split(",");if(t.throwOnLimitExceeded&&n>=t.arrayLimit)throw new RangeError("Array limit exceeded. Only "+t.arrayLimit+" element"+(t.arrayLimit===1?"":"s")+" allowed in an array.");return e},"parseArrayValue"),TK="utf8=%26%2310003%3B",EK="utf8=%E2%9C%93",SK=a(function(t,n){var o={__proto__:null},r=n.ignoreQueryPrefix?t.replace(/^\?/,""):t;r=r.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var i=n.parameterLimit===1/0?void 0:n.parameterLimit,s=r.split(n.delimiter,n.throwOnLimitExceeded&&typeof i<"u"?i+1:i);if(n.throwOnLimitExceeded&&typeof i<"u"&&s.length>i)throw new RangeError("Parameter limit exceeded. Only "+i+" parameter"+(i===1?"":"s")+" allowed.");var u=-1,h,g=n.charset;if(n.charsetSentinel)for(h=0;h<s.length;++h)s[h].indexOf("utf8=")===0&&(s[h]===EK?g="utf-8":s[h]===TK&&(g="iso-8859-1"),u=h,h=s.length);for(h=0;h<s.length;++h)if(h!==u){var y=s[h],T=y.indexOf("]="),b=T===-1?y.indexOf("="):T+1,P,S;if(b===-1?(P=n.decoder(y,_t.decoder,g,"key"),S=n.strictNullHandling?null:""):(P=n.decoder(y.slice(0,b),_t.decoder,g,"key"),P!==null&&(S=Rn.maybeMap(QN(y.slice(b+1),n,NT(o[P])?o[P].length:0),function(I){return n.decoder(I,_t.decoder,g,"value")}))),S&&n.interpretNumericEntities&&g==="iso-8859-1"&&(S=bK(String(S))),y.indexOf("[]=")>-1&&(S=NT(S)?[S]:S),n.comma&&NT(S)&&S.length>n.arrayLimit){if(n.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+n.arrayLimit+" element"+(n.arrayLimit===1?"":"s")+" allowed in an array.");S=Rn.combine([],S,n.arrayLimit,n.plainObjects)}if(P!==null){var R=oh.call(o,P);R&&(n.duplicates==="combine"||y.indexOf("[]=")>-1)?o[P]=Rn.combine(o[P],S,n.arrayLimit,n.plainObjects):(!R||n.duplicates==="last")&&(o[P]=S)}}return o},"parseQueryStringValues"),xK=a(function(e,t,n,o){var r=0;if(e.length>0&&e[e.length-1]==="[]"){var i=e.slice(0,-1).join("");r=Array.isArray(t)&&t[i]?t[i].length:0}for(var s=o?t:QN(t,n,r),u=e.length-1;u>=0;--u){var h,g=e[u];if(g==="[]"&&n.parseArrays)Rn.isOverflow(s)?h=s:h=n.allowEmptyArrays&&(s===""||n.strictNullHandling&&s===null)?[]:Rn.combine([],s,n.arrayLimit,n.plainObjects);else{h=n.plainObjects?{__proto__:null}:{};var y=g.charAt(0)==="["&&g.charAt(g.length-1)==="]"?g.slice(1,-1):g,T=n.decodeDotInKeys?y.replace(/%2E/g,"."):y,b=parseInt(T,10),P=!isNaN(b)&&g!==T&&String(b)===T&&b>=0&&n.parseArrays;if(!n.parseArrays&&T==="")h={0:s};else if(P&&b<n.arrayLimit)h=[],h[b]=s;else{if(P&&n.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+n.arrayLimit+" element"+(n.arrayLimit===1?"":"s")+" allowed in an array.");P?(h[b]=s,Rn.markOverflow(h,b)):T!=="__proto__"&&(h[T]=s)}}s=h}return s},"parseObject"),IK=a(function(t,n){var o=n.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t;if(n.depth<=0)return!n.plainObjects&&oh.call(Object.prototype,o)&&!n.allowPrototypes?void 0:[o];var r=/(\[[^[\]]*])/,i=/(\[[^[\]]*])/g,s=r.exec(o),u=s?o.slice(0,s.index):o,h=[];if(u){if(!n.plainObjects&&oh.call(Object.prototype,u)&&!n.allowPrototypes)return;h[h.length]=u}for(var g=0;(s=i.exec(o))!==null&&g<n.depth;){g+=1;var y=s[1].slice(1,-1);if(!n.plainObjects&&oh.call(Object.prototype,y)&&!n.allowPrototypes)return;h[h.length]=s[1]}if(s){if(n.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+n.depth+" and strictDepth is true");h[h.length]="["+o.slice(s.index)+"]"}return h},"splitKeyIntoSegments"),AK=a(function(t,n,o,r){if(t){var i=IK(t,o);if(i)return xK(i,n,o,r)}},"parseQueryStringKeys"),RK=a(function(t){if(!t)return _t;if(typeof t.allowEmptyArrays<"u"&&typeof t.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof t.decodeDotInKeys<"u"&&typeof t.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(t.decoder!==null&&typeof t.decoder<"u"&&typeof t.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof t.throwOnLimitExceeded<"u"&&typeof t.throwOnLimitExceeded!="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var n=typeof t.charset>"u"?_t.charset:t.charset,o=typeof t.duplicates>"u"?_t.duplicates:t.duplicates;if(o!=="combine"&&o!=="first"&&o!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var r=typeof t.allowDots>"u"?t.decodeDotInKeys===!0?!0:_t.allowDots:!!t.allowDots;return{allowDots:r,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:_t.allowEmptyArrays,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:_t.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:_t.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:_t.arrayLimit,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:_t.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:_t.comma,decodeDotInKeys:typeof t.decodeDotInKeys=="boolean"?t.decodeDotInKeys:_t.decodeDotInKeys,decoder:typeof t.decoder=="function"?t.decoder:_t.decoder,delimiter:typeof t.delimiter=="string"||Rn.isRegExp(t.delimiter)?t.delimiter:_t.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:_t.depth,duplicates:o,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:_t.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:_t.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:_t.plainObjects,strictDepth:typeof t.strictDepth=="boolean"?!!t.strictDepth:_t.strictDepth,strictMerge:typeof t.strictMerge=="boolean"?!!t.strictMerge:_t.strictMerge,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:_t.strictNullHandling,throwOnLimitExceeded:typeof t.throwOnLimitExceeded=="boolean"?t.throwOnLimitExceeded:!1}},"normalizeParseOptions");ek.exports=function(e,t){var n=RK(t);if(e===""||e===null||typeof e>"u")return n.plainObjects?{__proto__:null}:{};for(var o=typeof e=="string"?SK(e,n):e,r=n.plainObjects?{__proto__:null}:{},i=Object.keys(o),s=0;s<i.length;++s){var u=i[s],h=AK(u,o[u],n,typeof e=="string");r=Rn.merge(r,h,n)}return n.allowSparse===!0?r:Rn.compact(r)}});var kT=j((Qde,rk)=>{"use strict";var DK=YN(),OK=tk(),$K=th();rk.exports={formats:$K,parse:OK,stringify:DK}});var ok=j((zT,nk)=>{(function(e,t){typeof zT=="object"?nk.exports=t():typeof define=="function"&&define.amd?define([],t):e.urltemplate=t()})(zT,function(){function e(){}return a(e,"UrlTemplate"),e.prototype.encodeReserved=function(t){return t.split(/(%[0-9A-Fa-f]{2})/g).map(function(n){return/%[0-9A-Fa-f]/.test(n)||(n=encodeURI(n).replace(/%5B/g,"[").replace(/%5D/g,"]")),n}).join("")},e.prototype.encodeUnreserved=function(t){return encodeURIComponent(t).replace(/[!'()*]/g,function(n){return"%"+n.charCodeAt(0).toString(16).toUpperCase()})},e.prototype.encodeValue=function(t,n,o){return n=t==="+"||t==="#"?this.encodeReserved(n):this.encodeUnreserved(n),o?this.encodeUnreserved(o)+"="+n:n},e.prototype.isDefined=function(t){return t!=null},e.prototype.isKeyOperator=function(t){return t===";"||t==="&"||t==="?"},e.prototype.getValues=function(t,n,o,r){var i=t[o],s=[];if(this.isDefined(i)&&i!=="")if(typeof i=="string"||typeof i=="number"||typeof i=="boolean")i=i.toString(),r&&r!=="*"&&(i=i.substring(0,parseInt(r,10))),s.push(this.encodeValue(n,i,this.isKeyOperator(n)?o:null));else if(r==="*")Array.isArray(i)?i.filter(this.isDefined).forEach(function(h){s.push(this.encodeValue(n,h,this.isKeyOperator(n)?o:null))},this):Object.keys(i).forEach(function(h){this.isDefined(i[h])&&s.push(this.encodeValue(n,i[h],h))},this);else{var u=[];Array.isArray(i)?i.filter(this.isDefined).forEach(function(h){u.push(this.encodeValue(n,h))},this):Object.keys(i).forEach(function(h){this.isDefined(i[h])&&(u.push(this.encodeUnreserved(h)),u.push(this.encodeValue(n,i[h].toString())))},this),this.isKeyOperator(n)?s.push(this.encodeUnreserved(o)+"="+u.join(",")):u.length!==0&&s.push(u.join(","))}else n===";"?this.isDefined(i)&&s.push(this.encodeUnreserved(o)):i===""&&(n==="&"||n==="?")?s.push(this.encodeUnreserved(o)+"="):i===""&&s.push("");return s},e.prototype.parse=function(t){var n=this,o=["+","#",".","/",";","?","&"];return{expand:a(function(r){return t.replace(/\{([^\{\}]+)\}|([^\{\}]+)/g,function(i,s,u){if(s){var h=null,g=[];if(o.indexOf(s.charAt(0))!==-1&&(h=s.charAt(0),s=s.substr(1)),s.split(/,/g).forEach(function(T){var b=/([^:\*]*)(?::(\d+)|(\*))?/.exec(T);g.push.apply(g,n.getValues(r,h,b[1],b[2]||b[3]))}),h&&h!=="+"){var y=",";return h==="?"?y="&":h!=="#"&&(y=h),(g.length!==0?h:"")+g.join(y)}else return g.join(",")}else return n.encodeReserved(u)})},"expand")}},new e})});var ik=j(UT=>{"use strict";Object.defineProperty(UT,"__esModule",{value:!0});UT.isBrowser=CK;function CK(){return typeof window<"u"}a(CK,"isBrowser")});var ah=j(ih=>{"use strict";Object.defineProperty(ih,"__esModule",{value:!0});ih.headersToClassicHeaders=ak;ih.marshallGaxiosResponse=NK;function ak(e){let t={};if(e instanceof Headers)e.forEach((n,o)=>{t[o]=n});else if(Array.isArray(e))for(let[n,o]of e)t[n]=o;else t=e||{};return t}a(ak,"headersToClassicHeaders");function NK(e){return Object.defineProperties(e||{},{headers:{configurable:!0,writable:!0,enumerable:!0,value:ak(e?.headers)}})}a(NK,"marshallGaxiosResponse")});var uk=j($r=>{"use strict";Object.defineProperty($r,"__esModule",{value:!0});$r.sessions=void 0;$r.request=ZK;$r.closeSession=MT;var ck=require("http2"),kK=require("zlib"),zK=require("url"),UK=kT(),MK=Eu(),FK=require("stream"),LK=require("util"),jK=require("process"),qK=ah(),{HTTP2_HEADER_CONTENT_ENCODING:BK,HTTP2_HEADER_CONTENT_TYPE:sk,HTTP2_HEADER_METHOD:VK,HTTP2_HEADER_PATH:GK,HTTP2_HEADER_STATUS:HK}=ck.constants,dl=!!jK.env.HTTP2_DEBUG;$r.sessions={};async function ZK(e){let t=MK(!0,{},e);t.validateStatus=t.validateStatus||WK,t.responseType=t.responseType||"json";let n=new zK.URL(t.url),o=KK(n.host);o.timeoutHandle!==void 0&&clearTimeout(o.timeoutHandle);let r=n.pathname;if(e.params&&Object.keys(e.params).length>0){let T=(e.paramsSerializer||UK.stringify)(t.params);r+=`?${T}`}let i=(0,qK.headersToClassicHeaders)(t.headers);i[GK]=r,i[VK]=e.method||"GET",t.headers=i,i[sk]||t.responseType!=="text"&&(i[sk]="application/json");let s={config:e,headers:{},status:0,data:{},statusText:""},u=[],h=o.session,g;return new Promise((y,T)=>{try{g=h.request(i).on("response",b=>{Object.assign(s,{headers:b,status:b[HK]});let P=g;if(b[BK]==="gzip"&&(P=g.pipe(kK.createGunzip())),t.responseType==="stream"){s.data=P,y(s);return}P.on("data",S=>{u.push(S)}).on("error",S=>{T(S)}).on("end",()=>{let S=Buffer.concat(u),R=S;if(S){if(t.responseType==="json")try{R=JSON.parse(S.toString("utf8"))}catch{R=S.toString("utf8")}else t.responseType==="text"?R=S.toString("utf8"):t.responseType==="arraybuffer"&&(R=S.buffer);s.data=R}if(!t.validateStatus(s.status)){let I=`Request failed with status code ${s.status}. `;if(s.data&&typeof s.data=="object"){let l=LK.inspect(s.data,{depth:5});I=`${I}
59
+ '${l}`}T(new Error(I,{cause:s}))}y(s)})}).on("error",b=>{T(b)})}catch(b){MT(n).then(()=>T(b)).catch(T);return}if(s.request=g,e.data){if(e.data instanceof FK.Stream)e.data.pipe(g);else if(typeof e.data=="string"){let b=Buffer.from(e.data);g.end(b)}else if(typeof e.data=="object"){let b=JSON.stringify(e.data);g.end(b)}}o.timeoutHandle=setTimeout(()=>MT(n),500)})}a(ZK,"request");function WK(e){return e>=200&&e<300}a(WK,"validateStatus");function KK(e){if($r.sessions[e])dl&&console.log(`Used cached client for ${e}`);else{dl&&console.log(`Creating client for ${e}`);let t=ck.connect(`https://${e}`);t.on("error",n=>{console.error(`*ERROR*: ${n}`),delete $r.sessions[e]}).on("goaway",(n,o)=>{console.error(`*GOAWAY*: ${n} : ${o}`),delete $r.sessions[e]}),$r.sessions[e]={session:t}}return $r.sessions[e]}a(KK,"_getClient");async function MT(e){let t=$r.sessions[e.host];if(!t)return;let{session:n}=t;delete $r.sessions[e.host],dl&&console.error(`Closing ${e.host}`),n.close(()=>{dl&&console.error(`Closed ${e.host}`)}),setTimeout(()=>{n&&!n.destroyed&&(dl&&console.log(`Forcing close ${e.host}`),n&&n.destroy())},1e3)}a(MT,"closeSession")});var lk=j((spe,JK)=>{JK.exports={name:"googleapis-common",version:"8.0.2",description:"A common tooling library used by the googleapis npm module. You probably don't want to use this directly.",repository:{type:"git",directory:"packages/nodejs-googleapis-common",url:"https://github.com/googleapis/google-cloud-node-core.git"},main:"build/src/index.js",types:"build/src/index.d.ts",files:["build/src","!build/src/**/*.map"],scripts:{prebenchmark:"npm run compile",benchmark:"node build/benchmark/bench.js",compile:"tsc -p .",test:"c8 mocha build/test","system-test":"c8 mocha build/system-test --timeout 600000","presystem-test":"npm run compile",fix:"gts fix",prepare:"npm run compile",pretest:"npm run compile",lint:"gts check","samples-test":"mocha build/samples-test",docs:"jsdoc -c .jsdoc.js",webpack:"webpack","browser-test":"karma start",prelint:"cd samples; npm link ../; npm install",clean:"gts clean",precompile:"gts clean"},keywords:[],author:"Google LLC",license:"Apache-2.0",dependencies:{extend:"^3.0.2",gaxios:"7.1.3","google-auth-library":"10.5.0","google-logging-utils":"1.1.3",qs:"^6.7.0","url-template":"^2.0.8"},devDependencies:{"@babel/plugin-proposal-private-methods":"^7.18.6","@types/extend":"^3.0.1","@types/mocha":"^10.0.10","@types/mv":"^2.1.0","@types/ncp":"^2.0.8","@types/nock":"^11.0.0","@types/proxyquire":"^1.3.31","@types/qs":"^6.5.3","@types/sinon":"^21.0.0","@types/tmp":"^0.2.6","@types/url-template":"^2.0.28",c8:"^10.1.3",codecov:"^3.8.3",gts:"^6.0.2",http2spy:"^2.0.0","is-docker":"^3.0.0",jsdoc:"^4.0.4","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",mocha:"^11.1.0",mv:"^2.1.1",ncp:"^2.0.0",nock:"^14.0.5","null-loader":"^4.0.1","path-to-regexp":"^6.0.0",proxyquire:"^2.1.3",puppeteer:"^24.0.0",sinon:"21.0.3",tmp:"0.2.5","ts-loader":"^9.5.2",typescript:"5.8.3",webpack:"^5.97.1","webpack-cli":"^6.0.1"},engines:{node:">=18.0.0"},homepage:"https://github.com/googleapis/google-cloud-node-core/tree/main/packages/nodejs-googleapis-common"}});var sh=j(BT=>{"use strict";Object.defineProperty(BT,"__esModule",{value:!0});BT.createAPIRequest=tJ;var FT=St(),XK=kT(),hk=require("stream"),dk=ok(),pk=Eu(),jT=ik(),YK=uk(),LT=ah(),gk=lk(),fk=a(()=>globalThis.crypto?.randomUUID()||require("crypto").randomUUID(),"randomUUID");function QK(e){return e!==null&&typeof e=="object"&&typeof e.pipe=="function"&&e.readable!==!1&&typeof e._read=="function"&&typeof e._readableState=="object"}a(QK,"isReadableStream");function eJ(e,t){let n=new Array;return t.forEach(o=>{e[o]===void 0&&n.push(o)}),n.length>0?n:null}a(eJ,"getMissingParams");function tJ(e,t){if(t)mk(e).then(n=>t(null,n),t);else return mk(e)}a(tJ,"createAPIRequest");async function mk(e){let t=pk(!0,{},e.context.google?._options||{},e.context._options||{},e.options),n=pk(!0,{},t.params,e.params);t.userAgentDirectives=t.userAgentDirectives||[];let o=n.media||{},r=n.requestBody;!n.requestBody&&n.resource&&(!e.requiredParams.includes("resource")||typeof n.resource!="string")&&(r=n.resource,delete n.resource),delete n.requestBody;let i=n.auth||t.auth,s=typeof o.body=="string"?"text/plain":"application/octet-stream";delete n.media,delete n.auth;let u=(0,LT.headersToClassicHeaders)(n.headers||{});rJ(u,t.apiVersion),delete n.headers,Object.keys(n).forEach(P=>{if(P.slice(-1)==="_"){let S=P.slice(0,-1);n[S]=n[P],delete n[P]}});let h=eJ(n,e.requiredParams);if(h)throw new Error("Missing required parameters: "+h.join(", "));if(t.url){let P=t.url;typeof P=="object"&&(P=P.toString()),t.url=dk.parse(P).expand(n)}if(e.mediaUrl&&(e.mediaUrl=dk.parse(e.mediaUrl).expand(n)),e.context._options.rootUrl!==void 0&&t.url!==void 0){let P=new URL(t.url),S=P.href.substr(P.origin.length);t.url=new URL(S,e.context._options.rootUrl).href}t.paramsSerializer=P=>XK.stringify(P,{arrayFormat:"repeat"}),e.pathParams.forEach(P=>delete n[P]),typeof i=="string"&&(n.key=n.key||i,i=void 0);function g(P){let S=fk(),R=`--${S}--`,I=new hk.PassThrough({flush(d){this.push(`\r
60
+ `),this.push(R),d()}}),l=new qT,m=QK(P[1].body);u["content-type"]=`multipart/related; boundary=${S}`;for(let d of P){let v=`--${S}\r
61
61
  content-type: ${d["content-type"]}\r
62
62
  \r
63
63
  `;I.push(v),typeof d.body=="string"?(I.push(d.body),I.push(`\r
@@ -65,7 +65,7 @@ content-type: ${d["content-type"]}\r
65
65
  content-type: ${l["content-type"]}\r
66
66
  \r
67
67
  `;I+=m,typeof l.body=="string"&&(I+=l.body,I+=`\r
68
- `)}I+=R,t.data=I}if(a(y,"browserMultipartUpload"),e.mediaUrl&&o.body)if(t.url=e.mediaUrl,r){n.uploadType="multipart";let P=[{"content-type":"application/json",body:JSON.stringify(r)},{"content-type":o.mimeType||r&&r.mimeType||s,body:o.body}];(0,jT.isBrowser)()?y(P):g(P)}else n.uploadType="media",Object.assign(u,{"content-type":o.mimeType||s}),t.data=o.body;else t.data=r||void 0;if(t.headers=FT.Gaxios.mergeHeaders(t.headers||{},u),t.params=n,!(0,jT.isBrowser)()){t.headers.set("Accept-Encoding","gzip"),t.userAgentDirectives.push({product:"google-api-nodejs-client",version:gk.version,comment:"gzip"});let P=t.userAgentDirectives.map(S=>{let R=`${S.product}/${S.version}`;return S.comment&&(R+=` (${S.comment})`),R}).join(" ");t.headers.set("User-Agent",P)}if(t.validateStatus||(t.validateStatus=P=>P>=200&&P<300||P===304),t.retry=t.retry===void 0?!0:t.retry,delete t.auth,t.universeDomain&&t.universe_domain&&t.universeDomain!==t.universe_domain)throw new Error("Please set either universe_domain or universeDomain, but not both.");let T=typeof process=="object"&&typeof process.env=="object"?process.env.GOOGLE_CLOUD_UNIVERSE_DOMAIN:void 0,b=t.universeDomain??t.universe_domain??T??"googleapis.com";if(b!=="googleapis.com"&&t.url){let P=new URL(t.url);P.hostname.endsWith(".googleapis.com")&&(P.hostname=P.hostname.replace(/googleapis\.com$/,b),t.url=P.toString())}if(Object.keys(t.params).length||(delete t.params,delete t.paramsSerializer),i&&typeof i=="object"){let P=typeof i.getUniverseDomain=="function"?await i.getUniverseDomain():void 0;if(P&&b!==P)throw new Error(`The configured universe domain (${b}) does not match the universe domain found in the credentials (${P}). If you haven't configured the universe domain explicitly, googleapis.com is the default.`);if(t.http2){let S=await i.getRequestHeaders(t.url),R=Object.assign({},t);return R.headers=FT.Gaxios.mergeHeaders(R.headers,S),XK.request(R)}else{let S=await i.request(t);return(0,LT.marshallGaxiosResponse)(S)}}else return new FT.Gaxios().request(t).then(P=>(0,LT.marshallGaxiosResponse)(P))}a(mk,"createAPIRequestAsync");var qT=class extends hk.Transform{static{a(this,"ProgressStream")}bytesRead=0;_transform(t,n,o){this.bytesRead+=t.length,this.emit("progress",this.bytesRead),this.push(t),o()}};function tJ(e,t){(0,jT.isBrowser)()||(e["x-goog-api-client"]=`gdcl/${gk.version} gl-node/${process.versions.node}`),t&&(e["x-goog-api-version"]=t)}a(tJ,"populateAPIHeader")});var yk=j(ch=>{"use strict";Object.defineProperty(ch,"__esModule",{value:!0});ch.AuthPlus=void 0;var eo=tl(),VT=class extends eo.GoogleAuth{static{a(this,"AuthPlus")}JWT=eo.JWT;Compute=eo.Compute;OAuth2=eo.OAuth2Client;GoogleAuth=eo.GoogleAuth;AwsClient=eo.AwsClient;IdentityPoolClient=eo.IdentityPoolClient;ExternalAccountClient=eo.ExternalAccountClient;_cachedAuth;async getClient(t){return this._cachedAuth=new eo.GoogleAuth(t),this._cachedAuth.getClient()}getProjectId(t){return t?this._cachedAuth?this._cachedAuth.getProjectId(t):super.getProjectId(t):this._cachedAuth?this._cachedAuth.getProjectId():super.getProjectId()}};ch.AuthPlus=VT});var HT=j(uh=>{"use strict";Object.defineProperty(uh,"__esModule",{value:!0});uh.Endpoint=void 0;var vk=sh(),GT=class{static{a(this,"Endpoint")}_options;google;constructor(t){this._options=t||{}}applySchema(t,n,o,r){if(this.applyMethodsFromSchema(t,n,o,r),o.resources){for(let i in o.resources)if(Object.prototype.hasOwnProperty.call(o.resources,i)){let s=o.resources[i];t[i]||(t[i]={}),this.applySchema(t[i],n,s,r)}}}applyMethodsFromSchema(t,n,o,r){if(o.methods){for(let i in o.methods)if(Object.prototype.hasOwnProperty.call(o.methods,i)){let s=o.methods[i];t[i]=this.makeMethod(n,s,r)}}}makeMethod(t,n,o){return(r,i)=>{let s=typeof r=="function"?{}:r;i=typeof r=="function"?r:i;let u=_k(t.rootUrl+t.servicePath+n.path),h={options:{url:u.substring(1,u.length-1),method:n.httpMethod,apiVersion:n.apiVersion},params:s,requiredParams:n.parameterOrder||[],pathParams:this.getPathParams(n.parameters),context:o};if(n.mediaUpload&&n.mediaUpload.protocols&&n.mediaUpload.protocols.simple&&n.mediaUpload.protocols.simple.path){let g=_k(t.rootUrl+n.mediaUpload.protocols.simple.path);h.mediaUrl=g.substring(1,g.length-1)}if(!i)return(0,vk.createAPIRequest)(h);(0,vk.createAPIRequest)(h,i)}}getPathParams(t){let n=new Array;return typeof t!="object"&&(t={}),Object.keys(t).forEach(o=>{t[o].location==="path"&&n.push(o)}),n}};uh.Endpoint=GT;function _k(e){return e?`'${e}'`.replace(/([^:]\/)\/+/g,"$1"):""}a(_k,"buildurl")});var wk=j(lh=>{"use strict";Object.defineProperty(lh,"__esModule",{value:!0});lh.Discovery=void 0;var rJ=require("fs"),nJ=St(),oJ=require("url"),Pk=require("util"),iJ=sh(),aJ=HT(),sJ=Pk.promisify(rJ.readFile),ZT=class{static{a(this,"Discovery")}transporter=new nJ.Gaxios;options;constructor(t){this.options=t||{}}makeEndpoint(t){return n=>{let o=new aJ.Endpoint(n);return o.applySchema(o,t,t,o),o}}log(...t){this.options&&this.options.debug&&console.log(...t)}async discoverAllAPIs(t){let n=new Headers(this.options.includePrivate?{}:{"X-User-Ip":"0.0.0.0"}),r=(await this.transporter.request({url:t,headers:n})).data.items,i=await Promise.all(r.map(async h=>{let g=await this.discoverAPI(h.discoveryRestUrl);return{api:h,endpointCreator:g}})),s={},u={};for(let h of i)u[h.api.name]||(s[h.api.name]={},u[h.api.name]=g=>{let y=typeof g,T;if(y==="string")T=g,g={};else if(y==="object")T=g.version,delete g.version;else throw new Error("Argument error: Accepts only string or object");try{let b=h.endpointCreator(g,this);return Object.freeze(b)}catch(b){throw new Error(Pk.format('Unable to load endpoint %s("%s"): %s',h.api.name,T,b.message))}}),s[h.api.name][h.api.version]=h.endpointCreator;return u}async discoverAPI(t){if(typeof t=="string"){let n=oJ.parse(t);if(t&&!n.protocol){this.log("Reading from file "+t);let o=await sJ(t,{encoding:"utf8"});return this.makeEndpoint(JSON.parse(o))}else{this.log("Requesting "+t);let o=await this.transporter.request({url:t});return this.makeEndpoint(o.data)}}else{let n=t;this.log("Requesting "+n.url);let o=n.url;delete n.url;let r={options:{url:o,method:"GET"},requiredParams:[],pathParams:[],params:n,context:{google:{_options:{}},_options:{}}},i=await(0,iJ.createAPIRequest)(r);return this.makeEndpoint(i.data)}}};lh.Discovery=ZT});var pl=j(Me=>{"use strict";var cJ=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]})),uJ=Me&&Me.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&cJ(t,e,n)};Object.defineProperty(Me,"__esModule",{value:!0});Me.Endpoint=Me.Discovery=Me.AuthPlus=Me.createAPIRequest=Me.getAPI=Me.GaxiosError=Me.Gaxios=Me.AwsClient=Me.IdentityPoolClient=Me.BaseExternalAccountClient=Me.ExternalAccountClient=Me.GoogleAuth=Me.UserRefreshClient=Me.Compute=Me.JWT=Me.OAuth2Client=Me.gaxios=Me.googleAuthLibrary=void 0;Me.googleAuthLibrary=tl();Me.gaxios=St();var to=tl();Object.defineProperty(Me,"OAuth2Client",{enumerable:!0,get:a(function(){return to.OAuth2Client},"get")});Object.defineProperty(Me,"JWT",{enumerable:!0,get:a(function(){return to.JWT},"get")});Object.defineProperty(Me,"Compute",{enumerable:!0,get:a(function(){return to.Compute},"get")});Object.defineProperty(Me,"UserRefreshClient",{enumerable:!0,get:a(function(){return to.UserRefreshClient},"get")});Object.defineProperty(Me,"GoogleAuth",{enumerable:!0,get:a(function(){return to.GoogleAuth},"get")});Object.defineProperty(Me,"ExternalAccountClient",{enumerable:!0,get:a(function(){return to.ExternalAccountClient},"get")});Object.defineProperty(Me,"BaseExternalAccountClient",{enumerable:!0,get:a(function(){return to.BaseExternalAccountClient},"get")});Object.defineProperty(Me,"IdentityPoolClient",{enumerable:!0,get:a(function(){return to.IdentityPoolClient},"get")});Object.defineProperty(Me,"AwsClient",{enumerable:!0,get:a(function(){return to.AwsClient},"get")});var bk=St();Object.defineProperty(Me,"Gaxios",{enumerable:!0,get:a(function(){return bk.Gaxios},"get")});Object.defineProperty(Me,"GaxiosError",{enumerable:!0,get:a(function(){return bk.GaxiosError},"get")});var lJ=pN();Object.defineProperty(Me,"getAPI",{enumerable:!0,get:a(function(){return lJ.getAPI},"get")});var dJ=sh();Object.defineProperty(Me,"createAPIRequest",{enumerable:!0,get:a(function(){return dJ.createAPIRequest},"get")});var pJ=yk();Object.defineProperty(Me,"AuthPlus",{enumerable:!0,get:a(function(){return pJ.AuthPlus},"get")});var fJ=wk();Object.defineProperty(Me,"Discovery",{enumerable:!0,get:a(function(){return fJ.Discovery},"get")});var mJ=HT();Object.defineProperty(Me,"Endpoint",{enumerable:!0,get:a(function(){return mJ.Endpoint},"get")});uJ(ah(),Me)});var Ek=j(dh=>{"use strict";Object.defineProperty(dh,"__esModule",{value:!0});dh.drive_v2=void 0;var V=pl(),Tk;(function(e){class t{static{a(this,"Drive")}context;about;apps;changes;channels;children;comments;drives;files;parents;permissions;properties;replies;revisions;teamdrives;constructor(l,m){this.context={_options:l||{},google:m},this.about=new n(this.context),this.apps=new o(this.context),this.changes=new r(this.context),this.channels=new i(this.context),this.children=new s(this.context),this.comments=new u(this.context),this.drives=new h(this.context),this.files=new g(this.context),this.parents=new y(this.context),this.permissions=new T(this.context),this.properties=new b(this.context),this.replies=new P(this.context),this.revisions=new S(this.context),this.teamdrives=new R(this.context)}}e.Drive=t;class n{static{a(this,"Resource$About")}context;constructor(l){this.context=l}get(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/about").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:[],pathParams:[],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}}e.Resource$About=n;class o{static{a(this,"Resource$Apps")}context;constructor(l){this.context=l}get(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/apps/{appId}").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:["appId"],pathParams:["appId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}list(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/apps").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:[],pathParams:[],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}}e.Resource$Apps=o;class r{static{a(this,"Resource$Changes")}context;constructor(l){this.context=l}get(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/changes/{changeId}").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:["changeId"],pathParams:["changeId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}getStartPageToken(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/changes/startPageToken").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:[],pathParams:[],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}list(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/changes").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:[],pathParams:[],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}watch(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/changes/watch").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},p),params:v,requiredParams:[],pathParams:[],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}}e.Resource$Changes=r;class i{static{a(this,"Resource$Channels")}context;constructor(l){this.context=l}stop(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/channels/stop").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},p),params:v,requiredParams:[],pathParams:[],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}}e.Resource$Channels=i;class s{static{a(this,"Resource$Children")}context;constructor(l){this.context=l}delete(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{folderId}/children/{childId}").replace(/([^:]\/)\/+/g,"$1"),method:"DELETE",apiVersion:""},p),params:v,requiredParams:["folderId","childId"],pathParams:["childId","folderId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}get(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{folderId}/children/{childId}").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:["folderId","childId"],pathParams:["childId","folderId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}insert(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{folderId}/children").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},p),params:v,requiredParams:["folderId"],pathParams:["folderId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}list(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{folderId}/children").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:["folderId"],pathParams:["folderId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}}e.Resource$Children=s;class u{static{a(this,"Resource$Comments")}context;constructor(l){this.context=l}delete(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{fileId}/comments/{commentId}").replace(/([^:]\/)\/+/g,"$1"),method:"DELETE",apiVersion:""},p),params:v,requiredParams:["fileId","commentId"],pathParams:["commentId","fileId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}get(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{fileId}/comments/{commentId}").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:["fileId","commentId"],pathParams:["commentId","fileId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}insert(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{fileId}/comments").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},p),params:v,requiredParams:["fileId"],pathParams:["fileId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}list(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{fileId}/comments").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:["fileId"],pathParams:["fileId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}patch(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{fileId}/comments/{commentId}").replace(/([^:]\/)\/+/g,"$1"),method:"PATCH",apiVersion:""},p),params:v,requiredParams:["fileId","commentId"],pathParams:["commentId","fileId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}update(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{fileId}/comments/{commentId}").replace(/([^:]\/)\/+/g,"$1"),method:"PUT",apiVersion:""},p),params:v,requiredParams:["fileId","commentId"],pathParams:["commentId","fileId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}}e.Resource$Comments=u;class h{static{a(this,"Resource$Drives")}context;constructor(l){this.context=l}delete(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/drives/{driveId}").replace(/([^:]\/)\/+/g,"$1"),method:"DELETE",apiVersion:""},p),params:v,requiredParams:["driveId"],pathParams:["driveId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}get(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/drives/{driveId}").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:["driveId"],pathParams:["driveId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}hide(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/drives/{driveId}/hide").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},p),params:v,requiredParams:["driveId"],pathParams:["driveId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}insert(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/drives").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},p),params:v,requiredParams:["requestId"],pathParams:[],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}list(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/drives").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:[],pathParams:[],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}unhide(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/drives/{driveId}/unhide").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},p),params:v,requiredParams:["driveId"],pathParams:["driveId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}update(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/drives/{driveId}").replace(/([^:]\/)\/+/g,"$1"),method:"PUT",apiVersion:""},p),params:v,requiredParams:["driveId"],pathParams:["driveId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}}e.Resource$Drives=h;class g{static{a(this,"Resource$Files")}context;constructor(l){this.context=l}copy(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{fileId}/copy").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},p),params:v,requiredParams:["fileId"],pathParams:["fileId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}delete(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{fileId}").replace(/([^:]\/)\/+/g,"$1"),method:"DELETE",apiVersion:""},p),params:v,requiredParams:["fileId"],pathParams:["fileId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}emptyTrash(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/trash").replace(/([^:]\/)\/+/g,"$1"),method:"DELETE",apiVersion:""},p),params:v,requiredParams:[],pathParams:[],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}export(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{fileId}/export").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:["fileId","mimeType"],pathParams:["fileId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}generateCseToken(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/generateCseToken").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:[],pathParams:[],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}generateIds(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/generateIds").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:[],pathParams:[],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}get(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{fileId}").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:["fileId"],pathParams:["fileId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}insert(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},p),params:v,mediaUrl:(E+"/upload/drive/v2/files").replace(/([^:]\/)\/+/g,"$1"),requiredParams:[],pathParams:[],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}list(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:[],pathParams:[],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}listLabels(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{fileId}/listLabels").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:["fileId"],pathParams:["fileId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}modifyLabels(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{fileId}/modifyLabels").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},p),params:v,requiredParams:["fileId"],pathParams:["fileId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}patch(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{fileId}").replace(/([^:]\/)\/+/g,"$1"),method:"PATCH",apiVersion:""},p),params:v,requiredParams:["fileId"],pathParams:["fileId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}touch(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{fileId}/touch").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},p),params:v,requiredParams:["fileId"],pathParams:["fileId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}trash(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{fileId}/trash").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},p),params:v,requiredParams:["fileId"],pathParams:["fileId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}untrash(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{fileId}/untrash").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},p),params:v,requiredParams:["fileId"],pathParams:["fileId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}update(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{fileId}").replace(/([^:]\/)\/+/g,"$1"),method:"PUT",apiVersion:""},p),params:v,mediaUrl:(E+"/upload/drive/v2/files/{fileId}").replace(/([^:]\/)\/+/g,"$1"),requiredParams:["fileId"],pathParams:["fileId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}watch(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{fileId}/watch").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},p),params:v,requiredParams:["fileId"],pathParams:["fileId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}}e.Resource$Files=g;class y{static{a(this,"Resource$Parents")}context;constructor(l){this.context=l}delete(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{fileId}/parents/{parentId}").replace(/([^:]\/)\/+/g,"$1"),method:"DELETE",apiVersion:""},p),params:v,requiredParams:["fileId","parentId"],pathParams:["fileId","parentId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}get(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{fileId}/parents/{parentId}").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:["fileId","parentId"],pathParams:["fileId","parentId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}insert(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{fileId}/parents").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},p),params:v,requiredParams:["fileId"],pathParams:["fileId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}list(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{fileId}/parents").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:["fileId"],pathParams:["fileId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}}e.Resource$Parents=y;class T{static{a(this,"Resource$Permissions")}context;constructor(l){this.context=l}delete(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{fileId}/permissions/{permissionId}").replace(/([^:]\/)\/+/g,"$1"),method:"DELETE",apiVersion:""},p),params:v,requiredParams:["fileId","permissionId"],pathParams:["fileId","permissionId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}get(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{fileId}/permissions/{permissionId}").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:["fileId","permissionId"],pathParams:["fileId","permissionId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}getIdForEmail(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/permissionIds/{email}").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:["email"],pathParams:["email"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}insert(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{fileId}/permissions").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},p),params:v,requiredParams:["fileId"],pathParams:["fileId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}list(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{fileId}/permissions").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:["fileId"],pathParams:["fileId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}patch(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{fileId}/permissions/{permissionId}").replace(/([^:]\/)\/+/g,"$1"),method:"PATCH",apiVersion:""},p),params:v,requiredParams:["fileId","permissionId"],pathParams:["fileId","permissionId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}update(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{fileId}/permissions/{permissionId}").replace(/([^:]\/)\/+/g,"$1"),method:"PUT",apiVersion:""},p),params:v,requiredParams:["fileId","permissionId"],pathParams:["fileId","permissionId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}}e.Resource$Permissions=T;class b{static{a(this,"Resource$Properties")}context;constructor(l){this.context=l}delete(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{fileId}/properties/{propertyKey}").replace(/([^:]\/)\/+/g,"$1"),method:"DELETE",apiVersion:""},p),params:v,requiredParams:["fileId","propertyKey"],pathParams:["fileId","propertyKey"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}get(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{fileId}/properties/{propertyKey}").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:["fileId","propertyKey"],pathParams:["fileId","propertyKey"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}insert(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{fileId}/properties").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},p),params:v,requiredParams:["fileId"],pathParams:["fileId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}list(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{fileId}/properties").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:["fileId"],pathParams:["fileId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}patch(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{fileId}/properties/{propertyKey}").replace(/([^:]\/)\/+/g,"$1"),method:"PATCH",apiVersion:""},p),params:v,requiredParams:["fileId","propertyKey"],pathParams:["fileId","propertyKey"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}update(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{fileId}/properties/{propertyKey}").replace(/([^:]\/)\/+/g,"$1"),method:"PUT",apiVersion:""},p),params:v,requiredParams:["fileId","propertyKey"],pathParams:["fileId","propertyKey"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}}e.Resource$Properties=b;class P{static{a(this,"Resource$Replies")}context;constructor(l){this.context=l}delete(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{fileId}/comments/{commentId}/replies/{replyId}").replace(/([^:]\/)\/+/g,"$1"),method:"DELETE",apiVersion:""},p),params:v,requiredParams:["fileId","commentId","replyId"],pathParams:["commentId","fileId","replyId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}get(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{fileId}/comments/{commentId}/replies/{replyId}").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:["fileId","commentId","replyId"],pathParams:["commentId","fileId","replyId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}insert(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{fileId}/comments/{commentId}/replies").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},p),params:v,requiredParams:["fileId","commentId"],pathParams:["commentId","fileId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}list(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{fileId}/comments/{commentId}/replies").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:["fileId","commentId"],pathParams:["commentId","fileId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}patch(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{fileId}/comments/{commentId}/replies/{replyId}").replace(/([^:]\/)\/+/g,"$1"),method:"PATCH",apiVersion:""},p),params:v,requiredParams:["fileId","commentId","replyId"],pathParams:["commentId","fileId","replyId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}update(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{fileId}/comments/{commentId}/replies/{replyId}").replace(/([^:]\/)\/+/g,"$1"),method:"PUT",apiVersion:""},p),params:v,requiredParams:["fileId","commentId","replyId"],pathParams:["commentId","fileId","replyId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}}e.Resource$Replies=P;class S{static{a(this,"Resource$Revisions")}context;constructor(l){this.context=l}delete(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{fileId}/revisions/{revisionId}").replace(/([^:]\/)\/+/g,"$1"),method:"DELETE",apiVersion:""},p),params:v,requiredParams:["fileId","revisionId"],pathParams:["fileId","revisionId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}get(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{fileId}/revisions/{revisionId}").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:["fileId","revisionId"],pathParams:["fileId","revisionId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}list(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{fileId}/revisions").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:["fileId"],pathParams:["fileId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}patch(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{fileId}/revisions/{revisionId}").replace(/([^:]\/)\/+/g,"$1"),method:"PATCH",apiVersion:""},p),params:v,requiredParams:["fileId","revisionId"],pathParams:["fileId","revisionId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}update(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{fileId}/revisions/{revisionId}").replace(/([^:]\/)\/+/g,"$1"),method:"PUT",apiVersion:""},p),params:v,requiredParams:["fileId","revisionId"],pathParams:["fileId","revisionId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}}e.Resource$Revisions=S;class R{static{a(this,"Resource$Teamdrives")}context;constructor(l){this.context=l}delete(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/teamdrives/{teamDriveId}").replace(/([^:]\/)\/+/g,"$1"),method:"DELETE",apiVersion:""},p),params:v,requiredParams:["teamDriveId"],pathParams:["teamDriveId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}get(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/teamdrives/{teamDriveId}").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:["teamDriveId"],pathParams:["teamDriveId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}insert(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/teamdrives").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},p),params:v,requiredParams:["requestId"],pathParams:[],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}list(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/teamdrives").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:[],pathParams:[],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}update(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/teamdrives/{teamDriveId}").replace(/([^:]\/)\/+/g,"$1"),method:"PUT",apiVersion:""},p),params:v,requiredParams:["teamDriveId"],pathParams:["teamDriveId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}}e.Resource$Teamdrives=R})(Tk||(dh.drive_v2=Tk={}))});var xk=j(ph=>{"use strict";Object.defineProperty(ph,"__esModule",{value:!0});ph.drive_v3=void 0;var J=pl(),Sk;(function(e){class t{static{a(this,"Drive")}context;about;accessproposals;approvals;apps;changes;channels;comments;drives;files;operations;permissions;replies;revisions;teamdrives;constructor(l,m){this.context={_options:l||{},google:m},this.about=new n(this.context),this.accessproposals=new o(this.context),this.approvals=new r(this.context),this.apps=new i(this.context),this.changes=new s(this.context),this.channels=new u(this.context),this.comments=new h(this.context),this.drives=new g(this.context),this.files=new y(this.context),this.operations=new T(this.context),this.permissions=new b(this.context),this.replies=new P(this.context),this.revisions=new S(this.context),this.teamdrives=new R(this.context)}}e.Drive=t;class n{static{a(this,"Resource$About")}context;constructor(l){this.context=l}get(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/about").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:[],pathParams:[],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}}e.Resource$About=n;class o{static{a(this,"Resource$Accessproposals")}context;constructor(l){this.context=l}get(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/files/{fileId}/accessproposals/{proposalId}").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:["fileId","proposalId"],pathParams:["fileId","proposalId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}list(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/files/{fileId}/accessproposals").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:["fileId"],pathParams:["fileId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}resolve(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/files/{fileId}/accessproposals/{proposalId}:resolve").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},p),params:v,requiredParams:["fileId","proposalId"],pathParams:["fileId","proposalId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}}e.Resource$Accessproposals=o;class r{static{a(this,"Resource$Approvals")}context;constructor(l){this.context=l}approve(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/files/{fileId}/approvals/{approvalId}:approve").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},p),params:v,requiredParams:["fileId","approvalId"],pathParams:["approvalId","fileId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}cancel(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/files/{fileId}/approvals/{approvalId}:cancel").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},p),params:v,requiredParams:["fileId","approvalId"],pathParams:["approvalId","fileId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}comment(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/files/{fileId}/approvals/{approvalId}:comment").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},p),params:v,requiredParams:["fileId","approvalId"],pathParams:["approvalId","fileId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}decline(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/files/{fileId}/approvals/{approvalId}:decline").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},p),params:v,requiredParams:["fileId","approvalId"],pathParams:["approvalId","fileId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}get(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/files/{fileId}/approvals/{approvalId}").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:["fileId","approvalId"],pathParams:["approvalId","fileId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}list(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/files/{fileId}/approvals").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:["fileId"],pathParams:["fileId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}reassign(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/files/{fileId}/approvals/{approvalId}:reassign").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},p),params:v,requiredParams:["fileId","approvalId"],pathParams:["approvalId","fileId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}start(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/files/{fileId}/approvals:start").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},p),params:v,requiredParams:["fileId"],pathParams:["fileId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}}e.Resource$Approvals=r;class i{static{a(this,"Resource$Apps")}context;constructor(l){this.context=l}get(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/apps/{appId}").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:["appId"],pathParams:["appId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}list(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/apps").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:[],pathParams:[],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}}e.Resource$Apps=i;class s{static{a(this,"Resource$Changes")}context;constructor(l){this.context=l}getStartPageToken(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/changes/startPageToken").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:[],pathParams:[],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}list(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/changes").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:["pageToken"],pathParams:[],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}watch(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/changes/watch").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},p),params:v,requiredParams:["pageToken"],pathParams:[],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}}e.Resource$Changes=s;class u{static{a(this,"Resource$Channels")}context;constructor(l){this.context=l}stop(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/channels/stop").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},p),params:v,requiredParams:[],pathParams:[],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}}e.Resource$Channels=u;class h{static{a(this,"Resource$Comments")}context;constructor(l){this.context=l}create(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/files/{fileId}/comments").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},p),params:v,requiredParams:["fileId"],pathParams:["fileId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}delete(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/files/{fileId}/comments/{commentId}").replace(/([^:]\/)\/+/g,"$1"),method:"DELETE",apiVersion:""},p),params:v,requiredParams:["fileId","commentId"],pathParams:["commentId","fileId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}get(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/files/{fileId}/comments/{commentId}").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:["fileId","commentId"],pathParams:["commentId","fileId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}list(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/files/{fileId}/comments").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:["fileId"],pathParams:["fileId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}update(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/files/{fileId}/comments/{commentId}").replace(/([^:]\/)\/+/g,"$1"),method:"PATCH",apiVersion:""},p),params:v,requiredParams:["fileId","commentId"],pathParams:["commentId","fileId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}}e.Resource$Comments=h;class g{static{a(this,"Resource$Drives")}context;constructor(l){this.context=l}create(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/drives").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},p),params:v,requiredParams:["requestId"],pathParams:[],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}delete(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/drives/{driveId}").replace(/([^:]\/)\/+/g,"$1"),method:"DELETE",apiVersion:""},p),params:v,requiredParams:["driveId"],pathParams:["driveId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}get(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/drives/{driveId}").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:["driveId"],pathParams:["driveId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}hide(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/drives/{driveId}/hide").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},p),params:v,requiredParams:["driveId"],pathParams:["driveId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}list(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/drives").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:[],pathParams:[],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}unhide(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/drives/{driveId}/unhide").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},p),params:v,requiredParams:["driveId"],pathParams:["driveId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}update(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/drives/{driveId}").replace(/([^:]\/)\/+/g,"$1"),method:"PATCH",apiVersion:""},p),params:v,requiredParams:["driveId"],pathParams:["driveId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}}e.Resource$Drives=g;class y{static{a(this,"Resource$Files")}context;constructor(l){this.context=l}copy(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/files/{fileId}/copy").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},p),params:v,requiredParams:["fileId"],pathParams:["fileId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}create(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/files").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},p),params:v,mediaUrl:(E+"/upload/drive/v3/files").replace(/([^:]\/)\/+/g,"$1"),requiredParams:[],pathParams:[],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}delete(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/files/{fileId}").replace(/([^:]\/)\/+/g,"$1"),method:"DELETE",apiVersion:""},p),params:v,requiredParams:["fileId"],pathParams:["fileId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}download(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/files/{fileId}/download").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},p),params:v,requiredParams:["fileId"],pathParams:["fileId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}emptyTrash(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/files/trash").replace(/([^:]\/)\/+/g,"$1"),method:"DELETE",apiVersion:""},p),params:v,requiredParams:[],pathParams:[],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}export(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/files/{fileId}/export").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:["fileId","mimeType"],pathParams:["fileId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}generateCseToken(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/files/generateCseToken").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:[],pathParams:[],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}generateIds(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/files/generateIds").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:[],pathParams:[],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}get(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/files/{fileId}").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:["fileId"],pathParams:["fileId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}list(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/files").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:[],pathParams:[],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}listLabels(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/files/{fileId}/listLabels").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:["fileId"],pathParams:["fileId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}modifyLabels(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/files/{fileId}/modifyLabels").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},p),params:v,requiredParams:["fileId"],pathParams:["fileId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}update(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/files/{fileId}").replace(/([^:]\/)\/+/g,"$1"),method:"PATCH",apiVersion:""},p),params:v,mediaUrl:(E+"/upload/drive/v3/files/{fileId}").replace(/([^:]\/)\/+/g,"$1"),requiredParams:["fileId"],pathParams:["fileId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}watch(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/files/{fileId}/watch").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},p),params:v,requiredParams:["fileId"],pathParams:["fileId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}}e.Resource$Files=y;class T{static{a(this,"Resource$Operations")}context;constructor(l){this.context=l}get(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/operations/{name}").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:["name"],pathParams:["name"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}}e.Resource$Operations=T;class b{static{a(this,"Resource$Permissions")}context;constructor(l){this.context=l}create(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/files/{fileId}/permissions").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},p),params:v,requiredParams:["fileId"],pathParams:["fileId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}delete(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/files/{fileId}/permissions/{permissionId}").replace(/([^:]\/)\/+/g,"$1"),method:"DELETE",apiVersion:""},p),params:v,requiredParams:["fileId","permissionId"],pathParams:["fileId","permissionId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}get(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/files/{fileId}/permissions/{permissionId}").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:["fileId","permissionId"],pathParams:["fileId","permissionId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}list(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/files/{fileId}/permissions").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:["fileId"],pathParams:["fileId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}update(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/files/{fileId}/permissions/{permissionId}").replace(/([^:]\/)\/+/g,"$1"),method:"PATCH",apiVersion:""},p),params:v,requiredParams:["fileId","permissionId"],pathParams:["fileId","permissionId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}}e.Resource$Permissions=b;class P{static{a(this,"Resource$Replies")}context;constructor(l){this.context=l}create(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/files/{fileId}/comments/{commentId}/replies").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},p),params:v,requiredParams:["fileId","commentId"],pathParams:["commentId","fileId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}delete(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/files/{fileId}/comments/{commentId}/replies/{replyId}").replace(/([^:]\/)\/+/g,"$1"),method:"DELETE",apiVersion:""},p),params:v,requiredParams:["fileId","commentId","replyId"],pathParams:["commentId","fileId","replyId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}get(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/files/{fileId}/comments/{commentId}/replies/{replyId}").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:["fileId","commentId","replyId"],pathParams:["commentId","fileId","replyId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}list(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/files/{fileId}/comments/{commentId}/replies").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:["fileId","commentId"],pathParams:["commentId","fileId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}update(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/files/{fileId}/comments/{commentId}/replies/{replyId}").replace(/([^:]\/)\/+/g,"$1"),method:"PATCH",apiVersion:""},p),params:v,requiredParams:["fileId","commentId","replyId"],pathParams:["commentId","fileId","replyId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}}e.Resource$Replies=P;class S{static{a(this,"Resource$Revisions")}context;constructor(l){this.context=l}delete(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/files/{fileId}/revisions/{revisionId}").replace(/([^:]\/)\/+/g,"$1"),method:"DELETE",apiVersion:""},p),params:v,requiredParams:["fileId","revisionId"],pathParams:["fileId","revisionId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}get(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/files/{fileId}/revisions/{revisionId}").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:["fileId","revisionId"],pathParams:["fileId","revisionId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}list(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/files/{fileId}/revisions").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:["fileId"],pathParams:["fileId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}update(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/files/{fileId}/revisions/{revisionId}").replace(/([^:]\/)\/+/g,"$1"),method:"PATCH",apiVersion:""},p),params:v,requiredParams:["fileId","revisionId"],pathParams:["fileId","revisionId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}}e.Resource$Revisions=S;class R{static{a(this,"Resource$Teamdrives")}context;constructor(l){this.context=l}create(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/teamdrives").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},p),params:v,requiredParams:["requestId"],pathParams:[],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}delete(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/teamdrives/{teamDriveId}").replace(/([^:]\/)\/+/g,"$1"),method:"DELETE",apiVersion:""},p),params:v,requiredParams:["teamDriveId"],pathParams:["teamDriveId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}get(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/teamdrives/{teamDriveId}").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:["teamDriveId"],pathParams:["teamDriveId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}list(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/teamdrives").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:[],pathParams:[],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}update(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/teamdrives/{teamDriveId}").replace(/([^:]\/)\/+/g,"$1"),method:"PATCH",apiVersion:""},p),params:v,requiredParams:["teamDriveId"],pathParams:["teamDriveId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}}e.Resource$Teamdrives=R})(Sk||(ph.drive_v3=Sk={}))});var ze=j(fr=>{"use strict";Object.defineProperty(fr,"__esModule",{value:!0});fr.AuthPlus=fr.drive_v3=fr.drive_v2=fr.auth=fr.VERSIONS=void 0;fr.drive=hJ;var Ik=pl(),Ak=Ek();Object.defineProperty(fr,"drive_v2",{enumerable:!0,get:a(function(){return Ak.drive_v2},"get")});var Rk=xk();Object.defineProperty(fr,"drive_v3",{enumerable:!0,get:a(function(){return Rk.drive_v3},"get")});fr.VERSIONS={v2:Ak.drive_v2.Drive,v3:Rk.drive_v3.Drive};function hJ(e){return(0,Ik.getAPI)("drive",e,fr.VERSIONS,this)}a(hJ,"drive");var gJ=new Ik.AuthPlus;fr.auth=gJ;var yJ=pl();Object.defineProperty(fr,"AuthPlus",{enumerable:!0,get:a(function(){return yJ.AuthPlus},"get")})});var fl=j((WT,KT)=>{(function(e,t){typeof WT=="object"&&typeof KT<"u"?KT.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs=t()})(WT,(function(){"use strict";var e=1e3,t=6e4,n=36e5,o="millisecond",r="second",i="minute",s="hour",u="day",h="week",g="month",y="quarter",T="year",b="date",P="Invalid Date",S=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,R=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,I={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:a(function(me){var ee=["th","st","nd","rd"],Q=me%100;return"["+me+(ee[(Q-20)%10]||ee[Q]||ee[0])+"]"},"ordinal")},l=a(function(me,ee,Q){var se=String(me);return!se||se.length>=ee?me:""+Array(ee+1-se.length).join(Q)+me},"m"),m={s:l,z:a(function(me){var ee=-me.utcOffset(),Q=Math.abs(ee),se=Math.floor(Q/60),ne=Q%60;return(ee<=0?"+":"-")+l(se,2,"0")+":"+l(ne,2,"0")},"z"),m:a(function me(ee,Q){if(ee.date()<Q.date())return-me(Q,ee);var se=12*(Q.year()-ee.year())+(Q.month()-ee.month()),ne=ee.clone().add(se,g),ge=Q-ne<0,_e=ee.clone().add(se+(ge?-1:1),g);return+(-(se+(Q-ne)/(ge?ne-_e:_e-ne))||0)},"t"),a:a(function(me){return me<0?Math.ceil(me)||0:Math.floor(me)},"a"),p:a(function(me){return{M:g,y:T,w:h,d:u,D:b,h:s,m:i,s:r,ms:o,Q:y}[me]||String(me||"").toLowerCase().replace(/s$/,"")},"p"),u:a(function(me){return me===void 0},"u")},d="en",v={};v[d]=I;var p=a(function(me){return me instanceof oe},"p"),E=a(function me(ee,Q,se){var ne;if(!ee)return d;if(typeof ee=="string"){var ge=ee.toLowerCase();v[ge]&&(ne=ge),Q&&(v[ge]=Q,ne=ge);var _e=ee.split("-");if(!ne&&_e.length>1)return me(_e[0])}else{var Fe=ee.name;v[Fe]=ee,ne=Fe}return!se&&ne&&(d=ne),ne||!se&&d},"t"),_=a(function(me,ee){if(p(me))return me.clone();var Q=typeof ee=="object"?ee:{};return Q.date=me,Q.args=arguments,new oe(Q)},"w"),pe=m;pe.l=E,pe.i=p,pe.w=function(me,ee){return _(me,{locale:ee.$L,utc:ee.$u,x:ee.$x,$offset:ee.$offset})};var oe=(function(){function me(Q){this.$L=E(Q.locale,null,!0),this.parse(Q)}a(me,"M");var ee=me.prototype;return ee.parse=function(Q){this.$d=(function(se){var ne=se.date,ge=se.utc;if(ne===null)return new Date(NaN);if(pe.u(ne))return new Date;if(ne instanceof Date)return new Date(ne);if(typeof ne=="string"&&!/Z$/i.test(ne)){var _e=ne.match(S);if(_e){var Fe=_e[2]-1||0,Ve=(_e[7]||"0").substring(0,3);return ge?new Date(Date.UTC(_e[1],Fe,_e[3]||1,_e[4]||0,_e[5]||0,_e[6]||0,Ve)):new Date(_e[1],Fe,_e[3]||1,_e[4]||0,_e[5]||0,_e[6]||0,Ve)}}return new Date(ne)})(Q),this.$x=Q.x||{},this.init()},ee.init=function(){var Q=this.$d;this.$y=Q.getFullYear(),this.$M=Q.getMonth(),this.$D=Q.getDate(),this.$W=Q.getDay(),this.$H=Q.getHours(),this.$m=Q.getMinutes(),this.$s=Q.getSeconds(),this.$ms=Q.getMilliseconds()},ee.$utils=function(){return pe},ee.isValid=function(){return this.$d.toString()!==P},ee.isSame=function(Q,se){var ne=_(Q);return this.startOf(se)<=ne&&ne<=this.endOf(se)},ee.isAfter=function(Q,se){return _(Q)<this.startOf(se)},ee.isBefore=function(Q,se){return this.endOf(se)<_(Q)},ee.$g=function(Q,se,ne){return pe.u(Q)?this[se]:this.set(ne,Q)},ee.unix=function(){return Math.floor(this.valueOf()/1e3)},ee.valueOf=function(){return this.$d.getTime()},ee.startOf=function(Q,se){var ne=this,ge=!!pe.u(se)||se,_e=pe.p(Q),Fe=a(function(mr,et){var ot=pe.w(ne.$u?Date.UTC(ne.$y,et,mr):new Date(ne.$y,et,mr),ne);return ge?ot:ot.endOf(u)},"l"),Ve=a(function(mr,et){return pe.w(ne.toDate()[mr].apply(ne.toDate("s"),(ge?[0,0,0,0]:[23,59,59,999]).slice(et)),ne)},"$"),nt=this.$W,ut=this.$M,$t=this.$D,le="set"+(this.$u?"UTC":"");switch(_e){case T:return ge?Fe(1,0):Fe(31,11);case g:return ge?Fe(1,ut):Fe(0,ut+1);case h:var Pt=this.$locale().weekStart||0,Tt=(nt<Pt?nt+7:nt)-Pt;return Fe(ge?$t-Tt:$t+(6-Tt),ut);case u:case b:return Ve(le+"Hours",0);case s:return Ve(le+"Minutes",1);case i:return Ve(le+"Seconds",2);case r:return Ve(le+"Milliseconds",3);default:return this.clone()}},ee.endOf=function(Q){return this.startOf(Q,!1)},ee.$set=function(Q,se){var ne,ge=pe.p(Q),_e="set"+(this.$u?"UTC":""),Fe=(ne={},ne[u]=_e+"Date",ne[b]=_e+"Date",ne[g]=_e+"Month",ne[T]=_e+"FullYear",ne[s]=_e+"Hours",ne[i]=_e+"Minutes",ne[r]=_e+"Seconds",ne[o]=_e+"Milliseconds",ne)[ge],Ve=ge===u?this.$D+(se-this.$W):se;if(ge===g||ge===T){var nt=this.clone().set(b,1);nt.$d[Fe](Ve),nt.init(),this.$d=nt.set(b,Math.min(this.$D,nt.daysInMonth())).$d}else Fe&&this.$d[Fe](Ve);return this.init(),this},ee.set=function(Q,se){return this.clone().$set(Q,se)},ee.get=function(Q){return this[pe.p(Q)]()},ee.add=function(Q,se){var ne,ge=this;Q=Number(Q);var _e=pe.p(se),Fe=a(function(ut){var $t=_(ge);return pe.w($t.date($t.date()+Math.round(ut*Q)),ge)},"y");if(_e===g)return this.set(g,this.$M+Q);if(_e===T)return this.set(T,this.$y+Q);if(_e===u)return Fe(1);if(_e===h)return Fe(7);var Ve=(ne={},ne[i]=t,ne[s]=n,ne[r]=e,ne)[_e]||1,nt=this.$d.getTime()+Q*Ve;return pe.w(nt,this)},ee.subtract=function(Q,se){return this.add(-1*Q,se)},ee.format=function(Q){var se=this,ne=this.$locale();if(!this.isValid())return ne.invalidDate||P;var ge=Q||"YYYY-MM-DDTHH:mm:ssZ",_e=pe.z(this),Fe=this.$H,Ve=this.$m,nt=this.$M,ut=ne.weekdays,$t=ne.months,le=ne.meridiem,Pt=a(function(et,ot,A,O){return et&&(et[ot]||et(se,ge))||A[ot].slice(0,O)},"h"),Tt=a(function(et){return pe.s(Fe%12||12,et,"0")},"d"),mr=le||function(et,ot,A){var O=et<12?"AM":"PM";return A?O.toLowerCase():O};return ge.replace(R,(function(et,ot){return ot||(function(A){switch(A){case"YY":return String(se.$y).slice(-2);case"YYYY":return pe.s(se.$y,4,"0");case"M":return nt+1;case"MM":return pe.s(nt+1,2,"0");case"MMM":return Pt(ne.monthsShort,nt,$t,3);case"MMMM":return Pt($t,nt);case"D":return se.$D;case"DD":return pe.s(se.$D,2,"0");case"d":return String(se.$W);case"dd":return Pt(ne.weekdaysMin,se.$W,ut,2);case"ddd":return Pt(ne.weekdaysShort,se.$W,ut,3);case"dddd":return ut[se.$W];case"H":return String(Fe);case"HH":return pe.s(Fe,2,"0");case"h":return Tt(1);case"hh":return Tt(2);case"a":return mr(Fe,Ve,!0);case"A":return mr(Fe,Ve,!1);case"m":return String(Ve);case"mm":return pe.s(Ve,2,"0");case"s":return String(se.$s);case"ss":return pe.s(se.$s,2,"0");case"SSS":return pe.s(se.$ms,3,"0");case"Z":return _e}return null})(et)||_e.replace(":","")}))},ee.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},ee.diff=function(Q,se,ne){var ge,_e=this,Fe=pe.p(se),Ve=_(Q),nt=(Ve.utcOffset()-this.utcOffset())*t,ut=this-Ve,$t=a(function(){return pe.m(_e,Ve)},"D");switch(Fe){case T:ge=$t()/12;break;case g:ge=$t();break;case y:ge=$t()/3;break;case h:ge=(ut-nt)/6048e5;break;case u:ge=(ut-nt)/864e5;break;case s:ge=ut/n;break;case i:ge=ut/t;break;case r:ge=ut/e;break;default:ge=ut}return ne?ge:pe.a(ge)},ee.daysInMonth=function(){return this.endOf(g).$D},ee.$locale=function(){return v[this.$L]},ee.locale=function(Q,se){if(!Q)return this.$L;var ne=this.clone(),ge=E(Q,se,!0);return ge&&(ne.$L=ge),ne},ee.clone=function(){return pe.w(this.$d,this)},ee.toDate=function(){return new Date(this.valueOf())},ee.toJSON=function(){return this.isValid()?this.toISOString():null},ee.toISOString=function(){return this.$d.toISOString()},ee.toString=function(){return this.$d.toUTCString()},me})(),Be=oe.prototype;return _.prototype=Be,[["$ms",o],["$s",r],["$m",i],["$H",s],["$W",u],["$M",g],["$y",T],["$D",b]].forEach((function(me){Be[me[1]]=function(ee){return this.$g(ee,me[0],me[1])}})),_.extend=function(me,ee){return me.$i||(me(ee,oe,_),me.$i=!0),_},_.locale=E,_.isDayjs=p,_.unix=function(me){return _(1e3*me)},_.en=v[d],_.Ls=v,_.p={},_}))});var qJ={};nr(qJ,{createGoogleClient:()=>de,getAccessToken:()=>bt,googleDrive:()=>jJ,googleDriveAuth:()=>Y});module.exports=FL(qJ);var vr={};nr(vr,{$ZodAny:()=>Us,$ZodArray:()=>js,$ZodAsyncError:()=>Kr,$ZodBase64:()=>Id,$ZodBase64URL:()=>Ad,$ZodBigInt:()=>ia,$ZodBigIntFormat:()=>$d,$ZodBoolean:()=>Yo,$ZodCIDRv4:()=>Sd,$ZodCIDRv6:()=>xd,$ZodCUID:()=>yd,$ZodCUID2:()=>vd,$ZodCatch:()=>Wd,$ZodCheck:()=>at,$ZodCheckBigIntFormat:()=>Cg,$ZodCheckEndsWith:()=>Gg,$ZodCheckGreaterThan:()=>ad,$ZodCheckIncludes:()=>Bg,$ZodCheckLengthEquals:()=>Fg,$ZodCheckLessThan:()=>id,$ZodCheckLowerCase:()=>jg,$ZodCheckMaxLength:()=>Ug,$ZodCheckMaxSize:()=>Ng,$ZodCheckMimeType:()=>Zg,$ZodCheckMinLength:()=>Mg,$ZodCheckMinSize:()=>kg,$ZodCheckMultipleOf:()=>Og,$ZodCheckNumberFormat:()=>$g,$ZodCheckOverwrite:()=>Wg,$ZodCheckProperty:()=>Hg,$ZodCheckRegex:()=>Lg,$ZodCheckSizeEquals:()=>zg,$ZodCheckStartsWith:()=>Vg,$ZodCheckStringFormat:()=>na,$ZodCheckUpperCase:()=>qg,$ZodCodec:()=>sa,$ZodCustom:()=>Js,$ZodCustomStringFormat:()=>Od,$ZodDate:()=>Ls,$ZodDefault:()=>Vd,$ZodDiscriminatedUnion:()=>qs,$ZodE164:()=>Rd,$ZodEmail:()=>md,$ZodEmoji:()=>hd,$ZodEncodeError:()=>lo,$ZodEnum:()=>Gs,$ZodError:()=>Is,$ZodExactOptional:()=>Bd,$ZodFile:()=>qd,$ZodFunction:()=>Yd,$ZodGUID:()=>pd,$ZodIPv4:()=>bd,$ZodIPv6:()=>Td,$ZodISODate:()=>Cs,$ZodISODateTime:()=>$s,$ZodISODuration:()=>ks,$ZodISOTime:()=>Ns,$ZodIntersection:()=>Fd,$ZodJWT:()=>Dd,$ZodKSUID:()=>wd,$ZodLazy:()=>ep,$ZodLiteral:()=>Hs,$ZodMAC:()=>Ed,$ZodMap:()=>Ld,$ZodNaN:()=>Kd,$ZodNanoID:()=>gd,$ZodNever:()=>zd,$ZodNonOptional:()=>Hd,$ZodNull:()=>kd,$ZodNullable:()=>Ws,$ZodNumber:()=>oa,$ZodNumberFormat:()=>zs,$ZodObject:()=>Ud,$ZodObjectJIT:()=>Yg,$ZodOptional:()=>aa,$ZodPipe:()=>Ks,$ZodPrefault:()=>Gd,$ZodPromise:()=>Qd,$ZodReadonly:()=>Jd,$ZodRealError:()=>ir,$ZodRecord:()=>Vs,$ZodRegistry:()=>tp,$ZodSet:()=>jd,$ZodString:()=>Mn,$ZodStringFormat:()=>tt,$ZodSuccess:()=>Zd,$ZodSymbol:()=>Cd,$ZodTemplateLiteral:()=>Xd,$ZodTransform:()=>Zs,$ZodTuple:()=>Bs,$ZodType:()=>Re,$ZodULID:()=>_d,$ZodURL:()=>Os,$ZodUUID:()=>fd,$ZodUndefined:()=>Nd,$ZodUnion:()=>Qo,$ZodUnknown:()=>Ms,$ZodVoid:()=>Fs,$ZodXID:()=>Pd,$ZodXor:()=>Md,$brand:()=>Ps,$constructor:()=>N,$input:()=>np,$output:()=>rp,Doc:()=>Ds,JSONSchema:()=>WS,JSONSchemaGenerator:()=>Ip,NEVER:()=>Bl,TimePrecision:()=>ip,_any:()=>Nc,_array:()=>Gy,_base64:()=>Pc,_base64url:()=>wc,_bigint:()=>lp,_boolean:()=>Oc,_catch:()=>Gj,_check:()=>ZS,_cidrv4:()=>vc,_cidrv6:()=>_c,_coercedBigint:()=>Cc,_coercedBoolean:()=>$c,_coercedDate:()=>Uc,_coercedNumber:()=>Rc,_coercedString:()=>nc,_cuid:()=>dc,_cuid2:()=>pc,_custom:()=>Bc,_date:()=>yp,_decode:()=>Jl,_decodeAsync:()=>Yl,_default:()=>qj,_discriminatedUnion:()=>Dj,_e164:()=>bc,_email:()=>oc,_emoji:()=>uc,_encode:()=>Kl,_encodeAsync:()=>Xl,_endsWith:()=>ii,_enum:()=>zj,_file:()=>_p,_float32:()=>ap,_float64:()=>sp,_gt:()=>Xr,_gte:()=>Dt,_guid:()=>la,_includes:()=>ni,_int:()=>Dc,_int32:()=>cp,_int64:()=>dp,_intersection:()=>Oj,_ipv4:()=>gc,_ipv6:()=>yc,_isoDate:()=>Sc,_isoDateTime:()=>Ec,_isoDuration:()=>Ic,_isoTime:()=>xc,_jwt:()=>Tc,_ksuid:()=>hc,_lazy:()=>Kj,_length:()=>vo,_literal:()=>Mj,_lowercase:()=>ti,_lt:()=>Jr,_lte:()=>Kt,_mac:()=>op,_map:()=>Nj,_max:()=>Kt,_maxLength:()=>yo,_maxSize:()=>Ln,_mime:()=>ai,_min:()=>Dt,_minLength:()=>Et,_minSize:()=>Yr,_multipleOf:()=>Fn,_nan:()=>vp,_nanoid:()=>lc,_nativeEnum:()=>Uj,_negative:()=>Fc,_never:()=>gp,_nonnegative:()=>jc,_nonoptional:()=>Bj,_nonpositive:()=>Lc,_normalize:()=>si,_null:()=>hp,_nullable:()=>jj,_number:()=>Ac,_optional:()=>Lj,_overwrite:()=>zr,_parse:()=>Xi,_parseAsync:()=>Yi,_pipe:()=>Hj,_positive:()=>Mc,_promise:()=>Jj,_property:()=>qc,_readonly:()=>Zj,_record:()=>Cj,_refine:()=>Vc,_regex:()=>jt,_safeDecode:()=>ed,_safeDecodeAsync:()=>rd,_safeEncode:()=>Ql,_safeEncodeAsync:()=>td,_safeParse:()=>Qi,_safeParseAsync:()=>ta,_set:()=>kj,_size:()=>go,_slugify:()=>da,_startsWith:()=>oi,_string:()=>rc,_stringFormat:()=>di,_stringbool:()=>Tp,_success:()=>Vj,_superRefine:()=>Pp,_symbol:()=>fp,_templateLiteral:()=>Wj,_toLowerCase:()=>ui,_toUpperCase:()=>li,_transform:()=>Fj,_trim:()=>ci,_tuple:()=>$j,_uint32:()=>up,_uint64:()=>pp,_ulid:()=>fc,_undefined:()=>mp,_union:()=>Aj,_unknown:()=>kc,_uppercase:()=>ri,_url:()=>ei,_uuid:()=>ic,_uuidv4:()=>ac,_uuidv6:()=>sc,_uuidv7:()=>cc,_void:()=>zc,_xid:()=>mc,_xor:()=>Rj,clone:()=>Nt,config:()=>gt,createStandardJSONSchemaMethod:()=>pa,createToJSONSchemaMethod:()=>Hy,decode:()=>mS,decodeAsync:()=>gS,describe:()=>wp,encode:()=>fS,encodeAsync:()=>hS,extractDefs:()=>Po,finalize:()=>wo,flattenError:()=>Ki,formatError:()=>Ji,globalConfig:()=>_s,globalRegistry:()=>kt,initializeContext:()=>_o,isValidBase64:()=>Xg,isValidBase64URL:()=>MS,isValidJWT:()=>FS,locales:()=>ua,meta:()=>bp,parse:()=>Ko,parseAsync:()=>Jo,prettifyError:()=>Wl,process:()=>rt,regexes:()=>ar,registry:()=>tc,safeDecode:()=>vS,safeDecodeAsync:()=>PS,safeEncode:()=>yS,safeEncodeAsync:()=>_S,safeParse:()=>ea,safeParseAsync:()=>ra,toDotPath:()=>pS,toJSONSchema:()=>Gc,treeifyError:()=>Zl,util:()=>ce,version:()=>Kg});var Bl=Object.freeze({status:"aborted"});function N(e,t,n){function o(u,h){if(u._zod||Object.defineProperty(u,"_zod",{value:{def:h,constr:s,traits:new Set},enumerable:!1}),u._zod.traits.has(e))return;u._zod.traits.add(e),t(u,h);let g=s.prototype,y=Object.keys(g);for(let T=0;T<y.length;T++){let b=y[T];b in u||(u[b]=g[b].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 h;let g=n?.Parent?new i:this;o(g,u),(h=g._zod).deferred??(h.deferred=[]);for(let y of g._zod.deferred)y();return g}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(N,"$constructor");var Ps=Symbol("zod_brand"),Kr=class extends Error{static{a(this,"$ZodAsyncError")}constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},lo=class extends Error{static{a(this,"$ZodEncodeError")}constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}},_s={};function gt(e){return e&&Object.assign(_s,e),_s}a(gt,"config");var ce={};nr(ce,{BIGINT_FORMAT_RANGES:()=>rg,Class:()=>Kh,NUMBER_FORMAT_RANGES:()=>tg,aborted:()=>ho,allowsEval:()=>Yh,assert:()=>VL,assertEqual:()=>LL,assertIs:()=>qL,assertNever:()=>BL,assertNotEqual:()=>jL,assignProp:()=>fo,base64ToUint8Array:()=>uS,base64urlToUint8Array:()=>t1,cached:()=>Zi,captureStackTrace:()=>Gl,cleanEnum:()=>e1,cleanRegex:()=>Ts,clone:()=>Nt,cloneDef:()=>HL,createTransparentProxy:()=>YL,defineLazy:()=>Le,esc:()=>Vl,escapeRegex:()=>kr,extend:()=>iS,finalizeIssue:()=>or,floatSafeRemainder:()=>Jh,getElementAtPath:()=>ZL,getEnumValues:()=>bs,getLengthableOrigin:()=>xs,getParsedType:()=>XL,getSizableOrigin:()=>Ss,hexToUint8Array:()=>n1,isObject:()=>Wo,isPlainObject:()=>mo,issue:()=>Wi,joinValues:()=>K,jsonStringifyReplacer:()=>Hi,merge:()=>QL,mergeDefs:()=>Un,normalizeParams:()=>ie,nullish:()=>po,numKeys:()=>JL,objectClone:()=>GL,omit:()=>oS,optionalKeys:()=>eg,parsedType:()=>ue,partial:()=>sS,pick:()=>nS,prefixIssues:()=>yr,primitiveTypes:()=>Qh,promiseAllObject:()=>WL,propertyKeyTypes:()=>Es,randomString:()=>KL,required:()=>cS,safeExtend:()=>aS,shallowClone:()=>Hl,slugify:()=>Xh,stringifyPrimitive:()=>ae,uint8ArrayToBase64:()=>lS,uint8ArrayToBase64url:()=>r1,uint8ArrayToHex:()=>o1,unwrapMessage:()=>ws});function LL(e){return e}a(LL,"assertEqual");function jL(e){return e}a(jL,"assertNotEqual");function qL(e){}a(qL,"assertIs");function BL(e){throw new Error("Unexpected value in exhaustive check")}a(BL,"assertNever");function VL(e){}a(VL,"assert");function bs(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(bs,"getEnumValues");function K(e,t="|"){return e.map(n=>ae(n)).join(t)}a(K,"joinValues");function Hi(e,t){return typeof t=="bigint"?t.toString():t}a(Hi,"jsonStringifyReplacer");function Zi(e){return{get value(){{let n=e();return Object.defineProperty(this,"value",{value:n}),n}throw new Error("cached value already set")}}}a(Zi,"cached");function po(e){return e==null}a(po,"nullish");function Ts(e){let t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}a(Ts,"cleanRegex");function Jh(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 h=o.match(/\d?e-(\d?)/);h?.[1]&&(r=Number.parseInt(h[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(Jh,"floatSafeRemainder");var rS=Symbol("evaluating");function Le(e,t,n){let o;Object.defineProperty(e,t,{get(){if(o!==rS)return o===void 0&&(o=rS,o=n()),o},set(r){Object.defineProperty(e,t,{value:r})},configurable:!0})}a(Le,"defineLazy");function GL(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}a(GL,"objectClone");function fo(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}a(fo,"assignProp");function Un(...e){let t={};for(let n of e){let o=Object.getOwnPropertyDescriptors(n);Object.assign(t,o)}return Object.defineProperties({},t)}a(Un,"mergeDefs");function HL(e){return Un(e._zod.def)}a(HL,"cloneDef");function ZL(e,t){return t?t.reduce((n,o)=>n?.[o],e):e}a(ZL,"getElementAtPath");function WL(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(WL,"promiseAllObject");function KL(e=10){let t="abcdefghijklmnopqrstuvwxyz",n="";for(let o=0;o<e;o++)n+=t[Math.floor(Math.random()*t.length)];return n}a(KL,"randomString");function Vl(e){return JSON.stringify(e)}a(Vl,"esc");function Xh(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}a(Xh,"slugify");var Gl="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Wo(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}a(Wo,"isObject");var Yh=Zi(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function mo(e){if(Wo(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let n=t.prototype;return!(Wo(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}a(mo,"isPlainObject");function Hl(e){return mo(e)?{...e}:Array.isArray(e)?[...e]:e}a(Hl,"shallowClone");function JL(e){let t=0;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}a(JL,"numKeys");var XL=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"),Es=new Set(["string","number","symbol"]),Qh=new Set(["string","number","bigint","boolean","symbol","undefined"]);function kr(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}a(kr,"escapeRegex");function Nt(e,t,n){let o=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(o._zod.parent=e),o}a(Nt,"clone");function ie(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(ie,"normalizeParams");function YL(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(YL,"createTransparentProxy");function ae(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}a(ae,"stringifyPrimitive");function eg(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}a(eg,"optionalKeys");var tg={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]},rg={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function nS(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=Un(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 fo(this,"shape",s),s},checks:[]});return Nt(e,i)}a(nS,"pick");function oS(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=Un(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 fo(this,"shape",s),s},checks:[]});return Nt(e,i)}a(oS,"omit");function iS(e,t){if(!mo(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=Un(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return fo(this,"shape",i),i}});return Nt(e,r)}a(iS,"extend");function aS(e,t){if(!mo(t))throw new Error("Invalid input to safeExtend: expected a plain object");let n=Un(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t};return fo(this,"shape",o),o}});return Nt(e,n)}a(aS,"safeExtend");function QL(e,t){let n=Un(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t._zod.def.shape};return fo(this,"shape",o),o},get catchall(){return t._zod.def.catchall},checks:[]});return Nt(e,n)}a(QL,"merge");function sS(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=Un(t._zod.def,{get shape(){let u=t._zod.def.shape,h={...u};if(n)for(let g in n){if(!(g in u))throw new Error(`Unrecognized key: "${g}"`);n[g]&&(h[g]=e?new e({type:"optional",innerType:u[g]}):u[g])}else for(let g in u)h[g]=e?new e({type:"optional",innerType:u[g]}):u[g];return fo(this,"shape",h),h},checks:[]});return Nt(t,s)}a(sS,"partial");function cS(e,t,n){let o=Un(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 fo(this,"shape",i),i}});return Nt(t,o)}a(cS,"required");function ho(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(ho,"aborted");function yr(e,t){return t.map(n=>{var o;return(o=n).path??(o.path=[]),n.path.unshift(e),n})}a(yr,"prefixIssues");function ws(e){return typeof e=="string"?e:e?.message}a(ws,"unwrapMessage");function or(e,t,n){let o={...e,path:e.path??[]};if(!e.message){let r=ws(e.inst?._zod.def?.error?.(e))??ws(t?.error?.(e))??ws(n.customError?.(e))??ws(n.localeError?.(e))??"Invalid input";o.message=r}return delete o.inst,delete o.continue,t?.reportInput||delete o.input,o}a(or,"finalizeIssue");function Ss(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}a(Ss,"getSizableOrigin");function xs(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}a(xs,"getLengthableOrigin");function ue(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(ue,"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 e1(e){return Object.entries(e).filter(([t,n])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}a(e1,"cleanEnum");function uS(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(uS,"base64ToUint8Array");function lS(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}a(lS,"uint8ArrayToBase64");function t1(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),n="=".repeat((4-t.length%4)%4);return uS(t+n)}a(t1,"base64urlToUint8Array");function r1(e){return lS(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}a(r1,"uint8ArrayToBase64url");function n1(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(n1,"hexToUint8Array");function o1(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}a(o1,"uint8ArrayToHex");var Kh=class{static{a(this,"Class")}constructor(...t){}};var dS=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,Hi,2),Object.defineProperty(e,"toString",{value:a(()=>e.message,"value"),enumerable:!1})},"initializer"),Is=N("$ZodError",dS),ir=N("$ZodError",dS,{Parent:Error});function Ki(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(Ki,"flattenError");function Ji(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 h=i.path[u];u===i.path.length-1?(s[h]=s[h]||{_errors:[]},s[h]._errors.push(t(i))):s[h]=s[h]||{_errors:[]},s=s[h],u++}}},"processError");return o(e),n}a(Ji,"formatError");function Zl(e,t=n=>n.message){let n={errors:[]},o=a((r,i=[])=>{var s,u;for(let h of r.issues)if(h.code==="invalid_union"&&h.errors.length)h.errors.map(g=>o({issues:g},h.path));else if(h.code==="invalid_key")o({issues:h.issues},h.path);else if(h.code==="invalid_element")o({issues:h.issues},h.path);else{let g=[...i,...h.path];if(g.length===0){n.errors.push(t(h));continue}let y=n,T=0;for(;T<g.length;){let b=g[T],P=T===g.length-1;typeof b=="string"?(y.properties??(y.properties={}),(s=y.properties)[b]??(s[b]={errors:[]}),y=y.properties[b]):(y.items??(y.items=[]),(u=y.items)[b]??(u[b]={errors:[]}),y=y.items[b]),P&&y.errors.push(t(h)),T++}}},"processError");return o(e),n}a(Zl,"treeifyError");function pS(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(pS,"toDotPath");function Wl(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 ${pS(o.path)}`);return t.join(`
68
+ `)}I+=R,t.data=I}if(a(y,"browserMultipartUpload"),e.mediaUrl&&o.body)if(t.url=e.mediaUrl,r){n.uploadType="multipart";let P=[{"content-type":"application/json",body:JSON.stringify(r)},{"content-type":o.mimeType||r&&r.mimeType||s,body:o.body}];(0,jT.isBrowser)()?y(P):g(P)}else n.uploadType="media",Object.assign(u,{"content-type":o.mimeType||s}),t.data=o.body;else t.data=r||void 0;if(t.headers=FT.Gaxios.mergeHeaders(t.headers||{},u),t.params=n,!(0,jT.isBrowser)()){t.headers.set("Accept-Encoding","gzip"),t.userAgentDirectives.push({product:"google-api-nodejs-client",version:gk.version,comment:"gzip"});let P=t.userAgentDirectives.map(S=>{let R=`${S.product}/${S.version}`;return S.comment&&(R+=` (${S.comment})`),R}).join(" ");t.headers.set("User-Agent",P)}if(t.validateStatus||(t.validateStatus=P=>P>=200&&P<300||P===304),t.retry=t.retry===void 0?!0:t.retry,delete t.auth,t.universeDomain&&t.universe_domain&&t.universeDomain!==t.universe_domain)throw new Error("Please set either universe_domain or universeDomain, but not both.");let T=typeof process=="object"&&typeof process.env=="object"?process.env.GOOGLE_CLOUD_UNIVERSE_DOMAIN:void 0,b=t.universeDomain??t.universe_domain??T??"googleapis.com";if(b!=="googleapis.com"&&t.url){let P=new URL(t.url);P.hostname.endsWith(".googleapis.com")&&(P.hostname=P.hostname.replace(/googleapis\.com$/,b),t.url=P.toString())}if(Object.keys(t.params).length||(delete t.params,delete t.paramsSerializer),i&&typeof i=="object"){let P=typeof i.getUniverseDomain=="function"?await i.getUniverseDomain():void 0;if(P&&b!==P)throw new Error(`The configured universe domain (${b}) does not match the universe domain found in the credentials (${P}). If you haven't configured the universe domain explicitly, googleapis.com is the default.`);if(t.http2){let S=await i.getRequestHeaders(t.url),R=Object.assign({},t);return R.headers=FT.Gaxios.mergeHeaders(R.headers,S),YK.request(R)}else{let S=await i.request(t);return(0,LT.marshallGaxiosResponse)(S)}}else return new FT.Gaxios().request(t).then(P=>(0,LT.marshallGaxiosResponse)(P))}a(mk,"createAPIRequestAsync");var qT=class extends hk.Transform{static{a(this,"ProgressStream")}bytesRead=0;_transform(t,n,o){this.bytesRead+=t.length,this.emit("progress",this.bytesRead),this.push(t),o()}};function rJ(e,t){(0,jT.isBrowser)()||(e["x-goog-api-client"]=`gdcl/${gk.version} gl-node/${process.versions.node}`),t&&(e["x-goog-api-version"]=t)}a(rJ,"populateAPIHeader")});var yk=j(ch=>{"use strict";Object.defineProperty(ch,"__esModule",{value:!0});ch.AuthPlus=void 0;var eo=tl(),VT=class extends eo.GoogleAuth{static{a(this,"AuthPlus")}JWT=eo.JWT;Compute=eo.Compute;OAuth2=eo.OAuth2Client;GoogleAuth=eo.GoogleAuth;AwsClient=eo.AwsClient;IdentityPoolClient=eo.IdentityPoolClient;ExternalAccountClient=eo.ExternalAccountClient;_cachedAuth;async getClient(t){return this._cachedAuth=new eo.GoogleAuth(t),this._cachedAuth.getClient()}getProjectId(t){return t?this._cachedAuth?this._cachedAuth.getProjectId(t):super.getProjectId(t):this._cachedAuth?this._cachedAuth.getProjectId():super.getProjectId()}};ch.AuthPlus=VT});var HT=j(uh=>{"use strict";Object.defineProperty(uh,"__esModule",{value:!0});uh.Endpoint=void 0;var vk=sh(),GT=class{static{a(this,"Endpoint")}_options;google;constructor(t){this._options=t||{}}applySchema(t,n,o,r){if(this.applyMethodsFromSchema(t,n,o,r),o.resources){for(let i in o.resources)if(Object.prototype.hasOwnProperty.call(o.resources,i)){let s=o.resources[i];t[i]||(t[i]={}),this.applySchema(t[i],n,s,r)}}}applyMethodsFromSchema(t,n,o,r){if(o.methods){for(let i in o.methods)if(Object.prototype.hasOwnProperty.call(o.methods,i)){let s=o.methods[i];t[i]=this.makeMethod(n,s,r)}}}makeMethod(t,n,o){return(r,i)=>{let s=typeof r=="function"?{}:r;i=typeof r=="function"?r:i;let u=_k(t.rootUrl+t.servicePath+n.path),h={options:{url:u.substring(1,u.length-1),method:n.httpMethod,apiVersion:n.apiVersion},params:s,requiredParams:n.parameterOrder||[],pathParams:this.getPathParams(n.parameters),context:o};if(n.mediaUpload&&n.mediaUpload.protocols&&n.mediaUpload.protocols.simple&&n.mediaUpload.protocols.simple.path){let g=_k(t.rootUrl+n.mediaUpload.protocols.simple.path);h.mediaUrl=g.substring(1,g.length-1)}if(!i)return(0,vk.createAPIRequest)(h);(0,vk.createAPIRequest)(h,i)}}getPathParams(t){let n=new Array;return typeof t!="object"&&(t={}),Object.keys(t).forEach(o=>{t[o].location==="path"&&n.push(o)}),n}};uh.Endpoint=GT;function _k(e){return e?`'${e}'`.replace(/([^:]\/)\/+/g,"$1"):""}a(_k,"buildurl")});var wk=j(lh=>{"use strict";Object.defineProperty(lh,"__esModule",{value:!0});lh.Discovery=void 0;var nJ=require("fs"),oJ=St(),iJ=require("url"),Pk=require("util"),aJ=sh(),sJ=HT(),cJ=Pk.promisify(nJ.readFile),ZT=class{static{a(this,"Discovery")}transporter=new oJ.Gaxios;options;constructor(t){this.options=t||{}}makeEndpoint(t){return n=>{let o=new sJ.Endpoint(n);return o.applySchema(o,t,t,o),o}}log(...t){this.options&&this.options.debug&&console.log(...t)}async discoverAllAPIs(t){let n=new Headers(this.options.includePrivate?{}:{"X-User-Ip":"0.0.0.0"}),r=(await this.transporter.request({url:t,headers:n})).data.items,i=await Promise.all(r.map(async h=>{let g=await this.discoverAPI(h.discoveryRestUrl);return{api:h,endpointCreator:g}})),s={},u={};for(let h of i)u[h.api.name]||(s[h.api.name]={},u[h.api.name]=g=>{let y=typeof g,T;if(y==="string")T=g,g={};else if(y==="object")T=g.version,delete g.version;else throw new Error("Argument error: Accepts only string or object");try{let b=h.endpointCreator(g,this);return Object.freeze(b)}catch(b){throw new Error(Pk.format('Unable to load endpoint %s("%s"): %s',h.api.name,T,b.message))}}),s[h.api.name][h.api.version]=h.endpointCreator;return u}async discoverAPI(t){if(typeof t=="string"){let n=iJ.parse(t);if(t&&!n.protocol){this.log("Reading from file "+t);let o=await cJ(t,{encoding:"utf8"});return this.makeEndpoint(JSON.parse(o))}else{this.log("Requesting "+t);let o=await this.transporter.request({url:t});return this.makeEndpoint(o.data)}}else{let n=t;this.log("Requesting "+n.url);let o=n.url;delete n.url;let r={options:{url:o,method:"GET"},requiredParams:[],pathParams:[],params:n,context:{google:{_options:{}},_options:{}}},i=await(0,aJ.createAPIRequest)(r);return this.makeEndpoint(i.data)}}};lh.Discovery=ZT});var pl=j(Me=>{"use strict";var uJ=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]})),lJ=Me&&Me.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&uJ(t,e,n)};Object.defineProperty(Me,"__esModule",{value:!0});Me.Endpoint=Me.Discovery=Me.AuthPlus=Me.createAPIRequest=Me.getAPI=Me.GaxiosError=Me.Gaxios=Me.AwsClient=Me.IdentityPoolClient=Me.BaseExternalAccountClient=Me.ExternalAccountClient=Me.GoogleAuth=Me.UserRefreshClient=Me.Compute=Me.JWT=Me.OAuth2Client=Me.gaxios=Me.googleAuthLibrary=void 0;Me.googleAuthLibrary=tl();Me.gaxios=St();var to=tl();Object.defineProperty(Me,"OAuth2Client",{enumerable:!0,get:a(function(){return to.OAuth2Client},"get")});Object.defineProperty(Me,"JWT",{enumerable:!0,get:a(function(){return to.JWT},"get")});Object.defineProperty(Me,"Compute",{enumerable:!0,get:a(function(){return to.Compute},"get")});Object.defineProperty(Me,"UserRefreshClient",{enumerable:!0,get:a(function(){return to.UserRefreshClient},"get")});Object.defineProperty(Me,"GoogleAuth",{enumerable:!0,get:a(function(){return to.GoogleAuth},"get")});Object.defineProperty(Me,"ExternalAccountClient",{enumerable:!0,get:a(function(){return to.ExternalAccountClient},"get")});Object.defineProperty(Me,"BaseExternalAccountClient",{enumerable:!0,get:a(function(){return to.BaseExternalAccountClient},"get")});Object.defineProperty(Me,"IdentityPoolClient",{enumerable:!0,get:a(function(){return to.IdentityPoolClient},"get")});Object.defineProperty(Me,"AwsClient",{enumerable:!0,get:a(function(){return to.AwsClient},"get")});var bk=St();Object.defineProperty(Me,"Gaxios",{enumerable:!0,get:a(function(){return bk.Gaxios},"get")});Object.defineProperty(Me,"GaxiosError",{enumerable:!0,get:a(function(){return bk.GaxiosError},"get")});var dJ=pN();Object.defineProperty(Me,"getAPI",{enumerable:!0,get:a(function(){return dJ.getAPI},"get")});var pJ=sh();Object.defineProperty(Me,"createAPIRequest",{enumerable:!0,get:a(function(){return pJ.createAPIRequest},"get")});var fJ=yk();Object.defineProperty(Me,"AuthPlus",{enumerable:!0,get:a(function(){return fJ.AuthPlus},"get")});var mJ=wk();Object.defineProperty(Me,"Discovery",{enumerable:!0,get:a(function(){return mJ.Discovery},"get")});var hJ=HT();Object.defineProperty(Me,"Endpoint",{enumerable:!0,get:a(function(){return hJ.Endpoint},"get")});lJ(ah(),Me)});var Ek=j(dh=>{"use strict";Object.defineProperty(dh,"__esModule",{value:!0});dh.drive_v2=void 0;var V=pl(),Tk;(function(e){class t{static{a(this,"Drive")}context;about;apps;changes;channels;children;comments;drives;files;parents;permissions;properties;replies;revisions;teamdrives;constructor(l,m){this.context={_options:l||{},google:m},this.about=new n(this.context),this.apps=new o(this.context),this.changes=new r(this.context),this.channels=new i(this.context),this.children=new s(this.context),this.comments=new u(this.context),this.drives=new h(this.context),this.files=new g(this.context),this.parents=new y(this.context),this.permissions=new T(this.context),this.properties=new b(this.context),this.replies=new P(this.context),this.revisions=new S(this.context),this.teamdrives=new R(this.context)}}e.Drive=t;class n{static{a(this,"Resource$About")}context;constructor(l){this.context=l}get(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/about").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:[],pathParams:[],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}}e.Resource$About=n;class o{static{a(this,"Resource$Apps")}context;constructor(l){this.context=l}get(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/apps/{appId}").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:["appId"],pathParams:["appId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}list(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/apps").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:[],pathParams:[],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}}e.Resource$Apps=o;class r{static{a(this,"Resource$Changes")}context;constructor(l){this.context=l}get(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/changes/{changeId}").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:["changeId"],pathParams:["changeId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}getStartPageToken(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/changes/startPageToken").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:[],pathParams:[],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}list(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/changes").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:[],pathParams:[],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}watch(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/changes/watch").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},p),params:v,requiredParams:[],pathParams:[],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}}e.Resource$Changes=r;class i{static{a(this,"Resource$Channels")}context;constructor(l){this.context=l}stop(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/channels/stop").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},p),params:v,requiredParams:[],pathParams:[],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}}e.Resource$Channels=i;class s{static{a(this,"Resource$Children")}context;constructor(l){this.context=l}delete(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{folderId}/children/{childId}").replace(/([^:]\/)\/+/g,"$1"),method:"DELETE",apiVersion:""},p),params:v,requiredParams:["folderId","childId"],pathParams:["childId","folderId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}get(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{folderId}/children/{childId}").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:["folderId","childId"],pathParams:["childId","folderId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}insert(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{folderId}/children").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},p),params:v,requiredParams:["folderId"],pathParams:["folderId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}list(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{folderId}/children").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:["folderId"],pathParams:["folderId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}}e.Resource$Children=s;class u{static{a(this,"Resource$Comments")}context;constructor(l){this.context=l}delete(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{fileId}/comments/{commentId}").replace(/([^:]\/)\/+/g,"$1"),method:"DELETE",apiVersion:""},p),params:v,requiredParams:["fileId","commentId"],pathParams:["commentId","fileId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}get(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{fileId}/comments/{commentId}").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:["fileId","commentId"],pathParams:["commentId","fileId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}insert(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{fileId}/comments").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},p),params:v,requiredParams:["fileId"],pathParams:["fileId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}list(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{fileId}/comments").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:["fileId"],pathParams:["fileId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}patch(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{fileId}/comments/{commentId}").replace(/([^:]\/)\/+/g,"$1"),method:"PATCH",apiVersion:""},p),params:v,requiredParams:["fileId","commentId"],pathParams:["commentId","fileId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}update(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{fileId}/comments/{commentId}").replace(/([^:]\/)\/+/g,"$1"),method:"PUT",apiVersion:""},p),params:v,requiredParams:["fileId","commentId"],pathParams:["commentId","fileId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}}e.Resource$Comments=u;class h{static{a(this,"Resource$Drives")}context;constructor(l){this.context=l}delete(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/drives/{driveId}").replace(/([^:]\/)\/+/g,"$1"),method:"DELETE",apiVersion:""},p),params:v,requiredParams:["driveId"],pathParams:["driveId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}get(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/drives/{driveId}").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:["driveId"],pathParams:["driveId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}hide(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/drives/{driveId}/hide").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},p),params:v,requiredParams:["driveId"],pathParams:["driveId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}insert(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/drives").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},p),params:v,requiredParams:["requestId"],pathParams:[],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}list(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/drives").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:[],pathParams:[],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}unhide(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/drives/{driveId}/unhide").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},p),params:v,requiredParams:["driveId"],pathParams:["driveId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}update(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/drives/{driveId}").replace(/([^:]\/)\/+/g,"$1"),method:"PUT",apiVersion:""},p),params:v,requiredParams:["driveId"],pathParams:["driveId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}}e.Resource$Drives=h;class g{static{a(this,"Resource$Files")}context;constructor(l){this.context=l}copy(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{fileId}/copy").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},p),params:v,requiredParams:["fileId"],pathParams:["fileId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}delete(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{fileId}").replace(/([^:]\/)\/+/g,"$1"),method:"DELETE",apiVersion:""},p),params:v,requiredParams:["fileId"],pathParams:["fileId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}emptyTrash(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/trash").replace(/([^:]\/)\/+/g,"$1"),method:"DELETE",apiVersion:""},p),params:v,requiredParams:[],pathParams:[],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}export(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{fileId}/export").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:["fileId","mimeType"],pathParams:["fileId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}generateCseToken(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/generateCseToken").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:[],pathParams:[],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}generateIds(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/generateIds").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:[],pathParams:[],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}get(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{fileId}").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:["fileId"],pathParams:["fileId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}insert(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},p),params:v,mediaUrl:(E+"/upload/drive/v2/files").replace(/([^:]\/)\/+/g,"$1"),requiredParams:[],pathParams:[],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}list(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:[],pathParams:[],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}listLabels(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{fileId}/listLabels").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:["fileId"],pathParams:["fileId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}modifyLabels(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{fileId}/modifyLabels").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},p),params:v,requiredParams:["fileId"],pathParams:["fileId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}patch(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{fileId}").replace(/([^:]\/)\/+/g,"$1"),method:"PATCH",apiVersion:""},p),params:v,requiredParams:["fileId"],pathParams:["fileId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}touch(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{fileId}/touch").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},p),params:v,requiredParams:["fileId"],pathParams:["fileId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}trash(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{fileId}/trash").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},p),params:v,requiredParams:["fileId"],pathParams:["fileId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}untrash(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{fileId}/untrash").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},p),params:v,requiredParams:["fileId"],pathParams:["fileId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}update(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{fileId}").replace(/([^:]\/)\/+/g,"$1"),method:"PUT",apiVersion:""},p),params:v,mediaUrl:(E+"/upload/drive/v2/files/{fileId}").replace(/([^:]\/)\/+/g,"$1"),requiredParams:["fileId"],pathParams:["fileId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}watch(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{fileId}/watch").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},p),params:v,requiredParams:["fileId"],pathParams:["fileId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}}e.Resource$Files=g;class y{static{a(this,"Resource$Parents")}context;constructor(l){this.context=l}delete(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{fileId}/parents/{parentId}").replace(/([^:]\/)\/+/g,"$1"),method:"DELETE",apiVersion:""},p),params:v,requiredParams:["fileId","parentId"],pathParams:["fileId","parentId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}get(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{fileId}/parents/{parentId}").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:["fileId","parentId"],pathParams:["fileId","parentId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}insert(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{fileId}/parents").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},p),params:v,requiredParams:["fileId"],pathParams:["fileId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}list(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{fileId}/parents").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:["fileId"],pathParams:["fileId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}}e.Resource$Parents=y;class T{static{a(this,"Resource$Permissions")}context;constructor(l){this.context=l}delete(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{fileId}/permissions/{permissionId}").replace(/([^:]\/)\/+/g,"$1"),method:"DELETE",apiVersion:""},p),params:v,requiredParams:["fileId","permissionId"],pathParams:["fileId","permissionId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}get(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{fileId}/permissions/{permissionId}").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:["fileId","permissionId"],pathParams:["fileId","permissionId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}getIdForEmail(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/permissionIds/{email}").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:["email"],pathParams:["email"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}insert(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{fileId}/permissions").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},p),params:v,requiredParams:["fileId"],pathParams:["fileId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}list(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{fileId}/permissions").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:["fileId"],pathParams:["fileId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}patch(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{fileId}/permissions/{permissionId}").replace(/([^:]\/)\/+/g,"$1"),method:"PATCH",apiVersion:""},p),params:v,requiredParams:["fileId","permissionId"],pathParams:["fileId","permissionId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}update(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{fileId}/permissions/{permissionId}").replace(/([^:]\/)\/+/g,"$1"),method:"PUT",apiVersion:""},p),params:v,requiredParams:["fileId","permissionId"],pathParams:["fileId","permissionId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}}e.Resource$Permissions=T;class b{static{a(this,"Resource$Properties")}context;constructor(l){this.context=l}delete(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{fileId}/properties/{propertyKey}").replace(/([^:]\/)\/+/g,"$1"),method:"DELETE",apiVersion:""},p),params:v,requiredParams:["fileId","propertyKey"],pathParams:["fileId","propertyKey"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}get(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{fileId}/properties/{propertyKey}").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:["fileId","propertyKey"],pathParams:["fileId","propertyKey"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}insert(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{fileId}/properties").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},p),params:v,requiredParams:["fileId"],pathParams:["fileId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}list(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{fileId}/properties").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:["fileId"],pathParams:["fileId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}patch(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{fileId}/properties/{propertyKey}").replace(/([^:]\/)\/+/g,"$1"),method:"PATCH",apiVersion:""},p),params:v,requiredParams:["fileId","propertyKey"],pathParams:["fileId","propertyKey"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}update(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{fileId}/properties/{propertyKey}").replace(/([^:]\/)\/+/g,"$1"),method:"PUT",apiVersion:""},p),params:v,requiredParams:["fileId","propertyKey"],pathParams:["fileId","propertyKey"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}}e.Resource$Properties=b;class P{static{a(this,"Resource$Replies")}context;constructor(l){this.context=l}delete(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{fileId}/comments/{commentId}/replies/{replyId}").replace(/([^:]\/)\/+/g,"$1"),method:"DELETE",apiVersion:""},p),params:v,requiredParams:["fileId","commentId","replyId"],pathParams:["commentId","fileId","replyId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}get(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{fileId}/comments/{commentId}/replies/{replyId}").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:["fileId","commentId","replyId"],pathParams:["commentId","fileId","replyId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}insert(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{fileId}/comments/{commentId}/replies").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},p),params:v,requiredParams:["fileId","commentId"],pathParams:["commentId","fileId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}list(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{fileId}/comments/{commentId}/replies").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:["fileId","commentId"],pathParams:["commentId","fileId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}patch(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{fileId}/comments/{commentId}/replies/{replyId}").replace(/([^:]\/)\/+/g,"$1"),method:"PATCH",apiVersion:""},p),params:v,requiredParams:["fileId","commentId","replyId"],pathParams:["commentId","fileId","replyId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}update(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{fileId}/comments/{commentId}/replies/{replyId}").replace(/([^:]\/)\/+/g,"$1"),method:"PUT",apiVersion:""},p),params:v,requiredParams:["fileId","commentId","replyId"],pathParams:["commentId","fileId","replyId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}}e.Resource$Replies=P;class S{static{a(this,"Resource$Revisions")}context;constructor(l){this.context=l}delete(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{fileId}/revisions/{revisionId}").replace(/([^:]\/)\/+/g,"$1"),method:"DELETE",apiVersion:""},p),params:v,requiredParams:["fileId","revisionId"],pathParams:["fileId","revisionId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}get(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{fileId}/revisions/{revisionId}").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:["fileId","revisionId"],pathParams:["fileId","revisionId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}list(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{fileId}/revisions").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:["fileId"],pathParams:["fileId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}patch(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{fileId}/revisions/{revisionId}").replace(/([^:]\/)\/+/g,"$1"),method:"PATCH",apiVersion:""},p),params:v,requiredParams:["fileId","revisionId"],pathParams:["fileId","revisionId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}update(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/files/{fileId}/revisions/{revisionId}").replace(/([^:]\/)\/+/g,"$1"),method:"PUT",apiVersion:""},p),params:v,requiredParams:["fileId","revisionId"],pathParams:["fileId","revisionId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}}e.Resource$Revisions=S;class R{static{a(this,"Resource$Teamdrives")}context;constructor(l){this.context=l}delete(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/teamdrives/{teamDriveId}").replace(/([^:]\/)\/+/g,"$1"),method:"DELETE",apiVersion:""},p),params:v,requiredParams:["teamDriveId"],pathParams:["teamDriveId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}get(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/teamdrives/{teamDriveId}").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:["teamDriveId"],pathParams:["teamDriveId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}insert(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/teamdrives").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},p),params:v,requiredParams:["requestId"],pathParams:[],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}list(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/teamdrives").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:[],pathParams:[],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}update(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v2/teamdrives/{teamDriveId}").replace(/([^:]\/)\/+/g,"$1"),method:"PUT",apiVersion:""},p),params:v,requiredParams:["teamDriveId"],pathParams:["teamDriveId"],context:this.context};if(d)(0,V.createAPIRequest)(_,d);else return(0,V.createAPIRequest)(_)}}e.Resource$Teamdrives=R})(Tk||(dh.drive_v2=Tk={}))});var xk=j(ph=>{"use strict";Object.defineProperty(ph,"__esModule",{value:!0});ph.drive_v3=void 0;var J=pl(),Sk;(function(e){class t{static{a(this,"Drive")}context;about;accessproposals;approvals;apps;changes;channels;comments;drives;files;operations;permissions;replies;revisions;teamdrives;constructor(l,m){this.context={_options:l||{},google:m},this.about=new n(this.context),this.accessproposals=new o(this.context),this.approvals=new r(this.context),this.apps=new i(this.context),this.changes=new s(this.context),this.channels=new u(this.context),this.comments=new h(this.context),this.drives=new g(this.context),this.files=new y(this.context),this.operations=new T(this.context),this.permissions=new b(this.context),this.replies=new P(this.context),this.revisions=new S(this.context),this.teamdrives=new R(this.context)}}e.Drive=t;class n{static{a(this,"Resource$About")}context;constructor(l){this.context=l}get(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/about").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:[],pathParams:[],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}}e.Resource$About=n;class o{static{a(this,"Resource$Accessproposals")}context;constructor(l){this.context=l}get(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/files/{fileId}/accessproposals/{proposalId}").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:["fileId","proposalId"],pathParams:["fileId","proposalId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}list(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/files/{fileId}/accessproposals").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:["fileId"],pathParams:["fileId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}resolve(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/files/{fileId}/accessproposals/{proposalId}:resolve").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},p),params:v,requiredParams:["fileId","proposalId"],pathParams:["fileId","proposalId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}}e.Resource$Accessproposals=o;class r{static{a(this,"Resource$Approvals")}context;constructor(l){this.context=l}approve(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/files/{fileId}/approvals/{approvalId}:approve").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},p),params:v,requiredParams:["fileId","approvalId"],pathParams:["approvalId","fileId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}cancel(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/files/{fileId}/approvals/{approvalId}:cancel").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},p),params:v,requiredParams:["fileId","approvalId"],pathParams:["approvalId","fileId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}comment(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/files/{fileId}/approvals/{approvalId}:comment").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},p),params:v,requiredParams:["fileId","approvalId"],pathParams:["approvalId","fileId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}decline(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/files/{fileId}/approvals/{approvalId}:decline").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},p),params:v,requiredParams:["fileId","approvalId"],pathParams:["approvalId","fileId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}get(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/files/{fileId}/approvals/{approvalId}").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:["fileId","approvalId"],pathParams:["approvalId","fileId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}list(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/files/{fileId}/approvals").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:["fileId"],pathParams:["fileId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}reassign(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/files/{fileId}/approvals/{approvalId}:reassign").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},p),params:v,requiredParams:["fileId","approvalId"],pathParams:["approvalId","fileId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}start(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/files/{fileId}/approvals:start").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},p),params:v,requiredParams:["fileId"],pathParams:["fileId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}}e.Resource$Approvals=r;class i{static{a(this,"Resource$Apps")}context;constructor(l){this.context=l}get(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/apps/{appId}").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:["appId"],pathParams:["appId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}list(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/apps").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:[],pathParams:[],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}}e.Resource$Apps=i;class s{static{a(this,"Resource$Changes")}context;constructor(l){this.context=l}getStartPageToken(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/changes/startPageToken").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:[],pathParams:[],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}list(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/changes").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:["pageToken"],pathParams:[],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}watch(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/changes/watch").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},p),params:v,requiredParams:["pageToken"],pathParams:[],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}}e.Resource$Changes=s;class u{static{a(this,"Resource$Channels")}context;constructor(l){this.context=l}stop(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/channels/stop").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},p),params:v,requiredParams:[],pathParams:[],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}}e.Resource$Channels=u;class h{static{a(this,"Resource$Comments")}context;constructor(l){this.context=l}create(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/files/{fileId}/comments").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},p),params:v,requiredParams:["fileId"],pathParams:["fileId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}delete(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/files/{fileId}/comments/{commentId}").replace(/([^:]\/)\/+/g,"$1"),method:"DELETE",apiVersion:""},p),params:v,requiredParams:["fileId","commentId"],pathParams:["commentId","fileId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}get(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/files/{fileId}/comments/{commentId}").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:["fileId","commentId"],pathParams:["commentId","fileId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}list(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/files/{fileId}/comments").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:["fileId"],pathParams:["fileId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}update(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/files/{fileId}/comments/{commentId}").replace(/([^:]\/)\/+/g,"$1"),method:"PATCH",apiVersion:""},p),params:v,requiredParams:["fileId","commentId"],pathParams:["commentId","fileId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}}e.Resource$Comments=h;class g{static{a(this,"Resource$Drives")}context;constructor(l){this.context=l}create(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/drives").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},p),params:v,requiredParams:["requestId"],pathParams:[],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}delete(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/drives/{driveId}").replace(/([^:]\/)\/+/g,"$1"),method:"DELETE",apiVersion:""},p),params:v,requiredParams:["driveId"],pathParams:["driveId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}get(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/drives/{driveId}").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:["driveId"],pathParams:["driveId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}hide(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/drives/{driveId}/hide").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},p),params:v,requiredParams:["driveId"],pathParams:["driveId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}list(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/drives").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:[],pathParams:[],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}unhide(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/drives/{driveId}/unhide").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},p),params:v,requiredParams:["driveId"],pathParams:["driveId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}update(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/drives/{driveId}").replace(/([^:]\/)\/+/g,"$1"),method:"PATCH",apiVersion:""},p),params:v,requiredParams:["driveId"],pathParams:["driveId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}}e.Resource$Drives=g;class y{static{a(this,"Resource$Files")}context;constructor(l){this.context=l}copy(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/files/{fileId}/copy").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},p),params:v,requiredParams:["fileId"],pathParams:["fileId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}create(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/files").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},p),params:v,mediaUrl:(E+"/upload/drive/v3/files").replace(/([^:]\/)\/+/g,"$1"),requiredParams:[],pathParams:[],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}delete(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/files/{fileId}").replace(/([^:]\/)\/+/g,"$1"),method:"DELETE",apiVersion:""},p),params:v,requiredParams:["fileId"],pathParams:["fileId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}download(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/files/{fileId}/download").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},p),params:v,requiredParams:["fileId"],pathParams:["fileId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}emptyTrash(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/files/trash").replace(/([^:]\/)\/+/g,"$1"),method:"DELETE",apiVersion:""},p),params:v,requiredParams:[],pathParams:[],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}export(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/files/{fileId}/export").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:["fileId","mimeType"],pathParams:["fileId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}generateCseToken(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/files/generateCseToken").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:[],pathParams:[],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}generateIds(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/files/generateIds").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:[],pathParams:[],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}get(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/files/{fileId}").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:["fileId"],pathParams:["fileId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}list(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/files").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:[],pathParams:[],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}listLabels(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/files/{fileId}/listLabels").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:["fileId"],pathParams:["fileId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}modifyLabels(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/files/{fileId}/modifyLabels").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},p),params:v,requiredParams:["fileId"],pathParams:["fileId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}update(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/files/{fileId}").replace(/([^:]\/)\/+/g,"$1"),method:"PATCH",apiVersion:""},p),params:v,mediaUrl:(E+"/upload/drive/v3/files/{fileId}").replace(/([^:]\/)\/+/g,"$1"),requiredParams:["fileId"],pathParams:["fileId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}watch(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/files/{fileId}/watch").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},p),params:v,requiredParams:["fileId"],pathParams:["fileId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}}e.Resource$Files=y;class T{static{a(this,"Resource$Operations")}context;constructor(l){this.context=l}get(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/operations/{name}").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:["name"],pathParams:["name"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}}e.Resource$Operations=T;class b{static{a(this,"Resource$Permissions")}context;constructor(l){this.context=l}create(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/files/{fileId}/permissions").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},p),params:v,requiredParams:["fileId"],pathParams:["fileId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}delete(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/files/{fileId}/permissions/{permissionId}").replace(/([^:]\/)\/+/g,"$1"),method:"DELETE",apiVersion:""},p),params:v,requiredParams:["fileId","permissionId"],pathParams:["fileId","permissionId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}get(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/files/{fileId}/permissions/{permissionId}").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:["fileId","permissionId"],pathParams:["fileId","permissionId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}list(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/files/{fileId}/permissions").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:["fileId"],pathParams:["fileId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}update(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/files/{fileId}/permissions/{permissionId}").replace(/([^:]\/)\/+/g,"$1"),method:"PATCH",apiVersion:""},p),params:v,requiredParams:["fileId","permissionId"],pathParams:["fileId","permissionId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}}e.Resource$Permissions=b;class P{static{a(this,"Resource$Replies")}context;constructor(l){this.context=l}create(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/files/{fileId}/comments/{commentId}/replies").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},p),params:v,requiredParams:["fileId","commentId"],pathParams:["commentId","fileId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}delete(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/files/{fileId}/comments/{commentId}/replies/{replyId}").replace(/([^:]\/)\/+/g,"$1"),method:"DELETE",apiVersion:""},p),params:v,requiredParams:["fileId","commentId","replyId"],pathParams:["commentId","fileId","replyId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}get(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/files/{fileId}/comments/{commentId}/replies/{replyId}").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:["fileId","commentId","replyId"],pathParams:["commentId","fileId","replyId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}list(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/files/{fileId}/comments/{commentId}/replies").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:["fileId","commentId"],pathParams:["commentId","fileId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}update(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/files/{fileId}/comments/{commentId}/replies/{replyId}").replace(/([^:]\/)\/+/g,"$1"),method:"PATCH",apiVersion:""},p),params:v,requiredParams:["fileId","commentId","replyId"],pathParams:["commentId","fileId","replyId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}}e.Resource$Replies=P;class S{static{a(this,"Resource$Revisions")}context;constructor(l){this.context=l}delete(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/files/{fileId}/revisions/{revisionId}").replace(/([^:]\/)\/+/g,"$1"),method:"DELETE",apiVersion:""},p),params:v,requiredParams:["fileId","revisionId"],pathParams:["fileId","revisionId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}get(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/files/{fileId}/revisions/{revisionId}").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:["fileId","revisionId"],pathParams:["fileId","revisionId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}list(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/files/{fileId}/revisions").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:["fileId"],pathParams:["fileId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}update(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/files/{fileId}/revisions/{revisionId}").replace(/([^:]\/)\/+/g,"$1"),method:"PATCH",apiVersion:""},p),params:v,requiredParams:["fileId","revisionId"],pathParams:["fileId","revisionId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}}e.Resource$Revisions=S;class R{static{a(this,"Resource$Teamdrives")}context;constructor(l){this.context=l}create(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/teamdrives").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},p),params:v,requiredParams:["requestId"],pathParams:[],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}delete(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/teamdrives/{teamDriveId}").replace(/([^:]\/)\/+/g,"$1"),method:"DELETE",apiVersion:""},p),params:v,requiredParams:["teamDriveId"],pathParams:["teamDriveId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}get(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/teamdrives/{teamDriveId}").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:["teamDriveId"],pathParams:["teamDriveId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}list(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/teamdrives").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},p),params:v,requiredParams:[],pathParams:[],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}update(l,m,d){let v=l||{},p=m||{};typeof l=="function"&&(d=l,v={},p={}),typeof m=="function"&&(d=m,p={});let E=p.rootUrl||"https://www.googleapis.com/",_={options:Object.assign({url:(E+"/drive/v3/teamdrives/{teamDriveId}").replace(/([^:]\/)\/+/g,"$1"),method:"PATCH",apiVersion:""},p),params:v,requiredParams:["teamDriveId"],pathParams:["teamDriveId"],context:this.context};if(d)(0,J.createAPIRequest)(_,d);else return(0,J.createAPIRequest)(_)}}e.Resource$Teamdrives=R})(Sk||(ph.drive_v3=Sk={}))});var ze=j(fr=>{"use strict";Object.defineProperty(fr,"__esModule",{value:!0});fr.AuthPlus=fr.drive_v3=fr.drive_v2=fr.auth=fr.VERSIONS=void 0;fr.drive=gJ;var Ik=pl(),Ak=Ek();Object.defineProperty(fr,"drive_v2",{enumerable:!0,get:a(function(){return Ak.drive_v2},"get")});var Rk=xk();Object.defineProperty(fr,"drive_v3",{enumerable:!0,get:a(function(){return Rk.drive_v3},"get")});fr.VERSIONS={v2:Ak.drive_v2.Drive,v3:Rk.drive_v3.Drive};function gJ(e){return(0,Ik.getAPI)("drive",e,fr.VERSIONS,this)}a(gJ,"drive");var yJ=new Ik.AuthPlus;fr.auth=yJ;var vJ=pl();Object.defineProperty(fr,"AuthPlus",{enumerable:!0,get:a(function(){return vJ.AuthPlus},"get")})});var fl=j((WT,KT)=>{(function(e,t){typeof WT=="object"&&typeof KT<"u"?KT.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs=t()})(WT,(function(){"use strict";var e=1e3,t=6e4,n=36e5,o="millisecond",r="second",i="minute",s="hour",u="day",h="week",g="month",y="quarter",T="year",b="date",P="Invalid Date",S=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,R=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,I={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:a(function(me){var ee=["th","st","nd","rd"],Q=me%100;return"["+me+(ee[(Q-20)%10]||ee[Q]||ee[0])+"]"},"ordinal")},l=a(function(me,ee,Q){var se=String(me);return!se||se.length>=ee?me:""+Array(ee+1-se.length).join(Q)+me},"m"),m={s:l,z:a(function(me){var ee=-me.utcOffset(),Q=Math.abs(ee),se=Math.floor(Q/60),ne=Q%60;return(ee<=0?"+":"-")+l(se,2,"0")+":"+l(ne,2,"0")},"z"),m:a(function me(ee,Q){if(ee.date()<Q.date())return-me(Q,ee);var se=12*(Q.year()-ee.year())+(Q.month()-ee.month()),ne=ee.clone().add(se,g),ge=Q-ne<0,_e=ee.clone().add(se+(ge?-1:1),g);return+(-(se+(Q-ne)/(ge?ne-_e:_e-ne))||0)},"t"),a:a(function(me){return me<0?Math.ceil(me)||0:Math.floor(me)},"a"),p:a(function(me){return{M:g,y:T,w:h,d:u,D:b,h:s,m:i,s:r,ms:o,Q:y}[me]||String(me||"").toLowerCase().replace(/s$/,"")},"p"),u:a(function(me){return me===void 0},"u")},d="en",v={};v[d]=I;var p=a(function(me){return me instanceof oe},"p"),E=a(function me(ee,Q,se){var ne;if(!ee)return d;if(typeof ee=="string"){var ge=ee.toLowerCase();v[ge]&&(ne=ge),Q&&(v[ge]=Q,ne=ge);var _e=ee.split("-");if(!ne&&_e.length>1)return me(_e[0])}else{var Fe=ee.name;v[Fe]=ee,ne=Fe}return!se&&ne&&(d=ne),ne||!se&&d},"t"),_=a(function(me,ee){if(p(me))return me.clone();var Q=typeof ee=="object"?ee:{};return Q.date=me,Q.args=arguments,new oe(Q)},"w"),pe=m;pe.l=E,pe.i=p,pe.w=function(me,ee){return _(me,{locale:ee.$L,utc:ee.$u,x:ee.$x,$offset:ee.$offset})};var oe=(function(){function me(Q){this.$L=E(Q.locale,null,!0),this.parse(Q)}a(me,"M");var ee=me.prototype;return ee.parse=function(Q){this.$d=(function(se){var ne=se.date,ge=se.utc;if(ne===null)return new Date(NaN);if(pe.u(ne))return new Date;if(ne instanceof Date)return new Date(ne);if(typeof ne=="string"&&!/Z$/i.test(ne)){var _e=ne.match(S);if(_e){var Fe=_e[2]-1||0,Ve=(_e[7]||"0").substring(0,3);return ge?new Date(Date.UTC(_e[1],Fe,_e[3]||1,_e[4]||0,_e[5]||0,_e[6]||0,Ve)):new Date(_e[1],Fe,_e[3]||1,_e[4]||0,_e[5]||0,_e[6]||0,Ve)}}return new Date(ne)})(Q),this.$x=Q.x||{},this.init()},ee.init=function(){var Q=this.$d;this.$y=Q.getFullYear(),this.$M=Q.getMonth(),this.$D=Q.getDate(),this.$W=Q.getDay(),this.$H=Q.getHours(),this.$m=Q.getMinutes(),this.$s=Q.getSeconds(),this.$ms=Q.getMilliseconds()},ee.$utils=function(){return pe},ee.isValid=function(){return this.$d.toString()!==P},ee.isSame=function(Q,se){var ne=_(Q);return this.startOf(se)<=ne&&ne<=this.endOf(se)},ee.isAfter=function(Q,se){return _(Q)<this.startOf(se)},ee.isBefore=function(Q,se){return this.endOf(se)<_(Q)},ee.$g=function(Q,se,ne){return pe.u(Q)?this[se]:this.set(ne,Q)},ee.unix=function(){return Math.floor(this.valueOf()/1e3)},ee.valueOf=function(){return this.$d.getTime()},ee.startOf=function(Q,se){var ne=this,ge=!!pe.u(se)||se,_e=pe.p(Q),Fe=a(function(mr,et){var ot=pe.w(ne.$u?Date.UTC(ne.$y,et,mr):new Date(ne.$y,et,mr),ne);return ge?ot:ot.endOf(u)},"l"),Ve=a(function(mr,et){return pe.w(ne.toDate()[mr].apply(ne.toDate("s"),(ge?[0,0,0,0]:[23,59,59,999]).slice(et)),ne)},"$"),nt=this.$W,ut=this.$M,$t=this.$D,le="set"+(this.$u?"UTC":"");switch(_e){case T:return ge?Fe(1,0):Fe(31,11);case g:return ge?Fe(1,ut):Fe(0,ut+1);case h:var Pt=this.$locale().weekStart||0,Tt=(nt<Pt?nt+7:nt)-Pt;return Fe(ge?$t-Tt:$t+(6-Tt),ut);case u:case b:return Ve(le+"Hours",0);case s:return Ve(le+"Minutes",1);case i:return Ve(le+"Seconds",2);case r:return Ve(le+"Milliseconds",3);default:return this.clone()}},ee.endOf=function(Q){return this.startOf(Q,!1)},ee.$set=function(Q,se){var ne,ge=pe.p(Q),_e="set"+(this.$u?"UTC":""),Fe=(ne={},ne[u]=_e+"Date",ne[b]=_e+"Date",ne[g]=_e+"Month",ne[T]=_e+"FullYear",ne[s]=_e+"Hours",ne[i]=_e+"Minutes",ne[r]=_e+"Seconds",ne[o]=_e+"Milliseconds",ne)[ge],Ve=ge===u?this.$D+(se-this.$W):se;if(ge===g||ge===T){var nt=this.clone().set(b,1);nt.$d[Fe](Ve),nt.init(),this.$d=nt.set(b,Math.min(this.$D,nt.daysInMonth())).$d}else Fe&&this.$d[Fe](Ve);return this.init(),this},ee.set=function(Q,se){return this.clone().$set(Q,se)},ee.get=function(Q){return this[pe.p(Q)]()},ee.add=function(Q,se){var ne,ge=this;Q=Number(Q);var _e=pe.p(se),Fe=a(function(ut){var $t=_(ge);return pe.w($t.date($t.date()+Math.round(ut*Q)),ge)},"y");if(_e===g)return this.set(g,this.$M+Q);if(_e===T)return this.set(T,this.$y+Q);if(_e===u)return Fe(1);if(_e===h)return Fe(7);var Ve=(ne={},ne[i]=t,ne[s]=n,ne[r]=e,ne)[_e]||1,nt=this.$d.getTime()+Q*Ve;return pe.w(nt,this)},ee.subtract=function(Q,se){return this.add(-1*Q,se)},ee.format=function(Q){var se=this,ne=this.$locale();if(!this.isValid())return ne.invalidDate||P;var ge=Q||"YYYY-MM-DDTHH:mm:ssZ",_e=pe.z(this),Fe=this.$H,Ve=this.$m,nt=this.$M,ut=ne.weekdays,$t=ne.months,le=ne.meridiem,Pt=a(function(et,ot,A,O){return et&&(et[ot]||et(se,ge))||A[ot].slice(0,O)},"h"),Tt=a(function(et){return pe.s(Fe%12||12,et,"0")},"d"),mr=le||function(et,ot,A){var O=et<12?"AM":"PM";return A?O.toLowerCase():O};return ge.replace(R,(function(et,ot){return ot||(function(A){switch(A){case"YY":return String(se.$y).slice(-2);case"YYYY":return pe.s(se.$y,4,"0");case"M":return nt+1;case"MM":return pe.s(nt+1,2,"0");case"MMM":return Pt(ne.monthsShort,nt,$t,3);case"MMMM":return Pt($t,nt);case"D":return se.$D;case"DD":return pe.s(se.$D,2,"0");case"d":return String(se.$W);case"dd":return Pt(ne.weekdaysMin,se.$W,ut,2);case"ddd":return Pt(ne.weekdaysShort,se.$W,ut,3);case"dddd":return ut[se.$W];case"H":return String(Fe);case"HH":return pe.s(Fe,2,"0");case"h":return Tt(1);case"hh":return Tt(2);case"a":return mr(Fe,Ve,!0);case"A":return mr(Fe,Ve,!1);case"m":return String(Ve);case"mm":return pe.s(Ve,2,"0");case"s":return String(se.$s);case"ss":return pe.s(se.$s,2,"0");case"SSS":return pe.s(se.$ms,3,"0");case"Z":return _e}return null})(et)||_e.replace(":","")}))},ee.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},ee.diff=function(Q,se,ne){var ge,_e=this,Fe=pe.p(se),Ve=_(Q),nt=(Ve.utcOffset()-this.utcOffset())*t,ut=this-Ve,$t=a(function(){return pe.m(_e,Ve)},"D");switch(Fe){case T:ge=$t()/12;break;case g:ge=$t();break;case y:ge=$t()/3;break;case h:ge=(ut-nt)/6048e5;break;case u:ge=(ut-nt)/864e5;break;case s:ge=ut/n;break;case i:ge=ut/t;break;case r:ge=ut/e;break;default:ge=ut}return ne?ge:pe.a(ge)},ee.daysInMonth=function(){return this.endOf(g).$D},ee.$locale=function(){return v[this.$L]},ee.locale=function(Q,se){if(!Q)return this.$L;var ne=this.clone(),ge=E(Q,se,!0);return ge&&(ne.$L=ge),ne},ee.clone=function(){return pe.w(this.$d,this)},ee.toDate=function(){return new Date(this.valueOf())},ee.toJSON=function(){return this.isValid()?this.toISOString():null},ee.toISOString=function(){return this.$d.toISOString()},ee.toString=function(){return this.$d.toUTCString()},me})(),Be=oe.prototype;return _.prototype=Be,[["$ms",o],["$s",r],["$m",i],["$H",s],["$W",u],["$M",g],["$y",T],["$D",b]].forEach((function(me){Be[me[1]]=function(ee){return this.$g(ee,me[0],me[1])}})),_.extend=function(me,ee){return me.$i||(me(ee,oe,_),me.$i=!0),_},_.locale=E,_.isDayjs=p,_.unix=function(me){return _(1e3*me)},_.en=v[d],_.Ls=v,_.p={},_}))});var BJ={};nr(BJ,{createGoogleClient:()=>de,getAccessToken:()=>bt,googleDrive:()=>qJ,googleDriveAuth:()=>Y});module.exports=FL(BJ);var vr={};nr(vr,{$ZodAny:()=>Us,$ZodArray:()=>js,$ZodAsyncError:()=>Kr,$ZodBase64:()=>Id,$ZodBase64URL:()=>Ad,$ZodBigInt:()=>ia,$ZodBigIntFormat:()=>$d,$ZodBoolean:()=>Yo,$ZodCIDRv4:()=>Sd,$ZodCIDRv6:()=>xd,$ZodCUID:()=>yd,$ZodCUID2:()=>vd,$ZodCatch:()=>Wd,$ZodCheck:()=>at,$ZodCheckBigIntFormat:()=>Cg,$ZodCheckEndsWith:()=>Gg,$ZodCheckGreaterThan:()=>ad,$ZodCheckIncludes:()=>Bg,$ZodCheckLengthEquals:()=>Fg,$ZodCheckLessThan:()=>id,$ZodCheckLowerCase:()=>jg,$ZodCheckMaxLength:()=>Ug,$ZodCheckMaxSize:()=>Ng,$ZodCheckMimeType:()=>Zg,$ZodCheckMinLength:()=>Mg,$ZodCheckMinSize:()=>kg,$ZodCheckMultipleOf:()=>Og,$ZodCheckNumberFormat:()=>$g,$ZodCheckOverwrite:()=>Wg,$ZodCheckProperty:()=>Hg,$ZodCheckRegex:()=>Lg,$ZodCheckSizeEquals:()=>zg,$ZodCheckStartsWith:()=>Vg,$ZodCheckStringFormat:()=>na,$ZodCheckUpperCase:()=>qg,$ZodCodec:()=>sa,$ZodCustom:()=>Js,$ZodCustomStringFormat:()=>Od,$ZodDate:()=>Ls,$ZodDefault:()=>Vd,$ZodDiscriminatedUnion:()=>qs,$ZodE164:()=>Rd,$ZodEmail:()=>md,$ZodEmoji:()=>hd,$ZodEncodeError:()=>lo,$ZodEnum:()=>Gs,$ZodError:()=>Is,$ZodExactOptional:()=>Bd,$ZodFile:()=>qd,$ZodFunction:()=>Yd,$ZodGUID:()=>pd,$ZodIPv4:()=>bd,$ZodIPv6:()=>Td,$ZodISODate:()=>Cs,$ZodISODateTime:()=>$s,$ZodISODuration:()=>ks,$ZodISOTime:()=>Ns,$ZodIntersection:()=>Fd,$ZodJWT:()=>Dd,$ZodKSUID:()=>wd,$ZodLazy:()=>ep,$ZodLiteral:()=>Hs,$ZodMAC:()=>Ed,$ZodMap:()=>Ld,$ZodNaN:()=>Kd,$ZodNanoID:()=>gd,$ZodNever:()=>zd,$ZodNonOptional:()=>Hd,$ZodNull:()=>kd,$ZodNullable:()=>Ws,$ZodNumber:()=>oa,$ZodNumberFormat:()=>zs,$ZodObject:()=>Ud,$ZodObjectJIT:()=>Yg,$ZodOptional:()=>aa,$ZodPipe:()=>Ks,$ZodPrefault:()=>Gd,$ZodPromise:()=>Qd,$ZodReadonly:()=>Jd,$ZodRealError:()=>ir,$ZodRecord:()=>Vs,$ZodRegistry:()=>tp,$ZodSet:()=>jd,$ZodString:()=>Mn,$ZodStringFormat:()=>tt,$ZodSuccess:()=>Zd,$ZodSymbol:()=>Cd,$ZodTemplateLiteral:()=>Xd,$ZodTransform:()=>Zs,$ZodTuple:()=>Bs,$ZodType:()=>Re,$ZodULID:()=>_d,$ZodURL:()=>Os,$ZodUUID:()=>fd,$ZodUndefined:()=>Nd,$ZodUnion:()=>Qo,$ZodUnknown:()=>Ms,$ZodVoid:()=>Fs,$ZodXID:()=>Pd,$ZodXor:()=>Md,$brand:()=>Ps,$constructor:()=>N,$input:()=>np,$output:()=>rp,Doc:()=>Ds,JSONSchema:()=>WS,JSONSchemaGenerator:()=>Ip,NEVER:()=>Bl,TimePrecision:()=>ip,_any:()=>Nc,_array:()=>Gy,_base64:()=>Pc,_base64url:()=>wc,_bigint:()=>lp,_boolean:()=>Oc,_catch:()=>Gj,_check:()=>ZS,_cidrv4:()=>vc,_cidrv6:()=>_c,_coercedBigint:()=>Cc,_coercedBoolean:()=>$c,_coercedDate:()=>Uc,_coercedNumber:()=>Rc,_coercedString:()=>nc,_cuid:()=>dc,_cuid2:()=>pc,_custom:()=>Bc,_date:()=>yp,_decode:()=>Jl,_decodeAsync:()=>Yl,_default:()=>qj,_discriminatedUnion:()=>Dj,_e164:()=>bc,_email:()=>oc,_emoji:()=>uc,_encode:()=>Kl,_encodeAsync:()=>Xl,_endsWith:()=>ii,_enum:()=>zj,_file:()=>_p,_float32:()=>ap,_float64:()=>sp,_gt:()=>Xr,_gte:()=>Dt,_guid:()=>la,_includes:()=>ni,_int:()=>Dc,_int32:()=>cp,_int64:()=>dp,_intersection:()=>Oj,_ipv4:()=>gc,_ipv6:()=>yc,_isoDate:()=>Sc,_isoDateTime:()=>Ec,_isoDuration:()=>Ic,_isoTime:()=>xc,_jwt:()=>Tc,_ksuid:()=>hc,_lazy:()=>Kj,_length:()=>vo,_literal:()=>Mj,_lowercase:()=>ti,_lt:()=>Jr,_lte:()=>Kt,_mac:()=>op,_map:()=>Nj,_max:()=>Kt,_maxLength:()=>yo,_maxSize:()=>Ln,_mime:()=>ai,_min:()=>Dt,_minLength:()=>Et,_minSize:()=>Yr,_multipleOf:()=>Fn,_nan:()=>vp,_nanoid:()=>lc,_nativeEnum:()=>Uj,_negative:()=>Fc,_never:()=>gp,_nonnegative:()=>jc,_nonoptional:()=>Bj,_nonpositive:()=>Lc,_normalize:()=>si,_null:()=>hp,_nullable:()=>jj,_number:()=>Ac,_optional:()=>Lj,_overwrite:()=>zr,_parse:()=>Xi,_parseAsync:()=>Yi,_pipe:()=>Hj,_positive:()=>Mc,_promise:()=>Jj,_property:()=>qc,_readonly:()=>Zj,_record:()=>Cj,_refine:()=>Vc,_regex:()=>jt,_safeDecode:()=>ed,_safeDecodeAsync:()=>rd,_safeEncode:()=>Ql,_safeEncodeAsync:()=>td,_safeParse:()=>Qi,_safeParseAsync:()=>ta,_set:()=>kj,_size:()=>go,_slugify:()=>da,_startsWith:()=>oi,_string:()=>rc,_stringFormat:()=>di,_stringbool:()=>Tp,_success:()=>Vj,_superRefine:()=>Pp,_symbol:()=>fp,_templateLiteral:()=>Wj,_toLowerCase:()=>ui,_toUpperCase:()=>li,_transform:()=>Fj,_trim:()=>ci,_tuple:()=>$j,_uint32:()=>up,_uint64:()=>pp,_ulid:()=>fc,_undefined:()=>mp,_union:()=>Aj,_unknown:()=>kc,_uppercase:()=>ri,_url:()=>ei,_uuid:()=>ic,_uuidv4:()=>ac,_uuidv6:()=>sc,_uuidv7:()=>cc,_void:()=>zc,_xid:()=>mc,_xor:()=>Rj,clone:()=>Nt,config:()=>gt,createStandardJSONSchemaMethod:()=>pa,createToJSONSchemaMethod:()=>Hy,decode:()=>mS,decodeAsync:()=>gS,describe:()=>wp,encode:()=>fS,encodeAsync:()=>hS,extractDefs:()=>Po,finalize:()=>wo,flattenError:()=>Ki,formatError:()=>Ji,globalConfig:()=>_s,globalRegistry:()=>kt,initializeContext:()=>_o,isValidBase64:()=>Xg,isValidBase64URL:()=>MS,isValidJWT:()=>FS,locales:()=>ua,meta:()=>bp,parse:()=>Ko,parseAsync:()=>Jo,prettifyError:()=>Wl,process:()=>rt,regexes:()=>ar,registry:()=>tc,safeDecode:()=>vS,safeDecodeAsync:()=>PS,safeEncode:()=>yS,safeEncodeAsync:()=>_S,safeParse:()=>ea,safeParseAsync:()=>ra,toDotPath:()=>pS,toJSONSchema:()=>Gc,treeifyError:()=>Zl,util:()=>ce,version:()=>Kg});var Bl=Object.freeze({status:"aborted"});function N(e,t,n){function o(u,h){if(u._zod||Object.defineProperty(u,"_zod",{value:{def:h,constr:s,traits:new Set},enumerable:!1}),u._zod.traits.has(e))return;u._zod.traits.add(e),t(u,h);let g=s.prototype,y=Object.keys(g);for(let T=0;T<y.length;T++){let b=y[T];b in u||(u[b]=g[b].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 h;let g=n?.Parent?new i:this;o(g,u),(h=g._zod).deferred??(h.deferred=[]);for(let y of g._zod.deferred)y();return g}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(N,"$constructor");var Ps=Symbol("zod_brand"),Kr=class extends Error{static{a(this,"$ZodAsyncError")}constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},lo=class extends Error{static{a(this,"$ZodEncodeError")}constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}},_s={};function gt(e){return e&&Object.assign(_s,e),_s}a(gt,"config");var ce={};nr(ce,{BIGINT_FORMAT_RANGES:()=>rg,Class:()=>Kh,NUMBER_FORMAT_RANGES:()=>tg,aborted:()=>ho,allowsEval:()=>Yh,assert:()=>VL,assertEqual:()=>LL,assertIs:()=>qL,assertNever:()=>BL,assertNotEqual:()=>jL,assignProp:()=>fo,base64ToUint8Array:()=>uS,base64urlToUint8Array:()=>t1,cached:()=>Zi,captureStackTrace:()=>Gl,cleanEnum:()=>e1,cleanRegex:()=>Ts,clone:()=>Nt,cloneDef:()=>HL,createTransparentProxy:()=>YL,defineLazy:()=>Le,esc:()=>Vl,escapeRegex:()=>kr,extend:()=>iS,finalizeIssue:()=>or,floatSafeRemainder:()=>Jh,getElementAtPath:()=>ZL,getEnumValues:()=>bs,getLengthableOrigin:()=>xs,getParsedType:()=>XL,getSizableOrigin:()=>Ss,hexToUint8Array:()=>n1,isObject:()=>Wo,isPlainObject:()=>mo,issue:()=>Wi,joinValues:()=>K,jsonStringifyReplacer:()=>Hi,merge:()=>QL,mergeDefs:()=>Un,normalizeParams:()=>ie,nullish:()=>po,numKeys:()=>JL,objectClone:()=>GL,omit:()=>oS,optionalKeys:()=>eg,parsedType:()=>ue,partial:()=>sS,pick:()=>nS,prefixIssues:()=>yr,primitiveTypes:()=>Qh,promiseAllObject:()=>WL,propertyKeyTypes:()=>Es,randomString:()=>KL,required:()=>cS,safeExtend:()=>aS,shallowClone:()=>Hl,slugify:()=>Xh,stringifyPrimitive:()=>ae,uint8ArrayToBase64:()=>lS,uint8ArrayToBase64url:()=>r1,uint8ArrayToHex:()=>o1,unwrapMessage:()=>ws});function LL(e){return e}a(LL,"assertEqual");function jL(e){return e}a(jL,"assertNotEqual");function qL(e){}a(qL,"assertIs");function BL(e){throw new Error("Unexpected value in exhaustive check")}a(BL,"assertNever");function VL(e){}a(VL,"assert");function bs(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(bs,"getEnumValues");function K(e,t="|"){return e.map(n=>ae(n)).join(t)}a(K,"joinValues");function Hi(e,t){return typeof t=="bigint"?t.toString():t}a(Hi,"jsonStringifyReplacer");function Zi(e){return{get value(){{let n=e();return Object.defineProperty(this,"value",{value:n}),n}throw new Error("cached value already set")}}}a(Zi,"cached");function po(e){return e==null}a(po,"nullish");function Ts(e){let t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}a(Ts,"cleanRegex");function Jh(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 h=o.match(/\d?e-(\d?)/);h?.[1]&&(r=Number.parseInt(h[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(Jh,"floatSafeRemainder");var rS=Symbol("evaluating");function Le(e,t,n){let o;Object.defineProperty(e,t,{get(){if(o!==rS)return o===void 0&&(o=rS,o=n()),o},set(r){Object.defineProperty(e,t,{value:r})},configurable:!0})}a(Le,"defineLazy");function GL(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}a(GL,"objectClone");function fo(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}a(fo,"assignProp");function Un(...e){let t={};for(let n of e){let o=Object.getOwnPropertyDescriptors(n);Object.assign(t,o)}return Object.defineProperties({},t)}a(Un,"mergeDefs");function HL(e){return Un(e._zod.def)}a(HL,"cloneDef");function ZL(e,t){return t?t.reduce((n,o)=>n?.[o],e):e}a(ZL,"getElementAtPath");function WL(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(WL,"promiseAllObject");function KL(e=10){let t="abcdefghijklmnopqrstuvwxyz",n="";for(let o=0;o<e;o++)n+=t[Math.floor(Math.random()*t.length)];return n}a(KL,"randomString");function Vl(e){return JSON.stringify(e)}a(Vl,"esc");function Xh(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}a(Xh,"slugify");var Gl="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Wo(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}a(Wo,"isObject");var Yh=Zi(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function mo(e){if(Wo(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let n=t.prototype;return!(Wo(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}a(mo,"isPlainObject");function Hl(e){return mo(e)?{...e}:Array.isArray(e)?[...e]:e}a(Hl,"shallowClone");function JL(e){let t=0;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}a(JL,"numKeys");var XL=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"),Es=new Set(["string","number","symbol"]),Qh=new Set(["string","number","bigint","boolean","symbol","undefined"]);function kr(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}a(kr,"escapeRegex");function Nt(e,t,n){let o=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(o._zod.parent=e),o}a(Nt,"clone");function ie(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(ie,"normalizeParams");function YL(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(YL,"createTransparentProxy");function ae(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}a(ae,"stringifyPrimitive");function eg(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}a(eg,"optionalKeys");var tg={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]},rg={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function nS(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=Un(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 fo(this,"shape",s),s},checks:[]});return Nt(e,i)}a(nS,"pick");function oS(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=Un(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 fo(this,"shape",s),s},checks:[]});return Nt(e,i)}a(oS,"omit");function iS(e,t){if(!mo(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=Un(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return fo(this,"shape",i),i}});return Nt(e,r)}a(iS,"extend");function aS(e,t){if(!mo(t))throw new Error("Invalid input to safeExtend: expected a plain object");let n=Un(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t};return fo(this,"shape",o),o}});return Nt(e,n)}a(aS,"safeExtend");function QL(e,t){let n=Un(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t._zod.def.shape};return fo(this,"shape",o),o},get catchall(){return t._zod.def.catchall},checks:[]});return Nt(e,n)}a(QL,"merge");function sS(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=Un(t._zod.def,{get shape(){let u=t._zod.def.shape,h={...u};if(n)for(let g in n){if(!(g in u))throw new Error(`Unrecognized key: "${g}"`);n[g]&&(h[g]=e?new e({type:"optional",innerType:u[g]}):u[g])}else for(let g in u)h[g]=e?new e({type:"optional",innerType:u[g]}):u[g];return fo(this,"shape",h),h},checks:[]});return Nt(t,s)}a(sS,"partial");function cS(e,t,n){let o=Un(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 fo(this,"shape",i),i}});return Nt(t,o)}a(cS,"required");function ho(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(ho,"aborted");function yr(e,t){return t.map(n=>{var o;return(o=n).path??(o.path=[]),n.path.unshift(e),n})}a(yr,"prefixIssues");function ws(e){return typeof e=="string"?e:e?.message}a(ws,"unwrapMessage");function or(e,t,n){let o={...e,path:e.path??[]};if(!e.message){let r=ws(e.inst?._zod.def?.error?.(e))??ws(t?.error?.(e))??ws(n.customError?.(e))??ws(n.localeError?.(e))??"Invalid input";o.message=r}return delete o.inst,delete o.continue,t?.reportInput||delete o.input,o}a(or,"finalizeIssue");function Ss(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}a(Ss,"getSizableOrigin");function xs(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}a(xs,"getLengthableOrigin");function ue(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(ue,"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 e1(e){return Object.entries(e).filter(([t,n])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}a(e1,"cleanEnum");function uS(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(uS,"base64ToUint8Array");function lS(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}a(lS,"uint8ArrayToBase64");function t1(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),n="=".repeat((4-t.length%4)%4);return uS(t+n)}a(t1,"base64urlToUint8Array");function r1(e){return lS(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}a(r1,"uint8ArrayToBase64url");function n1(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(n1,"hexToUint8Array");function o1(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}a(o1,"uint8ArrayToHex");var Kh=class{static{a(this,"Class")}constructor(...t){}};var dS=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,Hi,2),Object.defineProperty(e,"toString",{value:a(()=>e.message,"value"),enumerable:!1})},"initializer"),Is=N("$ZodError",dS),ir=N("$ZodError",dS,{Parent:Error});function Ki(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(Ki,"flattenError");function Ji(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 h=i.path[u];u===i.path.length-1?(s[h]=s[h]||{_errors:[]},s[h]._errors.push(t(i))):s[h]=s[h]||{_errors:[]},s=s[h],u++}}},"processError");return o(e),n}a(Ji,"formatError");function Zl(e,t=n=>n.message){let n={errors:[]},o=a((r,i=[])=>{var s,u;for(let h of r.issues)if(h.code==="invalid_union"&&h.errors.length)h.errors.map(g=>o({issues:g},h.path));else if(h.code==="invalid_key")o({issues:h.issues},h.path);else if(h.code==="invalid_element")o({issues:h.issues},h.path);else{let g=[...i,...h.path];if(g.length===0){n.errors.push(t(h));continue}let y=n,T=0;for(;T<g.length;){let b=g[T],P=T===g.length-1;typeof b=="string"?(y.properties??(y.properties={}),(s=y.properties)[b]??(s[b]={errors:[]}),y=y.properties[b]):(y.items??(y.items=[]),(u=y.items)[b]??(u[b]={errors:[]}),y=y.items[b]),P&&y.errors.push(t(h)),T++}}},"processError");return o(e),n}a(Zl,"treeifyError");function pS(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(pS,"toDotPath");function Wl(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 ${pS(o.path)}`);return t.join(`
69
69
  `)}a(Wl,"prettifyError");var Xi=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 Kr;if(s.issues.length){let u=new(r?.Err??e)(s.issues.map(h=>or(h,i,gt())));throw Gl(u,r?.callee),u}return s.value},"_parse"),Ko=Xi(ir),Yi=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(h=>or(h,i,gt())));throw Gl(u,r?.callee),u}return s.value},"_parseAsync"),Jo=Yi(ir),Qi=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 Kr;return i.issues.length?{success:!1,error:new(e??Is)(i.issues.map(s=>or(s,r,gt())))}:{success:!0,data:i.value}},"_safeParse"),ea=Qi(ir),ta=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=>or(s,r,gt())))}:{success:!0,data:i.value}},"_safeParseAsync"),ra=ta(ir),Kl=a(e=>(t,n,o)=>{let r=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return Xi(e)(t,n,r)},"_encode"),fS=Kl(ir),Jl=a(e=>(t,n,o)=>Xi(e)(t,n,o),"_decode"),mS=Jl(ir),Xl=a(e=>async(t,n,o)=>{let r=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return Yi(e)(t,n,r)},"_encodeAsync"),hS=Xl(ir),Yl=a(e=>async(t,n,o)=>Yi(e)(t,n,o),"_decodeAsync"),gS=Yl(ir),Ql=a(e=>(t,n,o)=>{let r=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return Qi(e)(t,n,r)},"_safeEncode"),yS=Ql(ir),ed=a(e=>(t,n,o)=>Qi(e)(t,n,o),"_safeDecode"),vS=ed(ir),td=a(e=>async(t,n,o)=>{let r=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return ta(e)(t,n,r)},"_safeEncodeAsync"),_S=td(ir),rd=a(e=>async(t,n,o)=>ta(e)(t,n,o),"_safeDecodeAsync"),PS=rd(ir);var ar={};nr(ar,{base64:()=>vg,base64url:()=>nd,bigint:()=>Eg,boolean:()=>xg,browserEmail:()=>f1,cidrv4:()=>gg,cidrv6:()=>yg,cuid:()=>ng,cuid2:()=>og,date:()=>Pg,datetime:()=>bg,domain:()=>g1,duration:()=>ug,e164:()=>_g,email:()=>dg,emoji:()=>pg,extendedDuration:()=>a1,guid:()=>lg,hex:()=>y1,hostname:()=>h1,html5Email:()=>l1,idnEmail:()=>p1,integer:()=>Sg,ipv4:()=>fg,ipv6:()=>mg,ksuid:()=>sg,lowercase:()=>Rg,mac:()=>hg,md5_base64:()=>_1,md5_base64url:()=>P1,md5_hex:()=>v1,nanoid:()=>cg,null:()=>Ig,number:()=>od,rfc5322Email:()=>d1,sha1_base64:()=>b1,sha1_base64url:()=>T1,sha1_hex:()=>w1,sha256_base64:()=>S1,sha256_base64url:()=>x1,sha256_hex:()=>E1,sha384_base64:()=>A1,sha384_base64url:()=>R1,sha384_hex:()=>I1,sha512_base64:()=>O1,sha512_base64url:()=>$1,sha512_hex:()=>D1,string:()=>Tg,time:()=>wg,ulid:()=>ig,undefined:()=>Ag,unicodeEmail:()=>wS,uppercase:()=>Dg,uuid:()=>Xo,uuid4:()=>s1,uuid6:()=>c1,uuid7:()=>u1,xid:()=>ag});var ng=/^[cC][^\s-]{8,}$/,og=/^[0-9a-z]+$/,ig=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,ag=/^[0-9a-vA-V]{20}$/,sg=/^[A-Za-z0-9]{27}$/,cg=/^[a-zA-Z0-9_-]{21}$/,ug=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,a1=/^[-+]?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)?)??$/,lg=/^([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})$/,Xo=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"),s1=Xo(4),c1=Xo(6),u1=Xo(7),dg=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,l1=/^[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])?)*$/,d1=/^(([^<>()\[\]\\.,;:\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,p1=wS,f1=/^[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])?)*$/,m1="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function pg(){return new RegExp(m1,"u")}a(pg,"emoji");var fg=/^(?:(?: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])$/,mg=/^(([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}|:))$/,hg=a(e=>{let t=kr(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"),gg=/^((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])$/,yg=/^(([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])$/,vg=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,nd=/^[A-Za-z0-9_-]*$/,h1=/^(?=.{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])?)*\.?$/,g1=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,_g=/^\+[1-9]\d{6,14}$/,bS="(?:(?:\\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])))",Pg=new RegExp(`^${bS}$`);function TS(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(TS,"timeSource");function wg(e){return new RegExp(`^${TS(e)}$`)}a(wg,"time");function bg(e){let t=TS({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(`^${bS}T(?:${o})$`)}a(bg,"datetime");var Tg=a(e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},"string"),Eg=/^-?\d+n?$/,Sg=/^-?\d+$/,od=/^-?\d+(?:\.\d+)?$/,xg=/^(?:true|false)$/i,Ig=/^null$/i;var Ag=/^undefined$/i;var Rg=/^[^A-Z]*$/,Dg=/^[^a-z]*$/,y1=/^[0-9a-fA-F]*$/;function As(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}a(As,"fixedBase64");function Rs(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}a(Rs,"fixedBase64url");var v1=/^[0-9a-fA-F]{32}$/,_1=As(22,"=="),P1=Rs(22),w1=/^[0-9a-fA-F]{40}$/,b1=As(27,"="),T1=Rs(27),E1=/^[0-9a-fA-F]{64}$/,S1=As(43,"="),x1=Rs(43),I1=/^[0-9a-fA-F]{96}$/,A1=As(64,""),R1=Rs(64),D1=/^[0-9a-fA-F]{128}$/,O1=As(86,"=="),$1=Rs(86);var at=N("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),SS={number:"number",bigint:"bigint",object:"date"},id=N("$ZodCheckLessThan",(e,t)=>{at.init(e,t);let n=SS[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})}}),ad=N("$ZodCheckGreaterThan",(e,t)=>{at.init(e,t);let n=SS[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})}}),Og=N("$ZodCheckMultipleOf",(e,t)=>{at.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):Jh(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})}}),$g=N("$ZodCheckNumberFormat",(e,t)=>{at.init(e,t),t.format=t.format||"float64";let n=t.format?.includes("int"),o=n?"int":"number",[r,i]=tg[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=Sg)}),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})}}),Cg=N("$ZodCheckBigIntFormat",(e,t)=>{at.init(e,t);let[n,o]=rg[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})}}),Ng=N("$ZodCheckMaxSize",(e,t)=>{var n;at.init(e,t),(n=e._zod.def).when??(n.when=o=>{let r=o.value;return!po(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:Ss(r),code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),kg=N("$ZodCheckMinSize",(e,t)=>{var n;at.init(e,t),(n=e._zod.def).when??(n.when=o=>{let r=o.value;return!po(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:Ss(r),code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),zg=N("$ZodCheckSizeEquals",(e,t)=>{var n;at.init(e,t),(n=e._zod.def).when??(n.when=o=>{let r=o.value;return!po(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:Ss(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})}}),Ug=N("$ZodCheckMaxLength",(e,t)=>{var n;at.init(e,t),(n=e._zod.def).when??(n.when=o=>{let r=o.value;return!po(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=xs(r);o.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Mg=N("$ZodCheckMinLength",(e,t)=>{var n;at.init(e,t),(n=e._zod.def).when??(n.when=o=>{let r=o.value;return!po(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=xs(r);o.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Fg=N("$ZodCheckLengthEquals",(e,t)=>{var n;at.init(e,t),(n=e._zod.def).when??(n.when=o=>{let r=o.value;return!po(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=xs(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})}}),na=N("$ZodCheckStringFormat",(e,t)=>{var n,o;at.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=()=>{})}),Lg=N("$ZodCheckRegex",(e,t)=>{na.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})}}),jg=N("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Rg),na.init(e,t)}),qg=N("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Dg),na.init(e,t)}),Bg=N("$ZodCheckIncludes",(e,t)=>{at.init(e,t);let n=kr(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})}}),Vg=N("$ZodCheckStartsWith",(e,t)=>{at.init(e,t);let n=new RegExp(`^${kr(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})}}),Gg=N("$ZodCheckEndsWith",(e,t)=>{at.init(e,t);let n=new RegExp(`.*${kr(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 ES(e,t,n){e.issues.length&&t.issues.push(...yr(n,e.issues))}a(ES,"handleCheckPropertyResult");var Hg=N("$ZodCheckProperty",(e,t)=>{at.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=>ES(r,n,t.property));ES(o,n,t.property)}}),Zg=N("$ZodCheckMimeType",(e,t)=>{at.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})}}),Wg=N("$ZodCheckOverwrite",(e,t)=>{at.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});var Ds=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(`
70
70
  `).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(`
71
71
  `))}};var Kg={major:4,minor:3,patch:6};var Re=N("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Kg;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,h)=>{let g=ho(s),y;for(let T of u){if(T._zod.def.when){if(!T._zod.def.when(s))continue}else if(g)continue;let b=s.issues.length,P=T._zod.check(s);if(P instanceof Promise&&h?.async===!1)throw new Kr;if(y||P instanceof Promise)y=(y??Promise.resolve()).then(async()=>{await P,s.issues.length!==b&&(g||(g=ho(s,b)))});else{if(s.issues.length===b)continue;g||(g=ho(s,b))}}return y?y.then(()=>s):s},"runChecks"),i=a((s,u,h)=>{if(ho(s))return s.aborted=!0,s;let g=r(u,o,h);if(g instanceof Promise){if(h.async===!1)throw new Kr;return g.then(y=>e._zod.parse(y,h))}return e._zod.parse(g,h)},"handleCanaryResult");e._zod.run=(s,u)=>{if(u.skipChecks)return e._zod.parse(s,u);if(u.direction==="backward"){let g=e._zod.parse({value:s.value,issues:[]},{...u,skipChecks:!0});return g instanceof Promise?g.then(y=>i(y,s,u)):i(g,s,u)}let h=e._zod.parse(s,u);if(h instanceof Promise){if(u.async===!1)throw new Kr;return h.then(g=>r(g,o,u))}return r(h,o,u)}}Le(e,"~standard",()=>({validate:a(r=>{try{let i=ea(e,r);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return ra(e,r).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},"validate"),vendor:"zod",version:1}))}),Mn=N("$ZodString",(e,t)=>{Re.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Tg(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}}),tt=N("$ZodStringFormat",(e,t)=>{na.init(e,t),Mn.init(e,t)}),pd=N("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=lg),tt.init(e,t)}),fd=N("$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=Xo(o))}else t.pattern??(t.pattern=Xo());tt.init(e,t)}),md=N("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=dg),tt.init(e,t)}),Os=N("$ZodURL",(e,t)=>{tt.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})}}}),hd=N("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=pg()),tt.init(e,t)}),gd=N("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=cg),tt.init(e,t)}),yd=N("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=ng),tt.init(e,t)}),vd=N("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=og),tt.init(e,t)}),_d=N("$ZodULID",(e,t)=>{t.pattern??(t.pattern=ig),tt.init(e,t)}),Pd=N("$ZodXID",(e,t)=>{t.pattern??(t.pattern=ag),tt.init(e,t)}),wd=N("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=sg),tt.init(e,t)}),$s=N("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=bg(t)),tt.init(e,t)}),Cs=N("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Pg),tt.init(e,t)}),Ns=N("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=wg(t)),tt.init(e,t)}),ks=N("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=ug),tt.init(e,t)}),bd=N("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=fg),tt.init(e,t),e._zod.bag.format="ipv4"}),Td=N("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=mg),tt.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})}}}),Ed=N("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=hg(t.delimiter)),tt.init(e,t),e._zod.bag.format="mac"}),Sd=N("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=gg),tt.init(e,t)}),xd=N("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=yg),tt.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 Xg(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}a(Xg,"isValidBase64");var Id=N("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=vg),tt.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{Xg(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function MS(e){if(!nd.test(e))return!1;let t=e.replace(/[-_]/g,o=>o==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return Xg(n)}a(MS,"isValidBase64URL");var Ad=N("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=nd),tt.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{MS(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),Rd=N("$ZodE164",(e,t)=>{t.pattern??(t.pattern=_g),tt.init(e,t)});function FS(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(FS,"isValidJWT");var Dd=N("$ZodJWT",(e,t)=>{tt.init(e,t),e._zod.check=n=>{FS(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),Od=N("$ZodCustomStringFormat",(e,t)=>{tt.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})}}),oa=N("$ZodNumber",(e,t)=>{Re.init(e,t),e._zod.pattern=e._zod.bag.pattern??od,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}}),zs=N("$ZodNumberFormat",(e,t)=>{$g.init(e,t),oa.init(e,t)}),Yo=N("$ZodBoolean",(e,t)=>{Re.init(e,t),e._zod.pattern=xg,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}}),ia=N("$ZodBigInt",(e,t)=>{Re.init(e,t),e._zod.pattern=Eg,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}}),$d=N("$ZodBigIntFormat",(e,t)=>{Cg.init(e,t),ia.init(e,t)}),Cd=N("$ZodSymbol",(e,t)=>{Re.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}}),Nd=N("$ZodUndefined",(e,t)=>{Re.init(e,t),e._zod.pattern=Ag,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}}),kd=N("$ZodNull",(e,t)=>{Re.init(e,t),e._zod.pattern=Ig,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}}),Us=N("$ZodAny",(e,t)=>{Re.init(e,t),e._zod.parse=n=>n}),Ms=N("$ZodUnknown",(e,t)=>{Re.init(e,t),e._zod.parse=n=>n}),zd=N("$ZodNever",(e,t)=>{Re.init(e,t),e._zod.parse=(n,o)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)}),Fs=N("$ZodVoid",(e,t)=>{Re.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}}),Ls=N("$ZodDate",(e,t)=>{Re.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 IS(e,t,n){e.issues.length&&t.issues.push(...yr(n,e.issues)),t.value[n]=e.value}a(IS,"handleArrayResult");var js=N("$ZodArray",(e,t)=>{Re.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],h=t.element._zod.run({value:u,issues:[]},o);h instanceof Promise?i.push(h.then(g=>IS(g,n,s))):IS(h,n,s)}return i.length?Promise.all(i).then(()=>n):n}});function dd(e,t,n,o,r){if(e.issues.length){if(r&&!(n in o))return;t.issues.push(...yr(n,e.issues))}e.value===void 0?n in o&&(t.value[n]=void 0):t.value[n]=e.value}a(dd,"handlePropertyResult");function LS(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=eg(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}a(LS,"normalizeDef");function jS(e,t,n,o,r,i){let s=[],u=r.keySet,h=r.catchall._zod,g=h.def.type,y=h.optout==="optional";for(let T in t){if(u.has(T))continue;if(g==="never"){s.push(T);continue}let b=h.run({value:t[T],issues:[]},o);b instanceof Promise?e.push(b.then(P=>dd(P,n,T,t,y))):dd(b,n,T,t,y)}return s.length&&n.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:i}),e.length?Promise.all(e).then(()=>n):n}a(jS,"handleCatchall");var Ud=N("$ZodObject",(e,t)=>{if(Re.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let u=t.shape;Object.defineProperty(t,"shape",{get:a(()=>{let h={...u};return Object.defineProperty(t,"shape",{value:h}),h},"get")})}let o=Zi(()=>LS(t));Le(e._zod,"propValues",()=>{let u=t.shape,h={};for(let g in u){let y=u[g]._zod;if(y.values){h[g]??(h[g]=new Set);for(let T of y.values)h[g].add(T)}}return h});let r=Wo,i=t.catchall,s;e._zod.parse=(u,h)=>{s??(s=o.value);let g=u.value;if(!r(g))return u.issues.push({expected:"object",code:"invalid_type",input:g,inst:e}),u;u.value={};let y=[],T=s.shape;for(let b of s.keys){let P=T[b],S=P._zod.optout==="optional",R=P._zod.run({value:g[b],issues:[]},h);R instanceof Promise?y.push(R.then(I=>dd(I,u,b,g,S))):dd(R,u,b,g,S)}return i?jS(y,g,u,h,o.value,e):y.length?Promise.all(y).then(()=>u):u}}),Yg=N("$ZodObjectJIT",(e,t)=>{Ud.init(e,t);let n=e._zod.parse,o=Zi(()=>LS(t)),r=a(b=>{let P=new Ds(["shape","payload","ctx"]),S=o.value,R=a(d=>{let v=Vl(d);return`shape[${v}]._zod.run({ value: input[${v}], issues: [] }, ctx)`},"parseStr");P.write("const input = payload.value;");let I=Object.create(null),l=0;for(let d of S.keys)I[d]=`key_${l++}`;P.write("const newResult = {};");for(let d of S.keys){let v=I[d],p=Vl(d),_=b[d]?._zod?.optout==="optional";P.write(`const ${v} = ${R(d)};`),_?P.write(`
@@ -104,12 +104,12 @@ content-type: ${l["content-type"]}\r
104
104
 
105
105
  `)}P.write("payload.value = newResult;"),P.write("return payload;");let m=P.compile();return(d,v)=>m(b,d,v)},"generateFastpass"),i,s=Wo,u=!_s.jitless,g=u&&Yh.value,y=t.catchall,T;e._zod.parse=(b,P)=>{T??(T=o.value);let S=b.value;return s(S)?u&&g&&P?.async===!1&&P.jitless!==!0?(i||(i=r(t.shape)),b=i(b,P),y?jS([],S,b,P,T,e):b):n(b,P):(b.issues.push({expected:"object",code:"invalid_type",input:S,inst:e}),b)}});function AS(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=>!ho(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=>or(s,o,gt())))}),t)}a(AS,"handleUnionResults");var Qo=N("$ZodUnion",(e,t)=>{Re.init(e,t),Le(e._zod,"optin",()=>t.options.some(r=>r._zod.optin==="optional")?"optional":void 0),Le(e._zod,"optout",()=>t.options.some(r=>r._zod.optout==="optional")?"optional":void 0),Le(e._zod,"values",()=>{if(t.options.every(r=>r._zod.values))return new Set(t.options.flatMap(r=>Array.from(r._zod.values)))}),Le(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=>Ts(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 h of t.options){let g=h._zod.run({value:r.value,issues:[]},i);if(g instanceof Promise)u.push(g),s=!0;else{if(g.issues.length===0)return g;u.push(g)}}return s?Promise.all(u).then(h=>AS(h,r,e,i)):AS(u,r,e,i)}});function RS(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=>or(s,o,gt())))}):t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:[],inclusive:!1}),t)}a(RS,"handleExclusiveUnionResults");var Md=N("$ZodXor",(e,t)=>{Qo.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 h of t.options){let g=h._zod.run({value:r.value,issues:[]},i);g instanceof Promise?(u.push(g),s=!0):u.push(g)}return s?Promise.all(u).then(h=>RS(h,r,e,i)):RS(u,r,e,i)}}),qs=N("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,Qo.init(e,t);let n=e._zod.parse;Le(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,h]of Object.entries(s)){r[u]||(r[u]=new Set);for(let g of h)r[u].add(g)}}return r});let o=Zi(()=>{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 h of u){if(i.has(h))throw new Error(`Duplicate discriminator value "${String(h)}"`);i.set(h,s)}}return i});e._zod.parse=(r,i)=>{let s=r.value;if(!Wo(s))return r.issues.push({code:"invalid_type",expected:"object",input:s,inst:e}),r;let u=o.value.get(s?.[t.discriminator]);return u?u._zod.run(r,i):t.unionFallback?n(r,i):(r.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:s,path:[t.discriminator],inst:e}),r)}}),Fd=N("$ZodIntersection",(e,t)=>{Re.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(([h,g])=>DS(n,h,g)):DS(n,i,s)}});function Jg(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(mo(e)&&mo(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=Jg(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=Jg(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(Jg,"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 h of u.keys)o.has(h)||o.set(h,{}),o.get(h).l=!0}else e.issues.push(u);for(let u of n.issues)if(u.code==="unrecognized_keys")for(let h of u.keys)o.has(h)||o.set(h,{}),o.get(h).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}),ho(e))return e;let s=Jg(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 Bs=N("$ZodTuple",(e,t)=>{Re.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(y=>y._zod.optin!=="optional"),h=u===-1?0:n.length-u;if(!t.rest){let y=i.length>n.length,T=i.length<h-1;if(y||T)return o.issues.push({...y?{code:"too_big",maximum:n.length,inclusive:!0}:{code:"too_small",minimum:n.length},input:i,inst:e,origin:"array"}),o}let g=-1;for(let y of n){if(g++,g>=i.length&&g>=h)continue;let T=y._zod.run({value:i[g],issues:[]},r);T instanceof Promise?s.push(T.then(b=>sd(b,o,g))):sd(T,o,g)}if(t.rest){let y=i.slice(n.length);for(let T of y){g++;let b=t.rest._zod.run({value:T,issues:[]},r);b instanceof Promise?s.push(b.then(P=>sd(P,o,g))):sd(b,o,g)}}return s.length?Promise.all(s).then(()=>o):o}});function sd(e,t,n){e.issues.length&&t.issues.push(...yr(n,e.issues)),t.value[n]=e.value}a(sd,"handleTupleResult");var Vs=N("$ZodRecord",(e,t)=>{Re.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;if(!mo(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 g of s)if(typeof g=="string"||typeof g=="number"||typeof g=="symbol"){u.add(typeof g=="number"?g.toString():g);let y=t.valueType._zod.run({value:r[g],issues:[]},o);y instanceof Promise?i.push(y.then(T=>{T.issues.length&&n.issues.push(...yr(g,T.issues)),n.value[g]=T.value})):(y.issues.length&&n.issues.push(...yr(g,y.issues)),n.value[g]=y.value)}let h;for(let g in r)u.has(g)||(h=h??[],h.push(g));h&&h.length>0&&n.issues.push({code:"unrecognized_keys",input:r,inst:e,keys:h})}else{n.value={};for(let u of Reflect.ownKeys(r)){if(u==="__proto__")continue;let h=t.keyType._zod.run({value:u,issues:[]},o);if(h instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof u=="string"&&od.test(u)&&h.issues.length){let T=t.keyType._zod.run({value:Number(u),issues:[]},o);if(T instanceof Promise)throw new Error("Async schemas not supported in object keys currently");T.issues.length===0&&(h=T)}if(h.issues.length){t.mode==="loose"?n.value[u]=r[u]:n.issues.push({code:"invalid_key",origin:"record",issues:h.issues.map(T=>or(T,o,gt())),input:u,path:[u],inst:e});continue}let y=t.valueType._zod.run({value:r[u],issues:[]},o);y instanceof Promise?i.push(y.then(T=>{T.issues.length&&n.issues.push(...yr(u,T.issues)),n.value[h.value]=T.value})):(y.issues.length&&n.issues.push(...yr(u,y.issues)),n.value[h.value]=y.value)}}return i.length?Promise.all(i).then(()=>n):n}}),Ld=N("$ZodMap",(e,t)=>{Re.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 h=t.keyType._zod.run({value:s,issues:[]},o),g=t.valueType._zod.run({value:u,issues:[]},o);h instanceof Promise||g instanceof Promise?i.push(Promise.all([h,g]).then(([y,T])=>{OS(y,T,n,s,r,e,o)})):OS(h,g,n,s,r,e,o)}return i.length?Promise.all(i).then(()=>n):n}});function OS(e,t,n,o,r,i,s){e.issues.length&&(Es.has(typeof o)?n.issues.push(...yr(o,e.issues)):n.issues.push({code:"invalid_key",origin:"map",input:r,inst:i,issues:e.issues.map(u=>or(u,s,gt()))})),t.issues.length&&(Es.has(typeof o)?n.issues.push(...yr(o,t.issues)):n.issues.push({origin:"map",code:"invalid_element",input:r,inst:i,key:o,issues:t.issues.map(u=>or(u,s,gt()))})),n.value.set(e.value,t.value)}a(OS,"handleMapResult");var jd=N("$ZodSet",(e,t)=>{Re.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(h=>$S(h,n))):$S(u,n)}return i.length?Promise.all(i).then(()=>n):n}});function $S(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}a($S,"handleSetResult");var Gs=N("$ZodEnum",(e,t)=>{Re.init(e,t);let n=bs(t.entries),o=new Set(n);e._zod.values=o,e._zod.pattern=new RegExp(`^(${n.filter(r=>Es.has(typeof r)).map(r=>typeof r=="string"?kr(r):r.toString()).join("|")})$`),e._zod.parse=(r,i)=>{let s=r.value;return o.has(s)||r.issues.push({code:"invalid_value",values:n,input:s,inst:e}),r}}),Hs=N("$ZodLiteral",(e,t)=>{if(Re.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"?kr(o):o?kr(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}}),qd=N("$ZodFile",(e,t)=>{Re.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}}),Zs=N("$ZodTransform",(e,t)=>{Re.init(e,t),e._zod.parse=(n,o)=>{if(o.direction==="backward")throw new lo(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 Kr;return n.value=r,n}});function CS(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}a(CS,"handleOptionalResult");var aa=N("$ZodOptional",(e,t)=>{Re.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Le(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Le(e._zod,"pattern",()=>{let n=t.innerType._zod.pattern;return n?new RegExp(`^(${Ts(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=>CS(i,n.value)):CS(r,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,o)}}),Bd=N("$ZodExactOptional",(e,t)=>{aa.init(e,t),Le(e._zod,"values",()=>t.innerType._zod.values),Le(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,o)=>t.innerType._zod.run(n,o)}),Ws=N("$ZodNullable",(e,t)=>{Re.init(e,t),Le(e._zod,"optin",()=>t.innerType._zod.optin),Le(e._zod,"optout",()=>t.innerType._zod.optout),Le(e._zod,"pattern",()=>{let n=t.innerType._zod.pattern;return n?new RegExp(`^(${Ts(n.source)}|null)$`):void 0}),Le(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)}),Vd=N("$ZodDefault",(e,t)=>{Re.init(e,t),e._zod.optin="optional",Le(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=>NS(i,t)):NS(r,t)}});function NS(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}a(NS,"handleDefaultResult");var Gd=N("$ZodPrefault",(e,t)=>{Re.init(e,t),e._zod.optin="optional",Le(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))}),Hd=N("$ZodNonOptional",(e,t)=>{Re.init(e,t),Le(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=>kS(i,e)):kS(r,e)}});function kS(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(kS,"handleNonOptionalResult");var Zd=N("$ZodSuccess",(e,t)=>{Re.init(e,t),e._zod.parse=(n,o)=>{if(o.direction==="backward")throw new lo("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)}}),Wd=N("$ZodCatch",(e,t)=>{Re.init(e,t),Le(e._zod,"optin",()=>t.innerType._zod.optin),Le(e._zod,"optout",()=>t.innerType._zod.optout),Le(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=>or(s,o,gt()))},input:n.value}),n.issues=[]),n)):(n.value=r.value,r.issues.length&&(n.value=t.catchValue({...n,error:{issues:r.issues.map(i=>or(i,o,gt()))},input:n.value}),n.issues=[]),n)}}),Kd=N("$ZodNaN",(e,t)=>{Re.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)}),Ks=N("$ZodPipe",(e,t)=>{Re.init(e,t),Le(e._zod,"values",()=>t.in._zod.values),Le(e._zod,"optin",()=>t.in._zod.optin),Le(e._zod,"optout",()=>t.out._zod.optout),Le(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=>cd(s,t.in,o)):cd(i,t.in,o)}let r=t.in._zod.run(n,o);return r instanceof Promise?r.then(i=>cd(i,t.out,o)):cd(r,t.out,o)}});function cd(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}a(cd,"handlePipeResult");var sa=N("$ZodCodec",(e,t)=>{Re.init(e,t),Le(e._zod,"values",()=>t.in._zod.values),Le(e._zod,"optin",()=>t.in._zod.optin),Le(e._zod,"optout",()=>t.out._zod.optout),Le(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=>ud(s,t,o)):ud(i,t,o)}else{let i=t.out._zod.run(n,o);return i instanceof Promise?i.then(s=>ud(s,t,o)):ud(i,t,o)}}});function ud(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=>ld(e,i,t.out,n)):ld(e,r,t.out,n)}else{let r=t.reverseTransform(e.value,e);return r instanceof Promise?r.then(i=>ld(e,i,t.in,n)):ld(e,r,t.in,n)}}a(ud,"handleCodecAResult");function ld(e,t,n,o){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:t,issues:e.issues},o)}a(ld,"handleCodecTxResult");var Jd=N("$ZodReadonly",(e,t)=>{Re.init(e,t),Le(e._zod,"propValues",()=>t.innerType._zod.propValues),Le(e._zod,"values",()=>t.innerType._zod.values),Le(e._zod,"optin",()=>t.innerType?._zod?.optin),Le(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(zS):zS(r)}});function zS(e){return e.value=Object.freeze(e.value),e}a(zS,"handleReadonlyResult");var Xd=N("$ZodTemplateLiteral",(e,t)=>{Re.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||Qh.has(typeof o))n.push(kr(`${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)}),Yd=N("$ZodFunction",(e,t)=>(Re.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?Ko(e._def.input,o):o,i=Reflect.apply(n,this,r);return e._def.output?Ko(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 Jo(e._def.input,o):o,i=await Reflect.apply(n,this,r);return e._def.output?await Jo(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 Bs({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)),Qd=N("$ZodPromise",(e,t)=>{Re.init(e,t),e._zod.parse=(n,o)=>Promise.resolve(n.value).then(r=>t.innerType._zod.run({value:r,issues:[]},o))}),ep=N("$ZodLazy",(e,t)=>{Re.init(e,t),Le(e._zod,"innerType",()=>t.getter()),Le(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),Le(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),Le(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),Le(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(n,o)=>e._zod.innerType._zod.run(n,o)}),Js=N("$ZodCustom",(e,t)=>{at.init(e,t),Re.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=>US(i,n,o,e));US(r,n,o,e)}});function US(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(US,"handleRefineResult");var ua={};nr(ua,{ar:()=>Qg,az:()=>ey,be:()=>ty,bg:()=>ry,ca:()=>ny,cs:()=>oy,da:()=>iy,de:()=>ay,en:()=>Xs,eo:()=>sy,es:()=>cy,fa:()=>uy,fi:()=>ly,fr:()=>dy,frCA:()=>py,he:()=>fy,hu:()=>my,hy:()=>hy,id:()=>gy,is:()=>yy,it:()=>vy,ja:()=>_y,ka:()=>Py,kh:()=>wy,km:()=>Ys,ko:()=>by,lt:()=>Ty,mk:()=>Ey,ms:()=>Sy,nl:()=>xy,no:()=>Iy,ota:()=>Ay,pl:()=>Dy,ps:()=>Ry,pt:()=>Oy,ru:()=>$y,sl:()=>Cy,sv:()=>Ny,ta:()=>ky,th:()=>zy,tr:()=>Uy,ua:()=>My,uk:()=>ec,ur:()=>Fy,uz:()=>Ly,vi:()=>jy,yo:()=>Vy,zhCN:()=>qy,zhTW:()=>By});var N1=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=ue(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 ${ae(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: ${K(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":""}: ${K(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 Qg(){return{localeError:N1()}}a(Qg,"default");var k1=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=ue(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 ${ae(r.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${K(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":""}: ${K(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 ey(){return{localeError:k1()}}a(ey,"default");function qS(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(qS,"getBelarusianPlural");var z1=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=ue(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 ${ae(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 ${K(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);if(s){let u=Number(r.maximum),h=qS(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()} ${h}`}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),h=qS(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()} ${h}`}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"}: ${K(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 ty(){return{localeError:z1()}}a(ty,"default");var U1=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=ue(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 ${ae(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 ${K(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":""}: ${K(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 ry(){return{localeError:U1()}}a(ry,"default");var M1=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=ue(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 ${ae(r.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${K(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":""}: ${K(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 ny(){return{localeError:M1()}}a(ny,"default");var F1=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=ue(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 ${ae(r.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${K(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: ${K(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 oy(){return{localeError:F1()}}a(oy,"default");var L1=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=ue(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 ${ae(r.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${K(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"}: ${K(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 iy(){return{localeError:L1()}}a(iy,"default");var j1=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=ue(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 ${ae(r.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${K(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"}: ${K(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 ay(){return{localeError:j1()}}a(ay,"default");var q1=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=ue(r.input),u=o[s]??s;return`Invalid input: expected ${i}, received ${u}`}case"invalid_value":return r.values.length===1?`Invalid input: expected ${ae(r.values[0])}`:`Invalid option: expected one of ${K(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":""}: ${K(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 Xs(){return{localeError:q1()}}a(Xs,"default");var B1=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=ue(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 ${ae(r.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${K(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":""}: ${K(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 sy(){return{localeError:B1()}}a(sy,"default");var V1=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=ue(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 ${ae(r.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${K(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":""}: ${K(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 cy(){return{localeError:V1()}}a(cy,"default");var G1=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=ue(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 ${ae(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 ${K(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: ${K(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 uy(){return{localeError:G1()}}a(uy,"default");var H1=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=ue(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 ${ae(r.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${K(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"}: ${K(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 ly(){return{localeError:H1()}}a(ly,"default");var Z1=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=ue(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 : ${ae(r.values[0])} attendu`:`Option invalide : une valeur parmi ${K(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":""} : ${K(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 dy(){return{localeError:Z1()}}a(dy,"default");var W1=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=ue(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 ${ae(r.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${K(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":""} : ${K(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 py(){return{localeError:W1()}}a(py,"default");var K1=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(g=>g?e[g]:void 0,"typeEntry"),o=a(g=>{let y=n(g);return y?y.label:g??e.unknown.label},"typeLabel"),r=a(g=>`\u05D4${o(g)}`,"withDefinite"),i=a(g=>(n(g)?.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(g=>g?t[g]??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"}},h={nan:"NaN"};return g=>{switch(g.code){case"invalid_type":{let y=g.expected,T=h[y??""]??o(y),b=ue(g.input),P=h[b]??e[b]?.label??b;return/^[A-Z]/.test(g.expected)?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${g.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${P}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${T}, \u05D4\u05EA\u05E7\u05D1\u05DC ${P}`}case"invalid_value":{if(g.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 ${ae(g.values[0])}`;let y=g.values.map(P=>ae(P));if(g.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 ${y[0]} \u05D0\u05D5 ${y[1]}`;let T=y[y.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 ${y.slice(0,-1).join(", ")} \u05D0\u05D5 ${T}`}case"too_big":{let y=s(g.origin),T=r(g.origin??"value");if(g.origin==="string")return`${y?.longLabel??"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${T} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${g.maximum.toString()} ${y?.unit??""} ${g.inclusive?"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA":"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();if(g.origin==="number"){let S=g.inclusive?`\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${g.maximum}`:`\u05E7\u05D8\u05DF \u05DE-${g.maximum}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${T} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${S}`}if(g.origin==="array"||g.origin==="set"){let S=g.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",R=g.inclusive?`${g.maximum} ${y?.unit??""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`:`\u05E4\u05D7\u05D5\u05EA \u05DE-${g.maximum} ${y?.unit??""}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${T} ${S} \u05DC\u05D4\u05DB\u05D9\u05DC ${R}`.trim()}let b=g.inclusive?"<=":"<",P=i(g.origin??"value");return y?.unit?`${y.longLabel} \u05DE\u05D3\u05D9: ${T} ${P} ${b}${g.maximum.toString()} ${y.unit}`:`${y?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${T} ${P} ${b}${g.maximum.toString()}`}case"too_small":{let y=s(g.origin),T=r(g.origin??"value");if(g.origin==="string")return`${y?.shortLabel??"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${T} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${g.minimum.toString()} ${y?.unit??""} ${g.inclusive?"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8":"\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();if(g.origin==="number"){let S=g.inclusive?`\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${g.minimum}`:`\u05D2\u05D3\u05D5\u05DC \u05DE-${g.minimum}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${T} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${S}`}if(g.origin==="array"||g.origin==="set"){let S=g.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(g.minimum===1&&g.inclusive){let I=(g.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${T} ${S} \u05DC\u05D4\u05DB\u05D9\u05DC ${I}`}let R=g.inclusive?`${g.minimum} ${y?.unit??""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`:`\u05D9\u05D5\u05EA\u05E8 \u05DE-${g.minimum} ${y?.unit??""}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${T} ${S} \u05DC\u05D4\u05DB\u05D9\u05DC ${R}`.trim()}let b=g.inclusive?">=":">",P=i(g.origin??"value");return y?.unit?`${y.shortLabel} \u05DE\u05D3\u05D9: ${T} ${P} ${b}${g.minimum.toString()} ${y.unit}`:`${y?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${T} ${P} ${b}${g.minimum.toString()}`}case"invalid_format":{let y=g;if(y.format==="starts_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${y.prefix}"`;if(y.format==="ends_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${y.suffix}"`;if(y.format==="includes")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${y.includes}"`;if(y.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 ${y.pattern}`;let T=u[y.format],b=T?.label??y.format,S=(T?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${b} \u05DC\u05D0 ${S}`}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 ${g.divisor}`;case"unrecognized_keys":return`\u05DE\u05E4\u05EA\u05D7${g.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${g.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${K(g.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(g.origin??"array")}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}},"error");function fy(){return{localeError:K1()}}a(fy,"default");var J1=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=ue(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 ${ae(r.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${K(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":""}: ${K(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 my(){return{localeError:J1()}}a(my,"default");function BS(e,t,n){return Math.abs(e)===1?t:n}a(BS,"getArmenianPlural");function ca(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(ca,"withDefiniteArticle");var X1=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=ue(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 ${ae(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 ${K(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);if(s){let u=Number(r.maximum),h=BS(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 ${ca(r.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${i}${r.maximum.toString()} ${h}`}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 ${ca(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),h=BS(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 ${ca(r.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${i}${r.minimum.toString()} ${h}`}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 ${ca(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":""}. ${K(r.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${ca(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 ${ca(r.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}},"error");function hy(){return{localeError:X1()}}a(hy,"default");var Y1=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=ue(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 ${ae(r.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${K(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":""}: ${K(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 gy(){return{localeError:Y1()}}a(gy,"default");var Q1=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=ue(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 ${ae(r.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${K(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"}: ${K(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 yy(){return{localeError:Q1()}}a(yy,"default");var ej=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=ue(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 ${ae(r.values[0])}`:`Opzione non valida: atteso uno tra ${K(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"}: ${K(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 vy(){return{localeError:ej()}}a(vy,"default");var tj=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=ue(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: ${ae(r.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${K(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":""}: ${K(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 _y(){return{localeError:tj()}}a(_y,"default");var rj=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=ue(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 ${ae(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 ${K(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"}: ${K(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 Py(){return{localeError:rj()}}a(Py,"default");var nj=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=ue(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 ${ae(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 ${K(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 ${K(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 Ys(){return{localeError:nj()}}a(Ys,"default");function wy(){return Ys()}a(wy,"default");var oj=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=ue(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 ${ae(r.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${K(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),h=u?.unit??"\uC694\uC18C";return u?`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${r.maximum.toString()}${h} ${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),h=u?.unit??"\uC694\uC18C";return u?`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${r.minimum.toString()}${h} ${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: ${K(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 by(){return{localeError:oj()}}a(by,"default");var Qs=a(e=>e.charAt(0).toUpperCase()+e.slice(1),"capitalizeFirstCharacter");function VS(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(VS,"getUnitTypeFromNumber");var ij=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 h=e[r]??null;return h===null?h:{unit:h.unit[i],verb:h.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=ue(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 ${ae(r.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${K(r.values,"|")} pasirinkim\u0173`;case"too_big":{let i=o[r.origin]??r.origin,s=t(r.origin,VS(Number(r.maximum)),r.inclusive??!1,"smaller");if(s?.verb)return`${Qs(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`${Qs(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,VS(Number(r.minimum)),r.inclusive??!1,"bigger");if(s?.verb)return`${Qs(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`${Qs(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"}: ${K(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`${Qs(i??r.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}},"error");function Ty(){return{localeError:ij()}}a(Ty,"default");var aj=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=ue(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 ${ae(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 ${K(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"}: ${K(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 Ey(){return{localeError:aj()}}a(Ey,"default");var sj=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=ue(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 ${ae(r.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${K(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: ${K(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 Sy(){return{localeError:sj()}}a(Sy,"default");var cj=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=ue(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 ${ae(r.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${K(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":""}: ${K(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 xy(){return{localeError:cj()}}a(xy,"default");var uj=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=ue(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 ${ae(r.values[0])}`:`Ugyldig valg: forventet en av ${K(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"}: ${K(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 Iy(){return{localeError:uj()}}a(Iy,"default");var lj=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=ue(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 ${ae(r.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${K(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":""}: ${K(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 Ay(){return{localeError:lj()}}a(Ay,"default");var dj=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=ue(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 ${ae(r.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${K(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"}: ${K(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 Ry(){return{localeError:dj()}}a(Ry,"default");var pj=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=ue(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 ${ae(r.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${K(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":""}: ${K(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 Dy(){return{localeError:pj()}}a(Dy,"default");var fj=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=ue(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 ${ae(r.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${K(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":""}: ${K(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 Oy(){return{localeError:fj()}}a(Oy,"default");function GS(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(GS,"getRussianPlural");var mj=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=ue(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 ${ae(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 ${K(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);if(s){let u=Number(r.maximum),h=GS(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()} ${h}`}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),h=GS(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()} ${h}`}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":""}: ${K(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 $y(){return{localeError:mj()}}a($y,"default");var hj=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=ue(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 ${ae(r.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${K(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"}: ${K(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 Cy(){return{localeError:hj()}}a(Cy,"default");var gj=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=ue(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 ${ae(r.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${K(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"}: ${K(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 Ny(){return{localeError:gj()}}a(Ny,"default");var yj=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=ue(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 ${ae(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 ${K(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":""}: ${K(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 ky(){return{localeError:yj()}}a(ky,"default");var vj=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=ue(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 ${ae(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 ${K(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: ${K(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 zy(){return{localeError:vj()}}a(zy,"default");var _j=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=ue(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 ${ae(r.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${K(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":""}: ${K(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 Uy(){return{localeError:_j()}}a(Uy,"default");var Pj=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=ue(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 ${ae(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 ${K(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":""}: ${K(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 ec(){return{localeError:Pj()}}a(ec,"default");function My(){return ec()}a(My,"default");var wj=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=ue(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: ${ae(r.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${K(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":""}: ${K(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 Fy(){return{localeError:wj()}}a(Fy,"default");var bj=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=ue(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 ${ae(r.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${K(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":""}: ${K(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 Ly(){return{localeError:bj()}}a(Ly,"default");var Tj=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=ue(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 ${ae(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 ${K(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: ${K(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 jy(){return{localeError:Tj()}}a(jy,"default");var Ej=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=ue(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 ${ae(r.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${K(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): ${K(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 qy(){return{localeError:Ej()}}a(qy,"default");var Sj=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=ue(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 ${ae(r.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${K(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${K(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 By(){return{localeError:Sj()}}a(By,"default");var xj=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=ue(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 ${ae(r.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${K(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: ${K(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 Vy(){return{localeError:xj()}}a(Vy,"default");var HS,rp=Symbol("ZodOutput"),np=Symbol("ZodInput"),tp=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 tc(){return new tp}a(tc,"registry");(HS=globalThis).__zod_globalRegistry??(HS.__zod_globalRegistry=tc());var kt=globalThis.__zod_globalRegistry;function rc(e,t){return new e({type:"string",...ie(t)})}a(rc,"_string");function nc(e,t){return new e({type:"string",coerce:!0,...ie(t)})}a(nc,"_coercedString");function oc(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...ie(t)})}a(oc,"_email");function la(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...ie(t)})}a(la,"_guid");function ic(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...ie(t)})}a(ic,"_uuid");function ac(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...ie(t)})}a(ac,"_uuidv4");function sc(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...ie(t)})}a(sc,"_uuidv6");function cc(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...ie(t)})}a(cc,"_uuidv7");function ei(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...ie(t)})}a(ei,"_url");function uc(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...ie(t)})}a(uc,"_emoji");function lc(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...ie(t)})}a(lc,"_nanoid");function dc(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...ie(t)})}a(dc,"_cuid");function pc(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...ie(t)})}a(pc,"_cuid2");function fc(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...ie(t)})}a(fc,"_ulid");function mc(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...ie(t)})}a(mc,"_xid");function hc(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...ie(t)})}a(hc,"_ksuid");function gc(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...ie(t)})}a(gc,"_ipv4");function yc(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...ie(t)})}a(yc,"_ipv6");function op(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...ie(t)})}a(op,"_mac");function vc(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...ie(t)})}a(vc,"_cidrv4");function _c(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...ie(t)})}a(_c,"_cidrv6");function Pc(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...ie(t)})}a(Pc,"_base64");function wc(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...ie(t)})}a(wc,"_base64url");function bc(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...ie(t)})}a(bc,"_e164");function Tc(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...ie(t)})}a(Tc,"_jwt");var ip={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function Ec(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...ie(t)})}a(Ec,"_isoDateTime");function Sc(e,t){return new e({type:"string",format:"date",check:"string_format",...ie(t)})}a(Sc,"_isoDate");function xc(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...ie(t)})}a(xc,"_isoTime");function Ic(e,t){return new e({type:"string",format:"duration",check:"string_format",...ie(t)})}a(Ic,"_isoDuration");function Ac(e,t){return new e({type:"number",checks:[],...ie(t)})}a(Ac,"_number");function Rc(e,t){return new e({type:"number",coerce:!0,checks:[],...ie(t)})}a(Rc,"_coercedNumber");function Dc(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...ie(t)})}a(Dc,"_int");function ap(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...ie(t)})}a(ap,"_float32");function sp(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...ie(t)})}a(sp,"_float64");function cp(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...ie(t)})}a(cp,"_int32");function up(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...ie(t)})}a(up,"_uint32");function Oc(e,t){return new e({type:"boolean",...ie(t)})}a(Oc,"_boolean");function $c(e,t){return new e({type:"boolean",coerce:!0,...ie(t)})}a($c,"_coercedBoolean");function lp(e,t){return new e({type:"bigint",...ie(t)})}a(lp,"_bigint");function Cc(e,t){return new e({type:"bigint",coerce:!0,...ie(t)})}a(Cc,"_coercedBigint");function dp(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...ie(t)})}a(dp,"_int64");function pp(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...ie(t)})}a(pp,"_uint64");function fp(e,t){return new e({type:"symbol",...ie(t)})}a(fp,"_symbol");function mp(e,t){return new e({type:"undefined",...ie(t)})}a(mp,"_undefined");function hp(e,t){return new e({type:"null",...ie(t)})}a(hp,"_null");function Nc(e){return new e({type:"any"})}a(Nc,"_any");function kc(e){return new e({type:"unknown"})}a(kc,"_unknown");function gp(e,t){return new e({type:"never",...ie(t)})}a(gp,"_never");function zc(e,t){return new e({type:"void",...ie(t)})}a(zc,"_void");function yp(e,t){return new e({type:"date",...ie(t)})}a(yp,"_date");function Uc(e,t){return new e({type:"date",coerce:!0,...ie(t)})}a(Uc,"_coercedDate");function vp(e,t){return new e({type:"nan",...ie(t)})}a(vp,"_nan");function Jr(e,t){return new id({check:"less_than",...ie(t),value:e,inclusive:!1})}a(Jr,"_lt");function Kt(e,t){return new id({check:"less_than",...ie(t),value:e,inclusive:!0})}a(Kt,"_lte");function Xr(e,t){return new ad({check:"greater_than",...ie(t),value:e,inclusive:!1})}a(Xr,"_gt");function Dt(e,t){return new ad({check:"greater_than",...ie(t),value:e,inclusive:!0})}a(Dt,"_gte");function Mc(e){return Xr(0,e)}a(Mc,"_positive");function Fc(e){return Jr(0,e)}a(Fc,"_negative");function Lc(e){return Kt(0,e)}a(Lc,"_nonpositive");function jc(e){return Dt(0,e)}a(jc,"_nonnegative");function Fn(e,t){return new Og({check:"multiple_of",...ie(t),value:e})}a(Fn,"_multipleOf");function Ln(e,t){return new Ng({check:"max_size",...ie(t),maximum:e})}a(Ln,"_maxSize");function Yr(e,t){return new kg({check:"min_size",...ie(t),minimum:e})}a(Yr,"_minSize");function go(e,t){return new zg({check:"size_equals",...ie(t),size:e})}a(go,"_size");function yo(e,t){return new Ug({check:"max_length",...ie(t),maximum:e})}a(yo,"_maxLength");function Et(e,t){return new Mg({check:"min_length",...ie(t),minimum:e})}a(Et,"_minLength");function vo(e,t){return new Fg({check:"length_equals",...ie(t),length:e})}a(vo,"_length");function jt(e,t){return new Lg({check:"string_format",format:"regex",...ie(t),pattern:e})}a(jt,"_regex");function ti(e){return new jg({check:"string_format",format:"lowercase",...ie(e)})}a(ti,"_lowercase");function ri(e){return new qg({check:"string_format",format:"uppercase",...ie(e)})}a(ri,"_uppercase");function ni(e,t){return new Bg({check:"string_format",format:"includes",...ie(t),includes:e})}a(ni,"_includes");function oi(e,t){return new Vg({check:"string_format",format:"starts_with",...ie(t),prefix:e})}a(oi,"_startsWith");function ii(e,t){return new Gg({check:"string_format",format:"ends_with",...ie(t),suffix:e})}a(ii,"_endsWith");function qc(e,t,n){return new Hg({check:"property",property:e,schema:t,...ie(n)})}a(qc,"_property");function ai(e,t){return new Zg({check:"mime_type",mime:e,...ie(t)})}a(ai,"_mime");function zr(e){return new Wg({check:"overwrite",tx:e})}a(zr,"_overwrite");function si(e){return zr(t=>t.normalize(e))}a(si,"_normalize");function ci(){return zr(e=>e.trim())}a(ci,"_trim");function ui(){return zr(e=>e.toLowerCase())}a(ui,"_toLowerCase");function li(){return zr(e=>e.toUpperCase())}a(li,"_toUpperCase");function da(){return zr(e=>Xh(e))}a(da,"_slugify");function Gy(e,t,n){return new e({type:"array",element:t,...ie(n)})}a(Gy,"_array");function Aj(e,t,n){return new e({type:"union",options:t,...ie(n)})}a(Aj,"_union");function Rj(e,t,n){return new e({type:"union",options:t,inclusive:!1,...ie(n)})}a(Rj,"_xor");function Dj(e,t,n,o){return new e({type:"union",options:n,discriminator:t,...ie(o)})}a(Dj,"_discriminatedUnion");function Oj(e,t,n){return new e({type:"intersection",left:t,right:n})}a(Oj,"_intersection");function $j(e,t,n,o){let r=n instanceof Re,i=r?o:n,s=r?n:null;return new e({type:"tuple",items:t,rest:s,...ie(i)})}a($j,"_tuple");function Cj(e,t,n,o){return new e({type:"record",keyType:t,valueType:n,...ie(o)})}a(Cj,"_record");function Nj(e,t,n,o){return new e({type:"map",keyType:t,valueType:n,...ie(o)})}a(Nj,"_map");function kj(e,t,n){return new e({type:"set",valueType:t,...ie(n)})}a(kj,"_set");function zj(e,t,n){let o=Array.isArray(t)?Object.fromEntries(t.map(r=>[r,r])):t;return new e({type:"enum",entries:o,...ie(n)})}a(zj,"_enum");function Uj(e,t,n){return new e({type:"enum",entries:t,...ie(n)})}a(Uj,"_nativeEnum");function Mj(e,t,n){return new e({type:"literal",values:Array.isArray(t)?t:[t],...ie(n)})}a(Mj,"_literal");function _p(e,t){return new e({type:"file",...ie(t)})}a(_p,"_file");function Fj(e,t){return new e({type:"transform",transform:t})}a(Fj,"_transform");function Lj(e,t){return new e({type:"optional",innerType:t})}a(Lj,"_optional");function jj(e,t){return new e({type:"nullable",innerType:t})}a(jj,"_nullable");function qj(e,t,n){return new e({type:"default",innerType:t,get defaultValue(){return typeof n=="function"?n():Hl(n)}})}a(qj,"_default");function Bj(e,t,n){return new e({type:"nonoptional",innerType:t,...ie(n)})}a(Bj,"_nonoptional");function Vj(e,t){return new e({type:"success",innerType:t})}a(Vj,"_success");function Gj(e,t,n){return new e({type:"catch",innerType:t,catchValue:typeof n=="function"?n:()=>n})}a(Gj,"_catch");function Hj(e,t,n){return new e({type:"pipe",in:t,out:n})}a(Hj,"_pipe");function Zj(e,t){return new e({type:"readonly",innerType:t})}a(Zj,"_readonly");function Wj(e,t,n){return new e({type:"template_literal",parts:t,...ie(n)})}a(Wj,"_templateLiteral");function Kj(e,t){return new e({type:"lazy",getter:t})}a(Kj,"_lazy");function Jj(e,t){return new e({type:"promise",innerType:t})}a(Jj,"_promise");function Bc(e,t,n){let o=ie(n);return o.abort??(o.abort=!0),new e({type:"custom",check:"custom",fn:t,...o})}a(Bc,"_custom");function Vc(e,t,n){return new e({type:"custom",check:"custom",fn:t,...ie(n)})}a(Vc,"_refine");function Pp(e){let t=ZS(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(Pp,"_superRefine");function ZS(e,t){let n=new at({check:"custom",...ie(t)});return n._zod.check=e,n}a(ZS,"_check");function wp(e){let t=new at({check:"describe"});return t._zod.onattach=[n=>{let o=kt.get(n)??{};kt.add(n,{...o,description:e})}],t._zod.check=()=>{},t}a(wp,"describe");function bp(e){let t=new at({check:"meta"});return t._zod.onattach=[n=>{let o=kt.get(n)??{};kt.add(n,{...o,...e})}],t._zod.check=()=>{},t}a(bp,"meta");function Tp(e,t){let n=ie(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(P=>typeof P=="string"?P.toLowerCase():P),r=r.map(P=>typeof P=="string"?P.toLowerCase():P));let i=new Set(o),s=new Set(r),u=e.Codec??sa,h=e.Boolean??Yo,g=e.String??Mn,y=new g({type:"string",error:n.error}),T=new h({type:"boolean",error:n.error}),b=new u({type:"pipe",in:y,out:T,transform:a(((P,S)=>{let R=P;return n.case!=="sensitive"&&(R=R.toLowerCase()),i.has(R)?!0:s.has(R)?!1:(S.issues.push({code:"invalid_value",expected:"stringbool",values:[...i,...s],input:S.value,inst:b,continue:!1}),{})}),"transform"),reverseTransform:a(((P,S)=>P===!0?o[0]||"true":r[0]||"false"),"reverseTransform"),error:n.error});return b}a(Tp,"_stringbool");function di(e,t,n,o={}){let r=ie(o),i={...ie(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(di,"_stringFormat");function _o(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??kt,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(_o,"initializeContext");function rt(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 y={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,s.schema,y);else{let b=s.schema,P=t.processors[r.type];if(!P)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${r.type}`);P(e,t,b,y)}let T=e._zod.parent;T&&(s.ref||(s.ref=T),rt(T,t,y),t.seen.get(T).isParent=!0)}let h=t.metadataRegistry.get(e);return h&&Object.assign(s.schema,h),t.io==="input"&&Jt(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(rt,"process");function Po(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 h=o.get(u);if(h&&h!==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 T=e.external.registry.get(s[0])?.id,b=e.external.uri??(S=>S);if(T)return{ref:b(T)};let P=s[1].defId??s[1].schema.id??`schema${e.counter++}`;return s[1].defId=P,{defId:P,ref:`${b("__shared")}#/${u}/${P}`}}if(s[1]===n)return{ref:"#"};let g=`#/${u}/`,y=s[1].schema.id??`__schema${e.counter++}`;return{defId:y,ref:g+y}},"makeURI"),i=a(s=>{if(s[1].schema.$ref)return;let u=s[1],{ref:h,defId:g}=r(s);u.def={...u.schema},g&&(u.defId=g);let y=u.schema;for(let T in y)delete y[T];y.$ref=h},"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>
106
106
 
107
- 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 g=e.external.registry.get(s[0])?.id;if(t!==s[0]&&g){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(Po,"extractDefs");function wo(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 h=u.def??u.schema,g={...h},y=u.ref;if(u.ref=null,y){o(y);let b=e.seen.get(y),P=b.schema;if(P.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(h.allOf=h.allOf??[],h.allOf.push(P)):Object.assign(h,P),Object.assign(h,g),s._zod.parent===y)for(let R in h)R==="$ref"||R==="allOf"||R in g||delete h[R];if(P.$ref&&b.def)for(let R in h)R==="$ref"||R==="allOf"||R in b.def&&JSON.stringify(h[R])===JSON.stringify(b.def[R])&&delete h[R]}let T=s._zod.parent;if(T&&T!==y){o(T);let b=e.seen.get(T);if(b?.schema.$ref&&(h.$ref=b.schema.$ref,b.def))for(let P in h)P==="$ref"||P==="allOf"||P in b.def&&JSON.stringify(h[P])===JSON.stringify(b.def[P])&&delete h[P]}e.override({zodSchema:s,jsonSchema:h,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:pa(t,"input",e.processors),output:pa(t,"output",e.processors)}},enumerable:!1,writable:!1}),s}catch{throw new Error("Error converting schema to JSON.")}}a(wo,"finalize");function Jt(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 Jt(o.element,n);if(o.type==="set")return Jt(o.valueType,n);if(o.type==="lazy")return Jt(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 Jt(o.innerType,n);if(o.type==="intersection")return Jt(o.left,n)||Jt(o.right,n);if(o.type==="record"||o.type==="map")return Jt(o.keyType,n)||Jt(o.valueType,n);if(o.type==="pipe")return Jt(o.in,n)||Jt(o.out,n);if(o.type==="object"){for(let r in o.shape)if(Jt(o.shape[r],n))return!0;return!1}if(o.type==="union"){for(let r of o.options)if(Jt(r,n))return!0;return!1}if(o.type==="tuple"){for(let r of o.items)if(Jt(r,n))return!0;return!!(o.rest&&Jt(o.rest,n))}return!1}a(Jt,"isTransforming");var Hy=a((e,t={})=>n=>{let o=_o({...n,processors:t});return rt(e,o),Po(o,e),wo(o,e)},"createToJSONSchemaMethod"),pa=a((e,t,n={})=>o=>{let{libraryOptions:r,target:i}=o??{},s=_o({...r??{},target:i,io:t,processors:n});return rt(e,s),Po(s,e),wo(s,e)},"createStandardJSONSchemaMethod");var Xj={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Zy=a((e,t,n,o)=>{let r=n;r.type="string";let{minimum:i,maximum:s,format:u,patterns:h,contentEncoding:g}=e._zod.bag;if(typeof i=="number"&&(r.minLength=i),typeof s=="number"&&(r.maxLength=s),u&&(r.format=Xj[u]??u,r.format===""&&delete r.format,u==="time"&&delete r.format),g&&(r.contentEncoding=g),h&&h.size>0){let y=[...h];y.length===1?r.pattern=y[0].source:y.length>1&&(r.allOf=[...y.map(T=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:T.source}))])}},"stringProcessor"),Wy=a((e,t,n,o)=>{let r=n,{minimum:i,maximum:s,format:u,multipleOf:h,exclusiveMaximum:g,exclusiveMinimum:y}=e._zod.bag;typeof u=="string"&&u.includes("int")?r.type="integer":r.type="number",typeof y=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(r.minimum=y,r.exclusiveMinimum=!0):r.exclusiveMinimum=y),typeof i=="number"&&(r.minimum=i,typeof y=="number"&&t.target!=="draft-04"&&(y>=i?delete r.minimum:delete r.exclusiveMinimum)),typeof g=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(r.maximum=g,r.exclusiveMaximum=!0):r.exclusiveMaximum=g),typeof s=="number"&&(r.maximum=s,typeof g=="number"&&t.target!=="draft-04"&&(g<=s?delete r.maximum:delete r.exclusiveMaximum)),typeof h=="number"&&(r.multipleOf=h)},"numberProcessor"),Ky=a((e,t,n,o)=>{n.type="boolean"},"booleanProcessor"),Jy=a((e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},"bigintProcessor"),Xy=a((e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},"symbolProcessor"),Yy=a((e,t,n,o)=>{t.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},"nullProcessor"),Qy=a((e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},"undefinedProcessor"),ev=a((e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},"voidProcessor"),tv=a((e,t,n,o)=>{n.not={}},"neverProcessor"),rv=a((e,t,n,o)=>{},"anyProcessor"),nv=a((e,t,n,o)=>{},"unknownProcessor"),ov=a((e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},"dateProcessor"),iv=a((e,t,n,o)=>{let r=e._zod.def,i=bs(r.entries);i.every(s=>typeof s=="number")&&(n.type="number"),i.every(s=>typeof s=="string")&&(n.type="string"),n.enum=i},"enumProcessor"),av=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"),sv=a((e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},"nanProcessor"),cv=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"),uv=a((e,t,n,o)=>{let r=n,i={type:"string",format:"binary",contentEncoding:"binary"},{minimum:s,maximum:u,mime:h}=e._zod.bag;s!==void 0&&(i.minLength=s),u!==void 0&&(i.maxLength=u),h?h.length===1?(i.contentMediaType=h[0],Object.assign(r,i)):(Object.assign(r,i),r.anyOf=h.map(g=>({contentMediaType:g}))):Object.assign(r,i)},"fileProcessor"),lv=a((e,t,n,o)=>{n.type="boolean"},"successProcessor"),dv=a((e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},"customProcessor"),pv=a((e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},"functionProcessor"),fv=a((e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},"transformProcessor"),mv=a((e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},"mapProcessor"),hv=a((e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},"setProcessor"),gv=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=rt(i.element,t,{...o,path:[...o.path,"items"]})},"arrayProcessor"),yv=a((e,t,n,o)=>{let r=n,i=e._zod.def;r.type="object",r.properties={};let s=i.shape;for(let g in s)r.properties[g]=rt(s[g],t,{...o,path:[...o.path,"properties",g]});let u=new Set(Object.keys(s)),h=new Set([...u].filter(g=>{let y=i.shape[g]._zod;return t.io==="input"?y.optin===void 0:y.optout===void 0}));h.size>0&&(r.required=Array.from(h)),i.catchall?._zod.def.type==="never"?r.additionalProperties=!1:i.catchall?i.catchall&&(r.additionalProperties=rt(i.catchall,t,{...o,path:[...o.path,"additionalProperties"]})):t.io==="output"&&(r.additionalProperties=!1)},"objectProcessor"),Sp=a((e,t,n,o)=>{let r=e._zod.def,i=r.inclusive===!1,s=r.options.map((u,h)=>rt(u,t,{...o,path:[...o.path,i?"oneOf":"anyOf",h]}));i?n.oneOf=s:n.anyOf=s},"unionProcessor"),vv=a((e,t,n,o)=>{let r=e._zod.def,i=rt(r.left,t,{...o,path:[...o.path,"allOf",0]}),s=rt(r.right,t,{...o,path:[...o.path,"allOf",1]}),u=a(g=>"allOf"in g&&Object.keys(g).length===1,"isSimpleIntersection"),h=[...u(i)?i.allOf:[i],...u(s)?s.allOf:[s]];n.allOf=h},"intersectionProcessor"),_v=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",h=i.items.map((b,P)=>rt(b,t,{...o,path:[...o.path,s,P]})),g=i.rest?rt(i.rest,t,{...o,path:[...o.path,u,...t.target==="openapi-3.0"?[i.items.length]:[]]}):null;t.target==="draft-2020-12"?(r.prefixItems=h,g&&(r.items=g)):t.target==="openapi-3.0"?(r.items={anyOf:h},g&&r.items.anyOf.push(g),r.minItems=h.length,g||(r.maxItems=h.length)):(r.items=h,g&&(r.additionalItems=g));let{minimum:y,maximum:T}=e._zod.bag;typeof y=="number"&&(r.minItems=y),typeof T=="number"&&(r.maxItems=T)},"tupleProcessor"),Pv=a((e,t,n,o)=>{let r=n,i=e._zod.def;r.type="object";let s=i.keyType,h=s._zod.bag?.patterns;if(i.mode==="loose"&&h&&h.size>0){let y=rt(i.valueType,t,{...o,path:[...o.path,"patternProperties","*"]});r.patternProperties={};for(let T of h)r.patternProperties[T.source]=y}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(r.propertyNames=rt(i.keyType,t,{...o,path:[...o.path,"propertyNames"]})),r.additionalProperties=rt(i.valueType,t,{...o,path:[...o.path,"additionalProperties"]});let g=s._zod.values;if(g){let y=[...g].filter(T=>typeof T=="string"||typeof T=="number");y.length>0&&(r.required=y)}},"recordProcessor"),wv=a((e,t,n,o)=>{let r=e._zod.def,i=rt(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"),bv=a((e,t,n,o)=>{let r=e._zod.def;rt(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType},"nonoptionalProcessor"),Tv=a((e,t,n,o)=>{let r=e._zod.def;rt(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType,n.default=JSON.parse(JSON.stringify(r.defaultValue))},"defaultProcessor"),Ev=a((e,t,n,o)=>{let r=e._zod.def;rt(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"),Sv=a((e,t,n,o)=>{let r=e._zod.def;rt(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"),xv=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;rt(i,t,o);let s=t.seen.get(e);s.ref=i},"pipeProcessor"),Iv=a((e,t,n,o)=>{let r=e._zod.def;rt(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType,n.readOnly=!0},"readonlyProcessor"),Av=a((e,t,n,o)=>{let r=e._zod.def;rt(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType},"promiseProcessor"),xp=a((e,t,n,o)=>{let r=e._zod.def;rt(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType},"optionalProcessor"),Rv=a((e,t,n,o)=>{let r=e._zod.innerType;rt(r,t,o);let i=t.seen.get(e);i.ref=r},"lazyProcessor"),Ep={string:Zy,number:Wy,boolean:Ky,bigint:Jy,symbol:Xy,null:Yy,undefined:Qy,void:ev,never:tv,any:rv,unknown:nv,date:ov,enum:iv,literal:av,nan:sv,template_literal:cv,file:uv,success:lv,custom:dv,function:pv,transform:fv,map:mv,set:hv,array:gv,object:yv,union:Sp,intersection:vv,tuple:_v,record:Pv,nullable:wv,nonoptional:bv,default:Tv,prefault:Ev,catch:Sv,pipe:xv,readonly:Iv,promise:Av,optional:xp,lazy:Rv};function Gc(e,t){if("_idmap"in e){let o=e,r=_o({...t,processors:Ep}),i={};for(let h of o._idmap.entries()){let[g,y]=h;rt(y,r)}let s={},u={registry:o,uri:t?.uri,defs:i};r.external=u;for(let h of o._idmap.entries()){let[g,y]=h;Po(r,y),s[g]=wo(r,y)}if(Object.keys(i).length>0){let h=r.target==="draft-2020-12"?"$defs":"definitions";s.__shared={[h]:i}}return{schemas:s}}let n=_o({...t,processors:Ep});return rt(e,n),Po(n,e),wo(n,e)}a(Gc,"toJSONSchema");var Ip=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=_o({processors:Ep,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 rt(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)),Po(this.ctx,t);let o=wo(this.ctx,t),{"~standard":r,...i}=o;return i}};var WS={};var xt=N("ZodMiniType",(e,t)=>{if(!e._zod)throw new Error("Uninitialized schema in ZodMiniType.");Re.init(e,t),e.def=t,e.type=t.type,e.parse=(n,o)=>Ko(e,n,o,{callee:e.parse}),e.safeParse=(n,o)=>ea(e,n,o),e.parseAsync=async(n,o)=>Jo(e,n,o,{callee:e.parseAsync}),e.safeParseAsync=async(n,o)=>ra(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)=>Nt(e,n,o),e.brand=()=>e,e.register=((n,o)=>(n.add(e,o),e)),e.apply=n=>n(e)}),Ap=N("ZodMiniString",(e,t)=>{Mn.init(e,t),xt.init(e,t)});function x(e){return rc(Ap,e)}a(x,"string");var fa=N("ZodMiniStringFormat",(e,t)=>{tt.init(e,t),Ap.init(e,t)});var eq=N("ZodMiniURL",(e,t)=>{Os.init(e,t),fa.init(e,t)});function KS(e){return ei(eq,e)}a(KS,"url");var Rp=N("ZodMiniNumber",(e,t)=>{oa.init(e,t),xt.init(e,t)});function zt(e){return Ac(Rp,e)}a(zt,"number");var tq=N("ZodMiniNumberFormat",(e,t)=>{zs.init(e,t),Rp.init(e,t)});function JS(e){return Dc(tq,e)}a(JS,"int");var Dv=N("ZodMiniBoolean",(e,t)=>{Yo.init(e,t),xt.init(e,t)});function Je(e){return Oc(Dv,e)}a(Je,"boolean");var XS=N("ZodMiniBigInt",(e,t)=>{ia.init(e,t),xt.init(e,t)});var rq=N("ZodMiniAny",(e,t)=>{Us.init(e,t),xt.init(e,t)});function Hc(){return Nc(rq)}a(Hc,"any");var nq=N("ZodMiniUnknown",(e,t)=>{Ms.init(e,t),xt.init(e,t)});function $e(){return kc(nq)}a($e,"unknown");var oq=N("ZodMiniVoid",(e,t)=>{Fs.init(e,t),xt.init(e,t)});function YS(e){return zc(oq,e)}a(YS,"_void");var QS=N("ZodMiniDate",(e,t)=>{Ls.init(e,t),xt.init(e,t)});var iq=N("ZodMiniArray",(e,t)=>{js.init(e,t),xt.init(e,t)});function Ae(e,t){return new iq({type:"array",element:e,...ie(t)})}a(Ae,"array");var aq=N("ZodMiniObject",(e,t)=>{Ud.init(e,t),xt.init(e,t),Le(e,"shape",()=>t.shape)});function M(e,t){let n={type:"object",shape:e??{},...ie(t)};return new aq(n)}a(M,"object");var sq=N("ZodMiniUnion",(e,t)=>{Qo.init(e,t),xt.init(e,t)});function je(e,t){return new sq({type:"union",options:e,...ie(t)})}a(je,"union");var cq=N("ZodMiniDiscriminatedUnion",(e,t)=>{qs.init(e,t),xt.init(e,t)});function bo(e,t,n){return new cq({type:"union",options:t,discriminator:e,...ie(n)})}a(bo,"discriminatedUnion");var uq=N("ZodMiniRecord",(e,t)=>{Vs.init(e,t),xt.init(e,t)});function Ce(e,t,n){return new uq({type:"record",keyType:e,valueType:t,...ie(n)})}a(Ce,"record");var lq=N("ZodMiniEnum",(e,t)=>{Gs.init(e,t),xt.init(e,t),e.options=Object.values(t.entries)});function xe(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(o=>[o,o])):e;return new lq({type:"enum",entries:n,...ie(t)})}a(xe,"_enum");var dq=N("ZodMiniLiteral",(e,t)=>{Hs.init(e,t),xt.init(e,t)});function Ee(e,t){return new dq({type:"literal",values:Array.isArray(e)?e:[e],...ie(t)})}a(Ee,"literal");var pq=N("ZodMiniTransform",(e,t)=>{Zs.init(e,t),xt.init(e,t)});function To(e){return new pq({type:"transform",transform:e})}a(To,"transform");var fq=N("ZodMiniOptional",(e,t)=>{aa.init(e,t),xt.init(e,t)});function W(e){return new fq({type:"optional",innerType:e})}a(W,"optional");var mq=N("ZodMiniNullable",(e,t)=>{Ws.init(e,t),xt.init(e,t)});function Zc(e){return new mq({type:"nullable",innerType:e})}a(Zc,"nullable");var hq=N("ZodMiniPipe",(e,t)=>{Ks.init(e,t),xt.init(e,t)});function Eo(e,t){return new hq({type:"pipe",in:e,out:t})}a(Eo,"pipe");var ex=N("ZodMiniCustom",(e,t)=>{Js.init(e,t),xt.init(e,t)});function Dp(e,t){return Bc(ex,e??(()=>!0),t)}a(Dp,"custom");function Ov(e,t={}){return Vc(ex,e,t)}a(Ov,"refine");var Op={};nr(Op,{ZodMiniISODate:()=>Cv,ZodMiniISODateTime:()=>$v,ZodMiniISODuration:()=>kv,ZodMiniISOTime:()=>Nv,date:()=>yq,datetime:()=>gq,duration:()=>_q,time:()=>vq});var $v=N("ZodMiniISODateTime",(e,t)=>{$s.init(e,t),fa.init(e,t)});function gq(e){return Ec($v,e)}a(gq,"datetime");var Cv=N("ZodMiniISODate",(e,t)=>{Cs.init(e,t),fa.init(e,t)});function yq(e){return Sc(Cv,e)}a(yq,"date");var Nv=N("ZodMiniISOTime",(e,t)=>{Ns.init(e,t),fa.init(e,t)});function vq(e){return xc(Nv,e)}a(vq,"time");var kv=N("ZodMiniISODuration",(e,t)=>{ks.init(e,t),fa.init(e,t)});function _q(e){return Ic(kv,e)}a(_q,"duration");var Wc={};nr(Wc,{bigint:()=>Tq,boolean:()=>bq,date:()=>Eq,number:()=>wq,string:()=>Pq});function Pq(e){return nc(Ap,e)}a(Pq,"string");function wq(e){return Rc(Rp,e)}a(wq,"number");function bq(e){return $c(Dv,e)}a(bq,"boolean");function Tq(e){return Cc(XS,e)}a(Tq,"bigint");function Eq(e){return Uc(QS,e)}a(Eq,"date");var Uv=M({retryOnFailure:M({defaultValue:W(Je()),hide:W(Je())}),continueOnFailure:M({defaultValue:W(Je()),hide:W(Je())})}),zv=class{constructor(t,n,o,r,i,s,u,h,g,y,T,b,P){this.name=t;this.displayName=n;this.description=o;this.props=r;this.propertyGroups=i;this.run=s;this.test=u;this.requireAuth=h;this.errorHandlingOptions=g;this.outputSchema=y;this.audience=T;this.aiMetadata=b;this.classification=P}static{a(this,"IAction")}},re=a(e=>new zv(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 We=M({displayName:x(),description:W(x()),advanced:W(Je()),width:W(xe(["half","full"])),icon:W(x()),placeholder:W(x())}),ke=a((e,t)=>M({type:Ee(t),required:Je(),defaultValue:W(Hc())}),"TPropertyValue");var _r=M({...We.shape,...ke(x(),"SHORT_TEXT").shape}),jn=M({...We.shape,...ke(x(),"LONG_TEXT").shape});var rx=M({label:x(),value:$e(),description:W(x()),icon:W(x())}),$p=M({disabled:W(Je()),placeholder:W(x()),options:Ae(rx)});var xq=xe(["cards"]),Pr=M({...We.shape,options:$p,display:W(xq),...ke($e(),"STATIC_DROPDOWN").shape}),qn=M({...We.shape,options:$p,...ke(Ae($e()),"STATIC_MULTI_SELECT_DROPDOWN").shape});var Mv=M({...We.shape,...ke($e(),"DROPDOWN").shape,refreshers:Ae(x())}),Kc=M({...We.shape,...ke(Ae($e()),"MULTI_SELECT_DROPDOWN").shape,refreshers:Ae(x())});var Bn=M({...We.shape,reveals:W(Ae(x())),...ke(Je(),"CHECKBOX").shape});var Vn=M({...We.shape,display:W(xe(["stepper"])),min:W(zt()),max:W(zt()),step:W(zt()),...ke(zt(),"NUMBER").shape});var Jc=M({...We.shape,streaming:W(Je()),...ke($e(),"FILE").shape});var Xc=M({...We.shape,...ke(x(),"DATE_TIME").shape});var nx=Ce(x(),je([_r,jn,Pr,Kc,qn,Bn,Vn,Jc,Xc])),Yc=M({...We.shape,properties:nx,...ke(Ae($e()),"ARRAY").shape});var ox=xe(["any_time","last_24_hours","last_7_days","last_30_days","last_90_days","this_month","custom"]),ix=M({preset:W(ox),after:W(x()),before:W(x())}),Fv=M({...We.shape,display:W(xe(["dropdown"])),...ke(ix,"DATE_RANGE").shape});var Qc=M({...We.shape,...ke(je([Ce(x(),$e())]),"JSON").shape});var ax=je([_r,Pr,Qc,Yc,qn]),Iq=Ce(x(),ax),Lv=M({refreshers:Ae(x()),...We.shape,...ke($e(),"DYNAMIC").shape});var Cp=M({...We.shape,...ke(YS(),"MARKDOWN").shape});var eu=(n=>(n.ARCHIVE="ARCHIVE",n.REGISTRY="REGISTRY",n))(eu||{}),ma=(n=>(n.CUSTOM="CUSTOM",n.OFFICIAL="OFFICIAL",n))(ma||{}),ha=(l=>(l.ARTIFICIAL_INTELLIGENCE="ARTIFICIAL_INTELLIGENCE",l.COMMUNICATION="COMMUNICATION",l.COMMERCE="COMMERCE",l.CORE="CORE",l.UNIVERSAL_AI="UNIVERSAL_AI",l.FLOW_CONTROL="FLOW_CONTROL",l.BUSINESS_INTELLIGENCE="BUSINESS_INTELLIGENCE",l.ACCOUNTING="ACCOUNTING",l.PRODUCTIVITY="PRODUCTIVITY",l.CONTENT_AND_FILES="CONTENT_AND_FILES",l.DEVELOPER_TOOLS="DEVELOPER_TOOLS",l.CUSTOMER_SUPPORT="CUSTOMER_SUPPORT",l.FORMS_AND_SURVEYS="FORMS_AND_SURVEYS",l.HUMAN_RESOURCES="HUMAN_RESOURCES",l.PAYMENT_PROCESSING="PAYMENT_PROCESSING",l.MARKETING="MARKETING",l.SALES_AND_CRM="SALES_AND_CRM",l))(ha||{});var tu=(n=>(n.AUTHORIZATION_CODE="authorization_code",n.CLIENT_CREDENTIALS="client_credentials",n))(tu||{}),jv="both_client_credentials_and_authorization_code";var pn=(r=>(r.POLLING="POLLING",r.WEBHOOK="WEBHOOK",r.APP_WEBHOOK="APP_WEBHOOK",r.MANUAL="MANUAL",r))(pn||{}),ru=(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))(ru||{}),Aq=M({strategy:xe(ru),paramName:W(x())}),nu=(n=>(n.SIMULATION="SIMULATION",n.TEST_FUNCTION="TEST_FUNCTION",n))(nu||{});var Np=(n=>(n.WEBSOCKET="WEBSOCKET",n.NONE="NONE",n))(Np||{}),sx=M({status:W(zt()),body:W($e()),headers:W(Ce(x(),x()))}),cx=M({type:Ee("DELAY"),resumeDateTime:x(),requestIdToReply:W(x()),handlerId:W(x()),streamStepProgress:W(xe(Np))}),ux=M({type:Ee("WEBHOOK"),requestId:x(),requestIdToReply:W(x()),response:sx,handlerId:W(x()),streamStepProgress:W(xe(Np))}),Rq=je([cx,ux]);var Dq=M({body:$e(),rawBody:W($e()),headers:Ce(x(),x()),queryParams:Ce(x(),x())});function yt(e){return e==null}a(yt,"isNil");function ou(e){return e==null?!0:typeof e=="string"||Array.isArray(e)?e.length===0:typeof e=="object"?Object.keys(e).length===0:!1}a(ou,"isEmpty");function qv(e,t){let n=[];for(let o=0;o<e.length;o+=t)n.push(e.slice(o,o+t));return n}a(qv,"chunk");function kp(e,t){if(e==null)throw new Error(`${t} is null or undefined`)}a(kp,"assertNotNullOrUndefined");async function Vv(e){try{return{data:await e(),error:null}}catch(t){return{data:null,error:t}}}a(Vv,"tryCatch");function Gv(e){try{return{data:e(),error:null}}catch(t){return{data:null,error:t}}}a(Gv,"tryCatchSync");var Hv=he(require("crypto"),1);var Oq=128,So,ga,$q=a(e=>{if(e<0)throw new RangeError("Wrong ID size");try{!So||So.length<e?(So=Buffer.allocUnsafe(e*Oq),Hv.default.randomFillSync(So),ga=0):ga+e>So.length&&(Hv.default.randomFillSync(So),ga=0)}catch(t){throw So=void 0,t}ga+=e},"fillPool"),Cq=a(e=>($q(e|=0),So.subarray(ga-e,ga)),"random"),Nq=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),h=r;for(;h--;)if(s+=e[u[h]&o]||"",s.length===i)return s}}},"customRandom"),lx=a((e,t=21)=>Nq(e,t,Cq),"customAlphabet");var kq="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",dx=21,r7=x().check(jt(new RegExp(`^[0-9a-zA-Z]{${dx}}$`))),zq=lx(kq,dx);var xo=Eo(To(e=>e instanceof Date?e.toISOString():e),x()),Ur={id:x(),created:xo,updated:xo},vt=a(e=>W(Zc(e)),"Nullable");function Zv(e){return W(Zc(xe(e)))}a(Zv,"NullableEnum");var i7=Eo(To(e=>e==="true"||e===!0?!0:e==="false"||e===!1?!1:void 0),W(Je())),a7=W(Op.datetime({offset:!0}).check(Ov(e=>e.slice(0,4)!=="0000"))),zp=a(e=>Eo(To(t=>Array.isArray(t)?t:t!==void 0?[t]:void 0),W(Ae(e))),"OptionalArrayFromQuery");var u7=Ce(x(),$e());var Io=(l=>(l.OPENAI="openai",l.OPENROUTER="openrouter",l.ANTHROPIC="anthropic",l.AZURE="azure",l.GOOGLE="google",l.ACTIVEPIECES="activepieces",l.CLOUDFLARE_GATEWAY="cloudflare-gateway",l.CUSTOM="custom",l.BEDROCK="bedrock",l.VERTEX="vertex",l.MISTRAL="mistral",l.XAI="xai",l.DEEPSEEK="deepseek",l.ZAI="zai",l.QWEN="qwen",l.MINIMAX="minimax",l.MOONSHOT="moonshot",l))(Io||{});var fe={};nr(fe,{$brand:()=>Ps,$input:()=>np,$output:()=>rp,NEVER:()=>Bl,TimePrecision:()=>ip,ZodAny:()=>y_,ZodArray:()=>w_,ZodBase64:()=>nf,ZodBase64URL:()=>of,ZodBigInt:()=>Ta,ZodBigIntFormat:()=>cf,ZodBoolean:()=>ba,ZodCIDRv4:()=>tf,ZodCIDRv6:()=>rf,ZodCUID:()=>Wp,ZodCUID2:()=>Kp,ZodCatch:()=>B_,ZodCodec:()=>gf,ZodCustom:()=>gu,ZodCustomStringFormat:()=>Pa,ZodDate:()=>du,ZodDefault:()=>U_,ZodDiscriminatedUnion:()=>T_,ZodE164:()=>af,ZodEmail:()=>Gp,ZodEmoji:()=>Hp,ZodEnum:()=>va,ZodError:()=>Uq,ZodExactOptional:()=>N_,ZodFile:()=>$_,ZodFirstPartyTypeKind:()=>tP,ZodFunction:()=>Y_,ZodGUID:()=>au,ZodIPv4:()=>Qp,ZodIPv6:()=>ef,ZodISODate:()=>Fp,ZodISODateTime:()=>Mp,ZodISODuration:()=>jp,ZodISOTime:()=>Lp,ZodIntersection:()=>E_,ZodIssueCode:()=>Fq,ZodJWT:()=>sf,ZodKSUID:()=>Yp,ZodLazy:()=>K_,ZodLiteral:()=>O_,ZodMAC:()=>l_,ZodMap:()=>R_,ZodNaN:()=>G_,ZodNanoID:()=>Zp,ZodNever:()=>__,ZodNonOptional:()=>mf,ZodNull:()=>h_,ZodNullable:()=>z_,ZodNumber:()=>wa,ZodNumberFormat:()=>fi,ZodObject:()=>fu,ZodOptional:()=>ff,ZodPipe:()=>hf,ZodPrefault:()=>F_,ZodPromise:()=>X_,ZodReadonly:()=>H_,ZodRealError:()=>sr,ZodRecord:()=>hu,ZodSet:()=>D_,ZodString:()=>_a,ZodStringFormat:()=>st,ZodSuccess:()=>q_,ZodSymbol:()=>f_,ZodTemplateLiteral:()=>W_,ZodTransform:()=>C_,ZodTuple:()=>x_,ZodType:()=>qe,ZodULID:()=>Jp,ZodURL:()=>lu,ZodUUID:()=>fn,ZodUndefined:()=>m_,ZodUnion:()=>mu,ZodUnknown:()=>v_,ZodVoid:()=>P_,ZodXID:()=>Xp,ZodXor:()=>b_,_ZodString:()=>Vp,_default:()=>M_,_function:()=>vI,any:()=>Jx,array:()=>pu,base64:()=>Cx,base64url:()=>Nx,bigint:()=>Gx,boolean:()=>p_,catch:()=>V_,check:()=>_I,cidrv4:()=>Ox,cidrv6:()=>$x,clone:()=>Nt,codec:()=>hI,coerce:()=>rP,config:()=>gt,core:()=>vr,cuid:()=>Tx,cuid2:()=>Ex,custom:()=>PI,date:()=>Yx,decode:()=>n_,decodeAsync:()=>i_,describe:()=>wI,discriminatedUnion:()=>oI,e164:()=>kx,email:()=>fx,emoji:()=>wx,encode:()=>r_,encodeAsync:()=>o_,endsWith:()=>ii,enum:()=>df,exactOptional:()=>k_,file:()=>dI,flattenError:()=>Ki,float32:()=>jx,float64:()=>qx,formatError:()=>Ji,fromJSONSchema:()=>AI,function:()=>vI,getErrorMap:()=>jq,globalRegistry:()=>kt,gt:()=>Xr,gte:()=>Dt,guid:()=>mx,hash:()=>Lx,hex:()=>Fx,hostname:()=>Mx,httpUrl:()=>Px,includes:()=>ni,instanceof:()=>TI,int:()=>Bp,int32:()=>Bx,int64:()=>Hx,intersection:()=>S_,ipv4:()=>Ax,ipv6:()=>Dx,iso:()=>ya,json:()=>SI,jwt:()=>zx,keyof:()=>Qx,ksuid:()=>Ix,lazy:()=>J_,length:()=>vo,literal:()=>lI,locales:()=>ua,looseObject:()=>rI,looseRecord:()=>aI,lowercase:()=>ti,lt:()=>Jr,lte:()=>Kt,mac:()=>Rx,map:()=>sI,maxLength:()=>yo,maxSize:()=>Ln,meta:()=>bI,mime:()=>ai,minLength:()=>Et,minSize:()=>Yr,multipleOf:()=>Fn,nan:()=>mI,nanoid:()=>bx,nativeEnum:()=>uI,negative:()=>Fc,never:()=>uf,nonnegative:()=>jc,nonoptional:()=>j_,nonpositive:()=>Lc,normalize:()=>si,null:()=>g_,nullable:()=>cu,nullish:()=>pI,number:()=>d_,object:()=>eI,optional:()=>su,overwrite:()=>zr,parse:()=>Yv,parseAsync:()=>Qv,partialRecord:()=>iI,pipe:()=>uu,positive:()=>Mc,prefault:()=>L_,preprocess:()=>xI,prettifyError:()=>Wl,promise:()=>yI,property:()=>qc,readonly:()=>Z_,record:()=>A_,refine:()=>Q_,regex:()=>jt,regexes:()=>ar,registry:()=>tc,safeDecode:()=>s_,safeDecodeAsync:()=>u_,safeEncode:()=>a_,safeEncodeAsync:()=>c_,safeParse:()=>e_,safeParseAsync:()=>t_,set:()=>cI,setErrorMap:()=>Lq,size:()=>go,slugify:()=>da,startsWith:()=>oi,strictObject:()=>tI,string:()=>qp,stringFormat:()=>Ux,stringbool:()=>EI,success:()=>fI,superRefine:()=>eP,symbol:()=>Wx,templateLiteral:()=>gI,toJSONSchema:()=>Gc,toLowerCase:()=>ui,toUpperCase:()=>li,transform:()=>pf,treeifyError:()=>Zl,trim:()=>ci,tuple:()=>I_,uint32:()=>Vx,uint64:()=>Zx,ulid:()=>Sx,undefined:()=>Kx,union:()=>lf,unknown:()=>pi,uppercase:()=>ri,url:()=>_x,util:()=>ce,uuid:()=>hx,uuidv4:()=>gx,uuidv6:()=>yx,uuidv7:()=>vx,void:()=>Xx,xid:()=>xx,xor:()=>nI});var iu={};nr(iu,{ZodAny:()=>y_,ZodArray:()=>w_,ZodBase64:()=>nf,ZodBase64URL:()=>of,ZodBigInt:()=>Ta,ZodBigIntFormat:()=>cf,ZodBoolean:()=>ba,ZodCIDRv4:()=>tf,ZodCIDRv6:()=>rf,ZodCUID:()=>Wp,ZodCUID2:()=>Kp,ZodCatch:()=>B_,ZodCodec:()=>gf,ZodCustom:()=>gu,ZodCustomStringFormat:()=>Pa,ZodDate:()=>du,ZodDefault:()=>U_,ZodDiscriminatedUnion:()=>T_,ZodE164:()=>af,ZodEmail:()=>Gp,ZodEmoji:()=>Hp,ZodEnum:()=>va,ZodExactOptional:()=>N_,ZodFile:()=>$_,ZodFunction:()=>Y_,ZodGUID:()=>au,ZodIPv4:()=>Qp,ZodIPv6:()=>ef,ZodIntersection:()=>E_,ZodJWT:()=>sf,ZodKSUID:()=>Yp,ZodLazy:()=>K_,ZodLiteral:()=>O_,ZodMAC:()=>l_,ZodMap:()=>R_,ZodNaN:()=>G_,ZodNanoID:()=>Zp,ZodNever:()=>__,ZodNonOptional:()=>mf,ZodNull:()=>h_,ZodNullable:()=>z_,ZodNumber:()=>wa,ZodNumberFormat:()=>fi,ZodObject:()=>fu,ZodOptional:()=>ff,ZodPipe:()=>hf,ZodPrefault:()=>F_,ZodPromise:()=>X_,ZodReadonly:()=>H_,ZodRecord:()=>hu,ZodSet:()=>D_,ZodString:()=>_a,ZodStringFormat:()=>st,ZodSuccess:()=>q_,ZodSymbol:()=>f_,ZodTemplateLiteral:()=>W_,ZodTransform:()=>C_,ZodTuple:()=>x_,ZodType:()=>qe,ZodULID:()=>Jp,ZodURL:()=>lu,ZodUUID:()=>fn,ZodUndefined:()=>m_,ZodUnion:()=>mu,ZodUnknown:()=>v_,ZodVoid:()=>P_,ZodXID:()=>Xp,ZodXor:()=>b_,_ZodString:()=>Vp,_default:()=>M_,_function:()=>vI,any:()=>Jx,array:()=>pu,base64:()=>Cx,base64url:()=>Nx,bigint:()=>Gx,boolean:()=>p_,catch:()=>V_,check:()=>_I,cidrv4:()=>Ox,cidrv6:()=>$x,codec:()=>hI,cuid:()=>Tx,cuid2:()=>Ex,custom:()=>PI,date:()=>Yx,describe:()=>wI,discriminatedUnion:()=>oI,e164:()=>kx,email:()=>fx,emoji:()=>wx,enum:()=>df,exactOptional:()=>k_,file:()=>dI,float32:()=>jx,float64:()=>qx,function:()=>vI,guid:()=>mx,hash:()=>Lx,hex:()=>Fx,hostname:()=>Mx,httpUrl:()=>Px,instanceof:()=>TI,int:()=>Bp,int32:()=>Bx,int64:()=>Hx,intersection:()=>S_,ipv4:()=>Ax,ipv6:()=>Dx,json:()=>SI,jwt:()=>zx,keyof:()=>Qx,ksuid:()=>Ix,lazy:()=>J_,literal:()=>lI,looseObject:()=>rI,looseRecord:()=>aI,mac:()=>Rx,map:()=>sI,meta:()=>bI,nan:()=>mI,nanoid:()=>bx,nativeEnum:()=>uI,never:()=>uf,nonoptional:()=>j_,null:()=>g_,nullable:()=>cu,nullish:()=>pI,number:()=>d_,object:()=>eI,optional:()=>su,partialRecord:()=>iI,pipe:()=>uu,prefault:()=>L_,preprocess:()=>xI,promise:()=>yI,readonly:()=>Z_,record:()=>A_,refine:()=>Q_,set:()=>cI,strictObject:()=>tI,string:()=>qp,stringFormat:()=>Ux,stringbool:()=>EI,success:()=>fI,superRefine:()=>eP,symbol:()=>Wx,templateLiteral:()=>gI,transform:()=>pf,tuple:()=>I_,uint32:()=>Vx,uint64:()=>Zx,ulid:()=>Sx,undefined:()=>Kx,union:()=>lf,unknown:()=>pi,url:()=>_x,uuid:()=>hx,uuidv4:()=>gx,uuidv6:()=>yx,uuidv7:()=>vx,void:()=>Xx,xid:()=>xx,xor:()=>nI});var Up={};nr(Up,{endsWith:()=>ii,gt:()=>Xr,gte:()=>Dt,includes:()=>ni,length:()=>vo,lowercase:()=>ti,lt:()=>Jr,lte:()=>Kt,maxLength:()=>yo,maxSize:()=>Ln,mime:()=>ai,minLength:()=>Et,minSize:()=>Yr,multipleOf:()=>Fn,negative:()=>Fc,nonnegative:()=>jc,nonpositive:()=>Lc,normalize:()=>si,overwrite:()=>zr,positive:()=>Mc,property:()=>qc,regex:()=>jt,size:()=>go,slugify:()=>da,startsWith:()=>oi,toLowerCase:()=>ui,toUpperCase:()=>li,trim:()=>ci,uppercase:()=>ri});var ya={};nr(ya,{ZodISODate:()=>Fp,ZodISODateTime:()=>Mp,ZodISODuration:()=>jp,ZodISOTime:()=>Lp,date:()=>Kv,datetime:()=>Wv,duration:()=>Xv,time:()=>Jv});var Mp=N("ZodISODateTime",(e,t)=>{$s.init(e,t),st.init(e,t)});function Wv(e){return Ec(Mp,e)}a(Wv,"datetime");var Fp=N("ZodISODate",(e,t)=>{Cs.init(e,t),st.init(e,t)});function Kv(e){return Sc(Fp,e)}a(Kv,"date");var Lp=N("ZodISOTime",(e,t)=>{Ns.init(e,t),st.init(e,t)});function Jv(e){return xc(Lp,e)}a(Jv,"time");var jp=N("ZodISODuration",(e,t)=>{ks.init(e,t),st.init(e,t)});function Xv(e){return Ic(jp,e)}a(Xv,"duration");var px=a((e,t)=>{Is.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:a(n=>Ji(e,n),"value")},flatten:{value:a(n=>Ki(e,n),"value")},addIssue:{value:a(n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,Hi,2)},"value")},addIssues:{value:a(n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,Hi,2)},"value")},isEmpty:{get(){return e.issues.length===0}}})},"initializer"),Uq=N("ZodError",px),sr=N("ZodError",px,{Parent:Error});var Yv=Xi(sr),Qv=Yi(sr),e_=Qi(sr),t_=ta(sr),r_=Kl(sr),n_=Jl(sr),o_=Xl(sr),i_=Yl(sr),a_=Ql(sr),s_=ed(sr),c_=td(sr),u_=rd(sr);var qe=N("ZodType",(e,t)=>(Re.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:pa(e,"input"),output:pa(e,"output")}}),e.toJSONSchema=Hy(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(ce.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)=>Nt(e,n,o),e.brand=()=>e,e.register=((n,o)=>(n.add(e,o),e)),e.parse=(n,o)=>Yv(e,n,o,{callee:e.parse}),e.safeParse=(n,o)=>e_(e,n,o),e.parseAsync=async(n,o)=>Qv(e,n,o,{callee:e.parseAsync}),e.safeParseAsync=async(n,o)=>t_(e,n,o),e.spa=e.safeParseAsync,e.encode=(n,o)=>r_(e,n,o),e.decode=(n,o)=>n_(e,n,o),e.encodeAsync=async(n,o)=>o_(e,n,o),e.decodeAsync=async(n,o)=>i_(e,n,o),e.safeEncode=(n,o)=>a_(e,n,o),e.safeDecode=(n,o)=>s_(e,n,o),e.safeEncodeAsync=async(n,o)=>c_(e,n,o),e.safeDecodeAsync=async(n,o)=>u_(e,n,o),e.refine=(n,o)=>e.check(Q_(n,o)),e.superRefine=n=>e.check(eP(n)),e.overwrite=n=>e.check(zr(n)),e.optional=()=>su(e),e.exactOptional=()=>k_(e),e.nullable=()=>cu(e),e.nullish=()=>su(cu(e)),e.nonoptional=n=>j_(e,n),e.array=()=>pu(e),e.or=n=>lf([e,n]),e.and=n=>S_(e,n),e.transform=n=>uu(e,pf(n)),e.default=n=>M_(e,n),e.prefault=n=>L_(e,n),e.catch=n=>V_(e,n),e.pipe=n=>uu(e,n),e.readonly=()=>Z_(e),e.describe=n=>{let o=e.clone();return kt.add(o,{description:n}),o},Object.defineProperty(e,"description",{get(){return kt.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return kt.get(e);let o=e.clone();return kt.add(o,n[0]),o},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),Vp=N("_ZodString",(e,t)=>{Mn.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(o,r,i)=>Zy(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(jt(...o)),e.includes=(...o)=>e.check(ni(...o)),e.startsWith=(...o)=>e.check(oi(...o)),e.endsWith=(...o)=>e.check(ii(...o)),e.min=(...o)=>e.check(Et(...o)),e.max=(...o)=>e.check(yo(...o)),e.length=(...o)=>e.check(vo(...o)),e.nonempty=(...o)=>e.check(Et(1,...o)),e.lowercase=o=>e.check(ti(o)),e.uppercase=o=>e.check(ri(o)),e.trim=()=>e.check(ci()),e.normalize=(...o)=>e.check(si(...o)),e.toLowerCase=()=>e.check(ui()),e.toUpperCase=()=>e.check(li()),e.slugify=()=>e.check(da())}),_a=N("ZodString",(e,t)=>{Mn.init(e,t),Vp.init(e,t),e.email=n=>e.check(oc(Gp,n)),e.url=n=>e.check(ei(lu,n)),e.jwt=n=>e.check(Tc(sf,n)),e.emoji=n=>e.check(uc(Hp,n)),e.guid=n=>e.check(la(au,n)),e.uuid=n=>e.check(ic(fn,n)),e.uuidv4=n=>e.check(ac(fn,n)),e.uuidv6=n=>e.check(sc(fn,n)),e.uuidv7=n=>e.check(cc(fn,n)),e.nanoid=n=>e.check(lc(Zp,n)),e.guid=n=>e.check(la(au,n)),e.cuid=n=>e.check(dc(Wp,n)),e.cuid2=n=>e.check(pc(Kp,n)),e.ulid=n=>e.check(fc(Jp,n)),e.base64=n=>e.check(Pc(nf,n)),e.base64url=n=>e.check(wc(of,n)),e.xid=n=>e.check(mc(Xp,n)),e.ksuid=n=>e.check(hc(Yp,n)),e.ipv4=n=>e.check(gc(Qp,n)),e.ipv6=n=>e.check(yc(ef,n)),e.cidrv4=n=>e.check(vc(tf,n)),e.cidrv6=n=>e.check(_c(rf,n)),e.e164=n=>e.check(bc(af,n)),e.datetime=n=>e.check(Wv(n)),e.date=n=>e.check(Kv(n)),e.time=n=>e.check(Jv(n)),e.duration=n=>e.check(Xv(n))});function qp(e){return rc(_a,e)}a(qp,"string");var st=N("ZodStringFormat",(e,t)=>{tt.init(e,t),Vp.init(e,t)}),Gp=N("ZodEmail",(e,t)=>{md.init(e,t),st.init(e,t)});function fx(e){return oc(Gp,e)}a(fx,"email");var au=N("ZodGUID",(e,t)=>{pd.init(e,t),st.init(e,t)});function mx(e){return la(au,e)}a(mx,"guid");var fn=N("ZodUUID",(e,t)=>{fd.init(e,t),st.init(e,t)});function hx(e){return ic(fn,e)}a(hx,"uuid");function gx(e){return ac(fn,e)}a(gx,"uuidv4");function yx(e){return sc(fn,e)}a(yx,"uuidv6");function vx(e){return cc(fn,e)}a(vx,"uuidv7");var lu=N("ZodURL",(e,t)=>{Os.init(e,t),st.init(e,t)});function _x(e){return ei(lu,e)}a(_x,"url");function Px(e){return ei(lu,{protocol:/^https?$/,hostname:ar.domain,...ce.normalizeParams(e)})}a(Px,"httpUrl");var Hp=N("ZodEmoji",(e,t)=>{hd.init(e,t),st.init(e,t)});function wx(e){return uc(Hp,e)}a(wx,"emoji");var Zp=N("ZodNanoID",(e,t)=>{gd.init(e,t),st.init(e,t)});function bx(e){return lc(Zp,e)}a(bx,"nanoid");var Wp=N("ZodCUID",(e,t)=>{yd.init(e,t),st.init(e,t)});function Tx(e){return dc(Wp,e)}a(Tx,"cuid");var Kp=N("ZodCUID2",(e,t)=>{vd.init(e,t),st.init(e,t)});function Ex(e){return pc(Kp,e)}a(Ex,"cuid2");var Jp=N("ZodULID",(e,t)=>{_d.init(e,t),st.init(e,t)});function Sx(e){return fc(Jp,e)}a(Sx,"ulid");var Xp=N("ZodXID",(e,t)=>{Pd.init(e,t),st.init(e,t)});function xx(e){return mc(Xp,e)}a(xx,"xid");var Yp=N("ZodKSUID",(e,t)=>{wd.init(e,t),st.init(e,t)});function Ix(e){return hc(Yp,e)}a(Ix,"ksuid");var Qp=N("ZodIPv4",(e,t)=>{bd.init(e,t),st.init(e,t)});function Ax(e){return gc(Qp,e)}a(Ax,"ipv4");var l_=N("ZodMAC",(e,t)=>{Ed.init(e,t),st.init(e,t)});function Rx(e){return op(l_,e)}a(Rx,"mac");var ef=N("ZodIPv6",(e,t)=>{Td.init(e,t),st.init(e,t)});function Dx(e){return yc(ef,e)}a(Dx,"ipv6");var tf=N("ZodCIDRv4",(e,t)=>{Sd.init(e,t),st.init(e,t)});function Ox(e){return vc(tf,e)}a(Ox,"cidrv4");var rf=N("ZodCIDRv6",(e,t)=>{xd.init(e,t),st.init(e,t)});function $x(e){return _c(rf,e)}a($x,"cidrv6");var nf=N("ZodBase64",(e,t)=>{Id.init(e,t),st.init(e,t)});function Cx(e){return Pc(nf,e)}a(Cx,"base64");var of=N("ZodBase64URL",(e,t)=>{Ad.init(e,t),st.init(e,t)});function Nx(e){return wc(of,e)}a(Nx,"base64url");var af=N("ZodE164",(e,t)=>{Rd.init(e,t),st.init(e,t)});function kx(e){return bc(af,e)}a(kx,"e164");var sf=N("ZodJWT",(e,t)=>{Dd.init(e,t),st.init(e,t)});function zx(e){return Tc(sf,e)}a(zx,"jwt");var Pa=N("ZodCustomStringFormat",(e,t)=>{Od.init(e,t),st.init(e,t)});function Ux(e,t,n={}){return di(Pa,e,t,n)}a(Ux,"stringFormat");function Mx(e){return di(Pa,"hostname",ar.hostname,e)}a(Mx,"hostname");function Fx(e){return di(Pa,"hex",ar.hex,e)}a(Fx,"hex");function Lx(e,t){let n=t?.enc??"hex",o=`${e}_${n}`,r=ar[o];if(!r)throw new Error(`Unrecognized hash format: ${o}`);return di(Pa,o,r,t)}a(Lx,"hash");var wa=N("ZodNumber",(e,t)=>{oa.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(o,r,i)=>Wy(e,o,r,i),e.gt=(o,r)=>e.check(Xr(o,r)),e.gte=(o,r)=>e.check(Dt(o,r)),e.min=(o,r)=>e.check(Dt(o,r)),e.lt=(o,r)=>e.check(Jr(o,r)),e.lte=(o,r)=>e.check(Kt(o,r)),e.max=(o,r)=>e.check(Kt(o,r)),e.int=o=>e.check(Bp(o)),e.safe=o=>e.check(Bp(o)),e.positive=o=>e.check(Xr(0,o)),e.nonnegative=o=>e.check(Dt(0,o)),e.negative=o=>e.check(Jr(0,o)),e.nonpositive=o=>e.check(Kt(0,o)),e.multipleOf=(o,r)=>e.check(Fn(o,r)),e.step=(o,r)=>e.check(Fn(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 d_(e){return Ac(wa,e)}a(d_,"number");var fi=N("ZodNumberFormat",(e,t)=>{zs.init(e,t),wa.init(e,t)});function Bp(e){return Dc(fi,e)}a(Bp,"int");function jx(e){return ap(fi,e)}a(jx,"float32");function qx(e){return sp(fi,e)}a(qx,"float64");function Bx(e){return cp(fi,e)}a(Bx,"int32");function Vx(e){return up(fi,e)}a(Vx,"uint32");var ba=N("ZodBoolean",(e,t)=>{Yo.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Ky(e,n,o,r)});function p_(e){return Oc(ba,e)}a(p_,"boolean");var Ta=N("ZodBigInt",(e,t)=>{ia.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(o,r,i)=>Jy(e,o,r,i),e.gte=(o,r)=>e.check(Dt(o,r)),e.min=(o,r)=>e.check(Dt(o,r)),e.gt=(o,r)=>e.check(Xr(o,r)),e.gte=(o,r)=>e.check(Dt(o,r)),e.min=(o,r)=>e.check(Dt(o,r)),e.lt=(o,r)=>e.check(Jr(o,r)),e.lte=(o,r)=>e.check(Kt(o,r)),e.max=(o,r)=>e.check(Kt(o,r)),e.positive=o=>e.check(Xr(BigInt(0),o)),e.negative=o=>e.check(Jr(BigInt(0),o)),e.nonpositive=o=>e.check(Kt(BigInt(0),o)),e.nonnegative=o=>e.check(Dt(BigInt(0),o)),e.multipleOf=(o,r)=>e.check(Fn(o,r));let n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null});function Gx(e){return lp(Ta,e)}a(Gx,"bigint");var cf=N("ZodBigIntFormat",(e,t)=>{$d.init(e,t),Ta.init(e,t)});function Hx(e){return dp(cf,e)}a(Hx,"int64");function Zx(e){return pp(cf,e)}a(Zx,"uint64");var f_=N("ZodSymbol",(e,t)=>{Cd.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Xy(e,n,o,r)});function Wx(e){return fp(f_,e)}a(Wx,"symbol");var m_=N("ZodUndefined",(e,t)=>{Nd.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Qy(e,n,o,r)});function Kx(e){return mp(m_,e)}a(Kx,"_undefined");var h_=N("ZodNull",(e,t)=>{kd.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Yy(e,n,o,r)});function g_(e){return hp(h_,e)}a(g_,"_null");var y_=N("ZodAny",(e,t)=>{Us.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>rv(e,n,o,r)});function Jx(){return Nc(y_)}a(Jx,"any");var v_=N("ZodUnknown",(e,t)=>{Ms.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>nv(e,n,o,r)});function pi(){return kc(v_)}a(pi,"unknown");var __=N("ZodNever",(e,t)=>{zd.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>tv(e,n,o,r)});function uf(e){return gp(__,e)}a(uf,"never");var P_=N("ZodVoid",(e,t)=>{Fs.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>ev(e,n,o,r)});function Xx(e){return zc(P_,e)}a(Xx,"_void");var du=N("ZodDate",(e,t)=>{Ls.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(o,r,i)=>ov(e,o,r,i),e.min=(o,r)=>e.check(Dt(o,r)),e.max=(o,r)=>e.check(Kt(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 Yx(e){return yp(du,e)}a(Yx,"date");var w_=N("ZodArray",(e,t)=>{js.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>gv(e,n,o,r),e.element=t.element,e.min=(n,o)=>e.check(Et(n,o)),e.nonempty=n=>e.check(Et(1,n)),e.max=(n,o)=>e.check(yo(n,o)),e.length=(n,o)=>e.check(vo(n,o)),e.unwrap=()=>e.element});function pu(e,t){return Gy(w_,e,t)}a(pu,"array");function Qx(e){let t=e._zod.def.shape;return df(Object.keys(t))}a(Qx,"keyof");var fu=N("ZodObject",(e,t)=>{Yg.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>yv(e,n,o,r),ce.defineLazy(e,"shape",()=>t.shape),e.keyof=()=>df(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:pi()}),e.loose=()=>e.clone({...e._zod.def,catchall:pi()}),e.strict=()=>e.clone({...e._zod.def,catchall:uf()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>ce.extend(e,n),e.safeExtend=n=>ce.safeExtend(e,n),e.merge=n=>ce.merge(e,n),e.pick=n=>ce.pick(e,n),e.omit=n=>ce.omit(e,n),e.partial=(...n)=>ce.partial(ff,e,n[0]),e.required=(...n)=>ce.required(mf,e,n[0])});function eI(e,t){let n={type:"object",shape:e??{},...ce.normalizeParams(t)};return new fu(n)}a(eI,"object");function tI(e,t){return new fu({type:"object",shape:e,catchall:uf(),...ce.normalizeParams(t)})}a(tI,"strictObject");function rI(e,t){return new fu({type:"object",shape:e,catchall:pi(),...ce.normalizeParams(t)})}a(rI,"looseObject");var mu=N("ZodUnion",(e,t)=>{Qo.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Sp(e,n,o,r),e.options=t.options});function lf(e,t){return new mu({type:"union",options:e,...ce.normalizeParams(t)})}a(lf,"union");var b_=N("ZodXor",(e,t)=>{mu.init(e,t),Md.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Sp(e,n,o,r),e.options=t.options});function nI(e,t){return new b_({type:"union",options:e,inclusive:!1,...ce.normalizeParams(t)})}a(nI,"xor");var T_=N("ZodDiscriminatedUnion",(e,t)=>{mu.init(e,t),qs.init(e,t)});function oI(e,t,n){return new T_({type:"union",options:t,discriminator:e,...ce.normalizeParams(n)})}a(oI,"discriminatedUnion");var E_=N("ZodIntersection",(e,t)=>{Fd.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>vv(e,n,o,r)});function S_(e,t){return new E_({type:"intersection",left:e,right:t})}a(S_,"intersection");var x_=N("ZodTuple",(e,t)=>{Bs.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>_v(e,n,o,r),e.rest=n=>e.clone({...e._zod.def,rest:n})});function I_(e,t,n){let o=t instanceof Re,r=o?n:t,i=o?t:null;return new x_({type:"tuple",items:e,rest:i,...ce.normalizeParams(r)})}a(I_,"tuple");var hu=N("ZodRecord",(e,t)=>{Vs.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Pv(e,n,o,r),e.keyType=t.keyType,e.valueType=t.valueType});function A_(e,t,n){return new hu({type:"record",keyType:e,valueType:t,...ce.normalizeParams(n)})}a(A_,"record");function iI(e,t,n){let o=Nt(e);return o._zod.values=void 0,new hu({type:"record",keyType:o,valueType:t,...ce.normalizeParams(n)})}a(iI,"partialRecord");function aI(e,t,n){return new hu({type:"record",keyType:e,valueType:t,mode:"loose",...ce.normalizeParams(n)})}a(aI,"looseRecord");var R_=N("ZodMap",(e,t)=>{Ld.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>mv(e,n,o,r),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...n)=>e.check(Yr(...n)),e.nonempty=n=>e.check(Yr(1,n)),e.max=(...n)=>e.check(Ln(...n)),e.size=(...n)=>e.check(go(...n))});function sI(e,t,n){return new R_({type:"map",keyType:e,valueType:t,...ce.normalizeParams(n)})}a(sI,"map");var D_=N("ZodSet",(e,t)=>{jd.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>hv(e,n,o,r),e.min=(...n)=>e.check(Yr(...n)),e.nonempty=n=>e.check(Yr(1,n)),e.max=(...n)=>e.check(Ln(...n)),e.size=(...n)=>e.check(go(...n))});function cI(e,t){return new D_({type:"set",valueType:e,...ce.normalizeParams(t)})}a(cI,"set");var va=N("ZodEnum",(e,t)=>{Gs.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(o,r,i)=>iv(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 va({...t,checks:[],...ce.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 va({...t,checks:[],...ce.normalizeParams(r),entries:i})}});function df(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(o=>[o,o])):e;return new va({type:"enum",entries:n,...ce.normalizeParams(t)})}a(df,"_enum");function uI(e,t){return new va({type:"enum",entries:e,...ce.normalizeParams(t)})}a(uI,"nativeEnum");var O_=N("ZodLiteral",(e,t)=>{Hs.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>av(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 lI(e,t){return new O_({type:"literal",values:Array.isArray(e)?e:[e],...ce.normalizeParams(t)})}a(lI,"literal");var $_=N("ZodFile",(e,t)=>{qd.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>uv(e,n,o,r),e.min=(n,o)=>e.check(Yr(n,o)),e.max=(n,o)=>e.check(Ln(n,o)),e.mime=(n,o)=>e.check(ai(Array.isArray(n)?n:[n],o))});function dI(e){return _p($_,e)}a(dI,"file");var C_=N("ZodTransform",(e,t)=>{Zs.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>fv(e,n,o,r),e._zod.parse=(n,o)=>{if(o.direction==="backward")throw new lo(e.constructor.name);n.addIssue=i=>{if(typeof i=="string")n.issues.push(ce.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(ce.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 pf(e){return new C_({type:"transform",transform:e})}a(pf,"transform");var ff=N("ZodOptional",(e,t)=>{aa.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>xp(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function su(e){return new ff({type:"optional",innerType:e})}a(su,"optional");var N_=N("ZodExactOptional",(e,t)=>{Bd.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>xp(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function k_(e){return new N_({type:"optional",innerType:e})}a(k_,"exactOptional");var z_=N("ZodNullable",(e,t)=>{Ws.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>wv(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function cu(e){return new z_({type:"nullable",innerType:e})}a(cu,"nullable");function pI(e){return su(cu(e))}a(pI,"nullish");var U_=N("ZodDefault",(e,t)=>{Vd.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Tv(e,n,o,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function M_(e,t){return new U_({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():ce.shallowClone(t)}})}a(M_,"_default");var F_=N("ZodPrefault",(e,t)=>{Gd.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Ev(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function L_(e,t){return new F_({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():ce.shallowClone(t)}})}a(L_,"prefault");var mf=N("ZodNonOptional",(e,t)=>{Hd.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>bv(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function j_(e,t){return new mf({type:"nonoptional",innerType:e,...ce.normalizeParams(t)})}a(j_,"nonoptional");var q_=N("ZodSuccess",(e,t)=>{Zd.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>lv(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function fI(e){return new q_({type:"success",innerType:e})}a(fI,"success");var B_=N("ZodCatch",(e,t)=>{Wd.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Sv(e,n,o,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function V_(e,t){return new B_({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}a(V_,"_catch");var G_=N("ZodNaN",(e,t)=>{Kd.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>sv(e,n,o,r)});function mI(e){return vp(G_,e)}a(mI,"nan");var hf=N("ZodPipe",(e,t)=>{Ks.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>xv(e,n,o,r),e.in=t.in,e.out=t.out});function uu(e,t){return new hf({type:"pipe",in:e,out:t})}a(uu,"pipe");var gf=N("ZodCodec",(e,t)=>{hf.init(e,t),sa.init(e,t)});function hI(e,t,n){return new gf({type:"pipe",in:e,out:t,transform:n.decode,reverseTransform:n.encode})}a(hI,"codec");var H_=N("ZodReadonly",(e,t)=>{Jd.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Iv(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function Z_(e){return new H_({type:"readonly",innerType:e})}a(Z_,"readonly");var W_=N("ZodTemplateLiteral",(e,t)=>{Xd.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>cv(e,n,o,r)});function gI(e,t){return new W_({type:"template_literal",parts:e,...ce.normalizeParams(t)})}a(gI,"templateLiteral");var K_=N("ZodLazy",(e,t)=>{ep.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Rv(e,n,o,r),e.unwrap=()=>e._zod.def.getter()});function J_(e){return new K_({type:"lazy",getter:e})}a(J_,"lazy");var X_=N("ZodPromise",(e,t)=>{Qd.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Av(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function yI(e){return new X_({type:"promise",innerType:e})}a(yI,"promise");var Y_=N("ZodFunction",(e,t)=>{Yd.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>pv(e,n,o,r)});function vI(e){return new Y_({type:"function",input:Array.isArray(e?.input)?I_(e?.input):e?.input??pu(pi()),output:e?.output??pi()})}a(vI,"_function");var gu=N("ZodCustom",(e,t)=>{Js.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>dv(e,n,o,r)});function _I(e){let t=new at({check:"custom"});return t._zod.check=e,t}a(_I,"check");function PI(e,t){return Bc(gu,e??(()=>!0),t)}a(PI,"custom");function Q_(e,t={}){return Vc(gu,e,t)}a(Q_,"refine");function eP(e){return Pp(e)}a(eP,"superRefine");var wI=wp,bI=bp;function TI(e,t={}){let n=new gu({type:"custom",check:"custom",fn:a(o=>o instanceof e,"fn"),abort:!0,...ce.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(TI,"_instanceof");var EI=a((...e)=>Tp({Codec:gf,Boolean:ba,String:_a},...e),"stringbool");function SI(e){let t=J_(()=>lf([qp(e),d_(),p_(),g_(),pu(t),A_(qp(),t)]));return t}a(SI,"json");function xI(e,t){return uu(pf(e),t)}a(xI,"preprocess");var Fq={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 Lq(e){gt({customError:e})}a(Lq,"setErrorMap");function jq(){return gt().customError}a(jq,"getErrorMap");var tP;tP||(tP={});var ye={...iu,...Up,iso:ya},qq=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 Bq(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(Bq,"detectVersion");function Vq(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(Vq,"resolveRef");function II(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return ye.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 ye.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=Vq(r,t),s=Gt(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 ye.null();if(r.length===0)return ye.never();if(r.length===1)return ye.literal(r[0]);if(r.every(s=>typeof s=="string"))return ye.enum(r);let i=r.map(s=>ye.literal(s));return i.length<2?i[0]:ye.union([i[0],i[1],...i.slice(2)])}if(e.const!==void 0)return ye.literal(e.const);let n=e.type;if(Array.isArray(n)){let r=n.map(i=>{let s={...e,type:i};return II(s,t)});return r.length===0?ye.never():r.length===1?r[0]:ye.union(r)}if(!n)return ye.any();let o;switch(n){case"string":{let r=ye.string();if(e.format){let i=e.format;i==="email"?r=r.check(ye.email()):i==="uri"||i==="uri-reference"?r=r.check(ye.url()):i==="uuid"||i==="guid"?r=r.check(ye.uuid()):i==="date-time"?r=r.check(ye.iso.datetime()):i==="date"?r=r.check(ye.iso.date()):i==="time"?r=r.check(ye.iso.time()):i==="duration"?r=r.check(ye.iso.duration()):i==="ipv4"?r=r.check(ye.ipv4()):i==="ipv6"?r=r.check(ye.ipv6()):i==="mac"?r=r.check(ye.mac()):i==="cidr"?r=r.check(ye.cidrv4()):i==="cidr-v6"?r=r.check(ye.cidrv6()):i==="base64"?r=r.check(ye.base64()):i==="base64url"?r=r.check(ye.base64url()):i==="e164"?r=r.check(ye.e164()):i==="jwt"?r=r.check(ye.jwt()):i==="emoji"?r=r.check(ye.emoji()):i==="nanoid"?r=r.check(ye.nanoid()):i==="cuid"?r=r.check(ye.cuid()):i==="cuid2"?r=r.check(ye.cuid2()):i==="ulid"?r=r.check(ye.ulid()):i==="xid"?r=r.check(ye.xid()):i==="ksuid"&&(r=r.check(ye.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"?ye.number().int():ye.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=ye.boolean();break}case"null":{o=ye.null();break}case"object":{let r={},i=e.properties||{},s=new Set(e.required||[]);for(let[h,g]of Object.entries(i)){let y=Gt(g,t);r[h]=s.has(h)?y:y.optional()}if(e.propertyNames){let h=Gt(e.propertyNames,t),g=e.additionalProperties&&typeof e.additionalProperties=="object"?Gt(e.additionalProperties,t):ye.any();if(Object.keys(r).length===0){o=ye.record(h,g);break}let y=ye.object(r).passthrough(),T=ye.looseRecord(h,g);o=ye.intersection(y,T);break}if(e.patternProperties){let h=e.patternProperties,g=Object.keys(h),y=[];for(let b of g){let P=Gt(h[b],t),S=ye.string().regex(new RegExp(b));y.push(ye.looseRecord(S,P))}let T=[];if(Object.keys(r).length>0&&T.push(ye.object(r).passthrough()),T.push(...y),T.length===0)o=ye.object({}).passthrough();else if(T.length===1)o=T[0];else{let b=ye.intersection(T[0],T[1]);for(let P=2;P<T.length;P++)b=ye.intersection(b,T[P]);o=b}break}let u=ye.object(r);e.additionalProperties===!1?o=u.strict():typeof e.additionalProperties=="object"?o=u.catchall(Gt(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(h=>Gt(h,t)),u=i&&typeof i=="object"&&!Array.isArray(i)?Gt(i,t):void 0;u?o=ye.tuple(s).rest(u):o=ye.tuple(s),typeof e.minItems=="number"&&(o=o.check(ye.minLength(e.minItems))),typeof e.maxItems=="number"&&(o=o.check(ye.maxLength(e.maxItems)))}else if(Array.isArray(i)){let s=i.map(h=>Gt(h,t)),u=e.additionalItems&&typeof e.additionalItems=="object"?Gt(e.additionalItems,t):void 0;u?o=ye.tuple(s).rest(u):o=ye.tuple(s),typeof e.minItems=="number"&&(o=o.check(ye.minLength(e.minItems))),typeof e.maxItems=="number"&&(o=o.check(ye.maxLength(e.maxItems)))}else if(i!==void 0){let s=Gt(i,t),u=ye.array(s);typeof e.minItems=="number"&&(u=u.min(e.minItems)),typeof e.maxItems=="number"&&(u=u.max(e.maxItems)),o=u}else o=ye.array(ye.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(II,"convertBaseSchema");function Gt(e,t){if(typeof e=="boolean")return e?ye.any():ye.never();let n=II(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(g=>Gt(g,t)),h=ye.union(u);n=o?ye.intersection(n,h):h}if(e.oneOf&&Array.isArray(e.oneOf)){let u=e.oneOf.map(g=>Gt(g,t)),h=ye.xor(u);n=o?ye.intersection(n,h):h}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)n=o?n:ye.any();else{let u=o?n:Gt(e.allOf[0],t),h=o?0:1;for(let g=h;g<e.allOf.length;g++)u=ye.intersection(u,Gt(e.allOf[g],t));n=u}e.nullable===!0&&t.version==="openapi-3.0"&&(n=ye.nullable(n)),e.readOnly===!0&&(n=ye.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))qq.has(u)||(r[u]=e[u]);return Object.keys(r).length>0&&t.registry.add(n,r),n}a(Gt,"convertSchema");function AI(e,t){if(typeof e=="boolean")return e?ye.any():ye.never();let n=Bq(e,t?.defaultTarget),o=e.$defs||e.definitions||{},r={version:n,defs:o,refs:new Map,processing:new Set,rootSchema:e,registry:t?.registry??kt};return Gt(e,r)}a(AI,"fromJSONSchema");var rP={};nr(rP,{bigint:()=>Wq,boolean:()=>Zq,date:()=>Kq,number:()=>Hq,string:()=>Gq});function Gq(e){return nc(_a,e)}a(Gq,"string");function Hq(e){return Rc(wa,e)}a(Hq,"number");function Zq(e){return $c(ba,e)}a(Zq,"boolean");function Wq(e){return Cc(Ta,e)}a(Wq,"bigint");function Kq(e){return Uc(du,e)}a(Kq,"date");gt(Xs());var nP={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 RI=(n=>(n.IMAGE="image",n.TEXT="text",n))(RI||{}),Xt=fe.object({apiKey:fe.string()}),DI=fe.object({serviceAccountJson:fe.string().min(1)}),OI=Xt,$I=Xt.extend({apiKeyHash:fe.string()}),CI=Xt,NI=Xt,kI=Xt,zI=Xt,UI=Xt,MI=Xt,FI=fe.object({accessKeyId:fe.string().min(1),secretAccessKey:fe.string().min(1),sessionToken:fe.string().optional()}),LI=Xt,jI=fe.object({}),qI=fe.object({}),oP=fe.object({modelId:fe.string(),modelName:fe.string(),modelType:fe.enum(RI)}),BI=fe.object({apiKeyHeader:fe.string(),baseUrl:fe.string(),models:fe.array(oP),defaultHeaders:fe.record(fe.string(),fe.string()).optional(),apiStyle:fe.enum(["chat","responses"]).optional()}),VI=fe.object({accountId:fe.string(),gatewayId:fe.string(),models:fe.array(oP),vertexProject:fe.string().optional(),vertexRegion:fe.string().optional()}),GI=fe.object({resourceName:fe.string(),apiVersion:fe.preprocess(e=>typeof e=="string"&&e.trim().length===0?void 0:e,fe.string().optional())}),HI=fe.object({}),ZI=fe.object({}),WI=fe.object({}),KI=fe.object({region:fe.string().min(1)}),JI=fe.object({project:fe.string().regex(/^[a-z0-9][a-z0-9-]{0,62}$/,nP.invalidGcpResourceId),region:fe.string().regex(/^[a-z0-9][a-z0-9-]{0,62}$/,nP.invalidGcpResourceId),models:fe.array(oP)}),XI=fe.object({}),mi=fe.object({}),Q7=fe.union([OI,kI,zI,UI,MI,NI,CI,$I,FI,DI,LI]),eQ=fe.union([BI,VI,GI,JI,KI,jI,HI,ZI,WI,qI,XI,mi]),tQ=fe.discriminatedUnion("provider",[fe.object({provider:fe.literal("openai"),config:ZI.partial(),auth:UI.partial()}),fe.object({provider:fe.literal("openrouter"),config:WI.partial(),auth:MI.partial()}),fe.object({provider:fe.literal("anthropic"),config:jI.partial(),auth:OI.partial()}),fe.object({provider:fe.literal("azure"),config:GI.partial(),auth:kI.partial()}),fe.object({provider:fe.literal("google"),config:HI.partial(),auth:zI.partial()}),fe.object({provider:fe.literal("cloudflare-gateway"),config:VI.partial(),auth:NI.partial()}),fe.object({provider:fe.literal("custom"),config:BI.partial(),auth:CI.partial()}),fe.object({provider:fe.literal("activepieces"),config:qI.partial(),auth:$I.partial()}),fe.object({provider:fe.literal("bedrock"),config:KI.partial(),auth:FI.partial()}),fe.object({provider:fe.literal("vertex"),config:JI.partial(),auth:DI.partial()}),fe.object({provider:fe.literal("mistral"),config:XI.partial(),auth:LI.partial()}),fe.object({provider:fe.literal("xai"),config:mi.partial(),auth:Xt.partial()}),fe.object({provider:fe.literal("deepseek"),config:mi.partial(),auth:Xt.partial()}),fe.object({provider:fe.literal("zai"),config:mi.partial(),auth:Xt.partial()}),fe.object({provider:fe.literal("qwen"),config:mi.partial(),auth:Xt.partial()}),fe.object({provider:fe.literal("minimax"),config:mi.partial(),auth:Xt.partial()}),fe.object({provider:fe.literal("moonshot"),config:mi.partial(),auth:Xt.partial()})]);var dQ=x().check(jt(/^#[0-9A-Fa-f]{6}$/));var fQ=M({filename:x(),data:$e(),type:Ee("file"),mimetype:W(x())});var Jq=he(QI());var PQ=M({...Ur,name:x(),permissions:Ae(x()),platformId:vt(x()),type:x(),userCount:W(zt())});var DQ=fe.enum(["active","out_of_credits","rejected","unreachable"]);var eA=(o=>(o.AGENT_DECIDE="agent-decide",o.CHOOSE_YOURSELF="choose-yourself",o.LEAVE_EMPTY="leave-empty",o))(eA||{}),iP=(n=>(n.FILE="FILE",n.TABLE="TABLE",n))(iP||{}),aP=(o=>(o.SSE="sse",o.STREAMABLE_HTTP="streamable-http",o.SIMPLE_HTTP="http",o))(aP||{});var sP=(o=>(o.TEXT="text",o.NUMBER="number",o.BOOLEAN="boolean",o))(sP||{});var cP=(n=>(n.IN_PROGRESS="in-progress",n.COMPLETED="completed",n))(cP||{});var Xq=M({mode:xe(eA),value:$e()}),Yq=M({auth:W(x()),fields:Ce(x(),Xq)}),Qq=M({pieceName:x(),pieceVersion:x(),actionName:x(),predefinedInput:W(Yq)}),eB=M({type:Ee("PIECE"),toolName:x().check(Et(1)),pieceMetadata:Qq}),tB=M({type:Ee("none")}),rB=M({type:Ee("access_token"),accessToken:x()}),nB=M({type:Ee("api_key"),apiKey:x(),apiKeyHeader:x()}),oB=M({type:Ee("headers"),headers:Ce(x(),x())}),iB=bo("type",[tB,rB,nB,oB]),tA=M({type:Ee("FLOW"),toolName:x().check(Et(1)),externalFlowId:x(),flowDisplayName:W(x())}),rA=M({type:Ee("MCP"),toolName:x().check(Et(1)),serverUrl:KS(),protocol:xe(aP),auth:iB}),nA=M({type:Ee("KNOWLEDGE_BASE"),toolName:x().check(Et(1)),sourceType:xe(iP),sourceId:x(),sourceName:x()}),aB=bo("type",[eB,tA,rA,nA]),sB=M({displayName:x(),description:W(x()),type:xe(sP)}),oA=M({type:Ee("MARKDOWN"),markdown:x()}),Ea={type:Ee("TOOL_CALL"),input:vt(Ce(x(),$e())),output:W($e()),toolName:x(),status:xe(cP),toolCallId:x(),startTime:x(),endTime:W(x())},yee=M(Ea),iA=bo("toolCallType",[M({...Ea,toolCallType:Ee("PIECE"),pieceName:x(),pieceVersion:x(),actionName:x()}),M({...Ea,toolCallType:Ee("FLOW"),displayName:x(),externalFlowId:x()}),M({...Ea,toolCallType:Ee("MCP"),displayName:x(),serverUrl:x()}),M({...Ea,toolCallType:Ee("KNOWLEDGE_BASE"),displayName:x(),sourceType:x()}),M({...Ea,toolCallType:Ee("UNKNOWN"),displayName:x()})]),cB=je([oA,iA]);var uB=10800*1e3,lB=900*1e3;var dP=(n=>(n.IMAGE="image",n.TEXT="text",n))(dP||{}),Gn=M({apiKey:x()}),pB=Gn,fB=M({apiKey:x(),apiKeyHash:x()}),mB=Gn,hB=Gn,gB=Gn,yB=Gn,vB=Gn,_B=Gn,PB=Gn,uA=M({serviceAccountJson:x().check(Et(1))}),lA=M({accessKeyId:x().check(Et(1)),secretAccessKey:x().check(Et(1)),sessionToken:W(x())}),wB=M({}),bB=M({}),TB=M({}),EB=M({}),SB=M({}),xB=M({}),pP=M({modelId:x(),modelName:x(),modelType:xe(dP)}),dA=M({apiKeyHeader:x(),baseUrl:x(),models:Ae(pP),defaultHeaders:W(Ce(x(),x())),apiStyle:W(xe(["chat","responses"]))}),pA=M({accountId:x(),gatewayId:x(),models:Ae(pP),vertexProject:W(x()),vertexRegion:W(x())}),fA=M({resourceName:x(),apiVersion:Eo(To(e=>typeof e=="string"&&e.trim().length===0?void 0:e),W(x()))}),mA=M({region:x().check(Et(1))}),hA=M({project:x().check(jt(/^[a-z0-9][a-z0-9-]{0,62}$/)),region:x().check(jt(/^[a-z0-9][a-z0-9-]{0,62}$/)),models:Ae(pP)}),gA=M({}),IB=je([pB,gB,yB,vB,_B,hB,mB,fB,lA,uA,PB]),yA=je([dA,pA,fA,hA,mA,wB,TB,EB,SB,bB,xB,gA]),AB=M({id:x(),name:x(),type:xe(dP)}),RB=M({id:x(),name:x(),provider:xe(Io),config:yA,enabledForChat:Je()}),DB=M({provider:xe(Io),name:x(),enabledForChat:Je(),keys:Ae(M({id:x(),name:x()}))}),OB=M({provider:xe(Io),configId:x(),config:yA,auth:IB,platformId:x()});var wee={openai:"openai",anthropic:"anthropic","google-ai-studio":"google","google-vertex-ai":"google"},aA=["gpt-5.5","gpt-5.4-mini","gpt-5.4-nano","gpt-4.1","gpt-4.1-mini"],$B=["claude-sonnet-4-6","claude-opus-4-7","claude-haiku-4-5"],vA=["claude-sonnet-4.6","claude-opus-4.7","claude-opus-4.8","claude-haiku-4.5"],uP=["gemini-3.7-flash","gemini-3.1-pro-preview","gemini-3-flash-preview"],lP=["gemini-2.5-pro","gemini-2.5-flash"],CB=["grok-4.20"],bee={google:lP,vertex:lP},Tee=vA.map(e=>`anthropic/${e}`),NB={openai:aA,anthropic:$B,google:uP,vertex:uP,activepieces:[...vA.map(e=>`anthropic/${e}`),...aA.map(e=>`openai/${e}`),...[...uP,...lP].map(e=>`google/${e}`),...CB.map(e=>`x-ai/${e}`)]};var sA=128e3,kB={openai:128e3,anthropic:2e5,google:1048576,bedrock:2e5,vertex:1048576,azure:128e3,openrouter:128e3,activepieces:2e5,mistral:128e3};function zB({provider:e}){return e?kB[e]??sA:sA}a(zB,"getMaxContextTokens");var cA={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"},UB={anthropic:"native",google:"native",openrouter:"plugin",activepieces:"plugin"},MB=new Set(["anthropic","mistral","xai","deepseek","zai","qwen","minimax","moonshot"]),FB={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 qt(e){return{chatModels:NB[e],maxContextTokens:zB({provider:e}),defaultEmbeddingModel:cA[e],supportsEmbedding:cA[e]!==void 0,supportsImageGeneration:!MB.has(e),defaultImageModel:LB[e],webSearch:UB[e]}}a(qt,"buildProviderCapabilities");var _A=[{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"}],LB={activepieces:_A[0].modelId,openrouter:"google/gemini-3.1-flash-lite-image",openai:"gpt-image-1.5",google:"gemini-3.1-flash-image"},jB={openai:qt("openai"),anthropic:qt("anthropic"),openrouter:qt("openrouter"),azure:qt("azure"),google:qt("google"),"cloudflare-gateway":qt("cloudflare-gateway"),custom:qt("custom"),bedrock:qt("bedrock"),vertex:qt("vertex"),mistral:qt("mistral"),activepieces:qt("activepieces"),xai:qt("xai"),deepseek:qt("deepseek"),zai:qt("zai"),qwen:qt("qwen"),minimax:qt("minimax"),moonshot:qt("moonshot")};var qB=M({base64Url:x(),fileName:x(),extension:W(x())}),BB=M({mimeType:x(),url:x(),fileName:W(x())}),fP=je([qB,BB]);var VB=je([M({type:Ee("file"),value:fP}),M({type:Ee("markdown"),value:x(),files:W(Ae(fP))})]),GB=M({sessionId:x(),message:x(),files:W(Ae(x()))});var wA=(n=>(n.ON_NEW_RECORD="ON_NEW_RECORD",n.ON_UPDATE_RECORD="ON_UPDATE_RECORD",n))(wA||{}),bA=(n=>(n.ENABLED="ENABLED",n.DISABLED="DISABLED",n))(bA||{}),mP=(o=>(o.RECORD_CREATED="RECORD_CREATED",o.RECORD_UPDATED="RECORD_UPDATED",o.RECORD_DELETED="RECORD_DELETED",o))(mP||{});var HB=je([M({...Ur,name:x(),externalId:x(),type:Ee("STATIC_DROPDOWN"),tableId:x(),projectId:x(),data:M({options:Ae(M({value:x()}))})}),M({...Ur,name:x(),externalId:x(),type:je([Ee("TEXT"),Ee("NUMBER"),Ee("DATE"),Ee("DATETIME")]),tableId:x(),projectId:x()})]),ZB=M({...Ur,name:x(),folderId:vt(x()),projectId:x(),externalId:x(),status:Zv(bA),trigger:Zv(wA)}),WB=M({...Ur,tableId:x(),projectId:x(),cells:Ce(x(),M({updated:x(),created:x(),value:$e(),fieldName:x()}))}),KB=M({events:Ae(xe(mP)),webhookUrl:x(),flowId:x()}),JB=M({fields:Ae(M({id:x(),name:x()})),rows:Ae(Ce(x(),x())),name:x()}),XB=M({projectId:x(),limit:W(Wc.number()),cursor:W(x()),name:W(x()),externalIds:zp(x()),folderId:W(x()),folderIds:zp(x())}),YB=M({records:Ae(Ae(M({fieldId:x(),value:EA()}))),tableId:x()}),QB=M({cells:W(Ae(M({fieldId:x(),value:EA()}))),tableId:x(),agentUpdate:W(Je())}),TA=bo("operator",[hi("eq"),hi("neq"),hi("gt"),hi("gte"),hi("lt"),hi("lte"),hi("co"),PA("exists"),PA("not_exists")]),eV=M({tableId:x(),limit:W(Wc.number()),cursor:W(x()),filters:zp(TA)});function EA(){return Eo(To(e=>e==null?e:String(e)),Zc(x()))}a(EA,"coerceToString");function hi(e){return M({fieldId:x(),operator:Ee(e),value:x()})}a(hi,"valueFilter");function PA(e){return M({fieldId:x(),operator:Ee(e)})}a(PA,"existenceFilter");var tV=M({status:W(zt()),body:W($e()),headers:W(Ce(x(),x()))}),rV=M({...Ur,deleted:vt(xo),ownerId:x(),displayName:x(),platformId:x(),externalId:vt(x())});var SA=M({name:x(),description:W(x()),type:x(),required:Je()}),nV=M({pieceName:x(),triggerName:x(),input:M({toolName:x(),toolDescription:x(),inputSchema:Ae(SA),returnsResponse:Je()})});var xA="^[0-9]+\\.[0-9]+\\.[0-9]+$",qee=new RegExp(xA),iV="^([~^])?[0-9]+\\.[0-9]+\\.[0-9]+$",Bee=x().check(jt(new RegExp(xA))),Vee=x().check(jt(new RegExp(iV))),aV=M({packageType:Ee("ARCHIVE"),pieceType:xe(ma),pieceName:x(),pieceVersion:x(),archiveId:x(),platformId:x()}),IA=M({packageType:Ee("REGISTRY"),pieceType:Ee("OFFICIAL"),pieceName:x(),pieceVersion:x()}),AA=M({packageType:Ee("REGISTRY"),pieceType:Ee("CUSTOM"),pieceName:x(),pieceVersion:x(),platformId:x()}),Gee=je([IA,AA]),Hee=je([aV,IA,AA]);var sV=bo("type",[M({type:Ee("CRON_EXPRESSION"),cronExpression:x(),timezone:x()}),M({type:Ee("INTERVAL"),intervalMs:JS().check(Dt(6e4))})]),Zee=M({...Ur,type:xe(pn),projectId:x(),flowId:x(),triggerName:x(),schedule:vt(sV),flowVersionId:x(),pieceName:x(),pieceVersion:x(),deleted:vt(x()),simulate:Je()}),RA=(m=>(m.UNKNOWN="UNKNOWN",m.FLOW_RUN_LOG="FLOW_RUN_LOG",m.FLOW_RUN_LOG_SLICE="FLOW_RUN_LOG_SLICE",m.PACKAGE_ARCHIVE="PACKAGE_ARCHIVE",m.FLOW_STEP_FILE="FLOW_STEP_FILE",m.SAMPLE_DATA="SAMPLE_DATA",m.TRIGGER_PAYLOAD="TRIGGER_PAYLOAD",m.SAMPLE_DATA_INPUT="SAMPLE_DATA_INPUT",m.TRIGGER_EVENT_FILE="TRIGGER_EVENT_FILE",m.PROJECT_RELEASE="PROJECT_RELEASE",m.FLOW_VERSION_BACKUP="FLOW_VERSION_BACKUP",m.PLATFORM_ASSET="PLATFORM_ASSET",m.USER_PROFILE_PICTURE="USER_PROFILE_PICTURE",m.WEBHOOK_PAYLOAD="WEBHOOK_PAYLOAD",m.MCP_CALL_PAYLOAD="MCP_CALL_PAYLOAD",m.KNOWLEDGE_BASE="KNOWLEDGE_BASE",m.FLOW_BUNDLE="FLOW_BUNDLE",m.PREWARM_SCOPE="PREWARM_SCOPE",m))(RA||{}),DA=(n=>(n.NONE="NONE",n.ZSTD="ZSTD",n))(DA||{}),OA=(n=>(n.S3="S3",n.DB="DB",n))(OA||{}),Wee=M({...Ur,projectId:vt(x()),platformId:vt(x()),type:xe(RA),compression:xe(DA),data:W($e()),location:xe(OA),size:vt(zt()),fileName:vt(x()),s3Key:vt(x()),metadata:vt(Ce(x(),x()))}),$A=(o=>(o.ADMIN="ADMIN",o.MEMBER="MEMBER",o.OPERATOR="OPERATOR",o))($A||{}),CA=(n=>(n.ACTIVE="ACTIVE",n.INACTIVE="INACTIVE",n))(CA||{}),Kee=M({id:x(),email:x(),firstName:x(),status:xe(CA),externalId:vt(x()),platformId:vt(x()),platformRole:xe($A),lastName:x(),created:xo,updated:xo,lastActiveDate:vt(xo),imageUrl:vt(x())});var gP=M({...We.shape,...ke(Ce(x(),$e()),"OBJECT").shape});var yP=M({...We.shape,formatProperty:W(x()),...ke(x(),"RICH_TEXT").shape});var kA=M({...We.shape,...ke(x(),"COLOR").shape});var vP=je([_r,jn,yP,Cp,Bn,Pr,qn,Mv,Kc,Lv,Vn,Yc,gP,Qc,Xc,Fv,Jc,kA]),$={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 mn=M({displayName:x(),description:W(x()),hasConnectionIdentifier:W(Je())});var zA=M({username:x(),password:x()}),_P=M({...mn.shape,username:M({displayName:x(),description:W(x())}),password:M({displayName:x(),description:W(x())}),...ke(zA,"BASIC_AUTH").shape});var dV=Ce(x(),je([_r,jn,Vn,Bn,Pr])),PP=M({...mn.shape,props:dV,...ke($e(),"CUSTOM_AUTH").shape});var gi=M({...mn.shape,...ke(M({auth:x()}),"SECRET_TEXT").shape});var pV=Ce(x(),je([_r,jn,gi,Vn,Bn,Pr,qn,Cp])),UA=M({...mn.shape,props:pV,...ke($e(),"OIDC").shape});var wP=(n=>(n.HEADER="HEADER",n.BODY="BODY",n))(wP||{}),MA=je([_r,gi,Pr]),FA=Ce(x(),MA),fV=M({props:W(Ce(x(),MA)),authUrl:x(),tokenUrl:x(),scope:Ae(x()),prompt:W(je([Ee("none"),Ee("consent"),Ee("login"),Ee("omit")])),pkce:W(Je()),pkceMethod:W(je([Ee("plain"),Ee("S256")])),authorizationMethod:W(xe(wP)),grantType:W(je([xe(tu),Ee(jv)])),extra:W(Ce(x(),x()))}),LA=M({access_token:x(),props:W(FA),data:Ce(x(),Hc())}),bP=M({...mn.shape,...fV.shape,...ke(LA,"OAUTH2").shape});var Sa=je([_P,PP,UA,bP,gi]),yu="Connection",xa={SecretText(e){return{...e,valueSchema:void 0,type:"SECRET_TEXT"}},OAuth2(e){return{...e,valueSchema:void 0,type:"OAUTH2",displayName:e.displayName||yu}},BasicAuth(e){return{...e,valueSchema:void 0,type:"BASIC_AUTH",displayName:e.displayName||yu,required:!0}},CustomAuth(e){return{...e,valueSchema:void 0,type:"CUSTOM_AUTH",displayName:e.displayName||yu}},OIDC(e){return{...e,valueSchema:void 0,type:"OIDC",displayName:e.displayName||yu}},None(){}};var $re={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 mV=M({...We.shape,...ke($e(),"CUSTOM").shape,code:x()});var hV=je([vP,Sa]),TP=Ce(x(),hV),Yre=Ce(x(),vP);var jA=je([M({strategy:Ee("CRON"),cronExpression:x()}),M({strategy:Ee("NONE")})]),Ia=class{constructor(t,n,o,r,i,s,u,h,g,y,T,b,P,S,R,I,l,m,d,v,p){this.name=t;this.displayName=n;this.description=o;this.requireAuth=r;this.props=i;this.type=s;this.handshakeConfiguration=u;this.onHandshake=h;this.renewConfiguration=g;this.onRenew=y;this.onEnable=T;this.onDisable=b;this.onStart=P;this.run=S;this.test=R;this.sampleData=I;this.testStrategy=l;this.outputSchema=m;this.aiMetadata=d;this.classification=v;this.propertyGroups=p}static{a(this,"ITrigger")}},Aa=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,yt(e.sampleData)&&yt(e.test)?"SIMULATION":"TEST_FUNCTION",e.outputSchema,e.aiMetadata,e.classification,e.propertyGroups)}},"createTrigger");var qA="2",_f="0.82.0";var EP=class{constructor(t,n,o,r,i,s,u,h,g=_f,y,T="",b){this.displayName=t;this.logoUrl=n;this.authors=o;this.events=r;this.categories=u;this.auth=h;this.minimumSupportedRelease=g;this.maximumSupportedRelease=y;this.description=T;this.deprecated=b;this._actions={};this._triggers={};this.getContextInfo=a(()=>({version:qA}),"getContextInfo");(!yV(g)||vV(g,_f))&&(this.minimumSupportedRelease=_f),i.forEach(P=>this._actions[P.name]=P),s.forEach(P=>this._triggers[P.name]=P)}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:gV(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}},VA=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 EP(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 gV(e){if(e!==void 0)return Array.isArray(e)?e.map(BA):BA(e)}a(gV,"withConnectionIdentifierFlag");function BA(e){return{...e,hasConnectionIdentifier:e.getConnectionIdentifier!==void 0}}a(BA,"flagConnectionIdentifier");function yV(e){return/^\d+\.\d+\.\d+$/.test(e)}a(yV,"isValidSimpleSemver");function vV(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(vV,"isSemverLessThan");var _V=W(Ce(x(),Ce(x(),x()))),GA=M({id:W(x()),name:x(),displayName:x(),logoUrl:x(),description:x(),authors:Ae(x()),platformId:W(x()),directoryPath:W(x()),auth:W(je([Sa,Ae(Sa)])),version:x(),categories:W(Ae(xe(ha))),minimumSupportedRelease:W(x()),maximumSupportedRelease:W(x()),deprecated:W(Je()),i18n:_V}),PV=xe(["human","ai","both"]),HA=M({description:W(x()),idempotent:W(Je())}),ZA=xe(["READ","SEARCH","WRITE","DESTRUCTIVE"]);var wV=xe(["tabs","section","summary","builder","footer"]),WA=M({key:x(),display:wV,label:W(x()),description:W(x()),icon:W(x()),props:Ae(x())}),KA=M({name:x(),displayName:x(),description:x(),props:TP,propertyGroups:W(Ae(WA)),requireAuth:Je(),errorHandlingOptions:W(Uv),outputSchema:W(Dp()),audience:W(PV),aiMetadata:W(HA),classification:W(ZA)}),JA=M({name:x(),displayName:x(),description:x(),props:TP,propertyGroups:W(Ae(WA)),errorHandlingOptions:W(Uv),type:xe(pn),sampleData:$e(),handshakeConfiguration:W(Dp()),renewConfiguration:W(jA),testStrategy:xe(nu),outputSchema:W(Dp()),aiMetadata:W(HA),classification:W(ZA)}),bV=M({...GA.shape,actions:Ce(x(),KA),triggers:Ce(x(),JA)}),TV=M({...GA.shape,actions:zt(),triggers:zt(),suggestedActions:W(Ae(KA)),suggestedTriggers:W(Ae(JA))}),XA=M({projectUsage:zt(),pieceType:xe(ma),packageType:xe(eu),platformId:W(x()),archiveId:W(x())}),toe=M({...bV.shape,...XA.shape}),roe=M({...TV.shape,...XA.shape}),noe=M({name:x(),version:x()});var EV=he(require("path")),SV=he(require("fs/promises"));var Ra=require("node:stream");var Pf=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 wf=class{static{a(this,"DelegatingAuthenticationConverter")}constructor(t=new SP,n=new xP){this.converters={BEARER_TOKEN:t,BASIC:n}}convert(t,n){return this.converters[t.type].convert(t,n)}},SP=class{static{a(this,"BearerTokenAuthenticationConverter")}convert(t,n){return n.Authorization=`Bearer ${t.token}`,n}},xP=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 vu=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 YA({error:e,requestBody:t}){return e instanceof vu?e.errorMessage():{response:{status:0,body:e instanceof Error?e.message:String(e)},request:{body:t}}}a(YA,"toFailsafeOutput");var Hn=(s=>(s.GET="GET",s.POST="POST",s.PATCH="PATCH",s.PUT="PUT",s.DELETE="DELETE",s.HEAD="HEAD",s))(Hn||{});var bf=class extends Pf{static{a(this,"FetchHttpClient")}constructor(t="",n=new wf){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[d,v]of Object.entries(s))r.append(d,v);let u=r.toString(),h=u?`${o}?${u}`:o,g=t.responseType??"json",y=t.followRedirects??!0,T=t.retries??0,{body:b,extraHeaders:P,isStream:S}=Tf(t.method)?xV(t.body,i):{body:void 0,extraHeaders:{},isStream:!1},R=AV({...i,...P}),I=await IV(async()=>{let d=new AbortController,v=t.timeout&&t.timeout>0?setTimeout(()=>d.abort(),t.timeout):void 0;try{let p={method:t.method.toString(),headers:R,body:b,redirect:y?"follow":"manual",signal:d.signal};return S&&(p.duplex="half"),n?.dispatcher!==void 0&&(p.dispatcher=n.dispatcher),await fetch(h,p)}finally{v!==void 0&&clearTimeout(v)}},S?0:T),l=y?300:400;if(I.status<200||I.status>=l){let d=await QA(I,g==="stream"?"text":g),v=new vu(t.body,{status:I.status,responseBody:d});throw console.error("[HttpClient#(sanitized error message)] Request failed:",v),v}let m=await QA(I,g);return{status:I.status,headers:RV(I.headers),body:m}}};function Tf(e){return e!=="GET"&&e!=="HEAD"}a(Tf,"acceptsRequestBody");function xV(e,t){if(tR(e))return{body:void 0,extraHeaders:{},isStream:!1};if(OV(e)){let o=DV(e);if(o!==null)return{body:o,extraHeaders:e.getHeaders(),isStream:!1};let r=new Ra.PassThrough;return e.on("error",i=>r.destroy(i)),e.pipe(r),{body:r,extraHeaders:e.getHeaders(),isStream:!0}}return e instanceof Ra.Readable?{body:e,extraHeaders:{},isStream:!0}:typeof e=="string"||Buffer.isBuffer(e)||e instanceof URLSearchParams||e instanceof ArrayBuffer||typeof FormData<"u"&&e instanceof FormData||typeof Blob<"u"&&e instanceof Blob?{body:e,extraHeaders:{},isStream:!1}:(t["Content-Type"]??t["content-type"]??"").includes("application/x-www-form-urlencoded")?{body:new URLSearchParams(e).toString(),extraHeaders:{},isStream:!1}:{body:JSON.stringify(e),extraHeaders:{},isStream:!1}}a(xV,"serializeBody");async function QA(e,t){switch(t){case"arraybuffer":return Buffer.from(await e.arrayBuffer());case"stream":return tR(e.body)?Ra.Readable.from([]):Ra.Readable.fromWeb(e.body);case"blob":return await e.blob();case"text":return await e.text();default:{let n=await e.text();if(n.length===0)return;try{return JSON.parse(n)}catch{return n}}}}a(QA,"parseResponseBody");async function IV(e,t){let n;for(let o=0;o<=t;o++)try{let r=await e();if(r.status>=500&&o<t){await eR(o);continue}return r}catch(r){if(n=r,o<t){await eR(o);continue}throw r}throw n}a(IV,"sendWithRetries");function eR(e){let t=Math.min(1e3*2**e,3e4);return new Promise(n=>setTimeout(n,t))}a(eR,"backoff");function AV(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(AV,"normalizeHeaders");function RV(e){let t={};return e.forEach((n,o)=>{t[o]=n}),t}a(RV,"toHttpHeaders");function DV(e){if(!e.hasKnownLength()||e.getLengthSync()>$V)return null;let{data:t}=Gv(()=>e.getBuffer());return t}a(DV,"bufferFormDataIfSafe");function OV(e){return typeof e=="object"&&e!==null&&typeof e.getHeaders=="function"&&typeof e.pipe=="function"&&typeof e.on=="function"}a(OV,"isNodeFormData");function tR(e){return e==null}a(tR,"isNil");var $V=100*1024*1024;var Yt=new bf;var _6=he(require("fs"));var P6={"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 w6(e){let t=e.split(";")[0].trim().toLowerCase();return P6[t]??""}a(w6,"contentTypeToExtension");var b6=a(({baseUrl:e,relativePath:t})=>{let n=e.endsWith("/")?e:`${e}/`,o=t.startsWith("/")?t.slice(1):t;return`${n}${o}`},"joinBaseUrlWithRelativePath"),T6=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 n0({auth:e,baseUrl:t,authMapping:n,description:o,displayName:r,name:i,props:s,extraProps:u,authLocation:h="headers",classification:g="WRITE"}){return re({audience:"human",name:i||"custom_api_call",classification:g,displayName:r||"Custom API Call",description:o||"Make a custom API call to a specific endpoint",auth:e,requireAuth:!!e,props:{url:$.DynamicProperties({auth:e,displayName:"",required:!0,refreshers:[],props:a(async({auth:y})=>({url:$.ShortText({displayName:"URL",description:`Full URL, or a path relative to ${T6(t,y)}`,required:!0,placeholder:"/resource",defaultValue:y?t(y):"",...s?.url??{}})}),"props")}),method:$.StaticDropdown({displayName:"Method",required:!0,defaultValue:"GET",options:{options:Object.values(Hn).map(y=>({label:y,value:y}))},...s?.method??{}}),headers:$.Object({displayName:"Headers",description:"Authorization headers are injected automatically from your connection.",required:!1,...s?.headers??{}}),queryParams:$.Object({displayName:"Query Parameters",description:"Appended to the URL as ?key=value.",required:!1,...s?.queryParams??{}}),body_type:$.Dropdown({auth:e,displayName:"Body Type",required:!1,defaultValue:"none",refreshers:["method"],options:a(async({method:y})=>Tf(y)?{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:$.DynamicProperties({auth:e,displayName:"Body",refreshers:["body_type","method"],required:!1,props:a(async({body_type:y,method:T})=>{if(!y||!Tf(T))return{};let b=y,P={};switch(b){case"none":break;case"json":P.data=$.Json({displayName:"JSON Body",required:!0,...s?.body??{}});break;case"raw":P.data=$.LongText({displayName:"Raw Body",required:!0});break;case"form_data":P.data=$.Array({displayName:"Form Data",required:!0,properties:{fieldName:$.ShortText({displayName:"Field Name",required:!0}),fieldType:$.StaticDropdown({displayName:"Field Type",required:!0,options:{disabled:!1,options:[{label:"Text",value:"text"},{label:"File",value:"file"}]}}),textFieldValue:$.LongText({displayName:"Text Field Value",required:!1}),fileFieldValue:$.File({displayName:"File Field Value",required:!1})}});break}return P},"props")}),response_is_binary:$.Checkbox({displayName:"Response is Binary",description:"Enable for files like PDFs, images, etc.",required:!1,defaultValue:!1,advanced:!0,...s?.response_is_binary??{}}),failsafe:$.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:$.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:$.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 y=>{let{method:T,url:b,headers:P,queryParams:S,body:R,body_type:I,failsafe:l,timeout:m,response_is_binary:d,followRedirects:v}=y.propsValue;kp(T,"Method"),kp(b,"URL");let p=yt(n)?{}:await n(y.auth,y.propsValue),E=b.url,_=E.startsWith("http://")||E.startsWith("https://")?E:b6({baseUrl:t(y.auth),relativePath:E}),pe={method:T,url:_,headers:{...P??{},...h==="headers"||!yt(h)?p:{}},queryParams:{...h==="queryParams"?p:{},...S??{}},timeout:m?m*1e3:0,followRedirects:v};if(d&&(pe.responseType="arraybuffer"),R)if(I&&I!=="none"){let oe=R.data;if(I==="form_data"){let Be=oe,{default:me}=await Promise.resolve().then(()=>he(Tu())),ee=new me;for(let{fieldName:Q,fieldType:se,textFieldValue:ne,fileFieldValue:ge}of Be)se==="text"&&!ou(ne)?ee.append(Q,ne):se==="file"&&!ou(ge)&&ee.append(Q,ge.data,{filename:ge?.filename});pe.body=ee,pe.headers={...pe.headers,...ee.getHeaders()}}else pe.body=oe}else I||(pe.body=R);try{let oe=await Yt.sendRequest(pe);return await E6(y.files,oe.body,oe.status,oe.headers,d)}catch(oe){if(l)return YA({error:oe,requestBody:pe.body});throw oe}},"run")})}a(n0,"createCustomApiCallAction");var E6=a(async(e,t,n,o,r)=>{let i;if(r&&S6(t)){let s=Array.isArray(o?.["content-type"])?o["content-type"][0]:o?.["content-type"],u=w6(s??"")||"txt",h;t instanceof ArrayBuffer?h=Buffer.from(new Uint8Array(t)):Buffer.isBuffer(t)?h=t:h=Buffer.from(t),i=await e.write({fileName:`output.${u}`,data:h})}else i=t;return{status:n,headers:o,body:i}},"handleBinaryResponse"),S6=a(e=>e instanceof ArrayBuffer||Buffer.isBuffer(e),"isBinaryBody");var Qt={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(yt(u))throw new Error("lastPoll doesn't exist in the store.");let h=await e.items({store:t,auth:n,propsValue:o,lastFetchEpochMS:u,server:s}),g=h.reduce((y,T)=>Math.max(y,T.epochMilliSeconds),u);return await t.put("lastPoll",g),h.filter(y=>y.epochMilliSeconds>u).map(y=>y.data)}case 1:{let u=await t.get("lastItem"),h=await e.items({store:t,auth:n,propsValue:o,lastItemId:u,files:i,server:s}),g=h.findIndex(b=>b.id===u),y=[];yt(u)||g==-1?y=h??[]:y=h?.slice(0,g)??[],yt(r)||(y=y.slice(-r));let T=y?.[0]?.id;return yt(T)||await t.put("lastItem",T),y.map(b=>b.data)}}},async onEnable(e,{store:t,auth:n,propsValue:o,server:r,isRepublish:i}){switch(e.strategy){case 0:{if(i&&!yt(await t.get("lastPoll")))break;await t.put("lastPoll",Date.now());break}case 1:{if(i&&!yt(await t.get("lastItem")))break;let u=(await e.items({store:t,auth:n,propsValue:o,lastItemId:null,server:r}))?.[0]?.id;yt(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 x6(s.map(u=>u.data))}};function x6(e){return e.length<=5?e:e.slice(0,5)}a(x6,"getFirstFiveOrAll");var o0=require("node:stream");function I6(e){return"body"in e?{body:e.body,size:e.size}:{body:o0.Readable.from(e.data),size:e.data.length}}a(I6,"toStreamingBody");async function*A6({readable:e,chunkSize:t}){let n=[],o=0;for await(let r of e)for(n.push(Buffer.isBuffer(r)?r:Buffer.from(r)),o+=n[n.length-1].length;o>=t;){let i=n.length===1?n[0]:Buffer.concat(n);yield i.subarray(0,t);let s=i.subarray(t);n=s.length>0?[s]:[],o=s.length}o>0&&(yield n.length===1?n[0]:Buffer.concat(n))}a(A6,"readChunks");var i0={readChunks:A6,toStreamingBody:I6};var Wm=he(tl());var dN=["https://www.googleapis.com/auth/drive","email"],Y=[xa.OAuth2({description:"",authUrl:"https://accounts.google.com/o/oauth2/auth",tokenUrl:"https://oauth2.googleapis.com/token",required:!0,scope:dN}),xa.CustomAuth({displayName:"Service Account (Advanced)",description:"Authenticate via service account from https://console.cloud.google.com/ > IAM & Admin > Service Accounts > Create Service Account > Keys > Add key. <br> <br> You can optionally use domain-wide delegation (https://support.google.com/a/answer/162106?hl=en#zippy=%2Cset-up-domain-wide-delegation-for-a-client) to access files without adding the service account to each one. <br> <br> **Note:** Without a user email, the service account only has access to files/folders you explicitly share with it.",required:!0,props:{serviceAccount:$.LongText({displayName:"Service Account JSON Key",required:!0}),userEmail:$.ShortText({displayName:"User Email",required:!1,description:"Email address of the user to impersonate for domain-wide delegation."})},validate:a(async({auth:e})=>{try{await bt({type:"CUSTOM_AUTH",props:{...e}})}catch(t){return{valid:!1,error:t.message}}return{valid:!0}},"validate")})];async function de(e){if(e.type==="CUSTOM_AUTH"){let n;try{n=JSON.parse(e.props.serviceAccount)}catch{throw new Error("Invalid Service Account JSON Key. Please provide a valid JSON string.")}return new Wm.JWT({email:n.client_email,key:n.private_key,scopes:dN,subject:e.props.userEmail})}let t=new Wm.OAuth2Client;return t.setCredentials(e),t}a(de,"createGoogleClient");var bt=a(async e=>{if(e.type==="CUSTOM_AUTH"){let n=await(await de(e)).getAccessToken();if(n.token)return n.token;throw new Error("Could not retrieve access token from service account json")}return e.access_token},"getAccessToken");var Dz=he(ze());var fh=he(fl()),JT=he(ze());var vJ=1e3,ml=a(e=>e.replace(/\\/g,"\\\\").replace(/'/g,"\\'"),"escapeDriveQueryLiteral");async function Ok({auth:e,searchValue:t,includeTeamDrives:n}){if(!e)return{disabled:!0,options:[],placeholder:"Connect your Google account first"};let o=await bt(e),r=t?.trim()??"",i=["mimeType='application/vnd.google-apps.folder'","trashed = false"];r.length>0&&i.push(`name contains '${ml(r)}'`);let s={method:"GET",url:"https://www.googleapis.com/drive/v3/files",queryParams:{q:i.join(" and "),includeItemsFromAllDrives:n?"true":"false",supportsAllDrives:"true",corpora:n?"allDrives":"user",pageSize:String(vJ),fields:"nextPageToken, files(id, name)"},authentication:{type:"BEARER_TOKEN",token:o}},u=[],h=!1;try{let g=await Yt.sendRequest(s);u=g.body.files??[],h=!!g.body.nextPageToken}catch(g){throw new Error(`Failed to get folders
108
- Error:${g}`)}return{disabled:!1,placeholder:h?`Showing the first ${u.length} matches. Type to narrow the list, or paste an ID with Dynamic value.`:void 0,options:u.map(g=>({label:g.name,value:g.id}))}}a(Ok,"fetchFolderDropdownOptions");function Dk({displayName:e,description:t}){return $.Dropdown({displayName:e,description:t,required:!1,auth:Y,refreshers:["include_team_drives"],refreshOnSearch:!0,options:a(async({auth:n,include_team_drives:o},r)=>Ok({auth:n,searchValue:r?.searchValue,includeTeamDrives:o}),"options")})}a(Dk,"parentFolderDropdown");var Ne={properties:{parentFolder:Dk({displayName:"Parent Folder",description:"Leave empty for the root of My Drive. Type to search by folder name."}),include_team_drives:$.Checkbox({displayName:"Include Team Drives",description:"Also include shared drives, not only My Drive.",defaultValue:!1,required:!1})},parentFolderDropdown:Dk,escapeDriveQueryLiteral:ml,fetchFolderDropdownOptions:Ok,async getFiles(e,t,n){let o=await de(e),r=(0,JT.drive)({version:"v3",auth:o}),i=[];if(t?.parent&&i.push(`'${ml(t.parent)}' in parents`),t?.createdTime&&i.push(`createdTime ${t.createdTimeOp??">"} '${(0,fh.default)(t.createdTime).format()}'`),t?.changedSince){let g=(0,fh.default)(t.changedSince).format();i.push(`(modifiedTime > '${g}' or createdTime > '${g}')`)}t?.mimeTypes?.length&&i.push(`(${t.mimeTypes.map(g=>`mimeType='${ml(g)}'`).join(" or ")})`),t?.excludeShortcuts&&i.push("mimeType!='application/vnd.google-apps.shortcut'"),i.push("trashed = false");let s=[],u,h=0;do{let g={q:i.concat("mimeType!='application/vnd.google-apps.folder'").join(" and "),fields:"nextPageToken, files(id, name, mimeType, webViewLink, kind, createdTime, modifiedTime)",orderBy:n??"createdTime desc",supportsAllDrives:!0,includeItemsFromAllDrives:t?.includeTeamDrive,corpora:t?.includeTeamDrive?"allDrives":"user"};u&&(g.pageToken=u);let y=await r.files.list(g);if(s.push(...y.data.files??[]),u=y.data.nextPageToken??void 0,h+=1,t?.maxPages&&h>=t.maxPages)break}while(u);return s},async getFolders(e,t,n){let o=await de(e),r=(0,JT.drive)({version:"v3",auth:o}),i=["mimeType='application/vnd.google-apps.folder'"];t?.parent&&i.push(`'${ml(t.parent)}' in parents`),t?.createdTime&&i.push(`createdTime ${t.createdTimeOp??">"} '${(0,fh.default)(t.createdTime).format()}'`),i.push("trashed = false");let s=[],u;do{let h={q:i.join(" and "),fields:"nextPageToken, files(id, name, createdTime)",orderBy:n??"createdTime desc",supportsAllDrives:!0,includeItemsFromAllDrives:t?.includeTeamDrive,corpora:t?.includeTeamDrive?"allDrives":"user"};u&&(h.pageToken=u);let g=await r.files.list(h);s.push(...g.data.files??[]),u=g.data.nextPageToken??void 0}while(u);return s}};var $k={fields:[{key:"name",label:"Folder Name"},{key:"id",label:"Folder ID"},{key:"mimeType",label:"MIME Type"},{key:"kind",label:"Kind"}]},Ck={fields:[{key:"name",label:"File Name"},{key:"id",label:"File ID"},{key:"mimeType",label:"MIME Type"},{key:"kind",label:"Kind"}]},Nk={fields:[{key:"name",label:"File Name"},{key:"id",label:"File ID"},{key:"mimeType",label:"MIME Type"},{key:"kind",label:"Kind"}]},kk={fields:[{key:"file",label:"File URL",value:"",format:"url"}]},zk={fields:[{key:"name",label:"Name"},{key:"id",label:"File ID"},{key:"mimeType",label:"MIME Type"},{key:"kind",label:"Kind"}]},Uk={fields:[{key:"files",label:"Files",labelKey:"name",listItems:[{key:"name",label:"Name",value:"name"},{key:"id",label:"File ID",value:"id"},{key:"mimeType",label:"MIME Type",value:"mimeType"},{key:"trashed",label:"Trashed",value:"trashed",format:"boolean"},{key:"parents",label:"Parent Folder ID",value:"parents[0]"},{key:"downloadedFile",label:"Downloaded File URL",value:"downloadedFile",format:"url"}]},{key:"incompleteSearch",label:"Incomplete Search",value:"incompleteSearch",format:"boolean"}]},Mk={fields:[{key:"results",label:"Results",value:"",labelKey:"name",listItems:[{key:"name",label:"Name",value:"name"},{key:"mimeType",label:"MIME Type",value:"mimeType"},{key:"id",label:"File ID",value:"id"},{key:"createdTime",label:"Created Time",value:"createdTime",format:"datetime"},{key:"modifiedTime",label:"Modified Time",value:"modifiedTime",format:"datetime"}]}]},Fk={fields:[{key:"name",label:"File Name"},{key:"id",label:"File ID"},{key:"mimeType",label:"MIME Type"},{key:"kind",label:"Kind"}]},Lk={fields:[{key:"name",label:"File Name"},{key:"id",label:"File ID"},{key:"mimeType",label:"MIME Type"},{key:"kind",label:"Kind"}]},jk={fields:[{key:"name",label:"File Name"},{key:"id",label:"File ID"},{key:"mimeType",label:"MIME Type"},{key:"webViewLink",label:"View Link",format:"url"},{key:"webContentLink",label:"Download Link",format:"url"},{key:"iconLink",label:"Icon",format:"image"},{key:"size",label:"Size",format:"filesize"},{key:"fileExtension",label:"File Extension"},{key:"starred",label:"Starred",format:"boolean"},{key:"trashed",label:"Trashed",format:"boolean"},{key:"shared",label:"Shared",format:"boolean"},{key:"createdTime",label:"Created Time",format:"datetime"},{key:"modifiedTime",label:"Modified Time",format:"datetime"},{key:"parents",label:"Parent Folder IDs"},{key:"owners",label:"Owners",labelKey:"displayName",listItems:[{key:"displayName",label:"Name"},{key:"emailAddress",label:"Email",format:"email"},{key:"photoLink",label:"Photo",format:"image"},{key:"me",label:"Is Me",format:"boolean"}]},{key:"lastModifyingUser",label:"Last Modifying User",children:[{key:"displayName",label:"Name"},{key:"emailAddress",label:"Email",format:"email"},{key:"photoLink",label:"Photo",format:"image"}]},{key:"permissions",label:"Permissions",labelKey:"displayName",listItems:[{key:"displayName",label:"Name"},{key:"emailAddress",label:"Email",format:"email"},{key:"role",label:"Role"},{key:"type",label:"Type"},{key:"id",label:"Permission ID"}]}]},qk={fields:[{key:"type",label:"Type"},{key:"role",label:"Role"},{key:"id",label:"Permission ID"},{key:"allowFileDiscovery",label:"Allow File Discovery",format:"boolean"},{key:"downloadUrl",label:"Download URL",format:"url"},{key:"kind",label:"Kind"}]},Bk={fields:[{key:"role",label:"Role"},{key:"type",label:"Type"},{key:"id",label:"Permission ID"}]},Vk={fields:[{key:"removed",label:"Removed",value:"removed",format:"boolean"},{key:"message",label:"Message",value:"message"}]},Gk={fields:[{key:"name",label:"File Name"},{key:"id",label:"File ID"},{key:"mimeType",label:"MIME Type"},{key:"kind",label:"Kind"}]},Hk={fields:[{key:"name",label:"File Name"},{key:"modifiedTime",label:"Modified Time",format:"datetime"},{key:"webViewLink",label:"View Link",format:"url"},{key:"mimeType",label:"MIME Type"},{key:"createdTime",label:"Created Time",format:"datetime"},{key:"id",label:"File ID"}]},Zk={fields:[{key:"changeType",label:"Change Type"},{key:"content",label:"File Content"},{key:"contentError",label:"File Content Error"},{key:"name",label:"File Name"},{key:"webViewLink",label:"View Link",format:"url"},{key:"mimeType",label:"MIME Type"},{key:"createdTime",label:"Created Time",format:"datetime"},{key:"modifiedTime",label:"Modified Time",format:"datetime"},{key:"id",label:"File ID"}]},Wk={fields:[{key:"name",label:"Folder Name"},{key:"id",label:"Folder ID"},{key:"createdTime",label:"Created Time",format:"datetime"}]},_J=[{key:"id",label:"File ID"},{key:"name",label:"File Name"},{key:"mimeType",label:"MIME Type"},{key:"size",label:"Size",format:"filesize"},{key:"createdTime",label:"Created Time",format:"datetime"},{key:"modifiedTime",label:"Modified Time",format:"datetime"},{key:"webViewLink",label:"View Link",format:"url"},{key:"webContentLink",label:"Download Link",format:"url"},{key:"iconLink",label:"Icon",format:"image"},{key:"fileExtension",label:"File Extension"},{key:"starred",label:"Starred",format:"boolean"},{key:"trashed",label:"Trashed",format:"boolean"},{key:"shared",label:"Shared",format:"boolean"},{key:"parents",label:"Parent Folder IDs"},{key:"owners",label:"Owners",labelKey:"displayName",listItems:[{key:"displayName",label:"Name"},{key:"emailAddress",label:"Email",format:"email"},{key:"photoLink",label:"Photo",format:"image"},{key:"me",label:"Is Me",format:"boolean"}]},{key:"lastModifyingUser",label:"Last Modifying User",children:[{key:"displayName",label:"Name"},{key:"emailAddress",label:"Email",format:"email"},{key:"photoLink",label:"Photo",format:"image"}]}],Kk={fields:_J},Jk={fields:[{key:"files",label:"Files",labelKey:"name",listItems:[{key:"id",label:"File ID"},{key:"name",label:"File Name"},{key:"mimeType",label:"MIME Type"},{key:"size",label:"Size",format:"filesize"},{key:"createdTime",label:"Created Time",format:"datetime"},{key:"modifiedTime",label:"Modified Time",format:"datetime"},{key:"webViewLink",label:"View Link",format:"url"},{key:"webContentLink",label:"Download Link",format:"url"},{key:"fileExtension",label:"File Extension"},{key:"starred",label:"Starred",format:"boolean"},{key:"trashed",label:"Trashed",format:"boolean"},{key:"shared",label:"Shared",format:"boolean"},{key:"downloadedFile",label:"Downloaded File URL",format:"url"}]},{key:"incompleteSearch",label:"Incomplete Search",format:"boolean"}]},Xk={fields:[{key:"files",label:"Search Results",labelKey:"name",listItems:[{key:"id",label:"File ID"},{key:"name",label:"File Name"},{key:"mimeType",label:"MIME Type"},{key:"size",label:"Size",format:"filesize"},{key:"createdTime",label:"Created Time",format:"datetime"},{key:"modifiedTime",label:"Modified Time",format:"datetime"},{key:"webViewLink",label:"View Link",format:"url"},{key:"webContentLink",label:"Download Link",format:"url"},{key:"fileExtension",label:"File Extension"}]}]},Yk={fields:[{key:"id",label:"File ID"},{key:"name",label:"File Name"},{key:"mimeType",label:"MIME Type"},{key:"createdTime",label:"Created Time",format:"datetime"},{key:"modifiedTime",label:"Modified Time",format:"datetime"},{key:"webViewLink",label:"View Link",format:"url"},{key:"webContentLink",label:"Download Link",format:"url"},{key:"fileExtension",label:"File Extension"},{key:"size",label:"Size",format:"filesize"},{key:"parents",label:"Parent Folder IDs"},{key:"owners",label:"Owners",labelKey:"displayName",listItems:[{key:"displayName",label:"Name"},{key:"emailAddress",label:"Email",format:"email"},{key:"photoLink",label:"Photo",format:"image"},{key:"me",label:"Is Me",format:"boolean"}]},{key:"lastModifyingUser",label:"Last Modifying User",children:[{key:"displayName",label:"Name"},{key:"emailAddress",label:"Email",format:"email"},{key:"photoLink",label:"Photo",format:"image"}]},{key:"shared",label:"Shared",format:"boolean"}]},Qk={fields:[{key:"id",label:"File ID"},{key:"name",label:"File Name"},{key:"mimeType",label:"MIME Type"},{key:"size",label:"Size",format:"filesize"},{key:"createdTime",label:"Created Time",format:"datetime"},{key:"modifiedTime",label:"Modified Time",format:"datetime"},{key:"webViewLink",label:"View Link",format:"url"},{key:"webContentLink",label:"Download Link",format:"url"},{key:"iconLink",label:"Icon",format:"image"},{key:"fileExtension",label:"File Extension"},{key:"parents",label:"Parent Folder IDs"},{key:"owners",label:"Owners",labelKey:"displayName",listItems:[{key:"displayName",label:"Name"},{key:"emailAddress",label:"Email",format:"email"},{key:"me",label:"Is Me",format:"boolean"}]}]},ez={fields:[{key:"id",label:"File ID"},{key:"name",label:"File Name"},{key:"mimeType",label:"MIME Type"},{key:"size",label:"Size",format:"filesize"},{key:"createdTime",label:"Created Time",format:"datetime"},{key:"modifiedTime",label:"Modified Time",format:"datetime"},{key:"webViewLink",label:"View Link",format:"url"},{key:"webContentLink",label:"Download Link",format:"url"},{key:"fileExtension",label:"File Extension"},{key:"parents",label:"Parent Folder IDs"},{key:"owners",label:"Owners",labelKey:"displayName",listItems:[{key:"displayName",label:"Name"},{key:"emailAddress",label:"Email",format:"email"},{key:"me",label:"Is Me",format:"boolean"}]}]},tz={fields:[{key:"id",label:"File ID"},{key:"name",label:"File Name"},{key:"mimeType",label:"MIME Type"},{key:"size",label:"Size",format:"filesize"},{key:"createdTime",label:"Created Time",format:"datetime"},{key:"modifiedTime",label:"Modified Time",format:"datetime"},{key:"webViewLink",label:"View Link",format:"url"},{key:"webContentLink",label:"Download Link",format:"url"},{key:"fileExtension",label:"File Extension"},{key:"parents",label:"Parent Folder IDs"},{key:"shared",label:"Shared",format:"boolean"},{key:"owners",label:"Owners",labelKey:"displayName",listItems:[{key:"displayName",label:"Name"},{key:"emailAddress",label:"Email",format:"email"},{key:"me",label:"Is Me",format:"boolean"}]}]},rz={fields:[{key:"id",label:"File ID"},{key:"name",label:"File Name"},{key:"description",label:"Description"},{key:"mimeType",label:"MIME Type"},{key:"createdTime",label:"Created Time",format:"datetime"},{key:"modifiedTime",label:"Modified Time",format:"datetime"},{key:"starred",label:"Starred",format:"boolean"},{key:"trashed",label:"Trashed",format:"boolean"},{key:"webViewLink",label:"View Link",format:"url"},{key:"size",label:"Size",format:"filesize"}]},nz={fields:[{key:"id",label:"Permission ID"},{key:"type",label:"Type"},{key:"role",label:"Role"},{key:"emailAddress",label:"Email Address",format:"email"},{key:"displayName",label:"Display Name"},{key:"photoLink",label:"Photo",format:"image"},{key:"pendingOwner",label:"Pending Owner",format:"boolean"},{key:"deleted",label:"Deleted",format:"boolean"},{key:"permissionDetails",label:"Permission Details",labelKey:"role",listItems:[{key:"role",label:"Role"},{key:"permissionType",label:"Permission Type"},{key:"inherited",label:"Inherited",format:"boolean"}]}]},oz={fields:[{key:"permissions",label:"Permissions",labelKey:"displayName",listItems:[{key:"id",label:"Permission ID"},{key:"type",label:"Type"},{key:"role",label:"Role"},{key:"emailAddress",label:"Email Address",format:"email"},{key:"displayName",label:"Display Name"},{key:"photoLink",label:"Photo",format:"image"},{key:"deleted",label:"Deleted",format:"boolean"},{key:"pendingOwner",label:"Pending Owner",format:"boolean"}]}]},iz={fields:[{key:"id",label:"Permission ID"},{key:"type",label:"Type"},{key:"role",label:"Role"},{key:"allowFileDiscovery",label:"Allow File Discovery",format:"boolean"},{key:"permissionDetails",label:"Permission Details",labelKey:"role",listItems:[{key:"role",label:"Role"},{key:"permissionType",label:"Permission Type"},{key:"inherited",label:"Inherited",format:"boolean"}]}]},az={fields:[{key:"id",label:"Permission ID"},{key:"type",label:"Type"},{key:"role",label:"Role"},{key:"emailAddress",label:"Email Address",format:"email"},{key:"displayName",label:"Display Name"},{key:"photoLink",label:"Photo",format:"image"}]},sz={fields:[{key:"id",label:"File ID"},{key:"name",label:"File Name"},{key:"trashed",label:"Trashed",format:"boolean"},{key:"modifiedTime",label:"Modified Time",format:"datetime"},{key:"webViewLink",label:"View Link",format:"url"}]},cz={fields:[{key:"id",label:"File ID"},{key:"name",label:"File Name"},{key:"trashed",label:"Trashed",format:"boolean"},{key:"createdTime",label:"Created Time",format:"datetime"},{key:"modifiedTime",label:"Modified Time",format:"datetime"},{key:"webViewLink",label:"View Link",format:"url"}]},uz={fields:[{key:"id",label:"File ID"},{key:"name",label:"File Name"},{key:"mimeType",label:"MIME Type"},{key:"size",label:"Size",format:"filesize"},{key:"modifiedTime",label:"Modified Time",format:"datetime"},{key:"webViewLink",label:"View Link",format:"url"}]},lz={fields:[{key:"user",label:"Current User",children:[{key:"displayName",label:"Display Name"},{key:"emailAddress",label:"Email Address",format:"email"},{key:"photoLink",label:"Photo",format:"image"},{key:"me",label:"Is Me",format:"boolean"},{key:"permissionId",label:"Permission ID"}]},{key:"storageQuota",label:"Storage Quota",children:[{key:"limit",label:"Total Limit",format:"filesize"},{key:"usage",label:"Used Space",format:"filesize"},{key:"usageInDrive",label:"Used in Drive",format:"filesize"},{key:"usageInDriveTrash",label:"Used in Trash",format:"filesize"}]},{key:"maxUploadSize",label:"Max Upload Size",format:"filesize"}]},dz={fields:[{key:"drives",label:"Shared Drives",labelKey:"name",listItems:[{key:"id",label:"Drive ID"},{key:"name",label:"Drive Name"},{key:"kind",label:"Kind"},{key:"colorRgb",label:"Color"},{key:"createdTime",label:"Created Time",format:"datetime"}]}]},pz={fields:[{key:"id",label:"Drive ID"},{key:"name",label:"Drive Name"},{key:"kind",label:"Kind"},{key:"colorRgb",label:"Color"},{key:"createdTime",label:"Created Time",format:"datetime"},{key:"restrictions",label:"Restrictions",children:[{key:"adminManagedRestrictions",label:"Admin Managed",format:"boolean"},{key:"copyRequiresWriterPermission",label:"Copy Requires Writer Permission",format:"boolean"},{key:"domainUsersOnly",label:"Domain Users Only",format:"boolean"},{key:"driveMembersOnly",label:"Drive Members Only",format:"boolean"}]}]},fz={fields:[{key:"comments",label:"Comments",labelKey:"content",listItems:[{key:"id",label:"Comment ID"},{key:"content",label:"Content"},{key:"createdTime",label:"Created Time",format:"datetime"},{key:"modifiedTime",label:"Modified Time",format:"datetime"},{key:"author",label:"Author",children:[{key:"displayName",label:"Name"},{key:"emailAddress",label:"Email",format:"email"},{key:"photoLink",label:"Photo",format:"image"}]}]}]},mz={fields:[{key:"id",label:"Reply ID"},{key:"content",label:"Content"},{key:"createdTime",label:"Created Time",format:"datetime"},{key:"modifiedTime",label:"Modified Time",format:"datetime"},{key:"author",label:"Author",children:[{key:"displayName",label:"Name"},{key:"emailAddress",label:"Email",format:"email"},{key:"photoLink",label:"Photo",format:"image"},{key:"me",label:"Is Me",format:"boolean"}]}]},hz={fields:[{key:"id",label:"Comment ID"},{key:"content",label:"Content"},{key:"createdTime",label:"Created Time",format:"datetime"},{key:"modifiedTime",label:"Modified Time",format:"datetime"},{key:"author",label:"Author",children:[{key:"displayName",label:"Name"},{key:"emailAddress",label:"Email",format:"email"},{key:"photoLink",label:"Photo",format:"image"},{key:"me",label:"Is Me",format:"boolean"}]}]},gz={fields:[{key:"id",label:"Reply ID"},{key:"content",label:"Content"},{key:"htmlContent",label:"HTML Content",format:"html"},{key:"createdTime",label:"Created Time",format:"datetime"},{key:"modifiedTime",label:"Modified Time",format:"datetime"},{key:"deleted",label:"Deleted",format:"boolean"},{key:"author",label:"Author",children:[{key:"displayName",label:"Name"},{key:"emailAddress",label:"Email",format:"email"},{key:"photoLink",label:"Photo",format:"image"},{key:"me",label:"Is Me",format:"boolean"}]}]},yz={fields:[{key:"replies",label:"Replies",labelKey:"content",listItems:[{key:"id",label:"Reply ID"},{key:"content",label:"Content"},{key:"createdTime",label:"Created Time",format:"datetime"},{key:"modifiedTime",label:"Modified Time",format:"datetime"},{key:"deleted",label:"Deleted",format:"boolean"},{key:"author",label:"Author",children:[{key:"displayName",label:"Name"},{key:"emailAddress",label:"Email",format:"email"},{key:"photoLink",label:"Photo",format:"image"}]}]}]},vz={fields:[{key:"id",label:"Reply ID"},{key:"content",label:"Content"},{key:"modifiedTime",label:"Modified Time",format:"datetime"},{key:"deleted",label:"Deleted",format:"boolean"},{key:"author",label:"Author",children:[{key:"displayName",label:"Name"},{key:"emailAddress",label:"Email",format:"email"},{key:"photoLink",label:"Photo",format:"image"},{key:"me",label:"Is Me",format:"boolean"}]}]},_z={fields:[{key:"id",label:"File ID"},{key:"name",label:"File Name"},{key:"mimeType",label:"MIME Type"},{key:"size",label:"Size",format:"filesize"},{key:"createdTime",label:"Created Time",format:"datetime"},{key:"modifiedTime",label:"Modified Time",format:"datetime"},{key:"webViewLink",label:"View Link",format:"url"}]},Pz={fields:[{key:"id",label:"Folder ID"},{key:"name",label:"Folder Name"},{key:"mimeType",label:"MIME Type"},{key:"kind",label:"Kind"},{key:"createdTime",label:"Created Time",format:"datetime"},{key:"parents",label:"Parent Folder IDs"},{key:"webViewLink",label:"View Link",format:"url"}]},wz={fields:[{key:"id",label:"Drive ID"},{key:"name",label:"Drive Name"},{key:"kind",label:"Kind"},{key:"colorRgb",label:"Color"},{key:"createdTime",label:"Created Time",format:"datetime"}]},bz={fields:[{key:"id",label:"Drive ID"},{key:"name",label:"Drive Name"},{key:"kind",label:"Kind"},{key:"colorRgb",label:"Color"},{key:"createdTime",label:"Created Time",format:"datetime"}]},Tz={fields:[{key:"id",label:"File ID"},{key:"name",label:"File Name"},{key:"mimeType",label:"MIME Type"},{key:"kind",label:"Kind"}]},Ez={fields:[{key:"file",label:"File URL",value:"",format:"url"}]},Sz={fields:[{key:"file",label:"File URL",value:"",format:"url"}]},xz={fields:[{key:"success",label:"Success",format:"boolean"},{key:"reply_id",label:"Reply ID"}]},Iz={fields:[{key:"deleted",label:"Deleted",format:"boolean"},{key:"driveId",label:"Drive ID"}]},Az={fields:[{key:"success",label:"Success",format:"boolean"},{key:"driveId",label:"Drive ID"}]},Rz={fields:[{key:"removed",label:"Removed",format:"boolean"},{key:"message",label:"Message"}]};var Oz=re({auth:Y,name:"update_permissions",classification:"WRITE",description:"Give a person a role on a file or folder by email.",audience:"human",aiMetadata:{description:"Grants a specified role (reader, commenter, writer, fileOrganizer, or organizer) on a Drive file or folder to a user identified by email, optionally sending a notification email. Use to share a resource with a person. Requires the file/folder ID and target email. Not idempotent: each call creates a new permission grant.",idempotent:!1},displayName:"Share File or Folder",props:{fileId:$.ShortText({displayName:"File or Folder ID",description:"The ID from the item's Drive URL or an earlier step.",required:!0,placeholder:"1dpv4-sKJfKRwI9qx1vWqQhEGEn3EpbI5"}),user_email:$.ShortText({displayName:"User Email",description:"The person who receives the access.",required:!0,placeholder:"name@example.com"}),permission_name:$.StaticDropdown({displayName:"Role",description:"What the person can do. Manager roles apply to shared drives only.",required:!0,options:{options:[{label:"Manager",value:"organizer"},{label:"Content Manager",value:"fileOrganizer"},{label:"Editor",value:"writer"},{label:"Commenter",value:"commenter"},{label:"Viewer",value:"reader"}]}}),send_invitation_email:$.Checkbox({displayName:"Send Invitation Email",description:"Email the person that they now have access.",required:!0}),include_team_drives:Ne.properties.include_team_drives},outputSchema:Bk,async run(e){let{fileId:t,user_email:n,permission_name:o,send_invitation_email:r,include_team_drives:i}=e.propsValue,s=await de(e.auth),u=(0,Dz.drive)({version:"v3",auth:s}),h={type:"user",role:o,emailAddress:n};return(await u.permissions.create({requestBody:h,fileId:t,sendNotificationEmail:r,supportsAllDrives:i})).data}});var $z=he(ze());var Cz=re({auth:Y,name:"create_new_gdrive_folder",classification:"WRITE",description:"Create an empty folder in Google Drive.",audience:"human",aiMetadata:{description:"Creates a new empty folder in Google Drive, optionally nested under a parent folder. Use to set up a destination before uploading or moving files. Not idempotent: each call creates a distinct folder even with the same name (Drive permits duplicate folder names).",idempotent:!1},displayName:"Create Folder",props:{folderName:$.ShortText({displayName:"Folder Name",required:!0,placeholder:"Invoices 2026"}),parentFolder:Ne.properties.parentFolder,include_team_drives:Ne.properties.include_team_drives},outputSchema:$k,async run(e){let t=await de(e.auth);return(await(0,$z.drive)({version:"v3",auth:t}).files.create({requestBody:{mimeType:"application/vnd.google-apps.folder",name:e.propsValue.folderName,...e.propsValue.parentFolder?{parents:[e.propsValue.parentFolder]}:{}},supportsAllDrives:e.propsValue.include_team_drives})).data}});var Nz=he(ze());var kz=re({auth:Y,name:"create_new_gdrive_file",classification:"WRITE",description:"Create a text, CSV or XML file from text you enter.",audience:"human",aiMetadata:{description:"Creates a new file in Google Drive from inline text content as plain text, CSV, or XML, optionally inside a parent folder. Use when an agent has generated text it needs to persist as a Drive file. Not idempotent: each call creates a new file.",idempotent:!1},displayName:"Create File from Text",props:{fileName:$.ShortText({displayName:"File Name",description:"Include the extension, for example report.csv.",required:!0,placeholder:"report.txt"}),text:$.LongText({displayName:"Content",description:"The text written into the file.",required:!0}),fileType:$.StaticDropdown({displayName:"File Type",description:"Plain text, CSV or XML. Match the extension in the file name.",required:!0,defaultValue:"text/plain",options:{options:[{label:"Plain Text (TXT)",value:"text/plain"},{label:"CSV",value:"text/csv"},{label:"XML",value:"text/xml"}]}}),parentFolder:Ne.properties.parentFolder,include_team_drives:Ne.properties.include_team_drives},outputSchema:Ck,async run(e){let t=await de(e.auth),n=(0,Nz.drive)({version:"v3",auth:t}),o=e.propsValue.fileType==="plain/text"?"text/plain":e.propsValue.fileType;return(await n.files.create({requestBody:{name:e.propsValue.fileName,mimeType:o,...e.propsValue.parentFolder?{parents:[e.propsValue.parentFolder]}:{}},media:{mimeType:o,body:e.propsValue.text},supportsAllDrives:e.propsValue.include_team_drives??!1,fields:"id, name, mimeType, kind"})).data}});var zz=he(ze());var Uz=re({auth:Y,name:"delete_permissions",classification:"DESTRUCTIVE",description:"Remove a person's role from a file or folder.",audience:"human",aiMetadata:{description:"Revokes a specific role from a user (matched by email and role) on a Drive file or folder. Use to unshare or downgrade access for someone. Requires the file/folder ID, the user email, and the role to remove. Idempotent: if no matching permission exists, the call is a no-op.",idempotent:!0},displayName:"Remove Access",props:{fileId:$.ShortText({displayName:"File or Folder ID",description:"The ID from the item's Drive URL or an earlier step.",required:!0,placeholder:"1dpv4-sKJfKRwI9qx1vWqQhEGEn3EpbI5"}),user_email:$.ShortText({displayName:"User Email",description:"The person whose access is removed.",required:!0,placeholder:"name@example.com"}),permission_name:$.StaticDropdown({displayName:"Role",description:"The role to remove. Other roles the person has stay.",required:!0,options:{options:[{label:"Manager",value:"organizer"},{label:"Content Manager",value:"fileOrganizer"},{label:"Editor",value:"writer"},{label:"Commenter",value:"commenter"},{label:"Viewer",value:"reader"}]}})},outputSchema:Vk,async run(e){let[t,n]=[e.propsValue.fileId,e.propsValue.user_email],o=await de(e.auth),r=(0,zz.drive)({version:"v3",auth:o}),i=await r.permissions.list({fileId:t,fields:"permissions(id, emailAddress, role)",supportsAllDrives:!0});if(i.data.permissions){for(let s of i.data.permissions)if(s.emailAddress===n&&s.role===e.propsValue.permission_name)return await r.permissions.delete({fileId:t,permissionId:s.id?s.id:"",supportsAllDrives:!0}),{removed:!0,message:"Permission removed"}}return{removed:!1,message:"Permission not found"}}});var Mz=he(ze());var Fz=re({displayName:"Duplicate File",auth:Y,name:"duplicate_file",classification:"WRITE",description:"Copy a file into a folder, optionally as a Google Doc or Sheet.",audience:"human",aiMetadata:{description:"Copies an existing Drive file into a target folder under a new name, optionally converting it to a Google Sheet or Google Doc. Use to clone a file or create an editable Google-format copy. Requires the source file ID and destination folder ID. Not idempotent: each call creates a new copy.",idempotent:!1},props:{fileId:$.ShortText({displayName:"File ID",description:"The ID of the file to copy.",required:!0,placeholder:"1dpv4-sKJfKRwI9qx1vWqQhEGEn3EpbI5"}),name:$.ShortText({displayName:"New File Name",description:"Name of the copy.",required:!0,placeholder:"Report (copy)"}),folderId:$.ShortText({displayName:"Destination Folder ID",description:"The ID of the folder that receives the copy.",required:!0}),mimeType:$.StaticDropdown({displayName:"Convert To",description:"Empty keeps the original format.",required:!1,advanced:!0,options:{options:[{label:"Google Sheets",value:"application/vnd.google-apps.spreadsheet"},{label:"Google Docs",value:"application/vnd.google-apps.document"}]}}),include_team_drives:Ne.properties.include_team_drives},outputSchema:Fk,async run(e){let t=await de(e.auth),n=e.propsValue.fileId,o=e.propsValue.name,r=e.propsValue.folderId,i=e.propsValue.mimeType,s=(0,Mz.drive)({version:"v3",auth:t}),u={name:o,parents:[r]};i&&(u.mimeType=i);let h=await s.files.copy({fileId:n,auth:t,requestBody:u,supportsAllDrives:e.propsValue.include_team_drives});if(h.status!==200)throw new Error("Error duplicating file");return h.data}});var Lz=he(ze());var jz=re({auth:Y,name:"get-file-or-folder-by-id",classification:"READ",displayName:"Get File Information",description:"Get the details of a file or folder by its ID.",audience:"human",aiMetadata:{description:"Fetches metadata for a single file or folder in Google Drive by its exact ID (name, MIME type, parents, etc.). Use when an agent already has a file/folder ID and needs its details. Read-only and idempotent. Requires the resource ID, not a name or path.",idempotent:!0},props:{id:$.ShortText({displayName:"File or Folder ID",description:"The ID from the item's Drive URL or an earlier step.",required:!0,placeholder:"1dpv4-sKJfKRwI9qx1vWqQhEGEn3EpbI5"}),include_team_drives:Ne.properties.include_team_drives},outputSchema:zk,async run(e){let t=await de(e.auth),o=await(0,Lz.drive)({version:"v3",auth:t}).files.get({fileId:e.propsValue.id,supportsAllDrives:e.propsValue.include_team_drives});return o.data?o.data:null}});var gh=he(en());var qz=he(require("querystring"));async function XT({auth:e,params:t}){let n=await bt(e),o=[],r;do{let i=r?{...t,pageToken:r}:t,s=await Yt.sendRequest({method:"GET",url:`https://www.googleapis.com/drive/v3/files?${qz.default.stringify(i)}`,headers:{Authorization:`Bearer ${n}`}});o.push(...s.body.files??[]),r=s.body.nextPageToken}while(r);return o}a(XT,"listDriveFiles");var PJ=50;async function hh({auth:e,rootFolderId:t,maxLevel:n,includeTrashed:o,includeTeamDrives:r}){let i=[],s=[t];for(let u=0;u<n&&s.length>0;u++){let h=[];for(let g of qv(s,PJ)){let y=g.map(P=>`'${P}' in parents`).join(" or "),T=g.length>1?`(${y})`:y,b=await XT({auth:e,params:{q:o?T:`${T} and trashed=false`,fields:"nextPageToken,files(id,kind,mimeType,name,trashed,parents)",supportsAllDrives:"true",includeItemsFromAllDrives:r?"true":"false",corpora:r?"allDrives":"user",pageSize:"1000"}});for(let P of b)i.push(P),P.mimeType==="application/vnd.google-apps.folder"&&h.push(P.id)}s=h}return i}a(hh,"listDriveFilesRecursive");var Vz=require("node:stream"),Gz=he(en());async function Hz(e,t){let n=await bt(e);return(await fetch(`https://www.googleapis.com/drive/v3/files/${t}?fields=mimeType&supportsAllDrives=true`,{headers:{Authorization:`Bearer ${n}`}}).then(r=>r.json())).mimeType}a(Hz,"getMimeType");var Bz=a(async(e,t,n,o,r)=>{let i=await Hz(t,n),s=await bt(t),u=await fetch(e,{headers:{Authorization:`Bearer ${s}`}}).catch(T=>Promise.reject(new Error(`Error when download file:
107
+ 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 g=e.external.registry.get(s[0])?.id;if(t!==s[0]&&g){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(Po,"extractDefs");function wo(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 h=u.def??u.schema,g={...h},y=u.ref;if(u.ref=null,y){o(y);let b=e.seen.get(y),P=b.schema;if(P.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(h.allOf=h.allOf??[],h.allOf.push(P)):Object.assign(h,P),Object.assign(h,g),s._zod.parent===y)for(let R in h)R==="$ref"||R==="allOf"||R in g||delete h[R];if(P.$ref&&b.def)for(let R in h)R==="$ref"||R==="allOf"||R in b.def&&JSON.stringify(h[R])===JSON.stringify(b.def[R])&&delete h[R]}let T=s._zod.parent;if(T&&T!==y){o(T);let b=e.seen.get(T);if(b?.schema.$ref&&(h.$ref=b.schema.$ref,b.def))for(let P in h)P==="$ref"||P==="allOf"||P in b.def&&JSON.stringify(h[P])===JSON.stringify(b.def[P])&&delete h[P]}e.override({zodSchema:s,jsonSchema:h,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:pa(t,"input",e.processors),output:pa(t,"output",e.processors)}},enumerable:!1,writable:!1}),s}catch{throw new Error("Error converting schema to JSON.")}}a(wo,"finalize");function Jt(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 Jt(o.element,n);if(o.type==="set")return Jt(o.valueType,n);if(o.type==="lazy")return Jt(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 Jt(o.innerType,n);if(o.type==="intersection")return Jt(o.left,n)||Jt(o.right,n);if(o.type==="record"||o.type==="map")return Jt(o.keyType,n)||Jt(o.valueType,n);if(o.type==="pipe")return Jt(o.in,n)||Jt(o.out,n);if(o.type==="object"){for(let r in o.shape)if(Jt(o.shape[r],n))return!0;return!1}if(o.type==="union"){for(let r of o.options)if(Jt(r,n))return!0;return!1}if(o.type==="tuple"){for(let r of o.items)if(Jt(r,n))return!0;return!!(o.rest&&Jt(o.rest,n))}return!1}a(Jt,"isTransforming");var Hy=a((e,t={})=>n=>{let o=_o({...n,processors:t});return rt(e,o),Po(o,e),wo(o,e)},"createToJSONSchemaMethod"),pa=a((e,t,n={})=>o=>{let{libraryOptions:r,target:i}=o??{},s=_o({...r??{},target:i,io:t,processors:n});return rt(e,s),Po(s,e),wo(s,e)},"createStandardJSONSchemaMethod");var Xj={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Zy=a((e,t,n,o)=>{let r=n;r.type="string";let{minimum:i,maximum:s,format:u,patterns:h,contentEncoding:g}=e._zod.bag;if(typeof i=="number"&&(r.minLength=i),typeof s=="number"&&(r.maxLength=s),u&&(r.format=Xj[u]??u,r.format===""&&delete r.format,u==="time"&&delete r.format),g&&(r.contentEncoding=g),h&&h.size>0){let y=[...h];y.length===1?r.pattern=y[0].source:y.length>1&&(r.allOf=[...y.map(T=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:T.source}))])}},"stringProcessor"),Wy=a((e,t,n,o)=>{let r=n,{minimum:i,maximum:s,format:u,multipleOf:h,exclusiveMaximum:g,exclusiveMinimum:y}=e._zod.bag;typeof u=="string"&&u.includes("int")?r.type="integer":r.type="number",typeof y=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(r.minimum=y,r.exclusiveMinimum=!0):r.exclusiveMinimum=y),typeof i=="number"&&(r.minimum=i,typeof y=="number"&&t.target!=="draft-04"&&(y>=i?delete r.minimum:delete r.exclusiveMinimum)),typeof g=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(r.maximum=g,r.exclusiveMaximum=!0):r.exclusiveMaximum=g),typeof s=="number"&&(r.maximum=s,typeof g=="number"&&t.target!=="draft-04"&&(g<=s?delete r.maximum:delete r.exclusiveMaximum)),typeof h=="number"&&(r.multipleOf=h)},"numberProcessor"),Ky=a((e,t,n,o)=>{n.type="boolean"},"booleanProcessor"),Jy=a((e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},"bigintProcessor"),Xy=a((e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},"symbolProcessor"),Yy=a((e,t,n,o)=>{t.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},"nullProcessor"),Qy=a((e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},"undefinedProcessor"),ev=a((e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},"voidProcessor"),tv=a((e,t,n,o)=>{n.not={}},"neverProcessor"),rv=a((e,t,n,o)=>{},"anyProcessor"),nv=a((e,t,n,o)=>{},"unknownProcessor"),ov=a((e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},"dateProcessor"),iv=a((e,t,n,o)=>{let r=e._zod.def,i=bs(r.entries);i.every(s=>typeof s=="number")&&(n.type="number"),i.every(s=>typeof s=="string")&&(n.type="string"),n.enum=i},"enumProcessor"),av=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"),sv=a((e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},"nanProcessor"),cv=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"),uv=a((e,t,n,o)=>{let r=n,i={type:"string",format:"binary",contentEncoding:"binary"},{minimum:s,maximum:u,mime:h}=e._zod.bag;s!==void 0&&(i.minLength=s),u!==void 0&&(i.maxLength=u),h?h.length===1?(i.contentMediaType=h[0],Object.assign(r,i)):(Object.assign(r,i),r.anyOf=h.map(g=>({contentMediaType:g}))):Object.assign(r,i)},"fileProcessor"),lv=a((e,t,n,o)=>{n.type="boolean"},"successProcessor"),dv=a((e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},"customProcessor"),pv=a((e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},"functionProcessor"),fv=a((e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},"transformProcessor"),mv=a((e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},"mapProcessor"),hv=a((e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},"setProcessor"),gv=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=rt(i.element,t,{...o,path:[...o.path,"items"]})},"arrayProcessor"),yv=a((e,t,n,o)=>{let r=n,i=e._zod.def;r.type="object",r.properties={};let s=i.shape;for(let g in s)r.properties[g]=rt(s[g],t,{...o,path:[...o.path,"properties",g]});let u=new Set(Object.keys(s)),h=new Set([...u].filter(g=>{let y=i.shape[g]._zod;return t.io==="input"?y.optin===void 0:y.optout===void 0}));h.size>0&&(r.required=Array.from(h)),i.catchall?._zod.def.type==="never"?r.additionalProperties=!1:i.catchall?i.catchall&&(r.additionalProperties=rt(i.catchall,t,{...o,path:[...o.path,"additionalProperties"]})):t.io==="output"&&(r.additionalProperties=!1)},"objectProcessor"),Sp=a((e,t,n,o)=>{let r=e._zod.def,i=r.inclusive===!1,s=r.options.map((u,h)=>rt(u,t,{...o,path:[...o.path,i?"oneOf":"anyOf",h]}));i?n.oneOf=s:n.anyOf=s},"unionProcessor"),vv=a((e,t,n,o)=>{let r=e._zod.def,i=rt(r.left,t,{...o,path:[...o.path,"allOf",0]}),s=rt(r.right,t,{...o,path:[...o.path,"allOf",1]}),u=a(g=>"allOf"in g&&Object.keys(g).length===1,"isSimpleIntersection"),h=[...u(i)?i.allOf:[i],...u(s)?s.allOf:[s]];n.allOf=h},"intersectionProcessor"),_v=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",h=i.items.map((b,P)=>rt(b,t,{...o,path:[...o.path,s,P]})),g=i.rest?rt(i.rest,t,{...o,path:[...o.path,u,...t.target==="openapi-3.0"?[i.items.length]:[]]}):null;t.target==="draft-2020-12"?(r.prefixItems=h,g&&(r.items=g)):t.target==="openapi-3.0"?(r.items={anyOf:h},g&&r.items.anyOf.push(g),r.minItems=h.length,g||(r.maxItems=h.length)):(r.items=h,g&&(r.additionalItems=g));let{minimum:y,maximum:T}=e._zod.bag;typeof y=="number"&&(r.minItems=y),typeof T=="number"&&(r.maxItems=T)},"tupleProcessor"),Pv=a((e,t,n,o)=>{let r=n,i=e._zod.def;r.type="object";let s=i.keyType,h=s._zod.bag?.patterns;if(i.mode==="loose"&&h&&h.size>0){let y=rt(i.valueType,t,{...o,path:[...o.path,"patternProperties","*"]});r.patternProperties={};for(let T of h)r.patternProperties[T.source]=y}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(r.propertyNames=rt(i.keyType,t,{...o,path:[...o.path,"propertyNames"]})),r.additionalProperties=rt(i.valueType,t,{...o,path:[...o.path,"additionalProperties"]});let g=s._zod.values;if(g){let y=[...g].filter(T=>typeof T=="string"||typeof T=="number");y.length>0&&(r.required=y)}},"recordProcessor"),wv=a((e,t,n,o)=>{let r=e._zod.def,i=rt(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"),bv=a((e,t,n,o)=>{let r=e._zod.def;rt(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType},"nonoptionalProcessor"),Tv=a((e,t,n,o)=>{let r=e._zod.def;rt(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType,n.default=JSON.parse(JSON.stringify(r.defaultValue))},"defaultProcessor"),Ev=a((e,t,n,o)=>{let r=e._zod.def;rt(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"),Sv=a((e,t,n,o)=>{let r=e._zod.def;rt(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"),xv=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;rt(i,t,o);let s=t.seen.get(e);s.ref=i},"pipeProcessor"),Iv=a((e,t,n,o)=>{let r=e._zod.def;rt(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType,n.readOnly=!0},"readonlyProcessor"),Av=a((e,t,n,o)=>{let r=e._zod.def;rt(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType},"promiseProcessor"),xp=a((e,t,n,o)=>{let r=e._zod.def;rt(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType},"optionalProcessor"),Rv=a((e,t,n,o)=>{let r=e._zod.innerType;rt(r,t,o);let i=t.seen.get(e);i.ref=r},"lazyProcessor"),Ep={string:Zy,number:Wy,boolean:Ky,bigint:Jy,symbol:Xy,null:Yy,undefined:Qy,void:ev,never:tv,any:rv,unknown:nv,date:ov,enum:iv,literal:av,nan:sv,template_literal:cv,file:uv,success:lv,custom:dv,function:pv,transform:fv,map:mv,set:hv,array:gv,object:yv,union:Sp,intersection:vv,tuple:_v,record:Pv,nullable:wv,nonoptional:bv,default:Tv,prefault:Ev,catch:Sv,pipe:xv,readonly:Iv,promise:Av,optional:xp,lazy:Rv};function Gc(e,t){if("_idmap"in e){let o=e,r=_o({...t,processors:Ep}),i={};for(let h of o._idmap.entries()){let[g,y]=h;rt(y,r)}let s={},u={registry:o,uri:t?.uri,defs:i};r.external=u;for(let h of o._idmap.entries()){let[g,y]=h;Po(r,y),s[g]=wo(r,y)}if(Object.keys(i).length>0){let h=r.target==="draft-2020-12"?"$defs":"definitions";s.__shared={[h]:i}}return{schemas:s}}let n=_o({...t,processors:Ep});return rt(e,n),Po(n,e),wo(n,e)}a(Gc,"toJSONSchema");var Ip=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=_o({processors:Ep,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 rt(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)),Po(this.ctx,t);let o=wo(this.ctx,t),{"~standard":r,...i}=o;return i}};var WS={};var xt=N("ZodMiniType",(e,t)=>{if(!e._zod)throw new Error("Uninitialized schema in ZodMiniType.");Re.init(e,t),e.def=t,e.type=t.type,e.parse=(n,o)=>Ko(e,n,o,{callee:e.parse}),e.safeParse=(n,o)=>ea(e,n,o),e.parseAsync=async(n,o)=>Jo(e,n,o,{callee:e.parseAsync}),e.safeParseAsync=async(n,o)=>ra(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)=>Nt(e,n,o),e.brand=()=>e,e.register=((n,o)=>(n.add(e,o),e)),e.apply=n=>n(e)}),Ap=N("ZodMiniString",(e,t)=>{Mn.init(e,t),xt.init(e,t)});function x(e){return rc(Ap,e)}a(x,"string");var fa=N("ZodMiniStringFormat",(e,t)=>{tt.init(e,t),Ap.init(e,t)});var eq=N("ZodMiniURL",(e,t)=>{Os.init(e,t),fa.init(e,t)});function KS(e){return ei(eq,e)}a(KS,"url");var Rp=N("ZodMiniNumber",(e,t)=>{oa.init(e,t),xt.init(e,t)});function zt(e){return Ac(Rp,e)}a(zt,"number");var tq=N("ZodMiniNumberFormat",(e,t)=>{zs.init(e,t),Rp.init(e,t)});function JS(e){return Dc(tq,e)}a(JS,"int");var Dv=N("ZodMiniBoolean",(e,t)=>{Yo.init(e,t),xt.init(e,t)});function Je(e){return Oc(Dv,e)}a(Je,"boolean");var XS=N("ZodMiniBigInt",(e,t)=>{ia.init(e,t),xt.init(e,t)});var rq=N("ZodMiniAny",(e,t)=>{Us.init(e,t),xt.init(e,t)});function Hc(){return Nc(rq)}a(Hc,"any");var nq=N("ZodMiniUnknown",(e,t)=>{Ms.init(e,t),xt.init(e,t)});function $e(){return kc(nq)}a($e,"unknown");var oq=N("ZodMiniVoid",(e,t)=>{Fs.init(e,t),xt.init(e,t)});function YS(e){return zc(oq,e)}a(YS,"_void");var QS=N("ZodMiniDate",(e,t)=>{Ls.init(e,t),xt.init(e,t)});var iq=N("ZodMiniArray",(e,t)=>{js.init(e,t),xt.init(e,t)});function Ae(e,t){return new iq({type:"array",element:e,...ie(t)})}a(Ae,"array");var aq=N("ZodMiniObject",(e,t)=>{Ud.init(e,t),xt.init(e,t),Le(e,"shape",()=>t.shape)});function M(e,t){let n={type:"object",shape:e??{},...ie(t)};return new aq(n)}a(M,"object");var sq=N("ZodMiniUnion",(e,t)=>{Qo.init(e,t),xt.init(e,t)});function je(e,t){return new sq({type:"union",options:e,...ie(t)})}a(je,"union");var cq=N("ZodMiniDiscriminatedUnion",(e,t)=>{qs.init(e,t),xt.init(e,t)});function bo(e,t,n){return new cq({type:"union",options:t,discriminator:e,...ie(n)})}a(bo,"discriminatedUnion");var uq=N("ZodMiniRecord",(e,t)=>{Vs.init(e,t),xt.init(e,t)});function Ce(e,t,n){return new uq({type:"record",keyType:e,valueType:t,...ie(n)})}a(Ce,"record");var lq=N("ZodMiniEnum",(e,t)=>{Gs.init(e,t),xt.init(e,t),e.options=Object.values(t.entries)});function xe(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(o=>[o,o])):e;return new lq({type:"enum",entries:n,...ie(t)})}a(xe,"_enum");var dq=N("ZodMiniLiteral",(e,t)=>{Hs.init(e,t),xt.init(e,t)});function Ee(e,t){return new dq({type:"literal",values:Array.isArray(e)?e:[e],...ie(t)})}a(Ee,"literal");var pq=N("ZodMiniTransform",(e,t)=>{Zs.init(e,t),xt.init(e,t)});function To(e){return new pq({type:"transform",transform:e})}a(To,"transform");var fq=N("ZodMiniOptional",(e,t)=>{aa.init(e,t),xt.init(e,t)});function W(e){return new fq({type:"optional",innerType:e})}a(W,"optional");var mq=N("ZodMiniNullable",(e,t)=>{Ws.init(e,t),xt.init(e,t)});function Zc(e){return new mq({type:"nullable",innerType:e})}a(Zc,"nullable");var hq=N("ZodMiniPipe",(e,t)=>{Ks.init(e,t),xt.init(e,t)});function Eo(e,t){return new hq({type:"pipe",in:e,out:t})}a(Eo,"pipe");var ex=N("ZodMiniCustom",(e,t)=>{Js.init(e,t),xt.init(e,t)});function Dp(e,t){return Bc(ex,e??(()=>!0),t)}a(Dp,"custom");function Ov(e,t={}){return Vc(ex,e,t)}a(Ov,"refine");var Op={};nr(Op,{ZodMiniISODate:()=>Cv,ZodMiniISODateTime:()=>$v,ZodMiniISODuration:()=>kv,ZodMiniISOTime:()=>Nv,date:()=>yq,datetime:()=>gq,duration:()=>_q,time:()=>vq});var $v=N("ZodMiniISODateTime",(e,t)=>{$s.init(e,t),fa.init(e,t)});function gq(e){return Ec($v,e)}a(gq,"datetime");var Cv=N("ZodMiniISODate",(e,t)=>{Cs.init(e,t),fa.init(e,t)});function yq(e){return Sc(Cv,e)}a(yq,"date");var Nv=N("ZodMiniISOTime",(e,t)=>{Ns.init(e,t),fa.init(e,t)});function vq(e){return xc(Nv,e)}a(vq,"time");var kv=N("ZodMiniISODuration",(e,t)=>{ks.init(e,t),fa.init(e,t)});function _q(e){return Ic(kv,e)}a(_q,"duration");var Wc={};nr(Wc,{bigint:()=>Tq,boolean:()=>bq,date:()=>Eq,number:()=>wq,string:()=>Pq});function Pq(e){return nc(Ap,e)}a(Pq,"string");function wq(e){return Rc(Rp,e)}a(wq,"number");function bq(e){return $c(Dv,e)}a(bq,"boolean");function Tq(e){return Cc(XS,e)}a(Tq,"bigint");function Eq(e){return Uc(QS,e)}a(Eq,"date");var Uv=M({retryOnFailure:M({defaultValue:W(Je()),hide:W(Je())}),continueOnFailure:M({defaultValue:W(Je()),hide:W(Je())})}),zv=class{constructor(t,n,o,r,i,s,u,h,g,y,T,b,P){this.name=t;this.displayName=n;this.description=o;this.props=r;this.propertyGroups=i;this.run=s;this.test=u;this.requireAuth=h;this.errorHandlingOptions=g;this.outputSchema=y;this.audience=T;this.aiMetadata=b;this.classification=P}static{a(this,"IAction")}},re=a(e=>new zv(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 We=M({displayName:x(),description:W(x()),advanced:W(Je()),width:W(xe(["half","full"])),icon:W(x()),placeholder:W(x())}),ke=a((e,t)=>M({type:Ee(t),required:Je(),defaultValue:W(Hc())}),"TPropertyValue");var _r=M({...We.shape,...ke(x(),"SHORT_TEXT").shape}),jn=M({...We.shape,...ke(x(),"LONG_TEXT").shape});var rx=M({label:x(),value:$e(),description:W(x()),icon:W(x())}),$p=M({disabled:W(Je()),placeholder:W(x()),options:Ae(rx)});var xq=xe(["cards"]),Pr=M({...We.shape,options:$p,display:W(xq),...ke($e(),"STATIC_DROPDOWN").shape}),qn=M({...We.shape,options:$p,...ke(Ae($e()),"STATIC_MULTI_SELECT_DROPDOWN").shape});var Mv=M({...We.shape,...ke($e(),"DROPDOWN").shape,refreshers:Ae(x())}),Kc=M({...We.shape,...ke(Ae($e()),"MULTI_SELECT_DROPDOWN").shape,refreshers:Ae(x())});var Bn=M({...We.shape,reveals:W(Ae(x())),...ke(Je(),"CHECKBOX").shape});var Vn=M({...We.shape,display:W(xe(["stepper"])),min:W(zt()),max:W(zt()),step:W(zt()),...ke(zt(),"NUMBER").shape});var Jc=M({...We.shape,streaming:W(Je()),...ke($e(),"FILE").shape});var Xc=M({...We.shape,...ke(x(),"DATE_TIME").shape});var nx=Ce(x(),je([_r,jn,Pr,Kc,qn,Bn,Vn,Jc,Xc])),Yc=M({...We.shape,properties:nx,...ke(Ae($e()),"ARRAY").shape});var ox=xe(["any_time","last_24_hours","last_7_days","last_30_days","last_90_days","this_month","custom"]),ix=M({preset:W(ox),after:W(x()),before:W(x())}),Fv=M({...We.shape,display:W(xe(["dropdown"])),...ke(ix,"DATE_RANGE").shape});var Qc=M({...We.shape,...ke(je([Ce(x(),$e())]),"JSON").shape});var ax=je([_r,Pr,Qc,Yc,qn]),Iq=Ce(x(),ax),Lv=M({refreshers:Ae(x()),...We.shape,...ke($e(),"DYNAMIC").shape});var Cp=M({...We.shape,...ke(YS(),"MARKDOWN").shape});var eu=(n=>(n.ARCHIVE="ARCHIVE",n.REGISTRY="REGISTRY",n))(eu||{}),ma=(n=>(n.CUSTOM="CUSTOM",n.OFFICIAL="OFFICIAL",n))(ma||{}),ha=(l=>(l.ARTIFICIAL_INTELLIGENCE="ARTIFICIAL_INTELLIGENCE",l.COMMUNICATION="COMMUNICATION",l.COMMERCE="COMMERCE",l.CORE="CORE",l.UNIVERSAL_AI="UNIVERSAL_AI",l.FLOW_CONTROL="FLOW_CONTROL",l.BUSINESS_INTELLIGENCE="BUSINESS_INTELLIGENCE",l.ACCOUNTING="ACCOUNTING",l.PRODUCTIVITY="PRODUCTIVITY",l.CONTENT_AND_FILES="CONTENT_AND_FILES",l.DEVELOPER_TOOLS="DEVELOPER_TOOLS",l.CUSTOMER_SUPPORT="CUSTOMER_SUPPORT",l.FORMS_AND_SURVEYS="FORMS_AND_SURVEYS",l.HUMAN_RESOURCES="HUMAN_RESOURCES",l.PAYMENT_PROCESSING="PAYMENT_PROCESSING",l.MARKETING="MARKETING",l.SALES_AND_CRM="SALES_AND_CRM",l))(ha||{});var tu=(n=>(n.AUTHORIZATION_CODE="authorization_code",n.CLIENT_CREDENTIALS="client_credentials",n))(tu||{}),jv="both_client_credentials_and_authorization_code";var pn=(r=>(r.POLLING="POLLING",r.WEBHOOK="WEBHOOK",r.APP_WEBHOOK="APP_WEBHOOK",r.MANUAL="MANUAL",r))(pn||{}),ru=(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))(ru||{}),Aq=M({strategy:xe(ru),paramName:W(x())}),nu=(n=>(n.SIMULATION="SIMULATION",n.TEST_FUNCTION="TEST_FUNCTION",n))(nu||{});var Np=(n=>(n.WEBSOCKET="WEBSOCKET",n.NONE="NONE",n))(Np||{}),sx=M({status:W(zt()),body:W($e()),headers:W(Ce(x(),x()))}),cx=M({type:Ee("DELAY"),resumeDateTime:x(),requestIdToReply:W(x()),handlerId:W(x()),streamStepProgress:W(xe(Np))}),ux=M({type:Ee("WEBHOOK"),requestId:x(),requestIdToReply:W(x()),response:sx,handlerId:W(x()),streamStepProgress:W(xe(Np))}),Rq=je([cx,ux]);var Dq=M({body:$e(),rawBody:W($e()),headers:Ce(x(),x()),queryParams:Ce(x(),x())});function yt(e){return e==null}a(yt,"isNil");function ou(e){return e==null?!0:typeof e=="string"||Array.isArray(e)?e.length===0:typeof e=="object"?Object.keys(e).length===0:!1}a(ou,"isEmpty");function qv(e,t){let n=[];for(let o=0;o<e.length;o+=t)n.push(e.slice(o,o+t));return n}a(qv,"chunk");function kp(e,t){if(e==null)throw new Error(`${t} is null or undefined`)}a(kp,"assertNotNullOrUndefined");async function Vv(e){try{return{data:await e(),error:null}}catch(t){return{data:null,error:t}}}a(Vv,"tryCatch");function Gv(e){try{return{data:e(),error:null}}catch(t){return{data:null,error:t}}}a(Gv,"tryCatchSync");var Hv=he(require("crypto"),1);var Oq=128,So,ga,$q=a(e=>{if(e<0)throw new RangeError("Wrong ID size");try{!So||So.length<e?(So=Buffer.allocUnsafe(e*Oq),Hv.default.randomFillSync(So),ga=0):ga+e>So.length&&(Hv.default.randomFillSync(So),ga=0)}catch(t){throw So=void 0,t}ga+=e},"fillPool"),Cq=a(e=>($q(e|=0),So.subarray(ga-e,ga)),"random"),Nq=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),h=r;for(;h--;)if(s+=e[u[h]&o]||"",s.length===i)return s}}},"customRandom"),lx=a((e,t=21)=>Nq(e,t,Cq),"customAlphabet");var kq="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",dx=21,n7=x().check(jt(new RegExp(`^[0-9a-zA-Z]{${dx}}$`))),zq=lx(kq,dx);var xo=Eo(To(e=>e instanceof Date?e.toISOString():e),x()),Ur={id:x(),created:xo,updated:xo},vt=a(e=>W(Zc(e)),"Nullable");function Zv(e){return W(Zc(xe(e)))}a(Zv,"NullableEnum");var a7=Eo(To(e=>e==="true"||e===!0?!0:e==="false"||e===!1?!1:void 0),W(Je())),s7=W(Op.datetime({offset:!0}).check(Ov(e=>e.slice(0,4)!=="0000"))),zp=a(e=>Eo(To(t=>Array.isArray(t)?t:t!==void 0?[t]:void 0),W(Ae(e))),"OptionalArrayFromQuery");var l7=Ce(x(),$e());var Io=(l=>(l.OPENAI="openai",l.OPENROUTER="openrouter",l.ANTHROPIC="anthropic",l.AZURE="azure",l.GOOGLE="google",l.ACTIVEPIECES="activepieces",l.CLOUDFLARE_GATEWAY="cloudflare-gateway",l.CUSTOM="custom",l.BEDROCK="bedrock",l.VERTEX="vertex",l.MISTRAL="mistral",l.XAI="xai",l.DEEPSEEK="deepseek",l.ZAI="zai",l.QWEN="qwen",l.MINIMAX="minimax",l.MOONSHOT="moonshot",l))(Io||{});var fe={};nr(fe,{$brand:()=>Ps,$input:()=>np,$output:()=>rp,NEVER:()=>Bl,TimePrecision:()=>ip,ZodAny:()=>y_,ZodArray:()=>w_,ZodBase64:()=>nf,ZodBase64URL:()=>of,ZodBigInt:()=>Ta,ZodBigIntFormat:()=>cf,ZodBoolean:()=>ba,ZodCIDRv4:()=>tf,ZodCIDRv6:()=>rf,ZodCUID:()=>Wp,ZodCUID2:()=>Kp,ZodCatch:()=>B_,ZodCodec:()=>gf,ZodCustom:()=>gu,ZodCustomStringFormat:()=>Pa,ZodDate:()=>du,ZodDefault:()=>U_,ZodDiscriminatedUnion:()=>T_,ZodE164:()=>af,ZodEmail:()=>Gp,ZodEmoji:()=>Hp,ZodEnum:()=>va,ZodError:()=>Uq,ZodExactOptional:()=>N_,ZodFile:()=>$_,ZodFirstPartyTypeKind:()=>tP,ZodFunction:()=>Y_,ZodGUID:()=>au,ZodIPv4:()=>Qp,ZodIPv6:()=>ef,ZodISODate:()=>Fp,ZodISODateTime:()=>Mp,ZodISODuration:()=>jp,ZodISOTime:()=>Lp,ZodIntersection:()=>E_,ZodIssueCode:()=>Fq,ZodJWT:()=>sf,ZodKSUID:()=>Yp,ZodLazy:()=>K_,ZodLiteral:()=>O_,ZodMAC:()=>l_,ZodMap:()=>R_,ZodNaN:()=>G_,ZodNanoID:()=>Zp,ZodNever:()=>__,ZodNonOptional:()=>mf,ZodNull:()=>h_,ZodNullable:()=>z_,ZodNumber:()=>wa,ZodNumberFormat:()=>fi,ZodObject:()=>fu,ZodOptional:()=>ff,ZodPipe:()=>hf,ZodPrefault:()=>F_,ZodPromise:()=>X_,ZodReadonly:()=>H_,ZodRealError:()=>sr,ZodRecord:()=>hu,ZodSet:()=>D_,ZodString:()=>_a,ZodStringFormat:()=>st,ZodSuccess:()=>q_,ZodSymbol:()=>f_,ZodTemplateLiteral:()=>W_,ZodTransform:()=>C_,ZodTuple:()=>x_,ZodType:()=>qe,ZodULID:()=>Jp,ZodURL:()=>lu,ZodUUID:()=>fn,ZodUndefined:()=>m_,ZodUnion:()=>mu,ZodUnknown:()=>v_,ZodVoid:()=>P_,ZodXID:()=>Xp,ZodXor:()=>b_,_ZodString:()=>Vp,_default:()=>M_,_function:()=>vI,any:()=>Jx,array:()=>pu,base64:()=>Cx,base64url:()=>Nx,bigint:()=>Gx,boolean:()=>p_,catch:()=>V_,check:()=>_I,cidrv4:()=>Ox,cidrv6:()=>$x,clone:()=>Nt,codec:()=>hI,coerce:()=>rP,config:()=>gt,core:()=>vr,cuid:()=>Tx,cuid2:()=>Ex,custom:()=>PI,date:()=>Yx,decode:()=>n_,decodeAsync:()=>i_,describe:()=>wI,discriminatedUnion:()=>oI,e164:()=>kx,email:()=>fx,emoji:()=>wx,encode:()=>r_,encodeAsync:()=>o_,endsWith:()=>ii,enum:()=>df,exactOptional:()=>k_,file:()=>dI,flattenError:()=>Ki,float32:()=>jx,float64:()=>qx,formatError:()=>Ji,fromJSONSchema:()=>AI,function:()=>vI,getErrorMap:()=>jq,globalRegistry:()=>kt,gt:()=>Xr,gte:()=>Dt,guid:()=>mx,hash:()=>Lx,hex:()=>Fx,hostname:()=>Mx,httpUrl:()=>Px,includes:()=>ni,instanceof:()=>TI,int:()=>Bp,int32:()=>Bx,int64:()=>Hx,intersection:()=>S_,ipv4:()=>Ax,ipv6:()=>Dx,iso:()=>ya,json:()=>SI,jwt:()=>zx,keyof:()=>Qx,ksuid:()=>Ix,lazy:()=>J_,length:()=>vo,literal:()=>lI,locales:()=>ua,looseObject:()=>rI,looseRecord:()=>aI,lowercase:()=>ti,lt:()=>Jr,lte:()=>Kt,mac:()=>Rx,map:()=>sI,maxLength:()=>yo,maxSize:()=>Ln,meta:()=>bI,mime:()=>ai,minLength:()=>Et,minSize:()=>Yr,multipleOf:()=>Fn,nan:()=>mI,nanoid:()=>bx,nativeEnum:()=>uI,negative:()=>Fc,never:()=>uf,nonnegative:()=>jc,nonoptional:()=>j_,nonpositive:()=>Lc,normalize:()=>si,null:()=>g_,nullable:()=>cu,nullish:()=>pI,number:()=>d_,object:()=>eI,optional:()=>su,overwrite:()=>zr,parse:()=>Yv,parseAsync:()=>Qv,partialRecord:()=>iI,pipe:()=>uu,positive:()=>Mc,prefault:()=>L_,preprocess:()=>xI,prettifyError:()=>Wl,promise:()=>yI,property:()=>qc,readonly:()=>Z_,record:()=>A_,refine:()=>Q_,regex:()=>jt,regexes:()=>ar,registry:()=>tc,safeDecode:()=>s_,safeDecodeAsync:()=>u_,safeEncode:()=>a_,safeEncodeAsync:()=>c_,safeParse:()=>e_,safeParseAsync:()=>t_,set:()=>cI,setErrorMap:()=>Lq,size:()=>go,slugify:()=>da,startsWith:()=>oi,strictObject:()=>tI,string:()=>qp,stringFormat:()=>Ux,stringbool:()=>EI,success:()=>fI,superRefine:()=>eP,symbol:()=>Wx,templateLiteral:()=>gI,toJSONSchema:()=>Gc,toLowerCase:()=>ui,toUpperCase:()=>li,transform:()=>pf,treeifyError:()=>Zl,trim:()=>ci,tuple:()=>I_,uint32:()=>Vx,uint64:()=>Zx,ulid:()=>Sx,undefined:()=>Kx,union:()=>lf,unknown:()=>pi,uppercase:()=>ri,url:()=>_x,util:()=>ce,uuid:()=>hx,uuidv4:()=>gx,uuidv6:()=>yx,uuidv7:()=>vx,void:()=>Xx,xid:()=>xx,xor:()=>nI});var iu={};nr(iu,{ZodAny:()=>y_,ZodArray:()=>w_,ZodBase64:()=>nf,ZodBase64URL:()=>of,ZodBigInt:()=>Ta,ZodBigIntFormat:()=>cf,ZodBoolean:()=>ba,ZodCIDRv4:()=>tf,ZodCIDRv6:()=>rf,ZodCUID:()=>Wp,ZodCUID2:()=>Kp,ZodCatch:()=>B_,ZodCodec:()=>gf,ZodCustom:()=>gu,ZodCustomStringFormat:()=>Pa,ZodDate:()=>du,ZodDefault:()=>U_,ZodDiscriminatedUnion:()=>T_,ZodE164:()=>af,ZodEmail:()=>Gp,ZodEmoji:()=>Hp,ZodEnum:()=>va,ZodExactOptional:()=>N_,ZodFile:()=>$_,ZodFunction:()=>Y_,ZodGUID:()=>au,ZodIPv4:()=>Qp,ZodIPv6:()=>ef,ZodIntersection:()=>E_,ZodJWT:()=>sf,ZodKSUID:()=>Yp,ZodLazy:()=>K_,ZodLiteral:()=>O_,ZodMAC:()=>l_,ZodMap:()=>R_,ZodNaN:()=>G_,ZodNanoID:()=>Zp,ZodNever:()=>__,ZodNonOptional:()=>mf,ZodNull:()=>h_,ZodNullable:()=>z_,ZodNumber:()=>wa,ZodNumberFormat:()=>fi,ZodObject:()=>fu,ZodOptional:()=>ff,ZodPipe:()=>hf,ZodPrefault:()=>F_,ZodPromise:()=>X_,ZodReadonly:()=>H_,ZodRecord:()=>hu,ZodSet:()=>D_,ZodString:()=>_a,ZodStringFormat:()=>st,ZodSuccess:()=>q_,ZodSymbol:()=>f_,ZodTemplateLiteral:()=>W_,ZodTransform:()=>C_,ZodTuple:()=>x_,ZodType:()=>qe,ZodULID:()=>Jp,ZodURL:()=>lu,ZodUUID:()=>fn,ZodUndefined:()=>m_,ZodUnion:()=>mu,ZodUnknown:()=>v_,ZodVoid:()=>P_,ZodXID:()=>Xp,ZodXor:()=>b_,_ZodString:()=>Vp,_default:()=>M_,_function:()=>vI,any:()=>Jx,array:()=>pu,base64:()=>Cx,base64url:()=>Nx,bigint:()=>Gx,boolean:()=>p_,catch:()=>V_,check:()=>_I,cidrv4:()=>Ox,cidrv6:()=>$x,codec:()=>hI,cuid:()=>Tx,cuid2:()=>Ex,custom:()=>PI,date:()=>Yx,describe:()=>wI,discriminatedUnion:()=>oI,e164:()=>kx,email:()=>fx,emoji:()=>wx,enum:()=>df,exactOptional:()=>k_,file:()=>dI,float32:()=>jx,float64:()=>qx,function:()=>vI,guid:()=>mx,hash:()=>Lx,hex:()=>Fx,hostname:()=>Mx,httpUrl:()=>Px,instanceof:()=>TI,int:()=>Bp,int32:()=>Bx,int64:()=>Hx,intersection:()=>S_,ipv4:()=>Ax,ipv6:()=>Dx,json:()=>SI,jwt:()=>zx,keyof:()=>Qx,ksuid:()=>Ix,lazy:()=>J_,literal:()=>lI,looseObject:()=>rI,looseRecord:()=>aI,mac:()=>Rx,map:()=>sI,meta:()=>bI,nan:()=>mI,nanoid:()=>bx,nativeEnum:()=>uI,never:()=>uf,nonoptional:()=>j_,null:()=>g_,nullable:()=>cu,nullish:()=>pI,number:()=>d_,object:()=>eI,optional:()=>su,partialRecord:()=>iI,pipe:()=>uu,prefault:()=>L_,preprocess:()=>xI,promise:()=>yI,readonly:()=>Z_,record:()=>A_,refine:()=>Q_,set:()=>cI,strictObject:()=>tI,string:()=>qp,stringFormat:()=>Ux,stringbool:()=>EI,success:()=>fI,superRefine:()=>eP,symbol:()=>Wx,templateLiteral:()=>gI,transform:()=>pf,tuple:()=>I_,uint32:()=>Vx,uint64:()=>Zx,ulid:()=>Sx,undefined:()=>Kx,union:()=>lf,unknown:()=>pi,url:()=>_x,uuid:()=>hx,uuidv4:()=>gx,uuidv6:()=>yx,uuidv7:()=>vx,void:()=>Xx,xid:()=>xx,xor:()=>nI});var Up={};nr(Up,{endsWith:()=>ii,gt:()=>Xr,gte:()=>Dt,includes:()=>ni,length:()=>vo,lowercase:()=>ti,lt:()=>Jr,lte:()=>Kt,maxLength:()=>yo,maxSize:()=>Ln,mime:()=>ai,minLength:()=>Et,minSize:()=>Yr,multipleOf:()=>Fn,negative:()=>Fc,nonnegative:()=>jc,nonpositive:()=>Lc,normalize:()=>si,overwrite:()=>zr,positive:()=>Mc,property:()=>qc,regex:()=>jt,size:()=>go,slugify:()=>da,startsWith:()=>oi,toLowerCase:()=>ui,toUpperCase:()=>li,trim:()=>ci,uppercase:()=>ri});var ya={};nr(ya,{ZodISODate:()=>Fp,ZodISODateTime:()=>Mp,ZodISODuration:()=>jp,ZodISOTime:()=>Lp,date:()=>Kv,datetime:()=>Wv,duration:()=>Xv,time:()=>Jv});var Mp=N("ZodISODateTime",(e,t)=>{$s.init(e,t),st.init(e,t)});function Wv(e){return Ec(Mp,e)}a(Wv,"datetime");var Fp=N("ZodISODate",(e,t)=>{Cs.init(e,t),st.init(e,t)});function Kv(e){return Sc(Fp,e)}a(Kv,"date");var Lp=N("ZodISOTime",(e,t)=>{Ns.init(e,t),st.init(e,t)});function Jv(e){return xc(Lp,e)}a(Jv,"time");var jp=N("ZodISODuration",(e,t)=>{ks.init(e,t),st.init(e,t)});function Xv(e){return Ic(jp,e)}a(Xv,"duration");var px=a((e,t)=>{Is.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:a(n=>Ji(e,n),"value")},flatten:{value:a(n=>Ki(e,n),"value")},addIssue:{value:a(n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,Hi,2)},"value")},addIssues:{value:a(n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,Hi,2)},"value")},isEmpty:{get(){return e.issues.length===0}}})},"initializer"),Uq=N("ZodError",px),sr=N("ZodError",px,{Parent:Error});var Yv=Xi(sr),Qv=Yi(sr),e_=Qi(sr),t_=ta(sr),r_=Kl(sr),n_=Jl(sr),o_=Xl(sr),i_=Yl(sr),a_=Ql(sr),s_=ed(sr),c_=td(sr),u_=rd(sr);var qe=N("ZodType",(e,t)=>(Re.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:pa(e,"input"),output:pa(e,"output")}}),e.toJSONSchema=Hy(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(ce.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)=>Nt(e,n,o),e.brand=()=>e,e.register=((n,o)=>(n.add(e,o),e)),e.parse=(n,o)=>Yv(e,n,o,{callee:e.parse}),e.safeParse=(n,o)=>e_(e,n,o),e.parseAsync=async(n,o)=>Qv(e,n,o,{callee:e.parseAsync}),e.safeParseAsync=async(n,o)=>t_(e,n,o),e.spa=e.safeParseAsync,e.encode=(n,o)=>r_(e,n,o),e.decode=(n,o)=>n_(e,n,o),e.encodeAsync=async(n,o)=>o_(e,n,o),e.decodeAsync=async(n,o)=>i_(e,n,o),e.safeEncode=(n,o)=>a_(e,n,o),e.safeDecode=(n,o)=>s_(e,n,o),e.safeEncodeAsync=async(n,o)=>c_(e,n,o),e.safeDecodeAsync=async(n,o)=>u_(e,n,o),e.refine=(n,o)=>e.check(Q_(n,o)),e.superRefine=n=>e.check(eP(n)),e.overwrite=n=>e.check(zr(n)),e.optional=()=>su(e),e.exactOptional=()=>k_(e),e.nullable=()=>cu(e),e.nullish=()=>su(cu(e)),e.nonoptional=n=>j_(e,n),e.array=()=>pu(e),e.or=n=>lf([e,n]),e.and=n=>S_(e,n),e.transform=n=>uu(e,pf(n)),e.default=n=>M_(e,n),e.prefault=n=>L_(e,n),e.catch=n=>V_(e,n),e.pipe=n=>uu(e,n),e.readonly=()=>Z_(e),e.describe=n=>{let o=e.clone();return kt.add(o,{description:n}),o},Object.defineProperty(e,"description",{get(){return kt.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return kt.get(e);let o=e.clone();return kt.add(o,n[0]),o},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),Vp=N("_ZodString",(e,t)=>{Mn.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(o,r,i)=>Zy(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(jt(...o)),e.includes=(...o)=>e.check(ni(...o)),e.startsWith=(...o)=>e.check(oi(...o)),e.endsWith=(...o)=>e.check(ii(...o)),e.min=(...o)=>e.check(Et(...o)),e.max=(...o)=>e.check(yo(...o)),e.length=(...o)=>e.check(vo(...o)),e.nonempty=(...o)=>e.check(Et(1,...o)),e.lowercase=o=>e.check(ti(o)),e.uppercase=o=>e.check(ri(o)),e.trim=()=>e.check(ci()),e.normalize=(...o)=>e.check(si(...o)),e.toLowerCase=()=>e.check(ui()),e.toUpperCase=()=>e.check(li()),e.slugify=()=>e.check(da())}),_a=N("ZodString",(e,t)=>{Mn.init(e,t),Vp.init(e,t),e.email=n=>e.check(oc(Gp,n)),e.url=n=>e.check(ei(lu,n)),e.jwt=n=>e.check(Tc(sf,n)),e.emoji=n=>e.check(uc(Hp,n)),e.guid=n=>e.check(la(au,n)),e.uuid=n=>e.check(ic(fn,n)),e.uuidv4=n=>e.check(ac(fn,n)),e.uuidv6=n=>e.check(sc(fn,n)),e.uuidv7=n=>e.check(cc(fn,n)),e.nanoid=n=>e.check(lc(Zp,n)),e.guid=n=>e.check(la(au,n)),e.cuid=n=>e.check(dc(Wp,n)),e.cuid2=n=>e.check(pc(Kp,n)),e.ulid=n=>e.check(fc(Jp,n)),e.base64=n=>e.check(Pc(nf,n)),e.base64url=n=>e.check(wc(of,n)),e.xid=n=>e.check(mc(Xp,n)),e.ksuid=n=>e.check(hc(Yp,n)),e.ipv4=n=>e.check(gc(Qp,n)),e.ipv6=n=>e.check(yc(ef,n)),e.cidrv4=n=>e.check(vc(tf,n)),e.cidrv6=n=>e.check(_c(rf,n)),e.e164=n=>e.check(bc(af,n)),e.datetime=n=>e.check(Wv(n)),e.date=n=>e.check(Kv(n)),e.time=n=>e.check(Jv(n)),e.duration=n=>e.check(Xv(n))});function qp(e){return rc(_a,e)}a(qp,"string");var st=N("ZodStringFormat",(e,t)=>{tt.init(e,t),Vp.init(e,t)}),Gp=N("ZodEmail",(e,t)=>{md.init(e,t),st.init(e,t)});function fx(e){return oc(Gp,e)}a(fx,"email");var au=N("ZodGUID",(e,t)=>{pd.init(e,t),st.init(e,t)});function mx(e){return la(au,e)}a(mx,"guid");var fn=N("ZodUUID",(e,t)=>{fd.init(e,t),st.init(e,t)});function hx(e){return ic(fn,e)}a(hx,"uuid");function gx(e){return ac(fn,e)}a(gx,"uuidv4");function yx(e){return sc(fn,e)}a(yx,"uuidv6");function vx(e){return cc(fn,e)}a(vx,"uuidv7");var lu=N("ZodURL",(e,t)=>{Os.init(e,t),st.init(e,t)});function _x(e){return ei(lu,e)}a(_x,"url");function Px(e){return ei(lu,{protocol:/^https?$/,hostname:ar.domain,...ce.normalizeParams(e)})}a(Px,"httpUrl");var Hp=N("ZodEmoji",(e,t)=>{hd.init(e,t),st.init(e,t)});function wx(e){return uc(Hp,e)}a(wx,"emoji");var Zp=N("ZodNanoID",(e,t)=>{gd.init(e,t),st.init(e,t)});function bx(e){return lc(Zp,e)}a(bx,"nanoid");var Wp=N("ZodCUID",(e,t)=>{yd.init(e,t),st.init(e,t)});function Tx(e){return dc(Wp,e)}a(Tx,"cuid");var Kp=N("ZodCUID2",(e,t)=>{vd.init(e,t),st.init(e,t)});function Ex(e){return pc(Kp,e)}a(Ex,"cuid2");var Jp=N("ZodULID",(e,t)=>{_d.init(e,t),st.init(e,t)});function Sx(e){return fc(Jp,e)}a(Sx,"ulid");var Xp=N("ZodXID",(e,t)=>{Pd.init(e,t),st.init(e,t)});function xx(e){return mc(Xp,e)}a(xx,"xid");var Yp=N("ZodKSUID",(e,t)=>{wd.init(e,t),st.init(e,t)});function Ix(e){return hc(Yp,e)}a(Ix,"ksuid");var Qp=N("ZodIPv4",(e,t)=>{bd.init(e,t),st.init(e,t)});function Ax(e){return gc(Qp,e)}a(Ax,"ipv4");var l_=N("ZodMAC",(e,t)=>{Ed.init(e,t),st.init(e,t)});function Rx(e){return op(l_,e)}a(Rx,"mac");var ef=N("ZodIPv6",(e,t)=>{Td.init(e,t),st.init(e,t)});function Dx(e){return yc(ef,e)}a(Dx,"ipv6");var tf=N("ZodCIDRv4",(e,t)=>{Sd.init(e,t),st.init(e,t)});function Ox(e){return vc(tf,e)}a(Ox,"cidrv4");var rf=N("ZodCIDRv6",(e,t)=>{xd.init(e,t),st.init(e,t)});function $x(e){return _c(rf,e)}a($x,"cidrv6");var nf=N("ZodBase64",(e,t)=>{Id.init(e,t),st.init(e,t)});function Cx(e){return Pc(nf,e)}a(Cx,"base64");var of=N("ZodBase64URL",(e,t)=>{Ad.init(e,t),st.init(e,t)});function Nx(e){return wc(of,e)}a(Nx,"base64url");var af=N("ZodE164",(e,t)=>{Rd.init(e,t),st.init(e,t)});function kx(e){return bc(af,e)}a(kx,"e164");var sf=N("ZodJWT",(e,t)=>{Dd.init(e,t),st.init(e,t)});function zx(e){return Tc(sf,e)}a(zx,"jwt");var Pa=N("ZodCustomStringFormat",(e,t)=>{Od.init(e,t),st.init(e,t)});function Ux(e,t,n={}){return di(Pa,e,t,n)}a(Ux,"stringFormat");function Mx(e){return di(Pa,"hostname",ar.hostname,e)}a(Mx,"hostname");function Fx(e){return di(Pa,"hex",ar.hex,e)}a(Fx,"hex");function Lx(e,t){let n=t?.enc??"hex",o=`${e}_${n}`,r=ar[o];if(!r)throw new Error(`Unrecognized hash format: ${o}`);return di(Pa,o,r,t)}a(Lx,"hash");var wa=N("ZodNumber",(e,t)=>{oa.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(o,r,i)=>Wy(e,o,r,i),e.gt=(o,r)=>e.check(Xr(o,r)),e.gte=(o,r)=>e.check(Dt(o,r)),e.min=(o,r)=>e.check(Dt(o,r)),e.lt=(o,r)=>e.check(Jr(o,r)),e.lte=(o,r)=>e.check(Kt(o,r)),e.max=(o,r)=>e.check(Kt(o,r)),e.int=o=>e.check(Bp(o)),e.safe=o=>e.check(Bp(o)),e.positive=o=>e.check(Xr(0,o)),e.nonnegative=o=>e.check(Dt(0,o)),e.negative=o=>e.check(Jr(0,o)),e.nonpositive=o=>e.check(Kt(0,o)),e.multipleOf=(o,r)=>e.check(Fn(o,r)),e.step=(o,r)=>e.check(Fn(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 d_(e){return Ac(wa,e)}a(d_,"number");var fi=N("ZodNumberFormat",(e,t)=>{zs.init(e,t),wa.init(e,t)});function Bp(e){return Dc(fi,e)}a(Bp,"int");function jx(e){return ap(fi,e)}a(jx,"float32");function qx(e){return sp(fi,e)}a(qx,"float64");function Bx(e){return cp(fi,e)}a(Bx,"int32");function Vx(e){return up(fi,e)}a(Vx,"uint32");var ba=N("ZodBoolean",(e,t)=>{Yo.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Ky(e,n,o,r)});function p_(e){return Oc(ba,e)}a(p_,"boolean");var Ta=N("ZodBigInt",(e,t)=>{ia.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(o,r,i)=>Jy(e,o,r,i),e.gte=(o,r)=>e.check(Dt(o,r)),e.min=(o,r)=>e.check(Dt(o,r)),e.gt=(o,r)=>e.check(Xr(o,r)),e.gte=(o,r)=>e.check(Dt(o,r)),e.min=(o,r)=>e.check(Dt(o,r)),e.lt=(o,r)=>e.check(Jr(o,r)),e.lte=(o,r)=>e.check(Kt(o,r)),e.max=(o,r)=>e.check(Kt(o,r)),e.positive=o=>e.check(Xr(BigInt(0),o)),e.negative=o=>e.check(Jr(BigInt(0),o)),e.nonpositive=o=>e.check(Kt(BigInt(0),o)),e.nonnegative=o=>e.check(Dt(BigInt(0),o)),e.multipleOf=(o,r)=>e.check(Fn(o,r));let n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null});function Gx(e){return lp(Ta,e)}a(Gx,"bigint");var cf=N("ZodBigIntFormat",(e,t)=>{$d.init(e,t),Ta.init(e,t)});function Hx(e){return dp(cf,e)}a(Hx,"int64");function Zx(e){return pp(cf,e)}a(Zx,"uint64");var f_=N("ZodSymbol",(e,t)=>{Cd.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Xy(e,n,o,r)});function Wx(e){return fp(f_,e)}a(Wx,"symbol");var m_=N("ZodUndefined",(e,t)=>{Nd.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Qy(e,n,o,r)});function Kx(e){return mp(m_,e)}a(Kx,"_undefined");var h_=N("ZodNull",(e,t)=>{kd.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Yy(e,n,o,r)});function g_(e){return hp(h_,e)}a(g_,"_null");var y_=N("ZodAny",(e,t)=>{Us.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>rv(e,n,o,r)});function Jx(){return Nc(y_)}a(Jx,"any");var v_=N("ZodUnknown",(e,t)=>{Ms.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>nv(e,n,o,r)});function pi(){return kc(v_)}a(pi,"unknown");var __=N("ZodNever",(e,t)=>{zd.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>tv(e,n,o,r)});function uf(e){return gp(__,e)}a(uf,"never");var P_=N("ZodVoid",(e,t)=>{Fs.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>ev(e,n,o,r)});function Xx(e){return zc(P_,e)}a(Xx,"_void");var du=N("ZodDate",(e,t)=>{Ls.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(o,r,i)=>ov(e,o,r,i),e.min=(o,r)=>e.check(Dt(o,r)),e.max=(o,r)=>e.check(Kt(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 Yx(e){return yp(du,e)}a(Yx,"date");var w_=N("ZodArray",(e,t)=>{js.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>gv(e,n,o,r),e.element=t.element,e.min=(n,o)=>e.check(Et(n,o)),e.nonempty=n=>e.check(Et(1,n)),e.max=(n,o)=>e.check(yo(n,o)),e.length=(n,o)=>e.check(vo(n,o)),e.unwrap=()=>e.element});function pu(e,t){return Gy(w_,e,t)}a(pu,"array");function Qx(e){let t=e._zod.def.shape;return df(Object.keys(t))}a(Qx,"keyof");var fu=N("ZodObject",(e,t)=>{Yg.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>yv(e,n,o,r),ce.defineLazy(e,"shape",()=>t.shape),e.keyof=()=>df(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:pi()}),e.loose=()=>e.clone({...e._zod.def,catchall:pi()}),e.strict=()=>e.clone({...e._zod.def,catchall:uf()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>ce.extend(e,n),e.safeExtend=n=>ce.safeExtend(e,n),e.merge=n=>ce.merge(e,n),e.pick=n=>ce.pick(e,n),e.omit=n=>ce.omit(e,n),e.partial=(...n)=>ce.partial(ff,e,n[0]),e.required=(...n)=>ce.required(mf,e,n[0])});function eI(e,t){let n={type:"object",shape:e??{},...ce.normalizeParams(t)};return new fu(n)}a(eI,"object");function tI(e,t){return new fu({type:"object",shape:e,catchall:uf(),...ce.normalizeParams(t)})}a(tI,"strictObject");function rI(e,t){return new fu({type:"object",shape:e,catchall:pi(),...ce.normalizeParams(t)})}a(rI,"looseObject");var mu=N("ZodUnion",(e,t)=>{Qo.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Sp(e,n,o,r),e.options=t.options});function lf(e,t){return new mu({type:"union",options:e,...ce.normalizeParams(t)})}a(lf,"union");var b_=N("ZodXor",(e,t)=>{mu.init(e,t),Md.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Sp(e,n,o,r),e.options=t.options});function nI(e,t){return new b_({type:"union",options:e,inclusive:!1,...ce.normalizeParams(t)})}a(nI,"xor");var T_=N("ZodDiscriminatedUnion",(e,t)=>{mu.init(e,t),qs.init(e,t)});function oI(e,t,n){return new T_({type:"union",options:t,discriminator:e,...ce.normalizeParams(n)})}a(oI,"discriminatedUnion");var E_=N("ZodIntersection",(e,t)=>{Fd.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>vv(e,n,o,r)});function S_(e,t){return new E_({type:"intersection",left:e,right:t})}a(S_,"intersection");var x_=N("ZodTuple",(e,t)=>{Bs.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>_v(e,n,o,r),e.rest=n=>e.clone({...e._zod.def,rest:n})});function I_(e,t,n){let o=t instanceof Re,r=o?n:t,i=o?t:null;return new x_({type:"tuple",items:e,rest:i,...ce.normalizeParams(r)})}a(I_,"tuple");var hu=N("ZodRecord",(e,t)=>{Vs.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Pv(e,n,o,r),e.keyType=t.keyType,e.valueType=t.valueType});function A_(e,t,n){return new hu({type:"record",keyType:e,valueType:t,...ce.normalizeParams(n)})}a(A_,"record");function iI(e,t,n){let o=Nt(e);return o._zod.values=void 0,new hu({type:"record",keyType:o,valueType:t,...ce.normalizeParams(n)})}a(iI,"partialRecord");function aI(e,t,n){return new hu({type:"record",keyType:e,valueType:t,mode:"loose",...ce.normalizeParams(n)})}a(aI,"looseRecord");var R_=N("ZodMap",(e,t)=>{Ld.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>mv(e,n,o,r),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...n)=>e.check(Yr(...n)),e.nonempty=n=>e.check(Yr(1,n)),e.max=(...n)=>e.check(Ln(...n)),e.size=(...n)=>e.check(go(...n))});function sI(e,t,n){return new R_({type:"map",keyType:e,valueType:t,...ce.normalizeParams(n)})}a(sI,"map");var D_=N("ZodSet",(e,t)=>{jd.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>hv(e,n,o,r),e.min=(...n)=>e.check(Yr(...n)),e.nonempty=n=>e.check(Yr(1,n)),e.max=(...n)=>e.check(Ln(...n)),e.size=(...n)=>e.check(go(...n))});function cI(e,t){return new D_({type:"set",valueType:e,...ce.normalizeParams(t)})}a(cI,"set");var va=N("ZodEnum",(e,t)=>{Gs.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(o,r,i)=>iv(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 va({...t,checks:[],...ce.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 va({...t,checks:[],...ce.normalizeParams(r),entries:i})}});function df(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(o=>[o,o])):e;return new va({type:"enum",entries:n,...ce.normalizeParams(t)})}a(df,"_enum");function uI(e,t){return new va({type:"enum",entries:e,...ce.normalizeParams(t)})}a(uI,"nativeEnum");var O_=N("ZodLiteral",(e,t)=>{Hs.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>av(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 lI(e,t){return new O_({type:"literal",values:Array.isArray(e)?e:[e],...ce.normalizeParams(t)})}a(lI,"literal");var $_=N("ZodFile",(e,t)=>{qd.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>uv(e,n,o,r),e.min=(n,o)=>e.check(Yr(n,o)),e.max=(n,o)=>e.check(Ln(n,o)),e.mime=(n,o)=>e.check(ai(Array.isArray(n)?n:[n],o))});function dI(e){return _p($_,e)}a(dI,"file");var C_=N("ZodTransform",(e,t)=>{Zs.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>fv(e,n,o,r),e._zod.parse=(n,o)=>{if(o.direction==="backward")throw new lo(e.constructor.name);n.addIssue=i=>{if(typeof i=="string")n.issues.push(ce.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(ce.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 pf(e){return new C_({type:"transform",transform:e})}a(pf,"transform");var ff=N("ZodOptional",(e,t)=>{aa.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>xp(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function su(e){return new ff({type:"optional",innerType:e})}a(su,"optional");var N_=N("ZodExactOptional",(e,t)=>{Bd.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>xp(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function k_(e){return new N_({type:"optional",innerType:e})}a(k_,"exactOptional");var z_=N("ZodNullable",(e,t)=>{Ws.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>wv(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function cu(e){return new z_({type:"nullable",innerType:e})}a(cu,"nullable");function pI(e){return su(cu(e))}a(pI,"nullish");var U_=N("ZodDefault",(e,t)=>{Vd.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Tv(e,n,o,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function M_(e,t){return new U_({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():ce.shallowClone(t)}})}a(M_,"_default");var F_=N("ZodPrefault",(e,t)=>{Gd.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Ev(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function L_(e,t){return new F_({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():ce.shallowClone(t)}})}a(L_,"prefault");var mf=N("ZodNonOptional",(e,t)=>{Hd.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>bv(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function j_(e,t){return new mf({type:"nonoptional",innerType:e,...ce.normalizeParams(t)})}a(j_,"nonoptional");var q_=N("ZodSuccess",(e,t)=>{Zd.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>lv(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function fI(e){return new q_({type:"success",innerType:e})}a(fI,"success");var B_=N("ZodCatch",(e,t)=>{Wd.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Sv(e,n,o,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function V_(e,t){return new B_({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}a(V_,"_catch");var G_=N("ZodNaN",(e,t)=>{Kd.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>sv(e,n,o,r)});function mI(e){return vp(G_,e)}a(mI,"nan");var hf=N("ZodPipe",(e,t)=>{Ks.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>xv(e,n,o,r),e.in=t.in,e.out=t.out});function uu(e,t){return new hf({type:"pipe",in:e,out:t})}a(uu,"pipe");var gf=N("ZodCodec",(e,t)=>{hf.init(e,t),sa.init(e,t)});function hI(e,t,n){return new gf({type:"pipe",in:e,out:t,transform:n.decode,reverseTransform:n.encode})}a(hI,"codec");var H_=N("ZodReadonly",(e,t)=>{Jd.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Iv(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function Z_(e){return new H_({type:"readonly",innerType:e})}a(Z_,"readonly");var W_=N("ZodTemplateLiteral",(e,t)=>{Xd.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>cv(e,n,o,r)});function gI(e,t){return new W_({type:"template_literal",parts:e,...ce.normalizeParams(t)})}a(gI,"templateLiteral");var K_=N("ZodLazy",(e,t)=>{ep.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Rv(e,n,o,r),e.unwrap=()=>e._zod.def.getter()});function J_(e){return new K_({type:"lazy",getter:e})}a(J_,"lazy");var X_=N("ZodPromise",(e,t)=>{Qd.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Av(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function yI(e){return new X_({type:"promise",innerType:e})}a(yI,"promise");var Y_=N("ZodFunction",(e,t)=>{Yd.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>pv(e,n,o,r)});function vI(e){return new Y_({type:"function",input:Array.isArray(e?.input)?I_(e?.input):e?.input??pu(pi()),output:e?.output??pi()})}a(vI,"_function");var gu=N("ZodCustom",(e,t)=>{Js.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>dv(e,n,o,r)});function _I(e){let t=new at({check:"custom"});return t._zod.check=e,t}a(_I,"check");function PI(e,t){return Bc(gu,e??(()=>!0),t)}a(PI,"custom");function Q_(e,t={}){return Vc(gu,e,t)}a(Q_,"refine");function eP(e){return Pp(e)}a(eP,"superRefine");var wI=wp,bI=bp;function TI(e,t={}){let n=new gu({type:"custom",check:"custom",fn:a(o=>o instanceof e,"fn"),abort:!0,...ce.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(TI,"_instanceof");var EI=a((...e)=>Tp({Codec:gf,Boolean:ba,String:_a},...e),"stringbool");function SI(e){let t=J_(()=>lf([qp(e),d_(),p_(),g_(),pu(t),A_(qp(),t)]));return t}a(SI,"json");function xI(e,t){return uu(pf(e),t)}a(xI,"preprocess");var Fq={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 Lq(e){gt({customError:e})}a(Lq,"setErrorMap");function jq(){return gt().customError}a(jq,"getErrorMap");var tP;tP||(tP={});var ye={...iu,...Up,iso:ya},qq=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 Bq(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(Bq,"detectVersion");function Vq(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(Vq,"resolveRef");function II(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return ye.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 ye.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=Vq(r,t),s=Gt(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 ye.null();if(r.length===0)return ye.never();if(r.length===1)return ye.literal(r[0]);if(r.every(s=>typeof s=="string"))return ye.enum(r);let i=r.map(s=>ye.literal(s));return i.length<2?i[0]:ye.union([i[0],i[1],...i.slice(2)])}if(e.const!==void 0)return ye.literal(e.const);let n=e.type;if(Array.isArray(n)){let r=n.map(i=>{let s={...e,type:i};return II(s,t)});return r.length===0?ye.never():r.length===1?r[0]:ye.union(r)}if(!n)return ye.any();let o;switch(n){case"string":{let r=ye.string();if(e.format){let i=e.format;i==="email"?r=r.check(ye.email()):i==="uri"||i==="uri-reference"?r=r.check(ye.url()):i==="uuid"||i==="guid"?r=r.check(ye.uuid()):i==="date-time"?r=r.check(ye.iso.datetime()):i==="date"?r=r.check(ye.iso.date()):i==="time"?r=r.check(ye.iso.time()):i==="duration"?r=r.check(ye.iso.duration()):i==="ipv4"?r=r.check(ye.ipv4()):i==="ipv6"?r=r.check(ye.ipv6()):i==="mac"?r=r.check(ye.mac()):i==="cidr"?r=r.check(ye.cidrv4()):i==="cidr-v6"?r=r.check(ye.cidrv6()):i==="base64"?r=r.check(ye.base64()):i==="base64url"?r=r.check(ye.base64url()):i==="e164"?r=r.check(ye.e164()):i==="jwt"?r=r.check(ye.jwt()):i==="emoji"?r=r.check(ye.emoji()):i==="nanoid"?r=r.check(ye.nanoid()):i==="cuid"?r=r.check(ye.cuid()):i==="cuid2"?r=r.check(ye.cuid2()):i==="ulid"?r=r.check(ye.ulid()):i==="xid"?r=r.check(ye.xid()):i==="ksuid"&&(r=r.check(ye.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"?ye.number().int():ye.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=ye.boolean();break}case"null":{o=ye.null();break}case"object":{let r={},i=e.properties||{},s=new Set(e.required||[]);for(let[h,g]of Object.entries(i)){let y=Gt(g,t);r[h]=s.has(h)?y:y.optional()}if(e.propertyNames){let h=Gt(e.propertyNames,t),g=e.additionalProperties&&typeof e.additionalProperties=="object"?Gt(e.additionalProperties,t):ye.any();if(Object.keys(r).length===0){o=ye.record(h,g);break}let y=ye.object(r).passthrough(),T=ye.looseRecord(h,g);o=ye.intersection(y,T);break}if(e.patternProperties){let h=e.patternProperties,g=Object.keys(h),y=[];for(let b of g){let P=Gt(h[b],t),S=ye.string().regex(new RegExp(b));y.push(ye.looseRecord(S,P))}let T=[];if(Object.keys(r).length>0&&T.push(ye.object(r).passthrough()),T.push(...y),T.length===0)o=ye.object({}).passthrough();else if(T.length===1)o=T[0];else{let b=ye.intersection(T[0],T[1]);for(let P=2;P<T.length;P++)b=ye.intersection(b,T[P]);o=b}break}let u=ye.object(r);e.additionalProperties===!1?o=u.strict():typeof e.additionalProperties=="object"?o=u.catchall(Gt(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(h=>Gt(h,t)),u=i&&typeof i=="object"&&!Array.isArray(i)?Gt(i,t):void 0;u?o=ye.tuple(s).rest(u):o=ye.tuple(s),typeof e.minItems=="number"&&(o=o.check(ye.minLength(e.minItems))),typeof e.maxItems=="number"&&(o=o.check(ye.maxLength(e.maxItems)))}else if(Array.isArray(i)){let s=i.map(h=>Gt(h,t)),u=e.additionalItems&&typeof e.additionalItems=="object"?Gt(e.additionalItems,t):void 0;u?o=ye.tuple(s).rest(u):o=ye.tuple(s),typeof e.minItems=="number"&&(o=o.check(ye.minLength(e.minItems))),typeof e.maxItems=="number"&&(o=o.check(ye.maxLength(e.maxItems)))}else if(i!==void 0){let s=Gt(i,t),u=ye.array(s);typeof e.minItems=="number"&&(u=u.min(e.minItems)),typeof e.maxItems=="number"&&(u=u.max(e.maxItems)),o=u}else o=ye.array(ye.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(II,"convertBaseSchema");function Gt(e,t){if(typeof e=="boolean")return e?ye.any():ye.never();let n=II(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(g=>Gt(g,t)),h=ye.union(u);n=o?ye.intersection(n,h):h}if(e.oneOf&&Array.isArray(e.oneOf)){let u=e.oneOf.map(g=>Gt(g,t)),h=ye.xor(u);n=o?ye.intersection(n,h):h}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)n=o?n:ye.any();else{let u=o?n:Gt(e.allOf[0],t),h=o?0:1;for(let g=h;g<e.allOf.length;g++)u=ye.intersection(u,Gt(e.allOf[g],t));n=u}e.nullable===!0&&t.version==="openapi-3.0"&&(n=ye.nullable(n)),e.readOnly===!0&&(n=ye.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))qq.has(u)||(r[u]=e[u]);return Object.keys(r).length>0&&t.registry.add(n,r),n}a(Gt,"convertSchema");function AI(e,t){if(typeof e=="boolean")return e?ye.any():ye.never();let n=Bq(e,t?.defaultTarget),o=e.$defs||e.definitions||{},r={version:n,defs:o,refs:new Map,processing:new Set,rootSchema:e,registry:t?.registry??kt};return Gt(e,r)}a(AI,"fromJSONSchema");var rP={};nr(rP,{bigint:()=>Wq,boolean:()=>Zq,date:()=>Kq,number:()=>Hq,string:()=>Gq});function Gq(e){return nc(_a,e)}a(Gq,"string");function Hq(e){return Rc(wa,e)}a(Hq,"number");function Zq(e){return $c(ba,e)}a(Zq,"boolean");function Wq(e){return Cc(Ta,e)}a(Wq,"bigint");function Kq(e){return Uc(du,e)}a(Kq,"date");gt(Xs());var nP={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 RI=(n=>(n.IMAGE="image",n.TEXT="text",n))(RI||{}),Xt=fe.object({apiKey:fe.string()}),DI=fe.object({serviceAccountJson:fe.string().min(1)}),OI=Xt,$I=Xt.extend({apiKeyHash:fe.string()}),CI=Xt,NI=Xt,kI=Xt,zI=Xt,UI=Xt,MI=Xt,FI=fe.object({accessKeyId:fe.string().min(1),secretAccessKey:fe.string().min(1),sessionToken:fe.string().optional()}),LI=Xt,jI=fe.object({}),qI=fe.object({}),oP=fe.object({modelId:fe.string(),modelName:fe.string(),modelType:fe.enum(RI)}),BI=fe.object({apiKeyHeader:fe.string(),baseUrl:fe.string(),models:fe.array(oP),defaultHeaders:fe.record(fe.string(),fe.string()).optional(),apiStyle:fe.enum(["chat","responses"]).optional()}),VI=fe.object({accountId:fe.string(),gatewayId:fe.string(),models:fe.array(oP),vertexProject:fe.string().optional(),vertexRegion:fe.string().optional()}),GI=fe.object({resourceName:fe.string(),apiVersion:fe.preprocess(e=>typeof e=="string"&&e.trim().length===0?void 0:e,fe.string().optional())}),HI=fe.object({}),ZI=fe.object({}),WI=fe.object({}),KI=fe.object({region:fe.string().min(1)}),JI=fe.object({project:fe.string().regex(/^[a-z0-9][a-z0-9-]{0,62}$/,nP.invalidGcpResourceId),region:fe.string().regex(/^[a-z0-9][a-z0-9-]{0,62}$/,nP.invalidGcpResourceId),models:fe.array(oP)}),XI=fe.object({}),mi=fe.object({}),tQ=fe.union([OI,kI,zI,UI,MI,NI,CI,$I,FI,DI,LI]),rQ=fe.union([BI,VI,GI,JI,KI,jI,HI,ZI,WI,qI,XI,mi]),nQ=fe.discriminatedUnion("provider",[fe.object({provider:fe.literal("openai"),config:ZI.partial(),auth:UI.partial()}),fe.object({provider:fe.literal("openrouter"),config:WI.partial(),auth:MI.partial()}),fe.object({provider:fe.literal("anthropic"),config:jI.partial(),auth:OI.partial()}),fe.object({provider:fe.literal("azure"),config:GI.partial(),auth:kI.partial()}),fe.object({provider:fe.literal("google"),config:HI.partial(),auth:zI.partial()}),fe.object({provider:fe.literal("cloudflare-gateway"),config:VI.partial(),auth:NI.partial()}),fe.object({provider:fe.literal("custom"),config:BI.partial(),auth:CI.partial()}),fe.object({provider:fe.literal("activepieces"),config:qI.partial(),auth:$I.partial()}),fe.object({provider:fe.literal("bedrock"),config:KI.partial(),auth:FI.partial()}),fe.object({provider:fe.literal("vertex"),config:JI.partial(),auth:DI.partial()}),fe.object({provider:fe.literal("mistral"),config:XI.partial(),auth:LI.partial()}),fe.object({provider:fe.literal("xai"),config:mi.partial(),auth:Xt.partial()}),fe.object({provider:fe.literal("deepseek"),config:mi.partial(),auth:Xt.partial()}),fe.object({provider:fe.literal("zai"),config:mi.partial(),auth:Xt.partial()}),fe.object({provider:fe.literal("qwen"),config:mi.partial(),auth:Xt.partial()}),fe.object({provider:fe.literal("minimax"),config:mi.partial(),auth:Xt.partial()}),fe.object({provider:fe.literal("moonshot"),config:mi.partial(),auth:Xt.partial()})]);var fQ=x().check(jt(/^#[0-9A-Fa-f]{6}$/));var hQ=M({filename:x(),data:$e(),type:Ee("file"),mimetype:W(x())});var Jq=he(QI());var bQ=M({...Ur,name:x(),permissions:Ae(x()),platformId:vt(x()),type:x(),userCount:W(zt())});var $Q=fe.enum(["active","out_of_credits","rejected","unreachable"]);var eA=(o=>(o.AGENT_DECIDE="agent-decide",o.CHOOSE_YOURSELF="choose-yourself",o.LEAVE_EMPTY="leave-empty",o))(eA||{}),iP=(n=>(n.FILE="FILE",n.TABLE="TABLE",n))(iP||{}),aP=(o=>(o.SSE="sse",o.STREAMABLE_HTTP="streamable-http",o.SIMPLE_HTTP="http",o))(aP||{});var sP=(o=>(o.TEXT="text",o.NUMBER="number",o.BOOLEAN="boolean",o))(sP||{});var cP=(n=>(n.IN_PROGRESS="in-progress",n.COMPLETED="completed",n))(cP||{});var Xq=M({mode:xe(eA),value:$e()}),Yq=M({auth:W(x()),fields:Ce(x(),Xq)}),Qq=M({pieceName:x(),pieceVersion:x(),actionName:x(),predefinedInput:W(Yq)}),eB=M({type:Ee("PIECE"),toolName:x().check(Et(1)),pieceMetadata:Qq}),tB=M({type:Ee("none")}),rB=M({type:Ee("access_token"),accessToken:x()}),nB=M({type:Ee("api_key"),apiKey:x(),apiKeyHeader:x()}),oB=M({type:Ee("headers"),headers:Ce(x(),x())}),iB=bo("type",[tB,rB,nB,oB]),tA=M({type:Ee("FLOW"),toolName:x().check(Et(1)),externalFlowId:x(),flowDisplayName:W(x())}),rA=M({type:Ee("MCP"),toolName:x().check(Et(1)),serverUrl:KS(),protocol:xe(aP),auth:iB}),nA=M({type:Ee("KNOWLEDGE_BASE"),toolName:x().check(Et(1)),sourceType:xe(iP),sourceId:x(),sourceName:x()}),aB=bo("type",[eB,tA,rA,nA]),sB=M({displayName:x(),description:W(x()),type:xe(sP)}),oA=M({type:Ee("MARKDOWN"),markdown:x()}),Ea={type:Ee("TOOL_CALL"),input:vt(Ce(x(),$e())),output:W($e()),toolName:x(),status:xe(cP),toolCallId:x(),startTime:x(),endTime:W(x())},_ee=M(Ea),iA=bo("toolCallType",[M({...Ea,toolCallType:Ee("PIECE"),pieceName:x(),pieceVersion:x(),actionName:x()}),M({...Ea,toolCallType:Ee("FLOW"),displayName:x(),externalFlowId:x()}),M({...Ea,toolCallType:Ee("MCP"),displayName:x(),serverUrl:x()}),M({...Ea,toolCallType:Ee("KNOWLEDGE_BASE"),displayName:x(),sourceType:x()}),M({...Ea,toolCallType:Ee("UNKNOWN"),displayName:x()})]),cB=je([oA,iA]);var uB=10800*1e3,lB=900*1e3;var dP=(n=>(n.IMAGE="image",n.TEXT="text",n))(dP||{}),Gn=M({apiKey:x()}),pB=Gn,fB=M({apiKey:x(),apiKeyHash:x()}),mB=Gn,hB=Gn,gB=Gn,yB=Gn,vB=Gn,_B=Gn,PB=Gn,uA=M({serviceAccountJson:x().check(Et(1))}),lA=M({accessKeyId:x().check(Et(1)),secretAccessKey:x().check(Et(1)),sessionToken:W(x())}),wB=M({}),bB=M({}),TB=M({}),EB=M({}),SB=M({}),xB=M({}),pP=M({modelId:x(),modelName:x(),modelType:xe(dP)}),dA=M({apiKeyHeader:x(),baseUrl:x(),models:Ae(pP),defaultHeaders:W(Ce(x(),x())),apiStyle:W(xe(["chat","responses"]))}),pA=M({accountId:x(),gatewayId:x(),models:Ae(pP),vertexProject:W(x()),vertexRegion:W(x())}),fA=M({resourceName:x(),apiVersion:Eo(To(e=>typeof e=="string"&&e.trim().length===0?void 0:e),W(x()))}),mA=M({region:x().check(Et(1))}),hA=M({project:x().check(jt(/^[a-z0-9][a-z0-9-]{0,62}$/)),region:x().check(jt(/^[a-z0-9][a-z0-9-]{0,62}$/)),models:Ae(pP)}),gA=M({}),IB=je([pB,gB,yB,vB,_B,hB,mB,fB,lA,uA,PB]),yA=je([dA,pA,fA,hA,mA,wB,TB,EB,SB,bB,xB,gA]),AB=M({id:x(),name:x(),type:xe(dP)}),RB=M({id:x(),name:x(),provider:xe(Io),config:yA,enabledForChat:Je()}),DB=M({provider:xe(Io),name:x(),enabledForChat:Je(),keys:Ae(M({id:x(),name:x()}))}),OB=M({provider:xe(Io),configId:x(),config:yA,auth:IB,platformId:x()});var Tee={openai:"openai",anthropic:"anthropic","google-ai-studio":"google","google-vertex-ai":"google"},aA=["gpt-5.5","gpt-5.6-sol","gpt-5.6-terra","gpt-5.6-luna","gpt-5.4-mini","gpt-5.4-nano","gpt-4.1","gpt-4.1-mini"],$B=["claude-sonnet-4-6","claude-opus-4-7","claude-haiku-4-5"],vA=["claude-sonnet-4.6","claude-opus-4.7","claude-opus-4.8","claude-haiku-4.5"],uP=["gemini-3.7-flash","gemini-3.1-pro-preview","gemini-3-flash-preview"],lP=["gemini-2.5-pro","gemini-2.5-flash"],CB=["grok-4.20"],Eee={google:lP,vertex:lP},See=vA.map(e=>`anthropic/${e}`),NB={openai:aA,anthropic:$B,google:uP,vertex:uP,activepieces:[...vA.map(e=>`anthropic/${e}`),...aA.map(e=>`openai/${e}`),...[...uP,...lP].map(e=>`google/${e}`),...CB.map(e=>`x-ai/${e}`)]};var sA=128e3,kB={openai:128e3,anthropic:2e5,google:1048576,bedrock:2e5,vertex:1048576,azure:128e3,openrouter:128e3,activepieces:2e5,mistral:128e3};function zB({provider:e}){return e?kB[e]??sA:sA}a(zB,"getMaxContextTokens");var cA={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"},UB={anthropic:"native",google:"native",openrouter:"plugin",activepieces:"plugin"},MB=new Set(["anthropic","mistral","xai","deepseek","zai","qwen","minimax","moonshot"]),FB={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 qt(e){return{chatModels:NB[e],maxContextTokens:zB({provider:e}),defaultEmbeddingModel:cA[e],supportsEmbedding:cA[e]!==void 0,supportsImageGeneration:!MB.has(e),defaultImageModel:LB[e],webSearch:UB[e]}}a(qt,"buildProviderCapabilities");var _A=[{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"}],LB={activepieces:_A[0].modelId,openrouter:"google/gemini-3.1-flash-lite-image",openai:"gpt-image-1.5",google:"gemini-3.1-flash-image"},jB={openai:qt("openai"),anthropic:qt("anthropic"),openrouter:qt("openrouter"),azure:qt("azure"),google:qt("google"),"cloudflare-gateway":qt("cloudflare-gateway"),custom:qt("custom"),bedrock:qt("bedrock"),vertex:qt("vertex"),mistral:qt("mistral"),activepieces:qt("activepieces"),xai:qt("xai"),deepseek:qt("deepseek"),zai:qt("zai"),qwen:qt("qwen"),minimax:qt("minimax"),moonshot:qt("moonshot")};var qB=M({base64Url:x(),fileName:x(),extension:W(x())}),BB=M({mimeType:x(),url:x(),fileName:W(x())}),fP=je([qB,BB]);var VB=je([M({type:Ee("file"),value:fP}),M({type:Ee("markdown"),value:x(),files:W(Ae(fP))})]),GB=M({sessionId:x(),message:x(),files:W(Ae(x()))});var wA=(n=>(n.ON_NEW_RECORD="ON_NEW_RECORD",n.ON_UPDATE_RECORD="ON_UPDATE_RECORD",n))(wA||{}),bA=(n=>(n.ENABLED="ENABLED",n.DISABLED="DISABLED",n))(bA||{}),mP=(o=>(o.RECORD_CREATED="RECORD_CREATED",o.RECORD_UPDATED="RECORD_UPDATED",o.RECORD_DELETED="RECORD_DELETED",o))(mP||{});var HB=je([M({...Ur,name:x(),externalId:x(),type:Ee("STATIC_DROPDOWN"),tableId:x(),projectId:x(),data:M({options:Ae(M({value:x()}))})}),M({...Ur,name:x(),externalId:x(),type:je([Ee("TEXT"),Ee("NUMBER"),Ee("DATE"),Ee("DATETIME")]),tableId:x(),projectId:x()})]),ZB=M({...Ur,name:x(),folderId:vt(x()),projectId:x(),externalId:x(),status:Zv(bA),trigger:Zv(wA)}),WB=M({...Ur,tableId:x(),projectId:x(),cells:Ce(x(),M({updated:x(),created:x(),value:$e(),fieldName:x()}))}),KB=M({events:Ae(xe(mP)),webhookUrl:x(),flowId:x()}),JB=M({fields:Ae(M({id:x(),name:x()})),rows:Ae(Ce(x(),x())),name:x()}),XB=M({projectId:x(),limit:W(Wc.number()),cursor:W(x()),name:W(x()),externalIds:zp(x()),folderId:W(x()),folderIds:zp(x())}),YB=M({records:Ae(Ae(M({fieldId:x(),value:EA()}))),tableId:x()}),QB=M({cells:W(Ae(M({fieldId:x(),value:EA()}))),tableId:x(),agentUpdate:W(Je())}),TA=bo("operator",[hi("eq"),hi("neq"),hi("gt"),hi("gte"),hi("lt"),hi("lte"),hi("co"),PA("exists"),PA("not_exists")]),eV=M({tableId:x(),limit:W(Wc.number()),cursor:W(x()),filters:zp(TA)});function EA(){return Eo(To(e=>e==null?e:String(e)),Zc(x()))}a(EA,"coerceToString");function hi(e){return M({fieldId:x(),operator:Ee(e),value:x()})}a(hi,"valueFilter");function PA(e){return M({fieldId:x(),operator:Ee(e)})}a(PA,"existenceFilter");var tV=M({status:W(zt()),body:W($e()),headers:W(Ce(x(),x()))}),rV=M({...Ur,deleted:vt(xo),ownerId:x(),displayName:x(),platformId:x(),externalId:vt(x())});var SA=M({name:x(),description:W(x()),type:x(),required:Je()}),nV=M({pieceName:x(),triggerName:x(),input:M({toolName:x(),toolDescription:x(),inputSchema:Ae(SA),returnsResponse:Je()})});var xA="^[0-9]+\\.[0-9]+\\.[0-9]+$",Vee=new RegExp(xA),iV="^([~^])?[0-9]+\\.[0-9]+\\.[0-9]+$",Gee=x().check(jt(new RegExp(xA))),Hee=x().check(jt(new RegExp(iV))),aV=M({packageType:Ee("ARCHIVE"),pieceType:xe(ma),pieceName:x(),pieceVersion:x(),archiveId:x(),platformId:x()}),IA=M({packageType:Ee("REGISTRY"),pieceType:Ee("OFFICIAL"),pieceName:x(),pieceVersion:x()}),AA=M({packageType:Ee("REGISTRY"),pieceType:Ee("CUSTOM"),pieceName:x(),pieceVersion:x(),platformId:x()}),Zee=je([IA,AA]),Wee=je([aV,IA,AA]);var sV=bo("type",[M({type:Ee("CRON_EXPRESSION"),cronExpression:x(),timezone:x()}),M({type:Ee("INTERVAL"),intervalMs:JS().check(Dt(6e4))})]),Kee=M({...Ur,type:xe(pn),projectId:x(),flowId:x(),triggerName:x(),schedule:vt(sV),flowVersionId:x(),pieceName:x(),pieceVersion:x(),deleted:vt(x()),simulate:Je()}),RA=(m=>(m.UNKNOWN="UNKNOWN",m.FLOW_RUN_LOG="FLOW_RUN_LOG",m.FLOW_RUN_LOG_SLICE="FLOW_RUN_LOG_SLICE",m.PACKAGE_ARCHIVE="PACKAGE_ARCHIVE",m.FLOW_STEP_FILE="FLOW_STEP_FILE",m.SAMPLE_DATA="SAMPLE_DATA",m.TRIGGER_PAYLOAD="TRIGGER_PAYLOAD",m.SAMPLE_DATA_INPUT="SAMPLE_DATA_INPUT",m.TRIGGER_EVENT_FILE="TRIGGER_EVENT_FILE",m.PROJECT_RELEASE="PROJECT_RELEASE",m.FLOW_VERSION_BACKUP="FLOW_VERSION_BACKUP",m.PLATFORM_ASSET="PLATFORM_ASSET",m.USER_PROFILE_PICTURE="USER_PROFILE_PICTURE",m.WEBHOOK_PAYLOAD="WEBHOOK_PAYLOAD",m.MCP_CALL_PAYLOAD="MCP_CALL_PAYLOAD",m.KNOWLEDGE_BASE="KNOWLEDGE_BASE",m.FLOW_BUNDLE="FLOW_BUNDLE",m.PREWARM_SCOPE="PREWARM_SCOPE",m))(RA||{}),DA=(n=>(n.NONE="NONE",n.ZSTD="ZSTD",n))(DA||{}),OA=(n=>(n.S3="S3",n.DB="DB",n))(OA||{}),Jee=M({...Ur,projectId:vt(x()),platformId:vt(x()),type:xe(RA),compression:xe(DA),data:W($e()),location:xe(OA),size:vt(zt()),fileName:vt(x()),s3Key:vt(x()),metadata:vt(Ce(x(),x()))}),$A=(o=>(o.ADMIN="ADMIN",o.MEMBER="MEMBER",o.OPERATOR="OPERATOR",o))($A||{}),CA=(n=>(n.ACTIVE="ACTIVE",n.INACTIVE="INACTIVE",n))(CA||{}),Xee=M({id:x(),email:x(),firstName:x(),status:xe(CA),externalId:vt(x()),platformId:vt(x()),platformRole:xe($A),lastName:x(),created:xo,updated:xo,lastActiveDate:vt(xo),imageUrl:vt(x())});var gP=M({...We.shape,...ke(Ce(x(),$e()),"OBJECT").shape});var yP=M({...We.shape,formatProperty:W(x()),...ke(x(),"RICH_TEXT").shape});var kA=M({...We.shape,...ke(x(),"COLOR").shape});var vP=je([_r,jn,yP,Cp,Bn,Pr,qn,Mv,Kc,Lv,Vn,Yc,gP,Qc,Xc,Fv,Jc,kA]),$={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 mn=M({displayName:x(),description:W(x()),hasConnectionIdentifier:W(Je())});var zA=M({username:x(),password:x()}),_P=M({...mn.shape,username:M({displayName:x(),description:W(x())}),password:M({displayName:x(),description:W(x())}),...ke(zA,"BASIC_AUTH").shape});var dV=Ce(x(),je([_r,jn,Vn,Bn,Pr])),PP=M({...mn.shape,props:dV,...ke($e(),"CUSTOM_AUTH").shape});var gi=M({...mn.shape,...ke(M({auth:x()}),"SECRET_TEXT").shape});var pV=Ce(x(),je([_r,jn,gi,Vn,Bn,Pr,qn,Cp])),UA=M({...mn.shape,props:pV,...ke($e(),"OIDC").shape});var wP=(n=>(n.HEADER="HEADER",n.BODY="BODY",n))(wP||{}),MA=je([_r,gi,Pr]),FA=Ce(x(),MA),fV=M({props:W(Ce(x(),MA)),authUrl:x(),tokenUrl:x(),scope:Ae(x()),prompt:W(je([Ee("none"),Ee("consent"),Ee("login"),Ee("omit")])),pkce:W(Je()),pkceMethod:W(je([Ee("plain"),Ee("S256")])),authorizationMethod:W(xe(wP)),grantType:W(je([xe(tu),Ee(jv)])),extra:W(Ce(x(),x()))}),LA=M({access_token:x(),props:W(FA),data:Ce(x(),Hc())}),bP=M({...mn.shape,...fV.shape,...ke(LA,"OAUTH2").shape});var Sa=je([_P,PP,UA,bP,gi]),yu="Connection",xa={SecretText(e){return{...e,valueSchema:void 0,type:"SECRET_TEXT"}},OAuth2(e){return{...e,valueSchema:void 0,type:"OAUTH2",displayName:e.displayName||yu}},BasicAuth(e){return{...e,valueSchema:void 0,type:"BASIC_AUTH",displayName:e.displayName||yu,required:!0}},CustomAuth(e){return{...e,valueSchema:void 0,type:"CUSTOM_AUTH",displayName:e.displayName||yu}},OIDC(e){return{...e,valueSchema:void 0,type:"OIDC",displayName:e.displayName||yu}},None(){}};var Nre={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 mV=M({...We.shape,...ke($e(),"CUSTOM").shape,code:x()});var hV=je([vP,Sa]),TP=Ce(x(),hV),ene=Ce(x(),vP);var jA=je([M({strategy:Ee("CRON"),cronExpression:x()}),M({strategy:Ee("NONE")})]),Ia=class{constructor(t,n,o,r,i,s,u,h,g,y,T,b,P,S,R,I,l,m,d,v,p){this.name=t;this.displayName=n;this.description=o;this.requireAuth=r;this.props=i;this.type=s;this.handshakeConfiguration=u;this.onHandshake=h;this.renewConfiguration=g;this.onRenew=y;this.onEnable=T;this.onDisable=b;this.onStart=P;this.run=S;this.test=R;this.sampleData=I;this.testStrategy=l;this.outputSchema=m;this.aiMetadata=d;this.classification=v;this.propertyGroups=p}static{a(this,"ITrigger")}},Aa=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,yt(e.sampleData)&&yt(e.test)?"SIMULATION":"TEST_FUNCTION",e.outputSchema,e.aiMetadata,e.classification,e.propertyGroups)}},"createTrigger");var qA="2",_f="0.82.0";var EP=class{constructor(t,n,o,r,i,s,u,h,g=_f,y,T="",b){this.displayName=t;this.logoUrl=n;this.authors=o;this.events=r;this.categories=u;this.auth=h;this.minimumSupportedRelease=g;this.maximumSupportedRelease=y;this.description=T;this.deprecated=b;this._actions={};this._triggers={};this.getContextInfo=a(()=>({version:qA}),"getContextInfo");(!yV(g)||vV(g,_f))&&(this.minimumSupportedRelease=_f),i.forEach(P=>this._actions[P.name]=P),s.forEach(P=>this._triggers[P.name]=P)}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:gV(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}},VA=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 EP(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 gV(e){if(e!==void 0)return Array.isArray(e)?e.map(BA):BA(e)}a(gV,"withConnectionIdentifierFlag");function BA(e){return{...e,hasConnectionIdentifier:e.getConnectionIdentifier!==void 0}}a(BA,"flagConnectionIdentifier");function yV(e){return/^\d+\.\d+\.\d+$/.test(e)}a(yV,"isValidSimpleSemver");function vV(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(vV,"isSemverLessThan");var _V=W(Ce(x(),Ce(x(),x()))),GA=M({id:W(x()),name:x(),displayName:x(),logoUrl:x(),description:x(),authors:Ae(x()),platformId:W(x()),directoryPath:W(x()),auth:W(je([Sa,Ae(Sa)])),version:x(),categories:W(Ae(xe(ha))),minimumSupportedRelease:W(x()),maximumSupportedRelease:W(x()),deprecated:W(Je()),i18n:_V}),PV=xe(["human","ai","both"]),HA=M({description:W(x()),idempotent:W(Je())}),ZA=xe(["READ","SEARCH","WRITE","DESTRUCTIVE"]);var wV=xe(["tabs","section","summary","builder","footer"]),WA=M({key:x(),display:wV,label:W(x()),description:W(x()),icon:W(x()),props:Ae(x())}),KA=M({name:x(),displayName:x(),description:x(),props:TP,propertyGroups:W(Ae(WA)),requireAuth:Je(),errorHandlingOptions:W(Uv),outputSchema:W(Dp()),audience:W(PV),aiMetadata:W(HA),classification:W(ZA)}),JA=M({name:x(),displayName:x(),description:x(),props:TP,propertyGroups:W(Ae(WA)),errorHandlingOptions:W(Uv),type:xe(pn),sampleData:$e(),handshakeConfiguration:W(Dp()),renewConfiguration:W(jA),testStrategy:xe(nu),outputSchema:W(Dp()),aiMetadata:W(HA),classification:W(ZA)}),bV=M({...GA.shape,actions:Ce(x(),KA),triggers:Ce(x(),JA)}),TV=M({...GA.shape,actions:zt(),triggers:zt(),suggestedActions:W(Ae(KA)),suggestedTriggers:W(Ae(JA))}),XA=M({projectUsage:zt(),pieceType:xe(ma),packageType:xe(eu),platformId:W(x()),archiveId:W(x())}),noe=M({...bV.shape,...XA.shape}),ooe=M({...TV.shape,...XA.shape}),ioe=M({name:x(),version:x()});var EV=he(require("path")),SV=he(require("fs/promises"));var Ra=require("node:stream");var Pf=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 wf=class{static{a(this,"DelegatingAuthenticationConverter")}constructor(t=new SP,n=new xP){this.converters={BEARER_TOKEN:t,BASIC:n}}convert(t,n){return this.converters[t.type].convert(t,n)}},SP=class{static{a(this,"BearerTokenAuthenticationConverter")}convert(t,n){return n.Authorization=`Bearer ${t.token}`,n}},xP=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 vu=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 YA({error:e,requestBody:t}){return e instanceof vu?e.errorMessage():{response:{status:0,body:e instanceof Error?e.message:String(e)},request:{body:t}}}a(YA,"toFailsafeOutput");var Hn=(s=>(s.GET="GET",s.POST="POST",s.PATCH="PATCH",s.PUT="PUT",s.DELETE="DELETE",s.HEAD="HEAD",s))(Hn||{});var bf=class extends Pf{static{a(this,"FetchHttpClient")}constructor(t="",n=new wf){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[d,v]of Object.entries(s))r.append(d,v);let u=r.toString(),h=u?`${o}?${u}`:o,g=t.responseType??"json",y=t.followRedirects??!0,T=t.retries??0,{body:b,extraHeaders:P,isStream:S}=Tf(t.method)?IV(t.body,i):{body:void 0,extraHeaders:{},isStream:!1},R=RV({...i,...P}),I=await AV(async()=>{let d=new AbortController,v=t.timeout&&t.timeout>0?setTimeout(()=>d.abort(),t.timeout):void 0;try{let p={method:t.method.toString(),headers:R,body:b,redirect:y?"follow":"manual",signal:d.signal};return S&&(p.duplex="half"),n?.dispatcher!==void 0&&(p.dispatcher=n.dispatcher),await fetch(h,p)}finally{v!==void 0&&clearTimeout(v)}},S?0:T),l=y?300:400;if(I.status<200||I.status>=l){let d=await QA(I,g==="stream"?"text":g),v=new vu(t.redactBodyInErrors===!0?xV:t.body,{status:I.status,responseBody:d});throw console.error("[HttpClient#(sanitized error message)] Request failed:",v),v}let m=await QA(I,g);return{status:I.status,headers:DV(I.headers),body:m}}},xV="[redacted]";function Tf(e){return e!=="GET"&&e!=="HEAD"}a(Tf,"acceptsRequestBody");function IV(e,t){if(tR(e))return{body:void 0,extraHeaders:{},isStream:!1};if($V(e)){let o=OV(e);if(o!==null)return{body:o,extraHeaders:e.getHeaders(),isStream:!1};let r=new Ra.PassThrough;return e.on("error",i=>r.destroy(i)),e.pipe(r),{body:r,extraHeaders:e.getHeaders(),isStream:!0}}return e instanceof Ra.Readable?{body:e,extraHeaders:{},isStream:!0}:typeof e=="string"||Buffer.isBuffer(e)||e instanceof URLSearchParams||e instanceof ArrayBuffer||typeof FormData<"u"&&e instanceof FormData||typeof Blob<"u"&&e instanceof Blob?{body:e,extraHeaders:{},isStream:!1}:(t["Content-Type"]??t["content-type"]??"").includes("application/x-www-form-urlencoded")?{body:new URLSearchParams(e).toString(),extraHeaders:{},isStream:!1}:{body:JSON.stringify(e),extraHeaders:{},isStream:!1}}a(IV,"serializeBody");async function QA(e,t){switch(t){case"arraybuffer":return Buffer.from(await e.arrayBuffer());case"stream":return tR(e.body)?Ra.Readable.from([]):Ra.Readable.fromWeb(e.body);case"blob":return await e.blob();case"text":return await e.text();default:{let n=await e.text();if(n.length===0)return;try{return JSON.parse(n)}catch{return n}}}}a(QA,"parseResponseBody");async function AV(e,t){let n;for(let o=0;o<=t;o++)try{let r=await e();if(r.status>=500&&o<t){await eR(o);continue}return r}catch(r){if(n=r,o<t){await eR(o);continue}throw r}throw n}a(AV,"sendWithRetries");function eR(e){let t=Math.min(1e3*2**e,3e4);return new Promise(n=>setTimeout(n,t))}a(eR,"backoff");function RV(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(RV,"normalizeHeaders");function DV(e){let t={};return e.forEach((n,o)=>{t[o]=n}),t}a(DV,"toHttpHeaders");function OV(e){if(!e.hasKnownLength()||e.getLengthSync()>CV)return null;let{data:t}=Gv(()=>e.getBuffer());return t}a(OV,"bufferFormDataIfSafe");function $V(e){return typeof e=="object"&&e!==null&&typeof e.getHeaders=="function"&&typeof e.pipe=="function"&&typeof e.on=="function"}a($V,"isNodeFormData");function tR(e){return e==null}a(tR,"isNil");var CV=100*1024*1024;var Yt=new bf;var P6=he(require("fs"));var w6={"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 b6(e){let t=e.split(";")[0].trim().toLowerCase();return w6[t]??""}a(b6,"contentTypeToExtension");var T6=a(({baseUrl:e,relativePath:t})=>{let n=e.endsWith("/")?e:`${e}/`,o=t.startsWith("/")?t.slice(1):t;return`${n}${o}`},"joinBaseUrlWithRelativePath"),E6=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 n0({auth:e,baseUrl:t,authMapping:n,description:o,displayName:r,name:i,props:s,extraProps:u,authLocation:h="headers",classification:g="WRITE"}){return re({audience:"human",name:i||"custom_api_call",classification:g,displayName:r||"Custom API Call",description:o||"Make a custom API call to a specific endpoint",auth:e,requireAuth:!!e,props:{url:$.DynamicProperties({auth:e,displayName:"",required:!0,refreshers:[],props:a(async({auth:y})=>({url:$.ShortText({displayName:"URL",description:`Full URL, or a path relative to ${E6(t,y)}`,required:!0,placeholder:"/resource",defaultValue:y?t(y):"",...s?.url??{}})}),"props")}),method:$.StaticDropdown({displayName:"Method",required:!0,defaultValue:"GET",options:{options:Object.values(Hn).map(y=>({label:y,value:y}))},...s?.method??{}}),headers:$.Object({displayName:"Headers",description:"Authorization headers are injected automatically from your connection.",required:!1,...s?.headers??{}}),queryParams:$.Object({displayName:"Query Parameters",description:"Appended to the URL as ?key=value.",required:!1,...s?.queryParams??{}}),body_type:$.Dropdown({auth:e,displayName:"Body Type",required:!1,defaultValue:"none",refreshers:["method"],options:a(async({method:y})=>Tf(y)?{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:$.DynamicProperties({auth:e,displayName:"Body",refreshers:["body_type","method"],required:!1,props:a(async({body_type:y,method:T})=>{if(!y||!Tf(T))return{};let b=y,P={};switch(b){case"none":break;case"json":P.data=$.Json({displayName:"JSON Body",required:!0,...s?.body??{}});break;case"raw":P.data=$.LongText({displayName:"Raw Body",required:!0});break;case"form_data":P.data=$.Array({displayName:"Form Data",required:!0,properties:{fieldName:$.ShortText({displayName:"Field Name",required:!0}),fieldType:$.StaticDropdown({displayName:"Field Type",required:!0,options:{disabled:!1,options:[{label:"Text",value:"text"},{label:"File",value:"file"}]}}),textFieldValue:$.LongText({displayName:"Text Field Value",required:!1}),fileFieldValue:$.File({displayName:"File Field Value",required:!1})}});break}return P},"props")}),response_is_binary:$.Checkbox({displayName:"Response is Binary",description:"Enable for files like PDFs, images, etc.",required:!1,defaultValue:!1,advanced:!0,...s?.response_is_binary??{}}),failsafe:$.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:$.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:$.Checkbox({displayName:"Follow redirects",description:"Follow 3xx redirects instead of returning them as the response.",required:!1,defaultValue:!1,advanced:!0,...s?.followRedirects??{}}),...u},propertyGroups:[{key:"request",display:"section",label:"Request",icon:"send",props:["method","url","headers","queryParams"]},{key:"payload",display:"section",label:"Data to send",icon:"code",props:["body_type","body"]}],run:a(async y=>{let{method:T,url:b,headers:P,queryParams:S,body:R,body_type:I,failsafe:l,timeout:m,response_is_binary:d,followRedirects:v}=y.propsValue;kp(T,"Method"),kp(b,"URL");let p=yt(n)?{}:await n(y.auth,y.propsValue),E=b.url,_=E.startsWith("http://")||E.startsWith("https://")?E:T6({baseUrl:t(y.auth),relativePath:E}),pe={method:T,url:_,headers:{...P??{},...h==="headers"||!yt(h)?p:{}},queryParams:{...h==="queryParams"?p:{},...S??{}},timeout:m?m*1e3:0,followRedirects:v};if(d&&(pe.responseType="arraybuffer"),R)if(I&&I!=="none"){let oe=R.data;if(I==="form_data"){let Be=oe,{default:me}=await Promise.resolve().then(()=>he(Tu())),ee=new me;for(let{fieldName:Q,fieldType:se,textFieldValue:ne,fileFieldValue:ge}of Be)se==="text"&&!ou(ne)?ee.append(Q,ne):se==="file"&&!ou(ge)&&ee.append(Q,ge.data,{filename:ge?.filename});pe.body=ee,pe.headers={...pe.headers,...ee.getHeaders()}}else pe.body=oe}else I||(pe.body=R);try{let oe=await Yt.sendRequest(pe);return await S6(y.files,oe.body,oe.status,oe.headers,d)}catch(oe){if(l)return YA({error:oe,requestBody:pe.body});throw oe}},"run")})}a(n0,"createCustomApiCallAction");var S6=a(async(e,t,n,o,r)=>{let i;if(r&&x6(t)){let s=Array.isArray(o?.["content-type"])?o["content-type"][0]:o?.["content-type"],u=b6(s??"")||"txt",h;t instanceof ArrayBuffer?h=Buffer.from(new Uint8Array(t)):Buffer.isBuffer(t)?h=t:h=Buffer.from(t),i=await e.write({fileName:`output.${u}`,data:h})}else i=t;return{status:n,headers:o,body:i}},"handleBinaryResponse"),x6=a(e=>e instanceof ArrayBuffer||Buffer.isBuffer(e),"isBinaryBody");var Qt={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(yt(u))throw new Error("lastPoll doesn't exist in the store.");let h=await e.items({store:t,auth:n,propsValue:o,lastFetchEpochMS:u,server:s}),g=h.reduce((y,T)=>Math.max(y,T.epochMilliSeconds),u);return await t.put("lastPoll",g),h.filter(y=>y.epochMilliSeconds>u).map(y=>y.data)}case 1:{let u=await t.get("lastItem"),h=await e.items({store:t,auth:n,propsValue:o,lastItemId:u,files:i,server:s}),g=h.findIndex(b=>b.id===u),y=[];yt(u)||g==-1?y=h??[]:y=h?.slice(0,g)??[],yt(r)||(y=y.slice(-r));let T=y?.[0]?.id;return yt(T)||await t.put("lastItem",T),y.map(b=>b.data)}}},async onEnable(e,{store:t,auth:n,propsValue:o,server:r,isRepublish:i}){switch(e.strategy){case 0:{if(i&&!yt(await t.get("lastPoll")))break;await t.put("lastPoll",Date.now());break}case 1:{if(i&&!yt(await t.get("lastItem")))break;let u=(await e.items({store:t,auth:n,propsValue:o,lastItemId:null,server:r}))?.[0]?.id;yt(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 I6(s.map(u=>u.data))}};function I6(e){return e.length<=5?e:e.slice(0,5)}a(I6,"getFirstFiveOrAll");var o0=require("node:stream");function A6(e){return"body"in e?{body:e.body,size:e.size}:{body:o0.Readable.from(e.data),size:e.data.length}}a(A6,"toStreamingBody");async function*R6({readable:e,chunkSize:t}){let n=[],o=0;for await(let r of e)for(n.push(Buffer.isBuffer(r)?r:Buffer.from(r)),o+=n[n.length-1].length;o>=t;){let i=n.length===1?n[0]:Buffer.concat(n);yield i.subarray(0,t);let s=i.subarray(t);n=s.length>0?[s]:[],o=s.length}o>0&&(yield n.length===1?n[0]:Buffer.concat(n))}a(R6,"readChunks");var i0={readChunks:R6,toStreamingBody:A6};var Wm=he(tl());var dN=["https://www.googleapis.com/auth/drive","email"],Y=[xa.OAuth2({description:"",authUrl:"https://accounts.google.com/o/oauth2/auth",tokenUrl:"https://oauth2.googleapis.com/token",required:!0,scope:dN}),xa.CustomAuth({displayName:"Service Account (Advanced)",description:"Authenticate via service account from https://console.cloud.google.com/ > IAM & Admin > Service Accounts > Create Service Account > Keys > Add key. <br> <br> You can optionally use domain-wide delegation (https://support.google.com/a/answer/162106?hl=en#zippy=%2Cset-up-domain-wide-delegation-for-a-client) to access files without adding the service account to each one. <br> <br> **Note:** Without a user email, the service account only has access to files/folders you explicitly share with it.",required:!0,props:{serviceAccount:$.LongText({displayName:"Service Account JSON Key",required:!0}),userEmail:$.ShortText({displayName:"User Email",required:!1,description:"Email address of the user to impersonate for domain-wide delegation."})},validate:a(async({auth:e})=>{try{await bt({type:"CUSTOM_AUTH",props:{...e}})}catch(t){return{valid:!1,error:t.message}}return{valid:!0}},"validate")})];async function de(e){if(e.type==="CUSTOM_AUTH"){let n;try{n=JSON.parse(e.props.serviceAccount)}catch{throw new Error("Invalid Service Account JSON Key. Please provide a valid JSON string.")}return new Wm.JWT({email:n.client_email,key:n.private_key,scopes:dN,subject:e.props.userEmail})}let t=new Wm.OAuth2Client;return t.setCredentials({access_token:e.access_token}),t}a(de,"createGoogleClient");var bt=a(async e=>{if(e.type==="CUSTOM_AUTH"){let n=await(await de(e)).getAccessToken();if(n.token)return n.token;throw new Error("Could not retrieve access token from service account json")}return e.access_token},"getAccessToken");var Dz=he(ze());var fh=he(fl()),JT=he(ze());var _J=1e3,ml=a(e=>e.replace(/\\/g,"\\\\").replace(/'/g,"\\'"),"escapeDriveQueryLiteral");async function Ok({auth:e,searchValue:t,includeTeamDrives:n}){if(!e)return{disabled:!0,options:[],placeholder:"Connect your Google account first"};let o=await bt(e),r=t?.trim()??"",i=["mimeType='application/vnd.google-apps.folder'","trashed = false"];r.length>0&&i.push(`name contains '${ml(r)}'`);let s={method:"GET",url:"https://www.googleapis.com/drive/v3/files",queryParams:{q:i.join(" and "),includeItemsFromAllDrives:n?"true":"false",supportsAllDrives:"true",corpora:n?"allDrives":"user",pageSize:String(_J),fields:"nextPageToken, files(id, name)"},authentication:{type:"BEARER_TOKEN",token:o}},u=[],h=!1;try{let g=await Yt.sendRequest(s);u=g.body.files??[],h=!!g.body.nextPageToken}catch(g){throw new Error(`Failed to get folders
108
+ Error:${g}`)}return{disabled:!1,placeholder:h?`Showing the first ${u.length} matches. Type to narrow the list, or paste an ID with Dynamic value.`:void 0,options:u.map(g=>({label:g.name,value:g.id}))}}a(Ok,"fetchFolderDropdownOptions");function Dk({displayName:e,description:t}){return $.Dropdown({displayName:e,description:t,required:!1,auth:Y,refreshers:["include_team_drives"],refreshOnSearch:!0,options:a(async({auth:n,include_team_drives:o},r)=>Ok({auth:n,searchValue:r?.searchValue,includeTeamDrives:o}),"options")})}a(Dk,"parentFolderDropdown");var Ne={properties:{parentFolder:Dk({displayName:"Parent Folder",description:"Leave empty for the root of My Drive. Type to search by folder name."}),include_team_drives:$.Checkbox({displayName:"Include Team Drives",description:"Also include shared drives, not only My Drive.",defaultValue:!1,required:!1})},parentFolderDropdown:Dk,escapeDriveQueryLiteral:ml,fetchFolderDropdownOptions:Ok,async getFiles(e,t,n){let o=await de(e),r=(0,JT.drive)({version:"v3",auth:o}),i=[];if(t?.parent&&i.push(`'${ml(t.parent)}' in parents`),t?.createdTime&&i.push(`createdTime ${t.createdTimeOp??">"} '${(0,fh.default)(t.createdTime).format()}'`),t?.changedSince){let g=(0,fh.default)(t.changedSince).format();i.push(`(modifiedTime > '${g}' or createdTime > '${g}')`)}t?.mimeTypes?.length&&i.push(`(${t.mimeTypes.map(g=>`mimeType='${ml(g)}'`).join(" or ")})`),t?.excludeShortcuts&&i.push("mimeType!='application/vnd.google-apps.shortcut'"),i.push("trashed = false");let s=[],u,h=0;do{let g={q:i.concat("mimeType!='application/vnd.google-apps.folder'").join(" and "),fields:"nextPageToken, files(id, name, mimeType, webViewLink, kind, createdTime, modifiedTime)",orderBy:n??"createdTime desc",supportsAllDrives:!0,includeItemsFromAllDrives:t?.includeTeamDrive,corpora:t?.includeTeamDrive?"allDrives":"user"};u&&(g.pageToken=u);let y=await r.files.list(g);if(s.push(...y.data.files??[]),u=y.data.nextPageToken??void 0,h+=1,t?.maxPages&&h>=t.maxPages)break}while(u);return s},async getFolders(e,t,n){let o=await de(e),r=(0,JT.drive)({version:"v3",auth:o}),i=["mimeType='application/vnd.google-apps.folder'"];t?.parent&&i.push(`'${ml(t.parent)}' in parents`),t?.createdTime&&i.push(`createdTime ${t.createdTimeOp??">"} '${(0,fh.default)(t.createdTime).format()}'`),i.push("trashed = false");let s=[],u;do{let h={q:i.join(" and "),fields:"nextPageToken, files(id, name, createdTime)",orderBy:n??"createdTime desc",supportsAllDrives:!0,includeItemsFromAllDrives:t?.includeTeamDrive,corpora:t?.includeTeamDrive?"allDrives":"user"};u&&(h.pageToken=u);let g=await r.files.list(h);s.push(...g.data.files??[]),u=g.data.nextPageToken??void 0}while(u);return s}};var $k={fields:[{key:"name",label:"Folder Name"},{key:"id",label:"Folder ID"},{key:"mimeType",label:"MIME Type"},{key:"kind",label:"Kind"}]},Ck={fields:[{key:"name",label:"File Name"},{key:"id",label:"File ID"},{key:"mimeType",label:"MIME Type"},{key:"kind",label:"Kind"}]},Nk={fields:[{key:"name",label:"File Name"},{key:"id",label:"File ID"},{key:"mimeType",label:"MIME Type"},{key:"kind",label:"Kind"}]},kk={fields:[{key:"file",label:"File URL",value:"",format:"url"}]},zk={fields:[{key:"name",label:"Name"},{key:"id",label:"File ID"},{key:"mimeType",label:"MIME Type"},{key:"kind",label:"Kind"}]},Uk={fields:[{key:"files",label:"Files",labelKey:"name",listItems:[{key:"name",label:"Name",value:"name"},{key:"id",label:"File ID",value:"id"},{key:"mimeType",label:"MIME Type",value:"mimeType"},{key:"trashed",label:"Trashed",value:"trashed",format:"boolean"},{key:"parents",label:"Parent Folder ID",value:"parents[0]"},{key:"downloadedFile",label:"Downloaded File URL",value:"downloadedFile",format:"url"}]},{key:"incompleteSearch",label:"Incomplete Search",value:"incompleteSearch",format:"boolean"}]},Mk={fields:[{key:"results",label:"Results",value:"",labelKey:"name",listItems:[{key:"name",label:"Name",value:"name"},{key:"mimeType",label:"MIME Type",value:"mimeType"},{key:"id",label:"File ID",value:"id"},{key:"createdTime",label:"Created Time",value:"createdTime",format:"datetime"},{key:"modifiedTime",label:"Modified Time",value:"modifiedTime",format:"datetime"}]}]},Fk={fields:[{key:"name",label:"File Name"},{key:"id",label:"File ID"},{key:"mimeType",label:"MIME Type"},{key:"kind",label:"Kind"}]},Lk={fields:[{key:"name",label:"File Name"},{key:"id",label:"File ID"},{key:"mimeType",label:"MIME Type"},{key:"kind",label:"Kind"}]},jk={fields:[{key:"name",label:"File Name"},{key:"id",label:"File ID"},{key:"mimeType",label:"MIME Type"},{key:"webViewLink",label:"View Link",format:"url"},{key:"webContentLink",label:"Download Link",format:"url"},{key:"iconLink",label:"Icon",format:"image"},{key:"size",label:"Size",format:"filesize"},{key:"fileExtension",label:"File Extension"},{key:"starred",label:"Starred",format:"boolean"},{key:"trashed",label:"Trashed",format:"boolean"},{key:"shared",label:"Shared",format:"boolean"},{key:"createdTime",label:"Created Time",format:"datetime"},{key:"modifiedTime",label:"Modified Time",format:"datetime"},{key:"parents",label:"Parent Folder IDs"},{key:"owners",label:"Owners",labelKey:"displayName",listItems:[{key:"displayName",label:"Name"},{key:"emailAddress",label:"Email",format:"email"},{key:"photoLink",label:"Photo",format:"image"},{key:"me",label:"Is Me",format:"boolean"}]},{key:"lastModifyingUser",label:"Last Modifying User",children:[{key:"displayName",label:"Name"},{key:"emailAddress",label:"Email",format:"email"},{key:"photoLink",label:"Photo",format:"image"}]},{key:"permissions",label:"Permissions",labelKey:"displayName",listItems:[{key:"displayName",label:"Name"},{key:"emailAddress",label:"Email",format:"email"},{key:"role",label:"Role"},{key:"type",label:"Type"},{key:"id",label:"Permission ID"}]}]},qk={fields:[{key:"type",label:"Type"},{key:"role",label:"Role"},{key:"id",label:"Permission ID"},{key:"allowFileDiscovery",label:"Allow File Discovery",format:"boolean"},{key:"downloadUrl",label:"Download URL",format:"url"},{key:"kind",label:"Kind"}]},Bk={fields:[{key:"role",label:"Role"},{key:"type",label:"Type"},{key:"id",label:"Permission ID"}]},Vk={fields:[{key:"removed",label:"Removed",value:"removed",format:"boolean"},{key:"message",label:"Message",value:"message"}]},Gk={fields:[{key:"name",label:"File Name"},{key:"id",label:"File ID"},{key:"mimeType",label:"MIME Type"},{key:"kind",label:"Kind"}]},Hk={fields:[{key:"name",label:"File Name"},{key:"modifiedTime",label:"Modified Time",format:"datetime"},{key:"webViewLink",label:"View Link",format:"url"},{key:"mimeType",label:"MIME Type"},{key:"createdTime",label:"Created Time",format:"datetime"},{key:"id",label:"File ID"}]},Zk={fields:[{key:"changeType",label:"Change Type"},{key:"content",label:"File Content"},{key:"contentError",label:"File Content Error"},{key:"name",label:"File Name"},{key:"webViewLink",label:"View Link",format:"url"},{key:"mimeType",label:"MIME Type"},{key:"createdTime",label:"Created Time",format:"datetime"},{key:"modifiedTime",label:"Modified Time",format:"datetime"},{key:"id",label:"File ID"}]},Wk={fields:[{key:"name",label:"Folder Name"},{key:"id",label:"Folder ID"},{key:"createdTime",label:"Created Time",format:"datetime"}]},PJ=[{key:"id",label:"File ID"},{key:"name",label:"File Name"},{key:"mimeType",label:"MIME Type"},{key:"size",label:"Size",format:"filesize"},{key:"createdTime",label:"Created Time",format:"datetime"},{key:"modifiedTime",label:"Modified Time",format:"datetime"},{key:"webViewLink",label:"View Link",format:"url"},{key:"webContentLink",label:"Download Link",format:"url"},{key:"iconLink",label:"Icon",format:"image"},{key:"fileExtension",label:"File Extension"},{key:"starred",label:"Starred",format:"boolean"},{key:"trashed",label:"Trashed",format:"boolean"},{key:"shared",label:"Shared",format:"boolean"},{key:"parents",label:"Parent Folder IDs"},{key:"owners",label:"Owners",labelKey:"displayName",listItems:[{key:"displayName",label:"Name"},{key:"emailAddress",label:"Email",format:"email"},{key:"photoLink",label:"Photo",format:"image"},{key:"me",label:"Is Me",format:"boolean"}]},{key:"lastModifyingUser",label:"Last Modifying User",children:[{key:"displayName",label:"Name"},{key:"emailAddress",label:"Email",format:"email"},{key:"photoLink",label:"Photo",format:"image"}]}],Kk={fields:PJ},Jk={fields:[{key:"files",label:"Files",labelKey:"name",listItems:[{key:"id",label:"File ID"},{key:"name",label:"File Name"},{key:"mimeType",label:"MIME Type"},{key:"size",label:"Size",format:"filesize"},{key:"createdTime",label:"Created Time",format:"datetime"},{key:"modifiedTime",label:"Modified Time",format:"datetime"},{key:"webViewLink",label:"View Link",format:"url"},{key:"webContentLink",label:"Download Link",format:"url"},{key:"fileExtension",label:"File Extension"},{key:"starred",label:"Starred",format:"boolean"},{key:"trashed",label:"Trashed",format:"boolean"},{key:"shared",label:"Shared",format:"boolean"},{key:"downloadedFile",label:"Downloaded File URL",format:"url"}]},{key:"incompleteSearch",label:"Incomplete Search",format:"boolean"}]},Xk={fields:[{key:"files",label:"Search Results",labelKey:"name",listItems:[{key:"id",label:"File ID"},{key:"name",label:"File Name"},{key:"mimeType",label:"MIME Type"},{key:"size",label:"Size",format:"filesize"},{key:"createdTime",label:"Created Time",format:"datetime"},{key:"modifiedTime",label:"Modified Time",format:"datetime"},{key:"webViewLink",label:"View Link",format:"url"},{key:"webContentLink",label:"Download Link",format:"url"},{key:"fileExtension",label:"File Extension"}]}]},Yk={fields:[{key:"id",label:"File ID"},{key:"name",label:"File Name"},{key:"mimeType",label:"MIME Type"},{key:"createdTime",label:"Created Time",format:"datetime"},{key:"modifiedTime",label:"Modified Time",format:"datetime"},{key:"webViewLink",label:"View Link",format:"url"},{key:"webContentLink",label:"Download Link",format:"url"},{key:"fileExtension",label:"File Extension"},{key:"size",label:"Size",format:"filesize"},{key:"parents",label:"Parent Folder IDs"},{key:"owners",label:"Owners",labelKey:"displayName",listItems:[{key:"displayName",label:"Name"},{key:"emailAddress",label:"Email",format:"email"},{key:"photoLink",label:"Photo",format:"image"},{key:"me",label:"Is Me",format:"boolean"}]},{key:"lastModifyingUser",label:"Last Modifying User",children:[{key:"displayName",label:"Name"},{key:"emailAddress",label:"Email",format:"email"},{key:"photoLink",label:"Photo",format:"image"}]},{key:"shared",label:"Shared",format:"boolean"}]},Qk={fields:[{key:"id",label:"File ID"},{key:"name",label:"File Name"},{key:"mimeType",label:"MIME Type"},{key:"size",label:"Size",format:"filesize"},{key:"createdTime",label:"Created Time",format:"datetime"},{key:"modifiedTime",label:"Modified Time",format:"datetime"},{key:"webViewLink",label:"View Link",format:"url"},{key:"webContentLink",label:"Download Link",format:"url"},{key:"iconLink",label:"Icon",format:"image"},{key:"fileExtension",label:"File Extension"},{key:"parents",label:"Parent Folder IDs"},{key:"owners",label:"Owners",labelKey:"displayName",listItems:[{key:"displayName",label:"Name"},{key:"emailAddress",label:"Email",format:"email"},{key:"me",label:"Is Me",format:"boolean"}]}]},ez={fields:[{key:"id",label:"File ID"},{key:"name",label:"File Name"},{key:"mimeType",label:"MIME Type"},{key:"size",label:"Size",format:"filesize"},{key:"createdTime",label:"Created Time",format:"datetime"},{key:"modifiedTime",label:"Modified Time",format:"datetime"},{key:"webViewLink",label:"View Link",format:"url"},{key:"webContentLink",label:"Download Link",format:"url"},{key:"fileExtension",label:"File Extension"},{key:"parents",label:"Parent Folder IDs"},{key:"owners",label:"Owners",labelKey:"displayName",listItems:[{key:"displayName",label:"Name"},{key:"emailAddress",label:"Email",format:"email"},{key:"me",label:"Is Me",format:"boolean"}]}]},tz={fields:[{key:"id",label:"File ID"},{key:"name",label:"File Name"},{key:"mimeType",label:"MIME Type"},{key:"size",label:"Size",format:"filesize"},{key:"createdTime",label:"Created Time",format:"datetime"},{key:"modifiedTime",label:"Modified Time",format:"datetime"},{key:"webViewLink",label:"View Link",format:"url"},{key:"webContentLink",label:"Download Link",format:"url"},{key:"fileExtension",label:"File Extension"},{key:"parents",label:"Parent Folder IDs"},{key:"shared",label:"Shared",format:"boolean"},{key:"owners",label:"Owners",labelKey:"displayName",listItems:[{key:"displayName",label:"Name"},{key:"emailAddress",label:"Email",format:"email"},{key:"me",label:"Is Me",format:"boolean"}]}]},rz={fields:[{key:"id",label:"File ID"},{key:"name",label:"File Name"},{key:"description",label:"Description"},{key:"mimeType",label:"MIME Type"},{key:"createdTime",label:"Created Time",format:"datetime"},{key:"modifiedTime",label:"Modified Time",format:"datetime"},{key:"starred",label:"Starred",format:"boolean"},{key:"trashed",label:"Trashed",format:"boolean"},{key:"webViewLink",label:"View Link",format:"url"},{key:"size",label:"Size",format:"filesize"}]},nz={fields:[{key:"id",label:"Permission ID"},{key:"type",label:"Type"},{key:"role",label:"Role"},{key:"emailAddress",label:"Email Address",format:"email"},{key:"displayName",label:"Display Name"},{key:"photoLink",label:"Photo",format:"image"},{key:"pendingOwner",label:"Pending Owner",format:"boolean"},{key:"deleted",label:"Deleted",format:"boolean"},{key:"permissionDetails",label:"Permission Details",labelKey:"role",listItems:[{key:"role",label:"Role"},{key:"permissionType",label:"Permission Type"},{key:"inherited",label:"Inherited",format:"boolean"}]}]},oz={fields:[{key:"permissions",label:"Permissions",labelKey:"displayName",listItems:[{key:"id",label:"Permission ID"},{key:"type",label:"Type"},{key:"role",label:"Role"},{key:"emailAddress",label:"Email Address",format:"email"},{key:"displayName",label:"Display Name"},{key:"photoLink",label:"Photo",format:"image"},{key:"deleted",label:"Deleted",format:"boolean"},{key:"pendingOwner",label:"Pending Owner",format:"boolean"}]}]},iz={fields:[{key:"id",label:"Permission ID"},{key:"type",label:"Type"},{key:"role",label:"Role"},{key:"allowFileDiscovery",label:"Allow File Discovery",format:"boolean"},{key:"permissionDetails",label:"Permission Details",labelKey:"role",listItems:[{key:"role",label:"Role"},{key:"permissionType",label:"Permission Type"},{key:"inherited",label:"Inherited",format:"boolean"}]}]},az={fields:[{key:"id",label:"Permission ID"},{key:"type",label:"Type"},{key:"role",label:"Role"},{key:"emailAddress",label:"Email Address",format:"email"},{key:"displayName",label:"Display Name"},{key:"photoLink",label:"Photo",format:"image"}]},sz={fields:[{key:"id",label:"File ID"},{key:"name",label:"File Name"},{key:"trashed",label:"Trashed",format:"boolean"},{key:"modifiedTime",label:"Modified Time",format:"datetime"},{key:"webViewLink",label:"View Link",format:"url"}]},cz={fields:[{key:"id",label:"File ID"},{key:"name",label:"File Name"},{key:"trashed",label:"Trashed",format:"boolean"},{key:"createdTime",label:"Created Time",format:"datetime"},{key:"modifiedTime",label:"Modified Time",format:"datetime"},{key:"webViewLink",label:"View Link",format:"url"}]},uz={fields:[{key:"id",label:"File ID"},{key:"name",label:"File Name"},{key:"mimeType",label:"MIME Type"},{key:"size",label:"Size",format:"filesize"},{key:"modifiedTime",label:"Modified Time",format:"datetime"},{key:"webViewLink",label:"View Link",format:"url"}]},lz={fields:[{key:"user",label:"Current User",children:[{key:"displayName",label:"Display Name"},{key:"emailAddress",label:"Email Address",format:"email"},{key:"photoLink",label:"Photo",format:"image"},{key:"me",label:"Is Me",format:"boolean"},{key:"permissionId",label:"Permission ID"}]},{key:"storageQuota",label:"Storage Quota",children:[{key:"limit",label:"Total Limit",format:"filesize"},{key:"usage",label:"Used Space",format:"filesize"},{key:"usageInDrive",label:"Used in Drive",format:"filesize"},{key:"usageInDriveTrash",label:"Used in Trash",format:"filesize"}]},{key:"maxUploadSize",label:"Max Upload Size",format:"filesize"}]},dz={fields:[{key:"drives",label:"Shared Drives",labelKey:"name",listItems:[{key:"id",label:"Drive ID"},{key:"name",label:"Drive Name"},{key:"kind",label:"Kind"},{key:"colorRgb",label:"Color"},{key:"createdTime",label:"Created Time",format:"datetime"}]}]},pz={fields:[{key:"id",label:"Drive ID"},{key:"name",label:"Drive Name"},{key:"kind",label:"Kind"},{key:"colorRgb",label:"Color"},{key:"createdTime",label:"Created Time",format:"datetime"},{key:"restrictions",label:"Restrictions",children:[{key:"adminManagedRestrictions",label:"Admin Managed",format:"boolean"},{key:"copyRequiresWriterPermission",label:"Copy Requires Writer Permission",format:"boolean"},{key:"domainUsersOnly",label:"Domain Users Only",format:"boolean"},{key:"driveMembersOnly",label:"Drive Members Only",format:"boolean"}]}]},fz={fields:[{key:"comments",label:"Comments",labelKey:"content",listItems:[{key:"id",label:"Comment ID"},{key:"content",label:"Content"},{key:"createdTime",label:"Created Time",format:"datetime"},{key:"modifiedTime",label:"Modified Time",format:"datetime"},{key:"author",label:"Author",children:[{key:"displayName",label:"Name"},{key:"emailAddress",label:"Email",format:"email"},{key:"photoLink",label:"Photo",format:"image"}]}]}]},mz={fields:[{key:"id",label:"Reply ID"},{key:"content",label:"Content"},{key:"createdTime",label:"Created Time",format:"datetime"},{key:"modifiedTime",label:"Modified Time",format:"datetime"},{key:"author",label:"Author",children:[{key:"displayName",label:"Name"},{key:"emailAddress",label:"Email",format:"email"},{key:"photoLink",label:"Photo",format:"image"},{key:"me",label:"Is Me",format:"boolean"}]}]},hz={fields:[{key:"id",label:"Comment ID"},{key:"content",label:"Content"},{key:"createdTime",label:"Created Time",format:"datetime"},{key:"modifiedTime",label:"Modified Time",format:"datetime"},{key:"author",label:"Author",children:[{key:"displayName",label:"Name"},{key:"emailAddress",label:"Email",format:"email"},{key:"photoLink",label:"Photo",format:"image"},{key:"me",label:"Is Me",format:"boolean"}]}]},gz={fields:[{key:"id",label:"Reply ID"},{key:"content",label:"Content"},{key:"htmlContent",label:"HTML Content",format:"html"},{key:"createdTime",label:"Created Time",format:"datetime"},{key:"modifiedTime",label:"Modified Time",format:"datetime"},{key:"deleted",label:"Deleted",format:"boolean"},{key:"author",label:"Author",children:[{key:"displayName",label:"Name"},{key:"emailAddress",label:"Email",format:"email"},{key:"photoLink",label:"Photo",format:"image"},{key:"me",label:"Is Me",format:"boolean"}]}]},yz={fields:[{key:"replies",label:"Replies",labelKey:"content",listItems:[{key:"id",label:"Reply ID"},{key:"content",label:"Content"},{key:"createdTime",label:"Created Time",format:"datetime"},{key:"modifiedTime",label:"Modified Time",format:"datetime"},{key:"deleted",label:"Deleted",format:"boolean"},{key:"author",label:"Author",children:[{key:"displayName",label:"Name"},{key:"emailAddress",label:"Email",format:"email"},{key:"photoLink",label:"Photo",format:"image"}]}]}]},vz={fields:[{key:"id",label:"Reply ID"},{key:"content",label:"Content"},{key:"modifiedTime",label:"Modified Time",format:"datetime"},{key:"deleted",label:"Deleted",format:"boolean"},{key:"author",label:"Author",children:[{key:"displayName",label:"Name"},{key:"emailAddress",label:"Email",format:"email"},{key:"photoLink",label:"Photo",format:"image"},{key:"me",label:"Is Me",format:"boolean"}]}]},_z={fields:[{key:"id",label:"File ID"},{key:"name",label:"File Name"},{key:"mimeType",label:"MIME Type"},{key:"size",label:"Size",format:"filesize"},{key:"createdTime",label:"Created Time",format:"datetime"},{key:"modifiedTime",label:"Modified Time",format:"datetime"},{key:"webViewLink",label:"View Link",format:"url"}]},Pz={fields:[{key:"id",label:"Folder ID"},{key:"name",label:"Folder Name"},{key:"mimeType",label:"MIME Type"},{key:"kind",label:"Kind"},{key:"createdTime",label:"Created Time",format:"datetime"},{key:"parents",label:"Parent Folder IDs"},{key:"webViewLink",label:"View Link",format:"url"}]},wz={fields:[{key:"id",label:"Drive ID"},{key:"name",label:"Drive Name"},{key:"kind",label:"Kind"},{key:"colorRgb",label:"Color"},{key:"createdTime",label:"Created Time",format:"datetime"}]},bz={fields:[{key:"id",label:"Drive ID"},{key:"name",label:"Drive Name"},{key:"kind",label:"Kind"},{key:"colorRgb",label:"Color"},{key:"createdTime",label:"Created Time",format:"datetime"}]},Tz={fields:[{key:"id",label:"File ID"},{key:"name",label:"File Name"},{key:"mimeType",label:"MIME Type"},{key:"kind",label:"Kind"}]},Ez={fields:[{key:"file",label:"File URL",value:"",format:"url"}]},Sz={fields:[{key:"file",label:"File URL",value:"",format:"url"}]},xz={fields:[{key:"success",label:"Success",format:"boolean"},{key:"reply_id",label:"Reply ID"}]},Iz={fields:[{key:"deleted",label:"Deleted",format:"boolean"},{key:"driveId",label:"Drive ID"}]},Az={fields:[{key:"success",label:"Success",format:"boolean"},{key:"driveId",label:"Drive ID"}]},Rz={fields:[{key:"removed",label:"Removed",format:"boolean"},{key:"message",label:"Message"}]};var Oz=re({auth:Y,name:"update_permissions",classification:"WRITE",description:"Give a person a role on a file or folder by email.",audience:"human",aiMetadata:{description:"Grants a specified role (reader, commenter, writer, fileOrganizer, or organizer) on a Drive file or folder to a user identified by email, optionally sending a notification email. Use to share a resource with a person. Requires the file/folder ID and target email. Not idempotent: each call creates a new permission grant.",idempotent:!1},displayName:"Share File or Folder",propertyGroups:[{key:"item",display:"section",label:"What to share",icon:"file",props:["fileId","include_team_drives"]},{key:"access",display:"section",label:"Who gets access",icon:"user",props:["user_email","permission_name","send_invitation_email"]}],props:{fileId:$.ShortText({displayName:"File or Folder ID",description:"The ID from the item's Drive URL or an earlier step.",required:!0,placeholder:"1dpv4-sKJfKRwI9qx1vWqQhEGEn3EpbI5"}),user_email:$.ShortText({displayName:"User Email",description:"The person who receives the access.",required:!0,placeholder:"name@example.com"}),permission_name:$.StaticDropdown({displayName:"Role",description:"What the person can do. Manager roles apply to shared drives only.",required:!0,options:{options:[{label:"Manager",value:"organizer"},{label:"Content Manager",value:"fileOrganizer"},{label:"Editor",value:"writer"},{label:"Commenter",value:"commenter"},{label:"Viewer",value:"reader"}]}}),send_invitation_email:$.Checkbox({displayName:"Send Invitation Email",description:"Email the person that they now have access.",required:!0}),include_team_drives:Ne.properties.include_team_drives},outputSchema:Bk,async run(e){let{fileId:t,user_email:n,permission_name:o,send_invitation_email:r,include_team_drives:i}=e.propsValue,s=await de(e.auth),u=(0,Dz.drive)({version:"v3",auth:s}),h={type:"user",role:o,emailAddress:n};return(await u.permissions.create({requestBody:h,fileId:t,sendNotificationEmail:r,supportsAllDrives:i})).data}});var $z=he(ze());var Cz=re({auth:Y,name:"create_new_gdrive_folder",classification:"WRITE",description:"Create an empty folder in Google Drive.",audience:"human",aiMetadata:{description:"Creates a new empty folder in Google Drive, optionally nested under a parent folder. Use to set up a destination before uploading or moving files. Not idempotent: each call creates a distinct folder even with the same name (Drive permits duplicate folder names).",idempotent:!1},displayName:"Create Folder",props:{folderName:$.ShortText({displayName:"Folder Name",required:!0,placeholder:"Invoices 2026"}),parentFolder:Ne.properties.parentFolder,include_team_drives:Ne.properties.include_team_drives},outputSchema:$k,async run(e){let t=await de(e.auth);return(await(0,$z.drive)({version:"v3",auth:t}).files.create({requestBody:{mimeType:"application/vnd.google-apps.folder",name:e.propsValue.folderName,...e.propsValue.parentFolder?{parents:[e.propsValue.parentFolder]}:{}},supportsAllDrives:e.propsValue.include_team_drives})).data}});var Nz=he(ze());var kz=re({auth:Y,name:"create_new_gdrive_file",classification:"WRITE",description:"Create a text, CSV or XML file from text you enter.",audience:"human",aiMetadata:{description:"Creates a new file in Google Drive from inline text content as plain text, CSV, or XML, optionally inside a parent folder. Use when an agent has generated text it needs to persist as a Drive file. Not idempotent: each call creates a new file.",idempotent:!1},displayName:"Create File from Text",propertyGroups:[{key:"file",display:"section",label:"New file",icon:"file",props:["fileName","text","fileType"]},{key:"destination",display:"section",label:"Save to",icon:"location",props:["parentFolder","include_team_drives"]}],props:{fileName:$.ShortText({displayName:"File Name",description:"Include the extension, for example report.csv.",required:!0,placeholder:"report.txt"}),text:$.LongText({displayName:"Content",description:"The text written into the file.",required:!0}),fileType:$.StaticDropdown({displayName:"File Type",description:"Plain text, CSV or XML. Match the extension in the file name.",required:!0,defaultValue:"text/plain",options:{options:[{label:"Plain Text (TXT)",value:"text/plain"},{label:"CSV",value:"text/csv"},{label:"XML",value:"text/xml"}]}}),parentFolder:Ne.properties.parentFolder,include_team_drives:Ne.properties.include_team_drives},outputSchema:Ck,async run(e){let t=await de(e.auth),n=(0,Nz.drive)({version:"v3",auth:t}),o=e.propsValue.fileType==="plain/text"?"text/plain":e.propsValue.fileType;return(await n.files.create({requestBody:{name:e.propsValue.fileName,mimeType:o,...e.propsValue.parentFolder?{parents:[e.propsValue.parentFolder]}:{}},media:{mimeType:o,body:e.propsValue.text},supportsAllDrives:e.propsValue.include_team_drives??!1,fields:"id, name, mimeType, kind"})).data}});var zz=he(ze());var Uz=re({auth:Y,name:"delete_permissions",classification:"DESTRUCTIVE",description:"Remove a person's role from a file or folder.",audience:"human",aiMetadata:{description:"Revokes a specific role from a user (matched by email and role) on a Drive file or folder. Use to unshare or downgrade access for someone. Requires the file/folder ID, the user email, and the role to remove. Idempotent: if no matching permission exists, the call is a no-op.",idempotent:!0},displayName:"Remove Access",props:{fileId:$.ShortText({displayName:"File or Folder ID",description:"The ID from the item's Drive URL or an earlier step.",required:!0,placeholder:"1dpv4-sKJfKRwI9qx1vWqQhEGEn3EpbI5"}),user_email:$.ShortText({displayName:"User Email",description:"The person whose access is removed.",required:!0,placeholder:"name@example.com"}),permission_name:$.StaticDropdown({displayName:"Role",description:"The role to remove. Other roles the person has stay.",required:!0,options:{options:[{label:"Manager",value:"organizer"},{label:"Content Manager",value:"fileOrganizer"},{label:"Editor",value:"writer"},{label:"Commenter",value:"commenter"},{label:"Viewer",value:"reader"}]}})},outputSchema:Vk,async run(e){let[t,n]=[e.propsValue.fileId,e.propsValue.user_email],o=await de(e.auth),r=(0,zz.drive)({version:"v3",auth:o}),i=await r.permissions.list({fileId:t,fields:"permissions(id, emailAddress, role)",supportsAllDrives:!0});if(i.data.permissions){for(let s of i.data.permissions)if(s.emailAddress===n&&s.role===e.propsValue.permission_name)return await r.permissions.delete({fileId:t,permissionId:s.id?s.id:"",supportsAllDrives:!0}),{removed:!0,message:"Permission removed"}}return{removed:!1,message:"Permission not found"}}});var Mz=he(ze());var Fz=re({displayName:"Duplicate File",auth:Y,name:"duplicate_file",classification:"WRITE",description:"Copy a file into a folder, optionally as a Google Doc or Sheet.",audience:"human",aiMetadata:{description:"Copies an existing Drive file into a target folder under a new name, optionally converting it to a Google Sheet or Google Doc. Use to clone a file or create an editable Google-format copy. Requires the source file ID and destination folder ID. Not idempotent: each call creates a new copy.",idempotent:!1},props:{fileId:$.ShortText({displayName:"File ID",description:"The ID of the file to copy.",required:!0,placeholder:"1dpv4-sKJfKRwI9qx1vWqQhEGEn3EpbI5"}),name:$.ShortText({displayName:"New File Name",description:"Name of the copy.",required:!0,placeholder:"Report (copy)"}),folderId:$.ShortText({displayName:"Destination Folder ID",description:"The ID of the folder that receives the copy.",required:!0}),mimeType:$.StaticDropdown({displayName:"Convert To",description:"Empty keeps the original format.",required:!1,advanced:!0,options:{options:[{label:"Google Sheets",value:"application/vnd.google-apps.spreadsheet"},{label:"Google Docs",value:"application/vnd.google-apps.document"}]}}),include_team_drives:Ne.properties.include_team_drives},outputSchema:Fk,async run(e){let t=await de(e.auth),n=e.propsValue.fileId,o=e.propsValue.name,r=e.propsValue.folderId,i=e.propsValue.mimeType,s=(0,Mz.drive)({version:"v3",auth:t}),u={name:o,parents:[r]};i&&(u.mimeType=i);let h=await s.files.copy({fileId:n,auth:t,requestBody:u,supportsAllDrives:e.propsValue.include_team_drives});if(h.status!==200)throw new Error("Error duplicating file");return h.data}});var Lz=he(ze());var jz=re({auth:Y,name:"get-file-or-folder-by-id",classification:"READ",displayName:"Get File Information",description:"Get the details of a file or folder by its ID.",audience:"human",aiMetadata:{description:"Fetches metadata for a single file or folder in Google Drive by its exact ID (name, MIME type, parents, etc.). Use when an agent already has a file/folder ID and needs its details. Read-only and idempotent. Requires the resource ID, not a name or path.",idempotent:!0},props:{id:$.ShortText({displayName:"File or Folder ID",description:"The ID from the item's Drive URL or an earlier step.",required:!0,placeholder:"1dpv4-sKJfKRwI9qx1vWqQhEGEn3EpbI5"}),include_team_drives:Ne.properties.include_team_drives},outputSchema:zk,async run(e){let t=await de(e.auth),o=await(0,Lz.drive)({version:"v3",auth:t}).files.get({fileId:e.propsValue.id,supportsAllDrives:e.propsValue.include_team_drives});return o.data?o.data:null}});var gh=he(en());var qz=he(require("querystring"));async function XT({auth:e,params:t}){let n=await bt(e),o=[],r;do{let i=r?{...t,pageToken:r}:t,s=await Yt.sendRequest({method:"GET",url:`https://www.googleapis.com/drive/v3/files?${qz.default.stringify(i)}`,headers:{Authorization:`Bearer ${n}`}});o.push(...s.body.files??[]),r=s.body.nextPageToken}while(r);return o}a(XT,"listDriveFiles");var wJ=50;async function hh({auth:e,rootFolderId:t,maxLevel:n,includeTrashed:o,includeTeamDrives:r}){let i=[],s=[t];for(let u=0;u<n&&s.length>0;u++){let h=[];for(let g of qv(s,wJ)){let y=g.map(P=>`'${P}' in parents`).join(" or "),T=g.length>1?`(${y})`:y,b=await XT({auth:e,params:{q:o?T:`${T} and trashed=false`,fields:"nextPageToken,files(id,kind,mimeType,name,trashed,parents)",supportsAllDrives:"true",includeItemsFromAllDrives:r?"true":"false",corpora:r?"allDrives":"user",pageSize:"1000"}});for(let P of b)i.push(P),P.mimeType==="application/vnd.google-apps.folder"&&h.push(P.id)}s=h}return i}a(hh,"listDriveFilesRecursive");var Vz=require("node:stream"),Gz=he(en());async function Hz(e,t){let n=await bt(e);return(await fetch(`https://www.googleapis.com/drive/v3/files/${t}?fields=mimeType&supportsAllDrives=true`,{headers:{Authorization:`Bearer ${n}`}}).then(r=>r.json())).mimeType}a(Hz,"getMimeType");var Bz=a(async(e,t,n,o,r)=>{let i=await Hz(t,n),s=await bt(t),u=await fetch(e,{headers:{Authorization:`Bearer ${s}`}}).catch(T=>Promise.reject(new Error(`Error when download file:
109
109
  Download file response: ${T.message??T}`)));if(!u.ok||!u.body)throw new Error(`Error when download file:
110
- Download file response: ${u.status} ${u.statusText}`);let h=(0,Gz.extension)(i),g=h?"."+h:"",y=r??n+g;return o.write({fileName:y,data:Vz.Readable.fromWeb(u.body)})},"googledlCall");async function Zt(e,t,n,o){let r=await Hz(e,n);if(["application/vnd.google-apps.document","application/vnd.google-apps.spreadsheet","application/vnd.google-apps.presentation"].includes(r)){switch(r){case"application/vnd.google-apps.document":r="application/vnd.openxmlformats-officedocument.wordprocessingml.document";break;case"application/vnd.google-apps.spreadsheet":r="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";break;case"application/vnd.google-apps.presentation":r="application/vnd.openxmlformats-officedocument.presentationml.presentation";break}return await Bz(`https://www.googleapis.com/drive/v3/files/${n}/export?mimeType=${r}&supportsAllDrives=true`,e,n,t,o)}else return await Bz(`https://www.googleapis.com/drive/v3/files/${n}?alt=media&supportsAllDrives=true`,e,n,t,o)}a(Zt,"downloadFileFromDrive");var Zz=re({auth:Y,name:"list-files",classification:"SEARCH",displayName:"List Files",description:"List the files and folders inside a folder.",audience:"human",aiMetadata:{description:"Lists files and subfolders inside a given Drive folder, with optional recursion to a chosen depth and optional download of each file's content. Use to enumerate the contents of a known folder ID. Read-only and idempotent. Requires the folder ID, not a name.",idempotent:!0},props:{folderId:$.ShortText({displayName:"Folder ID",description:"The ID after /folders/ in the folder URL, or from an earlier step.",required:!0,placeholder:"1aMEtTqIYn5651wdK7WLxaK_SDim4mvXW"}),depthLevel:$.Number({displayName:"Folder Depth",description:"1 lists only this folder; 2 adds its subfolders, and so on.",required:!1,defaultValue:1}),downloadFiles:$.Checkbox({displayName:"Download Files",description:"Also download every file. Slow for large folders.",required:!1,defaultValue:!1}),include_team_drives:Ne.properties.include_team_drives,includeTrashed:$.Checkbox({displayName:"Include Trashed",description:"Also list files that are in the bin.",required:!1,defaultValue:!1,advanced:!0})},outputSchema:Uk,async run(e){let t={type:"drive#fileList",incompleteSearch:!1,files:[]},n=e.propsValue.depthLevel||1,o=await hh({auth:e.auth,rootFolderId:e.propsValue.folderId,maxLevel:n,includeTrashed:e.propsValue.includeTrashed??!1,includeTeamDrives:e.propsValue.include_team_drives??!1});if(e.propsValue.downloadFiles){let r=[];for(let i of o){if(i.mimeType==="application/vnd.google-apps.folder"){r.push(i);continue}let s=i.name,u=(0,gh.extension)(i.mimeType),g=(gh.extensions[i.mimeType]??(u?[u]:[])).some(y=>s.toLowerCase().endsWith(`.${y}`));u&&!g&&(s=`${s}.${u}`);try{let y=await Zt(e.auth,e.files,i.id,s);r.push({...i,downloadedFile:y})}catch(y){console.warn(`Failed to download file ${i.name}: ${y instanceof Error?y.message:"Download failed"}`),r.push(i)}}t.files=r,t.downloadedFiles=r.map(i=>i.downloadedFile).filter(i=>i!==void 0)}else t.files=o;return t}});var Wz=re({auth:Y,name:"read-file",classification:"READ",displayName:"Download File",description:"Download a file. Google Docs, Sheets and Slides become Office files.",audience:"human",aiMetadata:{description:"Downloads the content of a Drive file by its file ID and returns it as a usable file reference. Use to retrieve a file an agent already knows the ID of (e.g. from a trigger or search). Read-only and idempotent. Requires the exact file ID, not a name.",idempotent:!0},props:{fileId:$.ShortText({displayName:"File ID",description:"Use the ID from a trigger or the Find File or Folder action.",required:!0,placeholder:"1dpv4-sKJfKRwI9qx1vWqQhEGEn3EpbI5"}),fileName:$.ShortText({displayName:"File Name",description:"Name for the saved file. Empty uses the file ID plus its extension.",required:!1,placeholder:"report.pdf"})},outputSchema:kk,run:a(async({auth:e,propsValue:t,files:n})=>Zt(e,n,t.fileId,t.fileName),"run")});var Kz=he(ze()),Jz=require("stream");var Xz=re({displayName:"Save Document as PDF",auth:Y,name:"save_file_as_pdf",classification:"WRITE",description:"Export a Google Doc, Sheet or Slides as a PDF into a folder.",audience:"human",aiMetadata:{description:"Exports a Google document to PDF and saves it as a new file in a target Drive folder. Use to produce a PDF rendition of a Google Doc/Sheet/Slides for sharing or archival. Requires the source document ID and destination folder ID. Not idempotent: each call creates a new PDF file.",idempotent:!1},props:{documentId:$.ShortText({displayName:"Document ID",description:"The ID of the Google Doc, Sheet or Slides to export.",required:!0,placeholder:"1dpv4-sKJfKRwI9qx1vWqQhEGEn3EpbI5"}),folderId:$.ShortText({displayName:"Destination Folder ID",description:"The ID of the folder that receives the PDF.",required:!0}),name:$.ShortText({displayName:"File Name",description:"Without the extension; .pdf is added.",required:!0,placeholder:"Quarterly report"}),include_team_drives:Ne.properties.include_team_drives},outputSchema:Lk,async run(e){let t=await de(e.auth),n=e.propsValue.documentId,o=e.propsValue.folderId,r=e.propsValue.name,i=(0,Kz.drive)({version:"v3",auth:t}),s=await i.files.export({fileId:n,mimeType:"application/pdf"},{responseType:"arraybuffer"}),u={name:r+".pdf",parents:[o]},h=Buffer.from(s.data,"base64"),y={mimeType:"application/pdf",body:new Jz.Stream.PassThrough().end(h)};return(await i.files.create({requestBody:u,media:y,supportsAllDrives:e.propsValue.include_team_drives})).data}});var eU=he(ze());var Yz="application/vnd.google-apps.folder";function Qz({queryTerm:e,operator:t,query:n,parentFolder:o,type:r}){let i=[`${e} ${t} '${Ne.escapeDriveQueryLiteral(n)}'`];return o&&i.push(`'${Ne.escapeDriveQueryLiteral(o)}' in parents`),r==="file"&&i.push(`mimeType!='${Yz}'`),r==="folder"&&i.push(`mimeType='${Yz}'`),i.join(" and ")}a(Qz,"buildDriveSearchQuery");var tU=re({auth:Y,name:"search-folder",classification:"SEARCH",displayName:"Find File or Folder",description:"Find files or folders by name, content or type.",audience:"human",aiMetadata:{description:"Searches Google Drive for files or folders matching a name, full-text, or MIME-type query, optionally scoped to a parent folder and filtered to files or folders only. Use to resolve a file/folder ID from a human-readable name before acting on it. Read-only and idempotent.",idempotent:!0},props:{queryTerm:$.StaticDropdown({displayName:"Search By",description:"Match the file name, the text inside it, or its type.",defaultValue:"name",options:{options:[{label:"File Name",value:"name"},{label:"Text Inside the File",value:"fullText"},{label:"File Type",value:"mimeType"}]},required:!0}),operator:$.StaticDropdown({displayName:"Match",description:"Contains finds partial matches; Equals needs the exact value.",required:!0,options:{options:[{label:"Contains",value:"contains"},{label:"Equals",value:"="}]},defaultValue:"contains"}),query:$.ShortText({displayName:"Search Text",description:"The name, text or type to look for.",required:!0,placeholder:"Quarterly report"}),type:$.StaticDropdown({displayName:"Show",description:"Return everything, only files or only folders.",required:!1,options:{options:[{label:"Files and Folders",value:"all"},{label:"Files Only",value:"file"},{label:"Folders Only",value:"folder"}]},defaultValue:"all"}),parentFolder:Ne.parentFolderDropdown({displayName:"Search in Folder",description:"Leave empty to search all of Drive. Type to search by folder name."}),include_team_drives:Ne.properties.include_team_drives},outputSchema:Mk,async run(e){let t=await de(e.auth),n=(0,eU.drive)({version:"v3",auth:t}),o=Qz({queryTerm:e.propsValue.queryTerm??"name",operator:e.propsValue.operator??"contains",query:e.propsValue.query,parentFolder:e.propsValue.parentFolder,type:e.propsValue.type??"all"}),r=[],i;do{let s={q:o,fields:"nextPageToken, files(id, name, mimeType, createdTime, modifiedTime)",includeItemsFromAllDrives:e.propsValue.include_team_drives,supportsAllDrives:!0,corpora:e.propsValue.include_team_drives?"allDrives":"user",pageSize:1e3};i&&(s.pageToken=i);let u=await n.files.list(s);if(u.status!==200)throw console.error(u),new Error("Error searching for the file/folder");r.push(...u.data.files??[]),i=u.data.nextPageToken??void 0}while(i);return r.length>0?r:[]}});var rU=he(en()),nU=he(ze());var oU=re({auth:Y,name:"upload_gdrive_file",classification:"WRITE",description:"Upload a file to Google Drive.",audience:"human",aiMetadata:{description:"Uploads a binary file (from a URL or base64 input) into Google Drive, optionally inside a parent folder. Use to store an existing file or attachment in Drive; the MIME type is inferred from the file extension. Not idempotent: each call creates a new file.",idempotent:!1},displayName:"Upload File",props:{fileName:$.ShortText({displayName:"File Name",description:"Name shown in Drive, including the extension.",required:!0,placeholder:"photo.png"}),file:$.File({displayName:"File",description:"The file to upload, from an earlier step or a URL.",required:!0,streaming:!0}),parentFolder:Ne.properties.parentFolder,include_team_drives:Ne.properties.include_team_drives},outputSchema:Nk,async run(e){let t=e.propsValue.file,{body:n}=i0.toStreamingBody(t),o=rU.default.lookup(t.extension??"")||"application/octet-stream",r=await de(e.auth);return(await(0,nU.drive)({version:"v3",auth:r}).files.create({requestBody:{name:e.propsValue.fileName,...e.propsValue.parentFolder?{parents:[e.propsValue.parentFolder]}:{}},media:{mimeType:o,body:n},supportsAllDrives:e.propsValue.include_team_drives??!1,fields:"id, name, mimeType, kind"})).data}});var sU=he(fl());var yh={strategy:0,items:a(async({auth:e,propsValue:t,lastFetchEpochMS:n})=>(await Ne.getFiles(e,{parent:t.parentFolder,createdTime:n,includeTeamDrive:t.include_team_drives})??[]).map(i=>({epochMilliSeconds:(0,sU.default)(i.createdTime).valueOf(),data:i})),"items")},cU=Aa({auth:Y,name:"new_file",classification:"READ",displayName:"New File",description:"Triggers when a new file is added to Drive or the chosen folder.",aiMetadata:{description:"Fires when a new file appears in Google Drive, optionally scoped to a specific parent folder. Each event represents one newly created file and its metadata, with optional inclusion of the file content."},props:{parentFolder:Ne.parentFolderDropdown({displayName:"Folder",description:"Leave empty to watch all of My Drive. Type to search by folder name."}),include_team_drives:Ne.properties.include_team_drives,include_file_content:$.Checkbox({displayName:"Include File Content",description:"Also download each file. Slower, and very large files may fail.",required:!1,defaultValue:!1})},outputSchema:Hk,type:"POLLING",onEnable:a(async e=>{await Qt.onEnable(yh,{auth:e.auth,store:e.store,propsValue:e.propsValue})},"onEnable"),onDisable:a(async e=>{await Qt.onDisable(yh,{auth:e.auth,store:e.store,propsValue:e.propsValue})},"onDisable"),run:a(async e=>{let t=await Qt.poll(yh,{auth:e.auth,store:e.store,propsValue:e.propsValue,files:e.files});return await iU(t,e)},"run"),test:a(async e=>{let t=await Qt.test(yh,{auth:e.auth,store:e.store,propsValue:e.propsValue,files:e.files});return await iU(t,e)},"test"),sampleData:{kind:"drive#file",mimeType:"image/png",id:"1dpv4-sKJfKRwI9qx1vWqQhEGEn3EpbI5",name:"google-drive.png",webViewLink:"https://drive.google.com/file/d/1dpv4-sKJfKRwI9qx1vWqQhEGEn3EpbI5/view?usp=drivesdk",createdTime:"2026-08-20T09:12:44.000Z",modifiedTime:"2026-08-20T09:12:44.000Z"}});async function iU(e,t){let n=JSON.parse(JSON.stringify(e));if(t.propsValue.include_file_content){let o=[];for(let i of n)o.push(Zt(t.auth,t.files,i.id,i.name));let r=await Promise.all(o);for(let i=0;i<n.length;i++)n[i].content=r[i]}return n}a(iU,"handleFileContent");var uU=he(fl());var vh={strategy:0,items:a(async({auth:e,propsValue:t,lastFetchEpochMS:n})=>(await Ne.getFolders(e,{parent:t.parentFolder,createdTime:n,includeTeamDrive:t.include_team_drives})??[]).map(i=>({epochMilliSeconds:(0,uU.default)(i.createdTime).valueOf(),data:i})),"items")},lU=Aa({auth:Y,name:"new_folder",classification:"READ",displayName:"New Folder",description:"Triggers when a new folder is created in Drive or the chosen folder.",aiMetadata:{description:"Fires when a new folder is created in Google Drive, optionally scoped to a specific parent folder. Each event represents one newly created folder and its metadata."},props:{parentFolder:Ne.parentFolderDropdown({displayName:"Folder",description:"Leave empty to watch all of My Drive. Type to search by folder name."}),include_team_drives:Ne.properties.include_team_drives},outputSchema:Wk,type:"POLLING",onEnable:a(async e=>{await Qt.onEnable(vh,{auth:e.auth,store:e.store,propsValue:e.propsValue})},"onEnable"),onDisable:a(async e=>{await Qt.onDisable(vh,{auth:e.auth,store:e.store,propsValue:e.propsValue})},"onDisable"),run:a(async e=>await Qt.poll(vh,e),"run"),test:a(async e=>await Qt.test(vh,e),"test"),sampleData:{kind:"drive#file",mimeType:"application/vnd.google-apps.folder",id:"1aMEtTqIYn5651wdK7WLxaK_SDim4mvXW",name:"Invoices 2026",createdTime:"2026-08-20T09:12:44.000Z"}});var YT=he(fl());var _h={strategy:0,items:a(async({auth:e,propsValue:t,lastFetchEpochMS:n})=>{let o=n===0,r=await Ne.getFiles(e,{parent:t.parentFolder,changedSince:o?void 0:n,mimeTypes:t.file_types,excludeShortcuts:!0,includeTeamDrive:t.include_team_drives,maxPages:o?1:void 0},"modifiedTime desc")??[],i=Date.now();return r.filter(yU).filter(s=>wJ({file:s,now:i})).map(s=>({epochMilliSeconds:gU(s),data:{...s,changeType:bJ({file:s,lastFetchEpochMS:n})}}))},"items")},hU=Aa({auth:Y,name:"new_or_updated_file",classification:"READ",displayName:"New or Updated File",description:"Triggers when a file is created or edited. A rename counts; trashing or moving does not.",aiMetadata:{description:"Fires when a file is created or modified in Google Drive, based on its creation and last-modified times (polling), optionally scoped to a parent folder and to specific file types. Each event represents one file and its metadata, carries a changeType of created or updated, and can include the file content, falling back to a contentError field when a download fails. Choose this over New File when edits to files that already exist should also trigger the flow."},props:{behaviourNote:$.MarkDown({value:"Each event carries a Change Type of created or updated. Several edits between two checks arrive as one event. A chosen folder is watched one level deep, not its subfolders.",variant:"INFO"}),parentFolder:Ne.parentFolderDropdown({displayName:"Folder",description:"Leave empty to watch all of My Drive. Type to search by folder name."}),include_team_drives:Ne.properties.include_team_drives,file_types:$.StaticMultiSelectDropdown({displayName:"File Types",description:"Empty watches every type. Use Dynamic value to add other MIME types.",required:!1,options:{options:[{label:"Google Sheets",value:"application/vnd.google-apps.spreadsheet"},{label:"Google Docs",value:"application/vnd.google-apps.document"},{label:"Google Slides",value:"application/vnd.google-apps.presentation"},{label:"Excel (XLSX)",value:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"},{label:"Excel 97-2003 (XLS)",value:"application/vnd.ms-excel"},{label:"CSV",value:"text/csv"},{label:"Word (DOCX)",value:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"},{label:"PowerPoint (PPTX)",value:"application/vnd.openxmlformats-officedocument.presentationml.presentation"},{label:"PDF",value:"application/pdf"},{label:"Plain Text (TXT)",value:"text/plain"},{label:"PNG",value:"image/png"},{label:"JPEG",value:"image/jpeg"},{label:"ZIP",value:"application/zip"}]}}),include_file_content:$.Checkbox({displayName:"Include File Content",description:"Also download each file. A failed download adds an error instead.",required:!1,defaultValue:!1})},outputSchema:Zk,type:"POLLING",onEnable:a(async e=>{await Qt.onEnable(_h,e)},"onEnable"),onDisable:a(async e=>{await Qt.onDisable(_h,e)},"onDisable"),run:a(async e=>{let t=Date.now()+mU,n=await Qt.poll(_h,e);return await dU({auth:e.auth,files:e.files,items:n,includeFileContent:e.propsValue.include_file_content,deadline:t})},"run"),test:a(async e=>{let t=Date.now()+mU,n=await Qt.test(_h,e);return await dU({auth:e.auth,files:e.files,items:n,includeFileContent:e.propsValue.include_file_content,deadline:t})},"test"),sampleData:{changeType:"updated",kind:"drive#file",id:"1dpv4-sKJfKRwI9qx1vWqQhEGEn3EpbI5",name:"quarterly-report.xlsx",mimeType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",webViewLink:"https://docs.google.com/spreadsheets/d/1dpv4-sKJfKRwI9qx1vWqQhEGEn3EpbI5/edit?usp=drivesdk",createdTime:"2026-08-20T09:12:44.000Z",modifiedTime:"2026-08-25T14:34:07.000Z"}});function hl(e){return typeof e=="string"&&(0,YT.default)(e).isValid()?(0,YT.default)(e).valueOf():0}a(hl,"epochOf");function gU(e){return Math.max(hl(e.modifiedTime),hl(e.createdTime))}a(gU,"changedAtEpoch");function wJ({file:e,now:t}){let n=gU(e);return n>0&&n<=t}a(wJ,"isDeliverable");function bJ({file:e,lastFetchEpochMS:t}){return t>0?hl(e.createdTime)>t?"created":"updated":hl(e.modifiedTime)>hl(e.createdTime)?"updated":"created"}a(bJ,"resolveChangeType");function yU(e){return typeof e=="object"&&e!==null&&"id"in e&&typeof e.id=="string"&&"name"in e&&typeof e.name=="string"}a(yU,"isDriveFile");function TJ(e){return new Promise(t=>setTimeout(t,e))}a(TJ,"delay");function EJ(){return Math.floor(Math.random()*IJ)}a(EJ,"jitterMs");async function SJ({auth:e,files:t,file:n,deadline:o}){let r=AJ;for(let i=1;i<=fU;i++){if(Date.now()>=o)return{error:r};let{data:s,error:u}=await Vv(()=>Zt(e,t,n.id,n.name));if(u===null&&s!==null)return{content:s};r=u===null?"Download returned no content":u.message;let h=i*xJ+EJ();i<fU&&Date.now()+h<o&&await TJ(h)}return{error:r}}a(SJ,"downloadContent");async function dU({auth:e,files:t,items:n,includeFileContent:o,deadline:r}){if(!o)return n;let i=[];for(let s=0;s<n.length;s+=pU){let u=n.slice(s,s+pU),h=await Promise.all(u.map(async g=>{if(!yU(g))return g;let y=await SJ({auth:e,files:t,file:g,deadline:r});return"content"in y?{...g,content:y.content}:{...g,contentError:y.error}}));i.push(...h)}return i}a(dU,"withFileContent");var pU=5,fU=3,xJ=500,IJ=250,mU=4e4,AJ="Timed out before the file content could be downloaded";var vU=he(ze());var _U=re({auth:Y,name:"set_public_access",classification:"WRITE",description:"Let anyone with the link open a file or folder.",audience:"human",aiMetadata:{description:"Makes a Drive file or folder accessible to anyone with the link at the chosen role (reader, commenter, or writer) and returns its shareable view/download URL. Use to publish a resource publicly. Requires the file/folder ID. Not idempotent: each call adds a new anyone-with-link permission.",idempotent:!1},displayName:"Set Public Access",props:{fileId:$.ShortText({displayName:"File or Folder ID",description:"The ID from the item's Drive URL or an earlier step.",required:!0,placeholder:"1dpv4-sKJfKRwI9qx1vWqQhEGEn3EpbI5"}),role:$.StaticDropdown({displayName:"Role",description:"What anyone with the link can do.",options:{options:[{label:"Viewer",value:"reader"},{label:"Commenter",value:"commenter"},{label:"Editor",value:"writer"}]},defaultValue:"reader",required:!0})},outputSchema:qk,async run(e){let t=await de(e.auth),n=e.propsValue.fileId,o=e.propsValue.role,r=(0,vU.drive)({version:"v3",auth:t}),i={role:o,type:"anyone"},s=await r.permissions.create({fileId:n,requestBody:i,supportsAllDrives:!0}),u=await r.files.get({fileId:n,fields:"name,mimeType,webContentLink,webViewLink",supportsAllDrives:!0});if(u.data.mimeType==="application/vnd.google-apps.folder")return{...s.data,webViewLink:u.data.webViewLink,downloadUrl:null};let h=await Zt(e.auth,e.files,n,u.data.name);return{...s.data,downloadUrl:h}}});var PU=he(ze());var wU=re({auth:Y,name:"google-drive-move-file",classification:"WRITE",displayName:"Move File",description:"Move a file into another folder.",audience:"human",aiMetadata:{description:"Relocates a Drive file to a target folder, detaching it from its current parents and attaching it to the new one. Use to reorganize a file once you know its ID and the destination folder ID. Idempotent: repeating with the same destination leaves the file in the same folder.",idempotent:!0},props:{fileId:$.ShortText({displayName:"File ID",description:"Use the ID from a trigger or the Find File or Folder action.",required:!0,placeholder:"1dpv4-sKJfKRwI9qx1vWqQhEGEn3EpbI5"}),folderId:Ne.parentFolderDropdown({displayName:"Destination Folder",description:"The folder to move the file into. Type to search by folder name."}),include_team_drives:Ne.properties.include_team_drives},outputSchema:jk,async run(e){let t=e.propsValue.fileId,n=e.propsValue.folderId,o=await de(e.auth),r=(0,PU.drive)({version:"v3",auth:o}),i=await r.files.get({fileId:t,supportsAllDrives:e.propsValue.include_team_drives,fields:"id,parents"});return(await r.files.update({fileId:t,fields:"*",removeParents:i.data.parents?.join(","),addParents:n,supportsAllDrives:e.propsValue.include_team_drives})).data}});var bU=he(ze()),TU=re({auth:Y,name:"delete_gdrive_file",classification:"DESTRUCTIVE",description:"Permanently delete a file, skipping the bin.",audience:"human",aiMetadata:{description:"Permanently deletes a file from Google Drive by its ID, bypassing the trash and making it unrecoverable. Use only when permanent removal is intended; prefer Trash file for reversible deletion. Requires the file ID. Not idempotent: a repeat call fails because the file no longer exists.",idempotent:!1},displayName:"Delete File",props:{fileId:$.ShortText({displayName:"File ID",description:"The ID of the file to delete. This cannot be undone.",required:!0,placeholder:"1dpv4-sKJfKRwI9qx1vWqQhEGEn3EpbI5"}),include_team_drives:Ne.properties.include_team_drives},async run(e){let t=await de(e.auth);return(await(0,bU.drive)({version:"v3",auth:t}).files.delete({fileId:e.propsValue.fileId,supportsAllDrives:e.propsValue.include_team_drives})).data}});var EU=he(ze());var SU=re({auth:Y,name:"trash_gdrive_file",classification:"DESTRUCTIVE",description:"Move a file to the bin, where it can be restored.",audience:"human",aiMetadata:{description:"Moves a Drive file to the trash by its ID, a reversible deletion that can be restored from Drive. Use for safe removal instead of permanent deletion. Requires the file ID. Idempotent: re-trashing an already-trashed file leaves it in the same state.",idempotent:!0},displayName:"Move File to Trash",props:{fileId:$.ShortText({displayName:"File ID",description:"The ID of the file to trash.",required:!0,placeholder:"1dpv4-sKJfKRwI9qx1vWqQhEGEn3EpbI5"}),include_team_drives:Ne.properties.include_team_drives},outputSchema:Gk,async run(e){let t=await de(e.auth),n=(0,EU.drive)({version:"v3",auth:t}),o={trashed:!0};return(await n.files.update({fileId:e.propsValue.fileId,supportsAllDrives:e.propsValue.include_team_drives,requestBody:o})).data}});var xU=require("node:stream"),IU=require("@zip.js/zip.js"),AU=he(en());var RJ=4,DJ=16*1024*1024,OJ=8*1024*1024,$J=20,RU="application/vnd.google-apps.folder",CJ={"application/vnd.google-apps.document":{key:"docs",exportMimeTypes:{pdf:"application/pdf",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"}},"application/vnd.google-apps.spreadsheet":{key:"sheets",exportMimeTypes:{pdf:"application/pdf",xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}},"application/vnd.google-apps.presentation":{key:"slides",exportMimeTypes:{pdf:"application/pdf",pptx:"application/vnd.openxmlformats-officedocument.presentationml.presentation"}}};async function NJ({auth:e,folderId:t,includeTeamDrives:n}){return XT({auth:e,params:{q:`'${t}' in parents and trashed=false`,fields:"nextPageToken,files(id,name,mimeType,size)",supportsAllDrives:"true",includeItemsFromAllDrives:n?"true":"false",corpora:n?"allDrives":"user",pageSize:"1000"}})}a(NJ,"listFolderChildren");function kJ(e,t){let n=t.length>0?t:"/",o=`"${e}"`;if(e.includes("/"))return{name:o,location:n,message:'contains "/"'};if(e.includes("\\"))return{name:o,location:n,message:'contains "\\"'};if(e==="..")return{name:o,location:n,message:"escapes the archive root on extraction"};if(e===".")return{name:o,location:n,message:"collides with other paths once normalized on extraction"}}a(kJ,"checkSafeItemName");function zJ(e,t){if(e.mimeType===RU)return{item:e,name:e.name};let n=CJ[e.mimeType];if(n){let o=t[n.key];if(o==="skip")return;let r=n.exportMimeTypes[o],i=(0,AU.extension)(r);return{item:e,name:i?`${e.name}.${i}`:e.name,downloadUrl:`https://www.googleapis.com/drive/v3/files/${e.id}/export?mimeType=${encodeURIComponent(r)}&supportsAllDrives=true`}}if(!e.mimeType.startsWith("application/vnd.google-apps."))return{item:e,name:e.name,downloadUrl:`https://www.googleapis.com/drive/v3/files/${e.id}?alt=media&supportsAllDrives=true`}}a(zJ,"resolveItem");function UJ(e,t){let n=new Map;for(let{name:i}of e){let s=i.toLowerCase(),u=n.get(s);u?u.push(i):n.set(s,[i])}let o=t.length>0?t:"/",r=[];for(let i of n.values()){if(i.length<=1)continue;let s=[...new Set(i)];r.push({name:s.map(u=>`"${u}"`).join(", "),location:o,message:s.length>1?`${i.length} items would map to the same zip path (names differing only by case collide on Windows and macOS)`:`${i.length} items would map to the same zip path`})}return r}a(UJ,"checkUniqueNames");async function DU({auth:e,folderId:t,relativePrefix:n,nativeFormats:o,includeTeamDrives:r,out:i,errors:s}){let u=await NJ({auth:e,folderId:t,includeTeamDrives:r});if(u.length===0){n.length>0&&i.push({relativePath:n,fileId:t,isEmptyFolder:!0,sizeBytes:0});return}let h=u.map(g=>zJ(g,o)).filter(g=>g!==void 0);for(let{item:g}of h){let y=kJ(g.name,n);y&&s.push(y)}s.push(...UJ(h,n));for(let g of h){let y=n.length>0?`${n}/${g.name}`:g.name;if(g.item.mimeType===RU){await DU({auth:e,folderId:g.item.id,relativePrefix:y,nativeFormats:o,includeTeamDrives:r,out:i,errors:s});continue}let T=Number(g.item.size);i.push({relativePath:y,fileId:g.item.id,isEmptyFolder:!1,downloadUrl:g.downloadUrl,sizeBytes:Number.isFinite(T)?T:OJ})}}a(DU,"walk");async function MJ({auth:e,rootFolderId:t,nativeFormats:n,includeTeamDrives:o}){let r=[],i=[];if(await DU({auth:e,folderId:t,relativePrefix:"",nativeFormats:n,includeTeamDrives:o,out:r,errors:i}),i.length>0){let s=[...i].sort((g,y)=>g.location.localeCompare(y.location)||g.name.localeCompare(y.name)),u=s.slice(0,$J),h=u.map(g=>`- [${g.location}] ${g.name} ${g.message}`);throw s.length>u.length&&h.push(`- ...and ${s.length-u.length} more`),new Error(`Cannot export (${i.length} problem${i.length>1?"s":""}) - Rename the conflicting or unsafe items in Drive and try again.
110
+ Download file response: ${u.status} ${u.statusText}`);let h=(0,Gz.extension)(i),g=h?"."+h:"",y=r??n+g;return o.write({fileName:y,data:Vz.Readable.fromWeb(u.body)})},"googledlCall");async function Zt(e,t,n,o){let r=await Hz(e,n);if(["application/vnd.google-apps.document","application/vnd.google-apps.spreadsheet","application/vnd.google-apps.presentation"].includes(r)){switch(r){case"application/vnd.google-apps.document":r="application/vnd.openxmlformats-officedocument.wordprocessingml.document";break;case"application/vnd.google-apps.spreadsheet":r="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";break;case"application/vnd.google-apps.presentation":r="application/vnd.openxmlformats-officedocument.presentationml.presentation";break}return await Bz(`https://www.googleapis.com/drive/v3/files/${n}/export?mimeType=${r}&supportsAllDrives=true`,e,n,t,o)}else return await Bz(`https://www.googleapis.com/drive/v3/files/${n}?alt=media&supportsAllDrives=true`,e,n,t,o)}a(Zt,"downloadFileFromDrive");var Zz=re({auth:Y,name:"list-files",classification:"SEARCH",displayName:"List Files",description:"List the files and folders inside a folder.",audience:"human",aiMetadata:{description:"Lists files and subfolders inside a given Drive folder, with optional recursion to a chosen depth and optional download of each file's content. Use to enumerate the contents of a known folder ID. Read-only and idempotent. Requires the folder ID, not a name.",idempotent:!0},props:{folderId:$.ShortText({displayName:"Folder ID",description:"The ID after /folders/ in the folder URL, or from an earlier step.",required:!0,placeholder:"1aMEtTqIYn5651wdK7WLxaK_SDim4mvXW"}),depthLevel:$.Number({displayName:"Folder Depth",description:"1 lists only this folder; 2 adds its subfolders, and so on.",required:!1,defaultValue:1,display:"stepper",min:1,max:100,step:1}),downloadFiles:$.Checkbox({displayName:"Download Files",description:"Also download every file. Slow for large folders.",required:!1,defaultValue:!1}),include_team_drives:Ne.properties.include_team_drives,includeTrashed:$.Checkbox({displayName:"Include Trashed",description:"Also list files that are in the bin.",required:!1,defaultValue:!1,advanced:!0})},outputSchema:Uk,async run(e){let t={type:"drive#fileList",incompleteSearch:!1,files:[]},n=e.propsValue.depthLevel||1,o=await hh({auth:e.auth,rootFolderId:e.propsValue.folderId,maxLevel:n,includeTrashed:e.propsValue.includeTrashed??!1,includeTeamDrives:e.propsValue.include_team_drives??!1});if(e.propsValue.downloadFiles){let r=[];for(let i of o){if(i.mimeType==="application/vnd.google-apps.folder"){r.push(i);continue}let s=i.name,u=(0,gh.extension)(i.mimeType),g=(gh.extensions[i.mimeType]??(u?[u]:[])).some(y=>s.toLowerCase().endsWith(`.${y}`));u&&!g&&(s=`${s}.${u}`);try{let y=await Zt(e.auth,e.files,i.id,s);r.push({...i,downloadedFile:y})}catch(y){console.warn(`Failed to download file ${i.name}: ${y instanceof Error?y.message:"Download failed"}`),r.push(i)}}t.files=r,t.downloadedFiles=r.map(i=>i.downloadedFile).filter(i=>i!==void 0)}else t.files=o;return t}});var Wz=re({auth:Y,name:"read-file",classification:"READ",displayName:"Download File",description:"Download a file. Google Docs, Sheets and Slides become Office files.",audience:"human",aiMetadata:{description:"Downloads the content of a Drive file by its file ID and returns it as a usable file reference. Use to retrieve a file an agent already knows the ID of (e.g. from a trigger or search). Read-only and idempotent. Requires the exact file ID, not a name.",idempotent:!0},props:{fileId:$.ShortText({displayName:"File ID",description:"Use the ID from a trigger or the Find File or Folder action.",required:!0,placeholder:"1dpv4-sKJfKRwI9qx1vWqQhEGEn3EpbI5"}),fileName:$.ShortText({displayName:"File Name",description:"Name for the saved file. Empty uses the file ID plus its extension.",required:!1,placeholder:"report.pdf"})},outputSchema:kk,run:a(async({auth:e,propsValue:t,files:n})=>Zt(e,n,t.fileId,t.fileName),"run")});var Kz=he(ze()),Jz=require("stream");var Xz=re({displayName:"Save Document as PDF",auth:Y,name:"save_file_as_pdf",classification:"WRITE",description:"Export a Google Doc, Sheet or Slides as a PDF into a folder.",audience:"human",aiMetadata:{description:"Exports a Google document to PDF and saves it as a new file in a target Drive folder. Use to produce a PDF rendition of a Google Doc/Sheet/Slides for sharing or archival. Requires the source document ID and destination folder ID. Not idempotent: each call creates a new PDF file.",idempotent:!1},props:{documentId:$.ShortText({displayName:"Document ID",description:"The ID of the Google Doc, Sheet or Slides to export.",required:!0,placeholder:"1dpv4-sKJfKRwI9qx1vWqQhEGEn3EpbI5"}),folderId:$.ShortText({displayName:"Destination Folder ID",description:"The ID of the folder that receives the PDF.",required:!0}),name:$.ShortText({displayName:"File Name",description:"Without the extension; .pdf is added.",required:!0,placeholder:"Quarterly report"}),include_team_drives:Ne.properties.include_team_drives},outputSchema:Lk,async run(e){let t=await de(e.auth),n=e.propsValue.documentId,o=e.propsValue.folderId,r=e.propsValue.name,i=(0,Kz.drive)({version:"v3",auth:t}),s=await i.files.export({fileId:n,mimeType:"application/pdf"},{responseType:"arraybuffer"}),u={name:r+".pdf",parents:[o]},h=Buffer.from(s.data,"base64"),y={mimeType:"application/pdf",body:new Jz.Stream.PassThrough().end(h)};return(await i.files.create({requestBody:u,media:y,supportsAllDrives:e.propsValue.include_team_drives})).data}});var eU=he(ze());var Yz="application/vnd.google-apps.folder";function Qz({queryTerm:e,operator:t,query:n,parentFolder:o,type:r}){let i=[`${e} ${t} '${Ne.escapeDriveQueryLiteral(n)}'`];return o&&i.push(`'${Ne.escapeDriveQueryLiteral(o)}' in parents`),r==="file"&&i.push(`mimeType!='${Yz}'`),r==="folder"&&i.push(`mimeType='${Yz}'`),i.join(" and ")}a(Qz,"buildDriveSearchQuery");var tU=re({auth:Y,name:"search-folder",classification:"SEARCH",displayName:"Find File or Folder",description:"Find files or folders by name, content or type.",audience:"human",aiMetadata:{description:"Searches Google Drive for files or folders matching a name, full-text, or MIME-type query, optionally scoped to a parent folder and filtered to files or folders only. Use to resolve a file/folder ID from a human-readable name before acting on it. Read-only and idempotent.",idempotent:!0},propertyGroups:[{key:"search",display:"section",label:"Search for",icon:"type",props:["queryTerm","operator","query"]},{key:"scope",display:"section",label:"Limit results",icon:"sliders",props:["type","parentFolder","include_team_drives"]}],props:{queryTerm:$.StaticDropdown({displayName:"Search By",description:"Match the file name, the text inside it, or its type.",defaultValue:"name",options:{options:[{label:"File Name",value:"name"},{label:"Text Inside the File",value:"fullText"},{label:"File Type",value:"mimeType"}]},required:!0}),operator:$.StaticDropdown({displayName:"Match",description:"Contains finds partial matches; Equals needs the exact value.",required:!0,display:"cards",options:{options:[{label:"Contains",value:"contains",description:"Partial match",icon:"filter"},{label:"Equals",value:"=",description:"Exact match",icon:"tag"}]},defaultValue:"contains"}),query:$.ShortText({displayName:"Search Text",description:"The name, text or type to look for.",required:!0,placeholder:"Quarterly report"}),type:$.StaticDropdown({displayName:"Show",description:"Return everything, only files or only folders.",required:!1,options:{options:[{label:"Files and Folders",value:"all"},{label:"Files Only",value:"file"},{label:"Folders Only",value:"folder"}]},defaultValue:"all"}),parentFolder:Ne.parentFolderDropdown({displayName:"Search in Folder",description:"Leave empty to search all of Drive. Type to search by folder name."}),include_team_drives:Ne.properties.include_team_drives},outputSchema:Mk,async run(e){let t=await de(e.auth),n=(0,eU.drive)({version:"v3",auth:t}),o=Qz({queryTerm:e.propsValue.queryTerm??"name",operator:e.propsValue.operator??"contains",query:e.propsValue.query,parentFolder:e.propsValue.parentFolder,type:e.propsValue.type??"all"}),r=[],i;do{let s={q:o,fields:"nextPageToken, files(id, name, mimeType, createdTime, modifiedTime)",includeItemsFromAllDrives:e.propsValue.include_team_drives,supportsAllDrives:!0,corpora:e.propsValue.include_team_drives?"allDrives":"user",pageSize:1e3};i&&(s.pageToken=i);let u=await n.files.list(s);if(u.status!==200)throw console.error(u),new Error("Error searching for the file/folder");r.push(...u.data.files??[]),i=u.data.nextPageToken??void 0}while(i);return r.length>0?r:[]}});var rU=he(en()),nU=he(ze());var oU=re({auth:Y,name:"upload_gdrive_file",classification:"WRITE",description:"Upload a file to Google Drive.",audience:"human",aiMetadata:{description:"Uploads a binary file (from a URL or base64 input) into Google Drive, optionally inside a parent folder. Use to store an existing file or attachment in Drive; the MIME type is inferred from the file extension. Not idempotent: each call creates a new file.",idempotent:!1},displayName:"Upload File",props:{fileName:$.ShortText({displayName:"File Name",description:"Name shown in Drive, including the extension.",required:!0,placeholder:"photo.png"}),file:$.File({displayName:"File",description:"The file to upload, from an earlier step or a URL.",required:!0,streaming:!0}),parentFolder:Ne.properties.parentFolder,include_team_drives:Ne.properties.include_team_drives},outputSchema:Nk,async run(e){let t=e.propsValue.file,{body:n}=i0.toStreamingBody(t),o=rU.default.lookup(t.extension??"")||"application/octet-stream",r=await de(e.auth);return(await(0,nU.drive)({version:"v3",auth:r}).files.create({requestBody:{name:e.propsValue.fileName,...e.propsValue.parentFolder?{parents:[e.propsValue.parentFolder]}:{}},media:{mimeType:o,body:n},supportsAllDrives:e.propsValue.include_team_drives??!1,fields:"id, name, mimeType, kind"})).data}});var sU=he(fl());var yh={strategy:0,items:a(async({auth:e,propsValue:t,lastFetchEpochMS:n})=>(await Ne.getFiles(e,{parent:t.parentFolder,createdTime:n,includeTeamDrive:t.include_team_drives})??[]).map(i=>({epochMilliSeconds:(0,sU.default)(i.createdTime).valueOf(),data:i})),"items")},cU=Aa({auth:Y,name:"new_file",classification:"READ",displayName:"New File",description:"Triggers when a new file is added to Drive or the chosen folder.",aiMetadata:{description:"Fires when a new file appears in Google Drive, optionally scoped to a specific parent folder. Each event represents one newly created file and its metadata, with optional inclusion of the file content."},props:{parentFolder:Ne.parentFolderDropdown({displayName:"Folder",description:"Leave empty to watch all of My Drive. Type to search by folder name."}),include_team_drives:Ne.properties.include_team_drives,include_file_content:$.Checkbox({displayName:"Include File Content",description:"Also download each file. Slower, and very large files may fail.",required:!1,defaultValue:!1})},outputSchema:Hk,type:"POLLING",onEnable:a(async e=>{await Qt.onEnable(yh,{auth:e.auth,store:e.store,propsValue:e.propsValue})},"onEnable"),onDisable:a(async e=>{await Qt.onDisable(yh,{auth:e.auth,store:e.store,propsValue:e.propsValue})},"onDisable"),run:a(async e=>{let t=await Qt.poll(yh,{auth:e.auth,store:e.store,propsValue:e.propsValue,files:e.files});return await iU(t,e)},"run"),test:a(async e=>{let t=await Qt.test(yh,{auth:e.auth,store:e.store,propsValue:e.propsValue,files:e.files});return await iU(t,e)},"test"),sampleData:{kind:"drive#file",mimeType:"image/png",id:"1dpv4-sKJfKRwI9qx1vWqQhEGEn3EpbI5",name:"google-drive.png",webViewLink:"https://drive.google.com/file/d/1dpv4-sKJfKRwI9qx1vWqQhEGEn3EpbI5/view?usp=drivesdk",createdTime:"2026-08-20T09:12:44.000Z",modifiedTime:"2026-08-20T09:12:44.000Z"}});async function iU(e,t){let n=JSON.parse(JSON.stringify(e));if(t.propsValue.include_file_content){let o=[];for(let i of n)o.push(Zt(t.auth,t.files,i.id,i.name));let r=await Promise.all(o);for(let i=0;i<n.length;i++)n[i].content=r[i]}return n}a(iU,"handleFileContent");var uU=he(fl());var vh={strategy:0,items:a(async({auth:e,propsValue:t,lastFetchEpochMS:n})=>(await Ne.getFolders(e,{parent:t.parentFolder,createdTime:n,includeTeamDrive:t.include_team_drives})??[]).map(i=>({epochMilliSeconds:(0,uU.default)(i.createdTime).valueOf(),data:i})),"items")},lU=Aa({auth:Y,name:"new_folder",classification:"READ",displayName:"New Folder",description:"Triggers when a new folder is created in Drive or the chosen folder.",aiMetadata:{description:"Fires when a new folder is created in Google Drive, optionally scoped to a specific parent folder. Each event represents one newly created folder and its metadata."},props:{parentFolder:Ne.parentFolderDropdown({displayName:"Folder",description:"Leave empty to watch all of My Drive. Type to search by folder name."}),include_team_drives:Ne.properties.include_team_drives},outputSchema:Wk,type:"POLLING",onEnable:a(async e=>{await Qt.onEnable(vh,{auth:e.auth,store:e.store,propsValue:e.propsValue})},"onEnable"),onDisable:a(async e=>{await Qt.onDisable(vh,{auth:e.auth,store:e.store,propsValue:e.propsValue})},"onDisable"),run:a(async e=>await Qt.poll(vh,e),"run"),test:a(async e=>await Qt.test(vh,e),"test"),sampleData:{kind:"drive#file",mimeType:"application/vnd.google-apps.folder",id:"1aMEtTqIYn5651wdK7WLxaK_SDim4mvXW",name:"Invoices 2026",createdTime:"2026-08-20T09:12:44.000Z"}});var YT=he(fl());var _h={strategy:0,items:a(async({auth:e,propsValue:t,lastFetchEpochMS:n})=>{let o=n===0,r=await Ne.getFiles(e,{parent:t.parentFolder,changedSince:o?void 0:n,mimeTypes:t.file_types,excludeShortcuts:!0,includeTeamDrive:t.include_team_drives,maxPages:o?1:void 0},"modifiedTime desc")??[],i=Date.now();return r.filter(yU).filter(s=>bJ({file:s,now:i})).map(s=>({epochMilliSeconds:gU(s),data:{...s,changeType:TJ({file:s,lastFetchEpochMS:n})}}))},"items")},hU=Aa({auth:Y,name:"new_or_updated_file",classification:"READ",displayName:"New or Updated File",description:"Triggers when a file is created or edited. A rename counts; trashing or moving does not.",aiMetadata:{description:"Fires when a file is created or modified in Google Drive, based on its creation and last-modified times (polling), optionally scoped to a parent folder and to specific file types. Each event represents one file and its metadata, carries a changeType of created or updated, and can include the file content, falling back to a contentError field when a download fails. Choose this over New File when edits to files that already exist should also trigger the flow."},props:{behaviourNote:$.MarkDown({value:"Each event carries a Change Type of created or updated. Several edits between two checks arrive as one event. A chosen folder is watched one level deep, not its subfolders.",variant:"INFO"}),parentFolder:Ne.parentFolderDropdown({displayName:"Folder",description:"Leave empty to watch all of My Drive. Type to search by folder name."}),include_team_drives:Ne.properties.include_team_drives,file_types:$.StaticMultiSelectDropdown({displayName:"File Types",description:"Empty watches every type. Use Dynamic value to add other MIME types.",required:!1,options:{options:[{label:"Google Sheets",value:"application/vnd.google-apps.spreadsheet"},{label:"Google Docs",value:"application/vnd.google-apps.document"},{label:"Google Slides",value:"application/vnd.google-apps.presentation"},{label:"Excel (XLSX)",value:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"},{label:"Excel 97-2003 (XLS)",value:"application/vnd.ms-excel"},{label:"CSV",value:"text/csv"},{label:"Word (DOCX)",value:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"},{label:"PowerPoint (PPTX)",value:"application/vnd.openxmlformats-officedocument.presentationml.presentation"},{label:"PDF",value:"application/pdf"},{label:"Plain Text (TXT)",value:"text/plain"},{label:"PNG",value:"image/png"},{label:"JPEG",value:"image/jpeg"},{label:"ZIP",value:"application/zip"}]}}),include_file_content:$.Checkbox({displayName:"Include File Content",description:"Also download each file. A failed download adds an error instead.",required:!1,defaultValue:!1})},outputSchema:Zk,type:"POLLING",onEnable:a(async e=>{await Qt.onEnable(_h,e)},"onEnable"),onDisable:a(async e=>{await Qt.onDisable(_h,e)},"onDisable"),run:a(async e=>{let t=Date.now()+mU,n=await Qt.poll(_h,e);return await dU({auth:e.auth,files:e.files,items:n,includeFileContent:e.propsValue.include_file_content,deadline:t})},"run"),test:a(async e=>{let t=Date.now()+mU,n=await Qt.test(_h,e);return await dU({auth:e.auth,files:e.files,items:n,includeFileContent:e.propsValue.include_file_content,deadline:t})},"test"),sampleData:{changeType:"updated",kind:"drive#file",id:"1dpv4-sKJfKRwI9qx1vWqQhEGEn3EpbI5",name:"quarterly-report.xlsx",mimeType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",webViewLink:"https://docs.google.com/spreadsheets/d/1dpv4-sKJfKRwI9qx1vWqQhEGEn3EpbI5/edit?usp=drivesdk",createdTime:"2026-08-20T09:12:44.000Z",modifiedTime:"2026-08-25T14:34:07.000Z"}});function hl(e){return typeof e=="string"&&(0,YT.default)(e).isValid()?(0,YT.default)(e).valueOf():0}a(hl,"epochOf");function gU(e){return Math.max(hl(e.modifiedTime),hl(e.createdTime))}a(gU,"changedAtEpoch");function bJ({file:e,now:t}){let n=gU(e);return n>0&&n<=t}a(bJ,"isDeliverable");function TJ({file:e,lastFetchEpochMS:t}){return t>0?hl(e.createdTime)>t?"created":"updated":hl(e.modifiedTime)>hl(e.createdTime)?"updated":"created"}a(TJ,"resolveChangeType");function yU(e){return typeof e=="object"&&e!==null&&"id"in e&&typeof e.id=="string"&&"name"in e&&typeof e.name=="string"}a(yU,"isDriveFile");function EJ(e){return new Promise(t=>setTimeout(t,e))}a(EJ,"delay");function SJ(){return Math.floor(Math.random()*AJ)}a(SJ,"jitterMs");async function xJ({auth:e,files:t,file:n,deadline:o}){let r=RJ;for(let i=1;i<=fU;i++){if(Date.now()>=o)return{error:r};let{data:s,error:u}=await Vv(()=>Zt(e,t,n.id,n.name));if(u===null&&s!==null)return{content:s};r=u===null?"Download returned no content":u.message;let h=i*IJ+SJ();i<fU&&Date.now()+h<o&&await EJ(h)}return{error:r}}a(xJ,"downloadContent");async function dU({auth:e,files:t,items:n,includeFileContent:o,deadline:r}){if(!o)return n;let i=[];for(let s=0;s<n.length;s+=pU){let u=n.slice(s,s+pU),h=await Promise.all(u.map(async g=>{if(!yU(g))return g;let y=await xJ({auth:e,files:t,file:g,deadline:r});return"content"in y?{...g,content:y.content}:{...g,contentError:y.error}}));i.push(...h)}return i}a(dU,"withFileContent");var pU=5,fU=3,IJ=500,AJ=250,mU=4e4,RJ="Timed out before the file content could be downloaded";var vU=he(ze());var _U=re({auth:Y,name:"set_public_access",classification:"WRITE",description:"Let anyone with the link open a file or folder.",audience:"human",aiMetadata:{description:"Makes a Drive file or folder accessible to anyone with the link at the chosen role (reader, commenter, or writer) and returns its shareable view/download URL. Use to publish a resource publicly. Requires the file/folder ID. Not idempotent: each call adds a new anyone-with-link permission.",idempotent:!1},displayName:"Set Public Access",props:{fileId:$.ShortText({displayName:"File or Folder ID",description:"The ID from the item's Drive URL or an earlier step.",required:!0,placeholder:"1dpv4-sKJfKRwI9qx1vWqQhEGEn3EpbI5"}),role:$.StaticDropdown({displayName:"Role",description:"What anyone with the link can do.",display:"cards",options:{options:[{label:"Viewer",value:"reader",description:"Read only",icon:"file"},{label:"Commenter",value:"commenter",description:"Read and comment",icon:"reply"},{label:"Editor",value:"writer",description:"Read and edit",icon:"type"}]},defaultValue:"reader",required:!0})},outputSchema:qk,async run(e){let t=await de(e.auth),n=e.propsValue.fileId,o=e.propsValue.role,r=(0,vU.drive)({version:"v3",auth:t}),i={role:o,type:"anyone"},s=await r.permissions.create({fileId:n,requestBody:i,supportsAllDrives:!0}),u=await r.files.get({fileId:n,fields:"name,mimeType,webContentLink,webViewLink",supportsAllDrives:!0});if(u.data.mimeType==="application/vnd.google-apps.folder")return{...s.data,webViewLink:u.data.webViewLink,downloadUrl:null};let h=await Zt(e.auth,e.files,n,u.data.name);return{...s.data,downloadUrl:h}}});var PU=he(ze());var wU=re({auth:Y,name:"google-drive-move-file",classification:"WRITE",displayName:"Move File",description:"Move a file into another folder.",audience:"human",aiMetadata:{description:"Relocates a Drive file to a target folder, detaching it from its current parents and attaching it to the new one. Use to reorganize a file once you know its ID and the destination folder ID. Idempotent: repeating with the same destination leaves the file in the same folder.",idempotent:!0},props:{fileId:$.ShortText({displayName:"File ID",description:"Use the ID from a trigger or the Find File or Folder action.",required:!0,placeholder:"1dpv4-sKJfKRwI9qx1vWqQhEGEn3EpbI5"}),folderId:Ne.parentFolderDropdown({displayName:"Destination Folder",description:"The folder to move the file into. Type to search by folder name."}),include_team_drives:Ne.properties.include_team_drives},outputSchema:jk,async run(e){let t=e.propsValue.fileId,n=e.propsValue.folderId,o=await de(e.auth),r=(0,PU.drive)({version:"v3",auth:o}),i=await r.files.get({fileId:t,supportsAllDrives:e.propsValue.include_team_drives,fields:"id,parents"});return(await r.files.update({fileId:t,fields:"*",removeParents:i.data.parents?.join(","),addParents:n,supportsAllDrives:e.propsValue.include_team_drives})).data}});var bU=he(ze()),TU=re({auth:Y,name:"delete_gdrive_file",classification:"DESTRUCTIVE",description:"Permanently delete a file, skipping the bin.",audience:"human",aiMetadata:{description:"Permanently deletes a file from Google Drive by its ID, bypassing the trash and making it unrecoverable. Use only when permanent removal is intended; prefer Trash file for reversible deletion. Requires the file ID. Not idempotent: a repeat call fails because the file no longer exists.",idempotent:!1},displayName:"Delete File",props:{fileId:$.ShortText({displayName:"File ID",description:"The ID of the file to delete. This cannot be undone.",required:!0,placeholder:"1dpv4-sKJfKRwI9qx1vWqQhEGEn3EpbI5"}),include_team_drives:Ne.properties.include_team_drives},async run(e){let t=await de(e.auth);return(await(0,bU.drive)({version:"v3",auth:t}).files.delete({fileId:e.propsValue.fileId,supportsAllDrives:e.propsValue.include_team_drives})).data}});var EU=he(ze());var SU=re({auth:Y,name:"trash_gdrive_file",classification:"DESTRUCTIVE",description:"Move a file to the bin, where it can be restored.",audience:"human",aiMetadata:{description:"Moves a Drive file to the trash by its ID, a reversible deletion that can be restored from Drive. Use for safe removal instead of permanent deletion. Requires the file ID. Idempotent: re-trashing an already-trashed file leaves it in the same state.",idempotent:!0},displayName:"Move File to Trash",props:{fileId:$.ShortText({displayName:"File ID",description:"The ID of the file to trash.",required:!0,placeholder:"1dpv4-sKJfKRwI9qx1vWqQhEGEn3EpbI5"}),include_team_drives:Ne.properties.include_team_drives},outputSchema:Gk,async run(e){let t=await de(e.auth),n=(0,EU.drive)({version:"v3",auth:t}),o={trashed:!0};return(await n.files.update({fileId:e.propsValue.fileId,supportsAllDrives:e.propsValue.include_team_drives,requestBody:o})).data}});var xU=require("node:stream"),IU=require("@zip.js/zip.js"),AU=he(en());var DJ=4,OJ=16*1024*1024,$J=8*1024*1024,CJ=20,RU="application/vnd.google-apps.folder",NJ={"application/vnd.google-apps.document":{key:"docs",exportMimeTypes:{pdf:"application/pdf",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"}},"application/vnd.google-apps.spreadsheet":{key:"sheets",exportMimeTypes:{pdf:"application/pdf",xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}},"application/vnd.google-apps.presentation":{key:"slides",exportMimeTypes:{pdf:"application/pdf",pptx:"application/vnd.openxmlformats-officedocument.presentationml.presentation"}}};async function kJ({auth:e,folderId:t,includeTeamDrives:n}){return XT({auth:e,params:{q:`'${t}' in parents and trashed=false`,fields:"nextPageToken,files(id,name,mimeType,size)",supportsAllDrives:"true",includeItemsFromAllDrives:n?"true":"false",corpora:n?"allDrives":"user",pageSize:"1000"}})}a(kJ,"listFolderChildren");function zJ(e,t){let n=t.length>0?t:"/",o=`"${e}"`;if(e.includes("/"))return{name:o,location:n,message:'contains "/"'};if(e.includes("\\"))return{name:o,location:n,message:'contains "\\"'};if(e==="..")return{name:o,location:n,message:"escapes the archive root on extraction"};if(e===".")return{name:o,location:n,message:"collides with other paths once normalized on extraction"}}a(zJ,"checkSafeItemName");function UJ(e,t){if(e.mimeType===RU)return{item:e,name:e.name};let n=NJ[e.mimeType];if(n){let o=t[n.key];if(o==="skip")return;let r=n.exportMimeTypes[o],i=(0,AU.extension)(r);return{item:e,name:i?`${e.name}.${i}`:e.name,downloadUrl:`https://www.googleapis.com/drive/v3/files/${e.id}/export?mimeType=${encodeURIComponent(r)}&supportsAllDrives=true`}}if(!e.mimeType.startsWith("application/vnd.google-apps."))return{item:e,name:e.name,downloadUrl:`https://www.googleapis.com/drive/v3/files/${e.id}?alt=media&supportsAllDrives=true`}}a(UJ,"resolveItem");function MJ(e,t){let n=new Map;for(let{name:i}of e){let s=i.toLowerCase(),u=n.get(s);u?u.push(i):n.set(s,[i])}let o=t.length>0?t:"/",r=[];for(let i of n.values()){if(i.length<=1)continue;let s=[...new Set(i)];r.push({name:s.map(u=>`"${u}"`).join(", "),location:o,message:s.length>1?`${i.length} items would map to the same zip path (names differing only by case collide on Windows and macOS)`:`${i.length} items would map to the same zip path`})}return r}a(MJ,"checkUniqueNames");async function DU({auth:e,folderId:t,relativePrefix:n,nativeFormats:o,includeTeamDrives:r,out:i,errors:s}){let u=await kJ({auth:e,folderId:t,includeTeamDrives:r});if(u.length===0){n.length>0&&i.push({relativePath:n,fileId:t,isEmptyFolder:!0,sizeBytes:0});return}let h=u.map(g=>UJ(g,o)).filter(g=>g!==void 0);for(let{item:g}of h){let y=zJ(g.name,n);y&&s.push(y)}s.push(...MJ(h,n));for(let g of h){let y=n.length>0?`${n}/${g.name}`:g.name;if(g.item.mimeType===RU){await DU({auth:e,folderId:g.item.id,relativePrefix:y,nativeFormats:o,includeTeamDrives:r,out:i,errors:s});continue}let T=Number(g.item.size);i.push({relativePath:y,fileId:g.item.id,isEmptyFolder:!1,downloadUrl:g.downloadUrl,sizeBytes:Number.isFinite(T)?T:$J})}}a(DU,"walk");async function FJ({auth:e,rootFolderId:t,nativeFormats:n,includeTeamDrives:o}){let r=[],i=[];if(await DU({auth:e,folderId:t,relativePrefix:"",nativeFormats:n,includeTeamDrives:o,out:r,errors:i}),i.length>0){let s=[...i].sort((g,y)=>g.location.localeCompare(y.location)||g.name.localeCompare(y.name)),u=s.slice(0,CJ),h=u.map(g=>`- [${g.location}] ${g.name} ${g.message}`);throw s.length>u.length&&h.push(`- ...and ${s.length-u.length} more`),new Error(`Cannot export (${i.length} problem${i.length>1?"s":""}) - Rename the conflicting or unsafe items in Drive and try again.
111
111
  ${h.join(`
112
- `)}`)}return r}a(MJ,"collectZipEntries");function FJ(e){let t=[],n=[],o=0;for(let r of e){let i=o+r.sizeBytes>DJ,s=n.length>=RJ;n.length>0&&(i||s)&&(t.push(n),n=[],o=0),n.push(r),o+=r.sizeBytes}return n.length>0&&t.push(n),t}a(FJ,"batchByBytes");async function LJ({auth:e,entry:t,zipWriter:n,fileAddOptions:o}){if(!t.downloadUrl)throw new Error(`No download URL for entry "${t.relativePath}"`);let r=await bt(e),i=await fetch(t.downloadUrl,{headers:{Authorization:`Bearer ${r}`}});if(!i.ok||!i.body){let s=await i.text().catch(()=>"");throw i.status===403&&s.includes("exportSizeLimitExceeded")?new Error(`Export failed for "${t.relativePath}": exceeds Drive's ~10MB export size limit.`):new Error(`Failed to download "${t.relativePath}" (HTTP ${i.status}): ${s}`)}await n.add(t.relativePath,i.body,o)}a(LJ,"downloadAndAddZipEntry");var OU=re({auth:Y,name:"drive_export_folder_as_zip",classification:"READ",displayName:"Export Folder as Zip",description:"Download a folder and all its subfolders as one zip file.",audience:"human",aiMetadata:{description:"Recursively downloads every file in a Drive folder (including subfolders) and packages them into a single zip whose internal paths mirror the folder hierarchy. Native Google Docs/Sheets/Slides are converted per user-chosen format (PDF/Office format) or skipped. Fails the whole action if any single file cannot be downloaded/exported. Optionally password-protects the zip.",idempotent:!0},props:{folderId:$.Dropdown({displayName:"Folder",description:"Everything inside it, including subfolders, goes into the zip.",required:!0,auth:Y,refreshers:["includeTeamDrives"],refreshOnSearch:!0,options:a(async({auth:e,includeTeamDrives:t},n)=>Ne.fetchFolderDropdownOptions({auth:e,searchValue:n?.searchValue,includeTeamDrives:t}),"options")}),includeTeamDrives:$.Checkbox({displayName:"Include Team Drives",description:"Also include shared drives, not only My Drive.",required:!1,defaultValue:!1}),googleDocsFormat:$.StaticDropdown({displayName:"Google Docs As",description:"Convert Docs to Word or PDF, or leave them out.",required:!0,defaultValue:"docx",options:{options:[{label:"Word (DOCX)",value:"docx"},{label:"PDF",value:"pdf"},{label:"Leave Out",value:"skip"}]}}),googleSheetsFormat:$.StaticDropdown({displayName:"Google Sheets As",description:"Convert Sheets to Excel or PDF, or leave them out.",required:!0,defaultValue:"xlsx",options:{options:[{label:"Excel (XLSX)",value:"xlsx"},{label:"PDF",value:"pdf"},{label:"Leave Out",value:"skip"}]}}),googleSlidesFormat:$.StaticDropdown({displayName:"Google Slides As",description:"Convert Slides to PowerPoint or PDF, or leave them out.",required:!0,defaultValue:"pptx",options:{options:[{label:"PowerPoint (PPTX)",value:"pptx"},{label:"PDF",value:"pdf"},{label:"Leave Out",value:"skip"}]}}),duplicatePathWarning:$.MarkDown({value:'Zip paths copy the Drive names. The export stops before downloading anything if two items in one folder would share a path, for example a Sheet named "Report" exported as PDF next to an existing Report.pdf, or if a name contains / or \\ or is "." or "..". Rename the item in Drive and run again.',variant:"WARNING"}),outputFileName:$.ShortText({displayName:"Zip File Name",description:"Include the .zip extension.",required:!0,defaultValue:"export.zip",placeholder:"export.zip"}),usePassword:$.Checkbox({displayName:"Use Password",description:"Encrypt the zip so a password is needed to open it.",required:!1,defaultValue:!1,advanced:!0}),passwordOptions:$.DynamicProperties({displayName:"Password Options",required:!1,advanced:!0,auth:xa.None(),refreshers:["usePassword"],props:a(async({usePassword:e})=>e?{password:$.ShortText({displayName:"Password",description:"Needed to open the zip.",required:!0}),encryptionMethod:$.StaticDropdown({displayName:"Encryption Method",description:"ZipCrypto opens everywhere; AES-256 is stronger but needs a modern unzip app.",required:!0,defaultValue:"zipcrypto",options:{disabled:!1,options:[{label:"ZipCrypto",value:"zipcrypto"},{label:"AES-256",value:"aes-256"}]}})}:{},"props")})},async run(e){let t={docs:e.propsValue.googleDocsFormat,sheets:e.propsValue.googleSheetsFormat,slides:e.propsValue.googleSlidesFormat},n=await MJ({auth:e.auth,rootFolderId:e.propsValue.folderId,nativeFormats:t,includeTeamDrives:e.propsValue.includeTeamDrives??!1}),o={};if(e.propsValue.usePassword){let y=e.propsValue.passwordOptions?.password,T=e.propsValue.passwordOptions?.encryptionMethod;if(!y)throw new Error('Cannot export: "Use password" is enabled but no password was provided. Enter a password or turn the option off.');o.password=y,T==="aes-256"?o.encryptionStrength=3:o.zipCrypto=!0}let r=new TransformStream,i=new IU.ZipWriter(r.writable),s=xU.Readable.fromWeb(r.readable),u=e.files.write({data:s,fileName:e.propsValue.outputFileName});u.catch(()=>{});let h=[],g=[];for(let y of n)(y.isEmptyFolder?g:h).push(y);try{for(let y of FJ(h))await Promise.all(y.map(T=>LJ({auth:e.auth,entry:T,zipWriter:i,fileAddOptions:o})));for(let y of g)await i.add(`${y.relativePath}/`,void 0,{directory:!0});await i.close()}catch(y){throw s.destroy(y instanceof Error?y:new Error(String(y))),y}return u}});var $U=he(ze());var CU=re({auth:Y,name:"drive_create_folder",classification:"WRITE",displayName:"Create Folder",description:"Create a new empty folder in your Google Drive",audience:"ai",aiMetadata:{description:"Creates a new empty folder in Google Drive, optionally nested under a parent folder (resolve the parent ID via `drive_search_files`). Use to set up a destination before uploading or moving files. Each call creates a distinct folder even with the same name, so retries duplicate.",idempotent:!1},outputSchema:Pz,props:{folder_name:$.ShortText({displayName:"Folder name",description:"The name of the new folder",required:!0}),parent_folder_id:$.ShortText({displayName:"Parent Folder ID",description:"The ID of the folder to create the new folder inside. Leave empty to create it in the root of My Drive. Resolve a folder ID with `drive_search_files`.",required:!1})},async run(e){let t=await de(e.auth);return(await(0,$U.drive)({version:"v3",auth:t}).files.create({requestBody:{mimeType:"application/vnd.google-apps.folder",name:e.propsValue.folder_name,...e.propsValue.parent_folder_id?{parents:[e.propsValue.parent_folder_id]}:{}},supportsAllDrives:!0})).data}});var NU=he(Tu());var kU=re({auth:Y,name:"drive_create_file_from_text",classification:"WRITE",displayName:"Create File from Text",description:"Create a new text file in your Google Drive from text",audience:"ai",aiMetadata:{description:"Creates a new Drive file from inline text content as plain text, CSV, or XML. Use when an agent has generated text it needs to persist as a Drive file; for binary or existing files use `drive_upload_file` instead. Each call creates a new file.",idempotent:!1},outputSchema:Yk,props:{file_name:$.ShortText({displayName:"File name",description:"The name of the new text file",required:!0}),text:$.LongText({displayName:"Text",description:"The text content to add to file",required:!0}),content_type:$.StaticDropdown({displayName:"Content type",description:"Select file type",required:!0,defaultValue:"plain/text",options:{options:[{label:"Text",value:"plain/text"},{label:"CSV",value:"text/csv"},{label:"XML",value:"text/xml"}]}}),parent_folder_id:$.ShortText({displayName:"Parent Folder ID",description:"The ID of the folder to create the file inside. Leave empty to create it in the root of My Drive. Resolve a folder ID with `drive_search_files`.",required:!1})},async run(e){let t={mimeType:e.propsValue.content_type,name:e.propsValue.file_name,...e.propsValue.parent_folder_id?{parents:[e.propsValue.parent_folder_id]}:{}},n=Buffer.from(JSON.stringify(t),"utf-8"),o=Buffer.from(e.propsValue.text,"utf-8"),r=new NU.default;return r.append("Metadata",n,{contentType:"application/json"}),r.append("Media",o,{contentType:e.propsValue.content_type}),(await Yt.sendRequest({method:"POST",url:"https://www.googleapis.com/upload/drive/v3/files?uploadType=multipart",body:r,headers:{...r.getHeaders()},queryParams:{supportsAllDrives:"true"},authentication:{type:"BEARER_TOKEN",token:await bt(e.auth)}})).body}});var zU=he(Tu());var UU=he(en());var MU=re({auth:Y,name:"drive_upload_file",classification:"WRITE",displayName:"Upload File",description:"Upload a file in your Google Drive",audience:"ai",aiMetadata:{description:"Uploads a binary file (from a URL or base64 input) into Drive; MIME type is inferred from the extension. Use to store an existing file or attachment; for plain generated text use `drive_create_file_from_text`, and to fetch a remote URL server-side use `drive_upload_from_url`. Each call creates a new file.",idempotent:!1},outputSchema:Qk,props:{file_name:$.ShortText({displayName:"File name",description:"The name of the file",required:!0}),file:$.File({displayName:"File",description:"The file URL or base64 to upload",required:!0}),parent_folder_id:$.ShortText({displayName:"Parent Folder ID",description:"The ID of the folder to upload the file into. Leave empty to upload to the root of My Drive. Resolve a folder ID with `drive_search_files`.",required:!1})},async run(e){let t=e.propsValue.file,o={mimeType:UU.default.lookup(t.extension?t.extension:""),name:e.propsValue.file_name,...e.propsValue.parent_folder_id?{parents:[e.propsValue.parent_folder_id]}:{}},r=Buffer.from(JSON.stringify(o),"utf-8"),i=Buffer.from(t.base64,"base64"),s=new zU.default;return s.append("Metadata",r,{contentType:"application/json"}),s.append("Media",i),(await Yt.sendRequest({method:"POST",url:"https://www.googleapis.com/upload/drive/v3/files",queryParams:{uploadType:"multipart",supportsAllDrives:"true"},body:s,headers:{...s.getHeaders()},authentication:{type:"BEARER_TOKEN",token:await bt(e.auth)}})).body}});var FU=he(Tu());var LU=he(en());var jU=re({auth:Y,name:"drive_upload_from_url",classification:"WRITE",displayName:"Upload File from URL",description:"Fetch a file from a public URL and upload it into Google Drive.",audience:"ai",aiMetadata:{description:"Fetches a file from a public URL and uploads it into Drive in one step (server-side fetch, no base64 round-trip). Use when the agent has a downloadable link rather than file bytes; for bytes already in hand use `drive_upload_file`, and for plain generated text use `drive_create_file_from_text`. Each call creates a new file.",idempotent:!1},outputSchema:Tz,props:{source_url:$.ShortText({displayName:"Source URL",description:"The publicly accessible URL to fetch the file from. Only public URLs are supported (no authentication headers are sent).",required:!0}),file_name:$.ShortText({displayName:"File name",description:"The name to give the uploaded file in Drive.",required:!0}),mime_type:$.ShortText({displayName:"MIME Type",description:"Optional MIME type for the uploaded file (e.g. application/pdf). Provide this when the URL has no file extension; otherwise the type is inferred from the URL.",required:!1}),parent_folder_id:$.ShortText({displayName:"Parent Folder ID",description:"The ID of the folder to upload the file into. Leave empty to upload to the root of My Drive. Resolve a folder ID with `drive_search_files`.",required:!1})},async run(e){let{source_url:t,file_name:n,mime_type:o,parent_folder_id:r}=e.propsValue,i;try{i=await Yt.sendRequest({method:"GET",url:t,responseType:"arraybuffer"})}catch(b){throw new Error(`Failed to fetch the file from the source URL (${t}). Ensure it is a publicly accessible link. Underlying error: ${b?.message??b}`)}let s=o||LU.default.lookup(t)||"application/octet-stream",u={mimeType:s,name:n,...r?{parents:[r]}:{}},h=Buffer.from(JSON.stringify(u),"utf-8"),g=Buffer.from(i.body),y=new FU.default;return y.append("Metadata",h,{contentType:"application/json"}),y.append("Media",g,{contentType:s}),(await Yt.sendRequest({method:"POST",url:"https://www.googleapis.com/upload/drive/v3/files",queryParams:{uploadType:"multipart",supportsAllDrives:"true"},body:y,headers:{...y.getHeaders()},authentication:{type:"BEARER_TOKEN",token:await bt(e.auth)}})).body}});var qU=he(en());var BU=re({auth:Y,name:"drive_replace_file_content",classification:"WRITE",displayName:"Replace File Content",description:"Replace an existing Drive file's bytes, keeping its ID and name.",audience:"ai",aiMetadata:{description:"Replaces the contents of an existing Drive file with new bytes, keeping the same file ID, name, and location. Use to update a file in place (e.g. overwrite a report); to create a brand-new file use `drive_upload_file`, and to rename without changing content use `drive_update_file_metadata`. Each call overwrites the previous content.",idempotent:!1},outputSchema:uz,props:{file_id:$.ShortText({displayName:"File ID",description:"The ID of the existing file whose content to replace. Resolve it via `drive_search_files` or `drive_get_file`.",required:!0}),file:$.File({displayName:"New File Content",description:"The file URL or base64 whose bytes will replace the existing content.",required:!0}),mime_type:$.ShortText({displayName:"MIME Type",description:"Optional MIME type for the new content (e.g. application/pdf). Provide this when the source has no file extension; otherwise the type is inferred from the extension.",required:!1})},async run(e){let{file_id:t,file:n,mime_type:o}=e.propsValue,r=o||qU.default.lookup(n.extension?n.extension:"")||"application/octet-stream",i=Buffer.from(n.base64,"base64");return(await Yt.sendRequest({method:"PATCH",url:`https://www.googleapis.com/upload/drive/v3/files/${t}`,queryParams:{uploadType:"media",supportsAllDrives:"true"},body:i,headers:{"Content-Type":r},authentication:{type:"BEARER_TOKEN",token:await bt(e.auth)}})).body}});var VU=re({auth:Y,name:"drive_download_file",classification:"READ",displayName:"Download File Content",description:"Read a selected file from google drive file",audience:"ai",aiMetadata:{description:"Downloads a Drive file's bytes by ID and returns a file reference; native Google files (Docs/Sheets/Slides) are auto-exported to their default Office format. Use to retrieve content of a file you have the ID for (obtain it from `drive_search_files` or `drive_get_file`). Read-only.",idempotent:!0},outputSchema:Ez,props:{file_id:$.ShortText({displayName:"File ID",description:"The ID of the file to download. Resolve it via `drive_search_files` or `drive_get_file`.",required:!0}),destination_file_name:$.ShortText({displayName:"Destination File name",required:!1})},run:a(async({auth:e,propsValue:t,files:n})=>Zt(e,n,t.file_id,t.destination_file_name),"run")});var GU=he(ze()),HU=he(en());var ZU=re({auth:Y,name:"drive_export_workspace_file",classification:"READ",displayName:"Export Google Doc/Sheet/Slides",description:"Export a native Google Workspace file (Doc/Sheet/Slides) to a chosen format.",audience:"ai",aiMetadata:{description:"Exports a native Google Workspace file (Doc/Sheet/Slides) to a caller-chosen format and returns the bytes. Use when you need a specific format such as PDF, HTML, CSV, or Markdown; for the default rendition or for ordinary binary files use `drive_download_file`. The chosen format must match the source type (Doc formats for a Doc, Sheet formats for a Sheet, etc.). Read-only. Export size is capped at ~10 MB by Drive.",idempotent:!0},outputSchema:Sz,props:{file_id:$.ShortText({displayName:"File ID",description:"The ID of the native Google Workspace file to export. Resolve it via `drive_search_files` or `drive_get_file`.",required:!0}),mime_type:$.StaticDropdown({displayName:"Export Format",description:"The target format. It must match the source type: Doc formats for a Google Doc, Sheet formats for a Google Sheet, Slides formats for Google Slides. An incompatible pairing returns an error.",required:!0,options:{options:[{label:"Word (DOCX) \u2014 Docs",value:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"},{label:"PDF \u2014 Docs/Sheets/Slides",value:"application/pdf"},{label:"HTML \u2014 Docs",value:"text/html"},{label:"Plain Text (TXT) \u2014 Docs",value:"text/plain"},{label:"Rich Text (RTF) \u2014 Docs",value:"application/rtf"},{label:"OpenDocument Text (ODT) \u2014 Docs",value:"application/vnd.oasis.opendocument.text"},{label:"EPUB \u2014 Docs",value:"application/epub+zip"},{label:"Markdown (MD) \u2014 Docs",value:"text/markdown"},{label:"Excel (XLSX) \u2014 Sheets",value:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"},{label:"CSV \u2014 Sheets",value:"text/csv"},{label:"TSV \u2014 Sheets",value:"text/tab-separated-values"},{label:"OpenDocument Spreadsheet (ODS) \u2014 Sheets",value:"application/vnd.oasis.opendocument.spreadsheet"},{label:"PowerPoint (PPTX) \u2014 Slides",value:"application/vnd.openxmlformats-officedocument.presentationml.presentation"},{label:"OpenDocument Presentation (ODP) \u2014 Slides",value:"application/vnd.oasis.opendocument.presentation"},{label:"PNG \u2014 Slides",value:"image/png"},{label:"SVG \u2014 Slides",value:"image/svg+xml"}]}})},async run(e){let{file_id:t,mime_type:n}=e.propsValue,o=await de(e.auth),r=(0,GU.drive)({version:"v3",auth:o});try{let i=await r.files.export({fileId:t,mimeType:n},{responseType:"arraybuffer"}),s=(0,HU.extension)(n),u=s?"."+s:"";return e.files.write({fileName:t+u,data:Buffer.from(i.data)})}catch(i){throw(i?.errors?.[0]?.reason??i?.response?.data?.error?.errors?.[0]?.reason)==="exportSizeLimitExceeded"?new Error(`Export failed: the file exceeds Drive's ~10 MB export size limit (file ID: ${t}). Use drive_download_file to fetch the source directly instead.`):i.code===403?new Error(`Permission denied exporting file ${t}. You may lack access to this file.`):i.code===400?new Error(`Invalid export for file ${t}: the chosen format does not match the source type, or this is not a native Google Workspace file. Use drive_download_file for ordinary binary files.`):i.code===404?new Error(`File not found (ID: ${t}). Resolve a valid ID via drive_search_files or drive_get_file.`):i}}});var WU=he(ze());var KU=re({auth:Y,name:"drive_get_file",classification:"READ",displayName:"Get File or Folder",description:"Get a file folder for files/sub-folders",audience:"ai",aiMetadata:{description:"Fetches metadata for a single file or folder by its exact ID (name, MIME type, parents, owners, links). Use when you already have an ID (e.g. from a trigger or `drive_search_files`) and need its details, including its parent folder IDs. Read-only and safe to retry.",idempotent:!0},outputSchema:Kk,props:{file_id:$.ShortText({displayName:"File / Folder ID",description:"The ID of the file/folder to fetch. Resolve it via `drive_search_files` or `drive_list_files`.",required:!0})},async run(e){let t=await de(e.auth),o=await(0,WU.drive)({version:"v3",auth:t}).files.get({fileId:e.propsValue.file_id,supportsAllDrives:!0});return o.data?o.data:null}});var Ph=he(en());var JU=re({auth:Y,name:"drive_list_files",classification:"SEARCH",displayName:"List Folder Contents",description:"List files from a Google Drive folder",audience:"ai",aiMetadata:{description:"Lists files and subfolders inside a given folder ID, optionally recursing to a chosen depth and downloading each file's content. Use to enumerate the contents of a known folder; to find a file by name across Drive use `drive_search_files`. Read-only. Requires the folder ID, not a name.",idempotent:!0},outputSchema:Jk,props:{folder_id:$.ShortText({displayName:"Folder ID",description:"The ID of the folder to list. Resolve it via `drive_search_files` (or any other source).",required:!0}),include_trashed:$.Checkbox({displayName:"Include Trashed",description:"Include new files that have been trashed.",required:!1,defaultValue:!1}),depth_level:$.Number({displayName:"Depth Level",description:"How many levels deep to search for files. 1 = current folder only, 2 = current + next level, etc.",required:!1,defaultValue:1}),download_files:$.Checkbox({displayName:"Download Files",description:"Download all file contents in a list",required:!1,defaultValue:!1}),include_team_drives:$.Checkbox({displayName:"Include Team Drives",description:"Determines if folders from Team Drives should be included in the results.",defaultValue:!1,required:!1})},async run(e){let t={type:"drive#fileList",incompleteSearch:!1,files:[]},n=e.propsValue.depth_level||1,o=await hh({auth:e.auth,rootFolderId:e.propsValue.folder_id,maxLevel:n,includeTrashed:e.propsValue.include_trashed??!1,includeTeamDrives:e.propsValue.include_team_drives??!1});if(e.propsValue.download_files){let r=[];for(let i of o){if(i.mimeType==="application/vnd.google-apps.folder"){r.push(i);continue}let s=i.name,u=(0,Ph.extension)(i.mimeType),g=(Ph.extensions[i.mimeType]??(u?[u]:[])).some(y=>s.toLowerCase().endsWith(`.${y}`));u&&!g&&(s=`${s}.${u}`);try{let y=await Zt(e.auth,e.files,i.id,s);r.push({...i,downloadedFile:y})}catch(y){console.warn(`Failed to download file ${i.name}: ${y instanceof Error?y.message:"Download failed"}`),r.push(i)}}t.files=r,t.downloadedFiles=r.map(i=>i.downloadedFile).filter(i=>i!==void 0)}else t.files=o;return t}});var XU=he(ze());var YU=re({auth:Y,name:"drive_search_files",classification:"SEARCH",displayName:"Search Files and Folders",description:"Search a Google Drive folder for files/sub-folders",audience:"ai",aiMetadata:{description:"Searches Drive for files or folders matching a name, full-text, or MIME-type query, optionally scoped to a parent folder. Use this to resolve a human-readable name into a file/folder ID before acting on it; to list a known folder's children use `drive_list_files` instead. Read-only.",idempotent:!0},outputSchema:Xk,props:{query_term:$.StaticDropdown({displayName:"Query Term",description:"The Query term or field of file/folder to search upon.",defaultValue:"name",options:{options:[{label:"File name",value:"name"},{label:"Full text search",value:"fullText"},{label:"Content type",value:"mimeType"}]},required:!0}),operator:$.StaticDropdown({displayName:"Operator",description:"The operator to create criteria.",required:!0,options:{options:[{label:"Contains",value:"contains"},{label:"Equals",value:"="}]},defaultValue:"contains"}),value:$.ShortText({displayName:"Value",description:"Value of the field of file/folder to search for.",required:!0}),type:$.StaticDropdown({displayName:"File Type",description:"(Optional) Choose between files and folders.",required:!1,options:{options:[{label:"All",value:"all"},{label:"Files",value:"file"},{label:"Folders",value:"folder"}]},defaultValue:"all"}),parent_folder_id:$.ShortText({displayName:"Parent Folder ID",description:"(Optional) Restrict the search to files/folders inside this folder ID.",required:!1}),include_team_drives:$.Checkbox({displayName:"Include Team Drives",description:"Determines if folders from Team Drives should be included in the results.",defaultValue:!1,required:!1})},async run(e){let t=await de(e.auth),n=(0,XU.drive)({version:"v3",auth:t}),o=e.propsValue.operator??"contains",i=`${e.propsValue.query_term??"name"} ${o} '${e.propsValue.value}'`;switch(e.propsValue.parent_folder_id&&(i=`${i} and '${e.propsValue.parent_folder_id}' in parents`),e.propsValue.type??"all"){case"file":i=`${i} and mimeType!='application/vnd.google-apps.folder'`;break;case"folder":i=`${i} and mimeType='application/vnd.google-apps.folder'`;break;default:break}let u=[],h;do{let g={q:i,fields:"nextPageToken, files(id, name, mimeType, createdTime, modifiedTime)",includeItemsFromAllDrives:e.propsValue.include_team_drives,supportsAllDrives:!0,corpora:e.propsValue.include_team_drives?"allDrives":"user",pageSize:1e3};h&&(g.pageToken=h);let y=await n.files.list(g);if(y.status!==200)throw console.error(y),new Error("Error searching for the file/folder");u.push(...y.data.files??[]),h=y.data.nextPageToken??void 0}while(h);return u.length>0?u:[]}});var QU=he(ze());var eM=re({auth:Y,name:"drive_copy_file",classification:"WRITE",displayName:"Copy File",description:"Duplicate a file from Google Drive. Returns the new file ID.",audience:"ai",aiMetadata:{description:"Copies an existing Drive file into a target folder under a new name, optionally converting it to a Google Sheet or Doc. Use to clone a file or make an editable Google-format copy; to relocate the original instead of copying use `drive_move_file`. Requires source file ID and destination folder ID. Each call creates a new copy.",idempotent:!1},outputSchema:ez,props:{file_id:$.ShortText({displayName:"File ID",description:"The ID of the file to duplicate. Resolve it via `drive_search_files`.",required:!0}),name:$.ShortText({displayName:"Name",description:"The name of the new file",required:!0}),folder_id:$.ShortText({displayName:"Folder ID",description:"The ID of the folder where the file will be duplicated. Resolve it via `drive_search_files`.",required:!0}),convert_to:$.StaticDropdown({displayName:"Duplicate as",description:"If left unselected the file will be duplicated as it is",required:!1,options:{options:[{label:"Google Sheets",value:"application/vnd.google-apps.spreadsheet"},{label:"Google Docs",value:"application/vnd.google-apps.document"}]}})},async run(e){let t=await de(e.auth),n=e.propsValue.file_id,o=e.propsValue.name,r=e.propsValue.folder_id,i=e.propsValue.convert_to,s=(0,QU.drive)({version:"v3",auth:t}),u={name:o,parents:[r]};i&&(u.mimeType=i);let h=await s.files.copy({fileId:n,auth:t,requestBody:u,supportsAllDrives:!0});if(h.status!==200)throw new Error("Error duplicating file");return h.data}});var tM=he(ze());var rM=re({auth:Y,name:"drive_move_file",classification:"WRITE",displayName:"Move File",description:"Move a Drive file from its current folder(s) to a target folder.",audience:"ai",aiMetadata:{description:"Relocates a file to a target folder, detaching it from its current parents and attaching the new one. Use to reorganize a file by ID; to copy instead of move use drive_copy_file, and to rename without moving use drive_update_file_metadata. Safe to retry \u2014 repeating leaves the file in the same destination.",idempotent:!0},outputSchema:tz,props:{file_id:$.ShortText({displayName:"File ID",description:"The ID of the file to move. Resolve it via drive_search_files or drive_get_file.",required:!0}),folder_id:$.ShortText({displayName:"Destination Folder ID",description:"The ID of the folder to move the file into. Resolve it via drive_search_files; leave empty for the root of My Drive.",required:!0})},async run(e){let t=e.propsValue.file_id,n=e.propsValue.folder_id,o=await de(e.auth),r=(0,tM.drive)({version:"v3",auth:o}),i=await r.files.get({fileId:t,supportsAllDrives:!0,fields:"id,parents"});return(await r.files.update({fileId:t,fields:"*",removeParents:i.data.parents?.join(","),addParents:n,supportsAllDrives:!0})).data}});var nM=he(ze());var oM=re({auth:Y,name:"drive_update_file_metadata",classification:"WRITE",displayName:"Update File Metadata (Rename)",description:"Rename a Drive file/folder or update its description or starred flag (metadata only).",audience:"ai",aiMetadata:{description:"Renames a file/folder or updates its description or starred flag via a metadata-only PATCH. Use to rename or annotate a resource; this never changes the file's location \u2014 to re-parent use `drive_move_file`, and to replace the file's bytes use `drive_replace_file_content`. Safe to retry \u2014 re-applying the same values is a no-op.",idempotent:!0},outputSchema:rz,props:{file_id:$.ShortText({displayName:"File or Folder ID",description:"The ID of the file or folder to update. Resolve it via `drive_search_files` or `drive_get_file`.",required:!0}),name:$.ShortText({displayName:"New Name",description:"A new name for the file or folder. Leave empty to keep the current name.",required:!1}),description:$.ShortText({displayName:"Description",description:"A new description for the file or folder. Leave empty to keep the current description.",required:!1}),starred:$.Checkbox({displayName:"Starred",description:"Whether to mark the file or folder as starred.",required:!1})},async run(e){let{file_id:t,name:n,description:o,starred:r}=e.propsValue,i={};n!=null&&n!==""&&(i.name=n),o!=null&&(i.description=o),r!=null&&(i.starred=r);let s=await de(e.auth),u=(0,nM.drive)({version:"v3",auth:s});try{return(await u.files.update({fileId:t,supportsAllDrives:!0,requestBody:i})).data}catch(h){throw h.code===404?new Error(`File or folder not found (ID: ${t}). Resolve a valid ID via drive_search_files or drive_get_file.`):h.code===403?new Error(`Permission denied updating file ${t}. You may lack edit permission on this resource.`):h}}});var iM=he(ze()),aM=require("stream");var sM=re({auth:Y,name:"drive_save_file_as_pdf",classification:"WRITE",displayName:"Save File as PDF",description:"Save a document as PDF in a Google Drive folder",audience:"ai",aiMetadata:{description:"Exports a native Google document to PDF and saves it as a new file in a target Drive folder. Use to produce a PDF rendition of a Google Doc/Sheet/Slides for sharing or archival (resolve the source and folder IDs via `drive_search_files`). Each call creates a new PDF file.",idempotent:!1},outputSchema:_z,props:{document_id:$.ShortText({displayName:"Document ID",description:"The ID of the document to export. Resolve it via `drive_search_files`.",required:!0}),folder_id:$.ShortText({displayName:"Folder ID",description:"The ID of the folder where the file will be exported. Resolve it via `drive_search_files`.",required:!0}),name:$.ShortText({displayName:"Name",description:"The name of the new file (do not include the extension)",required:!0})},async run(e){let t=await de(e.auth),n=e.propsValue.document_id,o=e.propsValue.folder_id,r=e.propsValue.name,i=(0,iM.drive)({version:"v3",auth:t}),s=await i.files.export({fileId:n,mimeType:"application/pdf"},{responseType:"arraybuffer"}),u={name:r+".pdf",parents:[o]},h=Buffer.from(s.data,"base64"),y={mimeType:"application/pdf",body:new aM.Stream.PassThrough().end(h)};return(await i.files.create({requestBody:u,media:y,supportsAllDrives:!0})).data}});var cM=he(ze());var uM=re({auth:Y,name:"drive_trash_file",classification:"DESTRUCTIVE",displayName:"Trash File",description:"Move a Drive file to the trash by ID (reversible deletion).",audience:"ai",aiMetadata:{description:"Moves a file to the trash by ID \u2014 a reversible deletion restorable from Drive. Use for safe removal; for irreversible removal use drive_delete_file, and to restore use drive_untrash_file. Safe to retry \u2014 re-trashing leaves it trashed.",idempotent:!0},outputSchema:sz,props:{file_id:$.ShortText({displayName:"File ID",description:"The ID of the file to trash. Resolve it via drive_search_files or drive_get_file.",required:!0})},async run(e){let t=await de(e.auth),n=(0,cM.drive)({version:"v3",auth:t}),o={trashed:!0};return(await n.files.update({fileId:e.propsValue.file_id,supportsAllDrives:!0,requestBody:o})).data}});var lM=he(ze());var dM=re({auth:Y,name:"drive_untrash_file",classification:"WRITE",displayName:"Restore File from Trash",description:"Restore a trashed Drive file by ID back to its original location.",audience:"ai",aiMetadata:{description:"Restores a trashed file by ID back to its original location. Use to undo a `drive_trash_file`; to permanently purge instead use `drive_empty_trash` or `drive_delete_file`. Safe to retry \u2014 re-restoring an active file is a no-op.",idempotent:!0},outputSchema:cz,props:{file_id:$.ShortText({displayName:"File ID",description:"The ID of the trashed file to restore. Resolve it via drive_search_files or drive_get_file.",required:!0})},async run(e){let{file_id:t}=e.propsValue,n=await de(e.auth),o=(0,lM.drive)({version:"v3",auth:n});try{return(await o.files.update({fileId:t,supportsAllDrives:!0,requestBody:{trashed:!1}})).data}catch(r){throw r.code===404?new Error(`File not found (ID: ${t}). Resolve a valid ID via drive_search_files or drive_get_file.`):r.code===403?new Error(`Permission denied restoring file ${t}. You may lack permission to restore this resource.`):r}}});var pM=he(ze()),fM=re({auth:Y,name:"drive_delete_file",classification:"DESTRUCTIVE",displayName:"Delete File Permanently",description:"Permanently delete a Drive file by ID, bypassing the trash.",audience:"ai",aiMetadata:{description:"Permanently deletes a file by ID, bypassing the trash \u2014 unrecoverable. Use only when permanent removal is intended; for reversible deletion prefer drive_trash_file. A repeat call fails because the file no longer exists.",idempotent:!1},props:{file_id:$.ShortText({displayName:"File ID",description:"The ID of the file to permanently delete. Resolve it via drive_search_files or drive_get_file.",required:!0})},async run(e){let t=await de(e.auth);return(await(0,pM.drive)({version:"v3",auth:t}).files.delete({fileId:e.propsValue.file_id,supportsAllDrives:!0})).data}});var mM=he(ze());var hM=re({auth:Y,name:"drive_empty_trash",classification:"DESTRUCTIVE",displayName:"Empty Trash",description:"Permanently delete ALL files in the trash (irreversible, account-wide).",audience:"ai",aiMetadata:{description:"DESTRUCTIVE: permanently deletes EVERY file currently in the trash \u2014 this is an irreversible, account-wide purge (not a single file), or scoped to one shared drive if `drive_id` is given. The entire trash is emptied, so any file the user trashed is gone for good. Use only as a deliberate cleanup step; to remove a single file reversibly use `drive_trash_file`, and to permanently remove one specific file use `drive_delete_file`. Not safe to retry casually \u2014 it purges whatever is in the trash at call time.",idempotent:!1},outputSchema:Az,props:{drive_id:$.ShortText({displayName:"Shared Drive ID",description:"Optional. Restrict the purge to a single shared drive's trash (resolve via drive_list_shared_drives). Leave empty to empty the entire My Drive trash for the connected account.",required:!1})},async run(e){let{drive_id:t}=e.propsValue,n=await de(e.auth),o=(0,mM.drive)({version:"v3",auth:n});try{return await o.files.emptyTrash({...t?{driveId:t}:{}}),{success:!0,driveId:t??null}}catch(r){throw r.code===403?new Error("Permission denied emptying the trash. You may lack permission to empty this trash."):r}}});var gM=he(ze());var yM=re({auth:Y,name:"drive_share_file",classification:"WRITE",displayName:"Share File with User",description:"Grant a role on a Drive file or folder to a user by email.",audience:"ai",aiMetadata:{description:"Grants a role to a user (by email) on a file or folder, optionally emailing them. Use to share with a specific person; to share with anyone-with-the-link use drive_set_public_access, and to change an existing collaborator's role use drive_update_permission. Each call creates a new permission grant.",idempotent:!1},outputSchema:nz,props:{file_id:$.ShortText({displayName:"File or Folder ID",description:"The ID of the file or folder to share. Resolve it via drive_search_files or drive_get_file.",required:!0}),user_email:$.ShortText({displayName:"User Email",description:"The email address of the user to grant access to.",required:!0}),role:$.StaticDropdown({displayName:"Role",description:"The role to grant to the user. See https://developers.google.com/drive/api/guides/ref-roles",required:!0,options:{options:[{label:"Organizer",value:"organizer"},{label:"File Organizer",value:"fileOrganizer"},{label:"Writer",value:"writer"},{label:"Commenter",value:"commenter"},{label:"Reader",value:"reader"}]}}),send_invitation_email:$.Checkbox({displayName:"Send Invitation Email",description:"Send an email to the user to notify them of the new permission.",required:!0})},async run(e){let{file_id:t,user_email:n,role:o,send_invitation_email:r}=e.propsValue,i=await de(e.auth),s=(0,gM.drive)({version:"v3",auth:i}),u={type:"user",role:o,emailAddress:n};return(await s.permissions.create({requestBody:u,fileId:t,sendNotificationEmail:r,supportsAllDrives:!0})).data}});var vM=he(ze());var _M=re({auth:Y,name:"drive_set_public_access",classification:"WRITE",displayName:"Set Public Access",description:"Make a Drive file or folder accessible to anyone with the link.",audience:"ai",aiMetadata:{description:"Makes a file or folder accessible to anyone with the link at the chosen role and returns its shareable view/download URL. Use to publish a resource publicly; to share with a named person instead use drive_share_file. Each call adds a new anyone-with-link permission.",idempotent:!1},outputSchema:iz,props:{file_id:$.ShortText({displayName:"File or Folder ID",description:"The ID of the file or folder to make public. Resolve it via drive_search_files or drive_get_file.",required:!0}),role:$.StaticDropdown({displayName:"Role",description:"The role to assign for public access.",options:{options:[{label:"Reader",value:"reader"},{label:"Commenter",value:"commenter"},{label:"Editor",value:"writer"}]},defaultValue:"reader",required:!0})},async run(e){let t=await de(e.auth),n=e.propsValue.file_id,o=e.propsValue.role,r=(0,vM.drive)({version:"v3",auth:t}),i={role:o,type:"anyone"},s=await r.permissions.create({fileId:n,requestBody:i,supportsAllDrives:!0}),u=await r.files.get({fileId:n,fields:"name,mimeType,webContentLink,webViewLink",supportsAllDrives:!0});if(u.data.mimeType==="application/vnd.google-apps.folder")return{...s.data,webViewLink:u.data.webViewLink,downloadUrl:null};let h=await Zt(e.auth,e.files,n,u.data.name);return{...s.data,downloadUrl:h}}});var PM=he(ze());var wM=re({auth:Y,name:"drive_list_permissions",classification:"SEARCH",displayName:"List Permissions",description:"List every permission on a Drive file or folder.",audience:"ai",aiMetadata:{description:"Lists every permission (who has access and at what role) on a file or folder, with each permission's id, type, role, and email/domain. Use to audit sharing before granting or revoking; it is the resolver for the permissionId other sharing atomics need. Read-only.",idempotent:!0},outputSchema:oz,props:{file_id:$.ShortText({displayName:"File or Folder ID",description:"The ID of the file or folder whose permissions to list. Resolve it via drive_search_files or drive_get_file.",required:!0})},async run(e){let{file_id:t}=e.propsValue,n=await de(e.auth),o=(0,PM.drive)({version:"v3",auth:n});try{let i=(await o.permissions.list({fileId:t,fields:"permissions(id,type,role,emailAddress,domain)",supportsAllDrives:!0})).data.permissions??[];return{permissions:i,count:i.length}}catch(r){throw r.code===404?new Error(`File or folder not found (ID: ${t}). Resolve a valid ID via drive_search_files or drive_get_file.`):r.code===403?new Error(`Permission denied listing permissions for file ${t}. You may lack access to this resource.`):r}}});var bM=he(ze());var TM=re({auth:Y,name:"drive_update_permission",classification:"WRITE",displayName:"Update Permission Role",description:"Change an existing collaborator's role on a Drive file or folder.",audience:"ai",aiMetadata:{description:"Changes an existing collaborator's role in place (e.g. reader to writer), resolving the permission by their email internally. Use to upgrade or downgrade access without unsharing; to grant net-new access use drive_share_file. If the user has no existing grant it is a no-op (it never silently creates one). Safe to retry.",idempotent:!0},outputSchema:az,props:{file_id:$.ShortText({displayName:"File or Folder ID",description:"The ID of the file or folder whose permission to update. Resolve it via drive_search_files or drive_get_file.",required:!0}),user_email:$.ShortText({displayName:"User Email",description:"The email address of the collaborator whose role to change. The existing permission is matched by this email; list current grants via drive_list_permissions.",required:!0}),new_role:$.StaticDropdown({displayName:"New Role",description:"The role to set for the user. See https://developers.google.com/drive/api/guides/ref-roles",required:!0,options:{options:[{label:"Organizer",value:"organizer"},{label:"File Organizer",value:"fileOrganizer"},{label:"Writer",value:"writer"},{label:"Commenter",value:"commenter"},{label:"Reader",value:"reader"}]}})},async run(e){let{file_id:t,user_email:n,new_role:o}=e.propsValue,r=await de(e.auth),i=(0,bM.drive)({version:"v3",auth:r});try{let h=((await i.permissions.list({fileId:t,fields:"permissions(id,emailAddress,role)",supportsAllDrives:!0})).data.permissions??[]).find(y=>y.emailAddress===n);return!h||!h.id?{updated:!1,message:`No existing permission found for ${n}. Use drive_share_file to grant new access.`}:{updated:!0,permission:(await i.permissions.update({fileId:t,permissionId:h.id,requestBody:{role:o},supportsAllDrives:!0})).data}}catch(s){throw s.code===404?new Error(`File or folder not found (ID: ${t}). Resolve a valid ID via drive_search_files or drive_get_file.`):s.code===403?new Error(`Permission denied updating the role on file ${t}. You may lack permission to manage sharing on this resource.`):s}}});var EM=he(ze());var SM=re({auth:Y,name:"drive_remove_permission",classification:"DESTRUCTIVE",displayName:"Remove Permission",description:"Revoke a role from a user on a Drive file or folder.",audience:"ai",aiMetadata:{description:"Revokes a specific role from a user (matched by email and role) on a file or folder, resolving the permission ID internally. Use to unshare or remove access; to lower a role instead of removing it use drive_update_permission. Safe to retry \u2014 if no matching permission exists it is a no-op.",idempotent:!0},outputSchema:Rz,props:{file_id:$.ShortText({displayName:"File or Folder ID",description:"The ID of the file or folder to remove the permission from. Resolve it via drive_search_files or drive_get_file.",required:!0}),user_email:$.ShortText({displayName:"User Email",description:"The email address of the user whose access to revoke.",required:!0}),role:$.StaticDropdown({displayName:"Role",description:"The role to remove from the user. The grant is matched by email and role.",required:!0,options:{options:[{label:"Organizer",value:"organizer"},{label:"File Organizer",value:"fileOrganizer"},{label:"Writer",value:"writer"},{label:"Commenter",value:"commenter"},{label:"Reader",value:"reader"}]}})},async run(e){let[t,n]=[e.propsValue.file_id,e.propsValue.user_email],o=await de(e.auth),r=(0,EM.drive)({version:"v3",auth:o}),i=await r.permissions.list({fileId:t,fields:"permissions(id, emailAddress, role)",supportsAllDrives:!0});if(i.data.permissions){for(let s of i.data.permissions)if(s.emailAddress===n&&s.role===e.propsValue.role)return await r.permissions.delete({fileId:t,permissionId:s.id?s.id:"",supportsAllDrives:!0}),{removed:!0,message:"Permission removed"}}return{removed:!1,message:"Permission not found"}}});var xM=he(ze());var IM=re({auth:Y,name:"drive_list_shared_drives",classification:"SEARCH",displayName:"List Shared Drives",description:"List the shared drives the account can access.",audience:"ai",aiMetadata:{description:"Lists the shared drives the account can access, with each drive's id and name. Use to discover a driveId before creating or listing content in a shared drive or before drive_get_shared_drive, drive_update_shared_drive, or drive_delete_shared_drive. Read-only.",idempotent:!0},outputSchema:dz,props:{query:$.ShortText({displayName:"Query",description:"Optional search query to filter shared drives, e.g. name contains 'marketing'. See https://developers.google.com/drive/api/guides/search-shareddrives",required:!1}),page_size:$.Number({displayName:"Page Size",description:"Maximum number of shared drives to return (1-100). Defaults to 100.",required:!1})},async run(e){let{query:t,page_size:n}=e.propsValue,o=await de(e.auth),r=(0,xM.drive)({version:"v3",auth:o});try{let s=(await r.drives.list({q:t||void 0,pageSize:n||void 0})).data.drives??[];return{drives:s,count:s.length}}catch(i){throw i.code===403?new Error("Permission denied listing shared drives. Your account may not have shared-drive access."):i}}});var AM=he(ze());var RM=re({auth:Y,name:"drive_get_shared_drive",classification:"READ",displayName:"Get Shared Drive",description:"Fetch metadata for one shared drive by ID.",audience:"ai",aiMetadata:{description:"Fetches metadata and capabilities for one shared drive by ID (resolve the ID via drive_list_shared_drives). Use to inspect a shared drive's settings before modifying it. Read-only.",idempotent:!0},outputSchema:pz,props:{drive_id:$.ShortText({displayName:"Shared Drive ID",description:"The ID of the shared drive. Resolve it via drive_list_shared_drives.",required:!0})},async run(e){let{drive_id:t}=e.propsValue,n=await de(e.auth),o=(0,AM.drive)({version:"v3",auth:n});try{return(await o.drives.get({driveId:t})).data}catch(r){throw r.code===404?new Error(`Shared drive not found (ID: ${t}). Resolve a valid ID via drive_list_shared_drives.`):r.code===403?new Error(`Permission denied accessing shared drive ${t}. You may not be a member of this drive.`):r}}});var DM=require("crypto");var OM=he(ze());var $M=re({auth:Y,name:"drive_create_shared_drive",classification:"WRITE",displayName:"Create Shared Drive",description:"Create a new shared drive (Team Drive).",audience:"ai",aiMetadata:{description:"Creates a new shared drive (Team Drive) with the given name; the action supplies the required idempotency requestId internally. Use to set up a shared workspace. Each call creates a distinct shared drive. Your Workspace admin must have shared-drive creation enabled (a 403 here is an admin-policy issue, not a scope issue).",idempotent:!1},outputSchema:wz,props:{name:$.ShortText({displayName:"Name",description:"The name of the new shared drive.",required:!0})},async run(e){let{name:t}=e.propsValue,n=await de(e.auth),o=(0,OM.drive)({version:"v3",auth:n}),r=(0,DM.randomUUID)();try{return(await o.drives.create({requestId:r,requestBody:{name:t}})).data}catch(i){throw i.code===403?new Error("Permission denied creating a shared drive. Your Google Workspace admin may have disabled shared-drive creation for your account."):i}}});var CM=he(ze());var NM=re({auth:Y,name:"drive_update_shared_drive",classification:"WRITE",displayName:"Update Shared Drive",description:"Rename or update a shared drive by ID.",audience:"ai",aiMetadata:{description:"Renames or updates a shared drive's settings by ID (resolve via drive_list_shared_drives). Use to rename a shared drive; to remove it entirely use drive_delete_shared_drive. Safe to retry \u2014 re-applying the same values is a no-op.",idempotent:!0},outputSchema:bz,props:{drive_id:$.ShortText({displayName:"Shared Drive ID",description:"The ID of the shared drive to update. Resolve it via drive_list_shared_drives.",required:!0}),name:$.ShortText({displayName:"Name",description:"The new name for the shared drive. Leave empty to keep the current name.",required:!1})},async run(e){let{drive_id:t,name:n}=e.propsValue,o=await de(e.auth),r=(0,CM.drive)({version:"v3",auth:o}),i={};n&&(i.name=n);try{return(await r.drives.update({driveId:t,requestBody:i})).data}catch(s){throw s.code===404?new Error(`Shared drive not found (ID: ${t}). Resolve a valid ID via drive_list_shared_drives.`):s.code===403?new Error(`Permission denied updating shared drive ${t}. You must be an organizer of this drive.`):s}}});var kM=he(ze());var zM=re({auth:Y,name:"drive_delete_shared_drive",classification:"DESTRUCTIVE",displayName:"Delete Shared Drive",description:"Permanently delete a shared drive by ID.",audience:"ai",aiMetadata:{description:"Permanently deletes a shared drive by ID (it must already be empty). Irreversible. Use only to remove a no-longer-needed shared drive. A repeat call fails because the drive no longer exists.",idempotent:!1},outputSchema:Iz,props:{drive_id:$.ShortText({displayName:"Shared Drive ID",description:"The ID of the shared drive to delete. Resolve it via drive_list_shared_drives.",required:!0})},async run(e){let{drive_id:t}=e.propsValue,n=await de(e.auth),o=(0,kM.drive)({version:"v3",auth:n});try{return await o.drives.delete({driveId:t}),{deleted:!0,driveId:t}}catch(r){throw r.code===404?new Error(`Shared drive not found (ID: ${t}). It may have already been deleted. Resolve a valid ID via drive_list_shared_drives.`):r.code===400?new Error(`Cannot delete shared drive ${t}: it must be empty before deletion. Remove or trash all of its files first.`):r.code===403?new Error(`Permission denied deleting shared drive ${t}. You must be an organizer of this drive.`):r}}});var UM=he(ze());var MM=re({auth:Y,name:"drive_create_comment",classification:"WRITE",displayName:"Create Comment",description:"Add a new comment to a Drive file.",audience:"ai",aiMetadata:{description:"Adds a new top-level comment to a file. Use to leave feedback or a note on a file (resolve the file ID via drive_search_files); to respond to an existing comment use drive_create_reply instead. Each call creates a new comment, so retries duplicate.",idempotent:!1},outputSchema:hz,props:{file_id:$.ShortText({displayName:"File ID",description:"The ID of the file to comment on. Resolve it via drive_search_files or drive_get_file.",required:!0}),content:$.LongText({displayName:"Content",description:"The plain-text content of the comment.",required:!0})},async run(e){let{file_id:t,content:n}=e.propsValue,o=await de(e.auth),r=(0,UM.drive)({version:"v3",auth:o});try{return(await r.comments.create({fileId:t,fields:"*",requestBody:{content:n}})).data}catch(i){throw i.code===404?new Error(`File not found (ID: ${t}). Resolve a valid ID via drive_search_files or drive_get_file.`):i.code===403?new Error(`Permission denied commenting on file ${t}. You may lack comment access to this file.`):i}}});var FM=he(ze());var LM=re({auth:Y,name:"drive_list_comments",classification:"SEARCH",displayName:"List Comments",description:"List the comments on a Drive file.",audience:"ai",aiMetadata:{description:"Lists the comments on a file with each comment's id, author, content, and resolved state. Use to read discussion on a file or to resolve a commentId before replying (drive_create_reply) or listing its replies (drive_list_replies). Read-only.",idempotent:!0},outputSchema:fz,props:{file_id:$.ShortText({displayName:"File ID",description:"The ID of the file whose comments to list. Resolve it via drive_search_files or drive_get_file.",required:!0})},async run(e){let{file_id:t}=e.propsValue,n=await de(e.auth),o=(0,FM.drive)({version:"v3",auth:n});try{let i=(await o.comments.list({fileId:t,fields:"*",includeDeleted:!1})).data.comments??[];return{comments:i,count:i.length}}catch(r){throw r.code===404?new Error(`File not found (ID: ${t}). Resolve a valid ID via drive_search_files or drive_get_file.`):r.code===403?new Error(`Permission denied listing comments for file ${t}. You may lack access to this file.`):r}}});var jM=he(ze());var qM=re({auth:Y,name:"drive_create_reply",classification:"WRITE",displayName:"Reply to Comment",description:"Add a reply to an existing comment on a Drive file.",audience:"ai",aiMetadata:{description:"Adds a reply to an existing comment, optionally resolving or reopening the comment via the action field. Use to respond to a comment (resolve the commentId via drive_list_comments); to start a new top-level comment use drive_create_comment instead. Each call creates a new reply, so retries duplicate.",idempotent:!1},outputSchema:mz,props:{file_id:$.ShortText({displayName:"File ID",description:"The ID of the file the comment belongs to. Resolve it via drive_search_files or drive_get_file.",required:!0}),comment_id:$.ShortText({displayName:"Comment ID",description:"The ID of the comment to reply to. Resolve it via drive_list_comments.",required:!0}),content:$.LongText({displayName:"Content",description:"The plain-text content of the reply.",required:!0}),action:$.StaticDropdown({displayName:"Action",description:"Optionally change the parent comment's state: resolve (mark resolved) or reopen.",required:!1,options:{options:[{label:"Resolve",value:"resolve"},{label:"Reopen",value:"reopen"}]}})},async run(e){let{file_id:t,comment_id:n,content:o,action:r}=e.propsValue,i=await de(e.auth),s=(0,jM.drive)({version:"v3",auth:i}),u={content:o};r&&(u.action=r);try{return(await s.replies.create({fileId:t,commentId:n,fields:"*",requestBody:u})).data}catch(h){throw h.code===404?new Error(`File or comment not found (file ID: ${t}, comment ID: ${n}). Resolve the comment ID via drive_list_comments.`):h.code===403?new Error(`Permission denied replying to comment ${n} on file ${t}. You may lack comment access to this file.`):h}}});var BM=he(ze());var VM=re({auth:Y,name:"drive_get_reply",classification:"READ",displayName:"Get Reply",description:"Fetch a single reply on a Drive comment by ID.",audience:"ai",aiMetadata:{description:"Fetches a single reply by ID, including its author, content, and action. Use when you already have a replyId (resolve it via drive_list_replies) and need that one reply's details. Read-only.",idempotent:!0},outputSchema:gz,props:{file_id:$.ShortText({displayName:"File ID",description:"The ID of the file the comment belongs to. Resolve it via drive_search_files or drive_get_file.",required:!0}),comment_id:$.ShortText({displayName:"Comment ID",description:"The ID of the parent comment. Resolve it via drive_list_comments.",required:!0}),reply_id:$.ShortText({displayName:"Reply ID",description:"The ID of the reply to fetch. Resolve it via drive_list_replies.",required:!0})},async run(e){let{file_id:t,comment_id:n,reply_id:o}=e.propsValue,r=await de(e.auth),i=(0,BM.drive)({version:"v3",auth:r});try{return(await i.replies.get({fileId:t,commentId:n,replyId:o,fields:"*"})).data}catch(s){throw s.code===404?new Error(`File, comment, or reply not found (file ID: ${t}, comment ID: ${n}, reply ID: ${o}). Resolve the reply ID via drive_list_replies.`):s.code===403?new Error(`Permission denied fetching reply ${o} on file ${t}. You may lack access to this file.`):s}}});var GM=he(ze());var HM=re({auth:Y,name:"drive_list_replies",classification:"SEARCH",displayName:"List Replies",description:"List the replies under a Drive comment.",audience:"ai",aiMetadata:{description:"Lists the replies under a given comment with each reply's id, author, content, and action. Use to read a comment thread or to resolve a replyId before fetching (drive_get_reply), editing (drive_update_reply), or deleting (drive_delete_reply) a reply. Read-only.",idempotent:!0},outputSchema:yz,props:{file_id:$.ShortText({displayName:"File ID",description:"The ID of the file the comment belongs to. Resolve it via drive_search_files or drive_get_file.",required:!0}),comment_id:$.ShortText({displayName:"Comment ID",description:"The ID of the comment whose replies to list. Resolve it via drive_list_comments.",required:!0})},async run(e){let{file_id:t,comment_id:n}=e.propsValue,o=await de(e.auth),r=(0,GM.drive)({version:"v3",auth:o});try{let s=(await r.replies.list({fileId:t,commentId:n,fields:"*"})).data.replies??[];return{replies:s,count:s.length}}catch(i){throw i.code===404?new Error(`File or comment not found (file ID: ${t}, comment ID: ${n}). Resolve the comment ID via drive_list_comments.`):i.code===403?new Error(`Permission denied listing replies for comment ${n} on file ${t}. You may lack access to this file.`):i}}});var ZM=he(ze());var WM=re({auth:Y,name:"drive_update_reply",classification:"WRITE",displayName:"Update Reply",description:"Edit the text of an existing reply on a Drive comment.",audience:"ai",aiMetadata:{description:"Edits the text of an existing reply by ID (resolve via drive_list_replies). Use to correct or revise a reply you control; to add a new reply instead use drive_create_reply. Safe to retry \u2014 re-applying the same content is a no-op.",idempotent:!0},outputSchema:vz,props:{file_id:$.ShortText({displayName:"File ID",description:"The ID of the file the comment belongs to. Resolve it via drive_search_files or drive_get_file.",required:!0}),comment_id:$.ShortText({displayName:"Comment ID",description:"The ID of the parent comment. Resolve it via drive_list_comments.",required:!0}),reply_id:$.ShortText({displayName:"Reply ID",description:"The ID of the reply to update. Resolve it via drive_list_replies.",required:!0}),content:$.LongText({displayName:"Content",description:"The new plain-text content for the reply.",required:!0})},async run(e){let{file_id:t,comment_id:n,reply_id:o,content:r}=e.propsValue,i=await de(e.auth),s=(0,ZM.drive)({version:"v3",auth:i});try{return(await s.replies.update({fileId:t,commentId:n,replyId:o,fields:"*",requestBody:{content:r}})).data}catch(u){throw u.code===404?new Error(`File, comment, or reply not found (file ID: ${t}, comment ID: ${n}, reply ID: ${o}). Resolve the reply ID via drive_list_replies.`):u.code===403?new Error(`Permission denied updating reply ${o} on file ${t}. You can only edit your own replies.`):u}}});var KM=he(ze());var JM=re({auth:Y,name:"drive_delete_reply",classification:"DESTRUCTIVE",displayName:"Delete Reply",description:"Permanently delete a reply on a Drive comment by ID.",audience:"ai",aiMetadata:{description:"Permanently deletes a reply by ID (resolve via drive_list_replies). Use to remove a reply you control; to edit it instead use drive_update_reply. A repeat call fails because the reply is already gone, so it is not safe to retry blindly.",idempotent:!1},outputSchema:xz,props:{file_id:$.ShortText({displayName:"File ID",description:"The ID of the file the comment belongs to. Resolve it via drive_search_files or drive_get_file.",required:!0}),comment_id:$.ShortText({displayName:"Comment ID",description:"The ID of the parent comment. Resolve it via drive_list_comments.",required:!0}),reply_id:$.ShortText({displayName:"Reply ID",description:"The ID of the reply to delete. Resolve it via drive_list_replies.",required:!0})},async run(e){let{file_id:t,comment_id:n,reply_id:o}=e.propsValue,r=await de(e.auth),i=(0,KM.drive)({version:"v3",auth:r});try{return await i.replies.delete({fileId:t,commentId:n,replyId:o}),{success:!0,reply_id:o}}catch(s){throw s.code===404?new Error(`File, comment, or reply not found (file ID: ${t}, comment ID: ${n}, reply ID: ${o}). It may already be deleted. Resolve the reply ID via drive_list_replies.`):s.code===403?new Error(`Permission denied deleting reply ${o} on file ${t}. You can only delete your own replies.`):s}}});var XM=he(ze());var YM=re({auth:Y,name:"drive_get_about",classification:"READ",displayName:"Get Account & Storage Info",description:"Get the authenticated Drive account, storage quota, and supported formats.",audience:"ai",aiMetadata:{description:"Returns the authenticated user's Drive info: account identity, storage quota and usage, and supported import/export formats. Use to check available space before a large upload, confirm which account is connected, or look up valid export MIME types. Read-only.",idempotent:!0},outputSchema:lz,props:{},async run(e){let t=await de(e.auth),n=(0,XM.drive)({version:"v3",auth:t});try{return(await n.about.get({fields:"user,storageQuota,maxImportSizes,exportFormats"})).data}catch(o){throw o.code===403?new Error("Permission denied fetching Drive account info. The connection may lack the required Drive scope."):o}}});var jJ=VA({minimumSupportedRelease:"0.88.2",logoUrl:"https://cdn.activepieces.com/pieces/google-drive.png",categories:["CONTENT_AND_FILES"],displayName:"Google Drive",description:"Cloud storage and file backup",authors:["BastienMe","ArmanGiau3","Vitalini","pfernandez98","kanarelo","Salem-Alaa","kishanprmr","MoShizzle","AbdulTheActivePiecer","khaledmashaly","abuaboud","geekyme"],triggers:[cU,lU,hU],actions:[Cz,kz,oU,Wz,jz,Zz,tU,Fz,Xz,Oz,Uz,_U,wU,TU,SU,OU,CU,kU,MU,jU,BU,VU,ZU,KU,JU,YU,eM,rM,oM,sM,uM,dM,fM,hM,yM,_M,wM,TM,SM,IM,RM,$M,NM,zM,MM,LM,qM,VM,HM,WM,JM,YM,n0({baseUrl:a(()=>"https://www.googleapis.com/drive/v3","baseUrl"),auth:Y,authMapping:a(async e=>({Authorization:`Bearer ${await bt(e)}`}),"authMapping")})],auth:Y});0&&(module.exports={createGoogleClient,getAccessToken,googleDrive,googleDriveAuth});
112
+ `)}`)}return r}a(FJ,"collectZipEntries");function LJ(e){let t=[],n=[],o=0;for(let r of e){let i=o+r.sizeBytes>OJ,s=n.length>=DJ;n.length>0&&(i||s)&&(t.push(n),n=[],o=0),n.push(r),o+=r.sizeBytes}return n.length>0&&t.push(n),t}a(LJ,"batchByBytes");async function jJ({auth:e,entry:t,zipWriter:n,fileAddOptions:o}){if(!t.downloadUrl)throw new Error(`No download URL for entry "${t.relativePath}"`);let r=await bt(e),i=await fetch(t.downloadUrl,{headers:{Authorization:`Bearer ${r}`}});if(!i.ok||!i.body){let s=await i.text().catch(()=>"");throw i.status===403&&s.includes("exportSizeLimitExceeded")?new Error(`Export failed for "${t.relativePath}": exceeds Drive's ~10MB export size limit.`):new Error(`Failed to download "${t.relativePath}" (HTTP ${i.status}): ${s}`)}await n.add(t.relativePath,i.body,o)}a(jJ,"downloadAndAddZipEntry");var OU=re({auth:Y,name:"drive_export_folder_as_zip",classification:"READ",displayName:"Export Folder as Zip",description:"Download a folder and all its subfolders as one zip file.",audience:"human",aiMetadata:{description:"Recursively downloads every file in a Drive folder (including subfolders) and packages them into a single zip whose internal paths mirror the folder hierarchy. Native Google Docs/Sheets/Slides are converted per user-chosen format (PDF/Office format) or skipped. Fails the whole action if any single file cannot be downloaded/exported. Optionally password-protects the zip.",idempotent:!0},propertyGroups:[{key:"source",display:"section",label:"Folder to export",icon:"location",props:["folderId","includeTeamDrives"]},{key:"conversion",display:"section",label:"Convert Google files",icon:"file",props:["googleDocsFormat","googleSheetsFormat","googleSlidesFormat"]},{key:"output",display:"section",label:"Output",icon:"paperclip",props:["duplicatePathWarning","outputFileName"]}],props:{folderId:$.Dropdown({displayName:"Folder",description:"Everything inside it, including subfolders, goes into the zip.",required:!0,auth:Y,refreshers:["includeTeamDrives"],refreshOnSearch:!0,options:a(async({auth:e,includeTeamDrives:t},n)=>Ne.fetchFolderDropdownOptions({auth:e,searchValue:n?.searchValue,includeTeamDrives:t}),"options")}),includeTeamDrives:$.Checkbox({displayName:"Include Team Drives",description:"Also include shared drives, not only My Drive.",required:!1,defaultValue:!1}),googleDocsFormat:$.StaticDropdown({displayName:"Google Docs As",description:"Convert Docs to Word or PDF, or leave them out.",required:!0,defaultValue:"docx",options:{options:[{label:"Word (DOCX)",value:"docx"},{label:"PDF",value:"pdf"},{label:"Leave Out",value:"skip"}]}}),googleSheetsFormat:$.StaticDropdown({displayName:"Google Sheets As",description:"Convert Sheets to Excel or PDF, or leave them out.",required:!0,defaultValue:"xlsx",options:{options:[{label:"Excel (XLSX)",value:"xlsx"},{label:"PDF",value:"pdf"},{label:"Leave Out",value:"skip"}]}}),googleSlidesFormat:$.StaticDropdown({displayName:"Google Slides As",description:"Convert Slides to PowerPoint or PDF, or leave them out.",required:!0,defaultValue:"pptx",options:{options:[{label:"PowerPoint (PPTX)",value:"pptx"},{label:"PDF",value:"pdf"},{label:"Leave Out",value:"skip"}]}}),duplicatePathWarning:$.MarkDown({value:'Zip paths copy the Drive names. The export stops before downloading anything if two items in one folder would share a path, for example a Sheet named "Report" exported as PDF next to an existing Report.pdf, or if a name contains / or \\ or is "." or "..". Rename the item in Drive and run again.',variant:"WARNING"}),outputFileName:$.ShortText({displayName:"Zip File Name",description:"Include the .zip extension.",required:!0,defaultValue:"export.zip",placeholder:"export.zip"}),usePassword:$.Checkbox({displayName:"Use Password",description:"Encrypt the zip so a password is needed to open it.",required:!1,defaultValue:!1,advanced:!0}),passwordOptions:$.DynamicProperties({displayName:"Password Options",required:!1,advanced:!0,auth:xa.None(),refreshers:["usePassword"],props:a(async({usePassword:e})=>e?{password:$.ShortText({displayName:"Password",description:"Needed to open the zip.",required:!0}),encryptionMethod:$.StaticDropdown({displayName:"Encryption Method",description:"ZipCrypto opens everywhere; AES-256 is stronger but needs a modern unzip app.",required:!0,defaultValue:"zipcrypto",options:{disabled:!1,options:[{label:"ZipCrypto",value:"zipcrypto"},{label:"AES-256",value:"aes-256"}]}})}:{},"props")})},async run(e){let t={docs:e.propsValue.googleDocsFormat,sheets:e.propsValue.googleSheetsFormat,slides:e.propsValue.googleSlidesFormat},n=await FJ({auth:e.auth,rootFolderId:e.propsValue.folderId,nativeFormats:t,includeTeamDrives:e.propsValue.includeTeamDrives??!1}),o={};if(e.propsValue.usePassword){let y=e.propsValue.passwordOptions?.password,T=e.propsValue.passwordOptions?.encryptionMethod;if(!y)throw new Error('Cannot export: "Use password" is enabled but no password was provided. Enter a password or turn the option off.');o.password=y,T==="aes-256"?o.encryptionStrength=3:o.zipCrypto=!0}let r=new TransformStream,i=new IU.ZipWriter(r.writable),s=xU.Readable.fromWeb(r.readable),u=e.files.write({data:s,fileName:e.propsValue.outputFileName});u.catch(()=>{});let h=[],g=[];for(let y of n)(y.isEmptyFolder?g:h).push(y);try{for(let y of LJ(h))await Promise.all(y.map(T=>jJ({auth:e.auth,entry:T,zipWriter:i,fileAddOptions:o})));for(let y of g)await i.add(`${y.relativePath}/`,void 0,{directory:!0});await i.close()}catch(y){throw s.destroy(y instanceof Error?y:new Error(String(y))),y}return u}});var $U=he(ze());var CU=re({auth:Y,name:"drive_create_folder",classification:"WRITE",displayName:"Create Folder",description:"Create a new empty folder in your Google Drive",audience:"ai",aiMetadata:{description:"Creates a new empty folder in Google Drive, optionally nested under a parent folder (resolve the parent ID via `drive_search_files`). Use to set up a destination before uploading or moving files. Each call creates a distinct folder even with the same name, so retries duplicate.",idempotent:!1},outputSchema:Pz,props:{folder_name:$.ShortText({displayName:"Folder name",description:"The name of the new folder",required:!0}),parent_folder_id:$.ShortText({displayName:"Parent Folder ID",description:"The ID of the folder to create the new folder inside. Leave empty to create it in the root of My Drive. Resolve a folder ID with `drive_search_files`.",required:!1})},async run(e){let t=await de(e.auth);return(await(0,$U.drive)({version:"v3",auth:t}).files.create({requestBody:{mimeType:"application/vnd.google-apps.folder",name:e.propsValue.folder_name,...e.propsValue.parent_folder_id?{parents:[e.propsValue.parent_folder_id]}:{}},supportsAllDrives:!0})).data}});var NU=he(Tu());var kU=re({auth:Y,name:"drive_create_file_from_text",classification:"WRITE",displayName:"Create File from Text",description:"Create a new text file in your Google Drive from text",audience:"ai",aiMetadata:{description:"Creates a new Drive file from inline text content as plain text, CSV, or XML. Use when an agent has generated text it needs to persist as a Drive file; for binary or existing files use `drive_upload_file` instead. Each call creates a new file.",idempotent:!1},outputSchema:Yk,props:{file_name:$.ShortText({displayName:"File name",description:"The name of the new text file",required:!0}),text:$.LongText({displayName:"Text",description:"The text content to add to file",required:!0}),content_type:$.StaticDropdown({displayName:"Content type",description:"Select file type",required:!0,defaultValue:"plain/text",options:{options:[{label:"Text",value:"plain/text"},{label:"CSV",value:"text/csv"},{label:"XML",value:"text/xml"}]}}),parent_folder_id:$.ShortText({displayName:"Parent Folder ID",description:"The ID of the folder to create the file inside. Leave empty to create it in the root of My Drive. Resolve a folder ID with `drive_search_files`.",required:!1})},async run(e){let t={mimeType:e.propsValue.content_type,name:e.propsValue.file_name,...e.propsValue.parent_folder_id?{parents:[e.propsValue.parent_folder_id]}:{}},n=Buffer.from(JSON.stringify(t),"utf-8"),o=Buffer.from(e.propsValue.text,"utf-8"),r=new NU.default;return r.append("Metadata",n,{contentType:"application/json"}),r.append("Media",o,{contentType:e.propsValue.content_type}),(await Yt.sendRequest({method:"POST",url:"https://www.googleapis.com/upload/drive/v3/files?uploadType=multipart",body:r,headers:{...r.getHeaders()},queryParams:{supportsAllDrives:"true"},authentication:{type:"BEARER_TOKEN",token:await bt(e.auth)}})).body}});var zU=he(Tu());var UU=he(en());var MU=re({auth:Y,name:"drive_upload_file",classification:"WRITE",displayName:"Upload File",description:"Upload a file in your Google Drive",audience:"ai",aiMetadata:{description:"Uploads a binary file (from a URL or base64 input) into Drive; MIME type is inferred from the extension. Use to store an existing file or attachment; for plain generated text use `drive_create_file_from_text`, and to fetch a remote URL server-side use `drive_upload_from_url`. Each call creates a new file.",idempotent:!1},outputSchema:Qk,props:{file_name:$.ShortText({displayName:"File name",description:"The name of the file",required:!0}),file:$.File({displayName:"File",description:"The file URL or base64 to upload",required:!0}),parent_folder_id:$.ShortText({displayName:"Parent Folder ID",description:"The ID of the folder to upload the file into. Leave empty to upload to the root of My Drive. Resolve a folder ID with `drive_search_files`.",required:!1})},async run(e){let t=e.propsValue.file,o={mimeType:UU.default.lookup(t.extension?t.extension:""),name:e.propsValue.file_name,...e.propsValue.parent_folder_id?{parents:[e.propsValue.parent_folder_id]}:{}},r=Buffer.from(JSON.stringify(o),"utf-8"),i=Buffer.from(t.base64,"base64"),s=new zU.default;return s.append("Metadata",r,{contentType:"application/json"}),s.append("Media",i),(await Yt.sendRequest({method:"POST",url:"https://www.googleapis.com/upload/drive/v3/files",queryParams:{uploadType:"multipart",supportsAllDrives:"true"},body:s,headers:{...s.getHeaders()},authentication:{type:"BEARER_TOKEN",token:await bt(e.auth)}})).body}});var FU=he(Tu());var LU=he(en());var jU=re({auth:Y,name:"drive_upload_from_url",classification:"WRITE",displayName:"Upload File from URL",description:"Fetch a file from a public URL and upload it into Google Drive.",audience:"ai",aiMetadata:{description:"Fetches a file from a public URL and uploads it into Drive in one step (server-side fetch, no base64 round-trip). Use when the agent has a downloadable link rather than file bytes; for bytes already in hand use `drive_upload_file`, and for plain generated text use `drive_create_file_from_text`. Each call creates a new file.",idempotent:!1},outputSchema:Tz,props:{source_url:$.ShortText({displayName:"Source URL",description:"The publicly accessible URL to fetch the file from. Only public URLs are supported (no authentication headers are sent).",required:!0}),file_name:$.ShortText({displayName:"File name",description:"The name to give the uploaded file in Drive.",required:!0}),mime_type:$.ShortText({displayName:"MIME Type",description:"Optional MIME type for the uploaded file (e.g. application/pdf). Provide this when the URL has no file extension; otherwise the type is inferred from the URL.",required:!1}),parent_folder_id:$.ShortText({displayName:"Parent Folder ID",description:"The ID of the folder to upload the file into. Leave empty to upload to the root of My Drive. Resolve a folder ID with `drive_search_files`.",required:!1})},async run(e){let{source_url:t,file_name:n,mime_type:o,parent_folder_id:r}=e.propsValue,i;try{i=await Yt.sendRequest({method:"GET",url:t,responseType:"arraybuffer"})}catch(b){throw new Error(`Failed to fetch the file from the source URL (${t}). Ensure it is a publicly accessible link. Underlying error: ${b?.message??b}`)}let s=o||LU.default.lookup(t)||"application/octet-stream",u={mimeType:s,name:n,...r?{parents:[r]}:{}},h=Buffer.from(JSON.stringify(u),"utf-8"),g=Buffer.from(i.body),y=new FU.default;return y.append("Metadata",h,{contentType:"application/json"}),y.append("Media",g,{contentType:s}),(await Yt.sendRequest({method:"POST",url:"https://www.googleapis.com/upload/drive/v3/files",queryParams:{uploadType:"multipart",supportsAllDrives:"true"},body:y,headers:{...y.getHeaders()},authentication:{type:"BEARER_TOKEN",token:await bt(e.auth)}})).body}});var qU=he(en());var BU=re({auth:Y,name:"drive_replace_file_content",classification:"WRITE",displayName:"Replace File Content",description:"Replace an existing Drive file's bytes, keeping its ID and name.",audience:"ai",aiMetadata:{description:"Replaces the contents of an existing Drive file with new bytes, keeping the same file ID, name, and location. Use to update a file in place (e.g. overwrite a report); to create a brand-new file use `drive_upload_file`, and to rename without changing content use `drive_update_file_metadata`. Each call overwrites the previous content.",idempotent:!1},outputSchema:uz,props:{file_id:$.ShortText({displayName:"File ID",description:"The ID of the existing file whose content to replace. Resolve it via `drive_search_files` or `drive_get_file`.",required:!0}),file:$.File({displayName:"New File Content",description:"The file URL or base64 whose bytes will replace the existing content.",required:!0}),mime_type:$.ShortText({displayName:"MIME Type",description:"Optional MIME type for the new content (e.g. application/pdf). Provide this when the source has no file extension; otherwise the type is inferred from the extension.",required:!1})},async run(e){let{file_id:t,file:n,mime_type:o}=e.propsValue,r=o||qU.default.lookup(n.extension?n.extension:"")||"application/octet-stream",i=Buffer.from(n.base64,"base64");return(await Yt.sendRequest({method:"PATCH",url:`https://www.googleapis.com/upload/drive/v3/files/${t}`,queryParams:{uploadType:"media",supportsAllDrives:"true"},body:i,headers:{"Content-Type":r},authentication:{type:"BEARER_TOKEN",token:await bt(e.auth)}})).body}});var VU=re({auth:Y,name:"drive_download_file",classification:"READ",displayName:"Download File Content",description:"Read a selected file from google drive file",audience:"ai",aiMetadata:{description:"Downloads a Drive file's bytes by ID and returns a file reference; native Google files (Docs/Sheets/Slides) are auto-exported to their default Office format. Use to retrieve content of a file you have the ID for (obtain it from `drive_search_files` or `drive_get_file`). Read-only.",idempotent:!0},outputSchema:Ez,props:{file_id:$.ShortText({displayName:"File ID",description:"The ID of the file to download. Resolve it via `drive_search_files` or `drive_get_file`.",required:!0}),destination_file_name:$.ShortText({displayName:"Destination File name",required:!1})},run:a(async({auth:e,propsValue:t,files:n})=>Zt(e,n,t.file_id,t.destination_file_name),"run")});var GU=he(ze()),HU=he(en());var ZU=re({auth:Y,name:"drive_export_workspace_file",classification:"READ",displayName:"Export Google Doc/Sheet/Slides",description:"Export a native Google Workspace file (Doc/Sheet/Slides) to a chosen format.",audience:"ai",aiMetadata:{description:"Exports a native Google Workspace file (Doc/Sheet/Slides) to a caller-chosen format and returns the bytes. Use when you need a specific format such as PDF, HTML, CSV, or Markdown; for the default rendition or for ordinary binary files use `drive_download_file`. The chosen format must match the source type (Doc formats for a Doc, Sheet formats for a Sheet, etc.). Read-only. Export size is capped at ~10 MB by Drive.",idempotent:!0},outputSchema:Sz,props:{file_id:$.ShortText({displayName:"File ID",description:"The ID of the native Google Workspace file to export. Resolve it via `drive_search_files` or `drive_get_file`.",required:!0}),mime_type:$.StaticDropdown({displayName:"Export Format",description:"The target format. It must match the source type: Doc formats for a Google Doc, Sheet formats for a Google Sheet, Slides formats for Google Slides. An incompatible pairing returns an error.",required:!0,options:{options:[{label:"Word (DOCX) \u2014 Docs",value:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"},{label:"PDF \u2014 Docs/Sheets/Slides",value:"application/pdf"},{label:"HTML \u2014 Docs",value:"text/html"},{label:"Plain Text (TXT) \u2014 Docs",value:"text/plain"},{label:"Rich Text (RTF) \u2014 Docs",value:"application/rtf"},{label:"OpenDocument Text (ODT) \u2014 Docs",value:"application/vnd.oasis.opendocument.text"},{label:"EPUB \u2014 Docs",value:"application/epub+zip"},{label:"Markdown (MD) \u2014 Docs",value:"text/markdown"},{label:"Excel (XLSX) \u2014 Sheets",value:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"},{label:"CSV \u2014 Sheets",value:"text/csv"},{label:"TSV \u2014 Sheets",value:"text/tab-separated-values"},{label:"OpenDocument Spreadsheet (ODS) \u2014 Sheets",value:"application/vnd.oasis.opendocument.spreadsheet"},{label:"PowerPoint (PPTX) \u2014 Slides",value:"application/vnd.openxmlformats-officedocument.presentationml.presentation"},{label:"OpenDocument Presentation (ODP) \u2014 Slides",value:"application/vnd.oasis.opendocument.presentation"},{label:"PNG \u2014 Slides",value:"image/png"},{label:"SVG \u2014 Slides",value:"image/svg+xml"}]}})},async run(e){let{file_id:t,mime_type:n}=e.propsValue,o=await de(e.auth),r=(0,GU.drive)({version:"v3",auth:o});try{let i=await r.files.export({fileId:t,mimeType:n},{responseType:"arraybuffer"}),s=(0,HU.extension)(n),u=s?"."+s:"";return e.files.write({fileName:t+u,data:Buffer.from(i.data)})}catch(i){throw(i?.errors?.[0]?.reason??i?.response?.data?.error?.errors?.[0]?.reason)==="exportSizeLimitExceeded"?new Error(`Export failed: the file exceeds Drive's ~10 MB export size limit (file ID: ${t}). Use drive_download_file to fetch the source directly instead.`):i.code===403?new Error(`Permission denied exporting file ${t}. You may lack access to this file.`):i.code===400?new Error(`Invalid export for file ${t}: the chosen format does not match the source type, or this is not a native Google Workspace file. Use drive_download_file for ordinary binary files.`):i.code===404?new Error(`File not found (ID: ${t}). Resolve a valid ID via drive_search_files or drive_get_file.`):i}}});var WU=he(ze());var KU=re({auth:Y,name:"drive_get_file",classification:"READ",displayName:"Get File or Folder",description:"Get a file folder for files/sub-folders",audience:"ai",aiMetadata:{description:"Fetches metadata for a single file or folder by its exact ID (name, MIME type, parents, owners, links). Use when you already have an ID (e.g. from a trigger or `drive_search_files`) and need its details, including its parent folder IDs. Read-only and safe to retry.",idempotent:!0},outputSchema:Kk,props:{file_id:$.ShortText({displayName:"File / Folder ID",description:"The ID of the file/folder to fetch. Resolve it via `drive_search_files` or `drive_list_files`.",required:!0})},async run(e){let t=await de(e.auth),o=await(0,WU.drive)({version:"v3",auth:t}).files.get({fileId:e.propsValue.file_id,supportsAllDrives:!0});return o.data?o.data:null}});var Ph=he(en());var JU=re({auth:Y,name:"drive_list_files",classification:"SEARCH",displayName:"List Folder Contents",description:"List files from a Google Drive folder",audience:"ai",aiMetadata:{description:"Lists files and subfolders inside a given folder ID, optionally recursing to a chosen depth and downloading each file's content. Use to enumerate the contents of a known folder; to find a file by name across Drive use `drive_search_files`. Read-only. Requires the folder ID, not a name.",idempotent:!0},outputSchema:Jk,props:{folder_id:$.ShortText({displayName:"Folder ID",description:"The ID of the folder to list. Resolve it via `drive_search_files` (or any other source).",required:!0}),include_trashed:$.Checkbox({displayName:"Include Trashed",description:"Include new files that have been trashed.",required:!1,defaultValue:!1}),depth_level:$.Number({displayName:"Depth Level",description:"How many levels deep to search for files. 1 = current folder only, 2 = current + next level, etc.",required:!1,defaultValue:1}),download_files:$.Checkbox({displayName:"Download Files",description:"Download all file contents in a list",required:!1,defaultValue:!1}),include_team_drives:$.Checkbox({displayName:"Include Team Drives",description:"Determines if folders from Team Drives should be included in the results.",defaultValue:!1,required:!1})},async run(e){let t={type:"drive#fileList",incompleteSearch:!1,files:[]},n=e.propsValue.depth_level||1,o=await hh({auth:e.auth,rootFolderId:e.propsValue.folder_id,maxLevel:n,includeTrashed:e.propsValue.include_trashed??!1,includeTeamDrives:e.propsValue.include_team_drives??!1});if(e.propsValue.download_files){let r=[];for(let i of o){if(i.mimeType==="application/vnd.google-apps.folder"){r.push(i);continue}let s=i.name,u=(0,Ph.extension)(i.mimeType),g=(Ph.extensions[i.mimeType]??(u?[u]:[])).some(y=>s.toLowerCase().endsWith(`.${y}`));u&&!g&&(s=`${s}.${u}`);try{let y=await Zt(e.auth,e.files,i.id,s);r.push({...i,downloadedFile:y})}catch(y){console.warn(`Failed to download file ${i.name}: ${y instanceof Error?y.message:"Download failed"}`),r.push(i)}}t.files=r,t.downloadedFiles=r.map(i=>i.downloadedFile).filter(i=>i!==void 0)}else t.files=o;return t}});var XU=he(ze());var YU=re({auth:Y,name:"drive_search_files",classification:"SEARCH",displayName:"Search Files and Folders",description:"Search a Google Drive folder for files/sub-folders",audience:"ai",aiMetadata:{description:"Searches Drive for files or folders matching a name, full-text, or MIME-type query, optionally scoped to a parent folder. Use this to resolve a human-readable name into a file/folder ID before acting on it; to list a known folder's children use `drive_list_files` instead. Read-only.",idempotent:!0},outputSchema:Xk,props:{query_term:$.StaticDropdown({displayName:"Query Term",description:"The Query term or field of file/folder to search upon.",defaultValue:"name",options:{options:[{label:"File name",value:"name"},{label:"Full text search",value:"fullText"},{label:"Content type",value:"mimeType"}]},required:!0}),operator:$.StaticDropdown({displayName:"Operator",description:"The operator to create criteria.",required:!0,options:{options:[{label:"Contains",value:"contains"},{label:"Equals",value:"="}]},defaultValue:"contains"}),value:$.ShortText({displayName:"Value",description:"Value of the field of file/folder to search for.",required:!0}),type:$.StaticDropdown({displayName:"File Type",description:"(Optional) Choose between files and folders.",required:!1,options:{options:[{label:"All",value:"all"},{label:"Files",value:"file"},{label:"Folders",value:"folder"}]},defaultValue:"all"}),parent_folder_id:$.ShortText({displayName:"Parent Folder ID",description:"(Optional) Restrict the search to files/folders inside this folder ID.",required:!1}),include_team_drives:$.Checkbox({displayName:"Include Team Drives",description:"Determines if folders from Team Drives should be included in the results.",defaultValue:!1,required:!1})},async run(e){let t=await de(e.auth),n=(0,XU.drive)({version:"v3",auth:t}),o=e.propsValue.operator??"contains",i=`${e.propsValue.query_term??"name"} ${o} '${e.propsValue.value}'`;switch(e.propsValue.parent_folder_id&&(i=`${i} and '${e.propsValue.parent_folder_id}' in parents`),e.propsValue.type??"all"){case"file":i=`${i} and mimeType!='application/vnd.google-apps.folder'`;break;case"folder":i=`${i} and mimeType='application/vnd.google-apps.folder'`;break;default:break}let u=[],h;do{let g={q:i,fields:"nextPageToken, files(id, name, mimeType, createdTime, modifiedTime)",includeItemsFromAllDrives:e.propsValue.include_team_drives,supportsAllDrives:!0,corpora:e.propsValue.include_team_drives?"allDrives":"user",pageSize:1e3};h&&(g.pageToken=h);let y=await n.files.list(g);if(y.status!==200)throw console.error(y),new Error("Error searching for the file/folder");u.push(...y.data.files??[]),h=y.data.nextPageToken??void 0}while(h);return u.length>0?u:[]}});var QU=he(ze());var eM=re({auth:Y,name:"drive_copy_file",classification:"WRITE",displayName:"Copy File",description:"Duplicate a file from Google Drive. Returns the new file ID.",audience:"ai",aiMetadata:{description:"Copies an existing Drive file into a target folder under a new name, optionally converting it to a Google Sheet or Doc. Use to clone a file or make an editable Google-format copy; to relocate the original instead of copying use `drive_move_file`. Requires source file ID and destination folder ID. Each call creates a new copy.",idempotent:!1},outputSchema:ez,props:{file_id:$.ShortText({displayName:"File ID",description:"The ID of the file to duplicate. Resolve it via `drive_search_files`.",required:!0}),name:$.ShortText({displayName:"Name",description:"The name of the new file",required:!0}),folder_id:$.ShortText({displayName:"Folder ID",description:"The ID of the folder where the file will be duplicated. Resolve it via `drive_search_files`.",required:!0}),convert_to:$.StaticDropdown({displayName:"Duplicate as",description:"If left unselected the file will be duplicated as it is",required:!1,options:{options:[{label:"Google Sheets",value:"application/vnd.google-apps.spreadsheet"},{label:"Google Docs",value:"application/vnd.google-apps.document"}]}})},async run(e){let t=await de(e.auth),n=e.propsValue.file_id,o=e.propsValue.name,r=e.propsValue.folder_id,i=e.propsValue.convert_to,s=(0,QU.drive)({version:"v3",auth:t}),u={name:o,parents:[r]};i&&(u.mimeType=i);let h=await s.files.copy({fileId:n,auth:t,requestBody:u,supportsAllDrives:!0});if(h.status!==200)throw new Error("Error duplicating file");return h.data}});var tM=he(ze());var rM=re({auth:Y,name:"drive_move_file",classification:"WRITE",displayName:"Move File",description:"Move a Drive file from its current folder(s) to a target folder.",audience:"ai",aiMetadata:{description:"Relocates a file to a target folder, detaching it from its current parents and attaching the new one. Use to reorganize a file by ID; to copy instead of move use drive_copy_file, and to rename without moving use drive_update_file_metadata. Safe to retry \u2014 repeating leaves the file in the same destination.",idempotent:!0},outputSchema:tz,props:{file_id:$.ShortText({displayName:"File ID",description:"The ID of the file to move. Resolve it via drive_search_files or drive_get_file.",required:!0}),folder_id:$.ShortText({displayName:"Destination Folder ID",description:"The ID of the folder to move the file into. Resolve it via drive_search_files; leave empty for the root of My Drive.",required:!0})},async run(e){let t=e.propsValue.file_id,n=e.propsValue.folder_id,o=await de(e.auth),r=(0,tM.drive)({version:"v3",auth:o}),i=await r.files.get({fileId:t,supportsAllDrives:!0,fields:"id,parents"});return(await r.files.update({fileId:t,fields:"*",removeParents:i.data.parents?.join(","),addParents:n,supportsAllDrives:!0})).data}});var nM=he(ze());var oM=re({auth:Y,name:"drive_update_file_metadata",classification:"WRITE",displayName:"Update File Metadata (Rename)",description:"Rename a Drive file/folder or update its description or starred flag (metadata only).",audience:"ai",aiMetadata:{description:"Renames a file/folder or updates its description or starred flag via a metadata-only PATCH. Use to rename or annotate a resource; this never changes the file's location \u2014 to re-parent use `drive_move_file`, and to replace the file's bytes use `drive_replace_file_content`. Safe to retry \u2014 re-applying the same values is a no-op.",idempotent:!0},outputSchema:rz,props:{file_id:$.ShortText({displayName:"File or Folder ID",description:"The ID of the file or folder to update. Resolve it via `drive_search_files` or `drive_get_file`.",required:!0}),name:$.ShortText({displayName:"New Name",description:"A new name for the file or folder. Leave empty to keep the current name.",required:!1}),description:$.ShortText({displayName:"Description",description:"A new description for the file or folder. Leave empty to keep the current description.",required:!1}),starred:$.Checkbox({displayName:"Starred",description:"Whether to mark the file or folder as starred.",required:!1})},async run(e){let{file_id:t,name:n,description:o,starred:r}=e.propsValue,i={};n!=null&&n!==""&&(i.name=n),o!=null&&(i.description=o),r!=null&&(i.starred=r);let s=await de(e.auth),u=(0,nM.drive)({version:"v3",auth:s});try{return(await u.files.update({fileId:t,supportsAllDrives:!0,requestBody:i})).data}catch(h){throw h.code===404?new Error(`File or folder not found (ID: ${t}). Resolve a valid ID via drive_search_files or drive_get_file.`):h.code===403?new Error(`Permission denied updating file ${t}. You may lack edit permission on this resource.`):h}}});var iM=he(ze()),aM=require("stream");var sM=re({auth:Y,name:"drive_save_file_as_pdf",classification:"WRITE",displayName:"Save File as PDF",description:"Save a document as PDF in a Google Drive folder",audience:"ai",aiMetadata:{description:"Exports a native Google document to PDF and saves it as a new file in a target Drive folder. Use to produce a PDF rendition of a Google Doc/Sheet/Slides for sharing or archival (resolve the source and folder IDs via `drive_search_files`). Each call creates a new PDF file.",idempotent:!1},outputSchema:_z,props:{document_id:$.ShortText({displayName:"Document ID",description:"The ID of the document to export. Resolve it via `drive_search_files`.",required:!0}),folder_id:$.ShortText({displayName:"Folder ID",description:"The ID of the folder where the file will be exported. Resolve it via `drive_search_files`.",required:!0}),name:$.ShortText({displayName:"Name",description:"The name of the new file (do not include the extension)",required:!0})},async run(e){let t=await de(e.auth),n=e.propsValue.document_id,o=e.propsValue.folder_id,r=e.propsValue.name,i=(0,iM.drive)({version:"v3",auth:t}),s=await i.files.export({fileId:n,mimeType:"application/pdf"},{responseType:"arraybuffer"}),u={name:r+".pdf",parents:[o]},h=Buffer.from(s.data,"base64"),y={mimeType:"application/pdf",body:new aM.Stream.PassThrough().end(h)};return(await i.files.create({requestBody:u,media:y,supportsAllDrives:!0})).data}});var cM=he(ze());var uM=re({auth:Y,name:"drive_trash_file",classification:"DESTRUCTIVE",displayName:"Trash File",description:"Move a Drive file to the trash by ID (reversible deletion).",audience:"ai",aiMetadata:{description:"Moves a file to the trash by ID \u2014 a reversible deletion restorable from Drive. Use for safe removal; for irreversible removal use drive_delete_file, and to restore use drive_untrash_file. Safe to retry \u2014 re-trashing leaves it trashed.",idempotent:!0},outputSchema:sz,props:{file_id:$.ShortText({displayName:"File ID",description:"The ID of the file to trash. Resolve it via drive_search_files or drive_get_file.",required:!0})},async run(e){let t=await de(e.auth),n=(0,cM.drive)({version:"v3",auth:t}),o={trashed:!0};return(await n.files.update({fileId:e.propsValue.file_id,supportsAllDrives:!0,requestBody:o})).data}});var lM=he(ze());var dM=re({auth:Y,name:"drive_untrash_file",classification:"WRITE",displayName:"Restore File from Trash",description:"Restore a trashed Drive file by ID back to its original location.",audience:"ai",aiMetadata:{description:"Restores a trashed file by ID back to its original location. Use to undo a `drive_trash_file`; to permanently purge instead use `drive_empty_trash` or `drive_delete_file`. Safe to retry \u2014 re-restoring an active file is a no-op.",idempotent:!0},outputSchema:cz,props:{file_id:$.ShortText({displayName:"File ID",description:"The ID of the trashed file to restore. Resolve it via drive_search_files or drive_get_file.",required:!0})},async run(e){let{file_id:t}=e.propsValue,n=await de(e.auth),o=(0,lM.drive)({version:"v3",auth:n});try{return(await o.files.update({fileId:t,supportsAllDrives:!0,requestBody:{trashed:!1}})).data}catch(r){throw r.code===404?new Error(`File not found (ID: ${t}). Resolve a valid ID via drive_search_files or drive_get_file.`):r.code===403?new Error(`Permission denied restoring file ${t}. You may lack permission to restore this resource.`):r}}});var pM=he(ze()),fM=re({auth:Y,name:"drive_delete_file",classification:"DESTRUCTIVE",displayName:"Delete File Permanently",description:"Permanently delete a Drive file by ID, bypassing the trash.",audience:"ai",aiMetadata:{description:"Permanently deletes a file by ID, bypassing the trash \u2014 unrecoverable. Use only when permanent removal is intended; for reversible deletion prefer drive_trash_file. A repeat call fails because the file no longer exists.",idempotent:!1},props:{file_id:$.ShortText({displayName:"File ID",description:"The ID of the file to permanently delete. Resolve it via drive_search_files or drive_get_file.",required:!0})},async run(e){let t=await de(e.auth);return(await(0,pM.drive)({version:"v3",auth:t}).files.delete({fileId:e.propsValue.file_id,supportsAllDrives:!0})).data}});var mM=he(ze());var hM=re({auth:Y,name:"drive_empty_trash",classification:"DESTRUCTIVE",displayName:"Empty Trash",description:"Permanently delete ALL files in the trash (irreversible, account-wide).",audience:"ai",aiMetadata:{description:"DESTRUCTIVE: permanently deletes EVERY file currently in the trash \u2014 this is an irreversible, account-wide purge (not a single file), or scoped to one shared drive if `drive_id` is given. The entire trash is emptied, so any file the user trashed is gone for good. Use only as a deliberate cleanup step; to remove a single file reversibly use `drive_trash_file`, and to permanently remove one specific file use `drive_delete_file`. Not safe to retry casually \u2014 it purges whatever is in the trash at call time.",idempotent:!1},outputSchema:Az,props:{drive_id:$.ShortText({displayName:"Shared Drive ID",description:"Optional. Restrict the purge to a single shared drive's trash (resolve via drive_list_shared_drives). Leave empty to empty the entire My Drive trash for the connected account.",required:!1})},async run(e){let{drive_id:t}=e.propsValue,n=await de(e.auth),o=(0,mM.drive)({version:"v3",auth:n});try{return await o.files.emptyTrash({...t?{driveId:t}:{}}),{success:!0,driveId:t??null}}catch(r){throw r.code===403?new Error("Permission denied emptying the trash. You may lack permission to empty this trash."):r}}});var gM=he(ze());var yM=re({auth:Y,name:"drive_share_file",classification:"WRITE",displayName:"Share File with User",description:"Grant a role on a Drive file or folder to a user by email.",audience:"ai",aiMetadata:{description:"Grants a role to a user (by email) on a file or folder, optionally emailing them. Use to share with a specific person; to share with anyone-with-the-link use drive_set_public_access, and to change an existing collaborator's role use drive_update_permission. Each call creates a new permission grant.",idempotent:!1},outputSchema:nz,props:{file_id:$.ShortText({displayName:"File or Folder ID",description:"The ID of the file or folder to share. Resolve it via drive_search_files or drive_get_file.",required:!0}),user_email:$.ShortText({displayName:"User Email",description:"The email address of the user to grant access to.",required:!0}),role:$.StaticDropdown({displayName:"Role",description:"The role to grant to the user. See https://developers.google.com/drive/api/guides/ref-roles",required:!0,options:{options:[{label:"Organizer",value:"organizer"},{label:"File Organizer",value:"fileOrganizer"},{label:"Writer",value:"writer"},{label:"Commenter",value:"commenter"},{label:"Reader",value:"reader"}]}}),send_invitation_email:$.Checkbox({displayName:"Send Invitation Email",description:"Send an email to the user to notify them of the new permission.",required:!0})},async run(e){let{file_id:t,user_email:n,role:o,send_invitation_email:r}=e.propsValue,i=await de(e.auth),s=(0,gM.drive)({version:"v3",auth:i}),u={type:"user",role:o,emailAddress:n};return(await s.permissions.create({requestBody:u,fileId:t,sendNotificationEmail:r,supportsAllDrives:!0})).data}});var vM=he(ze());var _M=re({auth:Y,name:"drive_set_public_access",classification:"WRITE",displayName:"Set Public Access",description:"Make a Drive file or folder accessible to anyone with the link.",audience:"ai",aiMetadata:{description:"Makes a file or folder accessible to anyone with the link at the chosen role and returns its shareable view/download URL. Use to publish a resource publicly; to share with a named person instead use drive_share_file. Each call adds a new anyone-with-link permission.",idempotent:!1},outputSchema:iz,props:{file_id:$.ShortText({displayName:"File or Folder ID",description:"The ID of the file or folder to make public. Resolve it via drive_search_files or drive_get_file.",required:!0}),role:$.StaticDropdown({displayName:"Role",description:"The role to assign for public access.",options:{options:[{label:"Reader",value:"reader"},{label:"Commenter",value:"commenter"},{label:"Editor",value:"writer"}]},defaultValue:"reader",required:!0})},async run(e){let t=await de(e.auth),n=e.propsValue.file_id,o=e.propsValue.role,r=(0,vM.drive)({version:"v3",auth:t}),i={role:o,type:"anyone"},s=await r.permissions.create({fileId:n,requestBody:i,supportsAllDrives:!0}),u=await r.files.get({fileId:n,fields:"name,mimeType,webContentLink,webViewLink",supportsAllDrives:!0});if(u.data.mimeType==="application/vnd.google-apps.folder")return{...s.data,webViewLink:u.data.webViewLink,downloadUrl:null};let h=await Zt(e.auth,e.files,n,u.data.name);return{...s.data,downloadUrl:h}}});var PM=he(ze());var wM=re({auth:Y,name:"drive_list_permissions",classification:"SEARCH",displayName:"List Permissions",description:"List every permission on a Drive file or folder.",audience:"ai",aiMetadata:{description:"Lists every permission (who has access and at what role) on a file or folder, with each permission's id, type, role, and email/domain. Use to audit sharing before granting or revoking; it is the resolver for the permissionId other sharing atomics need. Read-only.",idempotent:!0},outputSchema:oz,props:{file_id:$.ShortText({displayName:"File or Folder ID",description:"The ID of the file or folder whose permissions to list. Resolve it via drive_search_files or drive_get_file.",required:!0})},async run(e){let{file_id:t}=e.propsValue,n=await de(e.auth),o=(0,PM.drive)({version:"v3",auth:n});try{let i=(await o.permissions.list({fileId:t,fields:"permissions(id,type,role,emailAddress,domain)",supportsAllDrives:!0})).data.permissions??[];return{permissions:i,count:i.length}}catch(r){throw r.code===404?new Error(`File or folder not found (ID: ${t}). Resolve a valid ID via drive_search_files or drive_get_file.`):r.code===403?new Error(`Permission denied listing permissions for file ${t}. You may lack access to this resource.`):r}}});var bM=he(ze());var TM=re({auth:Y,name:"drive_update_permission",classification:"WRITE",displayName:"Update Permission Role",description:"Change an existing collaborator's role on a Drive file or folder.",audience:"ai",aiMetadata:{description:"Changes an existing collaborator's role in place (e.g. reader to writer), resolving the permission by their email internally. Use to upgrade or downgrade access without unsharing; to grant net-new access use drive_share_file. If the user has no existing grant it is a no-op (it never silently creates one). Safe to retry.",idempotent:!0},outputSchema:az,props:{file_id:$.ShortText({displayName:"File or Folder ID",description:"The ID of the file or folder whose permission to update. Resolve it via drive_search_files or drive_get_file.",required:!0}),user_email:$.ShortText({displayName:"User Email",description:"The email address of the collaborator whose role to change. The existing permission is matched by this email; list current grants via drive_list_permissions.",required:!0}),new_role:$.StaticDropdown({displayName:"New Role",description:"The role to set for the user. See https://developers.google.com/drive/api/guides/ref-roles",required:!0,options:{options:[{label:"Organizer",value:"organizer"},{label:"File Organizer",value:"fileOrganizer"},{label:"Writer",value:"writer"},{label:"Commenter",value:"commenter"},{label:"Reader",value:"reader"}]}})},async run(e){let{file_id:t,user_email:n,new_role:o}=e.propsValue,r=await de(e.auth),i=(0,bM.drive)({version:"v3",auth:r});try{let h=((await i.permissions.list({fileId:t,fields:"permissions(id,emailAddress,role)",supportsAllDrives:!0})).data.permissions??[]).find(y=>y.emailAddress===n);return!h||!h.id?{updated:!1,message:`No existing permission found for ${n}. Use drive_share_file to grant new access.`}:{updated:!0,permission:(await i.permissions.update({fileId:t,permissionId:h.id,requestBody:{role:o},supportsAllDrives:!0})).data}}catch(s){throw s.code===404?new Error(`File or folder not found (ID: ${t}). Resolve a valid ID via drive_search_files or drive_get_file.`):s.code===403?new Error(`Permission denied updating the role on file ${t}. You may lack permission to manage sharing on this resource.`):s}}});var EM=he(ze());var SM=re({auth:Y,name:"drive_remove_permission",classification:"DESTRUCTIVE",displayName:"Remove Permission",description:"Revoke a role from a user on a Drive file or folder.",audience:"ai",aiMetadata:{description:"Revokes a specific role from a user (matched by email and role) on a file or folder, resolving the permission ID internally. Use to unshare or remove access; to lower a role instead of removing it use drive_update_permission. Safe to retry \u2014 if no matching permission exists it is a no-op.",idempotent:!0},outputSchema:Rz,props:{file_id:$.ShortText({displayName:"File or Folder ID",description:"The ID of the file or folder to remove the permission from. Resolve it via drive_search_files or drive_get_file.",required:!0}),user_email:$.ShortText({displayName:"User Email",description:"The email address of the user whose access to revoke.",required:!0}),role:$.StaticDropdown({displayName:"Role",description:"The role to remove from the user. The grant is matched by email and role.",required:!0,options:{options:[{label:"Organizer",value:"organizer"},{label:"File Organizer",value:"fileOrganizer"},{label:"Writer",value:"writer"},{label:"Commenter",value:"commenter"},{label:"Reader",value:"reader"}]}})},async run(e){let[t,n]=[e.propsValue.file_id,e.propsValue.user_email],o=await de(e.auth),r=(0,EM.drive)({version:"v3",auth:o}),i=await r.permissions.list({fileId:t,fields:"permissions(id, emailAddress, role)",supportsAllDrives:!0});if(i.data.permissions){for(let s of i.data.permissions)if(s.emailAddress===n&&s.role===e.propsValue.role)return await r.permissions.delete({fileId:t,permissionId:s.id?s.id:"",supportsAllDrives:!0}),{removed:!0,message:"Permission removed"}}return{removed:!1,message:"Permission not found"}}});var xM=he(ze());var IM=re({auth:Y,name:"drive_list_shared_drives",classification:"SEARCH",displayName:"List Shared Drives",description:"List the shared drives the account can access.",audience:"ai",aiMetadata:{description:"Lists the shared drives the account can access, with each drive's id and name. Use to discover a driveId before creating or listing content in a shared drive or before drive_get_shared_drive, drive_update_shared_drive, or drive_delete_shared_drive. Read-only.",idempotent:!0},outputSchema:dz,props:{query:$.ShortText({displayName:"Query",description:"Optional search query to filter shared drives, e.g. name contains 'marketing'. See https://developers.google.com/drive/api/guides/search-shareddrives",required:!1}),page_size:$.Number({displayName:"Page Size",description:"Maximum number of shared drives to return (1-100). Defaults to 100.",required:!1})},async run(e){let{query:t,page_size:n}=e.propsValue,o=await de(e.auth),r=(0,xM.drive)({version:"v3",auth:o});try{let s=(await r.drives.list({q:t||void 0,pageSize:n||void 0})).data.drives??[];return{drives:s,count:s.length}}catch(i){throw i.code===403?new Error("Permission denied listing shared drives. Your account may not have shared-drive access."):i}}});var AM=he(ze());var RM=re({auth:Y,name:"drive_get_shared_drive",classification:"READ",displayName:"Get Shared Drive",description:"Fetch metadata for one shared drive by ID.",audience:"ai",aiMetadata:{description:"Fetches metadata and capabilities for one shared drive by ID (resolve the ID via drive_list_shared_drives). Use to inspect a shared drive's settings before modifying it. Read-only.",idempotent:!0},outputSchema:pz,props:{drive_id:$.ShortText({displayName:"Shared Drive ID",description:"The ID of the shared drive. Resolve it via drive_list_shared_drives.",required:!0})},async run(e){let{drive_id:t}=e.propsValue,n=await de(e.auth),o=(0,AM.drive)({version:"v3",auth:n});try{return(await o.drives.get({driveId:t})).data}catch(r){throw r.code===404?new Error(`Shared drive not found (ID: ${t}). Resolve a valid ID via drive_list_shared_drives.`):r.code===403?new Error(`Permission denied accessing shared drive ${t}. You may not be a member of this drive.`):r}}});var DM=require("crypto");var OM=he(ze());var $M=re({auth:Y,name:"drive_create_shared_drive",classification:"WRITE",displayName:"Create Shared Drive",description:"Create a new shared drive (Team Drive).",audience:"ai",aiMetadata:{description:"Creates a new shared drive (Team Drive) with the given name; the action supplies the required idempotency requestId internally. Use to set up a shared workspace. Each call creates a distinct shared drive. Your Workspace admin must have shared-drive creation enabled (a 403 here is an admin-policy issue, not a scope issue).",idempotent:!1},outputSchema:wz,props:{name:$.ShortText({displayName:"Name",description:"The name of the new shared drive.",required:!0})},async run(e){let{name:t}=e.propsValue,n=await de(e.auth),o=(0,OM.drive)({version:"v3",auth:n}),r=(0,DM.randomUUID)();try{return(await o.drives.create({requestId:r,requestBody:{name:t}})).data}catch(i){throw i.code===403?new Error("Permission denied creating a shared drive. Your Google Workspace admin may have disabled shared-drive creation for your account."):i}}});var CM=he(ze());var NM=re({auth:Y,name:"drive_update_shared_drive",classification:"WRITE",displayName:"Update Shared Drive",description:"Rename or update a shared drive by ID.",audience:"ai",aiMetadata:{description:"Renames or updates a shared drive's settings by ID (resolve via drive_list_shared_drives). Use to rename a shared drive; to remove it entirely use drive_delete_shared_drive. Safe to retry \u2014 re-applying the same values is a no-op.",idempotent:!0},outputSchema:bz,props:{drive_id:$.ShortText({displayName:"Shared Drive ID",description:"The ID of the shared drive to update. Resolve it via drive_list_shared_drives.",required:!0}),name:$.ShortText({displayName:"Name",description:"The new name for the shared drive. Leave empty to keep the current name.",required:!1})},async run(e){let{drive_id:t,name:n}=e.propsValue,o=await de(e.auth),r=(0,CM.drive)({version:"v3",auth:o}),i={};n&&(i.name=n);try{return(await r.drives.update({driveId:t,requestBody:i})).data}catch(s){throw s.code===404?new Error(`Shared drive not found (ID: ${t}). Resolve a valid ID via drive_list_shared_drives.`):s.code===403?new Error(`Permission denied updating shared drive ${t}. You must be an organizer of this drive.`):s}}});var kM=he(ze());var zM=re({auth:Y,name:"drive_delete_shared_drive",classification:"DESTRUCTIVE",displayName:"Delete Shared Drive",description:"Permanently delete a shared drive by ID.",audience:"ai",aiMetadata:{description:"Permanently deletes a shared drive by ID (it must already be empty). Irreversible. Use only to remove a no-longer-needed shared drive. A repeat call fails because the drive no longer exists.",idempotent:!1},outputSchema:Iz,props:{drive_id:$.ShortText({displayName:"Shared Drive ID",description:"The ID of the shared drive to delete. Resolve it via drive_list_shared_drives.",required:!0})},async run(e){let{drive_id:t}=e.propsValue,n=await de(e.auth),o=(0,kM.drive)({version:"v3",auth:n});try{return await o.drives.delete({driveId:t}),{deleted:!0,driveId:t}}catch(r){throw r.code===404?new Error(`Shared drive not found (ID: ${t}). It may have already been deleted. Resolve a valid ID via drive_list_shared_drives.`):r.code===400?new Error(`Cannot delete shared drive ${t}: it must be empty before deletion. Remove or trash all of its files first.`):r.code===403?new Error(`Permission denied deleting shared drive ${t}. You must be an organizer of this drive.`):r}}});var UM=he(ze());var MM=re({auth:Y,name:"drive_create_comment",classification:"WRITE",displayName:"Create Comment",description:"Add a new comment to a Drive file.",audience:"ai",aiMetadata:{description:"Adds a new top-level comment to a file. Use to leave feedback or a note on a file (resolve the file ID via drive_search_files); to respond to an existing comment use drive_create_reply instead. Each call creates a new comment, so retries duplicate.",idempotent:!1},outputSchema:hz,props:{file_id:$.ShortText({displayName:"File ID",description:"The ID of the file to comment on. Resolve it via drive_search_files or drive_get_file.",required:!0}),content:$.LongText({displayName:"Content",description:"The plain-text content of the comment.",required:!0})},async run(e){let{file_id:t,content:n}=e.propsValue,o=await de(e.auth),r=(0,UM.drive)({version:"v3",auth:o});try{return(await r.comments.create({fileId:t,fields:"*",requestBody:{content:n}})).data}catch(i){throw i.code===404?new Error(`File not found (ID: ${t}). Resolve a valid ID via drive_search_files or drive_get_file.`):i.code===403?new Error(`Permission denied commenting on file ${t}. You may lack comment access to this file.`):i}}});var FM=he(ze());var LM=re({auth:Y,name:"drive_list_comments",classification:"SEARCH",displayName:"List Comments",description:"List the comments on a Drive file.",audience:"ai",aiMetadata:{description:"Lists the comments on a file with each comment's id, author, content, and resolved state. Use to read discussion on a file or to resolve a commentId before replying (drive_create_reply) or listing its replies (drive_list_replies). Read-only.",idempotent:!0},outputSchema:fz,props:{file_id:$.ShortText({displayName:"File ID",description:"The ID of the file whose comments to list. Resolve it via drive_search_files or drive_get_file.",required:!0})},async run(e){let{file_id:t}=e.propsValue,n=await de(e.auth),o=(0,FM.drive)({version:"v3",auth:n});try{let i=(await o.comments.list({fileId:t,fields:"*",includeDeleted:!1})).data.comments??[];return{comments:i,count:i.length}}catch(r){throw r.code===404?new Error(`File not found (ID: ${t}). Resolve a valid ID via drive_search_files or drive_get_file.`):r.code===403?new Error(`Permission denied listing comments for file ${t}. You may lack access to this file.`):r}}});var jM=he(ze());var qM=re({auth:Y,name:"drive_create_reply",classification:"WRITE",displayName:"Reply to Comment",description:"Add a reply to an existing comment on a Drive file.",audience:"ai",aiMetadata:{description:"Adds a reply to an existing comment, optionally resolving or reopening the comment via the action field. Use to respond to a comment (resolve the commentId via drive_list_comments); to start a new top-level comment use drive_create_comment instead. Each call creates a new reply, so retries duplicate.",idempotent:!1},outputSchema:mz,props:{file_id:$.ShortText({displayName:"File ID",description:"The ID of the file the comment belongs to. Resolve it via drive_search_files or drive_get_file.",required:!0}),comment_id:$.ShortText({displayName:"Comment ID",description:"The ID of the comment to reply to. Resolve it via drive_list_comments.",required:!0}),content:$.LongText({displayName:"Content",description:"The plain-text content of the reply.",required:!0}),action:$.StaticDropdown({displayName:"Action",description:"Optionally change the parent comment's state: resolve (mark resolved) or reopen.",required:!1,options:{options:[{label:"Resolve",value:"resolve"},{label:"Reopen",value:"reopen"}]}})},async run(e){let{file_id:t,comment_id:n,content:o,action:r}=e.propsValue,i=await de(e.auth),s=(0,jM.drive)({version:"v3",auth:i}),u={content:o};r&&(u.action=r);try{return(await s.replies.create({fileId:t,commentId:n,fields:"*",requestBody:u})).data}catch(h){throw h.code===404?new Error(`File or comment not found (file ID: ${t}, comment ID: ${n}). Resolve the comment ID via drive_list_comments.`):h.code===403?new Error(`Permission denied replying to comment ${n} on file ${t}. You may lack comment access to this file.`):h}}});var BM=he(ze());var VM=re({auth:Y,name:"drive_get_reply",classification:"READ",displayName:"Get Reply",description:"Fetch a single reply on a Drive comment by ID.",audience:"ai",aiMetadata:{description:"Fetches a single reply by ID, including its author, content, and action. Use when you already have a replyId (resolve it via drive_list_replies) and need that one reply's details. Read-only.",idempotent:!0},outputSchema:gz,props:{file_id:$.ShortText({displayName:"File ID",description:"The ID of the file the comment belongs to. Resolve it via drive_search_files or drive_get_file.",required:!0}),comment_id:$.ShortText({displayName:"Comment ID",description:"The ID of the parent comment. Resolve it via drive_list_comments.",required:!0}),reply_id:$.ShortText({displayName:"Reply ID",description:"The ID of the reply to fetch. Resolve it via drive_list_replies.",required:!0})},async run(e){let{file_id:t,comment_id:n,reply_id:o}=e.propsValue,r=await de(e.auth),i=(0,BM.drive)({version:"v3",auth:r});try{return(await i.replies.get({fileId:t,commentId:n,replyId:o,fields:"*"})).data}catch(s){throw s.code===404?new Error(`File, comment, or reply not found (file ID: ${t}, comment ID: ${n}, reply ID: ${o}). Resolve the reply ID via drive_list_replies.`):s.code===403?new Error(`Permission denied fetching reply ${o} on file ${t}. You may lack access to this file.`):s}}});var GM=he(ze());var HM=re({auth:Y,name:"drive_list_replies",classification:"SEARCH",displayName:"List Replies",description:"List the replies under a Drive comment.",audience:"ai",aiMetadata:{description:"Lists the replies under a given comment with each reply's id, author, content, and action. Use to read a comment thread or to resolve a replyId before fetching (drive_get_reply), editing (drive_update_reply), or deleting (drive_delete_reply) a reply. Read-only.",idempotent:!0},outputSchema:yz,props:{file_id:$.ShortText({displayName:"File ID",description:"The ID of the file the comment belongs to. Resolve it via drive_search_files or drive_get_file.",required:!0}),comment_id:$.ShortText({displayName:"Comment ID",description:"The ID of the comment whose replies to list. Resolve it via drive_list_comments.",required:!0})},async run(e){let{file_id:t,comment_id:n}=e.propsValue,o=await de(e.auth),r=(0,GM.drive)({version:"v3",auth:o});try{let s=(await r.replies.list({fileId:t,commentId:n,fields:"*"})).data.replies??[];return{replies:s,count:s.length}}catch(i){throw i.code===404?new Error(`File or comment not found (file ID: ${t}, comment ID: ${n}). Resolve the comment ID via drive_list_comments.`):i.code===403?new Error(`Permission denied listing replies for comment ${n} on file ${t}. You may lack access to this file.`):i}}});var ZM=he(ze());var WM=re({auth:Y,name:"drive_update_reply",classification:"WRITE",displayName:"Update Reply",description:"Edit the text of an existing reply on a Drive comment.",audience:"ai",aiMetadata:{description:"Edits the text of an existing reply by ID (resolve via drive_list_replies). Use to correct or revise a reply you control; to add a new reply instead use drive_create_reply. Safe to retry \u2014 re-applying the same content is a no-op.",idempotent:!0},outputSchema:vz,props:{file_id:$.ShortText({displayName:"File ID",description:"The ID of the file the comment belongs to. Resolve it via drive_search_files or drive_get_file.",required:!0}),comment_id:$.ShortText({displayName:"Comment ID",description:"The ID of the parent comment. Resolve it via drive_list_comments.",required:!0}),reply_id:$.ShortText({displayName:"Reply ID",description:"The ID of the reply to update. Resolve it via drive_list_replies.",required:!0}),content:$.LongText({displayName:"Content",description:"The new plain-text content for the reply.",required:!0})},async run(e){let{file_id:t,comment_id:n,reply_id:o,content:r}=e.propsValue,i=await de(e.auth),s=(0,ZM.drive)({version:"v3",auth:i});try{return(await s.replies.update({fileId:t,commentId:n,replyId:o,fields:"*",requestBody:{content:r}})).data}catch(u){throw u.code===404?new Error(`File, comment, or reply not found (file ID: ${t}, comment ID: ${n}, reply ID: ${o}). Resolve the reply ID via drive_list_replies.`):u.code===403?new Error(`Permission denied updating reply ${o} on file ${t}. You can only edit your own replies.`):u}}});var KM=he(ze());var JM=re({auth:Y,name:"drive_delete_reply",classification:"DESTRUCTIVE",displayName:"Delete Reply",description:"Permanently delete a reply on a Drive comment by ID.",audience:"ai",aiMetadata:{description:"Permanently deletes a reply by ID (resolve via drive_list_replies). Use to remove a reply you control; to edit it instead use drive_update_reply. A repeat call fails because the reply is already gone, so it is not safe to retry blindly.",idempotent:!1},outputSchema:xz,props:{file_id:$.ShortText({displayName:"File ID",description:"The ID of the file the comment belongs to. Resolve it via drive_search_files or drive_get_file.",required:!0}),comment_id:$.ShortText({displayName:"Comment ID",description:"The ID of the parent comment. Resolve it via drive_list_comments.",required:!0}),reply_id:$.ShortText({displayName:"Reply ID",description:"The ID of the reply to delete. Resolve it via drive_list_replies.",required:!0})},async run(e){let{file_id:t,comment_id:n,reply_id:o}=e.propsValue,r=await de(e.auth),i=(0,KM.drive)({version:"v3",auth:r});try{return await i.replies.delete({fileId:t,commentId:n,replyId:o}),{success:!0,reply_id:o}}catch(s){throw s.code===404?new Error(`File, comment, or reply not found (file ID: ${t}, comment ID: ${n}, reply ID: ${o}). It may already be deleted. Resolve the reply ID via drive_list_replies.`):s.code===403?new Error(`Permission denied deleting reply ${o} on file ${t}. You can only delete your own replies.`):s}}});var XM=he(ze());var YM=re({auth:Y,name:"drive_get_about",classification:"READ",displayName:"Get Account & Storage Info",description:"Get the authenticated Drive account, storage quota, and supported formats.",audience:"ai",aiMetadata:{description:"Returns the authenticated user's Drive info: account identity, storage quota and usage, and supported import/export formats. Use to check available space before a large upload, confirm which account is connected, or look up valid export MIME types. Read-only.",idempotent:!0},outputSchema:lz,props:{},async run(e){let t=await de(e.auth),n=(0,XM.drive)({version:"v3",auth:t});try{return(await n.about.get({fields:"user,storageQuota,maxImportSizes,exportFormats"})).data}catch(o){throw o.code===403?new Error("Permission denied fetching Drive account info. The connection may lack the required Drive scope."):o}}});var qJ=VA({minimumSupportedRelease:"0.88.2",logoUrl:"https://cdn.activepieces.com/pieces/google-drive.png",categories:["CONTENT_AND_FILES"],displayName:"Google Drive",description:"Cloud storage and file backup",authors:["BastienMe","ArmanGiau3","Vitalini","pfernandez98","kanarelo","Salem-Alaa","kishanprmr","MoShizzle","AbdulTheActivePiecer","khaledmashaly","abuaboud","geekyme"],triggers:[cU,lU,hU],actions:[Cz,kz,oU,Wz,jz,Zz,tU,Fz,Xz,Oz,Uz,_U,wU,TU,SU,OU,CU,kU,MU,jU,BU,VU,ZU,KU,JU,YU,eM,rM,oM,sM,uM,dM,fM,hM,yM,_M,wM,TM,SM,IM,RM,$M,NM,zM,MM,LM,qM,VM,HM,WM,JM,YM,n0({baseUrl:a(()=>"https://www.googleapis.com/drive/v3","baseUrl"),auth:Y,authMapping:a(async e=>({Authorization:`Bearer ${await bt(e)}`}),"authMapping")})],auth:Y});0&&(module.exports={createGoogleClient,getAccessToken,googleDrive,googleDriveAuth});
113
113
  /*! Bundled license information:
114
114
 
115
115
  mime-types/index.js: