@activepieces/piece-elastic-email 0.2.2 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/package.json +7 -13
  2. package/src/index.js +20 -51
  3. package/src/index.d.ts +0 -2
  4. package/src/index.d.ts.map +0 -1
  5. package/src/index.js.map +0 -1
  6. package/src/lib/actions/add-contact.d.ts +0 -12
  7. package/src/lib/actions/add-contact.d.ts.map +0 -1
  8. package/src/lib/actions/add-contact.js +0 -100
  9. package/src/lib/actions/add-contact.js.map +0 -1
  10. package/src/lib/actions/create-campaign.d.ts +0 -11
  11. package/src/lib/actions/create-campaign.d.ts.map +0 -1
  12. package/src/lib/actions/create-campaign.js +0 -84
  13. package/src/lib/actions/create-campaign.js.map +0 -1
  14. package/src/lib/actions/create-contact.d.ts +0 -8
  15. package/src/lib/actions/create-contact.d.ts.map +0 -1
  16. package/src/lib/actions/create-contact.js +0 -68
  17. package/src/lib/actions/create-contact.js.map +0 -1
  18. package/src/lib/actions/create-segment.d.ts +0 -5
  19. package/src/lib/actions/create-segment.d.ts.map +0 -1
  20. package/src/lib/actions/create-segment.js +0 -44
  21. package/src/lib/actions/create-segment.js.map +0 -1
  22. package/src/lib/actions/list-campaigns.d.ts +0 -6
  23. package/src/lib/actions/list-campaigns.d.ts.map +0 -1
  24. package/src/lib/actions/list-campaigns.js +0 -60
  25. package/src/lib/actions/list-campaigns.js.map +0 -1
  26. package/src/lib/actions/list-contacts.d.ts +0 -5
  27. package/src/lib/actions/list-contacts.d.ts.map +0 -1
  28. package/src/lib/actions/list-contacts.js +0 -52
  29. package/src/lib/actions/list-contacts.js.map +0 -1
  30. package/src/lib/actions/send-email.d.ts +0 -17
  31. package/src/lib/actions/send-email.d.ts.map +0 -1
  32. package/src/lib/actions/send-email.js +0 -133
  33. package/src/lib/actions/send-email.js.map +0 -1
  34. package/src/lib/actions/unsubscribe-contact.d.ts +0 -4
  35. package/src/lib/actions/unsubscribe-contact.d.ts.map +0 -1
  36. package/src/lib/actions/unsubscribe-contact.js +0 -39
  37. package/src/lib/actions/unsubscribe-contact.js.map +0 -1
  38. package/src/lib/actions/update-campaign.d.ts +0 -12
  39. package/src/lib/actions/update-campaign.d.ts.map +0 -1
  40. package/src/lib/actions/update-campaign.js +0 -94
  41. package/src/lib/actions/update-campaign.js.map +0 -1
  42. package/src/lib/actions/update-contact.d.ts +0 -7
  43. package/src/lib/actions/update-contact.d.ts.map +0 -1
  44. package/src/lib/actions/update-contact.js +0 -52
  45. package/src/lib/actions/update-contact.js.map +0 -1
  46. package/src/lib/auth.d.ts +0 -2
  47. package/src/lib/auth.d.ts.map +0 -1
  48. package/src/lib/auth.js +0 -59
  49. package/src/lib/auth.js.map +0 -1
  50. package/src/lib/common/client.d.ts +0 -9
  51. package/src/lib/common/client.d.ts.map +0 -1
  52. package/src/lib/common/client.js +0 -19
  53. package/src/lib/common/client.js.map +0 -1
  54. package/src/lib/common/constants.d.ts +0 -8
  55. package/src/lib/common/constants.d.ts.map +0 -1
  56. package/src/lib/common/constants.js +0 -47
  57. package/src/lib/common/constants.js.map +0 -1
  58. package/src/lib/common/props.d.ts +0 -6
  59. package/src/lib/common/props.d.ts.map +0 -1
  60. package/src/lib/common/props.js +0 -165
  61. package/src/lib/common/props.js.map +0 -1
