@activepieces/piece-dropbox 0.7.2 → 0.7.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +7 -12
- package/src/index.js +13 -63
- package/src/index.d.ts +0 -2
- package/src/index.d.ts.map +0 -1
- package/src/index.js.map +0 -1
- package/src/lib/actions/copy-file.d.ts +0 -7
- package/src/lib/actions/copy-file.d.ts.map +0 -1
- package/src/lib/actions/copy-file.js +0 -63
- package/src/lib/actions/copy-file.js.map +0 -1
- package/src/lib/actions/copy-folder.d.ts +0 -7
- package/src/lib/actions/copy-folder.d.ts.map +0 -1
- package/src/lib/actions/copy-folder.js +0 -63
- package/src/lib/actions/copy-folder.js.map +0 -1
- package/src/lib/actions/create-new-folder.d.ts +0 -5
- package/src/lib/actions/create-new-folder.d.ts.map +0 -1
- package/src/lib/actions/create-new-folder.js +0 -53
- package/src/lib/actions/create-new-folder.js.map +0 -1
- package/src/lib/actions/create-new-text-file.d.ts +0 -8
- package/src/lib/actions/create-new-text-file.d.ts.map +0 -1
- package/src/lib/actions/create-new-text-file.js +0 -75
- package/src/lib/actions/create-new-text-file.js.map +0 -1
- package/src/lib/actions/delete-file.d.ts +0 -4
- package/src/lib/actions/delete-file.d.ts.map +0 -1
- package/src/lib/actions/delete-file.js +0 -43
- package/src/lib/actions/delete-file.js.map +0 -1
- package/src/lib/actions/delete-folder.d.ts +0 -4
- package/src/lib/actions/delete-folder.d.ts.map +0 -1
- package/src/lib/actions/delete-folder.js +0 -43
- package/src/lib/actions/delete-folder.js.map +0 -1
- package/src/lib/actions/download-file.d.ts +0 -4
- package/src/lib/actions/download-file.d.ts.map +0 -1
- package/src/lib/actions/download-file.js +0 -51
- package/src/lib/actions/download-file.js.map +0 -1
- package/src/lib/actions/get-file-link.d.ts +0 -4
- package/src/lib/actions/get-file-link.d.ts.map +0 -1
- package/src/lib/actions/get-file-link.js +0 -43
- package/src/lib/actions/get-file-link.js.map +0 -1
- package/src/lib/actions/list-a-folder.d.ts +0 -6
- package/src/lib/actions/list-a-folder.d.ts.map +0 -1
- package/src/lib/actions/list-a-folder.js +0 -56
- package/src/lib/actions/list-a-folder.js.map +0 -1
- package/src/lib/actions/move-file.d.ts +0 -7
- package/src/lib/actions/move-file.d.ts.map +0 -1
- package/src/lib/actions/move-file.js +0 -63
- package/src/lib/actions/move-file.js.map +0 -1
- package/src/lib/actions/move-folder.d.ts +0 -7
- package/src/lib/actions/move-folder.d.ts.map +0 -1
- package/src/lib/actions/move-folder.js +0 -63
- package/src/lib/actions/move-folder.js.map +0 -1
- package/src/lib/actions/search.d.ts +0 -12
- package/src/lib/actions/search.d.ts.map +0 -1
- package/src/lib/actions/search.js +0 -112
- package/src/lib/actions/search.js.map +0 -1
- package/src/lib/actions/upload-file.d.ts +0 -8
- package/src/lib/actions/upload-file.d.ts.map +0 -1
- package/src/lib/actions/upload-file.js +0 -73
- package/src/lib/actions/upload-file.js.map +0 -1
- package/src/lib/auth.d.ts +0 -2
- package/src/lib/auth.d.ts.map +0 -1
- package/src/lib/auth.js +0 -19
- package/src/lib/auth.js.map +0 -1
- package/src/lib/triggers/new-folder.d.ts +0 -15
- package/src/lib/triggers/new-folder.d.ts.map +0 -1
- package/src/lib/triggers/new-folder.js +0 -112
- package/src/lib/triggers/new-folder.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,16 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@activepieces/piece-dropbox",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.4",
|
|
4
4
|
"main": "./src/index.js",
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
"@activepieces/pieces-common": "0.12.3",
|
|
12
|
-
"@activepieces/pieces-framework": "0.30.0",
|
|
13
|
-
"@activepieces/shared": "0.86.0",
|
|
14
|
-
"tslib": "2.6.2"
|
|
15
|
-
}
|
|
5
|
+
"dependencies": {},
|
|
6
|
+
"files": [
|
|
7
|
+
"src/index.js",
|
|
8
|
+
"package.json",
|
|
9
|
+
"src/i18n"
|
|
10
|
+
]
|
|
16
11
|
}
|
package/src/index.js
CHANGED
|
@@ -1,63 +1,13 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.dropbox = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
const get_file_link_1 = require("./lib/actions/get-file-link");
|
|
15
|
-
const list_a_folder_1 = require("./lib/actions/list-a-folder");
|
|
16
|
-
const move_file_1 = require("./lib/actions/move-file");
|
|
17
|
-
const move_folder_1 = require("./lib/actions/move-folder");
|
|
18
|
-
const search_1 = require("./lib/actions/search");
|
|
19
|
-
const upload_file_1 = require("./lib/actions/upload-file");
|
|
20
|
-
const download_file_1 = require("./lib/actions/download-file");
|
|
21
|
-
const auth_1 = require("./lib/auth");
|
|
22
|
-
const new_folder_1 = require("./lib/triggers/new-folder");
|
|
23
|
-
exports.dropbox = (0, pieces_framework_1.createPiece)({
|
|
24
|
-
minimumSupportedRelease: '0.30.0',
|
|
25
|
-
logoUrl: 'https://cdn.activepieces.com/pieces/dropbox.png',
|
|
26
|
-
actions: [
|
|
27
|
-
search_1.dropboxSearch,
|
|
28
|
-
create_new_text_file_1.dropboxCreateNewTextFile,
|
|
29
|
-
upload_file_1.dropboxUploadFile,
|
|
30
|
-
download_file_1.dropboxDownloadFile,
|
|
31
|
-
get_file_link_1.dropboxGetFileLink,
|
|
32
|
-
delete_file_1.dropboxDeleteFile,
|
|
33
|
-
move_file_1.dropboxMoveFile,
|
|
34
|
-
copy_file_1.dropboxCopyFile,
|
|
35
|
-
create_new_folder_1.dropboxCreateNewFolder,
|
|
36
|
-
delete_folder_1.dropboxDeleteFolder,
|
|
37
|
-
move_folder_1.dropboxMoveFolder,
|
|
38
|
-
copy_folder_1.dropboxCopyFolder,
|
|
39
|
-
list_a_folder_1.dropboxListAFolder,
|
|
40
|
-
(0, pieces_common_1.createCustomApiCallAction)({
|
|
41
|
-
baseUrl: () => 'https://api.dropboxapi.com/2',
|
|
42
|
-
auth: auth_1.dropboxAuth,
|
|
43
|
-
authMapping: (auth) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
44
|
-
return ({
|
|
45
|
-
Authorization: `Bearer ${auth.access_token}`,
|
|
46
|
-
});
|
|
47
|
-
}),
|
|
48
|
-
}),
|
|
49
|
-
],
|
|
50
|
-
displayName: 'Dropbox',
|
|
51
|
-
description: 'Cloud storage and file synchronization',
|
|
52
|
-
authors: [
|
|
53
|
-
'BastienMe',
|
|
54
|
-
'kishanprmr',
|
|
55
|
-
'MoShizzle',
|
|
56
|
-
'khaledmashaly',
|
|
57
|
-
'abuaboud',
|
|
58
|
-
],
|
|
59
|
-
categories: [shared_1.PieceCategory.CONTENT_AND_FILES],
|
|
60
|
-
triggers: [new_folder_1.dropboxNewFolder],
|
|
61
|
-
auth: auth_1.dropboxAuth,
|
|
62
|
-
});
|
|
63
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
"use strict";var Ws=Object.create;var Xe=Object.defineProperty;var Gs=Object.getOwnPropertyDescriptor;var Ks=Object.getOwnPropertyNames;var Js=Object.getPrototypeOf,Xs=Object.prototype.hasOwnProperty;var o=(e,t)=>Xe(e,"name",{value:t,configurable:!0});var E=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ln=(e,t)=>{for(var r in t)Xe(e,r,{get:t[r],enumerable:!0})},dn=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Ks(t))!Xs.call(e,i)&&i!==r&&Xe(e,i,{get:()=>t[i],enumerable:!(n=Gs(t,i))||n.enumerable});return e};var Ne=(e,t,r)=>(r=e!=null?Ws(Js(e)):{},dn(t||!e||!e.__esModule?Xe(r,"default",{value:e,enumerable:!0}):r,e)),Ys=e=>dn(Xe({},"__esModule",{value:!0}),e);var wo=E((zo,Lt)=>{(function(e){"use strict";let t="(0?\\d+|0x[a-f0-9]+)",r={fourOctet:new RegExp(`^${t}\\.${t}\\.${t}\\.${t}$`,"i"),threeOctet:new RegExp(`^${t}\\.${t}\\.${t}$`,"i"),twoOctet:new RegExp(`^${t}\\.${t}$`,"i"),longValue:new RegExp(`^${t}$`,"i")},n=new RegExp("^0[0-7]+$","i"),i=new RegExp("^0x[a-f0-9]+$","i"),u="%[0-9a-z]{1,}",c="(?:[0-9a-f]+::?)+",d={zoneIndex:new RegExp(u,"i"),native:new RegExp(`^(::)?(${c})?([0-9a-f]+)?(::)?(${u})?$`,"i"),deprecatedTransitional:new RegExp(`^(?:::)(${t}\\.${t}\\.${t}\\.${t}(${u})?)$`,"i"),transitional:new RegExp(`^((?:${c})|(?:::)(?:${c})?)${t}\\.${t}\\.${t}\\.${t}(${u})?$`,"i")};function g(s,l){if(s.indexOf("::")!==s.lastIndexOf("::"))return null;let f=0,m=-1,v=(s.match(d.zoneIndex)||[])[0],P,j;for(v&&(v=v.substring(1),s=s.replace(/%.+$/,""));(m=s.indexOf(":",m+1))>=0;)f++;if(s.substr(0,2)==="::"&&f--,s.substr(-2,2)==="::"&&f--,f>l)return null;for(j=l-f,P=":";j--;)P+="0:";return s=s.replace("::",P),s[0]===":"&&(s=s.slice(1)),s[s.length-1]===":"&&(s=s.slice(0,-1)),l=function(){let ne=s.split(":"),ue=[];for(let Je=0;Je<ne.length;Je++)ue.push(parseInt(ne[Je],16));return ue}(),{parts:l,zoneId:v}}o(g,"expandIPv6");function h(s,l,f,m){if(s.length!==l.length)throw new Error("ipaddr: cannot match CIDR for objects with different lengths");let v=0,P;for(;m>0;){if(P=f-m,P<0&&(P=0),s[v]>>P!==l[v]>>P)return!1;m-=f,v+=1}return!0}o(h,"matchCIDR");function _(s){if(i.test(s))return parseInt(s,16);if(s[0]==="0"&&!isNaN(parseInt(s[1],10))){if(n.test(s))return parseInt(s,8);throw new Error(`ipaddr: cannot parse ${s} as octal`)}return parseInt(s,10)}o(_,"parseIntAuto");function $(s,l){for(;s.length<l;)s=`0${s}`;return s}o($,"padPart");let x={};x.IPv4=function(){function s(l){if(l.length!==4)throw new Error("ipaddr: ipv4 octet count should be 4");let f,m;for(f=0;f<l.length;f++)if(m=l[f],!(0<=m&&m<=255))throw new Error("ipaddr: ipv4 octet should fit in 8 bits");this.octets=l}return o(s,"IPv4"),s.prototype.SpecialRanges={unspecified:[[new s([0,0,0,0]),8]],broadcast:[[new s([255,255,255,255]),32]],multicast:[[new s([224,0,0,0]),4]],linkLocal:[[new s([169,254,0,0]),16]],loopback:[[new s([127,0,0,0]),8]],carrierGradeNat:[[new s([100,64,0,0]),10]],private:[[new s([10,0,0,0]),8],[new s([172,16,0,0]),12],[new s([192,168,0,0]),16]],reserved:[[new s([192,0,0,0]),24],[new s([192,0,2,0]),24],[new s([192,88,99,0]),24],[new s([198,18,0,0]),15],[new s([198,51,100,0]),24],[new s([203,0,113,0]),24],[new s([240,0,0,0]),4]],as112:[[new s([192,175,48,0]),24],[new s([192,31,196,0]),24]],amt:[[new s([192,52,193,0]),24]]},s.prototype.kind=function(){return"ipv4"},s.prototype.match=function(l,f){let m;if(f===void 0&&(m=l,l=m[0],f=m[1]),l.kind()!=="ipv4")throw new Error("ipaddr: cannot match ipv4 address with non-ipv4 one");return h(this.octets,l.octets,8,f)},s.prototype.prefixLengthFromSubnetMask=function(){let l=0,f=!1,m={0:8,128:7,192:6,224:5,240:4,248:3,252:2,254:1,255:0},v,P,j;for(v=3;v>=0;v-=1)if(P=this.octets[v],P in m){if(j=m[P],f&&j!==0)return null;j!==8&&(f=!0),l+=j}else return null;return 32-l},s.prototype.range=function(){return x.subnetMatch(this,this.SpecialRanges)},s.prototype.toByteArray=function(){return this.octets.slice(0)},s.prototype.toIPv4MappedAddress=function(){return x.IPv6.parse(`::ffff:${this.toString()}`)},s.prototype.toNormalizedString=function(){return this.toString()},s.prototype.toString=function(){return this.octets.join(".")},s}(),x.IPv4.broadcastAddressFromCIDR=function(s){try{let l=this.parseCIDR(s),f=l[0].toByteArray(),m=this.subnetMaskFromPrefixLength(l[1]).toByteArray(),v=[],P=0;for(;P<4;)v.push(parseInt(f[P],10)|parseInt(m[P],10)^255),P++;return new this(v)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},x.IPv4.isIPv4=function(s){return this.parser(s)!==null},x.IPv4.isValid=function(s){try{return new this(this.parser(s)),!0}catch{return!1}},x.IPv4.isValidCIDR=function(s){try{return this.parseCIDR(s),!0}catch{return!1}},x.IPv4.isValidFourPartDecimal=function(s){return!!(x.IPv4.isValid(s)&&s.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/))},x.IPv4.isValidCIDRFourPartDecimal=function(s){let l=s.match(/^(.+)\/(\d+)$/);return!x.IPv4.isValidCIDR(s)||!l?!1:x.IPv4.isValidFourPartDecimal(l[1])},x.IPv4.networkAddressFromCIDR=function(s){let l,f,m,v,P;try{for(l=this.parseCIDR(s),m=l[0].toByteArray(),P=this.subnetMaskFromPrefixLength(l[1]).toByteArray(),v=[],f=0;f<4;)v.push(parseInt(m[f],10)&parseInt(P[f],10)),f++;return new this(v)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},x.IPv4.parse=function(s){let l=this.parser(s);if(l===null)throw new Error("ipaddr: string is not formatted like an IPv4 Address");return new this(l)},x.IPv4.parseCIDR=function(s){let l;if(l=s.match(/^(.+)\/(\d+)$/)){let f=parseInt(l[2]);if(f>=0&&f<=32){let m=[this.parse(l[1]),f];return Object.defineProperty(m,"toString",{value:o(function(){return this.join("/")},"value")}),m}}throw new Error("ipaddr: string is not formatted like an IPv4 CIDR range")},x.IPv4.parser=function(s){let l,f,m;if(l=s.match(r.fourOctet))return function(){let v=l.slice(1,6),P=[];for(let j=0;j<v.length;j++)f=v[j],P.push(_(f));return P}();if(l=s.match(r.longValue)){if(m=_(l[1]),m>4294967295||m<0)throw new Error("ipaddr: address outside defined range");return function(){let v=[],P;for(P=0;P<=24;P+=8)v.push(m>>P&255);return v}().reverse()}else return(l=s.match(r.twoOctet))?function(){let v=l.slice(1,4),P=[];if(m=_(v[1]),m>16777215||m<0)throw new Error("ipaddr: address outside defined range");return P.push(_(v[0])),P.push(m>>16&255),P.push(m>>8&255),P.push(m&255),P}():(l=s.match(r.threeOctet))?function(){let v=l.slice(1,5),P=[];if(m=_(v[2]),m>65535||m<0)throw new Error("ipaddr: address outside defined range");return P.push(_(v[0])),P.push(_(v[1])),P.push(m>>8&255),P.push(m&255),P}():null},x.IPv4.subnetMaskFromPrefixLength=function(s){if(s=parseInt(s),s<0||s>32)throw new Error("ipaddr: invalid IPv4 prefix length");let l=[0,0,0,0],f=0,m=Math.floor(s/8);for(;f<m;)l[f]=255,f++;return m<4&&(l[m]=Math.pow(2,s%8)-1<<8-s%8),new this(l)},x.IPv6=function(){function s(l,f){let m,v;if(l.length===16)for(this.parts=[],m=0;m<=14;m+=2)this.parts.push(l[m]<<8|l[m+1]);else if(l.length===8)this.parts=l;else throw new Error("ipaddr: ipv6 part count should be 8 or 16");for(m=0;m<this.parts.length;m++)if(v=this.parts[m],!(0<=v&&v<=65535))throw new Error("ipaddr: ipv6 part should fit in 16 bits");f&&(this.zoneId=f)}return o(s,"IPv6"),s.prototype.SpecialRanges={unspecified:[new s([0,0,0,0,0,0,0,0]),128],linkLocal:[new s([65152,0,0,0,0,0,0,0]),10],multicast:[new s([65280,0,0,0,0,0,0,0]),8],loopback:[new s([0,0,0,0,0,0,0,1]),128],uniqueLocal:[new s([64512,0,0,0,0,0,0,0]),7],ipv4Mapped:[new s([0,0,0,0,0,65535,0,0]),96],discard:[new s([256,0,0,0,0,0,0,0]),64],rfc6145:[new s([0,0,0,0,65535,0,0,0]),96],rfc6052:[new s([100,65435,0,0,0,0,0,0]),96],"6to4":[new s([8194,0,0,0,0,0,0,0]),16],teredo:[new s([8193,0,0,0,0,0,0,0]),32],benchmarking:[new s([8193,2,0,0,0,0,0,0]),48],amt:[new s([8193,3,0,0,0,0,0,0]),32],as112v6:[[new s([8193,4,274,0,0,0,0,0]),48],[new s([9760,79,32768,0,0,0,0,0]),48]],deprecated:[new s([8193,16,0,0,0,0,0,0]),28],orchid2:[new s([8193,32,0,0,0,0,0,0]),28],droneRemoteIdProtocolEntityTags:[new s([8193,48,0,0,0,0,0,0]),28],reserved:[[new s([8193,0,0,0,0,0,0,0]),23],[new s([8193,3512,0,0,0,0,0,0]),32]]},s.prototype.isIPv4MappedAddress=function(){return this.range()==="ipv4Mapped"},s.prototype.kind=function(){return"ipv6"},s.prototype.match=function(l,f){let m;if(f===void 0&&(m=l,l=m[0],f=m[1]),l.kind()!=="ipv6")throw new Error("ipaddr: cannot match ipv6 address with non-ipv6 one");return h(this.parts,l.parts,16,f)},s.prototype.prefixLengthFromSubnetMask=function(){let l=0,f=!1,m={0:16,32768:15,49152:14,57344:13,61440:12,63488:11,64512:10,65024:9,65280:8,65408:7,65472:6,65504:5,65520:4,65528:3,65532:2,65534:1,65535:0},v,P;for(let j=7;j>=0;j-=1)if(v=this.parts[j],v in m){if(P=m[v],f&&P!==0)return null;P!==16&&(f=!0),l+=P}else return null;return 128-l},s.prototype.range=function(){return x.subnetMatch(this,this.SpecialRanges)},s.prototype.toByteArray=function(){let l,f=[],m=this.parts;for(let v=0;v<m.length;v++)l=m[v],f.push(l>>8),f.push(l&255);return f},s.prototype.toFixedLengthString=function(){let l=function(){let m=[];for(let v=0;v<this.parts.length;v++)m.push($(this.parts[v].toString(16),4));return m}.call(this).join(":"),f="";return this.zoneId&&(f=`%${this.zoneId}`),l+f},s.prototype.toIPv4Address=function(){if(!this.isIPv4MappedAddress())throw new Error("ipaddr: trying to convert a generic ipv6 address to ipv4");let l=this.parts.slice(-2),f=l[0],m=l[1];return new x.IPv4([f>>8,f&255,m>>8,m&255])},s.prototype.toNormalizedString=function(){let l=function(){let m=[];for(let v=0;v<this.parts.length;v++)m.push(this.parts[v].toString(16));return m}.call(this).join(":"),f="";return this.zoneId&&(f=`%${this.zoneId}`),l+f},s.prototype.toRFC5952String=function(){let l=/((^|:)(0(:|$)){2,})/g,f=this.toNormalizedString(),m=0,v=-1,P;for(;P=l.exec(f);)P[0].length>v&&(m=P.index,v=P[0].length);return v<0?f:`${f.substring(0,m)}::${f.substring(m+v)}`},s.prototype.toString=function(){return this.toRFC5952String()},s}(),x.IPv6.broadcastAddressFromCIDR=function(s){try{let l=this.parseCIDR(s),f=l[0].toByteArray(),m=this.subnetMaskFromPrefixLength(l[1]).toByteArray(),v=[],P=0;for(;P<16;)v.push(parseInt(f[P],10)|parseInt(m[P],10)^255),P++;return new this(v)}catch(l){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${l})`)}},x.IPv6.isIPv6=function(s){return this.parser(s)!==null},x.IPv6.isValid=function(s){if(typeof s=="string"&&s.indexOf(":")===-1)return!1;try{let l=this.parser(s);return new this(l.parts,l.zoneId),!0}catch{return!1}},x.IPv6.isValidCIDR=function(s){if(typeof s=="string"&&s.indexOf(":")===-1)return!1;try{return this.parseCIDR(s),!0}catch{return!1}},x.IPv6.networkAddressFromCIDR=function(s){let l,f,m,v,P;try{for(l=this.parseCIDR(s),m=l[0].toByteArray(),P=this.subnetMaskFromPrefixLength(l[1]).toByteArray(),v=[],f=0;f<16;)v.push(parseInt(m[f],10)&parseInt(P[f],10)),f++;return new this(v)}catch(j){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${j})`)}},x.IPv6.parse=function(s){let l=this.parser(s);if(l.parts===null)throw new Error("ipaddr: string is not formatted like an IPv6 Address");return new this(l.parts,l.zoneId)},x.IPv6.parseCIDR=function(s){let l,f,m;if((f=s.match(/^(.+)\/(\d+)$/))&&(l=parseInt(f[2]),l>=0&&l<=128))return m=[this.parse(f[1]),l],Object.defineProperty(m,"toString",{value:o(function(){return this.join("/")},"value")}),m;throw new Error("ipaddr: string is not formatted like an IPv6 CIDR range")},x.IPv6.parser=function(s){let l,f,m,v,P,j;if(m=s.match(d.deprecatedTransitional))return this.parser(`::ffff:${m[1]}`);if(d.native.test(s))return g(s,8);if((m=s.match(d.transitional))&&(j=m[6]||"",l=m[1],m[1].endsWith("::")||(l=l.slice(0,-1)),l=g(l+j,6),l.parts)){for(P=[parseInt(m[2]),parseInt(m[3]),parseInt(m[4]),parseInt(m[5])],f=0;f<P.length;f++)if(v=P[f],!(0<=v&&v<=255))return null;return l.parts.push(P[0]<<8|P[1]),l.parts.push(P[2]<<8|P[3]),{parts:l.parts,zoneId:l.zoneId}}return null},x.IPv6.subnetMaskFromPrefixLength=function(s){if(s=parseInt(s),s<0||s>128)throw new Error("ipaddr: invalid IPv6 prefix length");let l=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],f=0,m=Math.floor(s/8);for(;f<m;)l[f]=255,f++;return m<16&&(l[m]=Math.pow(2,s%8)-1<<8-s%8),new this(l)},x.fromByteArray=function(s){let l=s.length;if(l===4)return new x.IPv4(s);if(l===16)return new x.IPv6(s);throw new Error("ipaddr: the binary input is neither an IPv6 nor IPv4 address")},x.isValid=function(s){return x.IPv6.isValid(s)||x.IPv4.isValid(s)},x.isValidCIDR=function(s){return x.IPv6.isValidCIDR(s)||x.IPv4.isValidCIDR(s)},x.parse=function(s){if(x.IPv6.isValid(s))return x.IPv6.parse(s);if(x.IPv4.isValid(s))return x.IPv4.parse(s);throw new Error("ipaddr: the address has neither IPv6 nor IPv4 format")},x.parseCIDR=function(s){try{return x.IPv6.parseCIDR(s)}catch{try{return x.IPv4.parseCIDR(s)}catch{throw new Error("ipaddr: the address has neither IPv6 nor IPv4 CIDR format")}}},x.process=function(s){let l=this.parse(s);return l.kind()==="ipv6"&&l.isIPv4MappedAddress()?l.toIPv4Address():l},x.subnetMatch=function(s,l,f){let m,v,P,j;f==null&&(f="unicast");for(v in l)if(Object.prototype.hasOwnProperty.call(l,v)){for(P=l[v],P[0]&&!(P[0]instanceof Array)&&(P=[P]),m=0;m<P.length;m++)if(j=P[m],s.kind()===j[0].kind()&&s.match.apply(s,j))return v}return f},typeof Lt<"u"&&Lt.exports?Lt.exports=x:e.ipaddr=x})(zo)});var Si=E((tA,$i)=>{var Ei=require("stream").Stream,Sp=require("util");$i.exports=le;function le(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}o(le,"DelayedStream");Sp.inherits(le,Ei);le.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(le.prototype,"readable",{configurable:!0,enumerable:!0,get:o(function(){return this.source.readable},"get")});le.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};le.prototype.resume=function(){this._released||this.release(),this.source.resume()};le.prototype.pause=function(){this.source.pause()};le.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(e){this.emit.apply(this,e)}.bind(this)),this._bufferedEvents=[]};le.prototype.pipe=function(){var e=Ei.prototype.pipe.apply(this,arguments);return this.resume(),e};le.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)};le.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 ki=E((nA,wi)=>{var Ap=require("util"),zi=require("stream").Stream,Ai=Si();wi.exports=J;function J(){this.writable=!1,this.readable=!0,this.dataSize=0,this.maxDataSize=2*1024*1024,this.pauseStreams=!0,this._released=!1,this._streams=[],this._currentStream=null,this._insideLoop=!1,this._pendingNext=!1}o(J,"CombinedStream");Ap.inherits(J,zi);J.create=function(e){var t=new this;e=e||{};for(var r in e)t[r]=e[r];return t};J.isStreamLike=function(e){return typeof e!="function"&&typeof e!="string"&&typeof e!="boolean"&&typeof e!="number"&&!Buffer.isBuffer(e)};J.prototype.append=function(e){var t=J.isStreamLike(e);if(t){if(!(e instanceof Ai)){var r=Ai.create(e,{maxDataSize:1/0,pauseStream:this.pauseStreams});e.on("data",this._checkDataSize.bind(this)),e=r}this._handleErrors(e),this.pauseStreams&&e.pause()}return this._streams.push(e),this};J.prototype.pipe=function(e,t){return zi.prototype.pipe.call(this,e,t),this.resume(),e};J.prototype._getNext=function(){if(this._currentStream=null,this._insideLoop){this._pendingNext=!0;return}this._insideLoop=!0;try{do this._pendingNext=!1,this._realGetNext();while(this._pendingNext)}finally{this._insideLoop=!1}};J.prototype._realGetNext=function(){var e=this._streams.shift();if(typeof e>"u"){this.end();return}if(typeof e!="function"){this._pipeNext(e);return}var t=e;t(function(r){var n=J.isStreamLike(r);n&&(r.on("data",this._checkDataSize.bind(this)),this._handleErrors(r)),this._pipeNext(r)}.bind(this))};J.prototype._pipeNext=function(e){this._currentStream=e;var t=J.isStreamLike(e);if(t){e.on("end",this._getNext.bind(this)),e.pipe(this,{end:!1});return}var r=e;this.write(r),this._getNext()};J.prototype._handleErrors=function(e){var t=this;e.on("error",function(r){t._emitError(r)})};J.prototype.write=function(e){this.emit("data",e)};J.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"))};J.prototype.resume=function(){this._released||(this._released=!0,this.writable=!0,this._getNext()),this.pauseStreams&&this._currentStream&&typeof this._currentStream.resume=="function"&&this._currentStream.resume(),this.emit("resume")};J.prototype.end=function(){this._reset(),this.emit("end")};J.prototype.destroy=function(){this._reset(),this.emit("close")};J.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};J.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(e))}};J.prototype._updateDataSize=function(){this.dataSize=0;var e=this;this._streams.forEach(function(t){t.dataSize&&(e.dataSize+=t.dataSize)}),this._currentStream&&this._currentStream.dataSize&&(this.dataSize+=this._currentStream.dataSize)};J.prototype._emitError=function(e){this._reset(),this.emit("error",e)}});var Ri=E((iA,Oi)=>{"use strict";Oi.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 Ci=E(re=>{"use strict";var qt=Ri(),zp=require("path").extname,Ni=/^\s*([^;\s]*)(?:;|\s|$)/,wp=/^text\//i;re.charset=Di;re.charsets={lookup:Di};re.contentType=kp;re.extension=Op;re.extensions=Object.create(null);re.lookup=Rp;re.types=Object.create(null);Np(re.extensions,re.types);function Di(e){if(!e||typeof e!="string")return!1;var t=Ni.exec(e),r=t&&qt[t[1].toLowerCase()];return r&&r.charset?r.charset:t&&wp.test(t[1])?"UTF-8":!1}o(Di,"charset");function kp(e){if(!e||typeof e!="string")return!1;var t=e.indexOf("/")===-1?re.lookup(e):e;if(!t)return!1;if(t.indexOf("charset")===-1){var r=re.charset(t);r&&(t+="; charset="+r.toLowerCase())}return t}o(kp,"contentType");function Op(e){if(!e||typeof e!="string")return!1;var t=Ni.exec(e),r=t&&re.extensions[t[1].toLowerCase()];return!r||!r.length?!1:r[0]}o(Op,"extension");function Rp(e){if(!e||typeof e!="string")return!1;var t=zp("x."+e).toLowerCase().substr(1);return t&&re.types[t]||!1}o(Rp,"lookup");function Np(e,t){var r=["nginx","apache",void 0,"iana"];Object.keys(qt).forEach(o(function(i){var u=qt[i],c=u.extensions;if(!(!c||!c.length)){e[i]=c;for(var d=0;d<c.length;d++){var g=c[d];if(t[g]){var h=r.indexOf(qt[t[g]].source),_=r.indexOf(u.source);if(t[g]!=="application/octet-stream"&&(h>_||h===_&&t[g].substr(0,12)==="application/"))continue}t[g]=i}}},"forEachMimeType"))}o(Np,"populateMaps")});var Mi=E((uA,Ui)=>{Ui.exports=Dp;function Dp(e){var t=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;t?t(e):setTimeout(e,0)}o(Dp,"defer")});var Fr=E((pA,Li)=>{var ji=Mi();Li.exports=Cp;function Cp(e){var t=!1;return ji(function(){t=!0}),o(function(n,i){t?e(n,i):ji(o(function(){e(n,i)},"nextTick_callback"))},"async_callback")}o(Cp,"async")});var Br=E((dA,Fi)=>{Fi.exports=Up;function Up(e){Object.keys(e.jobs).forEach(Mp.bind(e)),e.jobs={}}o(Up,"abort");function Mp(e){typeof this.jobs[e]=="function"&&this.jobs[e]()}o(Mp,"clean")});var Vr=E((fA,Vi)=>{var Bi=Fr(),jp=Br();Vi.exports=Lp;function Lp(e,t,r,n){var i=r.keyedList?r.keyedList[r.index]:r.index;r.jobs[i]=Fp(t,i,e[i],function(u,c){i in r.jobs&&(delete r.jobs[i],u?jp(r):r.results[i]=c,n(u,r.results))})}o(Lp,"iterate");function Fp(e,t,r,n){var i;return e.length==2?i=e(r,Bi(n)):i=e(r,t,Bi(n)),i}o(Fp,"runJob")});var Zr=E((yA,Zi)=>{Zi.exports=Bp;function Bp(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(Bp,"state")});var Hr=E((vA,Hi)=>{var Vp=Br(),Zp=Fr();Hi.exports=Hp;function Hp(e){Object.keys(this.jobs).length&&(this.index=this.size,Vp(this),Zp(e)(null,this.results))}o(Hp,"terminator")});var Wi=E((_A,qi)=>{var qp=Vr(),Wp=Zr(),Gp=Hr();qi.exports=Kp;function Kp(e,t,r){for(var n=Wp(e);n.index<(n.keyedList||e).length;)qp(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 Gp.bind(n,r)}o(Kp,"parallel")});var qr=E((bA,Wt)=>{var Gi=Vr(),Jp=Zr(),Xp=Hr();Wt.exports=Yp;Wt.exports.ascending=Ki;Wt.exports.descending=Qp;function Yp(e,t,r,n){var i=Jp(e,r);return Gi(e,t,i,o(function u(c,d){if(c){n(c,d);return}if(i.index++,i.index<(i.keyedList||e).length){Gi(e,t,i,u);return}n(null,i.results)},"iteratorHandler")),Xp.bind(i,n)}o(Yp,"serialOrdered");function Ki(e,t){return e<t?-1:e>t?1:0}o(Ki,"ascending");function Qp(e,t){return-1*Ki(e,t)}o(Qp,"descending")});var Xi=E((IA,Ji)=>{var el=qr();Ji.exports=tl;function tl(e,t,r){return el(e,t,null,r)}o(tl,"serial")});var Qi=E(($A,Yi)=>{Yi.exports={parallel:Wi(),serial:Xi(),serialOrdered:qr()}});var Wr=E((SA,ea)=>{"use strict";ea.exports=Object});var ra=E((AA,ta)=>{"use strict";ta.exports=Error});var oa=E((zA,na)=>{"use strict";na.exports=EvalError});var aa=E((wA,ia)=>{"use strict";ia.exports=RangeError});var ua=E((kA,sa)=>{"use strict";sa.exports=ReferenceError});var pa=E((OA,ca)=>{"use strict";ca.exports=SyntaxError});var Gt=E((RA,la)=>{"use strict";la.exports=TypeError});var ma=E((NA,da)=>{"use strict";da.exports=URIError});var ga=E((DA,fa)=>{"use strict";fa.exports=Math.abs});var ha=E((CA,ya)=>{"use strict";ya.exports=Math.floor});var xa=E((UA,va)=>{"use strict";va.exports=Math.max});var Pa=E((MA,_a)=>{"use strict";_a.exports=Math.min});var Ta=E((jA,ba)=>{"use strict";ba.exports=Math.pow});var Ea=E((LA,Ia)=>{"use strict";Ia.exports=Math.round});var Sa=E((FA,$a)=>{"use strict";$a.exports=Number.isNaN||o(function(t){return t!==t},"isNaN")});var za=E((VA,Aa)=>{"use strict";var rl=Sa();Aa.exports=o(function(t){return rl(t)||t===0?t:t<0?-1:1},"sign")});var ka=E((HA,wa)=>{"use strict";wa.exports=Object.getOwnPropertyDescriptor});var Gr=E((qA,Oa)=>{"use strict";var Kt=ka();if(Kt)try{Kt([],"length")}catch{Kt=null}Oa.exports=Kt});var Na=E((WA,Ra)=>{"use strict";var Jt=Object.defineProperty||!1;if(Jt)try{Jt({},"a",{value:1})}catch{Jt=!1}Ra.exports=Jt});var Kr=E((GA,Da)=>{"use strict";Da.exports=o(function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;t[r]=i;for(var u in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var c=Object.getOwnPropertySymbols(t);if(c.length!==1||c[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var d=Object.getOwnPropertyDescriptor(t,r);if(d.value!==i||d.enumerable!==!0)return!1}return!0},"hasSymbols")});var Ma=E((JA,Ua)=>{"use strict";var Ca=typeof Symbol<"u"&&Symbol,nl=Kr();Ua.exports=o(function(){return typeof Ca!="function"||typeof Symbol!="function"||typeof Ca("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:nl()},"hasNativeSymbols")});var Jr=E((YA,ja)=>{"use strict";ja.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var Xr=E((QA,La)=>{"use strict";var ol=Wr();La.exports=ol.getPrototypeOf||null});var Va=E((ez,Ba)=>{"use strict";var il="Function.prototype.bind called on incompatible ",al=Object.prototype.toString,sl=Math.max,ul="[object Function]",Fa=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"),cl=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"),pl=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");Ba.exports=o(function(t){var r=this;if(typeof r!="function"||al.apply(r)!==ul)throw new TypeError(il+r);for(var n=cl(arguments,1),i,u=o(function(){if(this instanceof i){var _=r.apply(this,Fa(n,arguments));return Object(_)===_?_:this}return r.apply(t,Fa(n,arguments))},"binder"),c=sl(0,r.length-n.length),d=[],g=0;g<c;g++)d[g]="$"+g;if(i=Function("binder","return function ("+pl(d,",")+"){ return binder.apply(this,arguments); }")(u),r.prototype){var h=o(function(){},"Empty");h.prototype=r.prototype,i.prototype=new h,h.prototype=null}return i},"bind")});var He=E((rz,Za)=>{"use strict";var ll=Va();Za.exports=Function.prototype.bind||ll});var Xt=E((nz,Ha)=>{"use strict";Ha.exports=Function.prototype.call});var Yr=E((oz,qa)=>{"use strict";qa.exports=Function.prototype.apply});var Ga=E((iz,Wa)=>{"use strict";Wa.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var Ja=E((az,Ka)=>{"use strict";var dl=He(),ml=Yr(),fl=Xt(),gl=Ga();Ka.exports=gl||dl.call(fl,ml)});var Ya=E((sz,Xa)=>{"use strict";var yl=He(),hl=Gt(),vl=Xt(),xl=Ja();Xa.exports=o(function(t){if(t.length<1||typeof t[0]!="function")throw new hl("a function is required");return xl(yl,vl,t)},"callBindBasic")});var os=E((cz,ns)=>{"use strict";var _l=Ya(),Qa=Gr(),ts;try{ts=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!="object"||!("code"in e)||e.code!=="ERR_PROTO_ACCESS")throw e}var Qr=!!ts&&Qa&&Qa(Object.prototype,"__proto__"),rs=Object,es=rs.getPrototypeOf;ns.exports=Qr&&typeof Qr.get=="function"?_l([Qr.get]):typeof es=="function"?o(function(t){return es(t==null?t:rs(t))},"getDunder"):!1});var cs=E((lz,us)=>{"use strict";var is=Jr(),as=Xr(),ss=os();us.exports=is?o(function(t){return is(t)},"getProto"):as?o(function(t){if(!t||typeof t!="object"&&typeof t!="function")throw new TypeError("getProto: not an object");return as(t)},"getProto"):ss?o(function(t){return ss(t)},"getProto"):null});var en=E((mz,ps)=>{"use strict";var Pl=Function.prototype.call,bl=Object.prototype.hasOwnProperty,Tl=He();ps.exports=Tl.call(Pl,bl)});var hs=E((fz,ys)=>{"use strict";var M,Il=Wr(),El=ra(),$l=oa(),Sl=aa(),Al=ua(),Ke=pa(),Ge=Gt(),zl=ma(),wl=ga(),kl=ha(),Ol=xa(),Rl=Pa(),Nl=Ta(),Dl=Ea(),Cl=za(),fs=Function,tn=o(function(e){try{return fs('"use strict"; return ('+e+").constructor;")()}catch{}},"getEvalledConstructor"),vt=Gr(),Ul=Na(),rn=o(function(){throw new Ge},"throwTypeError"),Ml=vt?function(){try{return arguments.callee,rn}catch{try{return vt(arguments,"callee").get}catch{return rn}}}():rn,qe=Ma()(),Q=cs(),jl=Xr(),Ll=Jr(),gs=Yr(),xt=Xt(),We={},Fl=typeof Uint8Array>"u"||!Q?M:Q(Uint8Array),Re={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?M:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?M:ArrayBuffer,"%ArrayIteratorPrototype%":qe&&Q?Q([][Symbol.iterator]()):M,"%AsyncFromSyncIteratorPrototype%":M,"%AsyncFunction%":We,"%AsyncGenerator%":We,"%AsyncGeneratorFunction%":We,"%AsyncIteratorPrototype%":We,"%Atomics%":typeof Atomics>"u"?M:Atomics,"%BigInt%":typeof BigInt>"u"?M:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?M:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?M:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?M:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":El,"%eval%":eval,"%EvalError%":$l,"%Float16Array%":typeof Float16Array>"u"?M:Float16Array,"%Float32Array%":typeof Float32Array>"u"?M:Float32Array,"%Float64Array%":typeof Float64Array>"u"?M:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?M:FinalizationRegistry,"%Function%":fs,"%GeneratorFunction%":We,"%Int8Array%":typeof Int8Array>"u"?M:Int8Array,"%Int16Array%":typeof Int16Array>"u"?M:Int16Array,"%Int32Array%":typeof Int32Array>"u"?M:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":qe&&Q?Q(Q([][Symbol.iterator]())):M,"%JSON%":typeof JSON=="object"?JSON:M,"%Map%":typeof Map>"u"?M:Map,"%MapIteratorPrototype%":typeof Map>"u"||!qe||!Q?M:Q(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Il,"%Object.getOwnPropertyDescriptor%":vt,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?M:Promise,"%Proxy%":typeof Proxy>"u"?M:Proxy,"%RangeError%":Sl,"%ReferenceError%":Al,"%Reflect%":typeof Reflect>"u"?M:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?M:Set,"%SetIteratorPrototype%":typeof Set>"u"||!qe||!Q?M:Q(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?M:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":qe&&Q?Q(""[Symbol.iterator]()):M,"%Symbol%":qe?Symbol:M,"%SyntaxError%":Ke,"%ThrowTypeError%":Ml,"%TypedArray%":Fl,"%TypeError%":Ge,"%Uint8Array%":typeof Uint8Array>"u"?M:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?M:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?M:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?M:Uint32Array,"%URIError%":zl,"%WeakMap%":typeof WeakMap>"u"?M:WeakMap,"%WeakRef%":typeof WeakRef>"u"?M:WeakRef,"%WeakSet%":typeof WeakSet>"u"?M:WeakSet,"%Function.prototype.call%":xt,"%Function.prototype.apply%":gs,"%Object.defineProperty%":Ul,"%Object.getPrototypeOf%":jl,"%Math.abs%":wl,"%Math.floor%":kl,"%Math.max%":Ol,"%Math.min%":Rl,"%Math.pow%":Nl,"%Math.round%":Dl,"%Math.sign%":Cl,"%Reflect.getPrototypeOf%":Ll};if(Q)try{null.error}catch(e){ls=Q(Q(e)),Re["%Error.prototype%"]=ls}var ls,Bl=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&&Q&&(r=Q(i.prototype))}return Re[t]=r,r},"doEval"),ds={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},_t=He(),Yt=en(),Vl=_t.call(xt,Array.prototype.concat),Zl=_t.call(gs,Array.prototype.splice),ms=_t.call(xt,String.prototype.replace),Qt=_t.call(xt,String.prototype.slice),Hl=_t.call(xt,RegExp.prototype.exec),ql=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Wl=/\\(\\)?/g,Gl=o(function(t){var r=Qt(t,0,1),n=Qt(t,-1);if(r==="%"&&n!=="%")throw new Ke("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new Ke("invalid intrinsic syntax, expected opening `%`");var i=[];return ms(t,ql,function(u,c,d,g){i[i.length]=d?ms(g,Wl,"$1"):c||u}),i},"stringToPath"),Kl=o(function(t,r){var n=t,i;if(Yt(ds,n)&&(i=ds[n],n="%"+i[0]+"%"),Yt(Re,n)){var u=Re[n];if(u===We&&(u=Bl(n)),typeof u>"u"&&!r)throw new Ge("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:u}}throw new Ke("intrinsic "+t+" does not exist!")},"getBaseIntrinsic");ys.exports=o(function(t,r){if(typeof t!="string"||t.length===0)throw new Ge("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new Ge('"allowMissing" argument must be a boolean');if(Hl(/^%?[^%]*%?$/,t)===null)throw new Ke("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=Gl(t),i=n.length>0?n[0]:"",u=Kl("%"+i+"%",r),c=u.name,d=u.value,g=!1,h=u.alias;h&&(i=h[0],Zl(n,Vl([0,1],h)));for(var _=1,$=!0;_<n.length;_+=1){var x=n[_],s=Qt(x,0,1),l=Qt(x,-1);if((s==='"'||s==="'"||s==="`"||l==='"'||l==="'"||l==="`")&&s!==l)throw new Ke("property names with quotes must have matching quotes");if((x==="constructor"||!$)&&(g=!0),i+="."+x,c="%"+i+"%",Yt(Re,c))d=Re[c];else if(d!=null){if(!(x in d)){if(!r)throw new Ge("base intrinsic for "+t+" exists, but the property is not available.");return}if(vt&&_+1>=n.length){var f=vt(d,x);$=!!f,$&&"get"in f&&!("originalValue"in f.get)?d=f.get:d=d[x]}else $=Yt(d,x),d=d[x];$&&!g&&(Re[c]=d)}}return d},"GetIntrinsic")});var xs=E((yz,vs)=>{"use strict";var Jl=Kr();vs.exports=o(function(){return Jl()&&!!Symbol.toStringTag},"hasToStringTagShams")});var bs=E((vz,Ps)=>{"use strict";var Xl=hs(),_s=Xl("%Object.defineProperty%",!0),Yl=xs()(),Ql=en(),ed=Gt(),er=Yl?Symbol.toStringTag:null;Ps.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 ed("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");er&&(n||!Ql(t,er))&&(_s?_s(t,er,{configurable:!i,enumerable:!1,value:r,writable:!1}):t[er]=r)},"setToStringTag")});var Is=E((_z,Ts)=>{"use strict";var td=Function.prototype.call,rd=Object.prototype.hasOwnProperty,nd=He();Ts.exports=nd.call(td,rd)});var $s=E((Pz,Es)=>{"use strict";Es.exports=function(e,t){return Object.keys(t).forEach(function(r){e[r]=e[r]||t[r]}),e}});var zs=E((bz,As)=>{"use strict";var sn=ki(),od=require("util"),nn=require("path"),id=require("http"),ad=require("https"),sd=require("url").parse,ud=require("fs"),cd=require("stream").Stream,pd=require("crypto"),on=Ci(),ld=Qi(),dd=bs(),Ae=Is(),an=$s();function Ss(e){return String(e).replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/"/g,"%22")}o(Ss,"escapeHeaderParam");function L(e){if(!(this instanceof L))return new L(e);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],sn.call(this),e=e||{};for(var t in e)this[t]=e[t]}o(L,"FormData");od.inherits(L,sn);L.LINE_BREAK=`\r
|
|
2
|
+
`;L.DEFAULT_CONTENT_TYPE="application/octet-stream";L.prototype.append=function(e,t,r){r=r||{},typeof r=="string"&&(r={filename:r});var n=sn.prototype.append.bind(this);if((typeof t=="number"||t==null)&&(t=String(t)),Array.isArray(t)){this._error(new Error("Arrays are not supported."));return}var i=this._multiPartHeader(e,t,r),u=this._multiPartFooter();n(i),n(t),n(u),this._trackLength(i,t,r)};L.prototype._trackLength=function(e,t,r){var n=0;r.knownLength!=null?n+=Number(r.knownLength):Buffer.isBuffer(t)?n=t.length:typeof t=="string"&&(n=Buffer.byteLength(t)),this._valueLength+=n,this._overheadLength+=Buffer.byteLength(e)+L.LINE_BREAK.length,!(!t||!t.path&&!(t.readable&&Ae(t,"httpVersion"))&&!(t instanceof cd))&&(r.knownLength||this._valuesToMeasure.push(t))};L.prototype._lengthRetriever=function(e,t){Ae(e,"fd")?e.end!=null&&e.end!=1/0&&e.start!=null?t(null,e.end+1-(e.start?e.start:0)):ud.stat(e.path,function(r,n){if(r){t(r);return}var i=n.size-(e.start?e.start:0);t(null,i)}):Ae(e,"httpVersion")?t(null,Number(e.headers["content-length"])):Ae(e,"httpModule")?(e.on("response",function(r){e.pause(),t(null,Number(r.headers["content-length"]))}),e.resume()):t("Unknown stream")};L.prototype._multiPartHeader=function(e,t,r){if(typeof r.header=="string")return r.header;var n=this._getContentDisposition(t,r),i=this._getContentType(t,r),u="",c={"Content-Disposition":["form-data",'name="'+Ss(e)+'"'].concat(n||[]),"Content-Type":[].concat(i||[])};typeof r.header=="object"&&an(c,r.header);var d;for(var g in c)if(Ae(c,g)){if(d=c[g],d==null)continue;Array.isArray(d)||(d=[d]),d.length&&(u+=g+": "+d.join("; ")+L.LINE_BREAK)}return"--"+this.getBoundary()+L.LINE_BREAK+u+L.LINE_BREAK};L.prototype._getContentDisposition=function(e,t){var r;if(typeof t.filepath=="string"?r=nn.normalize(t.filepath).replace(/\\/g,"/"):t.filename||e&&(e.name||e.path)?r=nn.basename(t.filename||e&&(e.name||e.path)):e&&e.readable&&Ae(e,"httpVersion")&&(r=nn.basename(e.client._httpMessage.path||"")),r)return'filename="'+Ss(r)+'"'};L.prototype._getContentType=function(e,t){var r=t.contentType;return!r&&e&&e.name&&(r=on.lookup(e.name)),!r&&e&&e.path&&(r=on.lookup(e.path)),!r&&e&&e.readable&&Ae(e,"httpVersion")&&(r=e.headers["content-type"]),!r&&(t.filepath||t.filename)&&(r=on.lookup(t.filepath||t.filename)),!r&&e&&typeof e=="object"&&(r=L.DEFAULT_CONTENT_TYPE),r};L.prototype._multiPartFooter=function(){return function(e){var t=L.LINE_BREAK,r=this._streams.length===0;r&&(t+=this._lastBoundary()),e(t)}.bind(this)};L.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+L.LINE_BREAK};L.prototype.getHeaders=function(e){var t,r={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in e)Ae(e,t)&&(r[t.toLowerCase()]=e[t]);return r};L.prototype.setBoundary=function(e){if(typeof e!="string")throw new TypeError("FormData boundary must be a string");this._boundary=e};L.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};L.prototype.getBuffer=function(){for(var e=new Buffer.alloc(0),t=this.getBoundary(),r=0,n=this._streams.length;r<n;r++)typeof this._streams[r]!="function"&&(Buffer.isBuffer(this._streams[r])?e=Buffer.concat([e,this._streams[r]]):e=Buffer.concat([e,Buffer.from(this._streams[r])]),(typeof this._streams[r]!="string"||this._streams[r].substring(2,t.length+2)!==t)&&(e=Buffer.concat([e,Buffer.from(L.LINE_BREAK)])));return Buffer.concat([e,Buffer.from(this._lastBoundary())])};L.prototype._generateBoundary=function(){this._boundary="--------------------------"+pd.randomBytes(12).toString("hex")};L.prototype.getLengthSync=function(){var e=this._overheadLength+this._valueLength;return this._streams.length&&(e+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),e};L.prototype.hasKnownLength=function(){var e=!0;return this._valuesToMeasure.length&&(e=!1),e};L.prototype.getLength=function(e){var t=this._overheadLength+this._valueLength;if(this._streams.length&&(t+=this._lastBoundary().length),!this._valuesToMeasure.length){process.nextTick(e.bind(this,null,t));return}ld.parallel(this._valuesToMeasure,this._lengthRetriever,function(r,n){if(r){e(r);return}n.forEach(function(i){t+=i}),e(null,t)})};L.prototype.submit=function(e,t){var r,n,i={method:"post"};return typeof e=="string"?(e=sd(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=ad.request(n):r=id.request(n),this.getLength(function(u,c){if(u&&u!=="Unknown stream"){this._error(u);return}if(c&&r.setHeader("Content-Length",c),this.pipe(r),t){var d,g=o(function(h,_){return r.removeListener("error",g),r.removeListener("response",d),t.call(this,h,_)},"callback");d=g.bind(this,null),r.on("error",g),r.on("response",d)}}.bind(this)),r};L.prototype._error=function(e){this.error||(this.error=e,this.pause(),this.emit("error",e))};L.prototype.toString=function(){return"[object FormData]"};dd(L.prototype,"FormData");As.exports=L});var Id={};ln(Id,{dropbox:()=>Td});module.exports=Ys(Id);var Qs=Object.freeze({status:"aborted"});function T(e,t,r){function n(d,g){if(d._zod||Object.defineProperty(d,"_zod",{value:{def:g,constr:c,traits:new Set},enumerable:!1}),d._zod.traits.has(e))return;d._zod.traits.add(e),t(d,g);let h=c.prototype,_=Object.keys(h);for(let $=0;$<_.length;$++){let x=_[$];x in d||(d[x]=h[x].bind(d))}}o(n,"init");let i=r?.Parent??Object;class u extends i{static{o(this,"Definition")}}Object.defineProperty(u,"name",{value:e});function c(d){var g;let h=r?.Parent?new u:this;n(h,d),(g=h._zod).deferred??(g.deferred=[]);for(let _ of h._zod.deferred)_();return h}return o(c,"_"),Object.defineProperty(c,"init",{value:n}),Object.defineProperty(c,Symbol.hasInstance,{value:o(d=>r?.Parent&&d instanceof r.Parent?!0:d?._zod?.traits?.has(e),"value")}),Object.defineProperty(c,"name",{value:e}),c}o(T,"$constructor");var eu=Symbol("zod_brand"),de=class extends Error{static{o(this,"$ZodAsyncError")}constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},bt=class extends Error{static{o(this,"$ZodEncodeError")}constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}},rr={};function ge(e){return e&&Object.assign(rr,e),rr}o(ge,"config");function or(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(or,"getEnumValues");function fn(e,t){return typeof t=="bigint"?t.toString():t}o(fn,"jsonStringifyReplacer");function It(e){return{get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}o(It,"cached");function gn(e){return e==null}o(gn,"nullish");function Et(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}o(Et,"cleanRegex");var mn=Symbol("evaluating");function X(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==mn)return n===void 0&&(n=mn,n=r()),n},set(i){Object.defineProperty(e,t,{value:i})},configurable:!0})}o(X,"defineLazy");var ir="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Ye(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}o(Ye,"isObject");var tu=It(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function yn(e){if(Ye(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let r=t.prototype;return!(Ye(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}o(yn,"isPlainObject");var hn=new Set(["string","number","symbol"]);function De(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}o(De,"escapeRegex");function $t(e,t,r){let n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}o($t,"clone");function W(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:o(()=>t,"error")};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:o(()=>t.error,"error")}:t}o(W,"normalizeParams");function vn(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}o(vn,"optionalKeys");var ru={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 Ce(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(Ce,"aborted");function Pe(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}o(Pe,"prefixIssues");function Tt(e){return typeof e=="string"?e:e?.message}o(Tt,"unwrapMessage");function be(e,t,r){let n={...e,path:e.path??[]};if(!e.message){let i=Tt(e.inst?._zod.def?.error?.(e))??Tt(t?.error?.(e))??Tt(r.customError?.(e))??Tt(r.localeError?.(e))??"Invalid input";n.message=i}return delete n.inst,delete n.continue,t?.reportInput||delete n.input,n}o(be,"finalizeIssue");function xn(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}o(xn,"getLengthableOrigin");function ar(...e){let[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}o(ar,"issue");var _n=o((e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,fn,2),Object.defineProperty(e,"toString",{value:o(()=>e.message,"value"),enumerable:!1})},"initializer"),Pn=T("$ZodError",_n),Qe=T("$ZodError",_n,{Parent:Error});var ou=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 de;if(c.issues.length){let d=new(i?.Err??e)(c.issues.map(g=>be(g,u,ge())));throw ir(d,i?.callee),d}return c.value},"_parse"),St=ou(Qe),iu=o(e=>async(t,r,n,i)=>{let u=n?Object.assign(n,{async:!0}):{async:!0},c=t._zod.run({value:r,issues:[]},u);if(c instanceof Promise&&(c=await c),c.issues.length){let d=new(i?.Err??e)(c.issues.map(g=>be(g,u,ge())));throw ir(d,i?.callee),d}return c.value},"_parseAsync"),At=iu(Qe),au=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 de;return u.issues.length?{success:!1,error:new(e??Pn)(u.issues.map(c=>be(c,i,ge())))}:{success:!0,data:u.value}},"_safeParse"),et=au(Qe),su=o(e=>async(t,r,n)=>{let i=n?Object.assign(n,{async:!0}):{async:!0},u=t._zod.run({value:r,issues:[]},i);return u instanceof Promise&&(u=await u),u.issues.length?{success:!1,error:new e(u.issues.map(c=>be(c,i,ge())))}:{success:!0,data:u.value}},"_safeParseAsync"),tt=su(Qe);var uu="(?:(?:\\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])))",cu=new RegExp(`^${uu}$`);var bn=o(e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},"string"),Tn=/^-?\d+n?$/;var sr=/^-?\d+(?:\.\d+)?$/,In=/^(?:true|false)$/i;var Ue=T("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])});var En=T("$ZodCheckMinLength",(e,t)=>{var r;Ue.init(e,t),(r=e._zod.def).when??(r.when=n=>{let i=n.value;return!gn(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=xn(i);n.issues.push({origin:c,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}});var ur=T("$ZodCheckStringFormat",(e,t)=>{var r,n;Ue.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=()=>{})}),$n=T("$ZodCheckRegex",(e,t)=>{ur.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 An={major:4,minor:3,patch:6};var G=T("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=An;let n=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&n.unshift(e);for(let i of n)for(let u of i._zod.onattach)u(e);if(n.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let i=o((c,d,g)=>{let h=Ce(c),_;for(let $ of d){if($._zod.def.when){if(!$._zod.def.when(c))continue}else if(h)continue;let x=c.issues.length,s=$._zod.check(c);if(s instanceof Promise&&g?.async===!1)throw new de;if(_||s instanceof Promise)_=(_??Promise.resolve()).then(async()=>{await s,c.issues.length!==x&&(h||(h=Ce(c,x)))});else{if(c.issues.length===x)continue;h||(h=Ce(c,x))}}return _?_.then(()=>c):c},"runChecks"),u=o((c,d,g)=>{if(Ce(c))return c.aborted=!0,c;let h=i(d,n,g);if(h instanceof Promise){if(g.async===!1)throw new de;return h.then(_=>e._zod.parse(_,g))}return e._zod.parse(h,g)},"handleCanaryResult");e._zod.run=(c,d)=>{if(d.skipChecks)return e._zod.parse(c,d);if(d.direction==="backward"){let h=e._zod.parse({value:c.value,issues:[]},{...d,skipChecks:!0});return h instanceof Promise?h.then(_=>u(_,c,d)):u(h,c,d)}let g=e._zod.parse(c,d);if(g instanceof Promise){if(d.async===!1)throw new de;return g.then(h=>i(h,n,d))}return i(g,n,d)}}X(e,"~standard",()=>({validate:o(i=>{try{let u=et(e,i);return u.success?{value:u.data}:{issues:u.error?.issues}}catch{return tt(e,i).then(c=>c.success?{value:c.data}:{issues:c.error?.issues})}},"validate"),vendor:"zod",version:1}))}),kt=T("$ZodString",(e,t)=>{G.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??bn(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}}),cr=T("$ZodStringFormat",(e,t)=>{ur.init(e,t),kt.init(e,t)});var Rn=T("$ZodURL",(e,t)=>{cr.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 Nn=T("$ZodNumber",(e,t)=>{G.init(e,t),e._zod.pattern=e._zod.bag.pattern??sr,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 pr=T("$ZodBoolean",(e,t)=>{G.init(e,t),e._zod.pattern=In,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}}),Dn=T("$ZodBigInt",(e,t)=>{G.init(e,t),e._zod.pattern=Tn,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 Cn=T("$ZodAny",(e,t)=>{G.init(e,t),e._zod.parse=r=>r}),Un=T("$ZodUnknown",(e,t)=>{G.init(e,t),e._zod.parse=r=>r});var Mn=T("$ZodVoid",(e,t)=>{G.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;return typeof i>"u"||r.issues.push({expected:"void",code:"invalid_type",input:i,inst:e}),r}}),jn=T("$ZodDate",(e,t)=>{G.init(e,t),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=new Date(r.value)}catch{}let i=r.value,u=i instanceof Date;return u&&!Number.isNaN(i.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:i,...u?{received:"Invalid Date"}:{},inst:e}),r}});function zn(e,t,r){e.issues.length&&t.issues.push(...Pe(r,e.issues)),t.value[r]=e.value}o(zn,"handleArrayResult");var Ln=T("$ZodArray",(e,t)=>{G.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;if(!Array.isArray(i))return r.issues.push({expected:"array",code:"invalid_type",input:i,inst:e}),r;r.value=Array(i.length);let u=[];for(let c=0;c<i.length;c++){let d=i[c],g=t.element._zod.run({value:d,issues:[]},n);g instanceof Promise?u.push(g.then(h=>zn(h,r,c))):zn(g,r,c)}return u.length?Promise.all(u).then(()=>r):r}});function wt(e,t,r,n,i){if(e.issues.length){if(i&&!(r in n))return;t.issues.push(...Pe(r,e.issues))}e.value===void 0?r in n&&(t.value[r]=void 0):t.value[r]=e.value}o(wt,"handlePropertyResult");function pu(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=vn(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}o(pu,"normalizeDef");function lu(e,t,r,n,i,u){let c=[],d=i.keySet,g=i.catchall._zod,h=g.def.type,_=g.optout==="optional";for(let $ in t){if(d.has($))continue;if(h==="never"){c.push($);continue}let x=g.run({value:t[$],issues:[]},n);x instanceof Promise?e.push(x.then(s=>wt(s,r,$,t,_))):wt(x,r,$,t,_)}return c.length&&r.issues.push({code:"unrecognized_keys",keys:c,input:t,inst:u}),e.length?Promise.all(e).then(()=>r):r}o(lu,"handleCatchall");var Fn=T("$ZodObject",(e,t)=>{if(G.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let d=t.shape;Object.defineProperty(t,"shape",{get:o(()=>{let g={...d};return Object.defineProperty(t,"shape",{value:g}),g},"get")})}let n=It(()=>pu(t));X(e._zod,"propValues",()=>{let d=t.shape,g={};for(let h in d){let _=d[h]._zod;if(_.values){g[h]??(g[h]=new Set);for(let $ of _.values)g[h].add($)}}return g});let i=Ye,u=t.catchall,c;e._zod.parse=(d,g)=>{c??(c=n.value);let h=d.value;if(!i(h))return d.issues.push({expected:"object",code:"invalid_type",input:h,inst:e}),d;d.value={};let _=[],$=c.shape;for(let x of c.keys){let s=$[x],l=s._zod.optout==="optional",f=s._zod.run({value:h[x],issues:[]},g);f instanceof Promise?_.push(f.then(m=>wt(m,d,x,h,l))):wt(f,d,x,h,l)}return u?lu(_,h,d,g,n.value,e):_.length?Promise.all(_).then(()=>d):d}});function wn(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=>!Ce(u));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(u=>u.issues.map(c=>be(c,n,ge())))}),t)}o(wn,"handleUnionResults");var lr=T("$ZodUnion",(e,t)=>{G.init(e,t),X(e._zod,"optin",()=>t.options.some(i=>i._zod.optin==="optional")?"optional":void 0),X(e._zod,"optout",()=>t.options.some(i=>i._zod.optout==="optional")?"optional":void 0),X(e._zod,"values",()=>{if(t.options.every(i=>i._zod.values))return new Set(t.options.flatMap(i=>Array.from(i._zod.values)))}),X(e._zod,"pattern",()=>{if(t.options.every(i=>i._zod.pattern)){let i=t.options.map(u=>u._zod.pattern);return new RegExp(`^(${i.map(u=>Et(u.source)).join("|")})$`)}});let r=t.options.length===1,n=t.options[0]._zod.run;e._zod.parse=(i,u)=>{if(r)return n(i,u);let c=!1,d=[];for(let g of t.options){let h=g._zod.run({value:i.value,issues:[]},u);if(h instanceof Promise)d.push(h),c=!0;else{if(h.issues.length===0)return h;d.push(h)}}return c?Promise.all(d).then(g=>wn(g,i,e,u)):wn(d,i,e,u)}});var Bn=T("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,lr.init(e,t);let r=e._zod.parse;X(e._zod,"propValues",()=>{let i={};for(let u of t.options){let c=u._zod.propValues;if(!c||Object.keys(c).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(u)}"`);for(let[d,g]of Object.entries(c)){i[d]||(i[d]=new Set);for(let h of g)i[d].add(h)}}return i});let n=It(()=>{let i=t.options,u=new Map;for(let c of i){let d=c._zod.propValues?.[t.discriminator];if(!d||d.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(c)}"`);for(let g of d){if(u.has(g))throw new Error(`Duplicate discriminator value "${String(g)}"`);u.set(g,c)}}return u});e._zod.parse=(i,u)=>{let c=i.value;if(!Ye(c))return i.issues.push({code:"invalid_type",expected:"object",input:c,inst:e}),i;let d=n.value.get(c?.[t.discriminator]);return d?d._zod.run(i,u):t.unionFallback?r(i,u):(i.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:c,path:[t.discriminator],inst:e}),i)}});var Vn=T("$ZodRecord",(e,t)=>{G.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;if(!yn(i))return r.issues.push({expected:"record",code:"invalid_type",input:i,inst:e}),r;let u=[],c=t.keyType._zod.values;if(c){r.value={};let d=new Set;for(let h of c)if(typeof h=="string"||typeof h=="number"||typeof h=="symbol"){d.add(typeof h=="number"?h.toString():h);let _=t.valueType._zod.run({value:i[h],issues:[]},n);_ instanceof Promise?u.push(_.then($=>{$.issues.length&&r.issues.push(...Pe(h,$.issues)),r.value[h]=$.value})):(_.issues.length&&r.issues.push(...Pe(h,_.issues)),r.value[h]=_.value)}let g;for(let h in i)d.has(h)||(g=g??[],g.push(h));g&&g.length>0&&r.issues.push({code:"unrecognized_keys",input:i,inst:e,keys:g})}else{r.value={};for(let d of Reflect.ownKeys(i)){if(d==="__proto__")continue;let g=t.keyType._zod.run({value:d,issues:[]},n);if(g instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof d=="string"&&sr.test(d)&&g.issues.length){let $=t.keyType._zod.run({value:Number(d),issues:[]},n);if($ instanceof Promise)throw new Error("Async schemas not supported in object keys currently");$.issues.length===0&&(g=$)}if(g.issues.length){t.mode==="loose"?r.value[d]=i[d]:r.issues.push({code:"invalid_key",origin:"record",issues:g.issues.map($=>be($,n,ge())),input:d,path:[d],inst:e});continue}let _=t.valueType._zod.run({value:i[d],issues:[]},n);_ instanceof Promise?u.push(_.then($=>{$.issues.length&&r.issues.push(...Pe(d,$.issues)),r.value[g.value]=$.value})):(_.issues.length&&r.issues.push(...Pe(d,_.issues)),r.value[g.value]=_.value)}}return u.length?Promise.all(u).then(()=>r):r}});var Zn=T("$ZodEnum",(e,t)=>{G.init(e,t);let r=or(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(i=>hn.has(typeof i)).map(i=>typeof i=="string"?De(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}}),Hn=T("$ZodLiteral",(e,t)=>{if(G.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");let r=new Set(t.values);e._zod.values=r,e._zod.pattern=new RegExp(`^(${t.values.map(n=>typeof n=="string"?De(n):n?De(n.toString()):String(n)).join("|")})$`),e._zod.parse=(n,i)=>{let u=n.value;return r.has(u)||n.issues.push({code:"invalid_value",values:t.values,input:u,inst:e}),n}});var qn=T("$ZodTransform",(e,t)=>{G.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new bt(e.constructor.name);let i=t.transform(r.value,r);if(n.async)return(i instanceof Promise?i:Promise.resolve(i)).then(c=>(r.value=c,r));if(i instanceof Promise)throw new de;return r.value=i,r}});function kn(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}o(kn,"handleOptionalResult");var Wn=T("$ZodOptional",(e,t)=>{G.init(e,t),e._zod.optin="optional",e._zod.optout="optional",X(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),X(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${Et(r.source)})?$`):void 0}),e._zod.parse=(r,n)=>{if(t.innerType._zod.optin==="optional"){let i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(u=>kn(u,r.value)):kn(i,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,n)}});var Gn=T("$ZodNullable",(e,t)=>{G.init(e,t),X(e._zod,"optin",()=>t.innerType._zod.optin),X(e._zod,"optout",()=>t.innerType._zod.optout),X(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${Et(r.source)}|null)$`):void 0}),X(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,n)=>r.value===null?r:t.innerType._zod.run(r,n)});var Kn=T("$ZodPipe",(e,t)=>{G.init(e,t),X(e._zod,"values",()=>t.in._zod.values),X(e._zod,"optin",()=>t.in._zod.optin),X(e._zod,"optout",()=>t.out._zod.optout),X(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,n)=>{if(n.direction==="backward"){let u=t.out._zod.run(r,n);return u instanceof Promise?u.then(c=>zt(c,t.in,n)):zt(u,t.in,n)}let i=t.in._zod.run(r,n);return i instanceof Promise?i.then(u=>zt(u,t.out,n)):zt(i,t.out,n)}});function zt(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}o(zt,"handlePipeResult");var Jn=T("$ZodCustom",(e,t)=>{Ue.init(e,t),G.init(e,t),e._zod.parse=(r,n)=>r,e._zod.check=r=>{let n=r.value,i=t.fn(n);if(i instanceof Promise)return i.then(u=>On(u,r,n,e));On(i,r,n,e)}});function On(e,t,r,n){if(!e){let i={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(i.params=n._zod.def.params),t.issues.push(ar(i))}}o(On,"handleRefineResult");var Yn,gu=Symbol("ZodOutput"),yu=Symbol("ZodInput"),dr=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 Qn(){return new dr}o(Qn,"registry");(Yn=globalThis).__zod_globalRegistry??(Yn.__zod_globalRegistry=Qn());var mr=globalThis.__zod_globalRegistry;function eo(e,t){return new e({type:"string",...W(t)})}o(eo,"_string");function to(e,t){return new e({type:"string",coerce:!0,...W(t)})}o(to,"_coercedString");function ro(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...W(t)})}o(ro,"_url");function no(e,t){return new e({type:"number",checks:[],...W(t)})}o(no,"_number");function oo(e,t){return new e({type:"number",coerce:!0,checks:[],...W(t)})}o(oo,"_coercedNumber");function io(e,t){return new e({type:"boolean",...W(t)})}o(io,"_boolean");function ao(e,t){return new e({type:"boolean",coerce:!0,...W(t)})}o(ao,"_coercedBoolean");function so(e,t){return new e({type:"bigint",coerce:!0,...W(t)})}o(so,"_coercedBigint");function uo(e){return new e({type:"any"})}o(uo,"_any");function co(e){return new e({type:"unknown"})}o(co,"_unknown");function po(e,t){return new e({type:"void",...W(t)})}o(po,"_void");function lo(e,t){return new e({type:"date",coerce:!0,...W(t)})}o(lo,"_coercedDate");function ce(e,t){return new En({check:"min_length",...W(t),minimum:e})}o(ce,"_minLength");function Te(e,t){return new $n({check:"string_format",format:"regex",...W(t),pattern:e})}o(Te,"_regex");function mo(e,t,r){let n=W(r);return n.abort??(n.abort=!0),new e({type:"custom",check:"custom",fn:t,...n})}o(mo,"_custom");var Y=T("ZodMiniType",(e,t)=>{if(!e._zod)throw new Error("Uninitialized schema in ZodMiniType.");G.init(e,t),e.def=t,e.type=t.type,e.parse=(r,n)=>St(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>et(e,r,n),e.parseAsync=async(r,n)=>At(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>tt(e,r,n),e.check=(...r)=>e.clone({...t,checks:[...t.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]},{parent:!0}),e.with=e.check,e.clone=(r,n)=>$t(e,r,n),e.brand=()=>e,e.register=(r,n)=>(r.add(e,n),e),e.apply=r=>r(e)}),Rt=T("ZodMiniString",(e,t)=>{kt.init(e,t),Y.init(e,t)});function a(e){return eo(Rt,e)}o(a,"string");var fo=T("ZodMiniStringFormat",(e,t)=>{cr.init(e,t),Rt.init(e,t)});var $u=T("ZodMiniURL",(e,t)=>{Rn.init(e,t),fo.init(e,t)});function go(e){return ro($u,e)}o(go,"url");var fr=T("ZodMiniNumber",(e,t)=>{Nn.init(e,t),Y.init(e,t)});function te(e){return no(fr,e)}o(te,"number");var gr=T("ZodMiniBoolean",(e,t)=>{pr.init(e,t),Y.init(e,t)});function Z(e){return io(gr,e)}o(Z,"boolean");var yo=T("ZodMiniBigInt",(e,t)=>{Dn.init(e,t),Y.init(e,t)});var Su=T("ZodMiniAny",(e,t)=>{Cn.init(e,t),Y.init(e,t)});function nt(){return uo(Su)}o(nt,"any");var Au=T("ZodMiniUnknown",(e,t)=>{Un.init(e,t),Y.init(e,t)});function k(){return co(Au)}o(k,"unknown");var zu=T("ZodMiniVoid",(e,t)=>{Mn.init(e,t),Y.init(e,t)});function ho(e){return po(zu,e)}o(ho,"_void");var vo=T("ZodMiniDate",(e,t)=>{jn.init(e,t),Y.init(e,t)});var wu=T("ZodMiniArray",(e,t)=>{Ln.init(e,t),Y.init(e,t)});function N(e,t){return new wu({type:"array",element:e,...W(t)})}o(N,"array");var ku=T("ZodMiniObject",(e,t)=>{Fn.init(e,t),Y.init(e,t),X(e,"shape",()=>t.shape)});function p(e,t){let r={type:"object",shape:e??{},...W(t)};return new ku(r)}o(p,"object");var Ou=T("ZodMiniUnion",(e,t)=>{lr.init(e,t),Y.init(e,t)});function D(e,t){return new Ou({type:"union",options:e,...W(t)})}o(D,"union");var Ru=T("ZodMiniDiscriminatedUnion",(e,t)=>{Bn.init(e,t),Y.init(e,t)});function Me(e,t,r){return new Ru({type:"union",options:t,discriminator:e,...W(r)})}o(Me,"discriminatedUnion");var Nu=T("ZodMiniRecord",(e,t)=>{Vn.init(e,t),Y.init(e,t)});function O(e,t,r){return new Nu({type:"record",keyType:e,valueType:t,...W(r)})}o(O,"record");var Du=T("ZodMiniEnum",(e,t)=>{Zn.init(e,t),Y.init(e,t),e.options=Object.values(t.entries)});function U(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new Du({type:"enum",entries:r,...W(t)})}o(U,"_enum");var Cu=T("ZodMiniLiteral",(e,t)=>{Hn.init(e,t),Y.init(e,t)});function S(e,t){return new Cu({type:"literal",values:Array.isArray(e)?e:[e],...W(t)})}o(S,"literal");var Uu=T("ZodMiniTransform",(e,t)=>{qn.init(e,t),Y.init(e,t)});function Ie(e){return new Uu({type:"transform",transform:e})}o(Ie,"transform");var Mu=T("ZodMiniOptional",(e,t)=>{Wn.init(e,t),Y.init(e,t)});function y(e){return new Mu({type:"optional",innerType:e})}o(y,"optional");var ju=T("ZodMiniNullable",(e,t)=>{Gn.init(e,t),Y.init(e,t)});function ot(e){return new ju({type:"nullable",innerType:e})}o(ot,"nullable");var Lu=T("ZodMiniPipe",(e,t)=>{Kn.init(e,t),Y.init(e,t)});function Ee(e,t){return new Lu({type:"pipe",in:e,out:t})}o(Ee,"pipe");var Fu=T("ZodMiniCustom",(e,t)=>{Jn.init(e,t),Y.init(e,t)});function Nt(e,t){return mo(Fu,e??(()=>!0),t)}o(Nt,"custom");var it={};ln(it,{bigint:()=>Gu,boolean:()=>Wu,date:()=>Ku,number:()=>qu,string:()=>Hu});function Hu(e){return to(Rt,e)}o(Hu,"string");function qu(e){return oo(fr,e)}o(qu,"number");function Wu(e){return ao(gr,e)}o(Wu,"boolean");function Gu(e){return so(yo,e)}o(Gu,"bigint");function Ku(e){return lo(vo,e)}o(Ku,"date");var hr=p({retryOnFailure:p({defaultValue:y(Z()),hide:y(Z())}),continueOnFailure:p({defaultValue:y(Z()),hide:y(Z())})}),yr=class{constructor(t,r,n,i,u,c,d,g,h,_,$){this.name=t;this.displayName=r;this.description=n;this.props=i;this.run=u;this.test=c;this.requireAuth=d;this.errorHandlingOptions=g;this.outputSchema=h;this.audience=_;this.aiMetadata=$}static{o(this,"IAction")}},H=o(e=>new yr(e.name,e.displayName,e.description,e.props,e.run,e.test??e.run,e.requireAuth??!0,e.errorHandlingOptions??{continueOnFailure:{defaultValue:!1},retryOnFailure:{defaultValue:!1}},e.outputSchema,e.audience,e.aiMetadata),"createAction");var F=p({displayName:a(),description:y(a())}),C=o((e,t)=>p({type:S(t),required:Z(),defaultValue:y(nt())}),"TPropertyValue");var oe=p({...F.shape,...C(a(),"SHORT_TEXT").shape}),ye=p({...F.shape,...C(a(),"LONG_TEXT").shape});var _o=p({label:a(),value:k()}),Dt=p({disabled:y(Z()),placeholder:y(a()),options:N(_o)});var ie=p({...F.shape,options:Dt,...C(k(),"STATIC_DROPDOWN").shape}),he=p({...F.shape,options:Dt,...C(N(k()),"STATIC_MULTI_SELECT_DROPDOWN").shape});var vr=p({...F.shape,...C(k(),"DROPDOWN").shape,refreshers:N(a())}),at=p({...F.shape,...C(N(k()),"MULTI_SELECT_DROPDOWN").shape,refreshers:N(a())});var ve=p({...F.shape,...C(Z(),"CHECKBOX").shape});var xe=p({...F.shape,...C(te(),"NUMBER").shape});var st=p({...F.shape,...C(k(),"FILE").shape});var ut=p({...F.shape,...C(a(),"DATE_TIME").shape});var Po=O(a(),D([oe,ye,ie,at,he,ve,xe,st,ut])),ct=p({...F.shape,properties:Po,...C(N(k()),"ARRAY").shape});var pt=p({...F.shape,...C(D([O(a(),k())]),"JSON").shape});var bo=D([oe,ie,pt,ct,he]),Xu=O(a(),bo),xr=p({refreshers:N(a()),...F.shape,...C(k(),"DYNAMIC").shape});var Ct=p({...F.shape,...C(ho(),"MARKDOWN").shape});var lt=(r=>(r.ARCHIVE="ARCHIVE",r.REGISTRY="REGISTRY",r))(lt||{}),je=(r=>(r.CUSTOM="CUSTOM",r.OFFICIAL="OFFICIAL",r))(je||{}),Le=(v=>(v.ARTIFICIAL_INTELLIGENCE="ARTIFICIAL_INTELLIGENCE",v.COMMUNICATION="COMMUNICATION",v.COMMERCE="COMMERCE",v.CORE="CORE",v.UNIVERSAL_AI="UNIVERSAL_AI",v.FLOW_CONTROL="FLOW_CONTROL",v.BUSINESS_INTELLIGENCE="BUSINESS_INTELLIGENCE",v.ACCOUNTING="ACCOUNTING",v.PRODUCTIVITY="PRODUCTIVITY",v.CONTENT_AND_FILES="CONTENT_AND_FILES",v.DEVELOPER_TOOLS="DEVELOPER_TOOLS",v.CUSTOMER_SUPPORT="CUSTOMER_SUPPORT",v.FORMS_AND_SURVEYS="FORMS_AND_SURVEYS",v.HUMAN_RESOURCES="HUMAN_RESOURCES",v.PAYMENT_PROCESSING="PAYMENT_PROCESSING",v.MARKETING="MARKETING",v.SALES_AND_CRM="SALES_AND_CRM",v))(Le||{});var dt=(r=>(r.AUTHORIZATION_CODE="authorization_code",r.CLIENT_CREDENTIALS="client_credentials",r))(dt||{}),_r="both_client_credentials_and_authorization_code";var $e=(i=>(i.POLLING="POLLING",i.WEBHOOK="WEBHOOK",i.APP_WEBHOOK="APP_WEBHOOK",i.MANUAL="MANUAL",i))($e||{}),mt=(u=>(u.NONE="NONE",u.HEADER_PRESENT="HEADER_PRESENT",u.QUERY_PRESENT="QUERY_PRESENT",u.BODY_PARAM_PRESENT="BODY_PARAM_PRESENT",u.HEAD_REQUEST="HEAD_REQUEST",u))(mt||{}),Yu=p({strategy:U(mt),paramName:y(a())}),ft=(r=>(r.SIMULATION="SIMULATION",r.TEST_FUNCTION="TEST_FUNCTION",r))(ft||{});var Ut=(r=>(r.WEBSOCKET="WEBSOCKET",r.NONE="NONE",r))(Ut||{}),To=p({status:y(te()),body:y(k()),headers:y(O(a(),a()))}),Io=p({type:S("DELAY"),resumeDateTime:a(),requestIdToReply:y(a()),handlerId:y(a()),streamStepProgress:y(U(Ut))}),Eo=p({type:S("WEBHOOK"),requestId:a(),requestIdToReply:y(a()),response:To,handlerId:y(a()),streamStepProgress:y(U(Ut))}),Qu=D([Io,Eo]);var ec=p({body:k(),rawBody:y(k()),headers:O(a(),a()),queryParams:O(a(),a())});function pe(e){return e==null}o(pe,"isNil");function gt(e){return e==null?!0:typeof e=="string"||Array.isArray(e)?e.length===0:typeof e=="object"?Object.keys(e).length===0:!1}o(gt,"isEmpty");function Mt(e,t){if(e==null)throw new Error(`${t} is null or undefined`)}o(Mt,"assertNotNullOrUndefined");var Pr=Ne(require("crypto"),1);var tc=128,we,Fe,rc=o(e=>{!we||we.length<e?(we=Buffer.allocUnsafe(e*tc),Pr.default.randomFillSync(we),Fe=0):Fe+e>we.length&&(Pr.default.randomFillSync(we),Fe=0),Fe+=e},"fillPool"),nc=o(e=>(rc(e|=0),we.subarray(Fe-e,Fe)),"random"),oc=o((e,t,r)=>{let n=(2<<31-Math.clz32(e.length-1|1))-1,i=Math.ceil(1.6*n*t/e.length);return(u=t)=>{let c="";for(;;){let d=r(i),g=i;for(;g--;)if(c+=e[d[g]&n]||"",c.length===u)return c}}},"customRandom"),So=o((e,t=21)=>oc(e,t,nc),"customAlphabet");var ic="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",Ao=21,sb=a().check(Te(new RegExp(`^[0-9a-zA-Z]{${Ao}}$`))),ac=So(ic,Ao);var Se=Ee(Ie(e=>e instanceof Date?e.toISOString():e),a()),se={id:a(),created:Se,updated:Se},q=o(e=>y(ot(e)),"Nullable");function br(e){return y(ot(U(e)))}o(br,"NullableEnum");var pb=Ee(Ie(e=>e==="true"||e===!0?!0:e==="false"||e===!1?!1:void 0),y(Z())),jt=o(e=>Ee(Ie(t=>Array.isArray(t)?t:t!==void 0?[t]:void 0),y(N(e))),"OptionalArrayFromQuery");var mb=O(a(),k());var yt=(_=>(_.OPENAI="openai",_.OPENROUTER="openrouter",_.ANTHROPIC="anthropic",_.AZURE="azure",_.GOOGLE="google",_.ACTIVEPIECES="activepieces",_.CLOUDFLARE_GATEWAY="cloudflare-gateway",_.CUSTOM="custom",_.BEDROCK="bedrock",_.MISTRAL="mistral",_))(yt||{});var Eb=a().check(Te(/^#[0-9A-Fa-f]{6}$/));var Sb=p({filename:a(),data:k(),type:S("file"),mimetype:y(a())});var sc=Ne(wo());var Nb=p({...se,name:a(),permissions:N(a()),platformId:q(a()),type:a(),userCount:y(te())});var ko=(n=>(n.AGENT_DECIDE="agent-decide",n.CHOOSE_YOURSELF="choose-yourself",n.LEAVE_EMPTY="leave-empty",n))(ko||{}),Tr=(r=>(r.FILE="FILE",r.TABLE="TABLE",r))(Tr||{}),Ir=(n=>(n.SSE="sse",n.STREAMABLE_HTTP="streamable-http",n.SIMPLE_HTTP="http",n))(Ir||{});var Er=(n=>(n.TEXT="text",n.NUMBER="number",n.BOOLEAN="boolean",n))(Er||{});var $r=(r=>(r.IN_PROGRESS="in-progress",r.COMPLETED="completed",r))($r||{});var uc=p({mode:U(ko),value:k()}),cc=p({auth:y(a()),fields:O(a(),uc)}),pc=p({pieceName:a(),pieceVersion:a(),actionName:a(),predefinedInput:y(cc)}),lc=p({type:S("PIECE"),toolName:a().check(ce(1)),pieceMetadata:pc}),dc=p({type:S("none")}),mc=p({type:S("access_token"),accessToken:a()}),fc=p({type:S("api_key"),apiKey:a(),apiKeyHeader:a()}),gc=p({type:S("headers"),headers:O(a(),a())}),yc=Me("type",[dc,mc,fc,gc]),Oo=p({type:S("FLOW"),toolName:a().check(ce(1)),externalFlowId:a(),flowDisplayName:y(a())}),Ro=p({type:S("MCP"),toolName:a().check(ce(1)),serverUrl:go(),protocol:U(Ir),auth:yc}),No=p({type:S("KNOWLEDGE_BASE"),toolName:a().check(ce(1)),sourceType:U(Tr),sourceId:a(),sourceName:a()}),hc=Me("type",[lc,Oo,Ro,No]),vc=p({displayName:a(),description:y(a()),type:U(Er)}),Do=p({type:S("MARKDOWN"),markdown:a()}),Be={type:S("TOOL_CALL"),input:q(O(a(),k())),output:y(k()),toolName:a(),status:U($r),toolCallId:a(),startTime:a(),endTime:y(a())},sT=p(Be),Co=Me("toolCallType",[p({...Be,toolCallType:S("PIECE"),pieceName:a(),pieceVersion:a(),actionName:a()}),p({...Be,toolCallType:S("FLOW"),displayName:a(),externalFlowId:a()}),p({...Be,toolCallType:S("MCP"),displayName:a(),serverUrl:a()}),p({...Be,toolCallType:S("KNOWLEDGE_BASE"),displayName:a(),sourceType:a()}),p({...Be,toolCallType:S("UNKNOWN"),displayName:a()})]),xc=D([Do,Co]);var Sr=(r=>(r.IMAGE="image",r.TEXT="text",r))(Sr||{}),_e=p({apiKey:a()}),_c=_e,Pc=p({apiKey:a(),apiKeyHash:a()}),bc=_e,Tc=_e,Ic=_e,Ec=_e,$c=_e,Sc=_e,Ac=_e,Uo=p({accessKeyId:a().check(ce(1)),secretAccessKey:a().check(ce(1))}),zc=p({}),wc=p({}),kc=p({}),Oc=p({}),Rc=p({}),Nc=p({}),Mo=p({modelId:a(),modelName:a(),modelType:U(Sr)}),jo=p({apiKeyHeader:a(),baseUrl:a(),models:N(Mo),defaultHeaders:y(O(a(),a()))}),Lo=p({accountId:a(),gatewayId:a(),models:N(Mo),vertexProject:y(a()),vertexRegion:y(a())}),Fo=p({resourceName:a(),apiVersion:Ee(Ie(e=>typeof e=="string"&&e.trim().length===0?void 0:e),y(a()))}),Bo=p({region:a().check(ce(1))}),Dc=D([_c,Ic,Ec,$c,Sc,Tc,bc,Pc,Uo,Ac]),Vo=D([jo,Lo,Fo,Bo,zc,kc,Oc,Rc,wc,Nc]),Cc=p({id:a(),name:a(),type:U(Sr)}),Uc=p({id:a(),name:a(),provider:U(yt),config:Vo,enabledForChat:Z()}),Mc=p({provider:U(yt),config:Vo,auth:Dc,platformId:a()});var lT={openai:"openai",anthropic:"anthropic","google-ai-studio":"google","google-vertex-ai":"google"};var jc=p({base64Url:a(),fileName:a(),extension:y(a())}),Lc=p({mimeType:a(),url:a(),fileName:y(a())}),Ar=D([jc,Lc]);var Fc=D([p({type:S("file"),value:Ar}),p({type:S("markdown"),value:a(),files:y(N(Ar))})]),Bc=p({sessionId:a(),message:a(),files:y(N(a()))});var Ho=(r=>(r.ON_NEW_RECORD="ON_NEW_RECORD",r.ON_UPDATE_RECORD="ON_UPDATE_RECORD",r))(Ho||{}),qo=(r=>(r.ENABLED="ENABLED",r.DISABLED="DISABLED",r))(qo||{}),zr=(n=>(n.RECORD_CREATED="RECORD_CREATED",n.RECORD_UPDATED="RECORD_UPDATED",n.RECORD_DELETED="RECORD_DELETED",n))(zr||{});var Vc=D([p({...se,name:a(),externalId:a(),type:S("STATIC_DROPDOWN"),tableId:a(),projectId:a(),data:p({options:N(p({value:a()}))})}),p({...se,name:a(),externalId:a(),type:D([S("TEXT"),S("NUMBER"),S("DATE")]),tableId:a(),projectId:a()})]),Zc=p({...se,name:a(),folderId:q(a()),projectId:a(),externalId:a(),status:br(qo),trigger:br(Ho)}),Hc=p({...se,tableId:a(),projectId:a(),cells:O(a(),p({updated:a(),created:a(),value:k(),fieldName:a()}))}),qc=p({events:N(U(zr)),webhookUrl:a(),flowId:a()}),Wc=p({fields:N(p({id:a(),name:a()})),rows:N(O(a(),a())),name:a()}),Gc=p({projectId:a(),limit:y(it.number()),cursor:y(a()),name:y(a()),externalIds:jt(a()),folderId:y(a()),folderIds:jt(a())}),Kc=p({records:N(N(p({fieldId:a(),value:Go()}))),tableId:a()}),Jc=p({cells:y(N(p({fieldId:a(),value:Go()}))),tableId:a(),agentUpdate:y(Z())}),Wo=Me("operator",[ke("eq"),ke("neq"),ke("gt"),ke("gte"),ke("lt"),ke("lte"),ke("co"),Zo("exists"),Zo("not_exists")]),Xc=p({tableId:a(),limit:y(it.number()),cursor:y(a()),filters:jt(Wo)});function Go(){return Ee(Ie(e=>e==null?e:String(e)),ot(a()))}o(Go,"coerceToString");function ke(e){return p({fieldId:a(),operator:S(e),value:a()})}o(ke,"valueFilter");function Zo(e){return p({fieldId:a(),operator:S(e)})}o(Zo,"existenceFilter");var Yc=p({status:y(te()),body:y(k()),headers:y(O(a(),a()))}),Qc=p({...se,deleted:q(Se),ownerId:a(),displayName:a(),platformId:a(),externalId:q(a())});var Ko=p({name:a(),description:y(a()),type:a(),required:Z()}),ep=p({pieceName:a(),triggerName:a(),input:p({toolName:a(),toolDescription:a(),inputSchema:N(Ko),returnsResponse:Z()})});var Jo="^[0-9]+\\.[0-9]+\\.[0-9]+$",wT=new RegExp(Jo),rp="^([~^])?[0-9]+\\.[0-9]+\\.[0-9]+$",kT=a().check(Te(new RegExp(Jo))),OT=a().check(Te(new RegExp(rp))),np=p({packageType:S("ARCHIVE"),pieceType:U(je),pieceName:a(),pieceVersion:a(),archiveId:a(),platformId:a()}),Xo=p({packageType:S("REGISTRY"),pieceType:S("OFFICIAL"),pieceName:a(),pieceVersion:a()}),Yo=p({packageType:S("REGISTRY"),pieceType:S("CUSTOM"),pieceName:a(),pieceVersion:a(),platformId:a()}),RT=D([Xo,Yo]),NT=D([np,Xo,Yo]),Qo=(t=>(t.CRON_EXPRESSION="CRON_EXPRESSION",t))(Qo||{}),op=p({type:U(Qo),cronExpression:a(),timezone:a()}),DT=p({...se,type:U($e),projectId:a(),flowId:a(),triggerName:a(),schedule:q(op),flowVersionId:a(),pieceName:a(),pieceVersion:a(),deleted:q(a()),simulate:Z()}),ei=(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))(ei||{}),ti=(r=>(r.NONE="NONE",r.ZSTD="ZSTD",r))(ti||{}),ri=(r=>(r.S3="S3",r.DB="DB",r))(ri||{}),CT=p({...se,projectId:q(a()),platformId:q(a()),type:U(ei),compression:U(ti),data:y(k()),location:U(ri),size:q(te()),fileName:q(a()),s3Key:q(a()),metadata:q(O(a(),a()))}),ni=(n=>(n.ADMIN="ADMIN",n.MEMBER="MEMBER",n.OPERATOR="OPERATOR",n))(ni||{}),oi=(r=>(r.ACTIVE="ACTIVE",r.INACTIVE="INACTIVE",r))(oi||{}),UT=p({id:a(),email:a(),firstName:a(),status:U(oi),externalId:q(a()),platformId:q(a()),platformRole:U(ni),lastName:a(),created:Se,updated:Se,lastActiveDate:q(Se),imageUrl:q(a())});var wr=p({...F.shape,...C(O(a(),k()),"OBJECT").shape});var ui=p({...F.shape,...C(a(),"COLOR").shape});var kr=D([oe,ye,Ct,ve,ie,he,vr,at,xr,xe,ct,wr,pt,ut,st,ui]),b={ShortText(e){return{...e,valueSchema:void 0,type:"SHORT_TEXT"}},Checkbox(e){return{...e,valueSchema:void 0,type:"CHECKBOX"}},LongText(e){return{...e,valueSchema:void 0,type:"LONG_TEXT"}},MarkDown(e){return{displayName:"Markdown",required:!1,description:e.value,type:"MARKDOWN",valueSchema:void 0,variant:e.variant??"INFO"}},Number(e){return{...e,valueSchema:void 0,type:"NUMBER"}},Json(e){return{...e,valueSchema:void 0,type:"JSON"}},Array(e){return{...e,valueSchema:void 0,type:"ARRAY"}},Object(e){return{...e,valueSchema:void 0,type:"OBJECT"}},Dropdown(e){return{...e,valueSchema:void 0,type:"DROPDOWN"}},StaticDropdown(e){return{...e,valueSchema:void 0,type:"STATIC_DROPDOWN"}},MultiSelectDropdown(e){return{...e,valueSchema:void 0,type:"MULTI_SELECT_DROPDOWN"}},DynamicProperties(e){return{...e,valueSchema:void 0,type:"DYNAMIC"}},StaticMultiSelectDropdown(e){return{...e,valueSchema:void 0,type:"STATIC_MULTI_SELECT_DROPDOWN"}},DateTime(e){return{...e,valueSchema:void 0,type:"DATE_TIME"}},File(e){return{...e,valueSchema:void 0,type:"FILE"}},Custom(e){let t=e.code.toString();return{...e,code:t,valueSchema:void 0,type:"CUSTOM"}},Color(e){return{...e,valueSchema:void 0,type:"COLOR"}}};var me=p({displayName:a(),description:y(a())});var ci=p({username:a(),password:a()}),Or=p({...me.shape,username:p({displayName:a(),description:y(a())}),password:p({displayName:a(),description:y(a())}),...C(ci,"BASIC_AUTH").shape});var up=O(a(),D([oe,ye,xe,ve,ie])),Rr=p({...me.shape,props:up,...C(k(),"CUSTOM_AUTH").shape});var Oe=p({...me.shape,...C(p({auth:a()}),"SECRET_TEXT").shape});var cp=O(a(),D([oe,ye,Oe,xe,ve,ie,he,Ct])),pi=p({...me.shape,props:cp,...C(k(),"OIDC").shape});var Nr=(r=>(r.HEADER="HEADER",r.BODY="BODY",r))(Nr||{}),li=D([oe,Oe,ie]),di=O(a(),li),pp=p({props:y(O(a(),li)),authUrl:a(),tokenUrl:a(),scope:N(a()),prompt:y(D([S("none"),S("consent"),S("login"),S("omit")])),pkce:y(Z()),pkceMethod:y(D([S("plain"),S("S256")])),authorizationMethod:y(U(Nr)),grantType:y(D([U(dt),S(_r)])),extra:y(O(a(),a()))}),mi=p({access_token:a(),props:y(di),data:O(a(),nt())}),Dr=p({...me.shape,...pp.shape,...C(mi,"OAUTH2").shape});var Ve=D([Or,Rr,pi,Dr,Oe]),ht="Connection",Cr={SecretText(e){return{...e,valueSchema:void 0,type:"SECRET_TEXT"}},OAuth2(e){return{...e,valueSchema:void 0,type:"OAUTH2",displayName:e.displayName||ht}},BasicAuth(e){return{...e,valueSchema:void 0,type:"BASIC_AUTH",displayName:e.displayName||ht,required:!0}},CustomAuth(e){return{...e,valueSchema:void 0,type:"CUSTOM_AUTH",displayName:e.displayName||ht}},OIDC(e){return{...e,valueSchema:void 0,type:"OIDC",displayName:e.displayName||ht}},None(){}};var gE={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 lp=p({...F.shape,...C(k(),"CUSTOM").shape,code:a()});var dp=D([kr,Ve]),Ur=O(a(),dp),DE=O(a(),kr);var fi=D([p({strategy:S("CRON"),cronExpression:a()}),p({strategy:S("NONE")})]),Ze=class{constructor(t,r,n,i,u,c,d,g,h,_,$,x,s,l,f,m,v,P,j){this.name=t;this.displayName=r;this.description=n;this.requireAuth=i;this.props=u;this.type=c;this.handshakeConfiguration=d;this.onHandshake=g;this.renewConfiguration=h;this.onRenew=_;this.onEnable=$;this.onDisable=x;this.onStart=s;this.run=l;this.test=f;this.sampleData=m;this.testStrategy=v;this.outputSchema=P;this.aiMetadata=j}static{o(this,"ITrigger")}},gi=o(e=>{switch(e.type){case"WEBHOOK":return new Ze(e.name,e.displayName,e.description,e.requireAuth??!0,e.props,e.type,e.handshakeConfiguration??{strategy:"NONE"},e.onHandshake??(async()=>({status:200})),e.renewConfiguration??{strategy:"NONE"},e.onRenew??(async()=>Promise.resolve()),e.onEnable,e.onDisable,e.onStart??(async()=>Promise.resolve()),e.run,e.test??(()=>Promise.resolve([e.sampleData])),e.sampleData,e.test?"TEST_FUNCTION":"SIMULATION",e.outputSchema,e.aiMetadata);case"POLLING":return new Ze(e.name,e.displayName,e.description,e.requireAuth??!0,e.props,e.type,{strategy:"NONE"},async()=>({status:200}),{strategy:"NONE"},async()=>Promise.resolve(),e.onEnable,e.onDisable,e.onStart??(async()=>Promise.resolve()),e.run,e.test??(()=>Promise.resolve([e.sampleData])),e.sampleData,"TEST_FUNCTION",e.outputSchema,e.aiMetadata);case"MANUAL":return new Ze(e.name,e.displayName,e.description,e.requireAuth??!0,e.props,e.type,{strategy:"NONE"},async()=>({status:200}),{strategy:"NONE"},async()=>Promise.resolve(),e.onEnable,e.onDisable,e.onStart??(async()=>Promise.resolve()),e.run,e.test??(()=>Promise.resolve([e.sampleData])),e.sampleData,"TEST_FUNCTION",e.outputSchema,e.aiMetadata);case"APP_WEBHOOK":return new Ze(e.name,e.displayName,e.description,e.requireAuth??!0,e.props,e.type,{strategy:"NONE"},async()=>({status:200}),{strategy:"NONE"},async()=>Promise.resolve(),e.onEnable,e.onDisable,e.onStart??(async()=>Promise.resolve()),e.run,e.test??(()=>Promise.resolve([e.sampleData])),e.sampleData,pe(e.sampleData)&&pe(e.test)?"SIMULATION":"TEST_FUNCTION",e.outputSchema,e.aiMetadata)}},"createTrigger");var yi="2",Ft="0.82.0";var Mr=class{constructor(t,r,n,i,u,c,d,g,h=Ft,_,$=""){this.displayName=t;this.logoUrl=r;this.authors=n;this.events=i;this.categories=d;this.auth=g;this.minimumSupportedRelease=h;this.maximumSupportedRelease=_;this.description=$;this._actions={};this._triggers={};this.getContextInfo=o(()=>({version:yi}),"getContextInfo");(!mp(h)||fp(h,Ft))&&(this.minimumSupportedRelease=Ft),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}},hi=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 Mr(e.displayName,e.logoUrl,e.authors??[],e.events,e.actions,e.triggers,e.categories??[],e.auth,e.minimumSupportedRelease,e.maximumSupportedRelease,e.description)},"createPiece");function mp(e){return/^\d+\.\d+\.\d+$/.test(e)}o(mp,"isValidSimpleSemver");function fp(e,t){let[r,n,i]=e.split(".").map(Number),[u,c,d]=t.split(".").map(Number);return r!==u?r<u:n!==c?n<c:i<d}o(fp,"isSemverLessThan");var gp=y(O(a(),O(a(),a()))),vi=p({id:y(a()),name:a(),displayName:a(),logoUrl:a(),description:a(),authors:N(a()),platformId:y(a()),directoryPath:y(a()),auth:y(D([Ve,N(Ve)])),version:a(),categories:y(N(U(Le))),minimumSupportedRelease:y(a()),maximumSupportedRelease:y(a()),i18n:gp}),yp=U(["human","ai","both"]),xi=p({description:y(a()),idempotent:y(Z())}),_i=p({name:a(),displayName:a(),description:a(),props:Ur,requireAuth:Z(),errorHandlingOptions:y(hr),outputSchema:y(Nt()),audience:y(yp),aiMetadata:y(xi)}),Pi=p({name:a(),displayName:a(),description:a(),props:Ur,errorHandlingOptions:y(hr),type:U($e),sampleData:k(),handshakeConfiguration:y(Nt()),renewConfiguration:y(fi),testStrategy:U(ft),outputSchema:y(Nt()),aiMetadata:y(xi)}),hp=p({...vi.shape,actions:O(a(),_i),triggers:O(a(),Pi)}),vp=p({...vi.shape,actions:te(),triggers:te(),suggestedActions:y(N(Pi)),suggestedTriggers:y(N(_i))}),bi=p({projectUsage:te(),tags:y(N(a())),pieceType:U(je),packageType:U(lt),platformId:y(a()),archiveId:y(a())}),D$=p({...hp.shape,...bi.shape}),C$=p({...vp.shape,...bi.shape}),U$=p({name:a(),version:a()});var xp=Ne(require("path")),_p=Ne(require("fs/promises"));var Bt=class{constructor(t,r){this.baseUrl=t;this.authenticationConverter=r}static{o(this,"BaseHttpClient")}getUrl(t){let r=new URL(`${this.baseUrl}${t.url}`),n=`${r.origin}${r.pathname}`,i=new URLSearchParams;return r.searchParams.forEach((u,c)=>{i.append(c,u)}),{urlWithoutQueryParams:n,queryParams:i}}getHeaders(t){let r={Accept:"application/json"};if(t.authentication&&this.populateAuthentication(t.authentication,r),t.body)switch(t.headers?.["Content-Type"]){case"text/csv":r["Content-Type"]="text/csv";break;default:r["Content-Type"]="application/json";break}return t.headers&&(r={...r,...t.headers}),r}populateAuthentication(t,r){this.authenticationConverter.convert(t,r)}};var Vt=class{static{o(this,"DelegatingAuthenticationConverter")}constructor(t=new jr,r=new Lr){this.converters={BEARER_TOKEN:t,BASIC:r}}convert(t,r){return this.converters[t.type].convert(t,r)}},jr=class{static{o(this,"BearerTokenAuthenticationConverter")}convert(t,r){return r.Authorization=`Bearer ${t.token}`,r}},Lr=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 Zt=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 Ht=class extends Bt{static{o(this,"FetchHttpClient")}constructor(t="",r=new Vt){super(t,r)}async sendRequest(t,r){process.env.NODE_TLS_REJECT_UNAUTHORIZED="0";let{urlWithoutQueryParams:n,queryParams:i}=this.getUrl(t),u=this.getHeaders(t),c=t.queryParams??{};for(let[j,ne]of Object.entries(c))i.append(j,ne);let d=i.toString(),g=d?`${n}?${d}`:n,h=t.responseType??"json",_=t.followRedirects??!0,$=t.retries??0,{body:x,extraHeaders:s,isStream:l}=Pp(t.body,u),f=Tp({...u,...s}),m=await bp(async()=>{let j=new AbortController,ne=t.timeout&&t.timeout>0?setTimeout(()=>j.abort(),t.timeout):void 0;try{let ue={method:t.method.toString(),headers:f,body:x,redirect:_?"follow":"manual",signal:j.signal};return l&&(ue.duplex="half"),r?.dispatcher!==void 0&&(ue.dispatcher=r.dispatcher),await fetch(g,ue)}finally{ne!==void 0&&clearTimeout(ne)}},$),v=_?300:400;if(m.status<200||m.status>=v){let j=await Ti(m,h),ne=new Zt(t.body,{status:m.status,responseBody:j});throw console.error("[HttpClient#(sanitized error message)] Request failed:",ne),ne}let P=await Ti(m,h);return{status:m.status,headers:Ip(m.headers),body:P}}};function Pp(e,t){return $p(e)?{body:void 0,extraHeaders:{},isStream:!1}:Ep(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(Pp,"serializeBody");async function Ti(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(Ti,"parseResponseBody");async function bp(e,t){let r;for(let n=0;n<=t;n++)try{let i=await e();if(i.status>=500&&n<t){await Ii(n);continue}return i}catch(i){if(r=i,n<t){await Ii(n);continue}throw i}throw r}o(bp,"sendWithRetries");function Ii(e){let t=Math.min(1e3*2**e,3e4);return new Promise(r=>setTimeout(r,t))}o(Ii,"backoff");function Tp(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(Tp,"normalizeHeaders");function Ip(e){let t={};return e.forEach((r,n)=>{t[n]=r}),t}o(Ip,"toHttpHeaders");function Ep(e){return typeof e=="object"&&e!==null&&typeof e.getHeaders=="function"&&typeof e.pipe=="function"}o(Ep,"isNodeFormData");function $p(e){return e==null}o($p,"isNil");var B=new Ht;var ee=(c=>(c.GET="GET",c.POST="POST",c.PATCH="PATCH",c.PUT="PUT",c.DELETE="DELETE",c.HEAD="HEAD",c))(ee||{});var md=Ne(require("fs")),ws=Ne(zs());var fd={"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 gd(e){let t=e.split(";")[0].trim().toLowerCase();return fd[t]??""}o(gd,"contentTypeToExtension");var yd=o(({baseUrl:e,relativePath:t})=>{let r=e.endsWith("/")?e:`${e}/`,n=t.startsWith("/")?t.slice(1):t;return`${r}${n}`},"joinBaseUrlWithRelativePath"),hd=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 ks({auth:e,baseUrl:t,authMapping:r,description:n,displayName:i,name:u,props:c,extraProps:d,authLocation:g="headers"}){return H({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:b.DynamicProperties({auth:e,displayName:"",required:!0,refreshers:[],props:o(async({auth:h})=>({url:b.ShortText({displayName:"URL",description:`You can either use the full URL or the relative path to the base URL
|
|
3
|
+
i.e ${hd(t,h)}/resource or /resource`,required:!0,defaultValue:h?t(h):"",...c?.url??{}})}),"props")}),method:b.StaticDropdown({displayName:"Method",required:!0,options:{options:Object.values(ee).map(h=>({label:h,value:h}))},...c?.method??{}}),headers:b.Object({displayName:"Headers",description:"Authorization headers are injected automatically from your connection.",required:!0,...c?.headers??{}}),queryParams:b.Object({displayName:"Query Parameters",required:!0,...c?.queryParams??{}}),body_type:b.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:b.DynamicProperties({auth:e,displayName:"Body",refreshers:["body_type"],required:!1,props:o(async({body_type:h})=>{if(!h)return{};let _=h,$={};switch(_){case"none":break;case"json":$.data=b.Json({displayName:"JSON Body",required:!0,...c?.body??{}});break;case"raw":$.data=b.LongText({displayName:"Raw Body",required:!0});break;case"form_data":$.data=b.Array({displayName:"Form Data",required:!0,properties:{fieldName:b.ShortText({displayName:"Field Name",required:!0}),fieldType:b.StaticDropdown({displayName:"Field Type",required:!0,options:{disabled:!1,options:[{label:"Text",value:"text"},{label:"File",value:"file"}]}}),textFieldValue:b.LongText({displayName:"Text Field Value",required:!1}),fileFieldValue:b.File({displayName:"File Field Value",required:!1})}});break}return $},"props")}),response_is_binary:b.Checkbox({displayName:"Response is Binary ?",description:"Enable for files like PDFs, images, etc.",required:!1,defaultValue:!1}),failsafe:b.Checkbox({displayName:"No Error on Failure",required:!1,...c?.failsafe??{}}),timeout:b.Number({displayName:"Timeout (in seconds)",required:!1,...c?.timeout??{}}),followRedirects:b.Checkbox({displayName:"Follow redirects",required:!1,defaultValue:!1}),...d},run:o(async h=>{let{method:_,url:$,headers:x,queryParams:s,body:l,body_type:f,failsafe:m,timeout:v,response_is_binary:P,followRedirects:j}=h.propsValue;Mt(_,"Method"),Mt($,"URL");let ne=pe(r)?{}:await r(h.auth,h.propsValue),ue=$.url,Je=ue.startsWith("http://")||ue.startsWith("https://")?ue:yd({baseUrl:t(h.auth),relativePath:ue}),ze={method:_,url:Je,headers:{...x??{},...g==="headers"||!pe(g)?ne:{}},queryParams:{...g==="queryParams"?ne:{},...s??{}},timeout:v?v*1e3:0,followRedirects:j};if(P&&(ze.responseType="arraybuffer"),l)if(f&&f!=="none"){let fe=l.data;if(f==="form_data"){let qs=fe,Pt=new ws.default;for(let{fieldName:un,fieldType:cn,textFieldValue:pn,fileFieldValue:tr}of qs)cn==="text"&&!gt(pn)?Pt.append(un,pn):cn==="file"&&!gt(tr)&&Pt.append(un,tr.data,{filename:tr?.filename});ze.body=Pt,ze.headers={...ze.headers,...Pt.getHeaders()}}else ze.body=fe}else f||(ze.body=l);try{let fe=await B.sendRequest(ze);return await vd(h.files,fe.body,fe.status,fe.headers,P)}catch(fe){if(m)return fe.errorMessage();throw fe}},"run")})}o(ks,"createCustomApiCallAction");var vd=o(async(e,t,r,n,i)=>{let u;if(i&&xd(t)){let c=Array.isArray(n?.["content-type"])?n["content-type"][0]:n?.["content-type"],d=gd(c??"")||"txt",g;t instanceof ArrayBuffer?g=Buffer.from(new Uint8Array(t)):Buffer.isBuffer(t)?g=t:g=Buffer.from(t),u=await e.write({fileName:`output.${d}`,data:g})}else u=t;return{status:r,headers:n,body:u}},"handleBinaryResponse"),xd=o(e=>e instanceof ArrayBuffer||Buffer.isBuffer(e),"isBinaryBody");var V=Cr.OAuth2({description:"",authUrl:"https://www.dropbox.com/oauth2/authorize",tokenUrl:"https://api.dropboxapi.com/oauth2/token",required:!0,extra:{token_access_type:"offline"},scope:["files.metadata.write","files.metadata.read","files.content.write","files.content.read"]});var Os=H({auth:V,name:"copy_dropbox_file",description:"Copy a file",audience:"both",aiMetadata:{description:"Copies the file at the source path to a new destination path within Dropbox, leaving the original in place; optionally autorenames on conflict. Use to duplicate a single file. Not idempotent: each call creates a copy, so repeating it errors on conflict or, with autorename, produces additional duplicates.",idempotent:!1},displayName:"Copy file",props:{from_path:b.ShortText({displayName:"From Path",description:"The source path of the file (e.g. /folder1/sourcefile.txt)",required:!0}),to_path:b.ShortText({displayName:"To Path",description:"The destination path for the copied (e.g. /folder2/destinationfile.txt)",required:!0}),autorename:b.Checkbox({displayName:"Auto Rename",description:"If there's a conflict, have the Dropbox server try to autorename the file to avoid conflict.",defaultValue:!1,required:!1}),allow_ownership_transfer:b.Checkbox({displayName:"Allow Ownership Transfer",description:"Allows copy by owner even if it would result in an ownership transfer.",defaultValue:!1,required:!1})},async run(e){let t={from_path:e.propsValue.from_path,to_path:e.propsValue.to_path,autorename:e.propsValue.autorename,allow_ownership_transfer:e.propsValue.allow_ownership_transfer};return(await B.sendRequest({method:"POST",url:"https://api.dropboxapi.com/2/files/copy_v2",headers:{"Content-Type":"application/json"},body:t,authentication:{type:"BEARER_TOKEN",token:e.auth.access_token}})).body}});var Rs=H({auth:V,name:"copy_dropbox_folder",description:"Copy a folder",audience:"both",aiMetadata:{description:"Copies the folder at the source path, including its contents, to a new destination path within Dropbox, leaving the original in place; optionally autorenames on conflict. Use to duplicate an entire directory. Not idempotent: each call creates a copy, so repeating it errors on conflict or, with autorename, produces additional duplicates.",idempotent:!1},displayName:"Copy folder",props:{from_path:b.ShortText({displayName:"From Path",description:"The source path of the folder (e.g. /folder1/sourceFolder)",required:!0}),to_path:b.ShortText({displayName:"To Path",description:"The destination path for the copied folder (e.g. /folder2/destinationFolder)",required:!0}),autorename:b.Checkbox({displayName:"Auto Rename",description:"If there's a conflict, have the Dropbox server try to autorename the folder to avoid conflict.",defaultValue:!1,required:!1}),allow_ownership_transfer:b.Checkbox({displayName:"Allow Ownership Transfer",description:"Allows copy by owner even if it would result in an ownership transfer.",defaultValue:!1,required:!1})},async run(e){let t={from_path:e.propsValue.from_path,to_path:e.propsValue.to_path,autorename:e.propsValue.autorename,allow_ownership_transfer:e.propsValue.allow_ownership_transfer};return(await B.sendRequest({method:"POST",url:"https://api.dropboxapi.com/2/files/copy_v2",headers:{"Content-Type":"application/json"},body:t,authentication:{type:"BEARER_TOKEN",token:e.auth.access_token}})).body}});var Ns=H({auth:V,name:"create_new_dropbox_folder",description:"Create a new empty folder",audience:"both",aiMetadata:{description:"Creates a new empty folder at the given Dropbox path; optionally autorenames on conflict. Use to set up a destination directory before placing files. Not idempotent: a repeat call for an existing path errors (or, with autorename, creates a differently named folder).",idempotent:!1},displayName:"Create New Folder",props:{path:b.ShortText({displayName:"Path",description:"The path of the new folder e.g. /Homework/math",required:!0}),autorename:b.Checkbox({displayName:"Auto Rename",description:"If there's a conflict, have the Dropbox server try to autorename the folder to avoid the conflict. The default for this field is False.",required:!1})},async run(e){let t={autorename:!!e.propsValue.autorename,path:e.propsValue.path},r={method:"POST",url:"https://api.dropboxapi.com/2/files/create_folder_v2",body:t,authentication:{type:"BEARER_TOKEN",token:e.auth.access_token}},n=await B.sendRequest(r);return n.status==200?n.body:n}});var Ds=H({auth:V,name:"create_new_dropbox_text_file",description:"Create a new text file from text input",audience:"both",aiMetadata:{description:"Writes the provided text content to a new file at the given Dropbox path (upload in add mode). Use when an agent needs to persist generated or supplied text directly as a file without first producing a file object. Not idempotent: each call uploads, so repeating it can create autorenamed duplicates rather than overwriting.",idempotent:!1},displayName:"Create New Text File",props:{path:b.ShortText({displayName:"Path",description:"The path of the new folder e.g. /Homework/math",required:!0}),text:b.LongText({displayName:"Text",description:"The text to write into the file.",required:!0}),autorename:b.Checkbox({displayName:"Autorename",description:"If there's a conflict, have the Dropbox server try to autorename the folder to avoid the conflict. The default for this field is False.",required:!1}),mute:b.Checkbox({displayName:"Mute",description:"Normally, users are made aware of any file modifications in their Dropbox account via notifications in the client software. If true, this tells the clients that this modification shouldn't result in a user notification.",required:!1}),strict_conflict:b.Checkbox({displayName:"Strict conflict",description:`Be more strict about how each WriteMode detects conflict. For example, always return a conflict error when mode = WriteMode.update and the given "rev" doesn't match the existing file's "rev", even if the existing file has been deleted.`,required:!1})},async run(e){let t={autorename:e.propsValue.autorename,path:e.propsValue.path,mode:"add",mute:e.propsValue.mute,strict_conflict:e.propsValue.strict_conflict},r={method:"POST",url:"https://content.dropboxapi.com/2/files/upload",body:Buffer.from(e.propsValue.text,"utf-8"),authentication:{type:"BEARER_TOKEN",token:e.auth.access_token},headers:{"Dropbox-API-Arg":JSON.stringify(t),"Content-Type":"application/octet-stream"}},n=await B.sendRequest(r);return n.status==200?n.body:n}});var Cs=H({auth:V,name:"delete_dropbox_file",description:"Delete a file",audience:"both",aiMetadata:{description:"Permanently deletes the file at the given Dropbox path. Use to remove a specific file an agent has resolved the path for. Effectively idempotent on the end state once the path is gone, but a repeat call fails because the path no longer exists; treat as a destructive, non-recoverable mutation.",idempotent:!1},displayName:"Delete file",props:{path:b.ShortText({displayName:"Path",description:"The path of the file to be deleted (e.g. /folder1/file.txt)",required:!0})},async run(e){let t={path:e.propsValue.path};return(await B.sendRequest({method:"POST",url:"https://api.dropboxapi.com/2/files/delete_v2",headers:{"Content-Type":"application/json"},body:{path:e.propsValue.path},authentication:{type:"BEARER_TOKEN",token:e.auth.access_token}})).body}});var Us=H({auth:V,name:"delete_dropbox_folder",description:"Delete a folder",audience:"both",aiMetadata:{description:"Permanently deletes the folder at the given Dropbox path along with all of its contents. Use to remove an entire directory. Effectively idempotent on the end state once the path is gone, but a repeat call fails because the path no longer exists; treat as a destructive, non-recoverable mutation.",idempotent:!1},displayName:"Delete folder",props:{path:b.ShortText({displayName:"Path",description:"The path of the folder to be deleted (e.g. /folder1)",required:!0})},async run(e){let t={path:e.propsValue.path};return(await B.sendRequest({method:"POST",url:"https://api.dropboxapi.com/2/files/delete_v2",headers:{"Content-Type":"application/json"},body:t,authentication:{type:"BEARER_TOKEN",token:e.auth.access_token}})).body}});var Ms=H({auth:V,name:"get_dropbox_file_link",description:"Get a temporary file link",audience:"both",aiMetadata:{description:"Returns a temporary, directly downloadable URL for the file at the given Dropbox path. Use when an agent needs a shareable or fetchable link to file contents rather than downloading the bytes into the flow. Read-only lookup; safe to repeat, though the returned URL is short-lived.",idempotent:!0},displayName:"Get temporary file link",props:{path:b.ShortText({displayName:"Path",description:"The path of the file (e.g. /folder1/file.txt)",required:!0})},async run(e){let t={path:e.propsValue.path};return(await B.sendRequest({method:"POST",url:"https://api.dropboxapi.com/2/files/get_temporary_link",headers:{"Content-Type":"application/json"},body:{path:e.propsValue.path},authentication:{type:"BEARER_TOKEN",token:e.auth.access_token}})).body}});var js=H({auth:V,name:"list_dropbox_folder",description:"List the contents of a folder",audience:"both",aiMetadata:{description:"Lists the files and subfolders within the given Dropbox folder path (use an empty string for the root), optionally recursing into all subfolders. Use to enumerate folder contents and discover item paths/IDs. Read-only; safe to repeat and returns the same listing for unchanged folders.",idempotent:!0},displayName:"List a folder",props:{path:b.ShortText({displayName:"Path",description:"The path of the folder to be listed (e.g. /folder1). Use an empty string for the root folder.",required:!0}),recursive:b.Checkbox({displayName:"Recursive",description:"If set to true, the list folder operation will be applied recursively to all subfolders and the response will contain contents of all subfolders.",defaultValue:!1,required:!1}),limit:b.Number({displayName:"Limit",description:"The maximum number of results to return (between 1 and 2000). Default is 2000 if not specified.",required:!1})},async run(e){let t={path:e.propsValue.path,recursive:e.propsValue.recursive,limit:e.propsValue.limit||2e3};return(await B.sendRequest({method:"POST",url:"https://api.dropboxapi.com/2/files/list_folder",headers:{"Content-Type":"application/json"},body:t,authentication:{type:"BEARER_TOKEN",token:e.auth.access_token}})).body}});var Ls=H({auth:V,name:"move_dropbox_file",description:"Move a file",audience:"both",aiMetadata:{description:"Moves (or renames) the file at the source path to a new destination path within Dropbox; optionally autorenames on conflict. Use to relocate or rename a single file. Not idempotent: after a successful move the source no longer exists, so repeating the call fails or, with autorename, can produce a differently named copy.",idempotent:!1},displayName:"Move file",props:{from_path:b.ShortText({displayName:"From Path",description:"The current path of the file (e.g. /folder1/oldfile.txt)",required:!0}),to_path:b.ShortText({displayName:"To Path",description:"The new path for the file (e.g. /folder2/newfile.txt)",required:!0}),autorename:b.Checkbox({displayName:"Auto Rename",description:"If there's a conflict, have the Dropbox server try to autorename the file to avoid conflict.",defaultValue:!1,required:!1}),allow_ownership_transfer:b.Checkbox({displayName:"Allow Ownership Transfer",description:"Allows moves by owner even if it would result in an ownership transfer.",defaultValue:!1,required:!1})},async run(e){let t={from_path:e.propsValue.from_path,to_path:e.propsValue.to_path,autorename:e.propsValue.autorename,allow_ownership_transfer:e.propsValue.allow_ownership_transfer};return(await B.sendRequest({method:"POST",url:"https://api.dropboxapi.com/2/files/move_v2",headers:{"Content-Type":"application/json"},body:t,authentication:{type:"BEARER_TOKEN",token:e.auth.access_token}})).body}});var Fs=H({auth:V,name:"move_dropbox_folder",description:"Move a folder",audience:"both",aiMetadata:{description:"Moves (or renames) the folder at the source path, including its contents, to a new destination path within Dropbox; optionally autorenames on conflict. Use to relocate or rename an entire directory. Not idempotent: after a successful move the source no longer exists, so repeating the call fails or, with autorename, produces a differently named folder.",idempotent:!1},displayName:"Move folder",props:{from_path:b.ShortText({displayName:"From Path",description:"The current path of the folder (e.g. /folder1/sourceFolder)",required:!0}),to_path:b.ShortText({displayName:"To Path",description:"The new path for the folder (e.g. /folder2/destinationFolder)",required:!0}),autorename:b.Checkbox({displayName:"Auto Rename",description:"If there's a conflict, have the Dropbox server try to autorename the folder to avoid conflict.",defaultValue:!1,required:!1}),allow_ownership_transfer:b.Checkbox({displayName:"Allow Ownership Transfer",description:"Allows moves by owner even if it would result in an ownership transfer.",defaultValue:!1,required:!1})},async run(e){let t={from_path:e.propsValue.from_path,to_path:e.propsValue.to_path,autorename:e.propsValue.autorename,allow_ownership_transfer:e.propsValue.allow_ownership_transfer};return(await B.sendRequest({method:"POST",url:"https://api.dropboxapi.com/2/files/move_v2",headers:{"Content-Type":"application/json"},body:t,authentication:{type:"BEARER_TOKEN",token:e.auth.access_token}})).body}});var Bs=H({auth:V,name:"search_dropbox",description:"Search for files and folders",audience:"both",aiMetadata:{description:"Searches a Dropbox account for files and folders whose name or content matches a query string (minimum 3 characters), optionally scoped to a path and filtered by file status, extensions, categories, or account. Use to locate items and obtain their paths/IDs before acting on them. Read-only; repeating the same search is safe and returns the same matches.",idempotent:!0},displayName:"Search",props:{query:b.ShortText({displayName:"Query",description:"The search string. Must be at least 3 characters.",required:!0}),path:b.ShortText({displayName:"Path",description:"The path to search in. If not specified, the search is performed from the root.",required:!1}),max_results:b.Number({displayName:"Max Results",description:"The maximum number of search results to return (up to 1000). Default is 100 if not specified.",required:!1}),order_by:b.StaticDropdown({displayName:"Order By",description:"Specified property of the order of search results.",options:{options:[{label:"Relevance",value:"relevance"},{label:"Modified Time",value:"modified_time"}]},defaultValue:"relevance",required:!1}),file_status:b.StaticDropdown({displayName:"File Status",description:"Restricts search to the given file status.",options:{options:[{label:"Active",value:"active"},{label:"Deleted",value:"deleted"}]},defaultValue:"active",required:!1}),filename_only:b.Checkbox({displayName:"Filename Only",description:"Restricts search to only match on filenames.",defaultValue:!1,required:!1}),file_extensions:b.ShortText({displayName:"File Extensions",description:"Restricts search to only the extensions specified (comma-separated).",required:!1}),file_categories:b.ShortText({displayName:"File Categories",description:"Restricts search to only the file categories specified (comma-separated).",required:!1}),account_id:b.ShortText({displayName:"Account ID",description:"Restricts results to the given account id.",required:!1})},async run(e){let t={path:e.propsValue.path||"",max_results:e.propsValue.max_results||100,file_status:e.propsValue.file_status,filename_only:e.propsValue.filename_only,file_extensions:e.propsValue.file_extensions?e.propsValue.file_extensions.split(","):void 0,file_categories:e.propsValue.file_categories?e.propsValue.file_categories.split(","):void 0,account_id:e.propsValue.account_id},r={query:e.propsValue.query,options:t};return(await B.sendRequest({method:"POST",url:"https://api.dropboxapi.com/2/files/search_v2",headers:{"Content-Type":"application/json"},body:r,authentication:{type:"BEARER_TOKEN",token:e.auth.access_token}})).body}});var Vs=H({auth:V,name:"upload_dropbox_file",description:"Upload a file",audience:"both",aiMetadata:{description:"Uploads a file (provided as a URL or base64 file object) to the given Dropbox path in add mode. Use to store binary or arbitrary file content; prefer the create-text-file action when the source is plain text. Not idempotent: each call uploads, so repeating it can create autorenamed duplicates rather than overwriting.",idempotent:!1},displayName:"Upload file",props:{path:b.ShortText({displayName:"Path",description:"The path where the file should be saved (e.g. /folder1/file.txt)",required:!0}),file:b.File({displayName:"File",description:"The file URL or base64 to upload",required:!0}),autorename:b.Checkbox({displayName:"Auto Rename",description:"If there's a conflict, as determined by mode, have the Dropbox server try to autorename the file to avoid conflict.",defaultValue:!1,required:!1}),mute:b.Checkbox({displayName:"Mute",description:"Normally, users are made aware of any file modifications in their Dropbox account via notifications in the client software. If true, this tells the clients that this modification shouldn't result in a user notification.",required:!1}),strict_conflict:b.Checkbox({displayName:"Strict conflict",description:`Be more strict about how each WriteMode detects conflict. For example, always return a conflict error when mode = WriteMode.update and the given "rev" doesn't match the existing file's "rev", even if the existing file has been deleted.`,required:!1})},async run(e){let t=e.propsValue.file,r={autorename:e.propsValue.autorename,path:e.propsValue.path,mode:"add",mute:e.propsValue.mute,strict_conflict:e.propsValue.strict_conflict},n=Buffer.from(t.base64,"base64"),i=JSON.stringify(r).replace(/[\u007f-\uffff]/g,c=>"\\u"+("000"+c.charCodeAt(0).toString(16)).slice(-4));return(await B.sendRequest({method:"POST",url:"https://content.dropboxapi.com/2/files/upload",body:n,headers:{"Dropbox-API-Arg":i,"Content-Type":"application/octet-stream"},authentication:{type:"BEARER_TOKEN",token:e.auth.access_token}})).body}});var Zs=H({auth:V,name:"downloadFile",displayName:"Download File",description:"Download a File from Dropbox",audience:"both",aiMetadata:{description:"Downloads the file at the given Dropbox path and returns it as a file object for use by later steps. Use to retrieve file contents into a flow. Read-only on Dropbox; repeating the call with the same path is safe and yields the same file.",idempotent:!0},props:{path:b.ShortText({displayName:"Path",description:"The path of the file (e.g. /folder1/file.txt)",required:!0})},async run(e){let t=(e.propsValue.path.match(/[^/]+$/)??["output.pdf"])[0],r=JSON.stringify({path:e.propsValue.path}).replace(/[\u007f-\uffff]/g,i=>"\\u"+("000"+i.charCodeAt(0).toString(16)).slice(-4)),n=await B.sendRequest({method:"POST",url:"https://content.dropboxapi.com/2/files/download",headers:{"Content-Type":"application/octet-stream","Dropbox-API-Arg":r},authentication:{type:"BEARER_TOKEN",token:e.auth.access_token},responseType:"arraybuffer"});return{file:await e.files.write({fileName:t,data:Buffer.from(n.body)})}}});var _d=o(async(e,t,r)=>(await B.sendRequest({method:"POST",url:"https://api.dropboxapi.com/2/files/list_folder/get_latest_cursor",headers:{"Content-Type":"application/json"},body:{path:t,recursive:r,include_deleted:!1},authentication:{type:"BEARER_TOKEN",token:e}})).body.cursor,"getLatestCursor"),Pd=o(async(e,t)=>{let r=[],n=t,i=!0;for(;i;){let u=await B.sendRequest({method:"POST",url:"https://api.dropboxapi.com/2/files/list_folder/continue",headers:{"Content-Type":"application/json"},body:{cursor:n},authentication:{type:"BEARER_TOKEN",token:e}}),c=u.body.entries.filter(d=>d[".tag"]==="folder");r.push(...c),n=u.body.cursor,i=u.body.has_more}return{folders:r,newCursor:n}},"getChangedFolders"),bd=o(async(e,t,r)=>(await B.sendRequest({method:"POST",url:"https://api.dropboxapi.com/2/files/list_folder",headers:{"Content-Type":"application/json"},body:{path:t,recursive:r,include_deleted:!1,limit:100},authentication:{type:"BEARER_TOKEN",token:e}})).body.entries.filter(i=>i[".tag"]==="folder").slice(0,5),"listRecentFolders"),Hs=gi({auth:V,name:"new_folder",displayName:"New Folder",description:"Triggers when a new folder is created inside a watched Dropbox folder.",aiMetadata:{description:"Fires when a new folder appears inside the watched Dropbox folder path, detected by polling the folder for changes since the last cursor. Each fired event represents one newly created folder; enable recursive watching to also detect folders created within subfolders."},type:"POLLING",props:{path:b.ShortText({displayName:"Watched Folder Path",description:'Folder path to watch. Use empty string "" for root.',required:!0,defaultValue:""}),recursive:b.Checkbox({displayName:"Recursive",description:"Watch subfolders recursively. May return many results.",required:!1,defaultValue:!1})},sampleData:{".tag":"folder",name:"Project Docs",id:"id:a4ayc_80_OEAAAAAAAAAXw",path_display:"/Work/Project Docs",path_lower:"/work/project docs"},onEnable:o(async e=>{let t=await _d(e.auth.access_token,e.propsValue.path||"",e.propsValue.recursive??!1);await e.store.put("cursor",t)},"onEnable"),onDisable:o(async e=>{await e.store.delete("cursor")},"onDisable"),run:o(async e=>{let t=await e.store.get("cursor");if(!t)return[];let{folders:r,newCursor:n}=await Pd(e.auth.access_token,t);return await e.store.put("cursor",n),r},"run"),test:o(async e=>bd(e.auth.access_token,e.propsValue.path||"",e.propsValue.recursive??!1),"test")});var Td=hi({minimumSupportedRelease:"0.30.0",logoUrl:"https://cdn.activepieces.com/pieces/dropbox.png",actions:[Bs,Ds,Vs,Zs,Ms,Cs,Ls,Os,Ns,Us,Fs,Rs,js,ks({baseUrl:o(()=>"https://api.dropboxapi.com/2","baseUrl"),auth:V,authMapping:o(async e=>({Authorization:`Bearer ${e.access_token}`}),"authMapping")})],displayName:"Dropbox",description:"Cloud storage and file synchronization",authors:["BastienMe","kishanprmr","MoShizzle","khaledmashaly","abuaboud"],categories:["CONTENT_AND_FILES"],triggers:[Hs],auth:V});0&&(module.exports={dropbox});
|
|
4
|
+
/*! Bundled license information:
|
|
5
|
+
|
|
6
|
+
mime-types/index.js:
|
|
7
|
+
(*!
|
|
8
|
+
* mime-types
|
|
9
|
+
* Copyright(c) 2014 Jonathan Ong
|
|
10
|
+
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
11
|
+
* MIT Licensed
|
|
12
|
+
*)
|
|
13
|
+
*/
|
package/src/index.d.ts
DELETED
package/src/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAqBA,eAAO,MAAM,OAAO,+JAqClB,CAAC"}
|
package/src/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;AAAA,+DAAwE;AACxE,qEAEwC;AACxC,iDAAqD;AACrD,uDAA0D;AAC1D,2DAA8D;AAC9D,uEAAyE;AACzE,6EAA8E;AAC9E,2DAA8D;AAC9D,+DAAkE;AAClE,+DAAiE;AACjE,+DAAiE;AACjE,uDAA0D;AAC1D,2DAA8D;AAC9D,iDAAqD;AACrD,2DAA8D;AAC9D,+DAAkE;AAClE,qCAAyC;AACzC,0DAA6D;AAEhD,QAAA,OAAO,GAAG,IAAA,8BAAW,EAAC;IACjC,uBAAuB,EAAE,QAAQ;IACjC,OAAO,EAAE,iDAAiD;IAC1D,OAAO,EAAE;QACP,sBAAa;QACb,+CAAwB;QACxB,+BAAiB;QACjB,mCAAmB;QACnB,kCAAkB;QAClB,+BAAiB;QACjB,2BAAe;QACf,2BAAe;QACf,0CAAsB;QACtB,mCAAmB;QACnB,+BAAiB;QACjB,+BAAiB;QACjB,kCAAkB;QAClB,IAAA,yCAAyB,EAAC;YACxB,OAAO,EAAE,GAAG,EAAE,CAAC,8BAA8B;YAC7C,IAAI,EAAE,kBAAW;YACjB,WAAW,EAAE,CAAO,IAAI,EAAE,EAAE;gBAAC,OAAA,CAAC;oBAC5B,aAAa,EAAE,UAAU,IAAI,CAAC,YAAY,EAAE;iBAC7C,CAAC,CAAA;cAAA;SACH,CAAC;KACH;IACD,WAAW,EAAE,SAAS;IACtB,WAAW,EAAE,wCAAwC;IACrD,OAAO,EAAE;QACP,WAAW;QACX,YAAY;QACZ,WAAW;QACX,eAAe;QACf,UAAU;KACX;IACD,UAAU,EAAE,CAAC,sBAAa,CAAC,iBAAiB,CAAC;IAC7C,QAAQ,EAAE,CAAC,6BAAgB,CAAC;IAC5B,IAAI,EAAE,kBAAW;CAClB,CAAC,CAAC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export declare const dropboxCopyFile: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {
|
|
2
|
-
from_path: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
-
to_path: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
4
|
-
autorename: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
5
|
-
allow_ownership_transfer: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
6
|
-
}>;
|
|
7
|
-
//# sourceMappingURL=copy-file.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"copy-file.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/copy-file.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,eAAe;;;;;EAyD1B,CAAC"}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.dropboxCopyFile = 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 auth_1 = require("../auth");
|
|
8
|
-
exports.dropboxCopyFile = (0, pieces_framework_1.createAction)({
|
|
9
|
-
auth: auth_1.dropboxAuth,
|
|
10
|
-
name: 'copy_dropbox_file',
|
|
11
|
-
description: 'Copy a file',
|
|
12
|
-
audience: 'both',
|
|
13
|
-
aiMetadata: { description: 'Copies the file at the source path to a new destination path within Dropbox, leaving the original in place; optionally autorenames on conflict. Use to duplicate a single file. Not idempotent: each call creates a copy, so repeating it errors on conflict or, with autorename, produces additional duplicates.', idempotent: false },
|
|
14
|
-
displayName: 'Copy file',
|
|
15
|
-
props: {
|
|
16
|
-
from_path: pieces_framework_1.Property.ShortText({
|
|
17
|
-
displayName: 'From Path',
|
|
18
|
-
description: 'The source path of the file (e.g. /folder1/sourcefile.txt)',
|
|
19
|
-
required: true,
|
|
20
|
-
}),
|
|
21
|
-
to_path: pieces_framework_1.Property.ShortText({
|
|
22
|
-
displayName: 'To Path',
|
|
23
|
-
description: 'The destination path for the copied (e.g. /folder2/destinationfile.txt)',
|
|
24
|
-
required: true,
|
|
25
|
-
}),
|
|
26
|
-
autorename: pieces_framework_1.Property.Checkbox({
|
|
27
|
-
displayName: 'Auto Rename',
|
|
28
|
-
description: "If there's a conflict, have the Dropbox server try to autorename the file to avoid conflict.",
|
|
29
|
-
defaultValue: false,
|
|
30
|
-
required: false,
|
|
31
|
-
}),
|
|
32
|
-
allow_ownership_transfer: pieces_framework_1.Property.Checkbox({
|
|
33
|
-
displayName: 'Allow Ownership Transfer',
|
|
34
|
-
description: 'Allows copy by owner even if it would result in an ownership transfer.',
|
|
35
|
-
defaultValue: false,
|
|
36
|
-
required: false,
|
|
37
|
-
}),
|
|
38
|
-
},
|
|
39
|
-
run(context) {
|
|
40
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
41
|
-
const params = {
|
|
42
|
-
from_path: context.propsValue.from_path,
|
|
43
|
-
to_path: context.propsValue.to_path,
|
|
44
|
-
autorename: context.propsValue.autorename,
|
|
45
|
-
allow_ownership_transfer: context.propsValue.allow_ownership_transfer,
|
|
46
|
-
};
|
|
47
|
-
const result = yield pieces_common_1.httpClient.sendRequest({
|
|
48
|
-
method: pieces_common_1.HttpMethod.POST,
|
|
49
|
-
url: `https://api.dropboxapi.com/2/files/copy_v2`,
|
|
50
|
-
headers: {
|
|
51
|
-
'Content-Type': 'application/json',
|
|
52
|
-
},
|
|
53
|
-
body: params,
|
|
54
|
-
authentication: {
|
|
55
|
-
type: pieces_common_1.AuthenticationType.BEARER_TOKEN,
|
|
56
|
-
token: context.auth.access_token,
|
|
57
|
-
},
|
|
58
|
-
});
|
|
59
|
-
return result.body;
|
|
60
|
-
});
|
|
61
|
-
},
|
|
62
|
-
});
|
|
63
|
-
//# sourceMappingURL=copy-file.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"copy-file.js","sourceRoot":"","sources":["../../../../src/lib/actions/copy-file.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAIqC;AACrC,kCAAsC;AAEzB,QAAA,eAAe,GAAG,IAAA,+BAAY,EAAC;IAC1C,IAAI,EAAE,kBAAW;IACjB,IAAI,EAAE,mBAAmB;IACzB,WAAW,EAAE,aAAa;IAC1B,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE,EAAE,WAAW,EAAE,mTAAmT,EAAE,UAAU,EAAE,KAAK,EAAE;IACnW,WAAW,EAAE,WAAW;IACxB,KAAK,EAAE;QACL,SAAS,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC5B,WAAW,EAAE,WAAW;YACxB,WAAW,EAAE,4DAA4D;YACzE,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,OAAO,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC1B,WAAW,EAAE,SAAS;YACtB,WAAW,EACT,yEAAyE;YAC3E,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,UAAU,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YAC5B,WAAW,EAAE,aAAa;YAC1B,WAAW,EACT,8FAA8F;YAChG,YAAY,EAAE,KAAK;YACnB,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,wBAAwB,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YAC1C,WAAW,EAAE,0BAA0B;YACvC,WAAW,EACT,wEAAwE;YAC1E,YAAY,EAAE,KAAK;YACnB,QAAQ,EAAE,KAAK;SAChB,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,MAAM,GAAG;gBACb,SAAS,EAAE,OAAO,CAAC,UAAU,CAAC,SAAS;gBACvC,OAAO,EAAE,OAAO,CAAC,UAAU,CAAC,OAAO;gBACnC,UAAU,EAAE,OAAO,CAAC,UAAU,CAAC,UAAU;gBACzC,wBAAwB,EAAE,OAAO,CAAC,UAAU,CAAC,wBAAwB;aACtE,CAAC;YAEF,MAAM,MAAM,GAAG,MAAM,0BAAU,CAAC,WAAW,CAAC;gBAC1C,MAAM,EAAE,0BAAU,CAAC,IAAI;gBACvB,GAAG,EAAE,4CAA4C;gBACjD,OAAO,EAAE;oBACP,cAAc,EAAE,kBAAkB;iBACnC;gBACD,IAAI,EAAE,MAAM;gBACZ,cAAc,EAAE;oBACd,IAAI,EAAE,kCAAkB,CAAC,YAAY;oBACrC,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,YAAY;iBACjC;aACF,CAAC,CAAC;YAEH,OAAO,MAAM,CAAC,IAAI,CAAC;QACrB,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export declare const dropboxCopyFolder: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {
|
|
2
|
-
from_path: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
-
to_path: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
4
|
-
autorename: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
5
|
-
allow_ownership_transfer: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
6
|
-
}>;
|
|
7
|
-
//# sourceMappingURL=copy-folder.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"copy-folder.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/copy-folder.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,iBAAiB;;;;;EAyD5B,CAAC"}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.dropboxCopyFolder = 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 auth_1 = require("../auth");
|
|
8
|
-
exports.dropboxCopyFolder = (0, pieces_framework_1.createAction)({
|
|
9
|
-
auth: auth_1.dropboxAuth,
|
|
10
|
-
name: 'copy_dropbox_folder',
|
|
11
|
-
description: 'Copy a folder',
|
|
12
|
-
audience: 'both',
|
|
13
|
-
aiMetadata: { description: 'Copies the folder at the source path, including its contents, to a new destination path within Dropbox, leaving the original in place; optionally autorenames on conflict. Use to duplicate an entire directory. Not idempotent: each call creates a copy, so repeating it errors on conflict or, with autorename, produces additional duplicates.', idempotent: false },
|
|
14
|
-
displayName: 'Copy folder',
|
|
15
|
-
props: {
|
|
16
|
-
from_path: pieces_framework_1.Property.ShortText({
|
|
17
|
-
displayName: 'From Path',
|
|
18
|
-
description: 'The source path of the folder (e.g. /folder1/sourceFolder)',
|
|
19
|
-
required: true,
|
|
20
|
-
}),
|
|
21
|
-
to_path: pieces_framework_1.Property.ShortText({
|
|
22
|
-
displayName: 'To Path',
|
|
23
|
-
description: 'The destination path for the copied folder (e.g. /folder2/destinationFolder)',
|
|
24
|
-
required: true,
|
|
25
|
-
}),
|
|
26
|
-
autorename: pieces_framework_1.Property.Checkbox({
|
|
27
|
-
displayName: 'Auto Rename',
|
|
28
|
-
description: "If there's a conflict, have the Dropbox server try to autorename the folder to avoid conflict.",
|
|
29
|
-
defaultValue: false,
|
|
30
|
-
required: false,
|
|
31
|
-
}),
|
|
32
|
-
allow_ownership_transfer: pieces_framework_1.Property.Checkbox({
|
|
33
|
-
displayName: 'Allow Ownership Transfer',
|
|
34
|
-
description: 'Allows copy by owner even if it would result in an ownership transfer.',
|
|
35
|
-
defaultValue: false,
|
|
36
|
-
required: false,
|
|
37
|
-
}),
|
|
38
|
-
},
|
|
39
|
-
run(context) {
|
|
40
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
41
|
-
const params = {
|
|
42
|
-
from_path: context.propsValue.from_path,
|
|
43
|
-
to_path: context.propsValue.to_path,
|
|
44
|
-
autorename: context.propsValue.autorename,
|
|
45
|
-
allow_ownership_transfer: context.propsValue.allow_ownership_transfer,
|
|
46
|
-
};
|
|
47
|
-
const result = yield pieces_common_1.httpClient.sendRequest({
|
|
48
|
-
method: pieces_common_1.HttpMethod.POST,
|
|
49
|
-
url: `https://api.dropboxapi.com/2/files/copy_v2`,
|
|
50
|
-
headers: {
|
|
51
|
-
'Content-Type': 'application/json',
|
|
52
|
-
},
|
|
53
|
-
body: params,
|
|
54
|
-
authentication: {
|
|
55
|
-
type: pieces_common_1.AuthenticationType.BEARER_TOKEN,
|
|
56
|
-
token: context.auth.access_token,
|
|
57
|
-
},
|
|
58
|
-
});
|
|
59
|
-
return result.body;
|
|
60
|
-
});
|
|
61
|
-
},
|
|
62
|
-
});
|
|
63
|
-
//# sourceMappingURL=copy-folder.js.map
|