@activepieces/piece-moxie-crm 0.1.4 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,27 +1,11 @@
1
1
  {
2
2
  "name": "@activepieces/piece-moxie-crm",
3
- "version": "0.1.4",
4
- "dependencies": {
5
- "@sinclair/typebox": "0.34.11",
6
- "ai": "^6.0.0",
7
- "axios": "1.13.5",
8
- "axios-retry": "4.4.1",
9
- "deepmerge-ts": "7.1.0",
10
- "form-data": "4.0.4",
11
- "mime-types": "2.1.35",
12
- "nanoid": "3.3.8",
13
- "semver": "7.6.0",
14
- "socket.io-client": "4.8.1",
15
- "zod": "4.1.13",
16
- "@activepieces/pieces-common": "0.11.6",
17
- "@activepieces/pieces-framework": "0.25.4",
18
- "@activepieces/shared": "0.37.0",
19
- "tslib": "2.6.2"
20
- },
21
- "resolutions": {
22
- "rollup": "npm:@rollup/wasm-node"
23
- },
24
- "types": "./src/index.d.ts",
3
+ "version": "0.1.6",
25
4
  "main": "./src/index.js",
26
- "type": "commonjs"
5
+ "dependencies": {},
6
+ "files": [
7
+ "src/index.js",
8
+ "package.json",
9
+ "src/i18n"
10
+ ]
27
11
  }
