@activepieces/piece-feedhive 0.0.4 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/index.js +7 -7
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
"use strict";var Zs=Object.create;var Je=Object.defineProperty;var Vs=Object.getOwnPropertyDescriptor;var Hs=Object.getOwnPropertyNames;var Ws=Object.getPrototypeOf,Gs=Object.prototype.hasOwnProperty;var o=(e,t)=>Je(e,"name",{value:t,configurable:!0});var E=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),mn=(e,t)=>{for(var r in t)Je(e,r,{get:t[r],enumerable:!0})},fn=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Hs(t))!Gs.call(e,i)&&i!==r&&Je(e,i,{get:()=>t[i],enumerable:!(n=Vs(t,i))||n.enumerable});return e};var Oe=(e,t,r)=>(r=e!=null?Zs(Ws(e)):{},fn(t||!e||!e.__esModule?Je(r,"default",{value:e,enumerable:!0}):r,e)),qs=e=>fn(Je({},"__esModule",{value:!0}),e);var Oo=E((wo,Lt)=>{(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]+::?)+",p={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 g(s,d){if(s.indexOf("::")!==s.lastIndexOf("::"))return null;let y=0,m=-1,v=(s.match(p.zoneIndex)||[])[0],P,j;for(v&&(v=v.substring(1),s=s.replace(/%.+$/,""));(m=s.indexOf(":",m+1))>=0;)y++;if(s.substr(0,2)==="::"&&y--,s.substr(-2,2)==="::"&&y--,y>d)return null;for(j=d-y,P=":";j--;)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 re=s.split(":"),ae=[];for(let Ke=0;Ke<re.length;Ke++)ae.push(parseInt(re[Ke],16));return ae}(),{parts:d,zoneId:v}}o(g,"expandIPv6");function f(s,d,y,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=y-m,P<0&&(P=0),s[v]>>P!==d[v]>>P)return!1;m-=y,v+=1}return!0}o(f,"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 $(s,d){for(;s.length<d;)s=`0${s}`;return s}o($,"padPart");let x={};x.IPv4=function(){function s(d){if(d.length!==4)throw new Error("ipaddr: ipv4 octet count should be 4");let y,m;for(y=0;y<d.length;y++)if(m=d[y],!(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,y){let m;if(y===void 0&&(m=d,d=m[0],y=m[1]),d.kind()!=="ipv4")throw new Error("ipaddr: cannot match ipv4 address with non-ipv4 one");return f(this.octets,d.octets,8,y)},s.prototype.prefixLengthFromSubnetMask=function(){let d=0,y=!1,m={0:8,128:7,192:6,224:5,240:4,248:3,252:2,254:1,255:0},v,P,j;for(v=3;v>=0;v-=1)if(P=this.octets[v],P in m){if(j=m[P],y&&j!==0)return null;j!==8&&(y=!0),d+=j}else return null;return 32-d},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 d=this.parseCIDR(s),y=d[0].toByteArray(),m=this.subnetMaskFromPrefixLength(d[1]).toByteArray(),v=[],P=0;for(;P<4;)v.push(parseInt(y[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 d=s.match(/^(.+)\/(\d+)$/);return!x.IPv4.isValidCIDR(s)||!d?!1:x.IPv4.isValidFourPartDecimal(d[1])},x.IPv4.networkAddressFromCIDR=function(s){let d,y,m,v,P;try{for(d=this.parseCIDR(s),m=d[0].toByteArray(),P=this.subnetMaskFromPrefixLength(d[1]).toByteArray(),v=[],y=0;y<4;)v.push(parseInt(m[y],10)&parseInt(P[y],10)),y++;return new this(v)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},x.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)},x.IPv4.parseCIDR=function(s){let d;if(d=s.match(/^(.+)\/(\d+)$/)){let y=parseInt(d[2]);if(y>=0&&y<=32){let m=[this.parse(d[1]),y];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 d,y,m;if(d=s.match(r.fourOctet))return function(){let v=d.slice(1,6),P=[];for(let j=0;j<v.length;j++)y=v[j],P.push(_(y));return P}();if(d=s.match(r.longValue)){if(m=_(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=_(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}():(d=s.match(r.threeOctet))?function(){let v=d.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 d=[0,0,0,0],y=0,m=Math.floor(s/8);for(;y<m;)d[y]=255,y++;return m<4&&(d[m]=Math.pow(2,s%8)-1<<8-s%8),new this(d)},x.IPv6=function(){function s(d,y){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");y&&(this.zoneId=y)}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,y){let m;if(y===void 0&&(m=d,d=m[0],y=m[1]),d.kind()!=="ipv6")throw new Error("ipaddr: cannot match ipv6 address with non-ipv6 one");return f(this.parts,d.parts,16,y)},s.prototype.prefixLengthFromSubnetMask=function(){let d=0,y=!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 j=7;j>=0;j-=1)if(v=this.parts[j],v in m){if(P=m[v],y&&P!==0)return null;P!==16&&(y=!0),d+=P}else return null;return 128-d},s.prototype.range=function(){return x.subnetMatch(this,this.SpecialRanges)},s.prototype.toByteArray=function(){let d,y=[],m=this.parts;for(let v=0;v<m.length;v++)d=m[v],y.push(d>>8),y.push(d&255);return y},s.prototype.toFixedLengthString=function(){let d=function(){let m=[];for(let v=0;v<this.parts.length;v++)m.push($(this.parts[v].toString(16),4));return m}.call(this).join(":"),y="";return this.zoneId&&(y=`%${this.zoneId}`),d+y},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),y=d[0],m=d[1];return new x.IPv4([y>>8,y&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(":"),y="";return this.zoneId&&(y=`%${this.zoneId}`),d+y},s.prototype.toRFC5952String=function(){let d=/((^|:)(0(:|$)){2,})/g,y=this.toNormalizedString(),m=0,v=-1,P;for(;P=d.exec(y);)P[0].length>v&&(m=P.index,v=P[0].length);return v<0?y:`${y.substring(0,m)}::${y.substring(m+v)}`},s.prototype.toString=function(){return this.toRFC5952String()},s}(),x.IPv6.broadcastAddressFromCIDR=function(s){try{let d=this.parseCIDR(s),y=d[0].toByteArray(),m=this.subnetMaskFromPrefixLength(d[1]).toByteArray(),v=[],P=0;for(;P<16;)v.push(parseInt(y[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})`)}},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 d=this.parser(s);return new this(d.parts,d.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 d,y,m,v,P;try{for(d=this.parseCIDR(s),m=d[0].toByteArray(),P=this.subnetMaskFromPrefixLength(d[1]).toByteArray(),v=[],y=0;y<16;)v.push(parseInt(m[y],10)&parseInt(P[y],10)),y++;return new this(v)}catch(j){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${j})`)}},x.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)},x.IPv6.parseCIDR=function(s){let d,y,m;if((y=s.match(/^(.+)\/(\d+)$/))&&(d=parseInt(y[2]),d>=0&&d<=128))return m=[this.parse(y[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")},x.IPv6.parser=function(s){let d,y,m,v,P,j;if(m=s.match(p.deprecatedTransitional))return this.parser(`::ffff:${m[1]}`);if(p.native.test(s))return g(s,8);if((m=s.match(p.transitional))&&(j=m[6]||"",d=m[1],m[1].endsWith("::")||(d=d.slice(0,-1)),d=g(d+j,6),d.parts)){for(P=[parseInt(m[2]),parseInt(m[3]),parseInt(m[4]),parseInt(m[5])],y=0;y<P.length;y++)if(v=P[y],!(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},x.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],y=0,m=Math.floor(s/8);for(;y<m;)d[y]=255,y++;return m<16&&(d[m]=Math.pow(2,s%8)-1<<8-s%8),new this(d)},x.fromByteArray=function(s){let d=s.length;if(d===4)return new x.IPv4(s);if(d===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 d=this.parse(s);return d.kind()==="ipv6"&&d.isIPv4MappedAddress()?d.toIPv4Address():d},x.subnetMatch=function(s,d,y){let m,v,P,j;y==null&&(y="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(j=P[m],s.kind()===j[0].kind()&&s.match.apply(s,j))return v}return y},typeof Lt<"u"&&Lt.exports?Lt.exports=x:e.ipaddr=x})(wo)});var Ai=E((rA,Si)=>{var $i=require("stream").Stream,Tl=require("util");Si.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");Tl.inherits(ce,$i);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=$i.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 Oi=E((oA,wi)=>{var Il=require("util"),ki=require("stream").Stream,zi=Ai();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");Il.inherits(K,ki);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 zi)){var r=zi.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 ki.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 Ni=E((aA,Ri)=>{"use strict";Ri.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 Ui=E(te=>{"use strict";var Gt=Ni(),El=require("path").extname,Di=/^\s*([^;\s]*)(?:;|\s|$)/,$l=/^text\//i;te.charset=Ci;te.charsets={lookup:Ci};te.contentType=Sl;te.extension=Al;te.extensions=Object.create(null);te.lookup=zl;te.types=Object.create(null);kl(te.extensions,te.types);function Ci(e){if(!e||typeof e!="string")return!1;var t=Di.exec(e),r=t&&Gt[t[1].toLowerCase()];return r&&r.charset?r.charset:t&&$l.test(t[1])?"UTF-8":!1}o(Ci,"charset");function Sl(e){if(!e||typeof e!="string")return!1;var t=e.indexOf("/")===-1?te.lookup(e):e;if(!t)return!1;if(t.indexOf("charset")===-1){var r=te.charset(t);r&&(t+="; charset="+r.toLowerCase())}return t}o(Sl,"contentType");function Al(e){if(!e||typeof e!="string")return!1;var t=Di.exec(e),r=t&&te.extensions[t[1].toLowerCase()];return!r||!r.length?!1:r[0]}o(Al,"extension");function zl(e){if(!e||typeof e!="string")return!1;var t=El("x."+e).toLowerCase().substr(1);return t&&te.types[t]||!1}o(zl,"lookup");function kl(e,t){var r=["nginx","apache",void 0,"iana"];Object.keys(Gt).forEach(o(function(i){var u=Gt[i],c=u.extensions;if(!(!c||!c.length)){e[i]=c;for(var p=0;p<c.length;p++){var g=c[p];if(t[g]){var f=r.indexOf(Gt[t[g]].source),_=r.indexOf(u.source);if(t[g]!=="application/octet-stream"&&(f>_||f===_&&t[g].substr(0,12)==="application/"))continue}t[g]=i}}},"forEachMimeType"))}o(kl,"populateMaps")});var ji=E((cA,Mi)=>{Mi.exports=wl;function wl(e){var t=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;t?t(e):setTimeout(e,0)}o(wl,"defer")});var Zr=E((pA,Fi)=>{var Li=ji();Fi.exports=Ol;function Ol(e){var t=!1;return Li(function(){t=!0}),o(function(n,i){t?e(n,i):Li(o(function(){e(n,i)},"nextTick_callback"))},"async_callback")}o(Ol,"async")});var Vr=E((mA,Bi)=>{Bi.exports=Rl;function Rl(e){Object.keys(e.jobs).forEach(Nl.bind(e)),e.jobs={}}o(Rl,"abort");function Nl(e){typeof this.jobs[e]=="function"&&this.jobs[e]()}o(Nl,"clean")});var Hr=E((gA,Vi)=>{var Zi=Zr(),Dl=Vr();Vi.exports=Cl;function Cl(e,t,r,n){var i=r.keyedList?r.keyedList[r.index]:r.index;r.jobs[i]=Ul(t,i,e[i],function(u,c){i in r.jobs&&(delete r.jobs[i],u?Dl(r):r.results[i]=c,n(u,r.results))})}o(Cl,"iterate");function Ul(e,t,r,n){var i;return e.length==2?i=e(r,Zi(n)):i=e(r,t,Zi(n)),i}o(Ul,"runJob")});var Wr=E((hA,Hi)=>{Hi.exports=Ml;function Ml(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(Ml,"state")});var Gr=E((xA,Wi)=>{var jl=Vr(),Ll=Zr();Wi.exports=Fl;function Fl(e){Object.keys(this.jobs).length&&(this.index=this.size,jl(this),Ll(e)(null,this.results))}o(Fl,"terminator")});var qi=E((PA,Gi)=>{var Bl=Hr(),Zl=Wr(),Vl=Gr();Gi.exports=Hl;function Hl(e,t,r){for(var n=Zl(e);n.index<(n.keyedList||e).length;)Bl(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 Vl.bind(n,r)}o(Hl,"parallel")});var qr=E((TA,qt)=>{var Ki=Hr(),Wl=Wr(),Gl=Gr();qt.exports=ql;qt.exports.ascending=Ji;qt.exports.descending=Kl;function ql(e,t,r,n){var i=Wl(e,r);return Ki(e,t,i,o(function u(c,p){if(c){n(c,p);return}if(i.index++,i.index<(i.keyedList||e).length){Ki(e,t,i,u);return}n(null,i.results)},"iteratorHandler")),Gl.bind(i,n)}o(ql,"serialOrdered");function Ji(e,t){return e<t?-1:e>t?1:0}o(Ji,"ascending");function Kl(e,t){return-1*Ji(e,t)}o(Kl,"descending")});var Yi=E((EA,Xi)=>{var Jl=qr();Xi.exports=Xl;function Xl(e,t,r){return Jl(e,t,null,r)}o(Xl,"serial")});var ea=E((SA,Qi)=>{Qi.exports={parallel:qi(),serial:Yi(),serialOrdered:qr()}});var Kr=E((AA,ta)=>{"use strict";ta.exports=Object});var na=E((zA,ra)=>{"use strict";ra.exports=Error});var ia=E((kA,oa)=>{"use strict";oa.exports=EvalError});var sa=E((wA,aa)=>{"use strict";aa.exports=RangeError});var ca=E((OA,ua)=>{"use strict";ua.exports=ReferenceError});var pa=E((RA,la)=>{"use strict";la.exports=SyntaxError});var Kt=E((NA,da)=>{"use strict";da.exports=TypeError});var fa=E((DA,ma)=>{"use strict";ma.exports=URIError});var ya=E((CA,ga)=>{"use strict";ga.exports=Math.abs});var va=E((UA,ha)=>{"use strict";ha.exports=Math.floor});var _a=E((MA,xa)=>{"use strict";xa.exports=Math.max});var ba=E((jA,Pa)=>{"use strict";Pa.exports=Math.min});var Ia=E((LA,Ta)=>{"use strict";Ta.exports=Math.pow});var $a=E((FA,Ea)=>{"use strict";Ea.exports=Math.round});var Aa=E((BA,Sa)=>{"use strict";Sa.exports=Number.isNaN||o(function(t){return t!==t},"isNaN")});var ka=E((VA,za)=>{"use strict";var Yl=Aa();za.exports=o(function(t){return Yl(t)||t===0?t:t<0?-1:1},"sign")});var Oa=E((WA,wa)=>{"use strict";wa.exports=Object.getOwnPropertyDescriptor});var Jr=E((GA,Ra)=>{"use strict";var Jt=Oa();if(Jt)try{Jt([],"length")}catch{Jt=null}Ra.exports=Jt});var Da=E((qA,Na)=>{"use strict";var Xt=Object.defineProperty||!1;if(Xt)try{Xt({},"a",{value:1})}catch{Xt=!1}Na.exports=Xt});var Xr=E((KA,Ca)=>{"use strict";Ca.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 p=Object.getOwnPropertyDescriptor(t,r);if(p.value!==i||p.enumerable!==!0)return!1}return!0},"hasSymbols")});var ja=E((XA,Ma)=>{"use strict";var Ua=typeof Symbol<"u"&&Symbol,Ql=Xr();Ma.exports=o(function(){return typeof Ua!="function"||typeof Symbol!="function"||typeof Ua("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Ql()},"hasNativeSymbols")});var Yr=E((QA,La)=>{"use strict";La.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var Qr=E((ez,Fa)=>{"use strict";var ep=Kr();Fa.exports=ep.getPrototypeOf||null});var Va=E((tz,Za)=>{"use strict";var tp="Function.prototype.bind called on incompatible ",rp=Object.prototype.toString,np=Math.max,op="[object Function]",Ba=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"),ip=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"),ap=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");Za.exports=o(function(t){var r=this;if(typeof r!="function"||rp.apply(r)!==op)throw new TypeError(tp+r);for(var n=ip(arguments,1),i,u=o(function(){if(this instanceof i){var _=r.apply(this,Ba(n,arguments));return Object(_)===_?_:this}return r.apply(t,Ba(n,arguments))},"binder"),c=np(0,r.length-n.length),p=[],g=0;g<c;g++)p[g]="$"+g;if(i=Function("binder","return function ("+ap(p,",")+"){ return binder.apply(this,arguments); }")(u),r.prototype){var f=o(function(){},"Empty");f.prototype=r.prototype,i.prototype=new f,f.prototype=null}return i},"bind")});var Ve=E((nz,Ha)=>{"use strict";var sp=Va();Ha.exports=Function.prototype.bind||sp});var Yt=E((oz,Wa)=>{"use strict";Wa.exports=Function.prototype.call});var en=E((iz,Ga)=>{"use strict";Ga.exports=Function.prototype.apply});var Ka=E((az,qa)=>{"use strict";qa.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var Xa=E((sz,Ja)=>{"use strict";var up=Ve(),cp=en(),lp=Yt(),pp=Ka();Ja.exports=pp||up.call(lp,cp)});var Qa=E((uz,Ya)=>{"use strict";var dp=Ve(),mp=Kt(),fp=Yt(),gp=Xa();Ya.exports=o(function(t){if(t.length<1||typeof t[0]!="function")throw new mp("a function is required");return gp(dp,fp,t)},"callBindBasic")});var is=E((lz,os)=>{"use strict";var yp=Qa(),es=Jr(),rs;try{rs=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!="object"||!("code"in e)||e.code!=="ERR_PROTO_ACCESS")throw e}var tn=!!rs&&es&&es(Object.prototype,"__proto__"),ns=Object,ts=ns.getPrototypeOf;os.exports=tn&&typeof tn.get=="function"?yp([tn.get]):typeof ts=="function"?o(function(t){return ts(t==null?t:ns(t))},"getDunder"):!1});var ls=E((dz,cs)=>{"use strict";var as=Yr(),ss=Qr(),us=is();cs.exports=as?o(function(t){return as(t)},"getProto"):ss?o(function(t){if(!t||typeof t!="object"&&typeof t!="function")throw new TypeError("getProto: not an object");return ss(t)},"getProto"):us?o(function(t){return us(t)},"getProto"):null});var rn=E((fz,ps)=>{"use strict";var hp=Function.prototype.call,vp=Object.prototype.hasOwnProperty,xp=Ve();ps.exports=xp.call(hp,vp)});var vs=E((gz,hs)=>{"use strict";var M,_p=Kr(),Pp=na(),bp=ia(),Tp=sa(),Ip=ca(),qe=pa(),Ge=Kt(),Ep=fa(),$p=ya(),Sp=va(),Ap=_a(),zp=ba(),kp=Ia(),wp=$a(),Op=ka(),gs=Function,nn=o(function(e){try{return gs('"use strict"; return ('+e+").constructor;")()}catch{}},"getEvalledConstructor"),vt=Jr(),Rp=Da(),on=o(function(){throw new Ge},"throwTypeError"),Np=vt?function(){try{return arguments.callee,on}catch{try{return vt(arguments,"callee").get}catch{return on}}}():on,He=ja()(),Y=ls(),Dp=Qr(),Cp=Yr(),ys=en(),xt=Yt(),We={},Up=typeof Uint8Array>"u"||!Y?M:Y(Uint8Array),we={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?M:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?M:ArrayBuffer,"%ArrayIteratorPrototype%":He&&Y?Y([][Symbol.iterator]()):M,"%AsyncFromSyncIteratorPrototype%":M,"%AsyncFunction%":We,"%AsyncGenerator%":We,"%AsyncGeneratorFunction%":We,"%AsyncIteratorPrototype%":We,"%Atomics%":typeof Atomics>"u"?M:Atomics,"%BigInt%":typeof BigInt>"u"?M:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?M:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?M:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?M:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Pp,"%eval%":eval,"%EvalError%":bp,"%Float16Array%":typeof Float16Array>"u"?M:Float16Array,"%Float32Array%":typeof Float32Array>"u"?M:Float32Array,"%Float64Array%":typeof Float64Array>"u"?M:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?M:FinalizationRegistry,"%Function%":gs,"%GeneratorFunction%":We,"%Int8Array%":typeof Int8Array>"u"?M:Int8Array,"%Int16Array%":typeof Int16Array>"u"?M:Int16Array,"%Int32Array%":typeof Int32Array>"u"?M:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":He&&Y?Y(Y([][Symbol.iterator]())):M,"%JSON%":typeof JSON=="object"?JSON:M,"%Map%":typeof Map>"u"?M:Map,"%MapIteratorPrototype%":typeof Map>"u"||!He||!Y?M:Y(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":_p,"%Object.getOwnPropertyDescriptor%":vt,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?M:Promise,"%Proxy%":typeof Proxy>"u"?M:Proxy,"%RangeError%":Tp,"%ReferenceError%":Ip,"%Reflect%":typeof Reflect>"u"?M:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?M:Set,"%SetIteratorPrototype%":typeof Set>"u"||!He||!Y?M:Y(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?M:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":He&&Y?Y(""[Symbol.iterator]()):M,"%Symbol%":He?Symbol:M,"%SyntaxError%":qe,"%ThrowTypeError%":Np,"%TypedArray%":Up,"%TypeError%":Ge,"%Uint8Array%":typeof Uint8Array>"u"?M:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?M:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?M:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?M:Uint32Array,"%URIError%":Ep,"%WeakMap%":typeof WeakMap>"u"?M:WeakMap,"%WeakRef%":typeof WeakRef>"u"?M:WeakRef,"%WeakSet%":typeof WeakSet>"u"?M:WeakSet,"%Function.prototype.call%":xt,"%Function.prototype.apply%":ys,"%Object.defineProperty%":Rp,"%Object.getPrototypeOf%":Dp,"%Math.abs%":$p,"%Math.floor%":Sp,"%Math.max%":Ap,"%Math.min%":zp,"%Math.pow%":kp,"%Math.round%":wp,"%Math.sign%":Op,"%Reflect.getPrototypeOf%":Cp};if(Y)try{null.error}catch(e){ds=Y(Y(e)),we["%Error.prototype%"]=ds}var ds,Mp=o(function e(t){var r;if(t==="%AsyncFunction%")r=nn("async function () {}");else if(t==="%GeneratorFunction%")r=nn("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=nn("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 we[t]=r,r},"doEval"),ms={__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"]},_t=Ve(),Qt=rn(),jp=_t.call(xt,Array.prototype.concat),Lp=_t.call(ys,Array.prototype.splice),fs=_t.call(xt,String.prototype.replace),er=_t.call(xt,String.prototype.slice),Fp=_t.call(xt,RegExp.prototype.exec),Bp=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Zp=/\\(\\)?/g,Vp=o(function(t){var r=er(t,0,1),n=er(t,-1);if(r==="%"&&n!=="%")throw new qe("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new qe("invalid intrinsic syntax, expected opening `%`");var i=[];return fs(t,Bp,function(u,c,p,g){i[i.length]=p?fs(g,Zp,"$1"):c||u}),i},"stringToPath"),Hp=o(function(t,r){var n=t,i;if(Qt(ms,n)&&(i=ms[n],n="%"+i[0]+"%"),Qt(we,n)){var u=we[n];if(u===We&&(u=Mp(n)),typeof u>"u"&&!r)throw new Ge("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:u}}throw new qe("intrinsic "+t+" does not exist!")},"getBaseIntrinsic");hs.exports=o(function(t,r){if(typeof t!="string"||t.length===0)throw new Ge("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new Ge('"allowMissing" argument must be a boolean');if(Fp(/^%?[^%]*%?$/,t)===null)throw new qe("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=Vp(t),i=n.length>0?n[0]:"",u=Hp("%"+i+"%",r),c=u.name,p=u.value,g=!1,f=u.alias;f&&(i=f[0],Lp(n,jp([0,1],f)));for(var _=1,$=!0;_<n.length;_+=1){var x=n[_],s=er(x,0,1),d=er(x,-1);if((s==='"'||s==="'"||s==="`"||d==='"'||d==="'"||d==="`")&&s!==d)throw new qe("property names with quotes must have matching quotes");if((x==="constructor"||!$)&&(g=!0),i+="."+x,c="%"+i+"%",Qt(we,c))p=we[c];else if(p!=null){if(!(x in p)){if(!r)throw new Ge("base intrinsic for "+t+" exists, but the property is not available.");return}if(vt&&_+1>=n.length){var y=vt(p,x);$=!!y,$&&"get"in y&&!("originalValue"in y.get)?p=y.get:p=p[x]}else $=Qt(p,x),p=p[x];$&&!g&&(we[c]=p)}}return p},"GetIntrinsic")});var _s=E((hz,xs)=>{"use strict";var Wp=Xr();xs.exports=o(function(){return Wp()&&!!Symbol.toStringTag},"hasToStringTagShams")});var Ts=E((xz,bs)=>{"use strict";var Gp=vs(),Ps=Gp("%Object.defineProperty%",!0),qp=_s()(),Kp=rn(),Jp=Kt(),tr=qp?Symbol.toStringTag:null;bs.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 Jp("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");tr&&(n||!Kp(t,tr))&&(Ps?Ps(t,tr,{configurable:!i,enumerable:!1,value:r,writable:!1}):t[tr]=r)},"setToStringTag")});var Es=E((Pz,Is)=>{"use strict";var Xp=Function.prototype.call,Yp=Object.prototype.hasOwnProperty,Qp=Ve();Is.exports=Qp.call(Xp,Yp)});var Ss=E((bz,$s)=>{"use strict";$s.exports=function(e,t){return Object.keys(t).forEach(function(r){e[r]=e[r]||t[r]}),e}});var ks=E((Tz,zs)=>{"use strict";var cn=Oi(),ed=require("util"),an=require("path"),td=require("http"),rd=require("https"),nd=require("url").parse,od=require("fs"),id=require("stream").Stream,ad=require("crypto"),sn=Ui(),sd=ea(),ud=Ts(),$e=Es(),un=Ss();function As(e){return String(e).replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/"/g,"%22")}o(As,"escapeHeaderParam");function L(e){if(!(this instanceof L))return new L(e);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],cn.call(this),e=e||{};for(var t in e)this[t]=e[t]}o(L,"FormData");ed.inherits(L,cn);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=cn.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&&$e(t,"httpVersion"))&&!(t instanceof id))&&(r.knownLength||this._valuesToMeasure.push(t))};L.prototype._lengthRetriever=function(e,t){$e(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)}):$e(e,"httpVersion")?t(null,Number(e.headers["content-length"])):$e(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="'+As(e)+'"'].concat(n||[]),"Content-Type":[].concat(i||[])};typeof r.header=="object"&&un(c,r.header);var p;for(var g in c)if($e(c,g)){if(p=c[g],p==null)continue;Array.isArray(p)||(p=[p]),p.length&&(u+=g+": "+p.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=an.normalize(t.filepath).replace(/\\/g,"/"):t.filename||e&&(e.name||e.path)?r=an.basename(t.filename||e&&(e.name||e.path)):e&&e.readable&&$e(e,"httpVersion")&&(r=an.basename(e.client._httpMessage.path||"")),r)return'filename="'+As(r)+'"'};L.prototype._getContentType=function(e,t){var r=t.contentType;return!r&&e&&e.name&&(r=sn.lookup(e.name)),!r&&e&&e.path&&(r=sn.lookup(e.path)),!r&&e&&e.readable&&$e(e,"httpVersion")&&(r=e.headers["content-type"]),!r&&(t.filepath||t.filename)&&(r=sn.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)$e(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=un({port:e.port,path:e.pathname,host:e.hostname,protocol:e.protocol},i)):(n=un(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 p,g=o(function(f,_){return r.removeListener("error",g),r.removeListener("response",p),t.call(this,f,_)},"callback");p=g.bind(this,null),r.on("error",g),r.on("response",p)}}.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");zs.exports=L});var Ed={};mn(Ed,{feedhive:()=>Id,feedhiveAuth:()=>V});module.exports=qs(Ed);var Ks=Object.freeze({status:"aborted"});function b(e,t,r){function n(p,g){if(p._zod||Object.defineProperty(p,"_zod",{value:{def:g,constr:c,traits:new Set},enumerable:!1}),p._zod.traits.has(e))return;p._zod.traits.add(e),t(p,g);let f=c.prototype,_=Object.keys(f);for(let $=0;$<_.length;$++){let x=_[$];x in p||(p[x]=f[x].bind(p))}}o(n,"init");let i=r?.Parent??Object;class u extends i{static{o(this,"Definition")}}Object.defineProperty(u,"name",{value:e});function c(p){var g;let f=r?.Parent?new u:this;n(f,p),(g=f._zod).deferred??(g.deferred=[]);for(let _ of f._zod.deferred)_();return f}return o(c,"_"),Object.defineProperty(c,"init",{value:n}),Object.defineProperty(c,Symbol.hasInstance,{value:o(p=>r?.Parent&&p instanceof r.Parent?!0:p?._zod?.traits?.has(e),"value")}),Object.defineProperty(c,"name",{value:e}),c}o(b,"$constructor");var Js=Symbol("zod_brand"),le=class extends Error{static{o(this,"$ZodAsyncError")}constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},bt=class extends Error{static{o(this,"$ZodEncodeError")}constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}},or={};function me(e){return e&&Object.assign(or,e),or}o(me,"config");function ar(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(ar,"getEnumValues");function yn(e,t){return typeof t=="bigint"?t.toString():t}o(yn,"jsonStringifyReplacer");function It(e){return{get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}o(It,"cached");function hn(e){return e==null}o(hn,"nullish");function Et(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}o(Et,"cleanRegex");var gn=Symbol("evaluating");function J(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==gn)return n===void 0&&(n=gn,n=r()),n},set(i){Object.defineProperty(e,t,{value:i})},configurable:!0})}o(J,"defineLazy");var sr="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Xe(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}o(Xe,"isObject");var Xs=It(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function vn(e){if(Xe(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let r=t.prototype;return!(Xe(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}o(vn,"isPlainObject");var xn=new Set(["string","number","symbol"]);function Re(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}o(Re,"escapeRegex");function $t(e,t,r){let n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}o($t,"clone");function W(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(W,"normalizeParams");function _n(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}o(_n,"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 Ne(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(Ne,"aborted");function _e(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}o(_e,"prefixIssues");function Tt(e){return typeof e=="string"?e:e?.message}o(Tt,"unwrapMessage");function Pe(e,t,r){let n={...e,path:e.path??[]};if(!e.message){let i=Tt(e.inst?._zod.def?.error?.(e))??Tt(t?.error?.(e))??Tt(r.customError?.(e))??Tt(r.localeError?.(e))??"Invalid input";n.message=i}return delete n.inst,delete n.continue,t?.reportInput||delete n.input,n}o(Pe,"finalizeIssue");function Pn(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}o(Pn,"getLengthableOrigin");function ur(...e){let[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}o(ur,"issue");var bn=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,yn,2),Object.defineProperty(e,"toString",{value:o(()=>e.message,"value"),enumerable:!1})},"initializer"),Tn=b("$ZodError",bn),Ye=b("$ZodError",bn,{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 le;if(c.issues.length){let p=new(i?.Err??e)(c.issues.map(g=>Pe(g,u,me())));throw sr(p,i?.callee),p}return c.value},"_parse"),St=eu(Ye),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 p=new(i?.Err??e)(c.issues.map(g=>Pe(g,u,me())));throw sr(p,i?.callee),p}return c.value},"_parseAsync"),At=tu(Ye),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 le;return u.issues.length?{success:!1,error:new(e??Tn)(u.issues.map(c=>Pe(c,i,me())))}:{success:!0,data:u.value}},"_safeParse"),Qe=ru(Ye),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=>Pe(c,i,me())))}:{success:!0,data:u.value}},"_safeParseAsync"),et=nu(Ye);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 In=o(e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},"string"),En=/^-?\d+n?$/;var cr=/^-?\d+(?:\.\d+)?$/,$n=/^(?:true|false)$/i;var De=b("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])});var Sn=b("$ZodCheckMinLength",(e,t)=>{var r;De.init(e,t),(r=e._zod.def).when??(r.when=n=>{let i=n.value;return!hn(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=Pn(i);n.issues.push({origin:c,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}});var lr=b("$ZodCheckStringFormat",(e,t)=>{var r,n;De.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=()=>{})}),An=b("$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 kn={major:4,minor:3,patch:6};var G=b("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=kn;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,p,g)=>{let f=Ne(c),_;for(let $ of p){if($._zod.def.when){if(!$._zod.def.when(c))continue}else if(f)continue;let x=c.issues.length,s=$._zod.check(c);if(s instanceof Promise&&g?.async===!1)throw new le;if(_||s instanceof Promise)_=(_??Promise.resolve()).then(async()=>{await s,c.issues.length!==x&&(f||(f=Ne(c,x)))});else{if(c.issues.length===x)continue;f||(f=Ne(c,x))}}return _?_.then(()=>c):c},"runChecks"),u=o((c,p,g)=>{if(Ne(c))return c.aborted=!0,c;let f=i(p,n,g);if(f instanceof Promise){if(g.async===!1)throw new le;return f.then(_=>e._zod.parse(_,g))}return e._zod.parse(f,g)},"handleCanaryResult");e._zod.run=(c,p)=>{if(p.skipChecks)return e._zod.parse(c,p);if(p.direction==="backward"){let f=e._zod.parse({value:c.value,issues:[]},{...p,skipChecks:!0});return f instanceof Promise?f.then(_=>u(_,c,p)):u(f,c,p)}let g=e._zod.parse(c,p);if(g instanceof Promise){if(p.async===!1)throw new le;return g.then(f=>i(f,n,p))}return i(g,n,p)}}J(e,"~standard",()=>({validate:o(i=>{try{let u=Qe(e,i);return u.success?{value:u.data}:{issues:u.error?.issues}}catch{return et(e,i).then(c=>c.success?{value:c.data}:{issues:c.error?.issues})}},"validate"),vendor:"zod",version:1}))}),wt=b("$ZodString",(e,t)=>{G.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??In(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}}),pr=b("$ZodStringFormat",(e,t)=>{lr.init(e,t),wt.init(e,t)});var Dn=b("$ZodURL",(e,t)=>{pr.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 Cn=b("$ZodNumber",(e,t)=>{G.init(e,t),e._zod.pattern=e._zod.bag.pattern??cr,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 dr=b("$ZodBoolean",(e,t)=>{G.init(e,t),e._zod.pattern=$n,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}}),Un=b("$ZodBigInt",(e,t)=>{G.init(e,t),e._zod.pattern=En,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 Mn=b("$ZodAny",(e,t)=>{G.init(e,t),e._zod.parse=r=>r}),jn=b("$ZodUnknown",(e,t)=>{G.init(e,t),e._zod.parse=r=>r});var Ln=b("$ZodVoid",(e,t)=>{G.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}}),Fn=b("$ZodDate",(e,t)=>{G.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 wn(e,t,r){e.issues.length&&t.issues.push(..._e(r,e.issues)),t.value[r]=e.value}o(wn,"handleArrayResult");var Bn=b("$ZodArray",(e,t)=>{G.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 p=i[c],g=t.element._zod.run({value:p,issues:[]},n);g instanceof Promise?u.push(g.then(f=>wn(f,r,c))):wn(g,r,c)}return u.length?Promise.all(u).then(()=>r):r}});function kt(e,t,r,n,i){if(e.issues.length){if(i&&!(r in n))return;t.issues.push(..._e(r,e.issues))}e.value===void 0?r in n&&(t.value[r]=void 0):t.value[r]=e.value}o(kt,"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=_n(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=[],p=i.keySet,g=i.catchall._zod,f=g.def.type,_=g.optout==="optional";for(let $ in t){if(p.has($))continue;if(f==="never"){c.push($);continue}let x=g.run({value:t[$],issues:[]},n);x instanceof Promise?e.push(x.then(s=>kt(s,r,$,t,_))):kt(x,r,$,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 Zn=b("$ZodObject",(e,t)=>{if(G.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let p=t.shape;Object.defineProperty(t,"shape",{get:o(()=>{let g={...p};return Object.defineProperty(t,"shape",{value:g}),g},"get")})}let n=It(()=>au(t));J(e._zod,"propValues",()=>{let p=t.shape,g={};for(let f in p){let _=p[f]._zod;if(_.values){g[f]??(g[f]=new Set);for(let $ of _.values)g[f].add($)}}return g});let i=Xe,u=t.catchall,c;e._zod.parse=(p,g)=>{c??(c=n.value);let f=p.value;if(!i(f))return p.issues.push({expected:"object",code:"invalid_type",input:f,inst:e}),p;p.value={};let _=[],$=c.shape;for(let x of c.keys){let s=$[x],d=s._zod.optout==="optional",y=s._zod.run({value:f[x],issues:[]},g);y instanceof Promise?_.push(y.then(m=>kt(m,p,x,f,d))):kt(y,p,x,f,d)}return u?su(_,f,p,g,n.value,e):_.length?Promise.all(_).then(()=>p):p}});function On(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=>!Ne(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=>Pe(c,n,me())))}),t)}o(On,"handleUnionResults");var mr=b("$ZodUnion",(e,t)=>{G.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=>Et(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,p=[];for(let g of t.options){let f=g._zod.run({value:i.value,issues:[]},u);if(f instanceof Promise)p.push(f),c=!0;else{if(f.issues.length===0)return f;p.push(f)}}return c?Promise.all(p).then(g=>On(g,i,e,u)):On(p,i,e,u)}});var Vn=b("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,mr.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[p,g]of Object.entries(c)){i[p]||(i[p]=new Set);for(let f of g)i[p].add(f)}}return i});let n=It(()=>{let i=t.options,u=new Map;for(let c of i){let p=c._zod.propValues?.[t.discriminator];if(!p||p.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(c)}"`);for(let g of p){if(u.has(g))throw new Error(`Duplicate discriminator value "${String(g)}"`);u.set(g,c)}}return u});e._zod.parse=(i,u)=>{let c=i.value;if(!Xe(c))return i.issues.push({code:"invalid_type",expected:"object",input:c,inst:e}),i;let p=n.value.get(c?.[t.discriminator]);return p?p._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 Hn=b("$ZodRecord",(e,t)=>{G.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;if(!vn(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 p=new Set;for(let f of c)if(typeof f=="string"||typeof f=="number"||typeof f=="symbol"){p.add(typeof f=="number"?f.toString():f);let _=t.valueType._zod.run({value:i[f],issues:[]},n);_ instanceof Promise?u.push(_.then($=>{$.issues.length&&r.issues.push(..._e(f,$.issues)),r.value[f]=$.value})):(_.issues.length&&r.issues.push(..._e(f,_.issues)),r.value[f]=_.value)}let g;for(let f in i)p.has(f)||(g=g??[],g.push(f));g&&g.length>0&&r.issues.push({code:"unrecognized_keys",input:i,inst:e,keys:g})}else{r.value={};for(let p of Reflect.ownKeys(i)){if(p==="__proto__")continue;let g=t.keyType._zod.run({value:p,issues:[]},n);if(g instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof p=="string"&&cr.test(p)&&g.issues.length){let $=t.keyType._zod.run({value:Number(p),issues:[]},n);if($ instanceof Promise)throw new Error("Async schemas not supported in object keys currently");$.issues.length===0&&(g=$)}if(g.issues.length){t.mode==="loose"?r.value[p]=i[p]:r.issues.push({code:"invalid_key",origin:"record",issues:g.issues.map($=>Pe($,n,me())),input:p,path:[p],inst:e});continue}let _=t.valueType._zod.run({value:i[p],issues:[]},n);_ instanceof Promise?u.push(_.then($=>{$.issues.length&&r.issues.push(..._e(p,$.issues)),r.value[g.value]=$.value})):(_.issues.length&&r.issues.push(..._e(p,_.issues)),r.value[g.value]=_.value)}}return u.length?Promise.all(u).then(()=>r):r}});var Wn=b("$ZodEnum",(e,t)=>{G.init(e,t);let r=ar(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(i=>xn.has(typeof i)).map(i=>typeof i=="string"?Re(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}}),Gn=b("$ZodLiteral",(e,t)=>{if(G.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"?Re(n):n?Re(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 qn=b("$ZodTransform",(e,t)=>{G.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new bt(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 Rn(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}o(Rn,"handleOptionalResult");var Kn=b("$ZodOptional",(e,t)=>{G.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(`^(${Et(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=>Rn(u,r.value)):Rn(i,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,n)}});var Jn=b("$ZodNullable",(e,t)=>{G.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(`^(${Et(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 Xn=b("$ZodPipe",(e,t)=>{G.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=>zt(c,t.in,n)):zt(u,t.in,n)}let i=t.in._zod.run(r,n);return i instanceof Promise?i.then(u=>zt(u,t.out,n)):zt(i,t.out,n)}});function zt(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}o(zt,"handlePipeResult");var Yn=b("$ZodCustom",(e,t)=>{De.init(e,t),G.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=>Nn(u,r,n,e));Nn(i,r,n,e)}});function Nn(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(ur(i))}}o(Nn,"handleRefineResult");var eo,pu=Symbol("ZodOutput"),du=Symbol("ZodInput"),fr=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 to(){return new fr}o(to,"registry");(eo=globalThis).__zod_globalRegistry??(eo.__zod_globalRegistry=to());var gr=globalThis.__zod_globalRegistry;function ro(e,t){return new e({type:"string",...W(t)})}o(ro,"_string");function no(e,t){return new e({type:"string",coerce:!0,...W(t)})}o(no,"_coercedString");function oo(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...W(t)})}o(oo,"_url");function io(e,t){return new e({type:"number",checks:[],...W(t)})}o(io,"_number");function ao(e,t){return new e({type:"number",coerce:!0,checks:[],...W(t)})}o(ao,"_coercedNumber");function so(e,t){return new e({type:"boolean",...W(t)})}o(so,"_boolean");function uo(e,t){return new e({type:"boolean",coerce:!0,...W(t)})}o(uo,"_coercedBoolean");function co(e,t){return new e({type:"bigint",coerce:!0,...W(t)})}o(co,"_coercedBigint");function lo(e){return new e({type:"any"})}o(lo,"_any");function po(e){return new e({type:"unknown"})}o(po,"_unknown");function mo(e,t){return new e({type:"void",...W(t)})}o(mo,"_void");function fo(e,t){return new e({type:"date",coerce:!0,...W(t)})}o(fo,"_coercedDate");function se(e,t){return new Sn({check:"min_length",...W(t),minimum:e})}o(se,"_minLength");function be(e,t){return new An({check:"string_format",format:"regex",...W(t),pattern:e})}o(be,"_regex");function go(e,t,r){let n=W(r);return n.abort??(n.abort=!0),new e({type:"custom",check:"custom",fn:t,...n})}o(go,"_custom");var X=b("ZodMiniType",(e,t)=>{if(!e._zod)throw new Error("Uninitialized schema in ZodMiniType.");G.init(e,t),e.def=t,e.type=t.type,e.parse=(r,n)=>St(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>Qe(e,r,n),e.parseAsync=async(r,n)=>At(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>et(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)=>$t(e,r,n),e.brand=()=>e,e.register=(r,n)=>(r.add(e,n),e),e.apply=r=>r(e)}),Rt=b("ZodMiniString",(e,t)=>{wt.init(e,t),X.init(e,t)});function a(e){return ro(Rt,e)}o(a,"string");var yo=b("ZodMiniStringFormat",(e,t)=>{pr.init(e,t),Rt.init(e,t)});var bu=b("ZodMiniURL",(e,t)=>{Dn.init(e,t),yo.init(e,t)});function ho(e){return oo(bu,e)}o(ho,"url");var yr=b("ZodMiniNumber",(e,t)=>{Cn.init(e,t),X.init(e,t)});function ee(e){return io(yr,e)}o(ee,"number");var hr=b("ZodMiniBoolean",(e,t)=>{dr.init(e,t),X.init(e,t)});function Z(e){return so(hr,e)}o(Z,"boolean");var vo=b("ZodMiniBigInt",(e,t)=>{Un.init(e,t),X.init(e,t)});var Tu=b("ZodMiniAny",(e,t)=>{Mn.init(e,t),X.init(e,t)});function rt(){return lo(Tu)}o(rt,"any");var Iu=b("ZodMiniUnknown",(e,t)=>{jn.init(e,t),X.init(e,t)});function w(){return po(Iu)}o(w,"unknown");var Eu=b("ZodMiniVoid",(e,t)=>{Ln.init(e,t),X.init(e,t)});function xo(e){return mo(Eu,e)}o(xo,"_void");var _o=b("ZodMiniDate",(e,t)=>{Fn.init(e,t),X.init(e,t)});var $u=b("ZodMiniArray",(e,t)=>{Bn.init(e,t),X.init(e,t)});function N(e,t){return new $u({type:"array",element:e,...W(t)})}o(N,"array");var Su=b("ZodMiniObject",(e,t)=>{Zn.init(e,t),X.init(e,t),J(e,"shape",()=>t.shape)});function l(e,t){let r={type:"object",shape:e??{},...W(t)};return new Su(r)}o(l,"object");var Au=b("ZodMiniUnion",(e,t)=>{mr.init(e,t),X.init(e,t)});function D(e,t){return new Au({type:"union",options:e,...W(t)})}o(D,"union");var zu=b("ZodMiniDiscriminatedUnion",(e,t)=>{Vn.init(e,t),X.init(e,t)});function Ce(e,t,r){return new zu({type:"union",options:t,discriminator:e,...W(r)})}o(Ce,"discriminatedUnion");var ku=b("ZodMiniRecord",(e,t)=>{Hn.init(e,t),X.init(e,t)});function O(e,t,r){return new ku({type:"record",keyType:e,valueType:t,...W(r)})}o(O,"record");var wu=b("ZodMiniEnum",(e,t)=>{Wn.init(e,t),X.init(e,t),e.options=Object.values(t.entries)});function U(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new wu({type:"enum",entries:r,...W(t)})}o(U,"_enum");var Ou=b("ZodMiniLiteral",(e,t)=>{Gn.init(e,t),X.init(e,t)});function S(e,t){return new Ou({type:"literal",values:Array.isArray(e)?e:[e],...W(t)})}o(S,"literal");var Ru=b("ZodMiniTransform",(e,t)=>{qn.init(e,t),X.init(e,t)});function Te(e){return new Ru({type:"transform",transform:e})}o(Te,"transform");var Nu=b("ZodMiniOptional",(e,t)=>{Kn.init(e,t),X.init(e,t)});function h(e){return new Nu({type:"optional",innerType:e})}o(h,"optional");var Du=b("ZodMiniNullable",(e,t)=>{Jn.init(e,t),X.init(e,t)});function nt(e){return new Du({type:"nullable",innerType:e})}o(nt,"nullable");var Cu=b("ZodMiniPipe",(e,t)=>{Xn.init(e,t),X.init(e,t)});function Ie(e,t){return new Cu({type:"pipe",in:e,out:t})}o(Ie,"pipe");var Uu=b("ZodMiniCustom",(e,t)=>{Yn.init(e,t),X.init(e,t)});function Nt(e,t){return go(Uu,e??(()=>!0),t)}o(Nt,"custom");var ot={};mn(ot,{bigint:()=>Vu,boolean:()=>Zu,date:()=>Hu,number:()=>Bu,string:()=>Fu});function Fu(e){return no(Rt,e)}o(Fu,"string");function Bu(e){return ao(yr,e)}o(Bu,"number");function Zu(e){return uo(hr,e)}o(Zu,"boolean");function Vu(e){return co(vo,e)}o(Vu,"bigint");function Hu(e){return fo(_o,e)}o(Hu,"date");var xr=l({retryOnFailure:l({defaultValue:h(Z()),hide:h(Z())}),continueOnFailure:l({defaultValue:h(Z()),hide:h(Z())})}),vr=class{constructor(t,r,n,i,u,c,p,g,f,_,$){this.name=t;this.displayName=r;this.description=n;this.props=i;this.run=u;this.test=c;this.requireAuth=p;this.errorHandlingOptions=g;this.outputSchema=f;this.audience=_;this.aiMetadata=$}static{o(this,"IAction")}},Q=o(e=>new vr(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=l({displayName:a(),description:h(a())}),C=o((e,t)=>l({type:S(t),required:Z(),defaultValue:h(rt())}),"TPropertyValue");var ne=l({...F.shape,...C(a(),"SHORT_TEXT").shape}),fe=l({...F.shape,...C(a(),"LONG_TEXT").shape});var bo=l({label:a(),value:w()}),Dt=l({disabled:h(Z()),placeholder:h(a()),options:N(bo)});var oe=l({...F.shape,options:Dt,...C(w(),"STATIC_DROPDOWN").shape}),ge=l({...F.shape,options:Dt,...C(N(w()),"STATIC_MULTI_SELECT_DROPDOWN").shape});var _r=l({...F.shape,...C(w(),"DROPDOWN").shape,refreshers:N(a())}),it=l({...F.shape,...C(N(w()),"MULTI_SELECT_DROPDOWN").shape,refreshers:N(a())});var ye=l({...F.shape,...C(Z(),"CHECKBOX").shape});var he=l({...F.shape,...C(ee(),"NUMBER").shape});var at=l({...F.shape,...C(w(),"FILE").shape});var st=l({...F.shape,...C(a(),"DATE_TIME").shape});var To=O(a(),D([ne,fe,oe,it,ge,ye,he,at,st])),ut=l({...F.shape,properties:To,...C(N(w()),"ARRAY").shape});var ct=l({...F.shape,...C(D([O(a(),w())]),"JSON").shape});var Io=D([ne,oe,ct,ut,ge]),Gu=O(a(),Io),Pr=l({refreshers:N(a()),...F.shape,...C(w(),"DYNAMIC").shape});var Ct=l({...F.shape,...C(xo(),"MARKDOWN").shape});var lt=(r=>(r.ARCHIVE="ARCHIVE",r.REGISTRY="REGISTRY",r))(lt||{}),Ue=(r=>(r.CUSTOM="CUSTOM",r.OFFICIAL="OFFICIAL",r))(Ue||{}),Me=(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))(Me||{});var pt=(r=>(r.AUTHORIZATION_CODE="authorization_code",r.CLIENT_CREDENTIALS="client_credentials",r))(pt||{}),br="both_client_credentials_and_authorization_code";var ve=(i=>(i.POLLING="POLLING",i.WEBHOOK="WEBHOOK",i.APP_WEBHOOK="APP_WEBHOOK",i.MANUAL="MANUAL",i))(ve||{}),dt=(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))(dt||{}),qu=l({strategy:U(dt),paramName:h(a())}),mt=(r=>(r.SIMULATION="SIMULATION",r.TEST_FUNCTION="TEST_FUNCTION",r))(mt||{});var Ut=(r=>(r.WEBSOCKET="WEBSOCKET",r.NONE="NONE",r))(Ut||{}),Eo=l({status:h(ee()),body:h(w()),headers:h(O(a(),a()))}),$o=l({type:S("DELAY"),resumeDateTime:a(),requestIdToReply:h(a()),handlerId:h(a()),streamStepProgress:h(U(Ut))}),So=l({type:S("WEBHOOK"),requestId:a(),requestIdToReply:h(a()),response:Eo,handlerId:h(a()),streamStepProgress:h(U(Ut))}),Ku=D([$o,So]);var Ju=l({body:w(),rawBody:h(w()),headers:O(a(),a()),queryParams:O(a(),a())});function ue(e){return e==null}o(ue,"isNil");function ft(e){return e==null?!0:typeof e=="string"||Array.isArray(e)?e.length===0:typeof e=="object"?Object.keys(e).length===0:!1}o(ft,"isEmpty");function Mt(e,t){if(e==null)throw new Error(`${t} is null or undefined`)}o(Mt,"assertNotNullOrUndefined");var Tr=Oe(require("crypto"),1);var Xu=128,Ae,je,Yu=o(e=>{!Ae||Ae.length<e?(Ae=Buffer.allocUnsafe(e*Xu),Tr.default.randomFillSync(Ae),je=0):je+e>Ae.length&&(Tr.default.randomFillSync(Ae),je=0),je+=e},"fillPool"),Qu=o(e=>(Yu(e|=0),Ae.subarray(je-e,je)),"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 p=r(i),g=i;for(;g--;)if(c+=e[p[g]&n]||"",c.length===u)return c}}},"customRandom"),zo=o((e,t=21)=>ec(e,t,Qu),"customAlphabet");var tc="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",ko=21,ub=a().check(be(new RegExp(`^[0-9a-zA-Z]{${ko}}$`))),rc=zo(tc,ko);var Ee=Ie(Te(e=>e instanceof Date?e.toISOString():e),a()),ie={id:a(),created:Ee,updated:Ee},H=o(e=>h(nt(e)),"Nullable");function Ir(e){return h(nt(U(e)))}o(Ir,"NullableEnum");var pb=Ie(Te(e=>e==="true"||e===!0?!0:e==="false"||e===!1?!1:void 0),h(Z())),jt=o(e=>Ie(Te(t=>Array.isArray(t)?t:t!==void 0?[t]:void 0),h(N(e))),"OptionalArrayFromQuery");var fb=O(a(),w());var gt=(_=>(_.OPENAI="openai",_.OPENROUTER="openrouter",_.ANTHROPIC="anthropic",_.AZURE="azure",_.GOOGLE="google",_.ACTIVEPIECES="activepieces",_.CLOUDFLARE_GATEWAY="cloudflare-gateway",_.CUSTOM="custom",_.BEDROCK="bedrock",_.MISTRAL="mistral",_))(gt||{});var $b=a().check(be(/^#[0-9A-Fa-f]{6}$/));var Ab=l({filename:a(),data:w(),type:S("file"),mimetype:h(a())});var nc=Oe(Oo());var Db=l({...ie,name:a(),permissions:N(a()),platformId:H(a()),type:a(),userCount:h(ee())});var Ro=(n=>(n.AGENT_DECIDE="agent-decide",n.CHOOSE_YOURSELF="choose-yourself",n.LEAVE_EMPTY="leave-empty",n))(Ro||{}),Er=(r=>(r.FILE="FILE",r.TABLE="TABLE",r))(Er||{}),$r=(n=>(n.SSE="sse",n.STREAMABLE_HTTP="streamable-http",n.SIMPLE_HTTP="http",n))($r||{});var Sr=(n=>(n.TEXT="text",n.NUMBER="number",n.BOOLEAN="boolean",n))(Sr||{});var Ar=(r=>(r.IN_PROGRESS="in-progress",r.COMPLETED="completed",r))(Ar||{});var oc=l({mode:U(Ro),value:w()}),ic=l({auth:h(a()),fields:O(a(),oc)}),ac=l({pieceName:a(),pieceVersion:a(),actionName:a(),predefinedInput:h(ic)}),sc=l({type:S("PIECE"),toolName:a().check(se(1)),pieceMetadata:ac}),uc=l({type:S("none")}),cc=l({type:S("access_token"),accessToken:a()}),lc=l({type:S("api_key"),apiKey:a(),apiKeyHeader:a()}),pc=l({type:S("headers"),headers:O(a(),a())}),dc=Ce("type",[uc,cc,lc,pc]),No=l({type:S("FLOW"),toolName:a().check(se(1)),externalFlowId:a(),flowDisplayName:h(a())}),Do=l({type:S("MCP"),toolName:a().check(se(1)),serverUrl:ho(),protocol:U($r),auth:dc}),Co=l({type:S("KNOWLEDGE_BASE"),toolName:a().check(se(1)),sourceType:U(Er),sourceId:a(),sourceName:a()}),mc=Ce("type",[sc,No,Do,Co]),fc=l({displayName:a(),description:h(a()),type:U(Sr)}),Uo=l({type:S("MARKDOWN"),markdown:a()}),Le={type:S("TOOL_CALL"),input:H(O(a(),w())),output:h(w()),toolName:a(),status:U(Ar),toolCallId:a(),startTime:a(),endTime:h(a())},uT=l(Le),Mo=Ce("toolCallType",[l({...Le,toolCallType:S("PIECE"),pieceName:a(),pieceVersion:a(),actionName:a()}),l({...Le,toolCallType:S("FLOW"),displayName:a(),externalFlowId:a()}),l({...Le,toolCallType:S("MCP"),displayName:a(),serverUrl:a()}),l({...Le,toolCallType:S("KNOWLEDGE_BASE"),displayName:a(),sourceType:a()}),l({...Le,toolCallType:S("UNKNOWN"),displayName:a()})]),gc=D([Uo,Mo]);var zr=(r=>(r.IMAGE="image",r.TEXT="text",r))(zr||{}),xe=l({apiKey:a()}),yc=xe,hc=l({apiKey:a(),apiKeyHash:a()}),vc=xe,xc=xe,_c=xe,Pc=xe,bc=xe,Tc=xe,Ic=xe,jo=l({accessKeyId:a().check(se(1)),secretAccessKey:a().check(se(1))}),Ec=l({}),$c=l({}),Sc=l({}),Ac=l({}),zc=l({}),kc=l({}),Lo=l({modelId:a(),modelName:a(),modelType:U(zr)}),Fo=l({apiKeyHeader:a(),baseUrl:a(),models:N(Lo),defaultHeaders:h(O(a(),a()))}),Bo=l({accountId:a(),gatewayId:a(),models:N(Lo),vertexProject:h(a()),vertexRegion:h(a())}),Zo=l({resourceName:a(),apiVersion:Ie(Te(e=>typeof e=="string"&&e.trim().length===0?void 0:e),h(a()))}),Vo=l({region:a().check(se(1))}),wc=D([yc,_c,Pc,bc,Tc,xc,vc,hc,jo,Ic]),Ho=D([Fo,Bo,Zo,Vo,Ec,Sc,Ac,zc,$c,kc]),Oc=l({id:a(),name:a(),type:U(zr)}),Rc=l({id:a(),name:a(),provider:U(gt),config:Ho,enabledForChat:Z()}),Nc=l({provider:U(gt),config:Ho,auth:wc,platformId:a()});var dT={openai:"openai",anthropic:"anthropic","google-ai-studio":"google","google-vertex-ai":"google"};var Dc=l({base64Url:a(),fileName:a(),extension:h(a())}),Cc=l({mimeType:a(),url:a(),fileName:h(a())}),kr=D([Dc,Cc]);var Uc=D([l({type:S("file"),value:kr}),l({type:S("markdown"),value:a(),files:h(N(kr))})]),Mc=l({sessionId:a(),message:a(),files:h(N(a()))});var Go=(r=>(r.ON_NEW_RECORD="ON_NEW_RECORD",r.ON_UPDATE_RECORD="ON_UPDATE_RECORD",r))(Go||{}),qo=(r=>(r.ENABLED="ENABLED",r.DISABLED="DISABLED",r))(qo||{}),wr=(n=>(n.RECORD_CREATED="RECORD_CREATED",n.RECORD_UPDATED="RECORD_UPDATED",n.RECORD_DELETED="RECORD_DELETED",n))(wr||{});var jc=D([l({...ie,name:a(),externalId:a(),type:S("STATIC_DROPDOWN"),tableId:a(),projectId:a(),data:l({options:N(l({value:a()}))})}),l({...ie,name:a(),externalId:a(),type:D([S("TEXT"),S("NUMBER"),S("DATE")]),tableId:a(),projectId:a()})]),Lc=l({...ie,name:a(),folderId:H(a()),projectId:a(),externalId:a(),status:Ir(qo),trigger:Ir(Go)}),Fc=l({...ie,tableId:a(),projectId:a(),cells:O(a(),l({updated:a(),created:a(),value:w(),fieldName:a()}))}),Bc=l({events:N(U(wr)),webhookUrl:a(),flowId:a()}),Zc=l({fields:N(l({id:a(),name:a()})),rows:N(O(a(),a())),name:a()}),Vc=l({projectId:a(),limit:h(ot.number()),cursor:h(a()),name:h(a()),externalIds:jt(a()),folderId:h(a()),folderIds:jt(a())}),Hc=l({records:N(N(l({fieldId:a(),value:Jo()}))),tableId:a()}),Wc=l({cells:h(N(l({fieldId:a(),value:Jo()}))),tableId:a(),agentUpdate:h(Z())}),Ko=Ce("operator",[ze("eq"),ze("neq"),ze("gt"),ze("gte"),ze("lt"),ze("lte"),ze("co"),Wo("exists"),Wo("not_exists")]),Gc=l({tableId:a(),limit:h(ot.number()),cursor:h(a()),filters:jt(Ko)});function Jo(){return Ie(Te(e=>e==null?e:String(e)),nt(a()))}o(Jo,"coerceToString");function ze(e){return l({fieldId:a(),operator:S(e),value:a()})}o(ze,"valueFilter");function Wo(e){return l({fieldId:a(),operator:S(e)})}o(Wo,"existenceFilter");var qc=l({status:h(ee()),body:h(w()),headers:h(O(a(),a()))}),Kc=l({...ie,deleted:H(Ee),ownerId:a(),displayName:a(),platformId:a(),externalId:H(a())});var Xo=l({name:a(),description:h(a()),type:a(),required:Z()}),Jc=l({pieceName:a(),triggerName:a(),input:l({toolName:a(),toolDescription:a(),inputSchema:N(Xo),returnsResponse:Z()})});var Yo="^[0-9]+\\.[0-9]+\\.[0-9]+$",wT=new RegExp(Yo),Yc="^([~^])?[0-9]+\\.[0-9]+\\.[0-9]+$",OT=a().check(be(new RegExp(Yo))),RT=a().check(be(new RegExp(Yc))),Qc=l({packageType:S("ARCHIVE"),pieceType:U(Ue),pieceName:a(),pieceVersion:a(),archiveId:a(),platformId:a()}),Qo=l({packageType:S("REGISTRY"),pieceType:S("OFFICIAL"),pieceName:a(),pieceVersion:a()}),ei=l({packageType:S("REGISTRY"),pieceType:S("CUSTOM"),pieceName:a(),pieceVersion:a(),platformId:a()}),NT=D([Qo,ei]),DT=D([Qc,Qo,ei]),ti=(t=>(t.CRON_EXPRESSION="CRON_EXPRESSION",t))(ti||{}),el=l({type:U(ti),cronExpression:a(),timezone:a()}),CT=l({...ie,type:U(ve),projectId:a(),flowId:a(),triggerName:a(),schedule:H(el),flowVersionId:a(),pieceName:a(),pieceVersion:a(),deleted:H(a()),simulate:Z()}),ri=(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))(ri||{}),ni=(r=>(r.NONE="NONE",r.ZSTD="ZSTD",r))(ni||{}),oi=(r=>(r.S3="S3",r.DB="DB",r))(oi||{}),UT=l({...ie,projectId:H(a()),platformId:H(a()),type:U(ri),compression:U(ni),data:h(w()),location:U(oi),size:H(ee()),fileName:H(a()),s3Key:H(a()),metadata:H(O(a(),a()))}),ii=(n=>(n.ADMIN="ADMIN",n.MEMBER="MEMBER",n.OPERATOR="OPERATOR",n))(ii||{}),ai=(r=>(r.ACTIVE="ACTIVE",r.INACTIVE="INACTIVE",r))(ai||{}),MT=l({id:a(),email:a(),firstName:a(),status:U(ai),externalId:H(a()),platformId:H(a()),platformRole:U(ii),lastName:a(),created:Ee,updated:Ee,lastActiveDate:H(Ee),imageUrl:H(a())});var Or=l({...F.shape,...C(O(a(),w()),"OBJECT").shape});var li=l({...F.shape,...C(a(),"COLOR").shape});var Rr=D([ne,fe,Ct,ye,oe,ge,_r,it,Pr,he,ut,Or,ct,st,at,li]),I={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 pe=l({displayName:a(),description:h(a())});var pi=l({username:a(),password:a()}),Nr=l({...pe.shape,username:l({displayName:a(),description:h(a())}),password:l({displayName:a(),description:h(a())}),...C(pi,"BASIC_AUTH").shape});var ol=O(a(),D([ne,fe,he,ye,oe])),Dr=l({...pe.shape,props:ol,...C(w(),"CUSTOM_AUTH").shape});var ke=l({...pe.shape,...C(l({auth:a()}),"SECRET_TEXT").shape});var il=O(a(),D([ne,fe,ke,he,ye,oe,ge,Ct])),di=l({...pe.shape,props:il,...C(w(),"OIDC").shape});var Cr=(r=>(r.HEADER="HEADER",r.BODY="BODY",r))(Cr||{}),mi=D([ne,ke,oe]),fi=O(a(),mi),al=l({props:h(O(a(),mi)),authUrl:a(),tokenUrl:a(),scope:N(a()),prompt:h(D([S("none"),S("consent"),S("login"),S("omit")])),pkce:h(Z()),pkceMethod:h(D([S("plain"),S("S256")])),authorizationMethod:h(U(Cr)),grantType:h(D([U(pt),S(br)])),extra:h(O(a(),a()))}),gi=l({access_token:a(),props:h(fi),data:O(a(),rt())}),Ur=l({...pe.shape,...al.shape,...C(gi,"OAUTH2").shape});var Fe=D([Nr,Dr,di,Ur,ke]),yt="Connection",Mr={SecretText(e){return{...e,valueSchema:void 0,type:"SECRET_TEXT"}},OAuth2(e){return{...e,valueSchema:void 0,type:"OAUTH2",displayName:e.displayName||yt}},BasicAuth(e){return{...e,valueSchema:void 0,type:"BASIC_AUTH",displayName:e.displayName||yt,required:!0}},CustomAuth(e){return{...e,valueSchema:void 0,type:"CUSTOM_AUTH",displayName:e.displayName||yt}},OIDC(e){return{...e,valueSchema:void 0,type:"OIDC",displayName:e.displayName||yt}},None(){}};var yE={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=l({...F.shape,...C(w(),"CUSTOM").shape,code:a()});var ul=D([Rr,Fe]),jr=O(a(),ul),CE=O(a(),Rr);var yi=D([l({strategy:S("CRON"),cronExpression:a()}),l({strategy:S("NONE")})]),Be=class{constructor(t,r,n,i,u,c,p,g,f,_,$,x,s,d,y,m,v,P,j){this.name=t;this.displayName=r;this.description=n;this.requireAuth=i;this.props=u;this.type=c;this.handshakeConfiguration=p;this.onHandshake=g;this.renewConfiguration=f;this.onRenew=_;this.onEnable=$;this.onDisable=x;this.onStart=s;this.run=d;this.test=y;this.sampleData=m;this.testStrategy=v;this.outputSchema=P;this.aiMetadata=j}static{o(this,"ITrigger")}},Ft=o(e=>{switch(e.type){case"WEBHOOK":return new Be(e.name,e.displayName,e.description,e.requireAuth??!0,e.props,e.type,e.handshakeConfiguration??{strategy:"NONE"},e.onHandshake??(async()=>({status:200})),e.renewConfiguration??{strategy:"NONE"},e.onRenew??(async()=>Promise.resolve()),e.onEnable,e.onDisable,e.onStart??(async()=>Promise.resolve()),e.run,e.test??(()=>Promise.resolve([e.sampleData])),e.sampleData,e.test?"TEST_FUNCTION":"SIMULATION",e.outputSchema,e.aiMetadata);case"POLLING":return new Be(e.name,e.displayName,e.description,e.requireAuth??!0,e.props,e.type,{strategy:"NONE"},async()=>({status:200}),{strategy:"NONE"},async()=>Promise.resolve(),e.onEnable,e.onDisable,e.onStart??(async()=>Promise.resolve()),e.run,e.test??(()=>Promise.resolve([e.sampleData])),e.sampleData,"TEST_FUNCTION",e.outputSchema,e.aiMetadata);case"MANUAL":return new Be(e.name,e.displayName,e.description,e.requireAuth??!0,e.props,e.type,{strategy:"NONE"},async()=>({status:200}),{strategy:"NONE"},async()=>Promise.resolve(),e.onEnable,e.onDisable,e.onStart??(async()=>Promise.resolve()),e.run,e.test??(()=>Promise.resolve([e.sampleData])),e.sampleData,"TEST_FUNCTION",e.outputSchema,e.aiMetadata);case"APP_WEBHOOK":return new Be(e.name,e.displayName,e.description,e.requireAuth??!0,e.props,e.type,{strategy:"NONE"},async()=>({status:200}),{strategy:"NONE"},async()=>Promise.resolve(),e.onEnable,e.onDisable,e.onStart??(async()=>Promise.resolve()),e.run,e.test??(()=>Promise.resolve([e.sampleData])),e.sampleData,ue(e.sampleData)&&ue(e.test)?"SIMULATION":"TEST_FUNCTION",e.outputSchema,e.aiMetadata)}},"createTrigger");var hi="2",Bt="0.82.0";var Lr=class{constructor(t,r,n,i,u,c,p,g,f=Bt,_,$=""){this.displayName=t;this.logoUrl=r;this.authors=n;this.events=i;this.categories=p;this.auth=g;this.minimumSupportedRelease=f;this.maximumSupportedRelease=_;this.description=$;this._actions={};this._triggers={};this.getContextInfo=o(()=>({version:hi}),"getContextInfo");(!cl(f)||ll(f,Bt))&&(this.minimumSupportedRelease=Bt),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}},vi=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 Lr(e.displayName,e.logoUrl,e.authors??[],e.events,e.actions,e.triggers,e.categories??[],e.auth,e.minimumSupportedRelease,e.maximumSupportedRelease,e.description)},"createPiece");function cl(e){return/^\d+\.\d+\.\d+$/.test(e)}o(cl,"isValidSimpleSemver");function ll(e,t){let[r,n,i]=e.split(".").map(Number),[u,c,p]=t.split(".").map(Number);return r!==u?r<u:n!==c?n<c:i<p}o(ll,"isSemverLessThan");var pl=h(O(a(),O(a(),a()))),xi=l({id:h(a()),name:a(),displayName:a(),logoUrl:a(),description:a(),authors:N(a()),platformId:h(a()),directoryPath:h(a()),auth:h(D([Fe,N(Fe)])),version:a(),categories:h(N(U(Me))),minimumSupportedRelease:h(a()),maximumSupportedRelease:h(a()),i18n:pl}),dl=U(["human","ai","both"]),_i=l({description:h(a()),idempotent:h(Z())}),Pi=l({name:a(),displayName:a(),description:a(),props:jr,requireAuth:Z(),errorHandlingOptions:h(xr),outputSchema:h(Nt()),audience:h(dl),aiMetadata:h(_i)}),bi=l({name:a(),displayName:a(),description:a(),props:jr,errorHandlingOptions:h(xr),type:U(ve),sampleData:w(),handshakeConfiguration:h(Nt()),renewConfiguration:h(yi),testStrategy:U(mt),outputSchema:h(Nt()),aiMetadata:h(_i)}),ml=l({...xi.shape,actions:O(a(),Pi),triggers:O(a(),bi)}),fl=l({...xi.shape,actions:ee(),triggers:ee(),suggestedActions:h(N(bi)),suggestedTriggers:h(N(Pi))}),Ti=l({projectUsage:ee(),tags:h(N(a())),pieceType:U(Ue),packageType:U(lt),platformId:h(a()),archiveId:h(a())}),C$=l({...ml.shape,...Ti.shape}),U$=l({...fl.shape,...Ti.shape}),M$=l({name:a(),version:a()});var gl=Oe(require("path")),yl=Oe(require("fs/promises"));var Zt=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 Vt=class{static{o(this,"DelegatingAuthenticationConverter")}constructor(t=new Fr,r=new Br){this.converters={BEARER_TOKEN:t,BASIC:r}}convert(t,r){return this.converters[t.type].convert(t,r)}},Fr=class{static{o(this,"BearerTokenAuthenticationConverter")}convert(t,r){return r.Authorization=`Bearer ${t.token}`,r}},Br=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 Ht=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 Wt=class extends Zt{static{o(this,"FetchHttpClient")}constructor(t="",r=new Vt){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[j,re]of Object.entries(c))i.append(j,re);let p=i.toString(),g=p?`${n}?${p}`:n,f=t.responseType??"json",_=t.followRedirects??!0,$=t.retries??0,{body:x,extraHeaders:s,isStream:d}=hl(t.body,u),y=xl({...u,...s}),m=await vl(async()=>{let j=new AbortController,re=t.timeout&&t.timeout>0?setTimeout(()=>j.abort(),t.timeout):void 0;try{let ae={method:t.method.toString(),headers:y,body:x,redirect:_?"follow":"manual",signal:j.signal};return d&&(ae.duplex="half"),r?.dispatcher!==void 0&&(ae.dispatcher=r.dispatcher),await fetch(g,ae)}finally{re!==void 0&&clearTimeout(re)}},$),v=_?300:400;if(m.status<200||m.status>=v){let j=await Ii(m,f),re=new Ht(t.body,{status:m.status,responseBody:j});throw console.error("[HttpClient#(sanitized error message)] Request failed:",re),re}let P=await Ii(m,f);return{status:m.status,headers:_l(m.headers),body:P}}};function hl(e,t){return bl(e)?{body:void 0,extraHeaders:{},isStream:!1}:Pl(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(hl,"serializeBody");async function Ii(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(Ii,"parseResponseBody");async function vl(e,t){let r;for(let n=0;n<=t;n++)try{let i=await e();if(i.status>=500&&n<t){await Ei(n);continue}return i}catch(i){if(r=i,n<t){await Ei(n);continue}throw i}throw r}o(vl,"sendWithRetries");function Ei(e){let t=Math.min(1e3*2**e,3e4);return new Promise(r=>setTimeout(r,t))}o(Ei,"backoff");function xl(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(xl,"normalizeHeaders");function _l(e){let t={};return e.forEach((r,n)=>{t[n]=r}),t}o(_l,"toHttpHeaders");function Pl(e){return typeof e=="object"&&e!==null&&typeof e.getHeaders=="function"&&typeof e.pipe=="function"}o(Pl,"isNodeFormData");function bl(e){return e==null}o(bl,"isNil");var Ze=new Wt;var ht=(c=>(c.GET="GET",c.POST="POST",c.PATCH="PATCH",c.PUT="PUT",c.DELETE="DELETE",c.HEAD="HEAD",c))(ht||{});var cd=Oe(require("fs")),ws=Oe(ks());var ld={"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 pd(e){let t=e.split(";")[0].trim().toLowerCase();return ld[t]??""}o(pd,"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 Os({auth:e,baseUrl:t,authMapping:r,description:n,displayName:i,name:u,props:c,extraProps:p,authLocation:g="headers"}){return Q({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:I.DynamicProperties({auth:e,displayName:"",required:!0,refreshers:[],props:o(async({auth:f})=>({url:I.ShortText({displayName:"URL",description:`You can either use the full URL or the relative path to the base URL
|
|
3
|
-
i.e ${
|
|
1
|
+
"use strict";var nu=Object.create;var Xe=Object.defineProperty;var ou=Object.getOwnPropertyDescriptor;var iu=Object.getOwnPropertyNames;var au=Object.getPrototypeOf,su=Object.prototype.hasOwnProperty;var o=(e,t)=>Xe(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}},yn=(e,t)=>{for(var r in t)Xe(e,r,{get:t[r],enumerable:!0})},hn=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of iu(t))!su.call(e,i)&&i!==r&&Xe(e,i,{get:()=>t[i],enumerable:!(n=ou(t,i))||n.enumerable});return e};var De=(e,t,r)=>(r=e!=null?nu(au(e)):{},hn(t||!e||!e.__esModule?Xe(r,"default",{value:e,enumerable:!0}):r,e)),uu=e=>hn(Xe({},"__esModule",{value:!0}),e);var Fo=E((jo,Vt)=>{(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 g(s,d){if(s.indexOf("::")!==s.lastIndexOf("::"))return null;let y=0,m=-1,v=(s.match(l.zoneIndex)||[])[0],P,L;for(v&&(v=v.substring(1),s=s.replace(/%.+$/,""));(m=s.indexOf(":",m+1))>=0;)y++;if(s.substr(0,2)==="::"&&y--,s.substr(-2,2)==="::"&&y--,y>d)return null;for(L=d-y,P=":";L--;)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 re=s.split(":"),se=[];for(let Je=0;Je<re.length;Je++)se.push(parseInt(re[Je],16));return se})(),{parts:d,zoneId:v}}o(g,"expandIPv6");function f(s,d,y,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=y-m,P<0&&(P=0),s[v]>>P!==d[v]>>P)return!1;m-=y,v+=1}return!0}o(f,"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 $(s,d){for(;s.length<d;)s=`0${s}`;return s}o($,"padPart");let _={};_.IPv4=(function(){function s(d){if(d.length!==4)throw new Error("ipaddr: ipv4 octet count should be 4");let y,m;for(y=0;y<d.length;y++)if(m=d[y],!(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,y){let m;if(y===void 0&&(m=d,d=m[0],y=m[1]),d.kind()!=="ipv4")throw new Error("ipaddr: cannot match ipv4 address with non-ipv4 one");return f(this.octets,d.octets,8,y)},s.prototype.prefixLengthFromSubnetMask=function(){let d=0,y=!1,m={0:8,128:7,192:6,224:5,240:4,248:3,252:2,254:1,255:0},v,P,L;for(v=3;v>=0;v-=1)if(P=this.octets[v],P in m){if(L=m[P],y&&L!==0)return null;L!==8&&(y=!0),d+=L}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),y=d[0].toByteArray(),m=this.subnetMaskFromPrefixLength(d[1]).toByteArray(),v=[],P=0;for(;P<4;)v.push(parseInt(y[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,y,m,v,P;try{for(d=this.parseCIDR(s),m=d[0].toByteArray(),P=this.subnetMaskFromPrefixLength(d[1]).toByteArray(),v=[],y=0;y<4;)v.push(parseInt(m[y],10)&parseInt(P[y],10)),y++;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 y=parseInt(d[2]);if(y>=0&&y<=32){let m=[this.parse(d[1]),y];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,y,m;if(d=s.match(r.fourOctet))return(function(){let v=d.slice(1,6),P=[];for(let L=0;L<v.length;L++)y=v[L],P.push(x(y));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],y=0,m=Math.floor(s/8);for(;y<m;)d[y]=255,y++;return m<4&&(d[m]=Math.pow(2,s%8)-1<<8-s%8),new this(d)},_.IPv6=(function(){function s(d,y){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");y&&(this.zoneId=y)}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,y){let m;if(y===void 0&&(m=d,d=m[0],y=m[1]),d.kind()!=="ipv6")throw new Error("ipaddr: cannot match ipv6 address with non-ipv6 one");return f(this.parts,d.parts,16,y)},s.prototype.prefixLengthFromSubnetMask=function(){let d=0,y=!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 L=7;L>=0;L-=1)if(v=this.parts[L],v in m){if(P=m[v],y&&P!==0)return null;P!==16&&(y=!0),d+=P}else return null;return 128-d},s.prototype.range=function(){return _.subnetMatch(this,this.SpecialRanges)},s.prototype.toByteArray=function(){let d,y=[],m=this.parts;for(let v=0;v<m.length;v++)d=m[v],y.push(d>>8),y.push(d&255);return y},s.prototype.toFixedLengthString=function(){let d=(function(){let m=[];for(let v=0;v<this.parts.length;v++)m.push($(this.parts[v].toString(16),4));return m}).call(this).join(":"),y="";return this.zoneId&&(y=`%${this.zoneId}`),d+y},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),y=d[0],m=d[1];return new _.IPv4([y>>8,y&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(":"),y="";return this.zoneId&&(y=`%${this.zoneId}`),d+y},s.prototype.toRFC5952String=function(){let d=/((^|:)(0(:|$)){2,})/g,y=this.toNormalizedString(),m=0,v=-1,P;for(;P=d.exec(y);)P[0].length>v&&(m=P.index,v=P[0].length);return v<0?y:`${y.substring(0,m)}::${y.substring(m+v)}`},s.prototype.toString=function(){return this.toRFC5952String()},s})(),_.IPv6.broadcastAddressFromCIDR=function(s){try{let d=this.parseCIDR(s),y=d[0].toByteArray(),m=this.subnetMaskFromPrefixLength(d[1]).toByteArray(),v=[],P=0;for(;P<16;)v.push(parseInt(y[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,y,m,v,P;try{for(d=this.parseCIDR(s),m=d[0].toByteArray(),P=this.subnetMaskFromPrefixLength(d[1]).toByteArray(),v=[],y=0;y<16;)v.push(parseInt(m[y],10)&parseInt(P[y],10)),y++;return new this(v)}catch(L){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${L})`)}},_.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,y,m;if((y=s.match(/^(.+)\/(\d+)$/))&&(d=parseInt(y[2]),d>=0&&d<=128))return m=[this.parse(y[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,y,m,v,P,L;if(m=s.match(l.deprecatedTransitional))return this.parser(`::ffff:${m[1]}`);if(l.native.test(s))return g(s,8);if((m=s.match(l.transitional))&&(L=m[6]||"",d=m[1],m[1].endsWith("::")||(d=d.slice(0,-1)),d=g(d+L,6),d.parts)){for(P=[parseInt(m[2]),parseInt(m[3]),parseInt(m[4]),parseInt(m[5])],y=0;y<P.length;y++)if(v=P[y],!(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],y=0,m=Math.floor(s/8);for(;y<m;)d[y]=255,y++;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,y){let m,v,P,L;y==null&&(y="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(L=P[m],s.kind()===L[0].kind()&&s.match.apply(s,L))return v}return y},typeof Vt<"u"&&Vt.exports?Vt.exports=_:e.ipaddr=_})(jo)});var Bi=E((SA,Fi)=>{var ji=require("stream").Stream,Vl=require("util");Fi.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,ji);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=ji.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 Gi=E((zA,Hi)=>{var Hl=require("util"),Vi=require("stream").Stream,Zi=Bi();Hi.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,Vi);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 Zi)){var r=Zi.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 Vi.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 qi=E((OA,Wi)=>{"use strict";Wi.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 Xi=E(te=>{"use strict";var Jt=qi(),Gl=require("path").extname,Ki=/^\s*([^;\s]*)(?:;|\s|$)/,Wl=/^text\//i;te.charset=Ji;te.charsets={lookup:Ji};te.contentType=ql;te.extension=Kl;te.extensions=Object.create(null);te.lookup=Jl;te.types=Object.create(null);Xl(te.extensions,te.types);function Ji(e){if(!e||typeof e!="string")return!1;var t=Ki.exec(e),r=t&&Jt[t[1].toLowerCase()];return r&&r.charset?r.charset:t&&Wl.test(t[1])?"UTF-8":!1}o(Ji,"charset");function ql(e){if(!e||typeof e!="string")return!1;var t=e.indexOf("/")===-1?te.lookup(e):e;if(!t)return!1;if(t.indexOf("charset")===-1){var r=te.charset(t);r&&(t+="; charset="+r.toLowerCase())}return t}o(ql,"contentType");function Kl(e){if(!e||typeof e!="string")return!1;var t=Ki.exec(e),r=t&&te.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&&te.types[t]||!1}o(Jl,"lookup");function Xl(e,t){var r=["nginx","apache",void 0,"iana"];Object.keys(Jt).forEach(o(function(i){var u=Jt[i],c=u.extensions;if(!(!c||!c.length)){e[i]=c;for(var l=0;l<c.length;l++){var g=c[l];if(t[g]){var f=r.indexOf(Jt[t[g]].source),x=r.indexOf(u.source);if(t[g]!=="application/octet-stream"&&(f>x||f===x&&t[g].substr(0,12)==="application/"))continue}t[g]=i}}},"forEachMimeType"))}o(Xl,"populateMaps")});var Qi=E((NA,Yi)=>{Yi.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 Gr=E((CA,ta)=>{var ea=Qi();ta.exports=Ql;function Ql(e){var t=!1;return ea(function(){t=!0}),o(function(n,i){t?e(n,i):ea(o(function(){e(n,i)},"nextTick_callback"))},"async_callback")}o(Ql,"async")});var Wr=E((MA,ra)=>{ra.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 qr=E((jA,oa)=>{var na=Gr(),rp=Wr();oa.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,na(n)):i=e(r,t,na(n)),i}o(op,"runJob")});var Kr=E((BA,ia)=>{ia.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 Jr=E((VA,aa)=>{var ap=Wr(),sp=Gr();aa.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 ua=E((GA,sa)=>{var cp=qr(),lp=Kr(),pp=Jr();sa.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 Xr=E((qA,Xt)=>{var ca=qr(),mp=Kr(),fp=Jr();Xt.exports=gp;Xt.exports.ascending=la;Xt.exports.descending=yp;function gp(e,t,r,n){var i=mp(e,r);return ca(e,t,i,o(function u(c,l){if(c){n(c,l);return}if(i.index++,i.index<(i.keyedList||e).length){ca(e,t,i,u);return}n(null,i.results)},"iteratorHandler")),fp.bind(i,n)}o(gp,"serialOrdered");function la(e,t){return e<t?-1:e>t?1:0}o(la,"ascending");function yp(e,t){return-1*la(e,t)}o(yp,"descending")});var da=E((JA,pa)=>{var hp=Xr();pa.exports=vp;function vp(e,t,r){return hp(e,t,null,r)}o(vp,"serial")});var fa=E((YA,ma)=>{ma.exports={parallel:ua(),serial:da(),serialOrdered:Xr()}});var Yr=E((QA,ga)=>{"use strict";ga.exports=Object});var ha=E((ez,ya)=>{"use strict";ya.exports=Error});var xa=E((tz,va)=>{"use strict";va.exports=EvalError});var Pa=E((rz,_a)=>{"use strict";_a.exports=RangeError});var Ta=E((nz,ba)=>{"use strict";ba.exports=ReferenceError});var Ea=E((oz,Ia)=>{"use strict";Ia.exports=SyntaxError});var Yt=E((iz,$a)=>{"use strict";$a.exports=TypeError});var Aa=E((az,Sa)=>{"use strict";Sa.exports=URIError});var ka=E((sz,za)=>{"use strict";za.exports=Math.abs});var wa=E((uz,Oa)=>{"use strict";Oa.exports=Math.floor});var Na=E((cz,Ra)=>{"use strict";Ra.exports=Math.max});var Ca=E((lz,Da)=>{"use strict";Da.exports=Math.min});var Ma=E((pz,Ua)=>{"use strict";Ua.exports=Math.pow});var ja=E((dz,La)=>{"use strict";La.exports=Math.round});var Ba=E((mz,Fa)=>{"use strict";Fa.exports=Number.isNaN||o(function(t){return t!==t},"isNaN")});var Va=E((gz,Za)=>{"use strict";var xp=Ba();Za.exports=o(function(t){return xp(t)||t===0?t:t<0?-1:1},"sign")});var Ga=E((hz,Ha)=>{"use strict";Ha.exports=Object.getOwnPropertyDescriptor});var Qr=E((vz,Wa)=>{"use strict";var Qt=Ga();if(Qt)try{Qt([],"length")}catch{Qt=null}Wa.exports=Qt});var Ka=E((xz,qa)=>{"use strict";var er=Object.defineProperty||!1;if(er)try{er({},"a",{value:1})}catch{er=!1}qa.exports=er});var en=E((_z,Ja)=>{"use strict";Ja.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 Qa=E((bz,Ya)=>{"use strict";var Xa=typeof Symbol<"u"&&Symbol,_p=en();Ya.exports=o(function(){return typeof Xa!="function"||typeof Symbol!="function"||typeof Xa("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:_p()},"hasNativeSymbols")});var tn=E((Iz,es)=>{"use strict";es.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var rn=E((Ez,ts)=>{"use strict";var Pp=Yr();ts.exports=Pp.getPrototypeOf||null});var os=E(($z,ns)=>{"use strict";var bp="Function.prototype.bind called on incompatible ",Tp=Object.prototype.toString,Ip=Math.max,Ep="[object Function]",rs=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");ns.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,rs(n,arguments));return Object(x)===x?x:this}return r.apply(t,rs(n,arguments))},"binder"),c=Ip(0,r.length-n.length),l=[],g=0;g<c;g++)l[g]="$"+g;if(i=Function("binder","return function ("+Sp(l,",")+"){ return binder.apply(this,arguments); }")(u),r.prototype){var f=o(function(){},"Empty");f.prototype=r.prototype,i.prototype=new f,f.prototype=null}return i},"bind")});var He=E((Az,is)=>{"use strict";var Ap=os();is.exports=Function.prototype.bind||Ap});var tr=E((zz,as)=>{"use strict";as.exports=Function.prototype.call});var nn=E((kz,ss)=>{"use strict";ss.exports=Function.prototype.apply});var cs=E((Oz,us)=>{"use strict";us.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var ps=E((wz,ls)=>{"use strict";var zp=He(),kp=nn(),Op=tr(),wp=cs();ls.exports=wp||zp.call(Op,kp)});var ms=E((Rz,ds)=>{"use strict";var Rp=He(),Np=Yt(),Dp=tr(),Cp=ps();ds.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 xs=E((Dz,vs)=>{"use strict";var Up=ms(),fs=Qr(),ys;try{ys=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!="object"||!("code"in e)||e.code!=="ERR_PROTO_ACCESS")throw e}var on=!!ys&&fs&&fs(Object.prototype,"__proto__"),hs=Object,gs=hs.getPrototypeOf;vs.exports=on&&typeof on.get=="function"?Up([on.get]):typeof gs=="function"?o(function(t){return gs(t==null?t:hs(t))},"getDunder"):!1});var Is=E((Uz,Ts)=>{"use strict";var _s=tn(),Ps=rn(),bs=xs();Ts.exports=_s?o(function(t){return _s(t)},"getProto"):Ps?o(function(t){if(!t||typeof t!="object"&&typeof t!="function")throw new TypeError("getProto: not an object");return Ps(t)},"getProto"):bs?o(function(t){return bs(t)},"getProto"):null});var an=E((Lz,Es)=>{"use strict";var Mp=Function.prototype.call,Lp=Object.prototype.hasOwnProperty,jp=He();Es.exports=jp.call(Mp,Lp)});var ws=E((jz,Os)=>{"use strict";var M,Fp=Yr(),Bp=ha(),Zp=xa(),Vp=Pa(),Hp=Ta(),Ke=Ea(),qe=Yt(),Gp=Aa(),Wp=ka(),qp=wa(),Kp=Na(),Jp=Ca(),Xp=Ma(),Yp=ja(),Qp=Va(),zs=Function,sn=o(function(e){try{return zs('"use strict"; return ('+e+").constructor;")()}catch{}},"getEvalledConstructor"),_t=Qr(),ed=Ka(),un=o(function(){throw new qe},"throwTypeError"),td=_t?(function(){try{return arguments.callee,un}catch{try{return _t(arguments,"callee").get}catch{return un}}})():un,Ge=Qa()(),Y=Is(),rd=rn(),nd=tn(),ks=nn(),Pt=tr(),We={},od=typeof Uint8Array>"u"||!Y?M:Y(Uint8Array),Ne={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?M:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?M:ArrayBuffer,"%ArrayIteratorPrototype%":Ge&&Y?Y([][Symbol.iterator]()):M,"%AsyncFromSyncIteratorPrototype%":M,"%AsyncFunction%":We,"%AsyncGenerator%":We,"%AsyncGeneratorFunction%":We,"%AsyncIteratorPrototype%":We,"%Atomics%":typeof Atomics>"u"?M:Atomics,"%BigInt%":typeof BigInt>"u"?M:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?M:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?M:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?M:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Bp,"%eval%":eval,"%EvalError%":Zp,"%Float16Array%":typeof Float16Array>"u"?M:Float16Array,"%Float32Array%":typeof Float32Array>"u"?M:Float32Array,"%Float64Array%":typeof Float64Array>"u"?M:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?M:FinalizationRegistry,"%Function%":zs,"%GeneratorFunction%":We,"%Int8Array%":typeof Int8Array>"u"?M:Int8Array,"%Int16Array%":typeof Int16Array>"u"?M:Int16Array,"%Int32Array%":typeof Int32Array>"u"?M:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Ge&&Y?Y(Y([][Symbol.iterator]())):M,"%JSON%":typeof JSON=="object"?JSON:M,"%Map%":typeof Map>"u"?M:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Ge||!Y?M:Y(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Fp,"%Object.getOwnPropertyDescriptor%":_t,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?M:Promise,"%Proxy%":typeof Proxy>"u"?M:Proxy,"%RangeError%":Vp,"%ReferenceError%":Hp,"%Reflect%":typeof Reflect>"u"?M:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?M:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Ge||!Y?M:Y(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?M:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Ge&&Y?Y(""[Symbol.iterator]()):M,"%Symbol%":Ge?Symbol:M,"%SyntaxError%":Ke,"%ThrowTypeError%":td,"%TypedArray%":od,"%TypeError%":qe,"%Uint8Array%":typeof Uint8Array>"u"?M:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?M:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?M:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?M:Uint32Array,"%URIError%":Gp,"%WeakMap%":typeof WeakMap>"u"?M:WeakMap,"%WeakRef%":typeof WeakRef>"u"?M:WeakRef,"%WeakSet%":typeof WeakSet>"u"?M:WeakSet,"%Function.prototype.call%":Pt,"%Function.prototype.apply%":ks,"%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){$s=Y(Y(e)),Ne["%Error.prototype%"]=$s}var $s,id=o(function e(t){var r;if(t==="%AsyncFunction%")r=sn("async function () {}");else if(t==="%GeneratorFunction%")r=sn("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=sn("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 Ne[t]=r,r},"doEval"),Ss={__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"]},bt=He(),rr=an(),ad=bt.call(Pt,Array.prototype.concat),sd=bt.call(ks,Array.prototype.splice),As=bt.call(Pt,String.prototype.replace),nr=bt.call(Pt,String.prototype.slice),ud=bt.call(Pt,RegExp.prototype.exec),cd=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,ld=/\\(\\)?/g,pd=o(function(t){var r=nr(t,0,1),n=nr(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 As(t,cd,function(u,c,l,g){i[i.length]=l?As(g,ld,"$1"):c||u}),i},"stringToPath"),dd=o(function(t,r){var n=t,i;if(rr(Ss,n)&&(i=Ss[n],n="%"+i[0]+"%"),rr(Ne,n)){var u=Ne[n];if(u===We&&(u=id(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");Os.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(ud(/^%?[^%]*%?$/,t)===null)throw new Ke("`%` 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,g=!1,f=u.alias;f&&(i=f[0],sd(n,ad([0,1],f)));for(var x=1,$=!0;x<n.length;x+=1){var _=n[x],s=nr(_,0,1),d=nr(_,-1);if((s==='"'||s==="'"||s==="`"||d==='"'||d==="'"||d==="`")&&s!==d)throw new Ke("property names with quotes must have matching quotes");if((_==="constructor"||!$)&&(g=!0),i+="."+_,c="%"+i+"%",rr(Ne,c))l=Ne[c];else if(l!=null){if(!(_ in l)){if(!r)throw new qe("base intrinsic for "+t+" exists, but the property is not available.");return}if(_t&&x+1>=n.length){var y=_t(l,_);$=!!y,$&&"get"in y&&!("originalValue"in y.get)?l=y.get:l=l[_]}else $=rr(l,_),l=l[_];$&&!g&&(Ne[c]=l)}}return l},"GetIntrinsic")});var Ns=E((Bz,Rs)=>{"use strict";var md=en();Rs.exports=o(function(){return md()&&!!Symbol.toStringTag},"hasToStringTagShams")});var Us=E((Vz,Cs)=>{"use strict";var fd=ws(),Ds=fd("%Object.defineProperty%",!0),gd=Ns()(),yd=an(),hd=Yt(),or=gd?Symbol.toStringTag:null;Cs.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");or&&(n||!yd(t,or))&&(Ds?Ds(t,or,{configurable:!i,enumerable:!1,value:r,writable:!1}):t[or]=r)},"setToStringTag")});var Ls=E((Gz,Ms)=>{"use strict";var vd=Function.prototype.call,xd=Object.prototype.hasOwnProperty,_d=He();Ms.exports=_d.call(vd,xd)});var Fs=E((Wz,js)=>{"use strict";js.exports=function(e,t){return Object.keys(t).forEach(function(r){e[r]=e[r]||t[r]}),e}});var Vs=E((qz,Zs)=>{"use strict";var dn=Gi(),Pd=require("util"),cn=require("path"),bd=require("http"),Td=require("https"),Id=require("url").parse,Ed=require("fs"),$d=require("stream").Stream,Sd=require("crypto"),ln=Xi(),Ad=fa(),zd=Us(),ke=Ls(),pn=Fs();function Bs(e){return String(e).replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/"/g,"%22")}o(Bs,"escapeHeaderParam");function j(e){if(!(this instanceof j))return new j(e);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],dn.call(this),e=e||{};for(var t in e)this[t]=e[t]}o(j,"FormData");Pd.inherits(j,dn);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=dn.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="'+Bs(e)+'"'].concat(n||[]),"Content-Type":[].concat(i||[])};typeof r.header=="object"&&pn(c,r.header);var l;for(var g in c)if(ke(c,g)){if(l=c[g],l==null)continue;Array.isArray(l)||(l=[l]),l.length&&(u+=g+": "+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=cn.normalize(t.filepath).replace(/\\/g,"/"):t.filename||e&&(e.name||e.path)?r=cn.basename(t.filename||e&&(e.name||e.path)):e&&e.readable&&ke(e,"httpVersion")&&(r=cn.basename(e.client._httpMessage.path||"")),r)return'filename="'+Bs(r)+'"'};j.prototype._getContentType=function(e,t){var r=t.contentType;return!r&&e&&e.name&&(r=ln.lookup(e.name)),!r&&e&&e.path&&(r=ln.lookup(e.path)),!r&&e&&e.readable&&ke(e,"httpVersion")&&(r=e.headers["content-type"]),!r&&(t.filepath||t.filename)&&(r=ln.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=pn({port:e.port,path:e.pathname,host:e.hostname,protocol:e.protocol},i)):(n=pn(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,g=o(function(f,x){return r.removeListener("error",g),r.removeListener("response",l),t.call(this,f,x)},"callback");l=g.bind(this,null),r.on("error",g),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");Zs.exports=j});var Gd={};yn(Gd,{feedhive:()=>Hd,feedhiveAuth:()=>V});module.exports=uu(Gd);var cu=Object.freeze({status:"aborted"});function b(e,t,r){function n(l,g){if(l._zod||Object.defineProperty(l,"_zod",{value:{def:g,constr:c,traits:new Set},enumerable:!1}),l._zod.traits.has(e))return;l._zod.traits.add(e),t(l,g);let f=c.prototype,x=Object.keys(f);for(let $=0;$<x.length;$++){let _=x[$];_ in l||(l[_]=f[_].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 g;let f=r?.Parent?new u:this;n(f,l),(g=f._zod).deferred??(g.deferred=[]);for(let x of f._zod.deferred)x();return f}return o(c,"_"),Object.defineProperty(c,"init",{value:n}),Object.defineProperty(c,Symbol.hasInstance,{value:o(l=>r?.Parent&&l instanceof r.Parent?!0:l?._zod?.traits?.has(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.")}},It=class extends Error{static{o(this,"$ZodEncodeError")}constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}},sr={};function fe(e){return e&&Object.assign(sr,e),sr}o(fe,"config");function cr(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(cr,"getEnumValues");function xn(e,t){return typeof t=="bigint"?t.toString():t}o(xn,"jsonStringifyReplacer");function $t(e){return{get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}o($t,"cached");function _n(e){return e==null}o(_n,"nullish");function St(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}o(St,"cleanRegex");var vn=Symbol("evaluating");function J(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==vn)return n===void 0&&(n=vn,n=r()),n},set(i){Object.defineProperty(e,t,{value:i})},configurable:!0})}o(J,"defineLazy");var lr="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Ye(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}o(Ye,"isObject");var lu=$t(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function Pn(e){if(Ye(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let r=t.prototype;return!(Ye(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}o(Pn,"isPlainObject");var bn=new Set(["string","number","symbol"]);function Ce(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}o(Ce,"escapeRegex");function At(e,t,r){let n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}o(At,"clone");function H(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(H,"normalizeParams");function Tn(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}o(Tn,"optionalKeys");var In={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 be(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}o(be,"prefixIssues");function Et(e){return typeof e=="string"?e:e?.message}o(Et,"unwrapMessage");function Te(e,t,r){let n={...e,path:e.path??[]};if(!e.message){let i=Et(e.inst?._zod.def?.error?.(e))??Et(t?.error?.(e))??Et(r.customError?.(e))??Et(r.localeError?.(e))??"Invalid input";n.message=i}return delete n.inst,delete n.continue,t?.reportInput||delete n.input,n}o(Te,"finalizeIssue");function En(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}o(En,"getLengthableOrigin");function pr(...e){let[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}o(pr,"issue");var $n=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,xn,2),Object.defineProperty(e,"toString",{value:o(()=>e.message,"value"),enumerable:!1})},"initializer"),Sn=b("$ZodError",$n),Qe=b("$ZodError",$n,{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(g=>Te(g,u,fe())));throw lr(l,i?.callee),l}return c.value},"_parse"),zt=du(Qe),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(g=>Te(g,u,fe())));throw lr(l,i?.callee),l}return c.value},"_parseAsync"),kt=mu(Qe),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??Sn)(u.issues.map(c=>Te(c,i,fe())))}:{success:!0,data:u.value}},"_safeParse"),et=fu(Qe),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=>Te(c,i,fe())))}:{success:!0,data:u.value}},"_safeParseAsync"),tt=gu(Qe);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 An=o(e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},"string"),zn=/^-?\d+n?$/,kn=/^-?\d+$/,dr=/^-?\d+(?:\.\d+)?$/,On=/^(?:true|false)$/i;var Ie=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 wn=b("$ZodCheckGreaterThan",(e,t)=>{Ie.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 Rn=b("$ZodCheckNumberFormat",(e,t)=>{Ie.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),n=r?"int":"number",[i,u]=In[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=kn)}),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 Nn=b("$ZodCheckMinLength",(e,t)=>{var r;Ie.init(e,t),(r=e._zod.def).when??(r.when=n=>{let i=n.value;return!_n(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=En(i);n.issues.push({origin:c,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}});var mr=b("$ZodCheckStringFormat",(e,t)=>{var r,n;Ie.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=()=>{})}),Dn=b("$ZodCheckRegex",(e,t)=>{mr.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 Un={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=Un;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,g)=>{let f=Ue(c),x;for(let $ of l){if($._zod.def.when){if(!$._zod.def.when(c))continue}else if(f)continue;let _=c.issues.length,s=$._zod.check(c);if(s instanceof Promise&&g?.async===!1)throw new le;if(x||s instanceof Promise)x=(x??Promise.resolve()).then(async()=>{await s,c.issues.length!==_&&(f||(f=Ue(c,_)))});else{if(c.issues.length===_)continue;f||(f=Ue(c,_))}}return x?x.then(()=>c):c},"runChecks"),u=o((c,l,g)=>{if(Ue(c))return c.aborted=!0,c;let f=i(l,n,g);if(f instanceof Promise){if(g.async===!1)throw new le;return f.then(x=>e._zod.parse(x,g))}return e._zod.parse(f,g)},"handleCanaryResult");e._zod.run=(c,l)=>{if(l.skipChecks)return e._zod.parse(c,l);if(l.direction==="backward"){let f=e._zod.parse({value:c.value,issues:[]},{...l,skipChecks:!0});return f instanceof Promise?f.then(x=>u(x,c,l)):u(f,c,l)}let g=e._zod.parse(c,l);if(g instanceof Promise){if(l.async===!1)throw new le;return g.then(f=>i(f,n,l))}return i(g,n,l)}}J(e,"~standard",()=>({validate:o(i=>{try{let u=et(e,i);return u.success?{value:u.data}:{issues:u.error?.issues}}catch{return tt(e,i).then(c=>c.success?{value:c.data}:{issues:c.error?.issues})}},"validate"),vendor:"zod",version:1}))}),Rt=b("$ZodString",(e,t)=>{W.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??An(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}}),fr=b("$ZodStringFormat",(e,t)=>{mr.init(e,t),Rt.init(e,t)});var Bn=b("$ZodURL",(e,t)=>{fr.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 gr=b("$ZodNumber",(e,t)=>{W.init(e,t),e._zod.pattern=e._zod.bag.pattern??dr,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}}),Zn=b("$ZodNumberFormat",(e,t)=>{Rn.init(e,t),gr.init(e,t)}),yr=b("$ZodBoolean",(e,t)=>{W.init(e,t),e._zod.pattern=On,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}}),Vn=b("$ZodBigInt",(e,t)=>{W.init(e,t),e._zod.pattern=zn,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 Hn=b("$ZodAny",(e,t)=>{W.init(e,t),e._zod.parse=r=>r}),Gn=b("$ZodUnknown",(e,t)=>{W.init(e,t),e._zod.parse=r=>r});var Wn=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}}),qn=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 Mn(e,t,r){e.issues.length&&t.issues.push(...be(r,e.issues)),t.value[r]=e.value}o(Mn,"handleArrayResult");var Kn=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],g=t.element._zod.run({value:l,issues:[]},n);g instanceof Promise?u.push(g.then(f=>Mn(f,r,c))):Mn(g,r,c)}return u.length?Promise.all(u).then(()=>r):r}});function wt(e,t,r,n,i){if(e.issues.length){if(i&&!(r in n))return;t.issues.push(...be(r,e.issues))}e.value===void 0?r in n&&(t.value[r]=void 0):t.value[r]=e.value}o(wt,"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=Tn(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,g=i.catchall._zod,f=g.def.type,x=g.optout==="optional";for(let $ in t){if(l.has($))continue;if(f==="never"){c.push($);continue}let _=g.run({value:t[$],issues:[]},n);_ instanceof Promise?e.push(_.then(s=>wt(s,r,$,t,x))):wt(_,r,$,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 Jn=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 g={...l};return Object.defineProperty(t,"shape",{value:g}),g},"get")})}let n=$t(()=>xu(t));J(e._zod,"propValues",()=>{let l=t.shape,g={};for(let f in l){let x=l[f]._zod;if(x.values){g[f]??(g[f]=new Set);for(let $ of x.values)g[f].add($)}}return g});let i=Ye,u=t.catchall,c;e._zod.parse=(l,g)=>{c??(c=n.value);let f=l.value;if(!i(f))return l.issues.push({expected:"object",code:"invalid_type",input:f,inst:e}),l;l.value={};let x=[],$=c.shape;for(let _ of c.keys){let s=$[_],d=s._zod.optout==="optional",y=s._zod.run({value:f[_],issues:[]},g);y instanceof Promise?x.push(y.then(m=>wt(m,l,_,f,d))):wt(y,l,_,f,d)}return u?_u(x,f,l,g,n.value,e):x.length?Promise.all(x).then(()=>l):l}});function Ln(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=>Te(c,n,fe())))}),t)}o(Ln,"handleUnionResults");var hr=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=>St(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 g of t.options){let f=g._zod.run({value:i.value,issues:[]},u);if(f instanceof Promise)l.push(f),c=!0;else{if(f.issues.length===0)return f;l.push(f)}}return c?Promise.all(l).then(g=>Ln(g,i,e,u)):Ln(l,i,e,u)}});var Xn=b("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,hr.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,g]of Object.entries(c)){i[l]||(i[l]=new Set);for(let f of g)i[l].add(f)}}return i});let n=$t(()=>{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 g of l){if(u.has(g))throw new Error(`Duplicate discriminator value "${String(g)}"`);u.set(g,c)}}return u});e._zod.parse=(i,u)=>{let c=i.value;if(!Ye(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 Yn=b("$ZodRecord",(e,t)=>{W.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;if(!Pn(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 f of c)if(typeof f=="string"||typeof f=="number"||typeof f=="symbol"){l.add(typeof f=="number"?f.toString():f);let x=t.valueType._zod.run({value:i[f],issues:[]},n);x instanceof Promise?u.push(x.then($=>{$.issues.length&&r.issues.push(...be(f,$.issues)),r.value[f]=$.value})):(x.issues.length&&r.issues.push(...be(f,x.issues)),r.value[f]=x.value)}let g;for(let f in i)l.has(f)||(g=g??[],g.push(f));g&&g.length>0&&r.issues.push({code:"unrecognized_keys",input:i,inst:e,keys:g})}else{r.value={};for(let l of Reflect.ownKeys(i)){if(l==="__proto__")continue;let g=t.keyType._zod.run({value:l,issues:[]},n);if(g instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof l=="string"&&dr.test(l)&&g.issues.length){let $=t.keyType._zod.run({value:Number(l),issues:[]},n);if($ instanceof Promise)throw new Error("Async schemas not supported in object keys currently");$.issues.length===0&&(g=$)}if(g.issues.length){t.mode==="loose"?r.value[l]=i[l]:r.issues.push({code:"invalid_key",origin:"record",issues:g.issues.map($=>Te($,n,fe())),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($=>{$.issues.length&&r.issues.push(...be(l,$.issues)),r.value[g.value]=$.value})):(x.issues.length&&r.issues.push(...be(l,x.issues)),r.value[g.value]=x.value)}}return u.length?Promise.all(u).then(()=>r):r}});var Qn=b("$ZodEnum",(e,t)=>{W.init(e,t);let r=cr(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(i=>bn.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}}),eo=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"?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 to=b("$ZodTransform",(e,t)=>{W.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new It(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 jn(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}o(jn,"handleOptionalResult");var ro=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(`^(${St(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=>jn(u,r.value)):jn(i,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,n)}});var no=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(`^(${St(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 oo=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=>Ot(c,t.in,n)):Ot(u,t.in,n)}let i=t.in._zod.run(r,n);return i instanceof Promise?i.then(u=>Ot(u,t.out,n)):Ot(i,t.out,n)}});function Ot(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}o(Ot,"handlePipeResult");var io=b("$ZodCustom",(e,t)=>{Ie.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=>Fn(u,r,n,e));Fn(i,r,n,e)}});function Fn(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(pr(i))}}o(Fn,"handleRefineResult");var so;var vr=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 uo(){return new vr}o(uo,"registry");(so=globalThis).__zod_globalRegistry??(so.__zod_globalRegistry=uo());var xr=globalThis.__zod_globalRegistry;function co(e,t){return new e({type:"string",...H(t)})}o(co,"_string");function lo(e,t){return new e({type:"string",coerce:!0,...H(t)})}o(lo,"_coercedString");function po(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...H(t)})}o(po,"_url");function mo(e,t){return new e({type:"number",checks:[],...H(t)})}o(mo,"_number");function fo(e,t){return new e({type:"number",coerce:!0,checks:[],...H(t)})}o(fo,"_coercedNumber");function go(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...H(t)})}o(go,"_int");function yo(e,t){return new e({type:"boolean",...H(t)})}o(yo,"_boolean");function ho(e,t){return new e({type:"boolean",coerce:!0,...H(t)})}o(ho,"_coercedBoolean");function vo(e,t){return new e({type:"bigint",coerce:!0,...H(t)})}o(vo,"_coercedBigint");function xo(e){return new e({type:"any"})}o(xo,"_any");function _o(e){return new e({type:"unknown"})}o(_o,"_unknown");function Po(e,t){return new e({type:"void",...H(t)})}o(Po,"_void");function bo(e,t){return new e({type:"date",coerce:!0,...H(t)})}o(bo,"_coercedDate");function Nt(e,t){return new wn({check:"greater_than",...H(t),value:e,inclusive:!0})}o(Nt,"_gte");function ue(e,t){return new Nn({check:"min_length",...H(t),minimum:e})}o(ue,"_minLength");function Ee(e,t){return new Dn({check:"string_format",format:"regex",...H(t),pattern:e})}o(Ee,"_regex");function To(e,t,r){let n=H(r);return n.abort??(n.abort=!0),new e({type:"custom",check:"custom",fn:t,...n})}o(To,"_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)=>zt(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>et(e,r,n),e.parseAsync=async(r,n)=>kt(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>tt(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)=>At(e,r,n),e.brand=()=>e,e.register=((r,n)=>(r.add(e,n),e)),e.apply=r=>r(e)}),Ct=b("ZodMiniString",(e,t)=>{Rt.init(e,t),X.init(e,t)});function a(e){return co(Ct,e)}o(a,"string");var Io=b("ZodMiniStringFormat",(e,t)=>{fr.init(e,t),Ct.init(e,t)});var Ru=b("ZodMiniURL",(e,t)=>{Bn.init(e,t),Io.init(e,t)});function Eo(e){return po(Ru,e)}o(Eo,"url");var Ut=b("ZodMiniNumber",(e,t)=>{gr.init(e,t),X.init(e,t)});function ee(e){return mo(Ut,e)}o(ee,"number");var Nu=b("ZodMiniNumberFormat",(e,t)=>{Zn.init(e,t),Ut.init(e,t)});function $o(e){return go(Nu,e)}o($o,"int");var _r=b("ZodMiniBoolean",(e,t)=>{yr.init(e,t),X.init(e,t)});function B(e){return yo(_r,e)}o(B,"boolean");var So=b("ZodMiniBigInt",(e,t)=>{Vn.init(e,t),X.init(e,t)});var Du=b("ZodMiniAny",(e,t)=>{Hn.init(e,t),X.init(e,t)});function nt(){return xo(Du)}o(nt,"any");var Cu=b("ZodMiniUnknown",(e,t)=>{Gn.init(e,t),X.init(e,t)});function O(){return _o(Cu)}o(O,"unknown");var Uu=b("ZodMiniVoid",(e,t)=>{Wn.init(e,t),X.init(e,t)});function Ao(e){return Po(Uu,e)}o(Ao,"_void");var zo=b("ZodMiniDate",(e,t)=>{qn.init(e,t),X.init(e,t)});var Mu=b("ZodMiniArray",(e,t)=>{Kn.init(e,t),X.init(e,t)});function N(e,t){return new Mu({type:"array",element:e,...H(t)})}o(N,"array");var Lu=b("ZodMiniObject",(e,t)=>{Jn.init(e,t),X.init(e,t),J(e,"shape",()=>t.shape)});function p(e,t){let r={type:"object",shape:e??{},...H(t)};return new Lu(r)}o(p,"object");var ju=b("ZodMiniUnion",(e,t)=>{hr.init(e,t),X.init(e,t)});function D(e,t){return new ju({type:"union",options:e,...H(t)})}o(D,"union");var Fu=b("ZodMiniDiscriminatedUnion",(e,t)=>{Xn.init(e,t),X.init(e,t)});function $e(e,t,r){return new Fu({type:"union",options:t,discriminator:e,...H(r)})}o($e,"discriminatedUnion");var Bu=b("ZodMiniRecord",(e,t)=>{Yn.init(e,t),X.init(e,t)});function w(e,t,r){return new Bu({type:"record",keyType:e,valueType:t,...H(r)})}o(w,"record");var Zu=b("ZodMiniEnum",(e,t)=>{Qn.init(e,t),X.init(e,t),e.options=Object.values(t.entries)});function U(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new Zu({type:"enum",entries:r,...H(t)})}o(U,"_enum");var Vu=b("ZodMiniLiteral",(e,t)=>{eo.init(e,t),X.init(e,t)});function S(e,t){return new Vu({type:"literal",values:Array.isArray(e)?e:[e],...H(t)})}o(S,"literal");var Hu=b("ZodMiniTransform",(e,t)=>{to.init(e,t),X.init(e,t)});function Se(e){return new Hu({type:"transform",transform:e})}o(Se,"transform");var Gu=b("ZodMiniOptional",(e,t)=>{ro.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)=>{no.init(e,t),X.init(e,t)});function ot(e){return new Wu({type:"nullable",innerType:e})}o(ot,"nullable");var qu=b("ZodMiniPipe",(e,t)=>{oo.init(e,t),X.init(e,t)});function Ae(e,t){return new qu({type:"pipe",in:e,out:t})}o(Ae,"pipe");var Ku=b("ZodMiniCustom",(e,t)=>{io.init(e,t),X.init(e,t)});function Mt(e,t){return To(Ku,e??(()=>!0),t)}o(Mt,"custom");var it={};yn(it,{bigint:()=>tc,boolean:()=>ec,date:()=>rc,number:()=>Qu,string:()=>Yu});function Yu(e){return lo(Ct,e)}o(Yu,"string");function Qu(e){return fo(Ut,e)}o(Qu,"number");function ec(e){return ho(_r,e)}o(ec,"boolean");function tc(e){return vo(So,e)}o(tc,"bigint");function rc(e){return bo(zo,e)}o(rc,"date");var br=p({retryOnFailure:p({defaultValue:h(B()),hide:h(B())}),continueOnFailure:p({defaultValue:h(B()),hide:h(B())})}),Pr=class{constructor(t,r,n,i,u,c,l,g,f,x,$){this.name=t;this.displayName=r;this.description=n;this.props=i;this.run=u;this.test=c;this.requireAuth=l;this.errorHandlingOptions=g;this.outputSchema=f;this.audience=x;this.aiMetadata=$}static{o(this,"IAction")}},Q=o(e=>new Pr(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:S(t),required:B(),defaultValue:h(nt())}),"TPropertyValue");var ne=p({...F.shape,...C(a(),"SHORT_TEXT").shape}),ge=p({...F.shape,...C(a(),"LONG_TEXT").shape});var Oo=p({label:a(),value:O()}),Lt=p({disabled:h(B()),placeholder:h(a()),options:N(Oo)});var oe=p({...F.shape,options:Lt,...C(O(),"STATIC_DROPDOWN").shape}),ye=p({...F.shape,options:Lt,...C(N(O()),"STATIC_MULTI_SELECT_DROPDOWN").shape});var Tr=p({...F.shape,...C(O(),"DROPDOWN").shape,refreshers:N(a())}),at=p({...F.shape,...C(N(O()),"MULTI_SELECT_DROPDOWN").shape,refreshers:N(a())});var he=p({...F.shape,...C(B(),"CHECKBOX").shape});var ve=p({...F.shape,...C(ee(),"NUMBER").shape});var st=p({...F.shape,streaming:h(B()),...C(O(),"FILE").shape});var ut=p({...F.shape,...C(a(),"DATE_TIME").shape});var wo=w(a(),D([ne,ge,oe,at,ye,he,ve,st,ut])),ct=p({...F.shape,properties:wo,...C(N(O()),"ARRAY").shape});var lt=p({...F.shape,...C(D([w(a(),O())]),"JSON").shape});var Ro=D([ne,oe,lt,ct,ye]),oc=w(a(),Ro),Ir=p({refreshers:N(a()),...F.shape,...C(O(),"DYNAMIC").shape});var jt=p({...F.shape,...C(Ao(),"MARKDOWN").shape});var pt=(r=>(r.ARCHIVE="ARCHIVE",r.REGISTRY="REGISTRY",r))(pt||{}),Me=(r=>(r.CUSTOM="CUSTOM",r.OFFICIAL="OFFICIAL",r))(Me||{}),Le=(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))(Le||{});var dt=(r=>(r.AUTHORIZATION_CODE="authorization_code",r.CLIENT_CREDENTIALS="client_credentials",r))(dt||{}),Er="both_client_credentials_and_authorization_code";var xe=(i=>(i.POLLING="POLLING",i.WEBHOOK="WEBHOOK",i.APP_WEBHOOK="APP_WEBHOOK",i.MANUAL="MANUAL",i))(xe||{}),mt=(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))(mt||{}),ic=p({strategy:U(mt),paramName:h(a())}),ft=(r=>(r.SIMULATION="SIMULATION",r.TEST_FUNCTION="TEST_FUNCTION",r))(ft||{});var Ft=(r=>(r.WEBSOCKET="WEBSOCKET",r.NONE="NONE",r))(Ft||{}),No=p({status:h(ee()),body:h(O()),headers:h(w(a(),a()))}),Do=p({type:S("DELAY"),resumeDateTime:a(),requestIdToReply:h(a()),handlerId:h(a()),streamStepProgress:h(U(Ft))}),Co=p({type:S("WEBHOOK"),requestId:a(),requestIdToReply:h(a()),response:No,handlerId:h(a()),streamStepProgress:h(U(Ft))}),ac=D([Do,Co]);var sc=p({body:O(),rawBody:h(O()),headers:w(a(),a()),queryParams:w(a(),a())});function ie(e){return e==null}o(ie,"isNil");function gt(e){return e==null?!0:typeof e=="string"||Array.isArray(e)?e.length===0:typeof e=="object"?Object.keys(e).length===0:!1}o(gt,"isEmpty");function Bt(e,t){if(e==null)throw new Error(`${t} is null or undefined`)}o(Bt,"assertNotNullOrUndefined");var $r=De(require("crypto"),1);var uc=128,Oe,je,cc=o(e=>{!Oe||Oe.length<e?(Oe=Buffer.allocUnsafe(e*uc),$r.default.randomFillSync(Oe),je=0):je+e>Oe.length&&($r.default.randomFillSync(Oe),je=0),je+=e},"fillPool"),lc=o(e=>(cc(e|=0),Oe.subarray(je-e,je)),"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),g=i;for(;g--;)if(c+=e[l[g]&n]||"",c.length===u)return c}}},"customRandom"),Mo=o((e,t=21)=>pc(e,t,lc),"customAlphabet");var dc="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",Lo=21,Sb=a().check(Ee(new RegExp(`^[0-9a-zA-Z]{${Lo}}$`))),mc=Mo(dc,Lo);var ze=Ae(Se(e=>e instanceof Date?e.toISOString():e),a()),ae={id:a(),created:ze,updated:ze},G=o(e=>h(ot(e)),"Nullable");function Sr(e){return h(ot(U(e)))}o(Sr,"NullableEnum");var kb=Ae(Se(e=>e==="true"||e===!0?!0:e==="false"||e===!1?!1:void 0),h(B())),Zt=o(e=>Ae(Se(t=>Array.isArray(t)?t:t!==void 0?[t]:void 0),h(N(e))),"OptionalArrayFromQuery");var Rb=w(a(),O());var yt=(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))(yt||{});var Hb=a().check(Ee(/^#[0-9A-Fa-f]{6}$/));var Wb=p({filename:a(),data:O(),type:S("file"),mimetype:h(a())});var fc=De(Fo());var eT=p({...ae,name:a(),permissions:N(a()),platformId:G(a()),type:a(),userCount:h(ee())});var Bo=(n=>(n.AGENT_DECIDE="agent-decide",n.CHOOSE_YOURSELF="choose-yourself",n.LEAVE_EMPTY="leave-empty",n))(Bo||{}),Ar=(r=>(r.FILE="FILE",r.TABLE="TABLE",r))(Ar||{}),zr=(n=>(n.SSE="sse",n.STREAMABLE_HTTP="streamable-http",n.SIMPLE_HTTP="http",n))(zr||{});var kr=(n=>(n.TEXT="text",n.NUMBER="number",n.BOOLEAN="boolean",n))(kr||{});var Or=(r=>(r.IN_PROGRESS="in-progress",r.COMPLETED="completed",r))(Or||{});var gc=p({mode:U(Bo),value:O()}),yc=p({auth:h(a()),fields:w(a(),gc)}),hc=p({pieceName:a(),pieceVersion:a(),actionName:a(),predefinedInput:h(yc)}),vc=p({type:S("PIECE"),toolName:a().check(ue(1)),pieceMetadata:hc}),xc=p({type:S("none")}),_c=p({type:S("access_token"),accessToken:a()}),Pc=p({type:S("api_key"),apiKey:a(),apiKeyHeader:a()}),bc=p({type:S("headers"),headers:w(a(),a())}),Tc=$e("type",[xc,_c,Pc,bc]),Zo=p({type:S("FLOW"),toolName:a().check(ue(1)),externalFlowId:a(),flowDisplayName:h(a())}),Vo=p({type:S("MCP"),toolName:a().check(ue(1)),serverUrl:Eo(),protocol:U(zr),auth:Tc}),Ho=p({type:S("KNOWLEDGE_BASE"),toolName:a().check(ue(1)),sourceType:U(Ar),sourceId:a(),sourceName:a()}),Ic=$e("type",[vc,Zo,Vo,Ho]),Ec=p({displayName:a(),description:h(a()),type:U(kr)}),Go=p({type:S("MARKDOWN"),markdown:a()}),Fe={type:S("TOOL_CALL"),input:G(w(a(),O())),output:h(O()),toolName:a(),status:U(Or),toolCallId:a(),startTime:a(),endTime:h(a())},OT=p(Fe),Wo=$e("toolCallType",[p({...Fe,toolCallType:S("PIECE"),pieceName:a(),pieceVersion:a(),actionName:a()}),p({...Fe,toolCallType:S("FLOW"),displayName:a(),externalFlowId:a()}),p({...Fe,toolCallType:S("MCP"),displayName:a(),serverUrl:a()}),p({...Fe,toolCallType:S("KNOWLEDGE_BASE"),displayName:a(),sourceType:a()}),p({...Fe,toolCallType:S("UNKNOWN"),displayName:a()})]),$c=D([Go,Wo]);var wr=(r=>(r.IMAGE="image",r.TEXT="text",r))(wr||{}),_e=p({apiKey:a()}),Sc=_e,Ac=p({apiKey:a(),apiKeyHash:a()}),zc=_e,kc=_e,Oc=_e,wc=_e,Rc=_e,Nc=_e,Dc=_e,Yo=p({accessKeyId:a().check(ue(1)),secretAccessKey:a().check(ue(1))}),Cc=p({}),Uc=p({}),Mc=p({}),Lc=p({}),jc=p({}),Fc=p({}),Qo=p({modelId:a(),modelName:a(),modelType:U(wr)}),ei=p({apiKeyHeader:a(),baseUrl:a(),models:N(Qo),defaultHeaders:h(w(a(),a()))}),ti=p({accountId:a(),gatewayId:a(),models:N(Qo),vertexProject:h(a()),vertexRegion:h(a())}),ri=p({resourceName:a(),apiVersion:Ae(Se(e=>typeof e=="string"&&e.trim().length===0?void 0:e),h(a()))}),ni=p({region:a().check(ue(1))}),Bc=D([Sc,Oc,wc,Rc,Nc,kc,zc,Ac,Yo,Dc]),oi=D([ei,ti,ri,ni,Cc,Mc,Lc,jc,Uc,Fc]),Zc=p({id:a(),name:a(),type:U(wr)}),Vc=p({id:a(),name:a(),provider:U(yt),config:oi,enabledForChat:B()}),Hc=p({provider:U(yt),config:oi,auth:Bc,platformId:a()});var DT={openai:"openai",anthropic:"anthropic","google-ai-studio":"google","google-vertex-ai":"google"},qo=["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"],Ko=["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:qo,anthropic:Gc,google:Ko,activepieces:[...Wc.map(e=>`anthropic/${e}`),...qo.map(e=>`openai/${e}`),...Ko.map(e=>`google/${e}`),...qc.map(e=>`x-ai/${e}`)]};var Jo=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]??Jo:Jo}o(Xc,"getMaxContextTokens");var Xo={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 pe(e){return{chatModels:Kc[e],maxContextTokens:Xc({provider:e}),defaultEmbeddingModel:Xo[e],supportsEmbedding:Xo[e]!==void 0,supportsImageGeneration:!Qc.has(e),webSearch:Yc[e]}}o(pe,"buildProviderCapabilities");var el={openai:pe("openai"),anthropic:pe("anthropic"),openrouter:pe("openrouter"),azure:pe("azure"),google:pe("google"),"cloudflare-gateway":pe("cloudflare-gateway"),custom:pe("custom"),bedrock:pe("bedrock"),mistral:pe("mistral"),activepieces:pe("activepieces")};var tl=p({base64Url:a(),fileName:a(),extension:h(a())}),rl=p({mimeType:a(),url:a(),fileName:h(a())}),Rr=D([tl,rl]);var nl=D([p({type:S("file"),value:Rr}),p({type:S("markdown"),value:a(),files:h(N(Rr))})]),ol=p({sessionId:a(),message:a(),files:h(N(a()))});var ai=(r=>(r.ON_NEW_RECORD="ON_NEW_RECORD",r.ON_UPDATE_RECORD="ON_UPDATE_RECORD",r))(ai||{}),si=(r=>(r.ENABLED="ENABLED",r.DISABLED="DISABLED",r))(si||{}),Nr=(n=>(n.RECORD_CREATED="RECORD_CREATED",n.RECORD_UPDATED="RECORD_UPDATED",n.RECORD_DELETED="RECORD_DELETED",n))(Nr||{});var il=D([p({...ae,name:a(),externalId:a(),type:S("STATIC_DROPDOWN"),tableId:a(),projectId:a(),data:p({options:N(p({value:a()}))})}),p({...ae,name:a(),externalId:a(),type:D([S("TEXT"),S("NUMBER"),S("DATE")]),tableId:a(),projectId:a()})]),al=p({...ae,name:a(),folderId:G(a()),projectId:a(),externalId:a(),status:Sr(si),trigger:Sr(ai)}),sl=p({...ae,tableId:a(),projectId:a(),cells:w(a(),p({updated:a(),created:a(),value:O(),fieldName:a()}))}),ul=p({events:N(U(Nr)),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(it.number()),cursor:h(a()),name:h(a()),externalIds:Zt(a()),folderId:h(a()),folderIds:Zt(a())}),pl=p({records:N(N(p({fieldId:a(),value:ci()}))),tableId:a()}),dl=p({cells:h(N(p({fieldId:a(),value:ci()}))),tableId:a(),agentUpdate:h(B())}),ui=$e("operator",[we("eq"),we("neq"),we("gt"),we("gte"),we("lt"),we("lte"),we("co"),ii("exists"),ii("not_exists")]),ml=p({tableId:a(),limit:h(it.number()),cursor:h(a()),filters:Zt(ui)});function ci(){return Ae(Se(e=>e==null?e:String(e)),ot(a()))}o(ci,"coerceToString");function we(e){return p({fieldId:a(),operator:S(e),value:a()})}o(we,"valueFilter");function ii(e){return p({fieldId:a(),operator:S(e)})}o(ii,"existenceFilter");var fl=p({status:h(ee()),body:h(O()),headers:h(w(a(),a()))}),gl=p({...ae,deleted:G(ze),ownerId:a(),displayName:a(),platformId:a(),externalId:G(a())});var li=p({name:a(),description:h(a()),type:a(),required:B()}),yl=p({pieceName:a(),triggerName:a(),input:p({toolName:a(),toolDescription:a(),inputSchema:N(li),returnsResponse:B()})});var pi="^[0-9]+\\.[0-9]+\\.[0-9]+$",eI=new RegExp(pi),vl="^([~^])?[0-9]+\\.[0-9]+\\.[0-9]+$",tI=a().check(Ee(new RegExp(pi))),rI=a().check(Ee(new RegExp(vl))),xl=p({packageType:S("ARCHIVE"),pieceType:U(Me),pieceName:a(),pieceVersion:a(),archiveId:a(),platformId:a()}),di=p({packageType:S("REGISTRY"),pieceType:S("OFFICIAL"),pieceName:a(),pieceVersion:a()}),mi=p({packageType:S("REGISTRY"),pieceType:S("CUSTOM"),pieceName:a(),pieceVersion:a(),platformId:a()}),nI=D([di,mi]),oI=D([xl,di,mi]);var _l=$e("type",[p({type:S("CRON_EXPRESSION"),cronExpression:a(),timezone:a()}),p({type:S("INTERVAL"),intervalMs:$o().check(Nt(6e4))})]),iI=p({...ae,type:U(xe),projectId:a(),flowId:a(),triggerName:a(),schedule:G(_l),flowVersionId:a(),pieceName:a(),pieceVersion:a(),deleted:G(a()),simulate:B()}),fi=(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))(fi||{}),gi=(r=>(r.NONE="NONE",r.ZSTD="ZSTD",r))(gi||{}),yi=(r=>(r.S3="S3",r.DB="DB",r))(yi||{}),aI=p({...ae,projectId:G(a()),platformId:G(a()),type:U(fi),compression:U(gi),data:h(O()),location:U(yi),size:G(ee()),fileName:G(a()),s3Key:G(a()),metadata:G(w(a(),a()))}),hi=(n=>(n.ADMIN="ADMIN",n.MEMBER="MEMBER",n.OPERATOR="OPERATOR",n))(hi||{}),vi=(r=>(r.ACTIVE="ACTIVE",r.INACTIVE="INACTIVE",r))(vi||{}),sI=p({id:a(),email:a(),firstName:a(),status:U(vi),externalId:G(a()),platformId:G(a()),platformRole:U(hi),lastName:a(),created:ze,updated:ze,lastActiveDate:G(ze),imageUrl:G(a())});var Dr=p({...F.shape,...C(w(a(),O()),"OBJECT").shape});var bi=p({...F.shape,...C(a(),"COLOR").shape});var Cr=D([ne,ge,jt,he,oe,ye,Tr,at,Ir,ve,ct,Dr,lt,ut,st,bi]),I={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 de=p({displayName:a(),description:h(a())});var Ti=p({username:a(),password:a()}),Ur=p({...de.shape,username:p({displayName:a(),description:h(a())}),password:p({displayName:a(),description:h(a())}),...C(Ti,"BASIC_AUTH").shape});var Il=w(a(),D([ne,ge,ve,he,oe])),Mr=p({...de.shape,props:Il,...C(O(),"CUSTOM_AUTH").shape});var Re=p({...de.shape,...C(p({auth:a()}),"SECRET_TEXT").shape});var El=w(a(),D([ne,ge,Re,ve,he,oe,ye,jt])),Ii=p({...de.shape,props:El,...C(O(),"OIDC").shape});var Lr=(r=>(r.HEADER="HEADER",r.BODY="BODY",r))(Lr||{}),Ei=D([ne,Re,oe]),$i=w(a(),Ei),$l=p({props:h(w(a(),Ei)),authUrl:a(),tokenUrl:a(),scope:N(a()),prompt:h(D([S("none"),S("consent"),S("login"),S("omit")])),pkce:h(B()),pkceMethod:h(D([S("plain"),S("S256")])),authorizationMethod:h(U(Lr)),grantType:h(D([U(dt),S(Er)])),extra:h(w(a(),a()))}),Si=p({access_token:a(),props:h($i),data:w(a(),nt())}),jr=p({...de.shape,...$l.shape,...C(Si,"OAUTH2").shape});var Be=D([Ur,Mr,Ii,jr,Re]),ht="Connection",Fr={SecretText(e){return{...e,valueSchema:void 0,type:"SECRET_TEXT"}},OAuth2(e){return{...e,valueSchema:void 0,type:"OAUTH2",displayName:e.displayName||ht}},BasicAuth(e){return{...e,valueSchema:void 0,type:"BASIC_AUTH",displayName:e.displayName||ht,required:!0}},CustomAuth(e){return{...e,valueSchema:void 0,type:"CUSTOM_AUTH",displayName:e.displayName||ht}},OIDC(e){return{...e,valueSchema:void 0,type:"OIDC",displayName:e.displayName||ht}},None(){}};var LE={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(O(),"CUSTOM").shape,code:a()});var Al=D([Cr,Be]),Br=w(a(),Al),i$=w(a(),Cr);var Ai=D([p({strategy:S("CRON"),cronExpression:a()}),p({strategy:S("NONE")})]),Ze=class{constructor(t,r,n,i,u,c,l,g,f,x,$,_,s,d,y,m,v,P,L){this.name=t;this.displayName=r;this.description=n;this.requireAuth=i;this.props=u;this.type=c;this.handshakeConfiguration=l;this.onHandshake=g;this.renewConfiguration=f;this.onRenew=x;this.onEnable=$;this.onDisable=_;this.onStart=s;this.run=d;this.test=y;this.sampleData=m;this.testStrategy=v;this.outputSchema=P;this.aiMetadata=L}static{o(this,"ITrigger")}},Ht=o(e=>{switch(e.type){case"WEBHOOK":return new Ze(e.name,e.displayName,e.description,e.requireAuth??!0,e.props,e.type,e.handshakeConfiguration??{strategy:"NONE"},e.onHandshake??(async()=>({status:200})),e.renewConfiguration??{strategy:"NONE"},e.onRenew??(async()=>Promise.resolve()),e.onEnable,e.onDisable,e.onStart??(async()=>Promise.resolve()),e.run,e.test??(()=>Promise.resolve([e.sampleData])),e.sampleData,e.test?"TEST_FUNCTION":"SIMULATION",e.outputSchema,e.aiMetadata);case"POLLING":return new Ze(e.name,e.displayName,e.description,e.requireAuth??!0,e.props,e.type,{strategy:"NONE"},async()=>({status:200}),{strategy:"NONE"},(async()=>Promise.resolve()),e.onEnable,e.onDisable,e.onStart??(async()=>Promise.resolve()),e.run,e.test??(()=>Promise.resolve([e.sampleData])),e.sampleData,"TEST_FUNCTION",e.outputSchema,e.aiMetadata);case"MANUAL":return new Ze(e.name,e.displayName,e.description,e.requireAuth??!0,e.props,e.type,{strategy:"NONE"},async()=>({status:200}),{strategy:"NONE"},(async()=>Promise.resolve()),e.onEnable,e.onDisable,e.onStart??(async()=>Promise.resolve()),e.run,e.test??(()=>Promise.resolve([e.sampleData])),e.sampleData,"TEST_FUNCTION",e.outputSchema,e.aiMetadata);case"APP_WEBHOOK":return new Ze(e.name,e.displayName,e.description,e.requireAuth??!0,e.props,e.type,{strategy:"NONE"},async()=>({status:200}),{strategy:"NONE"},(async()=>Promise.resolve()),e.onEnable,e.onDisable,e.onStart??(async()=>Promise.resolve()),e.run,e.test??(()=>Promise.resolve([e.sampleData])),e.sampleData,ie(e.sampleData)&&ie(e.test)?"SIMULATION":"TEST_FUNCTION",e.outputSchema,e.aiMetadata)}},"createTrigger");var zi="2",Gt="0.82.0";var Zr=class{constructor(t,r,n,i,u,c,l,g,f=Gt,x,$="",_){this.displayName=t;this.logoUrl=r;this.authors=n;this.events=i;this.categories=l;this.auth=g;this.minimumSupportedRelease=f;this.maximumSupportedRelease=x;this.description=$;this.deprecated=_;this._actions={};this._triggers={};this.getContextInfo=o(()=>({version:zi}),"getContextInfo");(!zl(f)||kl(f,Gt))&&(this.minimumSupportedRelease=Gt),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}},ki=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 Zr(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 kl(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(kl,"isSemverLessThan");var Ol=h(w(a(),w(a(),a()))),Oi=p({id:h(a()),name:a(),displayName:a(),logoUrl:a(),description:a(),authors:N(a()),platformId:h(a()),directoryPath:h(a()),auth:h(D([Be,N(Be)])),version:a(),categories:h(N(U(Le))),minimumSupportedRelease:h(a()),maximumSupportedRelease:h(a()),deprecated:h(B()),i18n:Ol}),wl=U(["human","ai","both"]),wi=p({description:h(a()),idempotent:h(B())}),Ri=p({name:a(),displayName:a(),description:a(),props:Br,requireAuth:B(),errorHandlingOptions:h(br),outputSchema:h(Mt()),audience:h(wl),aiMetadata:h(wi)}),Ni=p({name:a(),displayName:a(),description:a(),props:Br,errorHandlingOptions:h(br),type:U(xe),sampleData:O(),handshakeConfiguration:h(Mt()),renewConfiguration:h(Ai),testStrategy:U(ft),outputSchema:h(Mt()),aiMetadata:h(wi)}),Rl=p({...Oi.shape,actions:w(a(),Ri),triggers:w(a(),Ni)}),Nl=p({...Oi.shape,actions:ee(),triggers:ee(),suggestedActions:h(N(Ri)),suggestedTriggers:h(N(Ni))}),Di=p({projectUsage:ee(),pieceType:U(Me),packageType:U(pt),platformId:h(a()),archiveId:h(a())}),iS=p({...Rl.shape,...Di.shape}),aS=p({...Nl.shape,...Di.shape}),sS=p({name:a(),version:a()});var Dl=De(require("path")),Cl=De(require("fs/promises"));var Li=require("node:stream");var Wt=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 qt=class{static{o(this,"DelegatingAuthenticationConverter")}constructor(t=new Vr,r=new Hr){this.converters={BEARER_TOKEN:t,BASIC:r}}convert(t,r){return this.converters[t.type].convert(t,r)}},Vr=class{static{o(this,"BearerTokenAuthenticationConverter")}convert(t,r){return r.Authorization=`Bearer ${t.token}`,r}},Hr=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 vt=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 Ci({error:e,requestBody:t}){return e instanceof vt?e.errorMessage():{response:{status:0,body:e instanceof Error?e.message:String(e)},request:{body:t}}}o(Ci,"toFailsafeOutput");var xt=(c=>(c.GET="GET",c.POST="POST",c.PATCH="PATCH",c.PUT="PUT",c.DELETE="DELETE",c.HEAD="HEAD",c))(xt||{});var Kt=class extends Wt{static{o(this,"FetchHttpClient")}constructor(t="",r=new qt){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[L,re]of Object.entries(c))i.append(L,re);let l=i.toString(),g=l?`${n}?${l}`:n,f=t.responseType??"json",x=t.followRedirects??!0,$=t.retries??0,{body:_,extraHeaders:s,isStream:d}=Ul(t.method)?Ml(t.body,u):{body:void 0,extraHeaders:{},isStream:!1},y=jl({...u,...s}),m=await Ll(async()=>{let L=new AbortController,re=t.timeout&&t.timeout>0?setTimeout(()=>L.abort(),t.timeout):void 0;try{let se={method:t.method.toString(),headers:y,body:_,redirect:x?"follow":"manual",signal:L.signal};return d&&(se.duplex="half"),r?.dispatcher!==void 0&&(se.dispatcher=r.dispatcher),await fetch(g,se)}finally{re!==void 0&&clearTimeout(re)}},$),v=x?300:400;if(m.status<200||m.status>=v){let L=await Ui(m,f),re=new vt(t.body,{status:m.status,responseBody:L});throw console.error("[HttpClient#(sanitized error message)] Request failed:",re),re}let P=await Ui(m,f);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 Li.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 Ui(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(Ui,"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 Mi(n);continue}return i}catch(i){if(r=i,n<t){await Mi(n);continue}throw i}throw r}o(Ll,"sendWithRetries");function Mi(e){let t=Math.min(1e3*2**e,3e4);return new Promise(r=>setTimeout(r,t))}o(Mi,"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 Ve=new Kt;var kd=De(require("fs")),Hs=De(Vs());var Od={"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 Od[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 Gs({auth:e,baseUrl:t,authMapping:r,description:n,displayName:i,name:u,props:c,extraProps:l,authLocation:g="headers"}){return Q({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:I.DynamicProperties({auth:e,displayName:"",required:!0,refreshers:[],props:o(async({auth:f})=>({url:I.ShortText({displayName:"URL",description:`You can either use the full URL or the relative path to the base URL
|
|
3
|
+
i.e ${Nd(t,f)}/resource or /resource`,required:!0,defaultValue:f?t(f):"",...c?.url??{}})}),"props")}),method:I.StaticDropdown({displayName:"Method",required:!0,options:{options:Object.values(xt).map(f=>({label:f,value:f}))},...c?.method??{}}),headers:I.Object({displayName:"Headers",description:"Authorization headers are injected automatically from your connection.",required:!0,...c?.headers??{}}),queryParams:I.Object({displayName:"Query Parameters",required:!0,...c?.queryParams??{}}),body_type:I.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:I.DynamicProperties({auth:e,displayName:"Body",refreshers:["body_type"],required:!1,props:o(async({body_type:f})=>{if(!f)return{};let x=f,$={};switch(x){case"none":break;case"json":$.data=I.Json({displayName:"JSON Body",required:!0,...c?.body??{}});break;case"raw":$.data=I.LongText({displayName:"Raw Body",required:!0});break;case"form_data":$.data=I.Array({displayName:"Form Data",required:!0,properties:{fieldName:I.ShortText({displayName:"Field Name",required:!0}),fieldType:I.StaticDropdown({displayName:"Field Type",required:!0,options:{disabled:!1,options:[{label:"Text",value:"text"},{label:"File",value:"file"}]}}),textFieldValue:I.LongText({displayName:"Text Field Value",required:!1}),fileFieldValue:I.File({displayName:"File Field Value",required:!1})}});break}return $},"props")}),response_is_binary:I.Checkbox({displayName:"Response is Binary ?",description:"Enable for files like PDFs, images, etc.",required:!1,defaultValue:!1}),failsafe:I.Checkbox({displayName:"No Error on Failure",required:!1,...c?.failsafe??{}}),timeout:I.Number({displayName:"Timeout (in seconds)",required:!1,...c?.timeout??{}}),followRedirects:I.Checkbox({displayName:"Follow redirects",required:!1,defaultValue:!1}),...l},run:o(async f=>{let{method:x,url:$,headers:_,queryParams:s,body:d,body_type:y,failsafe:m,timeout:v,response_is_binary:P,followRedirects:L}=f.propsValue;Bt(x,"Method"),Bt($,"URL");let re=ie(r)?{}:await r(f.auth,f.propsValue),se=$.url,Je=se.startsWith("http://")||se.startsWith("https://")?se:Rd({baseUrl:t(f.auth),relativePath:se}),Pe={method:x,url:Je,headers:{..._??{},...g==="headers"||!ie(g)?re:{}},queryParams:{...g==="queryParams"?re:{},...s??{}},timeout:v?v*1e3:0,followRedirects:L};if(P&&(Pe.responseType="arraybuffer"),d)if(y&&y!=="none"){let me=d.data;if(y==="form_data"){let ru=me,Tt=new Hs.default;for(let{fieldName:mn,fieldType:fn,textFieldValue:gn,fileFieldValue:ar}of ru)fn==="text"&&!gt(gn)?Tt.append(mn,gn):fn==="file"&&!gt(ar)&&Tt.append(mn,ar.data,{filename:ar?.filename});Pe.body=Tt,Pe.headers={...Pe.headers,...Tt.getHeaders()}}else Pe.body=me}else y||(Pe.body=d);try{let me=await Ve.sendRequest(Pe);return await Dd(f.files,me.body,me.status,me.headers,P)}catch(me){if(m)return Ci({error:me,requestBody:Pe.body});throw me}},"run")})}o(Gs,"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",g;t instanceof ArrayBuffer?g=Buffer.from(new Uint8Array(t)):Buffer.isBuffer(t)?g=t:g=Buffer.from(t),u=await e.write({fileName:`output.${l}`,data:g})}else u=t;return{status:r,headers:n,body:u}},"handleBinaryResponse"),Cd=o(e=>e instanceof ArrayBuffer||Buffer.isBuffer(e),"isBinaryBody");var V=Fr.SecretText({displayName:"API Key",description:`To get your FeedHive API key:
|
|
4
4
|
1. Log in to your FeedHive account.
|
|
5
5
|
2. Go to **Settings** \u2192 **Account** (or **Workspace**).
|
|
6
6
|
3. Find the **API Key** section and copy your key.
|
|
7
7
|
|
|
8
|
-
Your key starts with \`fh_\`.`,required:!0,validate:o(async({auth:e})=>{try{return await
|
|
8
|
+
Your key starts with \`fh_\`.`,required:!0,validate:o(async({auth:e})=>{try{return await Ve.sendRequest({method:"GET",url:"https://api.feedhive.com/status",authentication:{type:"BEARER_TOKEN",token:e}}),{valid:!0}}catch{return{valid:!1,error:"Invalid API key. Make sure you copied it correctly from FeedHive Settings."}}},"validate")});var Md="https://api.feedhive.com",Ld=I.MultiSelectDropdown({displayName:"Social Accounts",description:"Select the social media accounts to publish this post to.",refreshers:[],required:!1,auth:V,options:o(async({auth:e})=>{if(!e)return{disabled:!0,options:[],placeholder:"Please connect your account first"};try{return{disabled:!1,options:((await ir({token:e.secret_text,method:"GET",path:"/socials"})).body.data??[]).filter(r=>r.status==="active").map(r=>({label:`${r.display_name} (@${r.handle}) \u2014 ${r.platform}`,value:r.id}))}}catch{return{disabled:!0,options:[],placeholder:"Failed to load social accounts. Check your connection."}}},"options")}),jd=I.MultiSelectDropdown({displayName:"Labels",description:"Optionally assign labels to organise this post in FeedHive.",refreshers:[],required:!1,auth:V,options:o(async({auth:e})=>{if(!e)return{disabled:!0,options:[],placeholder:"Please connect your account first"};try{return{disabled:!1,options:((await ir({token:e.secret_text,method:"GET",path:"/labels"})).body.data?.items??[]).map(r=>({label:r.title,value:r.id}))}}catch{return{disabled:!0,options:[],placeholder:"Failed to load labels. Check your connection."}}},"options")}),Fd=I.Dropdown({displayName:"Post",description:"Select the post you want to act on.",refreshers:[],required:!0,auth:V,options:o(async({auth:e})=>{if(!e)return{disabled:!0,options:[],placeholder:"Please connect your account first"};try{return{disabled:!1,options:((await ir({token:e.secret_text,method:"GET",path:"/posts",queryParams:{limit:"100"}})).body.data?.items??[]).map(r=>({label:`${r.text?r.text.slice(0,60)+(r.text.length>60?"\u2026":""):"(no text)"} [${r.status}]`,value:r.id}))}}catch{return{disabled:!0,options:[],placeholder:"Failed to load posts. Check your connection."}}},"options")}),Z={socialsMultiDropdown:Ld,labelsMultiDropdown:jd,postDropdown:Fd,apiCall:ir,flattenPost:Bd};async function ir({token:e,method:t,path:r,body:n,queryParams:i}){return Ve.sendRequest({method:t,url:`${Md}${r}`,authentication:{type:"BEARER_TOKEN",token:e},queryParams:i,body:n})}o(ir,"apiCall");function Bd(e){let t=e.approval;return{id:e.id??null,status:e.status??null,text:e.text??null,accounts:Array.isArray(e.accounts)&&e.accounts.length>0?e.accounts.join(", "):null,labels:Array.isArray(e.labels)&&e.labels.length>0?e.labels.join(", "):null,media:Array.isArray(e.media)&&e.media.length>0?e.media.join(", "):null,notes:e.notes??null,short_link_enabled:e.short_link_enabled??null,scheduled_at:e.scheduled_at??null,published_at:e.published_at??null,slot_id:e.slot_id??null,approval_status:t?.status??null,approval_is_approved:t?.is_approved??null,approval_approved_at:t?.approved_at??null,created_at:e.created_at??null,updated_at:e.updated_at??null}}o(Bd,"flattenPost");var Zd={post_published:"published",post_scheduled:"scheduled",post_failed:"failed"},Ws=Ht({auth:V,name:"post_notification",displayName:"Post Notification",description:"Triggers when a post is published, scheduled, or fails.",aiMetadata:{description:"Fires via webhook when a FeedHive post changes state \u2014 published, scheduled, or failed \u2014 depending on which notification event type is configured in FeedHive. Represents a lifecycle event for a single post, carrying its ID, excerpt, and target social account."},props:{event_type:I.StaticDropdown({displayName:"Event Type",description:"Choose the event type you will configure in FeedHive. This is used to load sample data when testing the trigger \u2014 it does not filter incoming webhooks.",required:!0,defaultValue:"post_published",options:{options:[{label:"Post Published",value:"post_published"},{label:"Post Scheduled",value:"post_scheduled"},{label:"Post Failed",value:"post_failed"}]}}),instructions:I.MarkDown({value:`### Setup Instructions
|
|
9
9
|
|
|
10
10
|
1. Enable this flow and copy the **Webhook URL** shown below.
|
|
11
11
|
\`\`\`text
|
|
@@ -13,7 +13,7 @@ Your key starts with \`fh_\`.`,required:!0,validate:o(async({auth:e})=>{try{retu
|
|
|
13
13
|
\`\`\`
|
|
14
14
|
2. In FeedHive, go to **Settings \u2192 Automation \u2192 Notifications**.
|
|
15
15
|
3. Click **Create New Notification**.
|
|
16
|
-
4. Choose the matching event type and paste the Webhook URL, then click **Save**.`})},sampleData:{post_id:"xxxx-abcd-1234",post_excerpt:"This is the first part of the post caption...",social_type:"Facebook",social_name:"My Facebook Page",public_id:"123456789101112_1314151617181920",public_url:"https://www.facebook.com/xxxx/posts/yyyy",post:{content:[{text:"Full post caption.",media:[]}],labels:["Marketing"],postNotes:"Internal notes"}},type:"WEBHOOK",async onEnable(e){},async onDisable(e){},async run(e){return[e.payload.body]},async test(e){let t=e.propsValue.event_type??"post_published",r=
|
|
16
|
+
4. Choose the matching event type and paste the Webhook URL, then click **Save**.`})},sampleData:{post_id:"xxxx-abcd-1234",post_excerpt:"This is the first part of the post caption...",social_type:"Facebook",social_name:"My Facebook Page",public_id:"123456789101112_1314151617181920",public_url:"https://www.facebook.com/xxxx/posts/yyyy",post:{content:[{text:"Full post caption.",media:[]}],labels:["Marketing"],postNotes:"Internal notes"}},type:"WEBHOOK",async onEnable(e){},async onDisable(e){},async run(e){return[e.payload.body]},async test(e){let t=e.propsValue.event_type??"post_published",r=Zd[t]??"published";return((await Z.apiCall({token:e.auth.secret_text,method:"GET",path:"/posts",queryParams:{limit:"5",status:r}})).body.data?.items??[]).map(u=>Vd(t,u))}});function Vd(e,t){let r=typeof t.text=="string"?t.text.slice(0,100)+(t.text.length>100?"...":""):"(no text)",n={content:[{text:t.text??"",media:t.media??[]}],labels:t.labels??[],postNotes:t.notes??""},i={post_id:t.id??null,post_excerpt:r,post:n};switch(e){case"post_published":return{...i,social_type:"(see FeedHive notification)",social_name:"(see FeedHive notification)",public_id:null,public_url:null};case"post_scheduled":return{...i,schedule_at:t.scheduled_at??null,pending_approval:!1,social_types:"(see FeedHive notification)"};case"post_failed":return{...i,failed_at:t.updated_at??null,message:"(see FeedHive notification)",social_type:"(see FeedHive notification)",social_name:"(see FeedHive notification)"};default:return i}}o(Vd,"buildSamplePayload");var qs=Ht({auth:V,name:"comment_notification",displayName:"Comment Notification",description:"Triggers when a comment is added to one of your posts.",aiMetadata:{description:"Fires via webhook when a new comment is added to one of your FeedHive posts. Represents a single incoming comment, carrying the comment text and author details along with the related post."},props:{instructions:I.MarkDown({value:`### Setup Instructions
|
|
17
17
|
|
|
18
18
|
1. Enable this flow and copy the **Webhook URL** shown below.
|
|
19
19
|
\`\`\`text
|
|
@@ -21,13 +21,13 @@ Your key starts with \`fh_\`.`,required:!0,validate:o(async({auth:e})=>{try{retu
|
|
|
21
21
|
\`\`\`
|
|
22
22
|
2. In FeedHive, go to **Settings \u2192 Automation \u2192 Notifications**.
|
|
23
23
|
3. Click **Create New Notification**.
|
|
24
|
-
4. Choose **Comment Added** and paste the Webhook URL, then click **Save**.`})},sampleData:{post_id:"xxxx-abcd-1234",comment_id:"yyyy-zxyw-4321",commented_at:"2024-08-01T12:00:00.000Z",commented_by:"zzzz-efgh-5678",commented_by_name:"John Doe",commented_by_email:"johndoe@gmail.com",comment_text:"Great post. Perhaps add another image?",post_excerpt:"This is the first part of the post caption...",post:{content:[{text:"Full post caption.",media:[]}],labels:["Marketing"],postNotes:"Internal notes"}},type:"WEBHOOK",async onEnable(e){},async onDisable(e){},async run(e){return[e.payload.body]},async test(e){return((await
|
|
24
|
+
4. Choose **Comment Added** and paste the Webhook URL, then click **Save**.`})},sampleData:{post_id:"xxxx-abcd-1234",comment_id:"yyyy-zxyw-4321",commented_at:"2024-08-01T12:00:00.000Z",commented_by:"zzzz-efgh-5678",commented_by_name:"John Doe",commented_by_email:"johndoe@gmail.com",comment_text:"Great post. Perhaps add another image?",post_excerpt:"This is the first part of the post caption...",post:{content:[{text:"Full post caption.",media:[]}],labels:["Marketing"],postNotes:"Internal notes"}},type:"WEBHOOK",async onEnable(e){},async onDisable(e){},async run(e){return[e.payload.body]},async test(e){return((await Z.apiCall({token:e.auth.secret_text,method:"GET",path:"/posts",queryParams:{limit:"5",status:"published"}})).body.data?.items??[]).map(n=>{let i=typeof n.text=="string"?n.text.slice(0,100)+(n.text.length>100?"...":""):"(no text)";return{post_id:n.id??null,comment_id:null,commented_at:null,commented_by:null,commented_by_name:"(see FeedHive notification)",commented_by_email:"(see FeedHive notification)",comment_text:"(see FeedHive notification)",post_excerpt:i,post:{content:[{text:n.text??"",media:n.media??[]}],labels:n.labels??[],postNotes:n.notes??""}}})}});var Ks=Q({auth:V,name:"create_post",displayName:"Create Post",description:"Creates a new post in FeedHive (draft or scheduled).",audience:"both",aiMetadata:{description:'Creates a new FeedHive social media post from provided text, either saved as a draft or scheduled for a chosen publish date (set Status to "scheduled" and supply a date/time). Use to author and queue content for one or more connected social accounts. Each call creates a separate post, so it is not idempotent.',idempotent:!1},props:{text:I.LongText({displayName:"Post Text",description:"The main content of your post.",required:!0}),status:I.StaticDropdown({displayName:"Status",description:'Choose "Draft" to save without scheduling, or "Scheduled" to set a publish date.',required:!0,defaultValue:"draft",options:{options:[{label:"Draft",value:"draft"},{label:"Scheduled",value:"scheduled"}]}}),scheduled_at:I.DateTime({displayName:"Scheduled Date & Time",description:'Required when Status is "Scheduled". The exact date and time the post should be published.',required:!1}),accounts:Z.socialsMultiDropdown,labels:Z.labelsMultiDropdown,notes:I.LongText({displayName:"Internal Notes",description:"Private notes visible only to your team in FeedHive. Not published.",required:!1}),short_link_enabled:I.Checkbox({displayName:"Enable Short Links",description:"Automatically shorten URLs in your post text.",required:!1,defaultValue:!1})},async run(e){let{text:t,status:r,scheduled_at:n,accounts:i,labels:u,notes:c,short_link_enabled:l}=e.propsValue;if(r==="scheduled"&&!n)throw new Error('Scheduled Date & Time is required when Status is set to "Scheduled".');let g={text:t,status:r};i&&i.length>0&&(g.accounts=i),u&&u.length>0&&(g.labels=u),n&&(g.scheduled_at=n),c&&(g.notes=c),l!==void 0&&(g.short_link_enabled=l);let f=await Z.apiCall({token:e.auth.secret_text,method:"POST",path:"/posts",body:g});return Z.flattenPost(f.body.data)}});var Js=Q({auth:V,name:"update_post",displayName:"Update Post",description:"Updates an existing post in FeedHive. Only the fields you fill in will be changed.",audience:"both",aiMetadata:{description:"Updates an existing FeedHive post identified by its post ID; only the fields you supply (text, status, schedule, accounts, labels, notes) are changed, leaving the rest intact. Use to edit or reschedule a draft or scheduled post. Idempotent: applying the same field values repeatedly leaves the post in the same state.",idempotent:!0},props:{post_id:Z.postDropdown,text:I.LongText({displayName:"Post Text",description:"The new content of the post. Leave empty to keep the current text.",required:!1}),status:I.StaticDropdown({displayName:"Status",description:"Change the post status. Leave empty to keep the current status.",required:!1,options:{options:[{label:"Draft",value:"draft"},{label:"Scheduled",value:"scheduled"}]}}),scheduled_at:I.DateTime({displayName:"Scheduled Date & Time",description:"Update the scheduled publish date and time.",required:!1}),accounts:Z.socialsMultiDropdown,labels:Z.labelsMultiDropdown,notes:I.LongText({displayName:"Internal Notes",description:"Update the private notes for this post.",required:!1}),short_link_enabled:I.Checkbox({displayName:"Enable Short Links",description:"Automatically shorten URLs in the post text.",required:!1})},async run(e){let{post_id:t,text:r,status:n,scheduled_at:i,accounts:u,labels:c,notes:l,short_link_enabled:g}=e.propsValue,f={};r&&(f.text=r),n&&(f.status=n),i&&(f.scheduled_at=i),u&&u.length>0&&(f.accounts=u),c!==void 0&&(f.labels=c??[]),l&&(f.notes=l),g!=null&&(f.short_link_enabled=g);let x=await Z.apiCall({token:e.auth.secret_text,method:"PATCH",path:`/posts/${t}`,body:f});return Z.flattenPost(x.body.data)}});var Xs=Q({auth:V,name:"get_post",displayName:"Get Post",description:"Retrieves the details of a specific post.",audience:"both",aiMetadata:{description:"Fetches the full details of a single FeedHive post by its post ID. Use to read a post's current content, status, schedule, accounts, and labels before acting on it. Read-only and idempotent.",idempotent:!0},props:{post_id:Z.postDropdown},async run(e){let t=await Z.apiCall({token:e.auth.secret_text,method:"GET",path:`/posts/${e.propsValue.post_id}`});return Z.flattenPost(t.body.data)}});var Ys=Q({auth:V,name:"delete_post",displayName:"Delete Post",description:"Deletes a post from FeedHive. This action cannot be undone.",audience:"both",aiMetadata:{description:"Permanently deletes a FeedHive post by its post ID; this cannot be undone. Use to remove a draft or scheduled post you no longer want. Idempotent: once the post is gone, repeating the call leaves it deleted with no further effect.",idempotent:!0},props:{post_id:Z.postDropdown},async run(e){return await Z.apiCall({token:e.auth.secret_text,method:"DELETE",path:`/posts/${e.propsValue.post_id}`}),{success:!0,deleted_post_id:e.propsValue.post_id}}});var Qs=Q({auth:V,name:"list_posts",displayName:"List Posts",description:"Returns a list of posts, optionally filtered by status or labels.",audience:"both",aiMetadata:{description:"Lists FeedHive posts, optionally narrowed by status (draft, scheduled, publishing, published, failed) and/or labels; leaving both filters empty returns all posts up to the result limit (max 100). Use to discover post IDs or survey the content queue. Read-only and idempotent.",idempotent:!0},props:{status:I.StaticDropdown({displayName:"Filter by Status",description:"Only return posts with this status. Leave empty to return all posts.",required:!1,options:{options:[{label:"Draft",value:"draft"},{label:"Scheduled",value:"scheduled"},{label:"Publishing",value:"publishing"},{label:"Published",value:"published"},{label:"Failed",value:"failed"}]}}),labels:Z.labelsMultiDropdown,limit:I.Number({displayName:"Maximum Results",description:"Maximum number of posts to return. Between 1 and 100.",required:!1,defaultValue:20})},async run(e){let{status:t,labels:r,limit:n}=e.propsValue,i={limit:String(Math.min(n??20,100))};return t&&(i.status=t),r&&r.length>0&&(i.labels=r.join(",")),((await Z.apiCall({token:e.auth.secret_text,method:"GET",path:"/posts",queryParams:i})).body.data?.items??[]).map(c=>Z.flattenPost(c))}});var eu=Q({auth:V,name:"create_label",displayName:"Create Label",description:"Creates a new label in FeedHive for organising posts.",audience:"both",aiMetadata:{description:"Creates a new label in FeedHive that can later be attached to posts for organisation. Use when a label an agent needs does not yet exist. Not idempotent: each call creates a new label even if one with the same title already exists.",idempotent:!1},props:{title:I.ShortText({displayName:"Label Name",description:'The name of the label (e.g. "Campaign Q1", "Evergreen Content").',required:!0})},async run(e){let t=await Z.apiCall({token:e.auth.secret_text,method:"POST",path:"/labels",body:{title:e.propsValue.title}});return{id:t.body.data?.id??null,title:t.body.data?.title??null}}});var tu=Q({auth:V,name:"fire_workflow_trigger",displayName:"Create Post via Trigger",description:"Fires a FeedHive Workflow Trigger to create a post. The workflow defines which accounts to post to, the AI model to use, and any default content.",audience:"both",aiMetadata:{description:"Fires a pre-configured FeedHive workflow trigger (identified by its Trigger ID) to create a post, letting the workflow decide accounts, AI model, and defaults; you can optionally override with explicit text, an AI prompt, schedule, media URLs, title/link, or template variables that fill [[placeholder]] tokens in the workflow template. Use when posting through an existing FeedHive workflow rather than building the post directly. Not idempotent: each call fires the workflow and creates a new post.",idempotent:!1},props:{setup_instructions:I.MarkDown({value:`### How to find your Trigger ID
|
|
25
25
|
|
|
26
26
|
1. In FeedHive, open the **Workflows** section in the sidebar.
|
|
27
27
|
2. Open the workflow you want to fire.
|
|
28
28
|
3. In the workflow settings, copy the **Trigger ID** (a short alphanumeric code).
|
|
29
29
|
|
|
30
|
-
**Note:** You can also pass custom template variables \u2014 if your workflow content contains placeholders like \`[[first_name]]\`, add them in the **Template Variables** field below.`}),trigger_id:I.ShortText({displayName:"Trigger ID",description:"The ID of your FeedHive workflow trigger. Found in FeedHive \u2192 Workflows \u2192 your workflow settings.",required:!0}),text:I.LongText({displayName:"Post Text",description:"The content of the post. Leave empty to let your workflow generate or use a template.",required:!1}),prompt:I.LongText({displayName:"AI Prompt",description:"Ask FeedHive AI to generate the post content. Only used if your workflow is configured for AI generation.",required:!1}),scheduled:I.DateTime({displayName:"Scheduled Date & Time",description:"When to publish the post. Leave empty to use the schedule defined in the workflow.",required:!1}),media_urls:I.Array({displayName:"Media URLs",description:"Public URLs of images or videos to include in the post (e.g. https://example.com/photo.jpg).",required:!1}),title:I.ShortText({displayName:"Title",description:"Post title \u2014 only applicable for YouTube, Google My Business, and Pinterest posts.",required:!1}),link:I.ShortText({displayName:"Link URL",description:"A URL to attach to the post \u2014 only applicable for YouTube, Google My Business, and Pinterest posts.",required:!1}),template_variables:I.Object({displayName:"Template Variables",description:"If your workflow template uses placeholders like [[first_name]], provide them here as key-value pairs (e.g. first_name \u2192 John). Each key maps directly to a [[placeholder]] in your template.",required:!1})},async run(e){let{trigger_id:t,text:r,prompt:n,scheduled:i,media_urls:u,title:c,link:
|
|
30
|
+
**Note:** You can also pass custom template variables \u2014 if your workflow content contains placeholders like \`[[first_name]]\`, add them in the **Template Variables** field below.`}),trigger_id:I.ShortText({displayName:"Trigger ID",description:"The ID of your FeedHive workflow trigger. Found in FeedHive \u2192 Workflows \u2192 your workflow settings.",required:!0}),text:I.LongText({displayName:"Post Text",description:"The content of the post. Leave empty to let your workflow generate or use a template.",required:!1}),prompt:I.LongText({displayName:"AI Prompt",description:"Ask FeedHive AI to generate the post content. Only used if your workflow is configured for AI generation.",required:!1}),scheduled:I.DateTime({displayName:"Scheduled Date & Time",description:"When to publish the post. Leave empty to use the schedule defined in the workflow.",required:!1}),media_urls:I.Array({displayName:"Media URLs",description:"Public URLs of images or videos to include in the post (e.g. https://example.com/photo.jpg).",required:!1}),title:I.ShortText({displayName:"Title",description:"Post title \u2014 only applicable for YouTube, Google My Business, and Pinterest posts.",required:!1}),link:I.ShortText({displayName:"Link URL",description:"A URL to attach to the post \u2014 only applicable for YouTube, Google My Business, and Pinterest posts.",required:!1}),template_variables:I.Object({displayName:"Template Variables",description:"If your workflow template uses placeholders like [[first_name]], provide them here as key-value pairs (e.g. first_name \u2192 John). Each key maps directly to a [[placeholder]] in your template.",required:!1})},async run(e){let{trigger_id:t,text:r,prompt:n,scheduled:i,media_urls:u,title:c,link:l,template_variables:g}=e.propsValue,f={...g??{}};return r&&(f.text=r),n&&(f.prompt=n),i&&(f.scheduled=i),u&&u.length>0&&(f.media_urls=u),c&&(f.title=c),l&&(f.link=l),{success:(await Z.apiCall({token:e.auth.secret_text,method:"POST",path:`/triggers/${t}`,body:f})).body.success??!0}}});var Hd=ki({displayName:"FeedHive",description:"Schedule, manage and publish social media content with FeedHive.",minimumSupportedRelease:"0.36.1",logoUrl:"https://cdn.activepieces.com/pieces/feedhive.png",categories:["MARKETING"],auth:V,authors:["bst1n"],actions:[Ks,Js,Xs,Ys,Qs,eu,tu,Gs({baseUrl:o(()=>"https://api.feedhive.com","baseUrl"),auth:V,authMapping:o(async e=>({Authorization:`Bearer ${e.secret_text}`}),"authMapping")})],triggers:[Ws,qs]});0&&(module.exports={feedhive,feedhiveAuth});
|
|
31
31
|
/*! Bundled license information:
|
|
32
32
|
|
|
33
33
|
mime-types/index.js:
|