@activepieces/piece-presentation 0.1.5 → 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,18 +1,12 @@
1
1
  {
2
2
  "name": "@activepieces/piece-presentation",
3
- "version": "0.1.5",
3
+ "version": "0.1.7",
4
4
  "type": "commonjs",
5
5
  "main": "./src/index.js",
6
- "types": "./src/index.d.ts",
7
- "dependencies": {
8
- "@activepieces/pieces-common": "0.12.3",
9
- "@activepieces/pieces-framework": "0.30.0",
10
- "@activepieces/shared": "0.86.0",
11
- "dayjs": "1.11.9",
12
- "tslib": "2.3.0"
13
- },
14
- "scripts": {
15
- "build": "tsc -p tsconfig.lib.json && cp package.json dist/",
16
- "lint": "eslint 'src/**/*.ts'"
17
- }
6
+ "dependencies": {},
7
+ "files": [
8
+ "src/index.js",
9
+ "package.json",
10
+ "src/i18n"
11
+ ]
18
12
  }
package/src/i18n/fr.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "Generate Presentations (async)": "Générer des présentations (async)",
5
5
  "Custom API Call": "Appel d'API personnalisé",
6
6
  "Create an asynchronous presentation generation task at Presenton and return the created task.": "Créez une tâche de génération de présentation asynchrone sur Presenton et renvoyez la tâche créée.",
7
- "Make a custom API call to a specific endpoint": "Passer un appel API personnalisé à un endpoint spécifique",
7
+ "Make a custom API call to a specific endpoint": "Effectuer un appel API personnalisé vers un point de terminaison spécifique",
8
8
  "Content": "Contenus",
9
9
  "Instructions": "Instructions",
10
10
  "Tone": "Tonalité",
@@ -28,8 +28,8 @@
28
28
  "Query Parameters": "Paramètres de requête",
29
29
  "Body Type": "Body Type",
30
30
  "Body": "Body",
31
- "Response is Binary ?": "La réponse est Binaire ?",
32
- "No Error on Failure": "Aucune erreur en cas d'échec",
31
+ "Response is Binary ?": "Réponse binaire ?",
32
+ "No Error on Failure": "Pas d'erreur en cas d'échec",
33
33
  "Timeout (in seconds)": "Délai d'expiration (en secondes)",
34
34
  "Follow redirects": "Suivre les redirections",
35
35
  "The content for generating the presentation": "Le contenu pour générer la présentation",
@@ -50,8 +50,8 @@
50
50
  "Array of file identifiers uploaded via Presenton files API (optional).": "Tableau des identifiants de fichiers téléchargés via l'API des fichiers Presenton (optionnel).",
51
51
  "Export format": "Format d'exportation",
52
52
  "Whether to trigger subscribed webhooks": "Activer ou non les webhooks abonnés",
53
- "Authorization headers are injected automatically from your connection.": "Les Headers d'autorisation sont injectés automatiquement à partir de votre connexion.",
54
- "Enable for files like PDFs, images, etc.": "Activer pour les fichiers comme les PDFs, les images, etc.",
53
+ "Authorization headers are injected automatically from your connection.": "Les en-têtes d'autorisation sont injectés automatiquement depuis votre connexion.",
54
+ "Enable for files like PDFs, images, etc.": "Activer pour les fichiers comme les PDF, images, etc.",
55
55
  "Default": "Par défaut",
56
56
  "Casual": "Décontracté",
57
57
  "Professional": "Professionnel",
package/src/i18n/ja.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "Generate AI-powered presentations using Presenton (https://presenton.ai). Supports templates, themes, images, synchronous and asynchronous generation, status polling, and export to PPTX/PDF.": "Presenton (https://presenton.ai)を使用してAIで動作するプレゼンテーションを生成します。テンプレート、テーマ、画像、同期および非同期生成、ステータスポーリング、PPTX/PDFへのエクスポートに対応しています。",
3
3
  "\n": "\n",
4
4
  "Generate Presentations (async)": "プレゼンテーションの生成 (非同期)",
5
- "Custom API Call": "カスタムAPI通話",
5
+ "Custom API Call": "カスタムAPI呼び出し",
6
6
  "Create an asynchronous presentation generation task at Presenton and return the created task.": "Presentonで非同期プレゼンテーション生成タスクを作成し、作成したタスクを返します。",
7
7
  "Make a custom API call to a specific endpoint": "特定のエンドポイントへのカスタム API コールを実行します。",
8
8
  "Content": "コンテンツ",
@@ -68,12 +68,12 @@
68
68
  "Swift": "Swift",
69
69
  "PPTX": "PPTX",
70
70
  "PDF": "PDF",
71
- "GET": "取得",
71
+ "GET": "GET",
72
72
  "POST": "POST",
73
73
  "PATCH": "PATCH",
74
74
  "PUT": "PUT",
75
- "DELETE": "削除",
76
- "HEAD": "",
75
+ "DELETE": "DELETE",
76
+ "HEAD": "HEAD",
77
77
  "None": "なし",
78
78
  "JSON": "JSON",
79
79
  "Form Data": "フォームデータ",
