@activepieces/piece-camb-ai 0.1.6 → 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.js +5 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@activepieces/piece-camb-ai",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "type": "commonjs",
5
5
  "main": "./src/index.js",
6
6
  "dependencies": {},
package/src/index.js CHANGED
@@ -1,13 +1,13 @@
1
- "use strict";var Zs=Object.create;var et=Object.defineProperty;var Vs=Object.getOwnPropertyDescriptor;var Hs=Object.getOwnPropertyNames;var Gs=Object.getPrototypeOf,Ws=Object.prototype.hasOwnProperty;var o=(e,t)=>et(e,"name",{value:t,configurable:!0});var E=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),gn=(e,t)=>{for(var r in t)et(e,r,{get:t[r],enumerable:!0})},yn=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Hs(t))!Ws.call(e,i)&&i!==r&&et(e,i,{get:()=>t[i],enumerable:!(n=Vs(t,i))||n.enumerable});return e};var ke=(e,t,r)=>(r=e!=null?Zs(Gs(e)):{},yn(t||!e||!e.__esModule?et(r,"default",{value:e,enumerable:!0}):r,e)),qs=e=>yn(et({},"__esModule",{value:!0}),e);var No=E((Ro,Zt)=>{(function(e){"use strict";let t="(0?\\d+|0x[a-f0-9]+)",r={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")},n=new RegExp("^0[0-7]+$","i"),i=new RegExp("^0x[a-f0-9]+$","i"),u="%[0-9a-z]{1,}",c="(?:[0-9a-f]+::?)+",d={zoneIndex:new RegExp(u,"i"),native:new RegExp(`^(::)?(${c})?([0-9a-f]+)?(::)?(${u})?$`,"i"),deprecatedTransitional:new RegExp(`^(?:::)(${t}\\.${t}\\.${t}\\.${t}(${u})?)$`,"i"),transitional:new RegExp(`^((?:${c})|(?:::)(?:${c})?)${t}\\.${t}\\.${t}\\.${t}(${u})?$`,"i")};function f(s,l){if(s.indexOf("::")!==s.lastIndexOf("::"))return null;let g=0,m=-1,v=(s.match(d.zoneIndex)||[])[0],P,U;for(v&&(v=v.substring(1),s=s.replace(/%.+$/,""));(m=s.indexOf(":",m+1))>=0;)g++;if(s.substr(0,2)==="::"&&g--,s.substr(-2,2)==="::"&&g--,g>l)return null;for(U=l-g,P=":";U--;)P+="0:";return s=s.replace("::",P),s[0]===":"&&(s=s.slice(1)),s[s.length-1]===":"&&(s=s.slice(0,-1)),l=function(){let ee=s.split(":"),ae=[];for(let Qe=0;Qe<ee.length;Qe++)ae.push(parseInt(ee[Qe],16));return ae}(),{parts:l,zoneId:v}}o(f,"expandIPv6");function y(s,l,g,m){if(s.length!==l.length)throw new Error("ipaddr: cannot match CIDR for objects with different lengths");let v=0,P;for(;m>0;){if(P=g-m,P<0&&(P=0),s[v]>>P!==l[v]>>P)return!1;m-=g,v+=1}return!0}o(y,"matchCIDR");function _(s){if(i.test(s))return parseInt(s,16);if(s[0]==="0"&&!isNaN(parseInt(s[1],10))){if(n.test(s))return parseInt(s,8);throw new Error(`ipaddr: cannot parse ${s} as octal`)}return parseInt(s,10)}o(_,"parseIntAuto");function b(s,l){for(;s.length<l;)s=`0${s}`;return s}o(b,"padPart");let x={};x.IPv4=function(){function s(l){if(l.length!==4)throw new Error("ipaddr: ipv4 octet count should be 4");let g,m;for(g=0;g<l.length;g++)if(m=l[g],!(0<=m&&m<=255))throw new Error("ipaddr: ipv4 octet should fit in 8 bits");this.octets=l}return o(s,"IPv4"),s.prototype.SpecialRanges={unspecified:[[new s([0,0,0,0]),8]],broadcast:[[new s([255,255,255,255]),32]],multicast:[[new s([224,0,0,0]),4]],linkLocal:[[new s([169,254,0,0]),16]],loopback:[[new s([127,0,0,0]),8]],carrierGradeNat:[[new s([100,64,0,0]),10]],private:[[new s([10,0,0,0]),8],[new s([172,16,0,0]),12],[new s([192,168,0,0]),16]],reserved:[[new s([192,0,0,0]),24],[new s([192,0,2,0]),24],[new s([192,88,99,0]),24],[new s([198,18,0,0]),15],[new s([198,51,100,0]),24],[new s([203,0,113,0]),24],[new s([240,0,0,0]),4]],as112:[[new s([192,175,48,0]),24],[new s([192,31,196,0]),24]],amt:[[new s([192,52,193,0]),24]]},s.prototype.kind=function(){return"ipv4"},s.prototype.match=function(l,g){let m;if(g===void 0&&(m=l,l=m[0],g=m[1]),l.kind()!=="ipv4")throw new Error("ipaddr: cannot match ipv4 address with non-ipv4 one");return y(this.octets,l.octets,8,g)},s.prototype.prefixLengthFromSubnetMask=function(){let l=0,g=!1,m={0:8,128:7,192:6,224:5,240:4,248:3,252:2,254:1,255:0},v,P,U;for(v=3;v>=0;v-=1)if(P=this.octets[v],P in m){if(U=m[P],g&&U!==0)return null;U!==8&&(g=!0),l+=U}else return null;return 32-l},s.prototype.range=function(){return x.subnetMatch(this,this.SpecialRanges)},s.prototype.toByteArray=function(){return this.octets.slice(0)},s.prototype.toIPv4MappedAddress=function(){return x.IPv6.parse(`::ffff:${this.toString()}`)},s.prototype.toNormalizedString=function(){return this.toString()},s.prototype.toString=function(){return this.octets.join(".")},s}(),x.IPv4.broadcastAddressFromCIDR=function(s){try{let l=this.parseCIDR(s),g=l[0].toByteArray(),m=this.subnetMaskFromPrefixLength(l[1]).toByteArray(),v=[],P=0;for(;P<4;)v.push(parseInt(g[P],10)|parseInt(m[P],10)^255),P++;return new this(v)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},x.IPv4.isIPv4=function(s){return this.parser(s)!==null},x.IPv4.isValid=function(s){try{return new this(this.parser(s)),!0}catch{return!1}},x.IPv4.isValidCIDR=function(s){try{return this.parseCIDR(s),!0}catch{return!1}},x.IPv4.isValidFourPartDecimal=function(s){return!!(x.IPv4.isValid(s)&&s.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/))},x.IPv4.isValidCIDRFourPartDecimal=function(s){let l=s.match(/^(.+)\/(\d+)$/);return!x.IPv4.isValidCIDR(s)||!l?!1:x.IPv4.isValidFourPartDecimal(l[1])},x.IPv4.networkAddressFromCIDR=function(s){let l,g,m,v,P;try{for(l=this.parseCIDR(s),m=l[0].toByteArray(),P=this.subnetMaskFromPrefixLength(l[1]).toByteArray(),v=[],g=0;g<4;)v.push(parseInt(m[g],10)&parseInt(P[g],10)),g++;return new this(v)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},x.IPv4.parse=function(s){let l=this.parser(s);if(l===null)throw new Error("ipaddr: string is not formatted like an IPv4 Address");return new this(l)},x.IPv4.parseCIDR=function(s){let l;if(l=s.match(/^(.+)\/(\d+)$/)){let g=parseInt(l[2]);if(g>=0&&g<=32){let m=[this.parse(l[1]),g];return Object.defineProperty(m,"toString",{value:o(function(){return this.join("/")},"value")}),m}}throw new Error("ipaddr: string is not formatted like an IPv4 CIDR range")},x.IPv4.parser=function(s){let l,g,m;if(l=s.match(r.fourOctet))return function(){let v=l.slice(1,6),P=[];for(let U=0;U<v.length;U++)g=v[U],P.push(_(g));return P}();if(l=s.match(r.longValue)){if(m=_(l[1]),m>4294967295||m<0)throw new Error("ipaddr: address outside defined range");return function(){let v=[],P;for(P=0;P<=24;P+=8)v.push(m>>P&255);return v}().reverse()}else return(l=s.match(r.twoOctet))?function(){let v=l.slice(1,4),P=[];if(m=_(v[1]),m>16777215||m<0)throw new Error("ipaddr: address outside defined range");return P.push(_(v[0])),P.push(m>>16&255),P.push(m>>8&255),P.push(m&255),P}():(l=s.match(r.threeOctet))?function(){let v=l.slice(1,5),P=[];if(m=_(v[2]),m>65535||m<0)throw new Error("ipaddr: address outside defined range");return P.push(_(v[0])),P.push(_(v[1])),P.push(m>>8&255),P.push(m&255),P}():null},x.IPv4.subnetMaskFromPrefixLength=function(s){if(s=parseInt(s),s<0||s>32)throw new Error("ipaddr: invalid IPv4 prefix length");let l=[0,0,0,0],g=0,m=Math.floor(s/8);for(;g<m;)l[g]=255,g++;return m<4&&(l[m]=Math.pow(2,s%8)-1<<8-s%8),new this(l)},x.IPv6=function(){function s(l,g){let m,v;if(l.length===16)for(this.parts=[],m=0;m<=14;m+=2)this.parts.push(l[m]<<8|l[m+1]);else if(l.length===8)this.parts=l;else throw new Error("ipaddr: ipv6 part count should be 8 or 16");for(m=0;m<this.parts.length;m++)if(v=this.parts[m],!(0<=v&&v<=65535))throw new Error("ipaddr: ipv6 part should fit in 16 bits");g&&(this.zoneId=g)}return o(s,"IPv6"),s.prototype.SpecialRanges={unspecified:[new s([0,0,0,0,0,0,0,0]),128],linkLocal:[new s([65152,0,0,0,0,0,0,0]),10],multicast:[new s([65280,0,0,0,0,0,0,0]),8],loopback:[new s([0,0,0,0,0,0,0,1]),128],uniqueLocal:[new s([64512,0,0,0,0,0,0,0]),7],ipv4Mapped:[new s([0,0,0,0,0,65535,0,0]),96],discard:[new s([256,0,0,0,0,0,0,0]),64],rfc6145:[new s([0,0,0,0,65535,0,0,0]),96],rfc6052:[new s([100,65435,0,0,0,0,0,0]),96],"6to4":[new s([8194,0,0,0,0,0,0,0]),16],teredo:[new s([8193,0,0,0,0,0,0,0]),32],benchmarking:[new s([8193,2,0,0,0,0,0,0]),48],amt:[new s([8193,3,0,0,0,0,0,0]),32],as112v6:[[new s([8193,4,274,0,0,0,0,0]),48],[new s([9760,79,32768,0,0,0,0,0]),48]],deprecated:[new s([8193,16,0,0,0,0,0,0]),28],orchid2:[new s([8193,32,0,0,0,0,0,0]),28],droneRemoteIdProtocolEntityTags:[new s([8193,48,0,0,0,0,0,0]),28],reserved:[[new s([8193,0,0,0,0,0,0,0]),23],[new s([8193,3512,0,0,0,0,0,0]),32]]},s.prototype.isIPv4MappedAddress=function(){return this.range()==="ipv4Mapped"},s.prototype.kind=function(){return"ipv6"},s.prototype.match=function(l,g){let m;if(g===void 0&&(m=l,l=m[0],g=m[1]),l.kind()!=="ipv6")throw new Error("ipaddr: cannot match ipv6 address with non-ipv6 one");return y(this.parts,l.parts,16,g)},s.prototype.prefixLengthFromSubnetMask=function(){let l=0,g=!1,m={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},v,P;for(let U=7;U>=0;U-=1)if(v=this.parts[U],v in m){if(P=m[v],g&&P!==0)return null;P!==16&&(g=!0),l+=P}else return null;return 128-l},s.prototype.range=function(){return x.subnetMatch(this,this.SpecialRanges)},s.prototype.toByteArray=function(){let l,g=[],m=this.parts;for(let v=0;v<m.length;v++)l=m[v],g.push(l>>8),g.push(l&255);return g},s.prototype.toFixedLengthString=function(){let l=function(){let m=[];for(let v=0;v<this.parts.length;v++)m.push(b(this.parts[v].toString(16),4));return m}.call(this).join(":"),g="";return this.zoneId&&(g=`%${this.zoneId}`),l+g},s.prototype.toIPv4Address=function(){if(!this.isIPv4MappedAddress())throw new Error("ipaddr: trying to convert a generic ipv6 address to ipv4");let l=this.parts.slice(-2),g=l[0],m=l[1];return new x.IPv4([g>>8,g&255,m>>8,m&255])},s.prototype.toNormalizedString=function(){let l=function(){let m=[];for(let v=0;v<this.parts.length;v++)m.push(this.parts[v].toString(16));return m}.call(this).join(":"),g="";return this.zoneId&&(g=`%${this.zoneId}`),l+g},s.prototype.toRFC5952String=function(){let l=/((^|:)(0(:|$)){2,})/g,g=this.toNormalizedString(),m=0,v=-1,P;for(;P=l.exec(g);)P[0].length>v&&(m=P.index,v=P[0].length);return v<0?g:`${g.substring(0,m)}::${g.substring(m+v)}`},s.prototype.toString=function(){return this.toRFC5952String()},s}(),x.IPv6.broadcastAddressFromCIDR=function(s){try{let l=this.parseCIDR(s),g=l[0].toByteArray(),m=this.subnetMaskFromPrefixLength(l[1]).toByteArray(),v=[],P=0;for(;P<16;)v.push(parseInt(g[P],10)|parseInt(m[P],10)^255),P++;return new this(v)}catch(l){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${l})`)}},x.IPv6.isIPv6=function(s){return this.parser(s)!==null},x.IPv6.isValid=function(s){if(typeof s=="string"&&s.indexOf(":")===-1)return!1;try{let l=this.parser(s);return new this(l.parts,l.zoneId),!0}catch{return!1}},x.IPv6.isValidCIDR=function(s){if(typeof s=="string"&&s.indexOf(":")===-1)return!1;try{return this.parseCIDR(s),!0}catch{return!1}},x.IPv6.networkAddressFromCIDR=function(s){let l,g,m,v,P;try{for(l=this.parseCIDR(s),m=l[0].toByteArray(),P=this.subnetMaskFromPrefixLength(l[1]).toByteArray(),v=[],g=0;g<16;)v.push(parseInt(m[g],10)&parseInt(P[g],10)),g++;return new this(v)}catch(U){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${U})`)}},x.IPv6.parse=function(s){let l=this.parser(s);if(l.parts===null)throw new Error("ipaddr: string is not formatted like an IPv6 Address");return new this(l.parts,l.zoneId)},x.IPv6.parseCIDR=function(s){let l,g,m;if((g=s.match(/^(.+)\/(\d+)$/))&&(l=parseInt(g[2]),l>=0&&l<=128))return m=[this.parse(g[1]),l],Object.defineProperty(m,"toString",{value:o(function(){return this.join("/")},"value")}),m;throw new Error("ipaddr: string is not formatted like an IPv6 CIDR range")},x.IPv6.parser=function(s){let l,g,m,v,P,U;if(m=s.match(d.deprecatedTransitional))return this.parser(`::ffff:${m[1]}`);if(d.native.test(s))return f(s,8);if((m=s.match(d.transitional))&&(U=m[6]||"",l=m[1],m[1].endsWith("::")||(l=l.slice(0,-1)),l=f(l+U,6),l.parts)){for(P=[parseInt(m[2]),parseInt(m[3]),parseInt(m[4]),parseInt(m[5])],g=0;g<P.length;g++)if(v=P[g],!(0<=v&&v<=255))return null;return l.parts.push(P[0]<<8|P[1]),l.parts.push(P[2]<<8|P[3]),{parts:l.parts,zoneId:l.zoneId}}return null},x.IPv6.subnetMaskFromPrefixLength=function(s){if(s=parseInt(s),s<0||s>128)throw new Error("ipaddr: invalid IPv6 prefix length");let l=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],g=0,m=Math.floor(s/8);for(;g<m;)l[g]=255,g++;return m<16&&(l[m]=Math.pow(2,s%8)-1<<8-s%8),new this(l)},x.fromByteArray=function(s){let l=s.length;if(l===4)return new x.IPv4(s);if(l===16)return new x.IPv6(s);throw new Error("ipaddr: the binary input is neither an IPv6 nor IPv4 address")},x.isValid=function(s){return x.IPv6.isValid(s)||x.IPv4.isValid(s)},x.isValidCIDR=function(s){return x.IPv6.isValidCIDR(s)||x.IPv4.isValidCIDR(s)},x.parse=function(s){if(x.IPv6.isValid(s))return x.IPv6.parse(s);if(x.IPv4.isValid(s))return x.IPv4.parse(s);throw new Error("ipaddr: the address has neither IPv6 nor IPv4 format")},x.parseCIDR=function(s){try{return x.IPv6.parseCIDR(s)}catch{try{return x.IPv4.parseCIDR(s)}catch{throw new Error("ipaddr: the address has neither IPv6 nor IPv4 CIDR format")}}},x.process=function(s){let l=this.parse(s);return l.kind()==="ipv6"&&l.isIPv4MappedAddress()?l.toIPv4Address():l},x.subnetMatch=function(s,l,g){let m,v,P,U;g==null&&(g="unicast");for(v in l)if(Object.prototype.hasOwnProperty.call(l,v)){for(P=l[v],P[0]&&!(P[0]instanceof Array)&&(P=[P]),m=0;m<P.length;m++)if(U=P[m],s.kind()===U[0].kind()&&s.match.apply(s,U))return v}return g},typeof Zt<"u"&&Zt.exports?Zt.exports=x:e.ipaddr=x})(Ro)});var ki=E((qS,zi)=>{var Ai=require("stream").Stream,Tp=require("util");zi.exports=ue;function ue(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}o(ue,"DelayedStream");Tp.inherits(ue,Ai);ue.create=function(e,t){var r=new this;t=t||{};for(var n in t)r[n]=t[n];r.source=e;var i=e.emit;return e.emit=function(){return r._handleEmit(arguments),i.apply(e,arguments)},e.on("error",function(){}),r.pauseStream&&e.pause(),r};Object.defineProperty(ue.prototype,"readable",{configurable:!0,enumerable:!0,get:o(function(){return this.source.readable},"get")});ue.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};ue.prototype.resume=function(){this._released||this.release(),this.source.resume()};ue.prototype.pause=function(){this.source.pause()};ue.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(e){this.emit.apply(this,e)}.bind(this)),this._bufferedEvents=[]};ue.prototype.pipe=function(){var e=Ai.prototype.pipe.apply(this,arguments);return this.resume(),e};ue.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)};ue.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 Ni=E((JS,Ri)=>{var Ip=require("util"),wi=require("stream").Stream,Oi=ki();Ri.exports=K;function K(){this.writable=!1,this.readable=!0,this.dataSize=0,this.maxDataSize=2*1024*1024,this.pauseStreams=!0,this._released=!1,this._streams=[],this._currentStream=null,this._insideLoop=!1,this._pendingNext=!1}o(K,"CombinedStream");Ip.inherits(K,wi);K.create=function(e){var t=new this;e=e||{};for(var r in e)t[r]=e[r];return t};K.isStreamLike=function(e){return typeof e!="function"&&typeof e!="string"&&typeof e!="boolean"&&typeof e!="number"&&!Buffer.isBuffer(e)};K.prototype.append=function(e){var t=K.isStreamLike(e);if(t){if(!(e instanceof Oi)){var r=Oi.create(e,{maxDataSize:1/0,pauseStream:this.pauseStreams});e.on("data",this._checkDataSize.bind(this)),e=r}this._handleErrors(e),this.pauseStreams&&e.pause()}return this._streams.push(e),this};K.prototype.pipe=function(e,t){return wi.prototype.pipe.call(this,e,t),this.resume(),e};K.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}};K.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(r){var n=K.isStreamLike(r);n&&(r.on("data",this._checkDataSize.bind(this)),this._handleErrors(r)),this._pipeNext(r)}.bind(this))};K.prototype._pipeNext=function(e){this._currentStream=e;var t=K.isStreamLike(e);if(t){e.on("end",this._getNext.bind(this)),e.pipe(this,{end:!1});return}var r=e;this.write(r),this._getNext()};K.prototype._handleErrors=function(e){var t=this;e.on("error",function(r){t._emitError(r)})};K.prototype.write=function(e){this.emit("data",e)};K.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"))};K.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")};K.prototype.end=function(){this._reset(),this.emit("end")};K.prototype.destroy=function(){this._reset(),this.emit("close")};K.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};K.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(e))}};K.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)};K.prototype._emitError=function(e){this._reset(),this.emit("error",e)}});var Ci=E((YS,Di)=>{"use strict";Di.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 ji=E(re=>{"use strict";var Kt=Ci(),Ep=require("path").extname,Ui=/^\s*([^;\s]*)(?:;|\s|$)/,$p=/^text\//i;re.charset=Mi;re.charsets={lookup:Mi};re.contentType=Sp;re.extension=Ap;re.extensions=Object.create(null);re.lookup=zp;re.types=Object.create(null);kp(re.extensions,re.types);function Mi(e){if(!e||typeof e!="string")return!1;var t=Ui.exec(e),r=t&&Kt[t[1].toLowerCase()];return r&&r.charset?r.charset:t&&$p.test(t[1])?"UTF-8":!1}o(Mi,"charset");function Sp(e){if(!e||typeof e!="string")return!1;var t=e.indexOf("/")===-1?re.lookup(e):e;if(!t)return!1;if(t.indexOf("charset")===-1){var r=re.charset(t);r&&(t+="; charset="+r.toLowerCase())}return t}o(Sp,"contentType");function Ap(e){if(!e||typeof e!="string")return!1;var t=Ui.exec(e),r=t&&re.extensions[t[1].toLowerCase()];return!r||!r.length?!1:r[0]}o(Ap,"extension");function zp(e){if(!e||typeof e!="string")return!1;var t=Ep("x."+e).toLowerCase().substr(1);return t&&re.types[t]||!1}o(zp,"lookup");function kp(e,t){var r=["nginx","apache",void 0,"iana"];Object.keys(Kt).forEach(o(function(i){var u=Kt[i],c=u.extensions;if(!(!c||!c.length)){e[i]=c;for(var d=0;d<c.length;d++){var f=c[d];if(t[f]){var y=r.indexOf(Kt[t[f]].source),_=r.indexOf(u.source);if(t[f]!=="application/octet-stream"&&(y>_||y===_&&t[f].substr(0,12)==="application/"))continue}t[f]=i}}},"forEachMimeType"))}o(kp,"populateMaps")});var Fi=E((tA,Li)=>{Li.exports=Op;function Op(e){var t=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;t?t(e):setTimeout(e,0)}o(Op,"defer")});var Vr=E((nA,Zi)=>{var Bi=Fi();Zi.exports=wp;function wp(e){var t=!1;return Bi(function(){t=!0}),o(function(n,i){t?e(n,i):Bi(o(function(){e(n,i)},"nextTick_callback"))},"async_callback")}o(wp,"async")});var Hr=E((iA,Vi)=>{Vi.exports=Rp;function Rp(e){Object.keys(e.jobs).forEach(Np.bind(e)),e.jobs={}}o(Rp,"abort");function Np(e){typeof this.jobs[e]=="function"&&this.jobs[e]()}o(Np,"clean")});var Gr=E((sA,Gi)=>{var Hi=Vr(),Dp=Hr();Gi.exports=Cp;function Cp(e,t,r,n){var i=r.keyedList?r.keyedList[r.index]:r.index;r.jobs[i]=Up(t,i,e[i],function(u,c){i in r.jobs&&(delete r.jobs[i],u?Dp(r):r.results[i]=c,n(u,r.results))})}o(Cp,"iterate");function Up(e,t,r,n){var i;return e.length==2?i=e(r,Hi(n)):i=e(r,t,Hi(n)),i}o(Up,"runJob")});var Wr=E((cA,Wi)=>{Wi.exports=Mp;function Mp(e,t){var r=!Array.isArray(e),n={index:0,keyedList:r||t?Object.keys(e):null,jobs:{},results:r?{}:[],size:r?Object.keys(e).length:e.length};return t&&n.keyedList.sort(r?t:function(i,u){return t(e[i],e[u])}),n}o(Mp,"state")});var qr=E((lA,qi)=>{var jp=Hr(),Lp=Vr();qi.exports=Fp;function Fp(e){Object.keys(this.jobs).length&&(this.index=this.size,jp(this),Lp(e)(null,this.results))}o(Fp,"terminator")});var Ji=E((mA,Ki)=>{var Bp=Gr(),Zp=Wr(),Vp=qr();Ki.exports=Hp;function Hp(e,t,r){for(var n=Zp(e);n.index<(n.keyedList||e).length;)Bp(e,t,n,function(i,u){if(i){r(i,u);return}if(Object.keys(n.jobs).length===0){r(null,n.results);return}}),n.index++;return Vp.bind(n,r)}o(Hp,"parallel")});var Kr=E((gA,Jt)=>{var Xi=Gr(),Gp=Wr(),Wp=qr();Jt.exports=qp;Jt.exports.ascending=Yi;Jt.exports.descending=Kp;function qp(e,t,r,n){var i=Gp(e,r);return Xi(e,t,i,o(function u(c,d){if(c){n(c,d);return}if(i.index++,i.index<(i.keyedList||e).length){Xi(e,t,i,u);return}n(null,i.results)},"iteratorHandler")),Wp.bind(i,n)}o(qp,"serialOrdered");function Yi(e,t){return e<t?-1:e>t?1:0}o(Yi,"ascending");function Kp(e,t){return-1*Yi(e,t)}o(Kp,"descending")});var ea=E((hA,Qi)=>{var Jp=Kr();Qi.exports=Xp;function Xp(e,t,r){return Jp(e,t,null,r)}o(Xp,"serial")});var ra=E((xA,ta)=>{ta.exports={parallel:Ji(),serial:ea(),serialOrdered:Kr()}});var Jr=E((_A,na)=>{"use strict";na.exports=Object});var ia=E((PA,oa)=>{"use strict";oa.exports=Error});var sa=E((bA,aa)=>{"use strict";aa.exports=EvalError});var ca=E((TA,ua)=>{"use strict";ua.exports=RangeError});var la=E((IA,pa)=>{"use strict";pa.exports=ReferenceError});var ma=E((EA,da)=>{"use strict";da.exports=SyntaxError});var Xt=E(($A,fa)=>{"use strict";fa.exports=TypeError});var ya=E((SA,ga)=>{"use strict";ga.exports=URIError});var va=E((AA,ha)=>{"use strict";ha.exports=Math.abs});var _a=E((zA,xa)=>{"use strict";xa.exports=Math.floor});var ba=E((kA,Pa)=>{"use strict";Pa.exports=Math.max});var Ia=E((OA,Ta)=>{"use strict";Ta.exports=Math.min});var $a=E((wA,Ea)=>{"use strict";Ea.exports=Math.pow});var Aa=E((RA,Sa)=>{"use strict";Sa.exports=Math.round});var ka=E((NA,za)=>{"use strict";za.exports=Number.isNaN||o(function(t){return t!==t},"isNaN")});var wa=E((CA,Oa)=>{"use strict";var Yp=ka();Oa.exports=o(function(t){return Yp(t)||t===0?t:t<0?-1:1},"sign")});var Na=E((MA,Ra)=>{"use strict";Ra.exports=Object.getOwnPropertyDescriptor});var Xr=E((jA,Da)=>{"use strict";var Yt=Na();if(Yt)try{Yt([],"length")}catch{Yt=null}Da.exports=Yt});var Ua=E((LA,Ca)=>{"use strict";var Qt=Object.defineProperty||!1;if(Qt)try{Qt({},"a",{value:1})}catch{Qt=!1}Ca.exports=Qt});var Yr=E((FA,Ma)=>{"use strict";Ma.exports=o(function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;t[r]=i;for(var u 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 c=Object.getOwnPropertySymbols(t);if(c.length!==1||c[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var d=Object.getOwnPropertyDescriptor(t,r);if(d.value!==i||d.enumerable!==!0)return!1}return!0},"hasSymbols")});var Fa=E((ZA,La)=>{"use strict";var ja=typeof Symbol<"u"&&Symbol,Qp=Yr();La.exports=o(function(){return typeof ja!="function"||typeof Symbol!="function"||typeof ja("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Qp()},"hasNativeSymbols")});var Qr=E((HA,Ba)=>{"use strict";Ba.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var en=E((GA,Za)=>{"use strict";var el=Jr();Za.exports=el.getPrototypeOf||null});var Ga=E((WA,Ha)=>{"use strict";var tl="Function.prototype.bind called on incompatible ",rl=Object.prototype.toString,nl=Math.max,ol="[object Function]",Va=o(function(t,r){for(var n=[],i=0;i<t.length;i+=1)n[i]=t[i];for(var u=0;u<r.length;u+=1)n[u+t.length]=r[u];return n},"concatty"),il=o(function(t,r){for(var n=[],i=r||0,u=0;i<t.length;i+=1,u+=1)n[u]=t[i];return n},"slicy"),al=o(function(e,t){for(var r="",n=0;n<e.length;n+=1)r+=e[n],n+1<e.length&&(r+=t);return r},"joiny");Ha.exports=o(function(t){var r=this;if(typeof r!="function"||rl.apply(r)!==ol)throw new TypeError(tl+r);for(var n=il(arguments,1),i,u=o(function(){if(this instanceof i){var _=r.apply(this,Va(n,arguments));return Object(_)===_?_:this}return r.apply(t,Va(n,arguments))},"binder"),c=nl(0,r.length-n.length),d=[],f=0;f<c;f++)d[f]="$"+f;if(i=Function("binder","return function ("+al(d,",")+"){ return binder.apply(this,arguments); }")(u),r.prototype){var y=o(function(){},"Empty");y.prototype=r.prototype,i.prototype=new y,y.prototype=null}return i},"bind")});var He=E((KA,Wa)=>{"use strict";var sl=Ga();Wa.exports=Function.prototype.bind||sl});var er=E((JA,qa)=>{"use strict";qa.exports=Function.prototype.call});var tn=E((XA,Ka)=>{"use strict";Ka.exports=Function.prototype.apply});var Xa=E((YA,Ja)=>{"use strict";Ja.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var Qa=E((QA,Ya)=>{"use strict";var ul=He(),cl=tn(),pl=er(),ll=Xa();Ya.exports=ll||ul.call(pl,cl)});var ts=E((ez,es)=>{"use strict";var dl=He(),ml=Xt(),fl=er(),gl=Qa();es.exports=o(function(t){if(t.length<1||typeof t[0]!="function")throw new ml("a function is required");return gl(dl,fl,t)},"callBindBasic")});var ss=E((rz,as)=>{"use strict";var yl=ts(),rs=Xr(),os;try{os=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!="object"||!("code"in e)||e.code!=="ERR_PROTO_ACCESS")throw e}var rn=!!os&&rs&&rs(Object.prototype,"__proto__"),is=Object,ns=is.getPrototypeOf;as.exports=rn&&typeof rn.get=="function"?yl([rn.get]):typeof ns=="function"?o(function(t){return ns(t==null?t:is(t))},"getDunder"):!1});var ds=E((oz,ls)=>{"use strict";var us=Qr(),cs=en(),ps=ss();ls.exports=us?o(function(t){return us(t)},"getProto"):cs?o(function(t){if(!t||typeof t!="object"&&typeof t!="function")throw new TypeError("getProto: not an object");return cs(t)},"getProto"):ps?o(function(t){return ps(t)},"getProto"):null});var nn=E((az,ms)=>{"use strict";var hl=Function.prototype.call,vl=Object.prototype.hasOwnProperty,xl=He();ms.exports=xl.call(hl,vl)});var _s=E((sz,xs)=>{"use strict";var j,_l=Jr(),Pl=ia(),bl=sa(),Tl=ca(),Il=la(),Ke=ma(),qe=Xt(),El=ya(),$l=va(),Sl=_a(),Al=ba(),zl=Ia(),kl=$a(),Ol=Aa(),wl=wa(),hs=Function,on=o(function(e){try{return hs('"use strict"; return ('+e+").constructor;")()}catch{}},"getEvalledConstructor"),Pt=Xr(),Rl=Ua(),an=o(function(){throw new qe},"throwTypeError"),Nl=Pt?function(){try{return arguments.callee,an}catch{try{return Pt(arguments,"callee").get}catch{return an}}}():an,Ge=Fa()(),Y=ds(),Dl=en(),Cl=Qr(),vs=tn(),bt=er(),We={},Ul=typeof Uint8Array>"u"||!Y?j:Y(Uint8Array),De={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?j:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?j:ArrayBuffer,"%ArrayIteratorPrototype%":Ge&&Y?Y([][Symbol.iterator]()):j,"%AsyncFromSyncIteratorPrototype%":j,"%AsyncFunction%":We,"%AsyncGenerator%":We,"%AsyncGeneratorFunction%":We,"%AsyncIteratorPrototype%":We,"%Atomics%":typeof Atomics>"u"?j:Atomics,"%BigInt%":typeof BigInt>"u"?j:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?j:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?j:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?j:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Pl,"%eval%":eval,"%EvalError%":bl,"%Float16Array%":typeof Float16Array>"u"?j:Float16Array,"%Float32Array%":typeof Float32Array>"u"?j:Float32Array,"%Float64Array%":typeof Float64Array>"u"?j:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?j:FinalizationRegistry,"%Function%":hs,"%GeneratorFunction%":We,"%Int8Array%":typeof Int8Array>"u"?j:Int8Array,"%Int16Array%":typeof Int16Array>"u"?j:Int16Array,"%Int32Array%":typeof Int32Array>"u"?j:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Ge&&Y?Y(Y([][Symbol.iterator]())):j,"%JSON%":typeof JSON=="object"?JSON:j,"%Map%":typeof Map>"u"?j:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Ge||!Y?j:Y(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":_l,"%Object.getOwnPropertyDescriptor%":Pt,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?j:Promise,"%Proxy%":typeof Proxy>"u"?j:Proxy,"%RangeError%":Tl,"%ReferenceError%":Il,"%Reflect%":typeof Reflect>"u"?j:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?j:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Ge||!Y?j:Y(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?j:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Ge&&Y?Y(""[Symbol.iterator]()):j,"%Symbol%":Ge?Symbol:j,"%SyntaxError%":Ke,"%ThrowTypeError%":Nl,"%TypedArray%":Ul,"%TypeError%":qe,"%Uint8Array%":typeof Uint8Array>"u"?j:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?j:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?j:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?j:Uint32Array,"%URIError%":El,"%WeakMap%":typeof WeakMap>"u"?j:WeakMap,"%WeakRef%":typeof WeakRef>"u"?j:WeakRef,"%WeakSet%":typeof WeakSet>"u"?j:WeakSet,"%Function.prototype.call%":bt,"%Function.prototype.apply%":vs,"%Object.defineProperty%":Rl,"%Object.getPrototypeOf%":Dl,"%Math.abs%":$l,"%Math.floor%":Sl,"%Math.max%":Al,"%Math.min%":zl,"%Math.pow%":kl,"%Math.round%":Ol,"%Math.sign%":wl,"%Reflect.getPrototypeOf%":Cl};if(Y)try{null.error}catch(e){fs=Y(Y(e)),De["%Error.prototype%"]=fs}var fs,Ml=o(function e(t){var r;if(t==="%AsyncFunction%")r=on("async function () {}");else if(t==="%GeneratorFunction%")r=on("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=on("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&Y&&(r=Y(i.prototype))}return De[t]=r,r},"doEval"),gs={__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"]},Tt=He(),tr=nn(),jl=Tt.call(bt,Array.prototype.concat),Ll=Tt.call(vs,Array.prototype.splice),ys=Tt.call(bt,String.prototype.replace),rr=Tt.call(bt,String.prototype.slice),Fl=Tt.call(bt,RegExp.prototype.exec),Bl=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Zl=/\\(\\)?/g,Vl=o(function(t){var r=rr(t,0,1),n=rr(t,-1);if(r==="%"&&n!=="%")throw new Ke("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new Ke("invalid intrinsic syntax, expected opening `%`");var i=[];return ys(t,Bl,function(u,c,d,f){i[i.length]=d?ys(f,Zl,"$1"):c||u}),i},"stringToPath"),Hl=o(function(t,r){var n=t,i;if(tr(gs,n)&&(i=gs[n],n="%"+i[0]+"%"),tr(De,n)){var u=De[n];if(u===We&&(u=Ml(n)),typeof u>"u"&&!r)throw new qe("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:u}}throw new Ke("intrinsic "+t+" does not exist!")},"getBaseIntrinsic");xs.exports=o(function(t,r){if(typeof t!="string"||t.length===0)throw new qe("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new qe('"allowMissing" argument must be a boolean');if(Fl(/^%?[^%]*%?$/,t)===null)throw new Ke("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=Vl(t),i=n.length>0?n[0]:"",u=Hl("%"+i+"%",r),c=u.name,d=u.value,f=!1,y=u.alias;y&&(i=y[0],Ll(n,jl([0,1],y)));for(var _=1,b=!0;_<n.length;_+=1){var x=n[_],s=rr(x,0,1),l=rr(x,-1);if((s==='"'||s==="'"||s==="`"||l==='"'||l==="'"||l==="`")&&s!==l)throw new Ke("property names with quotes must have matching quotes");if((x==="constructor"||!b)&&(f=!0),i+="."+x,c="%"+i+"%",tr(De,c))d=De[c];else if(d!=null){if(!(x in d)){if(!r)throw new qe("base intrinsic for "+t+" exists, but the property is not available.");return}if(Pt&&_+1>=n.length){var g=Pt(d,x);b=!!g,b&&"get"in g&&!("originalValue"in g.get)?d=g.get:d=d[x]}else b=tr(d,x),d=d[x];b&&!f&&(De[c]=d)}}return d},"GetIntrinsic")});var bs=E((cz,Ps)=>{"use strict";var Gl=Yr();Ps.exports=o(function(){return Gl()&&!!Symbol.toStringTag},"hasToStringTagShams")});var Es=E((lz,Is)=>{"use strict";var Wl=_s(),Ts=Wl("%Object.defineProperty%",!0),ql=bs()(),Kl=nn(),Jl=Xt(),nr=ql?Symbol.toStringTag:null;Is.exports=o(function(t,r){var n=arguments.length>2&&!!arguments[2]&&arguments[2].force,i=arguments.length>2&&!!arguments[2]&&arguments[2].nonConfigurable;if(typeof n<"u"&&typeof n!="boolean"||typeof i<"u"&&typeof i!="boolean")throw new Jl("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");nr&&(n||!Kl(t,nr))&&(Ts?Ts(t,nr,{configurable:!i,enumerable:!1,value:r,writable:!1}):t[nr]=r)},"setToStringTag")});var Ss=E((mz,$s)=>{"use strict";var Xl=Function.prototype.call,Yl=Object.prototype.hasOwnProperty,Ql=He();$s.exports=Ql.call(Xl,Yl)});var zs=E((fz,As)=>{"use strict";As.exports=function(e,t){return Object.keys(t).forEach(function(r){e[r]=e[r]||t[r]}),e}});var ln=E((gz,Os)=>{"use strict";var pn=Ni(),ed=require("util"),sn=require("path"),td=require("http"),rd=require("https"),nd=require("url").parse,od=require("fs"),id=require("stream").Stream,ad=require("crypto"),un=ji(),sd=ra(),ud=Es(),Se=Ss(),cn=zs();function ks(e){return String(e).replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/"/g,"%22")}o(ks,"escapeHeaderParam");function L(e){if(!(this instanceof L))return new L(e);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],pn.call(this),e=e||{};for(var t in e)this[t]=e[t]}o(L,"FormData");ed.inherits(L,pn);L.LINE_BREAK=`\r
2
- `;L.DEFAULT_CONTENT_TYPE="application/octet-stream";L.prototype.append=function(e,t,r){r=r||{},typeof r=="string"&&(r={filename:r});var n=pn.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 i=this._multiPartHeader(e,t,r),u=this._multiPartFooter();n(i),n(t),n(u),this._trackLength(i,t,r)};L.prototype._trackLength=function(e,t,r){var n=0;r.knownLength!=null?n+=Number(r.knownLength):Buffer.isBuffer(t)?n=t.length:typeof t=="string"&&(n=Buffer.byteLength(t)),this._valueLength+=n,this._overheadLength+=Buffer.byteLength(e)+L.LINE_BREAK.length,!(!t||!t.path&&!(t.readable&&Se(t,"httpVersion"))&&!(t instanceof id))&&(r.knownLength||this._valuesToMeasure.push(t))};L.prototype._lengthRetriever=function(e,t){Se(e,"fd")?e.end!=null&&e.end!=1/0&&e.start!=null?t(null,e.end+1-(e.start?e.start:0)):od.stat(e.path,function(r,n){if(r){t(r);return}var i=n.size-(e.start?e.start:0);t(null,i)}):Se(e,"httpVersion")?t(null,Number(e.headers["content-length"])):Se(e,"httpModule")?(e.on("response",function(r){e.pause(),t(null,Number(r.headers["content-length"]))}),e.resume()):t("Unknown stream")};L.prototype._multiPartHeader=function(e,t,r){if(typeof r.header=="string")return r.header;var n=this._getContentDisposition(t,r),i=this._getContentType(t,r),u="",c={"Content-Disposition":["form-data",'name="'+ks(e)+'"'].concat(n||[]),"Content-Type":[].concat(i||[])};typeof r.header=="object"&&cn(c,r.header);var d;for(var f in c)if(Se(c,f)){if(d=c[f],d==null)continue;Array.isArray(d)||(d=[d]),d.length&&(u+=f+": "+d.join("; ")+L.LINE_BREAK)}return"--"+this.getBoundary()+L.LINE_BREAK+u+L.LINE_BREAK};L.prototype._getContentDisposition=function(e,t){var r;if(typeof t.filepath=="string"?r=sn.normalize(t.filepath).replace(/\\/g,"/"):t.filename||e&&(e.name||e.path)?r=sn.basename(t.filename||e&&(e.name||e.path)):e&&e.readable&&Se(e,"httpVersion")&&(r=sn.basename(e.client._httpMessage.path||"")),r)return'filename="'+ks(r)+'"'};L.prototype._getContentType=function(e,t){var r=t.contentType;return!r&&e&&e.name&&(r=un.lookup(e.name)),!r&&e&&e.path&&(r=un.lookup(e.path)),!r&&e&&e.readable&&Se(e,"httpVersion")&&(r=e.headers["content-type"]),!r&&(t.filepath||t.filename)&&(r=un.lookup(t.filepath||t.filename)),!r&&e&&typeof e=="object"&&(r=L.DEFAULT_CONTENT_TYPE),r};L.prototype._multiPartFooter=function(){return function(e){var t=L.LINE_BREAK,r=this._streams.length===0;r&&(t+=this._lastBoundary()),e(t)}.bind(this)};L.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+L.LINE_BREAK};L.prototype.getHeaders=function(e){var t,r={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in e)Se(e,t)&&(r[t.toLowerCase()]=e[t]);return r};L.prototype.setBoundary=function(e){if(typeof e!="string")throw new TypeError("FormData boundary must be a string");this._boundary=e};L.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};L.prototype.getBuffer=function(){for(var e=new Buffer.alloc(0),t=this.getBoundary(),r=0,n=this._streams.length;r<n;r++)typeof this._streams[r]!="function"&&(Buffer.isBuffer(this._streams[r])?e=Buffer.concat([e,this._streams[r]]):e=Buffer.concat([e,Buffer.from(this._streams[r])]),(typeof this._streams[r]!="string"||this._streams[r].substring(2,t.length+2)!==t)&&(e=Buffer.concat([e,Buffer.from(L.LINE_BREAK)])));return Buffer.concat([e,Buffer.from(this._lastBoundary())])};L.prototype._generateBoundary=function(){this._boundary="--------------------------"+ad.randomBytes(12).toString("hex")};L.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};L.prototype.hasKnownLength=function(){var e=!0;return this._valuesToMeasure.length&&(e=!1),e};L.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}sd.parallel(this._valuesToMeasure,this._lengthRetriever,function(r,n){if(r){e(r);return}n.forEach(function(i){t+=i}),e(null,t)})};L.prototype.submit=function(e,t){var r,n,i={method:"post"};return typeof e=="string"?(e=nd(e),n=cn({port:e.port,path:e.pathname,host:e.hostname,protocol:e.protocol},i)):(n=cn(e,i),n.port||(n.port=n.protocol==="https:"?443:80)),n.headers=this.getHeaders(e.headers),n.protocol==="https:"?r=rd.request(n):r=td.request(n),this.getLength(function(u,c){if(u&&u!=="Unknown stream"){this._error(u);return}if(c&&r.setHeader("Content-Length",c),this.pipe(r),t){var d,f=o(function(y,_){return r.removeListener("error",f),r.removeListener("response",d),t.call(this,y,_)},"callback");d=f.bind(this,null),r.on("error",f),r.on("response",d)}}.bind(this)),r};L.prototype._error=function(e){this.error||(this.error=e,this.pause(),this.emit("error",e))};L.prototype.toString=function(){return"[object FormData]"};ud(L.prototype,"FormData");Os.exports=L});var hd={};gn(hd,{cambAi:()=>yd});module.exports=qs(hd);var Ks=Object.freeze({status:"aborted"});function T(e,t,r){function n(d,f){if(d._zod||Object.defineProperty(d,"_zod",{value:{def:f,constr:c,traits:new Set},enumerable:!1}),d._zod.traits.has(e))return;d._zod.traits.add(e),t(d,f);let y=c.prototype,_=Object.keys(y);for(let b=0;b<_.length;b++){let x=_[b];x in d||(d[x]=y[x].bind(d))}}o(n,"init");let i=r?.Parent??Object;class u extends i{static{o(this,"Definition")}}Object.defineProperty(u,"name",{value:e});function c(d){var f;let y=r?.Parent?new u:this;n(y,d),(f=y._zod).deferred??(f.deferred=[]);for(let _ of y._zod.deferred)_();return y}return o(c,"_"),Object.defineProperty(c,"init",{value:n}),Object.defineProperty(c,Symbol.hasInstance,{value:o(d=>r?.Parent&&d instanceof r.Parent?!0:d?._zod?.traits?.has(e),"value")}),Object.defineProperty(c,"name",{value:e}),c}o(T,"$constructor");var Js=Symbol("zod_brand"),ce=class extends Error{static{o(this,"$ZodAsyncError")}constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Et=class extends Error{static{o(this,"$ZodEncodeError")}constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}},ir={};function me(e){return e&&Object.assign(ir,e),ir}o(me,"config");function sr(e){let t=Object.values(e).filter(n=>typeof n=="number");return Object.entries(e).filter(([n,i])=>t.indexOf(+n)===-1).map(([n,i])=>i)}o(sr,"getEnumValues");function vn(e,t){return typeof t=="bigint"?t.toString():t}o(vn,"jsonStringifyReplacer");function St(e){return{get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}o(St,"cached");function xn(e){return e==null}o(xn,"nullish");function At(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}o(At,"cleanRegex");var hn=Symbol("evaluating");function J(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==hn)return n===void 0&&(n=hn,n=r()),n},set(i){Object.defineProperty(e,t,{value:i})},configurable:!0})}o(J,"defineLazy");var ur="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function tt(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}o(tt,"isObject");var Xs=St(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function _n(e){if(tt(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let r=t.prototype;return!(tt(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}o(_n,"isPlainObject");var Pn=new Set(["string","number","symbol"]);function Ce(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}o(Ce,"escapeRegex");function zt(e,t,r){let n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}o(zt,"clone");function G(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:o(()=>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:o(()=>t.error,"error")}:t}o(G,"normalizeParams");function bn(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}o(bn,"optionalKeys");var Ys={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function Ue(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}o(Ue,"aborted");function Pe(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}o(Pe,"prefixIssues");function $t(e){return typeof e=="string"?e:e?.message}o($t,"unwrapMessage");function be(e,t,r){let n={...e,path:e.path??[]};if(!e.message){let i=$t(e.inst?._zod.def?.error?.(e))??$t(t?.error?.(e))??$t(r.customError?.(e))??$t(r.localeError?.(e))??"Invalid input";n.message=i}return delete n.inst,delete n.continue,t?.reportInput||delete n.input,n}o(be,"finalizeIssue");function Tn(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}o(Tn,"getLengthableOrigin");function cr(...e){let[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}o(cr,"issue");var In=o((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,vn,2),Object.defineProperty(e,"toString",{value:o(()=>e.message,"value"),enumerable:!1})},"initializer"),En=T("$ZodError",In),rt=T("$ZodError",In,{Parent:Error});var eu=o(e=>(t,r,n,i)=>{let u=n?Object.assign(n,{async:!1}):{async:!1},c=t._zod.run({value:r,issues:[]},u);if(c instanceof Promise)throw new ce;if(c.issues.length){let d=new(i?.Err??e)(c.issues.map(f=>be(f,u,me())));throw ur(d,i?.callee),d}return c.value},"_parse"),kt=eu(rt),tu=o(e=>async(t,r,n,i)=>{let u=n?Object.assign(n,{async:!0}):{async:!0},c=t._zod.run({value:r,issues:[]},u);if(c instanceof Promise&&(c=await c),c.issues.length){let d=new(i?.Err??e)(c.issues.map(f=>be(f,u,me())));throw ur(d,i?.callee),d}return c.value},"_parseAsync"),Ot=tu(rt),ru=o(e=>(t,r,n)=>{let i=n?{...n,async:!1}:{async:!1},u=t._zod.run({value:r,issues:[]},i);if(u instanceof Promise)throw new ce;return u.issues.length?{success:!1,error:new(e??En)(u.issues.map(c=>be(c,i,me())))}:{success:!0,data:u.value}},"_safeParse"),nt=ru(rt),nu=o(e=>async(t,r,n)=>{let i=n?Object.assign(n,{async:!0}):{async:!0},u=t._zod.run({value:r,issues:[]},i);return u instanceof Promise&&(u=await u),u.issues.length?{success:!1,error:new e(u.issues.map(c=>be(c,i,me())))}:{success:!0,data:u.value}},"_safeParseAsync"),ot=nu(rt);var ou="(?:(?:\\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])))",iu=new RegExp(`^${ou}$`);var $n=o(e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},"string"),Sn=/^-?\d+n?$/;var pr=/^-?\d+(?:\.\d+)?$/,An=/^(?:true|false)$/i;var Me=T("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])});var zn=T("$ZodCheckMinLength",(e,t)=>{var r;Me.init(e,t),(r=e._zod.def).when??(r.when=n=>{let i=n.value;return!xn(i)&&i.length!==void 0}),e._zod.onattach.push(n=>{let i=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>i&&(n._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let i=n.value;if(i.length>=t.minimum)return;let c=Tn(i);n.issues.push({origin:c,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}});var lr=T("$ZodCheckStringFormat",(e,t)=>{var r,n;Me.init(e,t),e._zod.onattach.push(i=>{let u=i._zod.bag;u.format=t.format,t.pattern&&(u.patterns??(u.patterns=new Set),u.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=i=>{t.pattern.lastIndex=0,!t.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:t.format,input:i.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(n=e._zod).check??(n.check=()=>{})}),kn=T("$ZodCheckRegex",(e,t)=>{lr.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}});var wn={major:4,minor:3,patch:6};var W=T("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=wn;let n=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&n.unshift(e);for(let i of n)for(let u of i._zod.onattach)u(e);if(n.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let i=o((c,d,f)=>{let y=Ue(c),_;for(let b of d){if(b._zod.def.when){if(!b._zod.def.when(c))continue}else if(y)continue;let x=c.issues.length,s=b._zod.check(c);if(s instanceof Promise&&f?.async===!1)throw new ce;if(_||s instanceof Promise)_=(_??Promise.resolve()).then(async()=>{await s,c.issues.length!==x&&(y||(y=Ue(c,x)))});else{if(c.issues.length===x)continue;y||(y=Ue(c,x))}}return _?_.then(()=>c):c},"runChecks"),u=o((c,d,f)=>{if(Ue(c))return c.aborted=!0,c;let y=i(d,n,f);if(y instanceof Promise){if(f.async===!1)throw new ce;return y.then(_=>e._zod.parse(_,f))}return e._zod.parse(y,f)},"handleCanaryResult");e._zod.run=(c,d)=>{if(d.skipChecks)return e._zod.parse(c,d);if(d.direction==="backward"){let y=e._zod.parse({value:c.value,issues:[]},{...d,skipChecks:!0});return y instanceof Promise?y.then(_=>u(_,c,d)):u(y,c,d)}let f=e._zod.parse(c,d);if(f instanceof Promise){if(d.async===!1)throw new ce;return f.then(y=>i(y,n,d))}return i(f,n,d)}}J(e,"~standard",()=>({validate:o(i=>{try{let u=nt(e,i);return u.success?{value:u.data}:{issues:u.error?.issues}}catch{return ot(e,i).then(c=>c.success?{value:c.data}:{issues:c.error?.issues})}},"validate"),vendor:"zod",version:1}))}),Nt=T("$ZodString",(e,t)=>{W.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??$n(e._zod.bag),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),dr=T("$ZodStringFormat",(e,t)=>{lr.init(e,t),Nt.init(e,t)});var Un=T("$ZodURL",(e,t)=>{dr.init(e,t),e._zod.check=r=>{try{let n=r.value.trim(),i=new URL(n);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(":")?i.protocol.slice(0,-1):i.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=i.href:r.value=n;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}});var Mn=T("$ZodNumber",(e,t)=>{W.init(e,t),e._zod.pattern=e._zod.bag.pattern??pr,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}let i=r.value;if(typeof i=="number"&&!Number.isNaN(i)&&Number.isFinite(i))return r;let u=typeof i=="number"?Number.isNaN(i)?"NaN":Number.isFinite(i)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:i,inst:e,...u?{received:u}:{}}),r}});var mr=T("$ZodBoolean",(e,t)=>{W.init(e,t),e._zod.pattern=An,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=!!r.value}catch{}let i=r.value;return typeof i=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:i,inst:e}),r}}),jn=T("$ZodBigInt",(e,t)=>{W.init(e,t),e._zod.pattern=Sn,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:e}),r}});var Ln=T("$ZodAny",(e,t)=>{W.init(e,t),e._zod.parse=r=>r}),Fn=T("$ZodUnknown",(e,t)=>{W.init(e,t),e._zod.parse=r=>r});var Bn=T("$ZodVoid",(e,t)=>{W.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;return typeof i>"u"||r.issues.push({expected:"void",code:"invalid_type",input:i,inst:e}),r}}),Zn=T("$ZodDate",(e,t)=>{W.init(e,t),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=new Date(r.value)}catch{}let i=r.value,u=i instanceof Date;return u&&!Number.isNaN(i.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:i,...u?{received:"Invalid Date"}:{},inst:e}),r}});function Rn(e,t,r){e.issues.length&&t.issues.push(...Pe(r,e.issues)),t.value[r]=e.value}o(Rn,"handleArrayResult");var Vn=T("$ZodArray",(e,t)=>{W.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;if(!Array.isArray(i))return r.issues.push({expected:"array",code:"invalid_type",input:i,inst:e}),r;r.value=Array(i.length);let u=[];for(let c=0;c<i.length;c++){let d=i[c],f=t.element._zod.run({value:d,issues:[]},n);f instanceof Promise?u.push(f.then(y=>Rn(y,r,c))):Rn(f,r,c)}return u.length?Promise.all(u).then(()=>r):r}});function Rt(e,t,r,n,i){if(e.issues.length){if(i&&!(r in n))return;t.issues.push(...Pe(r,e.issues))}e.value===void 0?r in n&&(t.value[r]=void 0):t.value[r]=e.value}o(Rt,"handlePropertyResult");function au(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${n}": expected a Zod schema`);let r=bn(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}o(au,"normalizeDef");function su(e,t,r,n,i,u){let c=[],d=i.keySet,f=i.catchall._zod,y=f.def.type,_=f.optout==="optional";for(let b in t){if(d.has(b))continue;if(y==="never"){c.push(b);continue}let x=f.run({value:t[b],issues:[]},n);x instanceof Promise?e.push(x.then(s=>Rt(s,r,b,t,_))):Rt(x,r,b,t,_)}return c.length&&r.issues.push({code:"unrecognized_keys",keys:c,input:t,inst:u}),e.length?Promise.all(e).then(()=>r):r}o(su,"handleCatchall");var Hn=T("$ZodObject",(e,t)=>{if(W.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let d=t.shape;Object.defineProperty(t,"shape",{get:o(()=>{let f={...d};return Object.defineProperty(t,"shape",{value:f}),f},"get")})}let n=St(()=>au(t));J(e._zod,"propValues",()=>{let d=t.shape,f={};for(let y in d){let _=d[y]._zod;if(_.values){f[y]??(f[y]=new Set);for(let b of _.values)f[y].add(b)}}return f});let i=tt,u=t.catchall,c;e._zod.parse=(d,f)=>{c??(c=n.value);let y=d.value;if(!i(y))return d.issues.push({expected:"object",code:"invalid_type",input:y,inst:e}),d;d.value={};let _=[],b=c.shape;for(let x of c.keys){let s=b[x],l=s._zod.optout==="optional",g=s._zod.run({value:y[x],issues:[]},f);g instanceof Promise?_.push(g.then(m=>Rt(m,d,x,y,l))):Rt(g,d,x,y,l)}return u?su(_,y,d,f,n.value,e):_.length?Promise.all(_).then(()=>d):d}});function Nn(e,t,r,n){for(let u of e)if(u.issues.length===0)return t.value=u.value,t;let i=e.filter(u=>!Ue(u));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(u=>u.issues.map(c=>be(c,n,me())))}),t)}o(Nn,"handleUnionResults");var fr=T("$ZodUnion",(e,t)=>{W.init(e,t),J(e._zod,"optin",()=>t.options.some(i=>i._zod.optin==="optional")?"optional":void 0),J(e._zod,"optout",()=>t.options.some(i=>i._zod.optout==="optional")?"optional":void 0),J(e._zod,"values",()=>{if(t.options.every(i=>i._zod.values))return new Set(t.options.flatMap(i=>Array.from(i._zod.values)))}),J(e._zod,"pattern",()=>{if(t.options.every(i=>i._zod.pattern)){let i=t.options.map(u=>u._zod.pattern);return new RegExp(`^(${i.map(u=>At(u.source)).join("|")})$`)}});let r=t.options.length===1,n=t.options[0]._zod.run;e._zod.parse=(i,u)=>{if(r)return n(i,u);let c=!1,d=[];for(let f of t.options){let y=f._zod.run({value:i.value,issues:[]},u);if(y instanceof Promise)d.push(y),c=!0;else{if(y.issues.length===0)return y;d.push(y)}}return c?Promise.all(d).then(f=>Nn(f,i,e,u)):Nn(d,i,e,u)}});var Gn=T("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,fr.init(e,t);let r=e._zod.parse;J(e._zod,"propValues",()=>{let i={};for(let u of t.options){let c=u._zod.propValues;if(!c||Object.keys(c).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(u)}"`);for(let[d,f]of Object.entries(c)){i[d]||(i[d]=new Set);for(let y of f)i[d].add(y)}}return i});let n=St(()=>{let i=t.options,u=new Map;for(let c of i){let d=c._zod.propValues?.[t.discriminator];if(!d||d.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(c)}"`);for(let f of d){if(u.has(f))throw new Error(`Duplicate discriminator value "${String(f)}"`);u.set(f,c)}}return u});e._zod.parse=(i,u)=>{let c=i.value;if(!tt(c))return i.issues.push({code:"invalid_type",expected:"object",input:c,inst:e}),i;let d=n.value.get(c?.[t.discriminator]);return d?d._zod.run(i,u):t.unionFallback?r(i,u):(i.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:c,path:[t.discriminator],inst:e}),i)}});var Wn=T("$ZodRecord",(e,t)=>{W.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;if(!_n(i))return r.issues.push({expected:"record",code:"invalid_type",input:i,inst:e}),r;let u=[],c=t.keyType._zod.values;if(c){r.value={};let d=new Set;for(let y of c)if(typeof y=="string"||typeof y=="number"||typeof y=="symbol"){d.add(typeof y=="number"?y.toString():y);let _=t.valueType._zod.run({value:i[y],issues:[]},n);_ instanceof Promise?u.push(_.then(b=>{b.issues.length&&r.issues.push(...Pe(y,b.issues)),r.value[y]=b.value})):(_.issues.length&&r.issues.push(...Pe(y,_.issues)),r.value[y]=_.value)}let f;for(let y in i)d.has(y)||(f=f??[],f.push(y));f&&f.length>0&&r.issues.push({code:"unrecognized_keys",input:i,inst:e,keys:f})}else{r.value={};for(let d of Reflect.ownKeys(i)){if(d==="__proto__")continue;let f=t.keyType._zod.run({value:d,issues:[]},n);if(f instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof d=="string"&&pr.test(d)&&f.issues.length){let b=t.keyType._zod.run({value:Number(d),issues:[]},n);if(b instanceof Promise)throw new Error("Async schemas not supported in object keys currently");b.issues.length===0&&(f=b)}if(f.issues.length){t.mode==="loose"?r.value[d]=i[d]:r.issues.push({code:"invalid_key",origin:"record",issues:f.issues.map(b=>be(b,n,me())),input:d,path:[d],inst:e});continue}let _=t.valueType._zod.run({value:i[d],issues:[]},n);_ instanceof Promise?u.push(_.then(b=>{b.issues.length&&r.issues.push(...Pe(d,b.issues)),r.value[f.value]=b.value})):(_.issues.length&&r.issues.push(...Pe(d,_.issues)),r.value[f.value]=_.value)}}return u.length?Promise.all(u).then(()=>r):r}});var qn=T("$ZodEnum",(e,t)=>{W.init(e,t);let r=sr(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(i=>Pn.has(typeof i)).map(i=>typeof i=="string"?Ce(i):i.toString()).join("|")})$`),e._zod.parse=(i,u)=>{let c=i.value;return n.has(c)||i.issues.push({code:"invalid_value",values:r,input:c,inst:e}),i}}),Kn=T("$ZodLiteral",(e,t)=>{if(W.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");let r=new Set(t.values);e._zod.values=r,e._zod.pattern=new RegExp(`^(${t.values.map(n=>typeof n=="string"?Ce(n):n?Ce(n.toString()):String(n)).join("|")})$`),e._zod.parse=(n,i)=>{let u=n.value;return r.has(u)||n.issues.push({code:"invalid_value",values:t.values,input:u,inst:e}),n}});var Jn=T("$ZodTransform",(e,t)=>{W.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Et(e.constructor.name);let i=t.transform(r.value,r);if(n.async)return(i instanceof Promise?i:Promise.resolve(i)).then(c=>(r.value=c,r));if(i instanceof Promise)throw new ce;return r.value=i,r}});function Dn(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}o(Dn,"handleOptionalResult");var Xn=T("$ZodOptional",(e,t)=>{W.init(e,t),e._zod.optin="optional",e._zod.optout="optional",J(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),J(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${At(r.source)})?$`):void 0}),e._zod.parse=(r,n)=>{if(t.innerType._zod.optin==="optional"){let i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(u=>Dn(u,r.value)):Dn(i,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,n)}});var Yn=T("$ZodNullable",(e,t)=>{W.init(e,t),J(e._zod,"optin",()=>t.innerType._zod.optin),J(e._zod,"optout",()=>t.innerType._zod.optout),J(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${At(r.source)}|null)$`):void 0}),J(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,n)=>r.value===null?r:t.innerType._zod.run(r,n)});var Qn=T("$ZodPipe",(e,t)=>{W.init(e,t),J(e._zod,"values",()=>t.in._zod.values),J(e._zod,"optin",()=>t.in._zod.optin),J(e._zod,"optout",()=>t.out._zod.optout),J(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,n)=>{if(n.direction==="backward"){let u=t.out._zod.run(r,n);return u instanceof Promise?u.then(c=>wt(c,t.in,n)):wt(u,t.in,n)}let i=t.in._zod.run(r,n);return i instanceof Promise?i.then(u=>wt(u,t.out,n)):wt(i,t.out,n)}});function wt(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}o(wt,"handlePipeResult");var eo=T("$ZodCustom",(e,t)=>{Me.init(e,t),W.init(e,t),e._zod.parse=(r,n)=>r,e._zod.check=r=>{let n=r.value,i=t.fn(n);if(i instanceof Promise)return i.then(u=>Cn(u,r,n,e));Cn(i,r,n,e)}});function Cn(e,t,r,n){if(!e){let i={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(i.params=n._zod.def.params),t.issues.push(cr(i))}}o(Cn,"handleRefineResult");var ro,lu=Symbol("ZodOutput"),du=Symbol("ZodInput"),gr=class{static{o(this,"$ZodRegistry")}constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...r){let n=r[0];return this._map.set(t,n),n&&typeof n=="object"&&"id"in n&&this._idmap.set(n.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){let r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){let r=t._zod.parent;if(r){let n={...this.get(r)??{}};delete n.id;let i={...n,...this._map.get(t)};return Object.keys(i).length?i:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};function no(){return new gr}o(no,"registry");(ro=globalThis).__zod_globalRegistry??(ro.__zod_globalRegistry=no());var yr=globalThis.__zod_globalRegistry;function oo(e,t){return new e({type:"string",...G(t)})}o(oo,"_string");function io(e,t){return new e({type:"string",coerce:!0,...G(t)})}o(io,"_coercedString");function ao(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...G(t)})}o(ao,"_url");function so(e,t){return new e({type:"number",checks:[],...G(t)})}o(so,"_number");function uo(e,t){return new e({type:"number",coerce:!0,checks:[],...G(t)})}o(uo,"_coercedNumber");function co(e,t){return new e({type:"boolean",...G(t)})}o(co,"_boolean");function po(e,t){return new e({type:"boolean",coerce:!0,...G(t)})}o(po,"_coercedBoolean");function lo(e,t){return new e({type:"bigint",coerce:!0,...G(t)})}o(lo,"_coercedBigint");function mo(e){return new e({type:"any"})}o(mo,"_any");function fo(e){return new e({type:"unknown"})}o(fo,"_unknown");function go(e,t){return new e({type:"void",...G(t)})}o(go,"_void");function yo(e,t){return new e({type:"date",coerce:!0,...G(t)})}o(yo,"_coercedDate");function se(e,t){return new zn({check:"min_length",...G(t),minimum:e})}o(se,"_minLength");function Te(e,t){return new kn({check:"string_format",format:"regex",...G(t),pattern:e})}o(Te,"_regex");function ho(e,t,r){let n=G(r);return n.abort??(n.abort=!0),new e({type:"custom",check:"custom",fn:t,...n})}o(ho,"_custom");var X=T("ZodMiniType",(e,t)=>{if(!e._zod)throw new Error("Uninitialized schema in ZodMiniType.");W.init(e,t),e.def=t,e.type=t.type,e.parse=(r,n)=>kt(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>nt(e,r,n),e.parseAsync=async(r,n)=>Ot(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>ot(e,r,n),e.check=(...r)=>e.clone({...t,checks:[...t.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]},{parent:!0}),e.with=e.check,e.clone=(r,n)=>zt(e,r,n),e.brand=()=>e,e.register=(r,n)=>(r.add(e,n),e),e.apply=r=>r(e)}),Ct=T("ZodMiniString",(e,t)=>{Nt.init(e,t),X.init(e,t)});function a(e){return oo(Ct,e)}o(a,"string");var vo=T("ZodMiniStringFormat",(e,t)=>{dr.init(e,t),Ct.init(e,t)});var bu=T("ZodMiniURL",(e,t)=>{Un.init(e,t),vo.init(e,t)});function xo(e){return ao(bu,e)}o(xo,"url");var hr=T("ZodMiniNumber",(e,t)=>{Mn.init(e,t),X.init(e,t)});function te(e){return so(hr,e)}o(te,"number");var vr=T("ZodMiniBoolean",(e,t)=>{mr.init(e,t),X.init(e,t)});function B(e){return co(vr,e)}o(B,"boolean");var _o=T("ZodMiniBigInt",(e,t)=>{jn.init(e,t),X.init(e,t)});var Tu=T("ZodMiniAny",(e,t)=>{Ln.init(e,t),X.init(e,t)});function at(){return mo(Tu)}o(at,"any");var Iu=T("ZodMiniUnknown",(e,t)=>{Fn.init(e,t),X.init(e,t)});function O(){return fo(Iu)}o(O,"unknown");var Eu=T("ZodMiniVoid",(e,t)=>{Bn.init(e,t),X.init(e,t)});function Po(e){return go(Eu,e)}o(Po,"_void");var bo=T("ZodMiniDate",(e,t)=>{Zn.init(e,t),X.init(e,t)});var $u=T("ZodMiniArray",(e,t)=>{Vn.init(e,t),X.init(e,t)});function N(e,t){return new $u({type:"array",element:e,...G(t)})}o(N,"array");var Su=T("ZodMiniObject",(e,t)=>{Hn.init(e,t),X.init(e,t),J(e,"shape",()=>t.shape)});function p(e,t){let r={type:"object",shape:e??{},...G(t)};return new Su(r)}o(p,"object");var Au=T("ZodMiniUnion",(e,t)=>{fr.init(e,t),X.init(e,t)});function D(e,t){return new Au({type:"union",options:e,...G(t)})}o(D,"union");var zu=T("ZodMiniDiscriminatedUnion",(e,t)=>{Gn.init(e,t),X.init(e,t)});function je(e,t,r){return new zu({type:"union",options:t,discriminator:e,...G(r)})}o(je,"discriminatedUnion");var ku=T("ZodMiniRecord",(e,t)=>{Wn.init(e,t),X.init(e,t)});function w(e,t,r){return new ku({type:"record",keyType:e,valueType:t,...G(r)})}o(w,"record");var Ou=T("ZodMiniEnum",(e,t)=>{qn.init(e,t),X.init(e,t),e.options=Object.values(t.entries)});function M(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new Ou({type:"enum",entries:r,...G(t)})}o(M,"_enum");var wu=T("ZodMiniLiteral",(e,t)=>{Kn.init(e,t),X.init(e,t)});function $(e,t){return new wu({type:"literal",values:Array.isArray(e)?e:[e],...G(t)})}o($,"literal");var Ru=T("ZodMiniTransform",(e,t)=>{Jn.init(e,t),X.init(e,t)});function Ie(e){return new Ru({type:"transform",transform:e})}o(Ie,"transform");var Nu=T("ZodMiniOptional",(e,t)=>{Xn.init(e,t),X.init(e,t)});function h(e){return new Nu({type:"optional",innerType:e})}o(h,"optional");var Du=T("ZodMiniNullable",(e,t)=>{Yn.init(e,t),X.init(e,t)});function st(e){return new Du({type:"nullable",innerType:e})}o(st,"nullable");var Cu=T("ZodMiniPipe",(e,t)=>{Qn.init(e,t),X.init(e,t)});function Ee(e,t){return new Cu({type:"pipe",in:e,out:t})}o(Ee,"pipe");var Uu=T("ZodMiniCustom",(e,t)=>{eo.init(e,t),X.init(e,t)});function Ut(e,t){return ho(Uu,e??(()=>!0),t)}o(Ut,"custom");var ut={};gn(ut,{bigint:()=>Vu,boolean:()=>Zu,date:()=>Hu,number:()=>Bu,string:()=>Fu});function Fu(e){return io(Ct,e)}o(Fu,"string");function Bu(e){return uo(hr,e)}o(Bu,"number");function Zu(e){return po(vr,e)}o(Zu,"boolean");function Vu(e){return lo(_o,e)}o(Vu,"bigint");function Hu(e){return yo(bo,e)}o(Hu,"date");var _r=p({retryOnFailure:p({defaultValue:h(B()),hide:h(B())}),continueOnFailure:p({defaultValue:h(B()),hide:h(B())})}),xr=class{constructor(t,r,n,i,u,c,d,f,y,_,b){this.name=t;this.displayName=r;this.description=n;this.props=i;this.run=u;this.test=c;this.requireAuth=d;this.errorHandlingOptions=f;this.outputSchema=y;this.audience=_;this.aiMetadata=b}static{o(this,"IAction")}},pe=o(e=>new xr(e.name,e.displayName,e.description,e.props,e.run,e.test??e.run,e.requireAuth??!0,e.errorHandlingOptions??{continueOnFailure:{defaultValue:!1},retryOnFailure:{defaultValue:!1}},e.outputSchema,e.audience,e.aiMetadata),"createAction");var F=p({displayName:a(),description:h(a())}),C=o((e,t)=>p({type:$(t),required:B(),defaultValue:h(at())}),"TPropertyValue");var ne=p({...F.shape,...C(a(),"SHORT_TEXT").shape}),fe=p({...F.shape,...C(a(),"LONG_TEXT").shape});var Io=p({label:a(),value:O()}),Mt=p({disabled:h(B()),placeholder:h(a()),options:N(Io)});var oe=p({...F.shape,options:Mt,...C(O(),"STATIC_DROPDOWN").shape}),ge=p({...F.shape,options:Mt,...C(N(O()),"STATIC_MULTI_SELECT_DROPDOWN").shape});var Pr=p({...F.shape,...C(O(),"DROPDOWN").shape,refreshers:N(a())}),ct=p({...F.shape,...C(N(O()),"MULTI_SELECT_DROPDOWN").shape,refreshers:N(a())});var ye=p({...F.shape,...C(B(),"CHECKBOX").shape});var he=p({...F.shape,...C(te(),"NUMBER").shape});var pt=p({...F.shape,...C(O(),"FILE").shape});var lt=p({...F.shape,...C(a(),"DATE_TIME").shape});var Eo=w(a(),D([ne,fe,oe,ct,ge,ye,he,pt,lt])),dt=p({...F.shape,properties:Eo,...C(N(O()),"ARRAY").shape});var mt=p({...F.shape,...C(D([w(a(),O())]),"JSON").shape});var $o=D([ne,oe,mt,dt,ge]),Wu=w(a(),$o),br=p({refreshers:N(a()),...F.shape,...C(O(),"DYNAMIC").shape});var jt=p({...F.shape,...C(Po(),"MARKDOWN").shape});var ft=(r=>(r.ARCHIVE="ARCHIVE",r.REGISTRY="REGISTRY",r))(ft||{}),Le=(r=>(r.CUSTOM="CUSTOM",r.OFFICIAL="OFFICIAL",r))(Le||{}),Fe=(v=>(v.ARTIFICIAL_INTELLIGENCE="ARTIFICIAL_INTELLIGENCE",v.COMMUNICATION="COMMUNICATION",v.COMMERCE="COMMERCE",v.CORE="CORE",v.UNIVERSAL_AI="UNIVERSAL_AI",v.FLOW_CONTROL="FLOW_CONTROL",v.BUSINESS_INTELLIGENCE="BUSINESS_INTELLIGENCE",v.ACCOUNTING="ACCOUNTING",v.PRODUCTIVITY="PRODUCTIVITY",v.CONTENT_AND_FILES="CONTENT_AND_FILES",v.DEVELOPER_TOOLS="DEVELOPER_TOOLS",v.CUSTOMER_SUPPORT="CUSTOMER_SUPPORT",v.FORMS_AND_SURVEYS="FORMS_AND_SURVEYS",v.HUMAN_RESOURCES="HUMAN_RESOURCES",v.PAYMENT_PROCESSING="PAYMENT_PROCESSING",v.MARKETING="MARKETING",v.SALES_AND_CRM="SALES_AND_CRM",v))(Fe||{});var gt=(r=>(r.AUTHORIZATION_CODE="authorization_code",r.CLIENT_CREDENTIALS="client_credentials",r))(gt||{}),Tr="both_client_credentials_and_authorization_code";var Oe=(i=>(i.POLLING="POLLING",i.WEBHOOK="WEBHOOK",i.APP_WEBHOOK="APP_WEBHOOK",i.MANUAL="MANUAL",i))(Oe||{}),yt=(u=>(u.NONE="NONE",u.HEADER_PRESENT="HEADER_PRESENT",u.QUERY_PRESENT="QUERY_PRESENT",u.BODY_PARAM_PRESENT="BODY_PARAM_PRESENT",u.HEAD_REQUEST="HEAD_REQUEST",u))(yt||{}),qu=p({strategy:M(yt),paramName:h(a())}),ht=(r=>(r.SIMULATION="SIMULATION",r.TEST_FUNCTION="TEST_FUNCTION",r))(ht||{});var Lt=(r=>(r.WEBSOCKET="WEBSOCKET",r.NONE="NONE",r))(Lt||{}),So=p({status:h(te()),body:h(O()),headers:h(w(a(),a()))}),Ao=p({type:$("DELAY"),resumeDateTime:a(),requestIdToReply:h(a()),handlerId:h(a()),streamStepProgress:h(M(Lt))}),zo=p({type:$("WEBHOOK"),requestId:a(),requestIdToReply:h(a()),response:So,handlerId:h(a()),streamStepProgress:h(M(Lt))}),Ku=D([Ao,zo]);var Ju=p({body:O(),rawBody:h(O()),headers:w(a(),a()),queryParams:w(a(),a())});function ve(e){return e==null}o(ve,"isNil");function vt(e){return e==null?!0:typeof e=="string"||Array.isArray(e)?e.length===0:typeof e=="object"?Object.keys(e).length===0:!1}o(vt,"isEmpty");function Ft(e,t){if(e==null)throw new Error(`${t} is null or undefined`)}o(Ft,"assertNotNullOrUndefined");var Ir=ke(require("crypto"),1);var Xu=128,we,Be,Yu=o(e=>{!we||we.length<e?(we=Buffer.allocUnsafe(e*Xu),Ir.default.randomFillSync(we),Be=0):Be+e>we.length&&(Ir.default.randomFillSync(we),Be=0),Be+=e},"fillPool"),Qu=o(e=>(Yu(e|=0),we.subarray(Be-e,Be)),"random"),ec=o((e,t,r)=>{let n=(2<<31-Math.clz32(e.length-1|1))-1,i=Math.ceil(1.6*n*t/e.length);return(u=t)=>{let c="";for(;;){let d=r(i),f=i;for(;f--;)if(c+=e[d[f]&n]||"",c.length===u)return c}}},"customRandom"),Oo=o((e,t=21)=>ec(e,t,Qu),"customAlphabet");var tc="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",wo=21,eb=a().check(Te(new RegExp(`^[0-9a-zA-Z]{${wo}}$`))),rc=Oo(tc,wo);var $e=Ee(Ie(e=>e instanceof Date?e.toISOString():e),a()),ie={id:a(),created:$e,updated:$e},H=o(e=>h(st(e)),"Nullable");function Er(e){return h(st(M(e)))}o(Er,"NullableEnum");var nb=Ee(Ie(e=>e==="true"||e===!0?!0:e==="false"||e===!1?!1:void 0),h(B())),Bt=o(e=>Ee(Ie(t=>Array.isArray(t)?t:t!==void 0?[t]:void 0),h(N(e))),"OptionalArrayFromQuery");var ab=w(a(),O());var xt=(_=>(_.OPENAI="openai",_.OPENROUTER="openrouter",_.ANTHROPIC="anthropic",_.AZURE="azure",_.GOOGLE="google",_.ACTIVEPIECES="activepieces",_.CLOUDFLARE_GATEWAY="cloudflare-gateway",_.CUSTOM="custom",_.BEDROCK="bedrock",_.MISTRAL="mistral",_))(xt||{});var vb=a().check(Te(/^#[0-9A-Fa-f]{6}$/));var _b=p({filename:a(),data:O(),type:$("file"),mimetype:h(a())});var nc=ke(No());var Sb=p({...ie,name:a(),permissions:N(a()),platformId:H(a()),type:a(),userCount:h(te())});var Do=(n=>(n.AGENT_DECIDE="agent-decide",n.CHOOSE_YOURSELF="choose-yourself",n.LEAVE_EMPTY="leave-empty",n))(Do||{}),$r=(r=>(r.FILE="FILE",r.TABLE="TABLE",r))($r||{}),Sr=(n=>(n.SSE="sse",n.STREAMABLE_HTTP="streamable-http",n.SIMPLE_HTTP="http",n))(Sr||{});var Ar=(n=>(n.TEXT="text",n.NUMBER="number",n.BOOLEAN="boolean",n))(Ar||{});var zr=(r=>(r.IN_PROGRESS="in-progress",r.COMPLETED="completed",r))(zr||{});var oc=p({mode:M(Do),value:O()}),ic=p({auth:h(a()),fields:w(a(),oc)}),ac=p({pieceName:a(),pieceVersion:a(),actionName:a(),predefinedInput:h(ic)}),sc=p({type:$("PIECE"),toolName:a().check(se(1)),pieceMetadata:ac}),uc=p({type:$("none")}),cc=p({type:$("access_token"),accessToken:a()}),pc=p({type:$("api_key"),apiKey:a(),apiKeyHeader:a()}),lc=p({type:$("headers"),headers:w(a(),a())}),dc=je("type",[uc,cc,pc,lc]),Co=p({type:$("FLOW"),toolName:a().check(se(1)),externalFlowId:a(),flowDisplayName:h(a())}),Uo=p({type:$("MCP"),toolName:a().check(se(1)),serverUrl:xo(),protocol:M(Sr),auth:dc}),Mo=p({type:$("KNOWLEDGE_BASE"),toolName:a().check(se(1)),sourceType:M($r),sourceId:a(),sourceName:a()}),mc=je("type",[sc,Co,Uo,Mo]),fc=p({displayName:a(),description:h(a()),type:M(Ar)}),jo=p({type:$("MARKDOWN"),markdown:a()}),Ze={type:$("TOOL_CALL"),input:H(w(a(),O())),output:h(O()),toolName:a(),status:M(zr),toolCallId:a(),startTime:a(),endTime:h(a())},eT=p(Ze),Lo=je("toolCallType",[p({...Ze,toolCallType:$("PIECE"),pieceName:a(),pieceVersion:a(),actionName:a()}),p({...Ze,toolCallType:$("FLOW"),displayName:a(),externalFlowId:a()}),p({...Ze,toolCallType:$("MCP"),displayName:a(),serverUrl:a()}),p({...Ze,toolCallType:$("KNOWLEDGE_BASE"),displayName:a(),sourceType:a()}),p({...Ze,toolCallType:$("UNKNOWN"),displayName:a()})]),gc=D([jo,Lo]);var kr=(r=>(r.IMAGE="image",r.TEXT="text",r))(kr||{}),xe=p({apiKey:a()}),yc=xe,hc=p({apiKey:a(),apiKeyHash:a()}),vc=xe,xc=xe,_c=xe,Pc=xe,bc=xe,Tc=xe,Ic=xe,Fo=p({accessKeyId:a().check(se(1)),secretAccessKey:a().check(se(1))}),Ec=p({}),$c=p({}),Sc=p({}),Ac=p({}),zc=p({}),kc=p({}),Bo=p({modelId:a(),modelName:a(),modelType:M(kr)}),Zo=p({apiKeyHeader:a(),baseUrl:a(),models:N(Bo),defaultHeaders:h(w(a(),a()))}),Vo=p({accountId:a(),gatewayId:a(),models:N(Bo),vertexProject:h(a()),vertexRegion:h(a())}),Ho=p({resourceName:a(),apiVersion:Ee(Ie(e=>typeof e=="string"&&e.trim().length===0?void 0:e),h(a()))}),Go=p({region:a().check(se(1))}),Oc=D([yc,_c,Pc,bc,Tc,xc,vc,hc,Fo,Ic]),Wo=D([Zo,Vo,Ho,Go,Ec,Sc,Ac,zc,$c,kc]),wc=p({id:a(),name:a(),type:M(kr)}),Rc=p({id:a(),name:a(),provider:M(xt),config:Wo,enabledForChat:B()}),Nc=p({provider:M(xt),config:Wo,auth:Oc,platformId:a()});var oT={openai:"openai",anthropic:"anthropic","google-ai-studio":"google","google-vertex-ai":"google"};var Dc=p({base64Url:a(),fileName:a(),extension:h(a())}),Cc=p({mimeType:a(),url:a(),fileName:h(a())}),Or=D([Dc,Cc]);var Uc=D([p({type:$("file"),value:Or}),p({type:$("markdown"),value:a(),files:h(N(Or))})]),Mc=p({sessionId:a(),message:a(),files:h(N(a()))});var Ko=(r=>(r.ON_NEW_RECORD="ON_NEW_RECORD",r.ON_UPDATE_RECORD="ON_UPDATE_RECORD",r))(Ko||{}),Jo=(r=>(r.ENABLED="ENABLED",r.DISABLED="DISABLED",r))(Jo||{}),wr=(n=>(n.RECORD_CREATED="RECORD_CREATED",n.RECORD_UPDATED="RECORD_UPDATED",n.RECORD_DELETED="RECORD_DELETED",n))(wr||{});var jc=D([p({...ie,name:a(),externalId:a(),type:$("STATIC_DROPDOWN"),tableId:a(),projectId:a(),data:p({options:N(p({value:a()}))})}),p({...ie,name:a(),externalId:a(),type:D([$("TEXT"),$("NUMBER"),$("DATE")]),tableId:a(),projectId:a()})]),Lc=p({...ie,name:a(),folderId:H(a()),projectId:a(),externalId:a(),status:Er(Jo),trigger:Er(Ko)}),Fc=p({...ie,tableId:a(),projectId:a(),cells:w(a(),p({updated:a(),created:a(),value:O(),fieldName:a()}))}),Bc=p({events:N(M(wr)),webhookUrl:a(),flowId:a()}),Zc=p({fields:N(p({id:a(),name:a()})),rows:N(w(a(),a())),name:a()}),Vc=p({projectId:a(),limit:h(ut.number()),cursor:h(a()),name:h(a()),externalIds:Bt(a()),folderId:h(a()),folderIds:Bt(a())}),Hc=p({records:N(N(p({fieldId:a(),value:Yo()}))),tableId:a()}),Gc=p({cells:h(N(p({fieldId:a(),value:Yo()}))),tableId:a(),agentUpdate:h(B())}),Xo=je("operator",[Re("eq"),Re("neq"),Re("gt"),Re("gte"),Re("lt"),Re("lte"),Re("co"),qo("exists"),qo("not_exists")]),Wc=p({tableId:a(),limit:h(ut.number()),cursor:h(a()),filters:Bt(Xo)});function Yo(){return Ee(Ie(e=>e==null?e:String(e)),st(a()))}o(Yo,"coerceToString");function Re(e){return p({fieldId:a(),operator:$(e),value:a()})}o(Re,"valueFilter");function qo(e){return p({fieldId:a(),operator:$(e)})}o(qo,"existenceFilter");var qc=p({status:h(te()),body:h(O()),headers:h(w(a(),a()))}),Kc=p({...ie,deleted:H($e),ownerId:a(),displayName:a(),platformId:a(),externalId:H(a())});var Qo=p({name:a(),description:h(a()),type:a(),required:B()}),Jc=p({pieceName:a(),triggerName:a(),input:p({toolName:a(),toolDescription:a(),inputSchema:N(Qo),returnsResponse:B()})});var ei="^[0-9]+\\.[0-9]+\\.[0-9]+$",TT=new RegExp(ei),Yc="^([~^])?[0-9]+\\.[0-9]+\\.[0-9]+$",IT=a().check(Te(new RegExp(ei))),ET=a().check(Te(new RegExp(Yc))),Qc=p({packageType:$("ARCHIVE"),pieceType:M(Le),pieceName:a(),pieceVersion:a(),archiveId:a(),platformId:a()}),ti=p({packageType:$("REGISTRY"),pieceType:$("OFFICIAL"),pieceName:a(),pieceVersion:a()}),ri=p({packageType:$("REGISTRY"),pieceType:$("CUSTOM"),pieceName:a(),pieceVersion:a(),platformId:a()}),$T=D([ti,ri]),ST=D([Qc,ti,ri]),ni=(t=>(t.CRON_EXPRESSION="CRON_EXPRESSION",t))(ni||{}),ep=p({type:M(ni),cronExpression:a(),timezone:a()}),AT=p({...ie,type:M(Oe),projectId:a(),flowId:a(),triggerName:a(),schedule:H(ep),flowVersionId:a(),pieceName:a(),pieceVersion:a(),deleted:H(a()),simulate:B()}),oi=(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.KNOWLEDGE_BASE="KNOWLEDGE_BASE",m.FLOW_BUNDLE="FLOW_BUNDLE",m))(oi||{}),ii=(r=>(r.NONE="NONE",r.ZSTD="ZSTD",r))(ii||{}),ai=(r=>(r.S3="S3",r.DB="DB",r))(ai||{}),zT=p({...ie,projectId:H(a()),platformId:H(a()),type:M(oi),compression:M(ii),data:h(O()),location:M(ai),size:H(te()),fileName:H(a()),s3Key:H(a()),metadata:H(w(a(),a()))}),si=(n=>(n.ADMIN="ADMIN",n.MEMBER="MEMBER",n.OPERATOR="OPERATOR",n))(si||{}),ui=(r=>(r.ACTIVE="ACTIVE",r.INACTIVE="INACTIVE",r))(ui||{}),kT=p({id:a(),email:a(),firstName:a(),status:M(ui),externalId:H(a()),platformId:H(a()),platformRole:M(si),lastName:a(),created:$e,updated:$e,lastActiveDate:H($e),imageUrl:H(a())});var Rr=p({...F.shape,...C(w(a(),O()),"OBJECT").shape});var di=p({...F.shape,...C(a(),"COLOR").shape});var Nr=D([ne,fe,jt,ye,oe,ge,Pr,ct,br,he,dt,Rr,mt,lt,pt,di]),S={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"}},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"}},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 le=p({displayName:a(),description:h(a())});var mi=p({username:a(),password:a()}),Dr=p({...le.shape,username:p({displayName:a(),description:h(a())}),password:p({displayName:a(),description:h(a())}),...C(mi,"BASIC_AUTH").shape});var op=w(a(),D([ne,fe,he,ye,oe])),Cr=p({...le.shape,props:op,...C(O(),"CUSTOM_AUTH").shape});var Ne=p({...le.shape,...C(p({auth:a()}),"SECRET_TEXT").shape});var ip=w(a(),D([ne,fe,Ne,he,ye,oe,ge,jt])),fi=p({...le.shape,props:ip,...C(O(),"OIDC").shape});var Ur=(r=>(r.HEADER="HEADER",r.BODY="BODY",r))(Ur||{}),gi=D([ne,Ne,oe]),yi=w(a(),gi),ap=p({props:h(w(a(),gi)),authUrl:a(),tokenUrl:a(),scope:N(a()),prompt:h(D([$("none"),$("consent"),$("login"),$("omit")])),pkce:h(B()),pkceMethod:h(D([$("plain"),$("S256")])),authorizationMethod:h(M(Ur)),grantType:h(D([M(gt),$(Tr)])),extra:h(w(a(),a()))}),hi=p({access_token:a(),props:h(yi),data:w(a(),at())}),Mr=p({...le.shape,...ap.shape,...C(hi,"OAUTH2").shape});var Ve=D([Dr,Cr,fi,Mr,Ne]),_t="Connection",jr={SecretText(e){return{...e,valueSchema:void 0,type:"SECRET_TEXT"}},OAuth2(e){return{...e,valueSchema:void 0,type:"OAUTH2",displayName:e.displayName||_t}},BasicAuth(e){return{...e,valueSchema:void 0,type:"BASIC_AUTH",displayName:e.displayName||_t,required:!0}},CustomAuth(e){return{...e,valueSchema:void 0,type:"CUSTOM_AUTH",displayName:e.displayName||_t}},OIDC(e){return{...e,valueSchema:void 0,type:"OIDC",displayName:e.displayName||_t}},None(){}};var uE={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 sp=p({...F.shape,...C(O(),"CUSTOM").shape,code:a()});var up=D([Nr,Ve]),Lr=w(a(),up),AE=w(a(),Nr);var vi=D([p({strategy:$("CRON"),cronExpression:a()}),p({strategy:$("NONE")})]);var xi="2",Vt="0.82.0";var Fr=class{constructor(t,r,n,i,u,c,d,f,y=Vt,_,b=""){this.displayName=t;this.logoUrl=r;this.authors=n;this.events=i;this.categories=d;this.auth=f;this.minimumSupportedRelease=y;this.maximumSupportedRelease=_;this.description=b;this._actions={};this._triggers={};this.getContextInfo=o(()=>({version:xi}),"getContextInfo");(!cp(y)||pp(y,Vt))&&(this.minimumSupportedRelease=Vt),u.forEach(x=>this._actions[x.name]=x),c.forEach(x=>this._triggers[x.name]=x)}static{o(this,"Piece")}metadata(){return{displayName:this.displayName,logoUrl:this.logoUrl,actions:this._actions,triggers:this._triggers,categories:this.categories,description:this.description,authors:this.authors,auth:this.auth,minimumSupportedRelease:this.minimumSupportedRelease,maximumSupportedRelease:this.maximumSupportedRelease,contextInfo:this.getContextInfo?.()}}getAction(t){return this._actions[t]}getTrigger(t){return this._triggers[t]}actions(){return this._actions}triggers(){return this._triggers}},_i=o(e=>{if(e.auth&&Array.isArray(e.auth)&&!e.auth.every((r,n,i)=>n===i.findIndex(u=>u.type===r.type)))throw new Error("Auth properties must be unique by type");return new Fr(e.displayName,e.logoUrl,e.authors??[],e.events,e.actions,e.triggers,e.categories??[],e.auth,e.minimumSupportedRelease,e.maximumSupportedRelease,e.description)},"createPiece");function cp(e){return/^\d+\.\d+\.\d+$/.test(e)}o(cp,"isValidSimpleSemver");function pp(e,t){let[r,n,i]=e.split(".").map(Number),[u,c,d]=t.split(".").map(Number);return r!==u?r<u:n!==c?n<c:i<d}o(pp,"isSemverLessThan");var lp=h(w(a(),w(a(),a()))),Pi=p({id:h(a()),name:a(),displayName:a(),logoUrl:a(),description:a(),authors:N(a()),platformId:h(a()),directoryPath:h(a()),auth:h(D([Ve,N(Ve)])),version:a(),categories:h(N(M(Fe))),minimumSupportedRelease:h(a()),maximumSupportedRelease:h(a()),i18n:lp}),dp=M(["human","ai","both"]),bi=p({description:h(a()),idempotent:h(B())}),Ti=p({name:a(),displayName:a(),description:a(),props:Lr,requireAuth:B(),errorHandlingOptions:h(_r),outputSchema:h(Ut()),audience:h(dp),aiMetadata:h(bi)}),Ii=p({name:a(),displayName:a(),description:a(),props:Lr,errorHandlingOptions:h(_r),type:M(Oe),sampleData:O(),handshakeConfiguration:h(Ut()),renewConfiguration:h(vi),testStrategy:M(ht),outputSchema:h(Ut()),aiMetadata:h(bi)}),mp=p({...Pi.shape,actions:w(a(),Ti),triggers:w(a(),Ii)}),fp=p({...Pi.shape,actions:te(),triggers:te(),suggestedActions:h(N(Ii)),suggestedTriggers:h(N(Ti))}),Ei=p({projectUsage:te(),tags:h(N(a())),pieceType:M(Le),packageType:M(ft),platformId:h(a()),archiveId:h(a())}),A$=p({...mp.shape,...Ei.shape}),z$=p({...fp.shape,...Ei.shape}),k$=p({name:a(),version:a()});var gp=ke(require("path")),yp=ke(require("fs/promises"));var Ht=class{constructor(t,r){this.baseUrl=t;this.authenticationConverter=r}static{o(this,"BaseHttpClient")}getUrl(t){let r=new URL(`${this.baseUrl}${t.url}`),n=`${r.origin}${r.pathname}`,i=new URLSearchParams;return r.searchParams.forEach((u,c)=>{i.append(c,u)}),{urlWithoutQueryParams:n,queryParams:i}}getHeaders(t){let r={Accept:"application/json"};if(t.authentication&&this.populateAuthentication(t.authentication,r),t.body)switch(t.headers?.["Content-Type"]){case"text/csv":r["Content-Type"]="text/csv";break;default:r["Content-Type"]="application/json";break}return t.headers&&(r={...r,...t.headers}),r}populateAuthentication(t,r){this.authenticationConverter.convert(t,r)}};var Gt=class{static{o(this,"DelegatingAuthenticationConverter")}constructor(t=new Br,r=new Zr){this.converters={BEARER_TOKEN:t,BASIC:r}}convert(t,r){return this.converters[t.type].convert(t,r)}},Br=class{static{o(this,"BearerTokenAuthenticationConverter")}convert(t,r){return r.Authorization=`Bearer ${t.token}`,r}},Zr=class{static{o(this,"BasicTokenAuthenticationConverter")}convert(t,r){let n=`${t.username}:${t.password}`,i=Buffer.from(n).toString("base64");return r.Authorization=`Basic ${i}`,r}};var Wt=class extends Error{constructor(r,n){let i=n.status||500,u=Buffer.isBuffer(n.responseBody)?n.responseBody.toString():n.responseBody;super(JSON.stringify({response:{status:i,body:u},request:{body:r}}));this.requestBody=r;this.status=i,this.responseBody=u}static{o(this,"HttpError")}errorMessage(){return{response:{status:this.status,body:this.responseBody},request:{body:this.requestBody}}}get response(){return{status:this.status,body:this.responseBody}}get request(){return{body:this.requestBody}}};var qt=class extends Ht{static{o(this,"FetchHttpClient")}constructor(t="",r=new Gt){super(t,r)}async sendRequest(t,r){process.env.NODE_TLS_REJECT_UNAUTHORIZED="0";let{urlWithoutQueryParams:n,queryParams:i}=this.getUrl(t),u=this.getHeaders(t),c=t.queryParams??{};for(let[U,ee]of Object.entries(c))i.append(U,ee);let d=i.toString(),f=d?`${n}?${d}`:n,y=t.responseType??"json",_=t.followRedirects??!0,b=t.retries??0,{body:x,extraHeaders:s,isStream:l}=hp(t.body,u),g=xp({...u,...s}),m=await vp(async()=>{let U=new AbortController,ee=t.timeout&&t.timeout>0?setTimeout(()=>U.abort(),t.timeout):void 0;try{let ae={method:t.method.toString(),headers:g,body:x,redirect:_?"follow":"manual",signal:U.signal};return l&&(ae.duplex="half"),r?.dispatcher!==void 0&&(ae.dispatcher=r.dispatcher),await fetch(f,ae)}finally{ee!==void 0&&clearTimeout(ee)}},b),v=_?300:400;if(m.status<200||m.status>=v){let U=await $i(m,y),ee=new Wt(t.body,{status:m.status,responseBody:U});throw console.error("[HttpClient#(sanitized error message)] Request failed:",ee),ee}let P=await $i(m,y);return{status:m.status,headers:_p(m.headers),body:P}}};function hp(e,t){return bp(e)?{body:void 0,extraHeaders:{},isStream:!1}:Pp(e)?{body:e,extraHeaders:e.getHeaders(),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}}o(hp,"serializeBody");async function $i(e,t){switch(t){case"arraybuffer":return Buffer.from(await e.arrayBuffer());case"blob":return await e.blob();case"text":return await e.text();case"json":default:{let r=await e.text();if(r.length===0)return;try{return JSON.parse(r)}catch{return r}}}}o($i,"parseResponseBody");async function vp(e,t){let r;for(let n=0;n<=t;n++)try{let i=await e();if(i.status>=500&&n<t){await Si(n);continue}return i}catch(i){if(r=i,n<t){await Si(n);continue}throw i}throw r}o(vp,"sendWithRetries");function Si(e){let t=Math.min(1e3*2**e,3e4);return new Promise(r=>setTimeout(r,t))}o(Si,"backoff");function xp(e){let t={};for(let[r,n]of Object.entries(e))n!==void 0&&(t[r]=Array.isArray(n)?n.join(", "):n);return t}o(xp,"normalizeHeaders");function _p(e){let t={};return e.forEach((r,n)=>{t[n]=r}),t}o(_p,"toHttpHeaders");function Pp(e){return typeof e=="object"&&e!==null&&typeof e.getHeaders=="function"&&typeof e.pipe=="function"}o(Pp,"isNodeFormData");function bp(e){return e==null}o(bp,"isNil");var Z=new qt;var _e=(c=>(c.GET="GET",c.POST="POST",c.PATCH="PATCH",c.PUT="PUT",c.DELETE="DELETE",c.HEAD="HEAD",c))(_e||{});var cd=ke(require("fs")),ws=ke(ln());var pd={"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 ld(e){let t=e.split(";")[0].trim().toLowerCase();return pd[t]??""}o(ld,"contentTypeToExtension");var dd=o(({baseUrl:e,relativePath:t})=>{let r=e.endsWith("/")?e:`${e}/`,n=t.startsWith("/")?t.slice(1):t;return`${r}${n}`},"joinBaseUrlWithRelativePath"),md=o((e,t)=>{let r="https://api.example.com";try{let n=t?e(t):void 0;return(n?.endsWith("/")?n.slice(0,-1):n)??r}catch{return r}},"getBaseUrlForDescription");function Rs({auth:e,baseUrl:t,authMapping:r,description:n,displayName:i,name:u,props:c,extraProps:d,authLocation:f="headers"}){return pe({audience:"human",name:u||"custom_api_call",displayName:i||"Custom API Call",description:n||"Make a custom API call to a specific endpoint",auth:e,requireAuth:!!e,props:{url:S.DynamicProperties({auth:e,displayName:"",required:!0,refreshers:[],props:o(async({auth:y})=>({url:S.ShortText({displayName:"URL",description:`You can either use the full URL or the relative path to the base URL
3
- i.e ${md(t,y)}/resource or /resource`,required:!0,defaultValue:y?t(y):"",...c?.url??{}})}),"props")}),method:S.StaticDropdown({displayName:"Method",required:!0,options:{options:Object.values(_e).map(y=>({label:y,value:y}))},...c?.method??{}}),headers:S.Object({displayName:"Headers",description:"Authorization headers are injected automatically from your connection.",required:!0,...c?.headers??{}}),queryParams:S.Object({displayName:"Query Parameters",required:!0,...c?.queryParams??{}}),body_type:S.StaticDropdown({displayName:"Body Type",required:!1,defaultValue:"none",options:{disabled:!1,options:[{label:"None",value:"none"},{label:"JSON",value:"json"},{label:"Form Data",value:"form_data"},{label:"Raw",value:"raw"}]}}),body:S.DynamicProperties({auth:e,displayName:"Body",refreshers:["body_type"],required:!1,props:o(async({body_type:y})=>{if(!y)return{};let _=y,b={};switch(_){case"none":break;case"json":b.data=S.Json({displayName:"JSON Body",required:!0,...c?.body??{}});break;case"raw":b.data=S.LongText({displayName:"Raw Body",required:!0});break;case"form_data":b.data=S.Array({displayName:"Form Data",required:!0,properties:{fieldName:S.ShortText({displayName:"Field Name",required:!0}),fieldType:S.StaticDropdown({displayName:"Field Type",required:!0,options:{disabled:!1,options:[{label:"Text",value:"text"},{label:"File",value:"file"}]}}),textFieldValue:S.LongText({displayName:"Text Field Value",required:!1}),fileFieldValue:S.File({displayName:"File Field Value",required:!1})}});break}return b},"props")}),response_is_binary:S.Checkbox({displayName:"Response is Binary ?",description:"Enable for files like PDFs, images, etc.",required:!1,defaultValue:!1}),failsafe:S.Checkbox({displayName:"No Error on Failure",required:!1,...c?.failsafe??{}}),timeout:S.Number({displayName:"Timeout (in seconds)",required:!1,...c?.timeout??{}}),followRedirects:S.Checkbox({displayName:"Follow redirects",required:!1,defaultValue:!1}),...d},run:o(async y=>{let{method:_,url:b,headers:x,queryParams:s,body:l,body_type:g,failsafe:m,timeout:v,response_is_binary:P,followRedirects:U}=y.propsValue;Ft(_,"Method"),Ft(b,"URL");let ee=ve(r)?{}:await r(y.auth,y.propsValue),ae=b.url,Qe=ae.startsWith("http://")||ae.startsWith("https://")?ae:dd({baseUrl:t(y.auth),relativePath:ae}),ze={method:_,url:Qe,headers:{...x??{},...f==="headers"||!ve(f)?ee:{}},queryParams:{...f==="queryParams"?ee:{},...s??{}},timeout:v?v*1e3:0,followRedirects:U};if(P&&(ze.responseType="arraybuffer"),l)if(g&&g!=="none"){let de=l.data;if(g==="form_data"){let Bs=de,It=new ws.default;for(let{fieldName:dn,fieldType:mn,textFieldValue:fn,fileFieldValue:or}of Bs)mn==="text"&&!vt(fn)?It.append(dn,fn):mn==="file"&&!vt(or)&&It.append(dn,or.data,{filename:or?.filename});ze.body=It,ze.headers={...ze.headers,...It.getHeaders()}}else ze.body=de}else g||(ze.body=l);try{let de=await Z.sendRequest(ze);return await fd(y.files,de.body,de.status,de.headers,P)}catch(de){if(m)return de.errorMessage();throw de}},"run")})}o(Rs,"createCustomApiCallAction");var fd=o(async(e,t,r,n,i)=>{let u;if(i&&gd(t)){let c=Array.isArray(n?.["content-type"])?n["content-type"][0]:n?.["content-type"],d=ld(c??"")||"txt",f;t instanceof ArrayBuffer?f=Buffer.from(new Uint8Array(t)):Buffer.isBuffer(t)?f=t:f=Buffer.from(t),u=await e.write({fileName:`output.${d}`,data:f})}else u=t;return{status:r,headers:n,body:u}},"handleBinaryResponse"),gd=o(e=>e instanceof ArrayBuffer||Buffer.isBuffer(e),"isBinaryBody");var V="https://client.camb.ai/apis",Ae=5e3;var Je=10,Ns=120,Ds=S.Dropdown({auth:Q,displayName:"Voice",description:"Select the voice to generate the speech.",required:!0,refreshers:[],options:o(async({auth:e})=>e?{disabled:!1,options:((await Z.sendRequest({method:"GET",url:`${V}/list-voices`,headers:{"x-api-key":e.secret_text}})).body??[]).map(n=>({label:n.voice_name,value:n.id}))}:{disabled:!0,options:[],placeholder:"Please authenticate first"},"options")}),Xe=S.Dropdown({auth:Q,displayName:"Source Language",description:"Select the original language of the input text.",required:!0,refreshers:[],options:o(async({auth:e})=>e?{disabled:!1,options:((await Z.sendRequest({method:"GET",url:`${V}/source-languages`,headers:{"x-api-key":e.secret_text}})).body??[]).map(n=>({label:`${n.language} (${n.short_name})`,value:n.id}))}:{disabled:!0,options:[],placeholder:"Please authenticate first"},"options")}),Cs=S.Dropdown({displayName:"Target Language",description:"Select the language to translate the text into.",auth:Q,required:!0,refreshers:[],options:o(async({auth:e})=>e?{disabled:!1,options:((await Z.sendRequest({method:"GET",url:`${V}/target-languages`,headers:{"x-api-key":e.secret_text}})).body??[]).map(n=>({label:`${n.language} (${n.short_name})`,value:n.id}))}:{disabled:!0,options:[],placeholder:"Please authenticate first"},"options")}),Ye=S.Dropdown({displayName:"Folder",auth:Q,description:"Select the folder to save the task in.",required:!1,refreshers:[],options:o(async({auth:e})=>{if(!e)return{disabled:!0,options:[],placeholder:"Please authenticate first"};try{return{disabled:!1,options:((await Z.sendRequest({method:"GET",url:`${V}/folders`,headers:{"x-api-key":e.secret_text}})).body??[]).map(n=>({label:n.folder_name,value:n.folder_id}))}}catch{return{disabled:!0,options:[],placeholder:"Could not load folders."}}},"options")});var Q=jr.SecretText({displayName:"API Key",description:`
1
+ "use strict";var nu=Object.create;var tt=Object.defineProperty;var ou=Object.getOwnPropertyDescriptor;var iu=Object.getOwnPropertyNames;var au=Object.getPrototypeOf,su=Object.prototype.hasOwnProperty;var o=(e,t)=>tt(e,"name",{value:t,configurable:!0});var E=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}},vn=(e,t)=>{for(var r in t)tt(e,r,{get:t[r],enumerable:!0})},xn=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of iu(t))!su.call(e,i)&&i!==r&&tt(e,i,{get:()=>t[i],enumerable:!(n=ou(t,i))||n.enumerable});return e};var Re=(e,t,r)=>(r=e!=null?nu(au(e)):{},xn(t||!e||!e.__esModule?tt(r,"default",{value:e,enumerable:!0}):r,e)),uu=e=>xn(tt({},"__esModule",{value:!0}),e);var Zo=E((Bo,Wt)=>{(function(e){"use strict";let t="(0?\\d+|0x[a-f0-9]+)",r={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")},n=new RegExp("^0[0-7]+$","i"),i=new RegExp("^0x[a-f0-9]+$","i"),u="%[0-9a-z]{1,}",c="(?:[0-9a-f]+::?)+",l={zoneIndex:new RegExp(u,"i"),native:new RegExp(`^(::)?(${c})?([0-9a-f]+)?(::)?(${u})?$`,"i"),deprecatedTransitional:new RegExp(`^(?:::)(${t}\\.${t}\\.${t}\\.${t}(${u})?)$`,"i"),transitional:new RegExp(`^((?:${c})|(?:::)(?:${c})?)${t}\\.${t}\\.${t}\\.${t}(${u})?$`,"i")};function f(s,d){if(s.indexOf("::")!==s.lastIndexOf("::"))return null;let g=0,m=-1,v=(s.match(l.zoneIndex)||[])[0],P,U;for(v&&(v=v.substring(1),s=s.replace(/%.+$/,""));(m=s.indexOf(":",m+1))>=0;)g++;if(s.substr(0,2)==="::"&&g--,s.substr(-2,2)==="::"&&g--,g>d)return null;for(U=d-g,P=":";U--;)P+="0:";return s=s.replace("::",P),s[0]===":"&&(s=s.slice(1)),s[s.length-1]===":"&&(s=s.slice(0,-1)),d=(function(){let ee=s.split(":"),ae=[];for(let et=0;et<ee.length;et++)ae.push(parseInt(ee[et],16));return ae})(),{parts:d,zoneId:v}}o(f,"expandIPv6");function y(s,d,g,m){if(s.length!==d.length)throw new Error("ipaddr: cannot match CIDR for objects with different lengths");let v=0,P;for(;m>0;){if(P=g-m,P<0&&(P=0),s[v]>>P!==d[v]>>P)return!1;m-=g,v+=1}return!0}o(y,"matchCIDR");function x(s){if(i.test(s))return parseInt(s,16);if(s[0]==="0"&&!isNaN(parseInt(s[1],10))){if(n.test(s))return parseInt(s,8);throw new Error(`ipaddr: cannot parse ${s} as octal`)}return parseInt(s,10)}o(x,"parseIntAuto");function T(s,d){for(;s.length<d;)s=`0${s}`;return s}o(T,"padPart");let _={};_.IPv4=(function(){function s(d){if(d.length!==4)throw new Error("ipaddr: ipv4 octet count should be 4");let g,m;for(g=0;g<d.length;g++)if(m=d[g],!(0<=m&&m<=255))throw new Error("ipaddr: ipv4 octet should fit in 8 bits");this.octets=d}return o(s,"IPv4"),s.prototype.SpecialRanges={unspecified:[[new s([0,0,0,0]),8]],broadcast:[[new s([255,255,255,255]),32]],multicast:[[new s([224,0,0,0]),4]],linkLocal:[[new s([169,254,0,0]),16]],loopback:[[new s([127,0,0,0]),8]],carrierGradeNat:[[new s([100,64,0,0]),10]],private:[[new s([10,0,0,0]),8],[new s([172,16,0,0]),12],[new s([192,168,0,0]),16]],reserved:[[new s([192,0,0,0]),24],[new s([192,0,2,0]),24],[new s([192,88,99,0]),24],[new s([198,18,0,0]),15],[new s([198,51,100,0]),24],[new s([203,0,113,0]),24],[new s([240,0,0,0]),4]],as112:[[new s([192,175,48,0]),24],[new s([192,31,196,0]),24]],amt:[[new s([192,52,193,0]),24]]},s.prototype.kind=function(){return"ipv4"},s.prototype.match=function(d,g){let m;if(g===void 0&&(m=d,d=m[0],g=m[1]),d.kind()!=="ipv4")throw new Error("ipaddr: cannot match ipv4 address with non-ipv4 one");return y(this.octets,d.octets,8,g)},s.prototype.prefixLengthFromSubnetMask=function(){let d=0,g=!1,m={0:8,128:7,192:6,224:5,240:4,248:3,252:2,254:1,255:0},v,P,U;for(v=3;v>=0;v-=1)if(P=this.octets[v],P in m){if(U=m[P],g&&U!==0)return null;U!==8&&(g=!0),d+=U}else return null;return 32-d},s.prototype.range=function(){return _.subnetMatch(this,this.SpecialRanges)},s.prototype.toByteArray=function(){return this.octets.slice(0)},s.prototype.toIPv4MappedAddress=function(){return _.IPv6.parse(`::ffff:${this.toString()}`)},s.prototype.toNormalizedString=function(){return this.toString()},s.prototype.toString=function(){return this.octets.join(".")},s})(),_.IPv4.broadcastAddressFromCIDR=function(s){try{let d=this.parseCIDR(s),g=d[0].toByteArray(),m=this.subnetMaskFromPrefixLength(d[1]).toByteArray(),v=[],P=0;for(;P<4;)v.push(parseInt(g[P],10)|parseInt(m[P],10)^255),P++;return new this(v)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},_.IPv4.isIPv4=function(s){return this.parser(s)!==null},_.IPv4.isValid=function(s){try{return new this(this.parser(s)),!0}catch{return!1}},_.IPv4.isValidCIDR=function(s){try{return this.parseCIDR(s),!0}catch{return!1}},_.IPv4.isValidFourPartDecimal=function(s){return!!(_.IPv4.isValid(s)&&s.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/))},_.IPv4.isValidCIDRFourPartDecimal=function(s){let d=s.match(/^(.+)\/(\d+)$/);return!_.IPv4.isValidCIDR(s)||!d?!1:_.IPv4.isValidFourPartDecimal(d[1])},_.IPv4.networkAddressFromCIDR=function(s){let d,g,m,v,P;try{for(d=this.parseCIDR(s),m=d[0].toByteArray(),P=this.subnetMaskFromPrefixLength(d[1]).toByteArray(),v=[],g=0;g<4;)v.push(parseInt(m[g],10)&parseInt(P[g],10)),g++;return new this(v)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},_.IPv4.parse=function(s){let d=this.parser(s);if(d===null)throw new Error("ipaddr: string is not formatted like an IPv4 Address");return new this(d)},_.IPv4.parseCIDR=function(s){let d;if(d=s.match(/^(.+)\/(\d+)$/)){let g=parseInt(d[2]);if(g>=0&&g<=32){let m=[this.parse(d[1]),g];return Object.defineProperty(m,"toString",{value:o(function(){return this.join("/")},"value")}),m}}throw new Error("ipaddr: string is not formatted like an IPv4 CIDR range")},_.IPv4.parser=function(s){let d,g,m;if(d=s.match(r.fourOctet))return(function(){let v=d.slice(1,6),P=[];for(let U=0;U<v.length;U++)g=v[U],P.push(x(g));return P})();if(d=s.match(r.longValue)){if(m=x(d[1]),m>4294967295||m<0)throw new Error("ipaddr: address outside defined range");return(function(){let v=[],P;for(P=0;P<=24;P+=8)v.push(m>>P&255);return v})().reverse()}else return(d=s.match(r.twoOctet))?(function(){let v=d.slice(1,4),P=[];if(m=x(v[1]),m>16777215||m<0)throw new Error("ipaddr: address outside defined range");return P.push(x(v[0])),P.push(m>>16&255),P.push(m>>8&255),P.push(m&255),P})():(d=s.match(r.threeOctet))?(function(){let v=d.slice(1,5),P=[];if(m=x(v[2]),m>65535||m<0)throw new Error("ipaddr: address outside defined range");return P.push(x(v[0])),P.push(x(v[1])),P.push(m>>8&255),P.push(m&255),P})():null},_.IPv4.subnetMaskFromPrefixLength=function(s){if(s=parseInt(s),s<0||s>32)throw new Error("ipaddr: invalid IPv4 prefix length");let d=[0,0,0,0],g=0,m=Math.floor(s/8);for(;g<m;)d[g]=255,g++;return m<4&&(d[m]=Math.pow(2,s%8)-1<<8-s%8),new this(d)},_.IPv6=(function(){function s(d,g){let m,v;if(d.length===16)for(this.parts=[],m=0;m<=14;m+=2)this.parts.push(d[m]<<8|d[m+1]);else if(d.length===8)this.parts=d;else throw new Error("ipaddr: ipv6 part count should be 8 or 16");for(m=0;m<this.parts.length;m++)if(v=this.parts[m],!(0<=v&&v<=65535))throw new Error("ipaddr: ipv6 part should fit in 16 bits");g&&(this.zoneId=g)}return o(s,"IPv6"),s.prototype.SpecialRanges={unspecified:[new s([0,0,0,0,0,0,0,0]),128],linkLocal:[new s([65152,0,0,0,0,0,0,0]),10],multicast:[new s([65280,0,0,0,0,0,0,0]),8],loopback:[new s([0,0,0,0,0,0,0,1]),128],uniqueLocal:[new s([64512,0,0,0,0,0,0,0]),7],ipv4Mapped:[new s([0,0,0,0,0,65535,0,0]),96],discard:[new s([256,0,0,0,0,0,0,0]),64],rfc6145:[new s([0,0,0,0,65535,0,0,0]),96],rfc6052:[new s([100,65435,0,0,0,0,0,0]),96],"6to4":[new s([8194,0,0,0,0,0,0,0]),16],teredo:[new s([8193,0,0,0,0,0,0,0]),32],benchmarking:[new s([8193,2,0,0,0,0,0,0]),48],amt:[new s([8193,3,0,0,0,0,0,0]),32],as112v6:[[new s([8193,4,274,0,0,0,0,0]),48],[new s([9760,79,32768,0,0,0,0,0]),48]],deprecated:[new s([8193,16,0,0,0,0,0,0]),28],orchid2:[new s([8193,32,0,0,0,0,0,0]),28],droneRemoteIdProtocolEntityTags:[new s([8193,48,0,0,0,0,0,0]),28],reserved:[[new s([8193,0,0,0,0,0,0,0]),23],[new s([8193,3512,0,0,0,0,0,0]),32]]},s.prototype.isIPv4MappedAddress=function(){return this.range()==="ipv4Mapped"},s.prototype.kind=function(){return"ipv6"},s.prototype.match=function(d,g){let m;if(g===void 0&&(m=d,d=m[0],g=m[1]),d.kind()!=="ipv6")throw new Error("ipaddr: cannot match ipv6 address with non-ipv6 one");return y(this.parts,d.parts,16,g)},s.prototype.prefixLengthFromSubnetMask=function(){let d=0,g=!1,m={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},v,P;for(let U=7;U>=0;U-=1)if(v=this.parts[U],v in m){if(P=m[v],g&&P!==0)return null;P!==16&&(g=!0),d+=P}else return null;return 128-d},s.prototype.range=function(){return _.subnetMatch(this,this.SpecialRanges)},s.prototype.toByteArray=function(){let d,g=[],m=this.parts;for(let v=0;v<m.length;v++)d=m[v],g.push(d>>8),g.push(d&255);return g},s.prototype.toFixedLengthString=function(){let d=(function(){let m=[];for(let v=0;v<this.parts.length;v++)m.push(T(this.parts[v].toString(16),4));return m}).call(this).join(":"),g="";return this.zoneId&&(g=`%${this.zoneId}`),d+g},s.prototype.toIPv4Address=function(){if(!this.isIPv4MappedAddress())throw new Error("ipaddr: trying to convert a generic ipv6 address to ipv4");let d=this.parts.slice(-2),g=d[0],m=d[1];return new _.IPv4([g>>8,g&255,m>>8,m&255])},s.prototype.toNormalizedString=function(){let d=(function(){let m=[];for(let v=0;v<this.parts.length;v++)m.push(this.parts[v].toString(16));return m}).call(this).join(":"),g="";return this.zoneId&&(g=`%${this.zoneId}`),d+g},s.prototype.toRFC5952String=function(){let d=/((^|:)(0(:|$)){2,})/g,g=this.toNormalizedString(),m=0,v=-1,P;for(;P=d.exec(g);)P[0].length>v&&(m=P.index,v=P[0].length);return v<0?g:`${g.substring(0,m)}::${g.substring(m+v)}`},s.prototype.toString=function(){return this.toRFC5952String()},s})(),_.IPv6.broadcastAddressFromCIDR=function(s){try{let d=this.parseCIDR(s),g=d[0].toByteArray(),m=this.subnetMaskFromPrefixLength(d[1]).toByteArray(),v=[],P=0;for(;P<16;)v.push(parseInt(g[P],10)|parseInt(m[P],10)^255),P++;return new this(v)}catch(d){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${d})`)}},_.IPv6.isIPv6=function(s){return this.parser(s)!==null},_.IPv6.isValid=function(s){if(typeof s=="string"&&s.indexOf(":")===-1)return!1;try{let d=this.parser(s);return new this(d.parts,d.zoneId),!0}catch{return!1}},_.IPv6.isValidCIDR=function(s){if(typeof s=="string"&&s.indexOf(":")===-1)return!1;try{return this.parseCIDR(s),!0}catch{return!1}},_.IPv6.networkAddressFromCIDR=function(s){let d,g,m,v,P;try{for(d=this.parseCIDR(s),m=d[0].toByteArray(),P=this.subnetMaskFromPrefixLength(d[1]).toByteArray(),v=[],g=0;g<16;)v.push(parseInt(m[g],10)&parseInt(P[g],10)),g++;return new this(v)}catch(U){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${U})`)}},_.IPv6.parse=function(s){let d=this.parser(s);if(d.parts===null)throw new Error("ipaddr: string is not formatted like an IPv6 Address");return new this(d.parts,d.zoneId)},_.IPv6.parseCIDR=function(s){let d,g,m;if((g=s.match(/^(.+)\/(\d+)$/))&&(d=parseInt(g[2]),d>=0&&d<=128))return m=[this.parse(g[1]),d],Object.defineProperty(m,"toString",{value:o(function(){return this.join("/")},"value")}),m;throw new Error("ipaddr: string is not formatted like an IPv6 CIDR range")},_.IPv6.parser=function(s){let d,g,m,v,P,U;if(m=s.match(l.deprecatedTransitional))return this.parser(`::ffff:${m[1]}`);if(l.native.test(s))return f(s,8);if((m=s.match(l.transitional))&&(U=m[6]||"",d=m[1],m[1].endsWith("::")||(d=d.slice(0,-1)),d=f(d+U,6),d.parts)){for(P=[parseInt(m[2]),parseInt(m[3]),parseInt(m[4]),parseInt(m[5])],g=0;g<P.length;g++)if(v=P[g],!(0<=v&&v<=255))return null;return d.parts.push(P[0]<<8|P[1]),d.parts.push(P[2]<<8|P[3]),{parts:d.parts,zoneId:d.zoneId}}return null},_.IPv6.subnetMaskFromPrefixLength=function(s){if(s=parseInt(s),s<0||s>128)throw new Error("ipaddr: invalid IPv6 prefix length");let d=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],g=0,m=Math.floor(s/8);for(;g<m;)d[g]=255,g++;return m<16&&(d[m]=Math.pow(2,s%8)-1<<8-s%8),new this(d)},_.fromByteArray=function(s){let d=s.length;if(d===4)return new _.IPv4(s);if(d===16)return new _.IPv6(s);throw new Error("ipaddr: the binary input is neither an IPv6 nor IPv4 address")},_.isValid=function(s){return _.IPv6.isValid(s)||_.IPv4.isValid(s)},_.isValidCIDR=function(s){return _.IPv6.isValidCIDR(s)||_.IPv4.isValidCIDR(s)},_.parse=function(s){if(_.IPv6.isValid(s))return _.IPv6.parse(s);if(_.IPv4.isValid(s))return _.IPv4.parse(s);throw new Error("ipaddr: the address has neither IPv6 nor IPv4 format")},_.parseCIDR=function(s){try{return _.IPv6.parseCIDR(s)}catch{try{return _.IPv4.parseCIDR(s)}catch{throw new Error("ipaddr: the address has neither IPv6 nor IPv4 CIDR format")}}},_.process=function(s){let d=this.parse(s);return d.kind()==="ipv6"&&d.isIPv4MappedAddress()?d.toIPv4Address():d},_.subnetMatch=function(s,d,g){let m,v,P,U;g==null&&(g="unicast");for(v in d)if(Object.prototype.hasOwnProperty.call(d,v)){for(P=d[v],P[0]&&!(P[0]instanceof Array)&&(P=[P]),m=0;m<P.length;m++)if(U=P[m],s.kind()===U[0].kind()&&s.match.apply(s,U))return v}return g},typeof Wt<"u"&&Wt.exports?Wt.exports=_:e.ipaddr=_})(Bo)});var Vi=E((xA,Zi)=>{var Bi=require("stream").Stream,Vl=require("util");Zi.exports=ce;function ce(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}o(ce,"DelayedStream");Vl.inherits(ce,Bi);ce.create=function(e,t){var r=new this;t=t||{};for(var n in t)r[n]=t[n];r.source=e;var i=e.emit;return e.emit=function(){return r._handleEmit(arguments),i.apply(e,arguments)},e.on("error",function(){}),r.pauseStream&&e.pause(),r};Object.defineProperty(ce.prototype,"readable",{configurable:!0,enumerable:!0,get:o(function(){return this.source.readable},"get")});ce.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};ce.prototype.resume=function(){this._released||this.release(),this.source.resume()};ce.prototype.pause=function(){this.source.pause()};ce.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(e){this.emit.apply(this,e)}.bind(this)),this._bufferedEvents=[]};ce.prototype.pipe=function(){var e=Bi.prototype.pipe.apply(this,arguments);return this.resume(),e};ce.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)};ce.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 qi=E((PA,Wi)=>{var Hl=require("util"),Gi=require("stream").Stream,Hi=Vi();Wi.exports=K;function K(){this.writable=!1,this.readable=!0,this.dataSize=0,this.maxDataSize=2*1024*1024,this.pauseStreams=!0,this._released=!1,this._streams=[],this._currentStream=null,this._insideLoop=!1,this._pendingNext=!1}o(K,"CombinedStream");Hl.inherits(K,Gi);K.create=function(e){var t=new this;e=e||{};for(var r in e)t[r]=e[r];return t};K.isStreamLike=function(e){return typeof e!="function"&&typeof e!="string"&&typeof e!="boolean"&&typeof e!="number"&&!Buffer.isBuffer(e)};K.prototype.append=function(e){var t=K.isStreamLike(e);if(t){if(!(e instanceof Hi)){var r=Hi.create(e,{maxDataSize:1/0,pauseStream:this.pauseStreams});e.on("data",this._checkDataSize.bind(this)),e=r}this._handleErrors(e),this.pauseStreams&&e.pause()}return this._streams.push(e),this};K.prototype.pipe=function(e,t){return Gi.prototype.pipe.call(this,e,t),this.resume(),e};K.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}};K.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(r){var n=K.isStreamLike(r);n&&(r.on("data",this._checkDataSize.bind(this)),this._handleErrors(r)),this._pipeNext(r)}.bind(this))};K.prototype._pipeNext=function(e){this._currentStream=e;var t=K.isStreamLike(e);if(t){e.on("end",this._getNext.bind(this)),e.pipe(this,{end:!1});return}var r=e;this.write(r),this._getNext()};K.prototype._handleErrors=function(e){var t=this;e.on("error",function(r){t._emitError(r)})};K.prototype.write=function(e){this.emit("data",e)};K.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"))};K.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")};K.prototype.end=function(){this._reset(),this.emit("end")};K.prototype.destroy=function(){this._reset(),this.emit("close")};K.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};K.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(e))}};K.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)};K.prototype._emitError=function(e){this._reset(),this.emit("error",e)}});var Ji=E((TA,Ki)=>{"use strict";Ki.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 Qi=E(re=>{"use strict";var Yt=Ji(),Gl=require("path").extname,Xi=/^\s*([^;\s]*)(?:;|\s|$)/,Wl=/^text\//i;re.charset=Yi;re.charsets={lookup:Yi};re.contentType=ql;re.extension=Kl;re.extensions=Object.create(null);re.lookup=Jl;re.types=Object.create(null);Xl(re.extensions,re.types);function Yi(e){if(!e||typeof e!="string")return!1;var t=Xi.exec(e),r=t&&Yt[t[1].toLowerCase()];return r&&r.charset?r.charset:t&&Wl.test(t[1])?"UTF-8":!1}o(Yi,"charset");function ql(e){if(!e||typeof e!="string")return!1;var t=e.indexOf("/")===-1?re.lookup(e):e;if(!t)return!1;if(t.indexOf("charset")===-1){var r=re.charset(t);r&&(t+="; charset="+r.toLowerCase())}return t}o(ql,"contentType");function Kl(e){if(!e||typeof e!="string")return!1;var t=Xi.exec(e),r=t&&re.extensions[t[1].toLowerCase()];return!r||!r.length?!1:r[0]}o(Kl,"extension");function Jl(e){if(!e||typeof e!="string")return!1;var t=Gl("x."+e).toLowerCase().substr(1);return t&&re.types[t]||!1}o(Jl,"lookup");function Xl(e,t){var r=["nginx","apache",void 0,"iana"];Object.keys(Yt).forEach(o(function(i){var u=Yt[i],c=u.extensions;if(!(!c||!c.length)){e[i]=c;for(var l=0;l<c.length;l++){var f=c[l];if(t[f]){var y=r.indexOf(Yt[t[f]].source),x=r.indexOf(u.source);if(t[f]!=="application/octet-stream"&&(y>x||y===x&&t[f].substr(0,12)==="application/"))continue}t[f]=i}}},"forEachMimeType"))}o(Xl,"populateMaps")});var ta=E(($A,ea)=>{ea.exports=Yl;function Yl(e){var t=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;t?t(e):setTimeout(e,0)}o(Yl,"defer")});var Wr=E((AA,na)=>{var ra=ta();na.exports=Ql;function Ql(e){var t=!1;return ra(function(){t=!0}),o(function(n,i){t?e(n,i):ra(o(function(){e(n,i)},"nextTick_callback"))},"async_callback")}o(Ql,"async")});var qr=E((OA,oa)=>{oa.exports=ep;function ep(e){Object.keys(e.jobs).forEach(tp.bind(e)),e.jobs={}}o(ep,"abort");function tp(e){typeof this.jobs[e]=="function"&&this.jobs[e]()}o(tp,"clean")});var Kr=E((wA,aa)=>{var ia=Wr(),rp=qr();aa.exports=np;function np(e,t,r,n){var i=r.keyedList?r.keyedList[r.index]:r.index;r.jobs[i]=op(t,i,e[i],function(u,c){i in r.jobs&&(delete r.jobs[i],u?rp(r):r.results[i]=c,n(u,r.results))})}o(np,"iterate");function op(e,t,r,n){var i;return e.length==2?i=e(r,ia(n)):i=e(r,t,ia(n)),i}o(op,"runJob")});var Jr=E((NA,sa)=>{sa.exports=ip;function ip(e,t){var r=!Array.isArray(e),n={index:0,keyedList:r||t?Object.keys(e):null,jobs:{},results:r?{}:[],size:r?Object.keys(e).length:e.length};return t&&n.keyedList.sort(r?t:function(i,u){return t(e[i],e[u])}),n}o(ip,"state")});var Xr=E((CA,ua)=>{var ap=qr(),sp=Wr();ua.exports=up;function up(e){Object.keys(this.jobs).length&&(this.index=this.size,ap(this),sp(e)(null,this.results))}o(up,"terminator")});var la=E((MA,ca)=>{var cp=Kr(),lp=Jr(),pp=Xr();ca.exports=dp;function dp(e,t,r){for(var n=lp(e);n.index<(n.keyedList||e).length;)cp(e,t,n,function(i,u){if(i){r(i,u);return}if(Object.keys(n.jobs).length===0){r(null,n.results);return}}),n.index++;return pp.bind(n,r)}o(dp,"parallel")});var Yr=E((jA,Qt)=>{var pa=Kr(),mp=Jr(),fp=Xr();Qt.exports=gp;Qt.exports.ascending=da;Qt.exports.descending=yp;function gp(e,t,r,n){var i=mp(e,r);return pa(e,t,i,o(function u(c,l){if(c){n(c,l);return}if(i.index++,i.index<(i.keyedList||e).length){pa(e,t,i,u);return}n(null,i.results)},"iteratorHandler")),fp.bind(i,n)}o(gp,"serialOrdered");function da(e,t){return e<t?-1:e>t?1:0}o(da,"ascending");function yp(e,t){return-1*da(e,t)}o(yp,"descending")});var fa=E((BA,ma)=>{var hp=Yr();ma.exports=vp;function vp(e,t,r){return hp(e,t,null,r)}o(vp,"serial")});var ya=E((VA,ga)=>{ga.exports={parallel:la(),serial:fa(),serialOrdered:Yr()}});var Qr=E((HA,ha)=>{"use strict";ha.exports=Object});var xa=E((GA,va)=>{"use strict";va.exports=Error});var Pa=E((WA,_a)=>{"use strict";_a.exports=EvalError});var Ta=E((qA,ba)=>{"use strict";ba.exports=RangeError});var Ea=E((KA,Ia)=>{"use strict";Ia.exports=ReferenceError});var Sa=E((JA,$a)=>{"use strict";$a.exports=SyntaxError});var er=E((XA,Aa)=>{"use strict";Aa.exports=TypeError});var Oa=E((YA,za)=>{"use strict";za.exports=URIError});var wa=E((QA,ka)=>{"use strict";ka.exports=Math.abs});var Na=E((ez,Ra)=>{"use strict";Ra.exports=Math.floor});var Ca=E((tz,Da)=>{"use strict";Da.exports=Math.max});var Ma=E((rz,Ua)=>{"use strict";Ua.exports=Math.min});var ja=E((nz,La)=>{"use strict";La.exports=Math.pow});var Ba=E((oz,Fa)=>{"use strict";Fa.exports=Math.round});var Va=E((iz,Za)=>{"use strict";Za.exports=Number.isNaN||o(function(t){return t!==t},"isNaN")});var Ga=E((sz,Ha)=>{"use strict";var xp=Va();Ha.exports=o(function(t){return xp(t)||t===0?t:t<0?-1:1},"sign")});var qa=E((cz,Wa)=>{"use strict";Wa.exports=Object.getOwnPropertyDescriptor});var en=E((lz,Ka)=>{"use strict";var tr=qa();if(tr)try{tr([],"length")}catch{tr=null}Ka.exports=tr});var Xa=E((pz,Ja)=>{"use strict";var rr=Object.defineProperty||!1;if(rr)try{rr({},"a",{value:1})}catch{rr=!1}Ja.exports=rr});var tn=E((dz,Ya)=>{"use strict";Ya.exports=o(function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;t[r]=i;for(var u 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 c=Object.getOwnPropertySymbols(t);if(c.length!==1||c[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var l=Object.getOwnPropertyDescriptor(t,r);if(l.value!==i||l.enumerable!==!0)return!1}return!0},"hasSymbols")});var ts=E((fz,es)=>{"use strict";var Qa=typeof Symbol<"u"&&Symbol,_p=tn();es.exports=o(function(){return typeof Qa!="function"||typeof Symbol!="function"||typeof Qa("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:_p()},"hasNativeSymbols")});var rn=E((yz,rs)=>{"use strict";rs.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var nn=E((hz,ns)=>{"use strict";var Pp=Qr();ns.exports=Pp.getPrototypeOf||null});var as=E((vz,is)=>{"use strict";var bp="Function.prototype.bind called on incompatible ",Tp=Object.prototype.toString,Ip=Math.max,Ep="[object Function]",os=o(function(t,r){for(var n=[],i=0;i<t.length;i+=1)n[i]=t[i];for(var u=0;u<r.length;u+=1)n[u+t.length]=r[u];return n},"concatty"),$p=o(function(t,r){for(var n=[],i=r||0,u=0;i<t.length;i+=1,u+=1)n[u]=t[i];return n},"slicy"),Sp=o(function(e,t){for(var r="",n=0;n<e.length;n+=1)r+=e[n],n+1<e.length&&(r+=t);return r},"joiny");is.exports=o(function(t){var r=this;if(typeof r!="function"||Tp.apply(r)!==Ep)throw new TypeError(bp+r);for(var n=$p(arguments,1),i,u=o(function(){if(this instanceof i){var x=r.apply(this,os(n,arguments));return Object(x)===x?x:this}return r.apply(t,os(n,arguments))},"binder"),c=Ip(0,r.length-n.length),l=[],f=0;f<c;f++)l[f]="$"+f;if(i=Function("binder","return function ("+Sp(l,",")+"){ return binder.apply(this,arguments); }")(u),r.prototype){var y=o(function(){},"Empty");y.prototype=r.prototype,i.prototype=new y,y.prototype=null}return i},"bind")});var Ge=E((_z,ss)=>{"use strict";var Ap=as();ss.exports=Function.prototype.bind||Ap});var nr=E((Pz,us)=>{"use strict";us.exports=Function.prototype.call});var on=E((bz,cs)=>{"use strict";cs.exports=Function.prototype.apply});var ps=E((Tz,ls)=>{"use strict";ls.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var ms=E((Iz,ds)=>{"use strict";var zp=Ge(),Op=on(),kp=nr(),wp=ps();ds.exports=wp||zp.call(kp,Op)});var gs=E((Ez,fs)=>{"use strict";var Rp=Ge(),Np=er(),Dp=nr(),Cp=ms();fs.exports=o(function(t){if(t.length<1||typeof t[0]!="function")throw new Np("a function is required");return Cp(Rp,Dp,t)},"callBindBasic")});var Ps=E((Sz,_s)=>{"use strict";var Up=gs(),ys=en(),vs;try{vs=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!="object"||!("code"in e)||e.code!=="ERR_PROTO_ACCESS")throw e}var an=!!vs&&ys&&ys(Object.prototype,"__proto__"),xs=Object,hs=xs.getPrototypeOf;_s.exports=an&&typeof an.get=="function"?Up([an.get]):typeof hs=="function"?o(function(t){return hs(t==null?t:xs(t))},"getDunder"):!1});var $s=E((zz,Es)=>{"use strict";var bs=rn(),Ts=nn(),Is=Ps();Es.exports=bs?o(function(t){return bs(t)},"getProto"):Ts?o(function(t){if(!t||typeof t!="object"&&typeof t!="function")throw new TypeError("getProto: not an object");return Ts(t)},"getProto"):Is?o(function(t){return Is(t)},"getProto"):null});var sn=E((kz,Ss)=>{"use strict";var Mp=Function.prototype.call,Lp=Object.prototype.hasOwnProperty,jp=Ge();Ss.exports=jp.call(Mp,Lp)});var Ns=E((wz,Rs)=>{"use strict";var L,Fp=Qr(),Bp=xa(),Zp=Pa(),Vp=Ta(),Hp=Ea(),Je=Sa(),Ke=er(),Gp=Oa(),Wp=wa(),qp=Na(),Kp=Ca(),Jp=Ma(),Xp=ja(),Yp=Ba(),Qp=Ga(),ks=Function,un=o(function(e){try{return ks('"use strict"; return ('+e+").constructor;")()}catch{}},"getEvalledConstructor"),Tt=en(),ed=Xa(),cn=o(function(){throw new Ke},"throwTypeError"),td=Tt?(function(){try{return arguments.callee,cn}catch{try{return Tt(arguments,"callee").get}catch{return cn}}})():cn,We=ts()(),Y=$s(),rd=nn(),nd=rn(),ws=on(),It=nr(),qe={},od=typeof Uint8Array>"u"||!Y?L:Y(Uint8Array),Me={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?L:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?L:ArrayBuffer,"%ArrayIteratorPrototype%":We&&Y?Y([][Symbol.iterator]()):L,"%AsyncFromSyncIteratorPrototype%":L,"%AsyncFunction%":qe,"%AsyncGenerator%":qe,"%AsyncGeneratorFunction%":qe,"%AsyncIteratorPrototype%":qe,"%Atomics%":typeof Atomics>"u"?L:Atomics,"%BigInt%":typeof BigInt>"u"?L:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?L:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?L:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?L:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Bp,"%eval%":eval,"%EvalError%":Zp,"%Float16Array%":typeof Float16Array>"u"?L:Float16Array,"%Float32Array%":typeof Float32Array>"u"?L:Float32Array,"%Float64Array%":typeof Float64Array>"u"?L:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?L:FinalizationRegistry,"%Function%":ks,"%GeneratorFunction%":qe,"%Int8Array%":typeof Int8Array>"u"?L:Int8Array,"%Int16Array%":typeof Int16Array>"u"?L:Int16Array,"%Int32Array%":typeof Int32Array>"u"?L:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":We&&Y?Y(Y([][Symbol.iterator]())):L,"%JSON%":typeof JSON=="object"?JSON:L,"%Map%":typeof Map>"u"?L:Map,"%MapIteratorPrototype%":typeof Map>"u"||!We||!Y?L:Y(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Fp,"%Object.getOwnPropertyDescriptor%":Tt,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?L:Promise,"%Proxy%":typeof Proxy>"u"?L:Proxy,"%RangeError%":Vp,"%ReferenceError%":Hp,"%Reflect%":typeof Reflect>"u"?L:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?L:Set,"%SetIteratorPrototype%":typeof Set>"u"||!We||!Y?L:Y(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?L:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":We&&Y?Y(""[Symbol.iterator]()):L,"%Symbol%":We?Symbol:L,"%SyntaxError%":Je,"%ThrowTypeError%":td,"%TypedArray%":od,"%TypeError%":Ke,"%Uint8Array%":typeof Uint8Array>"u"?L:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?L:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?L:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?L:Uint32Array,"%URIError%":Gp,"%WeakMap%":typeof WeakMap>"u"?L:WeakMap,"%WeakRef%":typeof WeakRef>"u"?L:WeakRef,"%WeakSet%":typeof WeakSet>"u"?L:WeakSet,"%Function.prototype.call%":It,"%Function.prototype.apply%":ws,"%Object.defineProperty%":ed,"%Object.getPrototypeOf%":rd,"%Math.abs%":Wp,"%Math.floor%":qp,"%Math.max%":Kp,"%Math.min%":Jp,"%Math.pow%":Xp,"%Math.round%":Yp,"%Math.sign%":Qp,"%Reflect.getPrototypeOf%":nd};if(Y)try{null.error}catch(e){As=Y(Y(e)),Me["%Error.prototype%"]=As}var As,id=o(function e(t){var r;if(t==="%AsyncFunction%")r=un("async function () {}");else if(t==="%GeneratorFunction%")r=un("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=un("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&Y&&(r=Y(i.prototype))}return Me[t]=r,r},"doEval"),zs={__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"]},Et=Ge(),or=sn(),ad=Et.call(It,Array.prototype.concat),sd=Et.call(ws,Array.prototype.splice),Os=Et.call(It,String.prototype.replace),ir=Et.call(It,String.prototype.slice),ud=Et.call(It,RegExp.prototype.exec),cd=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,ld=/\\(\\)?/g,pd=o(function(t){var r=ir(t,0,1),n=ir(t,-1);if(r==="%"&&n!=="%")throw new Je("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new Je("invalid intrinsic syntax, expected opening `%`");var i=[];return Os(t,cd,function(u,c,l,f){i[i.length]=l?Os(f,ld,"$1"):c||u}),i},"stringToPath"),dd=o(function(t,r){var n=t,i;if(or(zs,n)&&(i=zs[n],n="%"+i[0]+"%"),or(Me,n)){var u=Me[n];if(u===qe&&(u=id(n)),typeof u>"u"&&!r)throw new Ke("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:u}}throw new Je("intrinsic "+t+" does not exist!")},"getBaseIntrinsic");Rs.exports=o(function(t,r){if(typeof t!="string"||t.length===0)throw new Ke("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new Ke('"allowMissing" argument must be a boolean');if(ud(/^%?[^%]*%?$/,t)===null)throw new Je("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=pd(t),i=n.length>0?n[0]:"",u=dd("%"+i+"%",r),c=u.name,l=u.value,f=!1,y=u.alias;y&&(i=y[0],sd(n,ad([0,1],y)));for(var x=1,T=!0;x<n.length;x+=1){var _=n[x],s=ir(_,0,1),d=ir(_,-1);if((s==='"'||s==="'"||s==="`"||d==='"'||d==="'"||d==="`")&&s!==d)throw new Je("property names with quotes must have matching quotes");if((_==="constructor"||!T)&&(f=!0),i+="."+_,c="%"+i+"%",or(Me,c))l=Me[c];else if(l!=null){if(!(_ in l)){if(!r)throw new Ke("base intrinsic for "+t+" exists, but the property is not available.");return}if(Tt&&x+1>=n.length){var g=Tt(l,_);T=!!g,T&&"get"in g&&!("originalValue"in g.get)?l=g.get:l=l[_]}else T=or(l,_),l=l[_];T&&!f&&(Me[c]=l)}}return l},"GetIntrinsic")});var Cs=E((Nz,Ds)=>{"use strict";var md=tn();Ds.exports=o(function(){return md()&&!!Symbol.toStringTag},"hasToStringTagShams")});var Ls=E((Cz,Ms)=>{"use strict";var fd=Ns(),Us=fd("%Object.defineProperty%",!0),gd=Cs()(),yd=sn(),hd=er(),ar=gd?Symbol.toStringTag:null;Ms.exports=o(function(t,r){var n=arguments.length>2&&!!arguments[2]&&arguments[2].force,i=arguments.length>2&&!!arguments[2]&&arguments[2].nonConfigurable;if(typeof n<"u"&&typeof n!="boolean"||typeof i<"u"&&typeof i!="boolean")throw new hd("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");ar&&(n||!yd(t,ar))&&(Us?Us(t,ar,{configurable:!i,enumerable:!1,value:r,writable:!1}):t[ar]=r)},"setToStringTag")});var Fs=E((Mz,js)=>{"use strict";var vd=Function.prototype.call,xd=Object.prototype.hasOwnProperty,_d=Ge();js.exports=_d.call(vd,xd)});var Zs=E((Lz,Bs)=>{"use strict";Bs.exports=function(e,t){return Object.keys(t).forEach(function(r){e[r]=e[r]||t[r]}),e}});var fn=E((jz,Hs)=>{"use strict";var mn=qi(),Pd=require("util"),ln=require("path"),bd=require("http"),Td=require("https"),Id=require("url").parse,Ed=require("fs"),$d=require("stream").Stream,Sd=require("crypto"),pn=Qi(),Ad=ya(),zd=Ls(),ke=Fs(),dn=Zs();function Vs(e){return String(e).replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/"/g,"%22")}o(Vs,"escapeHeaderParam");function j(e){if(!(this instanceof j))return new j(e);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],mn.call(this),e=e||{};for(var t in e)this[t]=e[t]}o(j,"FormData");Pd.inherits(j,mn);j.LINE_BREAK=`\r
2
+ `;j.DEFAULT_CONTENT_TYPE="application/octet-stream";j.prototype.append=function(e,t,r){r=r||{},typeof r=="string"&&(r={filename:r});var n=mn.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 i=this._multiPartHeader(e,t,r),u=this._multiPartFooter();n(i),n(t),n(u),this._trackLength(i,t,r)};j.prototype._trackLength=function(e,t,r){var n=0;r.knownLength!=null?n+=Number(r.knownLength):Buffer.isBuffer(t)?n=t.length:typeof t=="string"&&(n=Buffer.byteLength(t)),this._valueLength+=n,this._overheadLength+=Buffer.byteLength(e)+j.LINE_BREAK.length,!(!t||!t.path&&!(t.readable&&ke(t,"httpVersion"))&&!(t instanceof $d))&&(r.knownLength||this._valuesToMeasure.push(t))};j.prototype._lengthRetriever=function(e,t){ke(e,"fd")?e.end!=null&&e.end!=1/0&&e.start!=null?t(null,e.end+1-(e.start?e.start:0)):Ed.stat(e.path,function(r,n){if(r){t(r);return}var i=n.size-(e.start?e.start:0);t(null,i)}):ke(e,"httpVersion")?t(null,Number(e.headers["content-length"])):ke(e,"httpModule")?(e.on("response",function(r){e.pause(),t(null,Number(r.headers["content-length"]))}),e.resume()):t("Unknown stream")};j.prototype._multiPartHeader=function(e,t,r){if(typeof r.header=="string")return r.header;var n=this._getContentDisposition(t,r),i=this._getContentType(t,r),u="",c={"Content-Disposition":["form-data",'name="'+Vs(e)+'"'].concat(n||[]),"Content-Type":[].concat(i||[])};typeof r.header=="object"&&dn(c,r.header);var l;for(var f in c)if(ke(c,f)){if(l=c[f],l==null)continue;Array.isArray(l)||(l=[l]),l.length&&(u+=f+": "+l.join("; ")+j.LINE_BREAK)}return"--"+this.getBoundary()+j.LINE_BREAK+u+j.LINE_BREAK};j.prototype._getContentDisposition=function(e,t){var r;if(typeof t.filepath=="string"?r=ln.normalize(t.filepath).replace(/\\/g,"/"):t.filename||e&&(e.name||e.path)?r=ln.basename(t.filename||e&&(e.name||e.path)):e&&e.readable&&ke(e,"httpVersion")&&(r=ln.basename(e.client._httpMessage.path||"")),r)return'filename="'+Vs(r)+'"'};j.prototype._getContentType=function(e,t){var r=t.contentType;return!r&&e&&e.name&&(r=pn.lookup(e.name)),!r&&e&&e.path&&(r=pn.lookup(e.path)),!r&&e&&e.readable&&ke(e,"httpVersion")&&(r=e.headers["content-type"]),!r&&(t.filepath||t.filename)&&(r=pn.lookup(t.filepath||t.filename)),!r&&e&&typeof e=="object"&&(r=j.DEFAULT_CONTENT_TYPE),r};j.prototype._multiPartFooter=function(){return function(e){var t=j.LINE_BREAK,r=this._streams.length===0;r&&(t+=this._lastBoundary()),e(t)}.bind(this)};j.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+j.LINE_BREAK};j.prototype.getHeaders=function(e){var t,r={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in e)ke(e,t)&&(r[t.toLowerCase()]=e[t]);return r};j.prototype.setBoundary=function(e){if(typeof e!="string")throw new TypeError("FormData boundary must be a string");this._boundary=e};j.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};j.prototype.getBuffer=function(){for(var e=new Buffer.alloc(0),t=this.getBoundary(),r=0,n=this._streams.length;r<n;r++)typeof this._streams[r]!="function"&&(Buffer.isBuffer(this._streams[r])?e=Buffer.concat([e,this._streams[r]]):e=Buffer.concat([e,Buffer.from(this._streams[r])]),(typeof this._streams[r]!="string"||this._streams[r].substring(2,t.length+2)!==t)&&(e=Buffer.concat([e,Buffer.from(j.LINE_BREAK)])));return Buffer.concat([e,Buffer.from(this._lastBoundary())])};j.prototype._generateBoundary=function(){this._boundary="--------------------------"+Sd.randomBytes(12).toString("hex")};j.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};j.prototype.hasKnownLength=function(){var e=!0;return this._valuesToMeasure.length&&(e=!1),e};j.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}Ad.parallel(this._valuesToMeasure,this._lengthRetriever,function(r,n){if(r){e(r);return}n.forEach(function(i){t+=i}),e(null,t)})};j.prototype.submit=function(e,t){var r,n,i={method:"post"};return typeof e=="string"?(e=Id(e),n=dn({port:e.port,path:e.pathname,host:e.hostname,protocol:e.protocol},i)):(n=dn(e,i),n.port||(n.port=n.protocol==="https:"?443:80)),n.headers=this.getHeaders(e.headers),n.protocol==="https:"?r=Td.request(n):r=bd.request(n),this.getLength(function(u,c){if(u&&u!=="Unknown stream"){this._error(u);return}if(c&&r.setHeader("Content-Length",c),this.pipe(r),t){var l,f=o(function(y,x){return r.removeListener("error",f),r.removeListener("response",l),t.call(this,y,x)},"callback");l=f.bind(this,null),r.on("error",f),r.on("response",l)}}.bind(this)),r};j.prototype._error=function(e){this.error||(this.error=e,this.pause(),this.emit("error",e))};j.prototype.toString=function(){return"[object FormData]"};zd(j.prototype,"FormData");Hs.exports=j});var Md={};vn(Md,{cambAi:()=>Ud});module.exports=uu(Md);var cu=Object.freeze({status:"aborted"});function b(e,t,r){function n(l,f){if(l._zod||Object.defineProperty(l,"_zod",{value:{def:f,constr:c,traits:new Set},enumerable:!1}),l._zod.traits.has(e))return;l._zod.traits.add(e),t(l,f);let y=c.prototype,x=Object.keys(y);for(let T=0;T<x.length;T++){let _=x[T];_ in l||(l[_]=y[_].bind(l))}}o(n,"init");let i=r?.Parent??Object;class u extends i{static{o(this,"Definition")}}Object.defineProperty(u,"name",{value:e});function c(l){var f;let y=r?.Parent?new u:this;n(y,l),(f=y._zod).deferred??(f.deferred=[]);for(let x of y._zod.deferred)x();return y}return o(c,"_"),Object.defineProperty(c,"init",{value:n}),Object.defineProperty(c,Symbol.hasInstance,{value:o(l=>r?.Parent&&l instanceof r.Parent?!0:l?._zod?.traits?.has(e),"value")}),Object.defineProperty(c,"name",{value:e}),c}o(b,"$constructor");var le=class extends Error{static{o(this,"$ZodAsyncError")}constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},St=class extends Error{static{o(this,"$ZodEncodeError")}constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}},ur={};function ge(e){return e&&Object.assign(ur,e),ur}o(ge,"config");function lr(e){let t=Object.values(e).filter(n=>typeof n=="number");return Object.entries(e).filter(([n,i])=>t.indexOf(+n)===-1).map(([n,i])=>i)}o(lr,"getEnumValues");function Pn(e,t){return typeof t=="bigint"?t.toString():t}o(Pn,"jsonStringifyReplacer");function zt(e){return{get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}o(zt,"cached");function bn(e){return e==null}o(bn,"nullish");function Ot(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}o(Ot,"cleanRegex");var _n=Symbol("evaluating");function J(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==_n)return n===void 0&&(n=_n,n=r()),n},set(i){Object.defineProperty(e,t,{value:i})},configurable:!0})}o(J,"defineLazy");var pr="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function rt(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}o(rt,"isObject");var lu=zt(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function Tn(e){if(rt(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let r=t.prototype;return!(rt(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}o(Tn,"isPlainObject");var In=new Set(["string","number","symbol"]);function Le(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}o(Le,"escapeRegex");function kt(e,t,r){let n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}o(kt,"clone");function V(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:o(()=>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:o(()=>t.error,"error")}:t}o(V,"normalizeParams");function En(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}o(En,"optionalKeys");var $n={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function je(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}o(je,"aborted");function Te(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}o(Te,"prefixIssues");function At(e){return typeof e=="string"?e:e?.message}o(At,"unwrapMessage");function Ie(e,t,r){let n={...e,path:e.path??[]};if(!e.message){let i=At(e.inst?._zod.def?.error?.(e))??At(t?.error?.(e))??At(r.customError?.(e))??At(r.localeError?.(e))??"Invalid input";n.message=i}return delete n.inst,delete n.continue,t?.reportInput||delete n.input,n}o(Ie,"finalizeIssue");function Sn(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}o(Sn,"getLengthableOrigin");function dr(...e){let[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}o(dr,"issue");var An=o((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,Pn,2),Object.defineProperty(e,"toString",{value:o(()=>e.message,"value"),enumerable:!1})},"initializer"),zn=b("$ZodError",An),nt=b("$ZodError",An,{Parent:Error});var du=o(e=>(t,r,n,i)=>{let u=n?Object.assign(n,{async:!1}):{async:!1},c=t._zod.run({value:r,issues:[]},u);if(c instanceof Promise)throw new le;if(c.issues.length){let l=new(i?.Err??e)(c.issues.map(f=>Ie(f,u,ge())));throw pr(l,i?.callee),l}return c.value},"_parse"),wt=du(nt),mu=o(e=>async(t,r,n,i)=>{let u=n?Object.assign(n,{async:!0}):{async:!0},c=t._zod.run({value:r,issues:[]},u);if(c instanceof Promise&&(c=await c),c.issues.length){let l=new(i?.Err??e)(c.issues.map(f=>Ie(f,u,ge())));throw pr(l,i?.callee),l}return c.value},"_parseAsync"),Rt=mu(nt),fu=o(e=>(t,r,n)=>{let i=n?{...n,async:!1}:{async:!1},u=t._zod.run({value:r,issues:[]},i);if(u instanceof Promise)throw new le;return u.issues.length?{success:!1,error:new(e??zn)(u.issues.map(c=>Ie(c,i,ge())))}:{success:!0,data:u.value}},"_safeParse"),ot=fu(nt),gu=o(e=>async(t,r,n)=>{let i=n?Object.assign(n,{async:!0}):{async:!0},u=t._zod.run({value:r,issues:[]},i);return u instanceof Promise&&(u=await u),u.issues.length?{success:!1,error:new e(u.issues.map(c=>Ie(c,i,ge())))}:{success:!0,data:u.value}},"_safeParseAsync"),it=gu(nt);var yu="(?:(?:\\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])))",hu=new RegExp(`^${yu}$`);var On=o(e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},"string"),kn=/^-?\d+n?$/,wn=/^-?\d+$/,mr=/^-?\d+(?:\.\d+)?$/,Rn=/^(?:true|false)$/i;var Ee=b("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),vu={number:"number",bigint:"bigint",object:"date"};var Nn=b("$ZodCheckGreaterThan",(e,t)=>{Ee.init(e,t);let r=vu[typeof t.value];e._zod.onattach.push(n=>{let i=n._zod.bag,u=(t.inclusive?i.minimum:i.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>u&&(t.inclusive?i.minimum=t.value:i.exclusiveMinimum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value>=t.value:n.value>t.value)||n.issues.push({origin:r,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}});var Dn=b("$ZodCheckNumberFormat",(e,t)=>{Ee.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),n=r?"int":"number",[i,u]=$n[t.format];e._zod.onattach.push(c=>{let l=c._zod.bag;l.format=t.format,l.minimum=i,l.maximum=u,r&&(l.pattern=wn)}),e._zod.check=c=>{let l=c.value;if(r){if(!Number.isInteger(l)){c.issues.push({expected:n,format:t.format,code:"invalid_type",continue:!1,input:l,inst:e});return}if(!Number.isSafeInteger(l)){l>0?c.issues.push({input:l,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort}):c.issues.push({input:l,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort});return}}l<i&&c.issues.push({origin:"number",input:l,code:"too_small",minimum:i,inclusive:!0,inst:e,continue:!t.abort}),l>u&&c.issues.push({origin:"number",input:l,code:"too_big",maximum:u,inclusive:!0,inst:e,continue:!t.abort})}});var Cn=b("$ZodCheckMinLength",(e,t)=>{var r;Ee.init(e,t),(r=e._zod.def).when??(r.when=n=>{let i=n.value;return!bn(i)&&i.length!==void 0}),e._zod.onattach.push(n=>{let i=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>i&&(n._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let i=n.value;if(i.length>=t.minimum)return;let c=Sn(i);n.issues.push({origin:c,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}});var fr=b("$ZodCheckStringFormat",(e,t)=>{var r,n;Ee.init(e,t),e._zod.onattach.push(i=>{let u=i._zod.bag;u.format=t.format,t.pattern&&(u.patterns??(u.patterns=new Set),u.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=i=>{t.pattern.lastIndex=0,!t.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:t.format,input:i.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(n=e._zod).check??(n.check=()=>{})}),Un=b("$ZodCheckRegex",(e,t)=>{fr.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}});var Ln={major:4,minor:3,patch:6};var W=b("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Ln;let n=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&n.unshift(e);for(let i of n)for(let u of i._zod.onattach)u(e);if(n.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let i=o((c,l,f)=>{let y=je(c),x;for(let T of l){if(T._zod.def.when){if(!T._zod.def.when(c))continue}else if(y)continue;let _=c.issues.length,s=T._zod.check(c);if(s instanceof Promise&&f?.async===!1)throw new le;if(x||s instanceof Promise)x=(x??Promise.resolve()).then(async()=>{await s,c.issues.length!==_&&(y||(y=je(c,_)))});else{if(c.issues.length===_)continue;y||(y=je(c,_))}}return x?x.then(()=>c):c},"runChecks"),u=o((c,l,f)=>{if(je(c))return c.aborted=!0,c;let y=i(l,n,f);if(y instanceof Promise){if(f.async===!1)throw new le;return y.then(x=>e._zod.parse(x,f))}return e._zod.parse(y,f)},"handleCanaryResult");e._zod.run=(c,l)=>{if(l.skipChecks)return e._zod.parse(c,l);if(l.direction==="backward"){let y=e._zod.parse({value:c.value,issues:[]},{...l,skipChecks:!0});return y instanceof Promise?y.then(x=>u(x,c,l)):u(y,c,l)}let f=e._zod.parse(c,l);if(f instanceof Promise){if(l.async===!1)throw new le;return f.then(y=>i(y,n,l))}return i(f,n,l)}}J(e,"~standard",()=>({validate:o(i=>{try{let u=ot(e,i);return u.success?{value:u.data}:{issues:u.error?.issues}}catch{return it(e,i).then(c=>c.success?{value:c.data}:{issues:c.error?.issues})}},"validate"),vendor:"zod",version:1}))}),Ct=b("$ZodString",(e,t)=>{W.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??On(e._zod.bag),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),gr=b("$ZodStringFormat",(e,t)=>{fr.init(e,t),Ct.init(e,t)});var Vn=b("$ZodURL",(e,t)=>{gr.init(e,t),e._zod.check=r=>{try{let n=r.value.trim(),i=new URL(n);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(":")?i.protocol.slice(0,-1):i.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=i.href:r.value=n;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}});var yr=b("$ZodNumber",(e,t)=>{W.init(e,t),e._zod.pattern=e._zod.bag.pattern??mr,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}let i=r.value;if(typeof i=="number"&&!Number.isNaN(i)&&Number.isFinite(i))return r;let u=typeof i=="number"?Number.isNaN(i)?"NaN":Number.isFinite(i)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:i,inst:e,...u?{received:u}:{}}),r}}),Hn=b("$ZodNumberFormat",(e,t)=>{Dn.init(e,t),yr.init(e,t)}),hr=b("$ZodBoolean",(e,t)=>{W.init(e,t),e._zod.pattern=Rn,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=!!r.value}catch{}let i=r.value;return typeof i=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:i,inst:e}),r}}),Gn=b("$ZodBigInt",(e,t)=>{W.init(e,t),e._zod.pattern=kn,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:e}),r}});var Wn=b("$ZodAny",(e,t)=>{W.init(e,t),e._zod.parse=r=>r}),qn=b("$ZodUnknown",(e,t)=>{W.init(e,t),e._zod.parse=r=>r});var Kn=b("$ZodVoid",(e,t)=>{W.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;return typeof i>"u"||r.issues.push({expected:"void",code:"invalid_type",input:i,inst:e}),r}}),Jn=b("$ZodDate",(e,t)=>{W.init(e,t),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=new Date(r.value)}catch{}let i=r.value,u=i instanceof Date;return u&&!Number.isNaN(i.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:i,...u?{received:"Invalid Date"}:{},inst:e}),r}});function jn(e,t,r){e.issues.length&&t.issues.push(...Te(r,e.issues)),t.value[r]=e.value}o(jn,"handleArrayResult");var Xn=b("$ZodArray",(e,t)=>{W.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;if(!Array.isArray(i))return r.issues.push({expected:"array",code:"invalid_type",input:i,inst:e}),r;r.value=Array(i.length);let u=[];for(let c=0;c<i.length;c++){let l=i[c],f=t.element._zod.run({value:l,issues:[]},n);f instanceof Promise?u.push(f.then(y=>jn(y,r,c))):jn(f,r,c)}return u.length?Promise.all(u).then(()=>r):r}});function Dt(e,t,r,n,i){if(e.issues.length){if(i&&!(r in n))return;t.issues.push(...Te(r,e.issues))}e.value===void 0?r in n&&(t.value[r]=void 0):t.value[r]=e.value}o(Dt,"handlePropertyResult");function xu(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${n}": expected a Zod schema`);let r=En(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}o(xu,"normalizeDef");function _u(e,t,r,n,i,u){let c=[],l=i.keySet,f=i.catchall._zod,y=f.def.type,x=f.optout==="optional";for(let T in t){if(l.has(T))continue;if(y==="never"){c.push(T);continue}let _=f.run({value:t[T],issues:[]},n);_ instanceof Promise?e.push(_.then(s=>Dt(s,r,T,t,x))):Dt(_,r,T,t,x)}return c.length&&r.issues.push({code:"unrecognized_keys",keys:c,input:t,inst:u}),e.length?Promise.all(e).then(()=>r):r}o(_u,"handleCatchall");var Yn=b("$ZodObject",(e,t)=>{if(W.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let l=t.shape;Object.defineProperty(t,"shape",{get:o(()=>{let f={...l};return Object.defineProperty(t,"shape",{value:f}),f},"get")})}let n=zt(()=>xu(t));J(e._zod,"propValues",()=>{let l=t.shape,f={};for(let y in l){let x=l[y]._zod;if(x.values){f[y]??(f[y]=new Set);for(let T of x.values)f[y].add(T)}}return f});let i=rt,u=t.catchall,c;e._zod.parse=(l,f)=>{c??(c=n.value);let y=l.value;if(!i(y))return l.issues.push({expected:"object",code:"invalid_type",input:y,inst:e}),l;l.value={};let x=[],T=c.shape;for(let _ of c.keys){let s=T[_],d=s._zod.optout==="optional",g=s._zod.run({value:y[_],issues:[]},f);g instanceof Promise?x.push(g.then(m=>Dt(m,l,_,y,d))):Dt(g,l,_,y,d)}return u?_u(x,y,l,f,n.value,e):x.length?Promise.all(x).then(()=>l):l}});function Fn(e,t,r,n){for(let u of e)if(u.issues.length===0)return t.value=u.value,t;let i=e.filter(u=>!je(u));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(u=>u.issues.map(c=>Ie(c,n,ge())))}),t)}o(Fn,"handleUnionResults");var vr=b("$ZodUnion",(e,t)=>{W.init(e,t),J(e._zod,"optin",()=>t.options.some(i=>i._zod.optin==="optional")?"optional":void 0),J(e._zod,"optout",()=>t.options.some(i=>i._zod.optout==="optional")?"optional":void 0),J(e._zod,"values",()=>{if(t.options.every(i=>i._zod.values))return new Set(t.options.flatMap(i=>Array.from(i._zod.values)))}),J(e._zod,"pattern",()=>{if(t.options.every(i=>i._zod.pattern)){let i=t.options.map(u=>u._zod.pattern);return new RegExp(`^(${i.map(u=>Ot(u.source)).join("|")})$`)}});let r=t.options.length===1,n=t.options[0]._zod.run;e._zod.parse=(i,u)=>{if(r)return n(i,u);let c=!1,l=[];for(let f of t.options){let y=f._zod.run({value:i.value,issues:[]},u);if(y instanceof Promise)l.push(y),c=!0;else{if(y.issues.length===0)return y;l.push(y)}}return c?Promise.all(l).then(f=>Fn(f,i,e,u)):Fn(l,i,e,u)}});var Qn=b("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,vr.init(e,t);let r=e._zod.parse;J(e._zod,"propValues",()=>{let i={};for(let u of t.options){let c=u._zod.propValues;if(!c||Object.keys(c).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(u)}"`);for(let[l,f]of Object.entries(c)){i[l]||(i[l]=new Set);for(let y of f)i[l].add(y)}}return i});let n=zt(()=>{let i=t.options,u=new Map;for(let c of i){let l=c._zod.propValues?.[t.discriminator];if(!l||l.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(c)}"`);for(let f of l){if(u.has(f))throw new Error(`Duplicate discriminator value "${String(f)}"`);u.set(f,c)}}return u});e._zod.parse=(i,u)=>{let c=i.value;if(!rt(c))return i.issues.push({code:"invalid_type",expected:"object",input:c,inst:e}),i;let l=n.value.get(c?.[t.discriminator]);return l?l._zod.run(i,u):t.unionFallback?r(i,u):(i.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:c,path:[t.discriminator],inst:e}),i)}});var eo=b("$ZodRecord",(e,t)=>{W.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;if(!Tn(i))return r.issues.push({expected:"record",code:"invalid_type",input:i,inst:e}),r;let u=[],c=t.keyType._zod.values;if(c){r.value={};let l=new Set;for(let y of c)if(typeof y=="string"||typeof y=="number"||typeof y=="symbol"){l.add(typeof y=="number"?y.toString():y);let x=t.valueType._zod.run({value:i[y],issues:[]},n);x instanceof Promise?u.push(x.then(T=>{T.issues.length&&r.issues.push(...Te(y,T.issues)),r.value[y]=T.value})):(x.issues.length&&r.issues.push(...Te(y,x.issues)),r.value[y]=x.value)}let f;for(let y in i)l.has(y)||(f=f??[],f.push(y));f&&f.length>0&&r.issues.push({code:"unrecognized_keys",input:i,inst:e,keys:f})}else{r.value={};for(let l of Reflect.ownKeys(i)){if(l==="__proto__")continue;let f=t.keyType._zod.run({value:l,issues:[]},n);if(f instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof l=="string"&&mr.test(l)&&f.issues.length){let T=t.keyType._zod.run({value:Number(l),issues:[]},n);if(T instanceof Promise)throw new Error("Async schemas not supported in object keys currently");T.issues.length===0&&(f=T)}if(f.issues.length){t.mode==="loose"?r.value[l]=i[l]:r.issues.push({code:"invalid_key",origin:"record",issues:f.issues.map(T=>Ie(T,n,ge())),input:l,path:[l],inst:e});continue}let x=t.valueType._zod.run({value:i[l],issues:[]},n);x instanceof Promise?u.push(x.then(T=>{T.issues.length&&r.issues.push(...Te(l,T.issues)),r.value[f.value]=T.value})):(x.issues.length&&r.issues.push(...Te(l,x.issues)),r.value[f.value]=x.value)}}return u.length?Promise.all(u).then(()=>r):r}});var to=b("$ZodEnum",(e,t)=>{W.init(e,t);let r=lr(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(i=>In.has(typeof i)).map(i=>typeof i=="string"?Le(i):i.toString()).join("|")})$`),e._zod.parse=(i,u)=>{let c=i.value;return n.has(c)||i.issues.push({code:"invalid_value",values:r,input:c,inst:e}),i}}),ro=b("$ZodLiteral",(e,t)=>{if(W.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");let r=new Set(t.values);e._zod.values=r,e._zod.pattern=new RegExp(`^(${t.values.map(n=>typeof n=="string"?Le(n):n?Le(n.toString()):String(n)).join("|")})$`),e._zod.parse=(n,i)=>{let u=n.value;return r.has(u)||n.issues.push({code:"invalid_value",values:t.values,input:u,inst:e}),n}});var no=b("$ZodTransform",(e,t)=>{W.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new St(e.constructor.name);let i=t.transform(r.value,r);if(n.async)return(i instanceof Promise?i:Promise.resolve(i)).then(c=>(r.value=c,r));if(i instanceof Promise)throw new le;return r.value=i,r}});function Bn(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}o(Bn,"handleOptionalResult");var oo=b("$ZodOptional",(e,t)=>{W.init(e,t),e._zod.optin="optional",e._zod.optout="optional",J(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),J(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${Ot(r.source)})?$`):void 0}),e._zod.parse=(r,n)=>{if(t.innerType._zod.optin==="optional"){let i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(u=>Bn(u,r.value)):Bn(i,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,n)}});var io=b("$ZodNullable",(e,t)=>{W.init(e,t),J(e._zod,"optin",()=>t.innerType._zod.optin),J(e._zod,"optout",()=>t.innerType._zod.optout),J(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${Ot(r.source)}|null)$`):void 0}),J(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,n)=>r.value===null?r:t.innerType._zod.run(r,n)});var ao=b("$ZodPipe",(e,t)=>{W.init(e,t),J(e._zod,"values",()=>t.in._zod.values),J(e._zod,"optin",()=>t.in._zod.optin),J(e._zod,"optout",()=>t.out._zod.optout),J(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,n)=>{if(n.direction==="backward"){let u=t.out._zod.run(r,n);return u instanceof Promise?u.then(c=>Nt(c,t.in,n)):Nt(u,t.in,n)}let i=t.in._zod.run(r,n);return i instanceof Promise?i.then(u=>Nt(u,t.out,n)):Nt(i,t.out,n)}});function Nt(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}o(Nt,"handlePipeResult");var so=b("$ZodCustom",(e,t)=>{Ee.init(e,t),W.init(e,t),e._zod.parse=(r,n)=>r,e._zod.check=r=>{let n=r.value,i=t.fn(n);if(i instanceof Promise)return i.then(u=>Zn(u,r,n,e));Zn(i,r,n,e)}});function Zn(e,t,r,n){if(!e){let i={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(i.params=n._zod.def.params),t.issues.push(dr(i))}}o(Zn,"handleRefineResult");var co;var xr=class{static{o(this,"$ZodRegistry")}constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...r){let n=r[0];return this._map.set(t,n),n&&typeof n=="object"&&"id"in n&&this._idmap.set(n.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){let r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){let r=t._zod.parent;if(r){let n={...this.get(r)??{}};delete n.id;let i={...n,...this._map.get(t)};return Object.keys(i).length?i:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};function lo(){return new xr}o(lo,"registry");(co=globalThis).__zod_globalRegistry??(co.__zod_globalRegistry=lo());var _r=globalThis.__zod_globalRegistry;function po(e,t){return new e({type:"string",...V(t)})}o(po,"_string");function mo(e,t){return new e({type:"string",coerce:!0,...V(t)})}o(mo,"_coercedString");function fo(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...V(t)})}o(fo,"_url");function go(e,t){return new e({type:"number",checks:[],...V(t)})}o(go,"_number");function yo(e,t){return new e({type:"number",coerce:!0,checks:[],...V(t)})}o(yo,"_coercedNumber");function ho(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...V(t)})}o(ho,"_int");function vo(e,t){return new e({type:"boolean",...V(t)})}o(vo,"_boolean");function xo(e,t){return new e({type:"boolean",coerce:!0,...V(t)})}o(xo,"_coercedBoolean");function _o(e,t){return new e({type:"bigint",coerce:!0,...V(t)})}o(_o,"_coercedBigint");function Po(e){return new e({type:"any"})}o(Po,"_any");function bo(e){return new e({type:"unknown"})}o(bo,"_unknown");function To(e,t){return new e({type:"void",...V(t)})}o(To,"_void");function Io(e,t){return new e({type:"date",coerce:!0,...V(t)})}o(Io,"_coercedDate");function Ut(e,t){return new Nn({check:"greater_than",...V(t),value:e,inclusive:!0})}o(Ut,"_gte");function se(e,t){return new Cn({check:"min_length",...V(t),minimum:e})}o(se,"_minLength");function $e(e,t){return new Un({check:"string_format",format:"regex",...V(t),pattern:e})}o($e,"_regex");function Eo(e,t,r){let n=V(r);return n.abort??(n.abort=!0),new e({type:"custom",check:"custom",fn:t,...n})}o(Eo,"_custom");var X=b("ZodMiniType",(e,t)=>{if(!e._zod)throw new Error("Uninitialized schema in ZodMiniType.");W.init(e,t),e.def=t,e.type=t.type,e.parse=(r,n)=>wt(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>ot(e,r,n),e.parseAsync=async(r,n)=>Rt(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>it(e,r,n),e.check=(...r)=>e.clone({...t,checks:[...t.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]},{parent:!0}),e.with=e.check,e.clone=(r,n)=>kt(e,r,n),e.brand=()=>e,e.register=((r,n)=>(r.add(e,n),e)),e.apply=r=>r(e)}),Lt=b("ZodMiniString",(e,t)=>{Ct.init(e,t),X.init(e,t)});function a(e){return po(Lt,e)}o(a,"string");var $o=b("ZodMiniStringFormat",(e,t)=>{gr.init(e,t),Lt.init(e,t)});var Ru=b("ZodMiniURL",(e,t)=>{Vn.init(e,t),$o.init(e,t)});function So(e){return fo(Ru,e)}o(So,"url");var jt=b("ZodMiniNumber",(e,t)=>{yr.init(e,t),X.init(e,t)});function te(e){return go(jt,e)}o(te,"number");var Nu=b("ZodMiniNumberFormat",(e,t)=>{Hn.init(e,t),jt.init(e,t)});function Ao(e){return ho(Nu,e)}o(Ao,"int");var Pr=b("ZodMiniBoolean",(e,t)=>{hr.init(e,t),X.init(e,t)});function B(e){return vo(Pr,e)}o(B,"boolean");var zo=b("ZodMiniBigInt",(e,t)=>{Gn.init(e,t),X.init(e,t)});var Du=b("ZodMiniAny",(e,t)=>{Wn.init(e,t),X.init(e,t)});function st(){return Po(Du)}o(st,"any");var Cu=b("ZodMiniUnknown",(e,t)=>{qn.init(e,t),X.init(e,t)});function k(){return bo(Cu)}o(k,"unknown");var Uu=b("ZodMiniVoid",(e,t)=>{Kn.init(e,t),X.init(e,t)});function Oo(e){return To(Uu,e)}o(Oo,"_void");var ko=b("ZodMiniDate",(e,t)=>{Jn.init(e,t),X.init(e,t)});var Mu=b("ZodMiniArray",(e,t)=>{Xn.init(e,t),X.init(e,t)});function N(e,t){return new Mu({type:"array",element:e,...V(t)})}o(N,"array");var Lu=b("ZodMiniObject",(e,t)=>{Yn.init(e,t),X.init(e,t),J(e,"shape",()=>t.shape)});function p(e,t){let r={type:"object",shape:e??{},...V(t)};return new Lu(r)}o(p,"object");var ju=b("ZodMiniUnion",(e,t)=>{vr.init(e,t),X.init(e,t)});function D(e,t){return new ju({type:"union",options:e,...V(t)})}o(D,"union");var Fu=b("ZodMiniDiscriminatedUnion",(e,t)=>{Qn.init(e,t),X.init(e,t)});function Se(e,t,r){return new Fu({type:"union",options:t,discriminator:e,...V(r)})}o(Se,"discriminatedUnion");var Bu=b("ZodMiniRecord",(e,t)=>{eo.init(e,t),X.init(e,t)});function w(e,t,r){return new Bu({type:"record",keyType:e,valueType:t,...V(r)})}o(w,"record");var Zu=b("ZodMiniEnum",(e,t)=>{to.init(e,t),X.init(e,t),e.options=Object.values(t.entries)});function M(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new Zu({type:"enum",entries:r,...V(t)})}o(M,"_enum");var Vu=b("ZodMiniLiteral",(e,t)=>{ro.init(e,t),X.init(e,t)});function $(e,t){return new Vu({type:"literal",values:Array.isArray(e)?e:[e],...V(t)})}o($,"literal");var Hu=b("ZodMiniTransform",(e,t)=>{no.init(e,t),X.init(e,t)});function Ae(e){return new Hu({type:"transform",transform:e})}o(Ae,"transform");var Gu=b("ZodMiniOptional",(e,t)=>{oo.init(e,t),X.init(e,t)});function h(e){return new Gu({type:"optional",innerType:e})}o(h,"optional");var Wu=b("ZodMiniNullable",(e,t)=>{io.init(e,t),X.init(e,t)});function ut(e){return new Wu({type:"nullable",innerType:e})}o(ut,"nullable");var qu=b("ZodMiniPipe",(e,t)=>{ao.init(e,t),X.init(e,t)});function ze(e,t){return new qu({type:"pipe",in:e,out:t})}o(ze,"pipe");var Ku=b("ZodMiniCustom",(e,t)=>{so.init(e,t),X.init(e,t)});function Ft(e,t){return Eo(Ku,e??(()=>!0),t)}o(Ft,"custom");var ct={};vn(ct,{bigint:()=>tc,boolean:()=>ec,date:()=>rc,number:()=>Qu,string:()=>Yu});function Yu(e){return mo(Lt,e)}o(Yu,"string");function Qu(e){return yo(jt,e)}o(Qu,"number");function ec(e){return xo(Pr,e)}o(ec,"boolean");function tc(e){return _o(zo,e)}o(tc,"bigint");function rc(e){return Io(ko,e)}o(rc,"date");var Tr=p({retryOnFailure:p({defaultValue:h(B()),hide:h(B())}),continueOnFailure:p({defaultValue:h(B()),hide:h(B())})}),br=class{constructor(t,r,n,i,u,c,l,f,y,x,T){this.name=t;this.displayName=r;this.description=n;this.props=i;this.run=u;this.test=c;this.requireAuth=l;this.errorHandlingOptions=f;this.outputSchema=y;this.audience=x;this.aiMetadata=T}static{o(this,"IAction")}},pe=o(e=>new br(e.name,e.displayName,e.description,e.props,e.run,e.test??e.run,e.requireAuth??!0,e.errorHandlingOptions??{continueOnFailure:{defaultValue:!1},retryOnFailure:{defaultValue:!1}},e.outputSchema,e.audience,e.aiMetadata),"createAction");var F=p({displayName:a(),description:h(a())}),C=o((e,t)=>p({type:$(t),required:B(),defaultValue:h(st())}),"TPropertyValue");var ne=p({...F.shape,...C(a(),"SHORT_TEXT").shape}),ye=p({...F.shape,...C(a(),"LONG_TEXT").shape});var Ro=p({label:a(),value:k()}),Bt=p({disabled:h(B()),placeholder:h(a()),options:N(Ro)});var oe=p({...F.shape,options:Bt,...C(k(),"STATIC_DROPDOWN").shape}),he=p({...F.shape,options:Bt,...C(N(k()),"STATIC_MULTI_SELECT_DROPDOWN").shape});var Ir=p({...F.shape,...C(k(),"DROPDOWN").shape,refreshers:N(a())}),lt=p({...F.shape,...C(N(k()),"MULTI_SELECT_DROPDOWN").shape,refreshers:N(a())});var ve=p({...F.shape,...C(B(),"CHECKBOX").shape});var xe=p({...F.shape,...C(te(),"NUMBER").shape});var pt=p({...F.shape,streaming:h(B()),...C(k(),"FILE").shape});var dt=p({...F.shape,...C(a(),"DATE_TIME").shape});var No=w(a(),D([ne,ye,oe,lt,he,ve,xe,pt,dt])),mt=p({...F.shape,properties:No,...C(N(k()),"ARRAY").shape});var ft=p({...F.shape,...C(D([w(a(),k())]),"JSON").shape});var Do=D([ne,oe,ft,mt,he]),oc=w(a(),Do),Er=p({refreshers:N(a()),...F.shape,...C(k(),"DYNAMIC").shape});var Zt=p({...F.shape,...C(Oo(),"MARKDOWN").shape});var gt=(r=>(r.ARCHIVE="ARCHIVE",r.REGISTRY="REGISTRY",r))(gt||{}),Fe=(r=>(r.CUSTOM="CUSTOM",r.OFFICIAL="OFFICIAL",r))(Fe||{}),Be=(v=>(v.ARTIFICIAL_INTELLIGENCE="ARTIFICIAL_INTELLIGENCE",v.COMMUNICATION="COMMUNICATION",v.COMMERCE="COMMERCE",v.CORE="CORE",v.UNIVERSAL_AI="UNIVERSAL_AI",v.FLOW_CONTROL="FLOW_CONTROL",v.BUSINESS_INTELLIGENCE="BUSINESS_INTELLIGENCE",v.ACCOUNTING="ACCOUNTING",v.PRODUCTIVITY="PRODUCTIVITY",v.CONTENT_AND_FILES="CONTENT_AND_FILES",v.DEVELOPER_TOOLS="DEVELOPER_TOOLS",v.CUSTOMER_SUPPORT="CUSTOMER_SUPPORT",v.FORMS_AND_SURVEYS="FORMS_AND_SURVEYS",v.HUMAN_RESOURCES="HUMAN_RESOURCES",v.PAYMENT_PROCESSING="PAYMENT_PROCESSING",v.MARKETING="MARKETING",v.SALES_AND_CRM="SALES_AND_CRM",v))(Be||{});var yt=(r=>(r.AUTHORIZATION_CODE="authorization_code",r.CLIENT_CREDENTIALS="client_credentials",r))(yt||{}),$r="both_client_credentials_and_authorization_code";var Ne=(i=>(i.POLLING="POLLING",i.WEBHOOK="WEBHOOK",i.APP_WEBHOOK="APP_WEBHOOK",i.MANUAL="MANUAL",i))(Ne||{}),ht=(u=>(u.NONE="NONE",u.HEADER_PRESENT="HEADER_PRESENT",u.QUERY_PRESENT="QUERY_PRESENT",u.BODY_PARAM_PRESENT="BODY_PARAM_PRESENT",u.HEAD_REQUEST="HEAD_REQUEST",u))(ht||{}),ic=p({strategy:M(ht),paramName:h(a())}),vt=(r=>(r.SIMULATION="SIMULATION",r.TEST_FUNCTION="TEST_FUNCTION",r))(vt||{});var Vt=(r=>(r.WEBSOCKET="WEBSOCKET",r.NONE="NONE",r))(Vt||{}),Co=p({status:h(te()),body:h(k()),headers:h(w(a(),a()))}),Uo=p({type:$("DELAY"),resumeDateTime:a(),requestIdToReply:h(a()),handlerId:h(a()),streamStepProgress:h(M(Vt))}),Mo=p({type:$("WEBHOOK"),requestId:a(),requestIdToReply:h(a()),response:Co,handlerId:h(a()),streamStepProgress:h(M(Vt))}),ac=D([Uo,Mo]);var sc=p({body:k(),rawBody:h(k()),headers:w(a(),a()),queryParams:w(a(),a())});function ue(e){return e==null}o(ue,"isNil");function xt(e){return e==null?!0:typeof e=="string"||Array.isArray(e)?e.length===0:typeof e=="object"?Object.keys(e).length===0:!1}o(xt,"isEmpty");function Ht(e,t){if(e==null)throw new Error(`${t} is null or undefined`)}o(Ht,"assertNotNullOrUndefined");var Sr=Re(require("crypto"),1);var uc=128,De,Ze,cc=o(e=>{!De||De.length<e?(De=Buffer.allocUnsafe(e*uc),Sr.default.randomFillSync(De),Ze=0):Ze+e>De.length&&(Sr.default.randomFillSync(De),Ze=0),Ze+=e},"fillPool"),lc=o(e=>(cc(e|=0),De.subarray(Ze-e,Ze)),"random"),pc=o((e,t,r)=>{let n=(2<<31-Math.clz32(e.length-1|1))-1,i=Math.ceil(1.6*n*t/e.length);return(u=t)=>{let c="";for(;;){let l=r(i),f=i;for(;f--;)if(c+=e[l[f]&n]||"",c.length===u)return c}}},"customRandom"),jo=o((e,t=21)=>pc(e,t,lc),"customAlphabet");var dc="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",Fo=21,xb=a().check($e(new RegExp(`^[0-9a-zA-Z]{${Fo}}$`))),mc=jo(dc,Fo);var Oe=ze(Ae(e=>e instanceof Date?e.toISOString():e),a()),ie={id:a(),created:Oe,updated:Oe},G=o(e=>h(ut(e)),"Nullable");function Ar(e){return h(ut(M(e)))}o(Ar,"NullableEnum");var bb=ze(Ae(e=>e==="true"||e===!0?!0:e==="false"||e===!1?!1:void 0),h(B())),Gt=o(e=>ze(Ae(t=>Array.isArray(t)?t:t!==void 0?[t]:void 0),h(N(e))),"OptionalArrayFromQuery");var Eb=w(a(),k());var _t=(x=>(x.OPENAI="openai",x.OPENROUTER="openrouter",x.ANTHROPIC="anthropic",x.AZURE="azure",x.GOOGLE="google",x.ACTIVEPIECES="activepieces",x.CLOUDFLARE_GATEWAY="cloudflare-gateway",x.CUSTOM="custom",x.BEDROCK="bedrock",x.MISTRAL="mistral",x))(_t||{});var Ub=a().check($e(/^#[0-9A-Fa-f]{6}$/));var Lb=p({filename:a(),data:k(),type:$("file"),mimetype:h(a())});var fc=Re(Zo());var Gb=p({...ie,name:a(),permissions:N(a()),platformId:G(a()),type:a(),userCount:h(te())});var Vo=(n=>(n.AGENT_DECIDE="agent-decide",n.CHOOSE_YOURSELF="choose-yourself",n.LEAVE_EMPTY="leave-empty",n))(Vo||{}),zr=(r=>(r.FILE="FILE",r.TABLE="TABLE",r))(zr||{}),Or=(n=>(n.SSE="sse",n.STREAMABLE_HTTP="streamable-http",n.SIMPLE_HTTP="http",n))(Or||{});var kr=(n=>(n.TEXT="text",n.NUMBER="number",n.BOOLEAN="boolean",n))(kr||{});var wr=(r=>(r.IN_PROGRESS="in-progress",r.COMPLETED="completed",r))(wr||{});var gc=p({mode:M(Vo),value:k()}),yc=p({auth:h(a()),fields:w(a(),gc)}),hc=p({pieceName:a(),pieceVersion:a(),actionName:a(),predefinedInput:h(yc)}),vc=p({type:$("PIECE"),toolName:a().check(se(1)),pieceMetadata:hc}),xc=p({type:$("none")}),_c=p({type:$("access_token"),accessToken:a()}),Pc=p({type:$("api_key"),apiKey:a(),apiKeyHeader:a()}),bc=p({type:$("headers"),headers:w(a(),a())}),Tc=Se("type",[xc,_c,Pc,bc]),Ho=p({type:$("FLOW"),toolName:a().check(se(1)),externalFlowId:a(),flowDisplayName:h(a())}),Go=p({type:$("MCP"),toolName:a().check(se(1)),serverUrl:So(),protocol:M(Or),auth:Tc}),Wo=p({type:$("KNOWLEDGE_BASE"),toolName:a().check(se(1)),sourceType:M(zr),sourceId:a(),sourceName:a()}),Ic=Se("type",[vc,Ho,Go,Wo]),Ec=p({displayName:a(),description:h(a()),type:M(kr)}),qo=p({type:$("MARKDOWN"),markdown:a()}),Ve={type:$("TOOL_CALL"),input:G(w(a(),k())),output:h(k()),toolName:a(),status:M(wr),toolCallId:a(),startTime:a(),endTime:h(a())},TT=p(Ve),Ko=Se("toolCallType",[p({...Ve,toolCallType:$("PIECE"),pieceName:a(),pieceVersion:a(),actionName:a()}),p({...Ve,toolCallType:$("FLOW"),displayName:a(),externalFlowId:a()}),p({...Ve,toolCallType:$("MCP"),displayName:a(),serverUrl:a()}),p({...Ve,toolCallType:$("KNOWLEDGE_BASE"),displayName:a(),sourceType:a()}),p({...Ve,toolCallType:$("UNKNOWN"),displayName:a()})]),$c=D([qo,Ko]);var Rr=(r=>(r.IMAGE="image",r.TEXT="text",r))(Rr||{}),_e=p({apiKey:a()}),Sc=_e,Ac=p({apiKey:a(),apiKeyHash:a()}),zc=_e,Oc=_e,kc=_e,wc=_e,Rc=_e,Nc=_e,Dc=_e,ei=p({accessKeyId:a().check(se(1)),secretAccessKey:a().check(se(1))}),Cc=p({}),Uc=p({}),Mc=p({}),Lc=p({}),jc=p({}),Fc=p({}),ti=p({modelId:a(),modelName:a(),modelType:M(Rr)}),ri=p({apiKeyHeader:a(),baseUrl:a(),models:N(ti),defaultHeaders:h(w(a(),a()))}),ni=p({accountId:a(),gatewayId:a(),models:N(ti),vertexProject:h(a()),vertexRegion:h(a())}),oi=p({resourceName:a(),apiVersion:ze(Ae(e=>typeof e=="string"&&e.trim().length===0?void 0:e),h(a()))}),ii=p({region:a().check(se(1))}),Bc=D([Sc,kc,wc,Rc,Nc,Oc,zc,Ac,ei,Dc]),ai=D([ri,ni,oi,ii,Cc,Mc,Lc,jc,Uc,Fc]),Zc=p({id:a(),name:a(),type:M(Rr)}),Vc=p({id:a(),name:a(),provider:M(_t),config:ai,enabledForChat:B()}),Hc=p({provider:M(_t),config:ai,auth:Bc,platformId:a()});var ST={openai:"openai",anthropic:"anthropic","google-ai-studio":"google","google-vertex-ai":"google"},Jo=["gpt-5.5","gpt-5.4-mini","gpt-5.4-nano","gpt-4.1","gpt-4.1-mini"],Gc=["claude-sonnet-4-6","claude-opus-4-7","claude-haiku-4-5"],Wc=["claude-sonnet-4.6","claude-opus-4.7","claude-haiku-4.5"],Xo=["gemini-2.5-pro","gemini-2.5-flash","gemini-3.1-pro-preview","gemini-3-flash-preview"],qc=["grok-4.20","grok-4.1-fast"],Kc={openai:Jo,anthropic:Gc,google:Xo,activepieces:[...Wc.map(e=>`anthropic/${e}`),...Jo.map(e=>`openai/${e}`),...Xo.map(e=>`google/${e}`),...qc.map(e=>`x-ai/${e}`)]};var Yo=128e3,Jc={openai:128e3,anthropic:2e5,google:1048576,bedrock:2e5,azure:128e3,openrouter:128e3,activepieces:2e5,mistral:128e3};function Xc({provider:e}){return e?Jc[e]??Yo:Yo}o(Xc,"getMaxContextTokens");var Qo={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"},Yc={anthropic:"native",google:"native",openrouter:"plugin",activepieces:"plugin"},Qc=new Set(["anthropic","mistral"]);function de(e){return{chatModels:Kc[e],maxContextTokens:Xc({provider:e}),defaultEmbeddingModel:Qo[e],supportsEmbedding:Qo[e]!==void 0,supportsImageGeneration:!Qc.has(e),webSearch:Yc[e]}}o(de,"buildProviderCapabilities");var el={openai:de("openai"),anthropic:de("anthropic"),openrouter:de("openrouter"),azure:de("azure"),google:de("google"),"cloudflare-gateway":de("cloudflare-gateway"),custom:de("custom"),bedrock:de("bedrock"),mistral:de("mistral"),activepieces:de("activepieces")};var tl=p({base64Url:a(),fileName:a(),extension:h(a())}),rl=p({mimeType:a(),url:a(),fileName:h(a())}),Nr=D([tl,rl]);var nl=D([p({type:$("file"),value:Nr}),p({type:$("markdown"),value:a(),files:h(N(Nr))})]),ol=p({sessionId:a(),message:a(),files:h(N(a()))});var ui=(r=>(r.ON_NEW_RECORD="ON_NEW_RECORD",r.ON_UPDATE_RECORD="ON_UPDATE_RECORD",r))(ui||{}),ci=(r=>(r.ENABLED="ENABLED",r.DISABLED="DISABLED",r))(ci||{}),Dr=(n=>(n.RECORD_CREATED="RECORD_CREATED",n.RECORD_UPDATED="RECORD_UPDATED",n.RECORD_DELETED="RECORD_DELETED",n))(Dr||{});var il=D([p({...ie,name:a(),externalId:a(),type:$("STATIC_DROPDOWN"),tableId:a(),projectId:a(),data:p({options:N(p({value:a()}))})}),p({...ie,name:a(),externalId:a(),type:D([$("TEXT"),$("NUMBER"),$("DATE")]),tableId:a(),projectId:a()})]),al=p({...ie,name:a(),folderId:G(a()),projectId:a(),externalId:a(),status:Ar(ci),trigger:Ar(ui)}),sl=p({...ie,tableId:a(),projectId:a(),cells:w(a(),p({updated:a(),created:a(),value:k(),fieldName:a()}))}),ul=p({events:N(M(Dr)),webhookUrl:a(),flowId:a()}),cl=p({fields:N(p({id:a(),name:a()})),rows:N(w(a(),a())),name:a()}),ll=p({projectId:a(),limit:h(ct.number()),cursor:h(a()),name:h(a()),externalIds:Gt(a()),folderId:h(a()),folderIds:Gt(a())}),pl=p({records:N(N(p({fieldId:a(),value:pi()}))),tableId:a()}),dl=p({cells:h(N(p({fieldId:a(),value:pi()}))),tableId:a(),agentUpdate:h(B())}),li=Se("operator",[Ce("eq"),Ce("neq"),Ce("gt"),Ce("gte"),Ce("lt"),Ce("lte"),Ce("co"),si("exists"),si("not_exists")]),ml=p({tableId:a(),limit:h(ct.number()),cursor:h(a()),filters:Gt(li)});function pi(){return ze(Ae(e=>e==null?e:String(e)),ut(a()))}o(pi,"coerceToString");function Ce(e){return p({fieldId:a(),operator:$(e),value:a()})}o(Ce,"valueFilter");function si(e){return p({fieldId:a(),operator:$(e)})}o(si,"existenceFilter");var fl=p({status:h(te()),body:h(k()),headers:h(w(a(),a()))}),gl=p({...ie,deleted:G(Oe),ownerId:a(),displayName:a(),platformId:a(),externalId:G(a())});var di=p({name:a(),description:h(a()),type:a(),required:B()}),yl=p({pieceName:a(),triggerName:a(),input:p({toolName:a(),toolDescription:a(),inputSchema:N(di),returnsResponse:B()})});var mi="^[0-9]+\\.[0-9]+\\.[0-9]+$",GT=new RegExp(mi),vl="^([~^])?[0-9]+\\.[0-9]+\\.[0-9]+$",WT=a().check($e(new RegExp(mi))),qT=a().check($e(new RegExp(vl))),xl=p({packageType:$("ARCHIVE"),pieceType:M(Fe),pieceName:a(),pieceVersion:a(),archiveId:a(),platformId:a()}),fi=p({packageType:$("REGISTRY"),pieceType:$("OFFICIAL"),pieceName:a(),pieceVersion:a()}),gi=p({packageType:$("REGISTRY"),pieceType:$("CUSTOM"),pieceName:a(),pieceVersion:a(),platformId:a()}),KT=D([fi,gi]),JT=D([xl,fi,gi]);var _l=Se("type",[p({type:$("CRON_EXPRESSION"),cronExpression:a(),timezone:a()}),p({type:$("INTERVAL"),intervalMs:Ao().check(Ut(6e4))})]),XT=p({...ie,type:M(Ne),projectId:a(),flowId:a(),triggerName:a(),schedule:G(_l),flowVersionId:a(),pieceName:a(),pieceVersion:a(),deleted:G(a()),simulate:B()}),yi=(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.KNOWLEDGE_BASE="KNOWLEDGE_BASE",m.FLOW_BUNDLE="FLOW_BUNDLE",m))(yi||{}),hi=(r=>(r.NONE="NONE",r.ZSTD="ZSTD",r))(hi||{}),vi=(r=>(r.S3="S3",r.DB="DB",r))(vi||{}),YT=p({...ie,projectId:G(a()),platformId:G(a()),type:M(yi),compression:M(hi),data:h(k()),location:M(vi),size:G(te()),fileName:G(a()),s3Key:G(a()),metadata:G(w(a(),a()))}),xi=(n=>(n.ADMIN="ADMIN",n.MEMBER="MEMBER",n.OPERATOR="OPERATOR",n))(xi||{}),_i=(r=>(r.ACTIVE="ACTIVE",r.INACTIVE="INACTIVE",r))(_i||{}),QT=p({id:a(),email:a(),firstName:a(),status:M(_i),externalId:G(a()),platformId:G(a()),platformRole:M(xi),lastName:a(),created:Oe,updated:Oe,lastActiveDate:G(Oe),imageUrl:G(a())});var Cr=p({...F.shape,...C(w(a(),k()),"OBJECT").shape});var Ii=p({...F.shape,...C(a(),"COLOR").shape});var Ur=D([ne,ye,Zt,ve,oe,he,Ir,lt,Er,xe,mt,Cr,ft,dt,pt,Ii]),S={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"}},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"}},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 me=p({displayName:a(),description:h(a())});var Ei=p({username:a(),password:a()}),Mr=p({...me.shape,username:p({displayName:a(),description:h(a())}),password:p({displayName:a(),description:h(a())}),...C(Ei,"BASIC_AUTH").shape});var Il=w(a(),D([ne,ye,xe,ve,oe])),Lr=p({...me.shape,props:Il,...C(k(),"CUSTOM_AUTH").shape});var Ue=p({...me.shape,...C(p({auth:a()}),"SECRET_TEXT").shape});var El=w(a(),D([ne,ye,Ue,xe,ve,oe,he,Zt])),$i=p({...me.shape,props:El,...C(k(),"OIDC").shape});var jr=(r=>(r.HEADER="HEADER",r.BODY="BODY",r))(jr||{}),Si=D([ne,Ue,oe]),Ai=w(a(),Si),$l=p({props:h(w(a(),Si)),authUrl:a(),tokenUrl:a(),scope:N(a()),prompt:h(D([$("none"),$("consent"),$("login"),$("omit")])),pkce:h(B()),pkceMethod:h(D([$("plain"),$("S256")])),authorizationMethod:h(M(jr)),grantType:h(D([M(yt),$($r)])),extra:h(w(a(),a()))}),zi=p({access_token:a(),props:h(Ai),data:w(a(),st())}),Fr=p({...me.shape,...$l.shape,...C(zi,"OAUTH2").shape});var He=D([Mr,Lr,$i,Fr,Ue]),Pt="Connection",Br={SecretText(e){return{...e,valueSchema:void 0,type:"SECRET_TEXT"}},OAuth2(e){return{...e,valueSchema:void 0,type:"OAUTH2",displayName:e.displayName||Pt}},BasicAuth(e){return{...e,valueSchema:void 0,type:"BASIC_AUTH",displayName:e.displayName||Pt,required:!0}},CustomAuth(e){return{...e,valueSchema:void 0,type:"CUSTOM_AUTH",displayName:e.displayName||Pt}},OIDC(e){return{...e,valueSchema:void 0,type:"OIDC",displayName:e.displayName||Pt}},None(){}};var kE={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 Sl=p({...F.shape,...C(k(),"CUSTOM").shape,code:a()});var Al=D([Ur,He]),Zr=w(a(),Al),XE=w(a(),Ur);var Oi=D([p({strategy:$("CRON"),cronExpression:a()}),p({strategy:$("NONE")})]);var ki="2",qt="0.82.0";var Vr=class{constructor(t,r,n,i,u,c,l,f,y=qt,x,T="",_){this.displayName=t;this.logoUrl=r;this.authors=n;this.events=i;this.categories=l;this.auth=f;this.minimumSupportedRelease=y;this.maximumSupportedRelease=x;this.description=T;this.deprecated=_;this._actions={};this._triggers={};this.getContextInfo=o(()=>({version:ki}),"getContextInfo");(!zl(y)||Ol(y,qt))&&(this.minimumSupportedRelease=qt),u.forEach(s=>this._actions[s.name]=s),c.forEach(s=>this._triggers[s.name]=s)}static{o(this,"Piece")}metadata(){return{displayName:this.displayName,logoUrl:this.logoUrl,actions:this._actions,triggers:this._triggers,categories:this.categories,description:this.description,authors:this.authors,auth: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}},wi=o(e=>{if(e.auth&&Array.isArray(e.auth)&&!e.auth.every((r,n,i)=>n===i.findIndex(u=>u.type===r.type)))throw new Error("Auth properties must be unique by type");return new Vr(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 zl(e){return/^\d+\.\d+\.\d+$/.test(e)}o(zl,"isValidSimpleSemver");function Ol(e,t){let[r,n,i]=e.split(".").map(Number),[u,c,l]=t.split(".").map(Number);return r!==u?r<u:n!==c?n<c:i<l}o(Ol,"isSemverLessThan");var kl=h(w(a(),w(a(),a()))),Ri=p({id:h(a()),name:a(),displayName:a(),logoUrl:a(),description:a(),authors:N(a()),platformId:h(a()),directoryPath:h(a()),auth:h(D([He,N(He)])),version:a(),categories:h(N(M(Be))),minimumSupportedRelease:h(a()),maximumSupportedRelease:h(a()),deprecated:h(B()),i18n:kl}),wl=M(["human","ai","both"]),Ni=p({description:h(a()),idempotent:h(B())}),Di=p({name:a(),displayName:a(),description:a(),props:Zr,requireAuth:B(),errorHandlingOptions:h(Tr),outputSchema:h(Ft()),audience:h(wl),aiMetadata:h(Ni)}),Ci=p({name:a(),displayName:a(),description:a(),props:Zr,errorHandlingOptions:h(Tr),type:M(Ne),sampleData:k(),handshakeConfiguration:h(Ft()),renewConfiguration:h(Oi),testStrategy:M(vt),outputSchema:h(Ft()),aiMetadata:h(Ni)}),Rl=p({...Ri.shape,actions:w(a(),Di),triggers:w(a(),Ci)}),Nl=p({...Ri.shape,actions:te(),triggers:te(),suggestedActions:h(N(Di)),suggestedTriggers:h(N(Ci))}),Ui=p({projectUsage:te(),pieceType:M(Fe),packageType:M(gt),platformId:h(a()),archiveId:h(a())}),X$=p({...Rl.shape,...Ui.shape}),Y$=p({...Nl.shape,...Ui.shape}),Q$=p({name:a(),version:a()});var Dl=Re(require("path")),Cl=Re(require("fs/promises"));var Fi=require("node:stream");var Kt=class{constructor(t,r){this.baseUrl=t;this.authenticationConverter=r}static{o(this,"BaseHttpClient")}getUrl(t){let r=new URL(`${this.baseUrl}${t.url}`),n=`${r.origin}${r.pathname}`,i=new URLSearchParams;return r.searchParams.forEach((u,c)=>{i.append(c,u)}),{urlWithoutQueryParams:n,queryParams:i}}getHeaders(t){let r={Accept:"application/json"};return t.authentication&&this.populateAuthentication(t.authentication,r),t.body&&(t.headers?.["Content-Type"]==="text/csv"?r["Content-Type"]="text/csv":r["Content-Type"]="application/json"),t.headers&&(r={...r,...t.headers}),r}populateAuthentication(t,r){this.authenticationConverter.convert(t,r)}};var Jt=class{static{o(this,"DelegatingAuthenticationConverter")}constructor(t=new Hr,r=new Gr){this.converters={BEARER_TOKEN:t,BASIC:r}}convert(t,r){return this.converters[t.type].convert(t,r)}},Hr=class{static{o(this,"BearerTokenAuthenticationConverter")}convert(t,r){return r.Authorization=`Bearer ${t.token}`,r}},Gr=class{static{o(this,"BasicTokenAuthenticationConverter")}convert(t,r){let n=`${t.username}:${t.password}`,i=Buffer.from(n).toString("base64");return r.Authorization=`Basic ${i}`,r}};var bt=class extends Error{constructor(r,n){let i=n.status||500,u=Buffer.isBuffer(n.responseBody)?n.responseBody.toString():n.responseBody;super(JSON.stringify({response:{status:i,body:u},request:{body:r}}));this.requestBody=r;this.status=i,this.responseBody=u}static{o(this,"HttpError")}errorMessage(){return{response:{status:this.status,body:this.responseBody},request:{body:this.requestBody}}}get response(){return{status:this.status,body:this.responseBody}}get request(){return{body:this.requestBody}}};function Mi({error:e,requestBody:t}){return e instanceof bt?e.errorMessage():{response:{status:0,body:e instanceof Error?e.message:String(e)},request:{body:t}}}o(Mi,"toFailsafeOutput");var Pe=(c=>(c.GET="GET",c.POST="POST",c.PATCH="PATCH",c.PUT="PUT",c.DELETE="DELETE",c.HEAD="HEAD",c))(Pe||{});var Xt=class extends Kt{static{o(this,"FetchHttpClient")}constructor(t="",r=new Jt){super(t,r)}async sendRequest(t,r){process.env.NODE_TLS_REJECT_UNAUTHORIZED="0";let{urlWithoutQueryParams:n,queryParams:i}=this.getUrl(t),u=this.getHeaders(t),c=t.queryParams??{};for(let[U,ee]of Object.entries(c))i.append(U,ee);let l=i.toString(),f=l?`${n}?${l}`:n,y=t.responseType??"json",x=t.followRedirects??!0,T=t.retries??0,{body:_,extraHeaders:s,isStream:d}=Ul(t.method)?Ml(t.body,u):{body:void 0,extraHeaders:{},isStream:!1},g=jl({...u,...s}),m=await Ll(async()=>{let U=new AbortController,ee=t.timeout&&t.timeout>0?setTimeout(()=>U.abort(),t.timeout):void 0;try{let ae={method:t.method.toString(),headers:g,body:_,redirect:x?"follow":"manual",signal:U.signal};return d&&(ae.duplex="half"),r?.dispatcher!==void 0&&(ae.dispatcher=r.dispatcher),await fetch(f,ae)}finally{ee!==void 0&&clearTimeout(ee)}},T),v=x?300:400;if(m.status<200||m.status>=v){let U=await Li(m,y),ee=new bt(t.body,{status:m.status,responseBody:U});throw console.error("[HttpClient#(sanitized error message)] Request failed:",ee),ee}let P=await Li(m,y);return{status:m.status,headers:Fl(m.headers),body:P}}};function Ul(e){return e!=="GET"&&e!=="HEAD"}o(Ul,"acceptsRequestBody");function Ml(e,t){if(Zl(e))return{body:void 0,extraHeaders:{},isStream:!1};if(Bl(e)){let n=new Fi.PassThrough;return e.on("error",i=>n.destroy(i)),e.pipe(n),{body:n,extraHeaders:e.getHeaders(),isStream:!0}}return 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}}o(Ml,"serializeBody");async function Li(e,t){switch(t){case"arraybuffer":return Buffer.from(await e.arrayBuffer());case"blob":return await e.blob();case"text":return await e.text();default:{let r=await e.text();if(r.length===0)return;try{return JSON.parse(r)}catch{return r}}}}o(Li,"parseResponseBody");async function Ll(e,t){let r;for(let n=0;n<=t;n++)try{let i=await e();if(i.status>=500&&n<t){await ji(n);continue}return i}catch(i){if(r=i,n<t){await ji(n);continue}throw i}throw r}o(Ll,"sendWithRetries");function ji(e){let t=Math.min(1e3*2**e,3e4);return new Promise(r=>setTimeout(r,t))}o(ji,"backoff");function jl(e){let t={};for(let[r,n]of Object.entries(e))n!==void 0&&(t[r.toLowerCase()]=Array.isArray(n)?n.join(", "):n);return t}o(jl,"normalizeHeaders");function Fl(e){let t={};return e.forEach((r,n)=>{t[n]=r}),t}o(Fl,"toHttpHeaders");function Bl(e){return typeof e=="object"&&e!==null&&typeof e.getHeaders=="function"&&typeof e.pipe=="function"&&typeof e.on=="function"}o(Bl,"isNodeFormData");function Zl(e){return e==null}o(Zl,"isNil");var Z=new Xt;var Od=Re(require("fs")),Gs=Re(fn());var kd={"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 wd(e){let t=e.split(";")[0].trim().toLowerCase();return kd[t]??""}o(wd,"contentTypeToExtension");var Rd=o(({baseUrl:e,relativePath:t})=>{let r=e.endsWith("/")?e:`${e}/`,n=t.startsWith("/")?t.slice(1):t;return`${r}${n}`},"joinBaseUrlWithRelativePath"),Nd=o((e,t)=>{let r="https://api.example.com";try{let n=t?e(t):void 0;return(n?.endsWith("/")?n.slice(0,-1):n)??r}catch{return r}},"getBaseUrlForDescription");function Ws({auth:e,baseUrl:t,authMapping:r,description:n,displayName:i,name:u,props:c,extraProps:l,authLocation:f="headers"}){return pe({audience:"human",name:u||"custom_api_call",displayName:i||"Custom API Call",description:n||"Make a custom API call to a specific endpoint",auth:e,requireAuth:!!e,props:{url:S.DynamicProperties({auth:e,displayName:"",required:!0,refreshers:[],props:o(async({auth:y})=>({url:S.ShortText({displayName:"URL",description:`You can either use the full URL or the relative path to the base URL
3
+ i.e ${Nd(t,y)}/resource or /resource`,required:!0,defaultValue:y?t(y):"",...c?.url??{}})}),"props")}),method:S.StaticDropdown({displayName:"Method",required:!0,options:{options:Object.values(Pe).map(y=>({label:y,value:y}))},...c?.method??{}}),headers:S.Object({displayName:"Headers",description:"Authorization headers are injected automatically from your connection.",required:!0,...c?.headers??{}}),queryParams:S.Object({displayName:"Query Parameters",required:!0,...c?.queryParams??{}}),body_type:S.StaticDropdown({displayName:"Body Type",required:!1,defaultValue:"none",options:{disabled:!1,options:[{label:"None",value:"none"},{label:"JSON",value:"json"},{label:"Form Data",value:"form_data"},{label:"Raw",value:"raw"}]}}),body:S.DynamicProperties({auth:e,displayName:"Body",refreshers:["body_type"],required:!1,props:o(async({body_type:y})=>{if(!y)return{};let x=y,T={};switch(x){case"none":break;case"json":T.data=S.Json({displayName:"JSON Body",required:!0,...c?.body??{}});break;case"raw":T.data=S.LongText({displayName:"Raw Body",required:!0});break;case"form_data":T.data=S.Array({displayName:"Form Data",required:!0,properties:{fieldName:S.ShortText({displayName:"Field Name",required:!0}),fieldType:S.StaticDropdown({displayName:"Field Type",required:!0,options:{disabled:!1,options:[{label:"Text",value:"text"},{label:"File",value:"file"}]}}),textFieldValue:S.LongText({displayName:"Text Field Value",required:!1}),fileFieldValue:S.File({displayName:"File Field Value",required:!1})}});break}return T},"props")}),response_is_binary:S.Checkbox({displayName:"Response is Binary ?",description:"Enable for files like PDFs, images, etc.",required:!1,defaultValue:!1}),failsafe:S.Checkbox({displayName:"No Error on Failure",required:!1,...c?.failsafe??{}}),timeout:S.Number({displayName:"Timeout (in seconds)",required:!1,...c?.timeout??{}}),followRedirects:S.Checkbox({displayName:"Follow redirects",required:!1,defaultValue:!1}),...l},run:o(async y=>{let{method:x,url:T,headers:_,queryParams:s,body:d,body_type:g,failsafe:m,timeout:v,response_is_binary:P,followRedirects:U}=y.propsValue;Ht(x,"Method"),Ht(T,"URL");let ee=ue(r)?{}:await r(y.auth,y.propsValue),ae=T.url,et=ae.startsWith("http://")||ae.startsWith("https://")?ae:Rd({baseUrl:t(y.auth),relativePath:ae}),be={method:x,url:et,headers:{..._??{},...f==="headers"||!ue(f)?ee:{}},queryParams:{...f==="queryParams"?ee:{},...s??{}},timeout:v?v*1e3:0,followRedirects:U};if(P&&(be.responseType="arraybuffer"),d)if(g&&g!=="none"){let fe=d.data;if(g==="form_data"){let ru=fe,$t=new Gs.default;for(let{fieldName:gn,fieldType:yn,textFieldValue:hn,fileFieldValue:sr}of ru)yn==="text"&&!xt(hn)?$t.append(gn,hn):yn==="file"&&!xt(sr)&&$t.append(gn,sr.data,{filename:sr?.filename});be.body=$t,be.headers={...be.headers,...$t.getHeaders()}}else be.body=fe}else g||(be.body=d);try{let fe=await Z.sendRequest(be);return await Dd(y.files,fe.body,fe.status,fe.headers,P)}catch(fe){if(m)return Mi({error:fe,requestBody:be.body});throw fe}},"run")})}o(Ws,"createCustomApiCallAction");var Dd=o(async(e,t,r,n,i)=>{let u;if(i&&Cd(t)){let c=Array.isArray(n?.["content-type"])?n["content-type"][0]:n?.["content-type"],l=wd(c??"")||"txt",f;t instanceof ArrayBuffer?f=Buffer.from(new Uint8Array(t)):Buffer.isBuffer(t)?f=t:f=Buffer.from(t),u=await e.write({fileName:`output.${l}`,data:f})}else u=t;return{status:r,headers:n,body:u}},"handleBinaryResponse"),Cd=o(e=>e instanceof ArrayBuffer||Buffer.isBuffer(e),"isBinaryBody");var H="https://client.camb.ai/apis",we=5e3;var Xe=10,qs=120,Ks=S.Dropdown({auth:Q,displayName:"Voice",description:"Select the voice to generate the speech.",required:!0,refreshers:[],options:o(async({auth:e})=>e?{disabled:!1,options:((await Z.sendRequest({method:"GET",url:`${H}/list-voices`,headers:{"x-api-key":e.secret_text}})).body??[]).map(n=>({label:n.voice_name,value:n.id}))}:{disabled:!0,options:[],placeholder:"Please authenticate first"},"options")}),Ye=S.Dropdown({auth:Q,displayName:"Source Language",description:"Select the original language of the input text.",required:!0,refreshers:[],options:o(async({auth:e})=>e?{disabled:!1,options:((await Z.sendRequest({method:"GET",url:`${H}/source-languages`,headers:{"x-api-key":e.secret_text}})).body??[]).map(n=>({label:`${n.language} (${n.short_name})`,value:n.id}))}:{disabled:!0,options:[],placeholder:"Please authenticate first"},"options")}),Js=S.Dropdown({displayName:"Target Language",description:"Select the language to translate the text into.",auth:Q,required:!0,refreshers:[],options:o(async({auth:e})=>e?{disabled:!1,options:((await Z.sendRequest({method:"GET",url:`${H}/target-languages`,headers:{"x-api-key":e.secret_text}})).body??[]).map(n=>({label:`${n.language} (${n.short_name})`,value:n.id}))}:{disabled:!0,options:[],placeholder:"Please authenticate first"},"options")}),Qe=S.Dropdown({displayName:"Folder",auth:Q,description:"Select the folder to save the task in.",required:!1,refreshers:[],options:o(async({auth:e})=>{if(!e)return{disabled:!0,options:[],placeholder:"Please authenticate first"};try{return{disabled:!1,options:((await Z.sendRequest({method:"GET",url:`${H}/folders`,headers:{"x-api-key":e.secret_text}})).body??[]).map(n=>({label:n.folder_name,value:n.folder_id}))}}catch{return{disabled:!0,options:[],placeholder:"Could not load folders."}}},"options")});var Q=Br.SecretText({displayName:"API Key",description:`
4
4
  To get your API key, please follow these steps:
5
5
  1. Log in to your [CAMB.AI Studio](https://camb.ai/studio/) account.
6
6
  2. Navigate to your workspace's API Keys dashboard.
7
7
  3. Create a new key if you haven't already.
8
8
  4. Copy the API key and paste it here.
9
- `,required:!0,validate:o(async({auth:e})=>{try{return await Z.sendRequest({method:"GET",url:`${V}/source-languages`,headers:{"x-api-key":e}}),{valid:!0}}catch{return{valid:!1,error:"Invalid API Key."}}},"validate")});var Us=pe({auth:Q,name:"create_text_to_sound",displayName:"Create Text-to-Sound",description:"Convert input text into \u201Csound effects\u201D using an AI model.",audience:"both",aiMetadata:{description:"Generates a sound-effect audio clip from a text prompt describing the desired effect using Camb.AI, polling until the generation task completes and returning the audio. Use to synthesize non-speech sound effects (not spoken voice \u2014 use Create Text-to-Speech for that). Duration is capped at 10 seconds (defaults to 8). Not idempotent: each call starts a new generation task and produces fresh audio.",idempotent:!1},props:{prompt:S.LongText({displayName:"Prompt",description:"A clear, descriptive explanation of the desired audio effect. Concise prompts yield more accurate results.",required:!0}),duration:S.Number({displayName:"Duration (seconds)",description:"The desired length of the audio in seconds (max 10). Defaults to 8 if not set.",required:!1}),project_name:S.ShortText({displayName:"Project Name",description:"A memorable name for your project to help organize tasks in your Camb.ai workspace.",required:!1}),project_description:S.LongText({displayName:"Project Description",description:"Provide details about your project's goals and specifications for documentation purposes.",required:!1}),folder_id:Ye},async run(e){let{auth:t}=e,{prompt:r,duration:n,project_name:i,project_description:u,folder_id:c}=e.propsValue,d={prompt:r};n&&(d.duration=n),i&&(d.project_name=i),u&&(d.project_description=u),c&&(d.folder_id=c);let y=(await Z.sendRequest({method:"POST",url:`${V}/text-to-sound`,headers:{"x-api-key":t.secret_text,"Content-Type":"application/json"},body:d})).body.task_id,_=0,b=null;for(;_<Je;){let s=await Z.sendRequest({method:"GET",url:`${V}/text-to-sound/${y}`,headers:{"x-api-key":t.secret_text}}),l=s.body.status;if(l==="SUCCESS"){b=s.body.run_id??null;break}if(l==="FAILED")throw new Error(`Sound generation task failed: ${JSON.stringify(s.body)}`);await new Promise(g=>setTimeout(g,Ae)),_++}if(!b)throw new Error("Sound generation task timed out or failed to return a run_id.");return{audio:(await Z.sendRequest({method:"GET",url:`${V}/text-to-sound-result/${b}`,headers:{"x-api-key":t.secret_text},responseType:"arraybuffer"})).body}}});var Ms=pe({auth:Q,name:"create_text_to_speech",displayName:"Create Text-to-Speech",description:"Convert text into speech using a specified voice, language, gender, and age group.",audience:"both",aiMetadata:{description:"Synthesizes spoken-voice audio from text via Camb.AI text-to-speech, polling until the task completes and writing the resulting WAV to a file. Requires a language and a voice_id (both selected from Camb.AI dropdowns); optionally tune gender and age. Use for spoken narration/dialogue; for non-speech sound effects use Create Text-to-Sound instead. Not idempotent: each call starts a new synthesis task and produces a new audio file.",idempotent:!1},props:{text:S.LongText({displayName:"Text",description:"The text to be converted to speech.",required:!0}),language:Xe,voice_id:Ds,gender:S.StaticDropdown({displayName:"Gender",description:"The gender of the speaker.",required:!1,options:{options:[{label:"Male",value:1},{label:"Female",value:2},{label:"Neutral",value:0},{label:"Unspecified",value:9}]}}),age:S.Number({displayName:"Age",description:"The age of the speaker to be generated.",required:!1}),project_name:S.ShortText({displayName:"Project Name",description:"A memorable name for your project to help organize tasks in your Camb.ai workspace.",required:!1}),project_description:S.LongText({displayName:"Project Description",description:"Provide details about your project's goals and specifications for documentation purposes.",required:!1}),folder_id:Ye},async run(e){let{auth:t}=e,{text:r,language:n,voice_id:i,gender:u,age:c,project_name:d,project_description:f,folder_id:y}=e.propsValue,_={text:r,language:Number(n),voice_id:Number(i)};u!==void 0&&(_.gender=u),c&&(_.age=c),d&&(_.project_name=d),f&&(_.project_description=f),y&&(_.folder_id=y);let x=(await Z.sendRequest({method:"POST",url:`${V}/tts`,headers:{"x-api-key":t.secret_text,"Content-Type":"application/json"},body:_})).body.task_id,s=0,l=null;for(;s<Je;){let U=await Z.sendRequest({method:"GET",url:`${V}/tts/${x}`,headers:{"x-api-key":t.secret_text}});if(U.body.status==="SUCCESS"){l=U.body.run_id??null;break}if(U.body.status==="FAILED")throw new Error(`Text-to-Speech task failed: ${JSON.stringify(U.body)}`);await new Promise(ee=>setTimeout(ee,Ae)),s++}if(!l)throw new Error("Text-to-Speech task timed out or failed to return a run_id.");let g=await Z.sendRequest({method:"GET",url:`${V}/tts-result/${l}`,headers:{"x-api-key":t.secret_text},responseType:"arraybuffer"}),m=`speech_${l}.wav`,v=Buffer.from(g.body);return{message:"Speech generated successfully.",audio_url:await e.files.write({fileName:m,data:v}),run_id:l}}});var js=pe({auth:Q,name:"create_translation",displayName:"Create Translation",description:"Translate text from a source language to a target language.",audience:"both",aiMetadata:{description:"Translates text from a source language to a target language via Camb.AI, polling until the translation task completes. Each input line is treated as a separate segment to translate, and both languages are chosen from Camb.AI dropdowns; optionally tune formality, gender, and target audience age. Use for text translation only (not audio \u2014 use Create Transcription for speech-to-text). Not idempotent: each call starts a new translation task.",idempotent:!1},props:{texts:S.LongText({displayName:"Text to Translate",description:"The text to be translated. You can enter multiple lines; each line will be treated as a separate text segment.",required:!0}),source_language:Xe,target_language:Cs,formality:S.StaticDropdown({displayName:"Formality",description:"Adjust the formality level to match your context.",required:!1,options:{options:[{label:"Formal",value:1},{label:"Informal",value:2}]}}),gender:S.StaticDropdown({displayName:"Gender",description:"Specify grammatical gender preferences when relevant in the target language.",required:!1,options:{options:[{label:"Male",value:1},{label:"Female",value:2},{label:"Neutral",value:0},{label:"Unspecified",value:9}]}}),age:S.Number({displayName:"Audience Age",description:"Helps adjust vocabulary and expressions to be age-appropriate.",required:!1}),project_name:S.ShortText({displayName:"Project Name",description:"A memorable name for your project to help organize tasks in your Camb.ai workspace.",required:!1})},async run(e){let{auth:t}=e,{texts:r,source_language:n,target_language:i,formality:u,gender:c,age:d,project_name:f}=e.propsValue,y={texts:r.split(`
10
- `).filter(g=>g.trim().length>0),source_language:Number(n),target_language:Number(i)};u!==void 0&&(y.formality=u),c!==void 0&&(y.gender=c),d&&(y.age=d),f&&(y.project_name=f);let b=(await Z.sendRequest({method:"POST",url:`${V}/translate`,headers:{"x-api-key":t.secret_text,"Content-Type":"application/json"},body:y})).body.task_id,x=null,s=0;for(;s<Je;){let g=await Z.sendRequest({method:"GET",url:`${V}/translate/${b}`,headers:{"x-api-key":t.secret_text}});if(g.body.status==="SUCCESS"){x=g.body.run_id??null;break}if(g.body.status==="ERROR"||g.body.status==="FAILED")throw new Error(`Translation task failed: ${JSON.stringify(g.body)}`);await new Promise(m=>setTimeout(m,Ae)),s++}if(!x)throw new Error("Translation task timed out or failed to return a task_id.");return(await Z.sendRequest({method:"GET",url:`${V}/translation-result/${x}`,headers:{"x-api-key":t.secret_text}})).body}});var Ls=ke(ln());var Fs=pe({auth:Q,name:"create_transcription",displayName:"Create Transcription",description:"Creates a task to process speech into readable text.",audience:"both",aiMetadata:{description:"Transcribes speech from an audio/video source into text via Camb.AI, polling until the transcription task completes. The media can be supplied either as an uploaded file (max 20MB) or as a public file URL, selected via the media source mode; you must specify the spoken language. Use to convert recorded speech to text. Not idempotent: each call starts a new transcription task.",idempotent:!1},props:{language:Xe,source_type:S.StaticDropdown({displayName:"Media Source",description:"Choose whether to upload a file or provide a URL.",required:!0,defaultValue:"file",options:{options:[{label:"Upload File",value:"file"},{label:"File URL",value:"url"}]}}),media:S.DynamicProperties({auth:Q,displayName:"Media",required:!0,refreshers:["source_type"],props:o(async e=>{let t=e.source_type,r={};return t==="file"?r.media_file=S.File({displayName:"Media File",description:"The media file (e.g., MP3, WAV, MP4) to transcribe. Max size: 20MB.",required:!0}):t==="url"&&(r.media_url=S.ShortText({displayName:"Media URL",description:"A public URL to the media file to transcribe.",required:!0})),r},"props")}),project_name:S.ShortText({displayName:"Project Name",description:"A memorable name for your project to help organize tasks in your Camb.ai workspace.",required:!1}),project_description:S.LongText({displayName:"Project Description",description:"Provide details about your project's goals and specifications for documentation purposes.",required:!1}),folder_id:Ye},async run(e){let{auth:t}=e,{language:r,source_type:n,media:i,project_name:u,project_description:c,folder_id:d}=e.propsValue,f=new Ls.default;if(f.append("language",Number(r).toString()),u&&f.append("project_name",u),c&&f.append("project_description",c),d&&f.append("folder_id",d.toString()),n==="url"){if(!i.media_url)throw new Error("Media URL is required when source is 'File URL'.");f.append("media_url",i.media_url)}else{if(!i.media_file)throw new Error("Media File is required when source is 'Upload File'.");let m=i.media_file;f.append("media_file",m.data,m.filename)}let y=await f.getBuffer(),_={"x-api-key":t.secret_text,...f.getHeaders()},x=(await Z.sendRequest({method:"POST",url:`${V}/transcribe`,headers:_,body:y})).body.task_id,s=null,l=0;for(;l<Ns;){let m=await Z.sendRequest({method:"GET",url:`${V}/transcribe/${x}`,headers:{"x-api-key":t.secret_text}});if(m.body.status==="SUCCESS"){s=m.body.run_id??null;break}if(m.body.status==="FAILED")throw new Error(`Transcription task failed: ${JSON.stringify(m.body)}`);await new Promise(v=>setTimeout(v,Ae)),l++}if(!s)throw new Error("Transcription task timed out or failed to return a task_id.");return(await Z.sendRequest({method:"GET",url:`${V}/transcription-result/${s}`,headers:{"x-api-key":t.secret_text}})).body}});var yd=_i({displayName:"Camb.AI",auth:Q,minimumSupportedRelease:"0.36.1",logoUrl:"https://cdn.activepieces.com/pieces/camb-ai.png",authors:["david-oluwaseun420","sanket-a11y"],categories:["ARTIFICIAL_INTELLIGENCE"],actions:[Us,Ms,js,Fs,Rs({auth:Q,baseUrl:o(()=>V,"baseUrl"),authMapping:o(async e=>({"x-api-key":e.secret_text}),"authMapping")})],triggers:[]});0&&(module.exports={cambAi});
9
+ `,required:!0,validate:o(async({auth:e})=>{try{return await Z.sendRequest({method:"GET",url:`${H}/source-languages`,headers:{"x-api-key":e}}),{valid:!0}}catch{return{valid:!1,error:"Invalid API Key."}}},"validate")});var Xs=pe({auth:Q,name:"create_text_to_sound",displayName:"Create Text-to-Sound",description:"Convert input text into \u201Csound effects\u201D using an AI model.",audience:"both",aiMetadata:{description:"Generates a sound-effect audio clip from a text prompt describing the desired effect using Camb.AI, polling until the generation task completes and returning the audio. Use to synthesize non-speech sound effects (not spoken voice \u2014 use Create Text-to-Speech for that). Duration is capped at 10 seconds (defaults to 8). Not idempotent: each call starts a new generation task and produces fresh audio.",idempotent:!1},props:{prompt:S.LongText({displayName:"Prompt",description:"A clear, descriptive explanation of the desired audio effect. Concise prompts yield more accurate results.",required:!0}),duration:S.Number({displayName:"Duration (seconds)",description:"The desired length of the audio in seconds (max 10). Defaults to 8 if not set.",required:!1}),project_name:S.ShortText({displayName:"Project Name",description:"A memorable name for your project to help organize tasks in your Camb.ai workspace.",required:!1}),project_description:S.LongText({displayName:"Project Description",description:"Provide details about your project's goals and specifications for documentation purposes.",required:!1}),folder_id:Qe},async run(e){let{auth:t}=e,{prompt:r,duration:n,project_name:i,project_description:u,folder_id:c}=e.propsValue,l={prompt:r};n&&(l.duration=n),i&&(l.project_name=i),u&&(l.project_description=u),c&&(l.folder_id=c);let y=(await Z.sendRequest({method:"POST",url:`${H}/text-to-sound`,headers:{"x-api-key":t.secret_text,"Content-Type":"application/json"},body:l})).body.task_id,x=0,T=null;for(;x<Xe;){let s=await Z.sendRequest({method:"GET",url:`${H}/text-to-sound/${y}`,headers:{"x-api-key":t.secret_text}}),d=s.body.status;if(d==="SUCCESS"){T=s.body.run_id??null;break}if(d==="FAILED")throw new Error(`Sound generation task failed: ${JSON.stringify(s.body)}`);await new Promise(g=>setTimeout(g,we)),x++}if(!T)throw new Error("Sound generation task timed out or failed to return a run_id.");return{audio:(await Z.sendRequest({method:"GET",url:`${H}/text-to-sound-result/${T}`,headers:{"x-api-key":t.secret_text},responseType:"arraybuffer"})).body}}});var Ys=pe({auth:Q,name:"create_text_to_speech",displayName:"Create Text-to-Speech",description:"Convert text into speech using a specified voice, language, gender, and age group.",audience:"both",aiMetadata:{description:"Synthesizes spoken-voice audio from text via Camb.AI text-to-speech, polling until the task completes and writing the resulting WAV to a file. Requires a language and a voice_id (both selected from Camb.AI dropdowns); optionally tune gender and age. Use for spoken narration/dialogue; for non-speech sound effects use Create Text-to-Sound instead. Not idempotent: each call starts a new synthesis task and produces a new audio file.",idempotent:!1},props:{text:S.LongText({displayName:"Text",description:"The text to be converted to speech.",required:!0}),language:Ye,voice_id:Ks,gender:S.StaticDropdown({displayName:"Gender",description:"The gender of the speaker.",required:!1,options:{options:[{label:"Male",value:1},{label:"Female",value:2},{label:"Neutral",value:0},{label:"Unspecified",value:9}]}}),age:S.Number({displayName:"Age",description:"The age of the speaker to be generated.",required:!1}),project_name:S.ShortText({displayName:"Project Name",description:"A memorable name for your project to help organize tasks in your Camb.ai workspace.",required:!1}),project_description:S.LongText({displayName:"Project Description",description:"Provide details about your project's goals and specifications for documentation purposes.",required:!1}),folder_id:Qe},async run(e){let{auth:t}=e,{text:r,language:n,voice_id:i,gender:u,age:c,project_name:l,project_description:f,folder_id:y}=e.propsValue,x={text:r,language:Number(n),voice_id:Number(i)};u!==void 0&&(x.gender=u),c&&(x.age=c),l&&(x.project_name=l),f&&(x.project_description=f),y&&(x.folder_id=y);let _=(await Z.sendRequest({method:"POST",url:`${H}/tts`,headers:{"x-api-key":t.secret_text,"Content-Type":"application/json"},body:x})).body.task_id,s=0,d=null;for(;s<Xe;){let U=await Z.sendRequest({method:"GET",url:`${H}/tts/${_}`,headers:{"x-api-key":t.secret_text}});if(U.body.status==="SUCCESS"){d=U.body.run_id??null;break}if(U.body.status==="FAILED")throw new Error(`Text-to-Speech task failed: ${JSON.stringify(U.body)}`);await new Promise(ee=>setTimeout(ee,we)),s++}if(!d)throw new Error("Text-to-Speech task timed out or failed to return a run_id.");let g=await Z.sendRequest({method:"GET",url:`${H}/tts-result/${d}`,headers:{"x-api-key":t.secret_text},responseType:"arraybuffer"}),m=`speech_${d}.wav`,v=Buffer.from(g.body);return{message:"Speech generated successfully.",audio_url:await e.files.write({fileName:m,data:v}),run_id:d}}});var Qs=pe({auth:Q,name:"create_translation",displayName:"Create Translation",description:"Translate text from a source language to a target language.",audience:"both",aiMetadata:{description:"Translates text from a source language to a target language via Camb.AI, polling until the translation task completes. Each input line is treated as a separate segment to translate, and both languages are chosen from Camb.AI dropdowns; optionally tune formality, gender, and target audience age. Use for text translation only (not audio \u2014 use Create Transcription for speech-to-text). Not idempotent: each call starts a new translation task.",idempotent:!1},props:{texts:S.LongText({displayName:"Text to Translate",description:"The text to be translated. You can enter multiple lines; each line will be treated as a separate text segment.",required:!0}),source_language:Ye,target_language:Js,formality:S.StaticDropdown({displayName:"Formality",description:"Adjust the formality level to match your context.",required:!1,options:{options:[{label:"Formal",value:1},{label:"Informal",value:2}]}}),gender:S.StaticDropdown({displayName:"Gender",description:"Specify grammatical gender preferences when relevant in the target language.",required:!1,options:{options:[{label:"Male",value:1},{label:"Female",value:2},{label:"Neutral",value:0},{label:"Unspecified",value:9}]}}),age:S.Number({displayName:"Audience Age",description:"Helps adjust vocabulary and expressions to be age-appropriate.",required:!1}),project_name:S.ShortText({displayName:"Project Name",description:"A memorable name for your project to help organize tasks in your Camb.ai workspace.",required:!1})},async run(e){let{auth:t}=e,{texts:r,source_language:n,target_language:i,formality:u,gender:c,age:l,project_name:f}=e.propsValue,y={texts:r.split(`
10
+ `).filter(g=>g.trim().length>0),source_language:Number(n),target_language:Number(i)};u!==void 0&&(y.formality=u),c!==void 0&&(y.gender=c),l&&(y.age=l),f&&(y.project_name=f);let T=(await Z.sendRequest({method:"POST",url:`${H}/translate`,headers:{"x-api-key":t.secret_text,"Content-Type":"application/json"},body:y})).body.task_id,_=null,s=0;for(;s<Xe;){let g=await Z.sendRequest({method:"GET",url:`${H}/translate/${T}`,headers:{"x-api-key":t.secret_text}});if(g.body.status==="SUCCESS"){_=g.body.run_id??null;break}if(g.body.status==="ERROR"||g.body.status==="FAILED")throw new Error(`Translation task failed: ${JSON.stringify(g.body)}`);await new Promise(m=>setTimeout(m,we)),s++}if(!_)throw new Error("Translation task timed out or failed to return a task_id.");return(await Z.sendRequest({method:"GET",url:`${H}/translation-result/${_}`,headers:{"x-api-key":t.secret_text}})).body}});var eu=Re(fn());var tu=pe({auth:Q,name:"create_transcription",displayName:"Create Transcription",description:"Creates a task to process speech into readable text.",audience:"both",aiMetadata:{description:"Transcribes speech from an audio/video source into text via Camb.AI, polling until the transcription task completes. The media can be supplied either as an uploaded file (max 20MB) or as a public file URL, selected via the media source mode; you must specify the spoken language. Use to convert recorded speech to text. Not idempotent: each call starts a new transcription task.",idempotent:!1},props:{language:Ye,source_type:S.StaticDropdown({displayName:"Media Source",description:"Choose whether to upload a file or provide a URL.",required:!0,defaultValue:"file",options:{options:[{label:"Upload File",value:"file"},{label:"File URL",value:"url"}]}}),media:S.DynamicProperties({auth:Q,displayName:"Media",required:!0,refreshers:["source_type"],props:o(async e=>{let t=e.source_type,r={};return t==="file"?r.media_file=S.File({displayName:"Media File",description:"The media file (e.g., MP3, WAV, MP4) to transcribe. Max size: 20MB.",required:!0}):t==="url"&&(r.media_url=S.ShortText({displayName:"Media URL",description:"A public URL to the media file to transcribe.",required:!0})),r},"props")}),project_name:S.ShortText({displayName:"Project Name",description:"A memorable name for your project to help organize tasks in your Camb.ai workspace.",required:!1}),project_description:S.LongText({displayName:"Project Description",description:"Provide details about your project's goals and specifications for documentation purposes.",required:!1}),folder_id:Qe},async run(e){let{auth:t}=e,{language:r,source_type:n,media:i,project_name:u,project_description:c,folder_id:l}=e.propsValue,f=new eu.default;if(f.append("language",Number(r).toString()),u&&f.append("project_name",u),c&&f.append("project_description",c),l&&f.append("folder_id",l.toString()),n==="url"){if(!i.media_url)throw new Error("Media URL is required when source is 'File URL'.");f.append("media_url",i.media_url)}else{if(!i.media_file)throw new Error("Media File is required when source is 'Upload File'.");let m=i.media_file;f.append("media_file",m.data,m.filename)}let y=await f.getBuffer(),x={"x-api-key":t.secret_text,...f.getHeaders()},_=(await Z.sendRequest({method:"POST",url:`${H}/transcribe`,headers:x,body:y})).body.task_id,s=null,d=0;for(;d<qs;){let m=await Z.sendRequest({method:"GET",url:`${H}/transcribe/${_}`,headers:{"x-api-key":t.secret_text}});if(m.body.status==="SUCCESS"){s=m.body.run_id??null;break}if(m.body.status==="FAILED")throw new Error(`Transcription task failed: ${JSON.stringify(m.body)}`);await new Promise(v=>setTimeout(v,we)),d++}if(!s)throw new Error("Transcription task timed out or failed to return a task_id.");return(await Z.sendRequest({method:"GET",url:`${H}/transcription-result/${s}`,headers:{"x-api-key":t.secret_text}})).body}});var Ud=wi({displayName:"Camb.AI",auth:Q,minimumSupportedRelease:"0.36.1",logoUrl:"https://cdn.activepieces.com/pieces/camb-ai.png",authors:["david-oluwaseun420","sanket-a11y"],categories:["ARTIFICIAL_INTELLIGENCE"],actions:[Xs,Ys,Qs,tu,Ws({auth:Q,baseUrl:o(()=>H,"baseUrl"),authMapping:o(async e=>({"x-api-key":e.secret_text}),"authMapping")})],triggers:[]});0&&(module.exports={cambAi});
11
11
  /*! Bundled license information:
12
12
 
13
13
  mime-types/index.js: