@activepieces/piece-messagebird 0.2.5 → 0.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +7 -13
- package/src/index.js +13 -36
- package/src/index.d.ts +0 -6
- package/src/index.d.ts.map +0 -1
- package/src/index.js.map +0 -1
- package/src/lib/actions/list-messages.d.ts +0 -11
- package/src/lib/actions/list-messages.d.ts.map +0 -1
- package/src/lib/actions/list-messages.js +0 -73
- package/src/lib/actions/list-messages.js.map +0 -1
- package/src/lib/actions/send-sms.action.d.ts +0 -11
- package/src/lib/actions/send-sms.action.d.ts.map +0 -1
- package/src/lib/actions/send-sms.action.js +0 -66
- package/src/lib/actions/send-sms.action.js.map +0 -1
- package/src/lib/auth.d.ts +0 -11
- package/src/lib/auth.d.ts.map +0 -1
- package/src/lib/auth.js +0 -25
- package/src/lib/auth.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,17 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@activepieces/piece-messagebird",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.7",
|
|
4
4
|
"main": "./src/index.js",
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
"@activepieces/pieces-common": "0.12.3",
|
|
12
|
-
"@activepieces/pieces-framework": "0.30.0",
|
|
13
|
-
"@activepieces/shared": "0.87.1",
|
|
14
|
-
"dayjs": "1.11.9",
|
|
15
|
-
"tslib": "2.6.2"
|
|
16
|
-
}
|
|
5
|
+
"dependencies": {},
|
|
6
|
+
"files": [
|
|
7
|
+
"src/index.js",
|
|
8
|
+
"package.json",
|
|
9
|
+
"src/i18n"
|
|
10
|
+
]
|
|
17
11
|
}
|
package/src/index.js
CHANGED
|
@@ -1,36 +1,13 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
auth: auth_1.birdAuth,
|
|
15
|
-
minimumSupportedRelease: '0.30.0',
|
|
16
|
-
logoUrl: 'https://cdn.activepieces.com/pieces/messagebird.png',
|
|
17
|
-
categories: [shared_1.PieceCategory.MARKETING, shared_1.PieceCategory.COMMUNICATION],
|
|
18
|
-
authors: ['kishanprmr', 'geekyme', 'prasanna2000-max'],
|
|
19
|
-
actions: [
|
|
20
|
-
send_sms_action_1.sendSMSAction,
|
|
21
|
-
list_messages_1.listMessages,
|
|
22
|
-
(0, pieces_common_1.createCustomApiCallAction)({
|
|
23
|
-
baseUrl: (auth) => {
|
|
24
|
-
return auth ? 'https://api.bird.com/workspaces/' + auth.props.workspaceId : '';
|
|
25
|
-
},
|
|
26
|
-
auth: auth_1.birdAuth,
|
|
27
|
-
authMapping: (auth) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
28
|
-
return {
|
|
29
|
-
Authorization: `Bearer ${auth.props.apiKey}`,
|
|
30
|
-
};
|
|
31
|
-
})
|
|
32
|
-
}),
|
|
33
|
-
],
|
|
34
|
-
triggers: [],
|
|
35
|
-
});
|
|
36
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
"use strict";var du=Object.create;var ht=Object.defineProperty;var mu=Object.getOwnPropertyDescriptor;var fu=Object.getOwnPropertyNames;var gu=Object.getPrototypeOf,yu=Object.prototype.hasOwnProperty;var o=(e,t)=>ht(e,"name",{value:t,configurable:!0});var z=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}},wn=(e,t)=>{for(var r in t)ht(e,r,{get:t[r],enumerable:!0})},Rn=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of fu(t))!yu.call(e,i)&&i!==r&&ht(e,i,{get:()=>t[i],enumerable:!(n=mu(t,i))||n.enumerable});return e};var He=(e,t,r)=>(r=e!=null?du(gu(e)):{},Rn(t||!e||!e.__esModule?ht(r,"default",{value:e,enumerable:!0}):r,e)),hu=e=>Rn(ht({},"__esModule",{value:!0}),e);var ni=z((ri,lr)=>{(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,Z;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(Z=d-y,P=":";Z--;)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 oe=s.split(":"),pe=[];for(let be=0;be<oe.length;be++)pe.push(parseInt(oe[be],16));return pe})(),{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,Z;for(v=3;v>=0;v-=1)if(P=this.octets[v],P in m){if(Z=m[P],y&&Z!==0)return null;Z!==8&&(y=!0),d+=Z}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 Z=0;Z<v.length;Z++)y=v[Z],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 Z=7;Z>=0;Z-=1)if(v=this.parts[Z],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(Z){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${Z})`)}},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,Z;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))&&(Z=m[6]||"",d=m[1],m[1].endsWith("::")||(d=d.slice(0,-1)),d=g(d+Z,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,Z;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(Z=P[m],s.kind()===Z[0].kind()&&s.match.apply(s,Z))return v}return y},typeof lr<"u"&&lr.exports?lr.exports=x:e.ipaddr=x})(ri)});var oa=z((OA,na)=>{var ra=require("stream").Stream,Ql=require("util");na.exports=Pe;function Pe(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}o(Pe,"DelayedStream");Ql.inherits(Pe,ra);Pe.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(Pe.prototype,"readable",{configurable:!0,enumerable:!0,get:o(function(){return this.source.readable},"get")});Pe.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};Pe.prototype.resume=function(){this._released||this.release(),this.source.resume()};Pe.prototype.pause=function(){this.source.pause()};Pe.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(e){this.emit.apply(this,e)}.bind(this)),this._bufferedEvents=[]};Pe.prototype.pipe=function(){var e=ra.prototype.pipe.apply(this,arguments);return this.resume(),e};Pe.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)};Pe.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 ua=z((wA,sa)=>{var ep=require("util"),aa=require("stream").Stream,ia=oa();sa.exports=ne;function ne(){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(ne,"CombinedStream");ep.inherits(ne,aa);ne.create=function(e){var t=new this;e=e||{};for(var r in e)t[r]=e[r];return t};ne.isStreamLike=function(e){return typeof e!="function"&&typeof e!="string"&&typeof e!="boolean"&&typeof e!="number"&&!Buffer.isBuffer(e)};ne.prototype.append=function(e){var t=ne.isStreamLike(e);if(t){if(!(e instanceof ia)){var r=ia.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};ne.prototype.pipe=function(e,t){return aa.prototype.pipe.call(this,e,t),this.resume(),e};ne.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}};ne.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=ne.isStreamLike(r);n&&(r.on("data",this._checkDataSize.bind(this)),this._handleErrors(r)),this._pipeNext(r)}.bind(this))};ne.prototype._pipeNext=function(e){this._currentStream=e;var t=ne.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()};ne.prototype._handleErrors=function(e){var t=this;e.on("error",function(r){t._emitError(r)})};ne.prototype.write=function(e){this.emit("data",e)};ne.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"))};ne.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")};ne.prototype.end=function(){this._reset(),this.emit("end")};ne.prototype.destroy=function(){this._reset(),this.emit("close")};ne.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};ne.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(e))}};ne.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)};ne.prototype._emitError=function(e){this._reset(),this.emit("error",e)}});var la=z((DA,ca)=>{"use strict";ca.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 ma=z(fe=>{"use strict";var gr=la(),tp=require("path").extname,pa=/^\s*([^;\s]*)(?:;|\s|$)/,rp=/^text\//i;fe.charset=da;fe.charsets={lookup:da};fe.contentType=np;fe.extension=op;fe.extensions=Object.create(null);fe.lookup=ip;fe.types=Object.create(null);ap(fe.extensions,fe.types);function da(e){if(!e||typeof e!="string")return!1;var t=pa.exec(e),r=t&&gr[t[1].toLowerCase()];return r&&r.charset?r.charset:t&&rp.test(t[1])?"UTF-8":!1}o(da,"charset");function np(e){if(!e||typeof e!="string")return!1;var t=e.indexOf("/")===-1?fe.lookup(e):e;if(!t)return!1;if(t.indexOf("charset")===-1){var r=fe.charset(t);r&&(t+="; charset="+r.toLowerCase())}return t}o(np,"contentType");function op(e){if(!e||typeof e!="string")return!1;var t=pa.exec(e),r=t&&fe.extensions[t[1].toLowerCase()];return!r||!r.length?!1:r[0]}o(op,"extension");function ip(e){if(!e||typeof e!="string")return!1;var t=tp("x."+e).toLowerCase().substr(1);return t&&fe.types[t]||!1}o(ip,"lookup");function ap(e,t){var r=["nginx","apache",void 0,"iana"];Object.keys(gr).forEach(o(function(i){var u=gr[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(gr[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(ap,"populateMaps")});var ga=z((UA,fa)=>{fa.exports=sp;function sp(e){var t=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;t?t(e):setTimeout(e,0)}o(sp,"defer")});var cn=z((LA,ha)=>{var ya=ga();ha.exports=up;function up(e){var t=!1;return ya(function(){t=!0}),o(function(n,i){t?e(n,i):ya(o(function(){e(n,i)},"nextTick_callback"))},"async_callback")}o(up,"async")});var ln=z((FA,va)=>{va.exports=cp;function cp(e){Object.keys(e.jobs).forEach(lp.bind(e)),e.jobs={}}o(cp,"abort");function lp(e){typeof this.jobs[e]=="function"&&this.jobs[e]()}o(lp,"clean")});var pn=z((ZA,_a)=>{var xa=cn(),pp=ln();_a.exports=dp;function dp(e,t,r,n){var i=r.keyedList?r.keyedList[r.index]:r.index;r.jobs[i]=mp(t,i,e[i],function(u,c){i in r.jobs&&(delete r.jobs[i],u?pp(r):r.results[i]=c,n(u,r.results))})}o(dp,"iterate");function mp(e,t,r,n){var i;return e.length==2?i=e(r,xa(n)):i=e(r,t,xa(n)),i}o(mp,"runJob")});var dn=z((HA,Pa)=>{Pa.exports=fp;function fp(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(fp,"state")});var mn=z((WA,ba)=>{var gp=ln(),yp=cn();ba.exports=hp;function hp(e){Object.keys(this.jobs).length&&(this.index=this.size,gp(this),yp(e)(null,this.results))}o(hp,"terminator")});var Ta=z((KA,Ia)=>{var vp=pn(),xp=dn(),_p=mn();Ia.exports=Pp;function Pp(e,t,r){for(var n=xp(e);n.index<(n.keyedList||e).length;)vp(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 _p.bind(n,r)}o(Pp,"parallel")});var fn=z((XA,yr)=>{var Ea=pn(),bp=dn(),Ip=mn();yr.exports=Tp;yr.exports.ascending=$a;yr.exports.descending=Ep;function Tp(e,t,r,n){var i=bp(e,r);return Ea(e,t,i,o(function u(c,l){if(c){n(c,l);return}if(i.index++,i.index<(i.keyedList||e).length){Ea(e,t,i,u);return}n(null,i.results)},"iteratorHandler")),Ip.bind(i,n)}o(Tp,"serialOrdered");function $a(e,t){return e<t?-1:e>t?1:0}o($a,"ascending");function Ep(e,t){return-1*$a(e,t)}o(Ep,"descending")});var Aa=z((QA,Sa)=>{var $p=fn();Sa.exports=Sp;function Sp(e,t,r){return $p(e,t,null,r)}o(Sp,"serial")});var Oa=z((tz,za)=>{za.exports={parallel:Ta(),serial:Aa(),serialOrdered:fn()}});var gn=z((rz,ka)=>{"use strict";ka.exports=Object});var Ra=z((nz,wa)=>{"use strict";wa.exports=Error});var Na=z((oz,Da)=>{"use strict";Da.exports=EvalError});var Ua=z((iz,Ca)=>{"use strict";Ca.exports=RangeError});var La=z((az,Ma)=>{"use strict";Ma.exports=ReferenceError});var Fa=z((sz,ja)=>{"use strict";ja.exports=SyntaxError});var hr=z((uz,Ba)=>{"use strict";Ba.exports=TypeError});var Va=z((cz,Za)=>{"use strict";Za.exports=URIError});var Ga=z((lz,Ha)=>{"use strict";Ha.exports=Math.abs});var qa=z((pz,Wa)=>{"use strict";Wa.exports=Math.floor});var Ja=z((dz,Ka)=>{"use strict";Ka.exports=Math.max});var Ya=z((mz,Xa)=>{"use strict";Xa.exports=Math.min});var es=z((fz,Qa)=>{"use strict";Qa.exports=Math.pow});var rs=z((gz,ts)=>{"use strict";ts.exports=Math.round});var os=z((yz,ns)=>{"use strict";ns.exports=Number.isNaN||o(function(t){return t!==t},"isNaN")});var as=z((vz,is)=>{"use strict";var Ap=os();is.exports=o(function(t){return Ap(t)||t===0?t:t<0?-1:1},"sign")});var us=z((_z,ss)=>{"use strict";ss.exports=Object.getOwnPropertyDescriptor});var yn=z((Pz,cs)=>{"use strict";var vr=us();if(vr)try{vr([],"length")}catch{vr=null}cs.exports=vr});var ps=z((bz,ls)=>{"use strict";var xr=Object.defineProperty||!1;if(xr)try{xr({},"a",{value:1})}catch{xr=!1}ls.exports=xr});var hn=z((Iz,ds)=>{"use strict";ds.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 gs=z((Ez,fs)=>{"use strict";var ms=typeof Symbol<"u"&&Symbol,zp=hn();fs.exports=o(function(){return typeof ms!="function"||typeof Symbol!="function"||typeof ms("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:zp()},"hasNativeSymbols")});var vn=z((Sz,ys)=>{"use strict";ys.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var xn=z((Az,hs)=>{"use strict";var Op=gn();hs.exports=Op.getPrototypeOf||null});var _s=z((zz,xs)=>{"use strict";var kp="Function.prototype.bind called on incompatible ",wp=Object.prototype.toString,Rp=Math.max,Dp="[object Function]",vs=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"),Np=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"),Cp=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");xs.exports=o(function(t){var r=this;if(typeof r!="function"||wp.apply(r)!==Dp)throw new TypeError(kp+r);for(var n=Np(arguments,1),i,u=o(function(){if(this instanceof i){var _=r.apply(this,vs(n,arguments));return Object(_)===_?_:this}return r.apply(t,vs(n,arguments))},"binder"),c=Rp(0,r.length-n.length),l=[],g=0;g<c;g++)l[g]="$"+g;if(i=Function("binder","return function ("+Cp(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 lt=z((kz,Ps)=>{"use strict";var Up=_s();Ps.exports=Function.prototype.bind||Up});var _r=z((wz,bs)=>{"use strict";bs.exports=Function.prototype.call});var _n=z((Rz,Is)=>{"use strict";Is.exports=Function.prototype.apply});var Es=z((Dz,Ts)=>{"use strict";Ts.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var Ss=z((Nz,$s)=>{"use strict";var Mp=lt(),Lp=_n(),jp=_r(),Fp=Es();$s.exports=Fp||Mp.call(jp,Lp)});var zs=z((Cz,As)=>{"use strict";var Bp=lt(),Zp=hr(),Vp=_r(),Hp=Ss();As.exports=o(function(t){if(t.length<1||typeof t[0]!="function")throw new Zp("a function is required");return Hp(Bp,Vp,t)},"callBindBasic")});var Ns=z((Mz,Ds)=>{"use strict";var Gp=zs(),Os=yn(),ws;try{ws=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!="object"||!("code"in e)||e.code!=="ERR_PROTO_ACCESS")throw e}var Pn=!!ws&&Os&&Os(Object.prototype,"__proto__"),Rs=Object,ks=Rs.getPrototypeOf;Ds.exports=Pn&&typeof Pn.get=="function"?Gp([Pn.get]):typeof ks=="function"?o(function(t){return ks(t==null?t:Rs(t))},"getDunder"):!1});var js=z((jz,Ls)=>{"use strict";var Cs=vn(),Us=xn(),Ms=Ns();Ls.exports=Cs?o(function(t){return Cs(t)},"getProto"):Us?o(function(t){if(!t||typeof t!="object"&&typeof t!="function")throw new TypeError("getProto: not an object");return Us(t)},"getProto"):Ms?o(function(t){return Ms(t)},"getProto"):null});var bn=z((Bz,Fs)=>{"use strict";var Wp=Function.prototype.call,qp=Object.prototype.hasOwnProperty,Kp=lt();Fs.exports=Kp.call(Wp,qp)});var qs=z((Zz,Ws)=>{"use strict";var G,Jp=gn(),Xp=Ra(),Yp=Na(),Qp=Ua(),ed=La(),ft=Fa(),mt=hr(),td=Va(),rd=Ga(),nd=qa(),od=Ja(),id=Ya(),ad=es(),sd=rs(),ud=as(),Hs=Function,In=o(function(e){try{return Hs('"use strict"; return ('+e+").constructor;")()}catch{}},"getEvalledConstructor"),jt=yn(),cd=ps(),Tn=o(function(){throw new mt},"throwTypeError"),ld=jt?(function(){try{return arguments.callee,Tn}catch{try{return jt(arguments,"callee").get}catch{return Tn}}})():Tn,pt=gs()(),ce=js(),pd=xn(),dd=vn(),Gs=_n(),Ft=_r(),dt={},md=typeof Uint8Array>"u"||!ce?G:ce(Uint8Array),Xe={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?G:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?G:ArrayBuffer,"%ArrayIteratorPrototype%":pt&&ce?ce([][Symbol.iterator]()):G,"%AsyncFromSyncIteratorPrototype%":G,"%AsyncFunction%":dt,"%AsyncGenerator%":dt,"%AsyncGeneratorFunction%":dt,"%AsyncIteratorPrototype%":dt,"%Atomics%":typeof Atomics>"u"?G:Atomics,"%BigInt%":typeof BigInt>"u"?G:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?G:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?G:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?G:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Xp,"%eval%":eval,"%EvalError%":Yp,"%Float16Array%":typeof Float16Array>"u"?G:Float16Array,"%Float32Array%":typeof Float32Array>"u"?G:Float32Array,"%Float64Array%":typeof Float64Array>"u"?G:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?G:FinalizationRegistry,"%Function%":Hs,"%GeneratorFunction%":dt,"%Int8Array%":typeof Int8Array>"u"?G:Int8Array,"%Int16Array%":typeof Int16Array>"u"?G:Int16Array,"%Int32Array%":typeof Int32Array>"u"?G:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":pt&&ce?ce(ce([][Symbol.iterator]())):G,"%JSON%":typeof JSON=="object"?JSON:G,"%Map%":typeof Map>"u"?G:Map,"%MapIteratorPrototype%":typeof Map>"u"||!pt||!ce?G:ce(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Jp,"%Object.getOwnPropertyDescriptor%":jt,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?G:Promise,"%Proxy%":typeof Proxy>"u"?G:Proxy,"%RangeError%":Qp,"%ReferenceError%":ed,"%Reflect%":typeof Reflect>"u"?G:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?G:Set,"%SetIteratorPrototype%":typeof Set>"u"||!pt||!ce?G:ce(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?G:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":pt&&ce?ce(""[Symbol.iterator]()):G,"%Symbol%":pt?Symbol:G,"%SyntaxError%":ft,"%ThrowTypeError%":ld,"%TypedArray%":md,"%TypeError%":mt,"%Uint8Array%":typeof Uint8Array>"u"?G:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?G:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?G:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?G:Uint32Array,"%URIError%":td,"%WeakMap%":typeof WeakMap>"u"?G:WeakMap,"%WeakRef%":typeof WeakRef>"u"?G:WeakRef,"%WeakSet%":typeof WeakSet>"u"?G:WeakSet,"%Function.prototype.call%":Ft,"%Function.prototype.apply%":Gs,"%Object.defineProperty%":cd,"%Object.getPrototypeOf%":pd,"%Math.abs%":rd,"%Math.floor%":nd,"%Math.max%":od,"%Math.min%":id,"%Math.pow%":ad,"%Math.round%":sd,"%Math.sign%":ud,"%Reflect.getPrototypeOf%":dd};if(ce)try{null.error}catch(e){Bs=ce(ce(e)),Xe["%Error.prototype%"]=Bs}var Bs,fd=o(function e(t){var r;if(t==="%AsyncFunction%")r=In("async function () {}");else if(t==="%GeneratorFunction%")r=In("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=In("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&ce&&(r=ce(i.prototype))}return Xe[t]=r,r},"doEval"),Zs={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Bt=lt(),Pr=bn(),gd=Bt.call(Ft,Array.prototype.concat),yd=Bt.call(Gs,Array.prototype.splice),Vs=Bt.call(Ft,String.prototype.replace),br=Bt.call(Ft,String.prototype.slice),hd=Bt.call(Ft,RegExp.prototype.exec),vd=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,xd=/\\(\\)?/g,_d=o(function(t){var r=br(t,0,1),n=br(t,-1);if(r==="%"&&n!=="%")throw new ft("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new ft("invalid intrinsic syntax, expected opening `%`");var i=[];return Vs(t,vd,function(u,c,l,g){i[i.length]=l?Vs(g,xd,"$1"):c||u}),i},"stringToPath"),Pd=o(function(t,r){var n=t,i;if(Pr(Zs,n)&&(i=Zs[n],n="%"+i[0]+"%"),Pr(Xe,n)){var u=Xe[n];if(u===dt&&(u=fd(n)),typeof u>"u"&&!r)throw new mt("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:u}}throw new ft("intrinsic "+t+" does not exist!")},"getBaseIntrinsic");Ws.exports=o(function(t,r){if(typeof t!="string"||t.length===0)throw new mt("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new mt('"allowMissing" argument must be a boolean');if(hd(/^%?[^%]*%?$/,t)===null)throw new ft("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=_d(t),i=n.length>0?n[0]:"",u=Pd("%"+i+"%",r),c=u.name,l=u.value,g=!1,f=u.alias;f&&(i=f[0],yd(n,gd([0,1],f)));for(var _=1,$=!0;_<n.length;_+=1){var x=n[_],s=br(x,0,1),d=br(x,-1);if((s==='"'||s==="'"||s==="`"||d==='"'||d==="'"||d==="`")&&s!==d)throw new ft("property names with quotes must have matching quotes");if((x==="constructor"||!$)&&(g=!0),i+="."+x,c="%"+i+"%",Pr(Xe,c))l=Xe[c];else if(l!=null){if(!(x in l)){if(!r)throw new mt("base intrinsic for "+t+" exists, but the property is not available.");return}if(jt&&_+1>=n.length){var y=jt(l,x);$=!!y,$&&"get"in y&&!("originalValue"in y.get)?l=y.get:l=l[x]}else $=Pr(l,x),l=l[x];$&&!g&&(Xe[c]=l)}}return l},"GetIntrinsic")});var Js=z((Hz,Ks)=>{"use strict";var bd=hn();Ks.exports=o(function(){return bd()&&!!Symbol.toStringTag},"hasToStringTagShams")});var Qs=z((Wz,Ys)=>{"use strict";var Id=qs(),Xs=Id("%Object.defineProperty%",!0),Td=Js()(),Ed=bn(),$d=hr(),Ir=Td?Symbol.toStringTag:null;Ys.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 $d("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");Ir&&(n||!Ed(t,Ir))&&(Xs?Xs(t,Ir,{configurable:!i,enumerable:!1,value:r,writable:!1}):t[Ir]=r)},"setToStringTag")});var tu=z((Kz,eu)=>{"use strict";var Sd=Function.prototype.call,Ad=Object.prototype.hasOwnProperty,zd=lt();eu.exports=zd.call(Sd,Ad)});var nu=z((Jz,ru)=>{"use strict";ru.exports=function(e,t){return Object.keys(t).forEach(function(r){e[r]=e[r]||t[r]}),e}});var au=z((Xz,iu)=>{"use strict";var An=ua(),Od=require("util"),En=require("path"),kd=require("http"),wd=require("https"),Rd=require("url").parse,Dd=require("fs"),Nd=require("stream").Stream,Cd=require("crypto"),$n=ma(),Ud=Oa(),Md=Qs(),Fe=tu(),Sn=nu();function ou(e){return String(e).replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/"/g,"%22")}o(ou,"escapeHeaderParam");function W(e){if(!(this instanceof W))return new W(e);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],An.call(this),e=e||{};for(var t in e)this[t]=e[t]}o(W,"FormData");Od.inherits(W,An);W.LINE_BREAK=`\r
|
|
2
|
+
`;W.DEFAULT_CONTENT_TYPE="application/octet-stream";W.prototype.append=function(e,t,r){r=r||{},typeof r=="string"&&(r={filename:r});var n=An.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)};W.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)+W.LINE_BREAK.length,!(!t||!t.path&&!(t.readable&&Fe(t,"httpVersion"))&&!(t instanceof Nd))&&(r.knownLength||this._valuesToMeasure.push(t))};W.prototype._lengthRetriever=function(e,t){Fe(e,"fd")?e.end!=null&&e.end!=1/0&&e.start!=null?t(null,e.end+1-(e.start?e.start:0)):Dd.stat(e.path,function(r,n){if(r){t(r);return}var i=n.size-(e.start?e.start:0);t(null,i)}):Fe(e,"httpVersion")?t(null,Number(e.headers["content-length"])):Fe(e,"httpModule")?(e.on("response",function(r){e.pause(),t(null,Number(r.headers["content-length"]))}),e.resume()):t("Unknown stream")};W.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="'+ou(e)+'"'].concat(n||[]),"Content-Type":[].concat(i||[])};typeof r.header=="object"&&Sn(c,r.header);var l;for(var g in c)if(Fe(c,g)){if(l=c[g],l==null)continue;Array.isArray(l)||(l=[l]),l.length&&(u+=g+": "+l.join("; ")+W.LINE_BREAK)}return"--"+this.getBoundary()+W.LINE_BREAK+u+W.LINE_BREAK};W.prototype._getContentDisposition=function(e,t){var r;if(typeof t.filepath=="string"?r=En.normalize(t.filepath).replace(/\\/g,"/"):t.filename||e&&(e.name||e.path)?r=En.basename(t.filename||e&&(e.name||e.path)):e&&e.readable&&Fe(e,"httpVersion")&&(r=En.basename(e.client._httpMessage.path||"")),r)return'filename="'+ou(r)+'"'};W.prototype._getContentType=function(e,t){var r=t.contentType;return!r&&e&&e.name&&(r=$n.lookup(e.name)),!r&&e&&e.path&&(r=$n.lookup(e.path)),!r&&e&&e.readable&&Fe(e,"httpVersion")&&(r=e.headers["content-type"]),!r&&(t.filepath||t.filename)&&(r=$n.lookup(t.filepath||t.filename)),!r&&e&&typeof e=="object"&&(r=W.DEFAULT_CONTENT_TYPE),r};W.prototype._multiPartFooter=function(){return function(e){var t=W.LINE_BREAK,r=this._streams.length===0;r&&(t+=this._lastBoundary()),e(t)}.bind(this)};W.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+W.LINE_BREAK};W.prototype.getHeaders=function(e){var t,r={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in e)Fe(e,t)&&(r[t.toLowerCase()]=e[t]);return r};W.prototype.setBoundary=function(e){if(typeof e!="string")throw new TypeError("FormData boundary must be a string");this._boundary=e};W.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};W.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(W.LINE_BREAK)])));return Buffer.concat([e,Buffer.from(this._lastBoundary())])};W.prototype._generateBoundary=function(){this._boundary="--------------------------"+Cd.randomBytes(12).toString("hex")};W.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};W.prototype.hasKnownLength=function(){var e=!0;return this._valuesToMeasure.length&&(e=!1),e};W.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}Ud.parallel(this._valuesToMeasure,this._lengthRetriever,function(r,n){if(r){e(r);return}n.forEach(function(i){t+=i}),e(null,t)})};W.prototype.submit=function(e,t){var r,n,i={method:"post"};return typeof e=="string"?(e=Rd(e),n=Sn({port:e.port,path:e.pathname,host:e.hostname,protocol:e.protocol},i)):(n=Sn(e,i),n.port||(n.port=n.protocol==="https:"?443:80)),n.headers=this.getHeaders(e.headers),n.protocol==="https:"?r=wd.request(n):r=kd.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,_){return r.removeListener("error",g),r.removeListener("response",l),t.call(this,f,_)},"callback");l=g.bind(this,null),r.on("error",g),r.on("response",l)}}.bind(this)),r};W.prototype._error=function(e){this.error||(this.error=e,this.pause(),this.emit("error",e))};W.prototype.toString=function(){return"[object FormData]"};Md(W.prototype,"FormData");iu.exports=W});var lu=z((zn,On)=>{(function(e,t){typeof zn=="object"&&typeof On<"u"?On.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs=t()})(zn,(function(){"use strict";var e=1e3,t=6e4,r=36e5,n="millisecond",i="second",u="minute",c="hour",l="day",g="week",f="month",_="quarter",$="year",x="date",s="Invalid Date",d=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,m={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:o(function(U){var I=["th","st","nd","rd"],b=U%100;return"["+U+(I[(b-20)%10]||I[b]||I[0])+"]"},"ordinal")},v=o(function(U,I,b){var S=String(U);return!S||S.length>=I?U:""+Array(I+1-S.length).join(b)+U},"m"),P={s:v,z:o(function(U){var I=-U.utcOffset(),b=Math.abs(I),S=Math.floor(b/60),T=b%60;return(I<=0?"+":"-")+v(S,2,"0")+":"+v(T,2,"0")},"z"),m:o(function U(I,b){if(I.date()<b.date())return-U(b,I);var S=12*(b.year()-I.year())+(b.month()-I.month()),T=I.clone().add(S,f),j=b-T<0,F=I.clone().add(S+(j?-1:1),f);return+(-(S+(b-T)/(j?T-F:F-T))||0)},"t"),a:o(function(U){return U<0?Math.ceil(U)||0:Math.floor(U)},"a"),p:o(function(U){return{M:f,y:$,w:g,d:l,D:x,h:c,m:u,s:i,ms:n,Q:_}[U]||String(U||"").toLowerCase().replace(/s$/,"")},"p"),u:o(function(U){return U===void 0},"u")},Z="en",oe={};oe[Z]=m;var pe=o(function(U){return U instanceof Ye},"p"),be=o(function U(I,b,S){var T;if(!I)return Z;if(typeof I=="string"){var j=I.toLowerCase();oe[j]&&(T=j),b&&(oe[j]=b,T=j);var F=I.split("-");if(!T&&F.length>1)return U(F[0])}else{var Y=I.name;oe[Y]=I,T=Y}return!S&&T&&(Z=T),T||!S&&Z},"t"),X=o(function(U,I){if(pe(U))return U.clone();var b=typeof I=="object"?I:{};return b.date=U,b.args=arguments,new Ye(b)},"w"),V=P;V.l=be,V.i=pe,V.w=function(U,I){return X(U,{locale:I.$L,utc:I.$u,x:I.$x,$offset:I.$offset})};var Ye=(function(){function U(b){this.$L=be(b.locale,null,!0),this.parse(b)}o(U,"M");var I=U.prototype;return I.parse=function(b){this.$d=(function(S){var T=S.date,j=S.utc;if(T===null)return new Date(NaN);if(V.u(T))return new Date;if(T instanceof Date)return new Date(T);if(typeof T=="string"&&!/Z$/i.test(T)){var F=T.match(d);if(F){var Y=F[2]-1||0,ie=(F[7]||"0").substring(0,3);return j?new Date(Date.UTC(F[1],Y,F[3]||1,F[4]||0,F[5]||0,F[6]||0,ie)):new Date(F[1],Y,F[3]||1,F[4]||0,F[5]||0,F[6]||0,ie)}}return new Date(T)})(b),this.$x=b.x||{},this.init()},I.init=function(){var b=this.$d;this.$y=b.getFullYear(),this.$M=b.getMonth(),this.$D=b.getDate(),this.$W=b.getDay(),this.$H=b.getHours(),this.$m=b.getMinutes(),this.$s=b.getSeconds(),this.$ms=b.getMilliseconds()},I.$utils=function(){return V},I.isValid=function(){return this.$d.toString()!==s},I.isSame=function(b,S){var T=X(b);return this.startOf(S)<=T&&T<=this.endOf(S)},I.isAfter=function(b,S){return X(b)<this.startOf(S)},I.isBefore=function(b,S){return this.endOf(S)<X(b)},I.$g=function(b,S,T){return V.u(b)?this[S]:this.set(T,b)},I.unix=function(){return Math.floor(this.valueOf()/1e3)},I.valueOf=function(){return this.$d.getTime()},I.startOf=function(b,S){var T=this,j=!!V.u(S)||S,F=V.p(b),Y=o(function(Ve,me){var we=V.w(T.$u?Date.UTC(T.$y,me,Ve):new Date(T.$y,me,Ve),T);return j?we:we.endOf(l)},"l"),ie=o(function(Ve,me){return V.w(T.toDate()[Ve].apply(T.toDate("s"),(j?[0,0,0,0]:[23,59,59,999]).slice(me)),T)},"$"),ue=this.$W,le=this.$M,he=this.$D,Qe="set"+(this.$u?"UTC":"");switch(F){case $:return j?Y(1,0):Y(31,11);case f:return j?Y(1,le):Y(0,le+1);case g:var Ze=this.$locale().weekStart||0,gt=(ue<Ze?ue+7:ue)-Ze;return Y(j?he-gt:he+(6-gt),le);case l:case x:return ie(Qe+"Hours",0);case c:return ie(Qe+"Minutes",1);case u:return ie(Qe+"Seconds",2);case i:return ie(Qe+"Milliseconds",3);default:return this.clone()}},I.endOf=function(b){return this.startOf(b,!1)},I.$set=function(b,S){var T,j=V.p(b),F="set"+(this.$u?"UTC":""),Y=(T={},T[l]=F+"Date",T[x]=F+"Date",T[f]=F+"Month",T[$]=F+"FullYear",T[c]=F+"Hours",T[u]=F+"Minutes",T[i]=F+"Seconds",T[n]=F+"Milliseconds",T)[j],ie=j===l?this.$D+(S-this.$W):S;if(j===f||j===$){var ue=this.clone().set(x,1);ue.$d[Y](ie),ue.init(),this.$d=ue.set(x,Math.min(this.$D,ue.daysInMonth())).$d}else Y&&this.$d[Y](ie);return this.init(),this},I.set=function(b,S){return this.clone().$set(b,S)},I.get=function(b){return this[V.p(b)]()},I.add=function(b,S){var T,j=this;b=Number(b);var F=V.p(S),Y=o(function(le){var he=X(j);return V.w(he.date(he.date()+Math.round(le*b)),j)},"y");if(F===f)return this.set(f,this.$M+b);if(F===$)return this.set($,this.$y+b);if(F===l)return Y(1);if(F===g)return Y(7);var ie=(T={},T[u]=t,T[c]=r,T[i]=e,T)[F]||1,ue=this.$d.getTime()+b*ie;return V.w(ue,this)},I.subtract=function(b,S){return this.add(-1*b,S)},I.format=function(b){var S=this,T=this.$locale();if(!this.isValid())return T.invalidDate||s;var j=b||"YYYY-MM-DDTHH:mm:ssZ",F=V.z(this),Y=this.$H,ie=this.$m,ue=this.$M,le=T.weekdays,he=T.months,Qe=T.meridiem,Ze=o(function(me,we,yt,Zt){return me&&(me[we]||me(S,j))||yt[we].slice(0,Zt)},"h"),gt=o(function(me){return V.s(Y%12||12,me,"0")},"d"),Ve=Qe||function(me,we,yt){var Zt=me<12?"AM":"PM";return yt?Zt.toLowerCase():Zt};return j.replace(y,(function(me,we){return we||(function(yt){switch(yt){case"YY":return String(S.$y).slice(-2);case"YYYY":return V.s(S.$y,4,"0");case"M":return ue+1;case"MM":return V.s(ue+1,2,"0");case"MMM":return Ze(T.monthsShort,ue,he,3);case"MMMM":return Ze(he,ue);case"D":return S.$D;case"DD":return V.s(S.$D,2,"0");case"d":return String(S.$W);case"dd":return Ze(T.weekdaysMin,S.$W,le,2);case"ddd":return Ze(T.weekdaysShort,S.$W,le,3);case"dddd":return le[S.$W];case"H":return String(Y);case"HH":return V.s(Y,2,"0");case"h":return gt(1);case"hh":return gt(2);case"a":return Ve(Y,ie,!0);case"A":return Ve(Y,ie,!1);case"m":return String(ie);case"mm":return V.s(ie,2,"0");case"s":return String(S.$s);case"ss":return V.s(S.$s,2,"0");case"SSS":return V.s(S.$ms,3,"0");case"Z":return F}return null})(me)||F.replace(":","")}))},I.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},I.diff=function(b,S,T){var j,F=this,Y=V.p(S),ie=X(b),ue=(ie.utcOffset()-this.utcOffset())*t,le=this-ie,he=o(function(){return V.m(F,ie)},"D");switch(Y){case $:j=he()/12;break;case f:j=he();break;case _:j=he()/3;break;case g:j=(le-ue)/6048e5;break;case l:j=(le-ue)/864e5;break;case c:j=le/r;break;case u:j=le/t;break;case i:j=le/e;break;default:j=le}return T?j:V.a(j)},I.daysInMonth=function(){return this.endOf(f).$D},I.$locale=function(){return oe[this.$L]},I.locale=function(b,S){if(!b)return this.$L;var T=this.clone(),j=be(b,S,!0);return j&&(T.$L=j),T},I.clone=function(){return V.w(this.$d,this)},I.toDate=function(){return new Date(this.valueOf())},I.toJSON=function(){return this.isValid()?this.toISOString():null},I.toISOString=function(){return this.$d.toISOString()},I.toString=function(){return this.$d.toUTCString()},U})(),Be=Ye.prototype;return X.prototype=Be,[["$ms",n],["$s",i],["$m",u],["$H",c],["$W",l],["$M",f],["$y",$],["$D",x]].forEach((function(U){Be[U[1]]=function(I){return this.$g(I,U[0],U[1])}})),X.extend=function(U,I){return U.$i||(U(I,Ye,X),U.$i=!0),X},X.locale=be,X.isDayjs=pe,X.unix=function(U){return X(1e3*U)},X.en=oe[Z],X.Ls=oe,X.p={},X}))});var Wd={};wn(Wd,{messagebird:()=>Gd});module.exports=hu(Wd);var vu=Object.freeze({status:"aborted"});function E(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,_=Object.keys(f);for(let $=0;$<_.length;$++){let x=_[$];x in l||(l[x]=f[x].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 _ of f._zod.deferred)_();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(E,"$constructor");var Ie=class extends Error{static{o(this,"$ZodAsyncError")}constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Vt=class extends Error{static{o(this,"$ZodEncodeError")}constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}},Tr={};function $e(e){return e&&Object.assign(Tr,e),Tr}o($e,"config");function $r(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($r,"getEnumValues");function Nn(e,t){return typeof t=="bigint"?t.toString():t}o(Nn,"jsonStringifyReplacer");function Gt(e){return{get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}o(Gt,"cached");function Cn(e){return e==null}o(Cn,"nullish");function Wt(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}o(Wt,"cleanRegex");var Dn=Symbol("evaluating");function ae(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==Dn)return n===void 0&&(n=Dn,n=r()),n},set(i){Object.defineProperty(e,t,{value:i})},configurable:!0})}o(ae,"defineLazy");var Sr="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function vt(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}o(vt,"isObject");var xu=Gt(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function Un(e){if(vt(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let r=t.prototype;return!(vt(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}o(Un,"isPlainObject");var Mn=new Set(["string","number","symbol"]);function et(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}o(et,"escapeRegex");function qt(e,t,r){let n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}o(qt,"clone");function Q(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(Q,"normalizeParams");function Ln(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}o(Ln,"optionalKeys");var jn={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 tt(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(tt,"aborted");function Re(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}o(Re,"prefixIssues");function Ht(e){return typeof e=="string"?e:e?.message}o(Ht,"unwrapMessage");function De(e,t,r){let n={...e,path:e.path??[]};if(!e.message){let i=Ht(e.inst?._zod.def?.error?.(e))??Ht(t?.error?.(e))??Ht(r.customError?.(e))??Ht(r.localeError?.(e))??"Invalid input";n.message=i}return delete n.inst,delete n.continue,t?.reportInput||delete n.input,n}o(De,"finalizeIssue");function Fn(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}o(Fn,"getLengthableOrigin");function Ar(...e){let[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}o(Ar,"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,Nn,2),Object.defineProperty(e,"toString",{value:o(()=>e.message,"value"),enumerable:!1})},"initializer"),Zn=E("$ZodError",Bn),xt=E("$ZodError",Bn,{Parent:Error});var Pu=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 Ie;if(c.issues.length){let l=new(i?.Err??e)(c.issues.map(g=>De(g,u,$e())));throw Sr(l,i?.callee),l}return c.value},"_parse"),Kt=Pu(xt),bu=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=>De(g,u,$e())));throw Sr(l,i?.callee),l}return c.value},"_parseAsync"),Jt=bu(xt),Iu=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 Ie;return u.issues.length?{success:!1,error:new(e??Zn)(u.issues.map(c=>De(c,i,$e())))}:{success:!0,data:u.value}},"_safeParse"),_t=Iu(xt),Tu=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=>De(c,i,$e())))}:{success:!0,data:u.value}},"_safeParseAsync"),Pt=Tu(xt);var Eu="(?:(?:\\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])))",$u=new RegExp(`^${Eu}$`);var Vn=o(e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},"string"),Hn=/^-?\d+n?$/,Gn=/^-?\d+$/,zr=/^-?\d+(?:\.\d+)?$/,Wn=/^(?:true|false)$/i;var Ne=E("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),Su={number:"number",bigint:"bigint",object:"date"};var qn=E("$ZodCheckGreaterThan",(e,t)=>{Ne.init(e,t);let r=Su[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 Kn=E("$ZodCheckNumberFormat",(e,t)=>{Ne.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),n=r?"int":"number",[i,u]=jn[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=Gn)}),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 Jn=E("$ZodCheckMinLength",(e,t)=>{var r;Ne.init(e,t),(r=e._zod.def).when??(r.when=n=>{let i=n.value;return!Cn(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=Fn(i);n.issues.push({origin:c,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}});var Or=E("$ZodCheckStringFormat",(e,t)=>{var r,n;Ne.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=()=>{})}),Xn=E("$ZodCheckRegex",(e,t)=>{Or.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 Qn={major:4,minor:3,patch:6};var te=E("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Qn;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=tt(c),_;for(let $ of l){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 Ie;if(_||s instanceof Promise)_=(_??Promise.resolve()).then(async()=>{await s,c.issues.length!==x&&(f||(f=tt(c,x)))});else{if(c.issues.length===x)continue;f||(f=tt(c,x))}}return _?_.then(()=>c):c},"runChecks"),u=o((c,l,g)=>{if(tt(c))return c.aborted=!0,c;let f=i(l,n,g);if(f instanceof Promise){if(g.async===!1)throw new Ie;return f.then(_=>e._zod.parse(_,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(_=>u(_,c,l)):u(f,c,l)}let g=e._zod.parse(c,l);if(g instanceof Promise){if(l.async===!1)throw new Ie;return g.then(f=>i(f,n,l))}return i(g,n,l)}}ae(e,"~standard",()=>({validate:o(i=>{try{let u=_t(e,i);return u.success?{value:u.data}:{issues:u.error?.issues}}catch{return Pt(e,i).then(c=>c.success?{value:c.data}:{issues:c.error?.issues})}},"validate"),vendor:"zod",version:1}))}),Qt=E("$ZodString",(e,t)=>{te.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Vn(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}}),kr=E("$ZodStringFormat",(e,t)=>{Or.init(e,t),Qt.init(e,t)});var oo=E("$ZodURL",(e,t)=>{kr.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 wr=E("$ZodNumber",(e,t)=>{te.init(e,t),e._zod.pattern=e._zod.bag.pattern??zr,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}}),io=E("$ZodNumberFormat",(e,t)=>{Kn.init(e,t),wr.init(e,t)}),Rr=E("$ZodBoolean",(e,t)=>{te.init(e,t),e._zod.pattern=Wn,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}}),ao=E("$ZodBigInt",(e,t)=>{te.init(e,t),e._zod.pattern=Hn,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 so=E("$ZodAny",(e,t)=>{te.init(e,t),e._zod.parse=r=>r}),uo=E("$ZodUnknown",(e,t)=>{te.init(e,t),e._zod.parse=r=>r});var co=E("$ZodVoid",(e,t)=>{te.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}}),lo=E("$ZodDate",(e,t)=>{te.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 eo(e,t,r){e.issues.length&&t.issues.push(...Re(r,e.issues)),t.value[r]=e.value}o(eo,"handleArrayResult");var po=E("$ZodArray",(e,t)=>{te.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=>eo(f,r,c))):eo(g,r,c)}return u.length?Promise.all(u).then(()=>r):r}});function Yt(e,t,r,n,i){if(e.issues.length){if(i&&!(r in n))return;t.issues.push(...Re(r,e.issues))}e.value===void 0?r in n&&(t.value[r]=void 0):t.value[r]=e.value}o(Yt,"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=Ln(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}o(Au,"normalizeDef");function zu(e,t,r,n,i,u){let c=[],l=i.keySet,g=i.catchall._zod,f=g.def.type,_=g.optout==="optional";for(let $ in t){if(l.has($))continue;if(f==="never"){c.push($);continue}let x=g.run({value:t[$],issues:[]},n);x instanceof Promise?e.push(x.then(s=>Yt(s,r,$,t,_))):Yt(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(zu,"handleCatchall");var mo=E("$ZodObject",(e,t)=>{if(te.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=Gt(()=>Au(t));ae(e._zod,"propValues",()=>{let l=t.shape,g={};for(let f in l){let _=l[f]._zod;if(_.values){g[f]??(g[f]=new Set);for(let $ of _.values)g[f].add($)}}return g});let i=vt,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 _=[],$=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=>Yt(m,l,x,f,d))):Yt(y,l,x,f,d)}return u?zu(_,f,l,g,n.value,e):_.length?Promise.all(_).then(()=>l):l}});function to(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=>!tt(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=>De(c,n,$e())))}),t)}o(to,"handleUnionResults");var Dr=E("$ZodUnion",(e,t)=>{te.init(e,t),ae(e._zod,"optin",()=>t.options.some(i=>i._zod.optin==="optional")?"optional":void 0),ae(e._zod,"optout",()=>t.options.some(i=>i._zod.optout==="optional")?"optional":void 0),ae(e._zod,"values",()=>{if(t.options.every(i=>i._zod.values))return new Set(t.options.flatMap(i=>Array.from(i._zod.values)))}),ae(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=>Wt(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=>to(g,i,e,u)):to(l,i,e,u)}});var fo=E("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,Dr.init(e,t);let r=e._zod.parse;ae(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=Gt(()=>{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(!vt(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 go=E("$ZodRecord",(e,t)=>{te.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;if(!Un(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 _=t.valueType._zod.run({value:i[f],issues:[]},n);_ instanceof Promise?u.push(_.then($=>{$.issues.length&&r.issues.push(...Re(f,$.issues)),r.value[f]=$.value})):(_.issues.length&&r.issues.push(...Re(f,_.issues)),r.value[f]=_.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"&&zr.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($=>De($,n,$e())),input:l,path:[l],inst:e});continue}let _=t.valueType._zod.run({value:i[l],issues:[]},n);_ instanceof Promise?u.push(_.then($=>{$.issues.length&&r.issues.push(...Re(l,$.issues)),r.value[g.value]=$.value})):(_.issues.length&&r.issues.push(...Re(l,_.issues)),r.value[g.value]=_.value)}}return u.length?Promise.all(u).then(()=>r):r}});var yo=E("$ZodEnum",(e,t)=>{te.init(e,t);let r=$r(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(i=>Mn.has(typeof i)).map(i=>typeof i=="string"?et(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}}),ho=E("$ZodLiteral",(e,t)=>{if(te.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"?et(n):n?et(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 vo=E("$ZodTransform",(e,t)=>{te.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Vt(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 Ie;return r.value=i,r}});function ro(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}o(ro,"handleOptionalResult");var xo=E("$ZodOptional",(e,t)=>{te.init(e,t),e._zod.optin="optional",e._zod.optout="optional",ae(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),ae(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${Wt(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=>ro(u,r.value)):ro(i,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,n)}});var _o=E("$ZodNullable",(e,t)=>{te.init(e,t),ae(e._zod,"optin",()=>t.innerType._zod.optin),ae(e._zod,"optout",()=>t.innerType._zod.optout),ae(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${Wt(r.source)}|null)$`):void 0}),ae(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 Po=E("$ZodPipe",(e,t)=>{te.init(e,t),ae(e._zod,"values",()=>t.in._zod.values),ae(e._zod,"optin",()=>t.in._zod.optin),ae(e._zod,"optout",()=>t.out._zod.optout),ae(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=>Xt(c,t.in,n)):Xt(u,t.in,n)}let i=t.in._zod.run(r,n);return i instanceof Promise?i.then(u=>Xt(u,t.out,n)):Xt(i,t.out,n)}});function Xt(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}o(Xt,"handlePipeResult");var bo=E("$ZodCustom",(e,t)=>{Ne.init(e,t),te.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=>no(u,r,n,e));no(i,r,n,e)}});function no(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(Ar(i))}}o(no,"handleRefineResult");var To;var Nr=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 Eo(){return new Nr}o(Eo,"registry");(To=globalThis).__zod_globalRegistry??(To.__zod_globalRegistry=Eo());var Cr=globalThis.__zod_globalRegistry;function $o(e,t){return new e({type:"string",...Q(t)})}o($o,"_string");function So(e,t){return new e({type:"string",coerce:!0,...Q(t)})}o(So,"_coercedString");function Ao(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Q(t)})}o(Ao,"_url");function zo(e,t){return new e({type:"number",checks:[],...Q(t)})}o(zo,"_number");function Oo(e,t){return new e({type:"number",coerce:!0,checks:[],...Q(t)})}o(Oo,"_coercedNumber");function ko(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...Q(t)})}o(ko,"_int");function wo(e,t){return new e({type:"boolean",...Q(t)})}o(wo,"_boolean");function Ro(e,t){return new e({type:"boolean",coerce:!0,...Q(t)})}o(Ro,"_coercedBoolean");function Do(e,t){return new e({type:"bigint",coerce:!0,...Q(t)})}o(Do,"_coercedBigint");function No(e){return new e({type:"any"})}o(No,"_any");function Co(e){return new e({type:"unknown"})}o(Co,"_unknown");function Uo(e,t){return new e({type:"void",...Q(t)})}o(Uo,"_void");function Mo(e,t){return new e({type:"date",coerce:!0,...Q(t)})}o(Mo,"_coercedDate");function er(e,t){return new qn({check:"greater_than",...Q(t),value:e,inclusive:!0})}o(er,"_gte");function xe(e,t){return new Jn({check:"min_length",...Q(t),minimum:e})}o(xe,"_minLength");function Ce(e,t){return new Xn({check:"string_format",format:"regex",...Q(t),pattern:e})}o(Ce,"_regex");function Lo(e,t,r){let n=Q(r);return n.abort??(n.abort=!0),new e({type:"custom",check:"custom",fn:t,...n})}o(Lo,"_custom");var se=E("ZodMiniType",(e,t)=>{if(!e._zod)throw new Error("Uninitialized schema in ZodMiniType.");te.init(e,t),e.def=t,e.type=t.type,e.parse=(r,n)=>Kt(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>_t(e,r,n),e.parseAsync=async(r,n)=>Jt(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>Pt(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)=>qt(e,r,n),e.brand=()=>e,e.register=((r,n)=>(r.add(e,n),e)),e.apply=r=>r(e)}),rr=E("ZodMiniString",(e,t)=>{Qt.init(e,t),se.init(e,t)});function a(e){return $o(rr,e)}o(a,"string");var jo=E("ZodMiniStringFormat",(e,t)=>{kr.init(e,t),rr.init(e,t)});var Bu=E("ZodMiniURL",(e,t)=>{oo.init(e,t),jo.init(e,t)});function Fo(e){return Ao(Bu,e)}o(Fo,"url");var nr=E("ZodMiniNumber",(e,t)=>{wr.init(e,t),se.init(e,t)});function de(e){return zo(nr,e)}o(de,"number");var Zu=E("ZodMiniNumberFormat",(e,t)=>{io.init(e,t),nr.init(e,t)});function Bo(e){return ko(Zu,e)}o(Bo,"int");var Ur=E("ZodMiniBoolean",(e,t)=>{Rr.init(e,t),se.init(e,t)});function K(e){return wo(Ur,e)}o(K,"boolean");var Zo=E("ZodMiniBigInt",(e,t)=>{ao.init(e,t),se.init(e,t)});var Vu=E("ZodMiniAny",(e,t)=>{so.init(e,t),se.init(e,t)});function It(){return No(Vu)}o(It,"any");var Hu=E("ZodMiniUnknown",(e,t)=>{uo.init(e,t),se.init(e,t)});function D(){return Co(Hu)}o(D,"unknown");var Gu=E("ZodMiniVoid",(e,t)=>{co.init(e,t),se.init(e,t)});function Vo(e){return Uo(Gu,e)}o(Vo,"_void");var Ho=E("ZodMiniDate",(e,t)=>{lo.init(e,t),se.init(e,t)});var Wu=E("ZodMiniArray",(e,t)=>{po.init(e,t),se.init(e,t)});function M(e,t){return new Wu({type:"array",element:e,...Q(t)})}o(M,"array");var qu=E("ZodMiniObject",(e,t)=>{mo.init(e,t),se.init(e,t),ae(e,"shape",()=>t.shape)});function p(e,t){let r={type:"object",shape:e??{},...Q(t)};return new qu(r)}o(p,"object");var Ku=E("ZodMiniUnion",(e,t)=>{Dr.init(e,t),se.init(e,t)});function L(e,t){return new Ku({type:"union",options:e,...Q(t)})}o(L,"union");var Ju=E("ZodMiniDiscriminatedUnion",(e,t)=>{fo.init(e,t),se.init(e,t)});function Ue(e,t,r){return new Ju({type:"union",options:t,discriminator:e,...Q(r)})}o(Ue,"discriminatedUnion");var Xu=E("ZodMiniRecord",(e,t)=>{go.init(e,t),se.init(e,t)});function N(e,t,r){return new Xu({type:"record",keyType:e,valueType:t,...Q(r)})}o(N,"record");var Yu=E("ZodMiniEnum",(e,t)=>{yo.init(e,t),se.init(e,t),e.options=Object.values(t.entries)});function H(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new Yu({type:"enum",entries:r,...Q(t)})}o(H,"_enum");var Qu=E("ZodMiniLiteral",(e,t)=>{ho.init(e,t),se.init(e,t)});function O(e,t){return new Qu({type:"literal",values:Array.isArray(e)?e:[e],...Q(t)})}o(O,"literal");var ec=E("ZodMiniTransform",(e,t)=>{vo.init(e,t),se.init(e,t)});function Me(e){return new ec({type:"transform",transform:e})}o(Me,"transform");var tc=E("ZodMiniOptional",(e,t)=>{xo.init(e,t),se.init(e,t)});function h(e){return new tc({type:"optional",innerType:e})}o(h,"optional");var rc=E("ZodMiniNullable",(e,t)=>{_o.init(e,t),se.init(e,t)});function Tt(e){return new rc({type:"nullable",innerType:e})}o(Tt,"nullable");var nc=E("ZodMiniPipe",(e,t)=>{Po.init(e,t),se.init(e,t)});function Le(e,t){return new nc({type:"pipe",in:e,out:t})}o(Le,"pipe");var oc=E("ZodMiniCustom",(e,t)=>{bo.init(e,t),se.init(e,t)});function or(e,t){return Lo(oc,e??(()=>!0),t)}o(or,"custom");var Et={};wn(Et,{bigint:()=>lc,boolean:()=>cc,date:()=>pc,number:()=>uc,string:()=>sc});function sc(e){return So(rr,e)}o(sc,"string");function uc(e){return Oo(nr,e)}o(uc,"number");function cc(e){return Ro(Ur,e)}o(cc,"boolean");function lc(e){return Do(Zo,e)}o(lc,"bigint");function pc(e){return Mo(Ho,e)}o(pc,"date");var Lr=p({retryOnFailure:p({defaultValue:h(K()),hide:h(K())}),continueOnFailure:p({defaultValue:h(K()),hide:h(K())})}),Mr=class{constructor(t,r,n,i,u,c,l,g,f,_,$){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=_;this.aiMetadata=$}static{o(this,"IAction")}},rt=o(e=>new Mr(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 q=p({displayName:a(),description:h(a())}),B=o((e,t)=>p({type:O(t),required:K(),defaultValue:h(It())}),"TPropertyValue");var ge=p({...q.shape,...B(a(),"SHORT_TEXT").shape}),Se=p({...q.shape,...B(a(),"LONG_TEXT").shape});var Wo=p({label:a(),value:D()}),ir=p({disabled:h(K()),placeholder:h(a()),options:M(Wo)});var ye=p({...q.shape,options:ir,...B(D(),"STATIC_DROPDOWN").shape}),Ae=p({...q.shape,options:ir,...B(M(D()),"STATIC_MULTI_SELECT_DROPDOWN").shape});var jr=p({...q.shape,...B(D(),"DROPDOWN").shape,refreshers:M(a())}),$t=p({...q.shape,...B(M(D()),"MULTI_SELECT_DROPDOWN").shape,refreshers:M(a())});var ze=p({...q.shape,...B(K(),"CHECKBOX").shape});var Oe=p({...q.shape,...B(de(),"NUMBER").shape});var St=p({...q.shape,streaming:h(K()),...B(D(),"FILE").shape});var At=p({...q.shape,...B(a(),"DATE_TIME").shape});var qo=N(a(),L([ge,Se,ye,$t,Ae,ze,Oe,St,At])),zt=p({...q.shape,properties:qo,...B(M(D()),"ARRAY").shape});var Ot=p({...q.shape,...B(L([N(a(),D())]),"JSON").shape});var Ko=L([ge,ye,Ot,zt,Ae]),mc=N(a(),Ko),Fr=p({refreshers:M(a()),...q.shape,...B(D(),"DYNAMIC").shape});var ar=p({...q.shape,...B(Vo(),"MARKDOWN").shape});var kt=(r=>(r.ARCHIVE="ARCHIVE",r.REGISTRY="REGISTRY",r))(kt||{}),nt=(r=>(r.CUSTOM="CUSTOM",r.OFFICIAL="OFFICIAL",r))(nt||{}),ot=(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))(ot||{});var wt=(r=>(r.AUTHORIZATION_CODE="authorization_code",r.CLIENT_CREDENTIALS="client_credentials",r))(wt||{}),Br="both_client_credentials_and_authorization_code";var Ge=(i=>(i.POLLING="POLLING",i.WEBHOOK="WEBHOOK",i.APP_WEBHOOK="APP_WEBHOOK",i.MANUAL="MANUAL",i))(Ge||{}),Rt=(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))(Rt||{}),fc=p({strategy:H(Rt),paramName:h(a())}),Dt=(r=>(r.SIMULATION="SIMULATION",r.TEST_FUNCTION="TEST_FUNCTION",r))(Dt||{});var sr=(r=>(r.WEBSOCKET="WEBSOCKET",r.NONE="NONE",r))(sr||{}),Jo=p({status:h(de()),body:h(D()),headers:h(N(a(),a()))}),Xo=p({type:O("DELAY"),resumeDateTime:a(),requestIdToReply:h(a()),handlerId:h(a()),streamStepProgress:h(H(sr))}),Yo=p({type:O("WEBHOOK"),requestId:a(),requestIdToReply:h(a()),response:Jo,handlerId:h(a()),streamStepProgress:h(H(sr))}),gc=L([Xo,Yo]);var yc=p({body:D(),rawBody:h(D()),headers:N(a(),a()),queryParams:N(a(),a())});function _e(e){return e==null}o(_e,"isNil");function Nt(e){return e==null?!0:typeof e=="string"||Array.isArray(e)?e.length===0:typeof e=="object"?Object.keys(e).length===0:!1}o(Nt,"isEmpty");function ur(e,t){if(e==null)throw new Error(`${t} is null or undefined`)}o(ur,"assertNotNullOrUndefined");var Zr=He(require("crypto"),1);var hc=128,We,it,vc=o(e=>{!We||We.length<e?(We=Buffer.allocUnsafe(e*hc),Zr.default.randomFillSync(We),it=0):it+e>We.length&&(Zr.default.randomFillSync(We),it=0),it+=e},"fillPool"),xc=o(e=>(vc(e|=0),We.subarray(it-e,it)),"random"),_c=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"),ei=o((e,t=21)=>_c(e,t,xc),"customAlphabet");var Pc="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",ti=21,Ab=a().check(Ce(new RegExp(`^[0-9a-zA-Z]{${ti}}$`))),bc=ei(Pc,ti);var je=Le(Me(e=>e instanceof Date?e.toISOString():e),a()),ve={id:a(),created:je,updated:je},ee=o(e=>h(Tt(e)),"Nullable");function Vr(e){return h(Tt(H(e)))}o(Vr,"NullableEnum");var kb=Le(Me(e=>e==="true"||e===!0?!0:e==="false"||e===!1?!1:void 0),h(K())),cr=o(e=>Le(Me(t=>Array.isArray(t)?t:t!==void 0?[t]:void 0),h(M(e))),"OptionalArrayFromQuery");var Db=N(a(),D());var Ct=(_=>(_.OPENAI="openai",_.OPENROUTER="openrouter",_.ANTHROPIC="anthropic",_.AZURE="azure",_.GOOGLE="google",_.ACTIVEPIECES="activepieces",_.CLOUDFLARE_GATEWAY="cloudflare-gateway",_.CUSTOM="custom",_.BEDROCK="bedrock",_.MISTRAL="mistral",_))(Ct||{});var Gb=a().check(Ce(/^#[0-9A-Fa-f]{6}$/));var qb=p({filename:a(),data:D(),type:O("file"),mimetype:h(a())});var Ic=He(ni());var tI=p({...ve,name:a(),permissions:M(a()),platformId:ee(a()),type:a(),userCount:h(de())});var oi=(n=>(n.AGENT_DECIDE="agent-decide",n.CHOOSE_YOURSELF="choose-yourself",n.LEAVE_EMPTY="leave-empty",n))(oi||{}),Hr=(r=>(r.FILE="FILE",r.TABLE="TABLE",r))(Hr||{}),Gr=(n=>(n.SSE="sse",n.STREAMABLE_HTTP="streamable-http",n.SIMPLE_HTTP="http",n))(Gr||{});var Wr=(n=>(n.TEXT="text",n.NUMBER="number",n.BOOLEAN="boolean",n))(Wr||{});var qr=(r=>(r.IN_PROGRESS="in-progress",r.COMPLETED="completed",r))(qr||{});var Tc=p({mode:H(oi),value:D()}),Ec=p({auth:h(a()),fields:N(a(),Tc)}),$c=p({pieceName:a(),pieceVersion:a(),actionName:a(),predefinedInput:h(Ec)}),Sc=p({type:O("PIECE"),toolName:a().check(xe(1)),pieceMetadata:$c}),Ac=p({type:O("none")}),zc=p({type:O("access_token"),accessToken:a()}),Oc=p({type:O("api_key"),apiKey:a(),apiKeyHeader:a()}),kc=p({type:O("headers"),headers:N(a(),a())}),wc=Ue("type",[Ac,zc,Oc,kc]),ii=p({type:O("FLOW"),toolName:a().check(xe(1)),externalFlowId:a(),flowDisplayName:h(a())}),ai=p({type:O("MCP"),toolName:a().check(xe(1)),serverUrl:Fo(),protocol:H(Gr),auth:wc}),si=p({type:O("KNOWLEDGE_BASE"),toolName:a().check(xe(1)),sourceType:H(Hr),sourceId:a(),sourceName:a()}),Rc=Ue("type",[Sc,ii,ai,si]),Dc=p({displayName:a(),description:h(a()),type:H(Wr)}),ui=p({type:O("MARKDOWN"),markdown:a()}),at={type:O("TOOL_CALL"),input:ee(N(a(),D())),output:h(D()),toolName:a(),status:H(qr),toolCallId:a(),startTime:a(),endTime:h(a())},wI=p(at),ci=Ue("toolCallType",[p({...at,toolCallType:O("PIECE"),pieceName:a(),pieceVersion:a(),actionName:a()}),p({...at,toolCallType:O("FLOW"),displayName:a(),externalFlowId:a()}),p({...at,toolCallType:O("MCP"),displayName:a(),serverUrl:a()}),p({...at,toolCallType:O("KNOWLEDGE_BASE"),displayName:a(),sourceType:a()}),p({...at,toolCallType:O("UNKNOWN"),displayName:a()})]),Nc=L([ui,ci]);var Kr=(r=>(r.IMAGE="image",r.TEXT="text",r))(Kr||{}),ke=p({apiKey:a()}),Cc=ke,Uc=p({apiKey:a(),apiKeyHash:a()}),Mc=ke,Lc=ke,jc=ke,Fc=ke,Bc=ke,Zc=ke,Vc=ke,fi=p({accessKeyId:a().check(xe(1)),secretAccessKey:a().check(xe(1))}),Hc=p({}),Gc=p({}),Wc=p({}),qc=p({}),Kc=p({}),Jc=p({}),gi=p({modelId:a(),modelName:a(),modelType:H(Kr)}),yi=p({apiKeyHeader:a(),baseUrl:a(),models:M(gi),defaultHeaders:h(N(a(),a()))}),hi=p({accountId:a(),gatewayId:a(),models:M(gi),vertexProject:h(a()),vertexRegion:h(a())}),vi=p({resourceName:a(),apiVersion:Le(Me(e=>typeof e=="string"&&e.trim().length===0?void 0:e),h(a()))}),xi=p({region:a().check(xe(1))}),Xc=L([Cc,jc,Fc,Bc,Zc,Lc,Mc,Uc,fi,Vc]),_i=L([yi,hi,vi,xi,Hc,Wc,qc,Kc,Gc,Jc]),Yc=p({id:a(),name:a(),type:H(Kr)}),Qc=p({id:a(),name:a(),provider:H(Ct),config:_i,enabledForChat:K()}),el=p({provider:H(Ct),config:_i,auth:Xc,platformId:a()});var CI={openai:"openai",anthropic:"anthropic","google-ai-studio":"google","google-vertex-ai":"google"},li=["gpt-5.5","gpt-5.4-mini","gpt-5.4-nano","gpt-4.1","gpt-4.1-mini"],tl=["claude-sonnet-4-6","claude-opus-4-7","claude-haiku-4-5"],rl=["claude-sonnet-4.6","claude-opus-4.7","claude-haiku-4.5"],pi=["gemini-2.5-pro","gemini-2.5-flash","gemini-3.1-pro-preview","gemini-3-flash-preview"],nl=["grok-4.20","grok-4.1-fast"],ol={openai:li,anthropic:tl,google:pi,activepieces:[...rl.map(e=>`anthropic/${e}`),...li.map(e=>`openai/${e}`),...pi.map(e=>`google/${e}`),...nl.map(e=>`x-ai/${e}`)]};var di=128e3,il={openai:128e3,anthropic:2e5,google:1048576,bedrock:2e5,azure:128e3,openrouter:128e3,activepieces:2e5,mistral:128e3};function al({provider:e}){return e?il[e]??di:di}o(al,"getMaxContextTokens");var mi={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"},sl={anthropic:"native",google:"native",openrouter:"plugin",activepieces:"plugin"},ul=new Set(["anthropic","mistral"]);function Te(e){return{chatModels:ol[e],maxContextTokens:al({provider:e}),defaultEmbeddingModel:mi[e],supportsEmbedding:mi[e]!==void 0,supportsImageGeneration:!ul.has(e),webSearch:sl[e]}}o(Te,"buildProviderCapabilities");var cl={openai:Te("openai"),anthropic:Te("anthropic"),openrouter:Te("openrouter"),azure:Te("azure"),google:Te("google"),"cloudflare-gateway":Te("cloudflare-gateway"),custom:Te("custom"),bedrock:Te("bedrock"),mistral:Te("mistral"),activepieces:Te("activepieces")};var ll=p({base64Url:a(),fileName:a(),extension:h(a())}),pl=p({mimeType:a(),url:a(),fileName:h(a())}),Jr=L([ll,pl]);var dl=L([p({type:O("file"),value:Jr}),p({type:O("markdown"),value:a(),files:h(M(Jr))})]),ml=p({sessionId:a(),message:a(),files:h(M(a()))});var bi=(r=>(r.ON_NEW_RECORD="ON_NEW_RECORD",r.ON_UPDATE_RECORD="ON_UPDATE_RECORD",r))(bi||{}),Ii=(r=>(r.ENABLED="ENABLED",r.DISABLED="DISABLED",r))(Ii||{}),Xr=(n=>(n.RECORD_CREATED="RECORD_CREATED",n.RECORD_UPDATED="RECORD_UPDATED",n.RECORD_DELETED="RECORD_DELETED",n))(Xr||{});var fl=L([p({...ve,name:a(),externalId:a(),type:O("STATIC_DROPDOWN"),tableId:a(),projectId:a(),data:p({options:M(p({value:a()}))})}),p({...ve,name:a(),externalId:a(),type:L([O("TEXT"),O("NUMBER"),O("DATE")]),tableId:a(),projectId:a()})]),gl=p({...ve,name:a(),folderId:ee(a()),projectId:a(),externalId:a(),status:Vr(Ii),trigger:Vr(bi)}),yl=p({...ve,tableId:a(),projectId:a(),cells:N(a(),p({updated:a(),created:a(),value:D(),fieldName:a()}))}),hl=p({events:M(H(Xr)),webhookUrl:a(),flowId:a()}),vl=p({fields:M(p({id:a(),name:a()})),rows:M(N(a(),a())),name:a()}),xl=p({projectId:a(),limit:h(Et.number()),cursor:h(a()),name:h(a()),externalIds:cr(a()),folderId:h(a()),folderIds:cr(a())}),_l=p({records:M(M(p({fieldId:a(),value:Ei()}))),tableId:a()}),Pl=p({cells:h(M(p({fieldId:a(),value:Ei()}))),tableId:a(),agentUpdate:h(K())}),Ti=Ue("operator",[qe("eq"),qe("neq"),qe("gt"),qe("gte"),qe("lt"),qe("lte"),qe("co"),Pi("exists"),Pi("not_exists")]),bl=p({tableId:a(),limit:h(Et.number()),cursor:h(a()),filters:cr(Ti)});function Ei(){return Le(Me(e=>e==null?e:String(e)),Tt(a()))}o(Ei,"coerceToString");function qe(e){return p({fieldId:a(),operator:O(e),value:a()})}o(qe,"valueFilter");function Pi(e){return p({fieldId:a(),operator:O(e)})}o(Pi,"existenceFilter");var Il=p({status:h(de()),body:h(D()),headers:h(N(a(),a()))}),Tl=p({...ve,deleted:ee(je),ownerId:a(),displayName:a(),platformId:a(),externalId:ee(a())});var $i=p({name:a(),description:h(a()),type:a(),required:K()}),El=p({pieceName:a(),triggerName:a(),input:p({toolName:a(),toolDescription:a(),inputSchema:M($i),returnsResponse:K()})});var Si="^[0-9]+\\.[0-9]+\\.[0-9]+$",tT=new RegExp(Si),Sl="^([~^])?[0-9]+\\.[0-9]+\\.[0-9]+$",rT=a().check(Ce(new RegExp(Si))),nT=a().check(Ce(new RegExp(Sl))),Al=p({packageType:O("ARCHIVE"),pieceType:H(nt),pieceName:a(),pieceVersion:a(),archiveId:a(),platformId:a()}),Ai=p({packageType:O("REGISTRY"),pieceType:O("OFFICIAL"),pieceName:a(),pieceVersion:a()}),zi=p({packageType:O("REGISTRY"),pieceType:O("CUSTOM"),pieceName:a(),pieceVersion:a(),platformId:a()}),oT=L([Ai,zi]),iT=L([Al,Ai,zi]);var zl=Ue("type",[p({type:O("CRON_EXPRESSION"),cronExpression:a(),timezone:a()}),p({type:O("INTERVAL"),intervalMs:Bo().check(er(6e4))})]),aT=p({...ve,type:H(Ge),projectId:a(),flowId:a(),triggerName:a(),schedule:ee(zl),flowVersionId:a(),pieceName:a(),pieceVersion:a(),deleted:ee(a()),simulate:K()}),Oi=(m=>(m.UNKNOWN="UNKNOWN",m.FLOW_RUN_LOG="FLOW_RUN_LOG",m.FLOW_RUN_LOG_SLICE="FLOW_RUN_LOG_SLICE",m.PACKAGE_ARCHIVE="PACKAGE_ARCHIVE",m.FLOW_STEP_FILE="FLOW_STEP_FILE",m.SAMPLE_DATA="SAMPLE_DATA",m.TRIGGER_PAYLOAD="TRIGGER_PAYLOAD",m.SAMPLE_DATA_INPUT="SAMPLE_DATA_INPUT",m.TRIGGER_EVENT_FILE="TRIGGER_EVENT_FILE",m.PROJECT_RELEASE="PROJECT_RELEASE",m.FLOW_VERSION_BACKUP="FLOW_VERSION_BACKUP",m.PLATFORM_ASSET="PLATFORM_ASSET",m.USER_PROFILE_PICTURE="USER_PROFILE_PICTURE",m.WEBHOOK_PAYLOAD="WEBHOOK_PAYLOAD",m.KNOWLEDGE_BASE="KNOWLEDGE_BASE",m.FLOW_BUNDLE="FLOW_BUNDLE",m))(Oi||{}),ki=(r=>(r.NONE="NONE",r.ZSTD="ZSTD",r))(ki||{}),wi=(r=>(r.S3="S3",r.DB="DB",r))(wi||{}),sT=p({...ve,projectId:ee(a()),platformId:ee(a()),type:H(Oi),compression:H(ki),data:h(D()),location:H(wi),size:ee(de()),fileName:ee(a()),s3Key:ee(a()),metadata:ee(N(a(),a()))}),Ri=(n=>(n.ADMIN="ADMIN",n.MEMBER="MEMBER",n.OPERATOR="OPERATOR",n))(Ri||{}),Di=(r=>(r.ACTIVE="ACTIVE",r.INACTIVE="INACTIVE",r))(Di||{}),uT=p({id:a(),email:a(),firstName:a(),status:H(Di),externalId:ee(a()),platformId:ee(a()),platformRole:H(Ri),lastName:a(),created:je,updated:je,lastActiveDate:ee(je),imageUrl:ee(a())});var Yr=p({...q.shape,...B(N(a(),D()),"OBJECT").shape});var Mi=p({...q.shape,...B(a(),"COLOR").shape});var Qr=L([ge,Se,ar,ze,ye,Ae,jr,$t,Fr,Oe,zt,Yr,Ot,At,St,Mi]),J={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 Ee=p({displayName:a(),description:h(a())});var Li=p({username:a(),password:a()}),en=p({...Ee.shape,username:p({displayName:a(),description:h(a())}),password:p({displayName:a(),description:h(a())}),...B(Li,"BASIC_AUTH").shape});var Rl=N(a(),L([ge,Se,Oe,ze,ye])),tn=p({...Ee.shape,props:Rl,...B(D(),"CUSTOM_AUTH").shape});var Ke=p({...Ee.shape,...B(p({auth:a()}),"SECRET_TEXT").shape});var Dl=N(a(),L([ge,Se,Ke,Oe,ze,ye,Ae,ar])),ji=p({...Ee.shape,props:Dl,...B(D(),"OIDC").shape});var rn=(r=>(r.HEADER="HEADER",r.BODY="BODY",r))(rn||{}),Fi=L([ge,Ke,ye]),Bi=N(a(),Fi),Nl=p({props:h(N(a(),Fi)),authUrl:a(),tokenUrl:a(),scope:M(a()),prompt:h(L([O("none"),O("consent"),O("login"),O("omit")])),pkce:h(K()),pkceMethod:h(L([O("plain"),O("S256")])),authorizationMethod:h(H(rn)),grantType:h(L([H(wt),O(Br)])),extra:h(N(a(),a()))}),Zi=p({access_token:a(),props:h(Bi),data:N(a(),It())}),nn=p({...Ee.shape,...Nl.shape,...B(Zi,"OAUTH2").shape});var st=L([en,tn,ji,nn,Ke]),Ut="Connection",ut={SecretText(e){return{...e,valueSchema:void 0,type:"SECRET_TEXT"}},OAuth2(e){return{...e,valueSchema:void 0,type:"OAUTH2",displayName:e.displayName||Ut}},BasicAuth(e){return{...e,valueSchema:void 0,type:"BASIC_AUTH",displayName:e.displayName||Ut,required:!0}},CustomAuth(e){return{...e,valueSchema:void 0,type:"CUSTOM_AUTH",displayName:e.displayName||Ut}},OIDC(e){return{...e,valueSchema:void 0,type:"OIDC",displayName:e.displayName||Ut}},None(){}};var jE={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 Cl=p({...q.shape,...B(D(),"CUSTOM").shape,code:a()});var Ul=L([Qr,st]),on=N(a(),Ul),a$=N(a(),Qr);var Vi=L([p({strategy:O("CRON"),cronExpression:a()}),p({strategy:O("NONE")})]);var Hi="2",pr="0.82.0";var an=class{constructor(t,r,n,i,u,c,l,g,f=pr,_,$="",x){this.displayName=t;this.logoUrl=r;this.authors=n;this.events=i;this.categories=l;this.auth=g;this.minimumSupportedRelease=f;this.maximumSupportedRelease=_;this.description=$;this.deprecated=x;this._actions={};this._triggers={};this.getContextInfo=o(()=>({version:Hi}),"getContextInfo");(!Ml(f)||Ll(f,pr))&&(this.minimumSupportedRelease=pr),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}},Gi=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 an(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 Ml(e){return/^\d+\.\d+\.\d+$/.test(e)}o(Ml,"isValidSimpleSemver");function Ll(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(Ll,"isSemverLessThan");var jl=h(N(a(),N(a(),a()))),Wi=p({id:h(a()),name:a(),displayName:a(),logoUrl:a(),description:a(),authors:M(a()),platformId:h(a()),directoryPath:h(a()),auth:h(L([st,M(st)])),version:a(),categories:h(M(H(ot))),minimumSupportedRelease:h(a()),maximumSupportedRelease:h(a()),deprecated:h(K()),i18n:jl}),Fl=H(["human","ai","both"]),qi=p({description:h(a()),idempotent:h(K())}),Ki=p({name:a(),displayName:a(),description:a(),props:on,requireAuth:K(),errorHandlingOptions:h(Lr),outputSchema:h(or()),audience:h(Fl),aiMetadata:h(qi)}),Ji=p({name:a(),displayName:a(),description:a(),props:on,errorHandlingOptions:h(Lr),type:H(Ge),sampleData:D(),handshakeConfiguration:h(or()),renewConfiguration:h(Vi),testStrategy:H(Dt),outputSchema:h(or()),aiMetadata:h(qi)}),Bl=p({...Wi.shape,actions:N(a(),Ki),triggers:N(a(),Ji)}),Zl=p({...Wi.shape,actions:de(),triggers:de(),suggestedActions:h(M(Ki)),suggestedTriggers:h(M(Ji))}),Xi=p({projectUsage:de(),pieceType:H(nt),packageType:H(kt),platformId:h(a()),archiveId:h(a())}),aS=p({...Bl.shape,...Xi.shape}),sS=p({...Zl.shape,...Xi.shape}),uS=p({name:a(),version:a()});var Vl=He(require("path")),Hl=He(require("fs/promises"));var Je=ut.CustomAuth({props:{apiKey:ut.SecretText({displayName:"API Key",description:"Bird API Access Key from Settings > Security > Access Keys",required:!0}),workspaceId:ut.SecretText({displayName:"Workspace ID",description:"Bird Workspace ID found in your workspace URL",required:!0}),channelId:ut.SecretText({displayName:"Channel ID",description:"Your SMS channel ID from Bird dashboard",required:!0})},required:!0});var ta=require("node:stream");var dr=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 mr=class{static{o(this,"DelegatingAuthenticationConverter")}constructor(t=new sn,r=new un){this.converters={BEARER_TOKEN:t,BASIC:r}}convert(t,r){return this.converters[t.type].convert(t,r)}},sn=class{static{o(this,"BearerTokenAuthenticationConverter")}convert(t,r){return r.Authorization=`Bearer ${t.token}`,r}},un=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 Mt=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 Yi({error:e,requestBody:t}){return e instanceof Mt?e.errorMessage():{response:{status:0,body:e instanceof Error?e.message:String(e)},request:{body:t}}}o(Yi,"toFailsafeOutput");var Lt=(c=>(c.GET="GET",c.POST="POST",c.PATCH="PATCH",c.PUT="PUT",c.DELETE="DELETE",c.HEAD="HEAD",c))(Lt||{});var fr=class extends dr{static{o(this,"FetchHttpClient")}constructor(t="",r=new mr){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[Z,oe]of Object.entries(c))i.append(Z,oe);let l=i.toString(),g=l?`${n}?${l}`:n,f=t.responseType??"json",_=t.followRedirects??!0,$=t.retries??0,{body:x,extraHeaders:s,isStream:d}=Gl(t.method)?Wl(t.body,u):{body:void 0,extraHeaders:{},isStream:!1},y=Kl({...u,...s}),m=await ql(async()=>{let Z=new AbortController,oe=t.timeout&&t.timeout>0?setTimeout(()=>Z.abort(),t.timeout):void 0;try{let pe={method:t.method.toString(),headers:y,body:x,redirect:_?"follow":"manual",signal:Z.signal};return d&&(pe.duplex="half"),r?.dispatcher!==void 0&&(pe.dispatcher=r.dispatcher),await fetch(g,pe)}finally{oe!==void 0&&clearTimeout(oe)}},$),v=_?300:400;if(m.status<200||m.status>=v){let Z=await Qi(m,f),oe=new Mt(t.body,{status:m.status,responseBody:Z});throw console.error("[HttpClient#(sanitized error message)] Request failed:",oe),oe}let P=await Qi(m,f);return{status:m.status,headers:Jl(m.headers),body:P}}};function Gl(e){return e!=="GET"&&e!=="HEAD"}o(Gl,"acceptsRequestBody");function Wl(e,t){if(Yl(e))return{body:void 0,extraHeaders:{},isStream:!1};if(Xl(e)){let n=new ta.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(Wl,"serializeBody");async function Qi(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(Qi,"parseResponseBody");async function ql(e,t){let r;for(let n=0;n<=t;n++)try{let i=await e();if(i.status>=500&&n<t){await ea(n);continue}return i}catch(i){if(r=i,n<t){await ea(n);continue}throw i}throw r}o(ql,"sendWithRetries");function ea(e){let t=Math.min(1e3*2**e,3e4);return new Promise(r=>setTimeout(r,t))}o(ea,"backoff");function Kl(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(Kl,"normalizeHeaders");function Jl(e){let t={};return e.forEach((r,n)=>{t[n]=r}),t}o(Jl,"toHttpHeaders");function Xl(e){return typeof e=="object"&&e!==null&&typeof e.getHeaders=="function"&&typeof e.pipe=="function"&&typeof e.on=="function"}o(Xl,"isNodeFormData");function Yl(e){return e==null}o(Yl,"isNil");var ct=new fr;var Ld=He(require("fs")),su=He(au());var jd={"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 Fd(e){let t=e.split(";")[0].trim().toLowerCase();return jd[t]??""}o(Fd,"contentTypeToExtension");var Bd=o(({baseUrl:e,relativePath:t})=>{let r=e.endsWith("/")?e:`${e}/`,n=t.startsWith("/")?t.slice(1):t;return`${r}${n}`},"joinBaseUrlWithRelativePath"),Zd=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 uu({auth:e,baseUrl:t,authMapping:r,description:n,displayName:i,name:u,props:c,extraProps:l,authLocation:g="headers"}){return rt({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:J.DynamicProperties({auth:e,displayName:"",required:!0,refreshers:[],props:o(async({auth:f})=>({url:J.ShortText({displayName:"URL",description:`You can either use the full URL or the relative path to the base URL
|
|
3
|
+
i.e ${Zd(t,f)}/resource or /resource`,required:!0,defaultValue:f?t(f):"",...c?.url??{}})}),"props")}),method:J.StaticDropdown({displayName:"Method",required:!0,options:{options:Object.values(Lt).map(f=>({label:f,value:f}))},...c?.method??{}}),headers:J.Object({displayName:"Headers",description:"Authorization headers are injected automatically from your connection.",required:!0,...c?.headers??{}}),queryParams:J.Object({displayName:"Query Parameters",required:!0,...c?.queryParams??{}}),body_type:J.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:J.DynamicProperties({auth:e,displayName:"Body",refreshers:["body_type"],required:!1,props:o(async({body_type:f})=>{if(!f)return{};let _=f,$={};switch(_){case"none":break;case"json":$.data=J.Json({displayName:"JSON Body",required:!0,...c?.body??{}});break;case"raw":$.data=J.LongText({displayName:"Raw Body",required:!0});break;case"form_data":$.data=J.Array({displayName:"Form Data",required:!0,properties:{fieldName:J.ShortText({displayName:"Field Name",required:!0}),fieldType:J.StaticDropdown({displayName:"Field Type",required:!0,options:{disabled:!1,options:[{label:"Text",value:"text"},{label:"File",value:"file"}]}}),textFieldValue:J.LongText({displayName:"Text Field Value",required:!1}),fileFieldValue:J.File({displayName:"File Field Value",required:!1})}});break}return $},"props")}),response_is_binary:J.Checkbox({displayName:"Response is Binary ?",description:"Enable for files like PDFs, images, etc.",required:!1,defaultValue:!1}),failsafe:J.Checkbox({displayName:"No Error on Failure",required:!1,...c?.failsafe??{}}),timeout:J.Number({displayName:"Timeout (in seconds)",required:!1,...c?.timeout??{}}),followRedirects:J.Checkbox({displayName:"Follow redirects",required:!1,defaultValue:!1}),...l},run:o(async f=>{let{method:_,url:$,headers:x,queryParams:s,body:d,body_type:y,failsafe:m,timeout:v,response_is_binary:P,followRedirects:Z}=f.propsValue;ur(_,"Method"),ur($,"URL");let oe=_e(r)?{}:await r(f.auth,f.propsValue),pe=$.url,be=pe.startsWith("http://")||pe.startsWith("https://")?pe:Bd({baseUrl:t(f.auth),relativePath:pe}),X={method:_,url:be,headers:{...x??{},...g==="headers"||!_e(g)?oe:{}},queryParams:{...g==="queryParams"?oe:{},...s??{}},timeout:v?v*1e3:0,followRedirects:Z};if(P&&(X.responseType="arraybuffer"),d)if(y&&y!=="none"){let V=d.data;if(y==="form_data"){let Ye=V,Be=new su.default;for(let{fieldName:U,fieldType:I,textFieldValue:b,fileFieldValue:S}of Ye)I==="text"&&!Nt(b)?Be.append(U,b):I==="file"&&!Nt(S)&&Be.append(U,S.data,{filename:S?.filename});X.body=Be,X.headers={...X.headers,...Be.getHeaders()}}else X.body=V}else y||(X.body=d);try{let V=await ct.sendRequest(X);return await Vd(f.files,V.body,V.status,V.headers,P)}catch(V){if(m)return Yi({error:V,requestBody:X.body});throw V}},"run")})}o(uu,"createCustomApiCallAction");var Vd=o(async(e,t,r,n,i)=>{let u;if(i&&Hd(t)){let c=Array.isArray(n?.["content-type"])?n["content-type"][0]:n?.["content-type"],l=Fd(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"),Hd=o(e=>e instanceof ArrayBuffer||Buffer.isBuffer(e),"isBinaryBody");var cu=rt({auth:Je,name:"send-sms",displayName:"Send SMS",description:"Sends an SMS message via Bird Channels API.",audience:"both",aiMetadata:{description:"Send an outbound SMS text message to a phone number through the Bird (MessageBird) Channels API, using the workspace and channel configured in the connection. Choose this to deliver a text message to a single recipient; the recipient must be an E.164 phone number including country code. Optionally schedule it for a future UTC timestamp instead of sending immediately. Not idempotent \u2014 each call sends (or schedules) a new message.",idempotent:!1},props:{recipient:J.ShortText({displayName:"Recipient",description:"The phone number to send the message to (with country code)",required:!0}),message:J.LongText({displayName:"Message",description:"The body of the SMS message",required:!0}),reference:J.ShortText({displayName:"Reference",description:"Your own identifier for the message (optional)",required:!1}),scheduledFor:J.DateTime({displayName:"Scheduled For (UTC timestamp)",description:"Message to be sent at a specific datetime eg. 2025-04-27T15:08:18.613Z. If not set, the message will be sent immediately.",required:!1})},async run(e){let{recipient:t,message:r,reference:n,scheduledFor:i}=e.propsValue,u=e.auth.props,c={method:"POST",url:`https://api.bird.com/workspaces/${u.workspaceId}/channels/${u.channelId}/messages`,headers:{Authorization:`Bearer ${u.apiKey}`,"Content-Type":"application/json"},body:{receiver:{contacts:[{identifierValue:t}]},body:{type:"text",text:{text:r}},...n&&{reference:n},...i&&{scheduledFor:i}}};return await ct.sendRequest(c)}});var kn=He(lu()),pu=rt({auth:Je,name:"listMessages",displayName:"List Messages",description:"Lists an Messages via Bird Channels API",audience:"both",aiMetadata:{description:'Retrieve messages for the configured Bird (MessageBird) channel within a required UTC start/end time window (the span must not exceed 7 days). Choose this to read recent message history or to look up message status. Set status to "all" to return messages of every status, or pick a specific status (pending, sent, delivered, failed, etc.) to filter to matching messages only; supports a page token for paging past 1000 results. Read-only and idempotent.',idempotent:!0},props:{status:J.StaticDropdown({displayName:"Status",description:'The status of the messages to filter by (select "All" for all statuses)',required:!0,options:{options:[{label:"All",value:"all"},{label:"Pending",value:"pending"},{label:"Accepted",value:"accepted"},{label:"Rejected",value:"rejected"},{label:"Processing",value:"processing"},{label:"Scheduled",value:"scheduled"},{label:"Sent",value:"sent"},{label:"Sending Failed",value:"sending_failed"},{label:"Delivered",value:"delivered"},{label:"Delivery Failed",value:"delivery_failed"},{label:"Deleted",value:"deleted"},{label:"Skipped",value:"skipped"}]}}),startAt:J.DateTime({displayName:"Start Date and Time",description:"The start date and time (in UTC) to filter messages",required:!0,defaultValue:(0,kn.default)().subtract(1,"day").format("YYYY-MM-DDTHH:mm:ss[Z]")}),endAt:J.DateTime({displayName:"End Date and Time",description:"The end date and time (in UTC) to filter messages, should not exceed 7 days from start date",required:!0,defaultValue:(0,kn.default)().format("YYYY-MM-DDTHH:mm:ss[Z]")}),pageToken:J.ShortText({displayName:"Next Page Token",description:"Token for pagination to fetch next set of results after 1000 messages",required:!1})},async run(e){let{status:t,startAt:r,endAt:n,pageToken:i}=e.propsValue,u=e.auth.props;return(await ct.sendRequest({method:"GET",url:`https://api.bird.com/workspaces/${u.workspaceId}/channels/${u.channelId}/messages`,queryParams:{limit:"1000",...t==="all"?{}:{status:t},startAt:r,endAt:n,...i?{pageToken:i}:{}},headers:{Authorization:`Bearer ${u.apiKey}`,"Content-Type":"application/json"}})).body}});var Gd=Gi({displayName:"Bird",description:"Unified CRM for Marketing, Service & Payments",auth:Je,minimumSupportedRelease:"0.30.0",logoUrl:"https://cdn.activepieces.com/pieces/messagebird.png",categories:["MARKETING","COMMUNICATION"],authors:["kishanprmr","geekyme","prasanna2000-max"],actions:[cu,pu,uu({baseUrl:o(e=>e?"https://api.bird.com/workspaces/"+e.props.workspaceId:"","baseUrl"),auth:Je,authMapping:o(async e=>({Authorization:`Bearer ${e.props.apiKey}`}),"authMapping")})],triggers:[]});0&&(module.exports={messagebird});
|
|
4
|
+
/*! Bundled license information:
|
|
5
|
+
|
|
6
|
+
mime-types/index.js:
|
|
7
|
+
(*!
|
|
8
|
+
* mime-types
|
|
9
|
+
* Copyright(c) 2014 Jonathan Ong
|
|
10
|
+
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
11
|
+
* MIT Licensed
|
|
12
|
+
*)
|
|
13
|
+
*/
|
package/src/index.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export declare const messagebird: import("@activepieces/pieces-framework").Piece<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
-
apiKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
3
|
-
workspaceId: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
4
|
-
channelId: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
5
|
-
}>>;
|
|
6
|
-
//# sourceMappingURL=index.d.ts.map
|
package/src/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,WAAW;;;;GAwBtB,CAAC"}
|
package/src/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,mEAA8D;AAC9D,iDAAqD;AACrD,+DAA2D;AAC3D,qCAAqD;AACrD,+DAAwE;AAE3D,QAAA,WAAW,GAAG,IAAA,8BAAW,EAAC;IACrC,WAAW,EAAE,MAAM;IACnB,WAAW,EAAE,+CAA+C;IAC5D,IAAI,EAAE,eAAQ;IACd,uBAAuB,EAAE,QAAQ;IACjC,OAAO,EAAE,qDAAqD;IAC9D,UAAU,EAAE,CAAC,sBAAa,CAAC,SAAS,EAAE,sBAAa,CAAC,aAAa,CAAC;IAClE,OAAO,EAAE,CAAC,YAAY,EAAE,SAAS,EAAC,kBAAkB,CAAC;IACrD,OAAO,EAAE;QACP,+BAAa;QACb,4BAAY;QACZ,IAAA,yCAAyB,EAAC;YACxB,OAAO,EAAE,CAAC,IAAI,EAAC,EAAE;gBACf,OAAO,IAAI,CAAC,CAAC,CAAC,kCAAkC,GAAI,IAAI,CAAC,KAAuB,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC;YACpG,CAAC;YACD,IAAI,EAAE,eAAQ;YACd,WAAW,EAAE,CAAO,IAAI,EAAE,EAAE;gBAC1B,OAAO;oBACL,aAAa,EAAE,UAAW,IAAI,CAAC,KAAuB,CAAC,MAAM,EAAE;iBAChE,CAAC;YACJ,CAAC,CAAA;SACF,CAAC;KACH;IACD,QAAQ,EAAE,EAAE;CACb,CAAC,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export declare const listMessages: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
-
apiKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
3
|
-
workspaceId: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
4
|
-
channelId: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
5
|
-
}>, {
|
|
6
|
-
status: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
|
|
7
|
-
startAt: import("@activepieces/pieces-framework").DateTimeProperty<true>;
|
|
8
|
-
endAt: import("@activepieces/pieces-framework").DateTimeProperty<true>;
|
|
9
|
-
pageToken: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
10
|
-
}>;
|
|
11
|
-
//# sourceMappingURL=list-messages.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"list-messages.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/list-messages.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,YAAY;;;;;;;;;EAqEvB,CAAC"}
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.listMessages = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const auth_1 = require("../auth");
|
|
6
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
7
|
-
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
8
|
-
const dayjs_1 = tslib_1.__importDefault(require("dayjs"));
|
|
9
|
-
exports.listMessages = (0, pieces_framework_1.createAction)({
|
|
10
|
-
auth: auth_1.birdAuth,
|
|
11
|
-
name: 'listMessages',
|
|
12
|
-
displayName: 'List Messages',
|
|
13
|
-
description: 'Lists an Messages via Bird Channels API',
|
|
14
|
-
audience: 'both',
|
|
15
|
-
aiMetadata: { description: 'Retrieve messages for the configured Bird (MessageBird) channel within a required UTC start/end time window (the span must not exceed 7 days). Choose this to read recent message history or to look up message status. Set status to "all" to return messages of every status, or pick a specific status (pending, sent, delivered, failed, etc.) to filter to matching messages only; supports a page token for paging past 1000 results. Read-only and idempotent.', idempotent: true },
|
|
16
|
-
props: {
|
|
17
|
-
status: pieces_framework_1.Property.StaticDropdown({
|
|
18
|
-
displayName: 'Status',
|
|
19
|
-
description: 'The status of the messages to filter by (select "All" for all statuses)',
|
|
20
|
-
required: true,
|
|
21
|
-
options: {
|
|
22
|
-
options: [
|
|
23
|
-
{ label: 'All', value: 'all' },
|
|
24
|
-
{ label: 'Pending', value: 'pending' },
|
|
25
|
-
{ label: 'Accepted', value: 'accepted' },
|
|
26
|
-
{ label: 'Rejected', value: 'rejected' },
|
|
27
|
-
{ label: 'Processing', value: 'processing' },
|
|
28
|
-
{ label: 'Scheduled', value: 'scheduled' },
|
|
29
|
-
{ label: 'Sent', value: 'sent' },
|
|
30
|
-
{ label: 'Sending Failed', value: 'sending_failed' },
|
|
31
|
-
{ label: 'Delivered', value: 'delivered' },
|
|
32
|
-
{ label: 'Delivery Failed', value: 'delivery_failed' },
|
|
33
|
-
{ label: 'Deleted', value: 'deleted' },
|
|
34
|
-
{ label: 'Skipped', value: 'skipped' },
|
|
35
|
-
]
|
|
36
|
-
},
|
|
37
|
-
}),
|
|
38
|
-
startAt: pieces_framework_1.Property.DateTime({
|
|
39
|
-
displayName: 'Start Date and Time',
|
|
40
|
-
description: 'The start date and time (in UTC) to filter messages',
|
|
41
|
-
required: true,
|
|
42
|
-
defaultValue: (0, dayjs_1.default)().subtract(1, 'day').format('YYYY-MM-DDTHH:mm:ss[Z]'),
|
|
43
|
-
}),
|
|
44
|
-
endAt: pieces_framework_1.Property.DateTime({
|
|
45
|
-
displayName: 'End Date and Time',
|
|
46
|
-
description: 'The end date and time (in UTC) to filter messages, should not exceed 7 days from start date',
|
|
47
|
-
required: true,
|
|
48
|
-
defaultValue: (0, dayjs_1.default)().format('YYYY-MM-DDTHH:mm:ss[Z]'),
|
|
49
|
-
}),
|
|
50
|
-
pageToken: pieces_framework_1.Property.ShortText({
|
|
51
|
-
displayName: 'Next Page Token',
|
|
52
|
-
description: 'Token for pagination to fetch next set of results after 1000 messages',
|
|
53
|
-
required: false,
|
|
54
|
-
}),
|
|
55
|
-
},
|
|
56
|
-
run(context) {
|
|
57
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
58
|
-
const { status, startAt, endAt, pageToken } = context.propsValue;
|
|
59
|
-
const auth = context.auth.props;
|
|
60
|
-
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
61
|
-
method: pieces_common_1.HttpMethod.GET,
|
|
62
|
-
url: `https://api.bird.com/workspaces/${auth.workspaceId}/channels/${auth.channelId}/messages`,
|
|
63
|
-
queryParams: Object.assign(Object.assign(Object.assign({ limit: '1000' }, (status === 'all' ? {} : { status: status })), { startAt: startAt, endAt: endAt }), (pageToken ? { pageToken: pageToken } : {})),
|
|
64
|
-
headers: {
|
|
65
|
-
'Authorization': `Bearer ${auth.apiKey}`,
|
|
66
|
-
'Content-Type': 'application/json',
|
|
67
|
-
},
|
|
68
|
-
});
|
|
69
|
-
return response.body;
|
|
70
|
-
});
|
|
71
|
-
},
|
|
72
|
-
});
|
|
73
|
-
//# sourceMappingURL=list-messages.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"list-messages.js","sourceRoot":"","sources":["../../../../src/lib/actions/list-messages.ts"],"names":[],"mappings":";;;;AAAA,kCAAmC;AACnC,qEAAwE;AACxE,+DAGqC;AACrC,0DAA0B;AAEb,QAAA,YAAY,GAAG,IAAA,+BAAY,EAAC;IACvC,IAAI,EAAE,eAAQ;IACd,IAAI,EAAE,cAAc;IACpB,WAAW,EAAE,eAAe;IAC5B,WAAW,EAAE,yCAAyC;IACtD,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE,EAAE,WAAW,EAAE,ucAAuc,EAAE,UAAU,EAAE,IAAI,EAAE;IACtf,KAAK,EAAE;QACL,MAAM,EAAG,2BAAQ,CAAC,cAAc,CAAC;YAC/B,WAAW,EAAE,QAAQ;YACrB,WAAW,EAAE,yEAAyE;YACtF,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,OAAO,EAAE;oBACP,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE;oBAC9B,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE;oBACtC,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE;oBACxC,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE;oBACxC,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,EAAE;oBAC5C,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,WAAW,EAAE;oBAC1C,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE;oBAChC,EAAE,KAAK,EAAE,gBAAgB,EAAE,KAAK,EAAE,gBAAgB,EAAE;oBACpD,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,WAAW,EAAE;oBAC1C,EAAE,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,iBAAiB,EAAE;oBACtD,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE;oBACtC,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE;iBACvC;aAAC;SACL,CAAC;QACF,OAAO,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YACzB,WAAW,EAAE,qBAAqB;YAClC,WAAW,EAAE,qDAAqD;YAClE,QAAQ,EAAE,IAAI;YACd,YAAY,EAAE,IAAA,eAAK,GAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,MAAM,CAAC,wBAAwB,CAAC;SAC1E,CAAC;QACF,KAAK,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YACvB,WAAW,EAAE,mBAAmB;YAChC,WAAW,EAAE,6FAA6F;YAC1G,QAAQ,EAAE,IAAI;YACd,YAAY,EAAE,IAAA,eAAK,GAAE,CAAC,MAAM,CAAC,wBAAwB,CAAC;SACvD,CAAC;QACF,SAAS,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC5B,WAAW,EAAE,iBAAiB;YAC9B,WAAW,EAAE,uEAAuE;YACpF,QAAQ,EAAE,KAAK;SAChB,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YAEjE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC;YAEhC,MAAM,QAAQ,GAAG,MAAM,0BAAU,CAAC,WAAW,CAAM;gBACjD,MAAM,EAAE,0BAAU,CAAC,GAAG;gBACtB,GAAG,EAAE,mCAAmC,IAAI,CAAC,WAAW,aAAa,IAAI,CAAC,SAAS,WAAW;gBAC9F,WAAW,8CACT,KAAK,EAAE,MAAM,IACV,CAAC,MAAM,KAAK,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,KAC/C,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,KAAK,KACT,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAC/C;gBACD,OAAO,EAAE;oBACP,eAAe,EAAE,UAAU,IAAI,CAAC,MAAM,EAAE;oBACxC,cAAc,EAAE,kBAAkB;iBACnC;aACF,CAAC,CAAC;YAEH,OAAO,QAAQ,CAAC,IAAI,CAAA;QACtB,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export declare const sendSMSAction: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
-
apiKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
3
|
-
workspaceId: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
4
|
-
channelId: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
5
|
-
}>, {
|
|
6
|
-
recipient: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
7
|
-
message: import("@activepieces/pieces-framework").LongTextProperty<true>;
|
|
8
|
-
reference: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
9
|
-
scheduledFor: import("@activepieces/pieces-framework").DateTimeProperty<false>;
|
|
10
|
-
}>;
|
|
11
|
-
//# sourceMappingURL=send-sms.action.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"send-sms.action.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/send-sms.action.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,aAAa;;;;;;;;;EA8DxB,CAAC"}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.sendSMSAction = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const auth_1 = require("../auth");
|
|
6
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
7
|
-
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
8
|
-
exports.sendSMSAction = (0, pieces_framework_1.createAction)({
|
|
9
|
-
auth: auth_1.birdAuth,
|
|
10
|
-
name: 'send-sms',
|
|
11
|
-
displayName: 'Send SMS',
|
|
12
|
-
description: 'Sends an SMS message via Bird Channels API.',
|
|
13
|
-
audience: 'both',
|
|
14
|
-
aiMetadata: { description: 'Send an outbound SMS text message to a phone number through the Bird (MessageBird) Channels API, using the workspace and channel configured in the connection. Choose this to deliver a text message to a single recipient; the recipient must be an E.164 phone number including country code. Optionally schedule it for a future UTC timestamp instead of sending immediately. Not idempotent — each call sends (or schedules) a new message.', idempotent: false },
|
|
15
|
-
props: {
|
|
16
|
-
recipient: pieces_framework_1.Property.ShortText({
|
|
17
|
-
displayName: 'Recipient',
|
|
18
|
-
description: 'The phone number to send the message to (with country code)',
|
|
19
|
-
required: true,
|
|
20
|
-
}),
|
|
21
|
-
message: pieces_framework_1.Property.LongText({
|
|
22
|
-
displayName: 'Message',
|
|
23
|
-
description: 'The body of the SMS message',
|
|
24
|
-
required: true,
|
|
25
|
-
}),
|
|
26
|
-
reference: pieces_framework_1.Property.ShortText({
|
|
27
|
-
displayName: 'Reference',
|
|
28
|
-
description: 'Your own identifier for the message (optional)',
|
|
29
|
-
required: false,
|
|
30
|
-
}),
|
|
31
|
-
scheduledFor: pieces_framework_1.Property.DateTime({
|
|
32
|
-
displayName: 'Scheduled For (UTC timestamp)',
|
|
33
|
-
description: 'Message to be sent at a specific datetime eg. 2025-04-27T15:08:18.613Z. If not set, the message will be sent immediately.',
|
|
34
|
-
required: false,
|
|
35
|
-
}),
|
|
36
|
-
},
|
|
37
|
-
run(context) {
|
|
38
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
39
|
-
const { recipient, message, reference, scheduledFor } = context.propsValue;
|
|
40
|
-
const auth = context.auth.props;
|
|
41
|
-
// Format request for Bird Channels API
|
|
42
|
-
const request = {
|
|
43
|
-
method: pieces_common_1.HttpMethod.POST,
|
|
44
|
-
url: `https://api.bird.com/workspaces/${auth.workspaceId}/channels/${auth.channelId}/messages`,
|
|
45
|
-
headers: {
|
|
46
|
-
'Authorization': `Bearer ${auth.apiKey}`,
|
|
47
|
-
'Content-Type': 'application/json'
|
|
48
|
-
},
|
|
49
|
-
body: Object.assign(Object.assign({ receiver: {
|
|
50
|
-
contacts: [
|
|
51
|
-
{
|
|
52
|
-
identifierValue: recipient
|
|
53
|
-
}
|
|
54
|
-
]
|
|
55
|
-
}, body: {
|
|
56
|
-
type: 'text',
|
|
57
|
-
text: {
|
|
58
|
-
text: message
|
|
59
|
-
}
|
|
60
|
-
} }, (reference && { reference })), (scheduledFor && { scheduledFor })),
|
|
61
|
-
};
|
|
62
|
-
return yield pieces_common_1.httpClient.sendRequest(request);
|
|
63
|
-
});
|
|
64
|
-
},
|
|
65
|
-
});
|
|
66
|
-
//# sourceMappingURL=send-sms.action.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"send-sms.action.js","sourceRoot":"","sources":["../../../../src/lib/actions/send-sms.action.ts"],"names":[],"mappings":";;;;AAAA,kCAAmC;AACnC,qEAAwE;AACxE,+DAIqC;AAExB,QAAA,aAAa,GAAG,IAAA,+BAAY,EAAC;IACxC,IAAI,EAAE,eAAQ;IACd,IAAI,EAAE,UAAU;IAChB,WAAW,EAAE,UAAU;IACvB,WAAW,EAAE,6CAA6C;IAC1D,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE,EAAE,WAAW,EAAE,kbAAkb,EAAE,UAAU,EAAE,KAAK,EAAE;IACle,KAAK,EAAE;QACL,SAAS,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC5B,WAAW,EAAE,WAAW;YACxB,WAAW,EAAE,6DAA6D;YAC1E,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,OAAO,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YACzB,WAAW,EAAE,SAAS;YACtB,WAAW,EAAE,6BAA6B;YAC1C,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,SAAS,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC5B,WAAW,EAAE,WAAW;YACxB,WAAW,EAAE,gDAAgD;YAC7D,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,YAAY,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YAC9B,WAAW,EAAE,+BAA+B;YAC5C,WAAW,EAAE,2HAA2H;YACxI,QAAQ,EAAE,KAAK;SAChB,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YAC3E,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC;YAEhC,uCAAuC;YACvC,MAAM,OAAO,GAAgB;gBAC3B,MAAM,EAAE,0BAAU,CAAC,IAAI;gBACvB,GAAG,EAAE,mCAAmC,IAAI,CAAC,WAAW,aAAa,IAAI,CAAC,SAAS,WAAW;gBAC9F,OAAO,EAAE;oBACP,eAAe,EAAE,UAAU,IAAI,CAAC,MAAM,EAAE;oBACxC,cAAc,EAAE,kBAAkB;iBACnC;gBACD,IAAI,gCACF,QAAQ,EAAE;wBACR,QAAQ,EAAE;4BACR;gCACE,eAAe,EAAE,SAAS;6BAC3B;yBACF;qBACF,EACD,IAAI,EAAE;wBACJ,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE;4BACJ,IAAI,EAAE,OAAO;yBACd;qBACF,IACE,CAAC,SAAS,IAAI,EAAE,SAAS,EAAE,CAAC,GAC5B,CAAC,YAAY,IAAI,EAAE,YAAY,EAAE,CAAC,CACtC;aACF,CAAC;YAEF,OAAO,MAAM,0BAAU,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;QAC/C,CAAC;KAAA;CACF,CAAC,CAAC"}
|
package/src/lib/auth.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export interface BirdAuthValue {
|
|
2
|
-
apiKey: string;
|
|
3
|
-
workspaceId: string;
|
|
4
|
-
channelId: string;
|
|
5
|
-
}
|
|
6
|
-
export declare const birdAuth: import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
7
|
-
apiKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
8
|
-
workspaceId: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
9
|
-
channelId: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
10
|
-
}>;
|
|
11
|
-
//# sourceMappingURL=auth.d.ts.map
|
package/src/lib/auth.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../src/lib/auth.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,eAAO,MAAM,QAAQ;;;;EAmBnB,CAAC"}
|
package/src/lib/auth.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.birdAuth = void 0;
|
|
4
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
5
|
-
exports.birdAuth = pieces_framework_1.PieceAuth.CustomAuth({
|
|
6
|
-
props: {
|
|
7
|
-
apiKey: pieces_framework_1.PieceAuth.SecretText({
|
|
8
|
-
displayName: 'API Key',
|
|
9
|
-
description: 'Bird API Access Key from Settings > Security > Access Keys',
|
|
10
|
-
required: true,
|
|
11
|
-
}),
|
|
12
|
-
workspaceId: pieces_framework_1.PieceAuth.SecretText({
|
|
13
|
-
displayName: 'Workspace ID',
|
|
14
|
-
description: 'Bird Workspace ID found in your workspace URL',
|
|
15
|
-
required: true,
|
|
16
|
-
}),
|
|
17
|
-
channelId: pieces_framework_1.PieceAuth.SecretText({
|
|
18
|
-
displayName: 'Channel ID',
|
|
19
|
-
description: 'Your SMS channel ID from Bird dashboard',
|
|
20
|
-
required: true,
|
|
21
|
-
}),
|
|
22
|
-
},
|
|
23
|
-
required: true,
|
|
24
|
-
});
|
|
25
|
-
//# sourceMappingURL=auth.js.map
|
package/src/lib/auth.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../../../src/lib/auth.ts"],"names":[],"mappings":";;;AAAA,qEAA2D;AAQ9C,QAAA,QAAQ,GAAG,4BAAS,CAAC,UAAU,CAAC;IAC3C,KAAK,EAAE;QACL,MAAM,EAAE,4BAAS,CAAC,UAAU,CAAC;YAC3B,WAAW,EAAE,SAAS;YACtB,WAAW,EAAE,4DAA4D;YACzE,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,WAAW,EAAE,4BAAS,CAAC,UAAU,CAAC;YAChC,WAAW,EAAE,cAAc;YAC3B,WAAW,EAAE,+CAA+C;YAC5D,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,SAAS,EAAE,4BAAS,CAAC,UAAU,CAAC;YAC9B,WAAW,EAAE,YAAY;YACzB,WAAW,EAAE,yCAAyC;YACtD,QAAQ,EAAE,IAAI;SACf,CAAC;KACH;IACD,QAAQ,EAAE,IAAI;CACf,CAAC,CAAC"}
|