package/package.json CHANGED
@@ -1,17 +1,11 @@
1
1
  {
2
2
  "name": "@activepieces/piece-elastic-email",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "main": "./src/index.js",
5
- "types": "./src/index.d.ts",
6
- "scripts": {
7
- "build": "tsc -p tsconfig.lib.json && cp package.json dist/",
8
- "lint": "eslint 'src/**/*.ts'"
9
- },
10
- "dependencies": {
11
- "@activepieces/pieces-common": "0.12.3",
12
- "@activepieces/pieces-framework": "0.30.0",
13
- "@activepieces/shared": "0.87.1",
14
- "zod": "4.3.6",
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,51 +1,20 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.elasticEmail = void 0;
4
- const tslib_1 = require("tslib");
5
- const pieces_common_1 = require("@activepieces/pieces-common");
6
- const pieces_framework_1 = require("@activepieces/pieces-framework");
7
- const shared_1 = require("@activepieces/shared");
8
- const auth_1 = require("./lib/auth");
9
- const constants_1 = require("./lib/common/constants");
10
- const add_contact_1 = require("./lib/actions/add-contact");
11
- const create_campaign_1 = require("./lib/actions/create-campaign");
12
- const create_contact_1 = require("./lib/actions/create-contact");
13
- const create_segment_1 = require("./lib/actions/create-segment");
14
- const list_campaigns_1 = require("./lib/actions/list-campaigns");
15
- const list_contacts_1 = require("./lib/actions/list-contacts");
16
- const send_email_1 = require("./lib/actions/send-email");
17
- const unsubscribe_contact_1 = require("./lib/actions/unsubscribe-contact");
18
- const update_campaign_1 = require("./lib/actions/update-campaign");
19
- const update_contact_1 = require("./lib/actions/update-contact");
20
- exports.elasticEmail = (0, pieces_framework_1.createPiece)({
21
- displayName: 'Elastic Email',
22
- description: 'Email delivery and marketing platform for sending emails, managing contacts, campaigns, and segments.',
23
- auth: auth_1.elasticEmailAuth,
24
- minimumSupportedRelease: '0.36.1',
25
- logoUrl: 'https://cdn.activepieces.com/pieces/elastic-email.png',
26
- authors: ['Harmatta'],
27
- categories: [shared_1.PieceCategory.MARKETING],
28
- actions: [
29
- add_contact_1.addContactAction,
30
- create_campaign_1.createCampaignAction,
31
- create_contact_1.createContactAction,
32
- create_segment_1.createSegmentAction,
33
- list_campaigns_1.listCampaignsAction,
34
- list_contacts_1.listContactsAction,
35
- send_email_1.sendEmailAction,
36
- unsubscribe_contact_1.unsubscribeContactAction,
37
- update_campaign_1.updateCampaignAction,
38
- update_contact_1.updateContactAction,
39
- (0, pieces_common_1.createCustomApiCallAction)({
40
- baseUrl: () => constants_1.ELASTIC_EMAIL_API_BASE,
41
- auth: auth_1.elasticEmailAuth,
42
- authMapping: (auth) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
43
- return ({
44
- 'X-ElasticEmail-ApiKey': auth.secret_text,
45
- });
46
- }),
47
- }),
48
- ],
49
- triggers: [],
50
- });
51
- //# sourceMappingURL=index.js.map
1
+ "use strict";var Qs=Object.create;var Qe=Object.defineProperty;var eu=Object.getOwnPropertyDescriptor;var tu=Object.getOwnPropertyNames;var ru=Object.getPrototypeOf,nu=Object.prototype.hasOwnProperty;var o=(e,t)=>Qe(e,"name",{value:t,configurable:!0});var I=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),hn=(e,t)=>{for(var r in t)Qe(e,r,{get:t[r],enumerable:!0})},vn=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of tu(t))!nu.call(e,i)&&i!==r&&Qe(e,i,{get:()=>t[i],enumerable:!(n=eu(t,i))||n.enumerable});return e};var we=(e,t,r)=>(r=e!=null?Qs(ru(e)):{},vn(t||!e||!e.__esModule?Qe(r,"default",{value:e,enumerable:!0}):r,e)),ou=e=>vn(Qe({},"__esModule",{value:!0}),e);var Co=I((Do,Bt)=>{(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,}",l="(?:[0-9a-f]+::?)+",d={zoneIndex:new RegExp(u,"i"),native:new RegExp(`^(::)?(${l})?([0-9a-f]+)?(::)?(${u})?$`,"i"),deprecatedTransitional:new RegExp(`^(?:::)(${t}\\.${t}\\.${t}\\.${t}(${u})?)$`,"i"),transitional:new RegExp(`^((?:${l})|(?:::)(?:${l})?)${t}\\.${t}\\.${t}\\.${t}(${u})?$`,"i")};function y(s,p){if(s.indexOf("::")!==s.lastIndexOf("::"))return null;let f=0,m=-1,v=(s.match(d.zoneIndex)||[])[0],b,j;for(v&&(v=v.substring(1),s=s.replace(/%.+$/,""));(m=s.indexOf(":",m+1))>=0;)f++;if(s.substr(0,2)==="::"&&f--,s.substr(-2,2)==="::"&&f--,f>p)return null;for(j=p-f,b=":";j--;)b+="0:";return s=s.replace("::",b),s[0]===":"&&(s=s.slice(1)),s[s.length-1]===":"&&(s=s.slice(0,-1)),p=function(){let re=s.split(":"),ae=[];for(let Ye=0;Ye<re.length;Ye++)ae.push(parseInt(re[Ye],16));return ae}(),{parts:p,zoneId:v}}o(y,"expandIPv6");function h(s,p,f,m){if(s.length!==p.length)throw new Error("ipaddr: cannot match CIDR for objects with different lengths");let v=0,b;for(;m>0;){if(b=f-m,b<0&&(b=0),s[v]>>b!==p[v]>>b)return!1;m-=f,v+=1}return!0}o(h,"matchCIDR");function P(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(P,"parseIntAuto");function S(s,p){for(;s.length<p;)s=`0${s}`;return s}o(S,"padPart");let x={};x.IPv4=function(){function s(p){if(p.length!==4)throw new Error("ipaddr: ipv4 octet count should be 4");let f,m;for(f=0;f<p.length;f++)if(m=p[f],!(0<=m&&m<=255))throw new Error("ipaddr: ipv4 octet should fit in 8 bits");this.octets=p}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(p,f){let m;if(f===void 0&&(m=p,p=m[0],f=m[1]),p.kind()!=="ipv4")throw new Error("ipaddr: cannot match ipv4 address with non-ipv4 one");return h(this.octets,p.octets,8,f)},s.prototype.prefixLengthFromSubnetMask=function(){let p=0,f=!1,m={0:8,128:7,192:6,224:5,240:4,248:3,252:2,254:1,255:0},v,b,j;for(v=3;v>=0;v-=1)if(b=this.octets[v],b in m){if(j=m[b],f&&j!==0)return null;j!==8&&(f=!0),p+=j}else return null;return 32-p},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 p=this.parseCIDR(s),f=p[0].toByteArray(),m=this.subnetMaskFromPrefixLength(p[1]).toByteArray(),v=[],b=0;for(;b<4;)v.push(parseInt(f[b],10)|parseInt(m[b],10)^255),b++;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 p=s.match(/^(.+)\/(\d+)$/);return!x.IPv4.isValidCIDR(s)||!p?!1:x.IPv4.isValidFourPartDecimal(p[1])},x.IPv4.networkAddressFromCIDR=function(s){let p,f,m,v,b;try{for(p=this.parseCIDR(s),m=p[0].toByteArray(),b=this.subnetMaskFromPrefixLength(p[1]).toByteArray(),v=[],f=0;f<4;)v.push(parseInt(m[f],10)&parseInt(b[f],10)),f++;return new this(v)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},x.IPv4.parse=function(s){let p=this.parser(s);if(p===null)throw new Error("ipaddr: string is not formatted like an IPv4 Address");return new this(p)},x.IPv4.parseCIDR=function(s){let p;if(p=s.match(/^(.+)\/(\d+)$/)){let f=parseInt(p[2]);if(f>=0&&f<=32){let m=[this.parse(p[1]),f];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 p,f,m;if(p=s.match(r.fourOctet))return function(){let v=p.slice(1,6),b=[];for(let j=0;j<v.length;j++)f=v[j],b.push(P(f));return b}();if(p=s.match(r.longValue)){if(m=P(p[1]),m>4294967295||m<0)throw new Error("ipaddr: address outside defined range");return function(){let v=[],b;for(b=0;b<=24;b+=8)v.push(m>>b&255);return v}().reverse()}else return(p=s.match(r.twoOctet))?function(){let v=p.slice(1,4),b=[];if(m=P(v[1]),m>16777215||m<0)throw new Error("ipaddr: address outside defined range");return b.push(P(v[0])),b.push(m>>16&255),b.push(m>>8&255),b.push(m&255),b}():(p=s.match(r.threeOctet))?function(){let v=p.slice(1,5),b=[];if(m=P(v[2]),m>65535||m<0)throw new Error("ipaddr: address outside defined range");return b.push(P(v[0])),b.push(P(v[1])),b.push(m>>8&255),b.push(m&255),b}():null},x.IPv4.subnetMaskFromPrefixLength=function(s){if(s=parseInt(s),s<0||s>32)throw new Error("ipaddr: invalid IPv4 prefix length");let p=[0,0,0,0],f=0,m=Math.floor(s/8);for(;f<m;)p[f]=255,f++;return m<4&&(p[m]=Math.pow(2,s%8)-1<<8-s%8),new this(p)},x.IPv6=function(){function s(p,f){let m,v;if(p.length===16)for(this.parts=[],m=0;m<=14;m+=2)this.parts.push(p[m]<<8|p[m+1]);else if(p.length===8)this.parts=p;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");f&&(this.zoneId=f)}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(p,f){let m;if(f===void 0&&(m=p,p=m[0],f=m[1]),p.kind()!=="ipv6")throw new Error("ipaddr: cannot match ipv6 address with non-ipv6 one");return h(this.parts,p.parts,16,f)},s.prototype.prefixLengthFromSubnetMask=function(){let p=0,f=!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,b;for(let j=7;j>=0;j-=1)if(v=this.parts[j],v in m){if(b=m[v],f&&b!==0)return null;b!==16&&(f=!0),p+=b}else return null;return 128-p},s.prototype.range=function(){return x.subnetMatch(this,this.SpecialRanges)},s.prototype.toByteArray=function(){let p,f=[],m=this.parts;for(let v=0;v<m.length;v++)p=m[v],f.push(p>>8),f.push(p&255);return f},s.prototype.toFixedLengthString=function(){let p=function(){let m=[];for(let v=0;v<this.parts.length;v++)m.push(S(this.parts[v].toString(16),4));return m}.call(this).join(":"),f="";return this.zoneId&&(f=`%${this.zoneId}`),p+f},s.prototype.toIPv4Address=function(){if(!this.isIPv4MappedAddress())throw new Error("ipaddr: trying to convert a generic ipv6 address to ipv4");let p=this.parts.slice(-2),f=p[0],m=p[1];return new x.IPv4([f>>8,f&255,m>>8,m&255])},s.prototype.toNormalizedString=function(){let p=function(){let m=[];for(let v=0;v<this.parts.length;v++)m.push(this.parts[v].toString(16));return m}.call(this).join(":"),f="";return this.zoneId&&(f=`%${this.zoneId}`),p+f},s.prototype.toRFC5952String=function(){let p=/((^|:)(0(:|$)){2,})/g,f=this.toNormalizedString(),m=0,v=-1,b;for(;b=p.exec(f);)b[0].length>v&&(m=b.index,v=b[0].length);return v<0?f:`${f.substring(0,m)}::${f.substring(m+v)}`},s.prototype.toString=function(){return this.toRFC5952String()},s}(),x.IPv6.broadcastAddressFromCIDR=function(s){try{let p=this.parseCIDR(s),f=p[0].toByteArray(),m=this.subnetMaskFromPrefixLength(p[1]).toByteArray(),v=[],b=0;for(;b<16;)v.push(parseInt(f[b],10)|parseInt(m[b],10)^255),b++;return new this(v)}catch(p){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${p})`)}},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 p=this.parser(s);return new this(p.parts,p.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 p,f,m,v,b;try{for(p=this.parseCIDR(s),m=p[0].toByteArray(),b=this.subnetMaskFromPrefixLength(p[1]).toByteArray(),v=[],f=0;f<16;)v.push(parseInt(m[f],10)&parseInt(b[f],10)),f++;return new this(v)}catch(j){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${j})`)}},x.IPv6.parse=function(s){let p=this.parser(s);if(p.parts===null)throw new Error("ipaddr: string is not formatted like an IPv6 Address");return new this(p.parts,p.zoneId)},x.IPv6.parseCIDR=function(s){let p,f,m;if((f=s.match(/^(.+)\/(\d+)$/))&&(p=parseInt(f[2]),p>=0&&p<=128))return m=[this.parse(f[1]),p],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 p,f,m,v,b,j;if(m=s.match(d.deprecatedTransitional))return this.parser(`::ffff:${m[1]}`);if(d.native.test(s))return y(s,8);if((m=s.match(d.transitional))&&(j=m[6]||"",p=m[1],m[1].endsWith("::")||(p=p.slice(0,-1)),p=y(p+j,6),p.parts)){for(b=[parseInt(m[2]),parseInt(m[3]),parseInt(m[4]),parseInt(m[5])],f=0;f<b.length;f++)if(v=b[f],!(0<=v&&v<=255))return null;return p.parts.push(b[0]<<8|b[1]),p.parts.push(b[2]<<8|b[3]),{parts:p.parts,zoneId:p.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 p=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],f=0,m=Math.floor(s/8);for(;f<m;)p[f]=255,f++;return m<16&&(p[m]=Math.pow(2,s%8)-1<<8-s%8),new this(p)},x.fromByteArray=function(s){let p=s.length;if(p===4)return new x.IPv4(s);if(p===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 p=this.parse(s);return p.kind()==="ipv6"&&p.isIPv4MappedAddress()?p.toIPv4Address():p},x.subnetMatch=function(s,p,f){let m,v,b,j;f==null&&(f="unicast");for(v in p)if(Object.prototype.hasOwnProperty.call(p,v)){for(b=p[v],b[0]&&!(b[0]instanceof Array)&&(b=[b]),m=0;m<b.length;m++)if(j=b[m],s.kind()===j[0].kind()&&s.match.apply(s,j))return v}return f},typeof Bt<"u"&&Bt.exports?Bt.exports=x:e.ipaddr=x})(Do)});var Ni=I((oA,ki)=>{var Oi=require("stream").Stream,wl=require("util");ki.exports=ue;function ue(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}o(ue,"DelayedStream");wl.inherits(ue,Oi);ue.create=function(e,t){var r=new this;t=t||{};for(var n in t)r[n]=t[n];r.source=e;var i=e.emit;return e.emit=function(){return r._handleEmit(arguments),i.apply(e,arguments)},e.on("error",function(){}),r.pauseStream&&e.pause(),r};Object.defineProperty(ue.prototype,"readable",{configurable:!0,enumerable:!0,get:o(function(){return this.source.readable},"get")});ue.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};ue.prototype.resume=function(){this._released||this.release(),this.source.resume()};ue.prototype.pause=function(){this.source.pause()};ue.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(e){this.emit.apply(this,e)}.bind(this)),this._bufferedEvents=[]};ue.prototype.pipe=function(){var e=Oi.prototype.pipe.apply(this,arguments);return this.resume(),e};ue.prototype._handleEmit=function(e){if(this._released){this.emit.apply(this,e);return}e[0]==="data"&&(this.dataSize+=e[1].length,this._checkIfMaxDataSizeExceeded()),this._bufferedEvents.push(e)};ue.prototype._checkIfMaxDataSizeExceeded=function(){if(!this._maxDataSizeExceeded&&!(this.dataSize<=this.maxDataSize)){this._maxDataSizeExceeded=!0;var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(e))}}});var Ci=I((aA,Di)=>{var Rl=require("util"),Ri=require("stream").Stream,wi=Ni();Di.exports=J;function J(){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(J,"CombinedStream");Rl.inherits(J,Ri);J.create=function(e){var t=new this;e=e||{};for(var r in e)t[r]=e[r];return t};J.isStreamLike=function(e){return typeof e!="function"&&typeof e!="string"&&typeof e!="boolean"&&typeof e!="number"&&!Buffer.isBuffer(e)};J.prototype.append=function(e){var t=J.isStreamLike(e);if(t){if(!(e instanceof wi)){var r=wi.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};J.prototype.pipe=function(e,t){return Ri.prototype.pipe.call(this,e,t),this.resume(),e};J.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}};J.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=J.isStreamLike(r);n&&(r.on("data",this._checkDataSize.bind(this)),this._handleErrors(r)),this._pipeNext(r)}.bind(this))};J.prototype._pipeNext=function(e){this._currentStream=e;var t=J.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()};J.prototype._handleErrors=function(e){var t=this;e.on("error",function(r){t._emitError(r)})};J.prototype.write=function(e){this.emit("data",e)};J.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"))};J.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")};J.prototype.end=function(){this._reset(),this.emit("end")};J.prototype.destroy=function(){this._reset(),this.emit("close")};J.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};J.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(e))}};J.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)};J.prototype._emitError=function(e){this._reset(),this.emit("error",e)}});var Mi=I((uA,Ui)=>{"use strict";Ui.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 Fi=I(te=>{"use strict";var Kt=Mi(),Dl=require("path").extname,ji=/^\s*([^;\s]*)(?:;|\s|$)/,Cl=/^text\//i;te.charset=Li;te.charsets={lookup:Li};te.contentType=Ul;te.extension=Ml;te.extensions=Object.create(null);te.lookup=jl;te.types=Object.create(null);Ll(te.extensions,te.types);function Li(e){if(!e||typeof e!="string")return!1;var t=ji.exec(e),r=t&&Kt[t[1].toLowerCase()];return r&&r.charset?r.charset:t&&Cl.test(t[1])?"UTF-8":!1}o(Li,"charset");function Ul(e){if(!e||typeof e!="string")return!1;var t=e.indexOf("/")===-1?te.lookup(e):e;if(!t)return!1;if(t.indexOf("charset")===-1){var r=te.charset(t);r&&(t+="; charset="+r.toLowerCase())}return t}o(Ul,"contentType");function Ml(e){if(!e||typeof e!="string")return!1;var t=ji.exec(e),r=t&&te.extensions[t[1].toLowerCase()];return!r||!r.length?!1:r[0]}o(Ml,"extension");function jl(e){if(!e||typeof e!="string")return!1;var t=Dl("x."+e).toLowerCase().substr(1);return t&&te.types[t]||!1}o(jl,"lookup");function Ll(e,t){var r=["nginx","apache",void 0,"iana"];Object.keys(Kt).forEach(o(function(i){var u=Kt[i],l=u.extensions;if(!(!l||!l.length)){e[i]=l;for(var d=0;d<l.length;d++){var y=l[d];if(t[y]){var h=r.indexOf(Kt[t[y]].source),P=r.indexOf(u.source);if(t[y]!=="application/octet-stream"&&(h>P||h===P&&t[y].substr(0,12)==="application/"))continue}t[y]=i}}},"forEachMimeType"))}o(Ll,"populateMaps")});var Zi=I((pA,Bi)=>{Bi.exports=Fl;function Fl(e){var t=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;t?t(e):setTimeout(e,0)}o(Fl,"defer")});var Gr=I((mA,Hi)=>{var Vi=Zi();Hi.exports=Bl;function Bl(e){var t=!1;return Vi(function(){t=!0}),o(function(n,i){t?e(n,i):Vi(o(function(){e(n,i)},"nextTick_callback"))},"async_callback")}o(Bl,"async")});var Wr=I((gA,qi)=>{qi.exports=Zl;function Zl(e){Object.keys(e.jobs).forEach(Vl.bind(e)),e.jobs={}}o(Zl,"abort");function Vl(e){typeof this.jobs[e]=="function"&&this.jobs[e]()}o(Vl,"clean")});var Kr=I((hA,Wi)=>{var Gi=Gr(),Hl=Wr();Wi.exports=ql;function ql(e,t,r,n){var i=r.keyedList?r.keyedList[r.index]:r.index;r.jobs[i]=Gl(t,i,e[i],function(u,l){i in r.jobs&&(delete r.jobs[i],u?Hl(r):r.results[i]=l,n(u,r.results))})}o(ql,"iterate");function Gl(e,t,r,n){var i;return e.length==2?i=e(r,Gi(n)):i=e(r,t,Gi(n)),i}o(Gl,"runJob")});var Jr=I((xA,Ki)=>{Ki.exports=Wl;function Wl(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(Wl,"state")});var Xr=I((PA,Ji)=>{var Kl=Wr(),Jl=Gr();Ji.exports=Xl;function Xl(e){Object.keys(this.jobs).length&&(this.index=this.size,Kl(this),Jl(e)(null,this.results))}o(Xl,"terminator")});var Yi=I((TA,Xi)=>{var Yl=Kr(),Ql=Jr(),ep=Xr();Xi.exports=tp;function tp(e,t,r){for(var n=Ql(e);n.index<(n.keyedList||e).length;)Yl(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 ep.bind(n,r)}o(tp,"parallel")});var Yr=I((IA,Jt)=>{var Qi=Kr(),rp=Jr(),np=Xr();Jt.exports=op;Jt.exports.ascending=ea;Jt.exports.descending=ip;function op(e,t,r,n){var i=rp(e,r);return Qi(e,t,i,o(function u(l,d){if(l){n(l,d);return}if(i.index++,i.index<(i.keyedList||e).length){Qi(e,t,i,u);return}n(null,i.results)},"iteratorHandler")),np.bind(i,n)}o(op,"serialOrdered");function ea(e,t){return e<t?-1:e>t?1:0}o(ea,"ascending");function ip(e,t){return-1*ea(e,t)}o(ip,"descending")});var ra=I(($A,ta)=>{var ap=Yr();ta.exports=sp;function sp(e,t,r){return ap(e,t,null,r)}o(sp,"serial")});var oa=I((zA,na)=>{na.exports={parallel:Yi(),serial:ra(),serialOrdered:Yr()}});var Qr=I((OA,ia)=>{"use strict";ia.exports=Object});var sa=I((kA,aa)=>{"use strict";aa.exports=Error});var ca=I((NA,ua)=>{"use strict";ua.exports=EvalError});var pa=I((wA,la)=>{"use strict";la.exports=RangeError});var ma=I((RA,da)=>{"use strict";da.exports=ReferenceError});var ga=I((DA,fa)=>{"use strict";fa.exports=SyntaxError});var Xt=I((CA,ya)=>{"use strict";ya.exports=TypeError});var va=I((UA,ha)=>{"use strict";ha.exports=URIError});var _a=I((MA,xa)=>{"use strict";xa.exports=Math.abs});var ba=I((jA,Pa)=>{"use strict";Pa.exports=Math.floor});var Ea=I((LA,Ta)=>{"use strict";Ta.exports=Math.max});var Sa=I((FA,Ia)=>{"use strict";Ia.exports=Math.min});var Aa=I((BA,$a)=>{"use strict";$a.exports=Math.pow});var Oa=I((ZA,za)=>{"use strict";za.exports=Math.round});var Na=I((VA,ka)=>{"use strict";ka.exports=Number.isNaN||o(function(t){return t!==t},"isNaN")});var Ra=I((qA,wa)=>{"use strict";var up=Na();wa.exports=o(function(t){return up(t)||t===0?t:t<0?-1:1},"sign")});var Ca=I((WA,Da)=>{"use strict";Da.exports=Object.getOwnPropertyDescriptor});var en=I((KA,Ua)=>{"use strict";var Yt=Ca();if(Yt)try{Yt([],"length")}catch{Yt=null}Ua.exports=Yt});var ja=I((JA,Ma)=>{"use strict";var Qt=Object.defineProperty||!1;if(Qt)try{Qt({},"a",{value:1})}catch{Qt=!1}Ma.exports=Qt});var tn=I((XA,La)=>{"use strict";La.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 l=Object.getOwnPropertySymbols(t);if(l.length!==1||l[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var d=Object.getOwnPropertyDescriptor(t,r);if(d.value!==i||d.enumerable!==!0)return!1}return!0},"hasSymbols")});var Za=I((QA,Ba)=>{"use strict";var Fa=typeof Symbol<"u"&&Symbol,cp=tn();Ba.exports=o(function(){return typeof Fa!="function"||typeof Symbol!="function"||typeof Fa("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:cp()},"hasNativeSymbols")});var rn=I((tz,Va)=>{"use strict";Va.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var nn=I((rz,Ha)=>{"use strict";var lp=Qr();Ha.exports=lp.getPrototypeOf||null});var Wa=I((nz,Ga)=>{"use strict";var pp="Function.prototype.bind called on incompatible ",dp=Object.prototype.toString,mp=Math.max,fp="[object Function]",qa=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"),gp=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"),yp=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");Ga.exports=o(function(t){var r=this;if(typeof r!="function"||dp.apply(r)!==fp)throw new TypeError(pp+r);for(var n=gp(arguments,1),i,u=o(function(){if(this instanceof i){var P=r.apply(this,qa(n,arguments));return Object(P)===P?P:this}return r.apply(t,qa(n,arguments))},"binder"),l=mp(0,r.length-n.length),d=[],y=0;y<l;y++)d[y]="$"+y;if(i=Function("binder","return function ("+yp(d,",")+"){ return binder.apply(this,arguments); }")(u),r.prototype){var h=o(function(){},"Empty");h.prototype=r.prototype,i.prototype=new h,h.prototype=null}return i},"bind")});var Ve=I((iz,Ka)=>{"use strict";var hp=Wa();Ka.exports=Function.prototype.bind||hp});var er=I((az,Ja)=>{"use strict";Ja.exports=Function.prototype.call});var on=I((sz,Xa)=>{"use strict";Xa.exports=Function.prototype.apply});var Qa=I((uz,Ya)=>{"use strict";Ya.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var ts=I((cz,es)=>{"use strict";var vp=Ve(),xp=on(),_p=er(),Pp=Qa();es.exports=Pp||vp.call(_p,xp)});var ns=I((lz,rs)=>{"use strict";var bp=Ve(),Tp=Xt(),Ep=er(),Ip=ts();rs.exports=o(function(t){if(t.length<1||typeof t[0]!="function")throw new Tp("a function is required");return Ip(bp,Ep,t)},"callBindBasic")});var cs=I((dz,us)=>{"use strict";var Sp=ns(),os=en(),as;try{as=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!="object"||!("code"in e)||e.code!=="ERR_PROTO_ACCESS")throw e}var an=!!as&&os&&os(Object.prototype,"__proto__"),ss=Object,is=ss.getPrototypeOf;us.exports=an&&typeof an.get=="function"?Sp([an.get]):typeof is=="function"?o(function(t){return is(t==null?t:ss(t))},"getDunder"):!1});var fs=I((fz,ms)=>{"use strict";var ls=rn(),ps=nn(),ds=cs();ms.exports=ls?o(function(t){return ls(t)},"getProto"):ps?o(function(t){if(!t||typeof t!="object"&&typeof t!="function")throw new TypeError("getProto: not an object");return ps(t)},"getProto"):ds?o(function(t){return ds(t)},"getProto"):null});var sn=I((yz,gs)=>{"use strict";var $p=Function.prototype.call,Ap=Object.prototype.hasOwnProperty,zp=Ve();gs.exports=zp.call($p,Ap)});var bs=I((hz,Ps)=>{"use strict";var M,Op=Qr(),kp=sa(),Np=ca(),wp=pa(),Rp=ma(),We=ga(),Ge=Xt(),Dp=va(),Cp=_a(),Up=ba(),Mp=Ea(),jp=Sa(),Lp=Aa(),Fp=Oa(),Bp=Ra(),xs=Function,un=o(function(e){try{return xs('"use strict"; return ('+e+").constructor;")()}catch{}},"getEvalledConstructor"),_t=en(),Zp=ja(),cn=o(function(){throw new Ge},"throwTypeError"),Vp=_t?function(){try{return arguments.callee,cn}catch{try{return _t(arguments,"callee").get}catch{return cn}}}():cn,He=Za()(),Q=fs(),Hp=nn(),qp=rn(),_s=on(),Pt=er(),qe={},Gp=typeof Uint8Array>"u"||!Q?M:Q(Uint8Array),Ne={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?M:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?M:ArrayBuffer,"%ArrayIteratorPrototype%":He&&Q?Q([][Symbol.iterator]()):M,"%AsyncFromSyncIteratorPrototype%":M,"%AsyncFunction%":qe,"%AsyncGenerator%":qe,"%AsyncGeneratorFunction%":qe,"%AsyncIteratorPrototype%":qe,"%Atomics%":typeof Atomics>"u"?M:Atomics,"%BigInt%":typeof BigInt>"u"?M:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?M:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?M:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?M:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":kp,"%eval%":eval,"%EvalError%":Np,"%Float16Array%":typeof Float16Array>"u"?M:Float16Array,"%Float32Array%":typeof Float32Array>"u"?M:Float32Array,"%Float64Array%":typeof Float64Array>"u"?M:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?M:FinalizationRegistry,"%Function%":xs,"%GeneratorFunction%":qe,"%Int8Array%":typeof Int8Array>"u"?M:Int8Array,"%Int16Array%":typeof Int16Array>"u"?M:Int16Array,"%Int32Array%":typeof Int32Array>"u"?M:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":He&&Q?Q(Q([][Symbol.iterator]())):M,"%JSON%":typeof JSON=="object"?JSON:M,"%Map%":typeof Map>"u"?M:Map,"%MapIteratorPrototype%":typeof Map>"u"||!He||!Q?M:Q(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Op,"%Object.getOwnPropertyDescriptor%":_t,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?M:Promise,"%Proxy%":typeof Proxy>"u"?M:Proxy,"%RangeError%":wp,"%ReferenceError%":Rp,"%Reflect%":typeof Reflect>"u"?M:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?M:Set,"%SetIteratorPrototype%":typeof Set>"u"||!He||!Q?M:Q(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?M:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":He&&Q?Q(""[Symbol.iterator]()):M,"%Symbol%":He?Symbol:M,"%SyntaxError%":We,"%ThrowTypeError%":Vp,"%TypedArray%":Gp,"%TypeError%":Ge,"%Uint8Array%":typeof Uint8Array>"u"?M:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?M:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?M:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?M:Uint32Array,"%URIError%":Dp,"%WeakMap%":typeof WeakMap>"u"?M:WeakMap,"%WeakRef%":typeof WeakRef>"u"?M:WeakRef,"%WeakSet%":typeof WeakSet>"u"?M:WeakSet,"%Function.prototype.call%":Pt,"%Function.prototype.apply%":_s,"%Object.defineProperty%":Zp,"%Object.getPrototypeOf%":Hp,"%Math.abs%":Cp,"%Math.floor%":Up,"%Math.max%":Mp,"%Math.min%":jp,"%Math.pow%":Lp,"%Math.round%":Fp,"%Math.sign%":Bp,"%Reflect.getPrototypeOf%":qp};if(Q)try{null.error}catch(e){ys=Q(Q(e)),Ne["%Error.prototype%"]=ys}var ys,Wp=o(function e(t){var r;if(t==="%AsyncFunction%")r=un("async function () {}");else if(t==="%GeneratorFunction%")r=un("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=un("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&Q&&(r=Q(i.prototype))}return Ne[t]=r,r},"doEval"),hs={__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=Ve(),tr=sn(),Kp=bt.call(Pt,Array.prototype.concat),Jp=bt.call(_s,Array.prototype.splice),vs=bt.call(Pt,String.prototype.replace),rr=bt.call(Pt,String.prototype.slice),Xp=bt.call(Pt,RegExp.prototype.exec),Yp=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Qp=/\\(\\)?/g,ed=o(function(t){var r=rr(t,0,1),n=rr(t,-1);if(r==="%"&&n!=="%")throw new We("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new We("invalid intrinsic syntax, expected opening `%`");var i=[];return vs(t,Yp,function(u,l,d,y){i[i.length]=d?vs(y,Qp,"$1"):l||u}),i},"stringToPath"),td=o(function(t,r){var n=t,i;if(tr(hs,n)&&(i=hs[n],n="%"+i[0]+"%"),tr(Ne,n)){var u=Ne[n];if(u===qe&&(u=Wp(n)),typeof u>"u"&&!r)throw new Ge("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:u}}throw new We("intrinsic "+t+" does not exist!")},"getBaseIntrinsic");Ps.exports=o(function(t,r){if(typeof t!="string"||t.length===0)throw new Ge("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new Ge('"allowMissing" argument must be a boolean');if(Xp(/^%?[^%]*%?$/,t)===null)throw new We("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=ed(t),i=n.length>0?n[0]:"",u=td("%"+i+"%",r),l=u.name,d=u.value,y=!1,h=u.alias;h&&(i=h[0],Jp(n,Kp([0,1],h)));for(var P=1,S=!0;P<n.length;P+=1){var x=n[P],s=rr(x,0,1),p=rr(x,-1);if((s==='"'||s==="'"||s==="`"||p==='"'||p==="'"||p==="`")&&s!==p)throw new We("property names with quotes must have matching quotes");if((x==="constructor"||!S)&&(y=!0),i+="."+x,l="%"+i+"%",tr(Ne,l))d=Ne[l];else if(d!=null){if(!(x in d)){if(!r)throw new Ge("base intrinsic for "+t+" exists, but the property is not available.");return}if(_t&&P+1>=n.length){var f=_t(d,x);S=!!f,S&&"get"in f&&!("originalValue"in f.get)?d=f.get:d=d[x]}else S=tr(d,x),d=d[x];S&&!y&&(Ne[l]=d)}}return d},"GetIntrinsic")});var Es=I((xz,Ts)=>{"use strict";var rd=tn();Ts.exports=o(function(){return rd()&&!!Symbol.toStringTag},"hasToStringTagShams")});var $s=I((Pz,Ss)=>{"use strict";var nd=bs(),Is=nd("%Object.defineProperty%",!0),od=Es()(),id=sn(),ad=Xt(),nr=od?Symbol.toStringTag:null;Ss.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 ad("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");nr&&(n||!id(t,nr))&&(Is?Is(t,nr,{configurable:!i,enumerable:!1,value:r,writable:!1}):t[nr]=r)},"setToStringTag")});var zs=I((Tz,As)=>{"use strict";var sd=Function.prototype.call,ud=Object.prototype.hasOwnProperty,cd=Ve();As.exports=cd.call(sd,ud)});var ks=I((Ez,Os)=>{"use strict";Os.exports=function(e,t){return Object.keys(t).forEach(function(r){e[r]=e[r]||t[r]}),e}});var Rs=I((Iz,ws)=>{"use strict";var mn=Ci(),ld=require("util"),ln=require("path"),pd=require("http"),dd=require("https"),md=require("url").parse,fd=require("fs"),gd=require("stream").Stream,yd=require("crypto"),pn=Fi(),hd=oa(),vd=$s(),Se=zs(),dn=ks();function Ns(e){return String(e).replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/"/g,"%22")}o(Ns,"escapeHeaderParam");function L(e){if(!(this instanceof L))return new L(e);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],mn.call(this),e=e||{};for(var t in e)this[t]=e[t]}o(L,"FormData");ld.inherits(L,mn);L.LINE_BREAK=`\r
2
+ `;L.DEFAULT_CONTENT_TYPE="application/octet-stream";L.prototype.append=function(e,t,r){r=r||{},typeof r=="string"&&(r={filename:r});var n=mn.prototype.append.bind(this);if((typeof t=="number"||t==null)&&(t=String(t)),Array.isArray(t)){this._error(new Error("Arrays are not supported."));return}var i=this._multiPartHeader(e,t,r),u=this._multiPartFooter();n(i),n(t),n(u),this._trackLength(i,t,r)};L.prototype._trackLength=function(e,t,r){var n=0;r.knownLength!=null?n+=Number(r.knownLength):Buffer.isBuffer(t)?n=t.length:typeof t=="string"&&(n=Buffer.byteLength(t)),this._valueLength+=n,this._overheadLength+=Buffer.byteLength(e)+L.LINE_BREAK.length,!(!t||!t.path&&!(t.readable&&Se(t,"httpVersion"))&&!(t instanceof gd))&&(r.knownLength||this._valuesToMeasure.push(t))};L.prototype._lengthRetriever=function(e,t){Se(e,"fd")?e.end!=null&&e.end!=1/0&&e.start!=null?t(null,e.end+1-(e.start?e.start:0)):fd.stat(e.path,function(r,n){if(r){t(r);return}var i=n.size-(e.start?e.start:0);t(null,i)}):Se(e,"httpVersion")?t(null,Number(e.headers["content-length"])):Se(e,"httpModule")?(e.on("response",function(r){e.pause(),t(null,Number(r.headers["content-length"]))}),e.resume()):t("Unknown stream")};L.prototype._multiPartHeader=function(e,t,r){if(typeof r.header=="string")return r.header;var n=this._getContentDisposition(t,r),i=this._getContentType(t,r),u="",l={"Content-Disposition":["form-data",'name="'+Ns(e)+'"'].concat(n||[]),"Content-Type":[].concat(i||[])};typeof r.header=="object"&&dn(l,r.header);var d;for(var y in l)if(Se(l,y)){if(d=l[y],d==null)continue;Array.isArray(d)||(d=[d]),d.length&&(u+=y+": "+d.join("; ")+L.LINE_BREAK)}return"--"+this.getBoundary()+L.LINE_BREAK+u+L.LINE_BREAK};L.prototype._getContentDisposition=function(e,t){var r;if(typeof t.filepath=="string"?r=ln.normalize(t.filepath).replace(/\\/g,"/"):t.filename||e&&(e.name||e.path)?r=ln.basename(t.filename||e&&(e.name||e.path)):e&&e.readable&&Se(e,"httpVersion")&&(r=ln.basename(e.client._httpMessage.path||"")),r)return'filename="'+Ns(r)+'"'};L.prototype._getContentType=function(e,t){var r=t.contentType;return!r&&e&&e.name&&(r=pn.lookup(e.name)),!r&&e&&e.path&&(r=pn.lookup(e.path)),!r&&e&&e.readable&&Se(e,"httpVersion")&&(r=e.headers["content-type"]),!r&&(t.filepath||t.filename)&&(r=pn.lookup(t.filepath||t.filename)),!r&&e&&typeof e=="object"&&(r=L.DEFAULT_CONTENT_TYPE),r};L.prototype._multiPartFooter=function(){return function(e){var t=L.LINE_BREAK,r=this._streams.length===0;r&&(t+=this._lastBoundary()),e(t)}.bind(this)};L.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+L.LINE_BREAK};L.prototype.getHeaders=function(e){var t,r={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in e)Se(e,t)&&(r[t.toLowerCase()]=e[t]);return r};L.prototype.setBoundary=function(e){if(typeof e!="string")throw new TypeError("FormData boundary must be a string");this._boundary=e};L.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};L.prototype.getBuffer=function(){for(var e=new Buffer.alloc(0),t=this.getBoundary(),r=0,n=this._streams.length;r<n;r++)typeof this._streams[r]!="function"&&(Buffer.isBuffer(this._streams[r])?e=Buffer.concat([e,this._streams[r]]):e=Buffer.concat([e,Buffer.from(this._streams[r])]),(typeof this._streams[r]!="string"||this._streams[r].substring(2,t.length+2)!==t)&&(e=Buffer.concat([e,Buffer.from(L.LINE_BREAK)])));return Buffer.concat([e,Buffer.from(this._lastBoundary())])};L.prototype._generateBoundary=function(){this._boundary="--------------------------"+yd.randomBytes(12).toString("hex")};L.prototype.getLengthSync=function(){var e=this._overheadLength+this._valueLength;return this._streams.length&&(e+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),e};L.prototype.hasKnownLength=function(){var e=!0;return this._valuesToMeasure.length&&(e=!1),e};L.prototype.getLength=function(e){var t=this._overheadLength+this._valueLength;if(this._streams.length&&(t+=this._lastBoundary().length),!this._valuesToMeasure.length){process.nextTick(e.bind(this,null,t));return}hd.parallel(this._valuesToMeasure,this._lengthRetriever,function(r,n){if(r){e(r);return}n.forEach(function(i){t+=i}),e(null,t)})};L.prototype.submit=function(e,t){var r,n,i={method:"post"};return typeof e=="string"?(e=md(e),n=dn({port:e.port,path:e.pathname,host:e.hostname,protocol:e.protocol},i)):(n=dn(e,i),n.port||(n.port=n.protocol==="https:"?443:80)),n.headers=this.getHeaders(e.headers),n.protocol==="https:"?r=dd.request(n):r=pd.request(n),this.getLength(function(u,l){if(u&&u!=="Unknown stream"){this._error(u);return}if(l&&r.setHeader("Content-Length",l),this.pipe(r),t){var d,y=o(function(h,P){return r.removeListener("error",y),r.removeListener("response",d),t.call(this,h,P)},"callback");d=y.bind(this,null),r.on("error",y),r.on("response",d)}}.bind(this)),r};L.prototype._error=function(e){this.error||(this.error=e,this.pause(),this.emit("error",e))};L.prototype.toString=function(){return"[object FormData]"};vd(L.prototype,"FormData");ws.exports=L});var $d={};hn($d,{elasticEmail:()=>Sd});module.exports=ou($d);var iu=Object.freeze({status:"aborted"});function T(e,t,r){function n(d,y){if(d._zod||Object.defineProperty(d,"_zod",{value:{def:y,constr:l,traits:new Set},enumerable:!1}),d._zod.traits.has(e))return;d._zod.traits.add(e),t(d,y);let h=l.prototype,P=Object.keys(h);for(let S=0;S<P.length;S++){let x=P[S];x in d||(d[x]=h[x].bind(d))}}o(n,"init");let i=r?.Parent??Object;class u extends i{static{o(this,"Definition")}}Object.defineProperty(u,"name",{value:e});function l(d){var y;let h=r?.Parent?new u:this;n(h,d),(y=h._zod).deferred??(y.deferred=[]);for(let P of h._zod.deferred)P();return h}return o(l,"_"),Object.defineProperty(l,"init",{value:n}),Object.defineProperty(l,Symbol.hasInstance,{value:o(d=>r?.Parent&&d instanceof r.Parent?!0:d?._zod?.traits?.has(e),"value")}),Object.defineProperty(l,"name",{value:e}),l}o(T,"$constructor");var au=Symbol("zod_brand"),ce=class extends Error{static{o(this,"$ZodAsyncError")}constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Et=class extends Error{static{o(this,"$ZodEncodeError")}constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}},ur={};function de(e){return e&&Object.assign(ur,e),ur}o(de,"config");function lr(e){let t=Object.values(e).filter(n=>typeof n=="number");return Object.entries(e).filter(([n,i])=>t.indexOf(+n)===-1).map(([n,i])=>i)}o(lr,"getEnumValues");function _n(e,t){return typeof t=="bigint"?t.toString():t}o(_n,"jsonStringifyReplacer");function St(e){return{get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}o(St,"cached");function Pn(e){return e==null}o(Pn,"nullish");function $t(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}o($t,"cleanRegex");var xn=Symbol("evaluating");function X(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==xn)return n===void 0&&(n=xn,n=r()),n},set(i){Object.defineProperty(e,t,{value:i})},configurable:!0})}o(X,"defineLazy");var pr="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function et(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}o(et,"isObject");var su=St(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function bn(e){if(et(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let r=t.prototype;return!(et(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}o(bn,"isPlainObject");var Tn=new Set(["string","number","symbol"]);function Re(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}o(Re,"escapeRegex");function At(e,t,r){let n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}o(At,"clone");function 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 En(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}o(En,"optionalKeys");var uu={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 De(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(De,"aborted");function _e(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}o(_e,"prefixIssues");function It(e){return typeof e=="string"?e:e?.message}o(It,"unwrapMessage");function Pe(e,t,r){let n={...e,path:e.path??[]};if(!e.message){let i=It(e.inst?._zod.def?.error?.(e))??It(t?.error?.(e))??It(r.customError?.(e))??It(r.localeError?.(e))??"Invalid input";n.message=i}return delete n.inst,delete n.continue,t?.reportInput||delete n.input,n}o(Pe,"finalizeIssue");function In(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}o(In,"getLengthableOrigin");function dr(...e){let[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}o(dr,"issue");var Sn=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,_n,2),Object.defineProperty(e,"toString",{value:o(()=>e.message,"value"),enumerable:!1})},"initializer"),$n=T("$ZodError",Sn),tt=T("$ZodError",Sn,{Parent:Error});var lu=o(e=>(t,r,n,i)=>{let u=n?Object.assign(n,{async:!1}):{async:!1},l=t._zod.run({value:r,issues:[]},u);if(l instanceof Promise)throw new ce;if(l.issues.length){let d=new(i?.Err??e)(l.issues.map(y=>Pe(y,u,de())));throw pr(d,i?.callee),d}return l.value},"_parse"),zt=lu(tt),pu=o(e=>async(t,r,n,i)=>{let u=n?Object.assign(n,{async:!0}):{async:!0},l=t._zod.run({value:r,issues:[]},u);if(l instanceof Promise&&(l=await l),l.issues.length){let d=new(i?.Err??e)(l.issues.map(y=>Pe(y,u,de())));throw pr(d,i?.callee),d}return l.value},"_parseAsync"),Ot=pu(tt),du=o(e=>(t,r,n)=>{let i=n?{...n,async:!1}:{async:!1},u=t._zod.run({value:r,issues:[]},i);if(u instanceof Promise)throw new ce;return u.issues.length?{success:!1,error:new(e??$n)(u.issues.map(l=>Pe(l,i,de())))}:{success:!0,data:u.value}},"_safeParse"),rt=du(tt),mu=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(l=>Pe(l,i,de())))}:{success:!0,data:u.value}},"_safeParseAsync"),nt=mu(tt);var fu="(?:(?:\\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])))",gu=new RegExp(`^${fu}$`);var An=o(e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},"string"),zn=/^-?\d+n?$/;var mr=/^-?\d+(?:\.\d+)?$/,On=/^(?:true|false)$/i;var Ce=T("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])});var kn=T("$ZodCheckMinLength",(e,t)=>{var r;Ce.init(e,t),(r=e._zod.def).when??(r.when=n=>{let i=n.value;return!Pn(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 l=In(i);n.issues.push({origin:l,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}});var fr=T("$ZodCheckStringFormat",(e,t)=>{var r,n;Ce.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=()=>{})}),Nn=T("$ZodCheckRegex",(e,t)=>{fr.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}});var Rn={major:4,minor:3,patch:6};var G=T("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Rn;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((l,d,y)=>{let h=De(l),P;for(let S of d){if(S._zod.def.when){if(!S._zod.def.when(l))continue}else if(h)continue;let x=l.issues.length,s=S._zod.check(l);if(s instanceof Promise&&y?.async===!1)throw new ce;if(P||s instanceof Promise)P=(P??Promise.resolve()).then(async()=>{await s,l.issues.length!==x&&(h||(h=De(l,x)))});else{if(l.issues.length===x)continue;h||(h=De(l,x))}}return P?P.then(()=>l):l},"runChecks"),u=o((l,d,y)=>{if(De(l))return l.aborted=!0,l;let h=i(d,n,y);if(h instanceof Promise){if(y.async===!1)throw new ce;return h.then(P=>e._zod.parse(P,y))}return e._zod.parse(h,y)},"handleCanaryResult");e._zod.run=(l,d)=>{if(d.skipChecks)return e._zod.parse(l,d);if(d.direction==="backward"){let h=e._zod.parse({value:l.value,issues:[]},{...d,skipChecks:!0});return h instanceof Promise?h.then(P=>u(P,l,d)):u(h,l,d)}let y=e._zod.parse(l,d);if(y instanceof Promise){if(d.async===!1)throw new ce;return y.then(h=>i(h,n,d))}return i(y,n,d)}}X(e,"~standard",()=>({validate:o(i=>{try{let u=rt(e,i);return u.success?{value:u.data}:{issues:u.error?.issues}}catch{return nt(e,i).then(l=>l.success?{value:l.data}:{issues:l.error?.issues})}},"validate"),vendor:"zod",version:1}))}),wt=T("$ZodString",(e,t)=>{G.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??An(e._zod.bag),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),gr=T("$ZodStringFormat",(e,t)=>{fr.init(e,t),wt.init(e,t)});var jn=T("$ZodURL",(e,t)=>{gr.init(e,t),e._zod.check=r=>{try{let n=r.value.trim(),i=new URL(n);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(":")?i.protocol.slice(0,-1):i.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=i.href:r.value=n;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}});var Ln=T("$ZodNumber",(e,t)=>{G.init(e,t),e._zod.pattern=e._zod.bag.pattern??mr,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}let i=r.value;if(typeof i=="number"&&!Number.isNaN(i)&&Number.isFinite(i))return r;let u=typeof i=="number"?Number.isNaN(i)?"NaN":Number.isFinite(i)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:i,inst:e,...u?{received:u}:{}}),r}});var yr=T("$ZodBoolean",(e,t)=>{G.init(e,t),e._zod.pattern=On,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=!!r.value}catch{}let i=r.value;return typeof i=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:i,inst:e}),r}}),Fn=T("$ZodBigInt",(e,t)=>{G.init(e,t),e._zod.pattern=zn,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:e}),r}});var Bn=T("$ZodAny",(e,t)=>{G.init(e,t),e._zod.parse=r=>r}),Zn=T("$ZodUnknown",(e,t)=>{G.init(e,t),e._zod.parse=r=>r});var Vn=T("$ZodVoid",(e,t)=>{G.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;return typeof i>"u"||r.issues.push({expected:"void",code:"invalid_type",input:i,inst:e}),r}}),Hn=T("$ZodDate",(e,t)=>{G.init(e,t),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=new Date(r.value)}catch{}let i=r.value,u=i instanceof Date;return u&&!Number.isNaN(i.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:i,...u?{received:"Invalid Date"}:{},inst:e}),r}});function Dn(e,t,r){e.issues.length&&t.issues.push(..._e(r,e.issues)),t.value[r]=e.value}o(Dn,"handleArrayResult");var qn=T("$ZodArray",(e,t)=>{G.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;if(!Array.isArray(i))return r.issues.push({expected:"array",code:"invalid_type",input:i,inst:e}),r;r.value=Array(i.length);let u=[];for(let l=0;l<i.length;l++){let d=i[l],y=t.element._zod.run({value:d,issues:[]},n);y instanceof Promise?u.push(y.then(h=>Dn(h,r,l))):Dn(y,r,l)}return u.length?Promise.all(u).then(()=>r):r}});function Nt(e,t,r,n,i){if(e.issues.length){if(i&&!(r in n))return;t.issues.push(..._e(r,e.issues))}e.value===void 0?r in n&&(t.value[r]=void 0):t.value[r]=e.value}o(Nt,"handlePropertyResult");function yu(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${n}": expected a Zod schema`);let r=En(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}o(yu,"normalizeDef");function hu(e,t,r,n,i,u){let l=[],d=i.keySet,y=i.catchall._zod,h=y.def.type,P=y.optout==="optional";for(let S in t){if(d.has(S))continue;if(h==="never"){l.push(S);continue}let x=y.run({value:t[S],issues:[]},n);x instanceof Promise?e.push(x.then(s=>Nt(s,r,S,t,P))):Nt(x,r,S,t,P)}return l.length&&r.issues.push({code:"unrecognized_keys",keys:l,input:t,inst:u}),e.length?Promise.all(e).then(()=>r):r}o(hu,"handleCatchall");var Gn=T("$ZodObject",(e,t)=>{if(G.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let d=t.shape;Object.defineProperty(t,"shape",{get:o(()=>{let y={...d};return Object.defineProperty(t,"shape",{value:y}),y},"get")})}let n=St(()=>yu(t));X(e._zod,"propValues",()=>{let d=t.shape,y={};for(let h in d){let P=d[h]._zod;if(P.values){y[h]??(y[h]=new Set);for(let S of P.values)y[h].add(S)}}return y});let i=et,u=t.catchall,l;e._zod.parse=(d,y)=>{l??(l=n.value);let h=d.value;if(!i(h))return d.issues.push({expected:"object",code:"invalid_type",input:h,inst:e}),d;d.value={};let P=[],S=l.shape;for(let x of l.keys){let s=S[x],p=s._zod.optout==="optional",f=s._zod.run({value:h[x],issues:[]},y);f instanceof Promise?P.push(f.then(m=>Nt(m,d,x,h,p))):Nt(f,d,x,h,p)}return u?hu(P,h,d,y,n.value,e):P.length?Promise.all(P).then(()=>d):d}});function Cn(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=>!De(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(l=>Pe(l,n,de())))}),t)}o(Cn,"handleUnionResults");var hr=T("$ZodUnion",(e,t)=>{G.init(e,t),X(e._zod,"optin",()=>t.options.some(i=>i._zod.optin==="optional")?"optional":void 0),X(e._zod,"optout",()=>t.options.some(i=>i._zod.optout==="optional")?"optional":void 0),X(e._zod,"values",()=>{if(t.options.every(i=>i._zod.values))return new Set(t.options.flatMap(i=>Array.from(i._zod.values)))}),X(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=>$t(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 l=!1,d=[];for(let y of t.options){let h=y._zod.run({value:i.value,issues:[]},u);if(h instanceof Promise)d.push(h),l=!0;else{if(h.issues.length===0)return h;d.push(h)}}return l?Promise.all(d).then(y=>Cn(y,i,e,u)):Cn(d,i,e,u)}});var Wn=T("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,hr.init(e,t);let r=e._zod.parse;X(e._zod,"propValues",()=>{let i={};for(let u of t.options){let l=u._zod.propValues;if(!l||Object.keys(l).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(u)}"`);for(let[d,y]of Object.entries(l)){i[d]||(i[d]=new Set);for(let h of y)i[d].add(h)}}return i});let n=St(()=>{let i=t.options,u=new Map;for(let l of i){let d=l._zod.propValues?.[t.discriminator];if(!d||d.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(l)}"`);for(let y of d){if(u.has(y))throw new Error(`Duplicate discriminator value "${String(y)}"`);u.set(y,l)}}return u});e._zod.parse=(i,u)=>{let l=i.value;if(!et(l))return i.issues.push({code:"invalid_type",expected:"object",input:l,inst:e}),i;let d=n.value.get(l?.[t.discriminator]);return d?d._zod.run(i,u):t.unionFallback?r(i,u):(i.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:l,path:[t.discriminator],inst:e}),i)}});var Kn=T("$ZodRecord",(e,t)=>{G.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;if(!bn(i))return r.issues.push({expected:"record",code:"invalid_type",input:i,inst:e}),r;let u=[],l=t.keyType._zod.values;if(l){r.value={};let d=new Set;for(let h of l)if(typeof h=="string"||typeof h=="number"||typeof h=="symbol"){d.add(typeof h=="number"?h.toString():h);let P=t.valueType._zod.run({value:i[h],issues:[]},n);P instanceof Promise?u.push(P.then(S=>{S.issues.length&&r.issues.push(..._e(h,S.issues)),r.value[h]=S.value})):(P.issues.length&&r.issues.push(..._e(h,P.issues)),r.value[h]=P.value)}let y;for(let h in i)d.has(h)||(y=y??[],y.push(h));y&&y.length>0&&r.issues.push({code:"unrecognized_keys",input:i,inst:e,keys:y})}else{r.value={};for(let d of Reflect.ownKeys(i)){if(d==="__proto__")continue;let y=t.keyType._zod.run({value:d,issues:[]},n);if(y instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof d=="string"&&mr.test(d)&&y.issues.length){let S=t.keyType._zod.run({value:Number(d),issues:[]},n);if(S instanceof Promise)throw new Error("Async schemas not supported in object keys currently");S.issues.length===0&&(y=S)}if(y.issues.length){t.mode==="loose"?r.value[d]=i[d]:r.issues.push({code:"invalid_key",origin:"record",issues:y.issues.map(S=>Pe(S,n,de())),input:d,path:[d],inst:e});continue}let P=t.valueType._zod.run({value:i[d],issues:[]},n);P instanceof Promise?u.push(P.then(S=>{S.issues.length&&r.issues.push(..._e(d,S.issues)),r.value[y.value]=S.value})):(P.issues.length&&r.issues.push(..._e(d,P.issues)),r.value[y.value]=P.value)}}return u.length?Promise.all(u).then(()=>r):r}});var Jn=T("$ZodEnum",(e,t)=>{G.init(e,t);let r=lr(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(i=>Tn.has(typeof i)).map(i=>typeof i=="string"?Re(i):i.toString()).join("|")})$`),e._zod.parse=(i,u)=>{let l=i.value;return n.has(l)||i.issues.push({code:"invalid_value",values:r,input:l,inst:e}),i}}),Xn=T("$ZodLiteral",(e,t)=>{if(G.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");let r=new Set(t.values);e._zod.values=r,e._zod.pattern=new RegExp(`^(${t.values.map(n=>typeof n=="string"?Re(n):n?Re(n.toString()):String(n)).join("|")})$`),e._zod.parse=(n,i)=>{let u=n.value;return r.has(u)||n.issues.push({code:"invalid_value",values:t.values,input:u,inst:e}),n}});var Yn=T("$ZodTransform",(e,t)=>{G.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Et(e.constructor.name);let i=t.transform(r.value,r);if(n.async)return(i instanceof Promise?i:Promise.resolve(i)).then(l=>(r.value=l,r));if(i instanceof Promise)throw new ce;return r.value=i,r}});function Un(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}o(Un,"handleOptionalResult");var Qn=T("$ZodOptional",(e,t)=>{G.init(e,t),e._zod.optin="optional",e._zod.optout="optional",X(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),X(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${$t(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=>Un(u,r.value)):Un(i,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,n)}});var eo=T("$ZodNullable",(e,t)=>{G.init(e,t),X(e._zod,"optin",()=>t.innerType._zod.optin),X(e._zod,"optout",()=>t.innerType._zod.optout),X(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${$t(r.source)}|null)$`):void 0}),X(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 to=T("$ZodPipe",(e,t)=>{G.init(e,t),X(e._zod,"values",()=>t.in._zod.values),X(e._zod,"optin",()=>t.in._zod.optin),X(e._zod,"optout",()=>t.out._zod.optout),X(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(l=>kt(l,t.in,n)):kt(u,t.in,n)}let i=t.in._zod.run(r,n);return i instanceof Promise?i.then(u=>kt(u,t.out,n)):kt(i,t.out,n)}});function kt(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}o(kt,"handlePipeResult");var ro=T("$ZodCustom",(e,t)=>{Ce.init(e,t),G.init(e,t),e._zod.parse=(r,n)=>r,e._zod.check=r=>{let n=r.value,i=t.fn(n);if(i instanceof Promise)return i.then(u=>Mn(u,r,n,e));Mn(i,r,n,e)}});function Mn(e,t,r,n){if(!e){let i={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(i.params=n._zod.def.params),t.issues.push(dr(i))}}o(Mn,"handleRefineResult");var oo,Pu=Symbol("ZodOutput"),bu=Symbol("ZodInput"),vr=class{static{o(this,"$ZodRegistry")}constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...r){let n=r[0];return this._map.set(t,n),n&&typeof n=="object"&&"id"in n&&this._idmap.set(n.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){let r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){let r=t._zod.parent;if(r){let n={...this.get(r)??{}};delete n.id;let i={...n,...this._map.get(t)};return Object.keys(i).length?i:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};function io(){return new vr}o(io,"registry");(oo=globalThis).__zod_globalRegistry??(oo.__zod_globalRegistry=io());var xr=globalThis.__zod_globalRegistry;function ao(e,t){return new e({type:"string",...q(t)})}o(ao,"_string");function so(e,t){return new e({type:"string",coerce:!0,...q(t)})}o(so,"_coercedString");function uo(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...q(t)})}o(uo,"_url");function co(e,t){return new e({type:"number",checks:[],...q(t)})}o(co,"_number");function lo(e,t){return new e({type:"number",coerce:!0,checks:[],...q(t)})}o(lo,"_coercedNumber");function po(e,t){return new e({type:"boolean",...q(t)})}o(po,"_boolean");function mo(e,t){return new e({type:"boolean",coerce:!0,...q(t)})}o(mo,"_coercedBoolean");function fo(e,t){return new e({type:"bigint",coerce:!0,...q(t)})}o(fo,"_coercedBigint");function go(e){return new e({type:"any"})}o(go,"_any");function yo(e){return new e({type:"unknown"})}o(yo,"_unknown");function ho(e,t){return new e({type:"void",...q(t)})}o(ho,"_void");function vo(e,t){return new e({type:"date",coerce:!0,...q(t)})}o(vo,"_coercedDate");function se(e,t){return new kn({check:"min_length",...q(t),minimum:e})}o(se,"_minLength");function be(e,t){return new Nn({check:"string_format",format:"regex",...q(t),pattern:e})}o(be,"_regex");function xo(e,t,r){let n=q(r);return n.abort??(n.abort=!0),new e({type:"custom",check:"custom",fn:t,...n})}o(xo,"_custom");var Y=T("ZodMiniType",(e,t)=>{if(!e._zod)throw new Error("Uninitialized schema in ZodMiniType.");G.init(e,t),e.def=t,e.type=t.type,e.parse=(r,n)=>zt(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>rt(e,r,n),e.parseAsync=async(r,n)=>Ot(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>nt(e,r,n),e.check=(...r)=>e.clone({...t,checks:[...t.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]},{parent:!0}),e.with=e.check,e.clone=(r,n)=>At(e,r,n),e.brand=()=>e,e.register=(r,n)=>(r.add(e,n),e),e.apply=r=>r(e)}),Dt=T("ZodMiniString",(e,t)=>{wt.init(e,t),Y.init(e,t)});function a(e){return ao(Dt,e)}o(a,"string");var _o=T("ZodMiniStringFormat",(e,t)=>{gr.init(e,t),Dt.init(e,t)});var Nu=T("ZodMiniURL",(e,t)=>{jn.init(e,t),_o.init(e,t)});function Po(e){return uo(Nu,e)}o(Po,"url");var _r=T("ZodMiniNumber",(e,t)=>{Ln.init(e,t),Y.init(e,t)});function ee(e){return co(_r,e)}o(ee,"number");var Pr=T("ZodMiniBoolean",(e,t)=>{yr.init(e,t),Y.init(e,t)});function Z(e){return po(Pr,e)}o(Z,"boolean");var bo=T("ZodMiniBigInt",(e,t)=>{Fn.init(e,t),Y.init(e,t)});var wu=T("ZodMiniAny",(e,t)=>{Bn.init(e,t),Y.init(e,t)});function it(){return go(wu)}o(it,"any");var Ru=T("ZodMiniUnknown",(e,t)=>{Zn.init(e,t),Y.init(e,t)});function k(){return yo(Ru)}o(k,"unknown");var Du=T("ZodMiniVoid",(e,t)=>{Vn.init(e,t),Y.init(e,t)});function To(e){return ho(Du,e)}o(To,"_void");var Eo=T("ZodMiniDate",(e,t)=>{Hn.init(e,t),Y.init(e,t)});var Cu=T("ZodMiniArray",(e,t)=>{qn.init(e,t),Y.init(e,t)});function R(e,t){return new Cu({type:"array",element:e,...q(t)})}o(R,"array");var Uu=T("ZodMiniObject",(e,t)=>{Gn.init(e,t),Y.init(e,t),X(e,"shape",()=>t.shape)});function c(e,t){let r={type:"object",shape:e??{},...q(t)};return new Uu(r)}o(c,"object");var Mu=T("ZodMiniUnion",(e,t)=>{hr.init(e,t),Y.init(e,t)});function D(e,t){return new Mu({type:"union",options:e,...q(t)})}o(D,"union");var ju=T("ZodMiniDiscriminatedUnion",(e,t)=>{Wn.init(e,t),Y.init(e,t)});function Ue(e,t,r){return new ju({type:"union",options:t,discriminator:e,...q(r)})}o(Ue,"discriminatedUnion");var Lu=T("ZodMiniRecord",(e,t)=>{Kn.init(e,t),Y.init(e,t)});function N(e,t,r){return new Lu({type:"record",keyType:e,valueType:t,...q(r)})}o(N,"record");var Fu=T("ZodMiniEnum",(e,t)=>{Jn.init(e,t),Y.init(e,t),e.options=Object.values(t.entries)});function U(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new Fu({type:"enum",entries:r,...q(t)})}o(U,"_enum");var Bu=T("ZodMiniLiteral",(e,t)=>{Xn.init(e,t),Y.init(e,t)});function $(e,t){return new Bu({type:"literal",values:Array.isArray(e)?e:[e],...q(t)})}o($,"literal");var Zu=T("ZodMiniTransform",(e,t)=>{Yn.init(e,t),Y.init(e,t)});function Te(e){return new Zu({type:"transform",transform:e})}o(Te,"transform");var Vu=T("ZodMiniOptional",(e,t)=>{Qn.init(e,t),Y.init(e,t)});function g(e){return new Vu({type:"optional",innerType:e})}o(g,"optional");var Hu=T("ZodMiniNullable",(e,t)=>{eo.init(e,t),Y.init(e,t)});function at(e){return new Hu({type:"nullable",innerType:e})}o(at,"nullable");var qu=T("ZodMiniPipe",(e,t)=>{to.init(e,t),Y.init(e,t)});function Ee(e,t){return new qu({type:"pipe",in:e,out:t})}o(Ee,"pipe");var Gu=T("ZodMiniCustom",(e,t)=>{ro.init(e,t),Y.init(e,t)});function Ct(e,t){return xo(Gu,e??(()=>!0),t)}o(Ct,"custom");var st={};hn(st,{bigint:()=>ec,boolean:()=>Qu,date:()=>tc,number:()=>Yu,string:()=>Xu});function Xu(e){return so(Dt,e)}o(Xu,"string");function Yu(e){return lo(_r,e)}o(Yu,"number");function Qu(e){return mo(Pr,e)}o(Qu,"boolean");function ec(e){return fo(bo,e)}o(ec,"bigint");function tc(e){return vo(Eo,e)}o(tc,"date");var Tr=c({retryOnFailure:c({defaultValue:g(Z()),hide:g(Z())}),continueOnFailure:c({defaultValue:g(Z()),hide:g(Z())})}),br=class{constructor(t,r,n,i,u,l,d,y,h,P,S){this.name=t;this.displayName=r;this.description=n;this.props=i;this.run=u;this.test=l;this.requireAuth=d;this.errorHandlingOptions=y;this.outputSchema=h;this.audience=P;this.aiMetadata=S}static{o(this,"IAction")}},W=o(e=>new br(e.name,e.displayName,e.description,e.props,e.run,e.test??e.run,e.requireAuth??!0,e.errorHandlingOptions??{continueOnFailure:{defaultValue:!1},retryOnFailure:{defaultValue:!1}},e.outputSchema,e.audience,e.aiMetadata),"createAction");var F=c({displayName:a(),description:g(a())}),C=o((e,t)=>c({type:$(t),required:Z(),defaultValue:g(it())}),"TPropertyValue");var ne=c({...F.shape,...C(a(),"SHORT_TEXT").shape}),me=c({...F.shape,...C(a(),"LONG_TEXT").shape});var So=c({label:a(),value:k()}),Ut=c({disabled:g(Z()),placeholder:g(a()),options:R(So)});var oe=c({...F.shape,options:Ut,...C(k(),"STATIC_DROPDOWN").shape}),fe=c({...F.shape,options:Ut,...C(R(k()),"STATIC_MULTI_SELECT_DROPDOWN").shape});var Er=c({...F.shape,...C(k(),"DROPDOWN").shape,refreshers:R(a())}),ut=c({...F.shape,...C(R(k()),"MULTI_SELECT_DROPDOWN").shape,refreshers:R(a())});var ge=c({...F.shape,...C(Z(),"CHECKBOX").shape});var ye=c({...F.shape,...C(ee(),"NUMBER").shape});var ct=c({...F.shape,...C(k(),"FILE").shape});var lt=c({...F.shape,...C(a(),"DATE_TIME").shape});var $o=N(a(),D([ne,me,oe,ut,fe,ge,ye,ct,lt])),pt=c({...F.shape,properties:$o,...C(R(k()),"ARRAY").shape});var dt=c({...F.shape,...C(D([N(a(),k())]),"JSON").shape});var Ao=D([ne,oe,dt,pt,fe]),nc=N(a(),Ao),Ir=c({refreshers:R(a()),...F.shape,...C(k(),"DYNAMIC").shape});var Mt=c({...F.shape,...C(To(),"MARKDOWN").shape});var mt=(r=>(r.ARCHIVE="ARCHIVE",r.REGISTRY="REGISTRY",r))(mt||{}),Me=(r=>(r.CUSTOM="CUSTOM",r.OFFICIAL="OFFICIAL",r))(Me||{}),je=(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))(je||{});var ft=(r=>(r.AUTHORIZATION_CODE="authorization_code",r.CLIENT_CREDENTIALS="client_credentials",r))(ft||{}),Sr="both_client_credentials_and_authorization_code";var Ae=(i=>(i.POLLING="POLLING",i.WEBHOOK="WEBHOOK",i.APP_WEBHOOK="APP_WEBHOOK",i.MANUAL="MANUAL",i))(Ae||{}),gt=(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))(gt||{}),oc=c({strategy:U(gt),paramName:g(a())}),yt=(r=>(r.SIMULATION="SIMULATION",r.TEST_FUNCTION="TEST_FUNCTION",r))(yt||{});var jt=(r=>(r.WEBSOCKET="WEBSOCKET",r.NONE="NONE",r))(jt||{}),zo=c({status:g(ee()),body:g(k()),headers:g(N(a(),a()))}),Oo=c({type:$("DELAY"),resumeDateTime:a(),requestIdToReply:g(a()),handlerId:g(a()),streamStepProgress:g(U(jt))}),ko=c({type:$("WEBHOOK"),requestId:a(),requestIdToReply:g(a()),response:zo,handlerId:g(a()),streamStepProgress:g(U(jt))}),ic=D([Oo,ko]);var ac=c({body:k(),rawBody:g(k()),headers:N(a(),a()),queryParams:N(a(),a())});function he(e){return e==null}o(he,"isNil");function ht(e){return e==null?!0:typeof e=="string"||Array.isArray(e)?e.length===0:typeof e=="object"?Object.keys(e).length===0:!1}o(ht,"isEmpty");function Lt(e,t){if(e==null)throw new Error(`${t} is null or undefined`)}o(Lt,"assertNotNullOrUndefined");var $r=we(require("crypto"),1);var sc=128,ze,Le,uc=o(e=>{!ze||ze.length<e?(ze=Buffer.allocUnsafe(e*sc),$r.default.randomFillSync(ze),Le=0):Le+e>ze.length&&($r.default.randomFillSync(ze),Le=0),Le+=e},"fillPool"),cc=o(e=>(uc(e|=0),ze.subarray(Le-e,Le)),"random"),lc=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 l="";for(;;){let d=r(i),y=i;for(;y--;)if(l+=e[d[y]&n]||"",l.length===u)return l}}},"customRandom"),wo=o((e,t=21)=>lc(e,t,cc),"customAlphabet");var pc="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",Ro=21,lb=a().check(be(new RegExp(`^[0-9a-zA-Z]{${Ro}}$`))),dc=wo(pc,Ro);var Ie=Ee(Te(e=>e instanceof Date?e.toISOString():e),a()),ie={id:a(),created:Ie,updated:Ie},H=o(e=>g(at(e)),"Nullable");function Ar(e){return g(at(U(e)))}o(Ar,"NullableEnum");var mb=Ee(Te(e=>e==="true"||e===!0?!0:e==="false"||e===!1?!1:void 0),g(Z())),Ft=o(e=>Ee(Te(t=>Array.isArray(t)?t:t!==void 0?[t]:void 0),g(R(e))),"OptionalArrayFromQuery");var yb=N(a(),k());var vt=(P=>(P.OPENAI="openai",P.OPENROUTER="openrouter",P.ANTHROPIC="anthropic",P.AZURE="azure",P.GOOGLE="google",P.ACTIVEPIECES="activepieces",P.CLOUDFLARE_GATEWAY="cloudflare-gateway",P.CUSTOM="custom",P.BEDROCK="bedrock",P.MISTRAL="mistral",P))(vt||{});var Ab=a().check(be(/^#[0-9A-Fa-f]{6}$/));var Ob=c({filename:a(),data:k(),type:$("file"),mimetype:g(a())});var mc=we(Co());var Ub=c({...ie,name:a(),permissions:R(a()),platformId:H(a()),type:a(),userCount:g(ee())});var Uo=(n=>(n.AGENT_DECIDE="agent-decide",n.CHOOSE_YOURSELF="choose-yourself",n.LEAVE_EMPTY="leave-empty",n))(Uo||{}),zr=(r=>(r.FILE="FILE",r.TABLE="TABLE",r))(zr||{}),Or=(n=>(n.SSE="sse",n.STREAMABLE_HTTP="streamable-http",n.SIMPLE_HTTP="http",n))(Or||{});var kr=(n=>(n.TEXT="text",n.NUMBER="number",n.BOOLEAN="boolean",n))(kr||{});var Nr=(r=>(r.IN_PROGRESS="in-progress",r.COMPLETED="completed",r))(Nr||{});var fc=c({mode:U(Uo),value:k()}),gc=c({auth:g(a()),fields:N(a(),fc)}),yc=c({pieceName:a(),pieceVersion:a(),actionName:a(),predefinedInput:g(gc)}),hc=c({type:$("PIECE"),toolName:a().check(se(1)),pieceMetadata:yc}),vc=c({type:$("none")}),xc=c({type:$("access_token"),accessToken:a()}),_c=c({type:$("api_key"),apiKey:a(),apiKeyHeader:a()}),Pc=c({type:$("headers"),headers:N(a(),a())}),bc=Ue("type",[vc,xc,_c,Pc]),Mo=c({type:$("FLOW"),toolName:a().check(se(1)),externalFlowId:a(),flowDisplayName:g(a())}),jo=c({type:$("MCP"),toolName:a().check(se(1)),serverUrl:Po(),protocol:U(Or),auth:bc}),Lo=c({type:$("KNOWLEDGE_BASE"),toolName:a().check(se(1)),sourceType:U(zr),sourceId:a(),sourceName:a()}),Tc=Ue("type",[hc,Mo,jo,Lo]),Ec=c({displayName:a(),description:g(a()),type:U(kr)}),Fo=c({type:$("MARKDOWN"),markdown:a()}),Fe={type:$("TOOL_CALL"),input:H(N(a(),k())),output:g(k()),toolName:a(),status:U(Nr),toolCallId:a(),startTime:a(),endTime:g(a())},lT=c(Fe),Bo=Ue("toolCallType",[c({...Fe,toolCallType:$("PIECE"),pieceName:a(),pieceVersion:a(),actionName:a()}),c({...Fe,toolCallType:$("FLOW"),displayName:a(),externalFlowId:a()}),c({...Fe,toolCallType:$("MCP"),displayName:a(),serverUrl:a()}),c({...Fe,toolCallType:$("KNOWLEDGE_BASE"),displayName:a(),sourceType:a()}),c({...Fe,toolCallType:$("UNKNOWN"),displayName:a()})]),Ic=D([Fo,Bo]);var wr=(r=>(r.IMAGE="image",r.TEXT="text",r))(wr||{}),ve=c({apiKey:a()}),Sc=ve,$c=c({apiKey:a(),apiKeyHash:a()}),Ac=ve,zc=ve,Oc=ve,kc=ve,Nc=ve,wc=ve,Rc=ve,Zo=c({accessKeyId:a().check(se(1)),secretAccessKey:a().check(se(1))}),Dc=c({}),Cc=c({}),Uc=c({}),Mc=c({}),jc=c({}),Lc=c({}),Vo=c({modelId:a(),modelName:a(),modelType:U(wr)}),Ho=c({apiKeyHeader:a(),baseUrl:a(),models:R(Vo),defaultHeaders:g(N(a(),a()))}),qo=c({accountId:a(),gatewayId:a(),models:R(Vo),vertexProject:g(a()),vertexRegion:g(a())}),Go=c({resourceName:a(),apiVersion:Ee(Te(e=>typeof e=="string"&&e.trim().length===0?void 0:e),g(a()))}),Wo=c({region:a().check(se(1))}),Fc=D([Sc,Oc,kc,Nc,wc,zc,Ac,$c,Zo,Rc]),Ko=D([Ho,qo,Go,Wo,Dc,Uc,Mc,jc,Cc,Lc]),Bc=c({id:a(),name:a(),type:U(wr)}),Zc=c({id:a(),name:a(),provider:U(vt),config:Ko,enabledForChat:Z()}),Vc=c({provider:U(vt),config:Ko,auth:Fc,platformId:a()});var fT={openai:"openai",anthropic:"anthropic","google-ai-studio":"google","google-vertex-ai":"google"};var Hc=c({base64Url:a(),fileName:a(),extension:g(a())}),qc=c({mimeType:a(),url:a(),fileName:g(a())}),Rr=D([Hc,qc]);var Gc=D([c({type:$("file"),value:Rr}),c({type:$("markdown"),value:a(),files:g(R(Rr))})]),Wc=c({sessionId:a(),message:a(),files:g(R(a()))});var Xo=(r=>(r.ON_NEW_RECORD="ON_NEW_RECORD",r.ON_UPDATE_RECORD="ON_UPDATE_RECORD",r))(Xo||{}),Yo=(r=>(r.ENABLED="ENABLED",r.DISABLED="DISABLED",r))(Yo||{}),Dr=(n=>(n.RECORD_CREATED="RECORD_CREATED",n.RECORD_UPDATED="RECORD_UPDATED",n.RECORD_DELETED="RECORD_DELETED",n))(Dr||{});var Kc=D([c({...ie,name:a(),externalId:a(),type:$("STATIC_DROPDOWN"),tableId:a(),projectId:a(),data:c({options:R(c({value:a()}))})}),c({...ie,name:a(),externalId:a(),type:D([$("TEXT"),$("NUMBER"),$("DATE")]),tableId:a(),projectId:a()})]),Jc=c({...ie,name:a(),folderId:H(a()),projectId:a(),externalId:a(),status:Ar(Yo),trigger:Ar(Xo)}),Xc=c({...ie,tableId:a(),projectId:a(),cells:N(a(),c({updated:a(),created:a(),value:k(),fieldName:a()}))}),Yc=c({events:R(U(Dr)),webhookUrl:a(),flowId:a()}),Qc=c({fields:R(c({id:a(),name:a()})),rows:R(N(a(),a())),name:a()}),el=c({projectId:a(),limit:g(st.number()),cursor:g(a()),name:g(a()),externalIds:Ft(a()),folderId:g(a()),folderIds:Ft(a())}),tl=c({records:R(R(c({fieldId:a(),value:ei()}))),tableId:a()}),rl=c({cells:g(R(c({fieldId:a(),value:ei()}))),tableId:a(),agentUpdate:g(Z())}),Qo=Ue("operator",[Oe("eq"),Oe("neq"),Oe("gt"),Oe("gte"),Oe("lt"),Oe("lte"),Oe("co"),Jo("exists"),Jo("not_exists")]),nl=c({tableId:a(),limit:g(st.number()),cursor:g(a()),filters:Ft(Qo)});function ei(){return Ee(Te(e=>e==null?e:String(e)),at(a()))}o(ei,"coerceToString");function Oe(e){return c({fieldId:a(),operator:$(e),value:a()})}o(Oe,"valueFilter");function Jo(e){return c({fieldId:a(),operator:$(e)})}o(Jo,"existenceFilter");var ol=c({status:g(ee()),body:g(k()),headers:g(N(a(),a()))}),il=c({...ie,deleted:H(Ie),ownerId:a(),displayName:a(),platformId:a(),externalId:H(a())});var ti=c({name:a(),description:g(a()),type:a(),required:Z()}),al=c({pieceName:a(),triggerName:a(),input:c({toolName:a(),toolDescription:a(),inputSchema:R(ti),returnsResponse:Z()})});var ri="^[0-9]+\\.[0-9]+\\.[0-9]+$",wT=new RegExp(ri),ul="^([~^])?[0-9]+\\.[0-9]+\\.[0-9]+$",RT=a().check(be(new RegExp(ri))),DT=a().check(be(new RegExp(ul))),cl=c({packageType:$("ARCHIVE"),pieceType:U(Me),pieceName:a(),pieceVersion:a(),archiveId:a(),platformId:a()}),ni=c({packageType:$("REGISTRY"),pieceType:$("OFFICIAL"),pieceName:a(),pieceVersion:a()}),oi=c({packageType:$("REGISTRY"),pieceType:$("CUSTOM"),pieceName:a(),pieceVersion:a(),platformId:a()}),CT=D([ni,oi]),UT=D([cl,ni,oi]),ii=(t=>(t.CRON_EXPRESSION="CRON_EXPRESSION",t))(ii||{}),ll=c({type:U(ii),cronExpression:a(),timezone:a()}),MT=c({...ie,type:U(Ae),projectId:a(),flowId:a(),triggerName:a(),schedule:H(ll),flowVersionId:a(),pieceName:a(),pieceVersion:a(),deleted:H(a()),simulate:Z()}),ai=(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))(ai||{}),si=(r=>(r.NONE="NONE",r.ZSTD="ZSTD",r))(si||{}),ui=(r=>(r.S3="S3",r.DB="DB",r))(ui||{}),jT=c({...ie,projectId:H(a()),platformId:H(a()),type:U(ai),compression:U(si),data:g(k()),location:U(ui),size:H(ee()),fileName:H(a()),s3Key:H(a()),metadata:H(N(a(),a()))}),ci=(n=>(n.ADMIN="ADMIN",n.MEMBER="MEMBER",n.OPERATOR="OPERATOR",n))(ci||{}),li=(r=>(r.ACTIVE="ACTIVE",r.INACTIVE="INACTIVE",r))(li||{}),LT=c({id:a(),email:a(),firstName:a(),status:U(li),externalId:H(a()),platformId:H(a()),platformRole:U(ci),lastName:a(),created:Ie,updated:Ie,lastActiveDate:H(Ie),imageUrl:H(a())});var Cr=c({...F.shape,...C(N(a(),k()),"OBJECT").shape});var fi=c({...F.shape,...C(a(),"COLOR").shape});var Ur=D([ne,me,Mt,ge,oe,fe,Er,ut,Ir,ye,pt,Cr,dt,lt,ct,fi]),_={ShortText(e){return{...e,valueSchema:void 0,type:"SHORT_TEXT"}},Checkbox(e){return{...e,valueSchema:void 0,type:"CHECKBOX"}},LongText(e){return{...e,valueSchema:void 0,type:"LONG_TEXT"}},MarkDown(e){return{displayName:"Markdown",required:!1,description:e.value,type:"MARKDOWN",valueSchema:void 0,variant:e.variant??"INFO"}},Number(e){return{...e,valueSchema:void 0,type:"NUMBER"}},Json(e){return{...e,valueSchema:void 0,type:"JSON"}},Array(e){return{...e,valueSchema:void 0,type:"ARRAY"}},Object(e){return{...e,valueSchema:void 0,type:"OBJECT"}},Dropdown(e){return{...e,valueSchema:void 0,type:"DROPDOWN"}},StaticDropdown(e){return{...e,valueSchema:void 0,type:"STATIC_DROPDOWN"}},MultiSelectDropdown(e){return{...e,valueSchema:void 0,type:"MULTI_SELECT_DROPDOWN"}},DynamicProperties(e){return{...e,valueSchema:void 0,type:"DYNAMIC"}},StaticMultiSelectDropdown(e){return{...e,valueSchema:void 0,type:"STATIC_MULTI_SELECT_DROPDOWN"}},DateTime(e){return{...e,valueSchema:void 0,type:"DATE_TIME"}},File(e){return{...e,valueSchema:void 0,type:"FILE"}},Custom(e){let t=e.code.toString();return{...e,code:t,valueSchema:void 0,type:"CUSTOM"}},Color(e){return{...e,valueSchema:void 0,type:"COLOR"}}};var le=c({displayName:a(),description:g(a())});var gi=c({username:a(),password:a()}),Mr=c({...le.shape,username:c({displayName:a(),description:g(a())}),password:c({displayName:a(),description:g(a())}),...C(gi,"BASIC_AUTH").shape});var fl=N(a(),D([ne,me,ye,ge,oe])),jr=c({...le.shape,props:fl,...C(k(),"CUSTOM_AUTH").shape});var ke=c({...le.shape,...C(c({auth:a()}),"SECRET_TEXT").shape});var gl=N(a(),D([ne,me,ke,ye,ge,oe,fe,Mt])),yi=c({...le.shape,props:gl,...C(k(),"OIDC").shape});var Lr=(r=>(r.HEADER="HEADER",r.BODY="BODY",r))(Lr||{}),hi=D([ne,ke,oe]),vi=N(a(),hi),yl=c({props:g(N(a(),hi)),authUrl:a(),tokenUrl:a(),scope:R(a()),prompt:g(D([$("none"),$("consent"),$("login"),$("omit")])),pkce:g(Z()),pkceMethod:g(D([$("plain"),$("S256")])),authorizationMethod:g(U(Lr)),grantType:g(D([U(ft),$(Sr)])),extra:g(N(a(),a()))}),xi=c({access_token:a(),props:g(vi),data:N(a(),it())}),Fr=c({...le.shape,...yl.shape,...C(xi,"OAUTH2").shape});var Be=D([Mr,jr,yi,Fr,ke]),xt="Connection",Br={SecretText(e){return{...e,valueSchema:void 0,type:"SECRET_TEXT"}},OAuth2(e){return{...e,valueSchema:void 0,type:"OAUTH2",displayName:e.displayName||xt}},BasicAuth(e){return{...e,valueSchema:void 0,type:"BASIC_AUTH",displayName:e.displayName||xt,required:!0}},CustomAuth(e){return{...e,valueSchema:void 0,type:"CUSTOM_AUTH",displayName:e.displayName||xt}},OIDC(e){return{...e,valueSchema:void 0,type:"OIDC",displayName:e.displayName||xt}},None(){}};var vI={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 hl=c({...F.shape,...C(k(),"CUSTOM").shape,code:a()});var vl=D([Ur,Be]),Zr=N(a(),vl),MI=N(a(),Ur);var _i=D([c({strategy:$("CRON"),cronExpression:a()}),c({strategy:$("NONE")})]);var Pi="2",Zt="0.82.0";var Vr=class{constructor(t,r,n,i,u,l,d,y,h=Zt,P,S=""){this.displayName=t;this.logoUrl=r;this.authors=n;this.events=i;this.categories=d;this.auth=y;this.minimumSupportedRelease=h;this.maximumSupportedRelease=P;this.description=S;this._actions={};this._triggers={};this.getContextInfo=o(()=>({version:Pi}),"getContextInfo");(!xl(h)||_l(h,Zt))&&(this.minimumSupportedRelease=Zt),u.forEach(x=>this._actions[x.name]=x),l.forEach(x=>this._triggers[x.name]=x)}static{o(this,"Piece")}metadata(){return{displayName:this.displayName,logoUrl:this.logoUrl,actions:this._actions,triggers:this._triggers,categories:this.categories,description:this.description,authors:this.authors,auth:this.auth,minimumSupportedRelease:this.minimumSupportedRelease,maximumSupportedRelease:this.maximumSupportedRelease,contextInfo:this.getContextInfo?.()}}getAction(t){return this._actions[t]}getTrigger(t){return this._triggers[t]}actions(){return this._actions}triggers(){return this._triggers}},bi=o(e=>{if(e.auth&&Array.isArray(e.auth)&&!e.auth.every((r,n,i)=>n===i.findIndex(u=>u.type===r.type)))throw new Error("Auth properties must be unique by type");return new Vr(e.displayName,e.logoUrl,e.authors??[],e.events,e.actions,e.triggers,e.categories??[],e.auth,e.minimumSupportedRelease,e.maximumSupportedRelease,e.description)},"createPiece");function xl(e){return/^\d+\.\d+\.\d+$/.test(e)}o(xl,"isValidSimpleSemver");function _l(e,t){let[r,n,i]=e.split(".").map(Number),[u,l,d]=t.split(".").map(Number);return r!==u?r<u:n!==l?n<l:i<d}o(_l,"isSemverLessThan");var Pl=g(N(a(),N(a(),a()))),Ti=c({id:g(a()),name:a(),displayName:a(),logoUrl:a(),description:a(),authors:R(a()),platformId:g(a()),directoryPath:g(a()),auth:g(D([Be,R(Be)])),version:a(),categories:g(R(U(je))),minimumSupportedRelease:g(a()),maximumSupportedRelease:g(a()),i18n:Pl}),bl=U(["human","ai","both"]),Ei=c({description:g(a()),idempotent:g(Z())}),Ii=c({name:a(),displayName:a(),description:a(),props:Zr,requireAuth:Z(),errorHandlingOptions:g(Tr),outputSchema:g(Ct()),audience:g(bl),aiMetadata:g(Ei)}),Si=c({name:a(),displayName:a(),description:a(),props:Zr,errorHandlingOptions:g(Tr),type:U(Ae),sampleData:k(),handshakeConfiguration:g(Ct()),renewConfiguration:g(_i),testStrategy:U(yt),outputSchema:g(Ct()),aiMetadata:g(Ei)}),Tl=c({...Ti.shape,actions:N(a(),Ii),triggers:N(a(),Si)}),El=c({...Ti.shape,actions:ee(),triggers:ee(),suggestedActions:g(R(Si)),suggestedTriggers:g(R(Ii))}),$i=c({projectUsage:ee(),tags:g(R(a())),pieceType:U(Me),packageType:U(mt),platformId:g(a()),archiveId:g(a())}),MS=c({...Tl.shape,...$i.shape}),jS=c({...El.shape,...$i.shape}),LS=c({name:a(),version:a()});var Il=we(require("path")),Sl=we(require("fs/promises"));var Vt=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,l)=>{i.append(l,u)}),{urlWithoutQueryParams:n,queryParams:i}}getHeaders(t){let r={Accept:"application/json"};if(t.authentication&&this.populateAuthentication(t.authentication,r),t.body)switch(t.headers?.["Content-Type"]){case"text/csv":r["Content-Type"]="text/csv";break;default:r["Content-Type"]="application/json";break}return t.headers&&(r={...r,...t.headers}),r}populateAuthentication(t,r){this.authenticationConverter.convert(t,r)}};var Ht=class{static{o(this,"DelegatingAuthenticationConverter")}constructor(t=new Hr,r=new qr){this.converters={BEARER_TOKEN:t,BASIC:r}}convert(t,r){return this.converters[t.type].convert(t,r)}},Hr=class{static{o(this,"BearerTokenAuthenticationConverter")}convert(t,r){return r.Authorization=`Bearer ${t.token}`,r}},qr=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 qt=class extends Error{constructor(r,n){let i=n.status||500,u=Buffer.isBuffer(n.responseBody)?n.responseBody.toString():n.responseBody;super(JSON.stringify({response:{status:i,body:u},request:{body:r}}));this.requestBody=r;this.status=i,this.responseBody=u}static{o(this,"HttpError")}errorMessage(){return{response:{status:this.status,body:this.responseBody},request:{body:this.requestBody}}}get response(){return{status:this.status,body:this.responseBody}}get request(){return{body:this.requestBody}}};var Gt=class extends Vt{static{o(this,"FetchHttpClient")}constructor(t="",r=new Ht){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),l=t.queryParams??{};for(let[j,re]of Object.entries(l))i.append(j,re);let d=i.toString(),y=d?`${n}?${d}`:n,h=t.responseType??"json",P=t.followRedirects??!0,S=t.retries??0,{body:x,extraHeaders:s,isStream:p}=$l(t.body,u),f=zl({...u,...s}),m=await Al(async()=>{let j=new AbortController,re=t.timeout&&t.timeout>0?setTimeout(()=>j.abort(),t.timeout):void 0;try{let ae={method:t.method.toString(),headers:f,body:x,redirect:P?"follow":"manual",signal:j.signal};return p&&(ae.duplex="half"),r?.dispatcher!==void 0&&(ae.dispatcher=r.dispatcher),await fetch(y,ae)}finally{re!==void 0&&clearTimeout(re)}},S),v=P?300:400;if(m.status<200||m.status>=v){let j=await Ai(m,h),re=new qt(t.body,{status:m.status,responseBody:j});throw console.error("[HttpClient#(sanitized error message)] Request failed:",re),re}let b=await Ai(m,h);return{status:m.status,headers:Ol(m.headers),body:b}}};function $l(e,t){return Nl(e)?{body:void 0,extraHeaders:{},isStream:!1}:kl(e)?{body:e,extraHeaders:e.getHeaders(),isStream:!0}:typeof e=="string"||Buffer.isBuffer(e)||e instanceof URLSearchParams||e instanceof ArrayBuffer||typeof FormData<"u"&&e instanceof FormData||typeof Blob<"u"&&e instanceof Blob?{body:e,extraHeaders:{},isStream:!1}:(t["Content-Type"]??t["content-type"]??"").includes("application/x-www-form-urlencoded")?{body:new URLSearchParams(e).toString(),extraHeaders:{},isStream:!1}:{body:JSON.stringify(e),extraHeaders:{},isStream:!1}}o($l,"serializeBody");async function Ai(e,t){switch(t){case"arraybuffer":return Buffer.from(await e.arrayBuffer());case"blob":return await e.blob();case"text":return await e.text();case"json":default:{let r=await e.text();if(r.length===0)return;try{return JSON.parse(r)}catch{return r}}}}o(Ai,"parseResponseBody");async function Al(e,t){let r;for(let n=0;n<=t;n++)try{let i=await e();if(i.status>=500&&n<t){await zi(n);continue}return i}catch(i){if(r=i,n<t){await zi(n);continue}throw i}throw r}o(Al,"sendWithRetries");function zi(e){let t=Math.min(1e3*2**e,3e4);return new Promise(r=>setTimeout(r,t))}o(zi,"backoff");function zl(e){let t={};for(let[r,n]of Object.entries(e))n!==void 0&&(t[r]=Array.isArray(n)?n.join(", "):n);return t}o(zl,"normalizeHeaders");function Ol(e){let t={};return e.forEach((r,n)=>{t[n]=r}),t}o(Ol,"toHttpHeaders");function kl(e){return typeof e=="object"&&e!==null&&typeof e.getHeaders=="function"&&typeof e.pipe=="function"}o(kl,"isNodeFormData");function Nl(e){return e==null}o(Nl,"isNil");var Ze=new Gt;var Wt=(l=>(l.GET="GET",l.POST="POST",l.PATCH="PATCH",l.PUT="PUT",l.DELETE="DELETE",l.HEAD="HEAD",l))(Wt||{});var xd=we(require("fs")),Ds=we(Rs());var _d={"application/json":"json","application/pdf":"pdf","application/xml":"xml","text/xml":"xml","application/zip":"zip","application/gzip":"gz","application/x-tar":"tar","application/octet-stream":"bin","application/msword":"doc","application/vnd.openxmlformats-officedocument.wordprocessingml.document":"docx","application/vnd.ms-excel":"xls","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":"xlsx","application/vnd.ms-powerpoint":"ppt","application/vnd.openxmlformats-officedocument.presentationml.presentation":"pptx","application/rtf":"rtf","application/javascript":"js","application/x-www-form-urlencoded":"bin","text/plain":"txt","text/html":"html","text/css":"css","text/csv":"csv","text/calendar":"ics","text/markdown":"md","image/png":"png","image/jpeg":"jpeg","image/jpg":"jpg","image/gif":"gif","image/webp":"webp","image/svg+xml":"svg","image/bmp":"bmp","image/tiff":"tiff","image/x-icon":"ico","image/vnd.microsoft.icon":"ico","image/heic":"heic","audio/mpeg":"mp3","audio/mp4":"m4a","audio/wav":"wav","audio/x-wav":"wav","audio/ogg":"ogg","audio/webm":"weba","video/mp4":"mp4","video/mpeg":"mpeg","video/webm":"webm","video/quicktime":"mov","video/x-msvideo":"avi","font/woff":"woff","font/woff2":"woff2","font/ttf":"ttf","font/otf":"otf"};function Pd(e){let t=e.split(";")[0].trim().toLowerCase();return _d[t]??""}o(Pd,"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"),Td=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 Cs({auth:e,baseUrl:t,authMapping:r,description:n,displayName:i,name:u,props:l,extraProps:d,authLocation:y="headers"}){return W({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:_.DynamicProperties({auth:e,displayName:"",required:!0,refreshers:[],props:o(async({auth:h})=>({url:_.ShortText({displayName:"URL",description:`You can either use the full URL or the relative path to the base URL
3
+ i.e ${Td(t,h)}/resource or /resource`,required:!0,defaultValue:h?t(h):"",...l?.url??{}})}),"props")}),method:_.StaticDropdown({displayName:"Method",required:!0,options:{options:Object.values(Wt).map(h=>({label:h,value:h}))},...l?.method??{}}),headers:_.Object({displayName:"Headers",description:"Authorization headers are injected automatically from your connection.",required:!0,...l?.headers??{}}),queryParams:_.Object({displayName:"Query Parameters",required:!0,...l?.queryParams??{}}),body_type:_.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:_.DynamicProperties({auth:e,displayName:"Body",refreshers:["body_type"],required:!1,props:o(async({body_type:h})=>{if(!h)return{};let P=h,S={};switch(P){case"none":break;case"json":S.data=_.Json({displayName:"JSON Body",required:!0,...l?.body??{}});break;case"raw":S.data=_.LongText({displayName:"Raw Body",required:!0});break;case"form_data":S.data=_.Array({displayName:"Form Data",required:!0,properties:{fieldName:_.ShortText({displayName:"Field Name",required:!0}),fieldType:_.StaticDropdown({displayName:"Field Type",required:!0,options:{disabled:!1,options:[{label:"Text",value:"text"},{label:"File",value:"file"}]}}),textFieldValue:_.LongText({displayName:"Text Field Value",required:!1}),fileFieldValue:_.File({displayName:"File Field Value",required:!1})}});break}return S},"props")}),response_is_binary:_.Checkbox({displayName:"Response is Binary ?",description:"Enable for files like PDFs, images, etc.",required:!1,defaultValue:!1}),failsafe:_.Checkbox({displayName:"No Error on Failure",required:!1,...l?.failsafe??{}}),timeout:_.Number({displayName:"Timeout (in seconds)",required:!1,...l?.timeout??{}}),followRedirects:_.Checkbox({displayName:"Follow redirects",required:!1,defaultValue:!1}),...d},run:o(async h=>{let{method:P,url:S,headers:x,queryParams:s,body:p,body_type:f,failsafe:m,timeout:v,response_is_binary:b,followRedirects:j}=h.propsValue;Lt(P,"Method"),Lt(S,"URL");let re=he(r)?{}:await r(h.auth,h.propsValue),ae=S.url,Ye=ae.startsWith("http://")||ae.startsWith("https://")?ae:bd({baseUrl:t(h.auth),relativePath:ae}),$e={method:P,url:Ye,headers:{...x??{},...y==="headers"||!he(y)?re:{}},queryParams:{...y==="queryParams"?re:{},...s??{}},timeout:v?v*1e3:0,followRedirects:j};if(b&&($e.responseType="arraybuffer"),p)if(f&&f!=="none"){let pe=p.data;if(f==="form_data"){let Ys=pe,Tt=new Ds.default;for(let{fieldName:fn,fieldType:gn,textFieldValue:yn,fileFieldValue:sr}of Ys)gn==="text"&&!ht(yn)?Tt.append(fn,yn):gn==="file"&&!ht(sr)&&Tt.append(fn,sr.data,{filename:sr?.filename});$e.body=Tt,$e.headers={...$e.headers,...Tt.getHeaders()}}else $e.body=pe}else f||($e.body=p);try{let pe=await Ze.sendRequest($e);return await Ed(h.files,pe.body,pe.status,pe.headers,b)}catch(pe){if(m)return pe.errorMessage();throw pe}},"run")})}o(Cs,"createCustomApiCallAction");var Ed=o(async(e,t,r,n,i)=>{let u;if(i&&Id(t)){let l=Array.isArray(n?.["content-type"])?n["content-type"][0]:n?.["content-type"],d=Pd(l??"")||"txt",y;t instanceof ArrayBuffer?y=Buffer.from(new Uint8Array(t)):Buffer.isBuffer(t)?y=t:y=Buffer.from(t),u=await e.write({fileName:`output.${d}`,data:y})}else u=t;return{status:r,headers:n,body:u}},"handleBinaryResponse"),Id=o(e=>e instanceof ArrayBuffer||Buffer.isBuffer(e),"isBinaryBody");var Ke="https://api.elasticemail.com/v4",or=["Transactional","Engaged","Active","Bounced","Unsubscribed","Abuse","Inactive","Stale","NotConfirmed"],ir=["Deleted","Active","Processing","Sending","Completed","Paused","Cancelled","Draft"],Us=["HTML","PlainText","AMP","CSS"],Ms=["UserProvided","None","Raw7bit","Raw8bit","QuotedPrintable","Base64","Uue"],js=["Unknown","Allow","Deny"];var B=Br.SecretText({displayName:"API Key",description:`
4
+ To obtain your Elastic Email API key:
5
+ 1. Log in to your Elastic Email account
6
+ 2. Navigate to **Settings \u2192 Manage API Keys**
7
+ 3. Click **Create API Key**
8
+ 4. Ensure the key has the required permissions (Contacts, Campaigns, Emails, Segments)
9
+ 5. Copy the key and paste it here
10
+ `,required:!0,validate:o(async({auth:e})=>{try{return(await Ze.sendRequest({method:"GET",url:`${Ke}/contacts`,headers:{"X-ElasticEmail-ApiKey":e},queryParams:{limit:"1"}})).status===200?{valid:!0}:{valid:!1,error:"Invalid API key \u2014 could not authenticate with Elastic Email."}}catch(t){let r=t!=null&&typeof t=="object"&&"response"in t&&t.response!=null&&typeof t.response=="object"&&"status"in t.response?t.response.status:void 0;return r===401||r===403?{valid:!1,error:"Invalid API key \u2014 could not authenticate with Elastic Email."}:{valid:!1,error:"Could not reach the Elastic Email API. Check your network connection and try again."}}},"validate")});async function V({apiKey:e,method:t,path:r,queryParams:n,body:i}){return(await Ze.sendRequest({method:t,url:`${Ke}${r}`,headers:{"X-ElasticEmail-ApiKey":e,...i?{"Content-Type":"application/json"}:{}},queryParams:n,body:i})).body}o(V,"elasticEmailRequest");var Ls=_.Dropdown({displayName:"Contact Email",description:"Select an existing contact by email address.",required:!0,refreshers:[],auth:B,options:o(async({auth:e})=>e?{disabled:!1,options:(await V({apiKey:e.secret_text,method:"GET",path:"/contacts",queryParams:{limit:String(100)}})??[]).filter(r=>r.Email).map(r=>({label:r.Email,value:r.Email}))}:{disabled:!0,placeholder:"Connect your Elastic Email account first.",options:[]},"options")}),Fs=_.Dropdown({displayName:"Campaign",description:"Select an existing campaign by name.",required:!0,refreshers:[],auth:B,options:o(async({auth:e})=>e?{disabled:!1,options:(await V({apiKey:e.secret_text,method:"GET",path:"/campaigns",queryParams:{limit:String(100)}})??[]).filter(r=>r.Name).map(r=>({label:r.Name,value:r.Name}))}:{disabled:!0,placeholder:"Connect your Elastic Email account first.",options:[]},"options")}),Je=_.MultiSelectDropdown({displayName:"Mailing Lists",description:"Select mailing lists.",required:!1,refreshers:[],auth:B,options:o(async({auth:e})=>e?{disabled:!1,options:(await V({apiKey:e.secret_text,method:"GET",path:"/lists",queryParams:{limit:String(100)}})??[]).filter(r=>r.ListName).map(r=>({label:r.ListName,value:r.ListName}))}:{disabled:!0,placeholder:"Connect your Elastic Email account first.",options:[]},"options")}),ar=_.MultiSelectDropdown({displayName:"Segments",description:"Select segments.",required:!1,refreshers:[],auth:B,options:o(async({auth:e})=>e?{disabled:!1,options:(await V({apiKey:e.secret_text,method:"GET",path:"/segments",queryParams:{limit:String(100)}})??[]).filter(r=>r.Name).map(r=>({label:r.Name,value:r.Name}))}:{disabled:!0,placeholder:"Connect your Elastic Email account first.",options:[]},"options")}),Xe=_.Dropdown({displayName:"Template",description:"Select an email template.",required:!1,refreshers:[],auth:B,options:o(async({auth:e})=>e?{disabled:!1,options:(await V({apiKey:e.secret_text,method:"GET",path:"/templates",queryParams:{limit:String(100),scopeType:"Personal"}})??[]).filter(r=>r.Name).map(r=>({label:r.Name,value:r.Name}))}:{disabled:!0,placeholder:"Connect your Elastic Email account first.",options:[]},"options")});var Bs=W({name:"add_contact",displayName:"Add Contact to Mailing List",description:"Add a new contact to one or more mailing lists in Elastic Email.",audience:"both",aiMetadata:{description:"Adds a contact (identified by email) to one or more named mailing lists in Elastic Email, with optional name, status, custom fields, and consent details. Use when subscribing someone to specific lists rather than just creating a bare contact. Each call appends the contact, so it is not idempotent.",idempotent:!1},auth:B,props:{email:_.ShortText({displayName:"Email",description:"The email address of the contact.",required:!0}),listNames:Je,status:_.StaticDropdown({displayName:"Status",description:"Initial status of the contact.",required:!1,options:{options:or.map(e=>({label:e,value:e}))}}),firstName:_.ShortText({displayName:"First Name",required:!1}),lastName:_.ShortText({displayName:"Last Name",required:!1}),customFields:_.Object({displayName:"Custom Fields",description:"Key-value pairs of custom contact fields. Only existing custom fields will be saved.",required:!1}),consentIP:_.ShortText({displayName:"Consent IP",description:"IP address of consent. If not provided, your current public IP is used.",required:!1}),consentDate:_.ShortText({displayName:"Consent Date",description:"ISO 8601 date of consent. If not provided, current date is used.",required:!1}),consentTracking:_.StaticDropdown({displayName:"Consent Tracking",description:'Consent tracking level. Defaults to "Unknown".',required:!1,options:{options:js.map(e=>({label:e,value:e}))}})},async run({auth:e,propsValue:t}){let r={};return t.listNames&&(r.listnames=Array.isArray(t.listNames)?t.listNames.join(","):String(t.listNames)),V({apiKey:e.secret_text,method:"POST",path:"/contacts",queryParams:Object.keys(r).length>0?r:void 0,body:[{Email:t.email,Status:t.status??void 0,FirstName:t.firstName??void 0,LastName:t.lastName??void 0,CustomFields:t.customFields??void 0,Consent:{ConsentIP:t.consentIP??void 0,ConsentDate:t.consentDate??void 0,ConsentTracking:t.consentTracking??void 0}}]})}});var Zs=W({name:"create_campaign",displayName:"Create Campaign",description:"Create a new email campaign in Elastic Email.",audience:"both",aiMetadata:{description:"Creates a new email campaign in Elastic Email targeting the given mailing lists and/or segments, with sender, subject, template, and an initial status (e.g. draft or active). Use to set up a bulk campaign send; for one-off transactional messages use Send Email instead. Each call creates a separate campaign, so it is not idempotent.",idempotent:!1},auth:B,props:{name:_.ShortText({displayName:"Campaign Name",required:!0}),from:_.ShortText({displayName:"From",description:"Sender email with optional name (e.g. `email@domain.com` or `John Doe <email@domain.com>`).",required:!0}),recipientListNames:Je,recipientSegmentNames:ar,replyTo:_.ShortText({displayName:"Reply To",description:"Reply-to email address.",required:!0}),status:_.StaticDropdown({displayName:"Status",description:"Initial campaign status.",required:!0,options:{options:ir.map(e=>({label:e,value:e}))}}),subject:_.ShortText({displayName:"Subject",description:"Default email subject line.",required:!1}),templateName:Xe},async run({auth:e,propsValue:t}){return V({apiKey:e.secret_text,method:"POST",path:"/campaigns",body:{Name:t.name,Recipients:{ListNames:t.recipientListNames&&t.recipientListNames.length>0?t.recipientListNames:void 0,SegmentNames:t.recipientSegmentNames&&t.recipientSegmentNames.length>0?t.recipientSegmentNames:void 0},Content:[{From:t.from,ReplyTo:t.replyTo,Subject:t.subject??void 0,TemplateName:t.templateName??void 0}],Status:t.status}})}});var Vs=W({name:"create_contact",displayName:"Create Contact",description:"Create a new contact in Elastic Email.",audience:"both",aiMetadata:{description:"Creates a new contact in Elastic Email from an email address, with optional name, status, and custom fields, without attaching it to any mailing list. Use when you only need the contact to exist; use Add Contact to Mailing List when it must also join specific lists. Each call appends the contact, so it is not idempotent.",idempotent:!1},auth:B,props:{email:_.ShortText({displayName:"Email",description:"The email address of the contact.",required:!0}),status:_.StaticDropdown({displayName:"Status",description:"Initial status of the contact.",required:!1,options:{options:or.map(e=>({label:e,value:e}))}}),firstName:_.ShortText({displayName:"First Name",required:!1}),lastName:_.ShortText({displayName:"Last Name",required:!1}),customFields:_.Object({displayName:"Custom Fields",description:"Key-value pairs of custom contact fields. Only existing custom fields will be saved.",required:!1})},async run({auth:e,propsValue:t}){return V({apiKey:e.secret_text,method:"POST",path:"/contacts",body:[{Email:t.email,Status:t.status??void 0,FirstName:t.firstName??void 0,LastName:t.lastName??void 0,CustomFields:t.customFields??void 0}]})}});var Hs=W({name:"create_segment",displayName:"Create Segment",description:"Create a new contact segment in Elastic Email using a SQL-like rule.",audience:"both",aiMetadata:{description:"Creates a named contact segment in Elastic Email defined by a SQL-like rule that selects which contacts belong to it. Use to build a reusable audience for campaigns. The rule must follow Elastic Email segment-rule syntax. Each call creates a separate segment, so it is not idempotent.",idempotent:!1},auth:B,props:{name:_.ShortText({displayName:"Segment Name",required:!0}),rule:_.ShortText({displayName:"Rule",description:"SQL-like rule to determine which contacts belong to this segment. See https://help.elasticemail.com/en/articles/5162182-segment-rules",required:!0})},async run({auth:e,propsValue:t}){return V({apiKey:e.secret_text,method:"POST",path:"/segments",body:{Name:t.name,Rule:t.rule}})}});var qs=W({name:"list_campaigns",displayName:"List Campaigns",description:"Fetch a paginated list of campaigns from Elastic Email.",audience:"both",aiMetadata:{description:"Retrieves a paginated list of campaigns from Elastic Email; leave the search field empty to return all campaigns, or set it to filter by campaign name. Use to look up campaigns or find a campaign name before updating it. Read-only and idempotent.",idempotent:!0},auth:B,props:{search:_.ShortText({displayName:"Search",description:"Filter campaigns by name.",required:!1}),limit:_.Number({displayName:"Limit",description:"Maximum number of campaigns to return (max 100).",required:!1,defaultValue:100}),offset:_.Number({displayName:"Offset",description:"Number of campaigns to skip.",required:!1,defaultValue:0})},async run({auth:e,propsValue:t}){let r={};return t.search&&(r.search=t.search),t.limit!==void 0&&(r.limit=String(t.limit)),t.offset!==void 0&&(r.offset=String(t.offset)),V({apiKey:e.secret_text,method:"GET",path:"/campaigns",queryParams:r})}});var Gs=W({name:"list_contacts",displayName:"List Contacts",description:"Fetch a paginated list of contacts from Elastic Email.",audience:"both",aiMetadata:{description:"Retrieves a paginated list of contacts from the Elastic Email account using limit and offset. Use to browse or page through contacts. Read-only and idempotent.",idempotent:!0},auth:B,props:{limit:_.Number({displayName:"Limit",description:"Maximum number of contacts to return (max 100).",required:!1,defaultValue:100}),offset:_.Number({displayName:"Offset",description:"Number of contacts to skip.",required:!1,defaultValue:0})},async run({auth:e,propsValue:t}){let r={};return t.limit!==void 0&&(r.limit=String(t.limit)),t.offset!==void 0&&(r.offset=String(t.offset)),V({apiKey:e.secret_text,method:"GET",path:"/contacts",queryParams:r})}});var Ws=W({name:"send_email",displayName:"Send Email",description:"Send an email to one or more recipients via Elastic Email.",audience:"both",aiMetadata:{description:"Sends a transactional email to one or more recipients via Elastic Email, with either inline body content or a saved template, plus optional merge fields, tracking, and a scheduled time offset. Use for direct one-off sends; use Create Campaign for bulk list/segment marketing. Each call dispatches a new email, so it is not idempotent.",idempotent:!1},auth:B,props:{recipients:_.Array({displayName:"Recipients",description:"List of recipient email addresses.",required:!0}),from:_.ShortText({displayName:"From",description:"Sender email with optional name (e.g. `email@domain.com` or `John Doe <email@domain.com>`).",required:!0}),subject:_.ShortText({displayName:"Subject",description:"Email subject line.",required:!1}),bodyContentType:_.StaticDropdown({displayName:"Body Content Type",description:"Type of body content.",required:!1,options:{options:Us.map(e=>({label:e,value:e}))}}),bodyContent:_.LongText({displayName:"Body Content",description:"The actual body content of the email.",required:!1}),replyTo:_.ShortText({displayName:"Reply To",description:"Reply-to email address.",required:!1}),templateName:Xe,merge:_.Object({displayName:"Merge Fields",description:"Key-value merge fields shared between recipients. Use in email body like {firstname}, {lastname}.",required:!1}),timeOffset:_.Number({displayName:"Time Offset (minutes)",description:"Delay sending by this many minutes. Maximum is 35 days (50400 minutes).",required:!1}),poolName:_.ShortText({displayName:"Pool Name",description:"Name of custom IP pool for sending.",required:!1}),channelName:_.ShortText({displayName:"Channel Name",description:"Name of the sending channel.",required:!1}),encoding:_.StaticDropdown({displayName:"Encoding",description:"Encoding type for email headers.",required:!1,options:{options:Ms.map(e=>({label:e,value:e}))}}),trackOpens:_.Checkbox({displayName:"Track Opens",description:"Track email opens. If not set, uses account default.",required:!1}),trackClicks:_.Checkbox({displayName:"Track Clicks",description:"Track link clicks. If not set, uses account default.",required:!1})},async run({auth:e,propsValue:t}){let r=(t.recipients??[]).map(String);return V({apiKey:e.secret_text,method:"POST",path:"/emails",body:{Recipients:r.map(n=>({Email:n})),Content:{From:t.from,Subject:t.subject??void 0,Body:t.bodyContentType||t.bodyContent?[{ContentType:t.bodyContentType||"HTML",Body:t.bodyContent}]:void 0,ReplyTo:t.replyTo??void 0,TemplateName:t.templateName??void 0,Merge:t.merge??void 0},Options:{TimeOffset:t.timeOffset??void 0,PoolName:t.poolName??void 0,ChannelName:t.channelName??void 0,Encoding:t.encoding??void 0,TrackOpens:t.trackOpens??void 0,TrackClicks:t.trackClicks??void 0}}})}});var Ks=W({name:"unsubscribe_contact",displayName:"Unsubscribe Contact",description:"Unsubscribe one or more email addresses from future emails in Elastic Email.",audience:"both",aiMetadata:{description:"Marks one or more email addresses as unsubscribed in Elastic Email so they no longer receive future emails. Use to honor opt-out or suppression requests. Idempotent: re-running with the same addresses leaves them unsubscribed with no additional effect.",idempotent:!0},auth:B,props:{emails:_.Array({displayName:"Email Addresses",description:"List of email addresses to unsubscribe.",required:!0})},async run({auth:e,propsValue:t}){let r=(t.emails??[]).map(String);return V({apiKey:e.secret_text,method:"POST",path:"/suppressions/unsubscribes",body:r})}});var Js=W({name:"update_campaign",displayName:"Update Campaign",description:"Update an existing campaign in Elastic Email.",audience:"both",aiMetadata:{description:"Updates an existing campaign in Elastic Email, identified by its name, merging any provided fields (name, sender, recipients, subject, template, status) with the campaign's current values so omitted fields are preserved. Use to revise a campaign before it sends. Idempotent: applying the same values yields the same campaign state.",idempotent:!0},auth:B,props:{campaign:Fs,name:_.ShortText({displayName:"New Campaign Name",description:"New name for the campaign. Leave empty to keep existing.",required:!1}),from:_.ShortText({displayName:"From",description:"Sender email with optional name. Leave empty to keep existing.",required:!1}),recipientListNames:Je,recipientSegmentNames:ar,replyTo:_.ShortText({displayName:"Reply To",description:"Reply-to email address. Leave empty to keep existing.",required:!1}),subject:_.ShortText({displayName:"Subject",description:"Email subject. Leave empty to keep existing.",required:!1}),templateName:Xe,status:_.StaticDropdown({displayName:"Status",description:"Campaign status. Leave empty to keep existing.",required:!1,options:{options:ir.map(e=>({label:e,value:e}))}})},async run({auth:e,propsValue:t}){let r=String(t.campaign),n=await V({apiKey:e.secret_text,method:"GET",path:`/campaigns/${encodeURIComponent(r)}`}),i=n.Content?.[0]??{};return V({apiKey:e.secret_text,method:"PUT",path:`/campaigns/${encodeURIComponent(r)}`,body:{Name:t.name||n.Name,Recipients:{ListNames:t.recipientListNames&&t.recipientListNames.length>0?t.recipientListNames:n.Recipients?.ListNames??void 0,SegmentNames:t.recipientSegmentNames&&t.recipientSegmentNames.length>0?t.recipientSegmentNames:n.Recipients?.SegmentNames??void 0},Content:[{From:t.from||i.From,ReplyTo:t.replyTo||i.ReplyTo,Subject:t.subject||i.Subject,TemplateName:t.templateName||i.TemplateName}],Status:t.status||n.Status}})}});var Xs=W({name:"update_contact",displayName:"Update Contact",description:"Update an existing contact in Elastic Email.",audience:"both",aiMetadata:{description:"Updates an existing contact in Elastic Email, identified by email address, setting first name, last name, and/or custom fields. Use to edit contact details after creation. Idempotent: applying the same values yields the same contact state.",idempotent:!0},auth:B,props:{contact:Ls,firstName:_.ShortText({displayName:"First Name",required:!1}),lastName:_.ShortText({displayName:"Last Name",required:!1}),customFields:_.Object({displayName:"Custom Fields",description:"Key-value pairs of custom contact fields. Only existing custom fields will be saved.",required:!1})},async run({auth:e,propsValue:t}){return V({apiKey:e.secret_text,method:"PUT",path:`/contacts/${encodeURIComponent(String(t.contact))}`,body:{FirstName:t.firstName??void 0,LastName:t.lastName??void 0,CustomFields:t.customFields??void 0}})}});var Sd=bi({displayName:"Elastic Email",description:"Email delivery and marketing platform for sending emails, managing contacts, campaigns, and segments.",auth:B,minimumSupportedRelease:"0.36.1",logoUrl:"https://cdn.activepieces.com/pieces/elastic-email.png",authors:["Harmatta"],categories:["MARKETING"],actions:[Bs,Zs,Vs,Hs,qs,Gs,Ws,Ks,Js,Xs,Cs({baseUrl:o(()=>Ke,"baseUrl"),auth:B,authMapping:o(async e=>({"X-ElasticEmail-ApiKey":e.secret_text}),"authMapping")})],triggers:[]});0&&(module.exports={elasticEmail});
11
+ /*! Bundled license information:
12
+
13
+ mime-types/index.js:
14
+ (*!
15
+ * mime-types
16
+ * Copyright(c) 2014 Jonathan Ong
17
+ * Copyright(c) 2015 Douglas Christopher Wilson
18
+ * MIT Licensed
19
+ *)
20
+ */
package/src/index.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export declare const elasticEmail: import("@activepieces/pieces-framework").Piece<import("@activepieces/pieces-framework").SecretTextProperty<true>>;
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAiBA,eAAO,MAAM,YAAY,mHA6BvB,CAAC"}
package/src/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;AAAA,+DAAwE;AACxE,qEAA6D;AAC7D,iDAAqD;AAErD,qCAA8C;AAC9C,sDAAgE;AAChE,2DAA6D;AAC7D,mEAAqE;AACrE,iEAAmE;AACnE,iEAAmE;AACnE,iEAAmE;AACnE,+DAAiE;AACjE,yDAA2D;AAC3D,2EAA6E;AAC7E,mEAAqE;AACrE,iEAAmE;AAEtD,QAAA,YAAY,GAAG,IAAA,8BAAW,EAAC;IACtC,WAAW,EAAE,eAAe;IAC5B,WAAW,EACT,uGAAuG;IACzG,IAAI,EAAE,uBAAgB;IACtB,uBAAuB,EAAE,QAAQ;IACjC,OAAO,EAAE,uDAAuD;IAChE,OAAO,EAAE,CAAC,UAAU,CAAC;IACrB,UAAU,EAAE,CAAC,sBAAa,CAAC,SAAS,CAAC;IACrC,OAAO,EAAE;QACP,8BAAgB;QAChB,sCAAoB;QACpB,oCAAmB;QACnB,oCAAmB;QACnB,oCAAmB;QACnB,kCAAkB;QAClB,4BAAe;QACf,8CAAwB;QACxB,sCAAoB;QACpB,oCAAmB;QACnB,IAAA,yCAAyB,EAAC;YACxB,OAAO,EAAE,GAAG,EAAE,CAAC,kCAAsB;YACrC,IAAI,EAAE,uBAAgB;YACtB,WAAW,EAAE,CAAO,IAAI,EAAE,EAAE;gBAAC,OAAA,CAAC;oBAC5B,uBAAuB,EAAE,IAAI,CAAC,WAAW;iBAC1C,CAAC,CAAA;cAAA;SACH,CAAC;KACH;IACD,QAAQ,EAAE,EAAE;CACb,CAAC,CAAC"}
@@ -1,12 +0,0 @@
1
- export declare const addContactAction: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
2
- email: import("@activepieces/pieces-framework").ShortTextProperty<true>;
3
- listNames: import("@activepieces/pieces-framework").MultiSelectDropdownProperty<string, false, import("@activepieces/pieces-framework").SecretTextProperty<true>>;
4
- status: import("@activepieces/pieces-framework").StaticDropdownProperty<"Transactional" | "Engaged" | "Active" | "Bounced" | "Unsubscribed" | "Abuse" | "Inactive" | "Stale" | "NotConfirmed", false>;
5
- firstName: import("@activepieces/pieces-framework").ShortTextProperty<false>;
6
- lastName: import("@activepieces/pieces-framework").ShortTextProperty<false>;
7
- customFields: import("@activepieces/pieces-framework").ObjectProperty<false>;
8
- consentIP: import("@activepieces/pieces-framework").ShortTextProperty<false>;
9
- consentDate: import("@activepieces/pieces-framework").ShortTextProperty<false>;
10
- consentTracking: import("@activepieces/pieces-framework").StaticDropdownProperty<"Unknown" | "Allow" | "Deny", false>;
11
- }>;
12
- //# sourceMappingURL=add-contact.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"add-contact.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/add-contact.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,gBAAgB;;;;;;;;;;EA2F3B,CAAC"}
@@ -1,100 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.addContactAction = void 0;
4
- const tslib_1 = require("tslib");
5
- const pieces_common_1 = require("@activepieces/pieces-common");
6
- const pieces_framework_1 = require("@activepieces/pieces-framework");
7
- const auth_1 = require("../auth");
8
- const client_1 = require("../common/client");
9
- const constants_1 = require("../common/constants");
10
- const props_1 = require("../common/props");
11
- exports.addContactAction = (0, pieces_framework_1.createAction)({
12
- name: 'add_contact',
13
- displayName: 'Add Contact to Mailing List',
14
- description: 'Add a new contact to one or more mailing lists in Elastic Email.',
15
- audience: 'both',
16
- aiMetadata: {
17
- description: 'Adds a contact (identified by email) to one or more named mailing lists in Elastic Email, with optional name, status, custom fields, and consent details. Use when subscribing someone to specific lists rather than just creating a bare contact. Each call appends the contact, so it is not idempotent.',
18
- idempotent: false,
19
- },
20
- auth: auth_1.elasticEmailAuth,
21
- props: {
22
- email: pieces_framework_1.Property.ShortText({
23
- displayName: 'Email',
24
- description: 'The email address of the contact.',
25
- required: true,
26
- }),
27
- listNames: props_1.listNamesProp,
28
- status: pieces_framework_1.Property.StaticDropdown({
29
- displayName: 'Status',
30
- description: 'Initial status of the contact.',
31
- required: false,
32
- options: {
33
- options: constants_1.CONTACT_STATUS_OPTIONS.map((s) => ({ label: s, value: s })),
34
- },
35
- }),
36
- firstName: pieces_framework_1.Property.ShortText({
37
- displayName: 'First Name',
38
- required: false,
39
- }),
40
- lastName: pieces_framework_1.Property.ShortText({
41
- displayName: 'Last Name',
42
- required: false,
43
- }),
44
- customFields: pieces_framework_1.Property.Object({
45
- displayName: 'Custom Fields',
46
- description: 'Key-value pairs of custom contact fields. Only existing custom fields will be saved.',
47
- required: false,
48
- }),
49
- consentIP: pieces_framework_1.Property.ShortText({
50
- displayName: 'Consent IP',
51
- description: 'IP address of consent. If not provided, your current public IP is used.',
52
- required: false,
53
- }),
54
- consentDate: pieces_framework_1.Property.ShortText({
55
- displayName: 'Consent Date',
56
- description: 'ISO 8601 date of consent. If not provided, current date is used.',
57
- required: false,
58
- }),
59
- consentTracking: pieces_framework_1.Property.StaticDropdown({
60
- displayName: 'Consent Tracking',
61
- description: 'Consent tracking level. Defaults to "Unknown".',
62
- required: false,
63
- options: {
64
- options: constants_1.CONSENT_TRACKING_OPTIONS.map((s) => ({ label: s, value: s })),
65
- },
66
- }),
67
- },
68
- run(_a) {
69
- return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth, propsValue }) {
70
- var _b, _c, _d, _e, _f, _g, _h;
71
- const queryParams = {};
72
- if (propsValue.listNames) {
73
- queryParams['listnames'] = Array.isArray(propsValue.listNames)
74
- ? propsValue.listNames.join(',')
75
- : String(propsValue.listNames);
76
- }
77
- return (0, client_1.elasticEmailRequest)({
78
- apiKey: auth.secret_text,
79
- method: pieces_common_1.HttpMethod.POST,
80
- path: '/contacts',
81
- queryParams: Object.keys(queryParams).length > 0 ? queryParams : undefined,
82
- body: [
83
- {
84
- Email: propsValue.email,
85
- Status: (_b = propsValue.status) !== null && _b !== void 0 ? _b : undefined,
86
- FirstName: (_c = propsValue.firstName) !== null && _c !== void 0 ? _c : undefined,
87
- LastName: (_d = propsValue.lastName) !== null && _d !== void 0 ? _d : undefined,
88
- CustomFields: (_e = propsValue.customFields) !== null && _e !== void 0 ? _e : undefined,
89
- Consent: {
90
- ConsentIP: (_f = propsValue.consentIP) !== null && _f !== void 0 ? _f : undefined,
91
- ConsentDate: (_g = propsValue.consentDate) !== null && _g !== void 0 ? _g : undefined,
92
- ConsentTracking: (_h = propsValue.consentTracking) !== null && _h !== void 0 ? _h : undefined,
93
- },
94
- },
95
- ],
96
- });
97
- });
98
- },
99
- });
100
- //# sourceMappingURL=add-contact.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"add-contact.js","sourceRoot":"","sources":["../../../../src/lib/actions/add-contact.ts"],"names":[],"mappings":";;;;AAAA,+DAAyD;AACzD,qEAAwE;AAExE,kCAA2C;AAC3C,6CAAuD;AACvD,mDAG6B;AAC7B,2CAAgD;AAEnC,QAAA,gBAAgB,GAAG,IAAA,+BAAY,EAAC;IAC3C,IAAI,EAAE,aAAa;IACnB,WAAW,EAAE,6BAA6B;IAC1C,WAAW,EACT,kEAAkE;IACpE,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE;QACV,WAAW,EACT,4SAA4S;QAC9S,UAAU,EAAE,KAAK;KAClB;IACD,IAAI,EAAE,uBAAgB;IACtB,KAAK,EAAE;QACL,KAAK,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACxB,WAAW,EAAE,OAAO;YACpB,WAAW,EAAE,mCAAmC;YAChD,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,SAAS,EAAE,qBAAa;QACxB,MAAM,EAAE,2BAAQ,CAAC,cAAc,CAAC;YAC9B,WAAW,EAAE,QAAQ;YACrB,WAAW,EAAE,gCAAgC;YAC7C,QAAQ,EAAE,KAAK;YACf,OAAO,EAAE;gBACP,OAAO,EAAE,kCAAsB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC;aACrE;SACF,CAAC;QACF,SAAS,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC5B,WAAW,EAAE,YAAY;YACzB,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,QAAQ,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC3B,WAAW,EAAE,WAAW;YACxB,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,YAAY,EAAE,2BAAQ,CAAC,MAAM,CAAC;YAC5B,WAAW,EAAE,eAAe;YAC5B,WAAW,EACT,sFAAsF;YACxF,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,SAAS,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC5B,WAAW,EAAE,YAAY;YACzB,WAAW,EACT,yEAAyE;YAC3E,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,WAAW,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC9B,WAAW,EAAE,cAAc;YAC3B,WAAW,EACT,kEAAkE;YACpE,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,eAAe,EAAE,2BAAQ,CAAC,cAAc,CAAC;YACvC,WAAW,EAAE,kBAAkB;YAC/B,WAAW,EAAE,gDAAgD;YAC7D,QAAQ,EAAE,KAAK;YACf,OAAO,EAAE;gBACP,OAAO,EAAE,oCAAwB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC;aACvE;SACF,CAAC;KACH;IACK,GAAG;qEAAC,EAAE,IAAI,EAAE,UAAU,EAAE;;YAC5B,MAAM,WAAW,GAA2B,EAAE,CAAC;YAC/C,IAAI,UAAU,CAAC,SAAS,EAAE,CAAC;gBACzB,WAAW,CAAC,WAAW,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,SAAS,CAAC;oBAC5D,CAAC,CAAC,UAAU,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC;oBAChC,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;YACnC,CAAC;YAED,OAAO,IAAA,4BAAmB,EAAC;gBACzB,MAAM,EAAE,IAAI,CAAC,WAAW;gBACxB,MAAM,EAAE,0BAAU,CAAC,IAAI;gBACvB,IAAI,EAAE,WAAW;gBACjB,WAAW,EAAE,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS;gBAC1E,IAAI,EAAE;oBACJ;wBACE,KAAK,EAAE,UAAU,CAAC,KAAK;wBACvB,MAAM,EAAE,MAAA,UAAU,CAAC,MAAM,mCAAI,SAAS;wBACtC,SAAS,EAAE,MAAA,UAAU,CAAC,SAAS,mCAAI,SAAS;wBAC5C,QAAQ,EAAE,MAAA,UAAU,CAAC,QAAQ,mCAAI,SAAS;wBAC1C,YAAY,EAAE,MAAA,UAAU,CAAC,YAAY,mCAAI,SAAS;wBAClD,OAAO,EAAE;4BACP,SAAS,EAAE,MAAA,UAAU,CAAC,SAAS,mCAAI,SAAS;4BAC5C,WAAW,EAAE,MAAA,UAAU,CAAC,WAAW,mCAAI,SAAS;4BAChD,eAAe,EAAE,MAAA,UAAU,CAAC,eAAe,mCAAI,SAAS;yBACzD;qBACF;iBACF;aACF,CAAC,CAAC;QACL,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -1,11 +0,0 @@
1
- export declare const createCampaignAction: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
2
- name: import("@activepieces/pieces-framework").ShortTextProperty<true>;
3
- from: import("@activepieces/pieces-framework").ShortTextProperty<true>;
4
- recipientListNames: import("@activepieces/pieces-framework").MultiSelectDropdownProperty<string, false, import("@activepieces/pieces-framework").SecretTextProperty<true>>;
5
- recipientSegmentNames: import("@activepieces/pieces-framework").MultiSelectDropdownProperty<string, false, import("@activepieces/pieces-framework").SecretTextProperty<true>>;
6
- replyTo: import("@activepieces/pieces-framework").ShortTextProperty<true>;
7
- status: import("@activepieces/pieces-framework").StaticDropdownProperty<"Active" | "Deleted" | "Processing" | "Sending" | "Completed" | "Paused" | "Cancelled" | "Draft", true>;
8
- subject: import("@activepieces/pieces-framework").ShortTextProperty<false>;
9
- templateName: import("@activepieces/pieces-framework").DropdownProperty<string, false, import("@activepieces/pieces-framework").SecretTextProperty<true>>;
10
- }>;
11
- //# sourceMappingURL=create-campaign.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-campaign.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/create-campaign.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,oBAAoB;;;;;;;;;EAuE/B,CAAC"}