package/src/index.js CHANGED
@@ -1,59 +1,30 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.moxieCrm = exports.moxieCRMAuth = void 0;
4
- const tslib_1 = require("tslib");
5
- const pieces_common_1 = require("@activepieces/pieces-common");
6
- const pieces_framework_1 = require("@activepieces/pieces-framework");
7
- const shared_1 = require("@activepieces/shared");
8
- const create_client_1 = require("./lib/actions/create-client");
9
- const create_project_1 = require("./lib/actions/create-project");
10
- const create_task_1 = require("./lib/actions/create-task");
11
- const triggers_1 = require("./lib/triggers");
12
- exports.moxieCRMAuth = pieces_framework_1.PieceAuth.CustomAuth({
13
- required: true,
14
- description: `
1
+ "use strict";var Fs=Object.create;var Xe=Object.defineProperty;var Bs=Object.getOwnPropertyDescriptor;var Zs=Object.getOwnPropertyNames;var Vs=Object.getPrototypeOf,Hs=Object.prototype.hasOwnProperty;var o=(e,t)=>Xe(e,"name",{value:t,configurable:!0});var S=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),fn=(e,t)=>{for(var r in t)Xe(e,r,{get:t[r],enumerable:!0})},gn=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Zs(t))!Hs.call(e,i)&&i!==r&&Xe(e,i,{get:()=>t[i],enumerable:!(n=Bs(t,i))||n.enumerable});return e};var Re=(e,t,r)=>(r=e!=null?Fs(Vs(e)):{},gn(t||!e||!e.__esModule?Xe(r,"default",{value:e,enumerable:!0}):r,e)),qs=e=>gn(Xe({},"__esModule",{value:!0}),e);var Ro=S((Oo,Lt)=>{(function(e){"use strict";let t="(0?\\d+|0x[a-f0-9]+)",r={fourOctet:new RegExp(`^${t}\\.${t}\\.${t}\\.${t}$`,"i"),threeOctet:new RegExp(`^${t}\\.${t}\\.${t}$`,"i"),twoOctet:new RegExp(`^${t}\\.${t}$`,"i"),longValue:new RegExp(`^${t}$`,"i")},n=new RegExp("^0[0-7]+$","i"),i=new RegExp("^0x[a-f0-9]+$","i"),u="%[0-9a-z]{1,}",c="(?:[0-9a-f]+::?)+",d={zoneIndex:new RegExp(u,"i"),native:new RegExp(`^(::)?(${c})?([0-9a-f]+)?(::)?(${u})?$`,"i"),deprecatedTransitional:new RegExp(`^(?:::)(${t}\\.${t}\\.${t}\\.${t}(${u})?)$`,"i"),transitional:new RegExp(`^((?:${c})|(?:::)(?:${c})?)${t}\\.${t}\\.${t}\\.${t}(${u})?$`,"i")};function f(s,p){if(s.indexOf("::")!==s.lastIndexOf("::"))return null;let g=0,m=-1,v=(s.match(d.zoneIndex)||[])[0],P,j;for(v&&(v=v.substring(1),s=s.replace(/%.+$/,""));(m=s.indexOf(":",m+1))>=0;)g++;if(s.substr(0,2)==="::"&&g--,s.substr(-2,2)==="::"&&g--,g>p)return null;for(j=p-g,P=":";j--;)P+="0:";return s=s.replace("::",P),s[0]===":"&&(s=s.slice(1)),s[s.length-1]===":"&&(s=s.slice(0,-1)),p=function(){let te=s.split(":"),ie=[];for(let Je=0;Je<te.length;Je++)ie.push(parseInt(te[Je],16));return ie}(),{parts:p,zoneId:v}}o(f,"expandIPv6");function h(s,p,g,m){if(s.length!==p.length)throw new Error("ipaddr: cannot match CIDR for objects with different lengths");let v=0,P;for(;m>0;){if(P=g-m,P<0&&(P=0),s[v]>>P!==p[v]>>P)return!1;m-=g,v+=1}return!0}o(h,"matchCIDR");function _(s){if(i.test(s))return parseInt(s,16);if(s[0]==="0"&&!isNaN(parseInt(s[1],10))){if(n.test(s))return parseInt(s,8);throw new Error(`ipaddr: cannot parse ${s} as octal`)}return parseInt(s,10)}o(_,"parseIntAuto");function I(s,p){for(;s.length<p;)s=`0${s}`;return s}o(I,"padPart");let x={};x.IPv4=function(){function s(p){if(p.length!==4)throw new Error("ipaddr: ipv4 octet count should be 4");let g,m;for(g=0;g<p.length;g++)if(m=p[g],!(0<=m&&m<=255))throw new Error("ipaddr: ipv4 octet should fit in 8 bits");this.octets=p}return o(s,"IPv4"),s.prototype.SpecialRanges={unspecified:[[new s([0,0,0,0]),8]],broadcast:[[new s([255,255,255,255]),32]],multicast:[[new s([224,0,0,0]),4]],linkLocal:[[new s([169,254,0,0]),16]],loopback:[[new s([127,0,0,0]),8]],carrierGradeNat:[[new s([100,64,0,0]),10]],private:[[new s([10,0,0,0]),8],[new s([172,16,0,0]),12],[new s([192,168,0,0]),16]],reserved:[[new s([192,0,0,0]),24],[new s([192,0,2,0]),24],[new s([192,88,99,0]),24],[new s([198,18,0,0]),15],[new s([198,51,100,0]),24],[new s([203,0,113,0]),24],[new s([240,0,0,0]),4]],as112:[[new s([192,175,48,0]),24],[new s([192,31,196,0]),24]],amt:[[new s([192,52,193,0]),24]]},s.prototype.kind=function(){return"ipv4"},s.prototype.match=function(p,g){let m;if(g===void 0&&(m=p,p=m[0],g=m[1]),p.kind()!=="ipv4")throw new Error("ipaddr: cannot match ipv4 address with non-ipv4 one");return h(this.octets,p.octets,8,g)},s.prototype.prefixLengthFromSubnetMask=function(){let p=0,g=!1,m={0:8,128:7,192:6,224:5,240:4,248:3,252:2,254:1,255:0},v,P,j;for(v=3;v>=0;v-=1)if(P=this.octets[v],P in m){if(j=m[P],g&&j!==0)return null;j!==8&&(g=!0),p+=j}else return null;return 32-p},s.prototype.range=function(){return x.subnetMatch(this,this.SpecialRanges)},s.prototype.toByteArray=function(){return this.octets.slice(0)},s.prototype.toIPv4MappedAddress=function(){return x.IPv6.parse(`::ffff:${this.toString()}`)},s.prototype.toNormalizedString=function(){return this.toString()},s.prototype.toString=function(){return this.octets.join(".")},s}(),x.IPv4.broadcastAddressFromCIDR=function(s){try{let p=this.parseCIDR(s),g=p[0].toByteArray(),m=this.subnetMaskFromPrefixLength(p[1]).toByteArray(),v=[],P=0;for(;P<4;)v.push(parseInt(g[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 p=s.match(/^(.+)\/(\d+)$/);return!x.IPv4.isValidCIDR(s)||!p?!1:x.IPv4.isValidFourPartDecimal(p[1])},x.IPv4.networkAddressFromCIDR=function(s){let p,g,m,v,P;try{for(p=this.parseCIDR(s),m=p[0].toByteArray(),P=this.subnetMaskFromPrefixLength(p[1]).toByteArray(),v=[],g=0;g<4;)v.push(parseInt(m[g],10)&parseInt(P[g],10)),g++;return new this(v)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},x.IPv4.parse=function(s){let p=this.parser(s);if(p===null)throw new Error("ipaddr: string is not formatted like an IPv4 Address");return new this(p)},x.IPv4.parseCIDR=function(s){let p;if(p=s.match(/^(.+)\/(\d+)$/)){let g=parseInt(p[2]);if(g>=0&&g<=32){let m=[this.parse(p[1]),g];return Object.defineProperty(m,"toString",{value:o(function(){return this.join("/")},"value")}),m}}throw new Error("ipaddr: string is not formatted like an IPv4 CIDR range")},x.IPv4.parser=function(s){let p,g,m;if(p=s.match(r.fourOctet))return function(){let v=p.slice(1,6),P=[];for(let j=0;j<v.length;j++)g=v[j],P.push(_(g));return P}();if(p=s.match(r.longValue)){if(m=_(p[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(p=s.match(r.twoOctet))?function(){let v=p.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}():(p=s.match(r.threeOctet))?function(){let v=p.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 p=[0,0,0,0],g=0,m=Math.floor(s/8);for(;g<m;)p[g]=255,g++;return m<4&&(p[m]=Math.pow(2,s%8)-1<<8-s%8),new this(p)},x.IPv6=function(){function s(p,g){let m,v;if(p.length===16)for(this.parts=[],m=0;m<=14;m+=2)this.parts.push(p[m]<<8|p[m+1]);else if(p.length===8)this.parts=p;else throw new Error("ipaddr: ipv6 part count should be 8 or 16");for(m=0;m<this.parts.length;m++)if(v=this.parts[m],!(0<=v&&v<=65535))throw new Error("ipaddr: ipv6 part should fit in 16 bits");g&&(this.zoneId=g)}return o(s,"IPv6"),s.prototype.SpecialRanges={unspecified:[new s([0,0,0,0,0,0,0,0]),128],linkLocal:[new s([65152,0,0,0,0,0,0,0]),10],multicast:[new s([65280,0,0,0,0,0,0,0]),8],loopback:[new s([0,0,0,0,0,0,0,1]),128],uniqueLocal:[new s([64512,0,0,0,0,0,0,0]),7],ipv4Mapped:[new s([0,0,0,0,0,65535,0,0]),96],discard:[new s([256,0,0,0,0,0,0,0]),64],rfc6145:[new s([0,0,0,0,65535,0,0,0]),96],rfc6052:[new s([100,65435,0,0,0,0,0,0]),96],"6to4":[new s([8194,0,0,0,0,0,0,0]),16],teredo:[new s([8193,0,0,0,0,0,0,0]),32],benchmarking:[new s([8193,2,0,0,0,0,0,0]),48],amt:[new s([8193,3,0,0,0,0,0,0]),32],as112v6:[[new s([8193,4,274,0,0,0,0,0]),48],[new s([9760,79,32768,0,0,0,0,0]),48]],deprecated:[new s([8193,16,0,0,0,0,0,0]),28],orchid2:[new s([8193,32,0,0,0,0,0,0]),28],droneRemoteIdProtocolEntityTags:[new s([8193,48,0,0,0,0,0,0]),28],reserved:[[new s([8193,0,0,0,0,0,0,0]),23],[new s([8193,3512,0,0,0,0,0,0]),32]]},s.prototype.isIPv4MappedAddress=function(){return this.range()==="ipv4Mapped"},s.prototype.kind=function(){return"ipv6"},s.prototype.match=function(p,g){let m;if(g===void 0&&(m=p,p=m[0],g=m[1]),p.kind()!=="ipv6")throw new Error("ipaddr: cannot match ipv6 address with non-ipv6 one");return h(this.parts,p.parts,16,g)},s.prototype.prefixLengthFromSubnetMask=function(){let p=0,g=!1,m={0:16,32768:15,49152:14,57344:13,61440:12,63488:11,64512:10,65024:9,65280:8,65408:7,65472:6,65504:5,65520:4,65528:3,65532:2,65534:1,65535:0},v,P;for(let j=7;j>=0;j-=1)if(v=this.parts[j],v in m){if(P=m[v],g&&P!==0)return null;P!==16&&(g=!0),p+=P}else return null;return 128-p},s.prototype.range=function(){return x.subnetMatch(this,this.SpecialRanges)},s.prototype.toByteArray=function(){let p,g=[],m=this.parts;for(let v=0;v<m.length;v++)p=m[v],g.push(p>>8),g.push(p&255);return g},s.prototype.toFixedLengthString=function(){let p=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(":"),g="";return this.zoneId&&(g=`%${this.zoneId}`),p+g},s.prototype.toIPv4Address=function(){if(!this.isIPv4MappedAddress())throw new Error("ipaddr: trying to convert a generic ipv6 address to ipv4");let p=this.parts.slice(-2),g=p[0],m=p[1];return new x.IPv4([g>>8,g&255,m>>8,m&255])},s.prototype.toNormalizedString=function(){let p=function(){let m=[];for(let v=0;v<this.parts.length;v++)m.push(this.parts[v].toString(16));return m}.call(this).join(":"),g="";return this.zoneId&&(g=`%${this.zoneId}`),p+g},s.prototype.toRFC5952String=function(){let p=/((^|:)(0(:|$)){2,})/g,g=this.toNormalizedString(),m=0,v=-1,P;for(;P=p.exec(g);)P[0].length>v&&(m=P.index,v=P[0].length);return v<0?g:`${g.substring(0,m)}::${g.substring(m+v)}`},s.prototype.toString=function(){return this.toRFC5952String()},s}(),x.IPv6.broadcastAddressFromCIDR=function(s){try{let p=this.parseCIDR(s),g=p[0].toByteArray(),m=this.subnetMaskFromPrefixLength(p[1]).toByteArray(),v=[],P=0;for(;P<16;)v.push(parseInt(g[P],10)|parseInt(m[P],10)^255),P++;return new this(v)}catch(p){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${p})`)}},x.IPv6.isIPv6=function(s){return this.parser(s)!==null},x.IPv6.isValid=function(s){if(typeof s=="string"&&s.indexOf(":")===-1)return!1;try{let p=this.parser(s);return new this(p.parts,p.zoneId),!0}catch{return!1}},x.IPv6.isValidCIDR=function(s){if(typeof s=="string"&&s.indexOf(":")===-1)return!1;try{return this.parseCIDR(s),!0}catch{return!1}},x.IPv6.networkAddressFromCIDR=function(s){let p,g,m,v,P;try{for(p=this.parseCIDR(s),m=p[0].toByteArray(),P=this.subnetMaskFromPrefixLength(p[1]).toByteArray(),v=[],g=0;g<16;)v.push(parseInt(m[g],10)&parseInt(P[g],10)),g++;return new this(v)}catch(j){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${j})`)}},x.IPv6.parse=function(s){let p=this.parser(s);if(p.parts===null)throw new Error("ipaddr: string is not formatted like an IPv6 Address");return new this(p.parts,p.zoneId)},x.IPv6.parseCIDR=function(s){let p,g,m;if((g=s.match(/^(.+)\/(\d+)$/))&&(p=parseInt(g[2]),p>=0&&p<=128))return m=[this.parse(g[1]),p],Object.defineProperty(m,"toString",{value:o(function(){return this.join("/")},"value")}),m;throw new Error("ipaddr: string is not formatted like an IPv6 CIDR range")},x.IPv6.parser=function(s){let p,g,m,v,P,j;if(m=s.match(d.deprecatedTransitional))return this.parser(`::ffff:${m[1]}`);if(d.native.test(s))return f(s,8);if((m=s.match(d.transitional))&&(j=m[6]||"",p=m[1],m[1].endsWith("::")||(p=p.slice(0,-1)),p=f(p+j,6),p.parts)){for(P=[parseInt(m[2]),parseInt(m[3]),parseInt(m[4]),parseInt(m[5])],g=0;g<P.length;g++)if(v=P[g],!(0<=v&&v<=255))return null;return p.parts.push(P[0]<<8|P[1]),p.parts.push(P[2]<<8|P[3]),{parts:p.parts,zoneId:p.zoneId}}return null},x.IPv6.subnetMaskFromPrefixLength=function(s){if(s=parseInt(s),s<0||s>128)throw new Error("ipaddr: invalid IPv6 prefix length");let p=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],g=0,m=Math.floor(s/8);for(;g<m;)p[g]=255,g++;return m<16&&(p[m]=Math.pow(2,s%8)-1<<8-s%8),new this(p)},x.fromByteArray=function(s){let p=s.length;if(p===4)return new x.IPv4(s);if(p===16)return new x.IPv6(s);throw new Error("ipaddr: the binary input is neither an IPv6 nor IPv4 address")},x.isValid=function(s){return x.IPv6.isValid(s)||x.IPv4.isValid(s)},x.isValidCIDR=function(s){return x.IPv6.isValidCIDR(s)||x.IPv4.isValidCIDR(s)},x.parse=function(s){if(x.IPv6.isValid(s))return x.IPv6.parse(s);if(x.IPv4.isValid(s))return x.IPv4.parse(s);throw new Error("ipaddr: the address has neither IPv6 nor IPv4 format")},x.parseCIDR=function(s){try{return x.IPv6.parseCIDR(s)}catch{try{return x.IPv4.parseCIDR(s)}catch{throw new Error("ipaddr: the address has neither IPv6 nor IPv4 CIDR format")}}},x.process=function(s){let p=this.parse(s);return p.kind()==="ipv6"&&p.isIPv4MappedAddress()?p.toIPv4Address():p},x.subnetMatch=function(s,p,g){let m,v,P,j;g==null&&(g="unicast");for(v in p)if(Object.prototype.hasOwnProperty.call(p,v)){for(P=p[v],P[0]&&!(P[0]instanceof Array)&&(P=[P]),m=0;m<P.length;m++)if(j=P[m],s.kind()===j[0].kind()&&s.match.apply(s,j))return v}return g},typeof Lt<"u"&&Lt.exports?Lt.exports=x:e.ipaddr=x})(Oo)});var ki=S((qA,zi)=>{var $i=require("stream").Stream,Pl=require("util");zi.exports=ue;function ue(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}o(ue,"DelayedStream");Pl.inherits(ue,$i);ue.create=function(e,t){var r=new this;t=t||{};for(var n in t)r[n]=t[n];r.source=e;var i=e.emit;return e.emit=function(){return r._handleEmit(arguments),i.apply(e,arguments)},e.on("error",function(){}),r.pauseStream&&e.pause(),r};Object.defineProperty(ue.prototype,"readable",{configurable:!0,enumerable:!0,get:o(function(){return this.source.readable},"get")});ue.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};ue.prototype.resume=function(){this._released||this.release(),this.source.resume()};ue.prototype.pause=function(){this.source.pause()};ue.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(e){this.emit.apply(this,e)}.bind(this)),this._bufferedEvents=[]};ue.prototype.pipe=function(){var e=$i.prototype.pipe.apply(this,arguments);return this.resume(),e};ue.prototype._handleEmit=function(e){if(this._released){this.emit.apply(this,e);return}e[0]==="data"&&(this.dataSize+=e[1].length,this._checkIfMaxDataSizeExceeded()),this._bufferedEvents.push(e)};ue.prototype._checkIfMaxDataSizeExceeded=function(){if(!this._maxDataSizeExceeded&&!(this.dataSize<=this.maxDataSize)){this._maxDataSizeExceeded=!0;var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(e))}}});var Ni=S((WA,Ri)=>{var Tl=require("util"),Oi=require("stream").Stream,wi=ki();Ri.exports=G;function G(){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(G,"CombinedStream");Tl.inherits(G,Oi);G.create=function(e){var t=new this;e=e||{};for(var r in e)t[r]=e[r];return t};G.isStreamLike=function(e){return typeof e!="function"&&typeof e!="string"&&typeof e!="boolean"&&typeof e!="number"&&!Buffer.isBuffer(e)};G.prototype.append=function(e){var t=G.isStreamLike(e);if(t){if(!(e instanceof wi)){var r=wi.create(e,{maxDataSize:1/0,pauseStream:this.pauseStreams});e.on("data",this._checkDataSize.bind(this)),e=r}this._handleErrors(e),this.pauseStreams&&e.pause()}return this._streams.push(e),this};G.prototype.pipe=function(e,t){return Oi.prototype.pipe.call(this,e,t),this.resume(),e};G.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}};G.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=G.isStreamLike(r);n&&(r.on("data",this._checkDataSize.bind(this)),this._handleErrors(r)),this._pipeNext(r)}.bind(this))};G.prototype._pipeNext=function(e){this._currentStream=e;var t=G.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()};G.prototype._handleErrors=function(e){var t=this;e.on("error",function(r){t._emitError(r)})};G.prototype.write=function(e){this.emit("data",e)};G.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"))};G.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")};G.prototype.end=function(){this._reset(),this.emit("end")};G.prototype.destroy=function(){this._reset(),this.emit("close")};G.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};G.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(e))}};G.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)};G.prototype._emitError=function(e){this._reset(),this.emit("error",e)}});var Ci=S((JA,Di)=>{"use strict";Di.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 ji=S(ee=>{"use strict";var Kt=Ci(),bl=require("path").extname,Mi=/^\s*([^;\s]*)(?:;|\s|$)/,Il=/^text\//i;ee.charset=Ui;ee.charsets={lookup:Ui};ee.contentType=El;ee.extension=Sl;ee.extensions=Object.create(null);ee.lookup=Al;ee.types=Object.create(null);$l(ee.extensions,ee.types);function Ui(e){if(!e||typeof e!="string")return!1;var t=Mi.exec(e),r=t&&Kt[t[1].toLowerCase()];return r&&r.charset?r.charset:t&&Il.test(t[1])?"UTF-8":!1}o(Ui,"charset");function El(e){if(!e||typeof e!="string")return!1;var t=e.indexOf("/")===-1?ee.lookup(e):e;if(!t)return!1;if(t.indexOf("charset")===-1){var r=ee.charset(t);r&&(t+="; charset="+r.toLowerCase())}return t}o(El,"contentType");function Sl(e){if(!e||typeof e!="string")return!1;var t=Mi.exec(e),r=t&&ee.extensions[t[1].toLowerCase()];return!r||!r.length?!1:r[0]}o(Sl,"extension");function Al(e){if(!e||typeof e!="string")return!1;var t=bl("x."+e).toLowerCase().substr(1);return t&&ee.types[t]||!1}o(Al,"lookup");function $l(e,t){var r=["nginx","apache",void 0,"iana"];Object.keys(Kt).forEach(o(function(i){var u=Kt[i],c=u.extensions;if(!(!c||!c.length)){e[i]=c;for(var d=0;d<c.length;d++){var f=c[d];if(t[f]){var h=r.indexOf(Kt[t[f]].source),_=r.indexOf(u.source);if(t[f]!=="application/octet-stream"&&(h>_||h===_&&t[f].substr(0,12)==="application/"))continue}t[f]=i}}},"forEachMimeType"))}o($l,"populateMaps")});var Fi=S((QA,Li)=>{Li.exports=zl;function zl(e){var t=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;t?t(e):setTimeout(e,0)}o(zl,"defer")});var Vr=S((t$,Zi)=>{var Bi=Fi();Zi.exports=kl;function kl(e){var t=!1;return Bi(function(){t=!0}),o(function(n,i){t?e(n,i):Bi(o(function(){e(n,i)},"nextTick_callback"))},"async_callback")}o(kl,"async")});var Hr=S((n$,Vi)=>{Vi.exports=wl;function wl(e){Object.keys(e.jobs).forEach(Ol.bind(e)),e.jobs={}}o(wl,"abort");function Ol(e){typeof this.jobs[e]=="function"&&this.jobs[e]()}o(Ol,"clean")});var qr=S((i$,qi)=>{var Hi=Vr(),Rl=Hr();qi.exports=Nl;function Nl(e,t,r,n){var i=r.keyedList?r.keyedList[r.index]:r.index;r.jobs[i]=Dl(t,i,e[i],function(u,c){i in r.jobs&&(delete r.jobs[i],u?Rl(r):r.results[i]=c,n(u,r.results))})}o(Nl,"iterate");function Dl(e,t,r,n){var i;return e.length==2?i=e(r,Hi(n)):i=e(r,t,Hi(n)),i}o(Dl,"runJob")});var Gr=S((s$,Gi)=>{Gi.exports=Cl;function Cl(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(Cl,"state")});var Wr=S((c$,Wi)=>{var Ml=Hr(),Ul=Vr();Wi.exports=jl;function jl(e){Object.keys(this.jobs).length&&(this.index=this.size,Ml(this),Ul(e)(null,this.results))}o(jl,"terminator")});var Ji=S((p$,Ki)=>{var Ll=qr(),Fl=Gr(),Bl=Wr();Ki.exports=Zl;function Zl(e,t,r){for(var n=Fl(e);n.index<(n.keyedList||e).length;)Ll(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 Bl.bind(n,r)}o(Zl,"parallel")});var Kr=S((m$,Jt)=>{var Xi=qr(),Vl=Gr(),Hl=Wr();Jt.exports=ql;Jt.exports.ascending=Yi;Jt.exports.descending=Gl;function ql(e,t,r,n){var i=Vl(e,r);return Xi(e,t,i,o(function u(c,d){if(c){n(c,d);return}if(i.index++,i.index<(i.keyedList||e).length){Xi(e,t,i,u);return}n(null,i.results)},"iteratorHandler")),Hl.bind(i,n)}o(ql,"serialOrdered");function Yi(e,t){return e<t?-1:e>t?1:0}o(Yi,"ascending");function Gl(e,t){return-1*Yi(e,t)}o(Gl,"descending")});var ea=S((g$,Qi)=>{var Wl=Kr();Qi.exports=Kl;function Kl(e,t,r){return Wl(e,t,null,r)}o(Kl,"serial")});var ra=S((h$,ta)=>{ta.exports={parallel:Ji(),serial:ea(),serialOrdered:Kr()}});var Jr=S((v$,na)=>{"use strict";na.exports=Object});var ia=S((x$,oa)=>{"use strict";oa.exports=Error});var sa=S((_$,aa)=>{"use strict";aa.exports=EvalError});var ca=S((P$,ua)=>{"use strict";ua.exports=RangeError});var pa=S((T$,la)=>{"use strict";la.exports=ReferenceError});var ma=S((b$,da)=>{"use strict";da.exports=SyntaxError});var Xt=S((I$,fa)=>{"use strict";fa.exports=TypeError});var ya=S((E$,ga)=>{"use strict";ga.exports=URIError});var va=S((S$,ha)=>{"use strict";ha.exports=Math.abs});var _a=S((A$,xa)=>{"use strict";xa.exports=Math.floor});var Ta=S(($$,Pa)=>{"use strict";Pa.exports=Math.max});var Ia=S((z$,ba)=>{"use strict";ba.exports=Math.min});var Sa=S((k$,Ea)=>{"use strict";Ea.exports=Math.pow});var $a=S((w$,Aa)=>{"use strict";Aa.exports=Math.round});var ka=S((O$,za)=>{"use strict";za.exports=Number.isNaN||o(function(t){return t!==t},"isNaN")});var Oa=S((N$,wa)=>{"use strict";var Jl=ka();wa.exports=o(function(t){return Jl(t)||t===0?t:t<0?-1:1},"sign")});var Na=S((C$,Ra)=>{"use strict";Ra.exports=Object.getOwnPropertyDescriptor});var Xr=S((M$,Da)=>{"use strict";var Yt=Na();if(Yt)try{Yt([],"length")}catch{Yt=null}Da.exports=Yt});var Ma=S((U$,Ca)=>{"use strict";var Qt=Object.defineProperty||!1;if(Qt)try{Qt({},"a",{value:1})}catch{Qt=!1}Ca.exports=Qt});var Yr=S((j$,Ua)=>{"use strict";Ua.exports=o(function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;t[r]=i;for(var u in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var c=Object.getOwnPropertySymbols(t);if(c.length!==1||c[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var d=Object.getOwnPropertyDescriptor(t,r);if(d.value!==i||d.enumerable!==!0)return!1}return!0},"hasSymbols")});var Fa=S((F$,La)=>{"use strict";var ja=typeof Symbol<"u"&&Symbol,Xl=Yr();La.exports=o(function(){return typeof ja!="function"||typeof Symbol!="function"||typeof ja("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Xl()},"hasNativeSymbols")});var Qr=S((Z$,Ba)=>{"use strict";Ba.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var en=S((V$,Za)=>{"use strict";var Yl=Jr();Za.exports=Yl.getPrototypeOf||null});var qa=S((H$,Ha)=>{"use strict";var Ql="Function.prototype.bind called on incompatible ",ep=Object.prototype.toString,tp=Math.max,rp="[object Function]",Va=o(function(t,r){for(var n=[],i=0;i<t.length;i+=1)n[i]=t[i];for(var u=0;u<r.length;u+=1)n[u+t.length]=r[u];return n},"concatty"),np=o(function(t,r){for(var n=[],i=r||0,u=0;i<t.length;i+=1,u+=1)n[u]=t[i];return n},"slicy"),op=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");Ha.exports=o(function(t){var r=this;if(typeof r!="function"||ep.apply(r)!==rp)throw new TypeError(Ql+r);for(var n=np(arguments,1),i,u=o(function(){if(this instanceof i){var _=r.apply(this,Va(n,arguments));return Object(_)===_?_:this}return r.apply(t,Va(n,arguments))},"binder"),c=tp(0,r.length-n.length),d=[],f=0;f<c;f++)d[f]="$"+f;if(i=Function("binder","return function ("+op(d,",")+"){ return binder.apply(this,arguments); }")(u),r.prototype){var h=o(function(){},"Empty");h.prototype=r.prototype,i.prototype=new h,h.prototype=null}return i},"bind")});var Ve=S((G$,Ga)=>{"use strict";var ip=qa();Ga.exports=Function.prototype.bind||ip});var er=S((W$,Wa)=>{"use strict";Wa.exports=Function.prototype.call});var tn=S((K$,Ka)=>{"use strict";Ka.exports=Function.prototype.apply});var Xa=S((J$,Ja)=>{"use strict";Ja.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var Qa=S((X$,Ya)=>{"use strict";var ap=Ve(),sp=tn(),up=er(),cp=Xa();Ya.exports=cp||ap.call(up,sp)});var ts=S((Y$,es)=>{"use strict";var lp=Ve(),pp=Xt(),dp=er(),mp=Qa();es.exports=o(function(t){if(t.length<1||typeof t[0]!="function")throw new pp("a function is required");return mp(lp,dp,t)},"callBindBasic")});var ss=S((ez,as)=>{"use strict";var fp=ts(),rs=Xr(),os;try{os=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!="object"||!("code"in e)||e.code!=="ERR_PROTO_ACCESS")throw e}var rn=!!os&&rs&&rs(Object.prototype,"__proto__"),is=Object,ns=is.getPrototypeOf;as.exports=rn&&typeof rn.get=="function"?fp([rn.get]):typeof ns=="function"?o(function(t){return ns(t==null?t:is(t))},"getDunder"):!1});var ds=S((rz,ps)=>{"use strict";var us=Qr(),cs=en(),ls=ss();ps.exports=us?o(function(t){return us(t)},"getProto"):cs?o(function(t){if(!t||typeof t!="object"&&typeof t!="function")throw new TypeError("getProto: not an object");return cs(t)},"getProto"):ls?o(function(t){return ls(t)},"getProto"):null});var nn=S((oz,ms)=>{"use strict";var gp=Function.prototype.call,yp=Object.prototype.hasOwnProperty,hp=Ve();ms.exports=hp.call(gp,yp)});var _s=S((iz,xs)=>{"use strict";var U,vp=Jr(),xp=ia(),_p=sa(),Pp=ca(),Tp=pa(),We=ma(),Ge=Xt(),bp=ya(),Ip=va(),Ep=_a(),Sp=Ta(),Ap=Ia(),$p=Sa(),zp=$a(),kp=Oa(),hs=Function,on=o(function(e){try{return hs('"use strict"; return ('+e+").constructor;")()}catch{}},"getEvalledConstructor"),vt=Xr(),wp=Ma(),an=o(function(){throw new Ge},"throwTypeError"),Op=vt?function(){try{return arguments.callee,an}catch{try{return vt(arguments,"callee").get}catch{return an}}}():an,He=Fa()(),X=ds(),Rp=en(),Np=Qr(),vs=tn(),xt=er(),qe={},Dp=typeof Uint8Array>"u"||!X?U:X(Uint8Array),Oe={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?U:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?U:ArrayBuffer,"%ArrayIteratorPrototype%":He&&X?X([][Symbol.iterator]()):U,"%AsyncFromSyncIteratorPrototype%":U,"%AsyncFunction%":qe,"%AsyncGenerator%":qe,"%AsyncGeneratorFunction%":qe,"%AsyncIteratorPrototype%":qe,"%Atomics%":typeof Atomics>"u"?U:Atomics,"%BigInt%":typeof BigInt>"u"?U:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?U:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?U:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?U:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":xp,"%eval%":eval,"%EvalError%":_p,"%Float16Array%":typeof Float16Array>"u"?U:Float16Array,"%Float32Array%":typeof Float32Array>"u"?U:Float32Array,"%Float64Array%":typeof Float64Array>"u"?U:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?U:FinalizationRegistry,"%Function%":hs,"%GeneratorFunction%":qe,"%Int8Array%":typeof Int8Array>"u"?U:Int8Array,"%Int16Array%":typeof Int16Array>"u"?U:Int16Array,"%Int32Array%":typeof Int32Array>"u"?U:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":He&&X?X(X([][Symbol.iterator]())):U,"%JSON%":typeof JSON=="object"?JSON:U,"%Map%":typeof Map>"u"?U:Map,"%MapIteratorPrototype%":typeof Map>"u"||!He||!X?U:X(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":vp,"%Object.getOwnPropertyDescriptor%":vt,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?U:Promise,"%Proxy%":typeof Proxy>"u"?U:Proxy,"%RangeError%":Pp,"%ReferenceError%":Tp,"%Reflect%":typeof Reflect>"u"?U:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?U:Set,"%SetIteratorPrototype%":typeof Set>"u"||!He||!X?U:X(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?U:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":He&&X?X(""[Symbol.iterator]()):U,"%Symbol%":He?Symbol:U,"%SyntaxError%":We,"%ThrowTypeError%":Op,"%TypedArray%":Dp,"%TypeError%":Ge,"%Uint8Array%":typeof Uint8Array>"u"?U:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?U:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?U:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?U:Uint32Array,"%URIError%":bp,"%WeakMap%":typeof WeakMap>"u"?U:WeakMap,"%WeakRef%":typeof WeakRef>"u"?U:WeakRef,"%WeakSet%":typeof WeakSet>"u"?U:WeakSet,"%Function.prototype.call%":xt,"%Function.prototype.apply%":vs,"%Object.defineProperty%":wp,"%Object.getPrototypeOf%":Rp,"%Math.abs%":Ip,"%Math.floor%":Ep,"%Math.max%":Sp,"%Math.min%":Ap,"%Math.pow%":$p,"%Math.round%":zp,"%Math.sign%":kp,"%Reflect.getPrototypeOf%":Np};if(X)try{null.error}catch(e){fs=X(X(e)),Oe["%Error.prototype%"]=fs}var fs,Cp=o(function e(t){var r;if(t==="%AsyncFunction%")r=on("async function () {}");else if(t==="%GeneratorFunction%")r=on("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=on("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&X&&(r=X(i.prototype))}return Oe[t]=r,r},"doEval"),gs={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},_t=Ve(),tr=nn(),Mp=_t.call(xt,Array.prototype.concat),Up=_t.call(vs,Array.prototype.splice),ys=_t.call(xt,String.prototype.replace),rr=_t.call(xt,String.prototype.slice),jp=_t.call(xt,RegExp.prototype.exec),Lp=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Fp=/\\(\\)?/g,Bp=o(function(t){var r=rr(t,0,1),n=rr(t,-1);if(r==="%"&&n!=="%")throw new We("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new We("invalid intrinsic syntax, expected opening `%`");var i=[];return ys(t,Lp,function(u,c,d,f){i[i.length]=d?ys(f,Fp,"$1"):c||u}),i},"stringToPath"),Zp=o(function(t,r){var n=t,i;if(tr(gs,n)&&(i=gs[n],n="%"+i[0]+"%"),tr(Oe,n)){var u=Oe[n];if(u===qe&&(u=Cp(n)),typeof u>"u"&&!r)throw new Ge("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:u}}throw new We("intrinsic "+t+" does not exist!")},"getBaseIntrinsic");xs.exports=o(function(t,r){if(typeof t!="string"||t.length===0)throw new Ge("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new Ge('"allowMissing" argument must be a boolean');if(jp(/^%?[^%]*%?$/,t)===null)throw new We("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=Bp(t),i=n.length>0?n[0]:"",u=Zp("%"+i+"%",r),c=u.name,d=u.value,f=!1,h=u.alias;h&&(i=h[0],Up(n,Mp([0,1],h)));for(var _=1,I=!0;_<n.length;_+=1){var x=n[_],s=rr(x,0,1),p=rr(x,-1);if((s==='"'||s==="'"||s==="`"||p==='"'||p==="'"||p==="`")&&s!==p)throw new We("property names with quotes must have matching quotes");if((x==="constructor"||!I)&&(f=!0),i+="."+x,c="%"+i+"%",tr(Oe,c))d=Oe[c];else if(d!=null){if(!(x in d)){if(!r)throw new Ge("base intrinsic for "+t+" exists, but the property is not available.");return}if(vt&&_+1>=n.length){var g=vt(d,x);I=!!g,I&&"get"in g&&!("originalValue"in g.get)?d=g.get:d=d[x]}else I=tr(d,x),d=d[x];I&&!f&&(Oe[c]=d)}}return d},"GetIntrinsic")});var Ts=S((sz,Ps)=>{"use strict";var Vp=Yr();Ps.exports=o(function(){return Vp()&&!!Symbol.toStringTag},"hasToStringTagShams")});var Es=S((cz,Is)=>{"use strict";var Hp=_s(),bs=Hp("%Object.defineProperty%",!0),qp=Ts()(),Gp=nn(),Wp=Xt(),nr=qp?Symbol.toStringTag:null;Is.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 Wp("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");nr&&(n||!Gp(t,nr))&&(bs?bs(t,nr,{configurable:!i,enumerable:!1,value:r,writable:!1}):t[nr]=r)},"setToStringTag")});var As=S((pz,Ss)=>{"use strict";var Kp=Function.prototype.call,Jp=Object.prototype.hasOwnProperty,Xp=Ve();Ss.exports=Xp.call(Kp,Jp)});var zs=S((dz,$s)=>{"use strict";$s.exports=function(e,t){return Object.keys(t).forEach(function(r){e[r]=e[r]||t[r]}),e}});var Os=S((mz,ws)=>{"use strict";var ln=Ni(),Yp=require("util"),sn=require("path"),Qp=require("http"),ed=require("https"),td=require("url").parse,rd=require("fs"),nd=require("stream").Stream,od=require("crypto"),un=ji(),id=ra(),ad=Es(),Ae=As(),cn=zs();function ks(e){return String(e).replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/"/g,"%22")}o(ks,"escapeHeaderParam");function L(e){if(!(this instanceof L))return new L(e);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],ln.call(this),e=e||{};for(var t in e)this[t]=e[t]}o(L,"FormData");Yp.inherits(L,ln);L.LINE_BREAK=`\r
2
+ `;L.DEFAULT_CONTENT_TYPE="application/octet-stream";L.prototype.append=function(e,t,r){r=r||{},typeof r=="string"&&(r={filename:r});var n=ln.prototype.append.bind(this);if((typeof t=="number"||t==null)&&(t=String(t)),Array.isArray(t)){this._error(new Error("Arrays are not supported."));return}var i=this._multiPartHeader(e,t,r),u=this._multiPartFooter();n(i),n(t),n(u),this._trackLength(i,t,r)};L.prototype._trackLength=function(e,t,r){var n=0;r.knownLength!=null?n+=Number(r.knownLength):Buffer.isBuffer(t)?n=t.length:typeof t=="string"&&(n=Buffer.byteLength(t)),this._valueLength+=n,this._overheadLength+=Buffer.byteLength(e)+L.LINE_BREAK.length,!(!t||!t.path&&!(t.readable&&Ae(t,"httpVersion"))&&!(t instanceof nd))&&(r.knownLength||this._valuesToMeasure.push(t))};L.prototype._lengthRetriever=function(e,t){Ae(e,"fd")?e.end!=null&&e.end!=1/0&&e.start!=null?t(null,e.end+1-(e.start?e.start:0)):rd.stat(e.path,function(r,n){if(r){t(r);return}var i=n.size-(e.start?e.start:0);t(null,i)}):Ae(e,"httpVersion")?t(null,Number(e.headers["content-length"])):Ae(e,"httpModule")?(e.on("response",function(r){e.pause(),t(null,Number(r.headers["content-length"]))}),e.resume()):t("Unknown stream")};L.prototype._multiPartHeader=function(e,t,r){if(typeof r.header=="string")return r.header;var n=this._getContentDisposition(t,r),i=this._getContentType(t,r),u="",c={"Content-Disposition":["form-data",'name="'+ks(e)+'"'].concat(n||[]),"Content-Type":[].concat(i||[])};typeof r.header=="object"&&cn(c,r.header);var d;for(var f in c)if(Ae(c,f)){if(d=c[f],d==null)continue;Array.isArray(d)||(d=[d]),d.length&&(u+=f+": "+d.join("; ")+L.LINE_BREAK)}return"--"+this.getBoundary()+L.LINE_BREAK+u+L.LINE_BREAK};L.prototype._getContentDisposition=function(e,t){var r;if(typeof t.filepath=="string"?r=sn.normalize(t.filepath).replace(/\\/g,"/"):t.filename||e&&(e.name||e.path)?r=sn.basename(t.filename||e&&(e.name||e.path)):e&&e.readable&&Ae(e,"httpVersion")&&(r=sn.basename(e.client._httpMessage.path||"")),r)return'filename="'+ks(r)+'"'};L.prototype._getContentType=function(e,t){var r=t.contentType;return!r&&e&&e.name&&(r=un.lookup(e.name)),!r&&e&&e.path&&(r=un.lookup(e.path)),!r&&e&&e.readable&&Ae(e,"httpVersion")&&(r=e.headers["content-type"]),!r&&(t.filepath||t.filename)&&(r=un.lookup(t.filepath||t.filename)),!r&&e&&typeof e=="object"&&(r=L.DEFAULT_CONTENT_TYPE),r};L.prototype._multiPartFooter=function(){return function(e){var t=L.LINE_BREAK,r=this._streams.length===0;r&&(t+=this._lastBoundary()),e(t)}.bind(this)};L.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+L.LINE_BREAK};L.prototype.getHeaders=function(e){var t,r={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in e)Ae(e,t)&&(r[t.toLowerCase()]=e[t]);return r};L.prototype.setBoundary=function(e){if(typeof e!="string")throw new TypeError("FormData boundary must be a string");this._boundary=e};L.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};L.prototype.getBuffer=function(){for(var e=new Buffer.alloc(0),t=this.getBoundary(),r=0,n=this._streams.length;r<n;r++)typeof this._streams[r]!="function"&&(Buffer.isBuffer(this._streams[r])?e=Buffer.concat([e,this._streams[r]]):e=Buffer.concat([e,Buffer.from(this._streams[r])]),(typeof this._streams[r]!="string"||this._streams[r].substring(2,t.length+2)!==t)&&(e=Buffer.concat([e,Buffer.from(L.LINE_BREAK)])));return Buffer.concat([e,Buffer.from(this._lastBoundary())])};L.prototype._generateBoundary=function(){this._boundary="--------------------------"+od.randomBytes(12).toString("hex")};L.prototype.getLengthSync=function(){var e=this._overheadLength+this._valueLength;return this._streams.length&&(e+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),e};L.prototype.hasKnownLength=function(){var e=!0;return this._valuesToMeasure.length&&(e=!1),e};L.prototype.getLength=function(e){var t=this._overheadLength+this._valueLength;if(this._streams.length&&(t+=this._lastBoundary().length),!this._valuesToMeasure.length){process.nextTick(e.bind(this,null,t));return}id.parallel(this._valuesToMeasure,this._lengthRetriever,function(r,n){if(r){e(r);return}n.forEach(function(i){t+=i}),e(null,t)})};L.prototype.submit=function(e,t){var r,n,i={method:"post"};return typeof e=="string"?(e=td(e),n=cn({port:e.port,path:e.pathname,host:e.hostname,protocol:e.protocol},i)):(n=cn(e,i),n.port||(n.port=n.protocol==="https:"?443:80)),n.headers=this.getHeaders(e.headers),n.protocol==="https:"?r=ed.request(n):r=Qp.request(n),this.getLength(function(u,c){if(u&&u!=="Unknown stream"){this._error(u);return}if(c&&r.setHeader("Content-Length",c),this.pipe(r),t){var d,f=o(function(h,_){return r.removeListener("error",f),r.removeListener("response",d),t.call(this,h,_)},"callback");d=f.bind(this,null),r.on("error",f),r.on("response",d)}}.bind(this)),r};L.prototype._error=function(e){this.error||(this.error=e,this.pause(),this.emit("error",e))};L.prototype.toString=function(){return"[object FormData]"};ad(L.prototype,"FormData");ws.exports=L});var gd={};fn(gd,{moxieCrm:()=>fd});module.exports=qs(gd);var Gs=Object.freeze({status:"aborted"});function b(e,t,r){function n(d,f){if(d._zod||Object.defineProperty(d,"_zod",{value:{def:f,constr:c,traits:new Set},enumerable:!1}),d._zod.traits.has(e))return;d._zod.traits.add(e),t(d,f);let h=c.prototype,_=Object.keys(h);for(let I=0;I<_.length;I++){let x=_[I];x in d||(d[x]=h[x].bind(d))}}o(n,"init");let i=r?.Parent??Object;class u extends i{static{o(this,"Definition")}}Object.defineProperty(u,"name",{value:e});function c(d){var f;let h=r?.Parent?new u:this;n(h,d),(f=h._zod).deferred??(f.deferred=[]);for(let _ of h._zod.deferred)_();return h}return o(c,"_"),Object.defineProperty(c,"init",{value:n}),Object.defineProperty(c,Symbol.hasInstance,{value:o(d=>r?.Parent&&d instanceof r.Parent?!0:d?._zod?.traits?.has(e),"value")}),Object.defineProperty(c,"name",{value:e}),c}o(b,"$constructor");var Ws=Symbol("zod_brand"),ce=class extends Error{static{o(this,"$ZodAsyncError")}constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Tt=class extends Error{static{o(this,"$ZodEncodeError")}constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}},ar={};function me(e){return e&&Object.assign(ar,e),ar}o(me,"config");function ur(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(ur,"getEnumValues");function hn(e,t){return typeof t=="bigint"?t.toString():t}o(hn,"jsonStringifyReplacer");function It(e){return{get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}o(It,"cached");function vn(e){return e==null}o(vn,"nullish");function Et(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}o(Et,"cleanRegex");var yn=Symbol("evaluating");function K(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==yn)return n===void 0&&(n=yn,n=r()),n},set(i){Object.defineProperty(e,t,{value:i})},configurable:!0})}o(K,"defineLazy");var cr="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Ye(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}o(Ye,"isObject");var Ks=It(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function xn(e){if(Ye(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let r=t.prototype;return!(Ye(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}o(xn,"isPlainObject");var _n=new Set(["string","number","symbol"]);function Ne(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}o(Ne,"escapeRegex");function St(e,t,r){let n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}o(St,"clone");function V(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(V,"normalizeParams");function Pn(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}o(Pn,"optionalKeys");var Js={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function De(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}o(De,"aborted");function xe(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}o(xe,"prefixIssues");function bt(e){return typeof e=="string"?e:e?.message}o(bt,"unwrapMessage");function _e(e,t,r){let n={...e,path:e.path??[]};if(!e.message){let i=bt(e.inst?._zod.def?.error?.(e))??bt(t?.error?.(e))??bt(r.customError?.(e))??bt(r.localeError?.(e))??"Invalid input";n.message=i}return delete n.inst,delete n.continue,t?.reportInput||delete n.input,n}o(_e,"finalizeIssue");function Tn(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}o(Tn,"getLengthableOrigin");function lr(...e){let[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}o(lr,"issue");var bn=o((e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,hn,2),Object.defineProperty(e,"toString",{value:o(()=>e.message,"value"),enumerable:!1})},"initializer"),In=b("$ZodError",bn),Qe=b("$ZodError",bn,{Parent:Error});var Ys=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 ce;if(c.issues.length){let d=new(i?.Err??e)(c.issues.map(f=>_e(f,u,me())));throw cr(d,i?.callee),d}return c.value},"_parse"),At=Ys(Qe),Qs=o(e=>async(t,r,n,i)=>{let u=n?Object.assign(n,{async:!0}):{async:!0},c=t._zod.run({value:r,issues:[]},u);if(c instanceof Promise&&(c=await c),c.issues.length){let d=new(i?.Err??e)(c.issues.map(f=>_e(f,u,me())));throw cr(d,i?.callee),d}return c.value},"_parseAsync"),$t=Qs(Qe),eu=o(e=>(t,r,n)=>{let i=n?{...n,async:!1}:{async:!1},u=t._zod.run({value:r,issues:[]},i);if(u instanceof Promise)throw new ce;return u.issues.length?{success:!1,error:new(e??In)(u.issues.map(c=>_e(c,i,me())))}:{success:!0,data:u.value}},"_safeParse"),et=eu(Qe),tu=o(e=>async(t,r,n)=>{let i=n?Object.assign(n,{async:!0}):{async:!0},u=t._zod.run({value:r,issues:[]},i);return u instanceof Promise&&(u=await u),u.issues.length?{success:!1,error:new e(u.issues.map(c=>_e(c,i,me())))}:{success:!0,data:u.value}},"_safeParseAsync"),tt=tu(Qe);var ru="(?:(?:\\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])))",nu=new RegExp(`^${ru}$`);var En=o(e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},"string"),Sn=/^-?\d+n?$/;var pr=/^-?\d+(?:\.\d+)?$/,An=/^(?:true|false)$/i;var Ce=b("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])});var $n=b("$ZodCheckMinLength",(e,t)=>{var r;Ce.init(e,t),(r=e._zod.def).when??(r.when=n=>{let i=n.value;return!vn(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=Tn(i);n.issues.push({origin:c,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}});var dr=b("$ZodCheckStringFormat",(e,t)=>{var r,n;Ce.init(e,t),e._zod.onattach.push(i=>{let u=i._zod.bag;u.format=t.format,t.pattern&&(u.patterns??(u.patterns=new Set),u.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=i=>{t.pattern.lastIndex=0,!t.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:t.format,input:i.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(n=e._zod).check??(n.check=()=>{})}),zn=b("$ZodCheckRegex",(e,t)=>{dr.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 wn={major:4,minor:3,patch:6};var H=b("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=wn;let n=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&n.unshift(e);for(let i of n)for(let u of i._zod.onattach)u(e);if(n.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let i=o((c,d,f)=>{let h=De(c),_;for(let I of d){if(I._zod.def.when){if(!I._zod.def.when(c))continue}else if(h)continue;let x=c.issues.length,s=I._zod.check(c);if(s instanceof Promise&&f?.async===!1)throw new ce;if(_||s instanceof Promise)_=(_??Promise.resolve()).then(async()=>{await s,c.issues.length!==x&&(h||(h=De(c,x)))});else{if(c.issues.length===x)continue;h||(h=De(c,x))}}return _?_.then(()=>c):c},"runChecks"),u=o((c,d,f)=>{if(De(c))return c.aborted=!0,c;let h=i(d,n,f);if(h instanceof Promise){if(f.async===!1)throw new ce;return h.then(_=>e._zod.parse(_,f))}return e._zod.parse(h,f)},"handleCanaryResult");e._zod.run=(c,d)=>{if(d.skipChecks)return e._zod.parse(c,d);if(d.direction==="backward"){let h=e._zod.parse({value:c.value,issues:[]},{...d,skipChecks:!0});return h instanceof Promise?h.then(_=>u(_,c,d)):u(h,c,d)}let f=e._zod.parse(c,d);if(f instanceof Promise){if(d.async===!1)throw new ce;return f.then(h=>i(h,n,d))}return i(f,n,d)}}K(e,"~standard",()=>({validate:o(i=>{try{let u=et(e,i);return u.success?{value:u.data}:{issues:u.error?.issues}}catch{return tt(e,i).then(c=>c.success?{value:c.data}:{issues:c.error?.issues})}},"validate"),vendor:"zod",version:1}))}),wt=b("$ZodString",(e,t)=>{H.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??En(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}}),mr=b("$ZodStringFormat",(e,t)=>{dr.init(e,t),wt.init(e,t)});var Cn=b("$ZodURL",(e,t)=>{mr.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 Mn=b("$ZodNumber",(e,t)=>{H.init(e,t),e._zod.pattern=e._zod.bag.pattern??pr,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}let i=r.value;if(typeof i=="number"&&!Number.isNaN(i)&&Number.isFinite(i))return r;let u=typeof i=="number"?Number.isNaN(i)?"NaN":Number.isFinite(i)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:i,inst:e,...u?{received:u}:{}}),r}});var fr=b("$ZodBoolean",(e,t)=>{H.init(e,t),e._zod.pattern=An,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}}),Un=b("$ZodBigInt",(e,t)=>{H.init(e,t),e._zod.pattern=Sn,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 jn=b("$ZodAny",(e,t)=>{H.init(e,t),e._zod.parse=r=>r}),Ln=b("$ZodUnknown",(e,t)=>{H.init(e,t),e._zod.parse=r=>r});var Fn=b("$ZodVoid",(e,t)=>{H.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}}),Bn=b("$ZodDate",(e,t)=>{H.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 On(e,t,r){e.issues.length&&t.issues.push(...xe(r,e.issues)),t.value[r]=e.value}o(On,"handleArrayResult");var Zn=b("$ZodArray",(e,t)=>{H.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;if(!Array.isArray(i))return r.issues.push({expected:"array",code:"invalid_type",input:i,inst:e}),r;r.value=Array(i.length);let u=[];for(let c=0;c<i.length;c++){let d=i[c],f=t.element._zod.run({value:d,issues:[]},n);f instanceof Promise?u.push(f.then(h=>On(h,r,c))):On(f,r,c)}return u.length?Promise.all(u).then(()=>r):r}});function kt(e,t,r,n,i){if(e.issues.length){if(i&&!(r in n))return;t.issues.push(...xe(r,e.issues))}e.value===void 0?r in n&&(t.value[r]=void 0):t.value[r]=e.value}o(kt,"handlePropertyResult");function ou(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=Pn(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}o(ou,"normalizeDef");function iu(e,t,r,n,i,u){let c=[],d=i.keySet,f=i.catchall._zod,h=f.def.type,_=f.optout==="optional";for(let I in t){if(d.has(I))continue;if(h==="never"){c.push(I);continue}let x=f.run({value:t[I],issues:[]},n);x instanceof Promise?e.push(x.then(s=>kt(s,r,I,t,_))):kt(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(iu,"handleCatchall");var Vn=b("$ZodObject",(e,t)=>{if(H.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let d=t.shape;Object.defineProperty(t,"shape",{get:o(()=>{let f={...d};return Object.defineProperty(t,"shape",{value:f}),f},"get")})}let n=It(()=>ou(t));K(e._zod,"propValues",()=>{let d=t.shape,f={};for(let h in d){let _=d[h]._zod;if(_.values){f[h]??(f[h]=new Set);for(let I of _.values)f[h].add(I)}}return f});let i=Ye,u=t.catchall,c;e._zod.parse=(d,f)=>{c??(c=n.value);let h=d.value;if(!i(h))return d.issues.push({expected:"object",code:"invalid_type",input:h,inst:e}),d;d.value={};let _=[],I=c.shape;for(let x of c.keys){let s=I[x],p=s._zod.optout==="optional",g=s._zod.run({value:h[x],issues:[]},f);g instanceof Promise?_.push(g.then(m=>kt(m,d,x,h,p))):kt(g,d,x,h,p)}return u?iu(_,h,d,f,n.value,e):_.length?Promise.all(_).then(()=>d):d}});function Rn(e,t,r,n){for(let u of e)if(u.issues.length===0)return t.value=u.value,t;let i=e.filter(u=>!De(u));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(u=>u.issues.map(c=>_e(c,n,me())))}),t)}o(Rn,"handleUnionResults");var gr=b("$ZodUnion",(e,t)=>{H.init(e,t),K(e._zod,"optin",()=>t.options.some(i=>i._zod.optin==="optional")?"optional":void 0),K(e._zod,"optout",()=>t.options.some(i=>i._zod.optout==="optional")?"optional":void 0),K(e._zod,"values",()=>{if(t.options.every(i=>i._zod.values))return new Set(t.options.flatMap(i=>Array.from(i._zod.values)))}),K(e._zod,"pattern",()=>{if(t.options.every(i=>i._zod.pattern)){let i=t.options.map(u=>u._zod.pattern);return new RegExp(`^(${i.map(u=>Et(u.source)).join("|")})$`)}});let r=t.options.length===1,n=t.options[0]._zod.run;e._zod.parse=(i,u)=>{if(r)return n(i,u);let c=!1,d=[];for(let f of t.options){let h=f._zod.run({value:i.value,issues:[]},u);if(h instanceof Promise)d.push(h),c=!0;else{if(h.issues.length===0)return h;d.push(h)}}return c?Promise.all(d).then(f=>Rn(f,i,e,u)):Rn(d,i,e,u)}});var Hn=b("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,gr.init(e,t);let r=e._zod.parse;K(e._zod,"propValues",()=>{let i={};for(let u of t.options){let c=u._zod.propValues;if(!c||Object.keys(c).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(u)}"`);for(let[d,f]of Object.entries(c)){i[d]||(i[d]=new Set);for(let h of f)i[d].add(h)}}return i});let n=It(()=>{let i=t.options,u=new Map;for(let c of i){let d=c._zod.propValues?.[t.discriminator];if(!d||d.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(c)}"`);for(let f of d){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(!Ye(c))return i.issues.push({code:"invalid_type",expected:"object",input:c,inst:e}),i;let d=n.value.get(c?.[t.discriminator]);return d?d._zod.run(i,u):t.unionFallback?r(i,u):(i.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:c,path:[t.discriminator],inst:e}),i)}});var qn=b("$ZodRecord",(e,t)=>{H.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;if(!xn(i))return r.issues.push({expected:"record",code:"invalid_type",input:i,inst:e}),r;let u=[],c=t.keyType._zod.values;if(c){r.value={};let d=new Set;for(let h of c)if(typeof h=="string"||typeof h=="number"||typeof h=="symbol"){d.add(typeof h=="number"?h.toString():h);let _=t.valueType._zod.run({value:i[h],issues:[]},n);_ instanceof Promise?u.push(_.then(I=>{I.issues.length&&r.issues.push(...xe(h,I.issues)),r.value[h]=I.value})):(_.issues.length&&r.issues.push(...xe(h,_.issues)),r.value[h]=_.value)}let f;for(let h in i)d.has(h)||(f=f??[],f.push(h));f&&f.length>0&&r.issues.push({code:"unrecognized_keys",input:i,inst:e,keys:f})}else{r.value={};for(let d of Reflect.ownKeys(i)){if(d==="__proto__")continue;let f=t.keyType._zod.run({value:d,issues:[]},n);if(f instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof d=="string"&&pr.test(d)&&f.issues.length){let I=t.keyType._zod.run({value:Number(d),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[d]=i[d]:r.issues.push({code:"invalid_key",origin:"record",issues:f.issues.map(I=>_e(I,n,me())),input:d,path:[d],inst:e});continue}let _=t.valueType._zod.run({value:i[d],issues:[]},n);_ instanceof Promise?u.push(_.then(I=>{I.issues.length&&r.issues.push(...xe(d,I.issues)),r.value[f.value]=I.value})):(_.issues.length&&r.issues.push(...xe(d,_.issues)),r.value[f.value]=_.value)}}return u.length?Promise.all(u).then(()=>r):r}});var Gn=b("$ZodEnum",(e,t)=>{H.init(e,t);let r=ur(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(i=>_n.has(typeof i)).map(i=>typeof i=="string"?Ne(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}}),Wn=b("$ZodLiteral",(e,t)=>{if(H.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"?Ne(n):n?Ne(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 Kn=b("$ZodTransform",(e,t)=>{H.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Tt(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 ce;return r.value=i,r}});function Nn(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}o(Nn,"handleOptionalResult");var Jn=b("$ZodOptional",(e,t)=>{H.init(e,t),e._zod.optin="optional",e._zod.optout="optional",K(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),K(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${Et(r.source)})?$`):void 0}),e._zod.parse=(r,n)=>{if(t.innerType._zod.optin==="optional"){let i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(u=>Nn(u,r.value)):Nn(i,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,n)}});var Xn=b("$ZodNullable",(e,t)=>{H.init(e,t),K(e._zod,"optin",()=>t.innerType._zod.optin),K(e._zod,"optout",()=>t.innerType._zod.optout),K(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${Et(r.source)}|null)$`):void 0}),K(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 Yn=b("$ZodPipe",(e,t)=>{H.init(e,t),K(e._zod,"values",()=>t.in._zod.values),K(e._zod,"optin",()=>t.in._zod.optin),K(e._zod,"optout",()=>t.out._zod.optout),K(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,n)=>{if(n.direction==="backward"){let u=t.out._zod.run(r,n);return u instanceof Promise?u.then(c=>zt(c,t.in,n)):zt(u,t.in,n)}let i=t.in._zod.run(r,n);return i instanceof Promise?i.then(u=>zt(u,t.out,n)):zt(i,t.out,n)}});function zt(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}o(zt,"handlePipeResult");var Qn=b("$ZodCustom",(e,t)=>{Ce.init(e,t),H.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=>Dn(u,r,n,e));Dn(i,r,n,e)}});function Dn(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(lr(i))}}o(Dn,"handleRefineResult");var to,cu=Symbol("ZodOutput"),lu=Symbol("ZodInput"),yr=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 ro(){return new yr}o(ro,"registry");(to=globalThis).__zod_globalRegistry??(to.__zod_globalRegistry=ro());var hr=globalThis.__zod_globalRegistry;function no(e,t){return new e({type:"string",...V(t)})}o(no,"_string");function oo(e,t){return new e({type:"string",coerce:!0,...V(t)})}o(oo,"_coercedString");function io(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...V(t)})}o(io,"_url");function ao(e,t){return new e({type:"number",checks:[],...V(t)})}o(ao,"_number");function so(e,t){return new e({type:"number",coerce:!0,checks:[],...V(t)})}o(so,"_coercedNumber");function uo(e,t){return new e({type:"boolean",...V(t)})}o(uo,"_boolean");function co(e,t){return new e({type:"boolean",coerce:!0,...V(t)})}o(co,"_coercedBoolean");function lo(e,t){return new e({type:"bigint",coerce:!0,...V(t)})}o(lo,"_coercedBigint");function po(e){return new e({type:"any"})}o(po,"_any");function mo(e){return new e({type:"unknown"})}o(mo,"_unknown");function fo(e,t){return new e({type:"void",...V(t)})}o(fo,"_void");function go(e,t){return new e({type:"date",coerce:!0,...V(t)})}o(go,"_coercedDate");function ae(e,t){return new $n({check:"min_length",...V(t),minimum:e})}o(ae,"_minLength");function Pe(e,t){return new zn({check:"string_format",format:"regex",...V(t),pattern:e})}o(Pe,"_regex");function yo(e,t,r){let n=V(r);return n.abort??(n.abort=!0),new e({type:"custom",check:"custom",fn:t,...n})}o(yo,"_custom");var J=b("ZodMiniType",(e,t)=>{if(!e._zod)throw new Error("Uninitialized schema in ZodMiniType.");H.init(e,t),e.def=t,e.type=t.type,e.parse=(r,n)=>At(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>et(e,r,n),e.parseAsync=async(r,n)=>$t(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>tt(e,r,n),e.check=(...r)=>e.clone({...t,checks:[...t.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]},{parent:!0}),e.with=e.check,e.clone=(r,n)=>St(e,r,n),e.brand=()=>e,e.register=(r,n)=>(r.add(e,n),e),e.apply=r=>r(e)}),Rt=b("ZodMiniString",(e,t)=>{wt.init(e,t),J.init(e,t)});function a(e){return no(Rt,e)}o(a,"string");var ho=b("ZodMiniStringFormat",(e,t)=>{mr.init(e,t),Rt.init(e,t)});var _u=b("ZodMiniURL",(e,t)=>{Cn.init(e,t),ho.init(e,t)});function vo(e){return io(_u,e)}o(vo,"url");var vr=b("ZodMiniNumber",(e,t)=>{Mn.init(e,t),J.init(e,t)});function Y(e){return ao(vr,e)}o(Y,"number");var xr=b("ZodMiniBoolean",(e,t)=>{fr.init(e,t),J.init(e,t)});function B(e){return uo(xr,e)}o(B,"boolean");var xo=b("ZodMiniBigInt",(e,t)=>{Un.init(e,t),J.init(e,t)});var Pu=b("ZodMiniAny",(e,t)=>{jn.init(e,t),J.init(e,t)});function nt(){return po(Pu)}o(nt,"any");var Tu=b("ZodMiniUnknown",(e,t)=>{Ln.init(e,t),J.init(e,t)});function w(){return mo(Tu)}o(w,"unknown");var bu=b("ZodMiniVoid",(e,t)=>{Fn.init(e,t),J.init(e,t)});function _o(e){return fo(bu,e)}o(_o,"_void");var Po=b("ZodMiniDate",(e,t)=>{Bn.init(e,t),J.init(e,t)});var Iu=b("ZodMiniArray",(e,t)=>{Zn.init(e,t),J.init(e,t)});function N(e,t){return new Iu({type:"array",element:e,...V(t)})}o(N,"array");var Eu=b("ZodMiniObject",(e,t)=>{Vn.init(e,t),J.init(e,t),K(e,"shape",()=>t.shape)});function l(e,t){let r={type:"object",shape:e??{},...V(t)};return new Eu(r)}o(l,"object");var Su=b("ZodMiniUnion",(e,t)=>{gr.init(e,t),J.init(e,t)});function D(e,t){return new Su({type:"union",options:e,...V(t)})}o(D,"union");var Au=b("ZodMiniDiscriminatedUnion",(e,t)=>{Hn.init(e,t),J.init(e,t)});function Me(e,t,r){return new Au({type:"union",options:t,discriminator:e,...V(r)})}o(Me,"discriminatedUnion");var $u=b("ZodMiniRecord",(e,t)=>{qn.init(e,t),J.init(e,t)});function O(e,t,r){return new $u({type:"record",keyType:e,valueType:t,...V(r)})}o(O,"record");var zu=b("ZodMiniEnum",(e,t)=>{Gn.init(e,t),J.init(e,t),e.options=Object.values(t.entries)});function M(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new zu({type:"enum",entries:r,...V(t)})}o(M,"_enum");var ku=b("ZodMiniLiteral",(e,t)=>{Wn.init(e,t),J.init(e,t)});function A(e,t){return new ku({type:"literal",values:Array.isArray(e)?e:[e],...V(t)})}o(A,"literal");var wu=b("ZodMiniTransform",(e,t)=>{Kn.init(e,t),J.init(e,t)});function Te(e){return new wu({type:"transform",transform:e})}o(Te,"transform");var Ou=b("ZodMiniOptional",(e,t)=>{Jn.init(e,t),J.init(e,t)});function y(e){return new Ou({type:"optional",innerType:e})}o(y,"optional");var Ru=b("ZodMiniNullable",(e,t)=>{Xn.init(e,t),J.init(e,t)});function ot(e){return new Ru({type:"nullable",innerType:e})}o(ot,"nullable");var Nu=b("ZodMiniPipe",(e,t)=>{Yn.init(e,t),J.init(e,t)});function be(e,t){return new Nu({type:"pipe",in:e,out:t})}o(be,"pipe");var Du=b("ZodMiniCustom",(e,t)=>{Qn.init(e,t),J.init(e,t)});function Nt(e,t){return yo(Du,e??(()=>!0),t)}o(Nt,"custom");var it={};fn(it,{bigint:()=>Bu,boolean:()=>Fu,date:()=>Zu,number:()=>Lu,string:()=>ju});function ju(e){return oo(Rt,e)}o(ju,"string");function Lu(e){return so(vr,e)}o(Lu,"number");function Fu(e){return co(xr,e)}o(Fu,"boolean");function Bu(e){return lo(xo,e)}o(Bu,"bigint");function Zu(e){return go(Po,e)}o(Zu,"date");var Pr=l({retryOnFailure:l({defaultValue:y(B()),hide:y(B())}),continueOnFailure:l({defaultValue:y(B()),hide:y(B())})}),_r=class{constructor(t,r,n,i,u,c,d,f,h,_,I){this.name=t;this.displayName=r;this.description=n;this.props=i;this.run=u;this.test=c;this.requireAuth=d;this.errorHandlingOptions=f;this.outputSchema=h;this.audience=_;this.aiMetadata=I}static{o(this,"IAction")}},Ie=o(e=>new _r(e.name,e.displayName,e.description,e.props,e.run,e.test??e.run,e.requireAuth??!0,e.errorHandlingOptions??{continueOnFailure:{defaultValue:!1},retryOnFailure:{defaultValue:!1}},e.outputSchema,e.audience,e.aiMetadata),"createAction");var F=l({displayName:a(),description:y(a())}),C=o((e,t)=>l({type:A(t),required:B(),defaultValue:y(nt())}),"TPropertyValue");var re=l({...F.shape,...C(a(),"SHORT_TEXT").shape}),fe=l({...F.shape,...C(a(),"LONG_TEXT").shape});var bo=l({label:a(),value:w()}),Dt=l({disabled:y(B()),placeholder:y(a()),options:N(bo)});var ne=l({...F.shape,options:Dt,...C(w(),"STATIC_DROPDOWN").shape}),ge=l({...F.shape,options:Dt,...C(N(w()),"STATIC_MULTI_SELECT_DROPDOWN").shape});var Tr=l({...F.shape,...C(w(),"DROPDOWN").shape,refreshers:N(a())}),at=l({...F.shape,...C(N(w()),"MULTI_SELECT_DROPDOWN").shape,refreshers:N(a())});var ye=l({...F.shape,...C(B(),"CHECKBOX").shape});var he=l({...F.shape,...C(Y(),"NUMBER").shape});var st=l({...F.shape,...C(w(),"FILE").shape});var ut=l({...F.shape,...C(a(),"DATE_TIME").shape});var Io=O(a(),D([re,fe,ne,at,ge,ye,he,st,ut])),ct=l({...F.shape,properties:Io,...C(N(w()),"ARRAY").shape});var lt=l({...F.shape,...C(D([O(a(),w())]),"JSON").shape});var Eo=D([re,ne,lt,ct,ge]),Hu=O(a(),Eo),br=l({refreshers:N(a()),...F.shape,...C(w(),"DYNAMIC").shape});var Ct=l({...F.shape,...C(_o(),"MARKDOWN").shape});var pt=(r=>(r.ARCHIVE="ARCHIVE",r.REGISTRY="REGISTRY",r))(pt||{}),Ue=(r=>(r.CUSTOM="CUSTOM",r.OFFICIAL="OFFICIAL",r))(Ue||{}),je=(v=>(v.ARTIFICIAL_INTELLIGENCE="ARTIFICIAL_INTELLIGENCE",v.COMMUNICATION="COMMUNICATION",v.COMMERCE="COMMERCE",v.CORE="CORE",v.UNIVERSAL_AI="UNIVERSAL_AI",v.FLOW_CONTROL="FLOW_CONTROL",v.BUSINESS_INTELLIGENCE="BUSINESS_INTELLIGENCE",v.ACCOUNTING="ACCOUNTING",v.PRODUCTIVITY="PRODUCTIVITY",v.CONTENT_AND_FILES="CONTENT_AND_FILES",v.DEVELOPER_TOOLS="DEVELOPER_TOOLS",v.CUSTOMER_SUPPORT="CUSTOMER_SUPPORT",v.FORMS_AND_SURVEYS="FORMS_AND_SURVEYS",v.HUMAN_RESOURCES="HUMAN_RESOURCES",v.PAYMENT_PROCESSING="PAYMENT_PROCESSING",v.MARKETING="MARKETING",v.SALES_AND_CRM="SALES_AND_CRM",v))(je||{});var dt=(r=>(r.AUTHORIZATION_CODE="authorization_code",r.CLIENT_CREDENTIALS="client_credentials",r))(dt||{}),Ir="both_client_credentials_and_authorization_code";var Ee=(i=>(i.POLLING="POLLING",i.WEBHOOK="WEBHOOK",i.APP_WEBHOOK="APP_WEBHOOK",i.MANUAL="MANUAL",i))(Ee||{}),mt=(u=>(u.NONE="NONE",u.HEADER_PRESENT="HEADER_PRESENT",u.QUERY_PRESENT="QUERY_PRESENT",u.BODY_PARAM_PRESENT="BODY_PARAM_PRESENT",u.HEAD_REQUEST="HEAD_REQUEST",u))(mt||{}),qu=l({strategy:M(mt),paramName:y(a())}),ft=(r=>(r.SIMULATION="SIMULATION",r.TEST_FUNCTION="TEST_FUNCTION",r))(ft||{});var Mt=(r=>(r.WEBSOCKET="WEBSOCKET",r.NONE="NONE",r))(Mt||{}),So=l({status:y(Y()),body:y(w()),headers:y(O(a(),a()))}),Ao=l({type:A("DELAY"),resumeDateTime:a(),requestIdToReply:y(a()),handlerId:y(a()),streamStepProgress:y(M(Mt))}),$o=l({type:A("WEBHOOK"),requestId:a(),requestIdToReply:y(a()),response:So,handlerId:y(a()),streamStepProgress:y(M(Mt))}),Gu=D([Ao,$o]);var Wu=l({body:w(),rawBody:y(w()),headers:O(a(),a()),queryParams:O(a(),a())});function se(e){return e==null}o(se,"isNil");function gt(e){return e==null?!0:typeof e=="string"||Array.isArray(e)?e.length===0:typeof e=="object"?Object.keys(e).length===0:!1}o(gt,"isEmpty");function Ut(e,t){if(e==null)throw new Error(`${t} is null or undefined`)}o(Ut,"assertNotNullOrUndefined");var Er=Re(require("crypto"),1);var Ku=128,ze,Le,Ju=o(e=>{!ze||ze.length<e?(ze=Buffer.allocUnsafe(e*Ku),Er.default.randomFillSync(ze),Le=0):Le+e>ze.length&&(Er.default.randomFillSync(ze),Le=0),Le+=e},"fillPool"),Xu=o(e=>(Ju(e|=0),ze.subarray(Le-e,Le)),"random"),Yu=o((e,t,r)=>{let n=(2<<31-Math.clz32(e.length-1|1))-1,i=Math.ceil(1.6*n*t/e.length);return(u=t)=>{let c="";for(;;){let d=r(i),f=i;for(;f--;)if(c+=e[d[f]&n]||"",c.length===u)return c}}},"customRandom"),ko=o((e,t=21)=>Yu(e,t,Xu),"customAlphabet");var Qu="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",wo=21,YP=a().check(Pe(new RegExp(`^[0-9a-zA-Z]{${wo}}$`))),ec=ko(Qu,wo);var Se=be(Te(e=>e instanceof Date?e.toISOString():e),a()),oe={id:a(),created:Se,updated:Se},Z=o(e=>y(ot(e)),"Nullable");function Sr(e){return y(ot(M(e)))}o(Sr,"NullableEnum");var tT=be(Te(e=>e==="true"||e===!0?!0:e==="false"||e===!1?!1:void 0),y(B())),jt=o(e=>be(Te(t=>Array.isArray(t)?t:t!==void 0?[t]:void 0),y(N(e))),"OptionalArrayFromQuery");var oT=O(a(),w());var yt=(_=>(_.OPENAI="openai",_.OPENROUTER="openrouter",_.ANTHROPIC="anthropic",_.AZURE="azure",_.GOOGLE="google",_.ACTIVEPIECES="activepieces",_.CLOUDFLARE_GATEWAY="cloudflare-gateway",_.CUSTOM="custom",_.BEDROCK="bedrock",_.MISTRAL="mistral",_))(yt||{});var yT=a().check(Pe(/^#[0-9A-Fa-f]{6}$/));var vT=l({filename:a(),data:w(),type:A("file"),mimetype:y(a())});var tc=Re(Ro());var ET=l({...oe,name:a(),permissions:N(a()),platformId:Z(a()),type:a(),userCount:y(Y())});var No=(n=>(n.AGENT_DECIDE="agent-decide",n.CHOOSE_YOURSELF="choose-yourself",n.LEAVE_EMPTY="leave-empty",n))(No||{}),Ar=(r=>(r.FILE="FILE",r.TABLE="TABLE",r))(Ar||{}),$r=(n=>(n.SSE="sse",n.STREAMABLE_HTTP="streamable-http",n.SIMPLE_HTTP="http",n))($r||{});var zr=(n=>(n.TEXT="text",n.NUMBER="number",n.BOOLEAN="boolean",n))(zr||{});var kr=(r=>(r.IN_PROGRESS="in-progress",r.COMPLETED="completed",r))(kr||{});var rc=l({mode:M(No),value:w()}),nc=l({auth:y(a()),fields:O(a(),rc)}),oc=l({pieceName:a(),pieceVersion:a(),actionName:a(),predefinedInput:y(nc)}),ic=l({type:A("PIECE"),toolName:a().check(ae(1)),pieceMetadata:oc}),ac=l({type:A("none")}),sc=l({type:A("access_token"),accessToken:a()}),uc=l({type:A("api_key"),apiKey:a(),apiKeyHeader:a()}),cc=l({type:A("headers"),headers:O(a(),a())}),lc=Me("type",[ac,sc,uc,cc]),Do=l({type:A("FLOW"),toolName:a().check(ae(1)),externalFlowId:a(),flowDisplayName:y(a())}),Co=l({type:A("MCP"),toolName:a().check(ae(1)),serverUrl:vo(),protocol:M($r),auth:lc}),Mo=l({type:A("KNOWLEDGE_BASE"),toolName:a().check(ae(1)),sourceType:M(Ar),sourceId:a(),sourceName:a()}),pc=Me("type",[ic,Do,Co,Mo]),dc=l({displayName:a(),description:y(a()),type:M(zr)}),Uo=l({type:A("MARKDOWN"),markdown:a()}),Fe={type:A("TOOL_CALL"),input:Z(O(a(),w())),output:y(w()),toolName:a(),status:M(kr),toolCallId:a(),startTime:a(),endTime:y(a())},YT=l(Fe),jo=Me("toolCallType",[l({...Fe,toolCallType:A("PIECE"),pieceName:a(),pieceVersion:a(),actionName:a()}),l({...Fe,toolCallType:A("FLOW"),displayName:a(),externalFlowId:a()}),l({...Fe,toolCallType:A("MCP"),displayName:a(),serverUrl:a()}),l({...Fe,toolCallType:A("KNOWLEDGE_BASE"),displayName:a(),sourceType:a()}),l({...Fe,toolCallType:A("UNKNOWN"),displayName:a()})]),mc=D([Uo,jo]);var wr=(r=>(r.IMAGE="image",r.TEXT="text",r))(wr||{}),ve=l({apiKey:a()}),fc=ve,gc=l({apiKey:a(),apiKeyHash:a()}),yc=ve,hc=ve,vc=ve,xc=ve,_c=ve,Pc=ve,Tc=ve,Lo=l({accessKeyId:a().check(ae(1)),secretAccessKey:a().check(ae(1))}),bc=l({}),Ic=l({}),Ec=l({}),Sc=l({}),Ac=l({}),$c=l({}),Fo=l({modelId:a(),modelName:a(),modelType:M(wr)}),Bo=l({apiKeyHeader:a(),baseUrl:a(),models:N(Fo),defaultHeaders:y(O(a(),a()))}),Zo=l({accountId:a(),gatewayId:a(),models:N(Fo),vertexProject:y(a()),vertexRegion:y(a())}),Vo=l({resourceName:a(),apiVersion:be(Te(e=>typeof e=="string"&&e.trim().length===0?void 0:e),y(a()))}),Ho=l({region:a().check(ae(1))}),zc=D([fc,vc,xc,_c,Pc,hc,yc,gc,Lo,Tc]),qo=D([Bo,Zo,Vo,Ho,bc,Ec,Sc,Ac,Ic,$c]),kc=l({id:a(),name:a(),type:M(wr)}),wc=l({id:a(),name:a(),provider:M(yt),config:qo,enabledForChat:B()}),Oc=l({provider:M(yt),config:qo,auth:zc,platformId:a()});var rb={openai:"openai",anthropic:"anthropic","google-ai-studio":"google","google-vertex-ai":"google"};var Rc=l({base64Url:a(),fileName:a(),extension:y(a())}),Nc=l({mimeType:a(),url:a(),fileName:y(a())}),Or=D([Rc,Nc]);var Dc=D([l({type:A("file"),value:Or}),l({type:A("markdown"),value:a(),files:y(N(Or))})]),Cc=l({sessionId:a(),message:a(),files:y(N(a()))});var Wo=(r=>(r.ON_NEW_RECORD="ON_NEW_RECORD",r.ON_UPDATE_RECORD="ON_UPDATE_RECORD",r))(Wo||{}),Ko=(r=>(r.ENABLED="ENABLED",r.DISABLED="DISABLED",r))(Ko||{}),Rr=(n=>(n.RECORD_CREATED="RECORD_CREATED",n.RECORD_UPDATED="RECORD_UPDATED",n.RECORD_DELETED="RECORD_DELETED",n))(Rr||{});var Mc=D([l({...oe,name:a(),externalId:a(),type:A("STATIC_DROPDOWN"),tableId:a(),projectId:a(),data:l({options:N(l({value:a()}))})}),l({...oe,name:a(),externalId:a(),type:D([A("TEXT"),A("NUMBER"),A("DATE")]),tableId:a(),projectId:a()})]),Uc=l({...oe,name:a(),folderId:Z(a()),projectId:a(),externalId:a(),status:Sr(Ko),trigger:Sr(Wo)}),jc=l({...oe,tableId:a(),projectId:a(),cells:O(a(),l({updated:a(),created:a(),value:w(),fieldName:a()}))}),Lc=l({events:N(M(Rr)),webhookUrl:a(),flowId:a()}),Fc=l({fields:N(l({id:a(),name:a()})),rows:N(O(a(),a())),name:a()}),Bc=l({projectId:a(),limit:y(it.number()),cursor:y(a()),name:y(a()),externalIds:jt(a()),folderId:y(a()),folderIds:jt(a())}),Zc=l({records:N(N(l({fieldId:a(),value:Xo()}))),tableId:a()}),Vc=l({cells:y(N(l({fieldId:a(),value:Xo()}))),tableId:a(),agentUpdate:y(B())}),Jo=Me("operator",[ke("eq"),ke("neq"),ke("gt"),ke("gte"),ke("lt"),ke("lte"),ke("co"),Go("exists"),Go("not_exists")]),Hc=l({tableId:a(),limit:y(it.number()),cursor:y(a()),filters:jt(Jo)});function Xo(){return be(Te(e=>e==null?e:String(e)),ot(a()))}o(Xo,"coerceToString");function ke(e){return l({fieldId:a(),operator:A(e),value:a()})}o(ke,"valueFilter");function Go(e){return l({fieldId:a(),operator:A(e)})}o(Go,"existenceFilter");var qc=l({status:y(Y()),body:y(w()),headers:y(O(a(),a()))}),Gc=l({...oe,deleted:Z(Se),ownerId:a(),displayName:a(),platformId:a(),externalId:Z(a())});var Yo=l({name:a(),description:y(a()),type:a(),required:B()}),Wc=l({pieceName:a(),triggerName:a(),input:l({toolName:a(),toolDescription:a(),inputSchema:N(Yo),returnsResponse:B()})});var Qo="^[0-9]+\\.[0-9]+\\.[0-9]+$",Pb=new RegExp(Qo),Jc="^([~^])?[0-9]+\\.[0-9]+\\.[0-9]+$",Tb=a().check(Pe(new RegExp(Qo))),bb=a().check(Pe(new RegExp(Jc))),Xc=l({packageType:A("ARCHIVE"),pieceType:M(Ue),pieceName:a(),pieceVersion:a(),archiveId:a(),platformId:a()}),ei=l({packageType:A("REGISTRY"),pieceType:A("OFFICIAL"),pieceName:a(),pieceVersion:a()}),ti=l({packageType:A("REGISTRY"),pieceType:A("CUSTOM"),pieceName:a(),pieceVersion:a(),platformId:a()}),Ib=D([ei,ti]),Eb=D([Xc,ei,ti]),ri=(t=>(t.CRON_EXPRESSION="CRON_EXPRESSION",t))(ri||{}),Yc=l({type:M(ri),cronExpression:a(),timezone:a()}),Sb=l({...oe,type:M(Ee),projectId:a(),flowId:a(),triggerName:a(),schedule:Z(Yc),flowVersionId:a(),pieceName:a(),pieceVersion:a(),deleted:Z(a()),simulate:B()}),ni=(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))(ni||{}),oi=(r=>(r.NONE="NONE",r.ZSTD="ZSTD",r))(oi||{}),ii=(r=>(r.S3="S3",r.DB="DB",r))(ii||{}),Ab=l({...oe,projectId:Z(a()),platformId:Z(a()),type:M(ni),compression:M(oi),data:y(w()),location:M(ii),size:Z(Y()),fileName:Z(a()),s3Key:Z(a()),metadata:Z(O(a(),a()))}),ai=(n=>(n.ADMIN="ADMIN",n.MEMBER="MEMBER",n.OPERATOR="OPERATOR",n))(ai||{}),si=(r=>(r.ACTIVE="ACTIVE",r.INACTIVE="INACTIVE",r))(si||{}),$b=l({id:a(),email:a(),firstName:a(),status:M(si),externalId:Z(a()),platformId:Z(a()),platformRole:M(ai),lastName:a(),created:Se,updated:Se,lastActiveDate:Z(Se),imageUrl:Z(a())});var Nr=l({...F.shape,...C(O(a(),w()),"OBJECT").shape});var pi=l({...F.shape,...C(a(),"COLOR").shape});var Dr=D([re,fe,Ct,ye,ne,ge,Tr,at,br,he,ct,Nr,lt,ut,st,pi]),T={ShortText(e){return{...e,valueSchema:void 0,type:"SHORT_TEXT"}},Checkbox(e){return{...e,valueSchema:void 0,type:"CHECKBOX"}},LongText(e){return{...e,valueSchema:void 0,type:"LONG_TEXT"}},MarkDown(e){return{displayName:"Markdown",required:!1,description:e.value,type:"MARKDOWN",valueSchema:void 0,variant:e.variant??"INFO"}},Number(e){return{...e,valueSchema:void 0,type:"NUMBER"}},Json(e){return{...e,valueSchema:void 0,type:"JSON"}},Array(e){return{...e,valueSchema:void 0,type:"ARRAY"}},Object(e){return{...e,valueSchema:void 0,type:"OBJECT"}},Dropdown(e){return{...e,valueSchema:void 0,type:"DROPDOWN"}},StaticDropdown(e){return{...e,valueSchema:void 0,type:"STATIC_DROPDOWN"}},MultiSelectDropdown(e){return{...e,valueSchema:void 0,type:"MULTI_SELECT_DROPDOWN"}},DynamicProperties(e){return{...e,valueSchema:void 0,type:"DYNAMIC"}},StaticMultiSelectDropdown(e){return{...e,valueSchema:void 0,type:"STATIC_MULTI_SELECT_DROPDOWN"}},DateTime(e){return{...e,valueSchema:void 0,type:"DATE_TIME"}},File(e){return{...e,valueSchema:void 0,type:"FILE"}},Custom(e){let t=e.code.toString();return{...e,code:t,valueSchema:void 0,type:"CUSTOM"}},Color(e){return{...e,valueSchema:void 0,type:"COLOR"}}};var le=l({displayName:a(),description:y(a())});var di=l({username:a(),password:a()}),Cr=l({...le.shape,username:l({displayName:a(),description:y(a())}),password:l({displayName:a(),description:y(a())}),...C(di,"BASIC_AUTH").shape});var rl=O(a(),D([re,fe,he,ye,ne])),Mr=l({...le.shape,props:rl,...C(w(),"CUSTOM_AUTH").shape});var we=l({...le.shape,...C(l({auth:a()}),"SECRET_TEXT").shape});var nl=O(a(),D([re,fe,we,he,ye,ne,ge,Ct])),mi=l({...le.shape,props:nl,...C(w(),"OIDC").shape});var Ur=(r=>(r.HEADER="HEADER",r.BODY="BODY",r))(Ur||{}),fi=D([re,we,ne]),gi=O(a(),fi),ol=l({props:y(O(a(),fi)),authUrl:a(),tokenUrl:a(),scope:N(a()),prompt:y(D([A("none"),A("consent"),A("login"),A("omit")])),pkce:y(B()),pkceMethod:y(D([A("plain"),A("S256")])),authorizationMethod:y(M(Ur)),grantType:y(D([M(dt),A(Ir)])),extra:y(O(a(),a()))}),yi=l({access_token:a(),props:y(gi),data:O(a(),nt())}),jr=l({...le.shape,...ol.shape,...C(yi,"OAUTH2").shape});var Be=D([Cr,Mr,mi,jr,we]),ht="Connection",Ft={SecretText(e){return{...e,valueSchema:void 0,type:"SECRET_TEXT"}},OAuth2(e){return{...e,valueSchema:void 0,type:"OAUTH2",displayName:e.displayName||ht}},BasicAuth(e){return{...e,valueSchema:void 0,type:"BASIC_AUTH",displayName:e.displayName||ht,required:!0}},CustomAuth(e){return{...e,valueSchema:void 0,type:"CUSTOM_AUTH",displayName:e.displayName||ht}},OIDC(e){return{...e,valueSchema:void 0,type:"OIDC",displayName:e.displayName||ht}},None(){}};var aE={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 il=l({...F.shape,...C(w(),"CUSTOM").shape,code:a()});var al=D([Dr,Be]),Lr=O(a(),al),SE=O(a(),Dr);var hi=D([l({strategy:A("CRON"),cronExpression:a()}),l({strategy:A("NONE")})]),Ze=class{constructor(t,r,n,i,u,c,d,f,h,_,I,x,s,p,g,m,v,P,j){this.name=t;this.displayName=r;this.description=n;this.requireAuth=i;this.props=u;this.type=c;this.handshakeConfiguration=d;this.onHandshake=f;this.renewConfiguration=h;this.onRenew=_;this.onEnable=I;this.onDisable=x;this.onStart=s;this.run=p;this.test=g;this.sampleData=m;this.testStrategy=v;this.outputSchema=P;this.aiMetadata=j}static{o(this,"ITrigger")}},vi=o(e=>{switch(e.type){case"WEBHOOK":return new Ze(e.name,e.displayName,e.description,e.requireAuth??!0,e.props,e.type,e.handshakeConfiguration??{strategy:"NONE"},e.onHandshake??(async()=>({status:200})),e.renewConfiguration??{strategy:"NONE"},e.onRenew??(async()=>Promise.resolve()),e.onEnable,e.onDisable,e.onStart??(async()=>Promise.resolve()),e.run,e.test??(()=>Promise.resolve([e.sampleData])),e.sampleData,e.test?"TEST_FUNCTION":"SIMULATION",e.outputSchema,e.aiMetadata);case"POLLING":return new Ze(e.name,e.displayName,e.description,e.requireAuth??!0,e.props,e.type,{strategy:"NONE"},async()=>({status:200}),{strategy:"NONE"},async()=>Promise.resolve(),e.onEnable,e.onDisable,e.onStart??(async()=>Promise.resolve()),e.run,e.test??(()=>Promise.resolve([e.sampleData])),e.sampleData,"TEST_FUNCTION",e.outputSchema,e.aiMetadata);case"MANUAL":return new Ze(e.name,e.displayName,e.description,e.requireAuth??!0,e.props,e.type,{strategy:"NONE"},async()=>({status:200}),{strategy:"NONE"},async()=>Promise.resolve(),e.onEnable,e.onDisable,e.onStart??(async()=>Promise.resolve()),e.run,e.test??(()=>Promise.resolve([e.sampleData])),e.sampleData,"TEST_FUNCTION",e.outputSchema,e.aiMetadata);case"APP_WEBHOOK":return new Ze(e.name,e.displayName,e.description,e.requireAuth??!0,e.props,e.type,{strategy:"NONE"},async()=>({status:200}),{strategy:"NONE"},async()=>Promise.resolve(),e.onEnable,e.onDisable,e.onStart??(async()=>Promise.resolve()),e.run,e.test??(()=>Promise.resolve([e.sampleData])),e.sampleData,se(e.sampleData)&&se(e.test)?"SIMULATION":"TEST_FUNCTION",e.outputSchema,e.aiMetadata)}},"createTrigger");var xi="2",Bt="0.82.0";var Fr=class{constructor(t,r,n,i,u,c,d,f,h=Bt,_,I=""){this.displayName=t;this.logoUrl=r;this.authors=n;this.events=i;this.categories=d;this.auth=f;this.minimumSupportedRelease=h;this.maximumSupportedRelease=_;this.description=I;this._actions={};this._triggers={};this.getContextInfo=o(()=>({version:xi}),"getContextInfo");(!sl(h)||ul(h,Bt))&&(this.minimumSupportedRelease=Bt),u.forEach(x=>this._actions[x.name]=x),c.forEach(x=>this._triggers[x.name]=x)}static{o(this,"Piece")}metadata(){return{displayName:this.displayName,logoUrl:this.logoUrl,actions:this._actions,triggers:this._triggers,categories:this.categories,description:this.description,authors:this.authors,auth:this.auth,minimumSupportedRelease:this.minimumSupportedRelease,maximumSupportedRelease:this.maximumSupportedRelease,contextInfo:this.getContextInfo?.()}}getAction(t){return this._actions[t]}getTrigger(t){return this._triggers[t]}actions(){return this._actions}triggers(){return this._triggers}},_i=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 Fr(e.displayName,e.logoUrl,e.authors??[],e.events,e.actions,e.triggers,e.categories??[],e.auth,e.minimumSupportedRelease,e.maximumSupportedRelease,e.description)},"createPiece");function sl(e){return/^\d+\.\d+\.\d+$/.test(e)}o(sl,"isValidSimpleSemver");function ul(e,t){let[r,n,i]=e.split(".").map(Number),[u,c,d]=t.split(".").map(Number);return r!==u?r<u:n!==c?n<c:i<d}o(ul,"isSemverLessThan");var cl=y(O(a(),O(a(),a()))),Pi=l({id:y(a()),name:a(),displayName:a(),logoUrl:a(),description:a(),authors:N(a()),platformId:y(a()),directoryPath:y(a()),auth:y(D([Be,N(Be)])),version:a(),categories:y(N(M(je))),minimumSupportedRelease:y(a()),maximumSupportedRelease:y(a()),i18n:cl}),ll=M(["human","ai","both"]),Ti=l({description:y(a()),idempotent:y(B())}),bi=l({name:a(),displayName:a(),description:a(),props:Lr,requireAuth:B(),errorHandlingOptions:y(Pr),outputSchema:y(Nt()),audience:y(ll),aiMetadata:y(Ti)}),Ii=l({name:a(),displayName:a(),description:a(),props:Lr,errorHandlingOptions:y(Pr),type:M(Ee),sampleData:w(),handshakeConfiguration:y(Nt()),renewConfiguration:y(hi),testStrategy:M(ft),outputSchema:y(Nt()),aiMetadata:y(Ti)}),pl=l({...Pi.shape,actions:O(a(),bi),triggers:O(a(),Ii)}),dl=l({...Pi.shape,actions:Y(),triggers:Y(),suggestedActions:y(N(Ii)),suggestedTriggers:y(N(bi))}),Ei=l({projectUsage:Y(),tags:y(N(a())),pieceType:M(Ue),packageType:M(pt),platformId:y(a()),archiveId:y(a())}),SS=l({...pl.shape,...Ei.shape}),AS=l({...dl.shape,...Ei.shape}),$S=l({name:a(),version:a()});var ml=Re(require("path")),fl=Re(require("fs/promises"));var Zt=class{constructor(t,r){this.baseUrl=t;this.authenticationConverter=r}static{o(this,"BaseHttpClient")}getUrl(t){let r=new URL(`${this.baseUrl}${t.url}`),n=`${r.origin}${r.pathname}`,i=new URLSearchParams;return r.searchParams.forEach((u,c)=>{i.append(c,u)}),{urlWithoutQueryParams:n,queryParams:i}}getHeaders(t){let r={Accept:"application/json"};if(t.authentication&&this.populateAuthentication(t.authentication,r),t.body)switch(t.headers?.["Content-Type"]){case"text/csv":r["Content-Type"]="text/csv";break;default:r["Content-Type"]="application/json";break}return t.headers&&(r={...r,...t.headers}),r}populateAuthentication(t,r){this.authenticationConverter.convert(t,r)}};var Vt=class{static{o(this,"DelegatingAuthenticationConverter")}constructor(t=new Br,r=new Zr){this.converters={BEARER_TOKEN:t,BASIC:r}}convert(t,r){return this.converters[t.type].convert(t,r)}},Br=class{static{o(this,"BearerTokenAuthenticationConverter")}convert(t,r){return r.Authorization=`Bearer ${t.token}`,r}},Zr=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 Ht=class extends Error{constructor(r,n){let i=n.status||500,u=Buffer.isBuffer(n.responseBody)?n.responseBody.toString():n.responseBody;super(JSON.stringify({response:{status:i,body:u},request:{body:r}}));this.requestBody=r;this.status=i,this.responseBody=u}static{o(this,"HttpError")}errorMessage(){return{response:{status:this.status,body:this.responseBody},request:{body:this.requestBody}}}get response(){return{status:this.status,body:this.responseBody}}get request(){return{body:this.requestBody}}};var qt=class extends Zt{static{o(this,"FetchHttpClient")}constructor(t="",r=new Vt){super(t,r)}async sendRequest(t,r){process.env.NODE_TLS_REJECT_UNAUTHORIZED="0";let{urlWithoutQueryParams:n,queryParams:i}=this.getUrl(t),u=this.getHeaders(t),c=t.queryParams??{};for(let[j,te]of Object.entries(c))i.append(j,te);let d=i.toString(),f=d?`${n}?${d}`:n,h=t.responseType??"json",_=t.followRedirects??!0,I=t.retries??0,{body:x,extraHeaders:s,isStream:p}=gl(t.body,u),g=hl({...u,...s}),m=await yl(async()=>{let j=new AbortController,te=t.timeout&&t.timeout>0?setTimeout(()=>j.abort(),t.timeout):void 0;try{let ie={method:t.method.toString(),headers:g,body:x,redirect:_?"follow":"manual",signal:j.signal};return p&&(ie.duplex="half"),r?.dispatcher!==void 0&&(ie.dispatcher=r.dispatcher),await fetch(f,ie)}finally{te!==void 0&&clearTimeout(te)}},I),v=_?300:400;if(m.status<200||m.status>=v){let j=await Si(m,h),te=new Ht(t.body,{status:m.status,responseBody:j});throw console.error("[HttpClient#(sanitized error message)] Request failed:",te),te}let P=await Si(m,h);return{status:m.status,headers:vl(m.headers),body:P}}};function gl(e,t){return _l(e)?{body:void 0,extraHeaders:{},isStream:!1}:xl(e)?{body:e,extraHeaders:e.getHeaders(),isStream:!0}:typeof e=="string"||Buffer.isBuffer(e)||e instanceof URLSearchParams||e instanceof ArrayBuffer||typeof FormData<"u"&&e instanceof FormData||typeof Blob<"u"&&e instanceof Blob?{body:e,extraHeaders:{},isStream:!1}:(t["Content-Type"]??t["content-type"]??"").includes("application/x-www-form-urlencoded")?{body:new URLSearchParams(e).toString(),extraHeaders:{},isStream:!1}:{body:JSON.stringify(e),extraHeaders:{},isStream:!1}}o(gl,"serializeBody");async function Si(e,t){switch(t){case"arraybuffer":return Buffer.from(await e.arrayBuffer());case"blob":return await e.blob();case"text":return await e.text();case"json":default:{let r=await e.text();if(r.length===0)return;try{return JSON.parse(r)}catch{return r}}}}o(Si,"parseResponseBody");async function yl(e,t){let r;for(let n=0;n<=t;n++)try{let i=await e();if(i.status>=500&&n<t){await Ai(n);continue}return i}catch(i){if(r=i,n<t){await Ai(n);continue}throw i}throw r}o(yl,"sendWithRetries");function Ai(e){let t=Math.min(1e3*2**e,3e4);return new Promise(r=>setTimeout(r,t))}o(Ai,"backoff");function hl(e){let t={};for(let[r,n]of Object.entries(e))n!==void 0&&(t[r]=Array.isArray(n)?n.join(", "):n);return t}o(hl,"normalizeHeaders");function vl(e){let t={};return e.forEach((r,n)=>{t[n]=r}),t}o(vl,"toHttpHeaders");function xl(e){return typeof e=="object"&&e!==null&&typeof e.getHeaders=="function"&&typeof e.pipe=="function"}o(xl,"isNodeFormData");function _l(e){return e==null}o(_l,"isNil");var Gt=new qt;var Wt=(c=>(c.GET="GET",c.POST="POST",c.PATCH="PATCH",c.PUT="PUT",c.DELETE="DELETE",c.HEAD="HEAD",c))(Wt||{});var sd=Re(require("fs")),Rs=Re(Os());var ud={"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 cd(e){let t=e.split(";")[0].trim().toLowerCase();return ud[t]??""}o(cd,"contentTypeToExtension");var ld=o(({baseUrl:e,relativePath:t})=>{let r=e.endsWith("/")?e:`${e}/`,n=t.startsWith("/")?t.slice(1):t;return`${r}${n}`},"joinBaseUrlWithRelativePath"),pd=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 Ns({auth:e,baseUrl:t,authMapping:r,description:n,displayName:i,name:u,props:c,extraProps:d,authLocation:f="headers"}){return Ie({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:T.DynamicProperties({auth:e,displayName:"",required:!0,refreshers:[],props:o(async({auth:h})=>({url:T.ShortText({displayName:"URL",description:`You can either use the full URL or the relative path to the base URL
3
+ i.e ${pd(t,h)}/resource or /resource`,required:!0,defaultValue:h?t(h):"",...c?.url??{}})}),"props")}),method:T.StaticDropdown({displayName:"Method",required:!0,options:{options:Object.values(Wt).map(h=>({label:h,value:h}))},...c?.method??{}}),headers:T.Object({displayName:"Headers",description:"Authorization headers are injected automatically from your connection.",required:!0,...c?.headers??{}}),queryParams:T.Object({displayName:"Query Parameters",required:!0,...c?.queryParams??{}}),body_type:T.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:T.DynamicProperties({auth:e,displayName:"Body",refreshers:["body_type"],required:!1,props:o(async({body_type:h})=>{if(!h)return{};let _=h,I={};switch(_){case"none":break;case"json":I.data=T.Json({displayName:"JSON Body",required:!0,...c?.body??{}});break;case"raw":I.data=T.LongText({displayName:"Raw Body",required:!0});break;case"form_data":I.data=T.Array({displayName:"Form Data",required:!0,properties:{fieldName:T.ShortText({displayName:"Field Name",required:!0}),fieldType:T.StaticDropdown({displayName:"Field Type",required:!0,options:{disabled:!1,options:[{label:"Text",value:"text"},{label:"File",value:"file"}]}}),textFieldValue:T.LongText({displayName:"Text Field Value",required:!1}),fileFieldValue:T.File({displayName:"File Field Value",required:!1})}});break}return I},"props")}),response_is_binary:T.Checkbox({displayName:"Response is Binary ?",description:"Enable for files like PDFs, images, etc.",required:!1,defaultValue:!1}),failsafe:T.Checkbox({displayName:"No Error on Failure",required:!1,...c?.failsafe??{}}),timeout:T.Number({displayName:"Timeout (in seconds)",required:!1,...c?.timeout??{}}),followRedirects:T.Checkbox({displayName:"Follow redirects",required:!1,defaultValue:!1}),...d},run:o(async h=>{let{method:_,url:I,headers:x,queryParams:s,body:p,body_type:g,failsafe:m,timeout:v,response_is_binary:P,followRedirects:j}=h.propsValue;Ut(_,"Method"),Ut(I,"URL");let te=se(r)?{}:await r(h.auth,h.propsValue),ie=I.url,Je=ie.startsWith("http://")||ie.startsWith("https://")?ie:ld({baseUrl:t(h.auth),relativePath:ie}),$e={method:_,url:Je,headers:{...x??{},...f==="headers"||!se(f)?te:{}},queryParams:{...f==="queryParams"?te:{},...s??{}},timeout:v?v*1e3:0,followRedirects:j};if(P&&($e.responseType="arraybuffer"),p)if(g&&g!=="none"){let de=p.data;if(g==="form_data"){let Ls=de,Pt=new Rs.default;for(let{fieldName:pn,fieldType:dn,textFieldValue:mn,fileFieldValue:ir}of Ls)dn==="text"&&!gt(mn)?Pt.append(pn,mn):dn==="file"&&!gt(ir)&&Pt.append(pn,ir.data,{filename:ir?.filename});$e.body=Pt,$e.headers={...$e.headers,...Pt.getHeaders()}}else $e.body=de}else g||($e.body=p);try{let de=await Gt.sendRequest($e);return await dd(h.files,de.body,de.status,de.headers,P)}catch(de){if(m)return de.errorMessage();throw de}},"run")})}o(Ns,"createCustomApiCallAction");var dd=o(async(e,t,r,n,i)=>{let u;if(i&&md(t)){let c=Array.isArray(n?.["content-type"])?n["content-type"][0]:n?.["content-type"],d=cd(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.${d}`,data:f})}else u=t;return{status:r,headers:n,body:u}},"handleBinaryResponse"),md=o(e=>e instanceof ArrayBuffer||Buffer.isBuffer(e),"isBinaryBody");var or=class{constructor(t,r){this.baseUrl=t;this.apiKey=r;this.baseUrl=t.replace(/\/$/,"")}static{o(this,"MoxieCRMClient")}async makeRequest(t,r,n=void 0,i){return await Gt.sendRequest({method:t,url:`${this.baseUrl}${r}`,headers:{"X-API-KEY":this.apiKey},body:n,queryParams:i})}async createContact(t){return(await this.makeRequest("POST","/action/contacts/create",t)).body}async createClient(t){return(await this.makeRequest("POST","/action/clients/create",t)).body}async listClients(){return(await this.makeRequest("GET","/action/clients/list")).body}async listInvoiceTemplates(){return(await this.makeRequest("GET","/action/invoiceTemplates/list")).body}async createProject(t){return(await this.makeRequest("POST","/action/projects/create",t)).body}async createTask(t){return(await this.makeRequest("POST","/action/tasks/create",t)).body}async searchProjects(t){return(await this.makeRequest("GET","/action/projects/search",void 0,{query:t})).body}async listProjectTaskStages(){return(await this.makeRequest("GET","/action/taskStages/list")).body}};async function pe(e){return new or(e.props.baseUrl,e.props.apiKey)}o(pe,"makeClient");function Ke(e){if(e)return e.split("T",2)[0]}o(Ke,"reformatDate");var Q=Ft.CustomAuth({required:!0,description:`
15
4
  To obtain your Moxie CRM token, follow these steps:
16
5
 
17
6
  1. Log in to your Moxie CRM account and click on **Workspace Settings** (Bottom left).
18
7
  2. Click on **Connected Apps** and navigate to **Integrations** tab.
19
8
  3. Now, under "Custom Integration", click on **Enable Custom Integration**.
20
9
  4. Copy **API Key** and **Base URL** and click on Save button.
21
- `,
22
- props: {
23
- apiKey: pieces_framework_1.PieceAuth.SecretText({
24
- displayName: 'API Key',
25
- description: 'The API Key of the Moxie CRM account',
26
- required: true,
27
- }),
28
- baseUrl: pieces_framework_1.Property.ShortText({
29
- displayName: 'Base URL',
30
- description: 'The Base URL of the Moxie CRM account',
31
- required: true,
32
- }),
33
- },
34
- });
35
- exports.moxieCrm = (0, pieces_framework_1.createPiece)({
36
- displayName: 'Moxie',
37
- description: 'CRM build for the freelancers.',
38
- auth: exports.moxieCRMAuth,
39
- minimumSupportedRelease: '0.30.0',
40
- logoUrl: 'https://cdn.activepieces.com/pieces/moxie-crm.png',
41
- authors: ["kishanprmr", "MoShizzle", "abuaboud"],
42
- categories: [shared_1.PieceCategory.SALES_AND_CRM],
43
- actions: [
44
- create_client_1.moxieCreateClientAction,
45
- create_task_1.moxieCreateTaskAction,
46
- create_project_1.moxieCreateProjectAction,
47
- (0, pieces_common_1.createCustomApiCallAction)({
48
- baseUrl: (auth) => { var _a; return ((_a = auth === null || auth === void 0 ? void 0 : auth.props.baseUrl) !== null && _a !== void 0 ? _a : ''); },
49
- auth: exports.moxieCRMAuth,
50
- authMapping: (auth) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
51
- return ({
52
- 'X-API-KEY': (auth.props.apiKey),
53
- });
54
- }),
55
- }),
56
- ],
57
- triggers: triggers_1.moxieCRMTriggers,
58
- });
59
- //# sourceMappingURL=index.js.map
10
+ `,props:{apiKey:Ft.SecretText({displayName:"API Key",description:"The API Key of the Moxie CRM account",required:!0}),baseUrl:T.ShortText({displayName:"Base URL",description:"The Base URL of the Moxie CRM account",required:!0})}});var Ds=Ie({auth:Q,name:"moxie_create_client",displayName:"Create a Client",description:"Create a new client record in moxie CRM.",audience:"both",aiMetadata:{description:"Creates a new client or prospect record in Moxie CRM with contact, address, billing, and rate details. Use when onboarding a new account into the CRM; set Client Type to distinguish a converted Client from a Prospect lead. Not idempotent: each call creates a separate client even if the name matches an existing one.",idempotent:!1},props:{name:T.ShortText({displayName:"Name",required:!0}),clientType:T.StaticDropdown({displayName:"Client Type",required:!0,defaultValue:"Client",options:{disabled:!1,options:[{label:"Client",value:"Client"},{label:"Prospect",value:"Prospect"}]}}),initials:T.ShortText({displayName:"Initials",required:!1}),address1:T.ShortText({displayName:"Address 1",required:!1}),address2:T.ShortText({displayName:"Address 2",required:!1}),city:T.ShortText({displayName:"City",required:!1}),locality:T.ShortText({displayName:"Locality",required:!1}),postal:T.ShortText({displayName:"Postal",required:!1}),country:T.ShortText({displayName:"Country",required:!1,description:"ISO 3166-1 alpha-2 country code"}),website:T.ShortText({displayName:"Website",required:!1}),phone:T.ShortText({displayName:"Phone",required:!1}),color:T.ShortText({displayName:"Color",required:!1}),taxId:T.ShortText({displayName:"Tax ID",required:!1}),leadSource:T.ShortText({displayName:"Lead Source",required:!1}),archive:T.Checkbox({displayName:"Archive ?",required:!0,defaultValue:!1}),payInstructions:T.LongText({displayName:"Pay Instructions",required:!1}),hourlyAmount:T.Number({displayName:"Hourly Amount",required:!1}),roundingIncrement:T.Number({displayName:"Rounding Increment",required:!1}),currency:T.ShortText({displayName:"Currency",required:!1,description:"Valid 3-Letter ISO 4217 currency code."}),stripeClientId:T.ShortText({displayName:"Stripe Client ID",required:!1}),notes:T.LongText({displayName:"Notes",required:!1})},async run({auth:e,propsValue:t}){return await(await pe(e)).createClient(t)}});var Cs=Ie({auth:Q,name:"moxie_create_project",description:"Creates a new project in moxie CRM.",displayName:"Create a Project",audience:"both",aiMetadata:{description:"Creates a new project in Moxie CRM under an existing client, including its fee schedule (hourly, fixed price, retainer, or per item), portal access level, and dates. Use when starting a new engagement for a known client. The Client must already exist and is matched by exact client name. Not idempotent: each call creates a separate project.",idempotent:!1},props:{name:T.ShortText({displayName:"Project Name",required:!0}),clientName:T.Dropdown({auth:Q,displayName:"Client",required:!0,refreshers:[],options:o(async({auth:e})=>e?{disabled:!1,options:(await(await pe(e)).listClients()).map(n=>({label:n.name,value:n.name}))}:{disabled:!0,placeholder:"Connect your account first",options:[]},"options")}),startDate:T.DateTime({displayName:"Start Date",description:"Please enter date in YYYY-MM-DD format.",required:!1}),dueDate:T.DateTime({displayName:"Due Date",description:"Please enter date in YYYY-MM-DD format.",required:!1}),portalAccess:T.StaticDropdown({displayName:"Client Portal Access",description:"One of: None, Overview, Full access, or Read only.",required:!0,defaultValue:"Read Only",options:{options:[{label:"Not Visible",value:"None"},{label:"Overview only",value:"Overview"},{label:"Read only project collaboration",value:"Read only"},{label:"Full project collaboration",value:"Full access"}]}}),showTimeWorkedInPortal:T.Checkbox({displayName:"Show time worked in portal ?",required:!1,defaultValue:!0}),feeType:T.StaticDropdown({displayName:"Fee Type",description:"One of: Hourly, Fixed Price, Retainer, Per Item.",required:!0,options:{options:[{label:"Hourly",value:"Hourly"},{label:"Fixed Price",value:"Fixed Price"},{label:"Retainer",value:"Retainer"},{label:"Per Item",value:"Per Item"}]}}),amount:T.Number({displayName:"Amount",required:!1,defaultValue:0}),estimateMax:T.Number({displayName:"Estimate maximum Amount",required:!1,defaultValue:0}),estimateMin:T.Number({displayName:"Estimate minimum Amount",required:!1,defaultValue:0}),taxable:T.Checkbox({displayName:"Is amount taxable ?",required:!1,defaultValue:!1})},async run({auth:e,propsValue:t}){let{name:r,clientName:n,portalAccess:i,showTimeWorkedInPortal:u,feeType:c,amount:d,estimateMax:f,estimateMin:h,taxable:_}=t,I=Ke(t.dueDate),x=Ke(t.startDate);return await(await pe(e)).createProject({name:r,clientName:n,startDate:x,dueDate:I,portalAccess:i,showTimeWorkedInPortal:u,feeSchedule:{feeType:c,amount:d,estimateMax:f,estimateMin:h,taxable:_}})}});var Ms=Ie({auth:Q,name:"moxie_create_task",displayName:"Create a Task",description:"Create a task in project.",audience:"both",aiMetadata:{description:"Creates a task (deliverable) inside an existing project in Moxie CRM, with status, dates, priority, assignees, subtasks, and custom values. Use when adding work items to a project. Requires an exact-match client name and a project name owned by that client. Not idempotent: each call creates a separate task.",idempotent:!1},props:{name:T.ShortText({displayName:"Name",required:!0}),clientName:T.Dropdown({auth:Q,displayName:"Client Name",description:"Exact match of a client name in your CRM",required:!0,refreshers:[],options:o(async({auth:e})=>e?{disabled:!1,options:(await(await pe(e)).listClients()).map(n=>({label:n.name,value:n.name}))}:{disabled:!0,placeholder:"Connect your account first",options:[]},"options")}),projectName:T.Dropdown({auth:Q,displayName:"Project Name",description:"Exact match of a project that is owned by the client.",required:!0,refreshers:["clientName"],options:o(async({auth:e,clientName:t})=>!e||!t?{disabled:!0,placeholder:"Connect your account first and select client",options:[]}:{disabled:!1,options:(await(await pe(e)).searchProjects(t)).map(i=>({label:i.name,value:i.name}))},"options")}),status:T.Dropdown({auth:Q,displayName:"Status",required:!0,defaultValue:"Not Started",refreshers:[],options:o(async({auth:e})=>e?{disabled:!1,options:(await(await pe(e)).listProjectTaskStages()).map(n=>({label:n.label,value:n.label}))}:{disabled:!0,placeholder:"Connect your account first",options:[]},"options")}),description:T.LongText({displayName:"Description",required:!1}),startDate:T.DateTime({displayName:"Start Date",required:!1,description:"ISO 8601 format date i.e. 2023-07-20"}),dueDate:T.DateTime({displayName:"Due Date",required:!1,description:"ISO 8601 format date i.e. 2023-07-20"}),priority:T.Number({displayName:"Priority",required:!1,description:"Numeric priority for sorting in kanban."}),tasks:T.Array({displayName:"Subtasks",required:!1}),assignedTo:T.Array({displayName:"Assigned To",required:!1,description:"email addresses of users in the workspace."}),customValues:T.Object({displayName:"Custom Values",required:!1})},async run({auth:e,propsValue:t}){let{name:r,clientName:n,projectName:i,status:u,description:c,priority:d}=t,f=Ke(t.dueDate),h=Ke(t.startDate),_=t.tasks||[],I=t.assignedTo||[],x=t.customValues||{};return await(await pe(e)).createTask({name:r,clientName:n,projectName:i,status:u,description:c,dueDate:f,startDate:h,priority:d,tasks:_,assignedTo:I,customValues:x})}});var Us=o(({name:e,displayName:t,description:r,aiMetadata:n,eventType:i,sampleData:u})=>vi({auth:Q,name:`moxie_trigger_${e}`,displayName:t,description:r,aiMetadata:n,props:{md:T.MarkDown({value:`
11
+ - Go to the **Workspace Settngs -> Connected Apps -> Integration** section.
12
+ - Under **Custom Integration** , click on **Add Rest Hook**.
13
+ - Click on **Integrations** section.
14
+ - In the endpoint field, paste the following URL:
15
+ \`\`\`text
16
+ {{webhookUrl}}
17
+ \`\`\`
18
+
19
+ - Select the event as **\`${t}\`** and click on **Save**.
20
+ `})},type:"WEBHOOK",sampleData:u,async onEnable(c){},async onDisable(c){},async run(c){return[c.payload.body]}}),"moxieCRMRegisterTrigger");var W={PROJECT_EVENT_SAMPLE_DATA:{id:"6434749e852ec5116d546759",accountId:10016,sampleData:!1,clientId:"64230b34bd4bbd275c1f1739",name:"Design & Development of Website",description:null,active:!0,startDate:"2023-05-16",dueDate:"2023-06-06",dateCreated:"2023-04-10T20:42:06.572Z",client:{accountId:10016,sampleData:!1,id:"64230b34bd4bbd275c1f1739",clientType:"Client",name:"Moxie",initials:"MOX1",locality:"CO",country:null,color:"#3BDBBE",projects:[],hourlyAmount:0,archive:!1,currency:"AUD",logo:"https://t3.gstatic.com/faviconV2?client=SOCIAL&type=FAVICON&fallback_opts=TYPE,SIZE,URL&url=https://www.withmoxie.com&size=64",leadSource:"Google",contact:null},leadGenArchived:!1,feeSchedule:{feeType:"Fixed Price",amount:5e3,retainerSchedule:null,estimateMax:null,estimateMin:null,retainerStart:null,retainerTiming:"Advanced",retainerOverageRate:null,taxable:!1,fromProposalId:null,fromProposalSignedDate:null,updatedDate:"2023-04-10T20:42:16.141Z",updatedBy:"G. Mina"},proposalId:null,proposalName:null,hexColor:"#3BDBBEFF",portalAccess:"Overview",showTimeWorkedInPortal:!0,files:[],deliverables:[]},CLIENT_EVENT_SAMPLE_DATA:{id:"63c5ea0c840e3207033931b5",accountId:10016,name:"Moxie",clientType:"Client",initials:"MOX",address1:"123 Any Street",address2:"Suite 100",city:"Anytown",locality:"NY",postal:"12345",country:"US",website:"www.withmoxie.com",phone:"+18887231235",color:"#CE62E9",logo:"https://t3.gstatic.com/faviconV2?client=SOCIAL&type=FAVICON&fallback_opts=TYPE,SIZE,URL&url=https://www.withmoxie.com&size=64",s3LogoFile:null,taxId:"1212121212",leadSource:"PPC",archive:!1,leadGenArchived:!1,paymentTerms:{paymentDays:7,latePaymentFee:5,depositAmount:50,depositType:"Percentage",whoPaysCardFees:"Freelancer",fromProposalId:"640b60752a524d1c45b6c528",fromProposalSignedDate:"2023-03-14T14:41:01.908Z",updatedDate:"2023-04-04T16:17:27.315Z",updatedBy:"G. Mina"},payInstructions:null,hourlyAmount:100,roundingIncrement:1,currency:"USD",lastInvoiceRunDate:null,nextInvoiceRunDate:null,importRecordId:null,integrationKeys:{quickbooksId:null,xeroId:null},files:[],comments:[],created:"2023-01-17T00:21:32.663Z",sampleData:!1,stripeClientId:"cus_NFTM1mAFkgtfUI",notes:null,notifyOnCreate:null,contacts:[{id:"63d431ab3813ca3d0789d2cc",accountId:10016,clientId:"63c5ea0c840e3207033931b5",clientPortalUserId:-66,firstName:"Jeffrey",lastName:"Marna",role:null,phone:null,email:"geoff.mina@withmoxie.com",mobile:null,notes:null,defaultContact:!0,invoiceContact:!1,portalAccess:!0,importRecordId:null,sampleData:null}]},PROJECT_TASK_EVENT_SAMPLE_DATA:{id:"64b3eba1249a076683fe3560",clientId:"6490580de30ecf51c2c22ffa",projectId:"649c83111c9cbe6ba1d4cabe",project:{id:"649c83111c9cbe6ba1d4cabe",accountId:10016,sampleData:!1,clientId:"6490580de30ecf51c2c22ffa",name:"Hourly Project",description:null,active:!0,startDate:null,dueDate:null,dateCreated:"2023-06-28T18:59:29.587Z",client:null,leadGenArchived:!1,feeSchedule:{feeType:"Hourly",amount:150,retainerSchedule:null,estimateMax:null,estimateMin:null,retainerStart:null,retainerTiming:"Advanced",retainerOverageRate:null,taxable:!1,fromProposalId:null,fromProposalSignedDate:null,updatedDate:null,updatedBy:null},proposalId:null,proposalName:null,hexColor:"#ffffff00",portalAccess:"Overview",showTimeWorkedInPortal:!0,files:[],deliverables:[]},client:{accountId:10016,sampleData:!1,id:"6490580de30ecf51c2c22ffa",clientType:"Client",name:"Moxie",initials:null,locality:"NY",country:"US",color:"#8EA3B8",projects:[],hourlyAmount:150,archive:!1,currency:"USD",logo:null,leadSource:null,contact:{id:"6490580de30ecf51c2c22ffb",accountId:10016,clientId:"6490580de30ecf51c2c22ffa",clientPortalUserId:-79,firstName:"Geoffrey",lastName:"Mina",role:null,phone:"+15555551212",email:"geoff.mina@withmoxie.com",mobile:null,notes:null,defaultContact:!0,invoiceContact:!1,portalAccess:!0,importRecordId:null,sampleData:null}},name:"Another new task to build website and victory",statusId:"05b26dd1-0668-4dcc-b438-87ac93d4eb15",status:"In Progress",priority:2,description:"This is the description of the task",assignedTo:null,assignedToList:[16,222],approvalRequired:!1,product:null,quantity:0,invoiceId:null,invoiceNumber:null,customValues:[{fieldId:"4591275b-1c76-4eae-9257-0438fe1d2354",fieldName:"Text Input",value:"Text input"},{fieldId:"a7e49f95-e0f4-416e-9bbf-586d98e1a55e",fieldName:"Numeric Input",value:123},{fieldId:"0a95ed1a-f084-4e13-be02-6065bea93aed",fieldName:"Currency Input",value:2e3},{fieldId:"399ac82b-e56e-4499-b4be-db7d3f81f0fc",fieldName:"Radio Input",value:"Two"},{fieldId:"006ec49b-68e1-4ebd-9bdc-d18776551616",fieldName:"Checkbox Input",value:"Three"},{fieldId:"d255032b-4f82-4f1b-8b61-4bccc66370c4",fieldName:"Phase",value:"Phase 1"},{fieldId:"4a281477-bed5-4f56-9e89-0bcb3758b3f8",fieldName:"Shoot Date",value:"2023-07-07"},{fieldId:"3fb9c4f2-8093-4315-b2cd-748a3526b497",fieldName:"Recurs",value:"Yes"}],comments:[{id:"81eec0c6-4b6b-46f5-a412-cdc66c8571c8",author:"Geoffrey Mina",authorId:"16",comment:"Comments in the task show up here.",clientComment:!1,edited:!1,privateComment:!1,sendEmail:!1,timestamp:"2023-07-20T10:51:32.086Z"}],startDate:"2023-07-01",dueDate:"2023-07-31",tasks:[{id:"e105201a27f34a26a37ef54e6b0f522b",description:"One",complete:!0},{id:"6c436ea963844783b569639f4c26768e",description:"Two",complete:!0},{id:"bf62b9745301466397d09ab9aaa4bd69",description:"Three",complete:!1},{id:"dd932850c2094d879c7128cecc468d83",description:"Four",complete:!1}],archived:!1,kanbanSort:2},FORM_EVENT_SAMPLE_DATA:{id:"64b8233d6ce6226305f24b47",accountId:10016,client:null,formName:"test-new-client",businessName:"Moxie",firstName:"Geoffrey",lastName:"Mina",phone:"+444445551212",email:"hello@withmoxie.com",role:null,address1:null,address2:null,city:null,locality:null,postal:null,country:null,website:null,leadSource:null,sourceUrl:"https://hello.withmoxie.dev/00/hectic-lab/test-new-client?inPortal=true",Field6:"Answer to your first question",Field7:"Another to your other question",submittedAt:"2023-07-19T17:54:05.257Z"},TIME_ENTRY_EVENT_SAMPLE_DATA:{id:"64b857b0b17c7c727001331c",accountId:10016,sampleData:!1,userId:16,timerStart:"2023-07-19T21:37:35.684Z",timerEnd:"2023-07-19T21:37:52.431Z",userFullName:"Geoffrey Mina",notes:"These are some notes",clientId:"6490580de30ecf51c2c22ffa",projectId:"649976d658c17d4f29b068ee",deliverableId:"649976e158c17d4f29b068ef",clientName:"Moxie",projectName:"Fun project for client",deliverableName:"Task 1",timestamp:null,timestampUpdated:null,invoiceId:null,invoiceNumber:null,importRecordId:null,feeSchedule:null,duration:16},MEETING_EVENT_SAMPLE_DATA:{id:"64b824df6ce6226305f24b53",accountId:10016,ownerUserId:null,sampleData:!1,meetingId:"63076a1320e0d10001e6cb63",clientId:"63c5ea0c840e3207033931b5",meetingStatus:"Scheduled",meetingName:"Geoff Mina / 30 minute meeting",schedulerName:"30 minute meeting",confirmedTime:{start:"2023-07-19T22:30:00.000Z",end:"2023-07-19T23:00:00.000Z"},scheduledTimezone:"America/New_York",scheduledLocale:"en-US",formData:{firstName:"Geoff",lastName:"Mina",email:"geoff.mina@withmoxie.com",phone:"+445555555555",role:null,businessName:null,website:null,address1:null,address2:null,city:null,locality:null,postal:null,country:null,sourceUrl:null,opportunityId:null,templateId:null,cardTokenId:null,leadSource:null,answers:[]},location:{type:"Google"},zoomMeeting:null,googleMeeting:{googleUserId:16,eventId:"_6oq64e1i6hi6cdj3ckr34chm6co3aphi6hh3acq0d1im6t39cdgn0s1ecdnmq",hangoutLink:"https://meet.google.com/swq-azkw-zkt",htmlLink:"https://www.google.com/calendar/event?eid=XzZvcTY0ZTFpNmhpNmNkajNja3IzNGNobTZjbzNhcGhpNmhoM2FjcTBkMWltNnQzOWNkZ24wczFlY2RubXEgZ2VvZmYubWluYUBoZWN0aWMudXM",googleUser:{name:"Geoff Mina",given_name:"Geoff",family_name:"Mina",picture:"https://lh3.googleusercontent.com/a/AGNmyxYxJL9h8SnY6z2oXg7fNHAdov1TJ4--RQtiAMn8=s96-c",email:"geoff.mina@hectic.us",email_verified:!0,locale:"en"},entryPoints:[{entryPointType:"video",label:"meet.google.com/swq-azkw-zkt",uri:"https://meet.google.com/swq-azkw-zkt"},{entryPointType:"more",pin:"4419810087411",uri:"https://tel.meet/swq-azkw-zkt?pin=4419810087411"},{entryPointType:"phone",label:"+1 646-504-7945",pin:"978184485",regionCode:"US",uri:"tel:+1-646-504-7945"}]},microsoftEvent:null,connectedICalUid:null,notes:null,cancellationReason:null,leadGenArchived:!1,opportunityId:null,files:[],meetingWith:"Moxie",incomeRecordId:null,icalUid:"64b824df6ce6226305f24b53@hecticapp.com"},OPPORTUNITY_EVENT_SAMPLE_DATA:{id:"642dfde9fd537145d22edbaa",accountId:10016,clientId:"5f7b3335b50f2a000189217a",statusId:"30180ce4-ba0a-4b5d-b92c-d2733e11b514",kanbanSort:1,name:"New Opportunity",description:null,sentiment:2,value:1500,timePeriod:"OneTime",periods:1,estCloseDate:"2023-07-31",actualCloseDate:null,formData:{firstName:"Geoff",lastName:"Mina",email:"geoff.mina@withmoxie.com",phone:"555-555-5554",role:"Executive",businessName:"Moxie",website:"www.withmoxie.com",address1:"123 Any Stree",address2:"Suite 100",city:"Boulder",locality:"CO",postal:"80301",country:"US",sourceUrl:"https://hello.hecticapp.dev/00/hectic-lab/fancy-new-form-v2",opportunityId:null,templateId:"642356ec35707318aa08bd18",cardTokenId:null,leadSource:"Google",answers:[{id:"516e2366-a52f-4d69-8059-d2df8e692f12",fieldKey:"Field9",fieldType:"TextInput",question:"Enter question text",answer:"Blah"},{id:"e30eb7c2-2b69-4a88-a973-92321c5c147d",fieldKey:"Field16",fieldType:"Checkbox",question:"Choose an option",answer:"Option 1, Option 2"},{id:"ba71978a-67df-4335-9a70-7bfad8185788",fieldKey:"Field13",fieldType:"Radio",question:"Choose an option",answer:"Option 2"},{id:"4dd4471d-04c0-4795-8859-5f4d3b0fb283",fieldKey:"Field7",fieldType:"DateInput",question:"Select a date",answer:"2023-04-06"},{id:"a201bb30-48c4-4408-a35e-0ff619a660f9",fieldKey:"Field15",fieldType:"TextArea",question:"Enter question text",answer:"Blah"},{id:"973d4b26-2629-4819-92ed-7f8c73268982",fieldKey:"Field8",fieldType:"FileInput",question:"Upload your file",answer:'["4BFE0272-D8BC-46CA-A8C8-079BB34B1BA0.jpeg"]'}]},archive:!1,initialWorkflow:!0,toDos:[{id:"4ed64532451f4421a063a7b61f2016b7",item:"Make Phone Call",complete:!1,dueDate:"2023-07-20",dateCompleted:null,relativeDueDate:{duration:null,timeUnit:null}},{id:"404fd07b56494676b2dc3aaee7a3b30f",item:"Send Email",complete:!1,dueDate:"2023-07-23",dateCompleted:null,relativeDueDate:{duration:null,timeUnit:null}}],comments:[{id:null,author:"System",authorId:"0",comment:"Auto created from form: Fancy New Form V2",clientComment:!1,edited:!1,privateComment:!1,sendEmail:!1,timestamp:"2023-04-05T23:02:00.618Z"}],files:[{fileName:"Screenshot 2023-07-19 at 6.11.40 PM.png",fileType:"PNG",timestamp:"2023-07-20T10:54:30.759Z",fileIconUrl:"https://struxture-www-assets.s3.us-east-2.amazonaws.com/file-icons/png.png"},{fileName:"Screenshot 2023-07-19 at 1.50.59 PM.png",fileType:"PNG",timestamp:"2023-07-20T10:54:30.991Z",fileIconUrl:"https://struxture-www-assets.s3.us-east-2.amazonaws.com/file-icons/png.png"}],workflow:[{id:"c595dc6c-b7ea-4dfd-ac10-0883320e1eb8",itemId:"642dfde2fd537145d22edba5",itemType:"Form",properties:{},timestamp:"2023-04-05T23:01:54.206Z"}],customValues:[{fieldId:"5e9d7171-1988-431d-a1c8-491e4ae71613",fieldName:"Custom Field",value:"Custom Field Value"}],history:[],statusLabel:"Contract"},INVOICE_EVENT_SAMPLE_DATA:{id:"64ae5aea99f38e74fc78ae46",invoiceNumber:74,invoiceNumberFormatted:"E-2023-74",accountId:10016,clientId:"6490580de30ecf51c2c22ffa",dateCreated:"2023-07-16",dateSent:"2023-07-12",dateDue:"2023-08-11",dateDueCalculated:null,datePaid:"2023-07-12",clientInfo:{id:"6490580de30ecf51c2c22ffa",name:"E164",initials:null,address1:"123 Any Street",address2:null,city:"Anytown",locality:"NY",postal:"12020",country:"US",phone:"+15555551212",color:"#8EA3B8",taxId:null,website:null,contact:{id:"6490580de30ecf51c2c22ffb",accountId:10016,clientId:"6490580de30ecf51c2c22ffa",clientPortalUserId:-79,firstName:"Geoffrey",lastName:"Mina",role:null,phone:"+12224445234",email:"user@email.com",mobile:null,notes:null,defaultContact:!0,invoiceContact:!1,portalAccess:!0,importRecordId:null,sampleData:null},roundingIncrement:1,customInfo:!1},status:"PARTIAL",invoiceType:"STANDARD",subTotal:14950,convenienceFee:0,lateFee:0,discountAmount:0,creditApplied:0,tax:225,total:15175,localTotal:15175,paymentTotal:78.75,localPaymentTotal:78.75,amountDue:15096.25,localAmountDue:15096.25,currency:"USD",integrationKeys:{quickbooksId:null,xeroId:null},viewOnlineUrl:"https://clients.domain.com/invoice?token=",payments:[{id:"29e34d7b-ef69-4059-bbe9-7b214c38a011",amount:78.75,pending:!1,paidBy:"G. Mina",paymentProvider:"CHECK",currency:"USD",referenceNumber:null,memo:null,datePaid:"2023-07-12",timestamp:"2023-07-12T06:00:00.000Z",integratedPayment:!1,forcePaidInFull:!1,integrationKeys:{quickbooksId:null,xeroId:null},isFailedPayment:!1,localAmount:78.75}]}},js=[{name:"client_created",displayName:"Client Created",description:"Triggered when a new client is created.",aiMetadata:{description:"Fires when a new client or prospect record is created in Moxie CRM. Use to start automations when an account is added to the CRM."},eventType:"ClientCreate",sampleData:W.CLIENT_EVENT_SAMPLE_DATA},{name:"client_updated",displayName:"Client Updated",description:"Triggered when an existing client is updated.",aiMetadata:{description:"Fires when an existing client record is modified in Moxie CRM, such as a change to contact, address, or billing details."},eventType:"ClientUpdate",sampleData:W.CLIENT_EVENT_SAMPLE_DATA},{name:"client_deleted",displayName:"Client Deleted",description:"Triggered when an existing client is deleted.",aiMetadata:{description:"Fires when a client record is deleted from Moxie CRM. Use to clean up or sync downstream systems when an account is removed."},eventType:"ClientDelete",sampleData:W.CLIENT_EVENT_SAMPLE_DATA},{name:"project_created",displayName:"Project Created",description:"Triggered when a new project is created.",aiMetadata:{description:"Fires when a new project is created for a client in Moxie CRM. Use to kick off engagement setup automations."},eventType:"ProjectCreate",sampleData:W.PROJECT_EVENT_SAMPLE_DATA},{name:"project_updated",displayName:"Project Updated",description:"Triggered when an existing project is updated.",aiMetadata:{description:"Fires when an existing project is modified in Moxie CRM, such as a change to dates, fee schedule, or portal access."},eventType:"ProjectUpdate",sampleData:W.PROJECT_EVENT_SAMPLE_DATA},{name:"project_completed",displayName:"Project Completed",description:"Triggered when an existing project is completed.",aiMetadata:{description:"Fires when a project is marked complete in Moxie CRM. Use to trigger wrap-up steps such as final invoicing or close-out notifications."},eventType:"ProjectComplete",sampleData:W.PROJECT_EVENT_SAMPLE_DATA},{name:"task_created",displayName:"Task Created",description:"Triggered when a new task is created.",aiMetadata:{description:"Fires when a new task (deliverable) is created within a project in Moxie CRM."},eventType:"DeliverableCreate",sampleData:W.PROJECT_TASK_EVENT_SAMPLE_DATA},{name:"task_updated",displayName:"Task Updated",description:"Triggered when an existing task is updated.",aiMetadata:{description:"Fires when an existing task (deliverable) is modified in Moxie CRM, such as a change to status, assignee, or due date."},eventType:"DeliverableUpdate",sampleData:W.PROJECT_TASK_EVENT_SAMPLE_DATA},{name:"task_deleted",displayName:"Task Deleted",description:"Triggered when an existing task is deleted.",aiMetadata:{description:"Fires when a task (deliverable) is deleted from a project in Moxie CRM."},eventType:"DeliverableDelete",sampleData:W.PROJECT_TASK_EVENT_SAMPLE_DATA},{name:"client_task_approval",displayName:"Client Task Approval",description:"Triggered when a task is moved to client approval.",aiMetadata:{description:"Fires when a task (deliverable) is moved into the client-approval stage in Moxie CRM. Use to notify or escalate when work awaits client sign-off."},eventType:"DeliverableApproval",sampleData:W.PROJECT_TASK_EVENT_SAMPLE_DATA},{name:"form_submitted",displayName:"Form Submitted",description:"Triggered when a new form is submitted.",aiMetadata:{description:"Fires when a Moxie CRM form (such as an intake or lead form) is submitted. Use to capture inbound leads or client-supplied information."},eventType:"FormCompleted",sampleData:W.FORM_EVENT_SAMPLE_DATA},{name:"time_entry_created",displayName:"Time Entry Created",description:"Triggered when a new time entry is created.",aiMetadata:{description:"Fires when a new time entry (timer record) is logged in Moxie CRM against a client, project, or task."},eventType:"TimerCreate",sampleData:W.TIME_ENTRY_EVENT_SAMPLE_DATA},{name:"time_entry_updated",displayName:"Time Entry Updated",description:"Triggered when an existing time entry is updated.",aiMetadata:{description:"Fires when an existing time entry (timer record) is modified in Moxie CRM, such as a change to duration or notes."},eventType:"TimerUpdate",sampleData:W.TIME_ENTRY_EVENT_SAMPLE_DATA},{name:"time_entry_deleted",displayName:"Time Entry Deleted",description:"Triggered when an existing time entry is deleted.",aiMetadata:{description:"Fires when a time entry (timer record) is deleted in Moxie CRM."},eventType:"TimerDelete",sampleData:W.TIME_ENTRY_EVENT_SAMPLE_DATA},{name:"meeting_scheduled",displayName:"Meeting Scheduled",description:"Triggered when a new meeting is scheduled.",aiMetadata:{description:"Fires when a new meeting is scheduled in Moxie CRM, including its confirmed time and conferencing details."},eventType:"MeetingScheduled",sampleData:W.MEETING_EVENT_SAMPLE_DATA},{name:"meeting_updated",displayName:"Meeting Updated",description:"Triggered when an existing meeting is updated.",aiMetadata:{description:"Fires when an existing meeting is modified in Moxie CRM, such as a reschedule or change to its details."},eventType:"MeetingUpdated",sampleData:W.MEETING_EVENT_SAMPLE_DATA},{name:"meeting_cancelled",displayName:"Meeting Cancelled",description:"Triggered when a meeting is cancelled.",aiMetadata:{description:"Fires when a scheduled meeting is cancelled in Moxie CRM."},eventType:"MeetingCancelled",sampleData:W.MEETING_EVENT_SAMPLE_DATA},{name:"opportunity_created",displayName:"Opportunity Created",description:"Triggered when a new pipeline opportunity is created.",aiMetadata:{description:"Fires when a new sales-pipeline opportunity is created in Moxie CRM. Use to start automations on incoming deals."},eventType:"OpportunityCreate",sampleData:W.OPPORTUNITY_EVENT_SAMPLE_DATA},{name:"opportunity_updated",displayName:"Opportunity Updated",description:"Triggered when an existing opportunity is updated.",aiMetadata:{description:"Fires when an existing pipeline opportunity is modified in Moxie CRM, such as a stage change or value update."},eventType:"OpportunityUpdate",sampleData:W.OPPORTUNITY_EVENT_SAMPLE_DATA},{name:"opportunity_deleted",displayName:"Opportunity Deleted",description:"Triggered when an existing pipeline opportunity is deleted.",aiMetadata:{description:"Fires when a pipeline opportunity is deleted from Moxie CRM."},eventType:"OpportunityDelete",sampleData:W.OPPORTUNITY_EVENT_SAMPLE_DATA},{name:"invoice_sent",displayName:"Invoice Sent",description:"Triggered when an invoice is sent.",aiMetadata:{description:"Fires when an invoice is sent to a client in Moxie CRM. Use to track billing or notify on outgoing invoices."},eventType:"InvoiceSent",sampleData:W.INVOICE_EVENT_SAMPLE_DATA},{name:"payment_received",displayName:"Payment Received",description:"Triggered when a payment is received.",aiMetadata:{description:"Fires when a payment against an invoice is received in Moxie CRM. Use to reconcile payments or trigger fulfillment."},eventType:"PaymentReceived",sampleData:W.INVOICE_EVENT_SAMPLE_DATA}].map(e=>Us(e));var fd=_i({displayName:"Moxie",description:"CRM build for the freelancers.",auth:Q,minimumSupportedRelease:"0.30.0",logoUrl:"https://cdn.activepieces.com/pieces/moxie-crm.png",authors:["kishanprmr","MoShizzle","abuaboud"],categories:["SALES_AND_CRM"],actions:[Ds,Ms,Cs,Ns({baseUrl:o(e=>e?.props.baseUrl??"","baseUrl"),auth:Q,authMapping:o(async e=>({"X-API-KEY":e.props.apiKey}),"authMapping")})],triggers:js});0&&(module.exports={moxieCrm});
21
+ /*! Bundled license information:
22
+
23
+ mime-types/index.js:
24
+ (*!
25
+ * mime-types
26
+ * Copyright(c) 2014 Jonathan Ong
27
+ * Copyright(c) 2015 Douglas Christopher Wilson
28
+ * MIT Licensed
29
+ *)
30
+ */
package/README.md DELETED
@@ -1,7 +0,0 @@
1
- # pieces-moxie-crm
2
-
3
- This library was generated with [Nx](https://nx.dev).
4
-
5
- ## Building
6
-
7
- Run `nx build pieces-moxie-crm` to build the library.
package/src/index.d.ts DELETED
@@ -1,8 +0,0 @@
1
- export declare const moxieCRMAuth: import("@activepieces/pieces-framework").CustomAuthProperty<{
2
- apiKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
3
- baseUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
4
- }>;
5
- export declare const moxieCrm: import("@activepieces/pieces-framework").Piece<import("@activepieces/pieces-framework").CustomAuthProperty<{
6
- apiKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
7
- baseUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
8
- }>>;
package/src/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/pieces/community/moxie-crm/src/index.ts"],"names":[],"mappings":";;;;AAAA,+DAAwE;AACxE,qEAIwC;AACxC,iDAAqD;AACrD,+DAAsE;AACtE,iEAAwE;AACxE,2DAAkE;AAClE,6CAAkD;AACrC,QAAA,YAAY,GAAG,4BAAS,CAAC,UAAU,CAAC;IAC/C,QAAQ,EAAE,IAAI;IACd,WAAW,EAAE;;;;;;;GAOZ;IACD,KAAK,EAAE;QACL,MAAM,EAAE,4BAAS,CAAC,UAAU,CAAC;YAC3B,WAAW,EAAE,SAAS;YACtB,WAAW,EAAE,sCAAsC;YACnD,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,OAAO,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC1B,WAAW,EAAE,UAAU;YACvB,WAAW,EAAE,uCAAuC;YACpD,QAAQ,EAAE,IAAI;SACf,CAAC;KACH;CACF,CAAC,CAAC;AAEU,QAAA,QAAQ,GAAG,IAAA,8BAAW,EAAC;IAClC,WAAW,EAAE,OAAO;IACpB,WAAW,EAAE,gCAAgC;IAE7C,IAAI,EAAE,oBAAY;IAClB,uBAAuB,EAAE,QAAQ;IACjC,OAAO,EAAE,mDAAmD;IAC5D,OAAO,EAAE,CAAC,YAAY,EAAC,WAAW,EAAC,UAAU,CAAC;IAC9C,UAAU,EAAE,CAAC,sBAAa,CAAC,aAAa,CAAC;IACzC,OAAO,EAAE;QACP,uCAAuB;QACvB,mCAAqB;QACrB,yCAAwB;QACxB,IAAA,yCAAyB,EAAC;YACxB,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE,WAAC,OAAA,CAAC,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,KAAK,CAAC,OAAO,mCAAI,EAAE,CAAC,CAAA,EAAA;YAC9C,IAAI,EAAE,oBAAY;YAClB,WAAW,EAAE,CAAO,IAAI,EAAE,EAAE;gBAAC,OAAA,CAAC;oBAC5B,WAAW,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC;iBACjC,CAAC,CAAA;cAAA;SACH,CAAC;KACH;IACD,QAAQ,EAAE,2BAAgB;CAC3B,CAAC,CAAC"}
@@ -1,26 +0,0 @@
1
- export declare const moxieCreateClientAction: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
2
- apiKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
3
- baseUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
4
- }>, {
5
- name: import("@activepieces/pieces-framework").ShortTextProperty<true>;
6
- clientType: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
7
- initials: import("@activepieces/pieces-framework").ShortTextProperty<false>;
8
- address1: import("@activepieces/pieces-framework").ShortTextProperty<false>;
9
- address2: import("@activepieces/pieces-framework").ShortTextProperty<false>;
10
- city: import("@activepieces/pieces-framework").ShortTextProperty<false>;
11
- locality: import("@activepieces/pieces-framework").ShortTextProperty<false>;
12
- postal: import("@activepieces/pieces-framework").ShortTextProperty<false>;
13
- country: import("@activepieces/pieces-framework").ShortTextProperty<false>;
14
- website: import("@activepieces/pieces-framework").ShortTextProperty<false>;
15
- phone: import("@activepieces/pieces-framework").ShortTextProperty<false>;
16
- color: import("@activepieces/pieces-framework").ShortTextProperty<false>;
17
- taxId: import("@activepieces/pieces-framework").ShortTextProperty<false>;
18
- leadSource: import("@activepieces/pieces-framework").ShortTextProperty<false>;
19
- archive: import("@activepieces/pieces-framework").CheckboxProperty<true>;
20
- payInstructions: import("@activepieces/pieces-framework").LongTextProperty<false>;
21
- hourlyAmount: import("@activepieces/pieces-framework").NumberProperty<false>;
22
- roundingIncrement: import("@activepieces/pieces-framework").NumberProperty<false>;
23
- currency: import("@activepieces/pieces-framework").ShortTextProperty<false>;
24
- stripeClientId: import("@activepieces/pieces-framework").ShortTextProperty<false>;
25
- notes: import("@activepieces/pieces-framework").LongTextProperty<false>;
26
- }>;