package/src/index.js CHANGED
@@ -1,36 +1,14 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.presentation = void 0;
4
- const tslib_1 = require("tslib");
5
- const pieces_framework_1 = require("@activepieces/pieces-framework");
6
- const generate_presentations_1 = require("./lib/actions/generate-presentations");
7
- const auth_1 = require("./lib/common/auth");
8
- const shared_1 = require("@activepieces/shared");
9
- const new_presentation_1 = require("./lib/triggers/new-presentation");
10
- const pieces_common_1 = require("@activepieces/pieces-common");
11
- exports.presentation = (0, pieces_framework_1.createPiece)({
12
- displayName: 'Presenton',
13
- description: 'Generate AI-powered presentations using Presenton (https://presenton.ai). Supports templates, themes, images, synchronous and asynchronous generation, status polling, and export to PPTX/PDF.',
14
- auth: auth_1.presentonAuth,
15
- minimumSupportedRelease: '0.36.1',
16
- logoUrl: 'https://cdn.activepieces.com/pieces/presenton.png',
17
- categories: [
18
- shared_1.PieceCategory.ARTIFICIAL_INTELLIGENCE,
19
- shared_1.PieceCategory.CONTENT_AND_FILES,
20
- ],
21
- authors: ['sanket-a11y'],
22
- actions: [
23
- generate_presentations_1.generatePresentations,
24
- (0, pieces_common_1.createCustomApiCallAction)({
25
- auth: auth_1.presentonAuth,
26
- baseUrl: () => 'https://api.presenton.ai/api/v1',
27
- authMapping: (auth) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
28
- return {
29
- Authorization: `Bearer ${auth.secret_text}`,
30
- };
31
- }),
32
- }),
33
- ],
34
- triggers: [new_presentation_1.newPresentation],
35
- });
36
- //# sourceMappingURL=index.js.map
1
+ "use strict";var nu=Object.create;var gt=Object.defineProperty;var ou=Object.getOwnPropertyDescriptor;var iu=Object.getOwnPropertyNames;var au=Object.getPrototypeOf,su=Object.prototype.hasOwnProperty;var o=(e,t)=>gt(e,"name",{value:t,configurable:!0});var z=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),On=(e,t)=>{for(var r in t)gt(e,r,{get:t[r],enumerable:!0})},Rn=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of iu(t))!su.call(e,i)&&i!==r&&gt(e,i,{get:()=>t[i],enumerable:!(n=ou(t,i))||n.enumerable});return e};var Ze=(e,t,r)=>(r=e!=null?nu(au(e)):{},Rn(t||!e||!e.__esModule?gt(r,"default",{value:e,enumerable:!0}):r,e)),uu=e=>Rn(gt({},"__esModule",{value:!0}),e);var Xo=z((Jo,ar)=>{(function(e){"use strict";let t="(0?\\d+|0x[a-f0-9]+)",r={fourOctet:new RegExp(`^${t}\\.${t}\\.${t}\\.${t}$`,"i"),threeOctet:new RegExp(`^${t}\\.${t}\\.${t}$`,"i"),twoOctet:new RegExp(`^${t}\\.${t}$`,"i"),longValue:new RegExp(`^${t}$`,"i")},n=new RegExp("^0[0-7]+$","i"),i=new RegExp("^0x[a-f0-9]+$","i"),u="%[0-9a-z]{1,}",c="(?:[0-9a-f]+::?)+",l={zoneIndex:new RegExp(u,"i"),native:new RegExp(`^(::)?(${c})?([0-9a-f]+)?(::)?(${u})?$`,"i"),deprecatedTransitional:new RegExp(`^(?:::)(${t}\\.${t}\\.${t}\\.${t}(${u})?)$`,"i"),transitional:new RegExp(`^((?:${c})|(?:::)(?:${c})?)${t}\\.${t}\\.${t}\\.${t}(${u})?$`,"i")};function f(s,d){if(s.indexOf("::")!==s.lastIndexOf("::"))return null;let y=0,m=-1,v=(s.match(l.zoneIndex)||[])[0],P,M;for(v&&(v=v.substring(1),s=s.replace(/%.+$/,""));(m=s.indexOf(":",m+1))>=0;)y++;if(s.substr(0,2)==="::"&&y--,s.substr(-2,2)==="::"&&y--,y>d)return null;for(M=d-y,P=":";M--;)P+="0:";return s=s.replace("::",P),s[0]===":"&&(s=s.slice(1)),s[s.length-1]===":"&&(s=s.slice(0,-1)),d=function(){let ee=s.split(":"),q=[];for(let me=0;me<ee.length;me++)q.push(parseInt(ee[me],16));return q}(),{parts:d,zoneId:v}}o(f,"expandIPv6");function g(s,d,y,m){if(s.length!==d.length)throw new Error("ipaddr: cannot match CIDR for objects with different lengths");let v=0,P;for(;m>0;){if(P=y-m,P<0&&(P=0),s[v]>>P!==d[v]>>P)return!1;m-=y,v+=1}return!0}o(g,"matchCIDR");function _(s){if(i.test(s))return parseInt(s,16);if(s[0]==="0"&&!isNaN(parseInt(s[1],10))){if(n.test(s))return parseInt(s,8);throw new Error(`ipaddr: cannot parse ${s} as octal`)}return parseInt(s,10)}o(_,"parseIntAuto");function T(s,d){for(;s.length<d;)s=`0${s}`;return s}o(T,"padPart");let x={};x.IPv4=function(){function s(d){if(d.length!==4)throw new Error("ipaddr: ipv4 octet count should be 4");let y,m;for(y=0;y<d.length;y++)if(m=d[y],!(0<=m&&m<=255))throw new Error("ipaddr: ipv4 octet should fit in 8 bits");this.octets=d}return o(s,"IPv4"),s.prototype.SpecialRanges={unspecified:[[new s([0,0,0,0]),8]],broadcast:[[new s([255,255,255,255]),32]],multicast:[[new s([224,0,0,0]),4]],linkLocal:[[new s([169,254,0,0]),16]],loopback:[[new s([127,0,0,0]),8]],carrierGradeNat:[[new s([100,64,0,0]),10]],private:[[new s([10,0,0,0]),8],[new s([172,16,0,0]),12],[new s([192,168,0,0]),16]],reserved:[[new s([192,0,0,0]),24],[new s([192,0,2,0]),24],[new s([192,88,99,0]),24],[new s([198,18,0,0]),15],[new s([198,51,100,0]),24],[new s([203,0,113,0]),24],[new s([240,0,0,0]),4]],as112:[[new s([192,175,48,0]),24],[new s([192,31,196,0]),24]],amt:[[new s([192,52,193,0]),24]]},s.prototype.kind=function(){return"ipv4"},s.prototype.match=function(d,y){let m;if(y===void 0&&(m=d,d=m[0],y=m[1]),d.kind()!=="ipv4")throw new Error("ipaddr: cannot match ipv4 address with non-ipv4 one");return g(this.octets,d.octets,8,y)},s.prototype.prefixLengthFromSubnetMask=function(){let d=0,y=!1,m={0:8,128:7,192:6,224:5,240:4,248:3,252:2,254:1,255:0},v,P,M;for(v=3;v>=0;v-=1)if(P=this.octets[v],P in m){if(M=m[P],y&&M!==0)return null;M!==8&&(y=!0),d+=M}else return null;return 32-d},s.prototype.range=function(){return x.subnetMatch(this,this.SpecialRanges)},s.prototype.toByteArray=function(){return this.octets.slice(0)},s.prototype.toIPv4MappedAddress=function(){return x.IPv6.parse(`::ffff:${this.toString()}`)},s.prototype.toNormalizedString=function(){return this.toString()},s.prototype.toString=function(){return this.octets.join(".")},s}(),x.IPv4.broadcastAddressFromCIDR=function(s){try{let d=this.parseCIDR(s),y=d[0].toByteArray(),m=this.subnetMaskFromPrefixLength(d[1]).toByteArray(),v=[],P=0;for(;P<4;)v.push(parseInt(y[P],10)|parseInt(m[P],10)^255),P++;return new this(v)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},x.IPv4.isIPv4=function(s){return this.parser(s)!==null},x.IPv4.isValid=function(s){try{return new this(this.parser(s)),!0}catch{return!1}},x.IPv4.isValidCIDR=function(s){try{return this.parseCIDR(s),!0}catch{return!1}},x.IPv4.isValidFourPartDecimal=function(s){return!!(x.IPv4.isValid(s)&&s.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/))},x.IPv4.isValidCIDRFourPartDecimal=function(s){let d=s.match(/^(.+)\/(\d+)$/);return!x.IPv4.isValidCIDR(s)||!d?!1:x.IPv4.isValidFourPartDecimal(d[1])},x.IPv4.networkAddressFromCIDR=function(s){let d,y,m,v,P;try{for(d=this.parseCIDR(s),m=d[0].toByteArray(),P=this.subnetMaskFromPrefixLength(d[1]).toByteArray(),v=[],y=0;y<4;)v.push(parseInt(m[y],10)&parseInt(P[y],10)),y++;return new this(v)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},x.IPv4.parse=function(s){let d=this.parser(s);if(d===null)throw new Error("ipaddr: string is not formatted like an IPv4 Address");return new this(d)},x.IPv4.parseCIDR=function(s){let d;if(d=s.match(/^(.+)\/(\d+)$/)){let y=parseInt(d[2]);if(y>=0&&y<=32){let m=[this.parse(d[1]),y];return Object.defineProperty(m,"toString",{value:o(function(){return this.join("/")},"value")}),m}}throw new Error("ipaddr: string is not formatted like an IPv4 CIDR range")},x.IPv4.parser=function(s){let d,y,m;if(d=s.match(r.fourOctet))return function(){let v=d.slice(1,6),P=[];for(let M=0;M<v.length;M++)y=v[M],P.push(_(y));return P}();if(d=s.match(r.longValue)){if(m=_(d[1]),m>4294967295||m<0)throw new Error("ipaddr: address outside defined range");return function(){let v=[],P;for(P=0;P<=24;P+=8)v.push(m>>P&255);return v}().reverse()}else return(d=s.match(r.twoOctet))?function(){let v=d.slice(1,4),P=[];if(m=_(v[1]),m>16777215||m<0)throw new Error("ipaddr: address outside defined range");return P.push(_(v[0])),P.push(m>>16&255),P.push(m>>8&255),P.push(m&255),P}():(d=s.match(r.threeOctet))?function(){let v=d.slice(1,5),P=[];if(m=_(v[2]),m>65535||m<0)throw new Error("ipaddr: address outside defined range");return P.push(_(v[0])),P.push(_(v[1])),P.push(m>>8&255),P.push(m&255),P}():null},x.IPv4.subnetMaskFromPrefixLength=function(s){if(s=parseInt(s),s<0||s>32)throw new Error("ipaddr: invalid IPv4 prefix length");let d=[0,0,0,0],y=0,m=Math.floor(s/8);for(;y<m;)d[y]=255,y++;return m<4&&(d[m]=Math.pow(2,s%8)-1<<8-s%8),new this(d)},x.IPv6=function(){function s(d,y){let m,v;if(d.length===16)for(this.parts=[],m=0;m<=14;m+=2)this.parts.push(d[m]<<8|d[m+1]);else if(d.length===8)this.parts=d;else throw new Error("ipaddr: ipv6 part count should be 8 or 16");for(m=0;m<this.parts.length;m++)if(v=this.parts[m],!(0<=v&&v<=65535))throw new Error("ipaddr: ipv6 part should fit in 16 bits");y&&(this.zoneId=y)}return o(s,"IPv6"),s.prototype.SpecialRanges={unspecified:[new s([0,0,0,0,0,0,0,0]),128],linkLocal:[new s([65152,0,0,0,0,0,0,0]),10],multicast:[new s([65280,0,0,0,0,0,0,0]),8],loopback:[new s([0,0,0,0,0,0,0,1]),128],uniqueLocal:[new s([64512,0,0,0,0,0,0,0]),7],ipv4Mapped:[new s([0,0,0,0,0,65535,0,0]),96],discard:[new s([256,0,0,0,0,0,0,0]),64],rfc6145:[new s([0,0,0,0,65535,0,0,0]),96],rfc6052:[new s([100,65435,0,0,0,0,0,0]),96],"6to4":[new s([8194,0,0,0,0,0,0,0]),16],teredo:[new s([8193,0,0,0,0,0,0,0]),32],benchmarking:[new s([8193,2,0,0,0,0,0,0]),48],amt:[new s([8193,3,0,0,0,0,0,0]),32],as112v6:[[new s([8193,4,274,0,0,0,0,0]),48],[new s([9760,79,32768,0,0,0,0,0]),48]],deprecated:[new s([8193,16,0,0,0,0,0,0]),28],orchid2:[new s([8193,32,0,0,0,0,0,0]),28],droneRemoteIdProtocolEntityTags:[new s([8193,48,0,0,0,0,0,0]),28],reserved:[[new s([8193,0,0,0,0,0,0,0]),23],[new s([8193,3512,0,0,0,0,0,0]),32]]},s.prototype.isIPv4MappedAddress=function(){return this.range()==="ipv4Mapped"},s.prototype.kind=function(){return"ipv6"},s.prototype.match=function(d,y){let m;if(y===void 0&&(m=d,d=m[0],y=m[1]),d.kind()!=="ipv6")throw new Error("ipaddr: cannot match ipv6 address with non-ipv6 one");return g(this.parts,d.parts,16,y)},s.prototype.prefixLengthFromSubnetMask=function(){let d=0,y=!1,m={0:16,32768:15,49152:14,57344:13,61440:12,63488:11,64512:10,65024:9,65280:8,65408:7,65472:6,65504:5,65520:4,65528:3,65532:2,65534:1,65535:0},v,P;for(let M=7;M>=0;M-=1)if(v=this.parts[M],v in m){if(P=m[v],y&&P!==0)return null;P!==16&&(y=!0),d+=P}else return null;return 128-d},s.prototype.range=function(){return x.subnetMatch(this,this.SpecialRanges)},s.prototype.toByteArray=function(){let d,y=[],m=this.parts;for(let v=0;v<m.length;v++)d=m[v],y.push(d>>8),y.push(d&255);return y},s.prototype.toFixedLengthString=function(){let d=function(){let m=[];for(let v=0;v<this.parts.length;v++)m.push(T(this.parts[v].toString(16),4));return m}.call(this).join(":"),y="";return this.zoneId&&(y=`%${this.zoneId}`),d+y},s.prototype.toIPv4Address=function(){if(!this.isIPv4MappedAddress())throw new Error("ipaddr: trying to convert a generic ipv6 address to ipv4");let d=this.parts.slice(-2),y=d[0],m=d[1];return new x.IPv4([y>>8,y&255,m>>8,m&255])},s.prototype.toNormalizedString=function(){let d=function(){let m=[];for(let v=0;v<this.parts.length;v++)m.push(this.parts[v].toString(16));return m}.call(this).join(":"),y="";return this.zoneId&&(y=`%${this.zoneId}`),d+y},s.prototype.toRFC5952String=function(){let d=/((^|:)(0(:|$)){2,})/g,y=this.toNormalizedString(),m=0,v=-1,P;for(;P=d.exec(y);)P[0].length>v&&(m=P.index,v=P[0].length);return v<0?y:`${y.substring(0,m)}::${y.substring(m+v)}`},s.prototype.toString=function(){return this.toRFC5952String()},s}(),x.IPv6.broadcastAddressFromCIDR=function(s){try{let d=this.parseCIDR(s),y=d[0].toByteArray(),m=this.subnetMaskFromPrefixLength(d[1]).toByteArray(),v=[],P=0;for(;P<16;)v.push(parseInt(y[P],10)|parseInt(m[P],10)^255),P++;return new this(v)}catch(d){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${d})`)}},x.IPv6.isIPv6=function(s){return this.parser(s)!==null},x.IPv6.isValid=function(s){if(typeof s=="string"&&s.indexOf(":")===-1)return!1;try{let d=this.parser(s);return new this(d.parts,d.zoneId),!0}catch{return!1}},x.IPv6.isValidCIDR=function(s){if(typeof s=="string"&&s.indexOf(":")===-1)return!1;try{return this.parseCIDR(s),!0}catch{return!1}},x.IPv6.networkAddressFromCIDR=function(s){let d,y,m,v,P;try{for(d=this.parseCIDR(s),m=d[0].toByteArray(),P=this.subnetMaskFromPrefixLength(d[1]).toByteArray(),v=[],y=0;y<16;)v.push(parseInt(m[y],10)&parseInt(P[y],10)),y++;return new this(v)}catch(M){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${M})`)}},x.IPv6.parse=function(s){let d=this.parser(s);if(d.parts===null)throw new Error("ipaddr: string is not formatted like an IPv6 Address");return new this(d.parts,d.zoneId)},x.IPv6.parseCIDR=function(s){let d,y,m;if((y=s.match(/^(.+)\/(\d+)$/))&&(d=parseInt(y[2]),d>=0&&d<=128))return m=[this.parse(y[1]),d],Object.defineProperty(m,"toString",{value:o(function(){return this.join("/")},"value")}),m;throw new Error("ipaddr: string is not formatted like an IPv6 CIDR range")},x.IPv6.parser=function(s){let d,y,m,v,P,M;if(m=s.match(l.deprecatedTransitional))return this.parser(`::ffff:${m[1]}`);if(l.native.test(s))return f(s,8);if((m=s.match(l.transitional))&&(M=m[6]||"",d=m[1],m[1].endsWith("::")||(d=d.slice(0,-1)),d=f(d+M,6),d.parts)){for(P=[parseInt(m[2]),parseInt(m[3]),parseInt(m[4]),parseInt(m[5])],y=0;y<P.length;y++)if(v=P[y],!(0<=v&&v<=255))return null;return d.parts.push(P[0]<<8|P[1]),d.parts.push(P[2]<<8|P[3]),{parts:d.parts,zoneId:d.zoneId}}return null},x.IPv6.subnetMaskFromPrefixLength=function(s){if(s=parseInt(s),s<0||s>128)throw new Error("ipaddr: invalid IPv6 prefix length");let d=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],y=0,m=Math.floor(s/8);for(;y<m;)d[y]=255,y++;return m<16&&(d[m]=Math.pow(2,s%8)-1<<8-s%8),new this(d)},x.fromByteArray=function(s){let d=s.length;if(d===4)return new x.IPv4(s);if(d===16)return new x.IPv6(s);throw new Error("ipaddr: the binary input is neither an IPv6 nor IPv4 address")},x.isValid=function(s){return x.IPv6.isValid(s)||x.IPv4.isValid(s)},x.isValidCIDR=function(s){return x.IPv6.isValidCIDR(s)||x.IPv4.isValidCIDR(s)},x.parse=function(s){if(x.IPv6.isValid(s))return x.IPv6.parse(s);if(x.IPv4.isValid(s))return x.IPv4.parse(s);throw new Error("ipaddr: the address has neither IPv6 nor IPv4 format")},x.parseCIDR=function(s){try{return x.IPv6.parseCIDR(s)}catch{try{return x.IPv4.parseCIDR(s)}catch{throw new Error("ipaddr: the address has neither IPv6 nor IPv4 CIDR format")}}},x.process=function(s){let d=this.parse(s);return d.kind()==="ipv6"&&d.isIPv4MappedAddress()?d.toIPv4Address():d},x.subnetMatch=function(s,d,y){let m,v,P,M;y==null&&(y="unicast");for(v in d)if(Object.prototype.hasOwnProperty.call(d,v)){for(P=d[v],P[0]&&!(P[0]instanceof Array)&&(P=[P]),m=0;m<P.length;m++)if(M=P[m],s.kind()===M[0].kind()&&s.match.apply(s,M))return v}return y},typeof ar<"u"&&ar.exports?ar.exports=x:e.ipaddr=x})(Jo)});var qi=z((lA,Gi)=>{var Wi=require("stream").Stream,Ul=require("util");Gi.exports=be;function be(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}o(be,"DelayedStream");Ul.inherits(be,Wi);be.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(be.prototype,"readable",{configurable:!0,enumerable:!0,get:o(function(){return this.source.readable},"get")});be.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};be.prototype.resume=function(){this._released||this.release(),this.source.resume()};be.prototype.pause=function(){this.source.pause()};be.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(e){this.emit.apply(this,e)}.bind(this)),this._bufferedEvents=[]};be.prototype.pipe=function(){var e=Wi.prototype.pipe.apply(this,arguments);return this.resume(),e};be.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)};be.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 Yi=z((dA,Xi)=>{var Ml=require("util"),Ji=require("stream").Stream,Ki=qi();Xi.exports=ie;function ie(){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(ie,"CombinedStream");Ml.inherits(ie,Ji);ie.create=function(e){var t=new this;e=e||{};for(var r in e)t[r]=e[r];return t};ie.isStreamLike=function(e){return typeof e!="function"&&typeof e!="string"&&typeof e!="boolean"&&typeof e!="number"&&!Buffer.isBuffer(e)};ie.prototype.append=function(e){var t=ie.isStreamLike(e);if(t){if(!(e instanceof Ki)){var r=Ki.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};ie.prototype.pipe=function(e,t){return Ji.prototype.pipe.call(this,e,t),this.resume(),e};ie.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}};ie.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=ie.isStreamLike(r);n&&(r.on("data",this._checkDataSize.bind(this)),this._handleErrors(r)),this._pipeNext(r)}.bind(this))};ie.prototype._pipeNext=function(e){this._currentStream=e;var t=ie.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()};ie.prototype._handleErrors=function(e){var t=this;e.on("error",function(r){t._emitError(r)})};ie.prototype.write=function(e){this.emit("data",e)};ie.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"))};ie.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")};ie.prototype.end=function(){this._reset(),this.emit("end")};ie.prototype.destroy=function(){this._reset(),this.emit("close")};ie.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};ie.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(e))}};ie.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)};ie.prototype._emitError=function(e){this._reset(),this.emit("error",e)}});var ea=z((fA,Qi)=>{"use strict";Qi.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 na=z(ye=>{"use strict";var mr=ea(),jl=require("path").extname,ta=/^\s*([^;\s]*)(?:;|\s|$)/,Ll=/^text\//i;ye.charset=ra;ye.charsets={lookup:ra};ye.contentType=Fl;ye.extension=Bl;ye.extensions=Object.create(null);ye.lookup=Vl;ye.types=Object.create(null);Zl(ye.extensions,ye.types);function ra(e){if(!e||typeof e!="string")return!1;var t=ta.exec(e),r=t&&mr[t[1].toLowerCase()];return r&&r.charset?r.charset:t&&Ll.test(t[1])?"UTF-8":!1}o(ra,"charset");function Fl(e){if(!e||typeof e!="string")return!1;var t=e.indexOf("/")===-1?ye.lookup(e):e;if(!t)return!1;if(t.indexOf("charset")===-1){var r=ye.charset(t);r&&(t+="; charset="+r.toLowerCase())}return t}o(Fl,"contentType");function Bl(e){if(!e||typeof e!="string")return!1;var t=ta.exec(e),r=t&&ye.extensions[t[1].toLowerCase()];return!r||!r.length?!1:r[0]}o(Bl,"extension");function Vl(e){if(!e||typeof e!="string")return!1;var t=jl("x."+e).toLowerCase().substr(1);return t&&ye.types[t]||!1}o(Vl,"lookup");function Zl(e,t){var r=["nginx","apache",void 0,"iana"];Object.keys(mr).forEach(o(function(i){var u=mr[i],c=u.extensions;if(!(!c||!c.length)){e[i]=c;for(var l=0;l<c.length;l++){var f=c[l];if(t[f]){var g=r.indexOf(mr[t[f]].source),_=r.indexOf(u.source);if(t[f]!=="application/octet-stream"&&(g>_||g===_&&t[f].substr(0,12)==="application/"))continue}t[f]=i}}},"forEachMimeType"))}o(Zl,"populateMaps")});var ia=z((hA,oa)=>{oa.exports=Hl;function Hl(e){var t=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;t?t(e):setTimeout(e,0)}o(Hl,"defer")});var ln=z((xA,sa)=>{var aa=ia();sa.exports=Wl;function Wl(e){var t=!1;return aa(function(){t=!0}),o(function(n,i){t?e(n,i):aa(o(function(){e(n,i)},"nextTick_callback"))},"async_callback")}o(Wl,"async")});var pn=z((PA,ua)=>{ua.exports=Gl;function Gl(e){Object.keys(e.jobs).forEach(ql.bind(e)),e.jobs={}}o(Gl,"abort");function ql(e){typeof this.jobs[e]=="function"&&this.jobs[e]()}o(ql,"clean")});var dn=z((IA,la)=>{var ca=ln(),Kl=pn();la.exports=Jl;function Jl(e,t,r,n){var i=r.keyedList?r.keyedList[r.index]:r.index;r.jobs[i]=Xl(t,i,e[i],function(u,c){i in r.jobs&&(delete r.jobs[i],u?Kl(r):r.results[i]=c,n(u,r.results))})}o(Jl,"iterate");function Xl(e,t,r,n){var i;return e.length==2?i=e(r,ca(n)):i=e(r,t,ca(n)),i}o(Xl,"runJob")});var mn=z(($A,pa)=>{pa.exports=Yl;function Yl(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(Yl,"state")});var fn=z((SA,da)=>{var Ql=pn(),ep=ln();da.exports=tp;function tp(e){Object.keys(this.jobs).length&&(this.index=this.size,Ql(this),ep(e)(null,this.results))}o(tp,"terminator")});var fa=z((zA,ma)=>{var rp=dn(),np=mn(),op=fn();ma.exports=ip;function ip(e,t,r){for(var n=np(e);n.index<(n.keyedList||e).length;)rp(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 op.bind(n,r)}o(ip,"parallel")});var gn=z((wA,fr)=>{var ga=dn(),ap=mn(),sp=fn();fr.exports=up;fr.exports.ascending=ya;fr.exports.descending=cp;function up(e,t,r,n){var i=ap(e,r);return ga(e,t,i,o(function u(c,l){if(c){n(c,l);return}if(i.index++,i.index<(i.keyedList||e).length){ga(e,t,i,u);return}n(null,i.results)},"iteratorHandler")),sp.bind(i,n)}o(up,"serialOrdered");function ya(e,t){return e<t?-1:e>t?1:0}o(ya,"ascending");function cp(e,t){return-1*ya(e,t)}o(cp,"descending")});var va=z((RA,ha)=>{var lp=gn();ha.exports=pp;function pp(e,t,r){return lp(e,t,null,r)}o(pp,"serial")});var _a=z((NA,xa)=>{xa.exports={parallel:fa(),serial:va(),serialOrdered:gn()}});var yn=z((CA,Pa)=>{"use strict";Pa.exports=Object});var Ia=z((UA,ba)=>{"use strict";ba.exports=Error});var $a=z((MA,Ta)=>{"use strict";Ta.exports=EvalError});var Sa=z((jA,Ea)=>{"use strict";Ea.exports=RangeError});var za=z((LA,Aa)=>{"use strict";Aa.exports=ReferenceError});var wa=z((FA,ka)=>{"use strict";ka.exports=SyntaxError});var gr=z((BA,Oa)=>{"use strict";Oa.exports=TypeError});var Da=z((VA,Ra)=>{"use strict";Ra.exports=URIError});var Ca=z((ZA,Na)=>{"use strict";Na.exports=Math.abs});var Ma=z((HA,Ua)=>{"use strict";Ua.exports=Math.floor});var La=z((WA,ja)=>{"use strict";ja.exports=Math.max});var Ba=z((GA,Fa)=>{"use strict";Fa.exports=Math.min});var Za=z((qA,Va)=>{"use strict";Va.exports=Math.pow});var Wa=z((KA,Ha)=>{"use strict";Ha.exports=Math.round});var qa=z((JA,Ga)=>{"use strict";Ga.exports=Number.isNaN||o(function(t){return t!==t},"isNaN")});var Ja=z((YA,Ka)=>{"use strict";var dp=qa();Ka.exports=o(function(t){return dp(t)||t===0?t:t<0?-1:1},"sign")});var Ya=z((ez,Xa)=>{"use strict";Xa.exports=Object.getOwnPropertyDescriptor});var hn=z((tz,Qa)=>{"use strict";var yr=Ya();if(yr)try{yr([],"length")}catch{yr=null}Qa.exports=yr});var ts=z((rz,es)=>{"use strict";var hr=Object.defineProperty||!1;if(hr)try{hr({},"a",{value:1})}catch{hr=!1}es.exports=hr});var vn=z((nz,rs)=>{"use strict";rs.exports=o(function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;t[r]=i;for(var u in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var c=Object.getOwnPropertySymbols(t);if(c.length!==1||c[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var l=Object.getOwnPropertyDescriptor(t,r);if(l.value!==i||l.enumerable!==!0)return!1}return!0},"hasSymbols")});var is=z((iz,os)=>{"use strict";var ns=typeof Symbol<"u"&&Symbol,mp=vn();os.exports=o(function(){return typeof ns!="function"||typeof Symbol!="function"||typeof ns("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:mp()},"hasNativeSymbols")});var xn=z((sz,as)=>{"use strict";as.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var _n=z((uz,ss)=>{"use strict";var fp=yn();ss.exports=fp.getPrototypeOf||null});var ls=z((cz,cs)=>{"use strict";var gp="Function.prototype.bind called on incompatible ",yp=Object.prototype.toString,hp=Math.max,vp="[object Function]",us=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"),xp=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"),_p=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");cs.exports=o(function(t){var r=this;if(typeof r!="function"||yp.apply(r)!==vp)throw new TypeError(gp+r);for(var n=xp(arguments,1),i,u=o(function(){if(this instanceof i){var _=r.apply(this,us(n,arguments));return Object(_)===_?_:this}return r.apply(t,us(n,arguments))},"binder"),c=hp(0,r.length-n.length),l=[],f=0;f<c;f++)l[f]="$"+f;if(i=Function("binder","return function ("+_p(l,",")+"){ return binder.apply(this,arguments); }")(u),r.prototype){var g=o(function(){},"Empty");g.prototype=r.prototype,i.prototype=new g,g.prototype=null}return i},"bind")});var ut=z((pz,ps)=>{"use strict";var Pp=ls();ps.exports=Function.prototype.bind||Pp});var vr=z((dz,ds)=>{"use strict";ds.exports=Function.prototype.call});var Pn=z((mz,ms)=>{"use strict";ms.exports=Function.prototype.apply});var gs=z((fz,fs)=>{"use strict";fs.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var hs=z((gz,ys)=>{"use strict";var bp=ut(),Ip=Pn(),Tp=vr(),$p=gs();ys.exports=$p||bp.call(Tp,Ip)});var xs=z((yz,vs)=>{"use strict";var Ep=ut(),Sp=gr(),Ap=vr(),zp=hs();vs.exports=o(function(t){if(t.length<1||typeof t[0]!="function")throw new Sp("a function is required");return zp(Ep,Ap,t)},"callBindBasic")});var $s=z((vz,Ts)=>{"use strict";var kp=xs(),_s=hn(),bs;try{bs=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!="object"||!("code"in e)||e.code!=="ERR_PROTO_ACCESS")throw e}var bn=!!bs&&_s&&_s(Object.prototype,"__proto__"),Is=Object,Ps=Is.getPrototypeOf;Ts.exports=bn&&typeof bn.get=="function"?kp([bn.get]):typeof Ps=="function"?o(function(t){return Ps(t==null?t:Is(t))},"getDunder"):!1});var ks=z((_z,zs)=>{"use strict";var Es=xn(),Ss=_n(),As=$s();zs.exports=Es?o(function(t){return Es(t)},"getProto"):Ss?o(function(t){if(!t||typeof t!="object"&&typeof t!="function")throw new TypeError("getProto: not an object");return Ss(t)},"getProto"):As?o(function(t){return As(t)},"getProto"):null});var In=z((bz,ws)=>{"use strict";var wp=Function.prototype.call,Op=Object.prototype.hasOwnProperty,Rp=ut();ws.exports=Rp.call(wp,Op)});var Ms=z((Iz,Us)=>{"use strict";var G,Dp=yn(),Np=Ia(),Cp=$a(),Up=Sa(),Mp=za(),dt=wa(),pt=gr(),jp=Da(),Lp=Ca(),Fp=Ma(),Bp=La(),Vp=Ba(),Zp=Za(),Hp=Wa(),Wp=Ja(),Ns=Function,Tn=o(function(e){try{return Ns('"use strict"; return ('+e+").constructor;")()}catch{}},"getEvalledConstructor"),Ct=hn(),Gp=ts(),$n=o(function(){throw new pt},"throwTypeError"),qp=Ct?function(){try{return arguments.callee,$n}catch{try{return Ct(arguments,"callee").get}catch{return $n}}}():$n,ct=is()(),le=ks(),Kp=_n(),Jp=xn(),Cs=Pn(),Ut=vr(),lt={},Xp=typeof Uint8Array>"u"||!le?G:le(Uint8Array),qe={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?G:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?G:ArrayBuffer,"%ArrayIteratorPrototype%":ct&&le?le([][Symbol.iterator]()):G,"%AsyncFromSyncIteratorPrototype%":G,"%AsyncFunction%":lt,"%AsyncGenerator%":lt,"%AsyncGeneratorFunction%":lt,"%AsyncIteratorPrototype%":lt,"%Atomics%":typeof Atomics>"u"?G:Atomics,"%BigInt%":typeof BigInt>"u"?G:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?G:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?G:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?G:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Np,"%eval%":eval,"%EvalError%":Cp,"%Float16Array%":typeof Float16Array>"u"?G:Float16Array,"%Float32Array%":typeof Float32Array>"u"?G:Float32Array,"%Float64Array%":typeof Float64Array>"u"?G:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?G:FinalizationRegistry,"%Function%":Ns,"%GeneratorFunction%":lt,"%Int8Array%":typeof Int8Array>"u"?G:Int8Array,"%Int16Array%":typeof Int16Array>"u"?G:Int16Array,"%Int32Array%":typeof Int32Array>"u"?G:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":ct&&le?le(le([][Symbol.iterator]())):G,"%JSON%":typeof JSON=="object"?JSON:G,"%Map%":typeof Map>"u"?G:Map,"%MapIteratorPrototype%":typeof Map>"u"||!ct||!le?G:le(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Dp,"%Object.getOwnPropertyDescriptor%":Ct,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?G:Promise,"%Proxy%":typeof Proxy>"u"?G:Proxy,"%RangeError%":Up,"%ReferenceError%":Mp,"%Reflect%":typeof Reflect>"u"?G:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?G:Set,"%SetIteratorPrototype%":typeof Set>"u"||!ct||!le?G:le(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?G:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":ct&&le?le(""[Symbol.iterator]()):G,"%Symbol%":ct?Symbol:G,"%SyntaxError%":dt,"%ThrowTypeError%":qp,"%TypedArray%":Xp,"%TypeError%":pt,"%Uint8Array%":typeof Uint8Array>"u"?G:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?G:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?G:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?G:Uint32Array,"%URIError%":jp,"%WeakMap%":typeof WeakMap>"u"?G:WeakMap,"%WeakRef%":typeof WeakRef>"u"?G:WeakRef,"%WeakSet%":typeof WeakSet>"u"?G:WeakSet,"%Function.prototype.call%":Ut,"%Function.prototype.apply%":Cs,"%Object.defineProperty%":Gp,"%Object.getPrototypeOf%":Kp,"%Math.abs%":Lp,"%Math.floor%":Fp,"%Math.max%":Bp,"%Math.min%":Vp,"%Math.pow%":Zp,"%Math.round%":Hp,"%Math.sign%":Wp,"%Reflect.getPrototypeOf%":Jp};if(le)try{null.error}catch(e){Os=le(le(e)),qe["%Error.prototype%"]=Os}var Os,Yp=o(function e(t){var r;if(t==="%AsyncFunction%")r=Tn("async function () {}");else if(t==="%GeneratorFunction%")r=Tn("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=Tn("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&le&&(r=le(i.prototype))}return qe[t]=r,r},"doEval"),Rs={__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"]},Mt=ut(),xr=In(),Qp=Mt.call(Ut,Array.prototype.concat),ed=Mt.call(Cs,Array.prototype.splice),Ds=Mt.call(Ut,String.prototype.replace),_r=Mt.call(Ut,String.prototype.slice),td=Mt.call(Ut,RegExp.prototype.exec),rd=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,nd=/\\(\\)?/g,od=o(function(t){var r=_r(t,0,1),n=_r(t,-1);if(r==="%"&&n!=="%")throw new dt("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new dt("invalid intrinsic syntax, expected opening `%`");var i=[];return Ds(t,rd,function(u,c,l,f){i[i.length]=l?Ds(f,nd,"$1"):c||u}),i},"stringToPath"),id=o(function(t,r){var n=t,i;if(xr(Rs,n)&&(i=Rs[n],n="%"+i[0]+"%"),xr(qe,n)){var u=qe[n];if(u===lt&&(u=Yp(n)),typeof u>"u"&&!r)throw new pt("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:u}}throw new dt("intrinsic "+t+" does not exist!")},"getBaseIntrinsic");Us.exports=o(function(t,r){if(typeof t!="string"||t.length===0)throw new pt("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new pt('"allowMissing" argument must be a boolean');if(td(/^%?[^%]*%?$/,t)===null)throw new dt("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=od(t),i=n.length>0?n[0]:"",u=id("%"+i+"%",r),c=u.name,l=u.value,f=!1,g=u.alias;g&&(i=g[0],ed(n,Qp([0,1],g)));for(var _=1,T=!0;_<n.length;_+=1){var x=n[_],s=_r(x,0,1),d=_r(x,-1);if((s==='"'||s==="'"||s==="`"||d==='"'||d==="'"||d==="`")&&s!==d)throw new dt("property names with quotes must have matching quotes");if((x==="constructor"||!T)&&(f=!0),i+="."+x,c="%"+i+"%",xr(qe,c))l=qe[c];else if(l!=null){if(!(x in l)){if(!r)throw new pt("base intrinsic for "+t+" exists, but the property is not available.");return}if(Ct&&_+1>=n.length){var y=Ct(l,x);T=!!y,T&&"get"in y&&!("originalValue"in y.get)?l=y.get:l=l[x]}else T=xr(l,x),l=l[x];T&&!f&&(qe[c]=l)}}return l},"GetIntrinsic")});var Ls=z(($z,js)=>{"use strict";var ad=vn();js.exports=o(function(){return ad()&&!!Symbol.toStringTag},"hasToStringTagShams")});var Vs=z((Sz,Bs)=>{"use strict";var sd=Ms(),Fs=sd("%Object.defineProperty%",!0),ud=Ls()(),cd=In(),ld=gr(),Pr=ud?Symbol.toStringTag:null;Bs.exports=o(function(t,r){var n=arguments.length>2&&!!arguments[2]&&arguments[2].force,i=arguments.length>2&&!!arguments[2]&&arguments[2].nonConfigurable;if(typeof n<"u"&&typeof n!="boolean"||typeof i<"u"&&typeof i!="boolean")throw new ld("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");Pr&&(n||!cd(t,Pr))&&(Fs?Fs(t,Pr,{configurable:!i,enumerable:!1,value:r,writable:!1}):t[Pr]=r)},"setToStringTag")});var Hs=z((zz,Zs)=>{"use strict";var pd=Function.prototype.call,dd=Object.prototype.hasOwnProperty,md=ut();Zs.exports=md.call(pd,dd)});var Gs=z((kz,Ws)=>{"use strict";Ws.exports=function(e,t){return Object.keys(t).forEach(function(r){e[r]=e[r]||t[r]}),e}});var Js=z((wz,Ks)=>{"use strict";var zn=Yi(),fd=require("util"),En=require("path"),gd=require("http"),yd=require("https"),hd=require("url").parse,vd=require("fs"),xd=require("stream").Stream,_d=require("crypto"),Sn=na(),Pd=_a(),bd=Vs(),Fe=Hs(),An=Gs();function qs(e){return String(e).replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/"/g,"%22")}o(qs,"escapeHeaderParam");function K(e){if(!(this instanceof K))return new K(e);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],zn.call(this),e=e||{};for(var t in e)this[t]=e[t]}o(K,"FormData");fd.inherits(K,zn);K.LINE_BREAK=`\r
2
+ `;K.DEFAULT_CONTENT_TYPE="application/octet-stream";K.prototype.append=function(e,t,r){r=r||{},typeof r=="string"&&(r={filename:r});var n=zn.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)};K.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)+K.LINE_BREAK.length,!(!t||!t.path&&!(t.readable&&Fe(t,"httpVersion"))&&!(t instanceof xd))&&(r.knownLength||this._valuesToMeasure.push(t))};K.prototype._lengthRetriever=function(e,t){Fe(e,"fd")?e.end!=null&&e.end!=1/0&&e.start!=null?t(null,e.end+1-(e.start?e.start:0)):vd.stat(e.path,function(r,n){if(r){t(r);return}var i=n.size-(e.start?e.start:0);t(null,i)}):Fe(e,"httpVersion")?t(null,Number(e.headers["content-length"])):Fe(e,"httpModule")?(e.on("response",function(r){e.pause(),t(null,Number(r.headers["content-length"]))}),e.resume()):t("Unknown stream")};K.prototype._multiPartHeader=function(e,t,r){if(typeof r.header=="string")return r.header;var n=this._getContentDisposition(t,r),i=this._getContentType(t,r),u="",c={"Content-Disposition":["form-data",'name="'+qs(e)+'"'].concat(n||[]),"Content-Type":[].concat(i||[])};typeof r.header=="object"&&An(c,r.header);var l;for(var f in c)if(Fe(c,f)){if(l=c[f],l==null)continue;Array.isArray(l)||(l=[l]),l.length&&(u+=f+": "+l.join("; ")+K.LINE_BREAK)}return"--"+this.getBoundary()+K.LINE_BREAK+u+K.LINE_BREAK};K.prototype._getContentDisposition=function(e,t){var r;if(typeof t.filepath=="string"?r=En.normalize(t.filepath).replace(/\\/g,"/"):t.filename||e&&(e.name||e.path)?r=En.basename(t.filename||e&&(e.name||e.path)):e&&e.readable&&Fe(e,"httpVersion")&&(r=En.basename(e.client._httpMessage.path||"")),r)return'filename="'+qs(r)+'"'};K.prototype._getContentType=function(e,t){var r=t.contentType;return!r&&e&&e.name&&(r=Sn.lookup(e.name)),!r&&e&&e.path&&(r=Sn.lookup(e.path)),!r&&e&&e.readable&&Fe(e,"httpVersion")&&(r=e.headers["content-type"]),!r&&(t.filepath||t.filename)&&(r=Sn.lookup(t.filepath||t.filename)),!r&&e&&typeof e=="object"&&(r=K.DEFAULT_CONTENT_TYPE),r};K.prototype._multiPartFooter=function(){return function(e){var t=K.LINE_BREAK,r=this._streams.length===0;r&&(t+=this._lastBoundary()),e(t)}.bind(this)};K.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+K.LINE_BREAK};K.prototype.getHeaders=function(e){var t,r={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in e)Fe(e,t)&&(r[t.toLowerCase()]=e[t]);return r};K.prototype.setBoundary=function(e){if(typeof e!="string")throw new TypeError("FormData boundary must be a string");this._boundary=e};K.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};K.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(K.LINE_BREAK)])));return Buffer.concat([e,Buffer.from(this._lastBoundary())])};K.prototype._generateBoundary=function(){this._boundary="--------------------------"+_d.randomBytes(12).toString("hex")};K.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};K.prototype.hasKnownLength=function(){var e=!0;return this._valuesToMeasure.length&&(e=!1),e};K.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}Pd.parallel(this._valuesToMeasure,this._lengthRetriever,function(r,n){if(r){e(r);return}n.forEach(function(i){t+=i}),e(null,t)})};K.prototype.submit=function(e,t){var r,n,i={method:"post"};return typeof e=="string"?(e=hd(e),n=An({port:e.port,path:e.pathname,host:e.hostname,protocol:e.protocol},i)):(n=An(e,i),n.port||(n.port=n.protocol==="https:"?443:80)),n.headers=this.getHeaders(e.headers),n.protocol==="https:"?r=yd.request(n):r=gd.request(n),this.getLength(function(u,c){if(u&&u!=="Unknown stream"){this._error(u);return}if(c&&r.setHeader("Content-Length",c),this.pipe(r),t){var l,f=o(function(g,_){return r.removeListener("error",f),r.removeListener("response",l),t.call(this,g,_)},"callback");l=f.bind(this,null),r.on("error",f),r.on("response",l)}}.bind(this)),r};K.prototype._error=function(e){this.error||(this.error=e,this.pause(),this.emit("error",e))};K.prototype.toString=function(){return"[object FormData]"};bd(K.prototype,"FormData");Ks.exports=K});var eu=z((kn,wn)=>{(function(e,t){typeof kn=="object"&&typeof wn<"u"?wn.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs=t()})(kn,function(){"use strict";var e=1e3,t=6e4,r=36e5,n="millisecond",i="second",u="minute",c="hour",l="day",f="week",g="month",_="quarter",T="year",x="date",s="Invalid Date",d=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,m={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:o(function(w){var I=["th","st","nd","rd"],b=w%100;return"["+w+(I[(b-20)%10]||I[b]||I[0])+"]"},"ordinal")},v=o(function(w,I,b){var E=String(w);return!E||E.length>=I?w:""+Array(I+1-E.length).join(b)+w},"m"),P={s:v,z:o(function(w){var I=-w.utcOffset(),b=Math.abs(I),E=Math.floor(b/60),$=b%60;return(I<=0?"+":"-")+v(E,2,"0")+":"+v($,2,"0")},"z"),m:o(function w(I,b){if(I.date()<b.date())return-w(b,I);var E=12*(b.year()-I.year())+(b.month()-I.month()),$=I.clone().add(E,g),B=b-$<0,V=I.clone().add(E+(B?-1:1),g);return+(-(E+(b-$)/(B?$-V:V-$))||0)},"t"),a:o(function(w){return w<0?Math.ceil(w)||0:Math.floor(w)},"a"),p:o(function(w){return{M:g,y:T,w:f,d:l,D:x,h:c,m:u,s:i,ms:n,Q:_}[w]||String(w||"").toLowerCase().replace(/s$/,"")},"p"),u:o(function(w){return w===void 0},"u")},M="en",ee={};ee[M]=m;var q=o(function(w){return w instanceof Oe},"p"),me=o(function w(I,b,E){var $;if(!I)return M;if(typeof I=="string"){var B=I.toLowerCase();ee[B]&&($=B),b&&(ee[B]=b,$=B);var V=I.split("-");if(!$&&V.length>1)return w(V[0])}else{var Q=I.name;ee[Q]=I,$=Q}return!E&&$&&(M=$),$||!E&&M},"t"),X=o(function(w,I){if(q(w))return w.clone();var b=typeof I=="object"?I:{};return b.date=w,b.args=arguments,new Oe(b)},"w"),F=P;F.l=me,F.i=q,F.w=function(w,I){return X(w,{locale:I.$L,utc:I.$u,x:I.$x,$offset:I.$offset})};var Oe=function(){function w(b){this.$L=me(b.locale,null,!0),this.parse(b)}o(w,"M");var I=w.prototype;return I.parse=function(b){this.$d=function(E){var $=E.date,B=E.utc;if($===null)return new Date(NaN);if(F.u($))return new Date;if($ instanceof Date)return new Date($);if(typeof $=="string"&&!/Z$/i.test($)){var V=$.match(d);if(V){var Q=V[2]-1||0,ae=(V[7]||"0").substring(0,3);return B?new Date(Date.UTC(V[1],Q,V[3]||1,V[4]||0,V[5]||0,V[6]||0,ae)):new Date(V[1],Q,V[3]||1,V[4]||0,V[5]||0,V[6]||0,ae)}}return new Date($)}(b),this.$x=b.x||{},this.init()},I.init=function(){var b=this.$d;this.$y=b.getFullYear(),this.$M=b.getMonth(),this.$D=b.getDate(),this.$W=b.getDay(),this.$H=b.getHours(),this.$m=b.getMinutes(),this.$s=b.getSeconds(),this.$ms=b.getMilliseconds()},I.$utils=function(){return F},I.isValid=function(){return this.$d.toString()!==s},I.isSame=function(b,E){var $=X(b);return this.startOf(E)<=$&&$<=this.endOf(E)},I.isAfter=function(b,E){return X(b)<this.startOf(E)},I.isBefore=function(b,E){return this.endOf(E)<X(b)},I.$g=function(b,E,$){return F.u(b)?this[E]:this.set($,b)},I.unix=function(){return Math.floor(this.valueOf()/1e3)},I.valueOf=function(){return this.$d.getTime()},I.startOf=function(b,E){var $=this,B=!!F.u(E)||E,V=F.p(b),Q=o(function(Ve,ge){var Re=F.w($.$u?Date.UTC($.$y,ge,Ve):new Date($.$y,ge,Ve),$);return B?Re:Re.endOf(l)},"l"),ae=o(function(Ve,ge){return F.w($.toDate()[Ve].apply($.toDate("s"),(B?[0,0,0,0]:[23,59,59,999]).slice(ge)),$)},"$"),ce=this.$W,de=this.$M,xe=this.$D,Xe="set"+(this.$u?"UTC":"");switch(V){case T:return B?Q(1,0):Q(31,11);case g:return B?Q(1,de):Q(0,de+1);case f:var Be=this.$locale().weekStart||0,mt=(ce<Be?ce+7:ce)-Be;return Q(B?xe-mt:xe+(6-mt),de);case l:case x:return ae(Xe+"Hours",0);case c:return ae(Xe+"Minutes",1);case u:return ae(Xe+"Seconds",2);case i:return ae(Xe+"Milliseconds",3);default:return this.clone()}},I.endOf=function(b){return this.startOf(b,!1)},I.$set=function(b,E){var $,B=F.p(b),V="set"+(this.$u?"UTC":""),Q=($={},$[l]=V+"Date",$[x]=V+"Date",$[g]=V+"Month",$[T]=V+"FullYear",$[c]=V+"Hours",$[u]=V+"Minutes",$[i]=V+"Seconds",$[n]=V+"Milliseconds",$)[B],ae=B===l?this.$D+(E-this.$W):E;if(B===g||B===T){var ce=this.clone().set(x,1);ce.$d[Q](ae),ce.init(),this.$d=ce.set(x,Math.min(this.$D,ce.daysInMonth())).$d}else Q&&this.$d[Q](ae);return this.init(),this},I.set=function(b,E){return this.clone().$set(b,E)},I.get=function(b){return this[F.p(b)]()},I.add=function(b,E){var $,B=this;b=Number(b);var V=F.p(E),Q=o(function(de){var xe=X(B);return F.w(xe.date(xe.date()+Math.round(de*b)),B)},"y");if(V===g)return this.set(g,this.$M+b);if(V===T)return this.set(T,this.$y+b);if(V===l)return Q(1);if(V===f)return Q(7);var ae=($={},$[u]=t,$[c]=r,$[i]=e,$)[V]||1,ce=this.$d.getTime()+b*ae;return F.w(ce,this)},I.subtract=function(b,E){return this.add(-1*b,E)},I.format=function(b){var E=this,$=this.$locale();if(!this.isValid())return $.invalidDate||s;var B=b||"YYYY-MM-DDTHH:mm:ssZ",V=F.z(this),Q=this.$H,ae=this.$m,ce=this.$M,de=$.weekdays,xe=$.months,Xe=$.meridiem,Be=o(function(ge,Re,ft,Lt){return ge&&(ge[Re]||ge(E,B))||ft[Re].slice(0,Lt)},"h"),mt=o(function(ge){return F.s(Q%12||12,ge,"0")},"d"),Ve=Xe||function(ge,Re,ft){var Lt=ge<12?"AM":"PM";return ft?Lt.toLowerCase():Lt};return B.replace(y,function(ge,Re){return Re||function(ft){switch(ft){case"YY":return String(E.$y).slice(-2);case"YYYY":return F.s(E.$y,4,"0");case"M":return ce+1;case"MM":return F.s(ce+1,2,"0");case"MMM":return Be($.monthsShort,ce,xe,3);case"MMMM":return Be(xe,ce);case"D":return E.$D;case"DD":return F.s(E.$D,2,"0");case"d":return String(E.$W);case"dd":return Be($.weekdaysMin,E.$W,de,2);case"ddd":return Be($.weekdaysShort,E.$W,de,3);case"dddd":return de[E.$W];case"H":return String(Q);case"HH":return F.s(Q,2,"0");case"h":return mt(1);case"hh":return mt(2);case"a":return Ve(Q,ae,!0);case"A":return Ve(Q,ae,!1);case"m":return String(ae);case"mm":return F.s(ae,2,"0");case"s":return String(E.$s);case"ss":return F.s(E.$s,2,"0");case"SSS":return F.s(E.$ms,3,"0");case"Z":return V}return null}(ge)||V.replace(":","")})},I.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},I.diff=function(b,E,$){var B,V=this,Q=F.p(E),ae=X(b),ce=(ae.utcOffset()-this.utcOffset())*t,de=this-ae,xe=o(function(){return F.m(V,ae)},"D");switch(Q){case T:B=xe()/12;break;case g:B=xe();break;case _:B=xe()/3;break;case f:B=(de-ce)/6048e5;break;case l:B=(de-ce)/864e5;break;case c:B=de/r;break;case u:B=de/t;break;case i:B=de/e;break;default:B=de}return $?B:F.a(B)},I.daysInMonth=function(){return this.endOf(g).$D},I.$locale=function(){return ee[this.$L]},I.locale=function(b,E){if(!b)return this.$L;var $=this.clone(),B=me(b,E,!0);return B&&($.$L=B),$},I.clone=function(){return F.w(this.$d,this)},I.toDate=function(){return new Date(this.valueOf())},I.toJSON=function(){return this.isValid()?this.toISOString():null},I.toISOString=function(){return this.$d.toISOString()},I.toString=function(){return this.$d.toUTCString()},w}(),$e=Oe.prototype;return X.prototype=$e,[["$ms",n],["$s",i],["$m",u],["$H",c],["$W",l],["$M",g],["$y",T],["$D",x]].forEach(function(w){$e[w[1]]=function(I){return this.$g(I,w[0],w[1])}}),X.extend=function(w,I){return w.$i||(w(I,Oe,X),w.$i=!0),X},X.locale=me,X.isDayjs=q,X.unix=function(w){return X(1e3*w)},X.en=ee[M],X.Ls=ee,X.p={},X})});var Rd={};On(Rd,{presentation:()=>Od});module.exports=uu(Rd);var cu=Object.freeze({status:"aborted"});function S(e,t,r){function n(l,f){if(l._zod||Object.defineProperty(l,"_zod",{value:{def:f,constr:c,traits:new Set},enumerable:!1}),l._zod.traits.has(e))return;l._zod.traits.add(e),t(l,f);let g=c.prototype,_=Object.keys(g);for(let T=0;T<_.length;T++){let x=_[T];x in l||(l[x]=g[x].bind(l))}}o(n,"init");let i=r?.Parent??Object;class u extends i{static{o(this,"Definition")}}Object.defineProperty(u,"name",{value:e});function c(l){var f;let g=r?.Parent?new u:this;n(g,l),(f=g._zod).deferred??(f.deferred=[]);for(let _ of g._zod.deferred)_();return g}return o(c,"_"),Object.defineProperty(c,"init",{value:n}),Object.defineProperty(c,Symbol.hasInstance,{value:o(l=>r?.Parent&&l instanceof r.Parent?!0:l?._zod?.traits?.has(e),"value")}),Object.defineProperty(c,"name",{value:e}),c}o(S,"$constructor");var lu=Symbol("zod_brand"),Ie=class extends Error{static{o(this,"$ZodAsyncError")}constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Ft=class extends Error{static{o(this,"$ZodEncodeError")}constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}},Ir={};function Ee(e){return e&&Object.assign(Ir,e),Ir}o(Ee,"config");function $r(e){let t=Object.values(e).filter(n=>typeof n=="number");return Object.entries(e).filter(([n,i])=>t.indexOf(+n)===-1).map(([n,i])=>i)}o($r,"getEnumValues");function Nn(e,t){return typeof t=="bigint"?t.toString():t}o(Nn,"jsonStringifyReplacer");function Vt(e){return{get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}o(Vt,"cached");function Cn(e){return e==null}o(Cn,"nullish");function Zt(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}o(Zt,"cleanRegex");var Dn=Symbol("evaluating");function se(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==Dn)return n===void 0&&(n=Dn,n=r()),n},set(i){Object.defineProperty(e,t,{value:i})},configurable:!0})}o(se,"defineLazy");var Er="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function yt(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}o(yt,"isObject");var pu=Vt(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function Un(e){if(yt(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let r=t.prototype;return!(yt(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}o(Un,"isPlainObject");var Mn=new Set(["string","number","symbol"]);function Ye(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}o(Ye,"escapeRegex");function Ht(e,t,r){let n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}o(Ht,"clone");function re(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(re,"normalizeParams");function jn(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}o(jn,"optionalKeys");var du={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 Qe(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(Qe,"aborted");function De(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}o(De,"prefixIssues");function Bt(e){return typeof e=="string"?e:e?.message}o(Bt,"unwrapMessage");function Ne(e,t,r){let n={...e,path:e.path??[]};if(!e.message){let i=Bt(e.inst?._zod.def?.error?.(e))??Bt(t?.error?.(e))??Bt(r.customError?.(e))??Bt(r.localeError?.(e))??"Invalid input";n.message=i}return delete n.inst,delete n.continue,t?.reportInput||delete n.input,n}o(Ne,"finalizeIssue");function Ln(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}o(Ln,"getLengthableOrigin");function Sr(...e){let[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}o(Sr,"issue");var Fn=o((e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Nn,2),Object.defineProperty(e,"toString",{value:o(()=>e.message,"value"),enumerable:!1})},"initializer"),Bn=S("$ZodError",Fn),ht=S("$ZodError",Fn,{Parent:Error});var fu=o(e=>(t,r,n,i)=>{let u=n?Object.assign(n,{async:!1}):{async:!1},c=t._zod.run({value:r,issues:[]},u);if(c instanceof Promise)throw new Ie;if(c.issues.length){let l=new(i?.Err??e)(c.issues.map(f=>Ne(f,u,Ee())));throw Er(l,i?.callee),l}return c.value},"_parse"),Wt=fu(ht),gu=o(e=>async(t,r,n,i)=>{let u=n?Object.assign(n,{async:!0}):{async:!0},c=t._zod.run({value:r,issues:[]},u);if(c instanceof Promise&&(c=await c),c.issues.length){let l=new(i?.Err??e)(c.issues.map(f=>Ne(f,u,Ee())));throw Er(l,i?.callee),l}return c.value},"_parseAsync"),Gt=gu(ht),yu=o(e=>(t,r,n)=>{let i=n?{...n,async:!1}:{async:!1},u=t._zod.run({value:r,issues:[]},i);if(u instanceof Promise)throw new Ie;return u.issues.length?{success:!1,error:new(e??Bn)(u.issues.map(c=>Ne(c,i,Ee())))}:{success:!0,data:u.value}},"_safeParse"),vt=yu(ht),hu=o(e=>async(t,r,n)=>{let i=n?Object.assign(n,{async:!0}):{async:!0},u=t._zod.run({value:r,issues:[]},i);return u instanceof Promise&&(u=await u),u.issues.length?{success:!1,error:new e(u.issues.map(c=>Ne(c,i,Ee())))}:{success:!0,data:u.value}},"_safeParseAsync"),xt=hu(ht);var vu="(?:(?:\\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])))",xu=new RegExp(`^${vu}$`);var Vn=o(e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},"string"),Zn=/^-?\d+n?$/;var Ar=/^-?\d+(?:\.\d+)?$/,Hn=/^(?:true|false)$/i;var et=S("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])});var Wn=S("$ZodCheckMinLength",(e,t)=>{var r;et.init(e,t),(r=e._zod.def).when??(r.when=n=>{let i=n.value;return!Cn(i)&&i.length!==void 0}),e._zod.onattach.push(n=>{let i=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>i&&(n._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let i=n.value;if(i.length>=t.minimum)return;let c=Ln(i);n.issues.push({origin:c,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}});var zr=S("$ZodCheckStringFormat",(e,t)=>{var r,n;et.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=()=>{})}),Gn=S("$ZodCheckRegex",(e,t)=>{zr.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}});var Kn={major:4,minor:3,patch:6};var ne=S("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Kn;let n=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&n.unshift(e);for(let i of n)for(let u of i._zod.onattach)u(e);if(n.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let i=o((c,l,f)=>{let g=Qe(c),_;for(let T of l){if(T._zod.def.when){if(!T._zod.def.when(c))continue}else if(g)continue;let x=c.issues.length,s=T._zod.check(c);if(s instanceof Promise&&f?.async===!1)throw new Ie;if(_||s instanceof Promise)_=(_??Promise.resolve()).then(async()=>{await s,c.issues.length!==x&&(g||(g=Qe(c,x)))});else{if(c.issues.length===x)continue;g||(g=Qe(c,x))}}return _?_.then(()=>c):c},"runChecks"),u=o((c,l,f)=>{if(Qe(c))return c.aborted=!0,c;let g=i(l,n,f);if(g instanceof Promise){if(f.async===!1)throw new Ie;return g.then(_=>e._zod.parse(_,f))}return e._zod.parse(g,f)},"handleCanaryResult");e._zod.run=(c,l)=>{if(l.skipChecks)return e._zod.parse(c,l);if(l.direction==="backward"){let g=e._zod.parse({value:c.value,issues:[]},{...l,skipChecks:!0});return g instanceof Promise?g.then(_=>u(_,c,l)):u(g,c,l)}let f=e._zod.parse(c,l);if(f instanceof Promise){if(l.async===!1)throw new Ie;return f.then(g=>i(g,n,l))}return i(f,n,l)}}se(e,"~standard",()=>({validate:o(i=>{try{let u=vt(e,i);return u.success?{value:u.data}:{issues:u.error?.issues}}catch{return xt(e,i).then(c=>c.success?{value:c.data}:{issues:c.error?.issues})}},"validate"),vendor:"zod",version:1}))}),Jt=S("$ZodString",(e,t)=>{ne.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Vn(e._zod.bag),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),kr=S("$ZodStringFormat",(e,t)=>{zr.init(e,t),Jt.init(e,t)});var eo=S("$ZodURL",(e,t)=>{kr.init(e,t),e._zod.check=r=>{try{let n=r.value.trim(),i=new URL(n);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(":")?i.protocol.slice(0,-1):i.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=i.href:r.value=n;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}});var to=S("$ZodNumber",(e,t)=>{ne.init(e,t),e._zod.pattern=e._zod.bag.pattern??Ar,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 wr=S("$ZodBoolean",(e,t)=>{ne.init(e,t),e._zod.pattern=Hn,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}}),ro=S("$ZodBigInt",(e,t)=>{ne.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 no=S("$ZodAny",(e,t)=>{ne.init(e,t),e._zod.parse=r=>r}),oo=S("$ZodUnknown",(e,t)=>{ne.init(e,t),e._zod.parse=r=>r});var io=S("$ZodVoid",(e,t)=>{ne.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}}),ao=S("$ZodDate",(e,t)=>{ne.init(e,t),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=new Date(r.value)}catch{}let i=r.value,u=i instanceof Date;return u&&!Number.isNaN(i.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:i,...u?{received:"Invalid Date"}:{},inst:e}),r}});function Jn(e,t,r){e.issues.length&&t.issues.push(...De(r,e.issues)),t.value[r]=e.value}o(Jn,"handleArrayResult");var so=S("$ZodArray",(e,t)=>{ne.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;if(!Array.isArray(i))return r.issues.push({expected:"array",code:"invalid_type",input:i,inst:e}),r;r.value=Array(i.length);let u=[];for(let c=0;c<i.length;c++){let l=i[c],f=t.element._zod.run({value:l,issues:[]},n);f instanceof Promise?u.push(f.then(g=>Jn(g,r,c))):Jn(f,r,c)}return u.length?Promise.all(u).then(()=>r):r}});function Kt(e,t,r,n,i){if(e.issues.length){if(i&&!(r in n))return;t.issues.push(...De(r,e.issues))}e.value===void 0?r in n&&(t.value[r]=void 0):t.value[r]=e.value}o(Kt,"handlePropertyResult");function _u(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=jn(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}o(_u,"normalizeDef");function Pu(e,t,r,n,i,u){let c=[],l=i.keySet,f=i.catchall._zod,g=f.def.type,_=f.optout==="optional";for(let T in t){if(l.has(T))continue;if(g==="never"){c.push(T);continue}let x=f.run({value:t[T],issues:[]},n);x instanceof Promise?e.push(x.then(s=>Kt(s,r,T,t,_))):Kt(x,r,T,t,_)}return c.length&&r.issues.push({code:"unrecognized_keys",keys:c,input:t,inst:u}),e.length?Promise.all(e).then(()=>r):r}o(Pu,"handleCatchall");var uo=S("$ZodObject",(e,t)=>{if(ne.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let l=t.shape;Object.defineProperty(t,"shape",{get:o(()=>{let f={...l};return Object.defineProperty(t,"shape",{value:f}),f},"get")})}let n=Vt(()=>_u(t));se(e._zod,"propValues",()=>{let l=t.shape,f={};for(let g in l){let _=l[g]._zod;if(_.values){f[g]??(f[g]=new Set);for(let T of _.values)f[g].add(T)}}return f});let i=yt,u=t.catchall,c;e._zod.parse=(l,f)=>{c??(c=n.value);let g=l.value;if(!i(g))return l.issues.push({expected:"object",code:"invalid_type",input:g,inst:e}),l;l.value={};let _=[],T=c.shape;for(let x of c.keys){let s=T[x],d=s._zod.optout==="optional",y=s._zod.run({value:g[x],issues:[]},f);y instanceof Promise?_.push(y.then(m=>Kt(m,l,x,g,d))):Kt(y,l,x,g,d)}return u?Pu(_,g,l,f,n.value,e):_.length?Promise.all(_).then(()=>l):l}});function Xn(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=>!Qe(u));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(u=>u.issues.map(c=>Ne(c,n,Ee())))}),t)}o(Xn,"handleUnionResults");var Or=S("$ZodUnion",(e,t)=>{ne.init(e,t),se(e._zod,"optin",()=>t.options.some(i=>i._zod.optin==="optional")?"optional":void 0),se(e._zod,"optout",()=>t.options.some(i=>i._zod.optout==="optional")?"optional":void 0),se(e._zod,"values",()=>{if(t.options.every(i=>i._zod.values))return new Set(t.options.flatMap(i=>Array.from(i._zod.values)))}),se(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=>Zt(u.source)).join("|")})$`)}});let r=t.options.length===1,n=t.options[0]._zod.run;e._zod.parse=(i,u)=>{if(r)return n(i,u);let c=!1,l=[];for(let f of t.options){let g=f._zod.run({value:i.value,issues:[]},u);if(g instanceof Promise)l.push(g),c=!0;else{if(g.issues.length===0)return g;l.push(g)}}return c?Promise.all(l).then(f=>Xn(f,i,e,u)):Xn(l,i,e,u)}});var co=S("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,Or.init(e,t);let r=e._zod.parse;se(e._zod,"propValues",()=>{let i={};for(let u of t.options){let c=u._zod.propValues;if(!c||Object.keys(c).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(u)}"`);for(let[l,f]of Object.entries(c)){i[l]||(i[l]=new Set);for(let g of f)i[l].add(g)}}return i});let n=Vt(()=>{let i=t.options,u=new Map;for(let c of i){let l=c._zod.propValues?.[t.discriminator];if(!l||l.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(c)}"`);for(let f of l){if(u.has(f))throw new Error(`Duplicate discriminator value "${String(f)}"`);u.set(f,c)}}return u});e._zod.parse=(i,u)=>{let c=i.value;if(!yt(c))return i.issues.push({code:"invalid_type",expected:"object",input:c,inst:e}),i;let l=n.value.get(c?.[t.discriminator]);return l?l._zod.run(i,u):t.unionFallback?r(i,u):(i.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:c,path:[t.discriminator],inst:e}),i)}});var lo=S("$ZodRecord",(e,t)=>{ne.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;if(!Un(i))return r.issues.push({expected:"record",code:"invalid_type",input:i,inst:e}),r;let u=[],c=t.keyType._zod.values;if(c){r.value={};let l=new Set;for(let g of c)if(typeof g=="string"||typeof g=="number"||typeof g=="symbol"){l.add(typeof g=="number"?g.toString():g);let _=t.valueType._zod.run({value:i[g],issues:[]},n);_ instanceof Promise?u.push(_.then(T=>{T.issues.length&&r.issues.push(...De(g,T.issues)),r.value[g]=T.value})):(_.issues.length&&r.issues.push(...De(g,_.issues)),r.value[g]=_.value)}let f;for(let g in i)l.has(g)||(f=f??[],f.push(g));f&&f.length>0&&r.issues.push({code:"unrecognized_keys",input:i,inst:e,keys:f})}else{r.value={};for(let l of Reflect.ownKeys(i)){if(l==="__proto__")continue;let f=t.keyType._zod.run({value:l,issues:[]},n);if(f instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof l=="string"&&Ar.test(l)&&f.issues.length){let T=t.keyType._zod.run({value:Number(l),issues:[]},n);if(T instanceof Promise)throw new Error("Async schemas not supported in object keys currently");T.issues.length===0&&(f=T)}if(f.issues.length){t.mode==="loose"?r.value[l]=i[l]:r.issues.push({code:"invalid_key",origin:"record",issues:f.issues.map(T=>Ne(T,n,Ee())),input:l,path:[l],inst:e});continue}let _=t.valueType._zod.run({value:i[l],issues:[]},n);_ instanceof Promise?u.push(_.then(T=>{T.issues.length&&r.issues.push(...De(l,T.issues)),r.value[f.value]=T.value})):(_.issues.length&&r.issues.push(...De(l,_.issues)),r.value[f.value]=_.value)}}return u.length?Promise.all(u).then(()=>r):r}});var po=S("$ZodEnum",(e,t)=>{ne.init(e,t);let r=$r(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(i=>Mn.has(typeof i)).map(i=>typeof i=="string"?Ye(i):i.toString()).join("|")})$`),e._zod.parse=(i,u)=>{let c=i.value;return n.has(c)||i.issues.push({code:"invalid_value",values:r,input:c,inst:e}),i}}),mo=S("$ZodLiteral",(e,t)=>{if(ne.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"?Ye(n):n?Ye(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 fo=S("$ZodTransform",(e,t)=>{ne.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Ft(e.constructor.name);let i=t.transform(r.value,r);if(n.async)return(i instanceof Promise?i:Promise.resolve(i)).then(c=>(r.value=c,r));if(i instanceof Promise)throw new Ie;return r.value=i,r}});function Yn(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}o(Yn,"handleOptionalResult");var go=S("$ZodOptional",(e,t)=>{ne.init(e,t),e._zod.optin="optional",e._zod.optout="optional",se(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),se(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${Zt(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=>Yn(u,r.value)):Yn(i,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,n)}});var yo=S("$ZodNullable",(e,t)=>{ne.init(e,t),se(e._zod,"optin",()=>t.innerType._zod.optin),se(e._zod,"optout",()=>t.innerType._zod.optout),se(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${Zt(r.source)}|null)$`):void 0}),se(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 ho=S("$ZodPipe",(e,t)=>{ne.init(e,t),se(e._zod,"values",()=>t.in._zod.values),se(e._zod,"optin",()=>t.in._zod.optin),se(e._zod,"optout",()=>t.out._zod.optout),se(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,n)=>{if(n.direction==="backward"){let u=t.out._zod.run(r,n);return u instanceof Promise?u.then(c=>qt(c,t.in,n)):qt(u,t.in,n)}let i=t.in._zod.run(r,n);return i instanceof Promise?i.then(u=>qt(u,t.out,n)):qt(i,t.out,n)}});function qt(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}o(qt,"handlePipeResult");var vo=S("$ZodCustom",(e,t)=>{et.init(e,t),ne.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=>Qn(u,r,n,e));Qn(i,r,n,e)}});function Qn(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(Sr(i))}}o(Qn,"handleRefineResult");var _o,$u=Symbol("ZodOutput"),Eu=Symbol("ZodInput"),Rr=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 Po(){return new Rr}o(Po,"registry");(_o=globalThis).__zod_globalRegistry??(_o.__zod_globalRegistry=Po());var Dr=globalThis.__zod_globalRegistry;function bo(e,t){return new e({type:"string",...re(t)})}o(bo,"_string");function Io(e,t){return new e({type:"string",coerce:!0,...re(t)})}o(Io,"_coercedString");function To(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...re(t)})}o(To,"_url");function $o(e,t){return new e({type:"number",checks:[],...re(t)})}o($o,"_number");function Eo(e,t){return new e({type:"number",coerce:!0,checks:[],...re(t)})}o(Eo,"_coercedNumber");function So(e,t){return new e({type:"boolean",...re(t)})}o(So,"_boolean");function Ao(e,t){return new e({type:"boolean",coerce:!0,...re(t)})}o(Ao,"_coercedBoolean");function zo(e,t){return new e({type:"bigint",coerce:!0,...re(t)})}o(zo,"_coercedBigint");function ko(e){return new e({type:"any"})}o(ko,"_any");function wo(e){return new e({type:"unknown"})}o(wo,"_unknown");function Oo(e,t){return new e({type:"void",...re(t)})}o(Oo,"_void");function Ro(e,t){return new e({type:"date",coerce:!0,...re(t)})}o(Ro,"_coercedDate");function Pe(e,t){return new Wn({check:"min_length",...re(t),minimum:e})}o(Pe,"_minLength");function Ce(e,t){return new Gn({check:"string_format",format:"regex",...re(t),pattern:e})}o(Ce,"_regex");function Do(e,t,r){let n=re(r);return n.abort??(n.abort=!0),new e({type:"custom",check:"custom",fn:t,...n})}o(Do,"_custom");var ue=S("ZodMiniType",(e,t)=>{if(!e._zod)throw new Error("Uninitialized schema in ZodMiniType.");ne.init(e,t),e.def=t,e.type=t.type,e.parse=(r,n)=>Wt(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>vt(e,r,n),e.parseAsync=async(r,n)=>Gt(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>xt(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)=>Ht(e,r,n),e.brand=()=>e,e.register=(r,n)=>(r.add(e,n),e),e.apply=r=>r(e)}),Yt=S("ZodMiniString",(e,t)=>{Jt.init(e,t),ue.init(e,t)});function a(e){return bo(Yt,e)}o(a,"string");var No=S("ZodMiniStringFormat",(e,t)=>{kr.init(e,t),Yt.init(e,t)});var Cu=S("ZodMiniURL",(e,t)=>{eo.init(e,t),No.init(e,t)});function Co(e){return To(Cu,e)}o(Co,"url");var Nr=S("ZodMiniNumber",(e,t)=>{to.init(e,t),ue.init(e,t)});function fe(e){return $o(Nr,e)}o(fe,"number");var Cr=S("ZodMiniBoolean",(e,t)=>{wr.init(e,t),ue.init(e,t)});function Y(e){return So(Cr,e)}o(Y,"boolean");var Uo=S("ZodMiniBigInt",(e,t)=>{ro.init(e,t),ue.init(e,t)});var Uu=S("ZodMiniAny",(e,t)=>{no.init(e,t),ue.init(e,t)});function Pt(){return ko(Uu)}o(Pt,"any");var Mu=S("ZodMiniUnknown",(e,t)=>{oo.init(e,t),ue.init(e,t)});function N(){return wo(Mu)}o(N,"unknown");var ju=S("ZodMiniVoid",(e,t)=>{io.init(e,t),ue.init(e,t)});function Mo(e){return Oo(ju,e)}o(Mo,"_void");var jo=S("ZodMiniDate",(e,t)=>{ao.init(e,t),ue.init(e,t)});var Lu=S("ZodMiniArray",(e,t)=>{so.init(e,t),ue.init(e,t)});function j(e,t){return new Lu({type:"array",element:e,...re(t)})}o(j,"array");var Fu=S("ZodMiniObject",(e,t)=>{uo.init(e,t),ue.init(e,t),se(e,"shape",()=>t.shape)});function p(e,t){let r={type:"object",shape:e??{},...re(t)};return new Fu(r)}o(p,"object");var Bu=S("ZodMiniUnion",(e,t)=>{Or.init(e,t),ue.init(e,t)});function L(e,t){return new Bu({type:"union",options:e,...re(t)})}o(L,"union");var Vu=S("ZodMiniDiscriminatedUnion",(e,t)=>{co.init(e,t),ue.init(e,t)});function tt(e,t,r){return new Vu({type:"union",options:t,discriminator:e,...re(r)})}o(tt,"discriminatedUnion");var Zu=S("ZodMiniRecord",(e,t)=>{lo.init(e,t),ue.init(e,t)});function C(e,t,r){return new Zu({type:"record",keyType:e,valueType:t,...re(r)})}o(C,"record");var Hu=S("ZodMiniEnum",(e,t)=>{po.init(e,t),ue.init(e,t),e.options=Object.values(t.entries)});function H(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new Hu({type:"enum",entries:r,...re(t)})}o(H,"_enum");var Wu=S("ZodMiniLiteral",(e,t)=>{mo.init(e,t),ue.init(e,t)});function k(e,t){return new Wu({type:"literal",values:Array.isArray(e)?e:[e],...re(t)})}o(k,"literal");var Gu=S("ZodMiniTransform",(e,t)=>{fo.init(e,t),ue.init(e,t)});function Ue(e){return new Gu({type:"transform",transform:e})}o(Ue,"transform");var qu=S("ZodMiniOptional",(e,t)=>{go.init(e,t),ue.init(e,t)});function h(e){return new qu({type:"optional",innerType:e})}o(h,"optional");var Ku=S("ZodMiniNullable",(e,t)=>{yo.init(e,t),ue.init(e,t)});function bt(e){return new Ku({type:"nullable",innerType:e})}o(bt,"nullable");var Ju=S("ZodMiniPipe",(e,t)=>{ho.init(e,t),ue.init(e,t)});function Me(e,t){return new Ju({type:"pipe",in:e,out:t})}o(Me,"pipe");var Xu=S("ZodMiniCustom",(e,t)=>{vo.init(e,t),ue.init(e,t)});function Qt(e,t){return Do(Xu,e??(()=>!0),t)}o(Qt,"custom");var It={};On(It,{bigint:()=>oc,boolean:()=>nc,date:()=>ic,number:()=>rc,string:()=>tc});function tc(e){return Io(Yt,e)}o(tc,"string");function rc(e){return Eo(Nr,e)}o(rc,"number");function nc(e){return Ao(Cr,e)}o(nc,"boolean");function oc(e){return zo(Uo,e)}o(oc,"bigint");function ic(e){return Ro(jo,e)}o(ic,"date");var Mr=p({retryOnFailure:p({defaultValue:h(Y()),hide:h(Y())}),continueOnFailure:p({defaultValue:h(Y()),hide:h(Y())})}),Ur=class{constructor(t,r,n,i,u,c,l,f,g,_,T){this.name=t;this.displayName=r;this.description=n;this.props=i;this.run=u;this.test=c;this.requireAuth=l;this.errorHandlingOptions=f;this.outputSchema=g;this.audience=_;this.aiMetadata=T}static{o(this,"IAction")}},er=o(e=>new Ur(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 J=p({displayName:a(),description:h(a())}),Z=o((e,t)=>p({type:k(t),required:Y(),defaultValue:h(Pt())}),"TPropertyValue");var he=p({...J.shape,...Z(a(),"SHORT_TEXT").shape}),Se=p({...J.shape,...Z(a(),"LONG_TEXT").shape});var Fo=p({label:a(),value:N()}),tr=p({disabled:h(Y()),placeholder:h(a()),options:j(Fo)});var ve=p({...J.shape,options:tr,...Z(N(),"STATIC_DROPDOWN").shape}),Ae=p({...J.shape,options:tr,...Z(j(N()),"STATIC_MULTI_SELECT_DROPDOWN").shape});var jr=p({...J.shape,...Z(N(),"DROPDOWN").shape,refreshers:j(a())}),Tt=p({...J.shape,...Z(j(N()),"MULTI_SELECT_DROPDOWN").shape,refreshers:j(a())});var ze=p({...J.shape,...Z(Y(),"CHECKBOX").shape});var ke=p({...J.shape,...Z(fe(),"NUMBER").shape});var $t=p({...J.shape,...Z(N(),"FILE").shape});var Et=p({...J.shape,...Z(a(),"DATE_TIME").shape});var Bo=C(a(),L([he,Se,ve,Tt,Ae,ze,ke,$t,Et])),St=p({...J.shape,properties:Bo,...Z(j(N()),"ARRAY").shape});var At=p({...J.shape,...Z(L([C(a(),N())]),"JSON").shape});var Vo=L([he,ve,At,St,Ae]),sc=C(a(),Vo),Lr=p({refreshers:j(a()),...J.shape,...Z(N(),"DYNAMIC").shape});var rr=p({...J.shape,...Z(Mo(),"MARKDOWN").shape});var zt=(r=>(r.ARCHIVE="ARCHIVE",r.REGISTRY="REGISTRY",r))(zt||{}),rt=(r=>(r.CUSTOM="CUSTOM",r.OFFICIAL="OFFICIAL",r))(rt||{}),nt=(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))(nt||{});var kt=(r=>(r.AUTHORIZATION_CODE="authorization_code",r.CLIENT_CREDENTIALS="client_credentials",r))(kt||{}),Fr="both_client_credentials_and_authorization_code";var je=(i=>(i.POLLING="POLLING",i.WEBHOOK="WEBHOOK",i.APP_WEBHOOK="APP_WEBHOOK",i.MANUAL="MANUAL",i))(je||{}),wt=(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))(wt||{}),uc=p({strategy:H(wt),paramName:h(a())}),Ot=(r=>(r.SIMULATION="SIMULATION",r.TEST_FUNCTION="TEST_FUNCTION",r))(Ot||{});var nr=(r=>(r.WEBSOCKET="WEBSOCKET",r.NONE="NONE",r))(nr||{}),Zo=p({status:h(fe()),body:h(N()),headers:h(C(a(),a()))}),Ho=p({type:k("DELAY"),resumeDateTime:a(),requestIdToReply:h(a()),handlerId:h(a()),streamStepProgress:h(H(nr))}),Wo=p({type:k("WEBHOOK"),requestId:a(),requestIdToReply:h(a()),response:Zo,handlerId:h(a()),streamStepProgress:h(H(nr))}),cc=L([Ho,Wo]);var lc=p({body:N(),rawBody:h(N()),headers:C(a(),a()),queryParams:C(a(),a())});function pe(e){return e==null}o(pe,"isNil");function Rt(e){return e==null?!0:typeof e=="string"||Array.isArray(e)?e.length===0:typeof e=="object"?Object.keys(e).length===0:!1}o(Rt,"isEmpty");function or(e,t){if(e==null)throw new Error(`${t} is null or undefined`)}o(or,"assertNotNullOrUndefined");var Br=Ze(require("crypto"),1);var pc=128,He,ot,dc=o(e=>{!He||He.length<e?(He=Buffer.allocUnsafe(e*pc),Br.default.randomFillSync(He),ot=0):ot+e>He.length&&(Br.default.randomFillSync(He),ot=0),ot+=e},"fillPool"),mc=o(e=>(dc(e|=0),He.subarray(ot-e,ot)),"random"),fc=o((e,t,r)=>{let n=(2<<31-Math.clz32(e.length-1|1))-1,i=Math.ceil(1.6*n*t/e.length);return(u=t)=>{let c="";for(;;){let l=r(i),f=i;for(;f--;)if(c+=e[l[f]&n]||"",c.length===u)return c}}},"customRandom"),qo=o((e,t=21)=>fc(e,t,mc),"customAlphabet");var gc="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",Ko=21,yb=a().check(Ce(new RegExp(`^[0-9a-zA-Z]{${Ko}}$`))),yc=qo(gc,Ko);var Le=Me(Ue(e=>e instanceof Date?e.toISOString():e),a()),_e={id:a(),created:Le,updated:Le},te=o(e=>h(bt(e)),"Nullable");function Vr(e){return h(bt(H(e)))}o(Vr,"NullableEnum");var xb=Me(Ue(e=>e==="true"||e===!0?!0:e==="false"||e===!1?!1:void 0),h(Y())),ir=o(e=>Me(Ue(t=>Array.isArray(t)?t:t!==void 0?[t]:void 0),h(j(e))),"OptionalArrayFromQuery");var bb=C(a(),N());var Dt=(_=>(_.OPENAI="openai",_.OPENROUTER="openrouter",_.ANTHROPIC="anthropic",_.AZURE="azure",_.GOOGLE="google",_.ACTIVEPIECES="activepieces",_.CLOUDFLARE_GATEWAY="cloudflare-gateway",_.CUSTOM="custom",_.BEDROCK="bedrock",_.MISTRAL="mistral",_))(Dt||{});var Db=a().check(Ce(/^#[0-9A-Fa-f]{6}$/));var Cb=p({filename:a(),data:N(),type:k("file"),mimetype:h(a())});var hc=Ze(Xo());var Vb=p({..._e,name:a(),permissions:j(a()),platformId:te(a()),type:a(),userCount:h(fe())});var Yo=(n=>(n.AGENT_DECIDE="agent-decide",n.CHOOSE_YOURSELF="choose-yourself",n.LEAVE_EMPTY="leave-empty",n))(Yo||{}),Zr=(r=>(r.FILE="FILE",r.TABLE="TABLE",r))(Zr||{}),Hr=(n=>(n.SSE="sse",n.STREAMABLE_HTTP="streamable-http",n.SIMPLE_HTTP="http",n))(Hr||{});var Wr=(n=>(n.TEXT="text",n.NUMBER="number",n.BOOLEAN="boolean",n))(Wr||{});var Gr=(r=>(r.IN_PROGRESS="in-progress",r.COMPLETED="completed",r))(Gr||{});var vc=p({mode:H(Yo),value:N()}),xc=p({auth:h(a()),fields:C(a(),vc)}),_c=p({pieceName:a(),pieceVersion:a(),actionName:a(),predefinedInput:h(xc)}),Pc=p({type:k("PIECE"),toolName:a().check(Pe(1)),pieceMetadata:_c}),bc=p({type:k("none")}),Ic=p({type:k("access_token"),accessToken:a()}),Tc=p({type:k("api_key"),apiKey:a(),apiKeyHeader:a()}),$c=p({type:k("headers"),headers:C(a(),a())}),Ec=tt("type",[bc,Ic,Tc,$c]),Qo=p({type:k("FLOW"),toolName:a().check(Pe(1)),externalFlowId:a(),flowDisplayName:h(a())}),ei=p({type:k("MCP"),toolName:a().check(Pe(1)),serverUrl:Co(),protocol:H(Hr),auth:Ec}),ti=p({type:k("KNOWLEDGE_BASE"),toolName:a().check(Pe(1)),sourceType:H(Zr),sourceId:a(),sourceName:a()}),Sc=tt("type",[Pc,Qo,ei,ti]),Ac=p({displayName:a(),description:h(a()),type:H(Wr)}),ri=p({type:k("MARKDOWN"),markdown:a()}),it={type:k("TOOL_CALL"),input:te(C(a(),N())),output:h(N()),toolName:a(),status:H(Gr),toolCallId:a(),startTime:a(),endTime:h(a())},yI=p(it),ni=tt("toolCallType",[p({...it,toolCallType:k("PIECE"),pieceName:a(),pieceVersion:a(),actionName:a()}),p({...it,toolCallType:k("FLOW"),displayName:a(),externalFlowId:a()}),p({...it,toolCallType:k("MCP"),displayName:a(),serverUrl:a()}),p({...it,toolCallType:k("KNOWLEDGE_BASE"),displayName:a(),sourceType:a()}),p({...it,toolCallType:k("UNKNOWN"),displayName:a()})]),zc=L([ri,ni]);var qr=(r=>(r.IMAGE="image",r.TEXT="text",r))(qr||{}),we=p({apiKey:a()}),kc=we,wc=p({apiKey:a(),apiKeyHash:a()}),Oc=we,Rc=we,Dc=we,Nc=we,Cc=we,Uc=we,Mc=we,oi=p({accessKeyId:a().check(Pe(1)),secretAccessKey:a().check(Pe(1))}),jc=p({}),Lc=p({}),Fc=p({}),Bc=p({}),Vc=p({}),Zc=p({}),ii=p({modelId:a(),modelName:a(),modelType:H(qr)}),ai=p({apiKeyHeader:a(),baseUrl:a(),models:j(ii),defaultHeaders:h(C(a(),a()))}),si=p({accountId:a(),gatewayId:a(),models:j(ii),vertexProject:h(a()),vertexRegion:h(a())}),ui=p({resourceName:a(),apiVersion:Me(Ue(e=>typeof e=="string"&&e.trim().length===0?void 0:e),h(a()))}),ci=p({region:a().check(Pe(1))}),Hc=L([kc,Dc,Nc,Cc,Uc,Rc,Oc,wc,oi,Mc]),li=L([ai,si,ui,ci,jc,Fc,Bc,Vc,Lc,Zc]),Wc=p({id:a(),name:a(),type:H(qr)}),Gc=p({id:a(),name:a(),provider:H(Dt),config:li,enabledForChat:Y()}),qc=p({provider:H(Dt),config:li,auth:Hc,platformId:a()});var _I={openai:"openai",anthropic:"anthropic","google-ai-studio":"google","google-vertex-ai":"google"};var Kc=p({base64Url:a(),fileName:a(),extension:h(a())}),Jc=p({mimeType:a(),url:a(),fileName:h(a())}),Kr=L([Kc,Jc]);var Xc=L([p({type:k("file"),value:Kr}),p({type:k("markdown"),value:a(),files:h(j(Kr))})]),Yc=p({sessionId:a(),message:a(),files:h(j(a()))});var di=(r=>(r.ON_NEW_RECORD="ON_NEW_RECORD",r.ON_UPDATE_RECORD="ON_UPDATE_RECORD",r))(di||{}),mi=(r=>(r.ENABLED="ENABLED",r.DISABLED="DISABLED",r))(mi||{}),Jr=(n=>(n.RECORD_CREATED="RECORD_CREATED",n.RECORD_UPDATED="RECORD_UPDATED",n.RECORD_DELETED="RECORD_DELETED",n))(Jr||{});var Qc=L([p({..._e,name:a(),externalId:a(),type:k("STATIC_DROPDOWN"),tableId:a(),projectId:a(),data:p({options:j(p({value:a()}))})}),p({..._e,name:a(),externalId:a(),type:L([k("TEXT"),k("NUMBER"),k("DATE")]),tableId:a(),projectId:a()})]),el=p({..._e,name:a(),folderId:te(a()),projectId:a(),externalId:a(),status:Vr(mi),trigger:Vr(di)}),tl=p({..._e,tableId:a(),projectId:a(),cells:C(a(),p({updated:a(),created:a(),value:N(),fieldName:a()}))}),rl=p({events:j(H(Jr)),webhookUrl:a(),flowId:a()}),nl=p({fields:j(p({id:a(),name:a()})),rows:j(C(a(),a())),name:a()}),ol=p({projectId:a(),limit:h(It.number()),cursor:h(a()),name:h(a()),externalIds:ir(a()),folderId:h(a()),folderIds:ir(a())}),il=p({records:j(j(p({fieldId:a(),value:gi()}))),tableId:a()}),al=p({cells:h(j(p({fieldId:a(),value:gi()}))),tableId:a(),agentUpdate:h(Y())}),fi=tt("operator",[We("eq"),We("neq"),We("gt"),We("gte"),We("lt"),We("lte"),We("co"),pi("exists"),pi("not_exists")]),sl=p({tableId:a(),limit:h(It.number()),cursor:h(a()),filters:ir(fi)});function gi(){return Me(Ue(e=>e==null?e:String(e)),bt(a()))}o(gi,"coerceToString");function We(e){return p({fieldId:a(),operator:k(e),value:a()})}o(We,"valueFilter");function pi(e){return p({fieldId:a(),operator:k(e)})}o(pi,"existenceFilter");var ul=p({status:h(fe()),body:h(N()),headers:h(C(a(),a()))}),cl=p({..._e,deleted:te(Le),ownerId:a(),displayName:a(),platformId:a(),externalId:te(a())});var yi=p({name:a(),description:h(a()),type:a(),required:Y()}),ll=p({pieceName:a(),triggerName:a(),input:p({toolName:a(),toolDescription:a(),inputSchema:j(yi),returnsResponse:Y()})});var hi="^[0-9]+\\.[0-9]+\\.[0-9]+$",jI=new RegExp(hi),dl="^([~^])?[0-9]+\\.[0-9]+\\.[0-9]+$",LI=a().check(Ce(new RegExp(hi))),FI=a().check(Ce(new RegExp(dl))),ml=p({packageType:k("ARCHIVE"),pieceType:H(rt),pieceName:a(),pieceVersion:a(),archiveId:a(),platformId:a()}),vi=p({packageType:k("REGISTRY"),pieceType:k("OFFICIAL"),pieceName:a(),pieceVersion:a()}),xi=p({packageType:k("REGISTRY"),pieceType:k("CUSTOM"),pieceName:a(),pieceVersion:a(),platformId:a()}),BI=L([vi,xi]),VI=L([ml,vi,xi]),_i=(t=>(t.CRON_EXPRESSION="CRON_EXPRESSION",t))(_i||{}),fl=p({type:H(_i),cronExpression:a(),timezone:a()}),ZI=p({..._e,type:H(je),projectId:a(),flowId:a(),triggerName:a(),schedule:te(fl),flowVersionId:a(),pieceName:a(),pieceVersion:a(),deleted:te(a()),simulate:Y()}),Pi=(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))(Pi||{}),bi=(r=>(r.NONE="NONE",r.ZSTD="ZSTD",r))(bi||{}),Ii=(r=>(r.S3="S3",r.DB="DB",r))(Ii||{}),HI=p({..._e,projectId:te(a()),platformId:te(a()),type:H(Pi),compression:H(bi),data:h(N()),location:H(Ii),size:te(fe()),fileName:te(a()),s3Key:te(a()),metadata:te(C(a(),a()))}),Ti=(n=>(n.ADMIN="ADMIN",n.MEMBER="MEMBER",n.OPERATOR="OPERATOR",n))(Ti||{}),$i=(r=>(r.ACTIVE="ACTIVE",r.INACTIVE="INACTIVE",r))($i||{}),WI=p({id:a(),email:a(),firstName:a(),status:H($i),externalId:te(a()),platformId:te(a()),platformRole:H(Ti),lastName:a(),created:Le,updated:Le,lastActiveDate:te(Le),imageUrl:te(a())});var Xr=p({...J.shape,...Z(C(a(),N()),"OBJECT").shape});var zi=p({...J.shape,...Z(a(),"COLOR").shape});var Yr=L([he,Se,rr,ze,ve,Ae,jr,Tt,Lr,ke,St,Xr,At,Et,$t,zi]),W={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 Te=p({displayName:a(),description:h(a())});var ki=p({username:a(),password:a()}),Qr=p({...Te.shape,username:p({displayName:a(),description:h(a())}),password:p({displayName:a(),description:h(a())}),...Z(ki,"BASIC_AUTH").shape});var vl=C(a(),L([he,Se,ke,ze,ve])),en=p({...Te.shape,props:vl,...Z(N(),"CUSTOM_AUTH").shape});var Ge=p({...Te.shape,...Z(p({auth:a()}),"SECRET_TEXT").shape});var xl=C(a(),L([he,Se,Ge,ke,ze,ve,Ae,rr])),wi=p({...Te.shape,props:xl,...Z(N(),"OIDC").shape});var tn=(r=>(r.HEADER="HEADER",r.BODY="BODY",r))(tn||{}),Oi=L([he,Ge,ve]),Ri=C(a(),Oi),_l=p({props:h(C(a(),Oi)),authUrl:a(),tokenUrl:a(),scope:j(a()),prompt:h(L([k("none"),k("consent"),k("login"),k("omit")])),pkce:h(Y()),pkceMethod:h(L([k("plain"),k("S256")])),authorizationMethod:h(H(tn)),grantType:h(L([H(kt),k(Fr)])),extra:h(C(a(),a()))}),Di=p({access_token:a(),props:h(Ri),data:C(a(),Pt())}),rn=p({...Te.shape,..._l.shape,...Z(Di,"OAUTH2").shape});var at=L([Qr,en,wi,rn,Ge]),Nt="Connection",nn={SecretText(e){return{...e,valueSchema:void 0,type:"SECRET_TEXT"}},OAuth2(e){return{...e,valueSchema:void 0,type:"OAUTH2",displayName:e.displayName||Nt}},BasicAuth(e){return{...e,valueSchema:void 0,type:"BASIC_AUTH",displayName:e.displayName||Nt,required:!0}},CustomAuth(e){return{...e,valueSchema:void 0,type:"CUSTOM_AUTH",displayName:e.displayName||Nt}},OIDC(e){return{...e,valueSchema:void 0,type:"OIDC",displayName:e.displayName||Nt}},None(){}};var T$={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 Pl=p({...J.shape,...Z(N(),"CUSTOM").shape,code:a()});var bl=L([Yr,at]),on=C(a(),bl),Z$=C(a(),Yr);var Ni=L([p({strategy:k("CRON"),cronExpression:a()}),p({strategy:k("NONE")})]),st=class{constructor(t,r,n,i,u,c,l,f,g,_,T,x,s,d,y,m,v,P,M){this.name=t;this.displayName=r;this.description=n;this.requireAuth=i;this.props=u;this.type=c;this.handshakeConfiguration=l;this.onHandshake=f;this.renewConfiguration=g;this.onRenew=_;this.onEnable=T;this.onDisable=x;this.onStart=s;this.run=d;this.test=y;this.sampleData=m;this.testStrategy=v;this.outputSchema=P;this.aiMetadata=M}static{o(this,"ITrigger")}},Ci=o(e=>{switch(e.type){case"WEBHOOK":return new st(e.name,e.displayName,e.description,e.requireAuth??!0,e.props,e.type,e.handshakeConfiguration??{strategy:"NONE"},e.onHandshake??(async()=>({status:200})),e.renewConfiguration??{strategy:"NONE"},e.onRenew??(async()=>Promise.resolve()),e.onEnable,e.onDisable,e.onStart??(async()=>Promise.resolve()),e.run,e.test??(()=>Promise.resolve([e.sampleData])),e.sampleData,e.test?"TEST_FUNCTION":"SIMULATION",e.outputSchema,e.aiMetadata);case"POLLING":return new st(e.name,e.displayName,e.description,e.requireAuth??!0,e.props,e.type,{strategy:"NONE"},async()=>({status:200}),{strategy:"NONE"},async()=>Promise.resolve(),e.onEnable,e.onDisable,e.onStart??(async()=>Promise.resolve()),e.run,e.test??(()=>Promise.resolve([e.sampleData])),e.sampleData,"TEST_FUNCTION",e.outputSchema,e.aiMetadata);case"MANUAL":return new st(e.name,e.displayName,e.description,e.requireAuth??!0,e.props,e.type,{strategy:"NONE"},async()=>({status:200}),{strategy:"NONE"},async()=>Promise.resolve(),e.onEnable,e.onDisable,e.onStart??(async()=>Promise.resolve()),e.run,e.test??(()=>Promise.resolve([e.sampleData])),e.sampleData,"TEST_FUNCTION",e.outputSchema,e.aiMetadata);case"APP_WEBHOOK":return new st(e.name,e.displayName,e.description,e.requireAuth??!0,e.props,e.type,{strategy:"NONE"},async()=>({status:200}),{strategy:"NONE"},async()=>Promise.resolve(),e.onEnable,e.onDisable,e.onStart??(async()=>Promise.resolve()),e.run,e.test??(()=>Promise.resolve([e.sampleData])),e.sampleData,pe(e.sampleData)&&pe(e.test)?"SIMULATION":"TEST_FUNCTION",e.outputSchema,e.aiMetadata)}},"createTrigger");var Ui="2",sr="0.82.0";var an=class{constructor(t,r,n,i,u,c,l,f,g=sr,_,T=""){this.displayName=t;this.logoUrl=r;this.authors=n;this.events=i;this.categories=l;this.auth=f;this.minimumSupportedRelease=g;this.maximumSupportedRelease=_;this.description=T;this._actions={};this._triggers={};this.getContextInfo=o(()=>({version:Ui}),"getContextInfo");(!Il(g)||Tl(g,sr))&&(this.minimumSupportedRelease=sr),u.forEach(x=>this._actions[x.name]=x),c.forEach(x=>this._triggers[x.name]=x)}static{o(this,"Piece")}metadata(){return{displayName:this.displayName,logoUrl:this.logoUrl,actions:this._actions,triggers:this._triggers,categories:this.categories,description:this.description,authors:this.authors,auth:this.auth,minimumSupportedRelease:this.minimumSupportedRelease,maximumSupportedRelease:this.maximumSupportedRelease,contextInfo:this.getContextInfo?.()}}getAction(t){return this._actions[t]}getTrigger(t){return this._triggers[t]}actions(){return this._actions}triggers(){return this._triggers}},Mi=o(e=>{if(e.auth&&Array.isArray(e.auth)&&!e.auth.every((r,n,i)=>n===i.findIndex(u=>u.type===r.type)))throw new Error("Auth properties must be unique by type");return new an(e.displayName,e.logoUrl,e.authors??[],e.events,e.actions,e.triggers,e.categories??[],e.auth,e.minimumSupportedRelease,e.maximumSupportedRelease,e.description)},"createPiece");function Il(e){return/^\d+\.\d+\.\d+$/.test(e)}o(Il,"isValidSimpleSemver");function Tl(e,t){let[r,n,i]=e.split(".").map(Number),[u,c,l]=t.split(".").map(Number);return r!==u?r<u:n!==c?n<c:i<l}o(Tl,"isSemverLessThan");var $l=h(C(a(),C(a(),a()))),ji=p({id:h(a()),name:a(),displayName:a(),logoUrl:a(),description:a(),authors:j(a()),platformId:h(a()),directoryPath:h(a()),auth:h(L([at,j(at)])),version:a(),categories:h(j(H(nt))),minimumSupportedRelease:h(a()),maximumSupportedRelease:h(a()),i18n:$l}),El=H(["human","ai","both"]),Li=p({description:h(a()),idempotent:h(Y())}),Fi=p({name:a(),displayName:a(),description:a(),props:on,requireAuth:Y(),errorHandlingOptions:h(Mr),outputSchema:h(Qt()),audience:h(El),aiMetadata:h(Li)}),Bi=p({name:a(),displayName:a(),description:a(),props:on,errorHandlingOptions:h(Mr),type:H(je),sampleData:N(),handshakeConfiguration:h(Qt()),renewConfiguration:h(Ni),testStrategy:H(Ot),outputSchema:h(Qt()),aiMetadata:h(Li)}),Sl=p({...ji.shape,actions:C(a(),Fi),triggers:C(a(),Bi)}),Al=p({...ji.shape,actions:fe(),triggers:fe(),suggestedActions:h(j(Bi)),suggestedTriggers:h(j(Fi))}),Vi=p({projectUsage:fe(),tags:h(j(a())),pieceType:H(rt),packageType:H(zt),platformId:h(a()),archiveId:h(a())}),ZE=p({...Sl.shape,...Vi.shape}),HE=p({...Al.shape,...Vi.shape}),WE=p({name:a(),version:a()});var zl=Ze(require("path")),kl=Ze(require("fs/promises"));var ur=class{constructor(t,r){this.baseUrl=t;this.authenticationConverter=r}static{o(this,"BaseHttpClient")}getUrl(t){let r=new URL(`${this.baseUrl}${t.url}`),n=`${r.origin}${r.pathname}`,i=new URLSearchParams;return r.searchParams.forEach((u,c)=>{i.append(c,u)}),{urlWithoutQueryParams:n,queryParams:i}}getHeaders(t){let r={Accept:"application/json"};if(t.authentication&&this.populateAuthentication(t.authentication,r),t.body)switch(t.headers?.["Content-Type"]){case"text/csv":r["Content-Type"]="text/csv";break;default:r["Content-Type"]="application/json";break}return t.headers&&(r={...r,...t.headers}),r}populateAuthentication(t,r){this.authenticationConverter.convert(t,r)}};var cr=class{static{o(this,"DelegatingAuthenticationConverter")}constructor(t=new sn,r=new un){this.converters={BEARER_TOKEN:t,BASIC:r}}convert(t,r){return this.converters[t.type].convert(t,r)}},sn=class{static{o(this,"BearerTokenAuthenticationConverter")}convert(t,r){return r.Authorization=`Bearer ${t.token}`,r}},un=class{static{o(this,"BasicTokenAuthenticationConverter")}convert(t,r){let n=`${t.username}:${t.password}`,i=Buffer.from(n).toString("base64");return r.Authorization=`Basic ${i}`,r}};var lr=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 pr=class extends ur{static{o(this,"FetchHttpClient")}constructor(t="",r=new cr){super(t,r)}async sendRequest(t,r){process.env.NODE_TLS_REJECT_UNAUTHORIZED="0";let{urlWithoutQueryParams:n,queryParams:i}=this.getUrl(t),u=this.getHeaders(t),c=t.queryParams??{};for(let[M,ee]of Object.entries(c))i.append(M,ee);let l=i.toString(),f=l?`${n}?${l}`:n,g=t.responseType??"json",_=t.followRedirects??!0,T=t.retries??0,{body:x,extraHeaders:s,isStream:d}=wl(t.body,u),y=Rl({...u,...s}),m=await Ol(async()=>{let M=new AbortController,ee=t.timeout&&t.timeout>0?setTimeout(()=>M.abort(),t.timeout):void 0;try{let q={method:t.method.toString(),headers:y,body:x,redirect:_?"follow":"manual",signal:M.signal};return d&&(q.duplex="half"),r?.dispatcher!==void 0&&(q.dispatcher=r.dispatcher),await fetch(f,q)}finally{ee!==void 0&&clearTimeout(ee)}},T),v=_?300:400;if(m.status<200||m.status>=v){let M=await Zi(m,g),ee=new lr(t.body,{status:m.status,responseBody:M});throw console.error("[HttpClient#(sanitized error message)] Request failed:",ee),ee}let P=await Zi(m,g);return{status:m.status,headers:Dl(m.headers),body:P}}};function wl(e,t){return Cl(e)?{body:void 0,extraHeaders:{},isStream:!1}:Nl(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(wl,"serializeBody");async function Zi(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(Zi,"parseResponseBody");async function Ol(e,t){let r;for(let n=0;n<=t;n++)try{let i=await e();if(i.status>=500&&n<t){await Hi(n);continue}return i}catch(i){if(r=i,n<t){await Hi(n);continue}throw i}throw r}o(Ol,"sendWithRetries");function Hi(e){let t=Math.min(1e3*2**e,3e4);return new Promise(r=>setTimeout(r,t))}o(Hi,"backoff");function Rl(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(Rl,"normalizeHeaders");function Dl(e){let t={};return e.forEach((r,n)=>{t[n]=r}),t}o(Dl,"toHttpHeaders");function Nl(e){return typeof e=="object"&&e!==null&&typeof e.getHeaders=="function"&&typeof e.pipe=="function"}o(Nl,"isNodeFormData");function Cl(e){return e==null}o(Cl,"isNil");var dr=new pr;var cn=(c=>(c.GET="GET",c.POST="POST",c.PATCH="PATCH",c.PUT="PUT",c.DELETE="DELETE",c.HEAD="HEAD",c))(cn||{});var Id=Ze(require("fs")),Xs=Ze(Js());var Td={"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 $d(e){let t=e.split(";")[0].trim().toLowerCase();return Td[t]??""}o($d,"contentTypeToExtension");var Ed=o(({baseUrl:e,relativePath:t})=>{let r=e.endsWith("/")?e:`${e}/`,n=t.startsWith("/")?t.slice(1):t;return`${r}${n}`},"joinBaseUrlWithRelativePath"),Sd=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 Ys({auth:e,baseUrl:t,authMapping:r,description:n,displayName:i,name:u,props:c,extraProps:l,authLocation:f="headers"}){return er({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:W.DynamicProperties({auth:e,displayName:"",required:!0,refreshers:[],props:o(async({auth:g})=>({url:W.ShortText({displayName:"URL",description:`You can either use the full URL or the relative path to the base URL
3
+ i.e ${Sd(t,g)}/resource or /resource`,required:!0,defaultValue:g?t(g):"",...c?.url??{}})}),"props")}),method:W.StaticDropdown({displayName:"Method",required:!0,options:{options:Object.values(cn).map(g=>({label:g,value:g}))},...c?.method??{}}),headers:W.Object({displayName:"Headers",description:"Authorization headers are injected automatically from your connection.",required:!0,...c?.headers??{}}),queryParams:W.Object({displayName:"Query Parameters",required:!0,...c?.queryParams??{}}),body_type:W.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:W.DynamicProperties({auth:e,displayName:"Body",refreshers:["body_type"],required:!1,props:o(async({body_type:g})=>{if(!g)return{};let _=g,T={};switch(_){case"none":break;case"json":T.data=W.Json({displayName:"JSON Body",required:!0,...c?.body??{}});break;case"raw":T.data=W.LongText({displayName:"Raw Body",required:!0});break;case"form_data":T.data=W.Array({displayName:"Form Data",required:!0,properties:{fieldName:W.ShortText({displayName:"Field Name",required:!0}),fieldType:W.StaticDropdown({displayName:"Field Type",required:!0,options:{disabled:!1,options:[{label:"Text",value:"text"},{label:"File",value:"file"}]}}),textFieldValue:W.LongText({displayName:"Text Field Value",required:!1}),fileFieldValue:W.File({displayName:"File Field Value",required:!1})}});break}return T},"props")}),response_is_binary:W.Checkbox({displayName:"Response is Binary ?",description:"Enable for files like PDFs, images, etc.",required:!1,defaultValue:!1}),failsafe:W.Checkbox({displayName:"No Error on Failure",required:!1,...c?.failsafe??{}}),timeout:W.Number({displayName:"Timeout (in seconds)",required:!1,...c?.timeout??{}}),followRedirects:W.Checkbox({displayName:"Follow redirects",required:!1,defaultValue:!1}),...l},run:o(async g=>{let{method:_,url:T,headers:x,queryParams:s,body:d,body_type:y,failsafe:m,timeout:v,response_is_binary:P,followRedirects:M}=g.propsValue;or(_,"Method"),or(T,"URL");let ee=pe(r)?{}:await r(g.auth,g.propsValue),q=T.url,me=q.startsWith("http://")||q.startsWith("https://")?q:Ed({baseUrl:t(g.auth),relativePath:q}),X={method:_,url:me,headers:{...x??{},...f==="headers"||!pe(f)?ee:{}},queryParams:{...f==="queryParams"?ee:{},...s??{}},timeout:v?v*1e3:0,followRedirects:M};if(P&&(X.responseType="arraybuffer"),d)if(y&&y!=="none"){let F=d.data;if(y==="form_data"){let Oe=F,$e=new Xs.default;for(let{fieldName:w,fieldType:I,textFieldValue:b,fileFieldValue:E}of Oe)I==="text"&&!Rt(b)?$e.append(w,b):I==="file"&&!Rt(E)&&$e.append(w,E.data,{filename:E?.filename});X.body=$e,X.headers={...X.headers,...$e.getHeaders()}}else X.body=F}else y||(X.body=d);try{let F=await dr.sendRequest(X);return await Ad(g.files,F.body,F.status,F.headers,P)}catch(F){if(m)return F.errorMessage();throw F}},"run")})}o(Ys,"createCustomApiCallAction");var Ad=o(async(e,t,r,n,i)=>{let u;if(i&&zd(t)){let c=Array.isArray(n?.["content-type"])?n["content-type"][0]:n?.["content-type"],l=$d(c??"")||"txt",f;t instanceof ArrayBuffer?f=Buffer.from(new Uint8Array(t)):Buffer.isBuffer(t)?f=t:f=Buffer.from(t),u=await e.write({fileName:`output.${l}`,data:f})}else u=t;return{status:r,headers:n,body:u}},"handleBinaryResponse"),zd=o(e=>e instanceof ArrayBuffer||Buffer.isBuffer(e),"isBinaryBody");var jt={async poll(e,{store:t,auth:r,propsValue:n,maxItemsToPoll:i,files:u,server:c}){switch(e.strategy){case 0:{let l=await t.get("lastPoll");if(pe(l))throw new Error("lastPoll doesn't exist in the store.");let f=await e.items({store:t,auth:r,propsValue:n,lastFetchEpochMS:l,server:c}),g=f.reduce((_,T)=>Math.max(_,T.epochMilliSeconds),l);return await t.put("lastPoll",g),f.filter(_=>_.epochMilliSeconds>l).map(_=>_.data)}case 1:{let l=await t.get("lastItem"),f=await e.items({store:t,auth:r,propsValue:n,lastItemId:l,files:u,server:c}),g=f.findIndex(x=>x.id===l),_=[];pe(l)||g==-1?_=f??[]:_=f?.slice(0,g)??[],pe(i)||(_=_.slice(-i));let T=_?.[0]?.id;return pe(T)||await t.put("lastItem",T),_.map(x=>x.data)}}},async onEnable(e,{store:t,auth:r,propsValue:n,server:i}){switch(e.strategy){case 0:{await t.put("lastPoll",Date.now());break}case 1:{let c=(await e.items({store:t,auth:r,propsValue:n,lastItemId:null,server:i}))?.[0]?.id;pe(c)?await t.delete("lastItem"):await t.put("lastItem",c);break}}},async onDisable(e,t){switch(e.strategy){case 0:case 1:return}},async test(e,{auth:t,propsValue:r,store:n,files:i,server:u}){let c=[];switch(e.strategy){case 0:{c=await e.items({store:n,auth:t,propsValue:r,lastFetchEpochMS:0,server:u});break}case 1:{c=await e.items({store:n,auth:t,propsValue:r,lastItemId:null,files:i,server:u});break}}return kd(c.map(l=>l.data))}};function kd(e){return e.length<=5?e:e.slice(0,5)}o(kd,"getFirstFiveOrAll");var wd="https://api.presenton.ai/api/v1";async function Ke(e,t,r,n){try{return(await dr.sendRequest({method:t,url:`${wd}${r}`,headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json"},body:n})).body}catch(i){throw new Error(`Unexpected error: ${i.message||String(i)}`)}}o(Ke,"makeRequest");var Je=nn.SecretText({displayName:"Presenton API Key",description:`
4
+ `,required:!0,validate:o(async({auth:e})=>{if(e)try{return await Ke(e,"GET","/ppt/presentation/all",{}),{valid:!0}}catch{return{valid:!1,error:"Invalid Api Key"}}return{valid:!1,error:"Invalid Api Key"}},"validate")});var Qs=er({auth:Je,name:"generate_presentations",displayName:"Generate Presentations (async)",description:"Create an asynchronous presentation generation task at Presenton and return the created task.",audience:"both",aiMetadata:{description:"Generate an AI-powered slide presentation in Presenton from a content prompt (or per-slide markdown), then poll until generation completes (up to 120 seconds) and return the finished presentation. Use when an agent needs to produce a deck from a topic or outline, optionally controlling tone, slide count, theme/template, image style (stock vs. AI-generated), web search, and export format (PPTX or PDF). Each call starts a new generation task, so it is not idempotent.",idempotent:!1},props:{content:W.LongText({displayName:"Content",description:"The content for generating the presentation",required:!1}),instructions:W.LongText({displayName:"Instructions",description:"Instruction for generating the presentation (optional).",required:!1}),tone:W.StaticDropdown({displayName:"Tone",description:"Tone to use for the text",required:!1,defaultValue:"default",options:{options:[{value:"default",label:"Default"},{value:"casual",label:"Casual"},{value:"professional",label:"Professional"},{value:"funny",label:"Funny"},{value:"educational",label:"Educational"},{value:"sales_pitch",label:"Sales pitch"}]}}),verbosity:W.StaticDropdown({displayName:"Verbosity",description:"How verbose the text should be",required:!1,defaultValue:"standard",options:{options:[{value:"concise",label:"Concise"},{value:"standard",label:"Standard"},{value:"text-heavy",label:"Text-heavy"}]}}),slides_markdown:W.Array({displayName:"Slides markdown",description:"An array of markdown strings for each slide (optional).",required:!1,defaultValue:[]}),markdown_emphasis:W.Checkbox({displayName:"Markdown emphasis",description:"Whether to emphasize the markdown",required:!1,defaultValue:!0}),web_search:W.Checkbox({displayName:"Enable web search",description:"Whether to enable web search",required:!1,defaultValue:!1}),image_type:W.StaticDropdown({displayName:"Image type",description:"Type of image to generate",required:!1,defaultValue:"stock",options:{options:[{value:"stock",label:"Stock"},{value:"ai-generated",label:"AI generated"}]}}),theme:W.ShortText({displayName:"Theme",description:"Theme to use for the presentation (e.g. edge-yellow, light-rose)",required:!1}),n_slides:W.Number({displayName:"Number of slides",description:"Number of slides to generate",required:!1,defaultValue:8}),language:W.ShortText({displayName:"Language",description:"Language for the presentation",required:!1,defaultValue:"English"}),template:W.StaticDropdown({displayName:"Template",description:"Template to use for the presentation",required:!1,defaultValue:"general",options:{options:[{value:"general",label:"General"},{value:"modern",label:"Modern"},{value:"standard",label:"Standard"},{value:"swift",label:"Swift"}]}}),include_table_of_contents:W.Checkbox({displayName:"Include table of contents",description:"Whether to include a table of contents",required:!1,defaultValue:!1}),include_title_slide:W.Checkbox({displayName:"Include title slide",description:"Whether to include a title slide",required:!1,defaultValue:!0}),allow_access_to_user_info:W.Checkbox({displayName:"Allow access to user's info",description:"Whether to allow access to user's info",required:!1,defaultValue:!0}),files:W.Array({displayName:"Files",description:"Array of file identifiers uploaded via Presenton files API (optional).",required:!1,defaultValue:[]}),export_as:W.StaticDropdown({displayName:"Export as",description:"Export format",required:!1,defaultValue:"pptx",options:{options:[{value:"pptx",label:"PPTX"},{value:"pdf",label:"PDF"}]}}),trigger_webhook:W.Checkbox({displayName:"Trigger webhook",description:"Whether to trigger subscribed webhooks",required:!1,defaultValue:!1})},async run({auth:e,propsValue:t}){let r=e.secret_text,{content:n,slides_markdown:i,instructions:u,tone:c,verbosity:l,markdown_emphasis:f,web_search:g,image_type:_,theme:T,n_slides:x,language:s,template:d,include_table_of_contents:y,include_title_slide:m,allow_access_to_user_info:v,files:P,export_as:M,trigger_webhook:ee}=t,q={};n&&(q.content=n),i&&(q.slides_markdown=i),u&&(q.instructions=u),c&&(q.tone=c),l&&(q.verbosity=l),q.markdown_emphasis=f??!0,q.web_search=g??!1,_&&(q.image_type=_),T&&(q.theme=T),q.n_slides=Number(x??8),q.language=s??"English",q.template=d??"general",q.include_table_of_contents=y??!1,q.include_title_slide=m??!0,q.allow_access_to_user_info=v??!0,P&&(q.files=P),q.export_as=M??"pptx",q.trigger_webhook=ee??!1;try{let me=await Ke(r,"POST","/ppt/presentation/generate/async",q),X=5,F=me.id;if(!F)throw new Error(`Presenton did not return a task id: ${JSON.stringify(me)}`);let Oe=Date.now(),$e=120*1e3,w=o(I=>new Promise(b=>setTimeout(b,I)),"sleep");for(;Date.now()-Oe<$e;){let I=await Ke(r,"GET",`/ppt/presentation/status/${F}`);if(I.status==="completed")return I;if(I.status==="failed")throw new Error(`Presentation generation failed: ${JSON.stringify(I)}`);await w(X*1e3)}throw new Error("Timed out waiting for presentation generation after 120 seconds")}catch(me){throw new Error(`Presenton API error: ${me}`)}}});var tu=Ze(eu());var br={strategy:0,items:o(async({auth:e,propsValue:t,lastFetchEpochMS:r})=>{let n=e.secret_text;return(await Ke(n,"GET","/ppt/presentation/all")).results.map(c=>({epochMilliSeconds:(0,tu.default)(c.created_at).valueOf(),data:c}))},"items")},ru=Ci({auth:Je,name:"newPresentation",displayName:"New Presentation",description:"Triggers when a new presentation is created in Presenton.",aiMetadata:{description:"Fires when a new presentation is created in the connected Presenton account, emitting the newly created presentation. Polls the presentation list and deduplicates by creation time, so each presentation is delivered once."},props:{},sampleData:{id:"93d4092b-2a20-4637-bbe7-2addb6273761",user:"fa86a74f-53b9-46fa-9ac9-e3a526d125ca",content:"Indian society ",n_slides:1,language:"English",title:" AI **Presented by:** Jon deo -",created_at:"2025-11-11T11:33:55.269027Z",updated_at:"2025-11-11T11:34:12.978847Z",tone:"default",verbosity:"standard",theme:null,slides:[{presentation:"93d4092b-2a20-4637-bbe7-2addb6273761",layout:"general:general-intro-slide",index:0,layout_group:"general",speaker_note:"",id:"38ca1626-83ef-451f-8529-8b10725bcb3f",content:{title:"AI Presentation",description:"",presenterName:"Jon Deo",presentationDate:"2025-11-11",image:{__image_prompt__:"r",__image_url__:"https://images.pexels.com/photos/17898879/pexels-photo-17898879.jpeg?auto=compress&cs=tinysrgb&h=650&w=940"},__speaker_note__:""},html_content:null,properties:null}]},type:"POLLING",async test(e){return await jt.test(br,e)},async onEnable(e){let{store:t,auth:r,propsValue:n}=e;await jt.onEnable(br,{store:t,auth:r,propsValue:n})},async onDisable(e){let{store:t,auth:r,propsValue:n}=e;await jt.onDisable(br,{store:t,auth:r,propsValue:n})},async run(e){return await jt.poll(br,e)}});var Od=Mi({displayName:"Presenton",description:"Generate AI-powered presentations using Presenton (https://presenton.ai). Supports templates, themes, images, synchronous and asynchronous generation, status polling, and export to PPTX/PDF.",auth:Je,minimumSupportedRelease:"0.36.1",logoUrl:"https://cdn.activepieces.com/pieces/presenton.png",categories:["ARTIFICIAL_INTELLIGENCE","CONTENT_AND_FILES"],authors:["sanket-a11y"],actions:[Qs,Ys({auth:Je,baseUrl:o(()=>"https://api.presenton.ai/api/v1","baseUrl"),authMapping:o(async e=>({Authorization:`Bearer ${e.secret_text}`}),"authMapping")})],triggers:[ru]});0&&(module.exports={presentation});
5
+ /*! Bundled license information:
6
+
7
+ mime-types/index.js:
8
+ (*!
9
+ * mime-types
10
+ * Copyright(c) 2014 Jonathan Ong
11
+ * Copyright(c) 2015 Douglas Christopher Wilson
12
+ * MIT Licensed
13
+ *)
14
+ */
package/src/index.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export declare const presentation: 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":"AAQA,eAAO,MAAM,YAAY,mHAyBvB,CAAC"}
package/src/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;AAAA,qEAA6D;AAC7D,iFAA6E;AAE7E,4CAAkD;AAClD,iDAAqD;AACrD,sEAAkE;AAClE,+DAAwE;AAE3D,QAAA,YAAY,GAAG,IAAA,8BAAW,EAAC;IACtC,WAAW,EAAE,WAAW;IACxB,WAAW,EACT,gMAAgM;IAClM,IAAI,EAAE,oBAAa;IACnB,uBAAuB,EAAE,QAAQ;IACjC,OAAO,EAAE,mDAAmD;IAC5D,UAAU,EAAE;QACV,sBAAa,CAAC,uBAAuB;QACrC,sBAAa,CAAC,iBAAiB;KAChC;IACD,OAAO,EAAE,CAAC,aAAa,CAAC;IACxB,OAAO,EAAE;QACP,8CAAqB;QACrB,IAAA,yCAAyB,EAAC;YACxB,IAAI,EAAE,oBAAa;YACnB,OAAO,EAAE,GAAG,EAAE,CAAC,iCAAiC;YAChD,WAAW,EAAE,CAAO,IAAI,EAAE,EAAE;gBAC1B,OAAO;oBACL,aAAa,EAAE,UAAU,IAAI,CAAC,WAAW,EAAE;iBAC5C,CAAC;YACJ,CAAC,CAAA;SACF,CAAC;KACH;IACD,QAAQ,EAAE,CAAC,kCAAe,CAAC;CAC5B,CAAC,CAAC"}
@@ -1,21 +0,0 @@
1
- export declare const generatePresentations: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
2
- content: import("@activepieces/pieces-framework").LongTextProperty<false>;
3
- instructions: import("@activepieces/pieces-framework").LongTextProperty<false>;
4
- tone: import("@activepieces/pieces-framework").StaticDropdownProperty<string, false>;
5
- verbosity: import("@activepieces/pieces-framework").StaticDropdownProperty<string, false>;
6
- slides_markdown: import("@activepieces/pieces-framework").ArrayProperty<false>;
7
- markdown_emphasis: import("@activepieces/pieces-framework").CheckboxProperty<false>;
8
- web_search: import("@activepieces/pieces-framework").CheckboxProperty<false>;
9
- image_type: import("@activepieces/pieces-framework").StaticDropdownProperty<string, false>;
10
- theme: import("@activepieces/pieces-framework").ShortTextProperty<false>;
11
- n_slides: import("@activepieces/pieces-framework").NumberProperty<false>;
12
- language: import("@activepieces/pieces-framework").ShortTextProperty<false>;
13
- template: import("@activepieces/pieces-framework").StaticDropdownProperty<string, false>;
14
- include_table_of_contents: import("@activepieces/pieces-framework").CheckboxProperty<false>;
15
- include_title_slide: import("@activepieces/pieces-framework").CheckboxProperty<false>;
16
- allow_access_to_user_info: import("@activepieces/pieces-framework").CheckboxProperty<false>;
17
- files: import("@activepieces/pieces-framework").ArrayProperty<false>;
18
- export_as: import("@activepieces/pieces-framework").StaticDropdownProperty<string, false>;
19
- trigger_webhook: import("@activepieces/pieces-framework").CheckboxProperty<false>;
20
- }>;
21
- //# sourceMappingURL=generate-presentations.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"generate-presentations.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/generate-presentations.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;EA6PhC,CAAC"}
@@ -1,222 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.generatePresentations = void 0;
4
- const tslib_1 = require("tslib");
5
- const pieces_framework_1 = require("@activepieces/pieces-framework");
6
- const auth_1 = require("../common/auth");
7
- const client_1 = require("../common/client");
8
- const pieces_common_1 = require("@activepieces/pieces-common");
9
- exports.generatePresentations = (0, pieces_framework_1.createAction)({
10
- auth: auth_1.presentonAuth,
11
- name: 'generate_presentations',
12
- displayName: 'Generate Presentations (async)',
13
- description: 'Create an asynchronous presentation generation task at Presenton and return the created task.',
14
- audience: 'both',
15
- aiMetadata: {
16
- description: 'Generate an AI-powered slide presentation in Presenton from a content prompt (or per-slide markdown), then poll until generation completes (up to 120 seconds) and return the finished presentation. Use when an agent needs to produce a deck from a topic or outline, optionally controlling tone, slide count, theme/template, image style (stock vs. AI-generated), web search, and export format (PPTX or PDF). Each call starts a new generation task, so it is not idempotent.',
17
- idempotent: false,
18
- },
19
- props: {
20
- content: pieces_framework_1.Property.LongText({
21
- displayName: 'Content',
22
- description: 'The content for generating the presentation',
23
- required: false,
24
- }),
25
- instructions: pieces_framework_1.Property.LongText({
26
- displayName: 'Instructions',
27
- description: 'Instruction for generating the presentation (optional).',
28
- required: false,
29
- }),
30
- tone: pieces_framework_1.Property.StaticDropdown({
31
- displayName: 'Tone',
32
- description: 'Tone to use for the text',
33
- required: false,
34
- defaultValue: 'default',
35
- options: {
36
- options: [
37
- { value: 'default', label: 'Default' },
38
- { value: 'casual', label: 'Casual' },
39
- { value: 'professional', label: 'Professional' },
40
- { value: 'funny', label: 'Funny' },
41
- { value: 'educational', label: 'Educational' },
42
- { value: 'sales_pitch', label: 'Sales pitch' },
43
- ],
44
- },
45
- }),
46
- verbosity: pieces_framework_1.Property.StaticDropdown({
47
- displayName: 'Verbosity',
48
- description: 'How verbose the text should be',
49
- required: false,
50
- defaultValue: 'standard',
51
- options: {
52
- options: [
53
- { value: 'concise', label: 'Concise' },
54
- { value: 'standard', label: 'Standard' },
55
- { value: 'text-heavy', label: 'Text-heavy' },
56
- ],
57
- },
58
- }),
59
- slides_markdown: pieces_framework_1.Property.Array({
60
- displayName: 'Slides markdown',
61
- description: 'An array of markdown strings for each slide (optional).',
62
- required: false,
63
- defaultValue: [],
64
- }),
65
- markdown_emphasis: pieces_framework_1.Property.Checkbox({
66
- displayName: 'Markdown emphasis',
67
- description: 'Whether to emphasize the markdown',
68
- required: false,
69
- defaultValue: true,
70
- }),
71
- web_search: pieces_framework_1.Property.Checkbox({
72
- displayName: 'Enable web search',
73
- description: 'Whether to enable web search',
74
- required: false,
75
- defaultValue: false,
76
- }),
77
- image_type: pieces_framework_1.Property.StaticDropdown({
78
- displayName: 'Image type',
79
- description: 'Type of image to generate',
80
- required: false,
81
- defaultValue: 'stock',
82
- options: {
83
- options: [
84
- { value: 'stock', label: 'Stock' },
85
- { value: 'ai-generated', label: 'AI generated' },
86
- ],
87
- },
88
- }),
89
- theme: pieces_framework_1.Property.ShortText({
90
- displayName: 'Theme',
91
- description: 'Theme to use for the presentation (e.g. edge-yellow, light-rose)',
92
- required: false,
93
- }),
94
- n_slides: pieces_framework_1.Property.Number({
95
- displayName: 'Number of slides',
96
- description: 'Number of slides to generate',
97
- required: false,
98
- defaultValue: 8,
99
- }),
100
- language: pieces_framework_1.Property.ShortText({
101
- displayName: 'Language',
102
- description: 'Language for the presentation',
103
- required: false,
104
- defaultValue: 'English',
105
- }),
106
- template: pieces_framework_1.Property.StaticDropdown({
107
- displayName: 'Template',
108
- description: 'Template to use for the presentation',
109
- required: false,
110
- defaultValue: 'general',
111
- options: {
112
- options: [
113
- { value: 'general', label: 'General' },
114
- { value: 'modern', label: 'Modern' },
115
- { value: 'standard', label: 'Standard' },
116
- { value: 'swift', label: 'Swift' },
117
- ],
118
- },
119
- }),
120
- include_table_of_contents: pieces_framework_1.Property.Checkbox({
121
- displayName: 'Include table of contents',
122
- description: 'Whether to include a table of contents',
123
- required: false,
124
- defaultValue: false,
125
- }),
126
- include_title_slide: pieces_framework_1.Property.Checkbox({
127
- displayName: 'Include title slide',
128
- description: 'Whether to include a title slide',
129
- required: false,
130
- defaultValue: true,
131
- }),
132
- allow_access_to_user_info: pieces_framework_1.Property.Checkbox({
133
- displayName: "Allow access to user's info",
134
- description: "Whether to allow access to user's info",
135
- required: false,
136
- defaultValue: true,
137
- }),
138
- files: pieces_framework_1.Property.Array({
139
- displayName: 'Files',
140
- description: 'Array of file identifiers uploaded via Presenton files API (optional).',
141
- required: false,
142
- defaultValue: [],
143
- }),
144
- export_as: pieces_framework_1.Property.StaticDropdown({
145
- displayName: 'Export as',
146
- description: 'Export format',
147
- required: false,
148
- defaultValue: 'pptx',
149
- options: {
150
- options: [
151
- { value: 'pptx', label: 'PPTX' },
152
- { value: 'pdf', label: 'PDF' },
153
- ],
154
- },
155
- }),
156
- trigger_webhook: pieces_framework_1.Property.Checkbox({
157
- displayName: 'Trigger webhook',
158
- description: 'Whether to trigger subscribed webhooks',
159
- required: false,
160
- defaultValue: false,
161
- }),
162
- },
163
- run(_a) {
164
- return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth, propsValue }) {
165
- const apiKey = auth.secret_text;
166
- const { content, slides_markdown, instructions, tone, verbosity, markdown_emphasis, web_search, image_type, theme, n_slides, language, template, include_table_of_contents, include_title_slide, allow_access_to_user_info, files, export_as, trigger_webhook, } = propsValue;
167
- const body = {};
168
- if (content)
169
- body['content'] = content;
170
- if (slides_markdown)
171
- body['slides_markdown'] = slides_markdown;
172
- if (instructions)
173
- body['instructions'] = instructions;
174
- if (tone)
175
- body['tone'] = tone;
176
- if (verbosity)
177
- body['verbosity'] = verbosity;
178
- body['markdown_emphasis'] = markdown_emphasis !== null && markdown_emphasis !== void 0 ? markdown_emphasis : true;
179
- body['web_search'] = web_search !== null && web_search !== void 0 ? web_search : false;
180
- if (image_type)
181
- body['image_type'] = image_type;
182
- if (theme)
183
- body['theme'] = theme;
184
- body['n_slides'] = Number(n_slides !== null && n_slides !== void 0 ? n_slides : 8);
185
- body['language'] = language !== null && language !== void 0 ? language : 'English';
186
- body['template'] = template !== null && template !== void 0 ? template : 'general';
187
- body['include_table_of_contents'] = include_table_of_contents !== null && include_table_of_contents !== void 0 ? include_table_of_contents : false;
188
- body['include_title_slide'] = include_title_slide !== null && include_title_slide !== void 0 ? include_title_slide : true;
189
- body['allow_access_to_user_info'] = allow_access_to_user_info !== null && allow_access_to_user_info !== void 0 ? allow_access_to_user_info : true;
190
- if (files)
191
- body['files'] = files;
192
- body['export_as'] = export_as !== null && export_as !== void 0 ? export_as : 'pptx';
193
- body['trigger_webhook'] = trigger_webhook !== null && trigger_webhook !== void 0 ? trigger_webhook : false;
194
- try {
195
- const response = yield (0, client_1.makeRequest)(apiKey, pieces_common_1.HttpMethod.POST, '/ppt/presentation/generate/async', body);
196
- const pollIntervalSeconds = 5;
197
- const taskId = response.id;
198
- if (!taskId) {
199
- throw new Error(`Presenton did not return a task id: ${JSON.stringify(response)}`);
200
- }
201
- const start = Date.now();
202
- const timeoutMs = 120 * 1000;
203
- const sleep = (ms) => new Promise((res) => setTimeout(res, ms));
204
- while (Date.now() - start < timeoutMs) {
205
- const statusResp = yield (0, client_1.makeRequest)(apiKey, pieces_common_1.HttpMethod.GET, `/ppt/presentation/status/${taskId}`);
206
- if (statusResp.status === 'completed') {
207
- return statusResp;
208
- }
209
- if (statusResp.status === 'failed') {
210
- throw new Error(`Presentation generation failed: ${JSON.stringify(statusResp)}`);
211
- }
212
- yield sleep(pollIntervalSeconds * 1000);
213
- }
214
- throw new Error(`Timed out waiting for presentation generation after 120 seconds`);
215
- }
216
- catch (err) {
217
- throw new Error(`Presenton API error: ${err}`);
218
- }
219
- });
220
- },
221
- });
222
- //# sourceMappingURL=generate-presentations.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"generate-presentations.js","sourceRoot":"","sources":["../../../../src/lib/actions/generate-presentations.ts"],"names":[],"mappings":"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"}
@@ -1,2 +0,0 @@
1
- export declare const presentonAuth: import("@activepieces/pieces-framework").SecretTextProperty<true>;
2
- //# sourceMappingURL=auth.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../../src/lib/common/auth.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,aAAa,mEA6BxB,CAAC"}
@@ -1,34 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.presentonAuth = void 0;
4
- const tslib_1 = require("tslib");
5
- const pieces_framework_1 = require("@activepieces/pieces-framework");
6
- const client_1 = require("./client");
7
- const pieces_common_1 = require("@activepieces/pieces-common");
8
- exports.presentonAuth = pieces_framework_1.PieceAuth.SecretText({
9
- displayName: 'Presenton API Key',
10
- description: `
11
- `,
12
- required: true,
13
- validate: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
14
- if (auth) {
15
- try {
16
- yield (0, client_1.makeRequest)(auth, pieces_common_1.HttpMethod.GET, '/ppt/presentation/all', {});
17
- return {
18
- valid: true,
19
- };
20
- }
21
- catch (error) {
22
- return {
23
- valid: false,
24
- error: 'Invalid Api Key',
25
- };
26
- }
27
- }
28
- return {
29
- valid: false,
30
- error: 'Invalid Api Key',
31
- };
32
- }),
33
- });
34
- //# sourceMappingURL=auth.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"auth.js","sourceRoot":"","sources":["../../../../src/lib/common/auth.ts"],"names":[],"mappings":";;;;AAAA,qEAA2D;AAC3D,qCAAuC;AACvC,+DAAyD;AAE5C,QAAA,aAAa,GAAG,4BAAS,CAAC,UAAU,CAAC;IAChD,WAAW,EAAE,mBAAmB;IAChC,WAAW,EAAE;CACd;IACC,QAAQ,EAAE,IAAI;IACd,QAAQ,EAAE,KAAiB,EAAE,oDAAZ,EAAE,IAAI,EAAE;QACvB,IAAI,IAAI,EAAE,CAAC;YACT,IAAI,CAAC;gBACH,MAAM,IAAA,oBAAW,EACf,IAAc,EACd,0BAAU,CAAC,GAAG,EACd,uBAAuB,EACvB,EAAE,CACH,CAAC;gBACF,OAAO;oBACL,KAAK,EAAE,IAAI;iBACZ,CAAC;YACJ,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,OAAO;oBACL,KAAK,EAAE,KAAK;oBACZ,KAAK,EAAE,iBAAiB;iBACzB,CAAC;YACJ,CAAC;QACH,CAAC;QACD,OAAO;YACL,KAAK,EAAE,KAAK;YACZ,KAAK,EAAE,iBAAiB;SACzB,CAAC;IACJ,CAAC,CAAA;CACF,CAAC,CAAC"}
@@ -1,4 +0,0 @@
1
- import { HttpMethod } from '@activepieces/pieces-common';
2
- export declare const BASE_URL = "https://api.presenton.ai/api/v1";
3
- export declare function makeRequest(api_key: string, method: HttpMethod, path: string, body?: unknown): Promise<any>;
4
- //# sourceMappingURL=client.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../src/lib/common/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAc,MAAM,6BAA6B,CAAC;AAErE,eAAO,MAAM,QAAQ,oCAAoC,CAAC;AAE1D,wBAAsB,WAAW,CAC/B,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,UAAU,EAClB,IAAI,EAAE,MAAM,EACZ,IAAI,CAAC,EAAE,OAAO,gBAgBf"}
@@ -1,27 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BASE_URL = void 0;
4
- exports.makeRequest = makeRequest;
5
- const tslib_1 = require("tslib");
6
- const pieces_common_1 = require("@activepieces/pieces-common");
7
- exports.BASE_URL = `https://api.presenton.ai/api/v1`;
8
- function makeRequest(api_key, method, path, body) {
9
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
10
- try {
11
- const response = yield pieces_common_1.httpClient.sendRequest({
12
- method,
13
- url: `${exports.BASE_URL}${path}`,
14
- headers: {
15
- Authorization: `Bearer ${api_key}`,
16
- 'Content-Type': 'application/json',
17
- },
18
- body,
19
- });
20
- return response.body;
21
- }
22
- catch (error) {
23
- throw new Error(`Unexpected error: ${error.message || String(error)}`);
24
- }
25
- });
26
- }
27
- //# sourceMappingURL=client.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"client.js","sourceRoot":"","sources":["../../../../src/lib/common/client.ts"],"names":[],"mappings":";;;AAIA,kCAoBC;;AAxBD,+DAAqE;AAExD,QAAA,QAAQ,GAAG,iCAAiC,CAAC;AAE1D,SAAsB,WAAW,CAC/B,OAAe,EACf,MAAkB,EAClB,IAAY,EACZ,IAAc;;QAEd,IAAI,CAAC;YACH,MAAM,QAAQ,GAAG,MAAM,0BAAU,CAAC,WAAW,CAAC;gBAC5C,MAAM;gBACN,GAAG,EAAE,GAAG,gBAAQ,GAAG,IAAI,EAAE;gBACzB,OAAO,EAAE;oBACP,aAAa,EAAE,UAAU,OAAO,EAAE;oBAClC,cAAc,EAAE,kBAAkB;iBACnC;gBACD,IAAI;aACL,CAAC,CAAC;YACH,OAAO,QAAQ,CAAC,IAAI,CAAC;QACvB,CAAC;QAAC,OAAO,KAAU,EAAE,CAAC;YACpB,MAAM,IAAI,KAAK,CAAC,qBAAqB,KAAK,CAAC,OAAO,IAAI,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QACzE,CAAC;IACH,CAAC;CAAA"}
@@ -1,3 +0,0 @@
1
- import { TriggerStrategy } from '@activepieces/pieces-framework';
2
- export declare const newPresentation: import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.WEBHOOK, import("@activepieces/pieces-framework").SecretTextProperty<true>, {}> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.POLLING, import("@activepieces/pieces-framework").SecretTextProperty<true>, {}> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.MANUAL, import("@activepieces/pieces-framework").SecretTextProperty<true>, {}> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.APP_WEBHOOK, import("@activepieces/pieces-framework").SecretTextProperty<true>, {}>;
3
- //# sourceMappingURL=new-presentation.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"new-presentation.d.ts","sourceRoot":"","sources":["../../../../src/lib/triggers/new-presentation.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,eAAe,EAGhB,MAAM,gCAAgC,CAAC;AAkCxC,eAAO,MAAM,eAAe,klBAgE1B,CAAC"}
@@ -1,92 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.newPresentation = void 0;
4
- const tslib_1 = require("tslib");
5
- const pieces_framework_1 = require("@activepieces/pieces-framework");
6
- const pieces_common_1 = require("@activepieces/pieces-common");
7
- const dayjs_1 = tslib_1.__importDefault(require("dayjs"));
8
- const auth_1 = require("../common/auth");
9
- const client_1 = require("../common/client");
10
- const pieces_common_2 = require("@activepieces/pieces-common");
11
- const polling = {
12
- strategy: pieces_common_1.DedupeStrategy.TIMEBASED,
13
- items: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth, propsValue, lastFetchEpochMS }) {
14
- const apiKey = auth.secret_text;
15
- const response = yield (0, client_1.makeRequest)(apiKey, pieces_common_2.HttpMethod.GET, '/ppt/presentation/all');
16
- const itemsArray = response.results;
17
- return itemsArray.map((item) => ({
18
- epochMilliSeconds: (0, dayjs_1.default)(item.created_at).valueOf(),
19
- data: item,
20
- }));
21
- }),
22
- };
23
- exports.newPresentation = (0, pieces_framework_1.createTrigger)({
24
- auth: auth_1.presentonAuth,
25
- name: 'newPresentation',
26
- displayName: 'New Presentation',
27
- description: 'Triggers when a new presentation is created in Presenton.',
28
- aiMetadata: {
29
- description: 'Fires when a new presentation is created in the connected Presenton account, emitting the newly created presentation. Polls the presentation list and deduplicates by creation time, so each presentation is delivered once.',
30
- },
31
- props: {},
32
- sampleData: {
33
- id: '93d4092b-2a20-4637-bbe7-2addb6273761',
34
- user: 'fa86a74f-53b9-46fa-9ac9-e3a526d125ca',
35
- content: 'Indian society ',
36
- n_slides: 1,
37
- language: 'English',
38
- title: ' AI **Presented by:** Jon deo -',
39
- created_at: '2025-11-11T11:33:55.269027Z',
40
- updated_at: '2025-11-11T11:34:12.978847Z',
41
- tone: 'default',
42
- verbosity: 'standard',
43
- theme: null,
44
- slides: [
45
- {
46
- presentation: '93d4092b-2a20-4637-bbe7-2addb6273761',
47
- layout: 'general:general-intro-slide',
48
- index: 0,
49
- layout_group: 'general',
50
- speaker_note: '',
51
- id: '38ca1626-83ef-451f-8529-8b10725bcb3f',
52
- content: {
53
- title: 'AI Presentation',
54
- description: '',
55
- presenterName: 'Jon Deo',
56
- presentationDate: '2025-11-11',
57
- image: {
58
- __image_prompt__: 'r',
59
- __image_url__: 'https://images.pexels.com/photos/17898879/pexels-photo-17898879.jpeg?auto=compress&cs=tinysrgb&h=650&w=940',
60
- },
61
- __speaker_note__: '',
62
- },
63
- html_content: null,
64
- properties: null,
65
- },
66
- ],
67
- },
68
- type: pieces_framework_1.TriggerStrategy.POLLING,
69
- test(context) {
70
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
71
- return yield pieces_common_1.pollingHelper.test(polling, context);
72
- });
73
- },
74
- onEnable(context) {
75
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
76
- const { store, auth, propsValue } = context;
77
- yield pieces_common_1.pollingHelper.onEnable(polling, { store, auth, propsValue });
78
- });
79
- },
80
- onDisable(context) {
81
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
82
- const { store, auth, propsValue } = context;
83
- yield pieces_common_1.pollingHelper.onDisable(polling, { store, auth, propsValue });
84
- });
85
- },
86
- run(context) {
87
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
88
- return yield pieces_common_1.pollingHelper.poll(polling, context);
89
- });
90
- },
91
- });
92
- //# sourceMappingURL=new-presentation.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"new-presentation.js","sourceRoot":"","sources":["../../../../src/lib/triggers/new-presentation.ts"],"names":[],"mappings":"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"}