@activepieces/piece-fragment 0.1.5 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +7 -13
- package/src/index.js +13 -33
- 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/create-task.d.ts +0 -9
- package/src/lib/actions/create-task.d.ts.map +0 -1
- package/src/lib/actions/create-task.js +0 -72
- package/src/lib/actions/create-task.js.map +0 -1
- package/src/lib/actions/custom-api-call.d.ts +0 -13
- package/src/lib/actions/custom-api-call.d.ts.map +0 -1
- package/src/lib/actions/custom-api-call.js +0 -20
- package/src/lib/actions/custom-api-call.js.map +0 -1
- package/src/lib/actions/delete-task.d.ts +0 -4
- package/src/lib/actions/delete-task.d.ts.map +0 -1
- package/src/lib/actions/delete-task.js +0 -30
- package/src/lib/actions/delete-task.js.map +0 -1
- package/src/lib/actions/get-task.d.ts +0 -4
- package/src/lib/actions/get-task.d.ts.map +0 -1
- package/src/lib/actions/get-task.js +0 -30
- package/src/lib/actions/get-task.js.map +0 -1
- package/src/lib/actions/list-tasks.d.ts +0 -6
- package/src/lib/actions/list-tasks.d.ts.map +0 -1
- package/src/lib/actions/list-tasks.js +0 -58
- package/src/lib/actions/list-tasks.js.map +0 -1
- package/src/lib/actions/update-task.d.ts +0 -11
- package/src/lib/actions/update-task.d.ts.map +0 -1
- package/src/lib/actions/update-task.js +0 -96
- package/src/lib/actions/update-task.js.map +0 -1
- package/src/lib/common/auth.d.ts +0 -2
- package/src/lib/common/auth.d.ts.map +0 -1
- package/src/lib/common/auth.js +0 -37
- package/src/lib/common/auth.js.map +0 -1
- package/src/lib/common/client.d.ts +0 -22
- package/src/lib/common/client.d.ts.map +0 -1
- package/src/lib/common/client.js +0 -32
- package/src/lib/common/client.js.map +0 -1
- package/src/lib/common/index.d.ts +0 -3
- package/src/lib/common/index.d.ts.map +0 -1
- package/src/lib/common/index.js +0 -6
- package/src/lib/common/index.js.map +0 -1
- package/src/lib/triggers/new-task.d.ts +0 -3
- package/src/lib/triggers/new-task.d.ts.map +0 -1
- package/src/lib/triggers/new-task.js +0 -134
- package/src/lib/triggers/new-task.js.map +0 -1
- package/src/lib/triggers/task-updated.d.ts +0 -3
- package/src/lib/triggers/task-updated.d.ts.map +0 -1
- package/src/lib/triggers/task-updated.js +0 -134
- package/src/lib/triggers/task-updated.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,18 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@activepieces/piece-fragment",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"main": "./src/index.js",
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
|
|
12
|
-
"tslib": "2.3.0"
|
|
13
|
-
},
|
|
14
|
-
"scripts": {
|
|
15
|
-
"build": "tsc -p tsconfig.lib.json && cp package.json dist/",
|
|
16
|
-
"lint": "eslint 'src/**/*.ts'"
|
|
17
|
-
}
|
|
6
|
+
"dependencies": {},
|
|
7
|
+
"files": [
|
|
8
|
+
"src/index.js",
|
|
9
|
+
"package.json",
|
|
10
|
+
"src/i18n"
|
|
11
|
+
]
|
|
18
12
|
}
|
package/src/index.js
CHANGED
|
@@ -1,33 +1,13 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.fragment = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
exports.fragment = (0, pieces_framework_1.createPiece)({
|
|
15
|
-
displayName: 'Fragment',
|
|
16
|
-
auth: common_1.fragmentAuth,
|
|
17
|
-
minimumSupportedRelease: '0.36.1',
|
|
18
|
-
logoUrl: 'https://cdn.activepieces.com/pieces/fragment.png',
|
|
19
|
-
authors: ["meenulekha-premakumar"],
|
|
20
|
-
actions: [
|
|
21
|
-
create_task_1.createTask,
|
|
22
|
-
update_task_1.updateTask,
|
|
23
|
-
get_task_1.getTask,
|
|
24
|
-
list_tasks_1.listTasks,
|
|
25
|
-
delete_task_1.deleteTask,
|
|
26
|
-
custom_api_call_1.customApiCall,
|
|
27
|
-
],
|
|
28
|
-
triggers: [
|
|
29
|
-
new_task_1.newTaskTrigger,
|
|
30
|
-
task_updated_1.taskUpdatedTrigger,
|
|
31
|
-
],
|
|
32
|
-
});
|
|
33
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
"use strict";var $u=Object.create;var xt=Object.defineProperty;var Su=Object.getOwnPropertyDescriptor;var Au=Object.getOwnPropertyNames;var zu=Object.getPrototypeOf,ku=Object.prototype.hasOwnProperty;var o=(e,t)=>xt(e,"name",{value:t,configurable:!0});var A=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}},Fn=(e,t)=>{for(var r in t)xt(e,r,{get:t[r],enumerable:!0})},Bn=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Au(t))!ku.call(e,i)&&i!==r&&xt(e,i,{get:()=>t[i],enumerable:!(n=Su(t,i))||n.enumerable});return e};var je=(e,t,r)=>(r=e!=null?$u(zu(e)):{},Bn(t||!e||!e.__esModule?xt(r,"default",{value:e,enumerable:!0}):r,e)),Ou=e=>Bn(xt({},"__esModule",{value:!0}),e);var di=A((pi,dr)=>{(function(e){"use strict";let t="(0?\\d+|0x[a-f0-9]+)",r={fourOctet:new RegExp(`^${t}\\.${t}\\.${t}\\.${t}$`,"i"),threeOctet:new RegExp(`^${t}\\.${t}\\.${t}$`,"i"),twoOctet:new RegExp(`^${t}\\.${t}$`,"i"),longValue:new RegExp(`^${t}$`,"i")},n=new RegExp("^0[0-7]+$","i"),i=new RegExp("^0x[a-f0-9]+$","i"),u="%[0-9a-z]{1,}",c="(?:[0-9a-f]+::?)+",l={zoneIndex:new RegExp(u,"i"),native:new RegExp(`^(::)?(${c})?([0-9a-f]+)?(::)?(${u})?$`,"i"),deprecatedTransitional:new RegExp(`^(?:::)(${t}\\.${t}\\.${t}\\.${t}(${u})?)$`,"i"),transitional:new RegExp(`^((?:${c})|(?:::)(?:${c})?)${t}\\.${t}\\.${t}\\.${t}(${u})?$`,"i")};function f(s,d){if(s.indexOf("::")!==s.lastIndexOf("::"))return null;let y=0,m=-1,v=(s.match(l.zoneIndex)||[])[0],P,F;for(v&&(v=v.substring(1),s=s.replace(/%.+$/,""));(m=s.indexOf(":",m+1))>=0;)y++;if(s.substr(0,2)==="::"&&y--,s.substr(-2,2)==="::"&&y--,y>d)return null;for(F=d-y,P=":";F--;)P+="0:";return s=s.replace("::",P),s[0]===":"&&(s=s.slice(1)),s[s.length-1]===":"&&(s=s.slice(0,-1)),d=(function(){let oe=s.split(":"),fe=[];for(let ke=0;ke<oe.length;ke++)fe.push(parseInt(oe[ke],16));return fe})(),{parts:d,zoneId:v}}o(f,"expandIPv6");function g(s,d,y,m){if(s.length!==d.length)throw new Error("ipaddr: cannot match CIDR for objects with different lengths");let v=0,P;for(;m>0;){if(P=y-m,P<0&&(P=0),s[v]>>P!==d[v]>>P)return!1;m-=y,v+=1}return!0}o(g,"matchCIDR");function _(s){if(i.test(s))return parseInt(s,16);if(s[0]==="0"&&!isNaN(parseInt(s[1],10))){if(n.test(s))return parseInt(s,8);throw new Error(`ipaddr: cannot parse ${s} as octal`)}return parseInt(s,10)}o(_,"parseIntAuto");function I(s,d){for(;s.length<d;)s=`0${s}`;return s}o(I,"padPart");let x={};x.IPv4=(function(){function s(d){if(d.length!==4)throw new Error("ipaddr: ipv4 octet count should be 4");let y,m;for(y=0;y<d.length;y++)if(m=d[y],!(0<=m&&m<=255))throw new Error("ipaddr: ipv4 octet should fit in 8 bits");this.octets=d}return o(s,"IPv4"),s.prototype.SpecialRanges={unspecified:[[new s([0,0,0,0]),8]],broadcast:[[new s([255,255,255,255]),32]],multicast:[[new s([224,0,0,0]),4]],linkLocal:[[new s([169,254,0,0]),16]],loopback:[[new s([127,0,0,0]),8]],carrierGradeNat:[[new s([100,64,0,0]),10]],private:[[new s([10,0,0,0]),8],[new s([172,16,0,0]),12],[new s([192,168,0,0]),16]],reserved:[[new s([192,0,0,0]),24],[new s([192,0,2,0]),24],[new s([192,88,99,0]),24],[new s([198,18,0,0]),15],[new s([198,51,100,0]),24],[new s([203,0,113,0]),24],[new s([240,0,0,0]),4]],as112:[[new s([192,175,48,0]),24],[new s([192,31,196,0]),24]],amt:[[new s([192,52,193,0]),24]]},s.prototype.kind=function(){return"ipv4"},s.prototype.match=function(d,y){let m;if(y===void 0&&(m=d,d=m[0],y=m[1]),d.kind()!=="ipv4")throw new Error("ipaddr: cannot match ipv4 address with non-ipv4 one");return g(this.octets,d.octets,8,y)},s.prototype.prefixLengthFromSubnetMask=function(){let d=0,y=!1,m={0:8,128:7,192:6,224:5,240:4,248:3,252:2,254:1,255:0},v,P,F;for(v=3;v>=0;v-=1)if(P=this.octets[v],P in m){if(F=m[P],y&&F!==0)return null;F!==8&&(y=!0),d+=F}else return null;return 32-d},s.prototype.range=function(){return x.subnetMatch(this,this.SpecialRanges)},s.prototype.toByteArray=function(){return this.octets.slice(0)},s.prototype.toIPv4MappedAddress=function(){return x.IPv6.parse(`::ffff:${this.toString()}`)},s.prototype.toNormalizedString=function(){return this.toString()},s.prototype.toString=function(){return this.octets.join(".")},s})(),x.IPv4.broadcastAddressFromCIDR=function(s){try{let d=this.parseCIDR(s),y=d[0].toByteArray(),m=this.subnetMaskFromPrefixLength(d[1]).toByteArray(),v=[],P=0;for(;P<4;)v.push(parseInt(y[P],10)|parseInt(m[P],10)^255),P++;return new this(v)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},x.IPv4.isIPv4=function(s){return this.parser(s)!==null},x.IPv4.isValid=function(s){try{return new this(this.parser(s)),!0}catch{return!1}},x.IPv4.isValidCIDR=function(s){try{return this.parseCIDR(s),!0}catch{return!1}},x.IPv4.isValidFourPartDecimal=function(s){return!!(x.IPv4.isValid(s)&&s.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/))},x.IPv4.isValidCIDRFourPartDecimal=function(s){let d=s.match(/^(.+)\/(\d+)$/);return!x.IPv4.isValidCIDR(s)||!d?!1:x.IPv4.isValidFourPartDecimal(d[1])},x.IPv4.networkAddressFromCIDR=function(s){let d,y,m,v,P;try{for(d=this.parseCIDR(s),m=d[0].toByteArray(),P=this.subnetMaskFromPrefixLength(d[1]).toByteArray(),v=[],y=0;y<4;)v.push(parseInt(m[y],10)&parseInt(P[y],10)),y++;return new this(v)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},x.IPv4.parse=function(s){let d=this.parser(s);if(d===null)throw new Error("ipaddr: string is not formatted like an IPv4 Address");return new this(d)},x.IPv4.parseCIDR=function(s){let d;if(d=s.match(/^(.+)\/(\d+)$/)){let y=parseInt(d[2]);if(y>=0&&y<=32){let m=[this.parse(d[1]),y];return Object.defineProperty(m,"toString",{value:o(function(){return this.join("/")},"value")}),m}}throw new Error("ipaddr: string is not formatted like an IPv4 CIDR range")},x.IPv4.parser=function(s){let d,y,m;if(d=s.match(r.fourOctet))return(function(){let v=d.slice(1,6),P=[];for(let F=0;F<v.length;F++)y=v[F],P.push(_(y));return P})();if(d=s.match(r.longValue)){if(m=_(d[1]),m>4294967295||m<0)throw new Error("ipaddr: address outside defined range");return(function(){let v=[],P;for(P=0;P<=24;P+=8)v.push(m>>P&255);return v})().reverse()}else return(d=s.match(r.twoOctet))?(function(){let v=d.slice(1,4),P=[];if(m=_(v[1]),m>16777215||m<0)throw new Error("ipaddr: address outside defined range");return P.push(_(v[0])),P.push(m>>16&255),P.push(m>>8&255),P.push(m&255),P})():(d=s.match(r.threeOctet))?(function(){let v=d.slice(1,5),P=[];if(m=_(v[2]),m>65535||m<0)throw new Error("ipaddr: address outside defined range");return P.push(_(v[0])),P.push(_(v[1])),P.push(m>>8&255),P.push(m&255),P})():null},x.IPv4.subnetMaskFromPrefixLength=function(s){if(s=parseInt(s),s<0||s>32)throw new Error("ipaddr: invalid IPv4 prefix length");let d=[0,0,0,0],y=0,m=Math.floor(s/8);for(;y<m;)d[y]=255,y++;return m<4&&(d[m]=Math.pow(2,s%8)-1<<8-s%8),new this(d)},x.IPv6=(function(){function s(d,y){let m,v;if(d.length===16)for(this.parts=[],m=0;m<=14;m+=2)this.parts.push(d[m]<<8|d[m+1]);else if(d.length===8)this.parts=d;else throw new Error("ipaddr: ipv6 part count should be 8 or 16");for(m=0;m<this.parts.length;m++)if(v=this.parts[m],!(0<=v&&v<=65535))throw new Error("ipaddr: ipv6 part should fit in 16 bits");y&&(this.zoneId=y)}return o(s,"IPv6"),s.prototype.SpecialRanges={unspecified:[new s([0,0,0,0,0,0,0,0]),128],linkLocal:[new s([65152,0,0,0,0,0,0,0]),10],multicast:[new s([65280,0,0,0,0,0,0,0]),8],loopback:[new s([0,0,0,0,0,0,0,1]),128],uniqueLocal:[new s([64512,0,0,0,0,0,0,0]),7],ipv4Mapped:[new s([0,0,0,0,0,65535,0,0]),96],discard:[new s([256,0,0,0,0,0,0,0]),64],rfc6145:[new s([0,0,0,0,65535,0,0,0]),96],rfc6052:[new s([100,65435,0,0,0,0,0,0]),96],"6to4":[new s([8194,0,0,0,0,0,0,0]),16],teredo:[new s([8193,0,0,0,0,0,0,0]),32],benchmarking:[new s([8193,2,0,0,0,0,0,0]),48],amt:[new s([8193,3,0,0,0,0,0,0]),32],as112v6:[[new s([8193,4,274,0,0,0,0,0]),48],[new s([9760,79,32768,0,0,0,0,0]),48]],deprecated:[new s([8193,16,0,0,0,0,0,0]),28],orchid2:[new s([8193,32,0,0,0,0,0,0]),28],droneRemoteIdProtocolEntityTags:[new s([8193,48,0,0,0,0,0,0]),28],reserved:[[new s([8193,0,0,0,0,0,0,0]),23],[new s([8193,3512,0,0,0,0,0,0]),32]]},s.prototype.isIPv4MappedAddress=function(){return this.range()==="ipv4Mapped"},s.prototype.kind=function(){return"ipv6"},s.prototype.match=function(d,y){let m;if(y===void 0&&(m=d,d=m[0],y=m[1]),d.kind()!=="ipv6")throw new Error("ipaddr: cannot match ipv6 address with non-ipv6 one");return g(this.parts,d.parts,16,y)},s.prototype.prefixLengthFromSubnetMask=function(){let d=0,y=!1,m={0:16,32768:15,49152:14,57344:13,61440:12,63488:11,64512:10,65024:9,65280:8,65408:7,65472:6,65504:5,65520:4,65528:3,65532:2,65534:1,65535:0},v,P;for(let F=7;F>=0;F-=1)if(v=this.parts[F],v in m){if(P=m[v],y&&P!==0)return null;P!==16&&(y=!0),d+=P}else return null;return 128-d},s.prototype.range=function(){return x.subnetMatch(this,this.SpecialRanges)},s.prototype.toByteArray=function(){let d,y=[],m=this.parts;for(let v=0;v<m.length;v++)d=m[v],y.push(d>>8),y.push(d&255);return y},s.prototype.toFixedLengthString=function(){let d=(function(){let m=[];for(let v=0;v<this.parts.length;v++)m.push(I(this.parts[v].toString(16),4));return m}).call(this).join(":"),y="";return this.zoneId&&(y=`%${this.zoneId}`),d+y},s.prototype.toIPv4Address=function(){if(!this.isIPv4MappedAddress())throw new Error("ipaddr: trying to convert a generic ipv6 address to ipv4");let d=this.parts.slice(-2),y=d[0],m=d[1];return new x.IPv4([y>>8,y&255,m>>8,m&255])},s.prototype.toNormalizedString=function(){let d=(function(){let m=[];for(let v=0;v<this.parts.length;v++)m.push(this.parts[v].toString(16));return m}).call(this).join(":"),y="";return this.zoneId&&(y=`%${this.zoneId}`),d+y},s.prototype.toRFC5952String=function(){let d=/((^|:)(0(:|$)){2,})/g,y=this.toNormalizedString(),m=0,v=-1,P;for(;P=d.exec(y);)P[0].length>v&&(m=P.index,v=P[0].length);return v<0?y:`${y.substring(0,m)}::${y.substring(m+v)}`},s.prototype.toString=function(){return this.toRFC5952String()},s})(),x.IPv6.broadcastAddressFromCIDR=function(s){try{let d=this.parseCIDR(s),y=d[0].toByteArray(),m=this.subnetMaskFromPrefixLength(d[1]).toByteArray(),v=[],P=0;for(;P<16;)v.push(parseInt(y[P],10)|parseInt(m[P],10)^255),P++;return new this(v)}catch(d){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${d})`)}},x.IPv6.isIPv6=function(s){return this.parser(s)!==null},x.IPv6.isValid=function(s){if(typeof s=="string"&&s.indexOf(":")===-1)return!1;try{let d=this.parser(s);return new this(d.parts,d.zoneId),!0}catch{return!1}},x.IPv6.isValidCIDR=function(s){if(typeof s=="string"&&s.indexOf(":")===-1)return!1;try{return this.parseCIDR(s),!0}catch{return!1}},x.IPv6.networkAddressFromCIDR=function(s){let d,y,m,v,P;try{for(d=this.parseCIDR(s),m=d[0].toByteArray(),P=this.subnetMaskFromPrefixLength(d[1]).toByteArray(),v=[],y=0;y<16;)v.push(parseInt(m[y],10)&parseInt(P[y],10)),y++;return new this(v)}catch(F){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${F})`)}},x.IPv6.parse=function(s){let d=this.parser(s);if(d.parts===null)throw new Error("ipaddr: string is not formatted like an IPv6 Address");return new this(d.parts,d.zoneId)},x.IPv6.parseCIDR=function(s){let d,y,m;if((y=s.match(/^(.+)\/(\d+)$/))&&(d=parseInt(y[2]),d>=0&&d<=128))return m=[this.parse(y[1]),d],Object.defineProperty(m,"toString",{value:o(function(){return this.join("/")},"value")}),m;throw new Error("ipaddr: string is not formatted like an IPv6 CIDR range")},x.IPv6.parser=function(s){let d,y,m,v,P,F;if(m=s.match(l.deprecatedTransitional))return this.parser(`::ffff:${m[1]}`);if(l.native.test(s))return f(s,8);if((m=s.match(l.transitional))&&(F=m[6]||"",d=m[1],m[1].endsWith("::")||(d=d.slice(0,-1)),d=f(d+F,6),d.parts)){for(P=[parseInt(m[2]),parseInt(m[3]),parseInt(m[4]),parseInt(m[5])],y=0;y<P.length;y++)if(v=P[y],!(0<=v&&v<=255))return null;return d.parts.push(P[0]<<8|P[1]),d.parts.push(P[2]<<8|P[3]),{parts:d.parts,zoneId:d.zoneId}}return null},x.IPv6.subnetMaskFromPrefixLength=function(s){if(s=parseInt(s),s<0||s>128)throw new Error("ipaddr: invalid IPv6 prefix length");let d=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],y=0,m=Math.floor(s/8);for(;y<m;)d[y]=255,y++;return m<16&&(d[m]=Math.pow(2,s%8)-1<<8-s%8),new this(d)},x.fromByteArray=function(s){let d=s.length;if(d===4)return new x.IPv4(s);if(d===16)return new x.IPv6(s);throw new Error("ipaddr: the binary input is neither an IPv6 nor IPv4 address")},x.isValid=function(s){return x.IPv6.isValid(s)||x.IPv4.isValid(s)},x.isValidCIDR=function(s){return x.IPv6.isValidCIDR(s)||x.IPv4.isValidCIDR(s)},x.parse=function(s){if(x.IPv6.isValid(s))return x.IPv6.parse(s);if(x.IPv4.isValid(s))return x.IPv4.parse(s);throw new Error("ipaddr: the address has neither IPv6 nor IPv4 format")},x.parseCIDR=function(s){try{return x.IPv6.parseCIDR(s)}catch{try{return x.IPv4.parseCIDR(s)}catch{throw new Error("ipaddr: the address has neither IPv6 nor IPv4 CIDR format")}}},x.process=function(s){let d=this.parse(s);return d.kind()==="ipv6"&&d.isIPv4MappedAddress()?d.toIPv4Address():d},x.subnetMatch=function(s,d,y){let m,v,P,F;y==null&&(y="unicast");for(v in d)if(Object.prototype.hasOwnProperty.call(d,v)){for(P=d[v],P[0]&&!(P[0]instanceof Array)&&(P=[P]),m=0;m<P.length;m++)if(F=P[m],s.kind()===F[0].kind()&&s.match.apply(s,F))return v}return y},typeof dr<"u"&&dr.exports?dr.exports=x:e.ipaddr=x})(pi)});var ma=A((HA,da)=>{var pa=require("stream").Stream,mp=require("util");da.exports=Ee;function Ee(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}o(Ee,"DelayedStream");mp.inherits(Ee,pa);Ee.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(Ee.prototype,"readable",{configurable:!0,enumerable:!0,get:o(function(){return this.source.readable},"get")});Ee.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};Ee.prototype.resume=function(){this._released||this.release(),this.source.resume()};Ee.prototype.pause=function(){this.source.pause()};Ee.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(e){this.emit.apply(this,e)}.bind(this)),this._bufferedEvents=[]};Ee.prototype.pipe=function(){var e=pa.prototype.pipe.apply(this,arguments);return this.resume(),e};Ee.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)};Ee.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 ha=A((WA,ya)=>{var fp=require("util"),ga=require("stream").Stream,fa=ma();ya.exports=ne;function ne(){this.writable=!1,this.readable=!0,this.dataSize=0,this.maxDataSize=2*1024*1024,this.pauseStreams=!0,this._released=!1,this._streams=[],this._currentStream=null,this._insideLoop=!1,this._pendingNext=!1}o(ne,"CombinedStream");fp.inherits(ne,ga);ne.create=function(e){var t=new this;e=e||{};for(var r in e)t[r]=e[r];return t};ne.isStreamLike=function(e){return typeof e!="function"&&typeof e!="string"&&typeof e!="boolean"&&typeof e!="number"&&!Buffer.isBuffer(e)};ne.prototype.append=function(e){var t=ne.isStreamLike(e);if(t){if(!(e instanceof fa)){var r=fa.create(e,{maxDataSize:1/0,pauseStream:this.pauseStreams});e.on("data",this._checkDataSize.bind(this)),e=r}this._handleErrors(e),this.pauseStreams&&e.pause()}return this._streams.push(e),this};ne.prototype.pipe=function(e,t){return ga.prototype.pipe.call(this,e,t),this.resume(),e};ne.prototype._getNext=function(){if(this._currentStream=null,this._insideLoop){this._pendingNext=!0;return}this._insideLoop=!0;try{do this._pendingNext=!1,this._realGetNext();while(this._pendingNext)}finally{this._insideLoop=!1}};ne.prototype._realGetNext=function(){var e=this._streams.shift();if(typeof e>"u"){this.end();return}if(typeof e!="function"){this._pipeNext(e);return}var t=e;t(function(r){var n=ne.isStreamLike(r);n&&(r.on("data",this._checkDataSize.bind(this)),this._handleErrors(r)),this._pipeNext(r)}.bind(this))};ne.prototype._pipeNext=function(e){this._currentStream=e;var t=ne.isStreamLike(e);if(t){e.on("end",this._getNext.bind(this)),e.pipe(this,{end:!1});return}var r=e;this.write(r),this._getNext()};ne.prototype._handleErrors=function(e){var t=this;e.on("error",function(r){t._emitError(r)})};ne.prototype.write=function(e){this.emit("data",e)};ne.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"))};ne.prototype.resume=function(){this._released||(this._released=!0,this.writable=!0,this._getNext()),this.pauseStreams&&this._currentStream&&typeof this._currentStream.resume=="function"&&this._currentStream.resume(),this.emit("resume")};ne.prototype.end=function(){this._reset(),this.emit("end")};ne.prototype.destroy=function(){this._reset(),this.emit("close")};ne.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};ne.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(e))}};ne.prototype._updateDataSize=function(){this.dataSize=0;var e=this;this._streams.forEach(function(t){t.dataSize&&(e.dataSize+=t.dataSize)}),this._currentStream&&this._currentStream.dataSize&&(this.dataSize+=this._currentStream.dataSize)};ne.prototype._emitError=function(e){this._reset(),this.emit("error",e)}});var _a=A((KA,va)=>{"use strict";va.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 ba=A(ye=>{"use strict";var _r=_a(),gp=require("path").extname,xa=/^\s*([^;\s]*)(?:;|\s|$)/,yp=/^text\//i;ye.charset=Pa;ye.charsets={lookup:Pa};ye.contentType=hp;ye.extension=vp;ye.extensions=Object.create(null);ye.lookup=_p;ye.types=Object.create(null);xp(ye.extensions,ye.types);function Pa(e){if(!e||typeof e!="string")return!1;var t=xa.exec(e),r=t&&_r[t[1].toLowerCase()];return r&&r.charset?r.charset:t&&yp.test(t[1])?"UTF-8":!1}o(Pa,"charset");function hp(e){if(!e||typeof e!="string")return!1;var t=e.indexOf("/")===-1?ye.lookup(e):e;if(!t)return!1;if(t.indexOf("charset")===-1){var r=ye.charset(t);r&&(t+="; charset="+r.toLowerCase())}return t}o(hp,"contentType");function vp(e){if(!e||typeof e!="string")return!1;var t=xa.exec(e),r=t&&ye.extensions[t[1].toLowerCase()];return!r||!r.length?!1:r[0]}o(vp,"extension");function _p(e){if(!e||typeof e!="string")return!1;var t=gp("x."+e).toLowerCase().substr(1);return t&&ye.types[t]||!1}o(_p,"lookup");function xp(e,t){var r=["nginx","apache",void 0,"iana"];Object.keys(_r).forEach(o(function(i){var u=_r[i],c=u.extensions;if(!(!c||!c.length)){e[i]=c;for(var l=0;l<c.length;l++){var f=c[l];if(t[f]){var g=r.indexOf(_r[t[f]].source),_=r.indexOf(u.source);if(t[f]!=="application/octet-stream"&&(g>_||g===_&&t[f].substr(0,12)==="application/"))continue}t[f]=i}}},"forEachMimeType"))}o(xp,"populateMaps")});var Ia=A((YA,Ta)=>{Ta.exports=Pp;function Pp(e){var t=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;t?t(e):setTimeout(e,0)}o(Pp,"defer")});var yn=A((ez,$a)=>{var Ea=Ia();$a.exports=bp;function bp(e){var t=!1;return Ea(function(){t=!0}),o(function(n,i){t?e(n,i):Ea(o(function(){e(n,i)},"nextTick_callback"))},"async_callback")}o(bp,"async")});var hn=A((rz,Sa)=>{Sa.exports=Tp;function Tp(e){Object.keys(e.jobs).forEach(Ip.bind(e)),e.jobs={}}o(Tp,"abort");function Ip(e){typeof this.jobs[e]=="function"&&this.jobs[e]()}o(Ip,"clean")});var vn=A((oz,za)=>{var Aa=yn(),Ep=hn();za.exports=$p;function $p(e,t,r,n){var i=r.keyedList?r.keyedList[r.index]:r.index;r.jobs[i]=Sp(t,i,e[i],function(u,c){i in r.jobs&&(delete r.jobs[i],u?Ep(r):r.results[i]=c,n(u,r.results))})}o($p,"iterate");function Sp(e,t,r,n){var i;return e.length==2?i=e(r,Aa(n)):i=e(r,t,Aa(n)),i}o(Sp,"runJob")});var _n=A((az,ka)=>{ka.exports=Ap;function Ap(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(Ap,"state")});var xn=A((uz,Oa)=>{var zp=hn(),kp=yn();Oa.exports=Op;function Op(e){Object.keys(this.jobs).length&&(this.index=this.size,zp(this),kp(e)(null,this.results))}o(Op,"terminator")});var Ra=A((lz,wa)=>{var wp=vn(),Rp=_n(),Dp=xn();wa.exports=Np;function Np(e,t,r){for(var n=Rp(e);n.index<(n.keyedList||e).length;)wp(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 Dp.bind(n,r)}o(Np,"parallel")});var Pn=A((dz,xr)=>{var Da=vn(),Cp=_n(),Up=xn();xr.exports=Mp;xr.exports.ascending=Na;xr.exports.descending=Lp;function Mp(e,t,r,n){var i=Cp(e,r);return Da(e,t,i,o(function u(c,l){if(c){n(c,l);return}if(i.index++,i.index<(i.keyedList||e).length){Da(e,t,i,u);return}n(null,i.results)},"iteratorHandler")),Up.bind(i,n)}o(Mp,"serialOrdered");function Na(e,t){return e<t?-1:e>t?1:0}o(Na,"ascending");function Lp(e,t){return-1*Na(e,t)}o(Lp,"descending")});var Ua=A((fz,Ca)=>{var jp=Pn();Ca.exports=Fp;function Fp(e,t,r){return jp(e,t,null,r)}o(Fp,"serial")});var La=A((yz,Ma)=>{Ma.exports={parallel:Ra(),serial:Ua(),serialOrdered:Pn()}});var bn=A((hz,ja)=>{"use strict";ja.exports=Object});var Ba=A((vz,Fa)=>{"use strict";Fa.exports=Error});var Za=A((_z,Va)=>{"use strict";Va.exports=EvalError});var Ga=A((xz,Ha)=>{"use strict";Ha.exports=RangeError});var qa=A((Pz,Wa)=>{"use strict";Wa.exports=ReferenceError});var Ja=A((bz,Ka)=>{"use strict";Ka.exports=SyntaxError});var Pr=A((Tz,Xa)=>{"use strict";Xa.exports=TypeError});var Qa=A((Iz,Ya)=>{"use strict";Ya.exports=URIError});var ts=A((Ez,es)=>{"use strict";es.exports=Math.abs});var ns=A(($z,rs)=>{"use strict";rs.exports=Math.floor});var is=A((Sz,os)=>{"use strict";os.exports=Math.max});var ss=A((Az,as)=>{"use strict";as.exports=Math.min});var cs=A((zz,us)=>{"use strict";us.exports=Math.pow});var ps=A((kz,ls)=>{"use strict";ls.exports=Math.round});var ms=A((Oz,ds)=>{"use strict";ds.exports=Number.isNaN||o(function(t){return t!==t},"isNaN")});var gs=A((Rz,fs)=>{"use strict";var Bp=ms();fs.exports=o(function(t){return Bp(t)||t===0?t:t<0?-1:1},"sign")});var hs=A((Nz,ys)=>{"use strict";ys.exports=Object.getOwnPropertyDescriptor});var Tn=A((Cz,vs)=>{"use strict";var br=hs();if(br)try{br([],"length")}catch{br=null}vs.exports=br});var xs=A((Uz,_s)=>{"use strict";var Tr=Object.defineProperty||!1;if(Tr)try{Tr({},"a",{value:1})}catch{Tr=!1}_s.exports=Tr});var In=A((Mz,Ps)=>{"use strict";Ps.exports=o(function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;t[r]=i;for(var u in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var c=Object.getOwnPropertySymbols(t);if(c.length!==1||c[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var l=Object.getOwnPropertyDescriptor(t,r);if(l.value!==i||l.enumerable!==!0)return!1}return!0},"hasSymbols")});var Is=A((jz,Ts)=>{"use strict";var bs=typeof Symbol<"u"&&Symbol,Vp=In();Ts.exports=o(function(){return typeof bs!="function"||typeof Symbol!="function"||typeof bs("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Vp()},"hasNativeSymbols")});var En=A((Bz,Es)=>{"use strict";Es.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var $n=A((Vz,$s)=>{"use strict";var Zp=bn();$s.exports=Zp.getPrototypeOf||null});var zs=A((Zz,As)=>{"use strict";var Hp="Function.prototype.bind called on incompatible ",Gp=Object.prototype.toString,Wp=Math.max,qp="[object Function]",Ss=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"),Kp=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"),Jp=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");As.exports=o(function(t){var r=this;if(typeof r!="function"||Gp.apply(r)!==qp)throw new TypeError(Hp+r);for(var n=Kp(arguments,1),i,u=o(function(){if(this instanceof i){var _=r.apply(this,Ss(n,arguments));return Object(_)===_?_:this}return r.apply(t,Ss(n,arguments))},"binder"),c=Wp(0,r.length-n.length),l=[],f=0;f<c;f++)l[f]="$"+f;if(i=Function("binder","return function ("+Jp(l,",")+"){ return binder.apply(this,arguments); }")(u),r.prototype){var g=o(function(){},"Empty");g.prototype=r.prototype,i.prototype=new g,g.prototype=null}return i},"bind")});var dt=A((Gz,ks)=>{"use strict";var Xp=zs();ks.exports=Function.prototype.bind||Xp});var Ir=A((Wz,Os)=>{"use strict";Os.exports=Function.prototype.call});var Sn=A((qz,ws)=>{"use strict";ws.exports=Function.prototype.apply});var Ds=A((Kz,Rs)=>{"use strict";Rs.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var Cs=A((Jz,Ns)=>{"use strict";var Yp=dt(),Qp=Sn(),ed=Ir(),td=Ds();Ns.exports=td||Yp.call(ed,Qp)});var Ms=A((Xz,Us)=>{"use strict";var rd=dt(),nd=Pr(),od=Ir(),id=Cs();Us.exports=o(function(t){if(t.length<1||typeof t[0]!="function")throw new nd("a function is required");return id(rd,od,t)},"callBindBasic")});var Zs=A((Qz,Vs)=>{"use strict";var ad=Ms(),Ls=Tn(),Fs;try{Fs=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!="object"||!("code"in e)||e.code!=="ERR_PROTO_ACCESS")throw e}var An=!!Fs&&Ls&&Ls(Object.prototype,"__proto__"),Bs=Object,js=Bs.getPrototypeOf;Vs.exports=An&&typeof An.get=="function"?ad([An.get]):typeof js=="function"?o(function(t){return js(t==null?t:Bs(t))},"getDunder"):!1});var Ks=A((tk,qs)=>{"use strict";var Hs=En(),Gs=$n(),Ws=Zs();qs.exports=Hs?o(function(t){return Hs(t)},"getProto"):Gs?o(function(t){if(!t||typeof t!="object"&&typeof t!="function")throw new TypeError("getProto: not an object");return Gs(t)},"getProto"):Ws?o(function(t){return Ws(t)},"getProto"):null});var zn=A((nk,Js)=>{"use strict";var sd=Function.prototype.call,ud=Object.prototype.hasOwnProperty,cd=dt();Js.exports=cd.call(sd,ud)});var nu=A((ok,ru)=>{"use strict";var G,ld=bn(),pd=Ba(),dd=Za(),md=Ga(),fd=qa(),yt=Ja(),gt=Pr(),gd=Qa(),yd=ts(),hd=ns(),vd=is(),_d=ss(),xd=cs(),Pd=ps(),bd=gs(),eu=Function,kn=o(function(e){try{return eu('"use strict"; return ('+e+").constructor;")()}catch{}},"getEvalledConstructor"),Bt=Tn(),Td=xs(),On=o(function(){throw new gt},"throwTypeError"),Id=Bt?(function(){try{return arguments.callee,On}catch{try{return Bt(arguments,"callee").get}catch{return On}}})():On,mt=Is()(),le=Ks(),Ed=$n(),$d=En(),tu=Sn(),Vt=Ir(),ft={},Sd=typeof Uint8Array>"u"||!le?G:le(Uint8Array),rt={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?G:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?G:ArrayBuffer,"%ArrayIteratorPrototype%":mt&&le?le([][Symbol.iterator]()):G,"%AsyncFromSyncIteratorPrototype%":G,"%AsyncFunction%":ft,"%AsyncGenerator%":ft,"%AsyncGeneratorFunction%":ft,"%AsyncIteratorPrototype%":ft,"%Atomics%":typeof Atomics>"u"?G:Atomics,"%BigInt%":typeof BigInt>"u"?G:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?G:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?G:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?G:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":pd,"%eval%":eval,"%EvalError%":dd,"%Float16Array%":typeof Float16Array>"u"?G:Float16Array,"%Float32Array%":typeof Float32Array>"u"?G:Float32Array,"%Float64Array%":typeof Float64Array>"u"?G:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?G:FinalizationRegistry,"%Function%":eu,"%GeneratorFunction%":ft,"%Int8Array%":typeof Int8Array>"u"?G:Int8Array,"%Int16Array%":typeof Int16Array>"u"?G:Int16Array,"%Int32Array%":typeof Int32Array>"u"?G:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":mt&&le?le(le([][Symbol.iterator]())):G,"%JSON%":typeof JSON=="object"?JSON:G,"%Map%":typeof Map>"u"?G:Map,"%MapIteratorPrototype%":typeof Map>"u"||!mt||!le?G:le(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":ld,"%Object.getOwnPropertyDescriptor%":Bt,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?G:Promise,"%Proxy%":typeof Proxy>"u"?G:Proxy,"%RangeError%":md,"%ReferenceError%":fd,"%Reflect%":typeof Reflect>"u"?G:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?G:Set,"%SetIteratorPrototype%":typeof Set>"u"||!mt||!le?G:le(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?G:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":mt&&le?le(""[Symbol.iterator]()):G,"%Symbol%":mt?Symbol:G,"%SyntaxError%":yt,"%ThrowTypeError%":Id,"%TypedArray%":Sd,"%TypeError%":gt,"%Uint8Array%":typeof Uint8Array>"u"?G:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?G:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?G:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?G:Uint32Array,"%URIError%":gd,"%WeakMap%":typeof WeakMap>"u"?G:WeakMap,"%WeakRef%":typeof WeakRef>"u"?G:WeakRef,"%WeakSet%":typeof WeakSet>"u"?G:WeakSet,"%Function.prototype.call%":Vt,"%Function.prototype.apply%":tu,"%Object.defineProperty%":Td,"%Object.getPrototypeOf%":Ed,"%Math.abs%":yd,"%Math.floor%":hd,"%Math.max%":vd,"%Math.min%":_d,"%Math.pow%":xd,"%Math.round%":Pd,"%Math.sign%":bd,"%Reflect.getPrototypeOf%":$d};if(le)try{null.error}catch(e){Xs=le(le(e)),rt["%Error.prototype%"]=Xs}var Xs,Ad=o(function e(t){var r;if(t==="%AsyncFunction%")r=kn("async function () {}");else if(t==="%GeneratorFunction%")r=kn("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=kn("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&le&&(r=le(i.prototype))}return rt[t]=r,r},"doEval"),Ys={__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"]},Zt=dt(),Er=zn(),zd=Zt.call(Vt,Array.prototype.concat),kd=Zt.call(tu,Array.prototype.splice),Qs=Zt.call(Vt,String.prototype.replace),$r=Zt.call(Vt,String.prototype.slice),Od=Zt.call(Vt,RegExp.prototype.exec),wd=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Rd=/\\(\\)?/g,Dd=o(function(t){var r=$r(t,0,1),n=$r(t,-1);if(r==="%"&&n!=="%")throw new yt("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new yt("invalid intrinsic syntax, expected opening `%`");var i=[];return Qs(t,wd,function(u,c,l,f){i[i.length]=l?Qs(f,Rd,"$1"):c||u}),i},"stringToPath"),Nd=o(function(t,r){var n=t,i;if(Er(Ys,n)&&(i=Ys[n],n="%"+i[0]+"%"),Er(rt,n)){var u=rt[n];if(u===ft&&(u=Ad(n)),typeof u>"u"&&!r)throw new gt("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:u}}throw new yt("intrinsic "+t+" does not exist!")},"getBaseIntrinsic");ru.exports=o(function(t,r){if(typeof t!="string"||t.length===0)throw new gt("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new gt('"allowMissing" argument must be a boolean');if(Od(/^%?[^%]*%?$/,t)===null)throw new yt("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=Dd(t),i=n.length>0?n[0]:"",u=Nd("%"+i+"%",r),c=u.name,l=u.value,f=!1,g=u.alias;g&&(i=g[0],kd(n,zd([0,1],g)));for(var _=1,I=!0;_<n.length;_+=1){var x=n[_],s=$r(x,0,1),d=$r(x,-1);if((s==='"'||s==="'"||s==="`"||d==='"'||d==="'"||d==="`")&&s!==d)throw new yt("property names with quotes must have matching quotes");if((x==="constructor"||!I)&&(f=!0),i+="."+x,c="%"+i+"%",Er(rt,c))l=rt[c];else if(l!=null){if(!(x in l)){if(!r)throw new gt("base intrinsic for "+t+" exists, but the property is not available.");return}if(Bt&&_+1>=n.length){var y=Bt(l,x);I=!!y,I&&"get"in y&&!("originalValue"in y.get)?l=y.get:l=l[x]}else I=Er(l,x),l=l[x];I&&!f&&(rt[c]=l)}}return l},"GetIntrinsic")});var iu=A((ak,ou)=>{"use strict";var Cd=In();ou.exports=o(function(){return Cd()&&!!Symbol.toStringTag},"hasToStringTagShams")});var uu=A((uk,su)=>{"use strict";var Ud=nu(),au=Ud("%Object.defineProperty%",!0),Md=iu()(),Ld=zn(),jd=Pr(),Sr=Md?Symbol.toStringTag:null;su.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 jd("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");Sr&&(n||!Ld(t,Sr))&&(au?au(t,Sr,{configurable:!i,enumerable:!1,value:r,writable:!1}):t[Sr]=r)},"setToStringTag")});var lu=A((lk,cu)=>{"use strict";var Fd=Function.prototype.call,Bd=Object.prototype.hasOwnProperty,Vd=dt();cu.exports=Vd.call(Fd,Bd)});var du=A((pk,pu)=>{"use strict";pu.exports=function(e,t){return Object.keys(t).forEach(function(r){e[r]=e[r]||t[r]}),e}});var gu=A((dk,fu)=>{"use strict";var Nn=ha(),Zd=require("util"),wn=require("path"),Hd=require("http"),Gd=require("https"),Wd=require("url").parse,qd=require("fs"),Kd=require("stream").Stream,Jd=require("crypto"),Rn=ba(),Xd=La(),Yd=uu(),Ke=lu(),Dn=du();function mu(e){return String(e).replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/"/g,"%22")}o(mu,"escapeHeaderParam");function W(e){if(!(this instanceof W))return new W(e);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],Nn.call(this),e=e||{};for(var t in e)this[t]=e[t]}o(W,"FormData");Zd.inherits(W,Nn);W.LINE_BREAK=`\r
|
|
2
|
+
`;W.DEFAULT_CONTENT_TYPE="application/octet-stream";W.prototype.append=function(e,t,r){r=r||{},typeof r=="string"&&(r={filename:r});var n=Nn.prototype.append.bind(this);if((typeof t=="number"||t==null)&&(t=String(t)),Array.isArray(t)){this._error(new Error("Arrays are not supported."));return}var i=this._multiPartHeader(e,t,r),u=this._multiPartFooter();n(i),n(t),n(u),this._trackLength(i,t,r)};W.prototype._trackLength=function(e,t,r){var n=0;r.knownLength!=null?n+=Number(r.knownLength):Buffer.isBuffer(t)?n=t.length:typeof t=="string"&&(n=Buffer.byteLength(t)),this._valueLength+=n,this._overheadLength+=Buffer.byteLength(e)+W.LINE_BREAK.length,!(!t||!t.path&&!(t.readable&&Ke(t,"httpVersion"))&&!(t instanceof Kd))&&(r.knownLength||this._valuesToMeasure.push(t))};W.prototype._lengthRetriever=function(e,t){Ke(e,"fd")?e.end!=null&&e.end!=1/0&&e.start!=null?t(null,e.end+1-(e.start?e.start:0)):qd.stat(e.path,function(r,n){if(r){t(r);return}var i=n.size-(e.start?e.start:0);t(null,i)}):Ke(e,"httpVersion")?t(null,Number(e.headers["content-length"])):Ke(e,"httpModule")?(e.on("response",function(r){e.pause(),t(null,Number(r.headers["content-length"]))}),e.resume()):t("Unknown stream")};W.prototype._multiPartHeader=function(e,t,r){if(typeof r.header=="string")return r.header;var n=this._getContentDisposition(t,r),i=this._getContentType(t,r),u="",c={"Content-Disposition":["form-data",'name="'+mu(e)+'"'].concat(n||[]),"Content-Type":[].concat(i||[])};typeof r.header=="object"&&Dn(c,r.header);var l;for(var f in c)if(Ke(c,f)){if(l=c[f],l==null)continue;Array.isArray(l)||(l=[l]),l.length&&(u+=f+": "+l.join("; ")+W.LINE_BREAK)}return"--"+this.getBoundary()+W.LINE_BREAK+u+W.LINE_BREAK};W.prototype._getContentDisposition=function(e,t){var r;if(typeof t.filepath=="string"?r=wn.normalize(t.filepath).replace(/\\/g,"/"):t.filename||e&&(e.name||e.path)?r=wn.basename(t.filename||e&&(e.name||e.path)):e&&e.readable&&Ke(e,"httpVersion")&&(r=wn.basename(e.client._httpMessage.path||"")),r)return'filename="'+mu(r)+'"'};W.prototype._getContentType=function(e,t){var r=t.contentType;return!r&&e&&e.name&&(r=Rn.lookup(e.name)),!r&&e&&e.path&&(r=Rn.lookup(e.path)),!r&&e&&e.readable&&Ke(e,"httpVersion")&&(r=e.headers["content-type"]),!r&&(t.filepath||t.filename)&&(r=Rn.lookup(t.filepath||t.filename)),!r&&e&&typeof e=="object"&&(r=W.DEFAULT_CONTENT_TYPE),r};W.prototype._multiPartFooter=function(){return function(e){var t=W.LINE_BREAK,r=this._streams.length===0;r&&(t+=this._lastBoundary()),e(t)}.bind(this)};W.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+W.LINE_BREAK};W.prototype.getHeaders=function(e){var t,r={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in e)Ke(e,t)&&(r[t.toLowerCase()]=e[t]);return r};W.prototype.setBoundary=function(e){if(typeof e!="string")throw new TypeError("FormData boundary must be a string");this._boundary=e};W.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};W.prototype.getBuffer=function(){for(var e=new Buffer.alloc(0),t=this.getBoundary(),r=0,n=this._streams.length;r<n;r++)typeof this._streams[r]!="function"&&(Buffer.isBuffer(this._streams[r])?e=Buffer.concat([e,this._streams[r]]):e=Buffer.concat([e,Buffer.from(this._streams[r])]),(typeof this._streams[r]!="string"||this._streams[r].substring(2,t.length+2)!==t)&&(e=Buffer.concat([e,Buffer.from(W.LINE_BREAK)])));return Buffer.concat([e,Buffer.from(this._lastBoundary())])};W.prototype._generateBoundary=function(){this._boundary="--------------------------"+Jd.randomBytes(12).toString("hex")};W.prototype.getLengthSync=function(){var e=this._overheadLength+this._valueLength;return this._streams.length&&(e+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),e};W.prototype.hasKnownLength=function(){var e=!0;return this._valuesToMeasure.length&&(e=!1),e};W.prototype.getLength=function(e){var t=this._overheadLength+this._valueLength;if(this._streams.length&&(t+=this._lastBoundary().length),!this._valuesToMeasure.length){process.nextTick(e.bind(this,null,t));return}Xd.parallel(this._valuesToMeasure,this._lengthRetriever,function(r,n){if(r){e(r);return}n.forEach(function(i){t+=i}),e(null,t)})};W.prototype.submit=function(e,t){var r,n,i={method:"post"};return typeof e=="string"?(e=Wd(e),n=Dn({port:e.port,path:e.pathname,host:e.hostname,protocol:e.protocol},i)):(n=Dn(e,i),n.port||(n.port=n.protocol==="https:"?443:80)),n.headers=this.getHeaders(e.headers),n.protocol==="https:"?r=Gd.request(n):r=Hd.request(n),this.getLength(function(u,c){if(u&&u!=="Unknown stream"){this._error(u);return}if(c&&r.setHeader("Content-Length",c),this.pipe(r),t){var l,f=o(function(g,_){return r.removeListener("error",f),r.removeListener("response",l),t.call(this,g,_)},"callback");l=f.bind(this,null),r.on("error",f),r.on("response",l)}}.bind(this)),r};W.prototype._error=function(e){this.error||(this.error=e,this.pause(),this.emit("error",e))};W.prototype.toString=function(){return"[object FormData]"};Yd(W.prototype,"FormData");fu.exports=W});var Mn=A((Cn,Un)=>{(function(e,t){typeof Cn=="object"&&typeof Un<"u"?Un.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs=t()})(Cn,(function(){"use strict";var e=1e3,t=6e4,r=36e5,n="millisecond",i="second",u="minute",c="hour",l="day",f="week",g="month",_="quarter",I="year",x="date",s="Invalid Date",d=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,m={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:o(function(O){var T=["th","st","nd","rd"],b=O%100;return"["+O+(T[(b-20)%10]||T[b]||T[0])+"]"},"ordinal")},v=o(function(O,T,b){var z=String(O);return!z||z.length>=T?O:""+Array(T+1-z.length).join(b)+O},"m"),P={s:v,z:o(function(O){var T=-O.utcOffset(),b=Math.abs(T),z=Math.floor(b/60),E=b%60;return(T<=0?"+":"-")+v(z,2,"0")+":"+v(E,2,"0")},"z"),m:o(function O(T,b){if(T.date()<b.date())return-O(b,T);var z=12*(b.year()-T.year())+(b.month()-T.month()),E=T.clone().add(z,g),B=b-E<0,V=T.clone().add(z+(B?-1:1),g);return+(-(z+(b-E)/(B?E-V:V-E))||0)},"t"),a:o(function(O){return O<0?Math.ceil(O)||0:Math.floor(O)},"a"),p:o(function(O){return{M:g,y:I,w:f,d:l,D:x,h:c,m:u,s:i,ms:n,Q:_}[O]||String(O||"").toLowerCase().replace(/s$/,"")},"p"),u:o(function(O){return O===void 0},"u")},F="en",oe={};oe[F]=m;var fe="$isDayjsObject",ke=o(function(O){return O instanceof Oe||!(!O||!O[fe])},"S"),ve=o(function O(T,b,z){var E;if(!T)return F;if(typeof T=="string"){var B=T.toLowerCase();oe[B]&&(E=B),b&&(oe[B]=b,E=B);var V=T.split("-");if(!E&&V.length>1)return O(V[0])}else{var Y=T.name;oe[Y]=T,E=Y}return!z&&E&&(F=E),E||!z&&F},"t"),X=o(function(O,T){if(ke(O))return O.clone();var b=typeof T=="object"?T:{};return b.date=O,b.args=arguments,new Oe(b)},"O"),J=P;J.l=ve,J.i=ke,J.w=function(O,T){return X(O,{locale:T.$L,utc:T.$u,x:T.$x,$offset:T.$offset})};var Oe=(function(){function O(b){this.$L=ve(b.locale,null,!0),this.parse(b),this.$x=this.$x||b.x||{},this[fe]=!0}o(O,"M");var T=O.prototype;return T.parse=function(b){this.$d=(function(z){var E=z.date,B=z.utc;if(E===null)return new Date(NaN);if(J.u(E))return new Date;if(E instanceof Date)return new Date(E);if(typeof E=="string"&&!/Z$/i.test(E)){var V=E.match(d);if(V){var Y=V[2]-1||0,ie=(V[7]||"0").substring(0,3);return B?new Date(Date.UTC(V[1],Y,V[3]||1,V[4]||0,V[5]||0,V[6]||0,ie)):new Date(V[1],Y,V[3]||1,V[4]||0,V[5]||0,V[6]||0,ie)}}return new Date(E)})(b),this.init()},T.init=function(){var b=this.$d;this.$y=b.getFullYear(),this.$M=b.getMonth(),this.$D=b.getDate(),this.$W=b.getDay(),this.$H=b.getHours(),this.$m=b.getMinutes(),this.$s=b.getSeconds(),this.$ms=b.getMilliseconds()},T.$utils=function(){return J},T.isValid=function(){return this.$d.toString()!==s},T.isSame=function(b,z){var E=X(b);return this.startOf(z)<=E&&E<=this.endOf(z)},T.isAfter=function(b,z){return X(b)<this.startOf(z)},T.isBefore=function(b,z){return this.endOf(z)<X(b)},T.$g=function(b,z,E){return J.u(b)?this[z]:this.set(E,b)},T.unix=function(){return Math.floor(this.valueOf()/1e3)},T.valueOf=function(){return this.$d.getTime()},T.startOf=function(b,z){var E=this,B=!!J.u(z)||z,V=J.p(b),Y=o(function(Xe,ge){var Le=J.w(E.$u?Date.UTC(E.$y,ge,Xe):new Date(E.$y,ge,Xe),E);return B?Le:Le.endOf(l)},"l"),ie=o(function(Xe,ge){return J.w(E.toDate()[Xe].apply(E.toDate("s"),(B?[0,0,0,0]:[23,59,59,999]).slice(ge)),E)},"$"),ce=this.$W,de=this.$M,Pe=this.$D,nt="set"+(this.$u?"UTC":"");switch(V){case I:return B?Y(1,0):Y(31,11);case g:return B?Y(1,de):Y(0,de+1);case f:var Je=this.$locale().weekStart||0,vt=(ce<Je?ce+7:ce)-Je;return Y(B?Pe-vt:Pe+(6-vt),de);case l:case x:return ie(nt+"Hours",0);case c:return ie(nt+"Minutes",1);case u:return ie(nt+"Seconds",2);case i:return ie(nt+"Milliseconds",3);default:return this.clone()}},T.endOf=function(b){return this.startOf(b,!1)},T.$set=function(b,z){var E,B=J.p(b),V="set"+(this.$u?"UTC":""),Y=(E={},E[l]=V+"Date",E[x]=V+"Date",E[g]=V+"Month",E[I]=V+"FullYear",E[c]=V+"Hours",E[u]=V+"Minutes",E[i]=V+"Seconds",E[n]=V+"Milliseconds",E)[B],ie=B===l?this.$D+(z-this.$W):z;if(B===g||B===I){var ce=this.clone().set(x,1);ce.$d[Y](ie),ce.init(),this.$d=ce.set(x,Math.min(this.$D,ce.daysInMonth())).$d}else Y&&this.$d[Y](ie);return this.init(),this},T.set=function(b,z){return this.clone().$set(b,z)},T.get=function(b){return this[J.p(b)]()},T.add=function(b,z){var E,B=this;b=Number(b);var V=J.p(z),Y=o(function(de){var Pe=X(B);return J.w(Pe.date(Pe.date()+Math.round(de*b)),B)},"y");if(V===g)return this.set(g,this.$M+b);if(V===I)return this.set(I,this.$y+b);if(V===l)return Y(1);if(V===f)return Y(7);var ie=(E={},E[u]=t,E[c]=r,E[i]=e,E)[V]||1,ce=this.$d.getTime()+b*ie;return J.w(ce,this)},T.subtract=function(b,z){return this.add(-1*b,z)},T.format=function(b){var z=this,E=this.$locale();if(!this.isValid())return E.invalidDate||s;var B=b||"YYYY-MM-DDTHH:mm:ssZ",V=J.z(this),Y=this.$H,ie=this.$m,ce=this.$M,de=E.weekdays,Pe=E.months,nt=E.meridiem,Je=o(function(ge,Le,_t,Ht){return ge&&(ge[Le]||ge(z,B))||_t[Le].slice(0,Ht)},"h"),vt=o(function(ge){return J.s(Y%12||12,ge,"0")},"d"),Xe=nt||function(ge,Le,_t){var Ht=ge<12?"AM":"PM";return _t?Ht.toLowerCase():Ht};return B.replace(y,(function(ge,Le){return Le||(function(_t){switch(_t){case"YY":return String(z.$y).slice(-2);case"YYYY":return J.s(z.$y,4,"0");case"M":return ce+1;case"MM":return J.s(ce+1,2,"0");case"MMM":return Je(E.monthsShort,ce,Pe,3);case"MMMM":return Je(Pe,ce);case"D":return z.$D;case"DD":return J.s(z.$D,2,"0");case"d":return String(z.$W);case"dd":return Je(E.weekdaysMin,z.$W,de,2);case"ddd":return Je(E.weekdaysShort,z.$W,de,3);case"dddd":return de[z.$W];case"H":return String(Y);case"HH":return J.s(Y,2,"0");case"h":return vt(1);case"hh":return vt(2);case"a":return Xe(Y,ie,!0);case"A":return Xe(Y,ie,!1);case"m":return String(ie);case"mm":return J.s(ie,2,"0");case"s":return String(z.$s);case"ss":return J.s(z.$s,2,"0");case"SSS":return J.s(z.$ms,3,"0");case"Z":return V}return null})(ge)||V.replace(":","")}))},T.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},T.diff=function(b,z,E){var B,V=this,Y=J.p(z),ie=X(b),ce=(ie.utcOffset()-this.utcOffset())*t,de=this-ie,Pe=o(function(){return J.m(V,ie)},"D");switch(Y){case I:B=Pe()/12;break;case g:B=Pe();break;case _:B=Pe()/3;break;case f:B=(de-ce)/6048e5;break;case l:B=(de-ce)/864e5;break;case c:B=de/r;break;case u:B=de/t;break;case i:B=de/e;break;default:B=de}return E?B:J.a(B)},T.daysInMonth=function(){return this.endOf(g).$D},T.$locale=function(){return oe[this.$L]},T.locale=function(b,z){if(!b)return this.$L;var E=this.clone(),B=ve(b,z,!0);return B&&(E.$L=B),E},T.clone=function(){return J.w(this.$d,this)},T.toDate=function(){return new Date(this.valueOf())},T.toJSON=function(){return this.isValid()?this.toISOString():null},T.toISOString=function(){return this.$d.toISOString()},T.toString=function(){return this.$d.toUTCString()},O})(),ht=Oe.prototype;return X.prototype=ht,[["$ms",n],["$s",i],["$m",u],["$H",c],["$W",l],["$M",g],["$y",I],["$D",x]].forEach((function(O){ht[O[1]]=function(T){return this.$g(T,O[0],O[1])}})),X.extend=function(O,T){return O.$i||(O(T,Oe,X),O.$i=!0),X},X.locale=ve,X.isDayjs=ke,X.unix=function(O){return X(1e3*O)},X.en=oe[F],X.Ls=oe,X.p={},X}))});var lm={};Fn(lm,{fragment:()=>cm});module.exports=Ou(lm);var wu=Object.freeze({status:"aborted"});function $(e,t,r){function n(l,f){if(l._zod||Object.defineProperty(l,"_zod",{value:{def:f,constr:c,traits:new Set},enumerable:!1}),l._zod.traits.has(e))return;l._zod.traits.add(e),t(l,f);let g=c.prototype,_=Object.keys(g);for(let I=0;I<_.length;I++){let x=_[I];x in l||(l[x]=g[x].bind(l))}}o(n,"init");let i=r?.Parent??Object;class u extends i{static{o(this,"Definition")}}Object.defineProperty(u,"name",{value:e});function c(l){var f;let g=r?.Parent?new u:this;n(g,l),(f=g._zod).deferred??(f.deferred=[]);for(let _ of g._zod.deferred)_();return g}return o(c,"_"),Object.defineProperty(c,"init",{value:n}),Object.defineProperty(c,Symbol.hasInstance,{value:o(l=>r?.Parent&&l instanceof r.Parent?!0:l?._zod?.traits?.has(e),"value")}),Object.defineProperty(c,"name",{value:e}),c}o($,"$constructor");var $e=class extends Error{static{o(this,"$ZodAsyncError")}constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Gt=class extends Error{static{o(this,"$ZodEncodeError")}constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}},kr={};function we(e){return e&&Object.assign(kr,e),kr}o(we,"config");function wr(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(wr,"getEnumValues");function Zn(e,t){return typeof t=="bigint"?t.toString():t}o(Zn,"jsonStringifyReplacer");function qt(e){return{get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}o(qt,"cached");function Hn(e){return e==null}o(Hn,"nullish");function Kt(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}o(Kt,"cleanRegex");var Vn=Symbol("evaluating");function ae(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==Vn)return n===void 0&&(n=Vn,n=r()),n},set(i){Object.defineProperty(e,t,{value:i})},configurable:!0})}o(ae,"defineLazy");var Rr="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Pt(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}o(Pt,"isObject");var Ru=qt(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function Gn(e){if(Pt(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let r=t.prototype;return!(Pt(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}o(Gn,"isPlainObject");var Wn=new Set(["string","number","symbol"]);function ot(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}o(ot,"escapeRegex");function Jt(e,t,r){let n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}o(Jt,"clone");function Q(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:o(()=>t,"error")};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:o(()=>t.error,"error")}:t}o(Q,"normalizeParams");function qn(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}o(qn,"optionalKeys");var Kn={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 it(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(it,"aborted");function Fe(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}o(Fe,"prefixIssues");function Wt(e){return typeof e=="string"?e:e?.message}o(Wt,"unwrapMessage");function Be(e,t,r){let n={...e,path:e.path??[]};if(!e.message){let i=Wt(e.inst?._zod.def?.error?.(e))??Wt(t?.error?.(e))??Wt(r.customError?.(e))??Wt(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 Jn(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}o(Jn,"getLengthableOrigin");function Dr(...e){let[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}o(Dr,"issue");var Xn=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,Zn,2),Object.defineProperty(e,"toString",{value:o(()=>e.message,"value"),enumerable:!1})},"initializer"),Yn=$("$ZodError",Xn),bt=$("$ZodError",Xn,{Parent:Error});var Nu=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 $e;if(c.issues.length){let l=new(i?.Err??e)(c.issues.map(f=>Be(f,u,we())));throw Rr(l,i?.callee),l}return c.value},"_parse"),Xt=Nu(bt),Cu=o(e=>async(t,r,n,i)=>{let u=n?Object.assign(n,{async:!0}):{async:!0},c=t._zod.run({value:r,issues:[]},u);if(c instanceof Promise&&(c=await c),c.issues.length){let l=new(i?.Err??e)(c.issues.map(f=>Be(f,u,we())));throw Rr(l,i?.callee),l}return c.value},"_parseAsync"),Yt=Cu(bt),Uu=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 $e;return u.issues.length?{success:!1,error:new(e??Yn)(u.issues.map(c=>Be(c,i,we())))}:{success:!0,data:u.value}},"_safeParse"),Tt=Uu(bt),Mu=o(e=>async(t,r,n)=>{let i=n?Object.assign(n,{async:!0}):{async:!0},u=t._zod.run({value:r,issues:[]},i);return u instanceof Promise&&(u=await u),u.issues.length?{success:!1,error:new e(u.issues.map(c=>Be(c,i,we())))}:{success:!0,data:u.value}},"_safeParseAsync"),It=Mu(bt);var Lu="(?:(?:\\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])))",ju=new RegExp(`^${Lu}$`);var Qn=o(e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},"string"),eo=/^-?\d+n?$/,to=/^-?\d+$/,Nr=/^-?\d+(?:\.\d+)?$/,ro=/^(?:true|false)$/i;var Ve=$("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),Fu={number:"number",bigint:"bigint",object:"date"};var no=$("$ZodCheckGreaterThan",(e,t)=>{Ve.init(e,t);let r=Fu[typeof t.value];e._zod.onattach.push(n=>{let i=n._zod.bag,u=(t.inclusive?i.minimum:i.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>u&&(t.inclusive?i.minimum=t.value:i.exclusiveMinimum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value>=t.value:n.value>t.value)||n.issues.push({origin:r,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}});var oo=$("$ZodCheckNumberFormat",(e,t)=>{Ve.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),n=r?"int":"number",[i,u]=Kn[t.format];e._zod.onattach.push(c=>{let l=c._zod.bag;l.format=t.format,l.minimum=i,l.maximum=u,r&&(l.pattern=to)}),e._zod.check=c=>{let l=c.value;if(r){if(!Number.isInteger(l)){c.issues.push({expected:n,format:t.format,code:"invalid_type",continue:!1,input:l,inst:e});return}if(!Number.isSafeInteger(l)){l>0?c.issues.push({input:l,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort}):c.issues.push({input:l,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort});return}}l<i&&c.issues.push({origin:"number",input:l,code:"too_small",minimum:i,inclusive:!0,inst:e,continue:!t.abort}),l>u&&c.issues.push({origin:"number",input:l,code:"too_big",maximum:u,inclusive:!0,inst:e,continue:!t.abort})}});var io=$("$ZodCheckMinLength",(e,t)=>{var r;Ve.init(e,t),(r=e._zod.def).when??(r.when=n=>{let i=n.value;return!Hn(i)&&i.length!==void 0}),e._zod.onattach.push(n=>{let i=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>i&&(n._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let i=n.value;if(i.length>=t.minimum)return;let c=Jn(i);n.issues.push({origin:c,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}});var Cr=$("$ZodCheckStringFormat",(e,t)=>{var r,n;Ve.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=()=>{})}),ao=$("$ZodCheckRegex",(e,t)=>{Cr.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 uo={major:4,minor:3,patch:6};var te=$("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=uo;let n=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&n.unshift(e);for(let i of n)for(let u of i._zod.onattach)u(e);if(n.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let i=o((c,l,f)=>{let g=it(c),_;for(let I of l){if(I._zod.def.when){if(!I._zod.def.when(c))continue}else if(g)continue;let x=c.issues.length,s=I._zod.check(c);if(s instanceof Promise&&f?.async===!1)throw new $e;if(_||s instanceof Promise)_=(_??Promise.resolve()).then(async()=>{await s,c.issues.length!==x&&(g||(g=it(c,x)))});else{if(c.issues.length===x)continue;g||(g=it(c,x))}}return _?_.then(()=>c):c},"runChecks"),u=o((c,l,f)=>{if(it(c))return c.aborted=!0,c;let g=i(l,n,f);if(g instanceof Promise){if(f.async===!1)throw new $e;return g.then(_=>e._zod.parse(_,f))}return e._zod.parse(g,f)},"handleCanaryResult");e._zod.run=(c,l)=>{if(l.skipChecks)return e._zod.parse(c,l);if(l.direction==="backward"){let g=e._zod.parse({value:c.value,issues:[]},{...l,skipChecks:!0});return g instanceof Promise?g.then(_=>u(_,c,l)):u(g,c,l)}let f=e._zod.parse(c,l);if(f instanceof Promise){if(l.async===!1)throw new $e;return f.then(g=>i(g,n,l))}return i(f,n,l)}}ae(e,"~standard",()=>({validate:o(i=>{try{let u=Tt(e,i);return u.success?{value:u.data}:{issues:u.error?.issues}}catch{return It(e,i).then(c=>c.success?{value:c.data}:{issues:c.error?.issues})}},"validate"),vendor:"zod",version:1}))}),tr=$("$ZodString",(e,t)=>{te.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Qn(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}}),Ur=$("$ZodStringFormat",(e,t)=>{Cr.init(e,t),tr.init(e,t)});var fo=$("$ZodURL",(e,t)=>{Ur.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 Mr=$("$ZodNumber",(e,t)=>{te.init(e,t),e._zod.pattern=e._zod.bag.pattern??Nr,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}}),go=$("$ZodNumberFormat",(e,t)=>{oo.init(e,t),Mr.init(e,t)}),Lr=$("$ZodBoolean",(e,t)=>{te.init(e,t),e._zod.pattern=ro,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}}),yo=$("$ZodBigInt",(e,t)=>{te.init(e,t),e._zod.pattern=eo,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 ho=$("$ZodAny",(e,t)=>{te.init(e,t),e._zod.parse=r=>r}),vo=$("$ZodUnknown",(e,t)=>{te.init(e,t),e._zod.parse=r=>r});var _o=$("$ZodVoid",(e,t)=>{te.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;return typeof i>"u"||r.issues.push({expected:"void",code:"invalid_type",input:i,inst:e}),r}}),xo=$("$ZodDate",(e,t)=>{te.init(e,t),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=new Date(r.value)}catch{}let i=r.value,u=i instanceof Date;return u&&!Number.isNaN(i.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:i,...u?{received:"Invalid Date"}:{},inst:e}),r}});function co(e,t,r){e.issues.length&&t.issues.push(...Fe(r,e.issues)),t.value[r]=e.value}o(co,"handleArrayResult");var Po=$("$ZodArray",(e,t)=>{te.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;if(!Array.isArray(i))return r.issues.push({expected:"array",code:"invalid_type",input:i,inst:e}),r;r.value=Array(i.length);let u=[];for(let c=0;c<i.length;c++){let l=i[c],f=t.element._zod.run({value:l,issues:[]},n);f instanceof Promise?u.push(f.then(g=>co(g,r,c))):co(f,r,c)}return u.length?Promise.all(u).then(()=>r):r}});function er(e,t,r,n,i){if(e.issues.length){if(i&&!(r in n))return;t.issues.push(...Fe(r,e.issues))}e.value===void 0?r in n&&(t.value[r]=void 0):t.value[r]=e.value}o(er,"handlePropertyResult");function Bu(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=qn(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}o(Bu,"normalizeDef");function Vu(e,t,r,n,i,u){let c=[],l=i.keySet,f=i.catchall._zod,g=f.def.type,_=f.optout==="optional";for(let I in t){if(l.has(I))continue;if(g==="never"){c.push(I);continue}let x=f.run({value:t[I],issues:[]},n);x instanceof Promise?e.push(x.then(s=>er(s,r,I,t,_))):er(x,r,I,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(Vu,"handleCatchall");var bo=$("$ZodObject",(e,t)=>{if(te.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let l=t.shape;Object.defineProperty(t,"shape",{get:o(()=>{let f={...l};return Object.defineProperty(t,"shape",{value:f}),f},"get")})}let n=qt(()=>Bu(t));ae(e._zod,"propValues",()=>{let l=t.shape,f={};for(let g in l){let _=l[g]._zod;if(_.values){f[g]??(f[g]=new Set);for(let I of _.values)f[g].add(I)}}return f});let i=Pt,u=t.catchall,c;e._zod.parse=(l,f)=>{c??(c=n.value);let g=l.value;if(!i(g))return l.issues.push({expected:"object",code:"invalid_type",input:g,inst:e}),l;l.value={};let _=[],I=c.shape;for(let x of c.keys){let s=I[x],d=s._zod.optout==="optional",y=s._zod.run({value:g[x],issues:[]},f);y instanceof Promise?_.push(y.then(m=>er(m,l,x,g,d))):er(y,l,x,g,d)}return u?Vu(_,g,l,f,n.value,e):_.length?Promise.all(_).then(()=>l):l}});function lo(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=>!it(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,we())))}),t)}o(lo,"handleUnionResults");var jr=$("$ZodUnion",(e,t)=>{te.init(e,t),ae(e._zod,"optin",()=>t.options.some(i=>i._zod.optin==="optional")?"optional":void 0),ae(e._zod,"optout",()=>t.options.some(i=>i._zod.optout==="optional")?"optional":void 0),ae(e._zod,"values",()=>{if(t.options.every(i=>i._zod.values))return new Set(t.options.flatMap(i=>Array.from(i._zod.values)))}),ae(e._zod,"pattern",()=>{if(t.options.every(i=>i._zod.pattern)){let i=t.options.map(u=>u._zod.pattern);return new RegExp(`^(${i.map(u=>Kt(u.source)).join("|")})$`)}});let r=t.options.length===1,n=t.options[0]._zod.run;e._zod.parse=(i,u)=>{if(r)return n(i,u);let c=!1,l=[];for(let f of t.options){let g=f._zod.run({value:i.value,issues:[]},u);if(g instanceof Promise)l.push(g),c=!0;else{if(g.issues.length===0)return g;l.push(g)}}return c?Promise.all(l).then(f=>lo(f,i,e,u)):lo(l,i,e,u)}});var To=$("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,jr.init(e,t);let r=e._zod.parse;ae(e._zod,"propValues",()=>{let i={};for(let u of t.options){let c=u._zod.propValues;if(!c||Object.keys(c).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(u)}"`);for(let[l,f]of Object.entries(c)){i[l]||(i[l]=new Set);for(let g of f)i[l].add(g)}}return i});let n=qt(()=>{let i=t.options,u=new Map;for(let c of i){let l=c._zod.propValues?.[t.discriminator];if(!l||l.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(c)}"`);for(let f of l){if(u.has(f))throw new Error(`Duplicate discriminator value "${String(f)}"`);u.set(f,c)}}return u});e._zod.parse=(i,u)=>{let c=i.value;if(!Pt(c))return i.issues.push({code:"invalid_type",expected:"object",input:c,inst:e}),i;let l=n.value.get(c?.[t.discriminator]);return l?l._zod.run(i,u):t.unionFallback?r(i,u):(i.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:c,path:[t.discriminator],inst:e}),i)}});var Io=$("$ZodRecord",(e,t)=>{te.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;if(!Gn(i))return r.issues.push({expected:"record",code:"invalid_type",input:i,inst:e}),r;let u=[],c=t.keyType._zod.values;if(c){r.value={};let l=new Set;for(let g of c)if(typeof g=="string"||typeof g=="number"||typeof g=="symbol"){l.add(typeof g=="number"?g.toString():g);let _=t.valueType._zod.run({value:i[g],issues:[]},n);_ instanceof Promise?u.push(_.then(I=>{I.issues.length&&r.issues.push(...Fe(g,I.issues)),r.value[g]=I.value})):(_.issues.length&&r.issues.push(...Fe(g,_.issues)),r.value[g]=_.value)}let f;for(let g in i)l.has(g)||(f=f??[],f.push(g));f&&f.length>0&&r.issues.push({code:"unrecognized_keys",input:i,inst:e,keys:f})}else{r.value={};for(let l of Reflect.ownKeys(i)){if(l==="__proto__")continue;let f=t.keyType._zod.run({value:l,issues:[]},n);if(f instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof l=="string"&&Nr.test(l)&&f.issues.length){let I=t.keyType._zod.run({value:Number(l),issues:[]},n);if(I instanceof Promise)throw new Error("Async schemas not supported in object keys currently");I.issues.length===0&&(f=I)}if(f.issues.length){t.mode==="loose"?r.value[l]=i[l]:r.issues.push({code:"invalid_key",origin:"record",issues:f.issues.map(I=>Be(I,n,we())),input:l,path:[l],inst:e});continue}let _=t.valueType._zod.run({value:i[l],issues:[]},n);_ instanceof Promise?u.push(_.then(I=>{I.issues.length&&r.issues.push(...Fe(l,I.issues)),r.value[f.value]=I.value})):(_.issues.length&&r.issues.push(...Fe(l,_.issues)),r.value[f.value]=_.value)}}return u.length?Promise.all(u).then(()=>r):r}});var Eo=$("$ZodEnum",(e,t)=>{te.init(e,t);let r=wr(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(i=>Wn.has(typeof i)).map(i=>typeof i=="string"?ot(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}}),$o=$("$ZodLiteral",(e,t)=>{if(te.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");let r=new Set(t.values);e._zod.values=r,e._zod.pattern=new RegExp(`^(${t.values.map(n=>typeof n=="string"?ot(n):n?ot(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 So=$("$ZodTransform",(e,t)=>{te.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Gt(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 $e;return r.value=i,r}});function po(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}o(po,"handleOptionalResult");var Ao=$("$ZodOptional",(e,t)=>{te.init(e,t),e._zod.optin="optional",e._zod.optout="optional",ae(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),ae(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${Kt(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=>po(u,r.value)):po(i,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,n)}});var zo=$("$ZodNullable",(e,t)=>{te.init(e,t),ae(e._zod,"optin",()=>t.innerType._zod.optin),ae(e._zod,"optout",()=>t.innerType._zod.optout),ae(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${Kt(r.source)}|null)$`):void 0}),ae(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,n)=>r.value===null?r:t.innerType._zod.run(r,n)});var ko=$("$ZodPipe",(e,t)=>{te.init(e,t),ae(e._zod,"values",()=>t.in._zod.values),ae(e._zod,"optin",()=>t.in._zod.optin),ae(e._zod,"optout",()=>t.out._zod.optout),ae(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,n)=>{if(n.direction==="backward"){let u=t.out._zod.run(r,n);return u instanceof Promise?u.then(c=>Qt(c,t.in,n)):Qt(u,t.in,n)}let i=t.in._zod.run(r,n);return i instanceof Promise?i.then(u=>Qt(u,t.out,n)):Qt(i,t.out,n)}});function Qt(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}o(Qt,"handlePipeResult");var Oo=$("$ZodCustom",(e,t)=>{Ve.init(e,t),te.init(e,t),e._zod.parse=(r,n)=>r,e._zod.check=r=>{let n=r.value,i=t.fn(n);if(i instanceof Promise)return i.then(u=>mo(u,r,n,e));mo(i,r,n,e)}});function mo(e,t,r,n){if(!e){let i={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(i.params=n._zod.def.params),t.issues.push(Dr(i))}}o(mo,"handleRefineResult");var Ro;var Fr=class{static{o(this,"$ZodRegistry")}constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...r){let n=r[0];return this._map.set(t,n),n&&typeof n=="object"&&"id"in n&&this._idmap.set(n.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){let r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){let r=t._zod.parent;if(r){let n={...this.get(r)??{}};delete n.id;let i={...n,...this._map.get(t)};return Object.keys(i).length?i:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};function Do(){return new Fr}o(Do,"registry");(Ro=globalThis).__zod_globalRegistry??(Ro.__zod_globalRegistry=Do());var Br=globalThis.__zod_globalRegistry;function No(e,t){return new e({type:"string",...Q(t)})}o(No,"_string");function Co(e,t){return new e({type:"string",coerce:!0,...Q(t)})}o(Co,"_coercedString");function Uo(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Q(t)})}o(Uo,"_url");function Mo(e,t){return new e({type:"number",checks:[],...Q(t)})}o(Mo,"_number");function Lo(e,t){return new e({type:"number",coerce:!0,checks:[],...Q(t)})}o(Lo,"_coercedNumber");function jo(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...Q(t)})}o(jo,"_int");function Fo(e,t){return new e({type:"boolean",...Q(t)})}o(Fo,"_boolean");function Bo(e,t){return new e({type:"boolean",coerce:!0,...Q(t)})}o(Bo,"_coercedBoolean");function Vo(e,t){return new e({type:"bigint",coerce:!0,...Q(t)})}o(Vo,"_coercedBigint");function Zo(e){return new e({type:"any"})}o(Zo,"_any");function Ho(e){return new e({type:"unknown"})}o(Ho,"_unknown");function Go(e,t){return new e({type:"void",...Q(t)})}o(Go,"_void");function Wo(e,t){return new e({type:"date",coerce:!0,...Q(t)})}o(Wo,"_coercedDate");function rr(e,t){return new no({check:"greater_than",...Q(t),value:e,inclusive:!0})}o(rr,"_gte");function Ie(e,t){return new io({check:"min_length",...Q(t),minimum:e})}o(Ie,"_minLength");function Ze(e,t){return new ao({check:"string_format",format:"regex",...Q(t),pattern:e})}o(Ze,"_regex");function qo(e,t,r){let n=Q(r);return n.abort??(n.abort=!0),new e({type:"custom",check:"custom",fn:t,...n})}o(qo,"_custom");var se=$("ZodMiniType",(e,t)=>{if(!e._zod)throw new Error("Uninitialized schema in ZodMiniType.");te.init(e,t),e.def=t,e.type=t.type,e.parse=(r,n)=>Xt(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>Tt(e,r,n),e.parseAsync=async(r,n)=>Yt(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>It(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)=>Jt(e,r,n),e.brand=()=>e,e.register=((r,n)=>(r.add(e,n),e)),e.apply=r=>r(e)}),or=$("ZodMiniString",(e,t)=>{tr.init(e,t),se.init(e,t)});function a(e){return No(or,e)}o(a,"string");var Ko=$("ZodMiniStringFormat",(e,t)=>{Ur.init(e,t),or.init(e,t)});var rc=$("ZodMiniURL",(e,t)=>{fo.init(e,t),Ko.init(e,t)});function Jo(e){return Uo(rc,e)}o(Jo,"url");var ir=$("ZodMiniNumber",(e,t)=>{Mr.init(e,t),se.init(e,t)});function me(e){return Mo(ir,e)}o(me,"number");var nc=$("ZodMiniNumberFormat",(e,t)=>{go.init(e,t),ir.init(e,t)});function Xo(e){return jo(nc,e)}o(Xo,"int");var Vr=$("ZodMiniBoolean",(e,t)=>{Lr.init(e,t),se.init(e,t)});function K(e){return Fo(Vr,e)}o(K,"boolean");var Yo=$("ZodMiniBigInt",(e,t)=>{yo.init(e,t),se.init(e,t)});var oc=$("ZodMiniAny",(e,t)=>{ho.init(e,t),se.init(e,t)});function $t(){return Zo(oc)}o($t,"any");var ic=$("ZodMiniUnknown",(e,t)=>{vo.init(e,t),se.init(e,t)});function N(){return Ho(ic)}o(N,"unknown");var ac=$("ZodMiniVoid",(e,t)=>{_o.init(e,t),se.init(e,t)});function Qo(e){return Go(ac,e)}o(Qo,"_void");var ei=$("ZodMiniDate",(e,t)=>{xo.init(e,t),se.init(e,t)});var sc=$("ZodMiniArray",(e,t)=>{Po.init(e,t),se.init(e,t)});function L(e,t){return new sc({type:"array",element:e,...Q(t)})}o(L,"array");var uc=$("ZodMiniObject",(e,t)=>{bo.init(e,t),se.init(e,t),ae(e,"shape",()=>t.shape)});function p(e,t){let r={type:"object",shape:e??{},...Q(t)};return new uc(r)}o(p,"object");var cc=$("ZodMiniUnion",(e,t)=>{jr.init(e,t),se.init(e,t)});function j(e,t){return new cc({type:"union",options:e,...Q(t)})}o(j,"union");var lc=$("ZodMiniDiscriminatedUnion",(e,t)=>{To.init(e,t),se.init(e,t)});function He(e,t,r){return new lc({type:"union",options:t,discriminator:e,...Q(r)})}o(He,"discriminatedUnion");var pc=$("ZodMiniRecord",(e,t)=>{Io.init(e,t),se.init(e,t)});function C(e,t,r){return new pc({type:"record",keyType:e,valueType:t,...Q(r)})}o(C,"record");var dc=$("ZodMiniEnum",(e,t)=>{Eo.init(e,t),se.init(e,t),e.options=Object.values(t.entries)});function H(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new dc({type:"enum",entries:r,...Q(t)})}o(H,"_enum");var mc=$("ZodMiniLiteral",(e,t)=>{$o.init(e,t),se.init(e,t)});function k(e,t){return new mc({type:"literal",values:Array.isArray(e)?e:[e],...Q(t)})}o(k,"literal");var fc=$("ZodMiniTransform",(e,t)=>{So.init(e,t),se.init(e,t)});function Ge(e){return new fc({type:"transform",transform:e})}o(Ge,"transform");var gc=$("ZodMiniOptional",(e,t)=>{Ao.init(e,t),se.init(e,t)});function h(e){return new gc({type:"optional",innerType:e})}o(h,"optional");var yc=$("ZodMiniNullable",(e,t)=>{zo.init(e,t),se.init(e,t)});function St(e){return new yc({type:"nullable",innerType:e})}o(St,"nullable");var hc=$("ZodMiniPipe",(e,t)=>{ko.init(e,t),se.init(e,t)});function We(e,t){return new hc({type:"pipe",in:e,out:t})}o(We,"pipe");var vc=$("ZodMiniCustom",(e,t)=>{Oo.init(e,t),se.init(e,t)});function ar(e,t){return qo(vc,e??(()=>!0),t)}o(ar,"custom");var At={};Fn(At,{bigint:()=>Ic,boolean:()=>Tc,date:()=>Ec,number:()=>bc,string:()=>Pc});function Pc(e){return Co(or,e)}o(Pc,"string");function bc(e){return Lo(ir,e)}o(bc,"number");function Tc(e){return Bo(Vr,e)}o(Tc,"boolean");function Ic(e){return Vo(Yo,e)}o(Ic,"bigint");function Ec(e){return Wo(ei,e)}o(Ec,"date");var Hr=p({retryOnFailure:p({defaultValue:h(K()),hide:h(K())}),continueOnFailure:p({defaultValue:h(K()),hide:h(K())})}),Zr=class{constructor(t,r,n,i,u,c,l,f,g,_,I){this.name=t;this.displayName=r;this.description=n;this.props=i;this.run=u;this.test=c;this.requireAuth=l;this.errorHandlingOptions=f;this.outputSchema=g;this.audience=_;this.aiMetadata=I}static{o(this,"IAction")}},be=o(e=>new Zr(e.name,e.displayName,e.description,e.props,e.run,e.test??e.run,e.requireAuth??!0,e.errorHandlingOptions??{continueOnFailure:{defaultValue:!1},retryOnFailure:{defaultValue:!1}},e.outputSchema,e.audience,e.aiMetadata),"createAction");var q=p({displayName:a(),description:h(a())}),Z=o((e,t)=>p({type:k(t),required:K(),defaultValue:h($t())}),"TPropertyValue");var _e=p({...q.shape,...Z(a(),"SHORT_TEXT").shape}),Re=p({...q.shape,...Z(a(),"LONG_TEXT").shape});var ri=p({label:a(),value:N()}),sr=p({disabled:h(K()),placeholder:h(a()),options:L(ri)});var xe=p({...q.shape,options:sr,...Z(N(),"STATIC_DROPDOWN").shape}),De=p({...q.shape,options:sr,...Z(L(N()),"STATIC_MULTI_SELECT_DROPDOWN").shape});var Gr=p({...q.shape,...Z(N(),"DROPDOWN").shape,refreshers:L(a())}),zt=p({...q.shape,...Z(L(N()),"MULTI_SELECT_DROPDOWN").shape,refreshers:L(a())});var Ne=p({...q.shape,...Z(K(),"CHECKBOX").shape});var Ce=p({...q.shape,...Z(me(),"NUMBER").shape});var kt=p({...q.shape,streaming:h(K()),...Z(N(),"FILE").shape});var Ot=p({...q.shape,...Z(a(),"DATE_TIME").shape});var ni=C(a(),j([_e,Re,xe,zt,De,Ne,Ce,kt,Ot])),wt=p({...q.shape,properties:ni,...Z(L(N()),"ARRAY").shape});var Rt=p({...q.shape,...Z(j([C(a(),N())]),"JSON").shape});var oi=j([_e,xe,Rt,wt,De]),Sc=C(a(),oi),Wr=p({refreshers:L(a()),...q.shape,...Z(N(),"DYNAMIC").shape});var ur=p({...q.shape,...Z(Qo(),"MARKDOWN").shape});var Dt=(r=>(r.ARCHIVE="ARCHIVE",r.REGISTRY="REGISTRY",r))(Dt||{}),at=(r=>(r.CUSTOM="CUSTOM",r.OFFICIAL="OFFICIAL",r))(at||{}),Nt=(v=>(v.ARTIFICIAL_INTELLIGENCE="ARTIFICIAL_INTELLIGENCE",v.COMMUNICATION="COMMUNICATION",v.COMMERCE="COMMERCE",v.CORE="CORE",v.UNIVERSAL_AI="UNIVERSAL_AI",v.FLOW_CONTROL="FLOW_CONTROL",v.BUSINESS_INTELLIGENCE="BUSINESS_INTELLIGENCE",v.ACCOUNTING="ACCOUNTING",v.PRODUCTIVITY="PRODUCTIVITY",v.CONTENT_AND_FILES="CONTENT_AND_FILES",v.DEVELOPER_TOOLS="DEVELOPER_TOOLS",v.CUSTOMER_SUPPORT="CUSTOMER_SUPPORT",v.FORMS_AND_SURVEYS="FORMS_AND_SURVEYS",v.HUMAN_RESOURCES="HUMAN_RESOURCES",v.PAYMENT_PROCESSING="PAYMENT_PROCESSING",v.MARKETING="MARKETING",v.SALES_AND_CRM="SALES_AND_CRM",v))(Nt||{});var Ct=(r=>(r.AUTHORIZATION_CODE="authorization_code",r.CLIENT_CREDENTIALS="client_credentials",r))(Ct||{}),qr="both_client_credentials_and_authorization_code";var Ue=(i=>(i.POLLING="POLLING",i.WEBHOOK="WEBHOOK",i.APP_WEBHOOK="APP_WEBHOOK",i.MANUAL="MANUAL",i))(Ue||{}),Ut=(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))(Ut||{}),Ac=p({strategy:H(Ut),paramName:h(a())}),Mt=(r=>(r.SIMULATION="SIMULATION",r.TEST_FUNCTION="TEST_FUNCTION",r))(Mt||{});var cr=(r=>(r.WEBSOCKET="WEBSOCKET",r.NONE="NONE",r))(cr||{}),ii=p({status:h(me()),body:h(N()),headers:h(C(a(),a()))}),ai=p({type:k("DELAY"),resumeDateTime:a(),requestIdToReply:h(a()),handlerId:h(a()),streamStepProgress:h(H(cr))}),si=p({type:k("WEBHOOK"),requestId:a(),requestIdToReply:h(a()),response:ii,handlerId:h(a()),streamStepProgress:h(H(cr))}),zc=j([ai,si]);var kc=p({body:N(),rawBody:h(N()),headers:C(a(),a()),queryParams:C(a(),a())});function ue(e){return e==null}o(ue,"isNil");function Ye(e){return e==null?!0:typeof e=="string"||Array.isArray(e)?e.length===0:typeof e=="object"?Object.keys(e).length===0:!1}o(Ye,"isEmpty");function lr(e,t){if(e==null)throw new Error(`${t} is null or undefined`)}o(lr,"assertNotNullOrUndefined");var Kr=je(require("crypto"),1);var Oc=128,Qe,st,wc=o(e=>{!Qe||Qe.length<e?(Qe=Buffer.allocUnsafe(e*Oc),Kr.default.randomFillSync(Qe),st=0):st+e>Qe.length&&(Kr.default.randomFillSync(Qe),st=0),st+=e},"fillPool"),Rc=o(e=>(wc(e|=0),Qe.subarray(st-e,st)),"random"),Dc=o((e,t,r)=>{let n=(2<<31-Math.clz32(e.length-1|1))-1,i=Math.ceil(1.6*n*t/e.length);return(u=t)=>{let c="";for(;;){let l=r(i),f=i;for(;f--;)if(c+=e[l[f]&n]||"",c.length===u)return c}}},"customRandom"),ci=o((e,t=21)=>Dc(e,t,Rc),"customAlphabet");var Nc="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",li=21,Hb=a().check(Ze(new RegExp(`^[0-9a-zA-Z]{${li}}$`))),Cc=ci(Nc,li);var qe=We(Ge(e=>e instanceof Date?e.toISOString():e),a()),Te={id:a(),created:qe,updated:qe},ee=o(e=>h(St(e)),"Nullable");function Jr(e){return h(St(H(e)))}o(Jr,"NullableEnum");var qb=We(Ge(e=>e==="true"||e===!0?!0:e==="false"||e===!1?!1:void 0),h(K())),pr=o(e=>We(Ge(t=>Array.isArray(t)?t:t!==void 0?[t]:void 0),h(L(e))),"OptionalArrayFromQuery");var Xb=C(a(),N());var Lt=(_=>(_.OPENAI="openai",_.OPENROUTER="openrouter",_.ANTHROPIC="anthropic",_.AZURE="azure",_.GOOGLE="google",_.ACTIVEPIECES="activepieces",_.CLOUDFLARE_GATEWAY="cloudflare-gateway",_.CUSTOM="custom",_.BEDROCK="bedrock",_.MISTRAL="mistral",_))(Lt||{});var cT=a().check(Ze(/^#[0-9A-Fa-f]{6}$/));var pT=p({filename:a(),data:N(),type:k("file"),mimetype:h(a())});var Uc=je(di());var vT=p({...Te,name:a(),permissions:L(a()),platformId:ee(a()),type:a(),userCount:h(me())});var mi=(n=>(n.AGENT_DECIDE="agent-decide",n.CHOOSE_YOURSELF="choose-yourself",n.LEAVE_EMPTY="leave-empty",n))(mi||{}),Xr=(r=>(r.FILE="FILE",r.TABLE="TABLE",r))(Xr||{}),Yr=(n=>(n.SSE="sse",n.STREAMABLE_HTTP="streamable-http",n.SIMPLE_HTTP="http",n))(Yr||{});var Qr=(n=>(n.TEXT="text",n.NUMBER="number",n.BOOLEAN="boolean",n))(Qr||{});var en=(r=>(r.IN_PROGRESS="in-progress",r.COMPLETED="completed",r))(en||{});var Mc=p({mode:H(mi),value:N()}),Lc=p({auth:h(a()),fields:C(a(),Mc)}),jc=p({pieceName:a(),pieceVersion:a(),actionName:a(),predefinedInput:h(Lc)}),Fc=p({type:k("PIECE"),toolName:a().check(Ie(1)),pieceMetadata:jc}),Bc=p({type:k("none")}),Vc=p({type:k("access_token"),accessToken:a()}),Zc=p({type:k("api_key"),apiKey:a(),apiKeyHeader:a()}),Hc=p({type:k("headers"),headers:C(a(),a())}),Gc=He("type",[Bc,Vc,Zc,Hc]),fi=p({type:k("FLOW"),toolName:a().check(Ie(1)),externalFlowId:a(),flowDisplayName:h(a())}),gi=p({type:k("MCP"),toolName:a().check(Ie(1)),serverUrl:Jo(),protocol:H(Yr),auth:Gc}),yi=p({type:k("KNOWLEDGE_BASE"),toolName:a().check(Ie(1)),sourceType:H(Xr),sourceId:a(),sourceName:a()}),Wc=He("type",[Fc,fi,gi,yi]),qc=p({displayName:a(),description:h(a()),type:H(Qr)}),hi=p({type:k("MARKDOWN"),markdown:a()}),ut={type:k("TOOL_CALL"),input:ee(C(a(),N())),output:h(N()),toolName:a(),status:H(en),toolCallId:a(),startTime:a(),endTime:h(a())},KT=p(ut),vi=He("toolCallType",[p({...ut,toolCallType:k("PIECE"),pieceName:a(),pieceVersion:a(),actionName:a()}),p({...ut,toolCallType:k("FLOW"),displayName:a(),externalFlowId:a()}),p({...ut,toolCallType:k("MCP"),displayName:a(),serverUrl:a()}),p({...ut,toolCallType:k("KNOWLEDGE_BASE"),displayName:a(),sourceType:a()}),p({...ut,toolCallType:k("UNKNOWN"),displayName:a()})]),Kc=j([hi,vi]);var tn=(r=>(r.IMAGE="image",r.TEXT="text",r))(tn||{}),Me=p({apiKey:a()}),Jc=Me,Xc=p({apiKey:a(),apiKeyHash:a()}),Yc=Me,Qc=Me,el=Me,tl=Me,rl=Me,nl=Me,ol=Me,Ti=p({accessKeyId:a().check(Ie(1)),secretAccessKey:a().check(Ie(1))}),il=p({}),al=p({}),sl=p({}),ul=p({}),cl=p({}),ll=p({}),Ii=p({modelId:a(),modelName:a(),modelType:H(tn)}),Ei=p({apiKeyHeader:a(),baseUrl:a(),models:L(Ii),defaultHeaders:h(C(a(),a()))}),$i=p({accountId:a(),gatewayId:a(),models:L(Ii),vertexProject:h(a()),vertexRegion:h(a())}),Si=p({resourceName:a(),apiVersion:We(Ge(e=>typeof e=="string"&&e.trim().length===0?void 0:e),h(a()))}),Ai=p({region:a().check(Ie(1))}),pl=j([Jc,el,tl,rl,nl,Qc,Yc,Xc,Ti,ol]),zi=j([Ei,$i,Si,Ai,il,sl,ul,cl,al,ll]),dl=p({id:a(),name:a(),type:H(tn)}),ml=p({id:a(),name:a(),provider:H(Lt),config:zi,enabledForChat:K()}),fl=p({provider:H(Lt),config:zi,auth:pl,platformId:a()});var QT={openai:"openai",anthropic:"anthropic","google-ai-studio":"google","google-vertex-ai":"google"},_i=["gpt-5.5","gpt-5.4-mini","gpt-5.4-nano","gpt-4.1","gpt-4.1-mini"],gl=["claude-sonnet-4-6","claude-opus-4-7","claude-haiku-4-5"],yl=["claude-sonnet-4.6","claude-opus-4.7","claude-haiku-4.5"],xi=["gemini-2.5-pro","gemini-2.5-flash","gemini-3.1-pro-preview","gemini-3-flash-preview"],hl=["grok-4.20","grok-4.1-fast"],vl={openai:_i,anthropic:gl,google:xi,activepieces:[...yl.map(e=>`anthropic/${e}`),..._i.map(e=>`openai/${e}`),...xi.map(e=>`google/${e}`),...hl.map(e=>`x-ai/${e}`)]};var Pi=128e3,_l={openai:128e3,anthropic:2e5,google:1048576,bedrock:2e5,azure:128e3,openrouter:128e3,activepieces:2e5,mistral:128e3};function xl({provider:e}){return e?_l[e]??Pi:Pi}o(xl,"getMaxContextTokens");var bi={openai:"text-embedding-3-small",google:"text-embedding-004",azure:"text-embedding-3-small",activepieces:"text-embedding-3-small",openrouter:"openai/text-embedding-3-small"},Pl={anthropic:"native",google:"native",openrouter:"plugin",activepieces:"plugin"},bl=new Set(["anthropic","mistral"]);function Se(e){return{chatModels:vl[e],maxContextTokens:xl({provider:e}),defaultEmbeddingModel:bi[e],supportsEmbedding:bi[e]!==void 0,supportsImageGeneration:!bl.has(e),webSearch:Pl[e]}}o(Se,"buildProviderCapabilities");var Tl={openai:Se("openai"),anthropic:Se("anthropic"),openrouter:Se("openrouter"),azure:Se("azure"),google:Se("google"),"cloudflare-gateway":Se("cloudflare-gateway"),custom:Se("custom"),bedrock:Se("bedrock"),mistral:Se("mistral"),activepieces:Se("activepieces")};var Il=p({base64Url:a(),fileName:a(),extension:h(a())}),El=p({mimeType:a(),url:a(),fileName:h(a())}),rn=j([Il,El]);var $l=j([p({type:k("file"),value:rn}),p({type:k("markdown"),value:a(),files:h(L(rn))})]),Sl=p({sessionId:a(),message:a(),files:h(L(a()))});var Oi=(r=>(r.ON_NEW_RECORD="ON_NEW_RECORD",r.ON_UPDATE_RECORD="ON_UPDATE_RECORD",r))(Oi||{}),wi=(r=>(r.ENABLED="ENABLED",r.DISABLED="DISABLED",r))(wi||{}),nn=(n=>(n.RECORD_CREATED="RECORD_CREATED",n.RECORD_UPDATED="RECORD_UPDATED",n.RECORD_DELETED="RECORD_DELETED",n))(nn||{});var Al=j([p({...Te,name:a(),externalId:a(),type:k("STATIC_DROPDOWN"),tableId:a(),projectId:a(),data:p({options:L(p({value:a()}))})}),p({...Te,name:a(),externalId:a(),type:j([k("TEXT"),k("NUMBER"),k("DATE")]),tableId:a(),projectId:a()})]),zl=p({...Te,name:a(),folderId:ee(a()),projectId:a(),externalId:a(),status:Jr(wi),trigger:Jr(Oi)}),kl=p({...Te,tableId:a(),projectId:a(),cells:C(a(),p({updated:a(),created:a(),value:N(),fieldName:a()}))}),Ol=p({events:L(H(nn)),webhookUrl:a(),flowId:a()}),wl=p({fields:L(p({id:a(),name:a()})),rows:L(C(a(),a())),name:a()}),Rl=p({projectId:a(),limit:h(At.number()),cursor:h(a()),name:h(a()),externalIds:pr(a()),folderId:h(a()),folderIds:pr(a())}),Dl=p({records:L(L(p({fieldId:a(),value:Di()}))),tableId:a()}),Nl=p({cells:h(L(p({fieldId:a(),value:Di()}))),tableId:a(),agentUpdate:h(K())}),Ri=He("operator",[et("eq"),et("neq"),et("gt"),et("gte"),et("lt"),et("lte"),et("co"),ki("exists"),ki("not_exists")]),Cl=p({tableId:a(),limit:h(At.number()),cursor:h(a()),filters:pr(Ri)});function Di(){return We(Ge(e=>e==null?e:String(e)),St(a()))}o(Di,"coerceToString");function et(e){return p({fieldId:a(),operator:k(e),value:a()})}o(et,"valueFilter");function ki(e){return p({fieldId:a(),operator:k(e)})}o(ki,"existenceFilter");var Ul=p({status:h(me()),body:h(N()),headers:h(C(a(),a()))}),Ml=p({...Te,deleted:ee(qe),ownerId:a(),displayName:a(),platformId:a(),externalId:ee(a())});var Ni=p({name:a(),description:h(a()),type:a(),required:K()}),Ll=p({pieceName:a(),triggerName:a(),input:p({toolName:a(),toolDescription:a(),inputSchema:L(Ni),returnsResponse:K()})});var Ci="^[0-9]+\\.[0-9]+\\.[0-9]+$",vI=new RegExp(Ci),Fl="^([~^])?[0-9]+\\.[0-9]+\\.[0-9]+$",_I=a().check(Ze(new RegExp(Ci))),xI=a().check(Ze(new RegExp(Fl))),Bl=p({packageType:k("ARCHIVE"),pieceType:H(at),pieceName:a(),pieceVersion:a(),archiveId:a(),platformId:a()}),Ui=p({packageType:k("REGISTRY"),pieceType:k("OFFICIAL"),pieceName:a(),pieceVersion:a()}),Mi=p({packageType:k("REGISTRY"),pieceType:k("CUSTOM"),pieceName:a(),pieceVersion:a(),platformId:a()}),PI=j([Ui,Mi]),bI=j([Bl,Ui,Mi]);var Vl=He("type",[p({type:k("CRON_EXPRESSION"),cronExpression:a(),timezone:a()}),p({type:k("INTERVAL"),intervalMs:Xo().check(rr(6e4))})]),TI=p({...Te,type:H(Ue),projectId:a(),flowId:a(),triggerName:a(),schedule:ee(Vl),flowVersionId:a(),pieceName:a(),pieceVersion:a(),deleted:ee(a()),simulate:K()}),Li=(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))(Li||{}),ji=(r=>(r.NONE="NONE",r.ZSTD="ZSTD",r))(ji||{}),Fi=(r=>(r.S3="S3",r.DB="DB",r))(Fi||{}),II=p({...Te,projectId:ee(a()),platformId:ee(a()),type:H(Li),compression:H(ji),data:h(N()),location:H(Fi),size:ee(me()),fileName:ee(a()),s3Key:ee(a()),metadata:ee(C(a(),a()))}),Bi=(n=>(n.ADMIN="ADMIN",n.MEMBER="MEMBER",n.OPERATOR="OPERATOR",n))(Bi||{}),Vi=(r=>(r.ACTIVE="ACTIVE",r.INACTIVE="INACTIVE",r))(Vi||{}),EI=p({id:a(),email:a(),firstName:a(),status:H(Vi),externalId:ee(a()),platformId:ee(a()),platformRole:H(Bi),lastName:a(),created:qe,updated:qe,lastActiveDate:ee(qe),imageUrl:ee(a())});var on=p({...q.shape,...Z(C(a(),N()),"OBJECT").shape});var Wi=p({...q.shape,...Z(a(),"COLOR").shape});var an=j([_e,Re,ur,Ne,xe,De,Gr,zt,Wr,Ce,wt,on,Rt,Ot,kt,Wi]),M={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 Ae=p({displayName:a(),description:h(a())});var qi=p({username:a(),password:a()}),sn=p({...Ae.shape,username:p({displayName:a(),description:h(a())}),password:p({displayName:a(),description:h(a())}),...Z(qi,"BASIC_AUTH").shape});var Wl=C(a(),j([_e,Re,Ce,Ne,xe])),un=p({...Ae.shape,props:Wl,...Z(N(),"CUSTOM_AUTH").shape});var tt=p({...Ae.shape,...Z(p({auth:a()}),"SECRET_TEXT").shape});var ql=C(a(),j([_e,Re,tt,Ce,Ne,xe,De,ur])),Ki=p({...Ae.shape,props:ql,...Z(N(),"OIDC").shape});var cn=(r=>(r.HEADER="HEADER",r.BODY="BODY",r))(cn||{}),Ji=j([_e,tt,xe]),Xi=C(a(),Ji),Kl=p({props:h(C(a(),Ji)),authUrl:a(),tokenUrl:a(),scope:L(a()),prompt:h(j([k("none"),k("consent"),k("login"),k("omit")])),pkce:h(K()),pkceMethod:h(j([k("plain"),k("S256")])),authorizationMethod:h(H(cn)),grantType:h(j([H(Ct),k(qr)])),extra:h(C(a(),a()))}),Yi=p({access_token:a(),props:h(Xi),data:C(a(),$t())}),ln=p({...Ae.shape,...Kl.shape,...Z(Yi,"OAUTH2").shape});var ct=j([sn,un,Ki,ln,tt]),jt="Connection",pn={SecretText(e){return{...e,valueSchema:void 0,type:"SECRET_TEXT"}},OAuth2(e){return{...e,valueSchema:void 0,type:"OAUTH2",displayName:e.displayName||jt}},BasicAuth(e){return{...e,valueSchema:void 0,type:"BASIC_AUTH",displayName:e.displayName||jt,required:!0}},CustomAuth(e){return{...e,valueSchema:void 0,type:"CUSTOM_AUTH",displayName:e.displayName||jt}},OIDC(e){return{...e,valueSchema:void 0,type:"OIDC",displayName:e.displayName||jt}},None(){}};var n$={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 Jl=p({...q.shape,...Z(N(),"CUSTOM").shape,code:a()});var Xl=j([an,ct]),dn=C(a(),Xl),T$=C(a(),an);var Qi=j([p({strategy:k("CRON"),cronExpression:a()}),p({strategy:k("NONE")})]),lt=class{constructor(t,r,n,i,u,c,l,f,g,_,I,x,s,d,y,m,v,P,F){this.name=t;this.displayName=r;this.description=n;this.requireAuth=i;this.props=u;this.type=c;this.handshakeConfiguration=l;this.onHandshake=f;this.renewConfiguration=g;this.onRenew=_;this.onEnable=I;this.onDisable=x;this.onStart=s;this.run=d;this.test=y;this.sampleData=m;this.testStrategy=v;this.outputSchema=P;this.aiMetadata=F}static{o(this,"ITrigger")}},mr=o(e=>{switch(e.type){case"WEBHOOK":return new lt(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 lt(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 lt(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 lt(e.name,e.displayName,e.description,e.requireAuth??!0,e.props,e.type,{strategy:"NONE"},async()=>({status:200}),{strategy:"NONE"},(async()=>Promise.resolve()),e.onEnable,e.onDisable,e.onStart??(async()=>Promise.resolve()),e.run,e.test??(()=>Promise.resolve([e.sampleData])),e.sampleData,ue(e.sampleData)&&ue(e.test)?"SIMULATION":"TEST_FUNCTION",e.outputSchema,e.aiMetadata)}},"createTrigger");var ea="2",fr="0.82.0";var mn=class{constructor(t,r,n,i,u,c,l,f,g=fr,_,I="",x){this.displayName=t;this.logoUrl=r;this.authors=n;this.events=i;this.categories=l;this.auth=f;this.minimumSupportedRelease=g;this.maximumSupportedRelease=_;this.description=I;this.deprecated=x;this._actions={};this._triggers={};this.getContextInfo=o(()=>({version:ea}),"getContextInfo");(!Yl(g)||Ql(g,fr))&&(this.minimumSupportedRelease=fr),u.forEach(s=>this._actions[s.name]=s),c.forEach(s=>this._triggers[s.name]=s)}static{o(this,"Piece")}metadata(){return{displayName:this.displayName,logoUrl:this.logoUrl,actions:this._actions,triggers:this._triggers,categories:this.categories,description:this.description,authors:this.authors,auth:this.auth,minimumSupportedRelease:this.minimumSupportedRelease,maximumSupportedRelease:this.maximumSupportedRelease,deprecated:this.deprecated,contextInfo:this.getContextInfo?.()}}getAction(t){return this._actions[t]}getTrigger(t){return this._triggers[t]}actions(){return this._actions}triggers(){return this._triggers}},ta=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 mn(e.displayName,e.logoUrl,e.authors??[],e.events,e.actions,e.triggers,e.categories??[],e.auth,e.minimumSupportedRelease,e.maximumSupportedRelease,e.description,e.deprecated)},"createPiece");function Yl(e){return/^\d+\.\d+\.\d+$/.test(e)}o(Yl,"isValidSimpleSemver");function Ql(e,t){let[r,n,i]=e.split(".").map(Number),[u,c,l]=t.split(".").map(Number);return r!==u?r<u:n!==c?n<c:i<l}o(Ql,"isSemverLessThan");var ep=h(C(a(),C(a(),a()))),ra=p({id:h(a()),name:a(),displayName:a(),logoUrl:a(),description:a(),authors:L(a()),platformId:h(a()),directoryPath:h(a()),auth:h(j([ct,L(ct)])),version:a(),categories:h(L(H(Nt))),minimumSupportedRelease:h(a()),maximumSupportedRelease:h(a()),deprecated:h(K()),i18n:ep}),tp=H(["human","ai","both"]),na=p({description:h(a()),idempotent:h(K())}),oa=p({name:a(),displayName:a(),description:a(),props:dn,requireAuth:K(),errorHandlingOptions:h(Hr),outputSchema:h(ar()),audience:h(tp),aiMetadata:h(na)}),ia=p({name:a(),displayName:a(),description:a(),props:dn,errorHandlingOptions:h(Hr),type:H(Ue),sampleData:N(),handshakeConfiguration:h(ar()),renewConfiguration:h(Qi),testStrategy:H(Mt),outputSchema:h(ar()),aiMetadata:h(na)}),rp=p({...ra.shape,actions:C(a(),oa),triggers:C(a(),ia)}),np=p({...ra.shape,actions:me(),triggers:me(),suggestedActions:h(L(oa)),suggestedTriggers:h(L(ia))}),aa=p({projectUsage:me(),pieceType:H(at),packageType:H(Dt),platformId:h(a()),archiveId:h(a())}),TS=p({...rp.shape,...aa.shape}),IS=p({...np.shape,...aa.shape}),ES=p({name:a(),version:a()});var op=je(require("path")),ip=je(require("fs/promises"));var la=require("node:stream");var gr=class{constructor(t,r){this.baseUrl=t;this.authenticationConverter=r}static{o(this,"BaseHttpClient")}getUrl(t){let r=new URL(`${this.baseUrl}${t.url}`),n=`${r.origin}${r.pathname}`,i=new URLSearchParams;return r.searchParams.forEach((u,c)=>{i.append(c,u)}),{urlWithoutQueryParams:n,queryParams:i}}getHeaders(t){let r={Accept:"application/json"};return t.authentication&&this.populateAuthentication(t.authentication,r),t.body&&(t.headers?.["Content-Type"]==="text/csv"?r["Content-Type"]="text/csv":r["Content-Type"]="application/json"),t.headers&&(r={...r,...t.headers}),r}populateAuthentication(t,r){this.authenticationConverter.convert(t,r)}};var yr=class{static{o(this,"DelegatingAuthenticationConverter")}constructor(t=new fn,r=new gn){this.converters={BEARER_TOKEN:t,BASIC:r}}convert(t,r){return this.converters[t.type].convert(t,r)}},fn=class{static{o(this,"BearerTokenAuthenticationConverter")}convert(t,r){return r.Authorization=`Bearer ${t.token}`,r}},gn=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 Ft=class extends Error{constructor(r,n){let i=n.status||500,u=Buffer.isBuffer(n.responseBody)?n.responseBody.toString():n.responseBody;super(JSON.stringify({response:{status:i,body:u},request:{body:r}}));this.requestBody=r;this.status=i,this.responseBody=u}static{o(this,"HttpError")}errorMessage(){return{response:{status:this.status,body:this.responseBody},request:{body:this.requestBody}}}get response(){return{status:this.status,body:this.responseBody}}get request(){return{body:this.requestBody}}};function sa({error:e,requestBody:t}){return e instanceof Ft?e.errorMessage():{response:{status:0,body:e instanceof Error?e.message:String(e)},request:{body:t}}}o(sa,"toFailsafeOutput");var hr=(c=>(c.GET="GET",c.POST="POST",c.PATCH="PATCH",c.PUT="PUT",c.DELETE="DELETE",c.HEAD="HEAD",c))(hr||{});var vr=class extends gr{static{o(this,"FetchHttpClient")}constructor(t="",r=new yr){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[F,oe]of Object.entries(c))i.append(F,oe);let l=i.toString(),f=l?`${n}?${l}`:n,g=t.responseType??"json",_=t.followRedirects??!0,I=t.retries??0,{body:x,extraHeaders:s,isStream:d}=ap(t.method)?sp(t.body,u):{body:void 0,extraHeaders:{},isStream:!1},y=cp({...u,...s}),m=await up(async()=>{let F=new AbortController,oe=t.timeout&&t.timeout>0?setTimeout(()=>F.abort(),t.timeout):void 0;try{let fe={method:t.method.toString(),headers:y,body:x,redirect:_?"follow":"manual",signal:F.signal};return d&&(fe.duplex="half"),r?.dispatcher!==void 0&&(fe.dispatcher=r.dispatcher),await fetch(f,fe)}finally{oe!==void 0&&clearTimeout(oe)}},I),v=_?300:400;if(m.status<200||m.status>=v){let F=await ua(m,g),oe=new Ft(t.body,{status:m.status,responseBody:F});throw console.error("[HttpClient#(sanitized error message)] Request failed:",oe),oe}let P=await ua(m,g);return{status:m.status,headers:lp(m.headers),body:P}}};function ap(e){return e!=="GET"&&e!=="HEAD"}o(ap,"acceptsRequestBody");function sp(e,t){if(dp(e))return{body:void 0,extraHeaders:{},isStream:!1};if(pp(e)){let n=new la.PassThrough;return e.on("error",i=>n.destroy(i)),e.pipe(n),{body:n,extraHeaders:e.getHeaders(),isStream:!0}}return typeof e=="string"||Buffer.isBuffer(e)||e instanceof URLSearchParams||e instanceof ArrayBuffer||typeof FormData<"u"&&e instanceof FormData||typeof Blob<"u"&&e instanceof Blob?{body:e,extraHeaders:{},isStream:!1}:(t["Content-Type"]??t["content-type"]??"").includes("application/x-www-form-urlencoded")?{body:new URLSearchParams(e).toString(),extraHeaders:{},isStream:!1}:{body:JSON.stringify(e),extraHeaders:{},isStream:!1}}o(sp,"serializeBody");async function ua(e,t){switch(t){case"arraybuffer":return Buffer.from(await e.arrayBuffer());case"blob":return await e.blob();case"text":return await e.text();default:{let r=await e.text();if(r.length===0)return;try{return JSON.parse(r)}catch{return r}}}}o(ua,"parseResponseBody");async function up(e,t){let r;for(let n=0;n<=t;n++)try{let i=await e();if(i.status>=500&&n<t){await ca(n);continue}return i}catch(i){if(r=i,n<t){await ca(n);continue}throw i}throw r}o(up,"sendWithRetries");function ca(e){let t=Math.min(1e3*2**e,3e4);return new Promise(r=>setTimeout(r,t))}o(ca,"backoff");function cp(e){let t={};for(let[r,n]of Object.entries(e))n!==void 0&&(t[r.toLowerCase()]=Array.isArray(n)?n.join(", "):n);return t}o(cp,"normalizeHeaders");function lp(e){let t={};return e.forEach((r,n)=>{t[n]=r}),t}o(lp,"toHttpHeaders");function pp(e){return typeof e=="object"&&e!==null&&typeof e.getHeaders=="function"&&typeof e.pipe=="function"&&typeof e.on=="function"}o(pp,"isNodeFormData");function dp(e){return e==null}o(dp,"isNil");var pt=new vr;var Qd=je(require("fs")),yu=je(gu());var em={"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 tm(e){let t=e.split(";")[0].trim().toLowerCase();return em[t]??""}o(tm,"contentTypeToExtension");var rm=o(({baseUrl:e,relativePath:t})=>{let r=e.endsWith("/")?e:`${e}/`,n=t.startsWith("/")?t.slice(1):t;return`${r}${n}`},"joinBaseUrlWithRelativePath"),nm=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 hu({auth:e,baseUrl:t,authMapping:r,description:n,displayName:i,name:u,props:c,extraProps:l,authLocation:f="headers"}){return be({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:M.DynamicProperties({auth:e,displayName:"",required:!0,refreshers:[],props:o(async({auth:g})=>({url:M.ShortText({displayName:"URL",description:`You can either use the full URL or the relative path to the base URL
|
|
3
|
+
i.e ${nm(t,g)}/resource or /resource`,required:!0,defaultValue:g?t(g):"",...c?.url??{}})}),"props")}),method:M.StaticDropdown({displayName:"Method",required:!0,options:{options:Object.values(hr).map(g=>({label:g,value:g}))},...c?.method??{}}),headers:M.Object({displayName:"Headers",description:"Authorization headers are injected automatically from your connection.",required:!0,...c?.headers??{}}),queryParams:M.Object({displayName:"Query Parameters",required:!0,...c?.queryParams??{}}),body_type:M.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:M.DynamicProperties({auth:e,displayName:"Body",refreshers:["body_type"],required:!1,props:o(async({body_type:g})=>{if(!g)return{};let _=g,I={};switch(_){case"none":break;case"json":I.data=M.Json({displayName:"JSON Body",required:!0,...c?.body??{}});break;case"raw":I.data=M.LongText({displayName:"Raw Body",required:!0});break;case"form_data":I.data=M.Array({displayName:"Form Data",required:!0,properties:{fieldName:M.ShortText({displayName:"Field Name",required:!0}),fieldType:M.StaticDropdown({displayName:"Field Type",required:!0,options:{disabled:!1,options:[{label:"Text",value:"text"},{label:"File",value:"file"}]}}),textFieldValue:M.LongText({displayName:"Text Field Value",required:!1}),fileFieldValue:M.File({displayName:"File Field Value",required:!1})}});break}return I},"props")}),response_is_binary:M.Checkbox({displayName:"Response is Binary ?",description:"Enable for files like PDFs, images, etc.",required:!1,defaultValue:!1}),failsafe:M.Checkbox({displayName:"No Error on Failure",required:!1,...c?.failsafe??{}}),timeout:M.Number({displayName:"Timeout (in seconds)",required:!1,...c?.timeout??{}}),followRedirects:M.Checkbox({displayName:"Follow redirects",required:!1,defaultValue:!1}),...l},run:o(async g=>{let{method:_,url:I,headers:x,queryParams:s,body:d,body_type:y,failsafe:m,timeout:v,response_is_binary:P,followRedirects:F}=g.propsValue;lr(_,"Method"),lr(I,"URL");let oe=ue(r)?{}:await r(g.auth,g.propsValue),fe=I.url,ke=fe.startsWith("http://")||fe.startsWith("https://")?fe:rm({baseUrl:t(g.auth),relativePath:fe}),ve={method:_,url:ke,headers:{...x??{},...f==="headers"||!ue(f)?oe:{}},queryParams:{...f==="queryParams"?oe:{},...s??{}},timeout:v?v*1e3:0,followRedirects:F};if(P&&(ve.responseType="arraybuffer"),d)if(y&&y!=="none"){let X=d.data;if(y==="form_data"){let J=X,Oe=new yu.default;for(let{fieldName:ht,fieldType:O,textFieldValue:T,fileFieldValue:b}of J)O==="text"&&!Ye(T)?Oe.append(ht,T):O==="file"&&!Ye(b)&&Oe.append(ht,b.data,{filename:b?.filename});ve.body=Oe,ve.headers={...ve.headers,...Oe.getHeaders()}}else ve.body=X}else y||(ve.body=d);try{let X=await pt.sendRequest(ve);return await om(g.files,X.body,X.status,X.headers,P)}catch(X){if(m)return sa({error:X,requestBody:ve.body});throw X}},"run")})}o(hu,"createCustomApiCallAction");var om=o(async(e,t,r,n,i)=>{let u;if(i&&im(t)){let c=Array.isArray(n?.["content-type"])?n["content-type"][0]:n?.["content-type"],l=tm(c??"")||"txt",f;t instanceof ArrayBuffer?f=Buffer.from(new Uint8Array(t)):Buffer.isBuffer(t)?f=t:f=Buffer.from(t),u=await e.write({fileName:`output.${l}`,data:f})}else u=t;return{status:r,headers:n,body:u}},"handleBinaryResponse"),im=o(e=>e instanceof ArrayBuffer||Buffer.isBuffer(e),"isBinaryBody");var ze={async poll(e,{store:t,auth:r,propsValue:n,maxItemsToPoll:i,files:u,server:c}){switch(e.strategy){case 0:{let l=await t.get("lastPoll");if(ue(l))throw new Error("lastPoll doesn't exist in the store.");let f=await e.items({store:t,auth:r,propsValue:n,lastFetchEpochMS:l,server:c}),g=f.reduce((_,I)=>Math.max(_,I.epochMilliSeconds),l);return await t.put("lastPoll",g),f.filter(_=>_.epochMilliSeconds>l).map(_=>_.data)}case 1:{let l=await t.get("lastItem"),f=await e.items({store:t,auth:r,propsValue:n,lastItemId:l,files:u,server:c}),g=f.findIndex(x=>x.id===l),_=[];ue(l)||g==-1?_=f??[]:_=f?.slice(0,g)??[],ue(i)||(_=_.slice(-i));let I=_?.[0]?.id;return ue(I)||await t.put("lastItem",I),_.map(x=>x.data)}}},async onEnable(e,{store:t,auth:r,propsValue:n,server:i}){switch(e.strategy){case 0:{await t.put("lastPoll",Date.now());break}case 1:{let c=(await e.items({store:t,auth:r,propsValue:n,lastItemId:null,server:i}))?.[0]?.id;ue(c)?await t.delete("lastItem"):await t.put("lastItem",c);break}}},async onDisable(e,t){switch(e.strategy){case 0:case 1:return}},async test(e,{auth:t,propsValue:r,store:n,files:i,server:u}){let c=[];switch(e.strategy){case 0:{c=await e.items({store:n,auth:t,propsValue:r,lastFetchEpochMS:0,server:u});break}case 1:{c=await e.items({store:n,auth:t,propsValue:r,lastItemId:null,files:i,server:u});break}}return am(c.map(l=>l.data))}};function am(e){return e.length<=5?e:e.slice(0,5)}o(am,"getFirstFiveOrAll");var pe=pn.SecretText({displayName:"API Token",description:"You can obtain your API token by navigating to [Developer Settings](https://app.onfragment.com/settings/account/developers).",required:!0,validate:o(async({auth:e})=>{try{return await pt.sendRequest({method:"GET",url:"https://api.onfragment.com/api/v1/tasks",headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json"},queryParams:{limit:"1"}}),{valid:!0}}catch{return{valid:!1,error:"Invalid API token. Please check your API token and try again."}}},"validate")});var sm="https://api.onfragment.com/api/v1",he={async makeRequest(e,t,r,n,i){let u=`${sm}${t}`;try{return(await pt.sendRequest({method:e,url:u,headers:{Authorization:`Bearer ${r.secret_text}`,"Content-Type":"application/json"},body:n,queryParams:i})).body}catch(c){let l=c.response?.body?.message||c.message||"Unknown error occurred";throw new Error(`Fragment API Error: ${l}`)}}};var vu=be({auth:pe,name:"create_task",displayName:"Create Task",description:"Creates a new task in Fragment.",audience:"both",aiMetadata:{description:"Creates a new task in Fragment with a title and optional URL, due date, assignee email, tags, and custom fields. Use to add a work item to a Fragment queue. Not idempotent: each call creates a separate task even with identical input.",idempotent:!1},props:{title:M.ShortText({displayName:"Title",description:"The title of the task",required:!0}),url:M.ShortText({displayName:"URL",description:"A URL associated with the task (e.g., link to a ticket or resource)",required:!1}),due_at:M.DateTime({displayName:"Due Date",description:"When the task is due",required:!1}),assignee:M.ShortText({displayName:"Assignee",description:"Email of the person to assign this task to.",required:!1}),tags:M.Array({displayName:"Tags",description:"Tags to categorize the task",required:!1}),custom_fields:M.Object({displayName:"Custom Fields",description:"Additional custom fields for the task",required:!1})},async run(e){let t={title:e.propsValue.title,...e.propsValue.custom_fields??{}},r={fields:t};return e.propsValue.url&&(t.url=e.propsValue.url),e.propsValue.due_at&&(r.due_at=e.propsValue.due_at),e.propsValue.assignee&&(r.assignee_email=e.propsValue.assignee),e.propsValue.tags&&Array.isArray(e.propsValue.tags)&&(r.tags=e.propsValue.tags),await he.makeRequest("POST","/tasks",e.auth,r)}});var _u=be({auth:pe,name:"update_task",displayName:"Update Task",description:"Updates an existing task.",audience:"both",aiMetadata:{description:"Updates an existing Fragment task identified by its task UID, changing any of title, URL, due date, status (TODO/STARTED/DONE), assignee email, tags, or custom fields. Only the fields you supply are modified. Idempotent: re-applying the same field values to the same task yields the same end state.",idempotent:!0},props:{task_uid:M.ShortText({displayName:"Task UID",description:"The unique identifier of the task to update",required:!0}),title:M.ShortText({displayName:"Title",description:"The updated title of the task",required:!1}),url:M.ShortText({displayName:"URL",description:"The updated URL for the task",required:!1}),due_at:M.DateTime({displayName:"Due Date",description:"The updated due date",required:!1}),status:M.StaticDropdown({displayName:"Status",description:"The status of the task",required:!1,options:{options:[{label:"TODO",value:"TODO"},{label:"STARTED",value:"STARTED"},{label:"DONE",value:"DONE"}]}}),assignee:M.ShortText({displayName:"Assignee",description:"Email of the person to assign this task to",required:!1}),tags:M.Array({displayName:"Tags",description:"Updated tags for the task",required:!1}),custom_fields:M.Object({displayName:"Custom Fields",description:"Updated custom fields",required:!1})},async run(e){let t={...e.propsValue.custom_fields??{}},r={};return e.propsValue.title&&(t.title=e.propsValue.title),e.propsValue.url&&(t.url=e.propsValue.url),e.propsValue.due_at&&(r.due_at=e.propsValue.due_at),e.propsValue.status&&(r.status=e.propsValue.status),e.propsValue.assignee&&(r.assignee_email=e.propsValue.assignee),e.propsValue.tags&&Array.isArray(e.propsValue.tags)&&(r.tags=e.propsValue.tags),Ye(t)||(r.fields=t),await he.makeRequest("PATCH",`/tasks/${e.propsValue.task_uid}`,e.auth,r)}});var xu=be({auth:pe,name:"get_task",displayName:"Get Task",description:"Retrieves details of a specific task.",audience:"both",aiMetadata:{description:"Fetches the full details of a single Fragment task by its unique task UID. Use when you already have a task identifier and need its current data. Read-only and idempotent.",idempotent:!0},props:{task_uid:M.ShortText({displayName:"Task UID",description:"The unique identifier of the task to retrieve",required:!0})},async run(e){return await he.makeRequest("GET",`/tasks/${e.propsValue.task_uid}`,e.auth)}});var Pu=be({auth:pe,name:"list_tasks",displayName:"List Tasks",description:"Retrieves a list of tasks from.",audience:"both",aiMetadata:{description:"Lists tasks from Fragment, optionally filtered by status (TODO/STARTED/DONE) and assignee, and capped by a limit (default 50). Omit the filters to return recent tasks across all statuses. Use to discover task UIDs or survey tasks before acting on them. Read-only and idempotent.",idempotent:!0},props:{status:M.StaticDropdown({displayName:"Status",description:"Filter tasks by status",required:!1,options:{options:[{label:"TODO",value:"TODO"},{label:"STARTED",value:"STARTED"},{label:"DONE",value:"DONE"}]}}),assignee:M.ShortText({displayName:"Assignee",description:"Filter tasks by assignee email or ID",required:!1}),limit:M.Number({displayName:"Limit",description:"Maximum number of tasks to return (default: 50)",required:!1,defaultValue:50})},async run(e){let t={};return e.propsValue.status&&(t.status=e.propsValue.status),e.propsValue.assignee&&(t.assignee_uid=e.propsValue.assignee),e.propsValue.limit!==void 0&&(t.limit=e.propsValue.limit.toString()),await he.makeRequest("GET","/tasks",e.auth,void 0,t)}});var bu=be({auth:pe,name:"delete_task",displayName:"Delete Task",description:"Deletes an existing task.",audience:"both",aiMetadata:{description:"Permanently deletes a Fragment task identified by its unique task UID. Use to remove a task; this is destructive and cannot be undone. Effectively idempotent: re-deleting an already-removed task has no further effect, though the API may return a not-found error.",idempotent:!0},props:{task_uid:M.ShortText({displayName:"Task UID",description:"The unique identifier of the task to delete",required:!0})},async run(e){return await he.makeRequest("DELETE",`/tasks/${e.propsValue.task_uid}`,e.auth)}});var Tu=hu({auth:pe,name:"custom_api_call",displayName:"Custom API Call",description:"Make a custom API call to any Fragment endpoint",baseUrl:o(()=>"https://api.onfragment.com/api/v1","baseUrl"),authMapping:o(async e=>({Authorization:`Bearer ${e}`,"Content-Type":"application/json"}),"authMapping")});var Ln=je(Mn());var Ar={strategy:0,items:o(async({auth:e,lastFetchEpochMS:t})=>{let r=t>0,n={order_by:"created_at",limit:r?"10":"100"};return r||(n.created_at_after=(0,Ln.default)(t).toISOString()),(await he.makeRequest("GET","/tasks",e,void 0,n)).items.map(c=>({epochMilliSeconds:(0,Ln.default)(c.created_at).valueOf(),data:c}))},"items")},Iu=mr({auth:pe,name:"new_task",displayName:"New Task",description:"Triggers when a new task is created.",aiMetadata:{description:"Fires when a new task is created in Fragment, emitting the newly created task. Polls for tasks ordered by creation time, so each run yields tasks added since the last check."},props:{},type:"POLLING",async onEnable(e){await ze.onEnable(Ar,{auth:e.auth,store:e.store,propsValue:e.propsValue})},async onDisable(e){await ze.onDisable(Ar,{auth:e.auth,store:e.store,propsValue:e.propsValue})},async test(e){return await ze.test(Ar,e)},async run(e){return await ze.poll(Ar,e)},sampleData:{uid:"3c90c3cc-0d44-4b50-8888-8dd25736052a",archived:!0,status:"TODO",legacy_data:{},skills:["3c90c3cc-0d44-4b50-8888-8dd25736052a"],queue_uid:"3c90c3cc-0d44-4b50-8888-8dd25736052a",assignee_uid:"3c90c3cc-0d44-4b50-8888-8dd25736052a",participants:{},case_uid:"3c90c3cc-0d44-4b50-8888-8dd25736052a",parent_uid:"3c90c3cc-0d44-4b50-8888-8dd25736052a",due_at:"2023-11-07T05:31:56Z",snooze_expires_at:"2023-11-07T05:31:56Z",fields:{},metadata_form_uid:"3c90c3cc-0d44-4b50-8888-8dd25736052a",form_data:{},form_type:"<string>",assigned_at:"2023-11-07T05:31:56Z",started_at:"2023-11-07T05:31:56Z",done_at:"2023-11-07T05:31:56Z",created_at:"2023-11-07T05:31:56Z",updated_at:"2023-11-07T05:31:56Z",assignee_updated_by:"3c90c3cc-0d44-4b50-8888-8dd25736052a",queue_updated_by:"3c90c3cc-0d44-4b50-8888-8dd25736052a",is_assigned_player:!0,internal_created_at:"2023-11-07T05:31:56Z",internal_updated_at:"2023-11-07T05:31:56Z",external_created_at:"2023-11-07T05:31:56Z",external_updated_at:"2023-11-07T05:31:56Z",external_status:"TODO",external_status_updated_at:"2023-11-07T05:31:56Z",external_assignee_uid:"3c90c3cc-0d44-4b50-8888-8dd25736052a",queue_time:123,queue_time_business:123,work_time:123,work_time_business:123,incremental_work_time:123,incremental_work_time_business:123,resolution_time:123,resolution_time_business:123,num_children:123,num_children_done:123,sla_breach_at:"2023-11-07T05:31:56Z",sla_breach_business_at:"2023-11-07T05:31:56Z",wait_time:123,wait_time_business:123,review_status:"<string>",task_type:"<string>",played_at:"2023-11-07T05:31:56Z",assignee:{uid:"3c90c3cc-0d44-4b50-8888-8dd25736052a",archived:!0,role:"super_admin",email:"jsmith@example.com",first_name:"<string>",last_name:"<string>",skills:["3c90c3cc-0d44-4b50-8888-8dd25736052a"],legacy_data:{},created_at:"2023-11-07T05:31:56Z",updated_at:"2023-11-07T05:31:56Z",is_registered:!0},parent:{},children:[{}]}});var jn=je(Mn());var zr={strategy:0,items:o(async({auth:e,lastFetchEpochMS:t})=>{let r=t>0,n={order_by:"updated_at",limit:r?"10":"100"};return r||(n.updated_at_after=(0,jn.default)(t).toISOString()),(await he.makeRequest("GET","/tasks",e,void 0,n)).items.map(c=>({epochMilliSeconds:(0,jn.default)(c.updated_at).valueOf(),data:c}))},"items")},Eu=mr({auth:pe,name:"task_updated",displayName:"Task Updated",description:"Triggers when a task is updated.",aiMetadata:{description:"Fires when an existing Fragment task is modified, emitting the updated task. Polls for tasks ordered by update time, so each run yields tasks changed since the last check; it also fires for newly created tasks since creation counts as an update."},props:{},type:"POLLING",async onEnable(e){await ze.onEnable(zr,{auth:e.auth,store:e.store,propsValue:e.propsValue})},async onDisable(e){await ze.onDisable(zr,{auth:e.auth,store:e.store,propsValue:e.propsValue})},async test(e){return await ze.test(zr,e)},async run(e){return await ze.poll(zr,e)},sampleData:{uid:"3c90c3cc-0d44-4b50-8888-8dd25736052a",archived:!0,status:"TODO",legacy_data:{},skills:["3c90c3cc-0d44-4b50-8888-8dd25736052a"],queue_uid:"3c90c3cc-0d44-4b50-8888-8dd25736052a",assignee_uid:"3c90c3cc-0d44-4b50-8888-8dd25736052a",participants:{},case_uid:"3c90c3cc-0d44-4b50-8888-8dd25736052a",parent_uid:"3c90c3cc-0d44-4b50-8888-8dd25736052a",due_at:"2023-11-07T05:31:56Z",snooze_expires_at:"2023-11-07T05:31:56Z",fields:{},metadata_form_uid:"3c90c3cc-0d44-4b50-8888-8dd25736052a",form_data:{},form_type:"<string>",assigned_at:"2023-11-07T05:31:56Z",started_at:"2023-11-07T05:31:56Z",done_at:"2023-11-07T05:31:56Z",created_at:"2023-11-07T05:31:56Z",updated_at:"2023-11-07T05:31:56Z",assignee_updated_by:"3c90c3cc-0d44-4b50-8888-8dd25736052a",queue_updated_by:"3c90c3cc-0d44-4b50-8888-8dd25736052a",is_assigned_player:!0,internal_created_at:"2023-11-07T05:31:56Z",internal_updated_at:"2023-11-07T05:31:56Z",external_created_at:"2023-11-07T05:31:56Z",external_updated_at:"2023-11-07T05:31:56Z",external_status:"TODO",external_status_updated_at:"2023-11-07T05:31:56Z",external_assignee_uid:"3c90c3cc-0d44-4b50-8888-8dd25736052a",queue_time:123,queue_time_business:123,work_time:123,work_time_business:123,incremental_work_time:123,incremental_work_time_business:123,resolution_time:123,resolution_time_business:123,num_children:123,num_children_done:123,sla_breach_at:"2023-11-07T05:31:56Z",sla_breach_business_at:"2023-11-07T05:31:56Z",wait_time:123,wait_time_business:123,review_status:"<string>",task_type:"<string>",played_at:"2023-11-07T05:31:56Z",assignee:{uid:"3c90c3cc-0d44-4b50-8888-8dd25736052a",archived:!0,role:"super_admin",email:"jsmith@example.com",first_name:"<string>",last_name:"<string>",skills:["3c90c3cc-0d44-4b50-8888-8dd25736052a"],legacy_data:{},created_at:"2023-11-07T05:31:56Z",updated_at:"2023-11-07T05:31:56Z",is_registered:!0},parent:{},children:[{}]}});var cm=ta({displayName:"Fragment",auth:pe,minimumSupportedRelease:"0.36.1",logoUrl:"https://cdn.activepieces.com/pieces/fragment.png",authors:["meenulekha-premakumar"],actions:[vu,_u,xu,Pu,bu,Tu],triggers:[Iu,Eu]});0&&(module.exports={fragment});
|
|
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":"AAWA,eAAO,MAAM,QAAQ,mHAkBnB,CAAC"}
|
package/src/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,qEAA6D;AAC7D,yCAA4C;AAC5C,2DAAuD;AACvD,2DAAuD;AACvD,qDAAiD;AACjD,yDAAqD;AACrD,2DAAuD;AACvD,mEAA8D;AAC9D,sDAAyD;AACzD,8DAAiE;AAEpD,QAAA,QAAQ,GAAG,IAAA,8BAAW,EAAC;IAClC,WAAW,EAAE,UAAU;IACvB,IAAI,EAAE,qBAAY;IAClB,uBAAuB,EAAE,QAAQ;IACjC,OAAO,EAAE,kDAAkD;IAC3D,OAAO,EAAE,CAAC,uBAAuB,CAAC;IAClC,OAAO,EAAE;QACP,wBAAU;QACV,wBAAU;QACV,kBAAO;QACP,sBAAS;QACT,wBAAU;QACV,+BAAa;KACd;IACD,QAAQ,EAAE;QACR,yBAAc;QACd,iCAAkB;KACnB;CACF,CAAC,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export declare const createTask: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
|
|
2
|
-
title: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
-
url: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
4
|
-
due_at: import("@activepieces/pieces-framework").DateTimeProperty<false>;
|
|
5
|
-
assignee: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
6
|
-
tags: import("@activepieces/pieces-framework").ArrayProperty<false>;
|
|
7
|
-
custom_fields: import("@activepieces/pieces-framework").ObjectProperty<false>;
|
|
8
|
-
}>;
|
|
9
|
-
//# sourceMappingURL=create-task.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-task.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/create-task.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,UAAU;;;;;;;EAmErB,CAAC"}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createTask = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
-
const auth_1 = require("../common/auth");
|
|
7
|
-
const client_1 = require("../common/client");
|
|
8
|
-
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
9
|
-
exports.createTask = (0, pieces_framework_1.createAction)({
|
|
10
|
-
auth: auth_1.fragmentAuth,
|
|
11
|
-
name: 'create_task',
|
|
12
|
-
displayName: 'Create Task',
|
|
13
|
-
description: 'Creates a new task in Fragment.',
|
|
14
|
-
audience: 'both',
|
|
15
|
-
aiMetadata: { description: 'Creates a new task in Fragment with a title and optional URL, due date, assignee email, tags, and custom fields. Use to add a work item to a Fragment queue. Not idempotent: each call creates a separate task even with identical input.', idempotent: false },
|
|
16
|
-
props: {
|
|
17
|
-
title: pieces_framework_1.Property.ShortText({
|
|
18
|
-
displayName: 'Title',
|
|
19
|
-
description: 'The title of the task',
|
|
20
|
-
required: true,
|
|
21
|
-
}),
|
|
22
|
-
url: pieces_framework_1.Property.ShortText({
|
|
23
|
-
displayName: 'URL',
|
|
24
|
-
description: 'A URL associated with the task (e.g., link to a ticket or resource)',
|
|
25
|
-
required: false,
|
|
26
|
-
}),
|
|
27
|
-
due_at: pieces_framework_1.Property.DateTime({
|
|
28
|
-
displayName: 'Due Date',
|
|
29
|
-
description: 'When the task is due',
|
|
30
|
-
required: false,
|
|
31
|
-
}),
|
|
32
|
-
assignee: pieces_framework_1.Property.ShortText({
|
|
33
|
-
displayName: 'Assignee',
|
|
34
|
-
description: 'Email of the person to assign this task to.',
|
|
35
|
-
required: false,
|
|
36
|
-
}),
|
|
37
|
-
tags: pieces_framework_1.Property.Array({
|
|
38
|
-
displayName: 'Tags',
|
|
39
|
-
description: 'Tags to categorize the task',
|
|
40
|
-
required: false,
|
|
41
|
-
}),
|
|
42
|
-
custom_fields: pieces_framework_1.Property.Object({
|
|
43
|
-
displayName: 'Custom Fields',
|
|
44
|
-
description: 'Additional custom fields for the task',
|
|
45
|
-
required: false,
|
|
46
|
-
}),
|
|
47
|
-
},
|
|
48
|
-
run(context) {
|
|
49
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
50
|
-
var _a;
|
|
51
|
-
const fields = Object.assign({ title: context.propsValue.title }, ((_a = context.propsValue.custom_fields) !== null && _a !== void 0 ? _a : {}));
|
|
52
|
-
const taskPayload = {
|
|
53
|
-
fields,
|
|
54
|
-
};
|
|
55
|
-
if (context.propsValue.url) {
|
|
56
|
-
fields['url'] = context.propsValue.url;
|
|
57
|
-
}
|
|
58
|
-
if (context.propsValue.due_at) {
|
|
59
|
-
taskPayload['due_at'] = context.propsValue.due_at;
|
|
60
|
-
}
|
|
61
|
-
if (context.propsValue.assignee) {
|
|
62
|
-
taskPayload['assignee_email'] = context.propsValue.assignee;
|
|
63
|
-
}
|
|
64
|
-
if (context.propsValue.tags && Array.isArray(context.propsValue.tags)) {
|
|
65
|
-
taskPayload['tags'] = context.propsValue.tags;
|
|
66
|
-
}
|
|
67
|
-
const response = yield client_1.fragmentClient.makeRequest(pieces_common_1.HttpMethod.POST, '/tasks', context.auth, taskPayload);
|
|
68
|
-
return response;
|
|
69
|
-
});
|
|
70
|
-
},
|
|
71
|
-
});
|
|
72
|
-
//# sourceMappingURL=create-task.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-task.js","sourceRoot":"","sources":["../../../../src/lib/actions/create-task.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,yCAA8C;AAC9C,6CAAkD;AAClD,+DAAyD;AAE5C,QAAA,UAAU,GAAG,IAAA,+BAAY,EAAC;IACtC,IAAI,EAAE,mBAAY;IAClB,IAAI,EAAE,aAAa;IACnB,WAAW,EAAE,aAAa;IAC1B,WAAW,EAAE,iCAAiC;IAC9C,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE,EAAE,WAAW,EAAE,2OAA2O,EAAE,UAAU,EAAE,KAAK,EAAE;IAC3R,KAAK,EAAE;QACN,KAAK,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACzB,WAAW,EAAE,OAAO;YACpB,WAAW,EAAE,uBAAuB;YACpC,QAAQ,EAAE,IAAI;SACd,CAAC;QACF,GAAG,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACvB,WAAW,EAAE,KAAK;YAClB,WAAW,EAAE,qEAAqE;YAClF,QAAQ,EAAE,KAAK;SACf,CAAC;QACF,MAAM,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YACzB,WAAW,EAAE,UAAU;YACvB,WAAW,EAAE,sBAAsB;YACnC,QAAQ,EAAE,KAAK;SACf,CAAC;QACF,QAAQ,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC5B,WAAW,EAAE,UAAU;YACvB,WAAW,EAAE,6CAA6C;YAC1D,QAAQ,EAAE,KAAK;SACf,CAAC;QACF,IAAI,EAAE,2BAAQ,CAAC,KAAK,CAAC;YACpB,WAAW,EAAE,MAAM;YACnB,WAAW,EAAE,6BAA6B;YAC1C,QAAQ,EAAE,KAAK;SACf,CAAC;QACF,aAAa,EAAE,2BAAQ,CAAC,MAAM,CAAC;YAC9B,WAAW,EAAE,eAAe;YAC5B,WAAW,EAAE,uCAAuC;YACpD,QAAQ,EAAE,KAAK;SACf,CAAC;KACF;IACK,GAAG,CAAC,OAAO;;;YAChB,MAAM,MAAM,mBACX,KAAK,EAAE,OAAO,CAAC,UAAU,CAAC,KAAK,IAC5B,CAAC,MAAA,OAAO,CAAC,UAAU,CAAC,aAAa,mCAAI,EAAE,CAAC,CAC3C,CAAC;YAEF,MAAM,WAAW,GAAwB;gBACxC,MAAM;aACN,CAAC;YAEF,IAAI,OAAO,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC;gBAC5B,MAAM,CAAC,KAAK,CAAC,GAAG,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC;YACxC,CAAC;YACD,IAAI,OAAO,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC;gBAC/B,WAAW,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC;YACnD,CAAC;YAED,IAAI,OAAO,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC;gBACjC,WAAW,CAAC,gBAAgB,CAAC,GAAG,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC;YAC7D,CAAC;YACD,IAAI,OAAO,CAAC,UAAU,CAAC,IAAI,IAAI,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;gBACvE,WAAW,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC;YAC/C,CAAC;YAED,MAAM,QAAQ,GAAG,MAAM,uBAAc,CAAC,WAAW,CAAC,0BAAU,CAAC,IAAI,EAAE,QAAQ,EAAE,OAAO,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;YAExG,OAAO,QAAQ,CAAC;QACjB,CAAC;KAAA;CACD,CAAC,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export declare const customApiCall: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
|
|
2
|
-
url: import("@activepieces/pieces-framework").DynamicProperties<true, import("@activepieces/pieces-framework").SecretTextProperty<true> | undefined>;
|
|
3
|
-
method: import("@activepieces/pieces-framework").StaticDropdownProperty<import("@activepieces/pieces-common").HttpMethod, false> | import("@activepieces/pieces-framework").StaticDropdownProperty<import("@activepieces/pieces-common").HttpMethod, true>;
|
|
4
|
-
headers: import("@activepieces/pieces-framework").ObjectProperty<false> | import("@activepieces/pieces-framework").ObjectProperty<true>;
|
|
5
|
-
queryParams: import("@activepieces/pieces-framework").ObjectProperty<false> | import("@activepieces/pieces-framework").ObjectProperty<true>;
|
|
6
|
-
body_type: import("@activepieces/pieces-framework").StaticDropdownProperty<string, false>;
|
|
7
|
-
body: import("@activepieces/pieces-framework").DynamicProperties<false, import("@activepieces/pieces-framework").SecretTextProperty<true> | undefined>;
|
|
8
|
-
response_is_binary: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
9
|
-
failsafe: import("@activepieces/pieces-framework").CheckboxProperty<false> | import("@activepieces/pieces-framework").CheckboxProperty<true>;
|
|
10
|
-
timeout: import("@activepieces/pieces-framework").NumberProperty<false> | import("@activepieces/pieces-framework").NumberProperty<true>;
|
|
11
|
-
followRedirects: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
12
|
-
}>;
|
|
13
|
-
//# sourceMappingURL=custom-api-call.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"custom-api-call.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/custom-api-call.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,aAAa;;;oBAY46C,gCAAgC,iCAAiC,gCAAgC;wBAAgD,gCAAgC,iCAAiC,gCAAgC;;;+BAAiN,gCAAgC;qBAAgD,gCAAgC,mCAAmC,gCAAgC;oBAA8C,gCAAgC,iCAAiC,gCAAgC;4BAAoD,gCAAgC;EAF7xE,CAAC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.customApiCall = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
6
|
-
const auth_1 = require("../common/auth");
|
|
7
|
-
exports.customApiCall = (0, pieces_common_1.createCustomApiCallAction)({
|
|
8
|
-
auth: auth_1.fragmentAuth,
|
|
9
|
-
name: 'custom_api_call',
|
|
10
|
-
displayName: 'Custom API Call',
|
|
11
|
-
description: 'Make a custom API call to any Fragment endpoint',
|
|
12
|
-
baseUrl: () => 'https://api.onfragment.com/api/v1',
|
|
13
|
-
authMapping: (auth) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
14
|
-
return ({
|
|
15
|
-
'Authorization': `Bearer ${auth}`,
|
|
16
|
-
'Content-Type': 'application/json',
|
|
17
|
-
});
|
|
18
|
-
}),
|
|
19
|
-
});
|
|
20
|
-
//# sourceMappingURL=custom-api-call.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"custom-api-call.js","sourceRoot":"","sources":["../../../../src/lib/actions/custom-api-call.ts"],"names":[],"mappings":";;;;AAAA,+DAAwE;AACxE,yCAA8C;AAEjC,QAAA,aAAa,GAAG,IAAA,yCAAyB,EAAC;IACrD,IAAI,EAAE,mBAAY;IAClB,IAAI,EAAE,iBAAiB;IACvB,WAAW,EAAE,iBAAiB;IAC9B,WAAW,EAAE,iDAAiD;IAC9D,OAAO,EAAE,GAAG,EAAE,CAAC,mCAAmC;IAClD,WAAW,EAAE,CAAO,IAAI,EAAE,EAAE;QAAC,OAAA,CAAC;YAC5B,eAAe,EAAE,UAAU,IAAI,EAAE;YACjC,cAAc,EAAE,kBAAkB;SACnC,CAAC,CAAA;MAAA;CACH,CAAC,CAAC"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export declare const deleteTask: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
|
|
2
|
-
task_uid: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
-
}>;
|
|
4
|
-
//# sourceMappingURL=delete-task.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"delete-task.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/delete-task.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,UAAU;;EAuBrB,CAAC"}
|